:root { 
    --primary-color: #f59e0b; 
    
    /* --- DARK THEME (Smoked Glass) --- */
    --bg-color: #0f172a;
    --blob-1: rgba(245, 158, 11, 0.15); /* Amber glow */
    --blob-2: rgba(37, 99, 235, 0.2); /* Deep Blue */
    --blob-3: rgba(88, 28, 135, 0.25); /* Deep Purple */
    
    /* Glass Cards */
    --card-bg: rgba(30, 41, 59, 0.45); /* Dark semi-transparent */
    --card-border: rgba(255, 255, 255, 0.1); /* Subtle edge */
    --card-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    
    /* Typography */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    
    /* Elements */
    --accent-bg: rgba(255, 255, 255, 0.05);
    --border-theme: rgba(255, 255, 255, 0.1);
    --divider-color: rgba(255, 255, 255, 0.1);
    
    --toggle-bg: rgba(255, 255, 255, 0.1);
    --toggle-icon: #fbbf24;
    
    /* Segment Control */
    --seg-bg: rgba(0, 0, 0, 0.2);
    --seg-btn-active: rgba(255, 255, 255, 0.1);
    --seg-text: #94a3b8;
    --seg-text-active: #ffffff;
    --seg-shadow: 0 4px 12px rgba(0,0,0,0.3);
    
    /* Table & Core Styles */
    --table-bg: rgba(30, 41, 59, 0.45);
    --table-border: rgba(255, 255, 255, 0.08);
    --table-text: #e5e7eb;
    --table-head-bg: rgba(17, 24, 39, 0.85);
    --table-head-sticky: rgba(55, 65, 81, 0.85);
    --table-highlight-bg: rgba(245, 158, 11, 0.12);
    --table-focus-bg: rgba(245, 158, 11, 0.08);
    
    --modal-bg: #1f2937;
    --modal-text: #e5e7eb;
    --modal-border: #374151;
    
    --btn-donat-bg: rgba(30, 41, 59, 0.6);
    --btn-donat-border: rgba(255, 255, 255, 0.1);
    --btn-donat-text: #cbd5e1;
}
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color); 
    color: #e5e7eb; 
    min-height: 100vh;
    transition: background-color 0.5s ease;
    position: relative;
    overflow-x: hidden;
}

/* --- BACKGROUND BLOBS FOR GLASS EFFECT --- */
.ambient-light {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: -1;
}
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 1;
    transition: background-color 0.5s ease;
}
.blob-1 {
    top: -10%; left: -10%; width: 50vw; height: 50vw;
    background-color: var(--blob-1);
    animation: float 20s infinite ease-in-out alternate;
}
.blob-2 {
    bottom: 10%; right: -10%; width: 60vw; height: 60vw;
    background-color: var(--blob-2);
    animation: float 25s infinite ease-in-out alternate-reverse;
}
.blob-3 {
    top: 40%; left: 30%; width: 40vw; height: 40vw;
    background-color: var(--blob-3);
    animation: float 18s infinite ease-in-out alternate;
}

@keyframes float { 0% { transform: translateY(0px) scale(1); } 50% { transform: translateY(-20px) scale(1.05); } 100% { transform: translateY(0px) scale(1); } }

.card {
    background: var(--card-bg); 
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 24px;
    box-shadow: var(--card-shadow), inset 0 0 0 1px rgba(255,255,255,0.05);
    transition: transform 0.2s ease-in-out, background 0.3s ease, border-color 0.3s ease;
    border: 1px solid var(--card-border);
    width: 100%;
    box-sizing: border-box;
}
.bg-gray-800 {
    background-color: var(--seg-bg) !important;
    border-color: var(--card-border) !important;
}
.theme-header {
    position: relative;
    padding-top: 0;
    display: none;
}
@media (min-width: 768px) {
    .theme-header {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}
/* THEME TOGGLE & INSTALL BUTTON WRAPPER */
.header-controls {
    position: absolute;
    top: 0.25rem;
    right: 0;
    display: flex;
    gap: 0.75rem;
    z-index: 50;
}

/* --- iOS Toggle Switch Styles --- */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #4b5563; /* gray-600 */
  transition: .4s;
  border-radius: 34px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: #f59e0b; /* orange-500 (Primary color) */
}
input:checked + .slider:before {
  transform: translateX(20px);
}
/* Адаптація для світлої теми */
.light-theme .slider {
    background-color: #cbd5e1; /* slate-300 */
}


.theme-toggle, .install-btn {
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background-color: rgba(17, 24, 39, 0.65);
    color: #f8fafc;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.35);
    transition: all 0.2s ease;
}

.theme-toggle:hover, .install-btn:hover { transform: translateY(-2px) scale(1.02); }
.theme-toggle:focus-visible, .install-btn:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 4px; }
.theme-toggle svg, .install-btn svg { width: 1.4rem; height: 1.4rem; }

/* BASE THEME ICON VISIBILITY */
.theme-toggle .icon-sun,
.theme-toggle .icon-moon,
.theme-btn .icon-sun,
.theme-btn .icon-moon {
    display: none;
}

/* DARK THEME: SUN ICON (☀️) IS SHOWN */
html.dark-theme .theme-toggle .icon-sun,
html.dark-theme .theme-btn .icon-sun,
html.dark .theme-toggle .icon-sun,
html.dark .theme-btn .icon-sun,
html:not(.light-theme):not(.light) .theme-toggle .icon-sun,
html:not(.light-theme):not(.light) .theme-btn .icon-sun {
    display: block !important;
}

html.dark-theme .theme-toggle .icon-moon,
html.dark-theme .theme-btn .icon-moon,
html.dark .theme-toggle .icon-moon,
html.dark .theme-btn .icon-moon,
html:not(.light-theme):not(.light) .theme-toggle .icon-moon,
html:not(.light-theme):not(.light) .theme-btn .icon-moon {
    display: none !important;
}

/* LIGHT THEME: MOON ICON (🌙) IS SHOWN */
html.light-theme .theme-toggle .icon-moon,
html.light-theme .theme-btn .icon-moon,
html.light .theme-toggle .icon-moon,
html.light .theme-btn .icon-moon {
    display: block !important;
}

html.light-theme .theme-toggle .icon-sun,
html.light-theme .theme-btn .icon-sun,
html.light .theme-toggle .icon-sun,
html.light .theme-btn .icon-sun {
    display: none !important;
}

/* IMPROVED LIGHT THEME BUTTONS */
.light-theme .theme-toggle, 
.light-theme .install-btn {
    background-color: #ffffff;
    color: #f59e0b; /* Orange accent */
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.light-theme .theme-toggle:hover, 
.light-theme .install-btn:hover {
    background-color: #fdfdfd;
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.15);
    border-color: #fcd34d;
}

.install-btn { display: none; } /* Hidden by default until triggered */

@media (max-width: 640px) {
    .theme-header { padding-top: 1rem; }
    .header-controls {
        top: 0;
        right: 0;
    }
    .theme-toggle, .install-btn { width: 2.6rem; height: 2.6rem; }
}

.status-on { color: #34d399; font-weight: 700; }
.status-off { color: #f87171; font-weight: 700; }
.active-group-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: #fff !important;
    font-weight: 800;
    border: none;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
    transform: translateY(-1px);
}

/* TABLE CSS */
.table-scroll-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
    border: 1px solid var(--table-border);
    border-radius: 8px; 
    background-color: var(--table-bg);
}
.schedule-table { border-collapse: separate; border-spacing: 0; width: 100%; color: var(--table-text); }
.schedule-table th, .schedule-table td { 
    padding: 0.6rem 0.4rem; border-bottom: 1px solid var(--table-border); background-color: var(--table-bg); min-width: 45px; position: relative; z-index: 1; 
}
.highlight-row th, .highlight-row td { background-color: var(--table-highlight-bg) !important; }
.highlight-row th.time-column { background-color: var(--table-highlight-bg) !important; color: var(--primary-color); }
.schedule-table td.focused-column {
    background-color: var(--table-focus-bg) !important; 
    box-shadow: inset 1px 0 0 rgba(245, 158, 11, 0.15), inset -1px 0 0 rgba(245, 158, 11, 0.15);
}
tr.highlight-row td.focused-column {
    background-color: rgba(245, 158, 11, 0.18) !important; 
    box-shadow: inset 1px 0 0 rgba(245, 158, 11, 0.4), inset -1px 0 0 rgba(245, 158, 11, 0.4) !important;
    z-index: 5;
}
.schedule-table th.time-column { position: sticky; left: 0; z-index: 20; background-color: var(--table-head-bg); border-right: none; }
.schedule-table th.time-column::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 1px; background-color: var(--table-border); z-index: 25; pointer-events: none; }
.schedule-table thead th { position: sticky; top: 0; z-index: 30; background-color: var(--table-head-bg); border-bottom: 1px solid var(--table-border); }
.schedule-table thead th.time-column { z-index: 40; background-color: var(--table-head-sticky); border-bottom: 1px solid var(--table-border); }
.schedule-table thead th.time-column::after { background-color: var(--table-border); }

/* LINEAR GRAPH CSS */
.linear-schedule-container {
    position: relative;
    padding-bottom: 1rem;
    scroll-behavior: smooth; 
    display: block; 
    overflow-x: hidden; /* Default for large screens and Full Day Fit */
}

/* MOBILE OVERFLOW SETTINGS */
@media (max-width: 767px) {
    .linear-schedule-container.overflow-auto-mobile {
        overflow-x: auto !important; /* Enable scroll when Full Day Fit is disabled on mobile */
    }
}

.timeline-track-container {
    width: 100%; /* Default: fit parent width (which is 100% of container) */
    position: relative;
    padding-top: 1.5rem; 
}

/* Fixed width for desktop/scroll mode on mobile */
/* IMPORTANT: This class is applied dynamically in JS */
.timeline-track-container.wide-scroll {
    width: 1200px !important; /* Enforced desktop width */
}

/* Adjustments for fixed width elements within flexible container */
.timeline-header, .timeline-footer {
    margin-left: 3rem; 
    /* Use 100% width relative to its parent (timeline-track-container) */
    width: calc(100% - 3rem); 
}

.watermark-label {
    position: absolute;
    top: 0.25rem;
    left: 3.5rem; 
    font-size: 0.85rem;
    font-weight: 900;
    color: #6b7280; 
    opacity: 0.9; 
    letter-spacing: 0.05em;
    pointer-events: none;
    text-transform: uppercase;
    z-index: 20;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* MOBILE ADJUSTMENTS FOR TIMELINE */
@media (max-width: 767px) {
    .timeline-header, .timeline-footer {
        margin-left: 2rem; 
        width: calc(100% - 2rem); 
    }
    .timeline-label {
        width: 2rem !important; 
        font-size: 0.65rem !important;
        padding-right: 2px;
    }
    .watermark-label {
        left: 2.25rem;
        font-size: 0.7rem;
    }
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.7rem;
    color: #9ca3af;
    position: relative;
    height: 1.5rem;
}
.timeline-header-mark {
    position: absolute;
    transform: translateX(-50%);
    bottom: 0;
}

.timeline-header-mark:first-child { transform: translateX(0%); }
.timeline-header-mark:last-child { transform: translateX(-100%); }

.timeline-header-mark::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 1px;
    height: 4px;
    background-color: #4b5563;
}

.timeline-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem; 
    font-size: 0.7rem;
    color: #9ca3af;
    position: relative;
    height: 1.5rem;
}
.timeline-footer .timeline-header-mark { top: 0; bottom: auto; }
.timeline-footer .timeline-header-mark::after { top: -5px; bottom: auto; }

.timeline-row {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    position: relative;
    height: 2rem;
    transition: all 0.3s ease; 
}

.timeline-row.focused-row {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.05); 
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); 
    z-index: 10;
}
.timeline-row.dimmed-row {
    opacity: 0.65;
    filter: grayscale(0.4);
}
.timeline-row.dimmed-row:hover {
    opacity: 0.9;
    filter: grayscale(0);
}

.timeline-label {
    width: 3rem;
    font-size: 0.75rem;
    font-weight: 800;
    color: #9ca3af;
    flex-shrink: 0;
    text-align: center;
    cursor: pointer;
    transition: color 0.2s;
    position: relative;
    z-index: 10;
    background-color: transparent;
    border-right: 1px solid #374151;
    box-shadow: none;
}
.timeline-label:hover { color: white; }
.timeline-label.active-label {
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.5);
}
.light-theme .timeline-label {
    color: #1f2937;
    border-right: 1px solid #e5e7eb;
    text-shadow: 0 1px 2px rgba(255,255,255,0.6);
}
.light-theme .timeline-label.active-label {
    color: #b45309;
    text-shadow: 0 0 10px rgba(180, 83, 9, 0.3);
}

.timeline-track {
    flex-grow: 1;
    background-color: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 4px;
    position: relative;
    height: 100%;
    overflow: visible !important;
    transition: all 0.3s ease;
}
.timeline-track.active-track {
    background-color: rgba(16, 185, 129, 0.35);
    border-color: rgba(16, 185, 129, 0.8);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.25);
}

.timeline-grid-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 15;
    background-size: calc(100% / 24) 100%; 
    background-image: linear-gradient(to right, transparent 96%, rgba(0,0,0,0.4) 100%);
    opacity: 0.6;
    mix-blend-mode: multiply; 
}

.schedule-segment {
    position: absolute;
    top: 0; bottom: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    transition: box-shadow 0.15s ease-in-out, transform 0.15s ease-in-out; 
}

.outage-segment {
    background: linear-gradient(45deg, #e38b8b, #cc6b6b);
    border-left: 1px solid #c15e5e;
    border-right: 1px solid #c15e5e;
    opacity: 0.9;
}

.power-on-segment {
    background-color: transparent; 
    z-index: 4; 
}
.power-on-segment:hover {
     background-color: rgba(255, 255, 255, 0.05);
}

.segment-info {
    pointer-events: none;
    font-size: 0.68rem;
    font-weight: 900;
    color: rgba(255,255,255,0.96);
    text-shadow: 0 1px 3px rgba(0,0,0,0.9), 0 0 2px rgba(0,0,0,0.6);
    white-space: nowrap;
    z-index: 20;
}
.light-theme .segment-info {
    color: #0b1324;
    text-shadow: 0 1px 3px rgba(255,255,255,0.95), 0 0 3px rgba(255,255,255,0.8);
}

/* === MOBILE FONT OPTIMIZATION === */
.duration-unit {
    display: inline; 
}

@media (max-width: 640px) {
    .segment-info {
        font-size: 0.6rem; 
    }
    .duration-unit {
        display: none; 
    }
}

.segment-hover-label {
    position: absolute;
    bottom: 110%; 
    left: 50%;
    transform: translateX(-50%);
    background-color: #111827;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.15s, transform 0.15s;
    pointer-events: none;
    z-index: 100; 
    border: 1px solid rgba(245, 158, 11, 0.5);
    box-shadow: 0 4px 12px rgba(0,0,0,0.8);
}

.segment-hover-label::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #111827 transparent transparent transparent;
}

.schedule-segment:hover {
    z-index: 101; 
    box-shadow: inset 0 0 0 2px rgba(245, 158, 11, 0.5);
    transform: scale(1.01);
}

.schedule-segment:hover .segment-hover-label {
    opacity: 1;
    transform: translateX(-50%) translateY(-2px);
}

.schedule-segment.touch-active {
    z-index: 101; 
    box-shadow: inset 0 0 0 2px rgba(245, 158, 11, 0.8); 
    transform: scale(1.01);
}

.schedule-segment.touch-active .segment-hover-label {
    opacity: 1;
    transform: translateX(-50%) translateY(-2px);
    pointer-events: auto; 
}

.current-time-line {
    position: absolute;
    top: 0; bottom: 0;
    width: 2px;
    background-color: #f59e0b;
    box-shadow: 0 0 8px #f59e0b;
    z-index: 50; 
    pointer-events: none;
    transform: translateX(-50%);
}
.current-time-head {
    position: absolute;
    top: -1.5rem;
    transform: translateX(-50%);
    background-color: #f59e0b;
    color: #111827;
    font-size: 0.65rem;
    font-weight: bold;
    padding: 1px 4px;
    border-radius: 4px;
    white-space: nowrap;
}

.bg-gradient-on { background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(6, 95, 70, 0.2) 100%); border: 1px solid rgba(16, 185, 129, 0.2); }
.bg-gradient-off { background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(153, 27, 27, 0.2) 100%); border: 1px solid rgba(239, 68, 68, 0.3); }
.fade-text { transition: opacity 0.3s ease-in-out; }
@keyframes flicker { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.8; transform: scale(1.05) rotate(2deg); } 75% { opacity: 0.9; } }
.flicker-animation { animation: flicker 2.5s infinite ease-in-out; }
.donation-block {
    background: radial-gradient(circle at 20% 20%, rgba(79, 70, 229, 0.12), transparent 45%),
                radial-gradient(circle at 80% 10%, rgba(14, 165, 233, 0.12), transparent 40%),
                linear-gradient(135deg, #1f2937 0%, #111827 100%);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255,255,255,0.08);
    color: #e5e7eb;
    border: 1px solid rgba(255,255,255,0.06);
}
.light-theme .donation-block {
    background: radial-gradient(circle at 18% 20%, rgba(59,130,246,0.15), transparent 45%),
                radial-gradient(circle at 85% 12%, rgba(14,165,233,0.12), transparent 40%),
                linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255,255,255,0.7);
    color: #0b1324;
    border: 1px solid rgba(148,163,184,0.35);
}

/* DEVELOPER INFO BLOCK STYLES */
.dev-info-block {
    background: #1f2937;
    border: 1px solid #374151;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    color: #e5e7eb;
}
.light-theme .dev-info-block {
    background: #ffffff;
    border-color: #e2e8f0;
    color: #0f172a;
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
}

.day-toggle-btn {
    padding: 0.35rem 0.85rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none !important;
    cursor: pointer;
    white-space: nowrap;
}
.day-toggle-btn.active-day {
    background: var(--seg-btn-active) !important;
    color: var(--seg-text-active) !important;
    box-shadow: var(--seg-shadow) !important;
    font-weight: 800;
    transform: none !important;
}
.day-toggle-btn.inactive-day {
    background-color: transparent !important;
    color: var(--seg-text) !important;
}
.day-toggle-btn:hover {
    color: var(--seg-text-active) !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
}
.light-theme .day-toggle-btn:hover {
    background-color: rgba(0, 0, 0, 0.03) !important;
}
/* Light theme overrides for group buttons */
.light-theme #group-selection .bg-emerald-900\/30 {
    background-color: #e8f5ee !important;
    border-color: #9ad1b6 !important;
    color: #0b1324 !important;
}
.light-theme #group-selection .bg-red-900\/30 {
    background-color: #fbe9e9 !important;
    border-color: #f5b5b5 !important;
    color: #7f1d1d !important;
}
.light-theme #group-selection .text-emerald-200,
.light-theme #group-selection .text-red-200 {
    color: #0b1324 !important;
}
.light-theme .text-emerald-300,
.light-theme .text-emerald-400 { color: #0f766e !important; }
.light-theme .text-red-300,
.light-theme .text-red-400 { color: #b91c1c !important; }
.light-theme #statistics-infographic .bg-emerald-500 { background-color: #86efac !important; }
.light-theme #statistics-infographic .bg-red-500 { background-color: #fca5a5 !important; }
.light-theme #statistics-infographic .bg-gray-700 { background-color: #e5e7eb !important; }
.light-theme #statistics-infographic .text-emerald-400 { color: #047857 !important; }
.light-theme #statistics-infographic .text-red-400 { color: #b91c1c !important; }
.day-toggle-btn:disabled { background-color: #374151; color: #6b7280; border-color: #4b5563; opacity: 0.6; cursor: not-allowed; }

.view-toggle-btn {
    padding: 0.35rem 0.85rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none !important;
    cursor: pointer;
    white-space: nowrap;
}
.view-toggle-btn.active-view {
    background: var(--seg-btn-active) !important;
    color: var(--seg-text-active) !important;
    box-shadow: var(--seg-shadow) !important;
    font-weight: 800;
    transform: none !important;
}
.view-toggle-btn.inactive-view {
    background-color: transparent !important;
    color: var(--seg-text) !important;
}
.view-toggle-btn:hover {
    color: var(--seg-text-active) !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
}
.light-theme .view-toggle-btn:hover {
    background-color: rgba(0, 0, 0, 0.03) !important;
}

.symbol-off { color: #f87171; font-size: 1.1rem; }
.symbol-on { color: #34d399; font-size: 1.1rem; }
.partial-cell-container { padding: 0.5rem 0.2rem; display: flex; align-items: center; justify-content: center; }

.settings-badge {
    position: absolute;
    top: 1rem; right: 1rem;
    background: rgba(31, 41, 55, 0.8);
    border: 1px solid rgba(75, 85, 99, 0.5);
    color: #9ca3af;
    padding: 0.4rem 0.8rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex; align-items: center; gap: 0.4rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    z-index: 10;
}
.settings-badge:hover { 
    background: rgba(31, 41, 55, 1);
    color: white;
    border-color: #6b7280;
    transform: translateY(-1px);
}
.light-theme .settings-badge {
    background: #ffffff;
    border-color: #e5e7eb;
    color: #4b5563;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.light-theme .settings-badge:hover {
    color: #111827;
    border-color: #d1d5db;
}

.settings-badge svg { width: 1.1rem; height: 1.1rem; }

/* SETTINGS HINT CSS */
.settings-hint {
    position: absolute;
    top: 3.5rem;
    right: 0.5rem;
    width: 220px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    padding: 0.85rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5), 0 4px 6px rgba(0,0,0,0.2);
    z-index: 40;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
    pointer-events: none;
    border: 1px solid rgba(255,255,255,0.2);
}
.settings-hint.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.settings-hint-arrow {
    position: absolute;
    top: -6px;
    right: 1.5rem;
    width: 12px;
    height: 12px;
    background: #2563eb;
    transform: rotate(45deg);
    border-left: 1px solid rgba(255,255,255,0.2);
    border-top: 1px solid rgba(255,255,255,0.2);
}

/* MODAL STYLES */
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}
.light-theme .modal-backdrop {
    background-color: rgba(0, 0, 0, 0.4);
}
.modal-content {
    background-color: var(--modal-bg);
    color: var(--modal-text);
    border: 1px solid var(--modal-border);
    max-height: 85vh; 
    display: flex;
    flex-direction: column;
}
.light-theme {
    --modal-bg: #ffffff;
    --modal-text: #0f172a;
    --modal-border: #e2e8f0;
}

/* LIGHT THEME MODAL SPECIFIC FIXES */
.light-theme #settings-modal .bg-gray-800\/50 {
    background-color: #f8fafc !important; 
    border-color: #e2e8f0 !important;
}
.light-theme #settings-modal .hover\:bg-gray-800:hover {
    background-color: #f1f5f9 !important; 
}
.light-theme #settings-modal .text-gray-200 {
    color: #1e293b !important; 
}
.light-theme #settings-modal .text-gray-500 {
    color: #64748b !important; 
}
.light-theme #settings-modal input[type="checkbox"] {
    background-color: #ffffff !important;
    border-color: #cbd5e1 !important;
}
.light-theme #settings-modal input[type="checkbox"]:focus {
    ring-color: #fbbf24 !important; 
}

/* === FIX: ПОКРАЩЕННЯ ЧИТАБЕЛЬНОСТІ БЛОКУ ОНОВЛЕНЬ (СВІТЛА ТЕМА) === */
.light-theme #dev-info-block .bg-gray-900\/40 {
    background-color: #f8fafc !important; 
    border-color: #cbd5e1 !important;     
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.light-theme #dev-info-block ul.text-gray-300 {
    color: #334155 !important; 
}
.light-theme #dev-info-block strong.text-gray-200 {
    color: #0f172a !important; 
    font-weight: 700;
}
.light-theme #dev-info-block .text-gray-400 {
    color: #475569 !important; 
    border-color: #e2e8f0 !important; 
}

.radio-option-card {
    border: 1px solid var(--modal-border);
    border-radius: 0.75rem;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}
.radio-option-card:hover {
    background-color: rgba(255,255,255,0.03);
}
.light-theme .radio-option-card:hover {
    background-color: #f8fafc;
}
.radio-option-card.selected {
    border-color: var(--primary-color);
    background-color: rgba(245, 158, 11, 0.1);
}
.radio-option-card input[type="radio"] {
    margin-top: 0.25rem;
    accent-color: var(--primary-color);
}


/* LIGHT THEME OVERRIDES */
.light-theme body {
    background-color: var(--bg-color);
    color: #0f172a;
}
.light-theme {
    --bg-color: #f0f4f8;
    --blob-1: rgba(251, 191, 36, 0.4); /* Amber/Sun */
    --blob-2: rgba(59, 130, 246, 0.4); /* Blue/Sky */
    --blob-3: rgba(236, 72, 153, 0.3); /* Pink/Sunrise */
    
    /* Glass Cards */
    --card-bg: rgba(255, 255, 255, 0.45);
    --card-border: rgba(255, 255, 255, 0.8);
    --card-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    
    --text-primary: #1e293b;
    --text-secondary: #475569;
    
    --accent-bg: rgba(255, 255, 255, 0.6);
    --border-theme: rgba(255, 255, 255, 0.6);
    --divider-color: rgba(148, 163, 184, 0.3);
    
    --toggle-bg: rgba(255, 255, 255, 0.6);
    --toggle-icon: #f59e0b;
    
    /* Segment Control */
    --seg-bg: rgba(226, 232, 240, 0.6);
    --seg-btn-active: #ffffff;
    --seg-text: #64748b;
    --seg-text-active: #0f172a;
    --seg-shadow: 0 4px 6px rgba(0,0,0,0.05);

    --table-bg: #ffffff;
    --table-border: #cbd5e1;
    --table-text: #1e293b;
    --table-head-bg: #f8fafc;
    --table-head-sticky: #f1f5f9;
    --table-highlight-bg: #eef2ff;
    --table-focus-bg: rgba(249, 115, 22, 0.12);
    
    --btn-donat-bg: rgba(255, 255, 255, 0.7);
    --btn-donat-border: rgba(255, 255, 255, 0.9);
    --btn-donat-text: #334155;
}
.light-theme .card {
    background: var(--card-bg);
    border-color: var(--card-border);
    box-shadow: var(--card-shadow), inset 0 0 0 1px rgba(255,255,255,0.05);
    color: #0f172a;
}
.light-theme .text-white,
.light-theme .text-gray-100 { color: #0b1324 !important; }
.light-theme .text-gray-200 { color: #1e293b !important; } 
.light-theme .text-gray-300 { color: #1f2937 !important; }
.light-theme .text-gray-400 { color: #475569 !important; }
.light-theme .text-gray-500,
.light-theme .text-gray-600 { color: #475569 !important; }
.light-theme .bg-gray-800 {
    background-color: #ffffff !important;
    color: #0f172a;
    border-color: #e2e8f0;
}
.light-theme .bg-gray-800\/80 { background-color: rgba(255, 255, 255, 0.9) !important; }
.light-theme .bg-gray-900\/30 { background-color: rgba(148, 163, 184, 0.18) !important; }
.light-theme .bg-gray-900\/40 { background-color: rgba(148, 163, 184, 0.22) !important; }
.light-theme .bg-gray-900\/50 { background-color: rgba(148, 163, 184, 0.3) !important; }
.light-theme .bg-gray-700 { background-color: #cbd5f5 !important; }
.light-theme .border-gray-700,
.light-theme .border-gray-700\/50,
.light-theme .border-gray-600,
.light-theme .border-gray-500 { border-color: #d1d5db !important; }
.light-theme #status-main-card {
    box-shadow: 0 12px 32px -4px rgba(0, 0, 0, 0.05), 0 4px 12px rgba(0, 0, 0, 0.02) !important;
}
.light-theme .bg-gradient-on {
    background: linear-gradient(135deg, #ffffff 0%, #ecfdf5 100%) !important;
    border: 1px solid rgba(16, 185, 129, 0.35) !important;
}
.light-theme .bg-gradient-off {
    background: linear-gradient(135deg, #ffffff 0%, #fff1f2 100%) !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
}
.legend-dot-on {
    background: linear-gradient(135deg, #34d399, #10b981);
    border: 1px solid #34d399;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
}
.legend-dot-off {
    background: linear-gradient(135deg, #f87171, #ef4444);
    border: 1px solid #fca5a5;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.25);
}
.light-theme .legend-dot-on {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0) !important;
    border: 1px solid #6ee7b7 !important;
    box-shadow: 0 1px 4px rgba(16, 185, 129, 0.18) !important;
}
.light-theme .legend-dot-off {
    background: linear-gradient(135deg, #fee2e2, #fecdd3) !important;
    border: 1px solid #fca5a5 !important;
    box-shadow: 0 1px 4px rgba(239, 68, 68, 0.18) !important;
}
#status-badges:empty { display: none; }
.next-change-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.825rem;
    letter-spacing: 0.01em;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.next-change-badge .badge-icon { font-size: 0.95rem; }

/* Dark Theme Badge Variants */
.next-change-badge.on {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.35);
    color: #34d399;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}
.next-change-badge.off {
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.35);
    color: #f87171;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

/* Light Theme Badge Variants - Glassmorphism */
.light-theme .next-change-badge.on {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.35);
    color: #047857;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.1);
}
.light-theme .next-change-badge.off {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.32);
    color: #be123c;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.1);
}

/* LIGHT THEME BUTTON STYLES FIX */
.light-theme .linear-schedule-container { scrollbar-color: #cbd5f5 transparent; }
.light-theme .theme-toggle svg { color: currentColor; }
.support-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.8rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.75rem;
    background: #e5e7eb;
    color: #0f172a;
    transition: background-color 0.2s ease, color 0.2s ease;
    box-shadow: none;
    border: none;
}
.support-badge:hover {
    background: #d1d5db;
    color: #0f172a;
}
.dark-theme .support-badge {
    background: #374151;
    color: #e5e7eb;
    border: none;
    box-shadow: none;
}
.dark-theme .support-badge:hover {
    background: #4b5563;
    color: #f3f4f6;
}

/* Donat Button Theming */
.btn-donat {
    background-color: var(--btn-donat-bg);
    color: var(--btn-donat-text);
    border: 1px solid var(--btn-donat-border);
    backdrop-filter: blur(10px);
}
.btn-donat:hover {
    border-color: #f59e0b;
    color: #f59e0b;
    background-color: var(--card-bg);
}

/* Theme Toggle Button */
.theme-btn {
    background: var(--toggle-bg);
    color: var(--text-secondary);
    border: 1px solid var(--card-border);
    width: 40px; height: 40px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}
.theme-btn:hover {
    transform: translateY(-2px);
    color: var(--toggle-icon);
    background: var(--card-bg);
}

/* SVG Icon visibility inside .theme-btn */
html.dark-theme .theme-btn .icon-sun,
html.dark .theme-btn .icon-sun { display: block !important; }
html.dark-theme .theme-btn .icon-moon,
html.dark .theme-btn .icon-moon { display: none !important; }
html.light-theme .theme-btn .icon-moon,
html.light .theme-btn .icon-moon { display: block !important; }
html.light-theme .theme-btn .icon-sun,
html.light .theme-btn .icon-sun { display: none !important; }

/* ============================================
   STATUS CARD — VARIANT B
   ============================================ */

.status-card-b {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Top row: icon + text */
.status-card-b-top {
    display: flex;
    align-items: center;
    gap: 16px;
}

.status-icon-wrap {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    position: relative;
}

/* Light Wave Pulses (Expanding Rings) */
.status-icon-wrap::before,
.status-icon-wrap::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

/* --- LIGHT ON (Lamp 💡) --- */
.status-icon-wrap.status-on-wrap::before {
    width: 36px;
    height: 36px;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.65) 0%, rgba(245, 158, 11, 0.25) 50%, rgba(245, 158, 11, 0) 100%);
    animation: lightRadiate 2.4s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}

.status-icon-wrap.status-on-wrap::after {
    width: 36px;
    height: 36px;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.5) 0%, rgba(245, 158, 11, 0.2) 50%, rgba(245, 158, 11, 0) 100%);
    animation: lightRadiate 2.4s infinite cubic-bezier(0.215, 0.61, 0.355, 1) 1.2s;
}

.status-icon-wrap.status-on-wrap .status-emoji,
.status-icon-wrap.status-on-wrap #main-status-icon {
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 0 12px rgba(251, 191, 36, 0.9));
    animation: iconGlowPulseOn 2s infinite ease-in-out alternate;
}

/* --- LIGHT OFF (Flashlight 🔦) --- */
.status-icon-wrap.status-off-wrap::before {
    width: 36px;
    height: 36px;
    background: radial-gradient(circle, rgba(248, 113, 113, 0.55) 0%, rgba(239, 68, 68, 0.25) 50%, rgba(239, 68, 68, 0) 100%);
    animation: lightRadiate 2.4s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}

.status-icon-wrap.status-off-wrap::after {
    width: 36px;
    height: 36px;
    background: radial-gradient(circle, rgba(248, 113, 113, 0.45) 0%, rgba(239, 68, 68, 0.2) 50%, rgba(239, 68, 68, 0) 100%);
    animation: lightRadiate 2.4s infinite cubic-bezier(0.215, 0.61, 0.355, 1) 1.2s;
}

.status-icon-wrap.status-off-wrap .status-emoji,
.status-icon-wrap.status-off-wrap #main-status-icon {
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 0 10px rgba(239, 68, 68, 0.8));
    animation: iconGlowPulseOff 2s infinite ease-in-out alternate;
}

/* Keyframes for Light Wave Radiating Outward */
@keyframes lightRadiate {
    0% {
        width: 25px;
        height: 25px;
        opacity: 0.95;
    }
    100% {
        width: 90px;
        height: 90px;
        opacity: 0;
    }
}

@keyframes iconGlowPulseOn {
    0% {
        filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.6));
        transform: scale(1);
    }
    100% {
        filter: drop-shadow(0 0 18px rgba(251, 191, 36, 1));
        transform: scale(1.08);
    }
}

@keyframes iconGlowPulseOff {
    0% {
        filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.5));
        transform: scale(1);
    }
    100% {
        filter: drop-shadow(0 0 16px rgba(239, 68, 68, 0.9));
        transform: scale(1.06);
    }
}

.status-card-b-text {
    flex: 1;
    min-width: 0;
}

.status-main-label {
    font-size: 2rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.02em;
    white-space: nowrap;
    color: #ffffff !important;
}

.status-sub-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 5px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.status-duration {
    font-weight: 700;
}

/* Forecast Pill */
.status-forecast-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 0.875rem;
    font-weight: 600;
    backdrop-filter: blur(8px);
    border: 1px solid transparent;
    transition: all 0.3s ease;
}
.status-forecast-pill.on {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}
.status-forecast-pill.off {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}
.status-forecast-pill.pending {
    background: rgba(100, 116, 139, 0.15);
    border-color: rgba(100, 116, 139, 0.3);
    color: #94a3b8;
}

.status-pill-timer {
    font-size: 0.8rem;
    font-weight: 700;
    opacity: 0.85;
    white-space: nowrap;
}

/* ============================================
   STATISTICS — SPLIT BAR
   ============================================ */

.stats-split-bar-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 8px;
}

.stats-split-bar-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stats-split-on {
    font-size: 0.8rem;
    font-weight: 700;
    color: #34d399;
}

.stats-split-off {
    font-size: 0.8rem;
    font-weight: 700;
    color: #f87171;
}

.stats-split-pct {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.stats-split-bar {
    display: flex;
    height: 10px;
    border-radius: 99px;
    overflow: hidden;
    background: rgba(255,255,255,0.06);
    gap: 2px;
}

.stats-split-bar-on {
    background: linear-gradient(90deg, #059669, #34d399);
    border-radius: 99px 0 0 99px;
    transition: width 0.6s ease;
}

.stats-split-bar-off {
    background: linear-gradient(90deg, #ef4444, #fca5a5);
    border-radius: 0 99px 99px 0;
    transition: width 0.6s ease;
}

.stats-split-date {
    font-size: 0.7rem;
    color: var(--text-secondary);
    opacity: 0.6;
    text-align: center;
    margin-top: 2px;
}

/* LIGHT THEME OVERRIDES for status card components */
.light-theme #statistics-infographic {
    background-color: rgba(255, 255, 255, 0.75) !important;
    border-color: rgba(203, 213, 225, 0.6) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03) !important;
}
.light-theme .status-forecast-pill.on {
    background: #ffffff !important;
    border: 1px solid rgba(16, 185, 129, 0.35) !important;
    color: #047857 !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.08) !important;
}
.light-theme .status-forecast-pill.off {
    background: #ffffff !important;
    border: 1px solid rgba(225, 29, 72, 0.3) !important;
    color: #be123c !important;
    box-shadow: 0 2px 8px rgba(225, 29, 72, 0.08) !important;
}
.light-theme .status-forecast-pill.pending {
    background: #ffffff !important;
    border: 1px solid rgba(100, 116, 139, 0.25) !important;
    color: #334155 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03) !important;
}
.light-theme .stats-split-on { color: #047857 !important; }
.light-theme .stats-split-off { color: #be123c !important; }
.light-theme .status-main-label { color: #0f172a !important; }
.light-theme .status-sub-label { color: #334155 !important; }
.light-theme .stats-split-bar { background: rgba(0,0,0,0.08); }
.light-theme #current-status-title { color: #0f172a !important; }
.light-theme #quote-display { color: #475569 !important; }

/* ============================================
   MOBILE PERSONAL QUEUE BANNER CARD
   ============================================ */
.mobile-queue-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.mobile-queue-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(59, 130, 246, 0.04) 100%);
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-queue-card:hover {
    border-color: rgba(245, 158, 11, 0.35);
    box-shadow: 0 10px 25px -5px rgba(245, 158, 11, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.mobile-queue-badge {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff !important;
    font-weight: 700;
    padding: 0.15rem 0.55rem;
    border-radius: 8px;
    font-size: 0.85rem;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
    letter-spacing: 0.02em;
}

.mobile-queue-arrow {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.mobile-queue-card:hover .mobile-queue-arrow {
    background: #f59e0b;
    color: #ffffff;
    border-color: #f59e0b;
    transform: translateX(3px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

.light-theme .mobile-queue-card::before {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.07) 0%, rgba(241, 245, 249, 0.5) 100%);
}
.light-theme .mobile-queue-arrow {
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
}

.mobile-queue-title {
    color: var(--text-primary, #f8fafc);
}

.mobile-queue-subtext {
    color: var(--text-secondary, #94a3b8);
}

.light-theme .mobile-queue-title {
    color: #0f172a;
}

.light-theme .mobile-queue-subtext {
    color: #475569;
}

/* Remove border outline from date badge */
#mobile-schedule-date,
#schedule-date-label {
    border: none !important;
}

/* ============================================
   UI POLISH: SMOOTH TRANSITIONS & MICRO-INTERACTIONS
   ============================================ */

/* 1. Smooth Fade-in for Tab Switch */
.fade-tab-content {
    animation: tabFadeIn 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes tabFadeIn {
    0% {
        opacity: 0;
        transform: translateY(4px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 2. Enhanced Theme Toggle Icon Rotate Transition */
.theme-toggle svg,
.theme-btn svg {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.theme-toggle:hover svg,
.theme-btn:hover svg {
    transform: rotate(20deg) scale(1.1);
}

/* 3. Queue selection buttons active glow & hover lift */
#group-selection button {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

#group-selection button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

#group-selection button.bg-amber-500,
#group-selection button.active-queue {
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.5), 0 4px 12px rgba(245, 158, 11, 0.3) !important;
}

/* 4. Offline Indicator Banner */
.offline-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fbbf24;
    padding: 8px 18px;
    border-radius: 99px;
    font-size: 0.825rem;
    font-weight: 700;
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s ease;
    pointer-events: none;
}

.offline-banner.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* 5. Coffee Donation Button Hover Glow */
.btn-donat {
    background: var(--btn-donat-bg);
    border: 1px solid var(--btn-donat-border);
    color: var(--btn-donat-text);
    backdrop-filter: blur(12px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-donat:hover {
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.2);
    transform: translateY(-1px) scale(1.02);
}

/* ============================================
   ANALYTICS INFOGRAPHIC BAR (CLEAN SINGLE ROW)
   ============================================ */
.stats-split-bar-block {
    width: 100%;
}

.stats-split-bar-labels {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 700;
}

.stats-split-on,
.stats-split-off,
.stats-split-pct {
    white-space: nowrap !important;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.stats-split-on {
    color: #10b981;
}

.stats-split-off {
    color: #f43f5e;
}

.stats-split-pct {
    color: var(--text-secondary, #94a3b8);
    font-size: 0.75rem;
    font-weight: 600;
}

.stats-split-bar {
    height: 8px;
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 99px;
    overflow: hidden;
    display: flex;
}

.stats-split-bar-on {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #34d399);
    transition: width 0.5s ease;
}

.stats-split-bar-off {
    height: 100%;
    background: linear-gradient(90deg, #f43f5e, #fb7185);
    transition: width 0.5s ease;
}

.stats-split-date {
    text-align: center;
    font-size: 0.725rem;
    color: var(--text-secondary, #64748b);
    margin-top: 0.4rem;
    font-weight: 500;
}

.light-theme .stats-split-on { color: #059669 !important; }
.light-theme .stats-split-off { color: #e11d48 !important; }
.light-theme .stats-split-pct { color: #475569 !important; }
.light-theme .stats-split-bar { background: rgba(0, 0, 0, 0.08); }
.light-theme .stats-split-date { color: #64748b; }


/* --- PWA INSTALL BANNER --- */
.pwa-install-banner {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(120px);
    z-index: 99999;
    width: calc(100% - 32px);
    max-width: 440px;
    background: var(--card-bg, rgba(30, 41, 59, 0.85));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border, rgba(255, 255, 255, 0.15));
    border-radius: 20px;
    padding: 12px 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    opacity: 0;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
    pointer-events: none;
}

.pwa-install-banner.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.pwa-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.pwa-banner-icon {
    font-size: 22px;
    width: 42px;
    height: 42px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pwa-banner-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.pwa-banner-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-primary, #f8fafc);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pwa-banner-desc {
    font-size: 11px;
    color: var(--text-secondary, #94a3b8);
    line-height: 1.35;
}

.pwa-banner-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.pwa-btn-install {
    background: #f59e0b;
    color: #0f172a;
    font-weight: 800;
    font-size: 12px;
    padding: 8px 14px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.pwa-btn-install:hover {
    background: #d97706;
}

.pwa-btn-install:active {
    transform: scale(0.95);
}

.pwa-btn-close {
    background: transparent;
    border: none;
    color: var(--text-secondary, #94a3b8);
    font-size: 16px;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 8px;
    transition: color 0.2s, background-color 0.2s;
}

.pwa-btn-close:hover {
    color: var(--text-primary, #ffffff);
    background: rgba(255, 255, 255, 0.1);
}

/* --- FOOTER STYLES --- */
.footer-queue-link {
    display: block;
    padding: 9px 10px;
    border-radius: 12px;
    background: var(--accent-bg, rgba(30, 41, 59, 0.5));
    border: 1px solid var(--border-theme, rgba(255, 255, 255, 0.08));
    color: var(--text-primary, #e2e8f0);
    font-weight: 700;
    font-size: 0.825rem;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    text-decoration: none;
}

.footer-queue-link:hover {
    background: rgba(245, 158, 11, 0.15) !important;
    border-color: rgba(245, 158, 11, 0.4) !important;
    color: #fbbf24 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.2);
}

/* --- LIGHT THEME STYLES FOR FOOTER --- */
html.light-theme footer .card,
html.light footer .card {
    background: rgba(255, 255, 255, 0.85) !important;
    border-color: rgba(203, 213, 225, 0.8) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04) !important;
}

html.light-theme .footer-queue-link,
html.light .footer-queue-link {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(203, 213, 225, 0.9) !important;
    color: #0f172a !important;
}

html.light-theme .footer-queue-link:hover,
html.light .footer-queue-link:hover {
    background: rgba(245, 158, 11, 0.2) !important;
    border-color: #d97706 !important;
    color: #78350f !important;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.25) !important;
}

html.light-theme footer h3,
html.light footer h3 {
    color: #b45309 !important;
}

html.light-theme footer .disclaimer-box,
html.light footer .disclaimer-box {
    background: #ffffff !important;
    border: 1px solid rgba(245, 158, 11, 0.4) !important;
    color: #1e293b !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04) !important;
}

html.light-theme footer .disclaimer-box span,
html.light footer .disclaimer-box span {
    color: #0f172a !important;
}

html.light-theme footer .disclaimer-box svg,
html.light footer .disclaimer-box svg {
    color: #d97706 !important;
}

html.light-theme footer .badge-hold-on,
html.light footer .badge-hold-on {
    background: #fef3c7 !important;
    border: 1px solid #f59e0b !important;
    color: #78350f !important;
}

html.light-theme footer .slava-ukraini-badge,
html.light footer .slava-ukraini-badge {
    background: linear-gradient(135deg, #dbeafe, #fef3c7) !important;
    border: 1px solid #f59e0b !important;
    color: #78350f !important;
}

html.light-theme footer .patriotic-text,
html.light footer .patriotic-text {
    color: #0f172a !important;
}

html.light-theme footer .footer-subtext,
html.light footer .footer-subtext {
    color: #334155 !important;
}

html.light-theme footer .footer-subtext strong,
html.light footer .footer-subtext strong {
    color: #0f172a !important;
}


