/* =========================================
       1. GLOBAL & DESKTOP (TAMPILAN LAPTOP)
       ========================================= */
    * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
    
    body, html { 
        height: 100%; margin: 0; padding: 0; 
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 
        background: #ece5dd; overflow: hidden; 
    }

    /* Container */
    .app-container { 
        display: flex; flex-direction: column; 
        height: 100vh; width: 100%; 
        background: #fff; position: relative;
    }
    
    /* Header Global (Base) */
    .header { 
        background: #006c32; color: white; padding: 5px 10px; 
        display: flex; align-items: center; gap: 10px; flex-shrink: 0; z-index: 10;
        justify-content: space-between; position: relative;
    }
    .header-left {
        display: flex; align-items: center; gap: 10px; z-index: 2;
    }
    .header .title { font-size: 14px; font-weight: 700; }
    .header .status { font-size: 12px; opacity: 0.9; }

    /* Centered Message Style (Area Tanggal) */
    .header-center-msg {
        font-size: 12px;
        color: #ffffff !important; /* Putih Mutlak */
        font-weight: bold;
        text-align: center;
        line-height: 1.1;
        box-shadow: 0 2px 4px rgba(0,0,0,0.6);
    }
    
    /* Date Link Style */
    .date-link {
        text-decoration: none; 
        color: #ffffff !important; /* Paksa Putih */
        cursor: pointer;
        display: inline-block;
        border: none;
        margin: 0;
        padding: 0;
        font-size: 16px;
    }
    .date-link:hover { opacity: 0.8; text-decoration: underline; }
    

    /* Model Selector Dropdown */
    .model-select {
        background: rgba(255, 255, 255, 0.2);
        color: white;
        border: 1px solid rgba(255, 255, 255, 0.4);
        padding: 3px 5px;
        border-radius: 4px;
        font-size: 11px;
        outline: none;
        cursor: pointer;
    }
    .model-select option {
        background: white;
        color: #333;
    }

    /* Admin Button */
    .admin-btn {
        color: #eeeeee; text-decoration: none; cursor: pointer; opacity: 0.7;
        transition: opacity 0.3s;
    }
    .admin-btn:hover { opacity: 1; }
    .admin-btn i { font-size: 26px; }

    /* Ngober Icon */
    .ngober-btn {
        color: white; text-decoration: none;
        display: flex; align-items: center; transition: opacity 0.3s;
    }
    .ngober-btn:hover { opacity: 0.8; }
    .ngober-btn i { font-size: 22px; }
    
    /* Review Icon */
    .review-btn {
        color: white; text-decoration: none;
        display: flex; align-items: center; transition: opacity 0.3s;
    }
    .review-btn:hover { opacity: 0.8; }
    .review-btn i { font-size: 24px; }

    /* Chat Area */
    .chat-area { 
        flex: 1; padding: 15px; overflow-y: auto; 
        background-color: #e5ddd5; 
        background-image: radial-gradient(#d4d4d4 1px, transparent 1px); 
        background-size: 20px 20px;
        padding-bottom: 95px; 
    }
    
    .bubble-container { display: flex; width: 100%; margin-bottom: 10px; flex-shrink: 0; }
    
    .bubble { 
        max-width: 85%; padding: 10px 14px; border-radius: 8px; 
        font-size: 16px; line-height: 1.4; 
        position: relative; word-wrap: break-word; 
        padding-right: 80px; 
        box-shadow: 0 2px 4px rgba(0,0,0,0.5);
    }
    .bubble.bot { background: white; border-top-left-radius: 0; margin-right: auto; }
    .bubble.user { background: #dcf8c6; border-top-right-radius: 0; margin-left: auto; }

    /* Input Area */
    .input-area { 
        position: fixed; bottom: 0; left: 0; width: 100%; 
        padding: 10px 10px 5px 10px; background: #f0f0f0; 
        display: flex; flex-direction: column; gap: 5px; z-index: 100;
        box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
    }
    .input-wrapper {
        display: flex; width: 100%; gap: 10px; align-items: center;
    }
    .footer-text {
        font-size: 11px; color: #777; font-style: italic; text-align: center; width: 100%;
        margin-bottom: 2px;
    }

    input { 
        flex: 1; padding: 12px; border: none; border-radius: 20px; 
        outline: none; font-size: 16px; background: #fff;
    }
    .send-btn { 
        background: #006c32; color: white; border: none; 
        width: 45px; height: 45px; border-radius: 50%; cursor: pointer; 
        display: flex; align-items: center; justify-content: center;
        flex-shrink: 0;
    }
    .send-btn svg { width: 20px; height: 20px; fill: white; }
    
    /* Tombol Copy & Share */
    .copy-btn, .share-btn { 
        position: absolute; top: 5px; background: transparent; border: none; cursor: pointer; padding: 3px; 
    }
    .copy-btn { right: 35px; } 
    .share-btn { right: 5px; } 
    
    .copy-btn svg, .share-btn svg { width: 16px; height: 16px; fill: #999; }
    .share-btn svg { fill: #0277bd; }

    /* =========================================
       ADMIN MODAL STYLES
       ========================================= */
    .modal-overlay {
        display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
        background: rgba(0,0,0,0.5); z-index: 2000; justify-content: center; align-items: center;
    }
    .modal-box {
        background: white; 
        width: 98%; 
        max-width: 98%; 
        padding: 20px; border-radius: 10px;
        box-shadow: 0 4px 20px rgba(0,0,0,0.3); max-height: 95vh; overflow-y: hidden;
        display: flex; flex-direction: column;
    }
    .modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; border-bottom: 1px solid #ddd; padding-bottom: 10px; flex-shrink: 0; }
    .modal-title { font-weight: bold; font-size: 18px; color: #006c32; }
    .close-modal { cursor: pointer; font-size: 24px; color: red; }
    
    .admin-form { display: flex; flex-direction: column; gap: 10px; }
    .admin-input { padding: 10px; border: 1px solid #ccc; border-radius: 5px; }
    .admin-btn-action { padding: 10px; background: #006c32; color: white; border: none; border-radius: 5px; cursor: pointer; }
    .admin-btn-action:hover { background: #005a2b; }
    .json-editor { width: 100%; height: 300px; font-family: monospace; font-size: 12px; padding: 10px; border: 1px solid #ccc; background: #f9f9f9; white-space: pre; overflow-x: auto; }
    .admin-controls { display: flex; justify-content: space-between; margin-top: 10px; flex-shrink: 0; }
    .status-msg { font-size: 12px; margin-top: 10px; text-align: center; }

    /* ADMIN TABS & DOCUMENT VIEWER STYLES */
    .admin-tabs {
        display: flex; gap: 10px; margin-bottom: 15px; border-bottom: 1px solid #eee; padding-bottom: 5px; flex-shrink: 0; overflow-x: auto;
    }
    .tab-btn {
        padding: 8px 15px; border: none; background: #f0f0f0; border-radius: 4px;
        cursor: pointer; font-size: 13px; font-weight: 600; color: #555; white-space: nowrap;
    }
    .tab-btn.active {
        background: #006c32; color: white;
    }
    
    .admin-content-view {
        flex: 1; overflow-y: auto; padding-right: 5px; min-height: 300px;
    }

    /* Document Selector Dropdown */
    .doc-selector {
        width: 100%; padding: 10px; border: 2px solid #006c32; border-radius: 6px;
        font-size: 14px; background: #f9fff9; margin-bottom: 15px;
        outline: none; cursor: pointer;
    }
    
    /* Paper/Document Style */
    .doc-viewer-container { display: none; }
    .doc-paper {
        background: #ffffff;
        padding: 40px;
        border: 1px solid #e0e0e0;
        box-shadow: 0 5px 15px rgba(0,0,0,0.08);
        border-radius: 4px;
        font-family: 'Lora', serif; 
        color: #333;
        line-height: 1.8;
    }
    .doc-header {
        text-align: center;
        border-bottom: 3px double #006c32;
        padding-bottom: 15px;
        margin-bottom: 25px;
    }
    .doc-id-badge {
        display: inline-block; background: #006c32; color: white;
        padding: 2px 8px; border-radius: 10px; font-size: 11px; font-family: sans-serif;
        margin-bottom: 5px;
    }
    .doc-title { font-size: 24px; font-weight: 700; color: #222; margin: 5px 0; }
    .doc-source { font-size: 13px; color: #666; font-style: italic; margin-top: 5px; }
    .doc-body { font-size: 16px; text-align: justify; }
    .doc-body p { margin-bottom: 15px; }
    .doc-body b { color: #005a2b; }
    
    .empty-state {
        text-align: center; color: #888; padding: 50px; font-style: italic;
        background: #f9f9f9; border-radius: 8px; border: 2px dashed #ddd;
    }

    /* API STATUS TABLE */
    .api-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 10px; }
    .api-table th, .api-table td { border: 1px solid #ddd; padding: 8px; text-align: center; }
    .api-table th { background-color: #f2f2f2; color: #333; }
    .badge { padding: 3px 6px; border-radius: 4px; font-size: 10px; color: white; display: inline-block; }
    .bg-ok { background-color: #2e7d32; }
    .bg-err { background-color: #c62828; }
    .bg-warn { background-color: #ef6c00; }

    /* =========================================
       LAYOUT LAPTOP (JUMBO) - DIPERBAIKI AGAR HEADER LEBIH TIPIS
       ========================================= */
    @media (min-width: 1024px) {
        .header { 
            padding: 8px 20px; /* DIPERBAIKI: Padding dikurangi agar tipis */
            gap: 15px; 
            min-height: 50px; /* Tinggi minimum yang proporsional */
        }
        .header .title { font-size: 20px; } /* Sedikit diperkecil agar pas */
        .header .status { font-size: 16px; } 
        .header svg { width: 35px; height: 35px; }
        .ngober-btn i { font-size: 26px; } 

        /* Desktop specific: Absolute Center for text */
        .header-center-msg {
            position: absolute;
            left: 50%;
            top: 50%;
            color: #ffffff !important;
            transform: translate(-50%, -50%);
            width: 400px;
            font-size: 13px;
        }

        .bubble {
            font-size: 15px !important; 
            padding: 10px 15px; border-radius: 15px; max-width: 90%;
            padding-right: 90px; 
        }
        .chat-area { padding-bottom: 130px; } 

        .input-area { padding: 10px 20px 5px 20px; }
        input { font-size: 13px !important; color: black; padding: 10px 15px; border-radius: 40px; height: 40px; }
        .send-btn { width: 40px; height: 40px; }
        .send-btn svg { width: 35px; height: 35px; }
        .copy-btn svg, .share-btn svg { width: 18px; height: 18px; }
        .footer-text { font-size: 12px; margin-top: 10px; margin-bottom: 10px; color: black;}
        
        .model-select { font-size: 13px; padding: 5px 8px; }
        
        .modal-box { width: 100%; height: 85vh; }
        .doc-paper { padding: 50px 60px; }
    }

    /* Utilities */
    .loading-dots { display: inline-block; padding: 5px; }
    .loading-dots span { width: 10px; height: 10px; margin: 0 3px; background-color: #999; border-radius: 50%; display: inline-block; animation: dot-blink 1.4s infinite both; }
    .loading-dots span:nth-child(2) { animation-delay: 0.2s; }
    .loading-dots span:nth-child(3) { animation-delay: 0.4s; }
    @keyframes dot-blink { 0%, 100% { opacity: 0.2; } 20% { opacity: 1; } }

    /* =========================================
       2. KHUSUS HP & TABLET (LAYAR < 1024px)
       ========================================= */
    .header-right { display: flex; gap: 15px; z-index: 2; align-items: center; }

    @media (max-width: 1023px) {
        /* Layout Header Mobile Compact */
        .header { 
            flex-wrap: wrap; 
            padding: 5px 10px 2px 10px; /* DIPERBAIKI: Padding bawah sangat tipis */
            align-items: center; 
            gap: 5px; /* Gap dirapatkan */
        }
        
        .header-left {
            gap: 5px; /* Ikon dan Judul lebih rapat */
        }

        .header-right { 
            margin-left: auto;    
            margin-right: 5px;   
            display: flex;        
            align-items: center;  
            gap: 8px;            
        }

        /* Tanggal di HP jadi Baris ke-2 yang tipis */
        .header-center-msg {
            order: 3;             
            width: 100%; 
            margin-top: 0px; /* Hapus margin atas */
            margin-bottom: 2px;
            font-size: 10px; /* Font diperkecil */
            display: flex;        
            justify-content: center;
            line-height: 1; 
            padding: 0;
        }

        .header .title { font-size: 16px; margin-bottom: 0; } 
        .header .status { font-size: 12px; } 
        .header svg { width: 30px; height: 30px; } 
        .ngober-btn { color: yellow;} 
        .ngober-btn i, .review-btn i { font-size: 18px;} 

        .bubble {
            font-size: 15px !important; 
            padding: 5px 10px; border-radius: 15px; max-width: 90%;
            padding-right: 80px; 
        }
        .chat-area { padding-bottom: 110px; } 
        .input-area { padding-bottom: max(5px, env(safe-area-inset-bottom, 10px)); }
        input { font-size: 17px !important; padding: 5px 10px; border-radius: 40px; height: 40px; }
        .send-btn { width: 40px; height: 40px; }
        .send-btn svg { width: 25px; height: 25px; }
        .copy-btn svg, .share-btn svg { width: 22px; height: 22px; }
        .doc-paper { padding: 20px; }
    }
    
        /* ========================================================= */
        /* CSS KHUSUS UNTUK WIDGET (RAMADAN & PULAU) */
        /* ========================================================= */
        .date-link {
            color: #ffffff !important; 
            text-decoration: none;      
        }
        
        #ramadanWidget {
            width: 100%;
            margin: 20px auto; 
            display: flex;
            flex-wrap: wrap; 
            justify-content: center; 
            align-items: center;        
            gap: 20px; 
            animation: fadeIn 0.8s ease-in-out;
        }
        
        .widget-frame {
            width: 100%;
            max-width: 420px; 
            height: 300px;    
            border: none;
            border-radius: 15px;
            box-shadow: 0 4px 15px rgba(0, 108, 50, 0.1);
            overflow: hidden;
            background: #fff;
            transform: scale(0.98); 
            transition: transform 0.3s;
        }

        .widget-frame:hover {
            transform: scale(1); 
            box-shadow: 0 8px 25px rgba(0, 108, 50, 0.2);
        }

        @media (max-width: 900px) {
            .widget-frame {
                height: 300px; 
                width: 100%;
                transform: scale(0.98);
                margin-bottom: 10px;
            }
        }

        /* ========================================================= */
        /* CSS ASTRO WIDGET (PENGGANTI CUACA) */
        /* ========================================================= */
        #astro-widget {
            font-family: 'Segoe UI', system-ui, sans-serif;
            color: #f1f5f9;
            background-color: #1e293b; /* Warna latar gelap elegan */
            border-radius: 15px;
            height: 100%; /* Mengisi widget-frame */
            display: flex;
            flex-direction: column;
            box-sizing: border-box;
            position: relative;
        }

        #astro-widget .astro-scroll-container {
            flex: 1;
            overflow-y: auto; /* KUNCI: Scroll leluasa */
            padding: 15px;
            scrollbar-width: thin; 
            scrollbar-color: #475569 #1e293b;
        }
        
        /* Custom Scrollbar for Webkit */
        #astro-widget .astro-scroll-container::-webkit-scrollbar { width: 6px; }
        #astro-widget .astro-scroll-container::-webkit-scrollbar-track { background: #1e293b; }
        #astro-widget .astro-scroll-container::-webkit-scrollbar-thumb { background-color: #475569; border-radius: 3px; }

        #astro-widget h3 { margin: 0; color: #38bdf8; font-size: 1.1rem; }
        #astro-widget h2 {
            font-size: 0.95rem; border-bottom: 1px solid #475569; padding-bottom: 6px; margin-top: 15px; color: #cbd5e1; font-weight: 600;
        }
        
        #astro-widget .input-group { margin-bottom: 8px; }
        #astro-widget label { display:block; font-size: 0.75rem; color: #94a3b8; margin-bottom: 2px; }
        #astro-widget input[type="text"] {
            background: #334155; border: 1px solid #475569; color: white;
            padding: 4px 8px; border-radius: 4px; width: 100%; box-sizing: border-box; font-size: 0.85rem;
        }

        #astro-widget .results-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; margin-top: 5px; }
        #astro-widget .results-table th { text-align: center; padding: 6px; color: #94a3b8; border-bottom: 1px solid #475569; font-weight: normal; }
        #astro-widget .results-table td { padding: 6px; border-bottom: 1px solid #475569; text-align: center; color: #e2e8f0; }
        #astro-widget .results-table td:first-child { text-align: left; font-weight: 600; color: #cbd5e1; width: 40%; }
        
        #astro-widget .highlight-value { font-weight: bold; color: #facc15; text-align: right !important; }
        
        #astro-widget .gps-btn {
            background: #38bdf8; color: #000; border: none; width: 100%;
            padding: 6px; border-radius: 4px; cursor: pointer; font-weight: bold; margin-bottom: 10px; font-size: 0.85rem;
        }
        #astro-widget .gps-btn:hover { opacity: 0.9; }
        #astro-widget #gps-msg { font-size: 0.75rem; display: block; text-align: center; margin-bottom: 5px; color: #94a3b8; }
        
        .astro-badge { font-size:0.65rem; background:#4f5b93; padding:2px 4px; border-radius:3px; color:white; vertical-align: middle; }


        /* ========================================================= */
        /* PERBAIKAN BUG SCROLL ADMIN MODE */
        /* ========================================================= */
        .modal-box {
            display: flex !important;
            flex-direction: column !important;
            max-height: 100vh !important;
            height: 100vh !important;
            overflow: hidden !important;
            width: 90%;
            max-width: 90%;
        }
        #editorView {
            display: flex;
            flex-direction: column;
            flex: 1;
            overflow: hidden;
            min-height: 0;
        }
        .admin-content-view {
            flex: 1;
            overflow-y: auto;
            overflow-x: hidden;
            padding: 10px;
            padding-bottom: 120px !important;
            -webkit-overflow-scrolling: touch;
            background: #f9f9f9;
        }
        .json-editor {
            height: 100% !important;
            min-height: 300px;
            resize: none;
        }
        @media (max-width: 600px) {
            .modal-box {
                width: 95%;
                height: 95vh !important;
                max-height: 95vh !important;
            }
            .admin-content-view {
                padding-bottom: 150px !important;
            }
        }

        /* [FITUR BARU] CSS USER SESSION MONITOR & HISTORY MODAL */
        .user-session-card {
            background: white;
            border: 1px solid #ddd;
            padding: 10px;
            margin-bottom: 8px;
            border-radius: 6px;
            font-size: 13px;
        }
        .user-history-snippet {
            background: #eee;
            padding: 5px;
            margin-top: 5px;
            font-size: 11px;
            border-radius: 4px;
            max-height: 80px;
            overflow-y: auto;
        }
        
        /* CSS Untuk Modal History Chat User */
        .history-chat-bubble {
            padding: 10px;
            margin-bottom: 10px;
            border-radius: 8px;
            font-size: 14px;
            line-height: 1.5;
            max-width: 85%;
        }
        .hist-user {
            background: #e3f2fd;
            color: #0d47a1;
            margin-left: auto; /* Rata Kanan */
            text-align: right;
            border-top-right-radius: 0;
        }
        .hist-model {
            background: #f1f8e9;
            color: #1b5e20;
            margin-right: auto; /* Rata Kiri */
            border-top-left-radius: 0;
        }
        .hist-time {
            display: block;
            font-size: 10px;
            color: #999;
            margin-top: 4px;
        }

        /* Hover Effect untuk User ID di Header */
        .header-left .status:hover {
            text-decoration: underline;
            background: rgba(255,255,255,0.2);
            border-radius: 4px;
        }
        
    /* [INTEGRASI BARU] CSS PRAYER TIMES WIDGET */
    .prayer-times-container {
        width: 100%;
        height: 100%; /* Fill the widget-frame */
        padding: 20px;
        background-color: #006b36; /* Warna Default Muhammadiyah */
        color: white;
        box-sizing: border-box;
        overflow-y: auto; /* Allow scrolling if content is tall */
    }

    .prayer-times-header {
        text-align: center;
        margin-bottom: 10px;
    }

    .header-title {
        font-size: 1.3em;
        font-weight: bold;
        color: #ffffff;
        margin-bottom: 2px;
    }

    .current-date-info {
        text-align: center;
        font-size: 0.8em;
        font-weight: bold;
        color: #ffd700;
        margin-bottom: 10px;
    }

    /* Table Styling */
    .prayer-times-table {
        width: 100%;
        border-collapse: separate;
        border-spacing: 0 4px;
    }

    .prayer-times-table td {
        padding: 8px 12px;
        background-color: rgba(0, 0, 0, 0.2);
        border-radius: 8px;
        font-weight: bold;
        color: white;
    }

    .prayer-time-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .prayer-name-column {
        font-size: 1em;
        color: #ffffff;
        text-align: left;
    }

    .prayer-time-column {
        font-size: 1.3em;
        color: #ffd700;
        font-family: 'monospace';
        text-align: right;
    }

    /* Highlight Next Prayer */
    .prayer-time-column.next-prayer {
        color: #ffffff !important;
    }
    
    /* Highlight row wrapper */
    .next-prayer-row td {
        background: linear-gradient(135deg, #28a745 0%, #218838 100%);
        border: 1px solid #ffd700;
    }

    .prayer-location {
        margin-top: 10px;
        font-size: 0.7em;
        font-weight: bold;
        color: #ffd700;
        text-align: center;
    }

    /* Loading & Permission */
    .loading-spinner {
        text-align: center;
        padding: 20px;
    }

    .spinner {
        width: 30px;
        height: 30px;
        border: 3px solid rgba(255, 255, 255, 0.3);
        border-radius: 50%;
        border-top-color: #fff;
        animation: spin 1s ease-in-out infinite;
        margin: 0 auto 10px;
    }

    .location-permission-btn {
        background-color: #ffd700;
        color: #006b36;
        border: none;
        padding: 8px 15px;
        border-radius: 5px;
        font-weight: bold;
        cursor: pointer;
        margin-top: 5px;
        font-size: 0.9em;
        transition: all 0.3s ease;
    }

    .location-permission-btn:hover {
        background-color: #ffc107;
    }

    .error-message {
        color: #ffc107;
        margin-top: 5px;
        font-size: 0.8em;
        text-align: center;
    }
    
    /* Countdown */
    .countdown-box {
        margin-top: 10px;
        padding: 10px;
        background-color: rgba(255, 255, 255, 0.15);
        border-radius: 8px;
        text-align: center;
    }
    
    .countdown-label {
        font-size: 0.8em;
        color: white;
        margin-bottom: 2px;
    }
    
    .countdown-timer {
        font-size: 1.5em;
        font-weight: bold;
        color: #ffd700;
        font-family: monospace;
    }

    /* [FITUR BARU] SHOUTBOX STYLES */
    .sb-container {
        display: flex;
        flex-direction: column;
        height: 100%;
        font-family: 'Segoe UI', sans-serif;
    }
    .sb-messages {
        flex: 1;
        overflow-y: auto;
        padding: 10px;
        background: #f3f4f6;
        border-bottom: 1px solid #ddd;
    }
    .sb-bubble {
        background: white;
        padding: 8px 12px;
        margin-bottom: 10px;
        border-radius: 8px;
        box-shadow: 0 1px 2px rgba(0,0,0,0.1);
        font-size: 13px;
    }
    .sb-header {
        display: flex;
        justify-content: space-between;
        margin-bottom: 4px;
        font-size: 11px;
        color: #666;
    }
    .sb-name {
        font-weight: bold;
        color: #006c32;
    }
    .sb-input-area {
        padding: 10px;
        background: white;
        display: flex;
        flex-direction: column;
        gap: 5px;
    }
    .sb-input-row {
        display: flex;
        gap: 5px;
    }
    .sb-input-name {
        width: 30%;
        padding: 8px;
        border: 1px solid #ddd;
        border-radius: 4px;
        font-size: 13px;
    }
    .sb-input-msg {
        flex: 1;
        padding: 8px;
        border: 1px solid #ddd;
        border-radius: 4px;
        font-size: 13px;
    }
    .sb-btn-send {
        background: #006c32;
        color: white;
        border: none;
        padding: 8px 15px;
        border-radius: 4px;
        cursor: pointer;
        font-weight: bold;
    }
    
        /* Container Widget: Background Putih, Huruf Hitam */
        .stats-container-dark {
            height: 100%;
            display: flex;
            flex-direction: column;
            background-color: #ffffff !important; /* Latar Putih */
            color: #000000 !important;            /* Huruf Hitam Pekat */
            font-family: 'Segoe UI', sans-serif;
        }

        .stats-header {
            padding: 12px 15px;
            border-bottom: 2px solid #000000; /* Garis pemisah Hitam */
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: #fff; /* Header sedikit abu sangat muda agar beda */
        }

        .stats-header h3 {
            color: #000000 !important; /* Judul Hitam */
            font-weight: 900 !important;
        }

        .stats-scroll-area {
            flex: 1;
            overflow-y: auto;
            padding: 0;
            background: #ffffff; /* Area Scroll Putih */
        }

        /* Tabel */
        .mini-table-dark { width: 100%; border-collapse: collapse; }
        .mini-table-dark td { 
            padding: 10px 15px; 
            border-bottom: 1px solid #000000; /* Garis baris Hitam */
            vertical-align: middle; 
        }

        /* NAMA WILAYAH / KATEGORI -> HITAM */
        .region-name-dark { 
            font-weight: 800 !important; 
            font-size: 14px; 
            display: block; 
            margin-bottom: 2px; 
            color: #000000 !important; /* HITAM */
            text-shadow: none !important;
        }
        
        /* JUMLAH USER -> HITAM */
        .region-count-dark { 
            font-size: 12px; 
            color: #000000 !important; /* HITAM */
            font-weight: 600 !important; 
        }
        
        /* Bar Progress Background */
        .prog-wrap-dark { display: flex; align-items: center; gap: 8px; width: 100%; }
        .prog-bg-dark { 
            flex-grow: 1; height: 10px; background: #e0e0e0; border: 1px solid #000; border-radius: 4px; overflow: hidden; 
        }
        
        /* Warna Bar: Biru Tua & Hijau Tua (Agar kontras di putih) */
        .prog-fill-dark { height: 100%; background: #0056b3; } /* Biru Tua */
        .prog-fill-cat { height: 100%; background: #007a33; }  /* Hijau Tua */

        /* ANGKA PERSENTASE -> HITAM */
        .prog-pct-dark { 
            font-size: 12px; 
            font-weight: 800 !important; 
            color: #000000 !important; /* HITAM */
            min-width: 35px; 
            text-align: right; 
            text-shadow: none !important;
        }
        .prog-pct-cat { 
            font-size: 12px; 
            font-weight: 800 !important; 
            color: #000000 !important; /* HITAM */
            min-width: 35px; 
            text-align: right; 
            text-shadow: none !important;
        }

        /* Status Colors -> Tetap berwarna tapi tulisan Tebal Hitam */
        .text-warning-dark { color: #d32f2f !important; font-weight: 800 !important; }
        .bg-warning-dark { background-color: #ffcc00 !important; }

        /* FOOTER STATISTIK -> HITAM */
        .stats-footer {
            padding: 10px 15px;
            border-top: 2px solid #000000;
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: 11px;
            color: #000000 !important; /* HITAM */
            font-weight: 700 !important; 
            background: #f0f0f0;
        }

        .badge-stats-dark {
            padding: 3px 8px;
            border-radius: 4px;
            background: #000000; /* Badge Background Hitam */
            color: #ffffff;      /* Badge Tulisan Putih */
            font-weight: bold;
            font-size: 10px;
            text-transform: uppercase;
        }
        .badge-stats-dark.live { background: #006400; color: #fff; } /* Hijau Tua */
        .badge-info-dark { background: #000080; color: #fff; }       /* Biru Tua */

        .mic-btn {
            background: transparent;
            border: none;
            color: #006c32;
            cursor: pointer;
            padding: 0 12px;
            font-size: 1.2rem;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .mic-btn:hover { color: #004d24; transform: scale(1.1); }
        .mic-active { color: #d32f2f !important; animation: pulse-red 1.5s infinite; }
        @keyframes pulse-red {
            0% { transform: scale(1); opacity: 1; }
            50% { transform: scale(1.2); opacity: 0.7; }
            100% { transform: scale(1); opacity: 1; }
        }
        .input-wrapper { display: flex; align-items: center; padding-right: 5px; }

      .marquee-container {
        position: relative !important;
        display: block;
        z-index: 1;
        top: 0;
        left: 0;
        z-index: 999;
        background: linear-gradient(90deg, #004d40 0%, #005c97 50%, #d4af37 100%);
        width: 100%;
        overflow: hidden;
        white-space: nowrap;
        padding: 8px 0;
        margin-bottom: 15px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.6); 
        border-bottom: 2px solid #ffd700; 
      }
      .marquee-text {
        display: inline-block;
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        font-size: 18px;
        font-weight: 600; 
        color: #ffffff;
        text-shadow: 1px 1px 2px rgba(0,0,0,0.6); 
        padding-left: 100%;
        animation: scrolling 80s linear infinite; 
      }
      @keyframes scrolling {
        0% { transform: translateX(0); }
        100% { transform: translateX(-100%); }
      }
      .marquee-container:hover .marquee-text { animation-play-state: paused; cursor: default; }