        :root {
            --header-red: #0ea5e9;
            --header-red-dark: #0369a1;
            --badge-yellow: #facc15;
            --badge-yellow-text: #0f172a;
            --card-border: #e0f2fe;
            --bg-color: #eaf3fa;
            --card-bg: #f8fbfd;
            --text-primary: #0f172a;
            --text-secondary: #64748b;
            --input-border: #e0f2fe;
            --input-bg: #f8fbfd;
            --accent-btn: #0284c7;
            --accent-gold: #facc15;
            --danger: #dc2626;
            --success: #16a34a;
            --warn: #d97706;
        }

        body.dark-mode {
            --header-red: #0369a1;
            --header-red-dark: #075985;
            --bg-color: #0b1220;
            --card-bg: #111827;
            --text-primary: #f1f5f9;
            --text-secondary: #94a3b8;
            --input-border: #334155;
            --input-bg: #1e293b;
            --card-border: #0ea5e9;
            --accent-btn: #0ea5e9;
        }

        * { box-sizing: border-box; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; transition: background-color 0.2s, color 0.2s; }
        body { background-color: var(--bg-color); color: var(--text-primary); margin: 0; padding: 0; padding-bottom: 50px; }

        /* ============ APP SHELL: SIDEBAR + TOPBAR ============ */
        .app-shell { display: flex; min-height: 100vh; }

        .app-sidebar {
            width: 220px;
            flex-shrink: 0;
            background: linear-gradient(180deg, var(--header-red-dark) 0%, #0b2947 100%);
            color: #f2f1ed;
            position: fixed;
            top: 0; left: 0; bottom: 0;
            z-index: 1200;
            display: flex;
            flex-direction: column;
            padding: 18px 14px;
            transform: translateX(-100%);
            transition: transform 0.25s ease;
            overflow-y: auto;
        }
        .app-sidebar.open { transform: translateX(0); }
        @media (min-width: 900px) {
            .app-sidebar { transform: translateX(0); box-shadow: 3px 0 14px rgba(0,0,0,0.12); }
            .app-shell { padding-left: 220px; }
            .sidebar-close-btn { display: none; }
        }

        .sidebar-backdrop {
            display: none;
            position: fixed; inset: 0; background: rgba(2,6,23,0.55); z-index: 1100;
        }
        .sidebar-backdrop.open { display: block; }
        @media (min-width: 900px) { .sidebar-backdrop { display: none !important; } }

        .sidebar-logo-row { display: flex; align-items: center; gap: 10px; padding: 4px 4px 18px 4px; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; }
        .sidebar-logo-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--badge-yellow); display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; box-shadow: 0 2px 6px rgba(0,0,0,0.25); }
        .sidebar-logo-mascot { width: 46px; height: auto; flex-shrink: 0; display: block; transform-origin: 50% 100%; will-change: transform; }
        .sidebar-logo-mascot.bee-idle { animation: beeIdleFloat 3.2s ease-in-out infinite; }
        .sidebar-logo-mascot.bee-tap { animation: beeTapJump 0.7s cubic-bezier(.34,1.56,.64,1) 1; }
        @keyframes beeIdleFloat {
            0%, 100% { transform: translateY(0) rotate(-2deg); }
            50% { transform: translateY(-5px) rotate(2deg); }
        }
        @keyframes beeTapJump {
            0% { transform: translateY(0) rotate(0deg) scale(1); }
            25% { transform: translateY(-16px) rotate(-10deg) scale(1.1); }
            50% { transform: translateY(2px) rotate(8deg) scale(0.94); }
            75% { transform: translateY(-6px) rotate(-4deg) scale(1.04); }
            100% { transform: translateY(0) rotate(0deg) scale(1); }
        }
        .sidebar-logo-text b { display: block; font-size: 13.5px; font-weight: 800; line-height: 1.2; letter-spacing: 0.2px; }
        .sidebar-logo-text span { display: block; font-size: 10px; color: rgba(255,255,255,0.65); }

        .sidebar-close-btn { position: absolute; top: 14px; right: 14px; background: rgba(255,255,255,0.12); border: none; color: #fff; width: 28px; height: 28px; border-radius: 50%; font-size: 13px; cursor: pointer; }

        .sidebar-nav { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
        .sidebar-nav-item {
            display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px;
            color: rgba(255,255,255,0.82); font-size: 13px; font-weight: 600; cursor: pointer; border: none;
            background: transparent; text-align: left; width: 100%;
        }
        .sidebar-nav-item .snav-icon { font-size: 16px; width: 20px; text-align: center; }
        .sidebar-nav-item:active { opacity: 0.8; }
        .sidebar-nav-item.active { background: rgba(255,255,255,0.14); color: #ffffff; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1); }

        .sidebar-footer-note {
            margin-top: auto; padding: 14px 6px 4px 6px; font-size: 10.5px; color: rgba(255,255,255,0.4);
            font-style: italic; line-height: 1.4;
        }

        /* TOPBAR */
        .app-main { flex: 1; min-width: 0; }
        .app-topbar {
            position: sticky; top: 0; z-index: 900;
            background: var(--card-bg);
            border-bottom: 1px solid var(--input-border);
            padding: 10px 16px;
            display: flex; align-items: center; justify-content: space-between; gap: 10px;
        }
        .hamburger-btn {
            background: none; border: none; font-size: 20px; color: var(--text-primary); cursor: pointer;
            width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
        }
        @media (min-width: 900px) { .hamburger-btn { display: none; } }

        .topbar-clock { display: flex; align-items: center; gap: 14px; font-size: 11px; color: var(--text-secondary); font-weight: 700; flex-wrap: wrap; }
        .topbar-clock .tc-item { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
        .topbar-clock .tc-item b { color: var(--text-primary); font-size: 12px; }

        .topbar-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
        .icon-btn {
            position: relative; background: var(--bg-color); border: 1px solid var(--input-border); color: var(--text-primary);
            width: 34px; height: 34px; border-radius: 50%; font-size: 15px; cursor: pointer;
            display: flex; align-items: center; justify-content: center;
        }
        .icon-btn:active { transform: scale(0.92); }

        /* NOTIFICATION PANEL */
        .notif-panel {
            position: fixed; top: 58px; right: 12px; width: 300px; max-width: calc(100vw - 24px);
            max-height: 70vh; background: var(--card-bg); border: 1px solid var(--input-border);
            border-radius: 16px; box-shadow: 0 14px 32px rgba(0,0,0,0.25); z-index: 1300;
            display: none; flex-direction: column; overflow: hidden;
        }
        .notif-panel.open { display: flex; }
        .notif-panel-header { padding: 12px 14px; font-size: 13px; font-weight: 800; color: var(--text-primary); border-bottom: 1px solid var(--input-border); display:flex; justify-content:space-between; align-items:center; }
        .notif-dev-box { display: none; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--input-border); background: var(--bg-color); }
        .notif-dev-box input { flex: 1; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--input-border); background: var(--input-bg); color: var(--text-primary); font-size: 12px; }
        .notif-dev-box button { background: var(--header-red); color: #fff; border: none; border-radius: 8px; padding: 0 12px; font-size: 12px; font-weight: 700; cursor: pointer; }
        .notif-list { overflow-y: auto; padding: 6px 0; }
        .notif-item { padding: 10px 14px; border-bottom: 1px solid var(--input-border); font-size: 12px; color: var(--text-primary); display: flex; gap: 8px; align-items: flex-start; }
        .notif-item:last-child { border-bottom: none; }
        .notif-item .notif-txt { flex: 1; line-height: 1.4; }
        .notif-item .notif-time { display: block; font-size: 9.5px; color: var(--text-secondary); margin-top: 3px; }
        .notif-item .notif-del { background: none; border: none; color: #ef4444; font-size: 12px; cursor: pointer; padding: 0; flex-shrink: 0; }
        .notif-empty { padding: 24px 14px; text-align: center; font-size: 12px; color: var(--text-secondary); }

        /* HERO BANNER (BERANDA) */
        .hero-banner {
            background: linear-gradient(135deg, var(--header-red) 0%, var(--header-red-dark) 100%);
            border-radius: 18px; padding: 22px; color: #ffffff; position: relative; overflow: hidden;
            margin-bottom: 14px; box-shadow: 0 8px 22px rgba(10,20,32,0.18);
            display: flex; align-items: center; justify-content: space-between; gap: 10px;
        }
        .hero-banner-text .greeting-text { font-size: 19px; font-weight: 800; line-height: 1.3; }
        .greeting-sub-row { display: flex; align-items: flex-start; gap: 6px; margin-top: 6px; max-width: 260px; }
        .hero-banner-text .greeting-sub { font-size: 12px; color: rgba(255,255,255,0.85); line-height: 1.5; }
        .btn-edit-kartu-sapaan {
            flex-shrink: 0; background: rgba(255,255,255,0.18); border: none; color: #fff;
            width: 20px; height: 20px; border-radius: 50%; font-size: 10px; line-height: 1;
            cursor: pointer; display: flex; align-items: center; justify-content: center;
        }
        .hero-banner-icon { font-size: 62px; line-height: 1; opacity: 0.95; flex-shrink: 0; filter: drop-shadow(0 4px 8px rgba(0,0,0,0.25)); }
        .hero-store-badge {
            display: inline-flex; align-items: center; gap: 6px; background-color: var(--badge-yellow);
            padding: 4px 12px; border-radius: 6px; box-shadow: 0 2px 4px rgba(0,0,0,0.15); cursor: pointer; margin-top: 10px;
        }
        .hero-store-badge span.toko-badge-text { font-weight: 900; font-size: 11px; color: #000; text-transform: uppercase; }

        /* MASKOT DASHBOARD (tap untuk animasi) */
        .dashboard-mascot-row {
            display: flex; align-items: center; gap: 10px; margin-bottom: 14px; padding: 8px 14px;
            background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 14px;
            cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
            box-shadow: 0 2px 6px rgba(0,0,0,0.04);
        }
        .dashboard-mascot-row:active { opacity: 0.85; }
        .dashboard-mascot-img { width: 52px; height: auto; flex-shrink: 0; transform-origin: 50% 100%; will-change: transform; }
        .dashboard-mascot-hint { font-size: 12px; font-weight: 700; color: var(--text-secondary); }

        /* STATS ROW (WAKTU + KALENDER) */
        .stats-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
        @media (max-width: 480px) { .stats-row { grid-template-columns: 1fr; } }
        .stats-card {
            background: var(--card-bg); border: 1px solid var(--input-border); border-radius: 14px; padding: 14px;
            display: flex; gap: 10px; align-items: flex-start; box-shadow: 0 2px 6px rgba(0,0,0,0.03);
        }
        .stats-card .stats-icon { width: 38px; height: 38px; border-radius: 50%; background: var(--bg-color); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
        .stats-card .stats-label { font-size: 10px; color: var(--text-secondary); font-weight: 700; margin-bottom: 2px; }

        /* GRID DASHBOARD (MENU UTAMA) */
        .main-container { padding: 16px; }
        .menu-section-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 12px; }
        .menu-section-head h2 { margin: 0; font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
        .menu-section-head p { margin: 2px 0 0 0; font-size: 11px; color: var(--text-secondary); }

        .grid-dashboard {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 10px;
        }
        @media (max-width: 700px) { .grid-dashboard { grid-template-columns: repeat(2, 1fr); } }

        .menu-card {
            background-color: var(--card-bg);
            border: 1px solid var(--card-border);
            border-radius: 14px;
            padding: 14px;
            text-align: left;
            box-shadow: 0 2px 6px rgba(0,0,0,0.05);
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 10px;
            min-height: 78px;
            position: relative;
            transition: transform 0.15s, box-shadow 0.15s;
        }

        .menu-card:active { transform: scale(0.97); opacity: 0.9; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
        .menu-icon-badge {
            width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
            display: flex; align-items: center; justify-content: center; font-size: 20px;
        }
        .menu-card-body { flex: 1; min-width: 0; }
        .menu-title { font-size: 12.5px; font-weight: 800; color: var(--text-primary); line-height: 1.25; }
        .menu-sub { font-size: 10px; color: var(--text-secondary); line-height: 1.3; margin-top: 2px; }
        .menu-chevron { font-size: 15px; color: var(--text-secondary); flex-shrink: 0; }

        /* SETTINGS PAGE */
        .settings-section { background: var(--card-bg); border: 1px solid var(--input-border); border-radius: 14px; padding: 4px 14px; margin-bottom: 14px; }
        .settings-section h4 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-secondary); margin: 14px 0 4px 0; }
        .settings-row { display: flex; align-items: center; justify-content: space-between; padding: 13px 0; border-bottom: 1px solid var(--input-border); gap: 10px; }
        .settings-row:last-child { border-bottom: none; }
        .settings-row-label { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; color: var(--text-primary); }
        .settings-row-label .sr-icon { font-size: 17px; width: 22px; text-align: center; }
        .settings-row-sub { font-size: 10.5px; color: var(--text-secondary); font-weight: 400; margin-top: 2px; }
        .settings-btn-mini { background: var(--bg-color); border: 1px solid var(--input-border); color: var(--text-primary); font-size: 11px; font-weight: 700; padding: 7px 12px; border-radius: 8px; cursor: pointer; }
        .toggle-switch { position: relative; width: 42px; height: 24px; border-radius: 20px; background: var(--input-border); border: none; cursor: pointer; flex-shrink: 0; }
        .toggle-switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.3); }
        .toggle-switch.on { background: var(--success); }
        .toggle-switch.on::after { transform: translateX(18px); }

        /* ANIMASI NOTIFIKASI BERKEDIP CHAT */
        @keyframes pulseBlink {
            0% { opacity: 1; transform: scale(1); }
            50% { opacity: 0.3; transform: scale(1.1); }
            100% { opacity: 1; transform: scale(1); }
        }
        .badge-notif-chat {
            position: absolute;
            top: 0;
            right: 0;
            width: 14px;
            height: 14px;
            background-color: #ef4444;
            border-radius: 50%;
            border: 2px solid var(--header-red);
            display: none;
            animation: pulseBlink 1s infinite;
            z-index: 5;
        }

        /* SUB PAGES & COMPONENTS */
        .sub-page { display: none; }
        .sub-page.active { display: block; }
        
        .btn-back-home {
            background: #e2e8f0;
            color: #334155;
            border: none;
            padding: 8px 14px;
            border-radius: 8px;
            font-size: 12px;
            font-weight: bold;
            cursor: pointer;
            margin-bottom: 12px;
            display: inline-flex;
            align-items: center;
            gap: 5px;
        }

        .card-view {
            background-color: var(--card-bg);
            border-radius: 14px;
            padding: 16px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.06);
            margin-bottom: 14px;
        }

        .row { display: flex; gap: 8px; margin-bottom: 8px; }
        .col { flex: 1; }
        label { font-size: 10px; font-weight: bold; color: var(--text-secondary); display: block; margin-bottom: 4px; text-transform: uppercase; }
        input, select, textarea { width: 100%; padding: 9px; border: 1px solid var(--input-border); background-color: var(--input-bg); color: var(--text-primary); border-radius: 8px; font-size: 13px; outline: none; }
        input[readonly] { background-color: rgba(0,0,0,0.05); font-weight: bold; }
        
        .btn-act { width: 100%; padding: 11px; border: none; border-radius: 8px; font-size: 13px; font-weight: bold; cursor: pointer; color: white; margin-top: 10px; background-color: var(--accent-btn); }
        .btn-green { background-color: #137333; }
        .btn-blue { background-color: #0284c7; }
        .btn-outline { background: transparent; border: 1px solid var(--input-border); color: var(--text-primary); }
        
        .grid-result { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
        .res-box { background: var(--bg-color); padding: 10px; border-radius: 8px; border-left: 4px solid var(--input-border); }
        .res-box.full { grid-column: span 2; }
        .res-label { font-size: 10px; color: var(--text-secondary); text-transform: uppercase; font-weight: bold; }
        .res-value { font-size: 13px; font-weight: bold; color: var(--text-primary); margin-top: 3px; }
        .separator-pps { grid-column: span 2; background: var(--header-red); color: white; text-align: center; padding: 4px; border-radius: 4px; font-size: 11px; font-weight: bold; margin-top: 6px; margin-bottom: -2px; }

        /* SPREADSHEET ABSENSI */
        .sheet-wrapper { overflow-x: auto; border: 1px solid #cbd5e1; border-radius: 8px; background: #ffffff; max-width: 100%; }
        .sheet-table { border-collapse: collapse; width: 100%; font-size: 11px; white-space: nowrap; }
        .sheet-table th, .sheet-table td { border: 1px solid #cbd5e1; padding: 4px; text-align: center; min-width: 30px; }
        .sheet-table th.col-nama, .sheet-table td.col-nama { position: sticky; left: 0; background: #f8fafc; z-index: 2; min-width: 120px; text-align: left; padding-left: 6px; font-weight: bold; }
        .sheet-table th { background: #00bcd4; color: white; font-weight: bold; }
        .shift-cell { width: 100%; border: none; outline: none; text-align: center; font-weight: bold; font-size: 11px; padding: 3px 0; background: transparent; text-transform: uppercase; }
        .cell-off { background-color: #e53935 !important; color: #ffffff !important; font-weight: bold; }
        .cell-so { background-color: #fb8c00 !important; color: #ffffff !important; font-weight: bold; }
        .btn-del-row { background: none; border: none; color: #ef4444; cursor: pointer; font-size: 13px; padding: 0 4px; font-weight: bold; }

        /* REALTIME CHAT STYLES (BUBBLE MELAYANG) */
        .fab-chat {
            position: fixed; bottom: 20px; right: 20px; width: 58px; height: 58px;
            background: linear-gradient(135deg, var(--header-red) 0%, var(--header-red-dark) 100%); color: white; border-radius: 50%;
            display: flex; align-items: center; justify-content: center; font-size: 25px;
            box-shadow: 0 6px 16px rgba(217, 37, 37, 0.45); cursor: pointer; z-index: 9999;
            transition: transform 0.2s; border: none; outline: none;
        }
        .fab-chat:active { transform: scale(0.9); }

        .chat-panel {
            position: fixed; bottom: 90px; right: 20px; width: 320px; height: 460px; max-height: 72vh;
            background: var(--card-bg); border-radius: 20px; box-shadow: 0 14px 32px rgba(0,0,0,0.28);
            z-index: 9998; display: none; flex-direction: column; overflow: hidden; border: 1px solid var(--input-border);
        }
        @media (max-width: 380px) {
            .chat-panel { width: calc(100vw - 40px); left: 20px; right: 20px; }
        }
        .chat-header {
            background: linear-gradient(135deg, var(--header-red) 0%, var(--header-red-dark) 100%);
            color: white; padding: 14px 16px; font-size: 13px; font-weight: bold;
            display: flex; justify-content: space-between; align-items: center; flex-shrink: 0;
        }
        .chat-header-title { display: flex; align-items: center; gap: 8px; }
        .chat-header-avatar { width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; font-size: 14px; }
        .chat-header .chat-live-dot { font-size: 9px; background: rgba(255,255,255,0.9); color: #15803d; padding: 2px 7px; border-radius: 10px; font-weight: bold; }
        .chat-header .chat-live-dot::before { content: '●'; margin-right: 3px; animation: pulseBlink 1.4s infinite; display: inline-block; }
        .close-chat-btn { background: rgba(255,255,255,0.15); border: none; color: white; font-size: 14px; cursor: pointer; line-height: 1; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
        .close-chat-btn:active { background: rgba(255,255,255,0.3); }

        .chat-messages {
            flex: 1; padding: 14px 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 9px;
            background: linear-gradient(180deg, var(--bg-color) 0%, var(--bg-color) 100%);
            background-image: radial-gradient(circle at 1px 1px, rgba(120,120,140,0.08) 1px, transparent 0);
            background-size: 16px 16px;
            scroll-behavior: smooth;
        }
        .chat-bubble { max-width: 82%; padding: 9px 12px; border-radius: 14px; font-size: 12.5px; line-height: 1.45; word-break: break-word; position: relative; box-shadow: 0 1px 3px rgba(0,0,0,0.08); animation: chatPop 0.18s ease-out; }
        @keyframes chatPop { from { opacity: 0; transform: translateY(4px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
        .chat-bubble.incoming { align-self: flex-start; background: var(--card-bg); color: var(--text-primary); border-bottom-left-radius: 3px; border: 1px solid var(--input-border); }
        .chat-bubble.outgoing { align-self: flex-end; background: linear-gradient(135deg, var(--header-red) 0%, var(--header-red-dark) 100%); color: #ffffff; border-bottom-right-radius: 3px; }
        .chat-sender { font-size: 10px; font-weight: 800; margin-bottom: 3px; opacity: 0.9; letter-spacing: 0.2px; }
        .chat-time { font-size: 9px; text-align: right; margin-top: 5px; opacity: 0.65; }
        .chat-input-area { display: flex; gap: 8px; padding: 10px 12px; background: var(--card-bg); border-top: 1px solid var(--input-border); flex-shrink: 0; align-items: center; }
        .chat-input-area input { border-radius: 22px; padding: 10px 16px; border: 1px solid var(--input-border); background: var(--bg-color); }
        .chat-input-area input:focus { border-color: var(--header-red); }
        .btn-send-chat {
            background: linear-gradient(135deg, var(--header-red) 0%, var(--header-red-dark) 100%); color: white; border: none;
            border-radius: 50%; width: 38px; height: 38px; flex-shrink: 0; font-size: 15px;
            display: flex; align-items: center; justify-content: center; cursor: pointer;
            box-shadow: 0 2px 6px rgba(217, 37, 37, 0.35);
        }
        .btn-send-chat:active { transform: scale(0.9); }
        .chat-delete-btn { background: none; border: none; color: inherit; font-size: 11px; cursor: pointer; opacity: 0.65; margin-left: 6px; padding: 0; float: right; }
        .chat-delete-btn:hover { opacity: 1; }

        /* TABEL DINAMIS PROXY NSB */
        .table-nsb { width: 100%; border-collapse: collapse; font-size: 11px; margin-top: 8px; }
        .table-nsb th, .table-nsb td { border: 1px solid var(--input-border); padding: 6px; text-align: center; }
        .table-nsb th { background: var(--bg-color); color: var(--text-secondary); }
        .table-nsb input, .table-nsb select { padding: 4px; font-size: 11px; border: none; background: transparent; width: 100%; text-align: center; font-weight: bold; border-bottom: 1px dashed #ccc; border-radius: 0; }
        .table-nsb input:focus, .table-nsb select:focus { outline: none; border-bottom: 1px solid var(--header-red); }

        /* RETAIL PROJECT ETC LINKS */
        .link-card { display: flex; align-items: center; background: var(--bg-color); border: 1px solid var(--input-border); padding: 12px; border-radius: 10px; text-decoration: none; color: var(--text-primary); margin-bottom: 10px; font-weight: bold; font-size: 13px; }
        .link-card:hover { background: #e2e8f0; }
        .link-icon { font-size: 24px; margin-right: 12px; width: 38px; height: 38px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
        .link-icon img { width: 38px; height: 38px; object-fit: cover; border-radius: 9px; box-shadow: 0 1px 4px rgba(0,0,0,0.15); }

        /* BADGE PUBLIK: JUMLAH USER AKTIF */
        .public-active-badge {
            font-size: 10px; color: rgba(255,255,255,0.9); margin-top: 4px;
            display: inline-flex; align-items: center; gap: 4px; font-weight: 600;
        }
        .public-active-badge .dot-live { color: #4ade80; animation: pulseBlink 1.4s infinite; }
        .header-title { cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; }

        /* MODAL PIN DEVELOPER */
        .pin-modal-overlay {
            position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 10000;
            display: none; align-items: center; justify-content: center; padding: 20px;
        }
        .pin-modal-box {
            background: var(--card-bg); border-radius: 18px; padding: 24px 20px; width: 100%; max-width: 300px;
            text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,0.3);
        }
        .pin-modal-box h4 { margin: 0 0 4px 0; color: var(--header-red); font-size: 15px; }
        .pin-modal-box p { margin: 0 0 16px 0; font-size: 11px; color: var(--text-secondary); }
        .pin-modal-box input {
            width: 100%; text-align: center; font-size: 22px; letter-spacing: 8px; padding: 10px;
            border-radius: 10px; border: 1px solid var(--input-border); background: var(--bg-color); color: var(--text-primary);
            margin-bottom: 14px; box-sizing: border-box;
        }
        .pin-modal-actions { display: flex; gap: 8px; }
        .pin-modal-actions button { flex: 1; margin: 0; }
        .pin-shake { animation: pinShake 0.35s; }
        @keyframes pinShake {
            0%, 100% { transform: translateX(0); }
            25% { transform: translateX(-6px); }
            75% { transform: translateX(6px); }
        }

        /* MODAL DONASI / TRAKTIR DEVELOPER */
        .donasi-modal-overlay {
            position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 10000;
            display: none; align-items: center; justify-content: center; padding: 20px;
        }
        .donasi-modal-box {
            background: var(--card-bg); border-radius: 20px; padding: 0; width: 100%; max-width: 320px;
            text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,0.35); overflow: hidden;
        }
        .donasi-modal-header {
            background: linear-gradient(135deg, var(--header-red) 0%, var(--header-red-dark) 100%);
            color: #fff; padding: 18px 16px 16px 16px; position: relative;
        }
        .donasi-modal-header .emoji { font-size: 30px; margin-bottom: 4px; }
        .donasi-modal-header h4 { margin: 0; font-size: 15px; font-weight: 900; letter-spacing: 0.3px; }
        .donasi-modal-header p { margin: 4px 0 0 0; font-size: 11px; opacity: 0.92; line-height: 1.4; }
        .donasi-modal-close {
            position: absolute; right: 10px; top: 10px; background: rgba(0,0,0,0.18); border: none;
            width: 26px; height: 26px; border-radius: 50%; color: #fff; font-size: 13px; cursor: pointer;
            display: flex; align-items: center; justify-content: center;
        }
        .donasi-modal-body { padding: 18px 20px 22px 20px; }
        .donasi-qr-frame {
            background: #fff; border: 2px solid var(--badge-yellow); border-radius: 14px; padding: 10px;
            display: inline-block; box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        }
        .donasi-qr-frame img { display: block; width: 190px; height: 190px; object-fit: contain; border-radius: 6px; }
        .donasi-modal-body .caption { font-size: 11px; color: var(--text-secondary); margin-top: 10px; line-height: 1.5; }
        .donasi-modal-body .caption b { color: var(--text-primary); }
        .donasi-modal-actions { display: flex; gap: 8px; margin-top: 16px; }
        .donasi-modal-actions button { flex: 1; margin: 0; }

        /* HALAMAN STATISTIK DEVELOPER */
        .admin-stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
        .admin-stat-card { background: var(--card-bg); border: 1px solid var(--input-border); border-radius: 14px; padding: 14px 10px; text-align: center; }
        .admin-stat-card .num { font-size: 22px; font-weight: 800; color: var(--header-red); }
        .admin-stat-card .lbl { font-size: 9.5px; color: var(--text-secondary); font-weight: 600; margin-top: 2px; }
        .admin-store-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--input-border); font-size: 12px; }
        .admin-store-row:last-child { border-bottom: none; }
        .admin-store-row .cnt { font-weight: 800; color: var(--header-red); }
        .admin-log-item { padding: 8px 10px; border-bottom: 1px solid var(--input-border); font-size: 11px; }
        .admin-log-item:last-child { border-bottom: none; }
        .admin-log-item b { color: var(--text-primary); }
        .admin-log-item .log-time { color: var(--text-secondary); font-size: 9.5px; }

        /* MODAL LOGIN Wajib */
        .modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.85); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 9999; }
        .modal-card { background: var(--card-bg); border-radius: 18px; padding: 22px 18px; width: 100%; max-width: 360px; box-shadow: 0 10px 25px rgba(0,0,0,0.3); text-align: center; }

        /* MODAL LANDSCAPE */
        #modalVisualLandscape { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: #ffffff; z-index: 99999; display: none; flex-direction: column; padding: 10px; }

        /* QR CODE STYLES */
        .qr-grid-container { display: grid; gap: 12px; justify-content: center; justify-items: center; background: #fff; padding: 15px; border: 2px solid var(--card-border); border-radius: 8px; overflow-x: auto;}
        .qr-item { text-align: center; border: 1px solid #ddd; padding: 12px; border-radius: 6px; background: #fff; page-break-inside: avoid; }
        .qr-item img { margin: 0 auto; display: block; }
        .qr-title { font-size: 13px; font-weight: bold; margin-bottom: 6px; color: #000; text-transform: uppercase; }

        .app-footer { text-align: center; font-size: 11px; color: var(--text-secondary); margin-top: 25px; font-weight: 600; padding-bottom: 20px;}
        .saweria-btn { display: inline-block; margin-top: 10px; background: #facc15; color: #000000; padding: 6px 14px; border-radius: 20px; text-decoration: none; font-weight: bold; font-size: 11px; box-shadow: 0 2px 4px rgba(0,0,0,0.15); border: 1px solid #eab308;}

        /* GAME STYLES */
        .quiz-opt { background:var(--bg-color); border:1px solid var(--input-border); padding:10px; border-radius:8px; margin-bottom:8px; text-align:left; font-size:13px; font-weight:bold; cursor:pointer; color:var(--text-primary); }
        .quiz-opt:hover { background:#e2e8f0; }
        .quiz-opt.correct { background:#16a34a !important; color:white !important; border-color:#16a34a; }
        .quiz-opt.wrong { background:#dc2626 !important; color:white !important; border-color:#dc2626; }
        
        .ttt-board { display:grid; grid-template-columns:repeat(3, 1fr); gap:6px; max-width:240px; margin:15px auto; }
        .ttt-cell { height:70px; background:var(--bg-color); border:2px solid var(--input-border); border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:32px; font-weight:bold; cursor:pointer; color:var(--text-primary); }
