        :root {
            --classic-bg: #f0f2f5;
            --sidebar-dark: #1b2432;
            --sidebar-active: #141c28;
            --topbar-color: #1e3a5f;
            --accent: #2563eb;
            --accent-light: #3b82f6;
        }

        * { box-sizing: border-box; }

        body {
            font-family: 'IBM Plex Sans', sans-serif;
            background-color: var(--classic-bg);
            color: #1e293b;
            font-size: 9px;
        }

        /* ===== HEADER ===== */
        .main-header {
            background: linear-gradient(90deg, #1e3a5f 0%, #2563eb 100%);
            color: white;
            padding: 0 20px;
            height: 52px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            position: fixed;
            width: 100%;
            z-index: 1050;
            box-shadow: 0 2px 8px rgba(37,99,235,0.25);
        }
        .main-header .logo {
            font-size: 10.7px;
            font-weight: 700;
            letter-spacing: 1.5px;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .logo-badge {
            background: rgba(255,255,255,0.18);
            border: 1px solid rgba(255,255,255,0.3);
            border-radius: 6px;
            padding: 3px 10px;
            font-size: 9px;
            font-weight: 600;
            letter-spacing: 2px;
        }
        .user-info { display: flex; align-items: center; gap: 16px; }
        .user-info .notif-btn {
            color: rgba(255,255,255,0.85);
            cursor: pointer;
            position: relative;
        }

        /* ===== SIDEBAR ===== */
        .sidebar {
            width: 240px;
            height: 100vh;
            position: fixed;
            top: 52px;
            left: 0;
            background: var(--sidebar-dark);
            color: #94a3b8;
            overflow-y: auto;
            scrollbar-width: thin;
            scrollbar-color: #2d3f55 transparent;
            z-index: 1040;
            transition: transform 0.25s ease;
        }
        .sidebar::-webkit-scrollbar { width: 4px; }
        .sidebar::-webkit-scrollbar-thumb { background: #2d3f55; border-radius: 4px; }

        .sidebar .user-panel {
            padding: 14px 16px;
            border-bottom: 1px solid #243044;
            background: #141c28;
        }
        .sidebar-menu { list-style: none; padding: 0; margin: 0; }
        .sidebar-menu li.header {
            padding: 12px 16px 6px;
            font-size: 7.8px;
            color: #4b6080;
            font-weight: 700;
            letter-spacing: 1.5px;
            text-transform: uppercase;
            background: transparent;
        }
        .sidebar-menu li a {
            display: flex;
            align-items: center;
            padding: 9px 16px;
            color: #94a3b8;
            text-decoration: none;
            border-left: 3px solid transparent;
            font-size: 9px;
            transition: all 0.15s;
            gap: 10px;
        }
        .sidebar-menu li a i { font-size: 12.3px; flex-shrink: 0; }
        .sidebar-menu li a:hover { color: #e2e8f0; background: #1e2d42; border-left-color: #3b82f6; }
        .sidebar-menu li.active > a { color: #fff; background: var(--sidebar-active); border-left-color: var(--accent); }

        /* Submenu */
        .sidebar-menu li.has-sub > a::after {
            content: '\F285';
            font-family: 'bootstrap-icons';
            margin-left: auto;
            font-size: 9px;
            transition: transform 0.2s;
        }
        .sidebar-menu li.has-sub.open > a::after { transform: rotate(90deg); }
        .sidebar-submenu {
            list-style: none;
            padding: 0;
            margin: 0;
            background: #141c28;
            display: none;
        }
        .sidebar-submenu.open { display: block; }
        .sidebar-submenu li a {
            padding: 7px 16px 7px 42px;
            font-size: 8.2px;
            color: #64748b;
            border-left: 3px solid transparent;
        }
        .sidebar-submenu li a:hover { color: #94a3b8; background: #1e2d42; border-left-color: #3b82f6; }
        .sidebar-submenu li.active a { color: #93c5fd; border-left-color: #3b82f6; }
        /* Caret arrow untuk parent yang punya nested submenu */
        .sidebar-submenu li.has-sub > a::after {
            content: "\F282"; /* bi-chevron-down */
            font-family: "bootstrap-icons";
            float: right;
            font-size: 8px;
            transition: transform 0.2s;
        }
        .sidebar-submenu li.has-sub.open > a::after { transform: rotate(180deg); }
        /* Level 2 nested submenu — lebih indent dan background sedikit lebih gelap */
        .sidebar-submenu .sidebar-submenu {
            background: #0f1620;
            border-left: 2px solid #1e3a5f;
        }
        .sidebar-submenu .sidebar-submenu li a {
            padding-left: 58px;
            font-size: 8px;
        }

        /* Sidebar overlay (mobile) */
        .sidebar-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.45);
            z-index: 1039;
        }
        .sidebar-overlay.show { display: block; }

        /* ===== CONTENT ===== */
        .content-wrapper {
            margin-left: 240px;
            padding: 70px 22px 24px 22px;
        }
        .content-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-end;
            margin-bottom: 18px;
        }
        .content-header h1 { font-size: 13.1px; font-weight: 700; margin-bottom: 2px; color: #0f172a; }
        .content-header p { font-size: 9.8px; color: #64748b; margin: 0; }

        /* ===== STAT CARDS ===== */
        .stat-card {
            border-radius: 8px;
            position: relative;
            margin-bottom: 10px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.08);
            color: white;
            overflow: hidden;
            transition: transform 0.15s, box-shadow 0.15s;
            cursor: pointer;
        }
        .stat-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.13); }
        .stat-card .inner { padding: 9px 12px; position: relative; z-index: 2; }
        .stat-card .inner p {
            font-size: 7.4px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.8px;
            margin-bottom: 2px;
            opacity: 0.88;
        }
        .stat-card .inner h3 {
            font-size: 18px;
            font-weight: 700;
            margin: 0;
            letter-spacing: -0.5px;
            font-family: 'IBM Plex Mono', monospace;
        }
        .stat-card .bg-icon {
            position: absolute;
            top: 2px; right: 8px;
            font-size: 32.8px;
            color: rgba(255,255,255,0.2);
            z-index: 1;
        }
        .card-footer-link {
            display: block;
            text-align: center;
            padding: 3px 0;
            color: rgba(255,255,255,0.88);
            background: rgba(0,0,0,0.15);
            font-size: 8.2px;
            text-decoration: none;
            transition: background 0.15s;
        }
        .card-footer-link:hover { color: #fff; background: rgba(0,0,0,0.25); }

        /* ===== MOBILE BOTTOM NAV ===== */
        .mobile-bottom-nav {
            display: none;
            position: fixed;
            bottom: 0; left: 0; right: 0;
            height: 56px;
            background: var(--sidebar-dark);
            border-top: 1px solid #243044;
            z-index: 1050;
            justify-content: space-around;
            align-items: center;
            padding: 0 4px;
        }
        .mobile-bottom-nav a {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 2px;
            color: #64748b;
            text-decoration: none;
            font-size: 7.4px;
            font-weight: 600;
            padding: 6px 8px;
            border-radius: 8px;
            flex: 1;
            transition: all 0.15s;
        }
        .mobile-bottom-nav a i { font-size: 14.8px; }
        .mobile-bottom-nav a.active, .mobile-bottom-nav a:active { color: #3b82f6; }
        .mobile-bottom-nav a.menu-toggle { color: #94a3b8; }

        /* Mobile hamburger in header */
        .mobile-menu-btn {
            display: none;
            color: rgba(255,255,255,0.9);
            background: none;
            border: none;
            cursor: pointer;
            padding: 4px 8px;
            font-size: 16.4px;
        }

        /* ===== DASHBOARD SECTIONS FONT REDUCTION ===== */
        /* Personel Terbaru */
        #tbody-Personel-dashboard tr td {
            font-size: 9px !important;
        }
        #tbody-Personel-dashboard tr td strong,
        #tbody-Personel-dashboard tr td b {
            font-size: 9px !important;
        }

        /* Turn Over Terbaru */
        #tbody-turnover-dashboard tr td {
            font-size: 8.5px !important;
        }
        #tbody-turnover-dashboard tr td strong,
        #tbody-turnover-dashboard tr td b {
            font-size: 8.5px !important;
        }

        /* Indisipliner Terbaru */
        #tbody-indisipliner-dashboard tr td {
            font-size: 8.5px !important;
        }
        #tbody-indisipliner-dashboard tr td strong,
        #tbody-indisipliner-dashboard tr td b {
            font-size: 8.5px !important;
        }

        /* Dashboard table header */
        #tbody-Personel-dashboard,
        #tbody-turnover-dashboard,
        #tbody-indisipliner-dashboard {
            font-size: 8.5px;
        }

        /* Dashboard badges in these tables */
        #tbody-Personel-dashboard .badge,
        #tbody-turnover-dashboard .badge,
        #tbody-indisipliner-dashboard .badge {
            font-size: 7px !important;
            padding: 2px 5px !important;
        }

        /* Komponen Payroll table — smaller font */
        #tbody-master-komponen-payroll tr td {
            font-size: 8px !important;
        }
        #tbody-master-komponen-payroll tr td strong {
            font-size: 8px !important;
        }
        #tbody-master-komponen-payroll .badge {
            font-size: 7px !important;
            padding: 2px 5px !important;
        }
        #tbody-master-komponen-payroll code {
            font-size: 7px !important;
        }

        /* Dashboard table headers */
        #tbody-Personel-dashboard {
            font-size: 8px;
        }
        table:has(#tbody-Personel-dashboard) thead th {
            font-size: 8.5px !important;
            padding: 6px 10px !important;
        }
        table:has(#tbody-turnover-dashboard) thead th {
            font-size: 8px !important;
            padding: 6px 8px !important;
        }
        table:has(#tbody-indisipliner-dashboard) thead th {
            font-size: 8px !important;
            padding: 6px 8px !important;
        }

        /* ===== RESPONSIVE ===== */
        @media (max-width: 768px) {
            /* Header */
            .main-header { padding: 0 12px; }
            .main-header .logo { font-size: 10.7px; gap: 8px; }
            .logo-badge { font-size: 8.2px; padding: 2px 8px; }
            .mobile-menu-btn { display: block; }

            /* Sidebar: hidden off-screen, slide in as overlay */
            .sidebar {
                transform: translateX(-100%);
                width: 260px;
                z-index: 1045;
            }
            .sidebar.open { transform: translateX(0); }

            /* Content: full width, extra bottom padding for nav */
            .content-wrapper {
                margin-left: 0;
                padding: 64px 12px 72px 12px;
            }

            /* Show bottom nav */
            .mobile-bottom-nav { display: flex; }

            /* Content header stack */
            .content-header { flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 12px; }
            .content-header h1 { font-size: 13.1px; }
            .date-badge { font-size: 8.2px; }

            /* Stat cards: 2 per row on mobile */
            .stat-card { border-radius: 8px; }
            .stat-card .inner { padding: 8px 10px; }
            .stat-card .inner h3 { font-size: 16.4px; }
            .stat-card .inner p { font-size: 6.6px; }
            .stat-card .bg-icon { font-size: 26.2px; }

            /* Row gap tighter on mobile */
            .row.g-2 { --bs-gutter-x: 0.5rem; --bs-gutter-y: 0.5rem; }
            .row.g-3 { --bs-gutter-x: 0.5rem; --bs-gutter-y: 0.5rem; }

            /* Personel grid single column */
            #list-Personel { grid-template-columns: 1fr; }

            /* Tables scroll */
            .table-responsive { font-size: 9.4px; }

            /* Alert cards */
            .alert-card { padding: 8px 12px; }
            .alert-card h6 { font-size: 9px; }
            .alert-card p { font-size: 8.6px; }

            /* Notif panel full width */
            .notif-panel { width: calc(100vw - 24px); right: 12px; }

            /* GAS queue badge */
            #gas-queue-badge { bottom: 68px; right: 12px; }
            .toast-container-custom { bottom: 68px; right: 12px; }

            /* Form adjustments */
            .form-control, .form-select { font-size: 13.1px; } /* prevent iOS zoom */
        }

        @media (min-width: 769px) {
            .mobile-bottom-nav { display: none !important; }
            .mobile-menu-btn { display: none !important; }
            .sidebar-overlay { display: none !important; }
        }

        /* Card Colors */
        .c-blue   { background: linear-gradient(135deg, #2563eb, #1d4ed8); }

        /* ===== HALAMAN LOGIN ===== */
        /* Card Colors continue */
        .c-green  { background: linear-gradient(135deg, #059669, #047857); }
        .c-teal   { background: linear-gradient(135deg, #0891b2, #0e7490); }
        .c-purple { background: linear-gradient(135deg, #7c3aed, #6d28d9); }
        .c-red    { background: linear-gradient(135deg, #dc2626, #b91c1c); }
        .c-orange { background: linear-gradient(135deg, #ea580c, #c2410c); }
        .c-pink   { background: linear-gradient(135deg, #db2777, #be185d); }
        .c-slate  { background: linear-gradient(135deg, #475569, #334155); }

        /* ===== CLASSIC BOX ===== */
        .classic-box {
            background: #fff;
            border-top: 3px solid #2563eb;
            box-shadow: 0 1px 4px rgba(0,0,0,0.08);
            border-radius: 8px;
            overflow: hidden;
            margin-bottom: 20px;
        }
        .classic-box-header {
            padding: 10px 16px;
            border-bottom: 1px solid #f1f5f9;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        .classic-box-header h3 { font-size: 11.1px; font-weight: 700; color: #1e293b; margin: 0; }
        .table { font-size: 10.3px; margin-bottom: 0; }
        .table thead th { background-color: #f8fafc; font-weight: 600; color: #475569; border-bottom: 2px solid #e2e8f0; }
        .table tbody tr:hover { background-color: #f0f7ff; }
        .badge { font-weight: 500; font-size: 8.2px; padding: 3px 7px; border-radius: 4px; }

        /* ===== Personel CARD GRID ===== */
        #list-Personel {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
            gap: 14px;
        }
        .ps-list-item {
            background: #fff;
            border: 1px solid #e2e8f0;
            border-radius: 12px;
            padding: 0;
            overflow: hidden;
            transition: all 0.2s ease;
            box-shadow: 0 1px 4px rgba(0,0,0,0.06);
            display: flex;
            flex-direction: column;
        }
        .ps-list-item:hover {
            box-shadow: 0 8px 24px rgba(37,99,235,0.12);
            transform: translateY(-3px);
            border-color: #bfdbfe;
        }
        .ps-list-item.inactive { opacity: 0.82; }
        .ps-list-item.inactive:hover { box-shadow: 0 6px 18px rgba(0,0,0,0.08); border-color: #e2e8f0; }
        .ps-card-bar { height: 4px; background: linear-gradient(90deg, #2563eb, #60a5fa); }
        .ps-list-item.inactive .ps-card-bar { background: linear-gradient(90deg, #94a3b8, #cbd5e1); }
        .ps-list-item.keluar .ps-card-bar { background: linear-gradient(90deg, #dc2626, #f87171); }
        .ps-card-body {
            padding: 14px 16px 10px;
            display: flex; align-items: flex-start; gap: 13px; flex: 1;
        }
        .ps-avatar {
            width: 48px; height: 48px; border-radius: 12px;
            background: linear-gradient(135deg, #3b82f6, #1d4ed8);
            color: #fff; display: flex; align-items: center; justify-content: center;
            font-weight: 700; font-size: 14.8px; flex-shrink: 0;
            box-shadow: 0 3px 8px rgba(37,99,235,0.25);
        }
        .ps-avatar.inactive { background: linear-gradient(135deg, #94a3b8, #64748b); box-shadow: 0 2px 6px rgba(0,0,0,0.12); }
        .ps-avatar.keluar   { background: linear-gradient(135deg, #ef4444, #b91c1c); box-shadow: 0 2px 6px rgba(220,38,38,0.22); }
        .ps-info { flex: 1; min-width: 0; }
        .ps-info .ps-name { font-size: 11.5px; font-weight: 700; color: #0f172a; margin: 0 0 3px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .ps-info .ps-nip {
            font-family: 'IBM Plex Mono', monospace;
            font-size: 8.6px; font-weight: 600; color: #2563eb;
            background: #eff6ff; border-radius: 4px; padding: 1px 6px;
            display: inline-block; margin-bottom: 5px;
        }
        .ps-info .ps-meta { font-size: 9.4px; color: #64748b; display: flex; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .ps-info .ps-meta i { color: #93c5fd; margin-right: 4px; font-size: 9.8px; }
        .ps-meta-row { display: flex; flex-direction: column; gap: 3px; margin-top: 2px; }
        .ps-card-placement {
            padding: 8px 16px; display: flex; align-items: center; gap: 8px;
            background: #f8fafc; border-top: 1px solid #f1f5f9;
        }
        .ps-place-icon {
            width: 30px; height: 30px; border-radius: 8px;
            background: linear-gradient(135deg, #dbeafe, #bfdbfe);
            display: flex; align-items: center; justify-content: center;
            font-size: 11.5px; color: #2563eb; flex-shrink: 0;
        }
        .ps-placement { flex: 1; min-width: 0; }
        .ps-placement .ps-klien { font-size: 9.8px; font-weight: 700; color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .ps-placement .ps-project { font-size: 8.6px; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .ps-card-footer {
            padding: 8px 14px; display: flex; align-items: center;
            justify-content: space-between; border-top: 1px solid #f1f5f9;
        }
        .ps-status-col { display: flex; align-items: center; gap: 5px; }
        .ps-actions { display: flex; gap: 5px; }
        .ps-actions .btn { font-size: 9px; padding: 4px 9px; font-weight: 600; border-radius: 7px; }
        .ps-badge-status {
            font-size: 8.6px; font-weight: 600; padding: 3px 9px;
            border-radius: 20px; display: inline-flex; align-items: center; gap: 4px;
        }
        .ps-badge-status.aktif  { background: #dcfce7; color: #16a34a; }
        .ps-badge-status.keluar { background: #fee2e2; color: #dc2626; }
        .ps-badge-status.other  { background: #f1f5f9; color: #64748b; }
        .ps-badge-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }
        .ps-badge-akses { font-size: 8.2px; font-weight: 600; padding: 2px 8px; border-radius: 4px; background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
        .ps-empty { text-align: center; padding: 60px 20px; color: #94a3b8; }
        .ps-empty i { font-size: 36.1px; display: block; margin-bottom: 10px; opacity: 0.45; }
        .ps-empty p { font-size: 10.7px; margin: 0; }

        /* ===== MINIMALIST Personel TABLE ===== */
        #list-Personel { display: block; }
        .ps-table { width: 100%; border-collapse: collapse; }
        .ps-table thead tr {
            background: #f8fafc;
            border-bottom: 2px solid #e2e8f0;
        }
        .ps-table thead th {
            font-size: 8.6px;
            font-weight: 700;
            color: #64748b;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            padding: 8px 12px;
            white-space: nowrap;
        }
        .ps-table tbody tr {
            border-bottom: 1px solid #f1f5f9;
            transition: background 0.12s;
        }
        .ps-table tbody tr:hover { background: #f0f7ff; }
        .ps-table td { padding: 8px 12px; vertical-align: middle; font-size: 10.3px; }
        .ps-row-avatar {
            width: 30px; height: 30px; border-radius: 8px;
            display: inline-flex; align-items: center; justify-content: center;
            font-weight: 700; font-size: 9px; color: #fff; flex-shrink: 0;
        }
        .ps-row-avatar.aktif  { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
        .ps-row-avatar.keluar { background: linear-gradient(135deg, #ef4444, #b91c1c); }
        .ps-row-avatar.other  { background: linear-gradient(135deg, #94a3b8, #64748b); }
        .ps-row-name { font-weight: 700; color: #0f172a; font-size: 10.3px; margin-bottom: 1px; }
        .ps-row-nip  { font-family: 'IBM Plex Mono', monospace; font-size: 8.2px; color: #2563eb; background: #eff6ff; border-radius: 3px; padding: 1px 5px; display: inline-block; }
        .ps-row-meta { font-size: 9px; color: #64748b; }
        .ps-row-klien { font-size: 9.8px; font-weight: 600; color: #1e293b; }
        .ps-row-project { font-size: 8.6px; color: #94a3b8; }
        .ps-row-actions { display: flex; gap: 4px; justify-content: flex-end; }
        .ps-row-actions .btn { padding: 3px 7px; font-size: 9px; border-radius: 5px; }
        @media (max-width: 768px) {
            .ps-col-gender, .ps-col-akses { display: none; }
            .ps-table td, .ps-table th { padding: 7px 8px; }
        }

        /* Keterangan Promosi/Demosi List */
        .keterangan-item {
            display: flex;
            align-items: flex-start;
            gap: 12px;
            padding: 12px 14px;
            border-radius: 6px;
            margin-bottom: 10px;
            transition: all 0.15s ease;
        }
        .keterangan-item:hover {
            box-shadow: 0 2px 6px rgba(0,0,0,0.08);
            transform: translateX(2px);
        }
        .keterangan-icon {
            font-size: 18px;
            line-height: 1;
            flex-shrink: 0;
            padding-top: 2px;
        }
        .keterangan-body { flex: 1; min-width: 0; }
        .keterangan-text {
            font-size: 10.7px;
            color: #1e293b;
            line-height: 1.5;
            margin-bottom: 6px;
            word-wrap: break-word;
        }
        .keterangan-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 12px;
            align-items: center;
            font-size: 9px;
            color: #64748b;
        }
        .keterangan-meta i { color: #94a3b8; }

        /* Kategori Promosi/Demosi Cards */
        .kategori-card {
            background: #fff;
            border-radius: 10px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.06);
            overflow: hidden;
            height: 100%;
            border-top: 4px solid;
        }
        .kategori-card.kategori-promosi { border-top-color: #16a34a; }
        .kategori-card.kategori-demosi  { border-top-color: #dc2626; }
        .kategori-head {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 16px 20px;
            border-bottom: 1px solid #f1f5f9;
        }
        .kategori-promosi .kategori-head { background: linear-gradient(135deg, #f0fdf4 0%, #fff 100%); }
        .kategori-demosi  .kategori-head { background: linear-gradient(135deg, #fef2f2 0%, #fff 100%); }
        .kategori-icon {
            width: 52px; height: 52px;
            border-radius: 50%;
            display: flex; align-items: center; justify-content: center;
            font-size: 23px;
            color: #fff;
            flex-shrink: 0;
        }
        .kategori-promosi .kategori-icon { background: linear-gradient(135deg, #16a34a, #15803d); }
        .kategori-demosi  .kategori-icon { background: linear-gradient(135deg, #dc2626, #b91c1c); }
        .kategori-head h3 {
            font-size: 14.8px;
            font-weight: 700;
            margin: 0;
            color: #1e293b;
        }
        .kategori-head small {
            font-size: 9.4px;
            color: #64748b;
            font-weight: 500;
        }
        .kategori-body {
            padding: 16px 20px 20px 20px;
        }
        .kategori-def {
            font-size: 10.3px;
            color: #334155;
            line-height: 1.6;
            margin-bottom: 16px;
        }
        .kategori-def strong { color: #1e293b; }
        .kategori-sub {
            font-size: 9px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            color: #64748b;
            margin: 14px 0 6px 0;
            padding-bottom: 4px;
            border-bottom: 1px dashed #e2e8f0;
        }
        .kategori-promosi .kategori-sub { color: #16a34a; }
        .kategori-demosi  .kategori-sub { color: #dc2626; }
        .kategori-list {
            font-size: 9.8px;
            color: #475569;
            line-height: 1.6;
            margin: 0 0 4px 0;
            padding-left: 18px;
        }
        .kategori-list li { margin-bottom: 3px; }
        .kategori-example {
            display: inline-flex;
            align-items: center;
            background: #f8fafc;
            border: 1px solid #e2e8f0;
            border-radius: 6px;
            padding: 5px 12px;
            font-size: 9.4px;
            font-weight: 600;
            margin: 3px 6px 3px 0;
        }
        .kategori-promosi .kategori-example .ex-to { color: #16a34a; }
        .kategori-promosi .kategori-example i { color: #16a34a; }
        .kategori-demosi  .kategori-example .ex-to { color: #dc2626; }
        .kategori-demosi  .kategori-example i { color: #dc2626; }
        .kategori-example .ex-from { color: #64748b; }

        /* Alert card */
        .alert-card {
            background: #fff;
            border-radius: 8px;
            border-left: 4px solid #f59e0b;
            box-shadow: 0 1px 4px rgba(0,0,0,0.07);
            padding: 10px 14px;
            margin-bottom: 14px;
        }
        .alert-card.danger { border-left-color: #dc2626; }
        .alert-card h6 { font-size: 9.8px; font-weight: 700; color: #92400e; margin-bottom: 2px; }
        .alert-card.danger h6 { color: #991b1b; }
        .alert-card p { font-size: 9.4px; color: #64748b; margin: 0; }

        /* Date badge */
        .date-badge {
            background: #f1f5f9;
            border-radius: 6px;
            padding: 4px 10px;
            font-size: 9px;
            color: #475569;
            font-family: 'IBM Plex Mono', monospace;
        }
        
        /* Form Styling */
        .form-label { font-size: 9.8px; color: #475569; }
        .form-control, .form-select { font-size: 10.7px; border-radius: 6px; }
        .form-control:focus, .form-select:focus { border-color: #3b82f6; box-shadow: 0 0 0 0.2rem rgba(59,130,246,0.25); }

        /* ===== FLOWCHART ===== */
        .flowchart-wrap {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 0;
            padding: 28px 20px 32px;
            background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
        }
        .flow-step {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0;
            width: 100%;
        }
        /* ── Base flow-box ── */
        .flow-box {
            border-radius: 10px;
            padding: 11px 20px;
            text-align: center;
            font-size: 10.3px;
            font-weight: 600;
            min-width: 180px;
            max-width: 220px;
            box-shadow: 0 3px 10px rgba(0,0,0,0.12);
            position: relative;
            cursor: pointer;
            transition: transform 0.15s, box-shadow 0.15s;
            border: none;
            outline: none;
        }
        .flow-box:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,0.18); }
        .flow-box small { display: block; font-size: 8.2px; font-weight: 400; opacity: 0.88; margin-top: 3px; line-height: 1.35; }

        /* Step number badge */
        .flow-box .flow-step-num {
            position: absolute;
            top: -10px; left: -10px;
            width: 22px; height: 22px;
            border-radius: 50%;
            background: rgba(255,255,255,0.9);
            color: #1e293b;
            font-size: 8.2px;
            font-weight: 700;
            display: flex; align-items: center; justify-content: center;
            box-shadow: 0 1px 4px rgba(0,0,0,0.2);
            border: 1.5px solid rgba(0,0,0,0.1);
        }

        .flow-box.start {
            background: linear-gradient(135deg,#1d4ed8,#3b82f6);
            color: #fff;
            border-radius: 50px;
            padding: 12px 32px;
            min-width: 160px;
            box-shadow: 0 4px 14px rgba(37,99,235,0.4);
        }
        .flow-box.process  { background: linear-gradient(135deg,#2563eb,#3b82f6); color: #fff; }
        .flow-box.action   { background: linear-gradient(135deg,#059669,#10b981); color: #fff; }
        .flow-box.end {
            background: linear-gradient(135deg,#334155,#475569);
            color: #fff;
            border-radius: 50px;
            padding: 12px 32px;
            min-width: 160px;
        }
        .flow-box.danger   { background: linear-gradient(135deg,#dc2626,#ef4444); color: #fff; }
        .flow-box.warning  { background: linear-gradient(135deg,#d97706,#f59e0b); color: #fff; }
        .flow-box.info     { background: linear-gradient(135deg,#0891b2,#22d3ee); color: #fff; }
        .flow-box.success  { background: linear-gradient(135deg,#16a34a,#22c55e); color: #fff; }

        /* ── DIAMOND decision shape ── */
        .flow-diamond-wrap {
            display: flex;
            flex-direction: column;
            align-items: center;
            margin: 0;
        }
        .flow-diamond {
            width: 140px;
            height: 140px;
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: transform 0.15s;
            flex-shrink: 0;
        }
        .flow-diamond:hover { transform: scale(1.05) rotate(0deg); }
        .flow-diamond::before {
            content: '';
            position: absolute;
            inset: 14px;
            background: linear-gradient(135deg,#f59e0b,#fbbf24);
            transform: rotate(45deg);
            border-radius: 8px;
            box-shadow: 0 4px 14px rgba(245,158,11,0.35);
            transition: box-shadow 0.15s;
        }
        .flow-diamond:hover::before { box-shadow: 0 6px 20px rgba(245,158,11,0.5); }
        .flow-diamond-inner {
            position: relative;
            z-index: 2;
            text-align: center;
            color: #1e293b;
            font-size: 9.4px;
            font-weight: 700;
            padding: 0 12px;
            line-height: 1.35;
        }
        .flow-diamond-inner i { display: block; font-size: 13.1px; margin-bottom: 3px; }
        .flow-diamond-inner small { display: block; font-size: 7.8px; font-weight: 500; opacity: 0.75; margin-top: 2px; }

        /* ── Arrows ── */
        .flow-arrow {
            display: flex;
            justify-content: center;
            align-items: center;
            height: 32px;
            color: #94a3b8;
            font-size: 16.4px;
            position: relative;
        }
        .flow-arrow::before {
            content: '';
            position: absolute;
            width: 2px;
            height: 100%;
            background: linear-gradient(180deg, #cbd5e1, #94a3b8);
            left: 50%;
            transform: translateX(-50%);
            z-index: 0;
        }
        .flow-arrow i { position: relative; z-index: 1; background: #f8fafc; padding: 0 2px; }
        .flow-arrow-h {
            display: flex;
            align-items: center;
            color: #94a3b8;
            font-size: 14.8px;
            padding: 0 6px;
        }

        /* ── Branch connector line ── */
        .flow-branch-line {
            display: flex;
            justify-content: center;
            width: 100%;
            position: relative;
            height: 16px;
        }
        .flow-branch-line::before {
            content: '';
            position: absolute;
            top: 0; left: 20%; right: 20%;
            height: 2px;
            background: linear-gradient(90deg, transparent, #cbd5e1 20%, #cbd5e1 80%, transparent);
        }
        .flow-label {
            font-size: 8.2px;
            font-weight: 700;
            margin: 0 4px;
            border-radius: 4px;
            padding: 2px 8px;
            letter-spacing: 0.3px;
        }
        .flow-label.yes  { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
        .flow-label.no   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
        .flow-label.info { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }
        .flow-label.warn { background: #fef9c3; color: #92400e; border: 1px solid #fde047; }
        /* legacy compat */
        .flow-label:not(.yes):not(.no):not(.info):not(.warn) {
            background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0;
        }
        .flow-branch {
            display: flex;
            align-items: flex-start;
            justify-content: center;
            gap: 30px;
            width: 100%;
        }
        .flow-branch-col {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 0;
        }

        /* ── GAS Sync Queue Badge ── */
        #gas-queue-badge {
            display: none;
            position: fixed;
            bottom: 72px; right: 24px;
            background: #1e293b;
            color: #fff;
            padding: 8px 14px;
            border-radius: 8px;
            font-size: 9px;
            font-weight: 600;
            box-shadow: 0 4px 12px rgba(0,0,0,0.3);
            z-index: 9998;
            align-items: center;
            gap: 8px;
            animation: slideIn 0.3s ease;
        }
        #gas-queue-badge.show { display: flex; }
        .sync-spinner {
            width: 14px; height: 14px;
            border: 2px solid rgba(255,255,255,0.3);
            border-top-color: #fff;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
            display: inline-block;
        }
        @keyframes spin { to { transform: rotate(360deg); } }

        /* ===== NOTIF PANEL ===== */
        .notif-panel {
            display: none;
            position: absolute;
            top: 52px;
            right: 20px;
            width: 320px;
            background: #fff;
            border-radius: 10px;
            box-shadow: 0 8px 30px rgba(0,0,0,0.15);
            z-index: 2000;
            border: 1px solid #e2e8f0;
        }
        .notif-panel.show { display: block; }
        .notif-header {
            padding: 12px 16px;
            border-bottom: 1px solid #f1f5f9;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .notif-header h6 { margin: 0; font-size: 10.7px; font-weight: 700; }
        .notif-item {
            padding: 10px 16px;
            border-bottom: 1px solid #f8fafc;
            font-size: 9.8px;
            cursor: pointer;
            transition: background 0.1s;
        }
        .notif-item:hover { background: #f8fafc; }
        .notif-item.unread { border-left: 3px solid #2563eb; }
        .notif-item p { margin: 0; color: #64748b; font-size: 9px; }

        /* ===== TOAST ===== */
        .toast-container-custom {
            position: fixed;
            bottom: 24px;
            right: 24px;
            z-index: 9999;
        }
        .toast-custom {
            background: #1e293b;
            color: #fff;
            padding: 12px 18px;
            border-radius: 8px;
            font-size: 10.7px;
            box-shadow: 0 4px 16px rgba(0,0,0,0.2);
            display: flex;
            align-items: center;
            gap: 10px;
            margin-top: 8px;
            animation: slideIn 0.3s ease;
        }
        .toast-custom.success { border-left: 4px solid #22c55e; }
        .toast-custom.error   { border-left: 4px solid #ef4444; }
        .toast-custom.info    { border-left: 4px solid #3b82f6; }
        @keyframes slideIn {
            from { transform: translateX(100px); opacity: 0; }
            to   { transform: translateX(0); opacity: 1; }
        }

        /* GAS Status Banner */
        .gas-banner {
            background: linear-gradient(135deg, #0f4c2a, #166534);
            color: #fff;
            padding: 8px 16px;
            border-radius: 8px;
            font-size: 9.8px;
            margin-bottom: 16px;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .gas-banner .status-dot {
            width: 8px; height: 8px;
            border-radius: 50%;
            background: #22c55e;
            display: inline-block;
            animation: pulse 1.5s infinite;
        }
        @keyframes pulse {
            0%,100% { opacity: 1; }
            50% { opacity: 0.4; }
        }
/* ===== ROLE SWITCHER MODAL ===== */
.modal-roleswitch-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 9998;
}
.modal-roleswitch-panel {
    position: fixed;
    top: 60px;
    right: 16px;
    width: 300px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 80px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
/* wrapper #role-switcher-modal di-inject oleh app-main.js */
/* JANGAN beri position/inset pada wrapper — biarkan panel posisi sendiri */
#role-switcher-modal {
    display: none;
}
#role-switcher-modal[style*="display: block"],
#role-switcher-modal[style*="display:block"] {
    display: block !important;
}
/* overlay */
#role-switcher-modal[style*="display: block"] .modal-roleswitch-overlay,
#role-switcher-modal[style*="display:block"] .modal-roleswitch-overlay {
    display: block !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 9998 !important;
    background: rgba(0,0,0,0.45) !important;
}
/* panel — posisi fixed langsung ke viewport */
#role-switcher-modal[style*="display: block"] .modal-roleswitch-panel,
#role-switcher-modal[style*="display:block"] .modal-roleswitch-panel {
    display: flex !important;
    position: fixed !important;
    top: 60px !important;
    right: 16px !important;
    left: auto !important;
    bottom: auto !important;
    z-index: 9999 !important;
}
.modal-roleswitch-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px 10px;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
    font-size: 13px;
}
.btn-close-rs {
    background: none;
    border: none;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    color: #64748b;
    padding: 0 4px;
}
.btn-close-rs:hover { color: #1e293b; }
.modal-roleswitch-body {
    padding: 10px 10px 12px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    flex: 1 1 auto;
    min-height: 0;   /* KUNCI: scroll di flex container */
}
.rs-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12.5px;
    transition: background 0.15s;
    margin-bottom: 4px;
    user-select: none;
    pointer-events: auto;
}
.rs-item:hover { background: #f1f5f9; }
.rs-item.aktif {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}
@media (max-width: 480px) {
    .modal-roleswitch-panel {
        right: 8px;
        left: 8px;
        width: auto;
        top: 56px;
    }
        }
