:root {
    --primary-color: #ff9f43;
    --primary-hover: #ff7f0e;
    --secondary-color: #1dd1a1;
    --dark-bg: #121212;
    --darker-bg: #0a0a0a;
    --card-bg: #1e1e1e;
    --text-color: #e0e0e0;
}

html, body {
    height: 100%;
    margin: 0;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-color);
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    padding-top: 6rem;
    overflow-x: hidden;
}

@media (max-width: 991.98px) {
    body {
        padding-top: 4.5rem;
    }
}

/* Sfondo Pattern Dinamico */
body.bg-pattern {
    background-image: url("/static/images/kitchen_pattern.png");
    background-repeat: repeat;
    background-attachment: fixed;
    background-size: 700px;
    background-position: center;
    background-color: #050505;
}

body.bg-pattern::before {
    content: "";
    position: fixed;
    top: 0; left: 0; 
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.2);
    z-index: -1;
    pointer-events: none;
}

/* Base Utilities */
.z-1100 { z-index: 1100 !important; }
.bg-darker { background-color: var(--darker-bg) !important; }
.bg-dark-card {
    background-color: var(--card-bg) !important;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.text-primary { color: var(--primary-color) !important; }
.text-gradient {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Button Overrides */
.btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #fff !important;
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
    color: #fff !important;
}
.btn-outline-primary {
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}
.btn-outline-primary:hover, .btn-outline-primary:focus, .btn-outline-primary:active {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #fff !important;
}

/* Back Button */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 1.1rem 0.45rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 159, 67, 0.08);
    border: 1px solid rgba(255, 159, 67, 0.25);
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.01em;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}
.back-btn i {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}
.back-btn:hover {
    background: rgba(255, 159, 67, 0.18);
    border-color: rgba(255, 159, 67, 0.55);
    color: #ffb86c;
    box-shadow: 0 0 14px rgba(255, 159, 67, 0.22);
    text-decoration: none;
}
.back-btn:hover i {
    transform: translateX(-3px);
}

/* App Shell Layout */
.app-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    position: relative;
}

@media (min-width: 992px) {
    .app-shell { min-height: 100vh; }
}

.app-main {
    flex: 1 1 auto;
    position: relative;
    display: flex;
    flex-direction: column;
}

@media (max-width: 991.98px) {
    .app-main { overflow: visible !important; }
}

.app-content {
    flex: 1 1 auto;
    position: relative;
    padding-bottom: 2rem;
}

@media (min-width: 992px) {
    .app-content { overflow: visible; }
}

/* Decorative Circles */
.decorative-circle {
    position: absolute;
    width: 1000px;
    height: 1000px;
    background: radial-gradient(circle, rgba(255, 159, 67, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    top: -400px;
    left: -300px;
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
    filter: blur(50px);
}

.decorative-circle-right {
    top: -200px;
    left: auto;
    right: -200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.04) 0%, rgba(0, 0, 0, 0) 70%);
}

.decorative-circle-secondary {
    background: radial-gradient(circle, rgba(29, 209, 161, 0.08) 0%, rgba(0, 0, 0, 0) 70%);
}
