    /* =========================================================
       STYLE.CSS — GABUNGAN SEMUA TAHAP + REFRESH TAMPILAN (UX PASS)
       Tujuan refresh: mengurangi kesan "ramai" — spacing lebih lega,
       shadow lebih halus, hierarki warna/teks lebih jelas, tetap
       kompatibel dengan semua class & inline style lama.
       ========================================================= */

    /* ---------- VARIABLE & RESET ---------- */
    :root {
        --color-primary: #0056b3;
        --color-primary-dark: #00417f;
        --color-primary-soft: #eaf2fd;
        --color-bg: #f4f6f9;
        --color-white: #ffffff;
        --color-text: #2b2f36;
        --color-text-muted: #6b7280;
        --color-border: #e6e9ee;
        --color-error: #dc3545;
        --color-success: #16a34a;
        --sidebar-width: 240px;
        --radius: 10px;
        --radius-sm: 6px;
        --shadow-sm: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.06);
        --shadow-md: 0 4px 14px rgba(16,24,40,.08);
    }
    * { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', -apple-system, sans-serif; }
    body { background-color: var(--color-bg); color: var(--color-text); font-size: 14px; line-height: 1.5; }
    .hidden { display: none !important; }
    h1, h2, h3, h4 { font-weight: 600; line-height: 1.3; }

    /* ---------- AUTH (LOGIN/REGISTER) ---------- */
    .auth-wrapper { display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: 20px; background: linear-gradient(180deg, var(--color-bg) 0%, #eef1f6 100%); }
    .card-modern { background: var(--color-white); padding: 32px; border-radius: var(--radius); box-shadow: var(--shadow-md); width: 100%; max-width: 400px; }
    .card-modern h2 { text-align: center; color: var(--color-primary); margin-bottom: 22px; font-size: 20px; }

    /* ---------- FORM ELEMENTS ---------- */
    .form-group { margin-bottom: 18px; }
    .form-group label { display: block; font-size: 13px; margin-bottom: 6px; font-weight: 600; color: var(--color-text-muted); }
    .form-group input, .form-group select, .form-group textarea {
        width: 100%; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-sm);
        font-size: 14px; color: var(--color-text); background: var(--color-white); transition: border-color .15s, box-shadow .15s;
    }
    .form-group input:focus, .form-group select:focus, .form-group textarea:focus {
        outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(0,86,179,.12);
    }
    .form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }

    /* ---------- BUTTONS ---------- */
    .btn-primary {
        width: 100%; background: var(--color-primary); color: var(--color-white); border: none;
        padding: 11px; border-radius: var(--radius-sm); cursor: pointer; font-weight: 600; font-size: 14px;
        transition: background .15s;
    }
    .btn-primary:hover { background: var(--color-primary-dark); }
    .btn-outline {
        border: 1px solid var(--color-border); color: var(--color-primary); background: var(--color-white);
        padding: 8px 14px; border-radius: var(--radius-sm); cursor: pointer; display: flex; align-items: center;
        gap: 6px; font-weight: 500; font-size: 13px; transition: .15s;
    }
    .btn-outline:hover { background: var(--color-primary); color: white; border-color: var(--color-primary); }
    .btn-logout {
        background: transparent; color: var(--color-error); border: 1px solid #f3c6cb;
        padding: 6px 12px; border-radius: var(--radius-sm); cursor: pointer; font-weight: 500; transition: .15s;
    }
    .btn-logout:hover { background: var(--color-error); color: white; border-color: var(--color-error); }

    /* ---------- LOADER & TOAST ---------- */
    .loader-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255,255,255,0.85); z-index: 9999; display: flex; justify-content: center; align-items: center; }
    .spinner { border: 4px solid var(--color-border); border-top: 4px solid var(--color-primary); border-radius: 50%; width: 36px; height: 36px; animation: spin 1s linear infinite; }
    @keyframes spin { 100% { transform: rotate(360deg); } }
    .toast { position: fixed; bottom: 20px; right: 20px; color: var(--color-white); padding: 12px 22px; border-radius: var(--radius-sm); z-index: 10000; opacity: 0; transition: opacity 0.3s; box-shadow: var(--shadow-md); }
    .toast.show { opacity: 1; }
    .toast.error { background: var(--color-error); }
    .toast.success { background: var(--color-success); }

    /* ---------- LAYOUT DASHBOARD ---------- */
    .dashboard-layout { display: flex; height: 100vh; overflow: hidden; }
    .sidebar { width: var(--sidebar-width); background: var(--color-white); border-right: 1px solid var(--color-border); display: flex; flex-direction: column; transition: 0.25s ease; z-index: 1000; }
    .sidebar-header { padding: 20px 18px; font-weight: 700; font-size: 15px; color: var(--color-primary); border-bottom: 1px solid var(--color-border); letter-spacing: .2px; }
    .sidebar-menu { list-style: none; padding: 12px 10px; flex: 1; overflow-y: auto; }
    .sidebar-menu li { margin-bottom: 2px; }
    .sidebar-menu li a {
        display: flex; align-items: center; gap: 12px; padding: 10px 12px; color: var(--color-text-muted);
        text-decoration: none; border-radius: var(--radius-sm); font-size: 13.5px; font-weight: 500;
        border-left: 3px solid transparent; transition: .15s;
    }
    .sidebar-menu li a:hover { background: var(--color-bg); color: var(--color-text); }
    .sidebar-menu li a.active { background: var(--color-primary-soft); color: var(--color-primary); border-left-color: var(--color-primary); font-weight: 600; }
    .sidebar-menu li a i { font-size: 20px; }

    .main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
    .topbar { background: var(--color-white); padding: 14px 24px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--color-border); }
    .topbar h3 { font-size: 16px; font-weight: 600; }
    .hamburger { display: none; background: none; border: none; cursor: pointer; font-size: 24px; color: var(--color-text); }
    .sidebar-close { display: none; background: none; border: none; cursor: pointer; padding: 4px; color: var(--color-text-muted, #6b7280); }
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.4);
        z-index: 999;
    }
    .sidebar-overlay.open { display: block; }

    .user-info { display: flex; align-items: center; gap: 15px; }
    .user-info div { text-align: right; line-height: 1.2; }
    .user-info .nama { font-weight: 600; font-size: 13.5px; }
    .user-info .role { font-size: 11.5px; color: var(--color-text-muted); }

    .content-area { padding: 24px; overflow-y: auto; flex: 1; }
    .content-area > * + * { margin-top: 0; }

    /* ---------- DASHBOARD WIDGETS ---------- */
    .welcome-banner {
        background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
        color: white; padding: 18px 22px; border-radius: var(--radius); margin-bottom: 18px;
        display: flex; justify-content: space-between; align-items: center; box-shadow: var(--shadow-sm);
    }
    .welcome-banner h2 { font-size: 18px; }
    .welcome-banner p { font-size: 13px; opacity: .9; }

    .stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 18px; }
    .stat-card { background: var(--color-white); padding: 16px; border-radius: var(--radius); box-shadow: var(--shadow-sm); display: flex; align-items: center; border: 1px solid var(--color-border); }
    .stat-icon { background: var(--color-primary-soft); color: var(--color-primary); width: 42px; height: 42px; border-radius: 50%; display: flex; justify-content: center; align-items: center; margin-right: 12px; font-size: 20px; flex-shrink: 0; }
    .stat-info h4 { font-size: 11px; color: var(--color-text-muted); margin-bottom: 4px; font-weight: 600; letter-spacing: .3px; }
    .stat-info span { font-size: 21px; font-weight: 700; color: var(--color-text); }

    .quick-menu { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }

    .chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
    .chart-card { background: var(--color-white); padding: 16px; border-radius: var(--radius); box-shadow: var(--shadow-sm); text-align: center; border: 1px solid var(--color-border); }
    .chart-card h3 { margin-bottom: 10px; font-size: 13.5px; font-weight: 600; color: var(--color-text); text-align: left; }
    .chart-canvas-wrap { position: relative; width: 100%; height: 220px; }
    .chart-canvas-wrap canvas { max-width: 100%; max-height: 100%; }
    .empty-data { padding: 40px 0; color: #999; font-style: italic; font-size: 13px; }

    /* ---------- TIMELINE AKTIVITAS (dibatasi tinggi + scroll) ---------- */
    .timeline-scroll { max-height: 380px; overflow-y: auto; padding-right: 6px; }
    .timeline-scroll::-webkit-scrollbar { width: 6px; }
    .timeline-scroll::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }

    /* ---------- CARD-MODERN saat dipakai di dalam dashboard (bukan auth) ---------- */
    .content-area .card-modern { max-width: 100%; box-shadow: var(--shadow-sm); border: 1px solid var(--color-border); padding: 18px 20px; }
    .content-area .card-modern h2 { text-align: left; }
    .content-area .card-modern h3 { font-size: 15px; }

    /* ---------- TABS (PENGATURAN) ---------- */
    .tabs-nav { display: flex; border-bottom: 1px solid var(--color-border); overflow-x: auto; background: #fafbfc; border-radius: var(--radius) var(--radius) 0 0; }
    .tab-btn { background: none; border: none; padding: 14px 20px; cursor: pointer; font-weight: 600; color: var(--color-text-muted); white-space: nowrap; transition: 0.2s; display: flex; align-items: center; gap: 8px; border-bottom: 3px solid transparent; font-size: 13.5px; }
    .tab-btn:hover { color: var(--color-primary); background: #f0f2f5; }
    .tab-btn.active { color: var(--color-primary); border-bottom-color: var(--color-primary); background: var(--color-white); }

    /* ---------- MODAL ---------- */
    .modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(16,24,40,.45); z-index: 10001; display: flex; justify-content: center; align-items: center; }
    .modal-box { background: var(--color-white); padding: 26px; border-radius: var(--radius); max-width: 400px; width: 100%; margin: 20px; box-shadow: var(--shadow-md); }

    /* ---------- TABEL MODERN & BADGE ---------- */
    .table-responsive { width: 100%; overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-white); }
    .table-modern { width: 100%; border-collapse: collapse; min-width: 900px; }
    .table-modern th, .table-modern td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--color-border); font-size: 13.5px; }
    .table-modern th { background-color: #fafbfc; font-weight: 600; color: var(--color-text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .3px; position: sticky; top: 0; z-index: 10; box-shadow: 0 1px 0 var(--color-border); }
    .table-modern tbody tr:hover { background-color: var(--color-primary-soft); }
    .action-btn { background: none; border: none; cursor: pointer; color: var(--color-text-muted); margin: 0 2px; padding: 8px; border-radius: var(--radius-sm); transition: 0.15s; min-width: 36px; min-height: 36px; display: inline-flex; align-items: center; justify-content: center; }
    .action-btn:hover { background: var(--color-primary-soft); color: var(--color-primary); }

    /* ---------- PAGINATION (TOMBOL SEBELUMNYA / SELANJUTNYA) ---------- */
    .pagination-wrap { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; font-size: 13.5px; flex-wrap: wrap; gap: 12px; color: var(--color-text-muted); }
    .pagination-buttons { display: flex; gap: 8px; }
    .btn-pagination {
        border: 1px solid var(--color-border);
        color: var(--color-primary);
        background: var(--color-white);
        padding: 10px 18px;
        min-height: 42px;
        min-width: 110px;
        border-radius: var(--radius-sm);
        cursor: pointer;
        font-weight: 600;
        font-size: 13.5px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        transition: 0.15s;
    }
    .btn-pagination:hover:not(:disabled) { background: var(--color-primary); color: white; border-color: var(--color-primary); }
    .btn-pagination:disabled { opacity: 0.4; cursor: not-allowed; }
    @media (max-width: 480px) {
        .pagination-wrap { justify-content: center; }
        .btn-pagination { flex: 1; min-width: 0; }
    }

    /* Kolom tabel yang butuh ruang lebih (mis. Nama) tidak ikut menyempit & boleh wrap */
    .col-wide { min-width: 220px; white-space: normal; }
    .col-md { min-width: 140px; white-space: normal; }
    .table-modern td.col-wide, .table-modern td.col-md { line-height: 1.4; }

    .badge { padding: 3px 10px; border-radius: 20px; font-size: 11.5px; font-weight: 600; display: inline-block; }
    .badge-aktif { background: #dcfce7; color: #15803d; }
    .badge-nonaktif { background: #fee2e2; color: #b91c1c; }
    .badge-role { background: #eef0f3; color: #4b5563; }

    /* ---------- RESPONSIVE ---------- */
    @media (max-width: 768px) {
        .sidebar { position: fixed; left: -250px; height: 100vh; z-index: 1000; }
        .sidebar.open { left: 0; box-shadow: 4px 0 10px rgba(0,0,0,0.1); }
        .hamburger { display: block; }
        .sidebar-close { display: block; }
        .welcome-banner { flex-direction: column; align-items: flex-start; gap: 10px; }
        .content-area { padding: 16px; padding-bottom: 90px; }
        .topbar { padding: 12px 16px; }
        .bottom-nav { display: flex; }
    }

    /* ---------- BOTTOM NAV (mobile app style) ---------- */
    .bottom-nav {
        display: none;
        position: fixed;
        left: 0; right: 0; bottom: 0;
        background: var(--color-white);
        border-top: 1px solid var(--color-border);
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
        z-index: 900;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
    }
    .bottom-nav a {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        padding: 6px 2px;
        color: var(--color-text-muted, #6b7280);
        text-decoration: none;
        border-radius: 10px;
    }
    .bottom-nav a .material-icons { font-size: 22px; }
    .bottom-nav a span { font-size: 10px; font-weight: 600; text-align: center; line-height: 1.15; }
    .bottom-nav a.active,
    .bottom-nav a.bottom-nav-more.active { color: var(--color-primary); }
    .bottom-nav a.active span { color: var(--color-primary); }

    /* ---------- DETAIL PAGE: SECTION CARD ---------- */
    .section-card { background: var(--color-white); border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 20px 22px; margin-bottom: 16px; }
    .section-card + .section-card { margin-top: 0; }
    .section-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--color-primary); margin-bottom: 4px; }
    .section-title .material-icons { font-size: 19px; }
    .section-hint { font-size: 12.5px; color: var(--color-text-muted); margin-bottom: 14px; }

    /* ---------- INFO GRID (definisi label/value yang rapi) ---------- */
    .info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 6px; }
    .info-item .info-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .3px; color: var(--color-text-muted); margin-bottom: 3px; }
    .info-item .info-value { font-size: 14px; color: var(--color-text); }

    /* ---------- STATUS PILL (kontekstual, bukan cuma aktif/nonaktif) ---------- */
    .pill { padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 700; display: inline-block; white-space: nowrap; }
    .pill-blue { background: #dbeafe; color: #1d4ed8; }
    .pill-orange { background: #ffedd5; color: #c2410c; }
    .pill-green { background: #dcfce7; color: #15803d; }
    .pill-gray { background: #eef0f3; color: #4b5563; }
    .pill-red { background: #fee2e2; color: #b91c1c; }

    /* ---------- ACTION BAR (form pendek: dropdown + tombol sejajar) ---------- */
    .action-bar { display: flex; gap: 22px; flex-wrap: wrap; }
    .action-bar .action-item { display: flex; flex-direction: column; gap: 6px; }
    .action-bar .action-item label { font-size: 11.5px; font-weight: 600; color: var(--color-text-muted); }
    .action-bar .action-row { display: flex; gap: 8px; }
    .action-bar select { padding: 9px 10px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); font-size: 13.5px; min-width: 150px; }

    .btn-danger-outline { border: 1px solid #f3c6cb; color: var(--color-error); background: var(--color-white); padding: 8px 14px; border-radius: var(--radius-sm); cursor: pointer; font-weight: 600; font-size: 13px; transition: .15s; }
    .btn-danger-outline:hover { background: var(--color-error); color: white; border-color: var(--color-error); }

    /* ---------- SESI KONSELING CARD ---------- */
    .session-card { border: 1px solid var(--color-border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; background: #fbfcfd; }
    .session-card .session-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
    .session-card .session-meta { font-size: 12.5px; color: var(--color-text-muted); margin-top: 4px; }
    .session-result dl { display: grid; grid-template-columns: 120px 1fr; gap: 4px 10px; font-size: 13px; margin-top: 4px; }
    .session-result dt { font-weight: 600; color: var(--color-text-muted); }
    .session-result dd { color: var(--color-text); }

    /* ---------- <details> dipakai untuk sembunyikan form panjang biar ringkas ---------- */
    details.collapse-form { margin-top: 10px; }
    details.collapse-form > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--color-primary); list-style: none; display: inline-flex; align-items: center; gap: 4px; padding: 6px 0; }
    details.collapse-form > summary::-webkit-details-marker { display: none; }
    details.collapse-form > summary::before { content: '▸'; font-size: 11px; transition: transform .15s; }
    details.collapse-form[open] > summary::before { transform: rotate(90deg); }
    details.collapse-form .collapse-body { padding-top: 10px; }

    /* ---------- TIMELINE (dipakai juga di halaman admin: case_detail, ssr_detail, report_status) ---------- */
    .ssr-timeline { list-style: none; margin: 0; padding: 0; }
    .ssr-timeline li { position: relative; padding: 0 0 20px 26px; border-left: 2px solid var(--color-border); }
    .ssr-timeline li:last-child { border-left: 2px solid transparent; padding-bottom: 0; }
    .ssr-timeline li::before { content: ''; position: absolute; left: -6px; top: 2px; width: 11px; height: 11px; border-radius: 50%; background: var(--color-primary); border: 2px solid var(--color-white); box-shadow: 0 0 0 1px var(--color-primary); }
    .ssr-timeline .ssr-timeline-status { font-weight: 600; color: var(--color-text); font-size: 13.5px; }
    .ssr-timeline .ssr-timeline-date { font-size: 11.5px; color: var(--color-text-muted); margin: 1px 0 3px; }

/* ---------- Searchable Select (combobox) ---------- */
.searchable-select-wrap { position: relative; }
.searchable-select-input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 14px;
    background: var(--color-white) url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") no-repeat right 12px center;
    background-size: 16px;
}
.searchable-select-input:disabled { background-color: #f1f3f5; cursor: not-allowed; }
.searchable-select-hidden { display: none !important; }
.searchable-select-list {
    display: none;
    position: absolute;
    z-index: 50;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 260px;
    overflow-y: auto;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}
.searchable-select-list.open { display: block; }
.searchable-select-item { padding: 10px 14px; font-size: 13.5px; cursor: pointer; }
.searchable-select-item:hover, .searchable-select-item.active { background: var(--color-primary-soft, #eaf2fd); }
.searchable-select-empty { padding: 10px 14px; font-size: 13px; color: var(--color-text-muted, #6b7280); }
