        * { margin: 0; padding: 0; box-sizing: border-box; }
        body {
            font-family: 'Segoe UI', system-ui, sans-serif;
            background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
            color: #e2e8f0;
            min-height: 100vh;
            padding: 2rem;
            padding-top: max(80px, calc(60px + env(safe-area-inset-top)));
            /* Safe Area Insets for iPhone Notch/Home Indicator */
            padding-left: max(2rem, env(safe-area-inset-left));
            padding-right: max(2rem, env(safe-area-inset-right));
            padding-bottom: max(2rem, env(safe-area-inset-bottom));
        }
        
        /* Light Theme */
        body[data-theme="light"] {
            background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
            color: #1e293b;
        }

        body[data-theme="light"] .hierarchy-level,
        body[data-theme="light"] .card,
        body[data-theme="light"] .agent-card,
        body[data-theme="light"] .nav-container,
        body[data-theme="light"] .calisthenics-section,
        body[data-theme="light"] .workout-card,
        body[data-theme="light"] .calendar-day,
        body[data-theme="light"] .calendar-day.today,
        body[data-theme="light"] .calendar-day.current-workout {
            background: #ffffff;
            border: 1px solid #cbd5e1;
        }

        body[data-theme="light"] .card:hover,
        body[data-theme="light"] .agent-card:hover,
        body[data-theme="light"] .workout-card:hover {
            border-color: #94a3b8;
            box-shadow: 0 4px 12px rgba(0,0,0,0.08);
        }

        body[data-theme="light"] .subtitle { color: #64748b; }
        body[data-theme="light"] h1 { background: linear-gradient(90deg, #0284c7, #6366f1); -webkit-background-clip: text; }
        body[data-theme="light"] .agent-name { color: #1e293b; }
        body[data-theme="light"] .agent-role { color: #6366f1; }
        body[data-theme="light"] .level-label { color: #64748b; background: #f1f5f9; }
        body[data-theme="light"] .task-container { background: #f1f5f9; }
        body[data-theme="light"] .task-text { color: #334155; }
        body[data-theme="light"] .task-text.idle { color: #94a3b8; }
        body[data-theme="light"] .task-label { color: #94a3b8; }

        /* Home Agent Cards: light-mode contrast & hierarchy polish only */
        body[data-theme="light"] #page-home .hierarchy-container .agent-card {
            background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
            border: 1px solid #b8c5d6;
            box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
        }
        body[data-theme="light"] #page-home .hierarchy-container .agent-card:hover {
            border-color: #94a3b8;
            box-shadow: 0 8px 20px rgba(15, 23, 42, 0.10);
        }
        body[data-theme="light"] #page-home .hierarchy-container .agent-name {
            color: #0f172a;
            font-weight: 700;
        }
        body[data-theme="light"] #page-home .hierarchy-container .agent-role {
            color: #4f46e5;
            font-weight: 600;
        }
        body[data-theme="light"] #page-home .hierarchy-container .status-text {
            color: #334155;
            font-weight: 600;
            letter-spacing: 0.01em;
        }
        body[data-theme="light"] #page-home .hierarchy-container .status-text.status-idle {
            color: #475569;
        }
        body[data-theme="light"] #page-home .hierarchy-container .click-hint {
            color: #64748b;
            font-weight: 500;
        }
        body[data-theme="light"] #page-home .hierarchy-container .task-container {
            background: #eaf1f8;
            border: 1px solid #cbd5e1;
        }
        body[data-theme="light"] #page-home .hierarchy-container .task-label {
            color: #475569;
            font-weight: 700;
            letter-spacing: 0.06em;
        }
        body[data-theme="light"] #page-home .hierarchy-container .task-text {
            color: #1e293b;
            font-weight: 500;
            line-height: 1.45;
        }
        body[data-theme="light"] #page-home .hierarchy-container .task-title {
            color: #0f172a;
            font-weight: 700;
        }
        body[data-theme="light"] #page-home .hierarchy-container .task-bullets li {
            color: #475569;
            font-weight: 500;
        }
        body[data-theme="light"] #page-home .hierarchy-container .task-details-compact summary {
            color: #0369a1;
            font-weight: 700;
        }
        body[data-theme="light"] #page-home .hierarchy-container .task-details-content {
            background: #f8fafc;
            border-color: #cbd5e1;
        }
        body[data-theme="light"] #page-home .hierarchy-container .task-details-label {
            color: #64748b;
        }
        body[data-theme="light"] #page-home .hierarchy-container .task-details-text {
            color: #334155;
        }
        body[data-theme="light"] #page-home .hierarchy-container .task-text.idle {
            color: #64748b;
            font-style: italic;
        }
        body[data-theme="light"] #page-home .hierarchy-container .task-text.delegation {
            color: #1d4ed8;
            font-weight: 600;
        }
        body[data-theme="light"] #page-home .hierarchy-container .model-badge-card {
            background: #e2e8f0;
            border: 1px solid #cbd5e1;
            color: #334155;
            font-weight: 600;
        }
        body[data-theme="light"] #page-home .hierarchy-container .live-timer-container {
            margin-top: 0.6rem;
            display: inline-flex;
            align-items: center;
            gap: 0.45rem;
            padding: 0.28rem 0.62rem;
            border-radius: 9999px;
            background: #ecfeff;
            border: 1px solid #a5f3fc;
        }
        body[data-theme="light"] #page-home .hierarchy-container .live-timer-container .live-badge-text {
            color: #0f766e;
            font-size: 0.7rem;
            font-weight: 800;
            letter-spacing: 0.06em;
        }
        body[data-theme="light"] #page-home .hierarchy-container .live-timer-container .live-timer {
            color: #134e4a;
            font-size: 0.78rem;
            font-weight: 700;
            margin-left: 0.2rem;
        }
        body[data-theme="light"] #page-home .hierarchy-container .live-timer-container .live-pulse-dot {
            width: 7px;
            height: 7px;
            box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.30);
            background: #0f766e;
        }
        /* Priority contrast pass: delegation hierarchy in light mode */
        body[data-theme="light"] #page-home .hierarchy-container .delegation-flow-card {
            background: linear-gradient(90deg, #e0f2fe 0%, #dbeafe 100%);
            border: 1px solid #93c5fd;
            box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
        }
        body[data-theme="light"] #page-home .hierarchy-container .delegation-flow-card .flow-icon {
            filter: saturate(1.05) contrast(1.05);
        }
        body[data-theme="light"] #page-home .hierarchy-container .delegation-flow-card .flow-name {
            color: #0f172a;
            font-weight: 700;
        }
        body[data-theme="light"] #page-home .hierarchy-container .delegation-flow-card .flow-arrow {
            color: #0369a1;
            font-weight: 800;
        }
        body[data-theme="light"] #page-home .hierarchy-container .delegation-flow-card .flow-dots span {
            background: #0284c7;
            opacity: 0.95;
        }
        body[data-theme="light"] #page-home .hierarchy-container .delegation-timer {
            color: #0f172a;
            background: #ffffff;
            border: 1px solid #94a3b8;
            font-weight: 700;
        }
        body[data-theme="light"] #page-home .hierarchy-container .live-timer-container {
            background: #ecfeff;
            border: 1px solid #0ea5e9;
        }
        body[data-theme="light"] #page-home .hierarchy-container .live-timer-container .live-badge-text {
            color: #115e59;
        }
        body[data-theme="light"] #page-home .hierarchy-container .live-timer-container .live-timer {
            color: #0f172a;
            font-weight: 800;
        }
        body[data-theme="light"] .metric-label { color: #64748b; }
        body[data-theme="light"] .metric-value { color: #1e293b; }
        body[data-theme="light"] .card h2 { color: #0284c7; }
        body[data-theme="light"] .activity-log { background: #f1f5f9; }
        body[data-theme="light"] .activity-item { border-color: #e2e8f0; }
        body[data-theme="light"] .timestamp { color: #0284c7; }
        body[data-theme="light"] footer { color: #64748b; }
        body[data-theme="light"] #jokeDisplay { background: #f1f5f9; color: #334155; }
        body[data-theme="light"] #jokeBtn,
        body[data-theme="light"] .live-badge {
            background: #0284c720;
            border-color: #0284c740;
            color: #0284c7;
        }
        body[data-theme="light"] #jokeBtn:hover { background: #0284c730; }
        body[data-theme="light"] .progress-bar { background: #e2e8f0; }
        body[data-theme="light"] .modal-content { background: #ffffff; }
        body[data-theme="light"] .modal-header { border-color: #e2e8f0; }
        body[data-theme="light"] .history-item { background: #f8fafc; border-color: #e2e8f0; }
        body[data-theme="light"] .history-time { color: #64748b; }
        body[data-theme="light"] .close-btn { color: #64748b; }
        body[data-theme="light"] .settings-dropdown { background: #ffffff; border-color: #e2e8f0; }
        body[data-theme="light"] .settings-divider { border-color: #e2e8f0; }
        body[data-theme="light"] .nav-tab { color: #64748b; }
        body[data-theme="light"] .nav-tab.active { color: #0284c7; border-color: #0284c7; }
        body[data-theme="light"] .nav-tab:hover { color: #334155; }
        body[data-theme="light"] .exercise-item { background: #f8fafc; border-color: #e2e8f0; }
        body[data-theme="light"] .week-header { background: #f1f5f9; }
        body[data-theme="light"] .calendar-day.rest-day { background: #f3f4f6; } /* Light gray */
        body[data-theme="light"] .calendar-day.deload { background: #fefce8; }
        body[data-theme="light"] .section-title { color: #1e293b; }
        body[data-theme="light"] .workout-type { color: #64748b; }
        body[data-theme="light"] .exercise-name { color: #1e293b; }
        body[data-theme="light"] .exercise-sets { color: #0284c7; }
        
        /* Additional Light-Mode fixes for better contrast */
        body[data-theme="light"] .modal-title h2 { color: #1e293b; }
        body[data-theme="light"] .modal-title .role { color: #0284c7; }
        body[data-theme="light"] .current-task { color: #334155; }
        body[data-theme="light"] .current-task.idle { color: #64748b; }
        body[data-theme="light"] .history-task { color: #334155; }
        body[data-theme="light"] .status-badge.working { background: #fbbf2420; color: #b45309; }
        body[data-theme="light"] .status-badge.idle { background: #f1f5f9; color: #64748b; }
        body[data-theme="light"] .workout-description { color: #475569; }
        body[data-theme="light"] .calendar-day-workout { color: #475569; }
        body[data-theme="light"] .setting-label { color: #475569; }
        body[data-theme="light"] .close-btn:hover { background: #f1f5f9; color: #1e293b; }
        body[data-theme="light"] .day-exercises { color: #475569; }
        body[data-theme="light"] .no-history { color: #64748b; }
        body[data-theme="light"] .legend-item { color: #475569; }
        body[data-theme="light"] .full-plan-subtitle { color: #64748b !important; }
        body[data-theme="light"] .week-expand-icon { color: #64748b; }
        body[data-theme="light"] .exercise-muscles { color: #64748b; }
        body[data-theme="light"] .setting-input { background: #f8fafc; border-color: #cbd5e1; color: #1e293b; }
        body[data-theme="light"] .setting-input::placeholder { color: #94a3b8; }
        body[data-theme="light"] .setting-input:focus { border-color: #0284c7; }
        body[data-theme="light"] .setting-btn { background: #0284c720; border-color: #0284c740; color: #0284c7; }
        body[data-theme="light"] .setting-btn:hover { background: #0284c730; border-color: #0284c760; }
        body[data-theme="light"] .cycle-stat-label { color: #64748b; }
        body[data-theme="light"] .cycle-stat-value { color: #0284c7; }
        body[data-theme="light"] .cycle-info { background: #f1f5f9; }
        
        /* Light-Mode for workout modal */
        body[data-theme="light"] #workoutModal .modal-content { background: #ffffff; }
        body[data-theme="light"] #workoutModal .modal-header { border-color: #e2e8f0; }
        body[data-theme="light"] #workoutModal .modal-title h2 { color: #1e293b; }
        body[data-theme="light"] #workoutModal .modal-title .role { color: #64748b; }
        body[data-theme="light"] #workoutModal .modal-body { background: #ffffff; }
        body[data-theme="light"] #workoutModal .close-btn { color: #64748b; }
        body[data-theme="light"] #workoutModal .close-btn:hover { background: #f1f5f9; color: #1e293b; }
        
        /* Light-Mode for workout badges - better contrast */
        body[data-theme="light"] .workout-badge.pull { background: #6366f120; color: #4f46e5; border-color: #6366f140; }
        body[data-theme="light"] .workout-badge.push { background: #ec489920; color: #db2777; border-color: #ec489940; }
        body[data-theme="light"] .workout-badge.rest { background: #6b728020; color: #6b7280; border-color: #6b728040; }
        body[data-theme="light"] .workout-badge.deload { background: #f59e0b20; color: #d97706; border-color: #f59e0b40; }
        
        /* Light-Mode for exercise icons */
        body[data-theme="light"] .exercise-icon { background: #f1f5f9; }
        body[data-theme="light"] .exercise-icon.pull { background: #6366f120; }
        body[data-theme="light"] .exercise-icon.push { background: #ec489920; }
        body[data-theme="light"] .exercise-icon.rest { background: #6b728020; }
        
        /* Light-Mode for exercise sets badge */
        body[data-theme="light"] .exercise-sets { background: #0284c720; }
        
        /* Light-Mode for day type badges */
        body[data-theme="light"] .day-type-badge.pull { background: #6366f120; color: #4f46e5; }
        body[data-theme="light"] .day-type-badge.push { background: #ec489920; color: #db2777; }
        body[data-theme="light"] .day-type-badge.rest { background: #6b728020; color: #6b7280; }
        
        /* Light-Mode for week type badges */
        body[data-theme="light"] .week-type.normal { background: #0284c720; color: #0369a1; }
        body[data-theme="light"] .week-type.deload { background: #f59e0b20; color: #d97706; }
        
        /* Light-Mode for calendar navigation */
        body[data-theme="light"] .calendar-nav-btn { background: #f8fafc; border-color: #e2e8f0; color: #475569; }
        body[data-theme="light"] .calendar-nav-btn:hover { background: #f1f5f9; color: #1e293b; border-color: #cbd5e1; }
        
        /* Light-Mode for today section */
        body[data-theme="light"] .today-workout { border-left-color: #22c55e; }
        body[data-theme="light"] .today-workout.rest-day { border-left-color: #f59e0b; }
        
        /* Light-Mode for selected workout section */
        body[data-theme="light"] .selected-workout { border-left-color: #0284c7; }
        
        /* Light-Mode for agent modal - critical fix */
        body[data-theme="light"] #agentModal .modal-content { background: #ffffff; }
        body[data-theme="light"] #agentModal .modal-header { border-color: #e2e8f0; background: #ffffff; }
        body[data-theme="light"] #agentModal .modal-title h2 { color: #1e293b; }
        body[data-theme="light"] #agentModal .modal-title .role { color: #0284c7; }
        body[data-theme="light"] #agentModal .modal-body { background: #ffffff; }
        body[data-theme="light"] #agentModal .section-title { color: #475569; }
        body[data-theme="light"] #agentModal .current-status { background: #f8fafc; }
        body[data-theme="light"] #agentModal .current-task { color: #334155; }
        body[data-theme="light"] #agentModal .current-task.idle { color: #64748b; }
        body[data-theme="light"] #agentModal .history-item { background: #f8fafc; border-color: #e2e8f0; }
        body[data-theme="light"] #agentModal .history-time { color: #64748b; }
        body[data-theme="light"] #agentModal .history-task { color: #334155; }
        body[data-theme="light"] #agentModal .modal-icon { background: #f1f5f9; }
        body[data-theme="light"] #agentModal .close-btn { color: #64748b; }
        body[data-theme="light"] #agentModal .close-btn:hover { background: #f1f5f9; color: #1e293b; }
        
        /* Light-Mode status badges in modal */
        body[data-theme="light"] #agentModal .status-badge.working { background: #fef3c7; color: #b45309; }
        body[data-theme="light"] #agentModal .status-badge.idle { background: #f1f5f9; color: #64748b; }
        body[data-theme="light"] #agentModal .model-section { border-top-color: #e2e8f0; }
        body[data-theme="light"] #agentModal .model-label { color: #64748b; }
        body[data-theme="light"] #agentModal .model-value { color: #1e293b; }
        body[data-theme="light"] #agentModal .model-badge { background: #e0f2fe; color: #0284c7; }
        body[data-theme="light"] #agentModal .model-select { background: #f8fafc; border-color: #e2e8f0; color: #1e293b; }
        body[data-theme="light"] #agentModal .model-select:hover { border-color: #38bdf8; }
        body[data-theme="light"] #agentModal .model-feedback.success { background: #dcfce7; color: #16a34a; border-color: #22c55e40; }
        body[data-theme="light"] #agentModal .model-feedback.error { background: #fee2e2; color: #dc2626; border-color: #ef444440; }
        
        /* Light-Mode for modal overlay */
        body[data-theme="light"] .modal-overlay { background: rgba(0, 0, 0, 0.5); }
        
        /* Light-Mode for current status section */
        body[data-theme="light"] .status-section .section-title { color: #475569; }
        body[data-theme="light"] .current-status { background: #f8fafc; }
        
        /* Light-Mode for day card exercises text */
        body[data-theme="light"] .day-card { background: #f8fafc; border-color: #e2e8f0; }
        body[data-theme="light"] .day-card:hover { border-color: #cbd5e1; }
        body[data-theme="light"] .day-card.current-day { background: #22c55e15; border-color: #22c55e; }
        
        /* Light-Mode progress bar */
        body[data-theme="light"] .progress-fill { background: linear-gradient(90deg, #0284c7, #6366f1); }
        
        /* Light-Mode joke display */
        body[data-theme="light"] #jokeDisplay { background: #f8fafc; color: #334155; }
        
        /* Light-Mode joke button */
        body[data-theme="light"] #jokeBtn { background: #0284c720; border-color: #0284c740; color: #0284c7; }
        body[data-theme="light"] #jokeBtn:hover { background: #0284c730; border-color: #0284c760; }
        
        /* Light-Mode for full plan section */
        body[data-theme="light"] .full-plan { background: transparent; }
        body[data-theme="light"] .week-header { background: #f8fafc; border: 1px solid #e2e8f0; }
        body[data-theme="light"] .week-header:hover { background: #f1f5f9; }
        body[data-theme="light"] .week-header.current-week { background: #22c55e15; border-color: #22c55e40; }
        body[data-theme="light"] .week-number { color: #0284c7; }
        body[data-theme="light"] .week-content { background: transparent; }
        body[data-theme="light"] .week-days { background: transparent; }
        
        /* Light-Mode for settings dropdown text colors */
        body[data-theme="light"] .settings-label { color: #475569; }
        body[data-theme="light"] .lang-btn { color: #64748b; }
        body[data-theme="light"] .theme-btn { color: #64748b; }
        
        /* Light-Mode for calendar day hover */
        body[data-theme="light"] .calendar-day:hover { 
            background: #f8fafc; 
            border-color: #0284c7; 
            box-shadow: 0 4px 12px rgba(2, 132, 199, 0.15);
        }
        body[data-theme="light"] .calendar-day.selected { 
            background: #0284c715; 
            border-color: #0284c7; 
            box-shadow: 0 0 16px rgba(2, 132, 199, 0.2);
        }
        
        /* Light-Mode for calendar weekday header */
        body[data-theme="light"] .calendar-weekday { color: #64748b; }
        
        /* Light-Mode for calendar day workout text */
        body[data-theme="light"] .calendar-day.rest-day .calendar-day-workout { color: #6b7280; }
        body[data-theme="light"] .calendar-day.deload .calendar-day-workout { color: #d97706; }
        body[data-theme="light"] .calendar-day.front-lever .calendar-day-workout { color: #4f46e5; }
        body[data-theme="light"] .calendar-day.planche .calendar-day-workout { color: #db2777; }
        
        .container {
            max-width: 1400px;
            margin: 0 auto;
        }
        
        /* ========================================
           NAVIGATION
           ======================================== */
        .nav-container {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            z-index: 1000;
            background: #1e293bee;
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border-bottom: 1px solid #ffffff10;
            padding: 0.75rem 2rem;
            /* Safe area for notch */
            padding-top: max(0.75rem, env(safe-area-inset-top));
            padding-left: max(2rem, env(safe-area-inset-left));
            padding-right: max(2rem, env(safe-area-inset-right));
        }
        
        body[data-theme="light"] .nav-container {
            background: #ffffffee;
            border-color: #e2e8f0;
        }
        
        .nav-content {
            max-width: 1400px;
            margin: 0 auto;
            display: flex;
            align-items: center;
            justify-content: flex-start;
            gap: 1rem;
        }
        
        .nav-brand {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            font-size: 1.25rem;
            font-weight: 600;
            color: #fff;
            flex-shrink: 0;
            background: transparent;
            border: 0;
            padding: 0;
            cursor: pointer;
        }

        .nav-brand:focus-visible {
            outline: 2px solid #38bdf8;
            outline-offset: 6px;
            border-radius: 8px;
        }
        
        body[data-theme="light"] .nav-brand {
            color: #1e293b;
        }
        
        .nav-brand-icon {
            font-size: 1.5rem;
        }
        
        .nav-tabs {
            display: flex;
            gap: 0.25rem;
            flex: 1;
            justify-content: center;
        }
        
        .nav-tab {
            padding: 0.6rem 1.25rem;
            border-radius: 8px;
            cursor: pointer;
            font-weight: 500;
            color: #94a3b8;
            transition: all 0.2s ease;
            border: 2px solid transparent;
            background: transparent;
            min-height: 44px;
            display: flex;
            align-items: center;
            -webkit-tap-highlight-color: transparent;
        }
        
        .nav-tab:hover {
            color: #e2e8f0;
            background: #ffffff10;
        }
        
        .nav-tab.active {
            color: #38bdf8;
            border-color: #38bdf8;
            background: #38bdf820;
        }
        
        body[data-theme="light"] .nav-container {
            background: #ffffffee;
            border-color: #e2e8f0;
        }
        
        body[data-theme="light"] .nav-brand {
            color: #1e293b;
        }
        
        body[data-theme="light"] .nav-tab {
            color: #64748b;
        }
        
        body[data-theme="light"] .nav-tab:hover {
            color: #334155;
        }
        
        body[data-theme="light"] .nav-tab.active {
            color: #0284c7;
            border-color: #0284c7;
        }
        
        .nav-right {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            flex-shrink: 0;
        }
        
        /* Page visibility */
        .page {
            display: none;
        }
        
        .page.active {
            display: block;
        }
        
        header {
            text-align: center;
            margin-bottom: 2rem;
            padding-top: 0.5rem;
        }
        
        /* Settings Button - Integrated in Navigation */
        .settings-container {
            position: relative;
            margin-left: auto;
        }

        .settings-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 44px;
            height: 44px;
            min-width: 44px;
            min-height: 44px;
            background: #ffffff10;
            border: 1px solid #ffffff20;
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.2s ease;
            font-size: 1.2rem;
            color: #94a3b8;
            -webkit-tap-highlight-color: transparent;
            -webkit-touch-callout: none;
            touch-action: manipulation;
        }
        .settings-btn:hover {
            background: #ffffff20;
            color: #e2e8f0;
            border-color: #ffffff30;
        }
        .settings-btn:active {
            transform: scale(0.95);
            background: #ffffff30;
        }
        body[data-theme="light"] .settings-btn {
            background: #ffffff;
            border-color: #e2e8f0;
            color: #64748b;
            box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        }
        body[data-theme="light"] .settings-btn:hover {
            background: #f8fafc;
            color: #334155;
            border-color: #cbd5e1;
        }
        
        /* Dropdown Menu */
        .settings-dropdown {
            position: absolute;
            top: calc(100% + 8px);
            right: 0;
            min-width: 200px;
            background: #1e293b;
            border: 1px solid #ffffff20;
            border-radius: 12px;
            padding: 0.75rem;
            backdrop-filter: blur(10px);
            box-shadow: 0 8px 24px rgba(0,0,0,0.3);
            opacity: 0;
            visibility: hidden;
            transform: translateY(-8px);
            transition: all 0.2s ease;
            /* Fix for mobile - ensure it stays in viewport */
            max-height: 80vh;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
        }
        .settings-dropdown.active {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }
        body[data-theme="light"] .settings-dropdown {
            background: #ffffff;
            border-color: #e2e8f0;
        }
        
        .settings-section {
            margin-bottom: 0.75rem;
        }
        .settings-section:last-child {
            margin-bottom: 0;
        }
        
        .settings-label {
            font-size: 0.65rem;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: #64748b;
            padding: 0 0.25rem;
            margin-bottom: 0.35rem;
            font-weight: 600;
        }
        
        .settings-divider {
            height: 1px;
            background: #ffffff15;
            margin: 0.75rem 0;
        }
        body[data-theme="light"] .settings-divider {
            background: #e2e8f0;
        }
        
        .settings-options {
            display: flex;
            gap: 0.25rem;
        }
        
        .lang-btn, .theme-btn {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0.5rem 0.6rem;
            background: transparent;
            border: 1px solid transparent;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.15s ease;
            font-size: 0.85rem;
            font-weight: 500;
            color: #94a3b8;
            white-space: nowrap;
        }
        .lang-btn:hover, .theme-btn:hover {
            background: #ffffff10;
            color: #e2e8f0;
        }
        body[data-theme="light"] .lang-btn:hover,
        body[data-theme="light"] .theme-btn:hover {
            background: #f1f5f9;
            color: #334155;
        }
        .lang-btn.active, .theme-btn.active {
            background: #38bdf8;
            border-color: #38bdf8;
            color: #0f172a;
            font-weight: 600;
        }
        body[data-theme="light"] .lang-btn.active,
        body[data-theme="light"] .theme-btn.active {
            background: #0284c7;
            border-color: #0284c7;
            color: #ffffff;
        }
        
        h1 {
            font-size: 2.5rem;
            background: linear-gradient(90deg, #38bdf8, #818cf8);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            margin-bottom: 0.5rem;
        }
        .subtitle {
            color: #94a3b8;
            font-size: 1.1rem;
            margin-bottom: 1rem;
        }
        
        /* Hierarchy Layout */
        .hierarchy-container {
            display: flex;
            flex-direction: column;
            gap: 2rem;
            margin-bottom: 2rem;
            contain: layout;
        }
        
        .hierarchy-level {
            background: #ffffff05;
            border-radius: 16px;
            padding: 1.5rem;
            border: 1px solid #ffffff10;
            backdrop-filter: blur(10px);
        }
        
        .level-label {
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: #64748b;
            margin-bottom: 1rem;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        .level-label::before {
            content: '';
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: currentColor;
        }
        
        /* Level 1 - Management (single) */
        .level-1 .agents-row {
            display: flex;
            justify-content: center;
        }
        
        /* Level 2 - Dev Team (side by side) */
        .level-2 .agents-row {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 1.5rem;
        }
        
        /* Level 3 - Specialists (side by side) */
        .level-3 .agents-row {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 1.5rem;
        }
        
        /* Agent Card */
        .agent-card {
            background: #ffffff05;
            border-radius: 12px;
            padding: 1.25rem;
            border: 1px solid #ffffff10;
            transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
            position: relative;
            overflow: hidden;
            cursor: pointer;
            contain: layout paint;
            isolation: isolate;
            min-height: 190px;
        }
        .agent-card:hover { 
            transform: translateY(-4px);
            border-color: #ffffff30;
            box-shadow: 0 8px 24px rgba(0,0,0,0.3);
        }
        .agent-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: var(--agent-color, #38bdf8);
            opacity: 0.8;
        }
        .agent-card.idle::before { opacity: 0.3; }
        .agent-card.working::before { 
            animation: colorPulse 2s infinite;
        }
        
        @keyframes colorPulse {
            0%, 100% { opacity: 0.8; }
            50% { opacity: 0.4; }
        }
        
        .agent-header {
            display: flex;
            align-items: center;
            gap: 1rem;
            margin-bottom: 0.75rem;
        }
        .agent-icon {
            font-size: 2.5rem;
            background: #ffffff10;
            border-radius: 12px;
            padding: 0.5rem;
            min-width: 60px;
            text-align: center;
        }
        .agent-info h3 {
            font-size: 1.15rem;
            color: #fff;
            margin-bottom: 0.2rem;
        }
        .agent-name {
            font-size: 1.15rem;
            color: #fff;
            margin-bottom: 0.2rem;
        }
        .agent-role {
            color: #38bdf8;
            font-size: 0.8rem;
            font-weight: 500;
        }
        
        /* Status Badge */
        .status-container {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            margin-bottom: 0.75rem;
        }
        .status-indicator {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #22c55e;
            animation: pulse 2s infinite;
        }
        .status-indicator.idle {
            background: #94a3b8;
            animation: none;
        }
        .status-indicator.working {
            background: #fbbf24;
        }
        @keyframes pulse {
            0%, 100% { opacity: 1; transform: scale(1); }
            50% { opacity: 0.7; transform: scale(0.9); }
        }
        .status-text {
            font-size: 0.8rem;
            font-weight: 500;
        }
        .status-text.idle { color: #94a3b8; }
        .status-text.working { color: #fbbf24; }
        
        /* Current Task */
        .task-container {
            background: #00000020;
            border-radius: 8px;
            padding: 0.75rem;
            min-height: 48px;
        }
        .task-label {
            font-size: 0.7rem;
            color: #64748b;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            margin-bottom: 0.4rem;
        }
        .task-text {
            color: #e2e8f0;
            font-size: 0.9rem;
        }
        .task-title {
            font-size: 0.9rem;
            font-weight: 650;
            line-height: 1.35;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .task-bullets {
            margin: 0.35rem 0 0;
            padding-left: 1rem;
            display: grid;
            gap: 0.2rem;
        }
        .task-bullets li {
            font-size: 0.79rem;
            line-height: 1.3;
            color: #94a3b8;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .task-details-compact {
            margin-top: 0.35rem;
        }
        .task-details-compact summary {
            font-size: 0.74rem;
            color: #38bdf8;
            font-weight: 600;
            cursor: pointer;
            list-style: none;
            user-select: none;
        }
        .task-details-compact summary::-webkit-details-marker { display: none; }
        .task-details-content {
            margin-top: 0.35rem;
            padding: 0.45rem 0.55rem;
            border-radius: 6px;
            background: #0000001a;
            border: 1px solid #ffffff14;
        }
        .task-details-label {
            font-size: 0.68rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: #94a3b8;
            margin-bottom: 0.2rem;
        }
        .task-details-text {
            font-size: 0.78rem;
            color: #cbd5e1;
            line-height: 1.35;
            max-height: 6.5em;
            overflow: auto;
        }
        .task-text.idle {
            color: #64748b;
            font-style: italic;
        }
        
        /* Delegation Task - Blue highlight for Rodrigo's delegations */
        .task-text.delegation {
            color: #3bdf6;
            font-weight: 500;
        }
        
        body[data-theme="light"] .task-text.delegation {
            color: #2563eb;
        }
        
        /* Live Activity Progress Bar */
        .agent-progress {
            margin-top: 0.75rem;
            padding: 0 0.25rem;
        }
        .agent-progress-bar {
            height: 6px;
            background: #334155;
            border-radius: 3px;
            overflow: hidden;
        }
        .agent-progress-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--agent-color), #22c55e);
            border-radius: 3px;
            transition: width 0.5s ease;
        }
        .agent-progress-text {
            text-align: right;
            font-size: 0.7rem;
            color: #64748b;
            margin-top: 0.25rem;
        }
        
        /* Pulsing Status Animation */
        @keyframes pulse-working {
            0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--agent-color); }
            50% { opacity: 0.8; box-shadow: 0 0 0 4px var(--agent-color); }
        }
        .status-indicator.working {
            animation: pulse-working 1.5s ease-in-out infinite;
        }
        
        /* ========================================
           LIVE AGENT CARD STATUS STYLES
           ======================================== */
        
        /* Status-based card colors */
        .agent-card.status-idle {
            border-color: #33415540;
        }
        .agent-card.status-working {
            border-color: #22c55e55;
            box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.12);
        }
        .agent-card.status-error {
            border-color: #ef444480;
        }
        
        @keyframes cardPulse {
            0%, 100% { 
                box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
                border-color: #22c55e40;
            }
            50% { 
                box-shadow: 0 0 20px 5px rgba(34, 197, 94, 0.15);
                border-color: #22c55e80;
            }
        }
        
        /* Live Indicator Dot */
        .live-dot-container {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
        }
        .live-pulse-dot {
            width: 8px;
            height: 8px;
            background: #22c55e;
            border-radius: 50%;
            animation: liveDotPulse 1.5s ease-in-out infinite;
            box-shadow: 0 0 8px #22c55e;
        }
        .live-badge-text {
            font-size: 0.65rem;
            font-weight: 700;
            color: #22c55e;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }
        .live-timer {
            font-size: 0.7rem;
            color: #64748b;
            margin-left: 0.5rem;
        }
        @keyframes liveDotPulse {
            0%, 100% { transform: scale(1); opacity: 1; }
            50% { transform: scale(1.3); opacity: 0.7; }
        }
        
        /* Status Working Animation */
        .status-indicator.status-working {
            background: #22c55e;
            animation: pulse-working 1s ease-in-out infinite;
            box-shadow: 0 0 8px #22c55e;
        }
        .status-indicator.status-idle {
            background: #64748b;
            animation: none;
            box-shadow: none;
        }
        .status-indicator.status-error {
            background: #ef4444;
            animation: none;
            box-shadow: 0 0 8px #ef444480;
        }
        
        /* Status Badge Live */
        .status-badge-live {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            padding: 0.25rem 0.6rem;
            border-radius: 9999px;
            font-size: 0.75rem;
            font-weight: 600;
            background: #22c55e20;
            color: #22c55e;
        }
        .status-badge-live::before {
            content: '';
            width: 6px;
            height: 6px;
            background: currentColor;
            border-radius: 50%;
            animation: liveDotPulse 1s ease-in-out infinite;
        }
        
        /* Model Badge in Card */
        .model-badge-card {
            display: inline-flex;
            align-items: center;
            gap: 0.25rem;
            font-size: 0.65rem;
            padding: 0.15rem 0.4rem;
            background: #00000030;
            border-radius: 4px;
            color: #94a3b8;
            margin-left: 0.5rem;
        }
        
        /* ========================================
           DELEGATION VISUALIZATION
           ======================================== */
        
        /* Delegation Flow Card */
        .delegation-flow-card {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            padding: 0.5rem 0.75rem;
            background: linear-gradient(90deg, #00000020, #00000010);
            border-radius: 8px;
            margin-top: 0.5rem;
        }

        .coordination-indicator {
            margin-top: 0.5rem;
            padding: 0.35rem 0.55rem;
            border: 1px solid #38bdf840;
            background: #38bdf814;
            color: #7dd3fc;
            border-radius: 8px;
            font-size: 0.78rem;
            line-height: 1.3;
        }

        body[data-theme="light"] .coordination-indicator {
            background: #e0f2fe;
            border-color: #38bdf866;
            color: #0369a1;
        }
        @keyframes delegationFlowPulse {
            0%, 100% { background: linear-gradient(90deg, #00000020, #00000010); }
            50% { background: linear-gradient(90deg, #38bdf810, #22c55e10); }
        }
        
        .delegation-flow-card .flow-step {
            display: flex;
            align-items: center;
            gap: 0.25rem;
            font-size: 0.8rem;
        }
        .delegation-flow-card .flow-icon {
            font-size: 1rem;
        }
        .delegation-flow-card .flow-name {
            font-weight: 500;
            color: #e2e8f0;
        }
        .delegation-flow-card .flow-arrow {
            display: flex;
            align-items: center;
            color: #22c55e;
            font-size: 1rem;
        }
        @keyframes flowArrowPulse {
            0%, 100% { transform: translateX(0); opacity: 1; }
            50% { transform: translateX(3px); opacity: 0.7; }
        }
        
        /* Flow Dots Animation */
        .flow-dots {
            display: inline-flex;
            gap: 2px;
            margin: 0 0.25rem;
        }
        .flow-dots span {
            width: 4px;
            height: 4px;
            background: #22c55e;
            border-radius: 50%;
            opacity: 0.75;
        }
        .flow-dots span:nth-child(2) { animation-delay: 0.2s; }
        .flow-dots span:nth-child(3) { animation-delay: 0.4s; }
        @keyframes flowDots {
            0%, 100% { opacity: 0.3; transform: scale(0.8); }
            50% { opacity: 1; transform: scale(1); }
        }
        
        /* Task Label in Delegation */
        .delegation-task-label {
            font-size: 0.7rem;
            color: #94a3b8;
            max-width: 120px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        
        /* Timer Badge */
        .delegation-timer {
            display: inline-flex;
            align-items: center;
            gap: 0.25rem;
            font-size: 0.65rem;
            color: #64748b;
            background: #00000030;
            padding: 0.15rem 0.4rem;
            border-radius: 4px;
            margin-left: 0.5rem;
        }
        .delegation-timer::before {
            content: '⏱';
            font-size: 0.6rem;
        }
        
        /* Live Activity Badge */
        .live-activity-badge {
            display: flex;
            align-items: center;
            gap: 0.35rem;
            font-size: 0.65rem;
            color: #22c55e;
            margin-top: 0.5rem;
        }
        .live-activity-badge::before {
            content: '';
            width: 6px;
            height: 6px;
            background: #22c55e;
            border-radius: 50%;
            animation: pulse 1s ease-in-out infinite;
        }
        @keyframes pulse-live {
            0%, 100% { opacity: 1; transform: scale(1); }
            50% { opacity: 0.5; transform: scale(1.2); }
        }
        .live-activity-badge::before {
            animation: pulse-live 1s ease-in-out infinite;
        }
        
        /* Delegation Chain in Card */
        .delegation-chain-card {
            display: flex;
            align-items: center;
            gap: 0.35rem;
            font-size: 0.7rem;
            color: #64748b;
            margin-top: 0.5rem;
            padding: 0.4rem 0.6rem;
            background: #00000020;
            border-radius: 6px;
        }
        .delegation-chain-card .delegation-arrow {
            color: var(--agent-color);
        }
        
        /* Click hint */
        .click-hint {
            position: absolute;
            bottom: 8px;
            right: 12px;
            font-size: 0.7rem;
            color: #64748b;
            opacity: 0;
            transition: opacity 0.3s ease;
        }
        .agent-card:hover .click-hint {
            opacity: 1;
        }
        
        /* Agent-specific colors */
        .agent-card.rodrigo { --agent-color: #38bdf8; }
        .agent-card.helios { --agent-color: #818cf8; }
        .agent-card.julia { --agent-color: #f472b6; }
        .agent-card.sportacus { --agent-color: #22c55e; }
        .agent-card.frede { --agent-color: #f97316; }
        
        /* Modal */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.7);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 2000;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }
        .modal-overlay.active {
            opacity: 1;
            visibility: visible;
        }
        .modal-content {
            background: #1e293b;
            border-radius: 16px;
            max-width: 500px;
            width: 90%;
            max-height: 80vh;
            overflow-y: auto;
            border: 1px solid #ffffff20;
            box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
        }
        .modal-header {
            display: flex;
            align-items: center;
            gap: 1rem;
            padding: 1.5rem;
            border-bottom: 1px solid #ffffff10;
        }
        .modal-icon {
            font-size: 3rem;
            background: #ffffff10;
            border-radius: 12px;
            padding: 0.5rem;
        }
        .modal-title {
            flex: 1;
        }
        .modal-title h2 {
            font-size: 1.5rem;
            color: #fff;
            margin-bottom: 0.25rem;
        }
        .modal-title .role {
            color: #38bdf8;
            font-size: 0.9rem;
        }
        .close-btn {
            background: transparent;
            border: none;
            color: #94a3b8;
            font-size: 1.75rem;
            cursor: pointer;
            padding: 0.5rem;
            border-radius: 8px;
            transition: all 0.2s;
            min-width: 44px;
            min-height: 44px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .close-btn:hover {
            background: #ffffff10;
            color: #fff;
        }
        .modal-body {
            padding: 1.5rem;
        }
        .status-section {
            margin-bottom: 1.5rem;
        }
        .section-title {
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: #64748b;
            margin-bottom: 0.75rem;
            font-weight: 600;
        }
        .current-status {
            background: #00000020;
            border-radius: 12px;
            padding: 1rem;
        }
        .status-row {
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }
        .status-badge {
            padding: 0.25rem 0.75rem;
            border-radius: 9999px;
            font-size: 0.8rem;
            font-weight: 600;
        }
        .status-badge.working {
            background: #fbbf2420;
            color: #fbbf24;
        }
        .status-badge.idle {
            background: #64748b20;
            color: #94a3b8;
        }
        .current-task {
            margin-top: 0.75rem;
            color: #e2e8f0;
            font-size: 0.95rem;
        }
        .current-task.idle {
            color: #64748b;
            font-style: italic;
        }
        .history-section {
            margin-top: 1.5rem;
        }
        .history-list {
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
        }
        .history-item {
            background: #00000020;
            border-radius: 8px;
            padding: 0.75rem;
            border-left: 3px solid;
        }
        .history-item.started { border-color: #fbbf24; }
        .history-item.completed { border-color: #22c55e; }
        .history-item.error { border-color: #ef4444; }
        .history-time {
            font-size: 0.75rem;
            color: #64748b;
            margin-bottom: 0.25rem;
        }
        .history-task {
            font-size: 0.9rem;
            color: #e2e8f0;
        }
        .no-history {
            color: #64748b;
            font-style: italic;
            text-align: center;
            padding: 1rem;
        }
        
        /* Live Activity Section in Modal */
        .live-activity-section {
            background: linear-gradient(135deg, #22c55e10, #38bdf810);
            border-radius: 12px;
            padding: 1rem;
            margin-bottom: 1rem;
            border: 1px solid #22c55e30;
        }
        .live-activity-header {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            margin-bottom: 0.75rem;
        }
        .live-dot-pulse {
            width: 8px;
            height: 8px;
            background: #22c55e;
            border-radius: 50%;
            animation: pulse-live 1s ease-in-out infinite;
        }
        .live-activity-title {
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: #22c55e;
            font-weight: 600;
        }
        .live-activity-timer {
            margin-left: auto;
            font-size: 0.75rem;
            color: #64748b;
        }
        
        /* Activity Timer in Unified Status Section */
        .activity-timer {
            font-size: 0.85rem;
            color: #4ade80;
            font-weight: 500;
            font-family: 'SF Mono', 'Consolas', monospace;
            margin-left: 0.75rem;
            display: inline-flex;
            align-items: center;
            gap: 0.25rem;
        }
        
        .activity-timer::before {
            content: '⏱';
            font-size: 0.75rem;
            opacity: 0.7;
        }
        
        body[data-theme="light"] .activity-timer {
            color: #16a34a;
        }
        
        /* Last Update in Status Section */
        .status-section .last-update {
            font-size: 0.75rem;
            color: #64748b;
            margin-top: 0.5rem;
        }
        
        body[data-theme="light"] .status-section .last-update {
            color: #64748b;
        }
        .live-activity-task {
            color: #e2e8f0;
            font-size: 0.95rem;
            margin-bottom: 0.75rem;
        }
        .live-progress-container {
            margin-top: 0.75rem;
        }
        .live-progress-bar {
            height: 8px;
            background: #334155;
            border-radius: 4px;
            overflow: hidden;
        }
        .live-progress-fill {
            height: 100%;
            background: linear-gradient(90deg, #22c55e, #38bdf8);
            border-radius: 4px;
            transition: width 0.5s ease;
        }
        .live-progress-label {
            display: flex;
            justify-content: space-between;
            font-size: 0.7rem;
            color: #64748b;
            margin-top: 0.25rem;
        }
        
        /* Delegation Chain in Modal */
        .delegation-flow {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.75rem;
            background: #00000020;
            border-radius: 10px;
            margin-bottom: 1rem;
            flex-wrap: wrap;
        }
        .delegation-step {
            display: flex;
            align-items: center;
            gap: 0.35rem;
            font-size: 0.85rem;
        }
        .delegation-step .agent-icon {
            font-size: 1.1rem;
        }
        .delegation-step .agent-name {
            font-weight: 500;
        }
        .delegation-arrow-icon {
            color: #64748b;
            font-size: 0.9rem;
        }
        .delegation-task-label {
            font-size: 0.75rem;
            color: #38bdf8;
            max-width: 200px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        
        /* Activity History with Status */
        .history-item.completed { border-color: #22c55e; }
        .history-item.started { border-color: #fbbf24; }
        .history-item.error { border-color: #ef4444; }
        .history-item.activity { border-color: #38bdf8; }
        .history-status {
            display: inline-flex;
            align-items: center;
            gap: 0.25rem;
            font-size: 0.65rem;
            padding: 0.15rem 0.5rem;
            border-radius: 4px;
            margin-left: 0.5rem;
        }
        .history-status.completed {
            background: #22c55e20;
            color: #22c55e;
        }
        .history-status.failed {
            background: #ef444420;
            color: #f87171;
        }
        
        /* Agent Statistics in Modal */
        .agent-stats-section {
            margin-top: 1.5rem;
            padding-top: 1rem;
            border-top: 1px solid #ffffff10;
        }
        .agent-stats-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 0.75rem;
        }
        .agent-stat-item {
            text-align: center;
            padding: 0.75rem;
            background: #00000020;
            border-radius: 8px;
        }
        .agent-stat-value {
            font-size: 1.25rem;
            font-weight: 600;
            color: #38bdf8;
        }
        .agent-stat-label {
            font-size: 0.65rem;
            color: #64748b;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            margin-top: 0.25rem;
        }
        
        /* Model Section */
        .model-section {
            margin-top: 1.5rem;
            padding-top: 1rem;
            border-top: 1px solid #ffffff10;
        }
        .model-content {
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }
        .model-current {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            flex-wrap: wrap;
        }
        .model-label {
            color: #64748b;
            font-size: 0.85rem;
        }
        .model-value {
            color: #e2e8f0;
            font-weight: 600;
            font-size: 0.95rem;
        }
        .model-badge {
            background: #38bdf820;
            color: #38bdf8;
            padding: 0.15rem 0.5rem;
            border-radius: 4px;
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }
        .model-switch {
            display: flex;
            gap: 0.75rem;
            flex-wrap: wrap;
        }
        .model-select {
            flex: 1;
            min-width: 180px;
            padding: 0.75rem 1rem;
            background: #00000020;
            border: 1px solid #ffffff20;
            border-radius: 8px;
            color: #e2e8f0;
            font-size: 0.9rem;
            cursor: pointer;
            appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 1rem center;
            padding-right: 2.5rem;
        }
        .model-select:hover {
            border-color: #38bdf840;
        }
        .model-select:focus {
            outline: none;
            border-color: #38bdf8;
        }
        .model-select option {
            background: #0f172a;
            color: #e2e8f0;
        }
        .model-switch-btn {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.75rem 1.25rem;
            background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
            color: #0f172a;
            border: none;
            border-radius: 8px;
            font-size: 0.9rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }
        .model-switch-btn:hover {
            background: linear-gradient(135deg, #7dd3fc 0%, #38bdf8 100%);
            transform: translateY(-1px);
        }
        .model-switch-btn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none;
        }
        .model-switch-btn .btn-icon {
            font-size: 1rem;
        }
        .model-feedback {
            padding: 0.75rem 1rem;
            border-radius: 8px;
            font-size: 0.85rem;
            display: none;
        }
        .model-feedback.success {
            background: #22c55e20;
            color: #4ade80;
            border: 1px solid #22c55e40;
            display: block;
        }
        .model-feedback.error {
            background: #ef444420;
            color: #f87171;
            border: 1px solid #ef444440;
            display: block;
        }
        
        /* Activity Log Live */
        .activity-log-live {
            background: #00000020;
            border-radius: 8px;
            padding: 0.75rem;
            max-height: 150px;
            overflow-y: auto;
        }
        .activity-log-item {
            display: flex;
            align-items: flex-start;
            gap: 0.5rem;
            padding: 0.4rem 0;
            border-bottom: 1px solid #ffffff08;
            font-size: 0.8rem;
        }
        .activity-log-item:last-child {
            border-bottom: none;
        }
        .activity-log-time {
            color: #64748b;
            font-size: 0.7rem;
            min-width: 60px;
        }
        .activity-log-msg {
            color: #e2e8f0;
            flex: 1;
        }
        
        /* Stats Section */
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 1.5rem;
            margin-bottom: 2rem;
        }
        .card {
            background: #ffffff05;
            border-radius: 16px;
            padding: 1.5rem;
            border: 1px solid #ffffff10;
            backdrop-filter: blur(10px);
        }
        .card h2 {
            color: #38bdf8;
            font-size: 1.125rem;
            margin-bottom: 1rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .metric {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.75rem 0;
            border-bottom: 1px solid #ffffff08;
        }
        .metric:last-child { border-bottom: none; }
        .metric-label { font-size: 0.9rem; color: #94a3b8; }
        .metric-value { font-weight: 600; }
        
        /* Activity Log */
        .activity-log {
            border-radius: 8px;
            padding: 1rem;
            max-height: 200px;
            overflow-y: auto;
            font-family: monospace;
            font-size: 0.85rem;
            margin-top: 1rem;
            background: #00000020;
        }
        .activity-item {
            padding: 0.5rem 0;
            border-bottom: 1px solid #ffffff08;
            display: flex;
            gap: 1rem;
        }
        .timestamp { 
            min-width: 60px; 
            color: #38bdf8;
            font-weight: 500;
        }

        /* Joke Section */
        #jokeBtn {
            margin-top: 1rem; 
            padding: 0.75rem 1rem; 
            background: #38bdf820;
            color: #e2e8f0;
            border: 1px solid #38bdf840;
            border-radius: 8px; 
            cursor: pointer;
            font-size: 0.95rem;
            width: 100%;
            transition: all 0.2s;
            min-height: 48px;
        }
        #jokeBtn:hover {
            background: #38bdf830;
            border-color: #38bdf860;
        }
        #jokeBtn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
        }
        #jokeDisplay {
            margin-top: 1rem; 
            font-style: italic; 
            min-height: 3em;
            padding: 1rem;
            border-radius: 8px;
            background: #00000020;
            line-height: 1.5;
        }

        /* Progress */
        .progress-bar {
            height: 6px;
            background: #ffffff10;
            border-radius: 3px;
            overflow: hidden;
            margin-top: 0.5rem;
        }
        .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, #38bdf8, #818cf8);
            border-radius: 3px;
            transition: width 1s ease;
        }

        /* Live indicator */
        .live-badge {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            background: #22c55e20;
            color: #4ade80;
            padding: 0.25rem 0.75rem;
            border-radius: 9999px;
            font-size: 0.75rem;
            font-weight: 600;
            border: 1px solid #22c55e40;
        }
        .live-dot {
            width: 8px;
            height: 8px;
            background: #4ade80;
            border-radius: 50%;
            animation: livePulse 1.5s infinite;
        }
        @keyframes livePulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.3; }
        }

        footer {
            text-align: center;
            margin-top: 3rem;
            font-size: 0.875rem;
            color: #64748b;
        }
        
        /* ========================================
           CALISTHENICS PAGE
           ======================================== */
        
        .calisthenics-container {
            display: flex;
            flex-direction: column;
            gap: 2rem;
            padding-bottom: 4rem; /* More space at the bottom */
        }
        
        .calisthenics-section {
            background: #ffffff05;
            border-radius: 16px;
            padding: 1.5rem;
            border: 1px solid #ffffff10;
            backdrop-filter: blur(10px);
        }
        
        .section-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 1.25rem;
            flex-wrap: wrap;
            gap: 1rem;
        }
        
        .section-title-main {
            font-size: 1.35rem;
            font-weight: 600;
            color: #38bdf8;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        /* Today's Workout - Hero Section */
        .today-workout {
            border-left: 4px solid #22c55e;
        }
        
        .today-workout.rest-day {
            border-left-color: #fbbf24;
        }
        
        /* Selected Workout Section */
        .selected-workout {
            border-left: 4px solid #38bdf8;
            animation: slideIn 0.3s ease;
        }
        
        @keyframes slideIn {
            from {
                opacity: 0;
                transform: translateY(-10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        body[data-theme="light"] .selected-workout {
            background: #ffffff;
            border-color: #e2e8f0;
        }
        
        .workout-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 1rem;
            margin-bottom: 1rem;
        }
        
        .workout-title {
            font-size: 1.75rem;
            font-weight: 700;
            color: #fff;
        }
        
        body[data-theme="light"] .workout-title {
            color: #1e293b;
        }
        
        .workout-type {
            font-size: 1rem;
            color: #94a3b8;
            margin-top: 0.25rem;
        }
        
        .workout-badge {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.5rem 1rem;
            border-radius: 9999px;
            font-size: 0.85rem;
            font-weight: 600;
        }
        
        .workout-badge.pull {
            background: #818cf820;
            color: #a5b4fc;
            border: 1px solid #818cf840;
        }
        
        .workout-badge.push {
            background: #f472b620;
            color: #f9a8d4;
            border: 1px solid #f472b640;
        }
        
        .workout-badge.rest {
            background: #6b728020;
            color: #9ca3af;
            border: 1px solid #6b728040;
        }
        
        .workout-badge.deload {
            background: #fbbf2420;
            color: #fcd34d;
            border: 1px solid #fbbf2440;
        }
        
        .workout-description {
            color: #94a3b8;
            font-size: 0.95rem;
            margin-bottom: 1.25rem;
            line-height: 1.5;
        }
        
        .exercises-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 1rem;
        }
        
        .exercise-item {
            display: flex;
            align-items: center;
            gap: 1rem;
            padding: 1rem;
            background: #00000020;
            border-radius: 12px;
            border: 1px solid #ffffff08;
            transition: all 0.2s ease;
        }
        
        .exercise-item:hover {
            border-color: #ffffff20;
            transform: translateX(4px);
        }
        
        .exercise-icon {
            width: 48px;
            height: 48px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
            background: #ffffff10;
            flex-shrink: 0;
        }
        
        .exercise-icon.pull { background: #818cf820; }
        .exercise-icon.push { background: #f472b620; }
        .exercise-icon.rest { background: #6b728020; }
        
        .exercise-info {
            flex: 1;
            min-width: 0;
        }
        
        .exercise-name {
            font-weight: 600;
            color: #fff;
            font-size: 0.95rem;
            margin-bottom: 0.25rem;
        }
        
        body[data-theme="light"] .exercise-name {
            color: #1e293b;
        }
        
        .exercise-muscles {
            font-size: 0.75rem;
            color: #64748b;
        }
        
        .exercise-sets {
            font-weight: 700;
            font-size: 1.1rem;
            color: #38bdf8;
            padding: 0.5rem 0.75rem;
            background: #38bdf820;
            border-radius: 8px;
            white-space: nowrap;
        }
        
        .exercise-sets.practice {
            font-size: 0.85rem;
            font-weight: 500;
        }
        
        /* Calendar Section */
        .calendar-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 1rem;
        }
        
        .calendar-nav {
            display: flex;
            gap: 0.5rem;
        }
        
        .calendar-nav-btn {
            padding: 0.5rem 1rem;
            background: #ffffff10;
            border: 1px solid #ffffff20;
            border-radius: 8px;
            color: #94a3b8;
            cursor: pointer;
            font-size: 0.85rem;
            transition: all 0.2s ease;
        }
        
        .calendar-nav-btn:hover {
            background: #ffffff20;
            color: #e2e8f0;
        }
        
        .calendar-current-month {
            font-size: 1.1rem;
            font-weight: 600;
            color: #fff;
        }
        
        body[data-theme="light"] .calendar-current-month {
            color: #1e293b;
        }
        
        .calendar-grid {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 4px;
        }
        
        .calendar-weekday {
            text-align: center;
            font-size: 0.75rem;
            font-weight: 600;
            color: #64748b;
            padding: 0.5rem 0;
            text-transform: uppercase;
        }
        
        .calendar-day {
            aspect-ratio: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            border-radius: 10px;
            background: #00000020;
            border: 1px solid transparent;
            cursor: pointer;
            transition: all 0.2s ease;
            padding: 0.25rem;
            min-height: 60px;
            position: relative;
        }
        
        .calendar-day:hover {
            background: #ffffff25;
            border-color: #38bdf8;
            transform: scale(1.05);
            box-shadow: 0 4px 12px rgba(56, 189, 248, 0.2);
        }
        
        .calendar-day:active {
            transform: scale(1.02);
        }
        
        .calendar-day.selected {
            background: #38bdf830;
            border-color: #38bdf8;
            box-shadow: 0 0 16px #38bdf840;
        }
        
        .calendar-day.other-month {
            opacity: 0.3;
        }
        
        .calendar-day.today {
            background: #38bdf820;
            border: 3px solid #38bdf8 !important;
            box-shadow: 0 0 16px rgba(56, 189, 248, 0.5), 0 0 24px rgba(56, 189, 248, 0.3);
            position: relative;
        }

        .calendar-day.today .calendar-day-number {
            font-size: 1rem !important;
            font-weight: 800 !important;
            color: #38bdf8 !important;
        }

        .calendar-day.today .calendar-day-today-badge {
            position: absolute;
            top: 1px;
            right: 1px;
            font-size: 0.45rem;
            font-weight: 700;
            color: #0f172a;
            background: #38bdf8;
            padding: 1px 3px;
            border-radius: 3px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        
        .calendar-day.current-workout {
            background: #22c55e20;
            border-color: #22c55e;
        }
        
        .calendar-day.rest-day {
            background: #6b728020; /* Gray - not orange/green */
        }
        
        .calendar-day.deload {
            background: #f9731620;
        }
        
        .calendar-day.front-lever {
            border-left: 3px solid #818cf8;
        }
        
        .calendar-day.planche {
            border-left: 3px solid #f472b6;
        }
        
        .calendar-day-number {
            font-size: 0.9rem;
            font-weight: 600;
            color: #e2e8f0;
        }
        
        .calendar-day.today .calendar-day-number {
            color: #38bdf8;
        }
        
        .calendar-day-workout {
            font-size: 0.6rem;
            color: #64748b;
            text-align: center;
            line-height: 1.2;
            margin-top: 0.15rem;
            max-width: 100%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        
        body[data-theme="light"] .calendar-day-number {
            color: #1e293b;
        }
        
        /* Full Plan Section */
        .full-plan {
            max-height: 600px;
            overflow-y: auto;
            padding-bottom: 3rem; /* More space at the bottom */
        }
        
        .week-section {
            margin-bottom: 1rem;
        }
        
        .week-section:last-child {
            margin-bottom: 0;
        }
        
        .week-header {
            display: flex;
            align-items: center;
            gap: 1rem;
            padding: 0.75rem 1rem;
            background: #00000030;
            border-radius: 10px;
            margin-bottom: 0;
            cursor: pointer;
            transition: all 0.2s ease;
            user-select: none;
        }
        
        .week-header:hover {
            background: #00000040;
        }
        
        .week-header.current-week {
            background: #22c55e20;
            border: 1px solid #22c55e40;
        }
        
        .week-expand-icon {
            margin-left: auto;
            font-size: 1rem;
            color: #64748b;
            transition: transform 0.3s ease;
        }
        
        .week-header.expanded .week-expand-icon {
            transform: rotate(180deg);
        }
        
        .week-content {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.4s ease, padding 0.3s ease, opacity 0.3s ease;
            opacity: 0;
        }
        
        .week-content.expanded {
            max-height: 2000px;
            opacity: 1;
            padding-top: 0.75rem;
        }
        
        .week-days {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 0.75rem;
            padding-left: 0.5rem;
        }
        
        .week-number {
            font-size: 1.25rem;
            font-weight: 700;
            color: #38bdf8;
        }
        
        .week-type {
            font-size: 0.8rem;
            padding: 0.25rem 0.75rem;
            border-radius: 9999px;
            font-weight: 500;
        }
        
        .week-type.normal {
            background: #38bdf820;
            color: #38bdf8;
        }
        
        .week-type.deload {
            background: #fbbf2420;
            color: #fcd34d;
        }
        
        .week-days {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 0.75rem;
            padding-left: 0.5rem;
        }
        
        .day-card {
            padding: 1rem;
            background: #00000020;
            border-radius: 10px;
            border: 1px solid transparent;
            transition: all 0.2s ease;
        }
        
        .day-card:hover {
            border-color: #ffffff20;
        }
        
        .day-card.current-day {
            background: #22c55e20;
            border-color: #22c55e;
        }
        
        .day-card-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 0.75rem;
        }
        
        .day-name {
            font-weight: 600;
            color: #fff;
        }
        
        body[data-theme="light"] .day-name {
            color: #1e293b;
        }
        
        .day-type-badge {
            font-size: 0.7rem;
            padding: 0.2rem 0.5rem;
            border-radius: 9999px;
            font-weight: 500;
        }
        
        .day-type-badge.pull {
            background: #818cf820;
            color: #a5b4fc;
        }
        
        .day-type-badge.push {
            background: #f472b620;
            color: #f9a8d4;
        }
        
        .day-type-badge.rest {
            background: #6b728020;
            color: #9ca3af;
        }
        
        .day-exercises {
            font-size: 0.85rem;
            color: #94a3b8;
        }
        
        .day-exercise-item {
            display: flex;
            justify-content: space-between;
            padding: 0.35rem 0;
            border-bottom: 1px solid #ffffff08;
        }
        
        .day-exercise-item:last-child {
            border-bottom: none;
        }
        
        .day-exercise-name {
            color: #cbd5e1;
        }
        
        body[data-theme="light"] .day-exercise-name {
            color: #64748b;
        }
        
        .day-exercise-sets {
            color: #38bdf8;
            font-weight: 500;
        }
        
        /* Settings for Calisthenics */
        .cycle-settings {
            display: flex;
            align-items: center;
            gap: 1rem;
            flex-wrap: wrap;
        }
        
        .setting-group {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        .setting-label {
            font-size: 0.85rem;
            color: #94a3b8;
        }
        
        .setting-input {
            padding: 0.5rem 0.75rem;
            background: #00000030;
            border: 1px solid #ffffff20;
            border-radius: 8px;
            color: #e2e8f0;
            font-size: 0.85rem;
            width: 140px;
        }
        
        body[data-theme="light"] .setting-input {
            background: #f8fafc;
            border-color: #cbd5e1;
            color: #1e293b;
        }
        
        .setting-input:focus {
            outline: none;
            border-color: #38bdf8;
        }
        
        .setting-btn {
            padding: 0.5rem 1rem;
            background: #38bdf820;
            border: 1px solid #38bdf840;
            border-radius: 8px;
            color: #38bdf8;
            cursor: pointer;
            font-size: 0.85rem;
            font-weight: 500;
            transition: all 0.2s ease;
        }
        
        .setting-btn:hover {
            background: #38bdf830;
            border-color: #38bdf860;
        }
        
        .cycle-info {
            display: flex;
            gap: 1.5rem;
            flex-wrap: wrap;
            margin-top: 1rem;
            padding: 1rem;
            background: #00000020;
            border-radius: 10px;
        }
        
        .cycle-stat {
            text-align: center;
        }
        
        .cycle-stat-value {
            font-size: 1.5rem;
            font-weight: 700;
            color: #38bdf8;
        }
        
        .cycle-stat-label {
            font-size: 0.75rem;
            color: #64748b;
            text-transform: uppercase;
        }
        
        /* Legend */
        .calendar-legend {
            display: flex;
            flex-wrap: wrap;
            gap: 1rem;
            margin-top: 1rem;
            padding-top: 1rem;
            border-top: 1px solid #ffffff10;
        }
        
        .legend-item {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.8rem;
            color: #94a3b8;
        }
        
        .legend-color {
            width: 16px;
            height: 16px;
            border-radius: 4px;
        }
        
        .legend-color.front-lever { background: #818cf8; }
        .legend-color.planche { background: #f472b6; }
        .legend-color.rest { background: #6b7280; }
        .legend-color.today { background: #38bdf8; }
        .legend-color.deload { background: #f97316; }
        
        /* ========================================
           SCHEDULE SECTION
           ======================================== */
        
        .schedule-section {
            margin-bottom: 1.5rem;
        }
        
        .schedule-content {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 1rem;
        }
        
        .schedule-event {
            background: #00000020;
            border-radius: 12px;
            padding: 1rem;
            border: 1px solid #ffffff10;
            transition: all 0.2s ease;
            border-left: 4px solid;
        }
        
        .schedule-event:hover {
            border-color: #ffffff20;
            transform: translateX(4px);
        }
        
        .schedule-event.today {
            background: #22c55e15;
            border-color: #22c55e40;
        }
        
        .schedule-event.type-lecture {
            border-left-color: #38bdf8;
        }
        
        .schedule-event.type-exercise {
            border-left-color: #f97316;
        }
        
        .schedule-event.type-seminar {
            border-left-color: #a855f7;
        }
        
        .schedule-event.type-unknown {
            border-left-color: #64748b;
        }
        
        .schedule-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 0.5rem;
            flex-wrap: wrap;
            gap: 0.5rem;
        }
        
        .schedule-date {
            font-weight: 600;
            color: #e2e8f0;
            font-size: 0.95rem;
        }
        
        body[data-theme="light"] .schedule-date {
            color: #1e293b;
        }
        
        .schedule-day {
            font-size: 0.8rem;
            color: #94a3b8;
        }
        
        body[data-theme="light"] .schedule-day {
            color: #64748b;
        }
        
        .schedule-time {
            font-size: 0.85rem;
            color: #38bdf8;
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 0.25rem;
        }
        
        .schedule-title {
            font-size: 1rem;
            font-weight: 600;
            color: #fff;
            margin-bottom: 0.5rem;
        }
        
        body[data-theme="light"] .schedule-title {
            color: #1e293b;
        }
        
        .schedule-type {
            display: inline-flex;
            align-items: center;
            gap: 0.25rem;
            font-size: 0.7rem;
            padding: 0.2rem 0.5rem;
            border-radius: 9999px;
            font-weight: 500;
            margin-bottom: 0.5rem;
        }
        
        .schedule-type.type-lecture {
            background: #38bdf820;
            color: #38bdf8;
        }
        
        .schedule-type.type-exercise {
            background: #f97316;
            color: #fff;
        }
        
        .schedule-type.type-seminar {
            background: #a855f720;
            color: #a855f7;
        }
        
        .schedule-type.type-unknown {
            background: #64748b20;
            color: #94a3b8;
        }
        
        .schedule-details {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem 1rem;
            font-size: 0.8rem;
            color: #94a3b8;
        }
        
        body[data-theme="light"] .schedule-details {
            color: #64748b;
        }
        
        .schedule-detail {
            display: flex;
            align-items: center;
            gap: 0.25rem;
        }
        
        .schedule-loading {
            text-align: center;
            color: #64748b;
            padding: 2rem;
            font-style: italic;
        }
        
        .schedule-error {
            text-align: center;
            color: #f87171;
            padding: 2rem;
        }
        
        .schedule-today-badge {
            background: #22c55e;
            color: #0f172a;
            font-size: 0.65rem;
            padding: 0.15rem 0.5rem;
            border-radius: 9999px;
            font-weight: 600;
            text-transform: uppercase;
        }
        
        /* Light theme adjustments */
        body[data-theme="light"] .schedule-event {
            background: #f8fafc;
            border-color: #e2e8f0;
        }
        
        body[data-theme="light"] .schedule-event:hover {
            border-color: #cbd5e1;
        }
        
        body[data-theme="light"] .schedule-event.today {
            background: #22c55e10;
            border-color: #22c55e30;
        }
        
        /* Group Selector Dropdown */
        .group-selector {
            background: #00000020;
            border-radius: 12px;
            padding: 1rem 1.25rem;
            margin-bottom: 1.5rem;
            border: 1px solid #ffffff10;
            display: flex;
            align-items: center;
            gap: 1rem;
            flex-wrap: wrap;
            transition: all 0.3s ease;
        }
        
        body[data-theme="light"] .group-selector {
            background: #f8fafc;
            border-color: #e2e8f0;
        }
        
        .group-selector-label {
            font-size: 0.9rem;
            font-weight: 600;
            color: #94a3b8;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        body[data-theme="light"] .group-selector-label {
            color: #64748b;
        }
        
        .group-selector-dropdown {
            flex: 1;
            min-width: 200px;
            max-width: 300px;
            position: relative;
        }
        
        .group-selector-select {
            width: 100%;
            padding: 0.75rem 2.5rem 0.75rem 1rem;
            background: #ffffff10;
            border: 1px solid #ffffff20;
            border-radius: 8px;
            color: #e2e8f0;
            font-size: 0.95rem;
            font-weight: 500;
            cursor: pointer;
            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='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 1rem center;
            transition: all 0.2s ease;
        }
        
        body[data-theme="light"] .group-selector-select {
            background-color: #ffffff;
            border-color: #cbd5e1;
            color: #1e293b;
            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='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
        }
        
        .group-selector-select:hover {
            border-color: #38bdf8;
        }
        
        .group-selector-select:focus {
            outline: none;
            border-color: #38bdf8;
            box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
        }
        
        .group-selector-loading {
            color: #64748b;
            font-style: italic;
        }

        .group-selector-loading::after {
            content: '';
            animation: loadingDots 1.5s infinite;
        }

        @keyframes loadingDots {
            0%, 20% { content: '.'; }
            40% { content: '..'; }
            60%, 100% { content: '...'; }
        }

        .schedule-last-update {
            font-size: 0.8rem;
            color: #64748b;
            margin-left: auto;
            display: flex;
            align-items: center;
            gap: 0.35rem;
            white-space: nowrap;
        }

        body[data-theme="light"] .schedule-last-update {
            color: #94a3b8;
        }

        .schedule-last-update::before {
            content: '🕐';
            font-size: 0.85rem;
        }

        /* ========================================
           NEWS PAGE STYLES
           ======================================== */
        
        .news-container {
            max-width: 1000px;
            margin: 0 auto;
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
            padding-bottom: 4rem;
        }
        
        .news-loading {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 4rem 2rem;
            color: #94a3b8;
            text-align: center;
        }
        
        .news-loading-spinner {
            width: 40px;
            height: 40px;
            border: 3px solid #ffffff20;
            border-top-color: #38bdf8;
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin-bottom: 1rem;
        }
        
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
        
        .news-error {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 2rem;
            background: #ef444420;
            border: 1px solid #ef444440;
            border-radius: 12px;
            text-align: center;
            color: #f87171;
        }
        
        body[data-theme="light"] .news-error {
            background: #ef444410;
            border-color: #ef444430;
        }
        
        .news-retry-btn {
            margin-top: 1rem;
            padding: 0.5rem 1rem;
            background: #ef444420;
            border: 1px solid #ef444440;
            border-radius: 8px;
            color: #f87171;
            cursor: pointer;
            font-size: 0.9rem;
            transition: all 0.2s;
        }
        
        .news-retry-btn:hover {
            background: #ef444430;
        }
        
        .news-empty {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 3rem;
            color: #64748b;
            text-align: center;
            font-size: 1.1rem;
        }
        
        .news-list {
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }
        
        .news-card {
            background: #00000020;
            border-radius: 16px;
            padding: 1.5rem;
            border: 1px solid #ffffff10;
            transition: all 0.3s ease;
            backdrop-filter: blur(10px);
        }
        
        body[data-theme="light"] .news-card {
            background: #ffffff;
            border-color: #e2e8f0;
        }
        
        .news-card:hover {
            border-color: #38bdf840;
            transform: translateY(-2px);
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
        }
        
        body[data-theme="light"] .news-card:hover {
            border-color: #38bdf860;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }
        
        .news-header {
            display: flex;
            flex-wrap: wrap;
            align-items: flex-start;
            gap: 0.75rem;
            margin-bottom: 0.75rem;
        }
        
        .news-date {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            font-size: 0.8rem;
            color: #94a3b8;
            background: #00000030;
            padding: 0.25rem 0.6rem;
            border-radius: 6px;
        }
        
        body[data-theme="light"] .news-date {
            background: #f1f5f9;
            color: #64748b;
        }
        
        .news-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 0.4rem;
        }
        
        .news-tag {
            display: inline-flex;
            align-items: center;
            gap: 0.25rem;
            font-size: 0.75rem;
            padding: 0.2rem 0.5rem;
            border-radius: 9999px;
            font-weight: 500;
        }
        
        .news-tag.model {
            background: #818cf820;
            color: #a5b4fc;
            border: 1px solid #818cf840;
        }
        
        .news-tag.feature {
            background: #22c55e20;
            color: #4ade80;
            border: 1px solid #22c55e40;
        }
        
        .news-tag.release {
            background: #f9731620;
            color: #fb923c;
            border: 1px solid #f9731640;
        }
        
        .news-tag.research {
            background: #ec489920;
            color: #f472b6;
            border: 1px solid #ec489940;
        }
        
        .news-tag.update {
            background: #38bdf820;
            color: #7dd3fc;
            border: 1px solid #38bdf840;
        }
        
        body[data-theme="light"] .news-tag.model {
            background: #6366f115;
            color: #4f46e5;
        }
        
        body[data-theme="light"] .news-tag.feature {
            background: #22c55e10;
            color: #16a34a;
        }
        
        body[data-theme="light"] .news-tag.release {
            background: #f9731610;
            color: #ea580c;
        }
        
        body[data-theme="light"] .news-tag.research {
            background: #ec489910;
            color: #db2777;
        }
        
        body[data-theme="light"] .news-tag.update {
            background: #38bdf810;
            color: #0284c7;
        }
        
        .news-title {
            font-size: 1.25rem;
            font-weight: 600;
            color: #e2e8f0;
            margin-bottom: 0.5rem;
            line-height: 1.4;
            cursor: pointer;
            transition: color 0.2s;
        }
        
        body[data-theme="light"] .news-title {
            color: #1e293b;
        }
        
        .news-title:hover {
            color: #38bdf8;
        }
        
        body[data-theme="light"] .news-title:hover {
            color: #0284c7;
        }
        
        .news-description {
            font-size: 0.95rem;
            color: #94a3b8;
            line-height: 1.6;
            margin-bottom: 1rem;
        }
        
        body[data-theme="light"] .news-description {
            color: #64748b;
        }
        
        .news-link {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.9rem;
            color: #38bdf8;
            text-decoration: none;
            transition: all 0.2s;
        }
        
        body[data-theme="light"] .news-link {
            color: #0284c7;
        }
        
        .news-link:hover {
            color: #7dd3fc;
            gap: 0.75rem;
        }
        
        body[data-theme="light"] .news-link:hover {
            color: #38bdf8;
        }
        
        .news-link-icon {
            font-size: 1rem;
            transition: transform 0.2s;
        }
        
        .news-link:hover .news-link-icon {
            transform: translateX(3px);
        }
        
        /* Mobile styles for news */
        @media (max-width: 768px) {
            .news-container {
                padding: 0 0.5rem;
            }
            
            .news-card {
                padding: 1rem;
                border-radius: 12px;
            }
            
            .news-header {
                gap: 0.5rem;
            }
            
            .news-date {
                font-size: 0.75rem;
                padding: 0.2rem 0.5rem;
            }
            
            .news-tag {
                font-size: 0.7rem;
                padding: 0.15rem 0.4rem;
            }
            
            .news-title {
                font-size: 1.1rem;
            }
            
            .news-description {
                font-size: 0.9rem;
            }
        }
        
        @media (max-width: 399px) {
            .news-card {
                padding: 0.85rem;
            }
            
            .news-title {
                font-size: 1rem;
            }
            
            .news-description {
                font-size: 0.85rem;
            }
            
            .news-link {
                font-size: 0.85rem;
            }
        }

        /* ========================================
           SCHEDULE PAGE (NEW)
           ======================================== */
        
        .schedule-container {
            display: flex;
            flex-direction: column;
            gap: 2rem;
            padding-bottom: 4rem;
        }
        
        .schedule-today {
            border-left: 4px solid #38bdf8;
        }
        
        .schedule-week {
            border-left: 4px solid #818cf8;
        }
        
        /* Current Event Highlight - Pulsing Green */
        .schedule-event.current {
            background: #22c55e20;
            border-color: #22c55e;
            animation: currentPulse 2s infinite;
            box-shadow: 0 0 20px #22c55e40;
        }
        
        @keyframes currentPulse {
            0%, 100% { 
                box-shadow: 0 0 15px #22c55e30;
                border-color: #22c55e;
            }
            50% { 
                box-shadow: 0 0 25px #22c55e50;
                border-color: #4ade80;
            }
        }
        
        body[data-theme="light"] .schedule-event.current {
            background: #22c55e15;
            box-shadow: 0 0 15px #22c55e30;
        }
        
        /* Next Event Highlight - Orange Badge */
        .schedule-event.next {
            background: #f9731620;
            border-color: #f97316;
            position: relative;
        }
        
        .schedule-event.next::before {
            content: 'NEXT';
            position: absolute;
            top: -8px;
            right: 10px;
            background: #f97316;
            color: #fff;
            font-size: 0.65rem;
            font-weight: 700;
            padding: 2px 8px;
            border-radius: 4px;
            letter-spacing: 0.05em;
        }
        
        body[data-theme="light"] .schedule-event.next {
            background: #f9731610;
        }
        
        /* Past Events - Grayed Out */
        .schedule-event.past {
            opacity: 0.5;
            filter: grayscale(30%);
        }
        
        body[data-theme="light"] .schedule-event.past {
            opacity: 0.6;
        }
        
        /* Schedule Day Modal */
        .schedule-day-card {
            cursor: pointer;
            transition: all 0.2s ease;
        }
        
        .schedule-day-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        }
        
        body[data-theme="light"] .schedule-day-card:hover {
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        }
        
        .schedule-modal-event {
            background: #00000020;
            border-radius: 12px;
            padding: 1rem;
            border: 1px solid #ffffff10;
            border-left: 4px solid;
            margin-bottom: 0.75rem;
            transition: all 0.2s ease;
        }
        
        body[data-theme="light"] .schedule-modal-event {
            background: #f8fafc;
            border-color: #e2e8f0;
        }
        
        .schedule-modal-event:last-child {
            margin-bottom: 0;
        }
        
        .schedule-modal-event.past {
            opacity: 0.5;
            filter: grayscale(30%);
        }
        
        .schedule-modal-event.current {
            background: #22c55e20;
            border-color: #22c55e;
            animation: currentPulse 2s infinite;
        }
        
        .schedule-modal-event.next {
            background: #f9731620;
            border-color: #f97316;
        }
        
        .schedule-modal-event.type-lecture { border-left-color: #38bdf8; }
        .schedule-modal-event.type-exercise { border-left-color: #f97316; }
        .schedule-modal-event.type-seminar { border-left-color: #a855f7; }
        .schedule-modal-event.type-unknown { border-left-color: #64748b; }
        
        .schedule-modal-time {
            font-size: 0.9rem;
            color: #38bdf8;
            font-weight: 500;
            margin-bottom: 0.5rem;
        }
        
        .schedule-modal-title {
            font-size: 1.1rem;
            font-weight: 600;
            color: #fff;
            margin-bottom: 0.5rem;
        }
        
        body[data-theme="light"] .schedule-modal-title {
            color: #1e293b;
        }
        
        .schedule-modal-info {
            display: flex;
            flex-wrap: wrap;
            gap: 0.75rem;
            font-size: 0.85rem;
            color: #94a3b8;
        }
        
        body[data-theme="light"] .schedule-modal-info {
            color: #64748b;
        }
        
        .schedule-modal-info-item {
            display: flex;
            align-items: center;
            gap: 0.25rem;
        }
        
        .schedule-modal-empty {
            text-align: center;
            color: #64748b;
            font-style: italic;
            padding: 2rem;
        }
        
        /* Today Section Special Styling */
        .schedule-today .schedule-today-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 1rem;
            flex-wrap: wrap;
            gap: 1rem;
        }
        
        .schedule-today-events {
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
        }
        
        .schedule-today-events .schedule-event {
            margin: 0;
        }
        
        .schedule-empty {
            text-align: center;
            color: #64748b;
            padding: 2rem;
            font-style: italic;
        }
        
        body[data-theme="light"] .schedule-empty {
            color: #94a3b8;
        }
        
        /* Week Overview - Day Cards */
        .schedule-week-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 1.5rem;
        }
        
        .schedule-day-card {
            background: #00000020;
            border-radius: 12px;
            padding: 1rem;
            border: 1px solid #ffffff10;
            transition: all 0.2s ease;
        }
        
        body[data-theme="light"] .schedule-day-card {
            background: #ffffff;
            border-color: #e2e8f0;
        }
        
        .schedule-day-card:hover {
            border-color: #ffffff30;
            transform: translateY(-2px);
        }
        
        body[data-theme="light"] .schedule-day-card:hover {
            border-color: #cbd5e1;
        }
        
        .schedule-day-card.today {
            background: #38bdf815;
            border-color: #38bdf8;
            box-shadow: 0 0 20px #38bdf820;
        }
        
        body[data-theme="light"] .schedule-day-card.today {
            background: #38bdf810;
            border-color: #38bdf8;
        }
        
        /* Notification Icon */
        .notification-icon {
            font-size: 0.85rem;
            margin-left: 0.5rem;
            cursor: help;
            opacity: 0.8;
            transition: opacity 0.2s;
        }
        
        .notification-icon:hover {
            opacity: 1;
        }
        
        /* Notification Toggle */
        .notification-toggle {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.75rem 1rem;
            background: #00000020;
            border-radius: 8px;
            margin-top: 1rem;
            border: 1px solid #ffffff10;
        }
        
        body[data-theme="light"] .notification-toggle {
            background: #f8fafc;
            border-color: #e2e8f0;
        }
        
        .notification-toggle-icon {
            font-size: 1.25rem;
        }
        
        .notification-toggle-info {
            flex: 1;
        }
        
        .notification-toggle-title {
            font-weight: 600;
            font-size: 0.9rem;
            color: #e2e8f0;
        }
        
        body[data-theme="light"] .notification-toggle-title {
            color: #1e293b;
        }
        
        .notification-toggle-desc {
            font-size: 0.75rem;
            color: #64748b;
            margin-top: 0.15rem;
        }
        
        .notification-toggle-btn {
            padding: 0.5rem 1rem;
            border-radius: 6px;
            font-size: 0.8rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            border: none;
        }
        
        .notification-toggle-btn.enabled {
            background: #22c55e;
            color: #fff;
        }
        
        .notification-toggle-btn.disabled {
            background: #64748b;
            color: #fff;
        }
        
        .notification-toggle-btn.permission {
            background: #f97316;
            color: #fff;
        }
        
        .notification-toggle-btn:hover {
            opacity: 0.9;
            transform: scale(1.02);
        }
        
        .notification-lead-time {
            font-size: 0.7rem;
            padding: 2px 6px;
            border-radius: 4px;
            margin-left: 0.25rem;
        }
        
        .notification-lead-time.short {
            background: #22c55e30;
            color: #22c55e;
        }
        
        .notification-lead-time.long {
            background: #f9731630;
            color: #f97316;
        }
        
        /* Week Navigation */
        .schedule-week-nav {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 1rem;
            padding: 0.5rem;
            background: #00000020;
            border-radius: 8px;
            border: 1px solid #ffffff10;
        }
        
        body[data-theme="light"] .schedule-week-nav {
            background: #f8fafc;
            border-color: #e2e8f0;
        }
        
        .schedule-week-nav-btn {
            padding: 0.5rem 1rem;
            background: transparent;
            border: 1px solid #ffffff20;
            border-radius: 6px;
            color: #e2e8f0;
            cursor: pointer;
            font-size: 0.85rem;
            transition: all 0.2s;
        }
        
        body[data-theme="light"] .schedule-week-nav-btn {
            color: #1e293b;
            border-color: #cbd5e1;
        }
        
        .schedule-week-nav-btn:hover {
            background: #ffffff10;
            border-color: #38bdf8;
        }
        
        body[data-theme="light"] .schedule-week-nav-btn:hover {
            background: #e2e8f0;
        }
        
        .schedule-week-range {
            font-size: 0.9rem;
            color: #94a3b8;
        }
        
        body[data-theme="light"] .schedule-week-range {
            color: #64748b;
        }
        
        .schedule-day-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 0.75rem;
            padding-bottom: 0.5rem;
            border-bottom: 1px solid #ffffff10;
        }
        
        body[data-theme="light"] .schedule-day-header {
            border-color: #e2e8f0;
        }
        
        .schedule-day-name {
            font-weight: 600;
            color: #e2e8f0;
            font-size: 1rem;
        }
        
        body[data-theme="light"] .schedule-day-name {
            color: #1e293b;
        }
        
        .schedule-day-date {
            font-size: 0.8rem;
            color: #64748b;
        }
        
        .schedule-day-events {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }
        
        .schedule-mini-event {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.5rem;
            background: #ffffff05;
            border-radius: 8px;
            border-left: 3px solid;
            font-size: 0.85rem;
        }
        
        body[data-theme="light"] .schedule-mini-event {
            background: #f8fafc;
        }
        
        .schedule-mini-event.type-lecture { border-left-color: #38bdf8; }
        .schedule-mini-event.type-exercise { border-left-color: #f97316; }
        .schedule-mini-event.type-seminar { border-left-color: #a855f7; }
        .schedule-mini-event.type-unknown { border-left-color: #64748b; }
        
        .schedule-mini-event.current {
            background: #22c55e15;
            border-left-color: #22c55e;
            animation: miniCurrentPulse 2s infinite;
        }
        
        @keyframes miniCurrentPulse {
            0%, 100% { background: #22c55e15; }
            50% { background: #22c55e25; }
        }
        
        body[data-theme="light"] .schedule-mini-event.current {
            background: #22c55e10;
        }
        
        .schedule-mini-event.next {
            background: #f9731615;
            border-left-color: #f97316;
        }
        
        body[data-theme="light"] .schedule-mini-event.next {
            background: #f9731610;
        }
        
        .schedule-mini-event.past {
            opacity: 0.5;
        }
        
        body[data-theme="light"] .schedule-mini-event.past {
            opacity: 0.6;
        }
        
        .schedule-mini-time {
            color: #38bdf8;
            font-weight: 500;
            min-width: 70px;
            font-size: 0.75rem;
        }
        
        .schedule-mini-title {
            color: #e2e8f0;
            flex: 1;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        body[data-theme="light"] .schedule-mini-title {
            color: #1e293b;
        }
        
        .schedule-mini-badge {
            font-size: 0.6rem;
            padding: 2px 6px;
            border-radius: 4px;
            font-weight: 600;
            text-transform: uppercase;
        }
        
        .schedule-mini-badge.next {
            background: #f97316;
            color: #fff;
        }
        
        .schedule-mini-badge.current {
            background: #22c55e;
            color: #0f172a;
        }
        
        .schedule-day-empty {
            text-align: center;
            color: #64748b;
            font-size: 0.85rem;
            font-style: italic;
            padding: 1rem 0;
        }
        
        body[data-theme="light"] .schedule-day-empty {
            color: #94a3b8;
        }
        
        /* Today Badge */
        .schedule-today-badge-inline {
            display: inline-flex;
            align-items: center;
            gap: 0.25rem;
            background: #38bdf8;
            color: #0f172a;
            font-size: 0.7rem;
            font-weight: 700;
            padding: 0.2rem 0.5rem;
            border-radius: 4px;
            text-transform: uppercase;
        }
        
        /* ========================================
           HAMBURGER MENU (Mobile Navigation)
           ======================================== */
        
        .hamburger {
            display: none;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            width: 44px;
            height: 44px;
            min-width: 44px;
            min-height: 44px;
            background: transparent;
            border: none;
            cursor: pointer;
            padding: 0;
            z-index: 1002;
            position: relative;
            -webkit-tap-highlight-color: transparent;
            -webkit-touch-callout: none;
            touch-action: manipulation;
        }
        
        .hamburger span {
            display: block;
            width: 24px;
            height: 3px;
            background: #e2e8f0;
            border-radius: 2px;
            transition: all 0.3s ease;
            position: absolute;
            pointer-events: none;
        }
        
        .hamburger span:nth-child(1) {
            transform: translateY(-7px);
        }
        
        .hamburger span:nth-child(2) {
            transform: translateY(0);
        }
        
        .hamburger span:nth-child(3) {
            transform: translateY(7px);
        }
        
        .hamburger.active span:nth-child(1) {
            transform: translateY(0) rotate(45deg);
        }
        
        .hamburger.active span:nth-child(2) {
            opacity: 0;
        }
        
        .hamburger.active span:nth-child(3) {
            transform: translateY(0) rotate(-45deg);
        }
        
        body[data-theme="light"] .hamburger span {
            background: #1e293b;
        }
        
        /* Add visible background circle for touch target on mobile */
        .hamburger::before {
            content: '';
            position: absolute;
            width: 44px;
            height: 44px;
            background: #ffffff15;
            border-radius: 50%;
            opacity: 0;
            transition: opacity 0.2s ease;
        }
        
        .hamburger:active::before {
            opacity: 1;
        }
        
        body[data-theme="light"] .hamburger::before {
            background: #00000015;
        }
        
        /* Mobile menu overlay */
        .nav-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.6);
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
            z-index: 1001;
            /* Safe area for notch/home indicator */
            padding-top: env(safe-area-inset-top);
            padding-bottom: env(safe-area-inset-bottom);
        }
        
        .nav-overlay.active {
            opacity: 1;
            visibility: visible;
        }
        
        /* Mobile menu panel */
        .nav-menu-mobile {
            position: fixed;
            top: 0;
            right: -280px;
            width: 280px;
            height: 100%;
            height: 100dvh;
            background: #1e293b;
            transition: right 0.3s ease;
            z-index: 1002;
            padding: calc(80px + env(safe-area-inset-top)) 1.5rem calc(2rem + env(safe-area-inset-bottom));
            overflow-y: auto;
            border-left: 1px solid #ffffff10;
            -webkit-overflow-scrolling: touch;
        }
        
        .nav-menu-mobile.active {
            right: 0;
        }
        
        body[data-theme="light"] .nav-menu-mobile {
            background: #ffffff;
            border-left-color: #e2e8f0;
        }
        
        .nav-menu-mobile .nav-tab {
            display: block;
            width: 100%;
            padding: 1rem 1.25rem;
            text-align: left;
            border-radius: 12px;
            margin-bottom: 0.5rem;
            font-size: 1.1rem;
            min-height: 48px;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
        }
        
        /* Settings section in mobile menu */
        .nav-menu-mobile .settings-section {
            padding: 0.5rem 0;
        }
        
        .nav-menu-mobile .settings-label {
            font-size: 0.7rem;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: #94a3b8;
            padding: 0 0.25rem;
            margin-bottom: 0.5rem;
            font-weight: 600;
        }
        
        body[data-theme="light"] .nav-menu-mobile .settings-label {
            color: #64748b;
        }
        
        .nav-menu-mobile .settings-options {
            display: flex;
            gap: 0.25rem;
        }
        
        .nav-menu-mobile .settings-divider {
            height: 1px;
            background: #ffffff15;
            margin: 1rem 0;
        }
        
        body[data-theme="light"] .nav-menu-mobile .settings-divider {
            background: #e2e8f0;
        }
        
        /* Show hamburger on mobile */
        @media (max-width: 768px) {
            .hamburger {
                display: flex !important;
            }
            
            .nav-tabs {
                display: none !important;
            }
            
            /* Hamburger rechts, Brand links */
            .nav-content {
                justify-content: flex-start;
            }
            
            .nav-brand {
                order: 0;
                flex: 1;
                justify-content: flex-start;
            }
            
            /* Hamburger rechts - Settings ist im Mobile-Menü versteckt */
            .hamburger {
                order: 1;
                margin-left: auto;
            }
            
            /* Settings komplett verstecken auf Mobile - ist im Hamburger-Menü */
            .settings-container {
                display: none !important;
            }
        }
        
        /* ========================================
           MOBILE OPTIMIZATION
           ======================================== */
        
        /* Small phones (< 400px) */
        @media (max-width: 399px) {
            body { 
                padding: 0.75rem; 
                padding-top: 70px;
                padding-left: max(0.75rem, env(safe-area-inset-left));
                padding-right: max(0.75rem, env(safe-area-inset-right));
                padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
            }
            h1 { 
                font-size: 1.4rem; 
            }
            .subtitle { 
                font-size: 0.9rem; 
            }
            header {
                margin-bottom: 1rem;
            }
            
            /* Navigation */
            .nav-container {
                padding: 0.5rem 0.75rem;
                padding-top: max(0.5rem, env(safe-area-inset-top));
                padding-left: max(0.75rem, env(safe-area-inset-left));
                padding-right: max(0.75rem, env(safe-area-inset-right));
            }
            .nav-brand {
                font-size: 1rem;
                gap: 0.5rem;
            }
            .nav-brand-icon {
                font-size: 1.25rem;
            }
            .nav-tab {
                padding: 0.5rem 0.75rem;
                font-size: 0.85rem;
            }
            
            /* Hamburger - ensure visibility */
            .hamburger {
                width: 44px !important;
                height: 44px !important;
                min-width: 44px !important;
                min-height: 44px !important;
            }
            
            .hamburger span {
                width: 22px;
                height: 3px;
            }
            
            /* Mobile menu adjustments */
            .nav-menu-mobile {
                width: 280px;
                padding: calc(70px + env(safe-area-inset-top)) 1rem calc(1rem + env(safe-area-inset-bottom));
            }
            
            /* Hierarchy */
            .hierarchy-level {
                padding: 1rem;
                border-radius: 12px;
            }
            .level-label {
                font-size: 0.65rem;
                margin-bottom: 0.75rem;
            }
            
            /* Single column for all levels */
            .level-1 .agents-row,
            .level-2 .agents-row,
            .level-3 .agents-row {
                grid-template-columns: 1fr;
                gap: 1rem;
            }
            
            /* Agent cards */
            .agent-card {
                padding: 1rem;
                border-radius: 10px;
            }
            .agent-icon {
                font-size: 2rem;
                min-width: 50px;
                padding: 0.4rem;
                border-radius: 10px;
            }
            .agent-name {
                font-size: 1rem;
            }
            .agent-role {
                font-size: 0.7rem;
            }
            .click-hint {
                display: none;
            }
            
            /* Modal - fullscreen */
            .modal-overlay.active {
                align-items: flex-end;
            }
            .modal-content {
                width: 100%;
                max-width: 100%;
                max-height: 90vh;
                border-radius: 16px 16px 0 0;
                border-bottom: none;
            }
            .modal-header {
                padding: 1rem;
            }
            .modal-icon {
                font-size: 2.5rem;
            }
            .modal-title h2 {
                font-size: 1.25rem;
            }
            .modal-body {
                padding: 1rem;
            }
            
            /* Stats */
            .stats-grid {
                grid-template-columns: 1fr;
                gap: 1rem;
            }
            .card {
                padding: 1rem;
                border-radius: 12px;
            }
            .card h2 {
                font-size: 1rem;
            }
            .metric-label, .metric-value {
                font-size: 0.85rem;
            }
            
            /* Activity log */
            .activity-log {
                max-height: 150px;
                font-size: 0.75rem;
                padding: 0.75rem;
            }
            
            /* Buttons */
            #jokeBtn {
                padding: 0.75rem;
                font-size: 0.9rem;
            }
            
            footer {
                margin-top: 2rem;
                font-size: 0.75rem;
            }
            
            /* Calisthenics mobile */
            .calisthenics-container {
                gap: 1rem;
            }
            .calisthenics-section {
                padding: 1rem;
                border-radius: 12px;
            }
            .section-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 0.5rem;
            }
            .section-title-main {
                font-size: 1rem;
            }
            .workout-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 0.75rem;
            }
            .workout-title {
                font-size: 1.15rem;
            }
            .workout-type {
                font-size: 0.8rem;
            }
            .workout-badge {
                font-size: 0.7rem;
                padding: 0.35rem 0.65rem;
            }
            .workout-description {
                font-size: 0.85rem;
            }
            /* Calendar mobile improvements */
            .calendar-header {
                flex-wrap: wrap;
                gap: 0.5rem;
            }
            .calendar-nav {
                width: 100%;
                justify-content: space-between;
            }
            .calendar-grid {
                gap: 2px;
                display: grid;
                grid-template-columns: repeat(7, 1fr);
            }
            .calendar-weekday {
                font-size: 0.6rem;
                padding: 0.25rem 0;
            }
            .calendar-day {
                min-height: 38px;
                padding: 2px;
                border-radius: 6px;
            }
            .calendar-day-number {
                font-size: 0.7rem;
            }
            .calendar-day-workout {
                font-size: 0.45rem;
                line-height: 1.1;
            }
            .calendar-nav-btn {
                padding: 0.4rem 0.6rem;
                font-size: 0.8rem;
            }
            .calendar-current-month {
                font-size: 0.9rem;
            }
            .calendar-legend {
                gap: 0.4rem;
                font-size: 0.65rem;
                flex-wrap: wrap;
            }
            .legend-color {
                width: 10px;
                height: 10px;
            }
            .exercises-grid {
                grid-template-columns: 1fr;
            }
            .exercise-item {
                padding: 0.75rem;
                gap: 0.75rem;
            }
            .exercise-icon {
                width: 36px;
                height: 36px;
                font-size: 1.1rem;
            }
            .exercise-name {
                font-size: 0.85rem;
            }
            .exercise-muscles {
                font-size: 0.6rem;
            }
            .exercise-sets {
                font-size: 0.8rem;
                padding: 0.3rem 0.45rem;
            }
            /* Full Plan mobile */
            .full-plan {
                max-height: 400px;
                padding-bottom: 2rem;
            }
            .week-header {
                padding: 0.5rem 0.65rem;
            }
            .week-number {
                font-size: 0.9rem;
            }
            .week-type {
                font-size: 0.65rem;
                padding: 0.15rem 0.4rem;
            }
            .week-days {
                grid-template-columns: 1fr;
                gap: 0.4rem;
                padding-left: 0;
            }
            .day-card {
                padding: 0.65rem;
            }
            .day-name {
                font-size: 0.85rem;
            }
            .day-exercises {
                font-size: 0.75rem;
            }
            .day-exercise-item {
                padding: 0.25rem 0;
            }
            .cycle-info {
                flex-direction: column;
                gap: 0.75rem;
                padding: 0.75rem;
            }
            .cycle-stat-value {
                font-size: 1.25rem;
            }
        }
        
        /* Medium phones (400px - 600px) */
        @media (min-width: 400px) and (max-width: 600px) {
            body { 
                padding: 1rem;
                padding-top: 75px;
                padding-left: max(1rem, env(safe-area-inset-left));
                padding-right: max(1rem, env(safe-area-inset-right));
                padding-bottom: max(1rem, env(safe-area-inset-bottom));
            }
            h1 { 
                font-size: 1.75rem; 
            }
            .subtitle { 
                font-size: 0.95rem; 
            }
            header {
                margin-bottom: 1.5rem;
            }
            
            /* Navigation */
            .nav-container {
                padding: 0.6rem 1rem;
                padding-top: max(0.6rem, env(safe-area-inset-top));
                padding-left: max(1rem, env(safe-area-inset-left));
                padding-right: max(1rem, env(safe-area-inset-right));
            }
            .nav-brand {
                font-size: 1.1rem;
            }
            
            /* Hamburger - ensure visibility */
            .hamburger {
                width: 44px !important;
                height: 44px !important;
                min-width: 44px !important;
                min-height: 44px !important;
            }
            
            /* Mobile menu adjustments */
            .nav-menu-mobile {
                width: 280px;
                padding: calc(75px + env(safe-area-inset-top)) 1.25rem calc(1.5rem + env(safe-area-inset-bottom));
            }
            
            /* Hierarchy */
            .hierarchy-level {
                padding: 1.25rem;
            }
            
            /* Single column for all levels */
            .level-1 .agents-row,
            .level-2 .agents-row,
            .level-3 .agents-row {
                grid-template-columns: 1fr;
                gap: 1rem;
            }
            
            /* Agent cards */
            .agent-card {
                padding: 1.1rem;
            }
            .agent-icon {
                font-size: 2.2rem;
                min-width: 55px;
            }
            .agent-name {
                font-size: 1.05rem;
            }
            .click-hint {
                display: none;
            }
            
            /* Modal - fullscreen */
            .modal-overlay.active {
                align-items: flex-end;
            }
            .modal-content {
                width: 100%;
                max-width: 100%;
                max-height: 92vh;
                border-radius: 16px 16px 0 0;
            }
            
            /* Stats */
            .stats-grid {
                grid-template-columns: 1fr;
            }
            
            footer {
                font-size: 0.8rem;
            }
            
            /* Calisthenics mobile */
            .calisthenics-container {
                gap: 1.25rem;
            }
            .calisthenics-section {
                padding: 1.25rem;
            }
            .section-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 0.6rem;
            }
            .section-title-main {
                font-size: 1.1rem;
            }
            .workout-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 0.75rem;
            }
            .workout-title {
                font-size: 1.3rem;
            }
            .workout-type {
                font-size: 0.85rem;
            }
            .workout-badge {
                font-size: 0.75rem;
                padding: 0.4rem 0.8rem;
            }
            /* Calendar mobile improvements */
            .calendar-header {
                flex-wrap: wrap;
                gap: 0.5rem;
            }
            .calendar-nav {
                width: 100%;
                justify-content: space-between;
            }
            .calendar-grid {
                gap: 3px;
                display: grid;
                grid-template-columns: repeat(7, 1fr);
            }
            .calendar-weekday {
                font-size: 0.65rem;
                padding: 0.35rem 0;
            }
            .calendar-day {
                min-height: 44px;
                padding: 3px;
                border-radius: 8px;
            }
            .calendar-day-number {
                font-size: 0.8rem;
            }
            .calendar-day-workout {
                font-size: 0.5rem;
                display: block;
                line-height: 1.2;
            }
            .calendar-nav-btn {
                padding: 0.45rem 0.8rem;
                font-size: 0.85rem;
            }
            .calendar-current-month {
                font-size: 1rem;
            }
            .calendar-legend {
                gap: 0.6rem;
                font-size: 0.7rem;
            }
            .legend-color {
                width: 12px;
                height: 12px;
            }
            .exercises-grid {
                grid-template-columns: 1fr;
            }
            .exercise-item {
                padding: 0.85rem;
                gap: 0.85rem;
            }
            .exercise-icon {
                width: 40px;
                height: 40px;
                font-size: 1.25rem;
            }
            .exercise-name {
                font-size: 0.9rem;
            }
            .exercise-muscles {
                font-size: 0.7rem;
            }
            .exercise-sets {
                font-size: 0.85rem;
                padding: 0.4rem 0.6rem;
            }
            /* Full Plan mobile */
            .full-plan {
                max-height: 450px;
                padding-bottom: 2rem;
            }
            .week-header {
                padding: 0.65rem 0.85rem;
            }
            .week-number {
                font-size: 1rem;
            }
            .week-type {
                font-size: 0.7rem;
                padding: 0.2rem 0.5rem;
            }
            .week-days {
                grid-template-columns: repeat(2, 1fr);
                gap: 0.5rem;
                padding-left: 0;
            }
            .day-card {
                padding: 0.75rem;
            }
            .day-name {
                font-size: 0.85rem;
            }
            .day-exercises {
                font-size: 0.75rem;
            }
            .cycle-info {
                flex-wrap: wrap;
                gap: 1rem;
                padding: 0.85rem;
            }
            .cycle-stat-value {
                font-size: 1.35rem;
            }
        }
        
        /* Large phones / Small tablets (600px - 768px) */
        @media (min-width: 600px) and (max-width: 768px) {
            body { 
                padding: 1.25rem;
                padding-top: 75px;
                padding-left: max(1.25rem, env(safe-area-inset-left));
                padding-right: max(1.25rem, env(safe-area-inset-right));
                padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
            }
            h1 { 
                font-size: 2rem; 
            }
            
            /* Navigation */
            .nav-container {
                padding-top: max(0.75rem, env(safe-area-inset-top));
                padding-left: max(1.5rem, env(safe-area-inset-left));
                padding-right: max(1.5rem, env(safe-area-inset-right));
            }
            
            /* Hamburger - ensure visibility */
            .hamburger {
                width: 44px !important;
                height: 44px !important;
                min-width: 44px !important;
                min-height: 44px !important;
            }
            
            /* Mobile menu adjustments */
            .nav-menu-mobile {
                width: 300px;
                padding: calc(75px + env(safe-area-inset-top)) 1.5rem calc(2rem + env(safe-area-inset-bottom));
            }
            
            /* Two columns for level 2 and 3 */
            .level-1 .agents-row {
                grid-template-columns: 1fr;
            }
            .level-2 .agents-row,
            .level-3 .agents-row {
                grid-template-columns: repeat(2, 1fr);
                gap: 1rem;
            }
            
            /* Agent cards */
            .agent-card {
                padding: 1rem;
            }
            .click-hint {
                display: none;
            }
            
            /* Modal - fullscreen */
            .modal-overlay.active {
                align-items: flex-end;
            }
            .modal-content {
                width: 100%;
                max-width: 100%;
                max-height: 92vh;
                border-radius: 16px 16px 0 0;
            }
            
            /* Stats - two columns */
            .stats-grid {
                grid-template-columns: repeat(2, 1fr);
            }
            
            /* Calisthenics tablet-ish */
            .calisthenics-container {
                gap: 1.5rem;
            }
            .calisthenics-section {
                padding: 1.25rem;
            }
            .section-title-main {
                font-size: 1.2rem;
            }
            .workout-title {
                font-size: 1.5rem;
            }
            .workout-header {
                flex-wrap: wrap;
                gap: 0.75rem;
            }
            /* Calendar improvements for tablet-ish */
            .calendar-header {
                flex-wrap: wrap;
                gap: 0.5rem;
            }
            .calendar-nav {
                flex-wrap: nowrap;
            }
            .calendar-grid {
                gap: 4px;
                display: grid;
                grid-template-columns: repeat(7, 1fr);
            }
            .calendar-day {
                min-height: 50px;
                padding: 4px;
            }
            .calendar-day-number {
                font-size: 0.85rem;
            }
            .calendar-day-workout {
                font-size: 0.55rem;
            }
            .exercises-grid {
                grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
            }
            /* Full Plan improvements */
            .full-plan {
                max-height: 550px;
                padding-bottom: 2rem;
            }
            .week-days {
                grid-template-columns: repeat(2, 1fr);
                gap: 0.7rem;
                padding-left: 0;
            }
            .day-card {
                padding: 0.85rem;
            }
            .day-name {
                font-size: 0.9rem;
            }
            .day-exercises {
                font-size: 0.8rem;
            }
            .cycle-info {
                gap: 1.5rem;
                padding: 1rem;
            }
            .cycle-stat-value {
                font-size: 1.4rem;
            }
        }
        
        /* Tablets (768px - 1024px) */
        @media (min-width: 768px) and (max-width: 1024px) {
            body { padding: 1.5rem; }
            h1 { font-size: 2.25rem; }
            
            /* Keep 2 columns for dev team */
            .level-2 .agents-row,
            .level-3 .agents-row {
                grid-template-columns: repeat(2, 1fr);
            }
            
            /* Modal - centered but smaller */
            .modal-content {
                max-width: 450px;
            }
        }
        
        /* Touch device optimizations */
        @media (hover: none) and (pointer: coarse) {
            /* Remove hover effects that don't work well on touch */
            .agent-card:hover {
                transform: none;
            }
            .agent-card:active {
                transform: scale(0.98);
                border-color: #ffffff30;
            }
            
            /* Larger touch targets */
            .settings-btn {
                min-width: 44px;
                min-height: 44px;
            }
            .lang-btn, .theme-btn {
                min-height: 44px;
            }
            
            .close-btn {
                min-width: 48px;
                min-height: 48px;
            }
            
            #jokeBtn {
                min-height: 52px;
            }
            
            /* Add active state feedback */
            .settings-btn:active,
            .lang-btn:active,
            .theme-btn:active,
            #jokeBtn:active {
                transform: scale(0.95);
            }
            
            /* Hamburger touch optimization */
            .hamburger:active {
                transform: scale(0.95);
            }
            
            .hamburger::before {
                opacity: 0;
            }
            
            .hamburger:active::before {
                opacity: 1;
            }
            
            /* Mobile nav tabs touch optimization */
            .nav-menu-mobile .nav-tab:active {
                transform: scale(0.98);
                background: #ffffff15;
            }
            
            body[data-theme="light"] .nav-menu-mobile .nav-tab:active {
                background: #00000010;
            }
            
            /* Calisthenics touch optimization */
            .week-header {
                min-height: 48px;
                padding: 0.75rem 1rem;
            }
            .week-header:active {
                transform: scale(0.98);
                background: #00000050;
            }
            .calendar-day {
                min-height: 44px;
            }
            .calendar-day:active {
                transform: scale(0.95);
            }
            .calendar-nav-btn {
                min-height: 44px;
                min-width: 44px;
            }
            .exercise-item {
                min-height: 48px;
            }
        }
        
        /* ========================================
           MOBILE WEEKLY CALENDAR VIEW
           ======================================== */
        
        /* Default: Desktop calendar shown, mobile hidden */
        .calendar-desktop {
            display: block;
        }
        
        .calendar-mobile {
            display: none;
        }
        
        /* Mobile screens: Show weekly view instead */
        @media (max-width: 768px) {
            .calendar-desktop {
                display: none !important;
            }
            
            .calendar-mobile {
                display: block !important;
            }
            
            /* Weekly calendar grid - vertical layout */
            .calendar-week-grid {
                display: flex;
                flex-direction: column;
                gap: 0.5rem;
            }
            
            /* Week day card - full width, vertical layout */
            .calendar-week-day {
                display: flex;
                flex-direction: column;
                padding: 0.75rem;
                background: #00000020;
                border-radius: 12px;
                border: 1px solid transparent;
                cursor: pointer;
                transition: all 0.2s ease;
                min-height: 60px;
            }
            
            .calendar-week-day:active {
                transform: scale(0.98);
            }
            
            body[data-theme="light"] .calendar-week-day {
                background: #f8fafc;
                border-color: #e2e8f0;
            }
            
            .calendar-week-day:active {
                background: #ffffff15;
            }
            
            body[data-theme="light"] .calendar-week-day:active {
                background: #f1f5f9;
            }
            
            /* Today highlight */
            .calendar-week-day.today {
                background: #38bdf820;
                border: 3px solid #38bdf8 !important;
                box-shadow: 0 0 16px rgba(56, 189, 248, 0.5), 0 0 24px rgba(56, 189, 248, 0.3);
            }

            .calendar-week-day.today .calendar-week-day-name {
                color: #38bdf8 !important;
                font-weight: 700 !important;
            }

            .calendar-week-day.today .calendar-week-day-today-badge {
                display: inline-block;
                font-size: 0.6rem;
                font-weight: 700;
                color: #0f172a;
                background: #38bdf8;
                padding: 2px 6px;
                border-radius: 4px;
                text-transform: uppercase;
                letter-spacing: 0.5px;
                margin-left: 0.5rem;
            }

            body[data-theme="light"] .calendar-week-day.today {
                background: #38bdf815;
                border: 3px solid #0284c7 !important;
                box-shadow: 0 0 12px rgba(2, 132, 199, 0.3), 0 0 20px rgba(2, 132, 199, 0.2);
            }

            body[data-theme="light"] .calendar-week-day.today .calendar-week-day-name {
                color: #0284c7 !important;
            }

            body[data-theme="light"] .calendar-week-day.today .calendar-week-day-today-badge {
                background: #0284c7;
                color: white;
            }
            
            /* Workout type colors */
            .calendar-week-day.front-lever {
                border-left: 4px solid #818cf8;
            }
            
            .calendar-week-day.planche {
                border-left: 4px solid #f472b6;
            }
            
            .calendar-week-day.rest-day {
                border-left: 4px solid #6b7280; /* Gray */
                background: #6b728015; /* Gray - not green */
            }
            
            .calendar-week-day.deload {
                border-left: 4px solid #f97316;
                background: #f9731615;
            }
            
            body[data-theme="light"] .calendar-week-day.front-lever {
                border-left-color: #6366f1;
            }
            
            body[data-theme="light"] .calendar-week-day.planche {
                border-left-color: #ec4899;
            }
            
            body[data-theme="light"] .calendar-week-day.rest-day {
                border-left-color: #6b7280; /* Gray */
                background: #f3f4f6; /* Light gray */
            }
            
            body[data-theme="light"] .calendar-week-day.deload {
                border-left-color: #f97316;
                background: #f9731610;
            }
            
            /* Day header row */
            .calendar-week-day-header {
                display: flex;
                align-items: center;
                justify-content: space-between;
                margin-bottom: 0.5rem;
            }
            
            .calendar-week-day-name {
                font-weight: 600;
                font-size: 1rem;
                color: #e2e8f0;
            }
            
            body[data-theme="light"] .calendar-week-day-name {
                color: #1e293b;
            }
            
            .calendar-week-day.today .calendar-week-day-name {
                color: #38bdf8;
            }
            
            body[data-theme="light"] .calendar-week-day.today .calendar-week-day-name {
                color: #0284c7;
            }
            
            .calendar-week-day-date {
                font-size: 0.85rem;
                color: #64748b;
            }
            
            /* Workout info */
            .calendar-week-day-workout {
                font-size: 0.9rem;
                font-weight: 500;
                color: #94a3b8;
                margin-bottom: 0.25rem;
            }
            
            body[data-theme="light"] .calendar-week-day-workout {
                color: #64748b;
            }
            
            .calendar-week-day-type {
                display: inline-flex;
                align-items: center;
                gap: 0.25rem;
                font-size: 0.75rem;
                padding: 0.2rem 0.5rem;
                border-radius: 9999px;
                font-weight: 500;
            }
            
            .calendar-week-day-type.pull {
                background: #818cf820;
                color: #a5b4fc;
            }
            
            .calendar-week-day-type.push {
                background: #f472b620;
                color: #f9a8d4;
            }
            
            .calendar-week-day-type.rest {
                background: #6b728020;
                color: #9ca3af;
            }
            
            body[data-theme="light"] .calendar-week-day-type.pull {
                background: #6366f120;
                color: #4f46e5;
            }
            
            body[data-theme="light"] .calendar-week-day-type.push {
                background: #ec489920;
                color: #db2777;
            }
            
            body[data-theme="light"] .calendar-week-day-type.rest {
                background: #6b728020;
                color: #6b7280;
            }
            
            /* Current workout indicator */
            .calendar-week-day.current-workout {
                background: #22c55e20;
                border-color: #22c55e;
            }
            
            body[data-theme="light"] .calendar-week-day.current-workout {
                background: #22c55e15;
                border-color: #22c55e;
            }
            
            /* Week navigation touch-friendly */
            .calendar-mobile .calendar-nav {
                width: 100%;
                justify-content: space-between;
            }
            
            .calendar-mobile .calendar-nav-btn {
                min-width: 48px;
                min-height: 48px;
                padding: 0.75rem 1rem;
                font-size: 1rem;
            }
            
            .calendar-current-week {
                font-size: 1rem;
                font-weight: 600;
                color: #fff;
            }
            
            body[data-theme="light"] .calendar-current-week {
                color: #1e293b;
            }
            
            /* Today button for mobile */
            .calendar-today-btn {
                padding: 0.5rem 1rem;
                background: #38bdf820;
                border: 1px solid #38bdf840;
                border-radius: 8px;
                color: #38bdf8;
                cursor: pointer;
                font-size: 0.85rem;
                font-weight: 500;
                transition: all 0.2s ease;
            }
            
            .calendar-today-btn:active {
                transform: scale(0.95);
                background: #38bdf830;
            }
            
            body[data-theme="light"] .calendar-today-btn {
                background: #0284c720;
                border-color: #0284c740;
                color: #0284c7;
            }
            
            /* Week number badge */
            .calendar-week-number {
                font-size: 0.75rem;
                padding: 0.2rem 0.5rem;
                border-radius: 9999px;
                background: #38bdf820;
                color: #38bdf8;
                font-weight: 500;
            }
            
            body[data-theme="light"] .calendar-week-number {
                background: #0284c720;
                color: #0284c7;
            }
            
            .calendar-week-number.deload {
                background: #f59e0b20;
                color: #fcd34d;
            }
            
            body[data-theme="light"] .calendar-week-number.deload {
                background: #f59e0b20;
                color: #d97706;
            }
        }
        
        /* Small phones (< 400px) - more compact */
        @media (max-width: 399px) {
            .calendar-week-day {
                padding: 0.6rem;
                min-height: 50px;
            }
            
            .calendar-week-day-name {
                font-size: 0.9rem;
            }
            
            .calendar-week-day-date {
                font-size: 0.75rem;
            }
            
            .calendar-week-day-workout {
                font-size: 0.8rem;
            }
            
            .calendar-week-day-type {
                font-size: 0.65rem;
            }
            
            .calendar-mobile .calendar-nav-btn {
                min-width: 44px;
                min-height: 44px;
                padding: 0.5rem 0.75rem;
                font-size: 0.9rem;
            }
            
            .calendar-current-week {
                font-size: 0.85rem;
            }
        }
        
        /* Additional Safari/iOS fixes */
        @supports (-webkit-touch-callout: none) {
            /* Ensure proper z-index stacking for iOS */
            .nav-container {
                z-index: 1000;
            }
            .nav-overlay {
                z-index: 1001;
            }
            .nav-menu-mobile {
                z-index: 1002;
            }
            .hamburger {
                z-index: 1003;
            }
            .settings-container {
                z-index: 1000;
            }
            .settings-dropdown {
                z-index: 1004;
            }
            
            /* Fix for iOS rubber-band scrolling */
            .nav-menu-mobile {
                -webkit-overflow-scrolling: touch;
                overscroll-behavior: contain;
            }
        }
        
        /* ============================================
           HEALTH PAGE STYLES
           ============================================ */
        
        .health-container {
            max-width: 1000px;
            margin: 0 auto;
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
        }
        
        .health-section {
            background: #00000030;
            border-radius: 12px;
            border: 1px solid #ffffff15;
            padding: 1.5rem;
        }
        
        body[data-theme="light"] .health-section {
            background: #ffffff;
            border-color: #e2e8f0;
        }
        
        .health-section .section-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 1rem;
        }
        
        .health-last-update {
            font-size: 0.8rem;
            color: #64748b;
        }
        
        /* Health Status Grid */
        .health-status-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
            gap: 0.75rem;
        }
        
        .health-status-card {
            background: #00000020;
            border-radius: 10px;
            padding: 1rem;
            text-align: center;
            border: 1px solid #ffffff10;
            transition: all 0.3s ease;
        }
        
        body[data-theme="light"] .health-status-card {
            background: #f8fafc;
            border-color: #e2e8f0;
        }
        
        .health-status-card.ok {
            border-color: #22c55e40;
            background: #22c55e10;
        }
        
        body[data-theme="light"] .health-status-card.ok {
            border-color: #22c55e60;
            background: #22c55e15;
        }
        
        .health-status-card.warning {
            border-color: #f9731640;
            background: #f9731610;
        }
        
        body[data-theme="light"] .health-status-card.warning {
            border-color: #f9731660;
            background: #f9731615;
        }
        
        .health-status-card.error {
            border-color: #ef444440;
            background: #ef444410;
        }
        
        body[data-theme="light"] .health-status-card.error {
            border-color: #ef444460;
            background: #ef444415;
        }
        
        .health-status-card.loading {
            border-color: #38bdf840;
            background: #38bdf810;
        }
        
        .health-status-icon {
            font-size: 1.5rem;
            margin-bottom: 0.5rem;
        }
        
        .health-status-label {
            font-size: 0.85rem;
            color: #94a3b8;
        }
        
        body[data-theme="light"] .health-status-label {
            color: #64748b;
        }
        
        .health-status-value {
            font-size: 0.75rem;
            color: #64748b;
            margin-top: 0.25rem;
        }
        
        /* Health Checks List */
        .health-checks-list {
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
        }
        
        .health-check-loading {
            text-align: center;
            color: #64748b;
            padding: 2rem;
        }
        
        .health-check-item {
            background: #00000020;
            border-radius: 8px;
            padding: 1rem;
            border: 1px solid #ffffff10;
            display: grid;
            grid-template-columns: auto 1fr auto auto;
            gap: 1rem;
            align-items: center;
        }
        
        body[data-theme="light"] .health-check-item {
            background: #f8fafc;
            border-color: #e2e8f0;
        }
        
        .health-check-item.ok {
            border-left: 3px solid #22c55e;
        }
        
        .health-check-item.warning {
            border-left: 3px solid #f97316;
        }
        
        .health-check-item.error {
            border-left: 3px solid #ef4444;
        }
        
        .health-check-timestamp {
            font-size: 0.8rem;
            color: #64748b;
            min-width: 50px;
        }
        
        .health-check-type {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        .health-check-type-icon {
            font-size: 1rem;
        }
        
        .health-check-type-name {
            font-weight: 500;
            color: #e2e8f0;
        }
        
        body[data-theme="light"] .health-check-type-name {
            color: #1e293b;
        }
        
        .health-check-message {
            font-size: 0.85rem;
            color: #94a3b8;
            text-align: right;
        }
        
        body[data-theme="light"] .health-check-message {
            color: #64748b;
        }
        
        .health-status-badge {
            display: inline-flex;
            align-items: center;
            gap: 0.25rem;
            padding: 0.35rem 0.75rem;
            border-radius: 6px;
            font-size: 0.75rem;
            font-weight: 600;
        }
        
        .health-status-badge.ok {
            background: #22c55e20;
            color: #22c55e;
        }
        
        body[data-theme="light"] .health-status-badge.ok {
            background: #22c55e30;
        }
        
        .health-status-badge.warning {
            background: #f9731620;
            color: #f97316;
        }
        
        body[data-theme="light"] .health-status-badge.warning {
            background: #f9731630;
        }
        
        .health-status-badge.error {
            background: #ef444420;
            color: #ef4444;
        }
        
        body[data-theme="light"] .health-status-badge.error {
            background: #ef444430;
        }
        
        /* Health Legend */
        .health-legend {
            background: transparent;
            border: 1px dashed #ffffff20;
            padding: 1rem;
        }
        
        body[data-theme="light"] .health-legend {
            border-color: #cbd5e1;
        }
        
        .health-legend-title {
            font-size: 0.85rem;
            color: #94a3b8;
            margin-bottom: 0.75rem;
        }
        
        .health-legend-items {
            display: flex;
            flex-wrap: wrap;
            gap: 1rem;
        }
        
        .health-legend-item {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.8rem;
            color: #94a3b8;
        }
        
        body[data-theme="light"] .health-legend-item {
            color: #64748b;
        }
        
        /* ============================================
           LIVE AGENT ACTIVITY STYLES
           ============================================ */
        
        .agent-current-task {
            margin-top: 0.75rem;
            padding: 0.75rem;
            background: #00000030;
            border-radius: 8px;
            border: 1px solid #ffffff10;
        }
        
        body[data-theme="light"] .agent-current-task {
            background: #f1f5f9;
            border-color: #e2e8f0;
        }
        
        .agent-task-label {
            font-size: 0.7rem;
            color: #64748b;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 0.25rem;
        }
        
        .agent-task-text {
            font-size: 0.85rem;
            color: #e2e8f0;
            line-height: 1.4;
            word-break: break-word;
        }
        
        body[data-theme="light"] .agent-task-text {
            color: #334155;
        }
        
        .agent-task-text.delegation {
            color: #38bdf8;
            font-style: italic;
        }
        
        body[data-theme="light"] .agent-task-text.delegation {
            color: #0284c7;
        }
        
        /* Progress Bar */
        .agent-progress {
            margin-top: 0.5rem;
        }
        
        .agent-progress-bar {
            height: 4px;
            background: #00000040;
            border-radius: 2px;
            overflow: hidden;
        }
        
        body[data-theme="light"] .agent-progress-bar {
            background: #e2e8f0;
        }
        
        .agent-progress-fill {
            height: 100%;
            background: linear-gradient(90deg, #38bdf8, #22c55e);
            border-radius: 2px;
            transition: width 0.5s ease;
        }
        
        .agent-progress-text {
            font-size: 0.7rem;
            color: #64748b;
            margin-top: 0.25rem;
            text-align: right;
        }
        
        /* Delegation Indicator */
        .delegation-chain {
            display: flex;
            flex-direction: column;
            gap: 0.25rem;
            margin-top: 0.5rem;
            padding: 0.5rem;
            background: #38bdf815;
            border-radius: 6px;
            border: 1px solid #38bdf830;
        }
        
        body[data-theme="light"] .delegation-chain {
            background: #38bdf820;
        }
        
        .delegation-arrow {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.75rem;
            color: #38bdf8;
        }
        
        .delegation-arrow-icon {
            font-size: 0.9rem;
        }
        
        /* Activity Log */
        .activity-log-container {
            margin-top: 1.5rem;
            background: #00000030;
            border-radius: 12px;
            border: 1px solid #ffffff15;
            overflow: hidden;
        }
        
        body[data-theme="light"] .activity-log-container {
            background: #f8fafc;
            border-color: #e2e8f0;
        }
        
        .activity-log-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 1rem;
            cursor: pointer;
            user-select: none;
            transition: background 0.2s;
        }
        
        .activity-log-header:hover {
            background: #ffffff10;
        }
        
        body[data-theme="light"] .activity-log-header:hover {
            background: #f1f5f9;
        }
        
        .activity-log-title {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-weight: 600;
            color: #e2e8f0;
        }
        
        body[data-theme="light"] .activity-log-title {
            color: #1e293b;
        }
        
        .activity-log-toggle {
            font-size: 0.75rem;
            color: #64748b;
            transition: transform 0.3s;
        }
        
        .activity-log-toggle.expanded {
            transform: rotate(180deg);
        }
        
        .activity-log-content {
            max-height: 300px;
            overflow-y: auto;
            padding: 0 1rem 1rem;
        }
        
        .activity-log-content.collapsed {
            display: none;
        }
        
        .activity-log-entry {
            display: flex;
            align-items: flex-start;
            gap: 0.75rem;
            padding: 0.5rem 0;
            border-bottom: 1px solid #ffffff10;
            font-size: 0.85rem;
        }
        
        body[data-theme="light"] .activity-log-entry {
            border-color: #e2e8f0;
        }
        
        .activity-log-entry:last-child {
            border-bottom: none;
        }
        
        .activity-log-time {
            color: #64748b;
            font-family: 'JetBrains Mono', monospace;
            min-width: 60px;
        }
        
        .activity-log-icon {
            font-size: 1rem;
        }
        
        .activity-log-message {
            color: #94a3b8;
            flex: 1;
        }
        
        body[data-theme="light"] .activity-log-message {
            color: #475569;
        }
        
        .activity-log-agent {
            color: #38bdf8;
            font-weight: 500;
        }
        
        body[data-theme="light"] .activity-log-agent {
            color: #0284c7;
        }
        
        /* Animated working indicator */
        .agent-card.working .status-indicator {
            animation: pulse 1.5s ease-in-out infinite;
        }
        
        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.5; }
        }
        
        .agent-working-animation {
            display: inline-flex;
            gap: 2px;
            margin-left: 0.5rem;
        }
        
        .agent-working-animation span {
            width: 4px;
            height: 4px;
            background: #22c55e;
            border-radius: 50%;
            animation: bounce 1.4s ease-in-out infinite both;
        }
        
        .agent-working-animation span:nth-child(1) { animation-delay: -0.32s; }
        .agent-working-animation span:nth-child(2) { animation-delay: -0.16s; }
        .agent-working-animation span:nth-child(3) { animation-delay: 0s; }
        
        @keyframes bounce {
            0%, 80%, 100% { transform: scale(0); }
            40% { transform: scale(1); }
        }
        
        /* ============================================
           CRON JOBS PAGE STYLES
           ============================================ */
        
        .cron-container {
            max-width: 1000px;
            margin: 0 auto;
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
        }
        
        .cron-section {
            background: #00000030;
            border-radius: 12px;
            border: 1px solid #ffffff15;
            padding: 1.5rem;
        }
        
        body[data-theme="light"] .cron-section {
            background: #ffffff;
            border-color: #e2e8f0;
        }
        
        .cron-section .section-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 1rem;
        }
        
        .cron-last-update {
            font-size: 0.8rem;
            color: #64748b;
        }
        
        /* Statistics Grid */
        .cron-stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
            gap: 1rem;
        }
        
        .cron-stat-card {
            background: #00000020;
            border-radius: 10px;
            padding: 1rem;
            text-align: center;
            border: 1px solid #ffffff10;
            transition: all 0.3s ease;
        }
        
        body[data-theme="light"] .cron-stat-card {
            background: #f8fafc;
            border-color: #e2e8f0;
        }
        
        .cron-stat-card:hover {
            border-color: #38bdf840;
            transform: translateY(-2px);
        }
        
        .cron-stat-icon {
            font-size: 1.5rem;
            margin-bottom: 0.5rem;
        }
        
        .cron-stat-value {
            font-size: 1.5rem;
            font-weight: 700;
            color: #38bdf8;
            margin-bottom: 0.25rem;
        }
        
        body[data-theme="light"] .cron-stat-value {
            color: #0284c7;
        }
        
        .cron-stat-label {
            font-size: 0.75rem;
            color: #94a3b8;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }
        
        body[data-theme="light"] .cron-stat-label {
            color: #64748b;
        }
        
        /* Jobs List */
        .cron-jobs-list {
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
        }
        
        .cron-job-card {
            background: #00000020;
            border-radius: 10px;
            padding: 1rem;
            border: 1px solid #ffffff10;
            cursor: pointer;
            transition: all 0.3s ease;
            border-left: 4px solid #38bdf8;
        }
        
        body[data-theme="light"] .cron-job-card {
            background: #f8fafc;
            border-color: #e2e8f0;
        }
        
        .cron-job-card:hover {
            border-color: #38bdf8;
            transform: translateX(4px);
            box-shadow: 0 4px 12px rgba(56, 189, 248, 0.15);
        }
        
        .cron-job-card.active {
            border-left-color: #22c55e;
        }
        
        .cron-job-card.inactive {
            border-left-color: #64748b;
            opacity: 0.7;
        }
        
        .cron-job-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 0.75rem;
            flex-wrap: wrap;
            gap: 0.5rem;
        }
        
        .cron-job-name {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-weight: 600;
            color: #e2e8f0;
            font-size: 1rem;
        }
        
        body[data-theme="light"] .cron-job-name {
            color: #1e293b;
        }
        
        .cron-job-icon {
            font-size: 1.25rem;
        }
        
        .cron-job-status {
            display: inline-flex;
            align-items: center;
            gap: 0.25rem;
            padding: 0.25rem 0.6rem;
            border-radius: 6px;
            font-size: 0.75rem;
            font-weight: 600;
            text-transform: uppercase;
        }
        
        .cron-job-status.active {
            background: #22c55e20;
            color: #22c55e;
        }
        
        body[data-theme="light"] .cron-job-status.active {
            background: #22c55e30;
        }
        
        .cron-job-status.inactive {
            background: #64748b20;
            color: #94a3b8;
        }
        
        .cron-job-details {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 0.75rem;
            font-size: 0.85rem;
        }
        
        .cron-job-detail {
            display: flex;
            flex-direction: column;
            gap: 0.15rem;
        }
        
        .cron-job-detail-label {
            font-size: 0.7rem;
            color: #64748b;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }
        
        .cron-job-detail-value {
            color: #94a3b8;
        }
        
        body[data-theme="light"] .cron-job-detail-value {
            color: #475569;
        }
        
        .cron-job-detail-value.success {
            color: #22c55e;
        }
        
        .cron-job-detail-value.error {
            color: #ef4444;
        }
        
        /* History List */
        .cron-history-list {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
            max-height: 400px;
            overflow-y: auto;
        }
        
        .cron-history-item {
            background: #00000020;
            border-radius: 8px;
            padding: 0.75rem;
            border: 1px solid #ffffff10;
            border-left: 3px solid;
            transition: all 0.2s ease;
        }
        
        body[data-theme="light"] .cron-history-item {
            background: #f8fafc;
            border-color: #e2e8f0;
        }
        
        .cron-history-item:hover {
            background: #00000030;
        }
        
        body[data-theme="light"] .cron-history-item:hover {
            background: #f1f5f9;
        }
        
        .cron-history-item.success {
            border-left-color: #22c55e;
        }
        
        .cron-history-item.error {
            border-left-color: #ef4444;
        }
        
        .cron-history-item.running {
            border-left-color: #38bdf8;
            animation: pulse 2s infinite;
        }
        
        .cron-history-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 0.5rem;
            flex-wrap: wrap;
            gap: 0.5rem;
        }
        
        .cron-history-job {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-weight: 500;
            color: #e2e8f0;
        }
        
        body[data-theme="light"] .cron-history-job {
            color: #1e293b;
        }
        
        .cron-history-time {
            font-size: 0.75rem;
            color: #64748b;
        }
        
        .cron-history-details {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
            gap: 0.5rem;
            font-size: 0.8rem;
        }
        
        .cron-history-detail {
            display: flex;
            flex-direction: column;
            gap: 0.1rem;
        }
        
        .cron-history-detail-label {
            font-size: 0.65rem;
            color: #64748b;
            text-transform: uppercase;
        }
        
        .cron-history-detail-value {
            color: #94a3b8;
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.75rem;
        }
        
        body[data-theme="light"] .cron-history-detail-value {
            color: #475569;
        }
        
        /* Job Run Modal / Expanded View */
        .cron-job-expanded {
            margin-top: 0.75rem;
            padding-top: 0.75rem;
            border-top: 1px solid #ffffff10;
        }
        
        body[data-theme="light"] .cron-job-expanded {
            border-top-color: #e2e8f0;
        }
        
        .cron-job-runs-header {
            font-size: 0.85rem;
            font-weight: 600;
            color: #94a3b8;
            margin-bottom: 0.5rem;
        }
        
        body[data-theme="light"] .cron-job-runs-header {
            color: #64748b;
        }
        
        .cron-job-runs {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }
        
        .cron-run-item {
            background: #00000020;
            border-radius: 6px;
            padding: 0.5rem;
            border-left: 3px solid;
        }
        
        body[data-theme="light"] .cron-run-item {
            background: #f1f5f9;
        }
        
        .cron-run-item.success {
            border-left-color: #22c55e;
        }
        
        .cron-run-item.error {
            border-left-color: #ef4444;
        }
        
        .cron-run-item.running {
            border-left-color: #38bdf8;
        }
        
        .cron-run-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 0.25rem;
        }
        
        .cron-run-time {
            font-size: 0.75rem;
            color: #64748b;
        }
        
        .cron-run-duration {
            font-size: 0.7rem;
            color: #94a3b8;
        }
        
        .cron-run-output {
            font-family: 'JetBrains Mono', monospace;
            font-size: 0.7rem;
            color: #94a3b8;
            background: #00000030;
            padding: 0.5rem;
            border-radius: 4px;
            margin-top: 0.25rem;
            max-height: 100px;
            overflow-y: auto;
            white-space: pre-wrap;
            word-break: break-all;
        }
        
        body[data-theme="light"] .cron-run-output {
            background: #e2e8f0;
            color: #475569;
        }
        
        /* Loading State */
        .cron-loading {
            text-align: center;
            color: #64748b;
            padding: 2rem;
            font-style: italic;
        }
        
        /* Empty State */
        .cron-empty {
            text-align: center;
            color: #64748b;
            padding: 2rem;
        }
        
        /* Click hint */
        .cron-click-hint {
            font-size: 0.7rem;
            color: #64748b;
            opacity: 0;
            transition: opacity 0.2s;
        }
        
        .cron-job-card:hover .cron-click-hint {
            opacity: 1;
        }
        
        /* Mobile Responsiveness */
        @media (max-width: 600px) {
            .cron-stats-grid {
                grid-template-columns: repeat(2, 1fr);
            }
            
            .cron-stat-card {
                padding: 0.75rem;
            }
            
            .cron-stat-value {
                font-size: 1.25rem;
            }
            
            .cron-job-header {
                flex-direction: column;
                align-items: flex-start;
            }
            
            .cron-job-details {
                grid-template-columns: 1fr;
            }
            
            .cron-history-details {
                grid-template-columns: 1fr;
            }
        }
        
        /* ============================================
           BACKUP MANAGEMENT STYLES
           ============================================ */
        
        .backup-create-btn {
            width: 100%;
            padding: 0.75rem;
            background: linear-gradient(135deg, #38bdf8, #22c55e);
            border: none;
            border-radius: 8px;
            color: #fff;
            font-size: 0.9rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            margin-bottom: 1rem;
        }
        
        .backup-create-btn:hover {
            opacity: 0.9;
            transform: translateY(-1px);
        }
        
        .backup-create-btn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none;
        }
        
        body[data-theme="light"] .backup-create-btn {
            color: #fff;
        }
        
        .backups-list {
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
        }
        
        .backup-category {
            background: #00000020;
            border-radius: 8px;
            border: 1px solid #ffffff10;
            overflow: hidden;
        }
        
        body[data-theme="light"] .backup-category {
            background: #f8fafc;
            border-color: #e2e8f0;
        }
        
        .backup-category-header {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 1rem;
            cursor: pointer;
            transition: background 0.2s;
        }
        
        .backup-category-header:hover {
            background: #ffffff10;
        }
        
        body[data-theme="light"] .backup-category-header:hover {
            background: #f1f5f9;
        }
        
        .backup-category-icon {
            font-size: 1.25rem;
        }
        
        .backup-category-title {
            flex: 1;
            font-weight: 500;
            color: #e2e8f0;
        }
        
        body[data-theme="light"] .backup-category-title {
            color: #1e293b;
        }
        
        .backup-category-toggle {
            font-size: 0.75rem;
            color: #64748b;
            transition: transform 0.3s;
        }
        
        .backup-category-content {
            max-height: 200px;
            overflow-y: auto;
            padding: 0 1rem 1rem;
        }
        
        .backup-category-content.collapsed {
            display: none;
        }
        
        .backup-empty {
            text-align: center;
            color: #64748b;
            padding: 1rem;
            font-size: 0.85rem;
        }
        
        .backup-item {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.5rem 0;
            border-bottom: 1px solid #ffffff10;
        }
        
        body[data-theme="light"] .backup-item {
            border-color: #e2e8f0;
        }
        
        .backup-item:last-child {
            border-bottom: none;
        }
        
        .backup-item-info {
            display: flex;
            flex-direction: column;
            gap: 0.15rem;
            flex: 1;
        }
        
        .backup-item-time {
            font-size: 0.85rem;
            color: #e2e8f0;
        }
        
        body[data-theme="light"] .backup-item-time {
            color: #1e293b;
        }
        
        .backup-item-size {
            font-size: 0.75rem;
            color: #64748b;
        }
        
        .backup-item-files {
            font-size: 0.75rem;
            color: #94a3b8;
            max-width: 150px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        
        .backup-item-restore {
            padding: 0.35rem 0.75rem;
            background: #38bdf820;
            border: 1px solid #38bdf840;
            border-radius: 6px;
            color: #38bdf8;
            font-size: 0.75rem;
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .backup-item-restore:hover {
            background: #38bdf830;
            border-color: #38bdf8;
        }
        
        /* Custom Backups Section */
        .custom-backups-section {
            margin-top: 1.5rem;
            padding-top: 1rem;
            border-top: 1px solid #ffffff10;
        }
        
        body[data-theme="light"] .custom-backups-section {
            border-top-color: #e2e8f0;
        }
        
        .custom-backups-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 1rem;
            margin-bottom: 0.5rem;
        }
        
        .custom-backups-header .backup-category-header {
            flex: 1;
        }
        
        .backup-item-name {
            font-weight: 600;
            color: #38bdf8;
            margin-right: 0.5rem;
        }
        
        body[data-theme="light"] .backup-item-name {
            color: #0284c7;
        }
        
        .custom-backup-item {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }
        
        .backup-item-actions {
            display: flex;
            gap: 0.5rem;
            flex-wrap: wrap;
        }
        
        .backup-action-btn {
            padding: 0.4rem 0.8rem;
            font-size: 0.75rem;
            border-radius: 6px;
            border: 1px solid;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            gap: 0.25rem;
        }
        
        .backup-action-btn.restore {
            background: #22c55e20;
            border-color: #22c55e40;
            color: #22c55e;
        }
        
        .backup-action-btn.restore:hover {
            background: #22c55e30;
            border-color: #22c55e;
        }
        
        .backup-action-btn.rename {
            background: #38bdf820;
            border-color: #38bdf840;
            color: #38bdf8;
        }
        
        .backup-action-btn.rename:hover {
            background: #38bdf830;
            border-color: #38bdf8;
        }
        
        .backup-action-btn.delete {
            background: #ef444420;
            border-color: #ef444440;
            color: #ef4444;
        }
        
        .backup-action-btn.delete:hover {
            background: #ef444430;
            border-color: #ef4444;
        }
        
        body[data-theme="light"] .backup-action-btn.restore {
            background: #22c55e15;
            color: #16a34a;
        }
        
        body[data-theme="light"] .backup-action-btn.rename {
            background: #0284c715;
            color: #0284c7;
        }
        
        body[data-theme="light"] .backup-action-btn.delete {
            background: #ef444415;
            color: #dc2626;
        }
        
        /* Backup Modal Styles */
        .backup-modal {
            max-width: 450px;
        }
        
        .backup-form-group {
            margin-bottom: 1rem;
        }
        
        .backup-form-group label {
            display: block;
            font-size: 0.9rem;
            font-weight: 500;
            color: #e2e8f0;
            margin-bottom: 0.5rem;
        }
        
        body[data-theme="light"] .backup-form-group label {
            color: #1e293b;
        }
        
        .backup-form-group input {
            width: 100%;
            padding: 0.75rem;
            background: #00000040;
            border: 1px solid #ffffff20;
            border-radius: 8px;
            color: #e2e8f0;
            font-size: 1rem;
        }
        
        body[data-theme="light"] .backup-form-group input {
            background: #fff;
            border-color: #e2e8f0;
            color: #1e293b;
        }
        
        .backup-form-group input:focus {
            outline: none;
            border-color: #38bdf8;
        }
        
        .backup-files-preview {
            background: #00000030;
            border-radius: 8px;
            padding: 0.75rem;
            margin-bottom: 1rem;
        }
        
        body[data-theme="light"] .backup-files-preview {
            background: #f1f5f9;
        }
        
        .backup-files-title {
            font-size: 0.85rem;
            font-weight: 500;
            color: #94a3b8;
            margin-bottom: 0.5rem;
        }
        
        .backup-files-list {
            display: flex;
            flex-direction: column;
            gap: 0.25rem;
        }
        
        .backup-file-item {
            font-size: 0.8rem;
            color: #64748b;
            padding-left: 0.5rem;
        }
        
        body[data-theme="light"] .backup-file-item {
            color: #475569;
        }
        
        .backup-modal-actions {
            display: flex;
            gap: 0.75rem;
            justify-content: flex-end;
        }
        
        .backup-modal-btn {
            padding: 0.6rem 1.25rem;
            border-radius: 8px;
            font-size: 0.9rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .backup-modal-btn.cancel {
            background: transparent;
            border: 1px solid #ffffff30;
            color: #94a3b8;
        }
        
        .backup-modal-btn.cancel:hover {
            background: #ffffff10;
        }
        
        .backup-modal-btn.create {
            background: #22c55e;
            border: 1px solid #22c55e;
            color: #fff;
        }
        
        .backup-modal-btn.create:hover {
            background: #16a34a;
        }
        
        .backup-modal-btn.create:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }
        
        body[data-theme="light"] .backup-modal-btn.cancel {
            border-color: #cbd5e1;
            color: #64748b;
        }
        
        body[data-theme="light"] .backup-modal-btn.cancel:hover {
            background: #f1f5f9;
        }
        
        /* Toast Notification */
        .toast-notification {
            position: fixed;
            bottom: 20px;
            right: 20px;
            padding: 1rem 1.5rem;
            border-radius: 8px;
            font-size: 0.9rem;
            font-weight: 500;
            z-index: 10000;
            animation: slideIn 0.3s ease-out;
            box-shadow: 0 4px 12px rgba(0,0,0,0.3);
        }
        
        .toast-notification.success {
            background: #22c55e;
            color: #fff;
        }
        
        .toast-notification.error {
            background: #ef4444;
            color: #fff;
        }
        
        @keyframes slideIn {
            from {
                transform: translateX(100%);
                opacity: 0;
            }
            to {
                transform: translateX(0);
                opacity: 1;
            }
        }
        
        /* ============================================
           RECENT ACTIVITIES (UNIFIED) STYLES
           ============================================ */
        
        .recent-activities-section {
            background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
            border: 1px solid #38bdf840;
            border-radius: 12px;
            padding: 1.25rem;
            margin-bottom: 1.5rem;
        }
        
        body[data-theme="light"] .recent-activities-section {
            background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
            border-color: #38bdf860;
        }
        
        .recent-activities-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 1rem;
            padding-bottom: 0.75rem;
            border-bottom: 1px solid #ffffff20;
        }
        
        body[data-theme="light"] .recent-activities-header {
            border-bottom-color: #cbd5e1;
        }
        
        .recent-activities-title {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 1.1rem;
            font-weight: 600;
            color: #e2e8f0;
        }
        
        body[data-theme="light"] .recent-activities-title {
            color: #1e293b;
        }
        
        .recent-activities-count {
            font-size: 0.75rem;
            color: #64748b;
            background: #1e293b;
            padding: 0.25rem 0.5rem;
            border-radius: 4px;
        }
        
        body[data-theme="light"] .recent-activities-count {
            background: #e2e8f0;
        }
        
        .recent-activities-list {
            max-height: 320px;
            overflow-y: auto;
            scrollbar-width: thin;
            scrollbar-color: #475569 transparent;
        }
        
        .recent-activities-list::-webkit-scrollbar {
            width: 6px;
        }
        
        .recent-activities-list::-webkit-scrollbar-track {
            background: transparent;
        }
        
        .recent-activities-list::-webkit-scrollbar-thumb {
            background: #475569;
            border-radius: 3px;
        }
        
        .recent-activity-item {
            display: flex;
            align-items: flex-start;
            gap: 0.75rem;
            padding: 0.6rem 0.75rem;
            border-radius: 8px;
            margin-bottom: 0.5rem;
            background: #1e293b40;
            border-left: 3px solid #38bdf8;
            animation: slide-in 0.3s ease-out;
            transition: background 0.2s;
        }
        
        body[data-theme="light"] .recent-activity-item {
            background: #f8fafc;
            border-color: #0284c7;
        }
        
        .recent-activity-item:hover {
            background: #1e293b80;
        }
        
        body[data-theme="light"] .recent-activity-item:hover {
            background: #f1f5f9;
        }
        
        .recent-activity-item.new {
            animation: slide-in 0.5s ease-out, highlight 0.5s ease-out;
        }
        
        .recent-activity-item.status-working {
            border-left-color: #fbbf24;
            background: #fbbf2420;
        }
        
        .recent-activity-item.status-success {
            border-left-color: #22c55e;
            background: #22c55e20;
        }
        
        .recent-activity-item.status-error {
            border-left-color: #ef4444;
            background: #ef444420;
        }
        
        .recent-activity-item.status-info {
            border-left-color: #38bdf8;
            background: #38bdf820;
        }
        
        .recent-activity-icon {
            font-size: 1.2rem;
            width: 28px;
            text-align: center;
            flex-shrink: 0;
        }
        
        .recent-activity-content {
            flex: 1;
            min-width: 0;
        }
        
        .recent-activity-header-inner {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            flex-wrap: wrap;
            margin-bottom: 0.15rem;
        }
        
        .recent-activity-agent {
            font-weight: 600;
            font-size: 0.8rem;
            color: #94a3b8;
            text-transform: capitalize;
        }
        
        body[data-theme="light"] .recent-activity-agent {
            color: #64748b;
        }
        
        .recent-activity-action {
            font-size: 0.85rem;
            color: #e2e8f0;
            line-height: 1.3;
            word-break: break-word;
        }
        
        body[data-theme="light"] .recent-activity-action {
            color: #334155;
        }
        
        .recent-activity-time {
            font-size: 0.7rem;
            color: #64748b;
            font-variant-numeric: tabular-nums;
        }
        
        .recent-activities-empty {
            text-align: center;
            padding: 2rem;
            color: #64748b;
        }
        
        .recent-activities-empty-icon {
            font-size: 2rem;
            margin-bottom: 0.5rem;
            opacity: 0.5;
        }
        
        /* Agent-specific colors for recent activity */
        .recent-activity-item[data-agent="rodrigo"] .recent-activity-agent { color: #38bdf8; }
        .recent-activity-item[data-agent="helios"] .recent-activity-agent { color: #818cf8; }
        .recent-activity-item[data-agent="frede"] .recent-activity-agent { color: #22c55e; }
        .recent-activity-item[data-agent="sportacus"] .recent-activity-agent { color: #f97316; }
        .recent-activity-item[data-agent="julia"] .recent-activity-agent { color: #a855f7; }
        
        body[data-theme="light"] .recent-activity-item[data-agent="rodrigo"] .recent-activity-agent { color: #0284c7; }
        body[data-theme="light"] .recent-activity-item[data-agent="helios"] .recent-activity-agent { color: #6366f1; }
        body[data-theme="light"] .recent-activity-item[data-agent="frede"] .recent-activity-agent { color: #16a34a; }
        body[data-theme="light"] .recent-activity-item[data-agent="sportacus"] .recent-activity-agent { color: #ea580c; }
        body[data-theme="light"] .recent-activity-item[data-agent="julia"] .recent-activity-agent { color: #9333ea; }

        /* ============================================
           LIVE ACTIVITY STREAM STYLES (LEGACY - kept for modal)
           ============================================ */
        
        .live-activity-section {
            background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
            border: 1px solid #38bdf840;
            border-radius: 12px;
            padding: 1.25rem;
            margin-bottom: 1.5rem;
        }
        
        body[data-theme="light"] .live-activity-section {
            background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
            border-color: #38bdf860;
        }
        
        .live-activity-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 1rem;
            padding-bottom: 0.75rem;
            border-bottom: 1px solid #ffffff20;
        }
        
        body[data-theme="light"] .live-activity-header {
            border-bottom-color: #cbd5e1;
        }
        
        .live-activity-title {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 1.1rem;
            font-weight: 600;
            color: #e2e8f0;
        }
        
        body[data-theme="light"] .live-activity-title {
            color: #1e293b;
        }
        
        .live-activity-dot {
            width: 10px;
            height: 10px;
            background: #ef4444;
            border-radius: 50%;
            animation: live-pulse 1.5s ease-in-out infinite;
        }
        
        @keyframes live-pulse {
            0%, 100% { opacity: 1; transform: scale(1); }
            50% { opacity: 0.5; transform: scale(0.8); }
        }
        
        .live-activity-count {
            font-size: 0.75rem;
            color: #64748b;
            background: #1e293b;
            padding: 0.25rem 0.5rem;
            border-radius: 4px;
        }
        
        body[data-theme="light"] .live-activity-count {
            background: #e2e8f0;
        }
        
        .live-activity-stream {
            max-height: 320px;
            overflow-y: auto;
            scrollbar-width: thin;
            scrollbar-color: #475569 transparent;
        }
        
        .live-activity-stream::-webkit-scrollbar {
            width: 6px;
        }
        
        .live-activity-stream::-webkit-scrollbar-track {
            background: transparent;
        }
        
        .live-activity-stream::-webkit-scrollbar-thumb {
            background: #475569;
            border-radius: 3px;
        }
        
        .live-activity-item {
            display: flex;
            align-items: flex-start;
            gap: 0.75rem;
            padding: 0.6rem 0.75rem;
            border-radius: 8px;
            margin-bottom: 0.5rem;
            background: #1e293b40;
            border-left: 3px solid #38bdf8;
            animation: slide-in 0.3s ease-out;
            transition: background 0.2s;
        }
        
        body[data-theme="light"] .live-activity-item {
            background: #f1f5f9;
            border-left-color: #0ea5e9;
        }
        
        .live-activity-item:hover {
            background: #33415540;
        }
        
        body[data-theme="light"] .live-activity-item:hover {
            background: #e2e8f0;
        }
        
        .live-activity-item.new {
            animation: slide-in-highlight 0.5s ease-out;
        }
        
        @keyframes slide-in {
            from { opacity: 0; transform: translateY(-10px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        @keyframes slide-in-highlight {
            0% { opacity: 0; transform: translateY(-10px); background: #38bdf830; }
            100% { opacity: 1; transform: translateY(0); background: #1e293b40; }
        }
        
        .live-activity-item.status-working {
            border-left-color: #22c55e;
        }
        
        .live-activity-item.status-success {
            border-left-color: #22c55e;
        }
        
        .live-activity-item.status-error {
            border-left-color: #ef4444;
        }
        
        .live-activity-item.status-info {
            border-left-color: #38bdf8;
        }
        
        .live-activity-time {
            font-size: 0.75rem;
            font-family: 'JetBrains Mono', monospace;
            color: #64748b;
            min-width: 60px;
        }
        
        .live-activity-icon {
            font-size: 1rem;
            min-width: 24px;
            text-align: center;
        }
        
        .live-activity-content {
            flex: 1;
            min-width: 0;
        }
        
        .live-activity-agent {
            font-size: 0.75rem;
            font-weight: 600;
            color: #38bdf8;
            text-transform: capitalize;
            margin-bottom: 0.15rem;
        }
        
        body[data-theme="light"] .live-activity-agent {
            color: #0284c7;
        }
        
        .live-activity-message {
            font-size: 0.85rem;
            color: #e2e8f0;
            line-height: 1.4;
            word-break: break-word;
        }
        
        body[data-theme="light"] .live-activity-message {
            color: #334155;
        }
        
        .live-activity-empty {
            text-align: center;
            padding: 1.5rem;
            color: #64748b;
            font-size: 0.9rem;
        }
        
        .live-activity-empty-icon {
            font-size: 2rem;
            margin-bottom: 0.5rem;
        }
        
        /* Agent color coding */
        .live-activity-item[data-agent="rodrigo"] .live-activity-agent { color: #38bdf8; }
        .live-activity-item[data-agent="helios"] .live-activity-agent { color: #818cf8; }
        .live-activity-item[data-agent="frede"] .live-activity-agent { color: #22c55e; }
        .live-activity-item[data-agent="sportacus"] .live-activity-agent { color: #f97316; }
        .live-activity-item[data-agent="julia"] .live-activity-agent { color: #a855f7; }
        
        body[data-theme="light"] .live-activity-item[data-agent="rodrigo"] .live-activity-agent { color: #0284c7; }
        body[data-theme="light"] .live-activity-item[data-agent="helios"] .live-activity-agent { color: #6366f1; }
        body[data-theme="light"] .live-activity-item[data-agent="frede"] .live-activity-agent { color: #16a34a; }
        body[data-theme="light"] .live-activity-item[data-agent="sportacus"] .live-activity-agent { color: #ea580c; }
        body[data-theme="light"] .live-activity-item[data-agent="julia"] .live-activity-agent { color: #9333ea; }
        
        /* Triple-Redundancy Level Indicators */
        /* Level 1: System-Hook (Blue - Most Reliable) */
        .live-activity-item[data-level="1"] {
            border-left: 3px solid #3b82f6;
            background: linear-gradient(90deg, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
        }
        .live-activity-item[data-level="1"] .live-activity-icon::before {
            content: '🔵';
            font-size: 0.6rem;
            position: absolute;
            top: -2px;
            left: -2px;
        }
        
        /* Level 2: Agent-Template (Green - Backup) */
        .live-activity-item[data-level="2"] {
            border-left: 3px solid #22c55e;
            background: linear-gradient(90deg, rgba(34, 197, 94, 0.1) 0%, transparent 50%);
        }
        .live-activity-item[data-level="2"] .live-activity-icon::before {
            content: '🟢';
            font-size: 0.6rem;
            position: absolute;
            top: -2px;
            left: -2px;
        }
        
        /* Level 3: Rodrigo-Wrapper (Yellow - Tertiary) */
        .live-activity-item[data-level="3"] {
            border-left: 3px solid #eab308;
            background: linear-gradient(90deg, rgba(234, 179, 8, 0.1) 0%, transparent 50%);
        }
        .live-activity-item[data-level="3"] .live-activity-icon::before {
            content: '🟡';
            font-size: 0.6rem;
            position: absolute;
            top: -2px;
            left: -2px;
        }
        
        /* Level Badge */
        .live-activity-level {
            font-size: 0.6rem;
            padding: 1px 4px;
            border-radius: 3px;
            font-weight: 600;
            margin-left: 0.5rem;
        }
        .live-activity-level.level-1 {
            background: rgba(59, 130, 246, 0.2);
            color: #3b82f6;
        }
        .live-activity-level.level-2 {
            background: rgba(34, 197, 94, 0.2);
            color: #22c55e;
        }
        .live-activity-level.level-3 {
            background: rgba(234, 179, 8, 0.2);
            color: #eab308;
        }
        
        /* Type-specific styling */
        .live-activity-item[data-type="spawn"] { }
        .live-activity-item[data-type="start"] { }
        .live-activity-item[data-type="complete"] { }
        .live-activity-item[data-type="error"] { }
        .live-activity-item[data-type="heartbeat"] { opacity: 0.7; }
        .live-activity-item[data-type="tool"] { }
        .live-activity-item[data-type="progress"] { }
        .live-activity-item[data-type="delegating"] { }
        .live-activity-item[data-type="spawned"] { }
        .live-activity-item[data-type="failed"] { }

        /* ============================================
           CALORIES WIDGET
           ============================================ */
        
        .calories-widget {
            background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
            border: 1px solid #38bdf820;
            position: relative;
            overflow: hidden;
        }
        
        .calories-widget::before {
            content: '';
            position: absolute;
            top: 0;
            right: 0;
            width: 120px;
            height: 120px;
            background: radial-gradient(circle, rgba(251, 146, 60, 0.15) 0%, transparent 70%);
            border-radius: 50%;
            transform: translate(30%, -30%);
        }
        
        .calories-widget h2 {
            color: #fb923c;
            font-size: 1rem;
            font-weight: 600;
            margin-bottom: 1rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        .calories-main {
            text-align: center;
            padding: 1rem 0;
        }
        
        .calories-value {
            font-size: 3rem;
            font-weight: 700;
            color: #fb923c;
            line-height: 1;
            font-variant-numeric: tabular-nums;
        }
        
        .calories-label {
            font-size: 0.9rem;
            color: #94a3b8;
            margin-top: 0.25rem;
        }
        
        .calories-source {
            font-size: 0.75rem;
            color: #64748b;
            margin-top: 0.5rem;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
        }
        
        .calories-source::before {
            content: '📱';
            font-size: 0.9rem;
        }
        
        /* Mini Chart */
        .calories-chart {
            display: flex;
            align-items: flex-end;
            justify-content: space-around;
            height: 60px;
            margin: 1rem 0;
            padding: 0 0.5rem;
            gap: 4px;
        }
        
        .calories-bar {
            flex: 1;
            background: linear-gradient(180deg, #fb923c 0%, #f97316 100%);
            border-radius: 2px 2px 0 0;
            min-height: 4px;
            max-height: 100%;
            transition: height 0.3s ease;
            position: relative;
        }
        
        .calories-bar.today {
            background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
            box-shadow: 0 0 10px rgba(34, 197, 94, 0.3);
        }
        
        .calories-bar:hover {
            opacity: 0.8;
        }
        
        .calories-bar[data-value]::after {
            content: attr(data-value);
            position: absolute;
            top: -20px;
            left: 50%;
            transform: translateX(-50%);
            font-size: 0.65rem;
            color: #94a3b8;
            opacity: 0;
            transition: opacity 0.2s;
            white-space: nowrap;
        }
        
        .calories-bar:hover::after {
            opacity: 1;
        }
        
        /* Stats Grid */
        .calories-stats {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1rem;
            margin-top: 1rem;
            padding-top: 1rem;
            border-top: 1px solid #334155;
        }
        
        .calories-stat {
            text-align: center;
        }
        
        .calories-stat-value {
            font-size: 1.5rem;
            font-weight: 600;
            color: #e2e8f0;
            font-variant-numeric: tabular-nums;
        }
        
        .calories-stat-label {
            font-size: 0.75rem;
            color: #64748b;
            margin-top: 0.25rem;
        }
        
        .calories-last-update {
            text-align: center;
        }
        
        /* Loading state */
        .calories-widget.loading .calories-value {
            color: #475569;
        }
        
        .calories-widget.loading .calories-bar {
            background: #334155;
        }
        
        /* Error state */
        .calories-widget.error .calories-value {
            color: #ef4444;
        }
        
        /* Empty state */
        .calories-widget.empty .calories-value {
            color: #64748b;
        }
        
        .calories-empty-message {
            text-align: center;
            padding: 1rem;
            color: #64748b;
            font-size: 0.85rem;
        }
        
        .calories-empty-message a {
            color: #38bdf8;
            text-decoration: none;
        }
        
        .calories-empty-message a:hover {
            text-decoration: underline;
        }
        
        /* Light mode for calories widget */
        body[data-theme="light"] .calories-widget {
            background: #ffffff;
            border-color: #fb923c40;
        }
        
        body[data-theme="light"] .calories-widget h2 {
            color: #ea580c;
        }
        
        body[data-theme="light"] .calories-value {
            color: #ea580c;
        }
        
        body[data-theme="light"] .calories-stats {
            border-top-color: #e2e8f0;
        }
        
        body[data-theme="light"] .calories-stat-value {
            color: #1e293b;
        }
        
        body[data-theme="light"] .calories-widget::before {
            background: radial-gradient(circle, rgba(251, 146, 60, 0.1) 0%, transparent 70%);
        }
        
        body[data-theme="light"] .calories-bar {
            background: linear-gradient(180deg, #fb923c 0%, #f97316 100%);
        }
        
        body[data-theme="light"] .calories-bar.today {
            background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
        }

        /* ============================================
           REST DAY MANAGEMENT STYLES
           ============================================ */

        /* Rest day button container */
        .rest-day-actions {
            margin-top: 1.5rem;
            display: flex;
            justify-content: center;
            gap: 1rem;
        }

        /* Rest day buttons */
        .rest-day-btn {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.75rem 1.25rem;
            border-radius: 0.75rem;
            font-size: 0.9rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
            border: 2px solid transparent;
        }

        .rest-day-btn.add {
            background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
            color: white;
            border-color: #f97316;
        }

        .rest-day-btn.add:hover:not(:disabled) {
            background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
        }

        .rest-day-btn.remove {
            background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
            color: white;
            border-color: #22c55e;
        }

        .rest-day-btn.remove:hover:not(:disabled) {
            background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
        }

        .rest-day-btn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none;
        }

        .rest-day-btn-icon {
            font-size: 1.1rem;
        }

        /* Rest day notice */
        .rest-day-notice {
            background: linear-gradient(135deg, #f9731615 0%, #ea580c10 100%);
            border: 1px solid #f9731630;
            border-radius: 0.5rem;
            padding: 0.75rem 1rem;
            margin-bottom: 1rem;
            color: #f97316;
            font-size: 0.85rem;
            text-align: center;
        }

        /* Missed workout badge on workout badge */
        .workout-badge.missed {
            background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
            border-color: #f97316 !important;
        }

        /* Calendar day - missed workout styling */
        /* Calendar day - missed workout styling with striped pattern */
        .calendar-day.missed-workout {
            background: repeating-linear-gradient(
                45deg,
                rgba(249, 115, 22, 0.08),
                rgba(249, 115, 22, 0.08) 8px,
                rgba(249, 115, 22, 0.18) 8px,
                rgba(249, 115, 22, 0.18) 16px
            ) !important;
            border: 2px solid #f97316 !important;
        }

        .calendar-day.missed-workout .calendar-day-workout {
            color: #f97316 !important;
            font-weight: 600;
        }

        .calendar-day.missed-workout .calendar-day-rest-label {
            position: absolute;
            bottom: 2px;
            left: 50%;
            transform: translateX(-50%);
            font-size: 0.5rem;
            font-weight: 700;
            color: #f97316;
            background: rgba(249, 115, 22, 0.2);
            padding: 1px 4px;
            border-radius: 3px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        /* Combined: today AND missed workout */
        .calendar-day.today.missed-workout {
            border: 3px solid #38bdf8 !important;
            box-shadow: 0 0 12px rgba(56, 189, 248, 0.4), inset 0 0 8px rgba(249, 115, 22, 0.2) !important;
        }

        .calendar-day.today.missed-workout .calendar-day-number {
            color: #38bdf8 !important;
            font-size: 1rem !important;
            font-weight: 800 !important;
        }

        .calendar-day.today .calendar-day-today-badge {
            position: absolute;
            top: 1px;
            right: 1px;
            font-size: 0.45rem;
            font-weight: 700;
            color: #0f172a;
            background: #38bdf8;
            padding: 1px 3px;
            border-radius: 3px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .calendar-day.missed-workout.missed {
            background: repeating-linear-gradient(
                45deg,
                rgba(249, 115, 22, 0.12),
                rgba(249, 115, 22, 0.12) 8px,
                rgba(249, 115, 22, 0.22) 8px,
                rgba(249, 115, 22, 0.22) 16px
            ) !important;
        }

        /* Calendar week day - missed workout styling with striped pattern */
        .calendar-week-day.missed-workout {
            background: repeating-linear-gradient(
                45deg,
                rgba(249, 115, 22, 0.06),
                rgba(249, 115, 22, 0.06) 8px,
                rgba(249, 115, 22, 0.14) 8px,
                rgba(249, 115, 22, 0.14) 16px
            ) !important;
            border: 2px solid #f97316 !important;
        }

        .calendar-week-day.missed-workout.today {
            border: 3px solid #38bdf8 !important;
            box-shadow: 0 0 12px rgba(56, 189, 248, 0.4), inset 0 0 8px rgba(249, 115, 22, 0.2);
        }

        .calendar-week-day.missed-workout .calendar-week-day-workout.missed {
            color: #f97316;
            font-weight: 600;
        }

        .calendar-week-day-rest-label {
            display: block;
            font-size: 0.6rem;
            font-weight: 700;
            color: #f97316;
            background: rgba(249, 115, 22, 0.2);
            padding: 2px 6px;
            border-radius: 4px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-top: 0.25rem;
            text-align: center;
        }

        /* Calendar week number badge for missed */
        .calendar-week-number.missed {
            background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
            color: white !important;
        }

        /* Calendar day workout text for missed */
        .calendar-day-workout.missed {
            color: #f97316 !important;
            font-weight: 600;
        }

        /* Calendar week day type badge for missed */
        .calendar-week-day-type.rest.missed {
            background: linear-gradient(135deg, #f9731620 0%, #ea580c15 100%) !important;
            color: #f97316 !important;
            border: 1px solid #f973164 0%;
        }

        /* Toast notification */
        .cal-toast {
            position: fixed;
            bottom: 2rem;
            left: 50%;
            transform: translateX(-50%) translateY(100px);
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 1rem 1.5rem;
            border-radius: 0.75rem;
            font-size: 0.95rem;
            font-weight: 500;
            z-index: 10000;
            opacity: 0;
            transition: all 0.3s ease;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        }

        .cal-toast.show {
            opacity: 1;
            transform: translateX(-50%) translateY(0);
        }

        .cal-toast.success {
            background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
            color: white;
        }

        .cal-toast.error {
            background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
            color: white;
        }

        .cal-toast.info {
            background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
            color: white;
        }

        .cal-toast-icon {
            font-size: 1.2rem;
        }

        .cal-toast-message {
            flex: 1;
        }

        /* Light mode for rest day elements */
        body[data-theme="light"] .rest-day-notice {
            background: linear-gradient(135deg, #f9731610 0%, #ea580c08 100%);
            border-color: #f9731630;
            color: #ea580c;
        }

        body[data-theme="light"] .rest-day-btn.add {
            background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
        }

        body[data-theme="light"] .rest-day-btn.remove {
            background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
        }

        /* Light theme for missed workout */
        body[data-theme="light"] .calendar-day.missed-workout {
            background: repeating-linear-gradient(
                45deg,
                rgba(249, 115, 22, 0.06),
                rgba(249, 115, 22, 0.06) 8px,
                rgba(249, 115, 22, 0.14) 8px,
                rgba(249, 115, 22, 0.14) 16px
            ) !important;
            border: 2px solid #f97316 !important;
        }

        body[data-theme="light"] .calendar-day.today.missed-workout {
            border: 3px solid #0284c7 !important;
            box-shadow: 0 0 12px rgba(2, 132, 199, 0.3), inset 0 0 8px rgba(249, 115, 22, 0.15) !important;
        }

        body[data-theme="light"] .calendar-day.today .calendar-day-number {
            font-size: 1rem !important;
            font-weight: 800 !important;
            color: #0284c7 !important;
        }

        body[data-theme="light"] .calendar-day.today {
            background: #38bdf815;
            border: 3px solid #0284c7 !important;
            box-shadow: 0 0 12px rgba(2, 132, 199, 0.3), 0 0 20px rgba(2, 132, 199, 0.2);
        }

        body[data-theme="light"] .calendar-day.today .calendar-day-today-badge {
            background: #0284c7;
            color: white;
        }

        body[data-theme="light"] .calendar-week-day.missed-workout {
            background: repeating-linear-gradient(
                45deg,
                rgba(249, 115, 22, 0.04),
                rgba(249, 115, 22, 0.04) 8px,
                rgba(249, 115, 22, 0.1) 8px,
                rgba(249, 115, 22, 0.1) 16px
            ) !important;
        }

        body[data-theme="light"] .calendar-week-day.missed-workout.today {
            border-color: #0284c7 !important;
            box-shadow: 0 0 12px rgba(2, 132, 199, 0.3), inset 0 0 8px rgba(249, 115, 22, 0.1);
        }

        body[data-theme="light"] .calendar-week-day-rest-label {
            background: rgba(249, 115, 22, 0.15);
            color: #ea580c;
        }

        body[data-theme="light"] .cal-toast {
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        }

        /* Day card missed workout styling */
        .day-card.missed-workout {
            background: linear-gradient(135deg, #f9731615 0%, #ea580c10 100%) !important;
            border-color: #f97316 !important;
        }

        .day-card.missed-workout .day-name {
            color: #f97316 !important;
        }

        .day-card.missed-workout .day-exercises {
            opacity: 0.7;
        }

        /* Light mode for day card missed */
        body[data-theme="light"] .day-card.missed-workout {
            background: linear-gradient(135deg, #f9731610 0%, #ea580c08 100%) !important;
            border-color: #f97316 !important;
        }

        body[data-theme="light"] .day-card.missed-workout .day-name {
            color: #ea580c !important;
        }

        /* ============================================
           LOGIN PAGE STYLES
           ============================================ */
        
        .login-container {
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 100vh;
            padding: 2rem;
        }

        .login-card {
            background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
            border: 1px solid rgba(148, 163, 184, 0.2);
            border-radius: 1.5rem;
            padding: 2.5rem;
            width: 100%;
            max-width: 400px;
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
        }

        body[data-theme="light"] .login-card {
            background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%);
            border-color: #e2e8f0;
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
        }

        .login-header {
            text-align: center;
            margin-bottom: 2rem;
        }

        .login-icon {
            font-size: 3rem;
            margin-bottom: 0.75rem;
            display: block;
        }

        .login-title {
            font-size: 1.5rem;
            font-weight: 700;
            background: linear-gradient(90deg, #38bdf8, #818cf8);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            margin-bottom: 0.5rem;
        }

        body[data-theme="light"] .login-title {
            background: linear-gradient(90deg, #0284c7, #6366f1);
            -webkit-background-clip: text;
            background-clip: text;
        }

        .login-subtitle {
            color: #94a3b8;
            font-size: 0.95rem;
        }

        body[data-theme="light"] .login-subtitle {
            color: #64748b;
        }

        .login-form {
            display: flex;
            flex-direction: column;
            gap: 1.25rem;
        }

        .login-field {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }

        .login-label {
            font-size: 0.875rem;
            font-weight: 500;
            color: #e2e8f0;
        }

        body[data-theme="light"] .login-label {
            color: #334155;
        }

        .login-input {
            padding: 0.875rem 1rem;
            border: 1px solid rgba(148, 163, 184, 0.3);
            border-radius: 0.75rem;
            font-size: 1rem;
            background: rgba(15, 23, 42, 0.5);
            color: #e2e8f0;
            transition: all 0.2s ease;
        }

        .login-input:focus {
            outline: none;
            border-color: #38bdf8;
            box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
        }

        .login-input::placeholder {
            color: #64748b;
        }

        body[data-theme="light"] .login-input {
            background: #f8fafc;
            border-color: #cbd5e1;
            color: #1e293b;
        }

        body[data-theme="light"] .login-input:focus {
            border-color: #0284c7;
            box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
        }

        body[data-theme="light"] .login-input::placeholder {
            color: #94a3b8;
        }

        .login-remember {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .login-checkbox {
            width: 1rem;
            height: 1rem;
            cursor: pointer;
            accent-color: #38bdf8;
        }

        body[data-theme="light"] .login-checkbox {
            accent-color: #0284c7;
        }

        .login-remember-label {
            font-size: 0.875rem;
            color: #94a3b8;
            cursor: pointer;
        }

        body[data-theme="light"] .login-remember-label {
            color: #64748b;
        }

        .login-error {
            background: rgba(239, 68, 68, 0.1);
            border: 1px solid rgba(239, 68, 68, 0.3);
            border-radius: 0.5rem;
            padding: 0.75rem;
            color: #fca5a5;
            font-size: 0.875rem;
            text-align: center;
        }

        body[data-theme="light"] .login-error {
            background: rgba(239, 68, 68, 0.08);
            border-color: rgba(239, 68, 68, 0.3);
            color: #dc2626;
        }

        .login-submit {
            padding: 1rem;
            background: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
            border: none;
            border-radius: 0.75rem;
            color: white;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
            margin-top: 0.5rem;
        }

        .login-submit:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(56, 189, 248, 0.4);
        }

        .login-submit:active {
            transform: translateY(0);
        }

        .login-submit:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none;
        }

        body[data-theme="light"] .login-submit {
            background: linear-gradient(135deg, #0284c7 0%, #6366f1 100%);
        }

        body[data-theme="light"] .login-submit:hover {
            box-shadow: 0 4px 12px rgba(2, 132, 199, 0.4);
        }

        /* Logout button in nav */
        .logout-btn {
            background: transparent;
            border: 1px solid rgba(148, 163, 184, 0.3);
            border-radius: 0.5rem;
            padding: 0.5rem 1rem;
            color: #94a3b8;
            font-size: 0.875rem;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .logout-btn:hover {
            background: rgba(239, 68, 68, 0.1);
            border-color: rgba(239, 68, 68, 0.5);
            color: #fca5a5;
        }

        body[data-theme="light"] .logout-btn {
            border-color: #e2e8f0;
            color: #64748b;
        }

        body[data-theme="light"] .logout-btn:hover {
            background: rgba(239, 68, 68, 0.08);
            border-color: rgba(239, 68, 68, 0.5);
            color: #dc2626;
        }

/* ============================================
   DOWNLOADS PAGE
============================================ */
.downloads-container {
    max-width: 920px;
    margin: 0 auto;
}

.downloads-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.download-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    background: #ffffff08;
    border: 1px solid #ffffff1a;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.download-item:hover {
    background: #38bdf81a;
    border-color: #38bdf866;
    transform: translateY(-1px);
}

.download-item-name {
    color: #e2e8f0;
    font-weight: 600;
    font-size: 0.95rem;
}

.download-item-file {
    color: #94a3b8;
    font-size: 0.8rem;
    margin-top: 0.2rem;
    word-break: break-all;
}

.download-item-meta {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: #94a3b8;
    font-size: 0.8rem;
    white-space: nowrap;
}

.download-item-action {
    font-size: 1rem;
}

.downloads-loading,
.downloads-empty,
.downloads-error {
    text-align: center;
    padding: 1.2rem;
    border-radius: 12px;
    background: #ffffff08;
    border: 1px solid #ffffff1a;
    color: #94a3b8;
}

.downloads-error {
    color: #fda4af;
    border-color: #fb718533;
    background: #fb718514;
}

.downloads-error-title {
    font-weight: 700;
    color: #fecdd3;
    margin-bottom: 0.4rem;
}

.downloads-error-detail {
    font-size: 0.82rem;
    color: #fda4af;
    margin-bottom: 0.75rem;
    word-break: break-word;
}

.downloads-retry-btn {
    border: 1px solid #fb718566;
    background: #fb718522;
    color: #ffe4e6;
    border-radius: 8px;
    min-height: 40px;
    padding: 0.45rem 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.downloads-retry-btn:hover {
    background: #fb718535;
}

body[data-theme="light"] .downloads-error-title {
    color: #be123c;
}

body[data-theme="light"] .downloads-error-detail {
    color: #9f1239;
}

body[data-theme="light"] .downloads-retry-btn {
    border-color: #fda4af;
    background: #ffe4e6;
    color: #9f1239;
}

/* === Phase 1 UX cleanup === */
.home-header { margin-bottom: 1.25rem; }
.home-focus-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}
.focus-card {
  background: var(--card-bg, rgba(20,22,35,0.78));
  border: 1px solid var(--border-color, rgba(255,255,255,0.08));
  border-radius: 14px;
  padding: 1rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}
.focus-card-title { font-size: 0.95rem; text-transform: uppercase; letter-spacing: .03em; opacity: .9; margin-bottom: .65rem; font-weight: 700; }
.focus-status { grid-column: span 3; }
.focus-primary-action { grid-column: span 4; border-color: rgba(99,102,241,.45); }
.focus-recent { grid-column: span 5; }
.focus-text { margin-bottom: .75rem; opacity: .9; }
.primary-actions-row { display: flex; gap: .55rem; flex-wrap: wrap; }
.primary-cta, .secondary-cta {
  border: none; border-radius: 10px; padding: .65rem .85rem; font-weight: 700; cursor: pointer;
}
.primary-cta { background: linear-gradient(120deg,#6366f1,#8b5cf6); color: white; }
.secondary-cta { background: rgba(255,255,255,.08); color: inherit; border: 1px solid rgba(255,255,255,.15); }

.home-secondary {
  margin-top: .25rem;
  border-radius: 14px;
  border: 1px solid var(--border-color, rgba(255,255,255,0.1));
  background: rgba(255,255,255,0.02);
  overflow: hidden;
}
.home-secondary + .home-secondary {
  margin-top: .75rem;
}
.home-secondary-info {
  margin-bottom: .25rem;
}
.home-secondary > summary {
  cursor: pointer;
  padding: .85rem 1rem;
  font-weight: 700;
  list-style: none;
}
.home-secondary > summary::-webkit-details-marker { display: none; }
.home-secondary[open] > summary { border-bottom: 1px solid rgba(255,255,255,.1); }
.home-secondary .hierarchy-container,
.home-secondary .stats-grid { padding: 1rem; }

.home-joke-card {
  border: 1px solid var(--border-color, rgba(255,255,255,.1));
  border-radius: 12px;
  padding: .75rem;
  background: rgba(255,255,255,.02);
}
.home-joke-card #jokeBtn { margin-top: 0; }
.home-joke-card #jokeDisplay { margin-top: .5rem; }


@media (max-width: 1100px) {
  .focus-status, .focus-primary-action, .focus-recent { grid-column: span 12; }
}

@media (max-width: 768px) {
  .home-focus-grid { gap: .75rem; }
  .focus-card { padding: .85rem; }
  .home-secondary:not([open]) .hierarchy-container,
  .home-secondary:not([open]) .stats-grid { display: none; }
}

/* PHASE 2 UX refinements */
.page-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding: 1rem 1.15rem;
  border: 1px solid #ffffff12;
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(56,189,248,.12), rgba(15,23,42,.18));
}
.page-hero h1 { margin-bottom: .35rem; }
.page-hero .subtitle { margin: 0; }
.page-hero-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.schedule-hero-actions {
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: .35rem;
}
.hero-action-btn {
  border: 1px solid #38bdf85a;
  background: #38bdf822;
  color: #c6ecff;
  border-radius: 10px;
  padding: .62rem .95rem;
  font-weight: 600;
  min-height: 44px;
  cursor: pointer;
}
.hero-action-btn:hover { background: #38bdf835; }

.mobile-settings-divider {
  margin: 1rem 0;
}

.mobile-settings-section {
  padding: 0 0.25rem;
}

.mobile-settings-section-spaced {
  margin-top: 0.75rem;
}

.mobile-settings-label {
  margin-bottom: 0.5rem;
}

.mobile-logout-btn {
  width: 100%;
}

.scrape-panel {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #00000020;
  border-radius: 12px;
  border: 1px solid #ffffff10;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.scrape-panel-copy {
  flex: 1;
  min-width: 200px;
}

.scrape-panel-title {
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 0.25rem;
}

.scrape-panel-subtitle {
  font-size: 0.85rem;
  color: #94a3b8;
}

.scrape-panel-btn {
  padding: 0.75rem 1.5rem;
  background: #38bdf8;
  color: #0f172a;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.2s;
}

.scrape-panel-btn:hover {
  background: #7dd3fc;
}

.scrape-panel-status {
  font-size: 0.85rem;
  color: #94a3b8;
  min-width: 150px;
  text-align: right;
}

body[data-theme="light"] .scrape-panel {
  background: #f8fafc;
  border-color: #dbe6f0;
}

body[data-theme="light"] .scrape-panel-title {
  color: #0f172a;
}

body[data-theme="light"] .scrape-panel-subtitle,
body[data-theme="light"] .scrape-panel-status {
  color: #64748b;
}

.progressive-section {
  border: 1px solid #ffffff12;
  border-radius: 14px;
  background: #0f172a33;
  margin-bottom: 1rem;
  overflow: hidden;
}
.progressive-section > summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  padding: .9rem 1rem;
  min-height: 52px;
}
.progressive-section > summary::-webkit-details-marker { display: none; }
.progressive-summary-copy { color: #94a3b8; font-size: .84rem; }
.progressive-section > summary::after {
  content: '▾';
  color: #7dd3fc;
  transition: transform .2s ease;
}
.progressive-section[open] > summary::after { transform: rotate(180deg); }
.progressive-section .health-section,
.progressive-section .cron-section,
.progressive-section .calisthenics-section { margin: 0; border: 0; border-radius: 0; }

body[data-theme="light"] .page-hero {
  border-color: #d7e3ef;
  background: linear-gradient(160deg, #e0f2fe, #f8fafc);
}
body[data-theme="light"] .hero-action-btn {
  color: #0c4a6e;
  background: #0ea5e914;
  border-color: #0284c73d;
}
body[data-theme="light"] .progressive-section {
  border-color: #dbe6f0;
  background: #ffffff;
}
body[data-theme="light"] .progressive-summary-copy { color: #64748b; }
body[data-theme="light"] .focus-card {
  background: #ffffff;
  border-color: #dbe6f0;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
}
body[data-theme="light"] .focus-card-title,
body[data-theme="light"] .focus-text,
body[data-theme="light"] .home-secondary > summary {
  color: #1e293b;
}
body[data-theme="light"] .secondary-cta {
  background: #f8fafc;
  color: #1e293b;
  border-color: #cbd5e1;
}
body[data-theme="light"] .home-secondary {
  border-color: #dbe6f0;
  background: #ffffff;
}
body[data-theme="light"] .home-secondary[open] > summary {
  border-bottom-color: #e2e8f0;
}
body[data-theme="light"] .home-joke-card {
  border-color: #dbe6f0;
  background: #f8fafc;
}

@media (max-width: 900px) {
  .page-hero { align-items: stretch; flex-direction: column; }
  .page-hero-actions, .hero-action-btn { width: 100%; }
  .schedule-hero-actions { align-items: stretch; }
  .schedule-hero-actions .scrape-panel-status { text-align: left; }
}

@media (max-width: 768px) {
  .nav-tab { min-height: 48px; padding: .72rem .9rem; }
  .calendar-nav-btn, .scrape-btn, .primary-cta, .secondary-cta { min-height: 46px; }
  .page-hero { padding: .85rem; margin-bottom: .85rem; }
}
