        /* ========================================
           1. CSS Variables & Reset
           ======================================== */
        :root {
            /* UI element colors (always visible) */
            --ui-dark-blue: #002186;
            --ui-yellow: #FAE000;
            --ui-bright-blue: #05B2FC;

            /* Department colors */
            --dept-coral: #EF6C6C;
            --dept-green: #63DE9D;
            --dept-navy: #19254A;
            --dept-light-blue: #9EC3DE;

            /* Small element colors */
            --subtle-blue: #CDE1EE;
            --subtle-light: #F0F6FA;
            --subtle-gray: #E3E2E1;
            --subtle-cream: #F4F2F2;

            --bg-primary: #19254A;
            --bg-secondary: #0D1428;
            --bg-tertiary: #0D1428;
            --bg-grouped: #0D1428;
            --text-primary: #ffffff;
            --text-secondary: #CDE1EE;
            --text-tertiary: #9EC3DE;
            --accent: #05B2FC;
            --accent-hover: #002186;
            --success: #63DE9D;
            --warning: #FAE000;
            --danger: #EF6C6C;
            --separator: rgba(158, 195, 222, 0.2);
            --card-radius: 12px;
            --input-bg: #19254A;
            --input-border: rgba(158, 195, 222, 0.3);
            --border: rgba(158, 195, 222, 0.3);
            --shift-frueh: #05B2FC;
            --shift-spaet: #FAE000;
            --shift-nacht: #19254A;
            --shift-mobile: #63DE9D;
            --shift-default: #9EC3DE;

            /* Focus ring system (shadcn-inspired) */
            --ring-color: var(--accent);
            --ring-offset-color: var(--bg-primary);
            --ring-offset-width: 2px;

            /* Department header color - set by template */
            --dept-color: #9EC3DE; /* Set by template */
            --dept-text-color: #002186; /* Set by template */
        }

        @media (prefers-color-scheme: dark) {
            :root {
                --bg-primary: #19254A;
                --bg-secondary: #0D1428;
                --bg-tertiary: #0D1428;
                --bg-grouped: #0D1428;
                --text-primary: #ffffff;
                --text-secondary: #CDE1EE;
                --text-tertiary: #9EC3DE;
                --accent: #05B2FC;
                --accent-hover: #FAE000;
                --success: #63DE9D;
                --warning: #FAE000;
                --danger: #EF6C6C;
                --separator: rgba(158, 195, 222, 0.2);
                --input-bg: #19254A;
                --input-border: rgba(158, 195, 222, 0.3);
                --border: rgba(158, 195, 222, 0.3);
            }
        }

        /* Light mode override */
        [data-theme="light"] {
            --bg-primary: #F0F4F8;
            --bg-secondary: #FFFFFF;
            --bg-tertiary: #F7FAFC;
            --bg-grouped: #FFFFFF;
            --text-primary: #1a202c;
            --text-secondary: #2d3748;
            --text-tertiary: #4a5568;
            --accent: #2B6CB0;
            --accent-hover: #1A4A7A;
            --success: #276749;
            --warning: #975A16;
            --danger: #C53030;
            --separator: rgba(0, 0, 0, 0.12);
            --input-bg: #FFFFFF;
            --input-border: rgba(0, 0, 0, 0.25);
            --border: rgba(0, 0, 0, 0.18);
            --shift-frueh: #2B6CB0;
            --shift-spaet: #975A16;
            --shift-nacht: #553C9A;
        }

        /* Dark mode override (manual) */
        [data-theme="dark"] {
            --bg-primary: #19254A;
            --bg-secondary: #0D1428;
            --bg-tertiary: #0D1428;
            --bg-grouped: #0D1428;
            --text-primary: #ffffff;
            --text-secondary: #CDE1EE;
            --text-tertiary: #9EC3DE;
            --accent: #05B2FC;
            --accent-hover: #FAE000;
            --success: #63DE9D;
            --warning: #FAE000;
            --danger: #EF6C6C;
            --separator: rgba(158, 195, 222, 0.2);
            --input-bg: #19254A;
            --input-border: rgba(158, 195, 222, 0.3);
            --border: rgba(158, 195, 222, 0.3);
        }

        * { box-sizing: border-box; margin: 0; padding: 0; }

        html, body {
            height: 100%;
            overflow: hidden;
        }

        body {
            font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
            background-color: var(--bg-primary);
            color: var(--text-primary);
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }

        /* ========================================
           2. Wizard Container & Steps
           ======================================== */
        .wizard-container {
            display: flex;
            flex-direction: column;
            height: 100vh;
            overflow: hidden;
        }

        .wizard-steps {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 8px;
            padding: 16px 20px;
            background: var(--dept-color);
            border-bottom: none;
            flex-shrink: 0;
            position: sticky;
            top: 0;
            z-index: 100;
        }

        .header-toggles {
            position: absolute;
            right: 20px;
            top: 50%;
            transform: translateY(-50%);
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .dept-header-title {
            font-size: 18px;
            font-weight: 700;
            color: var(--dept-text-color);
            padding-right: 16px;
            flex-shrink: 0;
            text-decoration: none;
            cursor: pointer;
            transition: opacity 0.15s ease;
        }

        .dept-header-title:hover {
            opacity: 0.8;
        }

        .dept-name-full { display: inline; }
        .dept-name-short { display: none; }

        @media (max-width: 768px) {
            .wizard-steps {
                justify-content: flex-start;
                padding-left: 16px;
            }
            .header-toggles {
                position: static;
                transform: none;
                margin-left: auto;
            }
        }

        @media (max-width: 480px) {
            .dept-header-title {
                font-size: 15px;
                font-weight: 600;
                padding-right: 8px;
            }
            .dept-name-full { display: none; }
            .dept-name-short { display: inline; }
        }

        .wizard-step {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
            opacity: 0.4;
            transition: opacity 0.3s ease;
            cursor: default;
        }

        .wizard-step.active {
            opacity: 1;
        }

        .wizard-step.completed {
            opacity: 0.8;
        }

        .wizard-step.unlocked {
            cursor: pointer;
        }

        .step-dot {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: var(--dept-text-color);
            opacity: 0.4;
            transition: all 0.3s ease;
        }

        .step-number {
            display: none;
        }

        .wizard-step.active .step-dot {
            background: var(--dept-text-color);
            opacity: 1;
            transform: scale(1.3);
        }

        .wizard-step.completed .step-dot {
            background: var(--dept-text-color);
            opacity: 0.8;
        }

        .step-label {
            font-size: 10px;
            font-weight: 500;
            color: var(--dept-text-color);
            opacity: 0.6;
            text-transform: uppercase;
            letter-spacing: 0.3px;
        }

        .wizard-step.active .step-label {
            color: var(--dept-text-color);
            opacity: 1;
        }

        .step-connector {
            width: 24px;
            height: 2px;
            background: var(--dept-text-color);
            opacity: 0.3;
            margin: 0 4px;
            margin-bottom: 18px;
        }

        .wizard-step.completed + .step-connector {
            background: rgba(255,255,255,0.6);
        }

        /* Skip selection mode - hide step 2 for single-employee PDFs (RBB) */
        .wizard-steps.skip-selection .wizard-step[data-step="2"],
        .wizard-steps.skip-selection .wizard-step[data-step="2"] + .step-connector {
            display: none;
        }

        @media (max-width: 480px) {
            .step-label { display: none; }
            .step-dot { display: none; }
            .step-number {
                display: flex;
                align-items: center;
                justify-content: center;
                width: 26px;
                height: 26px;
                border-radius: 50%;
                background: var(--dept-text-color);
                opacity: 0.3;
                color: var(--dept-color);
                font-size: 13px;
                font-weight: 600;
                transition: all 0.3s ease;
            }
            .wizard-step.active .step-number {
                background: var(--dept-text-color);
                color: var(--dept-color);
                opacity: 1;
            }
            .wizard-step.completed .step-number {
                background: var(--dept-text-color);
                color: var(--dept-color);
                opacity: 0.7;
            }
            .step-connector {
                width: 16px;
                margin-bottom: 0;
            }
            .wizard-steps {
                padding: 12px 16px;
            }
            /* Skip selection mode - renumber steps 3→2, 4→3 on mobile */
            .wizard-steps.skip-selection .wizard-step[data-step="3"] .step-number {
                font-size: 0; /* Hide original number */
            }
            .wizard-steps.skip-selection .wizard-step[data-step="3"] .step-number::after {
                content: "2";
                font-size: 13px;
            }
            .wizard-steps.skip-selection .wizard-step[data-step="4"] .step-number {
                font-size: 0;
            }
            .wizard-steps.skip-selection .wizard-step[data-step="4"] .step-number::after {
                content: "3";
                font-size: 13px;
            }
        }

        /* ========================================
           4. Cards Viewport & Track
           ======================================== */
        .cards-viewport {
            flex: 1;
            overflow-x: auto;
            overflow-y: hidden;
            scroll-snap-type: x mandatory;
            scrollbar-width: none;
            -webkit-overflow-scrolling: touch;
        }

        .cards-viewport::-webkit-scrollbar {
            display: none;
        }

        .cards-track {
            display: flex;
            width: 400%;
            height: 100%;
        }

        .wizard-card {
            flex: 0 0 25%;
            width: 25%;
            height: 100%;
            scroll-snap-align: center;
            scroll-snap-stop: always;
            overflow-y: auto;
            padding: 24px 20px 40px;
            transition: opacity 0.3s ease;
        }

        .wizard-card.locked {
            pointer-events: none;
            opacity: 0.3;
        }

        .card-inner {
            max-width: 500px;
            margin: 0 auto;
        }

        /* ========================================
           5. Card States
           ======================================== */
        .card-state {
            display: none;
            animation: fadeIn 0.3s ease forwards;
        }

        .card-state.active {
            display: block;
        }

        .card-state.center {
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
            min-height: 300px;
        }

        .card-state.center.active {
            display: flex;
        }

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

        /* ========================================
           6. Common Elements
           ======================================== */
        .card-title {
            font-size: 28px;
            font-weight: 700;
            color: var(--text-primary);
            margin-bottom: 8px;
            text-align: center;
        }

        .card-subtitle {
            font-size: 17px;
            color: var(--text-tertiary);
            margin-bottom: 32px;
            text-align: center;
        }

        .uploaded-filename {
            font-size: 12px;
            color: var(--text-tertiary);
            opacity: 0.7;
            margin-top: -24px;
            margin-bottom: 24px;
            text-align: center;
            font-family: monospace;
        }

        /* Buttons */
        .btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 14px 24px;
            font-size: 17px;
            font-weight: 600;
            font-family: inherit;
            border: none;
            border-radius: 12px;
            cursor: pointer;
            transition: background-color 0.15s ease,
                        border-color 0.15s ease,
                        box-shadow 0.15s ease,
                        transform 0.1s ease;
            min-height: 50px;
            gap: 8px;
        }

        .btn:focus-visible {
            outline: none;
            box-shadow: 0 0 0 var(--ring-offset-width) var(--ring-offset-color),
                        0 0 0 calc(var(--ring-offset-width) + 2px) var(--ring-color);
        }

        .btn:active { transform: scale(0.98); }

        .btn-primary {
            background: var(--ui-bright-blue);
            color: white;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
        }

        .btn-primary:hover {
            background: var(--ui-dark-blue);
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
        }

        .btn-primary:active {
            box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
        }

        .btn-success {
            background: var(--ui-dark-blue);
            color: white;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
        }

        .btn-success:hover {
            background: var(--ui-bright-blue);
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
        }

        .btn-secondary {
            background: #333333;
            color: #ffffff;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
        }

        .btn-secondary:hover {
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
        }

        .btn-google {
            background: #ffffff;
            color: #333333;
            font-weight: 500;
        }

        .btn-google:hover {
            background: #f1f1f1;
        }

        .btn-block { width: 100%; }

        .btn-large {
            padding: 18px 32px;
            font-size: 18px;
            min-height: 60px;
            margin-bottom: 50px;
        }

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

        /* Spinner */
        .spinner {
            width: 48px;
            height: 48px;
            margin-bottom: 16px;
            color: var(--accent);
            animation: spin 1s linear infinite;
        }

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

        /* Status Icons */
        .status-icon {
            width: 64px;
            height: 64px;
            margin-bottom: 16px;
        }

        .status-icon.success { color: var(--success); }
        .status-icon.error { color: var(--danger); }
        .status-icon.info { color: var(--accent); }

        .status-title {
            font-size: 22px;
            font-weight: 600;
            margin-bottom: 8px;
        }

        .status-title.success { color: var(--success); }
        .status-title.error { color: var(--danger); }

        .status-subtitle {
            font-size: 15px;
            color: var(--text-tertiary);
        }

        .error-hint {
            font-size: 13px;
            color: var(--text-secondary);
            background: rgba(239, 108, 108, 0.1);
            border: 1px solid rgba(239, 108, 108, 0.3);
            border-radius: 8px;
            padding: 10px 14px;
            margin-top: 12px;
            text-align: left;
            max-width: 320px;
        }

        .error-hint-icon {
            display: inline;
            margin-right: 6px;
        }

        /* ========================================
           7. Drop Zone
           ======================================== */
        .drop-zone {
            border: 2px dashed #444444;
            border-radius: var(--card-radius);
            padding: 48px 24px;
            text-align: center;
            cursor: pointer;
            transition: all 0.2s ease;
            margin-bottom: 16px;
            background: #1a1a1a;
        }

        .drop-zone:hover {
            border-color: var(--ui-bright-blue);
            background: rgba(5, 178, 252, 0.1);
        }

        .drop-zone.drag-over {
            border-color: var(--ui-bright-blue);
            background: rgba(5, 178, 252, 0.2);
        }

        .drop-zone svg {
            width: 56px;
            height: 56px;
            color: var(--text-tertiary);
            margin-bottom: 16px;
        }

        .drop-zone p {
            color: var(--text-secondary);
            font-size: 17px;
        }

        .drop-zone .hint {
            color: var(--text-tertiary);
            font-size: 14px;
            margin-top: 4px;
        }

        /* Light mode drop zone */
        [data-theme="light"] .drop-zone {
            background: #E2E8F0;
            border-color: #CBD5E0;
        }

        [data-theme="light"] .drop-zone:hover {
            border-color: var(--ui-bright-blue);
            background: rgba(5, 178, 252, 0.15);
        }

        [data-theme="light"] .drop-zone.drag-over {
            border-color: var(--ui-bright-blue);
            background: rgba(5, 178, 252, 0.25);
        }

        [data-theme="light"] .drop-zone p {
            color: #4A5568;
        }

        [data-theme="light"] .drop-zone .hint {
            color: #718096;
        }

        .trust-line {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            font-size: 12px;
            color: var(--text-tertiary);
        }

        .trust-line svg {
            width: 14px;
            height: 14px;
            color: var(--success);
        }

        /* Help Button */
        .help-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 28px;
            height: 28px;
            border-radius: 50%;
            background: rgba(5, 178, 252, 0.15);
            border: 1px solid rgba(5, 178, 252, 0.3);
            color: var(--accent);
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.15s ease;
            margin-left: 8px;
        }

        .help-btn:hover {
            background: rgba(5, 178, 252, 0.25);
            transform: scale(1.05);
        }

        /* Shift Statistics */
        .shift-stats {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 10px;
            margin-bottom: 16px;
        }

        .stat-card {
            background: var(--bg-secondary);
            border-radius: 10px;
            padding: 12px 10px;
            text-align: center;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
            transition: box-shadow 0.15s ease;
        }

        .stat-card:hover {
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
        }

        .stat-value {
            font-size: 22px;
            font-weight: 700;
            color: var(--text-primary);
            line-height: 1.2;
        }

        .stat-label {
            font-size: 11px;
            color: var(--text-tertiary);
            text-transform: uppercase;
            letter-spacing: 0.3px;
            margin-top: 2px;
        }

        .shift-breakdown {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            margin-bottom: 16px;
        }

        .shift-tag {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 4px 10px;
            border-radius: 12px;
            font-size: 12px;
            font-weight: 500;
        }

        /* Time-based color gradient: Red (early) → Orange (midday) → Blue (night) */
        /* Früh 1 (05:00-06:30) - Deep Red */
        .shift-tag.frueh-1 { background: rgba(220, 38, 38, 0.25); color: #DC2626; }
        /* Früh/Früh 2 (06:30-08:00) - Coral */
        .shift-tag.frueh { background: rgba(248, 113, 113, 0.25); color: #F87171; }
        .shift-tag.frueh-2 { background: rgba(248, 113, 113, 0.25); color: #F87171; }
        /* Flex (08:00-10:00) - Light Orange */
        .shift-tag.flex { background: rgba(251, 191, 36, 0.25); color: #FBBF24; }
        /* Tag/Mittag (10:00-13:00) - Orange */
        .shift-tag.mittag { background: rgba(245, 158, 11, 0.25); color: #F59E0B; }
        /* Spät 1 (13:00-15:00) - Amber */
        .shift-tag.spaet { background: rgba(217, 119, 6, 0.25); color: #D97706; }
        .shift-tag.spaet-1 { background: rgba(217, 119, 6, 0.25); color: #D97706; }
        /* Spät 2 (15:00-17:00) - Gold */
        .shift-tag.spaet-2 { background: rgba(180, 83, 9, 0.25); color: #B45309; }
        /* Nacht 1 (17:00-19:00) - Sky Blue */
        .shift-tag.nacht-1 { background: rgba(56, 189, 248, 0.25); color: #38BDF8; }
        /* Nacht/Nacht 2 (19:00-22:00) - Blue */
        .shift-tag.nacht { background: rgba(59, 130, 246, 0.25); color: #3B82F6; }
        .shift-tag.nacht-2 { background: rgba(59, 130, 246, 0.25); color: #3B82F6; }
        /* Special job types */
        .shift-tag.other { background: rgba(158, 195, 222, 0.2); color: #9EC3DE; }
        .shift-tag.pi { background: rgba(236, 72, 153, 0.25); color: #EC4899; }
        .shift-tag.zbv { background: rgba(34, 197, 94, 0.25); color: #22C55E; }
        .shift-tag.ml { background: rgba(236, 72, 153, 0.25); color: #EC4899; }
        .shift-tag.fza { background: rgba(251, 191, 36, 0.25); color: #FBBF24; }
        .shift-tag.ho { background: rgba(34, 197, 94, 0.25); color: #22C55E; }
        .shift-tag.dr { background: rgba(160, 174, 192, 0.25); color: #A0AEC0; }
        .shift-tag.mobile { background: rgba(34, 197, 94, 0.25); color: #22C55E; }
        .shift-tag.superuser { background: rgba(236, 72, 153, 0.25); color: #EC4899; }

        /* Light mode shift tags - darker variants for readability */
        [data-theme="light"] .shift-tag.frueh-1 { background: rgba(185, 28, 28, 0.15); color: #B91C1C; }
        [data-theme="light"] .shift-tag.frueh { background: rgba(220, 38, 38, 0.15); color: #DC2626; }
        [data-theme="light"] .shift-tag.frueh-2 { background: rgba(220, 38, 38, 0.15); color: #DC2626; }
        [data-theme="light"] .shift-tag.flex { background: rgba(217, 119, 6, 0.15); color: #B45309; }
        [data-theme="light"] .shift-tag.mittag { background: rgba(180, 83, 9, 0.15); color: #92400E; }
        [data-theme="light"] .shift-tag.spaet { background: rgba(146, 64, 14, 0.15); color: #78350F; }
        [data-theme="light"] .shift-tag.spaet-1 { background: rgba(146, 64, 14, 0.15); color: #78350F; }
        [data-theme="light"] .shift-tag.spaet-2 { background: rgba(120, 53, 15, 0.15); color: #78350F; }
        [data-theme="light"] .shift-tag.nacht-1 { background: rgba(14, 165, 233, 0.15); color: #0284C7; }
        [data-theme="light"] .shift-tag.nacht { background: rgba(37, 99, 235, 0.15); color: #1D4ED8; }
        [data-theme="light"] .shift-tag.nacht-2 { background: rgba(37, 99, 235, 0.15); color: #1D4ED8; }
        [data-theme="light"] .shift-tag.other { background: rgba(74, 85, 104, 0.15); color: #4A5568; }
        [data-theme="light"] .shift-tag.pi { background: rgba(190, 24, 93, 0.15); color: #BE185D; }
        [data-theme="light"] .shift-tag.zbv { background: rgba(22, 163, 74, 0.15); color: #15803D; }
        [data-theme="light"] .shift-tag.ml { background: rgba(190, 24, 93, 0.15); color: #BE185D; }
        [data-theme="light"] .shift-tag.fza { background: rgba(217, 119, 6, 0.15); color: #B45309; }
        [data-theme="light"] .shift-tag.ho { background: rgba(22, 163, 74, 0.15); color: #15803D; }
        [data-theme="light"] .shift-tag.dr { background: rgba(113, 128, 150, 0.15); color: #4A5568; }
        [data-theme="light"] .shift-tag.mobile { background: rgba(22, 163, 74, 0.15); color: #15803D; }
        [data-theme="light"] .shift-tag.superuser { background: rgba(190, 24, 93, 0.15); color: #BE185D; }

        /* AI department shift tag colors */
        [data-department="dw-ai"] .shift-tag.frueh,
        [data-department="dw-ai"] .shift-tag.frueh-1,
        [data-department="dw-ai"] .shift-tag.frueh-2 { background: rgba(15, 221, 154, 0.25); color: #0fdd9a; }
        [data-department="dw-ai"] .shift-tag.spaet,
        [data-department="dw-ai"] .shift-tag.spaet-1,
        [data-department="dw-ai"] .shift-tag.spaet-2 { background: rgba(255, 79, 155, 0.25); color: #ff4f9b; }
        [data-department="dw-ai"] .shift-tag.nacht,
        [data-department="dw-ai"] .shift-tag.nacht-1,
        [data-department="dw-ai"] .shift-tag.nacht-2 { background: rgba(243, 255, 106, 0.25); color: #c9d400; }
        [data-department="dw-ai"] .shift-tag.pi,
        [data-department="dw-ai"] .shift-tag.zbv,
        [data-department="dw-ai"] .shift-tag.dr { background: rgba(255, 138, 0, 0.25); color: #ff8a00; }

        /* Conflict Warning */
        .conflict-warning {
            display: none;
            align-items: flex-start;
            gap: 10px;
            background: rgba(239, 108, 108, 0.15);
            border: 1px solid rgba(239, 108, 108, 0.4);
            border-radius: 10px;
            padding: 12px;
            margin-bottom: 12px;
            color: var(--danger);
        }

        .conflict-warning svg {
            flex-shrink: 0;
            margin-top: 2px;
        }

        .conflict-warning strong {
            color: var(--danger);
        }

        .conflict-warning small {
            color: var(--text-secondary);
            line-height: 1.4;
        }

        [data-theme="light"] .conflict-warning {
            background: rgba(229, 62, 62, 0.1);
            border-color: rgba(229, 62, 62, 0.3);
        }

        /* Calendar Mini Preview */
        .calendar-mini {
            background: var(--bg-secondary);
            border-radius: 12px;
            padding: 12px;
            margin-bottom: 16px;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
        }

        .calendar-mini-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
        }

        .calendar-mini-title {
            font-size: 14px;
            font-weight: 600;
            color: var(--text-primary);
        }

        .calendar-mini-nav {
            display: flex;
            gap: 4px;
        }

        .calendar-mini-nav button {
            width: 24px;
            height: 24px;
            border-radius: 6px;
            background: rgba(255,255,255,0.1);
            border: none;
            color: var(--text-secondary);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .calendar-mini-nav button:hover {
            background: rgba(255,255,255,0.15);
        }

        .calendar-mini-grid {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 2px;
        }

        .calendar-mini-day-header {
            font-size: 9px;
            color: var(--text-tertiary);
            text-align: center;
            padding: 4px 0;
            text-transform: uppercase;
        }

        .calendar-mini-day {
            aspect-ratio: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 11px;
            color: var(--text-tertiary);
            border-radius: 4px;
        }

        .calendar-mini-day.has-shift {
            color: white;
            font-weight: 600;
        }

        .calendar-mini-day.has-conflict {
            background: linear-gradient(135deg, #DC2626 50%, #FBBF24 50%);
            color: white;
            font-weight: 600;
            position: relative;
        }

        .calendar-mini-day.has-conflict::after {
            content: "!";
            position: absolute;
            top: -2px;
            right: 1px;
            font-size: 10px;
            font-weight: 700;
            color: white;
            text-shadow: 0 0 2px rgba(0,0,0,0.5);
        }

        /* Shift type colors for calendar - time-based gradient (red→orange→blue) */

        /* Early morning (05:00-06:30) - Deep Red */
        .calendar-mini-day.shift-frueh-1 {
            background: #DC2626;
        }

        /* Early morning (06:30-08:00) - Coral */
        .calendar-mini-day.shift-frueh,
        .calendar-mini-day.shift-frueh-2,
        .calendar-mini-day.shift-fruh {
            background: #F87171;
        }

        /* Mid-morning (08:00-10:00) - Light Orange */
        .calendar-mini-day.shift-flex {
            background: #FBBF24;
        }

        /* Midday (10:00-13:00) - Orange */
        .calendar-mini-day.shift-tag,
        .calendar-mini-day.shift-mittag {
            background: #F59E0B;
        }

        /* Early afternoon (13:00-15:00) - Amber */
        .calendar-mini-day.shift-spaet-1,
        .calendar-mini-day.shift-spaet,
        .calendar-mini-day.shift-spat {
            background: #D97706;
        }

        /* Afternoon (15:00-17:00) - Gold */
        .calendar-mini-day.shift-spaet-2 {
            background: #B45309;
        }

        /* Early evening (17:00-19:00) - Sky Blue */
        .calendar-mini-day.shift-nacht-1 {
            background: #38BDF8;
        }

        /* Evening (19:00-22:00) - Blue */
        .calendar-mini-day.shift-nacht,
        .calendar-mini-day.shift-nacht-2 {
            background: #3B82F6;
        }

        /* Night (22:00+) - Deep Blue */
        .calendar-mini-day.shift-nacht-late {
            background: #1D4ED8;
        }

        /* Special job types */
        .calendar-mini-day.shift-pink,
        .calendar-mini-day.shift-superuser,
        .calendar-mini-day.shift-pi,
        .calendar-mini-day.shift-ml {
            background: #EC4899;
        }

        .calendar-mini-day.shift-green,
        .calendar-mini-day.shift-zbv,
        .calendar-mini-day.shift-mobile {
            background: #22C55E;
        }

        .calendar-mini-day.shift-ho {
            background: #10B981;
        }

        .calendar-mini-day.shift-fza {
            background: #F97316;
        }

        .calendar-mini-day.shift-gray,
        .calendar-mini-day.shift-dr {
            background: #6B7280;
        }

        .calendar-mini-day.shift-other,
        .calendar-mini-day.shift-default {
            background: #64748B;
        }

        /* AI department specific colors */
        [data-department="dw-ai"] .calendar-mini-day.shift-frueh,
        [data-department="dw-ai"] .calendar-mini-day.shift-frueh-1,
        [data-department="dw-ai"] .calendar-mini-day.shift-frueh-2,
        [data-department="dw-ai"] .calendar-mini-day.shift-fruh {
            background: #0fdd9a;
            color: #000;
            text-shadow: none;
        }

        [data-department="dw-ai"] .calendar-mini-day.shift-spaet,
        [data-department="dw-ai"] .calendar-mini-day.shift-spaet-1,
        [data-department="dw-ai"] .calendar-mini-day.shift-spaet-2,
        [data-department="dw-ai"] .calendar-mini-day.shift-spat {
            background: #ff4f9b;
        }

        [data-department="dw-ai"] .calendar-mini-day.shift-nacht,
        [data-department="dw-ai"] .calendar-mini-day.shift-nacht-1,
        [data-department="dw-ai"] .calendar-mini-day.shift-nacht-2,
        [data-department="dw-ai"] .calendar-mini-day.shift-nacht-late {
            background: #f3ff6a;
            color: #000;
            text-shadow: none;
        }

        [data-department="dw-ai"] .calendar-mini-day.shift-pi,
        [data-department="dw-ai"] .calendar-mini-day.shift-zbv,
        [data-department="dw-ai"] .calendar-mini-day.shift-dr {
            background: #ff8a00;
        }

        /* Light mode calendar colors - same time-based gradient */
        [data-theme="light"] .calendar-mini-day.shift-frueh-1 {
            background: #B91C1C;
        }

        [data-theme="light"] .calendar-mini-day.shift-frueh,
        [data-theme="light"] .calendar-mini-day.shift-frueh-2,
        [data-theme="light"] .calendar-mini-day.shift-fruh {
            background: #EF4444;
        }

        [data-theme="light"] .calendar-mini-day.shift-flex {
            background: #F59E0B;
        }

        [data-theme="light"] .calendar-mini-day.shift-tag,
        [data-theme="light"] .calendar-mini-day.shift-mittag {
            background: #D97706;
        }

        [data-theme="light"] .calendar-mini-day.shift-spaet-1,
        [data-theme="light"] .calendar-mini-day.shift-spaet,
        [data-theme="light"] .calendar-mini-day.shift-spat {
            background: #B45309;
        }

        [data-theme="light"] .calendar-mini-day.shift-spaet-2 {
            background: #92400E;
        }

        [data-theme="light"] .calendar-mini-day.shift-nacht-1 {
            background: #0EA5E9;
        }

        [data-theme="light"] .calendar-mini-day.shift-nacht,
        [data-theme="light"] .calendar-mini-day.shift-nacht-2 {
            background: #2563EB;
        }

        [data-theme="light"] .calendar-mini-day.shift-nacht-late {
            background: #1E40AF;
        }

        [data-theme="light"] .calendar-mini-day.shift-pink,
        [data-theme="light"] .calendar-mini-day.shift-superuser,
        [data-theme="light"] .calendar-mini-day.shift-pi,
        [data-theme="light"] .calendar-mini-day.shift-ml {
            background: #DB2777;
        }

        [data-theme="light"] .calendar-mini-day.shift-green,
        [data-theme="light"] .calendar-mini-day.shift-zbv,
        [data-theme="light"] .calendar-mini-day.shift-mobile {
            background: #16A34A;
        }

        [data-theme="light"] .calendar-mini-day.shift-ho {
            background: #059669;
        }

        [data-theme="light"] .calendar-mini-day.shift-fza {
            background: #EA580C;
        }

        [data-theme="light"] .calendar-mini-day.shift-gray,
        [data-theme="light"] .calendar-mini-day.shift-dr {
            background: #4B5563;
        }

        [data-theme="light"] .calendar-mini-day.shift-other,
        [data-theme="light"] .calendar-mini-day.shift-default {
            background: #64748B;
        }

        .calendar-mini-day.empty {
            color: transparent;
        }

        /* Adjacent month days shown in full weeks view */
        .calendar-mini-day.outside-month {
            opacity: 0.4;
        }

        .calendar-mini-day.outside-month.has-shift {
            opacity: 0.6;
        }

        .calendar-mini-day.today {
            border: 1px solid var(--accent);
        }

        /* File Pill */
        .file-pill {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 14px 16px;
            background: rgba(0, 122, 255, 0.1);
            border-radius: 12px;
            margin-bottom: 16px;
        }

        .file-pill-icon {
            width: 44px;
            height: 44px;
            background: var(--accent);
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .file-pill-icon svg {
            width: 22px;
            height: 22px;
            color: white;
        }

        .file-pill-info {
            flex: 1;
            min-width: 0;
        }

        .file-pill-name {
            font-size: 16px;
            font-weight: 600;
            color: var(--text-primary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .file-pill-size {
            font-size: 13px;
            color: var(--text-tertiary);
        }

        .file-pill-change {
            padding: 8px 14px;
            font-size: 14px;
            font-weight: 500;
            color: var(--accent);
            background: transparent;
            border: none;
            cursor: pointer;
            border-radius: 8px;
            transition: background 0.15s;
        }

        .file-pill-change:hover {
            background: rgba(0, 122, 255, 0.1);
        }

        /* ========================================
           8. Forms & Inputs
           ======================================== */
        .form-section {
            background: var(--bg-grouped);
            border-radius: var(--card-radius);
            margin-bottom: 16px;
            overflow: hidden;
        }

        .form-row {
            padding: 14px 16px;
            border-bottom: 0.5px solid var(--separator);
        }

        .form-row:last-child {
            border-bottom: none;
        }

        .form-label {
            font-size: 17px;
            color: var(--text-primary);
            margin-bottom: 8px;
            display: block;
        }

        .form-hint {
            font-size: 13px;
            color: var(--text-tertiary);
            margin-top: 6px;
        }

        input[type="text"],
        input[type="number"],
        select,
        textarea {
            width: 100%;
            padding: 12px 16px;
            font-size: 17px;
            font-family: inherit;
            background: var(--input-bg);
            border: 1px solid var(--input-border);
            border-radius: 10px;
            color: var(--text-primary);
            transition: border-color 0.2s, box-shadow 0.2s;
        }

        input:focus,
        select:focus,
        textarea:focus {
            outline: none;
            border-color: var(--accent);
            box-shadow: 0 0 0 var(--ring-offset-width) var(--ring-offset-color),
                        0 0 0 calc(var(--ring-offset-width) + 2px) var(--ring-color);
        }

        input:focus-visible,
        select:focus-visible,
        textarea:focus-visible {
            outline: none;
            border-color: var(--accent);
            box-shadow: 0 0 0 var(--ring-offset-width) var(--ring-offset-color),
                        0 0 0 calc(var(--ring-offset-width) + 2px) var(--ring-color);
        }

        textarea {
            resize: vertical;
            min-height: 100px;
        }

        select {
            appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238e8e93' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 16px center;
            padding-right: 40px;
        }

        /* Checkboxes */
        .checkbox-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 8px;
        }

        .reminder-toggles {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            align-items: center;
        }

        .reminder-btn {
            padding: 6px 10px;
            border: 1px solid var(--border);
            border-radius: 6px;
            background: var(--bg-tertiary);
            color: var(--text-secondary);
            font-size: 13px;
            cursor: pointer;
            transition: all 0.15s ease;
        }

        .reminder-btn:hover {
            background: var(--bg-secondary);
            border-color: var(--text-tertiary);
        }

        .reminder-btn.active {
            background: var(--accent);
            border-color: var(--accent);
            color: white;
        }

        .reminder-custom {
            width: 60px;
            padding: 6px 8px;
            font-size: 13px;
        }

        /* Date Range Filter */
        .date-range-filter {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .date-inputs {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .date-inputs input[type="date"] {
            padding: 6px 10px;
            border: 1px solid var(--border);
            border-radius: 6px;
            background: var(--input-bg);
            color: var(--text-primary);
            font-size: 13px;
        }

        .date-inputs span {
            color: var(--text-tertiary);
        }

        /* Title Builder */
        .title-builder {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            align-items: center;
        }

        .title-builder {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        /* Draggable title parts container */
        .title-parts-container {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            padding: 10px;
            border: 1px dashed var(--border);
            border-radius: 8px;
            background: var(--bg-tertiary);
            min-height: 48px;
        }

        .title-part {
            padding: 8px 14px;
            border: 1px solid var(--border);
            border-radius: 6px;
            background: var(--bg-secondary);
            color: var(--text-muted);
            font-size: 13px;
            cursor: pointer;
            transition: all 0.15s ease;
            -webkit-tap-highlight-color: transparent;
            user-select: none;
        }

        /* Content buttons are draggable */
        .title-part.content {
            cursor: grab;
        }

        .title-part.content:active {
            cursor: grabbing;
        }

        .title-part.active {
            background: var(--accent);
            border-color: var(--accent);
            color: white;
        }

        /* Separator buttons - smaller, not draggable */
        .title-part.separator {
            padding: 8px 10px;
            min-width: 32px;
            font-weight: bold;
            background: var(--bg-tertiary);
            opacity: 0.5;
            cursor: pointer;
        }

        .title-part.separator.active {
            opacity: 1;
            background: var(--text-muted);
            border-color: var(--text-muted);
            color: var(--bg);
        }

        /* Drag and drop states */
        .title-part.dragging {
            opacity: 0.5;
            transform: scale(1.05);
        }

        .title-part.drag-over {
            border-color: var(--accent);
            box-shadow: 0 0 0 2px rgba(var(--accent-rgb, 74, 144, 226), 0.3);
        }

        .title-parts-container.drag-active {
            border-color: var(--accent);
            background: var(--bg-secondary);
        }

        .title-hint {
            font-size: 11px;
            color: var(--text-muted);
            margin-top: 6px;
            margin-bottom: 0;
        }

        .title-preview {
            margin-top: 8px;
            padding: 10px 12px;
            background: var(--bg-tertiary);
            border-radius: 8px;
            font-size: 13px;
            color: var(--text-secondary);
        }

        .title-preview-label {
            font-size: 11px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            color: var(--text-tertiary);
            margin-bottom: 4px;
        }

        .checkbox-item {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 10px 12px;
            background: var(--bg-tertiary);
            border-radius: 8px;
            cursor: pointer;
            transition: background 0.15s;
        }

        .checkbox-item:hover {
            background: var(--separator);
        }

        .checkbox-item input[type="checkbox"] {
            width: 22px;
            height: 22px;
            accent-color: var(--accent);
        }

        .checkbox-item span {
            font-size: 15px;
            color: var(--text-primary);
        }

        /* Collapsible Section */
        .collapsible {
            background: var(--bg-grouped);
            border-radius: var(--card-radius);
            margin-bottom: 16px;
            overflow: hidden;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
        }

        .collapsible-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 14px 16px;
            cursor: pointer;
            transition: background 0.15s;
        }

        .collapsible-header:hover {
            background: var(--bg-tertiary);
        }

        /* Export Settings special styling - using DW yellow */
        #settingsCollapsible .collapsible-header {
            background: linear-gradient(135deg, rgba(250, 224, 0, 0.25) 0%, rgba(250, 224, 0, 0.15) 100%);
            border-radius: 10px;
            border: 1px solid rgba(250, 224, 0, 0.4);
        }

        #settingsCollapsible .collapsible-header:hover {
            background: linear-gradient(135deg, rgba(250, 224, 0, 0.35) 0%, rgba(250, 224, 0, 0.25) 100%);
        }

        #settingsCollapsible .collapsible-title svg {
            color: #FAE000;
        }

        #settingsCollapsible .collapsible-chevron {
            color: #FAE000;
        }

        .collapsible-title {
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 15px;
            font-weight: 500;
            color: var(--text-primary);
        }

        .collapsible-title svg {
            width: 20px;
            height: 20px;
            color: var(--text-tertiary);
        }

        .collapsible-chevron {
            width: 20px;
            height: 20px;
            color: var(--text-tertiary);
            transition: transform 0.2s;
        }

        .collapsible.open .collapsible-chevron {
            transform: rotate(180deg);
        }

        .collapsible-content {
            display: none;
            border-top: 0.5px solid var(--separator);
        }

        .collapsible.open .collapsible-content {
            display: block;
            animation: slideDown 0.2s ease-out;
        }

        @keyframes slideDown {
            from { opacity: 0; transform: translateY(-8px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* ========================================
           8b. Export Summary (Step 4)
           ======================================== */
        .export-summary {
            background: var(--bg-tertiary);
            border-radius: 12px;
            padding: 16px;
            margin-bottom: 24px;
        }

        .export-summary-row {
            display: flex;
            justify-content: space-between;
            padding: 8px 0;
            border-bottom: 1px solid var(--border-color);
        }

        .export-summary-row:last-child {
            border-bottom: none;
        }

        .export-summary-label {
            color: var(--text-secondary);
            font-size: 14px;
        }

        .export-summary-value {
            color: var(--text-primary);
            font-weight: 500;
            font-size: 14px;
        }

        .btn-link {
            background: none;
            border: none;
            color: var(--accent);
            font-size: 14px;
            cursor: pointer;
            padding: 8px 0;
            text-align: center;
            width: 100%;
            transition: opacity 0.15s ease;
        }

        .btn-link:hover {
            opacity: 0.8;
        }


        /* ========================================
           9. Results / Schedule Views
           ======================================== */
        .results-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 16px;
            flex-wrap: wrap;
            gap: 12px;
        }

        .results-meta {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .results-employee {
            font-size: 20px;
            font-weight: 600;
            color: var(--text-primary);
        }

        .results-count {
            font-size: 14px;
            color: var(--text-tertiary);
        }

        .selected-employee-chip {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 8px 12px;
            background: var(--accent);
            color: white;
            border-radius: 20px;
            font-size: 14px;
            font-weight: 500;
            margin-bottom: 12px;
        }

        .change-employee-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(255,255,255,0.2);
            border: none;
            border-radius: 50%;
            width: 22px;
            height: 22px;
            cursor: pointer;
            transition: background 0.15s ease;
            color: white;
        }

        .change-employee-btn:hover {
            background: rgba(255,255,255,0.3);
        }

        .results-date-range {
            font-size: 13px;
            color: var(--text-tertiary);
            padding: 8px 12px;
            background: var(--bg-tertiary);
            border-radius: 8px;
            margin-bottom: 16px;
        }

        /* Data Preview Toggle */
        .data-preview-section {
            margin-bottom: 8px;
        }

        .data-preview-toggle {
            display: flex;
            align-items: center;
            gap: 8px;
            width: 100%;
            padding: 12px 14px;
            background: var(--bg-tertiary);
            border: none;
            border-radius: 10px;
            font-size: 15px;
            font-weight: 500;
            font-family: inherit;
            color: var(--text-primary);
            cursor: pointer;
            transition: background 0.15s ease;
        }

        .data-preview-toggle:hover {
            background: var(--separator);
        }

        .data-preview-toggle svg {
            width: 16px;
            height: 16px;
            color: var(--text-tertiary);
            transition: transform 0.2s ease;
        }

        .data-preview-toggle.open svg {
            transform: rotate(90deg);
        }

        .data-preview-count {
            margin-left: auto;
            font-size: 13px;
            color: var(--text-tertiary);
            font-weight: 400;
        }

        .data-preview-list {
            margin-top: 8px;
            background: var(--bg-secondary);
            border: 1px solid var(--separator);
            border-radius: 10px;
            max-height: 300px;
            overflow-y: auto;
        }

        .data-preview-item {
            display: flex;
            align-items: center;
            padding: 10px 14px;
            border-bottom: 0.5px solid var(--separator);
            font-size: 14px;
            gap: 16px;
        }

        .data-preview-item:last-child {
            border-bottom: none;
        }

        .data-preview-date {
            width: 105px;
            flex-shrink: 0;
            font-weight: 500;
            color: var(--text-primary);
            white-space: nowrap;
        }

        .data-preview-time {
            width: 95px;
            flex-shrink: 0;
            color: var(--text-secondary);
            white-space: nowrap;
        }

        .data-preview-shift {
            flex: 1;
            color: var(--text-tertiary);
        }

        /* View Toggle */
        .view-toggle {
            display: flex;
            background: var(--bg-tertiary);
            border-radius: 8px;
            padding: 2px;
        }

        .view-toggle-btn {
            padding: 8px 14px;
            font-size: 14px;
            font-weight: 500;
            font-family: inherit;
            border: none;
            background: transparent;
            color: var(--text-tertiary);
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.15s ease;
        }

        .view-toggle-btn.active {
            background: var(--bg-secondary);
            color: var(--text-primary);
            box-shadow: 0 1px 2px rgba(0,0,0,0.1);
        }

        /* Schedule List */
        .schedule-list {
            background: var(--bg-grouped);
            border-radius: var(--card-radius);
            overflow: hidden;
            max-height: 400px;
            overflow-y: auto;
        }

        .schedule-item {
            display: flex;
            align-items: center;
            padding: 14px 16px;
            border-bottom: 0.5px solid var(--separator);
        }

        .schedule-item:last-child {
            border-bottom: none;
        }

        .schedule-indicator {
            width: 4px;
            height: 40px;
            border-radius: 2px;
            margin-right: 14px;
            flex-shrink: 0;
        }

        /* Schedule indicator colors - time-based gradient */
        .schedule-indicator.frueh-1 { background: #DC2626; }
        .schedule-indicator.frueh,
        .schedule-indicator.frueh-2 { background: #F87171; }
        .schedule-indicator.flex { background: #FBBF24; }
        .schedule-indicator.tag,
        .schedule-indicator.mittag { background: #F59E0B; }
        .schedule-indicator.spaet,
        .schedule-indicator.spaet-1 { background: #D97706; }
        .schedule-indicator.spaet-2 { background: #B45309; }
        .schedule-indicator.nacht-1 { background: #38BDF8; }
        .schedule-indicator.nacht,
        .schedule-indicator.nacht-2 { background: #3B82F6; }
        .schedule-indicator.nacht-late { background: #1D4ED8; }
        .schedule-indicator.pink,
        .schedule-indicator.superuser { background: #EC4899; }
        .schedule-indicator.green,
        .schedule-indicator.mobile { background: #22C55E; }
        .schedule-indicator.ho { background: #10B981; }
        .schedule-indicator.fza { background: #F97316; }
        .schedule-indicator.gray { background: #6B7280; }
        .schedule-indicator.default { background: #64748B; }

        .schedule-content { flex: 1; min-width: 0; }

        .schedule-date {
            font-size: 17px;
            font-weight: 500;
            color: var(--text-primary);
        }

        .schedule-time {
            font-size: 15px;
            color: var(--text-secondary);
        }

        .schedule-meta {
            font-size: 13px;
            color: var(--text-tertiary);
        }

        /* Schedule Grid */
        .schedule-grid-container {
            overflow-x: auto;
            background: var(--bg-grouped);
            border-radius: var(--card-radius);
            max-height: 400px;
            overflow-y: auto;
        }

        .schedule-grid {
            width: max-content;
            border-collapse: collapse;
            font-size: 12px;
        }

        .schedule-grid th,
        .schedule-grid td {
            border: 0.5px solid var(--separator);
            padding: 6px 4px;
            text-align: center;
            min-width: 32px;
        }

        .schedule-grid th {
            background: var(--bg-tertiary);
            font-weight: 600;
            color: var(--text-secondary);
            position: sticky;
            top: 0;
            z-index: 1;
        }

        .schedule-grid th.day-header { font-size: 10px; }
        .schedule-grid th.day-header .day-name {
            font-size: 9px;
            color: var(--text-tertiary);
            display: block;
        }

        .schedule-grid th.employee-header {
            text-align: left;
            padding-left: 8px;
            padding-right: 12px;
            min-width: 90px;
            position: sticky;
            left: 0;
            background: var(--bg-tertiary);
            z-index: 2;
            white-space: nowrap;
        }

        .schedule-grid td.employee-cell {
            text-align: left;
            padding-left: 8px;
            padding-right: 12px;
            font-weight: 500;
            background: var(--bg-secondary);
            position: sticky;
            left: 0;
            z-index: 1;
            white-space: nowrap;
        }

        .schedule-grid td.shift-cell {
            font-weight: 500;
            font-size: 11px;
        }

        /* Schedule grid colors - time-based gradient */
        .schedule-grid .shift-frueh-1 { background: rgba(220, 38, 38, 0.2); color: #DC2626; }
        .schedule-grid .shift-frueh,
        .schedule-grid .shift-frueh-2 { background: rgba(248, 113, 113, 0.2); color: #F87171; }
        .schedule-grid .shift-flex { background: rgba(251, 191, 36, 0.2); color: #FBBF24; }
        .schedule-grid .shift-tag,
        .schedule-grid .shift-mittag { background: rgba(245, 158, 11, 0.2); color: #F59E0B; }
        .schedule-grid .shift-spaet,
        .schedule-grid .shift-spaet-1 { background: rgba(217, 119, 6, 0.2); color: #D97706; }
        .schedule-grid .shift-spaet-2 { background: rgba(180, 83, 9, 0.2); color: #B45309; }
        .schedule-grid .shift-nacht-1 { background: rgba(56, 189, 248, 0.2); color: #38BDF8; }
        .schedule-grid .shift-nacht,
        .schedule-grid .shift-nacht-2 { background: rgba(59, 130, 246, 0.2); color: #3B82F6; }
        .schedule-grid .shift-nacht-late { background: rgba(29, 78, 216, 0.2); color: #1D4ED8; }
        .schedule-grid .shift-pink { background: rgba(236, 72, 153, 0.2); color: #EC4899; }
        .schedule-grid .shift-green { background: rgba(34, 197, 94, 0.2); color: #22C55E; }
        .schedule-grid .shift-mobile { background: rgba(34, 197, 94, 0.2); color: #22C55E; }
        .schedule-grid .shift-ho { background: rgba(16, 185, 129, 0.2); color: #10B981; }
        .schedule-grid .shift-fza { background: rgba(249, 115, 22, 0.2); color: #F97316; }
        .schedule-grid .shift-gray { background: rgba(107, 114, 128, 0.2); color: #6B7280; }
        .schedule-grid .shift-default { background: rgba(100, 116, 139, 0.2); color: #64748B; }
        .schedule-grid .weekend { background: var(--bg-tertiary); }

        /* Weekly View */
        .schedule-weekly-container {
            background: var(--bg-grouped);
            border-radius: var(--card-radius);
            max-height: 500px;
            overflow-y: auto;
            padding: 16px;
        }

        .week-section { margin-bottom: 24px; }

        .week-header {
            font-size: 15px;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 12px;
            padding: 8px 12px;
            background: var(--bg-tertiary);
            border-radius: 8px;
        }

        .week-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 13px;
        }

        .week-table th,
        .week-table td {
            border: 0.5px solid var(--separator);
            padding: 8px 6px;
            text-align: center;
            vertical-align: top;
        }

        .week-table th {
            background: var(--bg-tertiary);
            font-weight: 600;
            color: var(--text-secondary);
            font-size: 12px;
        }

        .week-table th.shift-header {
            text-align: left;
            padding-left: 12px;
            width: 80px;
        }

        .week-table th.weekend-header {
            background: rgba(255, 149, 0, 0.1);
        }

        .week-table td.shift-label {
            text-align: left;
            padding-left: 12px;
            font-weight: 600;
            background: var(--bg-secondary);
            min-width: 70px;
        }

        .week-table td.shift-label .shift-name {
            display: block;
            font-size: 12px;
            font-weight: 600;
            white-space: nowrap;
        }

        .week-table td.shift-label .time-slot-small {
            display: block;
            font-size: 10px;
            opacity: 0.7;
            font-weight: 400;
        }

        .week-table td.shift-label.shift-frueh { color: var(--shift-frueh); border-left: 3px solid var(--shift-frueh); }
        .week-table td.shift-label.shift-spaet { color: var(--shift-spaet); border-left: 3px solid var(--shift-spaet); }
        .week-table td.shift-label.shift-nacht { color: var(--shift-nacht); border-left: 3px solid var(--shift-nacht); }
        .week-table td.shift-label.shift-mobile { color: var(--shift-mobile); border-left: 3px solid var(--shift-mobile); }

        .week-table td.weekend-cell { background: rgba(255, 149, 0, 0.05); }

        .week-table .employee-list {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .week-table .employee-name {
            font-size: 12px;
            padding: 2px 4px;
            border-radius: 4px;
            background: var(--bg-tertiary);
        }

        .week-table .employee-name.shift-frueh { background: rgba(0, 122, 255, 0.15); color: var(--shift-frueh); }
        .week-table .employee-name.shift-spaet { background: rgba(255, 149, 0, 0.15); color: var(--shift-spaet); }
        .week-table .employee-name.shift-nacht { background: rgba(175, 82, 222, 0.15); color: var(--shift-nacht); }
        .week-table .employee-name.shift-mobile { background: rgba(52, 199, 89, 0.15); color: var(--shift-mobile); }

        /* ========================================
           10. Mappings
           ======================================== */
        .mapping-row {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 10px 16px;
            border-bottom: 0.5px solid var(--separator);
        }

        .mapping-row:last-child { border-bottom: none; }

        .mapping-label {
            width: 100px;
            font-size: 14px;
            color: var(--text-secondary);
            flex-shrink: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .mapping-arrow {
            color: var(--text-tertiary);
            flex-shrink: 0;
        }

        .mapping-input {
            flex: 1;
            padding: 8px 12px;
            font-size: 14px;
        }

        /* Color selector for shift colors */
        .color-select-wrapper {
            display: flex;
            align-items: center;
            gap: 8px;
            flex: 1;
        }

        .color-dot {
            width: 16px;
            height: 16px;
            border-radius: 50%;
            flex-shrink: 0;
            border: 1px solid var(--separator);
        }

        .shift-color-select {
            flex: 1;
            padding: 8px 12px;
            font-size: 14px;
            background: var(--bg-secondary);
            border: 1px solid var(--separator);
            border-radius: 8px;
            color: var(--text-primary);
            cursor: pointer;
        }

        .shift-color-select:focus {
            outline: none;
            border-color: var(--tint);
            box-shadow: 0 0 0 3px rgba(var(--tint-rgb), 0.2);
        }

        /* Shift Options Row - expanded layout for color + all-day + notes */
        .shift-options-row {
            flex-wrap: wrap;
        }

        .shift-options-row .mapping-label {
            width: 100%;
            margin-bottom: 8px;
            font-weight: 500;
        }

        .shift-options-controls {
            display: flex;
            align-items: center;
            gap: 12px;
            flex: 1;
            flex-wrap: wrap;
        }

        .shift-options-controls .color-select-wrapper {
            flex: 0 0 auto;
            min-width: 140px;
        }

        .all-day-toggle {
            display: flex;
            align-items: center;
            gap: 6px;
            cursor: pointer;
            font-size: 13px;
            color: var(--text-secondary);
            white-space: nowrap;
        }

        .all-day-toggle input[type="checkbox"] {
            width: 16px;
            height: 16px;
            accent-color: var(--tint);
            cursor: pointer;
        }

        .all-day-label {
            user-select: none;
        }

        .shift-note-input {
            flex: 1;
            min-width: 100px;
            max-width: 150px;
            padding: 6px 10px;
            font-size: 13px;
            background: var(--bg-secondary);
            border: 1px solid var(--separator);
            border-radius: 6px;
            color: var(--text-primary);
        }

        .shift-note-input::placeholder {
            color: var(--text-tertiary);
            font-size: 12px;
        }

        .shift-note-input:focus {
            outline: none;
            border-color: var(--tint);
            box-shadow: 0 0 0 2px rgba(var(--tint-rgb), 0.15);
        }

        /* Auto Home Office Toggle */
        .auto-ho-toggle-row {
            padding: 12px 16px;
            border-bottom: 1px solid var(--separator);
            background: var(--bg-secondary);
        }

        .auto-ho-toggle {
            display: flex;
            align-items: center;
            gap: 10px;
            cursor: pointer;
            flex-wrap: wrap;
        }

        .auto-ho-toggle input[type="checkbox"] {
            width: 18px;
            height: 18px;
            accent-color: var(--tint);
            cursor: pointer;
        }

        .auto-ho-text {
            font-size: 14px;
            font-weight: 500;
            color: var(--text-primary);
        }

        .auto-ho-hint {
            font-size: 12px;
            color: var(--text-tertiary);
            margin-left: auto;
        }

        @media (max-width: 480px) {
            .auto-ho-hint {
                width: 100%;
                margin-left: 28px;
                margin-top: 4px;
            }
        }

        /* ========================================
           11. Calendar Preview
           ======================================== */
        .calendar-preview {
            max-height: 400px;
            overflow-y: auto;
            margin-bottom: 16px;
        }

        .preview-event {
            background: var(--bg-grouped);
            border-radius: var(--card-radius);
            margin-bottom: 12px;
            overflow: hidden;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        }

        .preview-event-header {
            display: flex;
            align-items: stretch;
        }

        .preview-event-color {
            width: 6px;
            flex-shrink: 0;
        }

        /* Preview colors - time-based gradient (red→orange→blue) */

        /* Early morning - Deep Red */
        .preview-event-color.frueh-1 { background: #DC2626; }

        /* Early morning - Coral */
        .preview-event-color.frueh,
        .preview-event-color.frueh-2 { background: #F87171; }

        /* Mid-morning - Light Orange */
        .preview-event-color.flex { background: #FBBF24; }

        /* Midday - Orange */
        .preview-event-color.tag,
        .preview-event-color.mittag { background: #F59E0B; }

        /* Early afternoon - Amber */
        .preview-event-color.spaet,
        .preview-event-color.spaet-1 { background: #D97706; }

        /* Afternoon - Gold */
        .preview-event-color.spaet-2 { background: #B45309; }

        /* Early evening - Sky Blue */
        .preview-event-color.nacht-1 { background: #38BDF8; }

        /* Evening - Blue */
        .preview-event-color.nacht,
        .preview-event-color.nacht-2 { background: #3B82F6; }

        /* Night - Deep Blue */
        .preview-event-color.nacht-late { background: #1D4ED8; }

        /* Special job types */
        .preview-event-color.pink,
        .preview-event-color.superuser { background: #EC4899; }
        .preview-event-color.green,
        .preview-event-color.mobile { background: #22C55E; }
        .preview-event-color.ho { background: #10B981; }
        .preview-event-color.fza { background: #F97316; }
        .preview-event-color.gray { background: #6B7280; }
        .preview-event-color.default { background: #64748B; }

        /* Light mode preview colors */
        [data-theme="light"] .preview-event-color.frueh-1 { background: #B91C1C; }
        [data-theme="light"] .preview-event-color.frueh,
        [data-theme="light"] .preview-event-color.frueh-2 { background: #EF4444; }
        [data-theme="light"] .preview-event-color.flex { background: #F59E0B; }
        [data-theme="light"] .preview-event-color.tag,
        [data-theme="light"] .preview-event-color.mittag { background: #D97706; }
        [data-theme="light"] .preview-event-color.spaet,
        [data-theme="light"] .preview-event-color.spaet-1 { background: #B45309; }
        [data-theme="light"] .preview-event-color.spaet-2 { background: #92400E; }
        [data-theme="light"] .preview-event-color.nacht-1 { background: #0EA5E9; }
        [data-theme="light"] .preview-event-color.nacht,
        [data-theme="light"] .preview-event-color.nacht-2 { background: #2563EB; }
        [data-theme="light"] .preview-event-color.nacht-late { background: #1E40AF; }
        [data-theme="light"] .preview-event-color.pink,
        [data-theme="light"] .preview-event-color.superuser { background: #DB2777; }
        [data-theme="light"] .preview-event-color.green,
        [data-theme="light"] .preview-event-color.mobile { background: #16A34A; }
        [data-theme="light"] .preview-event-color.ho { background: #059669; }
        [data-theme="light"] .preview-event-color.fza { background: #EA580C; }
        [data-theme="light"] .preview-event-color.gray { background: #4B5563; }
        [data-theme="light"] .preview-event-color.default { background: #475569; }

        /* AI department preview colors */
        [data-department="dw-ai"] .preview-event-color.frueh,
        [data-department="dw-ai"] .preview-event-color.frueh-1,
        [data-department="dw-ai"] .preview-event-color.frueh-2 { background: #0fdd9a; }
        [data-department="dw-ai"] .preview-event-color.spaet,
        [data-department="dw-ai"] .preview-event-color.spaet-1,
        [data-department="dw-ai"] .preview-event-color.spaet-2 { background: #ff4f9b; }
        [data-department="dw-ai"] .preview-event-color.nacht,
        [data-department="dw-ai"] .preview-event-color.nacht-1,
        [data-department="dw-ai"] .preview-event-color.nacht-2,
        [data-department="dw-ai"] .preview-event-color.nacht-late { background: #f3ff6a; }
        [data-department="dw-ai"] .preview-event-color.pi,
        [data-department="dw-ai"] .preview-event-color.zbv,
        [data-department="dw-ai"] .preview-event-color.dr { background: #ff8a00; }

        .preview-event-main {
            flex: 1;
            padding: 14px 16px;
        }

        .preview-event-title {
            font-size: 16px;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 4px;
        }

        .preview-event-datetime {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 14px;
            color: var(--text-secondary);
            margin-bottom: 8px;
        }

        .preview-event-datetime svg {
            width: 16px;
            height: 16px;
            color: var(--text-tertiary);
        }

        .preview-event-details {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .preview-event-detail {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 13px;
            color: var(--text-tertiary);
        }

        .preview-event-detail svg {
            width: 14px;
            height: 14px;
            flex-shrink: 0;
        }

        .raw-ics-toggle {
            font-size: 13px;
            color: var(--text-tertiary);
        }

        .raw-ics-toggle summary {
            cursor: pointer;
            padding: 8px 0;
        }

        .raw-ics-toggle summary:hover {
            color: var(--accent);
        }

        .preview-content {
            background: var(--bg-tertiary);
            border-radius: 10px;
            padding: 16px;
            font-family: 'SF Mono', Monaco, 'Courier New', monospace;
            font-size: 12px;
            color: var(--text-secondary);
            overflow-x: auto;
            max-height: 300px;
            overflow-y: auto;
            white-space: pre-wrap;
            word-break: break-all;
        }

        /* ========================================
           12. Employee Select Card
           ======================================== */
        .employee-select-container {
            max-width: 360px;
            margin: 0 auto;
        }

        .employee-select-container select {
            margin-bottom: 16px;
        }

        /* Month Filter Toggle in Preview */
        .month-filter-toggle {
            display: flex;
            align-items: center;
            gap: 12px;
            background: var(--ui-light-blue);
            border-radius: 10px;
            padding: 12px 16px;
            margin-bottom: 16px;
            font-size: 13px;
        }

        .toggle-switch {
            position: relative;
            display: inline-block;
            width: 44px;
            height: 24px;
            flex-shrink: 0;
        }

        .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: rgba(255, 255, 255, 0.25);
            border: 2px solid rgba(255, 255, 255, 0.4);
            transition: 0.2s;
            border-radius: 24px;
        }

        .toggle-slider:before {
            position: absolute;
            content: "";
            height: 16px;
            width: 16px;
            left: 2px;
            bottom: 2px;
            background-color: white;
            box-shadow: 0 2px 4px rgba(0,0,0,0.3);
            transition: 0.2s;
            border-radius: 50%;
        }

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

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

        .toggle-label {
            color: var(--text-primary);
        }

        .toggle-label strong {
            color: var(--warning);
            font-weight: 600;
        }

        /* Name Merge Suggestion */
        .merge-suggestion {
            background: var(--warning);
            color: var(--ui-dark-blue);
            border-radius: 10px;
            padding: 12px;
            margin-bottom: 16px;
            font-size: 13px;
        }

        .merge-suggestion-header {
            font-weight: 600;
            margin-bottom: 8px;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .merge-suggestion-header svg {
            width: 16px;
            height: 16px;
            flex-shrink: 0;
        }

        .merge-pair {
            background: rgba(255,255,255,0.5);
            border-radius: 8px;
            padding: 10px;
            margin-bottom: 8px;
        }

        .merge-pair:last-child {
            margin-bottom: 0;
        }

        .merge-names {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 8px;
            flex-wrap: wrap;
        }

        .merge-name {
            background: white;
            padding: 4px 10px;
            border-radius: 6px;
            font-weight: 500;
            font-size: 14px;
            cursor: pointer;
            transition: all 0.15s ease;
        }

        .merge-name:hover {
            transform: scale(1.05);
            box-shadow: 0 2px 8px rgba(0,0,0,0.2);
        }

        .merge-name-primary {
            font-weight: 700;
            border: 2px solid var(--ui-dark-blue);
        }

        .merge-name-secondary {
            opacity: 0.8;
            border: 2px solid transparent;
        }

        .merge-similarity {
            font-size: 11px;
            opacity: 0.8;
        }

        .merge-actions {
            display: flex;
            gap: 8px;
        }

        .merge-btn {
            flex: 1;
            padding: 6px 10px;
            border: none;
            border-radius: 6px;
            font-size: 12px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.15s ease;
        }

        .merge-btn:active {
            transform: scale(0.98);
        }

        .merge-btn-yes {
            background: var(--ui-dark-blue);
            color: white;
        }

        .merge-btn-no {
            background: rgba(0,0,0,0.1);
            color: var(--ui-dark-blue);
        }

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

        .mb-16 { margin-bottom: 16px; }
        .mb-24 { margin-bottom: 24px; }
        .mt-16 { margin-top: 16px; }
        .mt-24 { margin-top: 24px; }

        /* ========================================
           14. Mobile Responsive
           ======================================== */
        @media (max-width: 480px) {
            .wizard-card {
                padding: 20px 16px 32px;
            }

            .card-title {
                font-size: 24px;
            }

            .card-subtitle {
                font-size: 15px;
                margin-bottom: 24px;
            }

            .btn {
                min-height: 54px;
                font-size: 17px;
            }

            input[type="text"],
            input[type="number"],
            select,
            textarea {
                font-size: 16px;
            }

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

            .results-header {
                flex-direction: column;
                align-items: stretch;
            }

            .view-toggle {
                width: 100%;
                justify-content: center;
            }
        }

        /* ========================================
           15. Mobile Preview (Shift+M to toggle)
           ======================================== */
        /* Mobile preview frame */
        .mobile-preview-frame {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 375px;
            height: 812px;
            max-height: 90vh;
            background: var(--bg-primary);
            border-radius: 40px;
            box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
            overflow: hidden;
            z-index: 9998;
            display: none;
            border: 12px solid #1a1a1a;
        }

        .mobile-preview-frame.active {
            display: block;
        }

        .mobile-preview-frame iframe {
            width: 100%;
            height: 100%;
            border: none;
            border-radius: 28px;
        }

        .mobile-preview-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.6);
            z-index: 9997;
            display: none;
            backdrop-filter: blur(4px);
        }

        .mobile-preview-overlay.active {
            display: block;
        }

        .mobile-preview-close {
            position: fixed;
            top: 20px;
            right: 20px;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.9);
            border: none;
            cursor: pointer;
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 10000;
            font-size: 24px;
            color: #333;
        }

        .mobile-preview-close.active {
            display: flex;
        }

        /* Header Toggles (Theme + Language) */
        .theme-toggle {
            width: 26px;
            height: 26px;
            border-radius: 6px;
            background: rgba(255,255,255,0.15);
            border: none;
            color: var(--dept-text-color);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.15s ease;
        }

        .theme-toggle:hover {
            background: rgba(255,255,255,0.25);
        }

        .theme-toggle svg {
            width: 14px;
            height: 14px;
        }

        /* Show sun in dark mode, moon in light mode */
        .theme-icon-dark { display: block; }
        .theme-icon-light { display: none; }
        [data-theme="light"] .theme-icon-dark { display: none; }
        [data-theme="light"] .theme-icon-light { display: block; }

        /* Language Toggle (single button) */
        .lang-toggle-single {
            height: 26px;
            padding: 0 8px;
            border-radius: 6px;
            background: rgba(255,255,255,0.15);
            border: none;
            color: var(--dept-text-color);
            font-size: 11px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.15s ease;
        }

        .lang-toggle-single:hover {
            background: rgba(255,255,255,0.25);
        }

        /* ========================================
           Footer with Feedback & Language Toggle
           ======================================== */
        .app-footer {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            display: flex;
            justify-content: space-between;
            padding: 12px 20px;
            background: linear-gradient(to top, var(--bg-primary) 60%, transparent);
            pointer-events: none;
            z-index: 100;
        }

        .footer-btn {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 8px 16px;
            border-radius: 20px;
            background: var(--bg-secondary);
            border: 1px solid var(--separator);
            color: var(--text-secondary);
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.15s ease;
            pointer-events: auto;
            box-shadow: 0 2px 8px rgba(0,0,0,0.2);
        }

        .footer-btn:hover {
            color: var(--text-primary);
            background: var(--bg-tertiary);
            transform: translateY(-1px);
        }

        .footer-btn svg {
            opacity: 0.7;
        }

        /* Adjust for mobile - smaller footer */
        @media (max-width: 768px) {
            .app-footer {
                padding: 8px 16px;
            }

            .footer-btn {
                padding: 6px 12px;
                font-size: 12px;
            }

            .footer-btn svg {
                width: 14px;
                height: 14px;
            }
        }

        /* ========================================
           Feedback Modal
           ======================================== */
        .feedback-modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.7);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 1100;
            padding: 20px;
            backdrop-filter: blur(4px);
        }

        .feedback-modal-overlay.active {
            display: flex;
        }

        .feedback-modal {
            background: var(--bg-secondary, #0D1428);
            border-radius: 16px;
            max-width: 420px;
            width: 100%;
            padding: 24px;
            border: 1px solid var(--separator);
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
            max-height: 90vh;
            overflow-y: auto;
        }

        .feedback-modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 16px;
        }

        .feedback-modal-title {
            font-size: 18px;
            font-weight: 600;
            color: var(--text-primary, #ffffff);
        }

        .feedback-modal-close {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.1);
            border: none;
            color: var(--text-secondary);
            font-size: 18px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.15s ease;
        }

        .feedback-modal-close:hover {
            background: rgba(255, 255, 255, 0.2);
        }

        .feedback-context {
            background: var(--bg-tertiary);
            border-radius: 8px;
            padding: 12px;
            margin-bottom: 16px;
            font-size: 12px;
            color: var(--text-secondary);
        }

        .feedback-context-title {
            font-weight: 600;
            margin-bottom: 6px;
            color: var(--text-primary);
            font-size: 13px;
        }

        .feedback-context-item {
            display: flex;
            gap: 8px;
            margin-bottom: 4px;
        }

        .feedback-context-label {
            opacity: 0.7;
            min-width: 70px;
        }

        .feedback-textarea {
            width: 100%;
            min-height: 120px;
            padding: 12px;
            border-radius: 8px;
            border: 1px solid var(--separator);
            background: var(--bg-tertiary);
            color: var(--text-primary);
            font-family: inherit;
            font-size: 14px;
            resize: vertical;
            margin-bottom: 16px;
        }

        .feedback-textarea:focus {
            outline: none;
            border-color: var(--accent-blue, #3B82F6);
        }

        .feedback-textarea::placeholder {
            color: var(--text-tertiary);
        }

        .feedback-actions {
            display: flex;
            gap: 12px;
            justify-content: flex-end;
        }

        .feedback-btn {
            padding: 10px 20px;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.15s ease;
        }

        .feedback-btn-cancel {
            background: transparent;
            border: 1px solid var(--separator);
            color: var(--text-secondary);
        }

        .feedback-btn-cancel:hover {
            background: var(--bg-tertiary);
            color: var(--text-primary);
        }

        .feedback-btn-submit {
            background: var(--accent-blue, #3B82F6);
            border: none;
            color: white;
        }

        .feedback-btn-submit:hover {
            background: #2563EB;
        }

        .feedback-btn-submit:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .feedback-status {
            text-align: center;
            padding: 8px;
            border-radius: 6px;
            font-size: 13px;
            margin-top: 12px;
        }

        .feedback-status-success {
            background: rgba(34, 197, 94, 0.1);
            color: #22C55E;
        }

        .feedback-status-error {
            background: rgba(239, 68, 68, 0.1);
            color: #EF4444;
        }

        .feedback-status-loading {
            color: var(--text-secondary);
        }

        /* ========================================
           Email Form Styles
           ======================================== */
        .email-form-container {
            background: var(--bg-tertiary);
            border-radius: 12px;
            padding: 16px;
            border: 1px solid var(--separator);
        }

        .email-label {
            display: block;
            font-size: 13px;
            font-weight: 500;
            color: var(--text-secondary);
            margin-bottom: 8px;
        }

        .email-input-row {
            display: flex;
            gap: 8px;
        }

        .email-input {
            flex: 1;
            height: 44px;
            padding: 0 14px;
            border-radius: 10px;
            border: 1px solid var(--separator);
            background: var(--bg-secondary);
            color: var(--text-primary);
            font-size: 15px;
            outline: none;
            transition: border-color 0.15s ease, box-shadow 0.15s ease;
        }

        .email-input:focus {
            border-color: var(--accent);
            box-shadow: 0 0 0 3px rgba(5, 178, 252, 0.15);
        }

        .email-input::placeholder {
            color: var(--text-tertiary);
        }

        .email-input-row .btn {
            height: 44px;
            padding: 0 16px;
            white-space: nowrap;
        }

        .email-input-row .btn svg {
            width: 18px;
            height: 18px;
        }

        .email-status {
            margin-top: 10px;
            padding: 10px 12px;
            border-radius: 8px;
            font-size: 13px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .email-status-loading {
            background: rgba(5, 178, 252, 0.1);
            color: var(--accent);
        }

        .email-status-loading::before {
            content: '';
            width: 14px;
            height: 14px;
            border: 2px solid currentColor;
            border-top-color: transparent;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }

        .email-status-success {
            background: rgba(99, 222, 157, 0.15);
            color: #63DE9D;
        }

        .email-status-success::before {
            content: '✓';
            font-weight: bold;
        }

        .email-status-error {
            background: rgba(239, 108, 108, 0.15);
            color: #EF6C6C;
        }

        .email-status-error::before {
            content: '✕';
            font-weight: bold;
        }

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

        /* Mobile adjustments for email form */
        @media (max-width: 480px) {
            .email-input-row {
                flex-direction: column;
            }

            .email-input-row .btn {
                width: 100%;
                justify-content: center;
            }
        }
