/* ============================================
   THE DRIVE - Ultra High-End UI Design System
   ============================================ */

/* CSS Variables & Design Tokens */
:root {
    /* The Drive Color Palette */
    --text-primary: #010201;
    --bg-main: #c8ddeb;
    --btn-primary: #225e75;
    --hover-accent: #93c6d9;

    /* Primary Colors - Blue Ocean Theme */
    --primary-50: #f0f7fa;
    --primary-100: #d9eef5;
    --primary-200: #c8ddeb;
    --primary-300: #93c6d9;
    --primary-400: #6ba8c3;
    --primary-500: #225e75;
    --primary-600: #1d5166;
    --primary-700: #184356;
    --primary-800: #133647;
    --primary-900: #0e2938;

    /* Accent Colors */
    --accent-cyan: #93c6d9;
    --accent-blue: #225e75;
    --accent-light: #c8ddeb;
    --accent-emerald: #10b981;
    --accent-rose: #ef4444;

    /* Neutral Colors */
    --neutral-50: #f9fafb;
    --neutral-100: #e8eef2;
    --neutral-200: #c8ddeb;
    --neutral-300: #93c6d9;
    --neutral-400: #6ba8c3;
    --neutral-500: #4a8ca6;
    --neutral-600: #225e75;
    --neutral-700: #1d5166;
    --neutral-800: #133647;
    --neutral-900: #010201;
    --neutral-950: #000000;

    /* Semantic Colors */
    --success: #22c55e;
    --warning: #eab308;
    --error: #ef4444;
    --info: #225e75;

    /* Glass Effect */
    --glass-bg: rgba(200, 221, 235, 0.25);
    --glass-border: rgba(34, 94, 117, 0.2);
    --glass-shadow: 0 8px 32px rgba(1, 2, 1, 0.15);
    --glass-blur: blur(12px);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #225e75 0%, #93c6d9 100%);
    --gradient-secondary: linear-gradient(135deg, #93c6d9 0%, #c8ddeb 100%);
    --gradient-dark: linear-gradient(180deg, #c8ddeb 0%, #93c6d9 50%, #6ba8c3 100%);
    --gradient-card: linear-gradient(145deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.1) 100%);

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(1, 2, 1, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(1, 2, 1, 0.15), 0 2px 4px -2px rgba(1, 2, 1, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(1, 2, 1, 0.2), 0 4px 6px -4px rgba(1, 2, 1, 0.15);
    --shadow-xl: 0 20px 25px -5px rgba(1, 2, 1, 0.25), 0 8px 10px -6px rgba(1, 2, 1, 0.2);
    --shadow-glow: 0 0 40px rgba(34, 94, 117, 0.3);
    --shadow-glow-strong: 0 0 60px rgba(34, 94, 117, 0.5);

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Space Grotesk', 'Inter', sans-serif;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Reset & Base Styles */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Custom Scrollbar */
.app-page::-webkit-scrollbar {
    width: 8px;
}

.app-page::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.app-page::-webkit-scrollbar-thumb {
    background: var(--hover-accent);
    border-radius: 4px;
}

.app-page::-webkit-scrollbar-thumb:hover {
    background: var(--btn-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Selection Style */
::selection {
    background: var(--btn-primary);
    color: white;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--primary-200);
}

::-webkit-scrollbar-thumb {
    background: var(--hover-accent);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--btn-primary);
}

/* ============================================
   Animated Background
   ============================================ */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: var(--gradient-dark);
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: var(--btn-primary);
    top: -200px;
    left: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: var(--hover-accent);
    bottom: -150px;
    right: -100px;
    animation-delay: -7s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: var(--primary-400);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(50px, -50px) scale(1.1);
    }
    50% {
        transform: translate(-30px, 30px) scale(0.95);
    }
    75% {
        transform: translate(-50px, -30px) scale(1.05);
    }
}

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(34, 94, 117, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 94, 117, 0.08) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
}

/* ============================================
   Page Transitions
   ============================================ */
.page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 1;
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.page.hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.98);
}

.app-page {
    display: none;
    opacity: 1;
    transition: opacity var(--transition-base);
    overflow-y: auto;
    height: 100vh;
}

.app-page.active {
    display: block;
    opacity: 1;
}

/* ============================================
   Glass Card Effect
   ============================================ */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    box-shadow: var(--glass-shadow);
}

.glass-nav {
    background: rgba(200, 221, 235, 0.95);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 2px solid var(--btn-primary);
}

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: var(--space-4);
    position: relative;
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: var(--space-10);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
}

.login-header {
    text-align: center;
    margin-bottom: var(--space-10);
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
}

.logo-icon {
    width: 150px;
    height: 150px;
    animation: pulse-glow 3s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.logo-icon svg {
    width: 100%;
    height: 100%;
}

.brand-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@keyframes pulse-glow {
    0%, 100% {
        filter: drop-shadow(0 0 20px rgba(34, 94, 117, 0.5));
    }
    50% {
        filter: drop-shadow(0 0 40px rgba(34, 94, 117, 0.8));
    }
}

.logo-text {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.logo-tagline {
    color: var(--neutral-600);
    font-size: 0.95rem;
    font-weight: 400;
}

/* Login Form */
.login-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.input-group {
    position: relative;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: var(--space-4);
    width: 20px;
    height: 20px;
    color: var(--btn-primary);
    transition: color var(--transition-fast);
    pointer-events: none;
    z-index: 1;
}

.input-wrapper input {
    width: 100%;
    padding: var(--space-4) var(--space-4) var(--space-4) var(--space-12);
    background: rgba(255, 255, 255, 0.6);
    border: 2px solid var(--hover-accent);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all var(--transition-fast);
}

.input-wrapper input::placeholder {
    color: var(--neutral-500);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--btn-primary);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 0 3px rgba(34, 94, 117, 0.15);
}

.input-wrapper input:focus + .input-highlight,
.input-wrapper input:focus ~ .input-icon {
    color: var(--primary-400);
}

.input-highlight {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: all var(--transition-fast);
    transform: translateX(-50%);
}

.input-wrapper input:focus ~ .input-highlight {
    width: 100%;
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: var(--space-3);
    background: none;
    border: none;
    padding: var(--space-2);
    cursor: pointer;
    color: var(--neutral-500);
    transition: color var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: var(--neutral-300);
}

.password-toggle svg {
    width: 20px;
    height: 20px;
}

.password-toggle .hidden {
    display: none;
}

/* Login Footer */
.login-footer {
    margin-top: var(--space-8);
    text-align: center;
}

.demo-hint {
    color: var(--btn-primary);
    font-size: 0.85rem;
    padding: var(--space-3) var(--space-4);
    background: rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-md);
    border: 1px dashed var(--btn-primary);
}

/* Floating Decoration */
.login-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.floating-cards {
    position: relative;
    width: 100%;
    height: 100%;
}

.floating-card {
    position: absolute;
    width: 60px;
    height: 60px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: float-card 6s ease-in-out infinite;
}

.floating-card svg {
    width: 28px;
    height: 28px;
    stroke: var(--btn-primary);
}

.card-1 {
    top: 15%;
    left: 10%;
    animation-delay: 0s;
}

.card-2 {
    top: 60%;
    right: 8%;
    animation-delay: -2s;
}

.card-3 {
    bottom: 20%;
    left: 15%;
    animation-delay: -4s;
}

@keyframes float-card {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-6);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.btn svg {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: var(--btn-primary);
    color: white;
    box-shadow: var(--shadow-md), 0 0 20px rgba(34, 94, 117, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: var(--hover-accent);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(147, 198, 217, 0.5);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-glow {
    animation: btn-glow 2s ease-in-out infinite;
}

@keyframes btn-glow {
    0%, 100% {
        box-shadow: var(--shadow-md), 0 0 20px rgba(34, 94, 117, 0.3);
    }
    50% {
        box-shadow: var(--shadow-lg), 0 0 40px rgba(147, 198, 217, 0.5);
    }
}

.btn-secondary {
    background: rgba(200, 221, 235, 0.5);
    color: var(--text-primary);
    border: 1px solid var(--btn-primary);
}

.btn-secondary:hover {
    background: var(--hover-accent);
    border-color: var(--btn-primary);
    color: var(--text-primary);
}

.btn-text {
    position: relative;
    z-index: 1;
}

.btn-loader {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-loader.hidden {
    display: none;
}

.spinner {
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.btn-ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

/* ============================================
   MAIN NAVIGATION
   ============================================ */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-6);
    z-index: 100;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.nav-logo {
    width: 110px;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-logo svg {
    width: 100%;
    height: 100%;
}

.brand-logo-img-nav {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.nav-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-tabs {
    display: flex;
    gap: var(--space-2);
    background: rgba(255, 255, 255, 0.03);
    padding: var(--space-1);
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
}

.nav-tab {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: var(--btn-primary);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.nav-tab svg {
    width: 18px;
    height: 18px;
}

.nav-tab:hover {
    color: var(--text-primary);
    background: var(--hover-accent);
}

.nav-tab.active {
    background: var(--btn-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.user-role {
    font-size: 0.75rem;
    color: var(--btn-primary);
}

.btn-logout {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-lg);
    color: var(--error);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
    transform: scale(1.05);
}

.btn-logout svg {
    width: 20px;
    height: 20px;
}

/* ============================================
   CALL PAGE
   ============================================ */
.call-container {
    padding: calc(70px + var(--space-8)) var(--space-6) calc(var(--space-8) + 40px);
    max-width: 1400px;
    margin: 0 auto;
    min-height: 100vh;
}

.call-header {
    text-align: center;
    margin-bottom: var(--space-10);
}

.call-header h2 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: #1b637a;
    margin-bottom: var(--space-2);
}

.call-header p {
    color: #1b637a;
    font-size: 1.1rem;
}

/* Restaurant Grid */
.restaurants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-6);
}

.restaurant-card {
    position: relative;
    padding: var(--space-6);
    background: #bedce7;
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-2xl);
    cursor: pointer;
    transition: all var(--transition-base);
    overflow: hidden;
}

.restaurant-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.restaurant-card:hover {
    transform: translateY(-8px);
    border-color: var(--btn-primary);
    box-shadow: var(--shadow-glow);
}

.restaurant-card:hover::before {
    opacity: 0.05;
}

.restaurant-card.selected {
    border-color: var(--btn-primary);
    box-shadow: var(--shadow-glow-strong);
}

.restaurant-card.selected::before {
    opacity: 0.1;
}

.restaurant-icon {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto var(--space-3);
    background: transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: visible;
}

.restaurant-icon svg {
    width: 40px;
    height: 40px;
    stroke: var(--btn-primary);
}

.restaurant-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    max-width: 100%;
    max-height: 100%;
    padding: 8px;
}

.restaurant-logo-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.restaurant-logo-fallback svg {
    stroke: var(--btn-primary);
}

.restaurant-icon .icon-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.8), 0 0 24px rgba(34, 197, 94, 0.5), 0 0 36px rgba(34, 197, 94, 0.3);
    z-index: 10;
    animation: glow-green 2s ease-in-out infinite;
}

@keyframes glow-green {
    0%, 100% {
        box-shadow: 0 0 12px rgba(34, 197, 94, 0.8), 0 0 24px rgba(34, 197, 94, 0.5), 0 0 36px rgba(34, 197, 94, 0.3);
    }
    50% {
        box-shadow: 0 0 16px rgba(34, 197, 94, 1), 0 0 32px rgba(34, 197, 94, 0.7), 0 0 48px rgba(34, 197, 94, 0.4);
    }
}

.restaurant-icon .icon-badge.closed {
    background: var(--error);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.8), 0 0 24px rgba(239, 68, 68, 0.5), 0 0 36px rgba(239, 68, 68, 0.3);
    animation: glow-red 2s ease-in-out infinite;
}

@keyframes glow-red {
    0%, 100% {
        box-shadow: 0 0 12px rgba(239, 68, 68, 0.8), 0 0 24px rgba(239, 68, 68, 0.5), 0 0 36px rgba(239, 68, 68, 0.3);
    }
    50% {
        box-shadow: 0 0 16px rgba(239, 68, 68, 1), 0 0 32px rgba(239, 68, 68, 0.7), 0 0 48px rgba(239, 68, 68, 0.4);
    }
}

.restaurant-name {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: var(--space-1);
    position: relative;
}

.restaurant-brand {
    font-size: 0.7rem;
    color: var(--btn-primary);
    text-align: center;
    position: relative;
}

.restaurant-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--glass-border);
    position: relative;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 2s ease-in-out infinite;
}

.status-indicator.closed {
    background: var(--error);
    animation: none;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.status-text {
    font-size: 0.85rem;
    font-weight: 500;
}

.status-text.open {
    color: var(--success);
}

.status-text.closed {
    color: var(--error);
}

/* Skeleton Loading */
.restaurant-skeleton {
    height: 220px;
    background: linear-gradient(90deg,
        rgba(147, 198, 217, 0.2) 25%,
        rgba(147, 198, 217, 0.4) 50%,
        rgba(147, 198, 217, 0.2) 75%);
    background-size: 200% 100%;
    border-radius: var(--radius-2xl);
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   CALL OVERLAY & MODAL
   ============================================ */
.call-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(200, 221, 235, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    opacity: 1;
    transition: opacity var(--transition-base);
}

.call-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.call-modal {
    width: 100%;
    max-width: 500px;
    padding: var(--space-8);
    margin: var(--space-4);
    max-height: 90vh;
    overflow-y: auto;
}

.call-status {
    text-align: center;
    margin-bottom: var(--space-6);
}

.call-avatar {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto var(--space-5);
}

.avatar-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 2px solid var(--btn-primary);
    animation: ring-pulse 2s ease-out infinite;
}

.ring-1 {
    width: 100%;
    height: 100%;
    animation-delay: 0s;
}

.ring-2 {
    width: 130%;
    height: 130%;
    animation-delay: 0.5s;
}

.ring-3 {
    width: 160%;
    height: 160%;
    animation-delay: 1s;
}

@keyframes ring-pulse {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.8);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

.avatar-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.avatar-icon svg {
    width: 40px;
    height: 40px;
    stroke: var(--btn-primary);
}

.call-restaurant-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    max-width: 100%;
    max-height: 100%;
    padding: 8px;
}

.call-status h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.call-timer {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--btn-primary);
    margin-bottom: var(--space-3);
}

.call-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
}

.state-dot {
    width: 10px;
    height: 10px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
}

.call-state.connecting .state-dot {
    background: var(--warning);
}

.call-state.speaking .state-dot {
    background: var(--btn-primary);
}

.state-text {
    font-size: 0.9rem;
    color: var(--btn-primary);
}

/* Voice Visualizer */
.voice-visualizer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 60px;
    margin-bottom: var(--space-6);
}

.visualizer-bar {
    width: 6px;
    height: 20px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    animation: visualizer 1s ease-in-out infinite;
}

.visualizer-bar:nth-child(1) { animation-delay: 0.0s; }
.visualizer-bar:nth-child(2) { animation-delay: 0.1s; }
.visualizer-bar:nth-child(3) { animation-delay: 0.2s; }
.visualizer-bar:nth-child(4) { animation-delay: 0.3s; }
.visualizer-bar:nth-child(5) { animation-delay: 0.4s; }
.visualizer-bar:nth-child(6) { animation-delay: 0.5s; }
.visualizer-bar:nth-child(7) { animation-delay: 0.6s; }
.visualizer-bar:nth-child(8) { animation-delay: 0.7s; }
.visualizer-bar:nth-child(9) { animation-delay: 0.8s; }

@keyframes visualizer {
    0%, 100% {
        height: 20px;
        opacity: 0.5;
    }
    50% {
        height: 50px;
        opacity: 1;
    }
}

/* Call Transcript */
.call-transcript {
    background: rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-xl);
    padding: var(--space-4);
    height: 150px;
    overflow-y: auto;
    margin-bottom: var(--space-6);
    border: 2px solid var(--hover-accent);
}

.transcript-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--btn-primary);
    gap: var(--space-2);
}

.transcript-placeholder svg {
    width: 32px;
    height: 32px;
    opacity: 0.5;
}

.transcript-message {
    padding: var(--space-2) var(--space-3);
    margin-bottom: var(--space-2);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
}

.transcript-message.agent {
    background: rgba(34, 94, 117, 0.2);
    color: var(--btn-primary);
}

.transcript-message.user {
    background: rgba(147, 198, 217, 0.3);
    color: var(--text-primary);
    text-align: right;
}

/* Call Actions */
.call-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
}

.btn-call-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-4);
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-call-action svg {
    width: 24px;
    height: 24px;
}

.btn-mute, .btn-volume {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.6);
    border: 2px solid var(--hover-accent);
    color: var(--btn-primary);
}

.btn-mute:hover, .btn-volume:hover {
    background: var(--hover-accent);
    color: var(--text-primary);
    border-color: var(--btn-primary);
}

.btn-mute.muted {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
    color: var(--error);
}

.btn-end {
    padding: var(--space-4) var(--space-8);
    background: var(--error);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
}

.btn-end:hover {
    background: #dc2626;
    transform: scale(1.05);
    box-shadow: 0 6px 30px rgba(239, 68, 68, 0.5);
}

.btn-call-action .hidden {
    display: none;
}

/* ============================================
   CONFIGURATION PAGE
   ============================================ */
.config-container {
    padding: calc(70px + var(--space-8)) var(--space-6) calc(var(--space-8) + 40px);
    max-width: 900px;
    margin: 0 auto;
    min-height: 100vh;
}

.config-header {
    text-align: center;
    margin-bottom: var(--space-8);
}

.config-header h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: #1b637a;
    margin-bottom: var(--space-2);
}

.config-header p {
    color: #1b637a;
}

/* Config Sections */
.config-section {
    margin-bottom: var(--space-6);
    padding: var(--space-6);
    border: 2px solid var(--hover-accent);
    border-radius: var(--radius-xl);
}

.section-header {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
    border-bottom: 2px solid var(--hover-accent);
}

.section-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.section-icon svg {
    width: 24px;
    height: 24px;
    stroke: white;
}

.section-title h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: #1b637a;
    margin-bottom: var(--space-1);
}

.section-title p {
    font-size: 0.9rem;
    color: #1b637a;
}

/* Config Grid */
.config-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-5);
}

.config-grid.single {
    grid-template-columns: 1fr;
}

/* Configuration Page Visibility Fix */
#configPage {
    min-height: calc(100vh - 80px);
    display: block !important;
    visibility: visible !important;
}

#configPage .config-container {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.config-header {
    display: block !important;
    visibility: visible !important;
}

.config-header h2 {
    color: #1b637a !important;
    font-size: 2.5rem !important;
    margin-bottom: 0.5rem !important;
}

.config-header p {
    color: #1b637a !important;
    font-size: 1.125rem !important;
}

.config-section {
    display: block !important;
    visibility: visible !important;
}

.section-title h3 {
    color: #1b637a !important;
    font-size: 1.25rem !important;
}

.section-title p {
    color: #1b637a !important;
}

/* Configuration Display Section */
.config-display {
    padding: var(--space-6) !important;
    background: rgba(255, 255, 255, 0.6) !important;
    border-radius: var(--radius-lg);
    border: 2px solid var(--btn-primary) !important;
    margin-bottom: 2rem !important;
}

.config-display-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: var(--space-4) !important;
    width: 100%;
}

.config-display-item {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4) var(--space-5) !important;
    background: rgba(200, 221, 235, 0.4) !important;
    border-radius: var(--radius-md);
    border: 2px solid var(--hover-accent) !important;
    transition: all var(--transition-base);
    min-height: 56px;
    gap: var(--space-3);
}

.config-display-item:hover {
    background: rgba(147, 198, 217, 0.5) !important;
    border-color: var(--btn-primary) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 94, 117, 0.2);
}

.config-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1b637a !important;
    white-space: nowrap;
    flex-shrink: 0;
}

.config-value {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--btn-primary) !important;
    font-family: 'Courier New', monospace;
    text-align: right;
    word-break: break-all;
    overflow-wrap: break-word;
    flex: 1;
    min-width: 0;
}

.config-value.secret {
    color: var(--btn-primary);
    letter-spacing: 0.05em;
}

/* Form Groups */
.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.form-group label {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.label-text {
    font-weight: 600;
    font-size: 0.9rem;
    color: #1b637a;
}

.label-hint {
    font-size: 0.8rem;
    color: #1b637a;
}

.config-form .input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.config-form .input-wrapper input,
.config-form .input-wrapper textarea {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    background: rgba(255, 255, 255, 0.7);
    border: 2px solid var(--hover-accent);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all var(--transition-fast);
}

.config-form .input-wrapper input:focus,
.config-form .input-wrapper textarea:focus {
    outline: none;
    border-color: var(--btn-primary);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 3px rgba(34, 94, 117, 0.15);
}

.config-form .input-wrapper textarea {
    resize: vertical;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85rem;
}

.input-unit {
    position: absolute;
    right: var(--space-4);
    font-size: 0.8rem;
    color: var(--btn-primary);
    pointer-events: none;
}

/* Secret Fields */
.input-wrapper.secret {
    position: relative;
}

.input-wrapper.secret input {
    padding-right: var(--space-12);
}

.input-wrapper.secret .toggle-visibility {
    position: absolute;
    right: var(--space-2);
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: var(--space-2);
    cursor: pointer;
    color: var(--btn-primary);
    transition: color var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-wrapper.secret .toggle-visibility:hover {
    color: var(--hover-accent);
}

.input-wrapper.secret .toggle-visibility svg {
    width: 18px;
    height: 18px;
}

.textarea-wrapper {
    flex-direction: column;
    align-items: stretch !important;
}

.textarea-wrapper .toggle-visibility {
    position: absolute;
    top: var(--space-2);
    right: var(--space-2);
    transform: none;
}

/* Config Actions */
.config-actions {
    display: flex;
    gap: var(--space-4);
    justify-content: flex-end;
    margin-top: var(--space-8);
    padding-top: var(--space-6);
    border-top: 1px solid var(--glass-border);
}

/* ============================================
   NOTIFICATIONS & TOASTS
   ============================================ */
.notification {
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-6);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    animation: slide-in 0.3s ease-out;
}

.notification.hidden {
    display: none;
}

.notification.success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: var(--success);
}

.notification.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--error);
}

.notification.info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--info);
}

@keyframes slide-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Toast Container */
.toast-container {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    z-index: 1000;
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    background: white;
    border: 2px solid var(--hover-accent);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    animation: toast-in 0.3s ease-out;
    min-width: 300px;
}

.toast.success {
    border-left: 3px solid var(--success);
}

.toast.error {
    border-left: 3px solid var(--error);
}

.toast.info {
    border-left: 3px solid var(--info);
}

.toast-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.toast.success .toast-icon { color: var(--success); }
.toast.error .toast-icon { color: var(--error); }
.toast.info .toast-icon { color: var(--info); }

.toast-message {
    flex: 1;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.toast-close {
    background: none;
    border: none;
    color: var(--btn-primary);
    cursor: pointer;
    padding: var(--space-1);
    transition: color var(--transition-fast);
}

.toast-close:hover {
    color: var(--hover-accent);
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.removing,
.toast.toast-fade {
    animation: toast-out 0.3s ease-in forwards;
}

@keyframes toast-out {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* ============================================
   UTILITIES
   ============================================ */
.hidden {
    display: none !important;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
    .config-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .main-nav {
        padding: 0 var(--space-4);
    }

    .nav-tabs {
        display: none;
    }

    .mobile-nav-toggle {
        display: flex;
    }

    .call-header {
        margin-bottom: var(--space-4);
    }

    .call-header h2 {
        font-size: 1.5rem;
        margin-bottom: var(--space-1);
    }

    .call-header p {
        font-size: 0.85rem;
    }

    .restaurants-grid {
        grid-template-columns: 1fr;
        max-height: none !important;
        overflow-y: visible !important;
        gap: var(--space-3);
    }

    .restaurant-card {
        width: 100%;
        padding: var(--space-3);
    }

    .restaurant-icon {
        width: 100px;
        height: 100px;
        margin: 0 auto var(--space-2);
    }

    .restaurant-icon svg {
        width: 50px;
        height: 50px;
    }

    .restaurant-logo {
        border-radius: var(--radius-sm);
    }

    .restaurant-icon .icon-badge {
        width: 16px;
        height: 16px;
        top: -2px;
        right: -2px;
    }

    .restaurant-name {
        font-size: 0.8rem;
        margin-bottom: var(--space-1);
    }

    .restaurant-brand {
        font-size: 0.65rem;
    }

    .restaurant-status {
        margin-top: var(--space-2);
        padding-top: var(--space-2);
    }

    .status-text {
        font-size: 0.75rem;
    }

    .status-indicator {
        width: 6px;
        height: 6px;
    }

    .config-grid {
        grid-template-columns: 1fr;
    }

    .config-display-grid {
        grid-template-columns: 1fr !important;
        gap: var(--space-3) !important;
    }

    .config-display {
        padding: var(--space-4) !important;
    }

    .config-display-item {
        padding: var(--space-3) var(--space-4) !important;
        min-height: 48px;
        flex-direction: row;
        align-items: center;
    }

    .config-label {
        font-size: 0.8rem;
        flex: 0 0 auto;
        max-width: 45%;
    }

    .config-value {
        font-size: 0.75rem;
        flex: 1;
        text-align: right;
        word-break: break-word;
    }

    .config-section {
        padding: var(--space-4) !important;
        margin-bottom: var(--space-4);
    }

    .config-actions {
        flex-direction: column;
    }

    .config-actions .btn {
        width: 100%;
    }

    .login-card {
        padding: var(--space-8) var(--space-6);
    }

    .logo-text {
        font-size: 2rem;
    }

    .floating-cards {
        display: none;
    }

    .call-modal {
        padding: var(--space-6);
    }

    .call-actions {
        flex-wrap: wrap;
    }

    .btn-end {
        order: -1;
        width: 100%;
        margin-bottom: var(--space-3);
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .nav-user .user-info {
        display: none;
    }

    .call-container,
    .config-container {
        padding-left: var(--space-3);
        padding-right: var(--space-3);
        padding-top: calc(70px + var(--space-3));
    }

    .call-container {
        padding-bottom: calc(80px + var(--space-4));
    }

    .config-section {
        padding: var(--space-3) !important;
    }

    .section-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: var(--space-2);
    }

    .config-display {
        padding: var(--space-3) !important;
    }

    .config-display-item {
        padding: var(--space-2) var(--space-3) !important;
        min-height: 44px;
    }

    .config-label {
        font-size: 0.75rem !important;
    }

    .config-value {
        font-size: 0.7rem !important;
    }

    .restaurants-grid {
        gap: var(--space-3);
    }

    .toast-container {
        left: var(--space-4);
        right: var(--space-4);
    }

    .toast {
        min-width: auto;
    }
}

/* ============================================
   MOBILE NAVIGATION (Bottom Tab Bar)
   ============================================ */
@media (max-width: 768px) {
    .nav-tabs {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: rgba(200, 221, 235, 0.98);
        backdrop-filter: var(--glass-blur);
        border-top: 2px solid var(--btn-primary);
        border-radius: 0;
        padding: var(--space-2);
        z-index: 100;
        justify-content: center;
    }

    .nav-tab {
        flex: 1;
        flex-direction: column;
        padding: var(--space-2);
        font-size: 0.75rem;
    }

    .nav-tab span {
        margin-top: var(--space-1);
    }

    .call-container,
    .config-container {
        padding-bottom: calc(80px + var(--space-8));
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .animated-bg,
    .main-nav,
    .login-decoration,
    .toast-container {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .glass-card {
        background: white;
        border: 1px solid #ddd;
        box-shadow: none;
    }
}

/* ============================================
   AUDIO PROCESSING CONTROLS
   ============================================ */

/* Section toggle in header */
.section-header {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.section-toggle {
    margin-left: auto;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.toggle-switch.small {
    width: 36px;
    height: 20px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--neutral-300);
    border-radius: var(--radius-full);
    transition: var(--transition-base);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.toggle-switch.small .toggle-slider:before {
    height: 14px;
    width: 14px;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--btn-primary);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

.toggle-switch.small input:checked + .toggle-slider:before {
    transform: translateX(16px);
}

.toggle-switch input:focus + .toggle-slider {
    box-shadow: 0 0 0 3px rgba(34, 94, 117, 0.3);
}

/* Config Subsection */
.config-subsection {
    padding: var(--space-5);
    margin-top: var(--space-4);
    background: rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(34, 94, 117, 0.1);
}

.config-subsection:first-child {
    margin-top: 0;
}

.subsection-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-2);
}

.subsection-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.subsection-hint {
    font-size: 0.8rem;
    color: var(--neutral-600);
    margin: 0 0 var(--space-4) 0;
}

/* Range Wrapper */
.range-wrapper {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.range-wrapper input[type="range"] {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--neutral-200);
    border-radius: var(--radius-full);
    outline: none;
    cursor: pointer;
}

.range-wrapper input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--btn-primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
}

.range-wrapper input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.range-wrapper input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--btn-primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow-sm);
}

.range-value {
    min-width: 60px;
    text-align: right;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--btn-primary);
    font-family: var(--font-display);
}

/* Filter Control */
.filter-control {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.filter-control .range-wrapper {
    flex: 1;
}

/* Audio Meter */
.audio-meter-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.audio-meter {
    position: relative;
    height: 32px;
    background: var(--neutral-200);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--neutral-300);
}

.meter-bar {
    height: 100%;
    width: 0%;
    background: var(--success);
    transition: width 50ms ease-out;
    border-radius: var(--radius-md);
}

.meter-labels {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--space-3);
    pointer-events: none;
}

.meter-labels span {
    font-size: 0.7rem;
    color: var(--neutral-600);
    font-weight: 500;
    text-shadow: 0 0 4px rgba(255, 255, 255, 0.8);
}

/* Small Button */
.btn-small {
    padding: var(--space-2) var(--space-4);
    font-size: 0.85rem;
}

.btn-small svg {
    width: 16px;
    height: 16px;
}

.btn-active {
    background: var(--error) !important;
    border-color: var(--error) !important;
}

.btn-active:hover {
    background: #dc2626 !important;
}

/* Audio Processing Section Disabled State */
#audioProcessingSettings {
    transition: var(--transition-base);
}

#audioProcessingSettings.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Responsive adjustments for audio controls */
@media (max-width: 768px) {
    .config-subsection {
        padding: var(--space-4);
    }

    .range-wrapper {
        flex-wrap: wrap;
    }

    .range-value {
        min-width: 50px;
        font-size: 0.8rem;
    }

    .filter-control {
        flex-wrap: wrap;
    }

    .audio-meter-container {
        align-items: stretch;
    }

    .btn-small {
        width: 100%;
        justify-content: center;
    }
}
