/* =====================================================
   PKBM Permata Unggul - Modern Glass UI Theme
   Light & Dark mode | Plus Jakarta Sans + Inter
   ===================================================== */

:root {
    --font-sans: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;

    /* Light theme - PKBM Fresh Purple */
    --bg-base: #f8f6fc;
    --bg-mesh-1: rgba(124, 58, 237, 0.14);
    --bg-mesh-2: rgba(196, 181, 212, 0.22);
    --bg-mesh-3: rgba(168, 85, 247, 0.08);
    --surface: rgba(255, 255, 255, 0.82);
    --surface-solid: #ffffff;
    --surface-elev: rgba(255, 255, 255, 0.94);
    --surface-soft: #fbf9fe;
    --border: rgba(221, 214, 254, 0.65);
    --border-strong: rgba(147, 51, 234, 0.25);
    --text: #1e1b4b;
    --text-muted: #5b5570;
    --text-subtle: #8a82a5;

    /* Sidebar (Ungu Sangat Muda gradasi ke Putih, Text Ungu Tua) */
    --sb-bg: linear-gradient(180deg, #ede9fe 0%, #f5f3ff 45%, #ffffff 100%);
    --sb-text: #581c87;
    --sb-text-muted: #7c3aed;
    --sb-text-active: #3b0764;
    --sb-hover: rgba(124, 58, 237, 0.08);
    --sb-active-bg: #ddd6fe;
    --sb-border: #e9d5ff;

    /* Accents - PKBM Official Logo Palette */
    --primary: #581c87;
    --primary-2: #7c3aed;
    --primary-light: #9333ea;
    --primary-lavender: #c4b5d4;
    --primary-soft: #f5f3ff;
    --primary-grad: linear-gradient(135deg, #581c87 0%, #7c3aed 100%);
    --success: #059669;
    --warning: #d97706;
    --danger: #dc2626;
    --info: #0284c7;

    --shadow-sm: 0 1px 3px rgba(88, 28, 135, 0.06);
    --shadow: 0 10px 30px -12px rgba(88, 28, 135, 0.14), 0 4px 10px -4px rgba(88, 28, 135, 0.06);
    --shadow-lg: 0 24px 48px -20px rgba(88, 28, 135, 0.22);
    --radius: 16px;
    --radius-sm: 10px;
    --radius-lg: 22px;
}

/* Mode Terang Permanen (Light Mode Only - Dark mode dinonaktifkan total) */
:root,
[data-theme="light"],
[data-theme="dark"],
[data-theme] {
    color-scheme: light !important;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
    font-family: var(--font-sans);
    background: var(--bg-base);
    color: var(--text);
    letter-spacing: -0.01em;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(60vw 55vh at 12% 8%, var(--bg-mesh-1), transparent 60%),
        radial-gradient(50vw 45vh at 92% 20%, var(--bg-mesh-2), transparent 60%),
        radial-gradient(45vw 40vh at 60% 100%, var(--bg-mesh-3), transparent 60%);
    filter: blur(10px);
}
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image:
        radial-gradient(rgba(15, 23, 42, 0.06) 1px, transparent 1px);
    background-size: 22px 22px;
    opacity: 0.35;
    pointer-events: none;
}


::selection { background: rgba(124, 58, 237, 0.25); color: var(--text); }

/* ---------- Layout Shell ---------- */
.app-shell {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}
@media (max-width: 992px) {
    .app-shell { grid-template-columns: 1fr; }
}

/* ---------- Sidebar ---------- */
.sidebar {
    position: sticky;
    top: 0;
    align-self: start;
    height: 100vh;
    background: var(--sb-bg);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border-right: 1px solid var(--sb-border);
    color: var(--sb-text);
    padding: 22px 14px;
    overflow-y: auto;
    z-index: 30;
}
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 10px 20px;
    border-bottom: 1px solid var(--sb-border);
    margin-bottom: 14px;
}
.sidebar-brand .brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--primary-grad);
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 800;
    font-size: 1.05rem;
    box-shadow: 0 8px 22px -8px rgba(124, 58, 237, 0.7);
}
.sidebar-brand h6 {
    color: #fff;
    margin: 0;
    font-weight: 800;
    font-size: 0.98rem;
    letter-spacing: -0.02em;
}
.sidebar-brand small {
    color: #94a3b8;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.sb-section-label {
    color: #64748b;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 14px 12px 6px;
    font-weight: 800;
    color: #7c3aed;
}
.sidebar a.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    margin: 4px 0;
    color: #4c1d95;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.92rem;
    position: relative;
    transition: all .2s ease;
}
.sidebar a.nav-item .ico {
    width: 34px; height: 34px;
    display: grid; place-items: center;
    border-radius: 10px;
    background: #ffffff;
    color: #6d28d9;
    font-size: 1rem;
    box-shadow: 0 2px 6px rgba(124, 58, 237, 0.12);
    transition: all .2s ease;
}
.sidebar a.nav-item:hover {
    background: rgba(124, 58, 237, 0.09);
    color: #3b0764;
    transform: translateX(2px);
}
.sidebar a.nav-item:hover .ico {
    background: #ede9fe;
    color: #581c87;
    transform: scale(1.06);
}
.sidebar a.nav-item.active {
    background: linear-gradient(135deg, #7c3aed 0%, #581c87 100%);
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.32);
}
.sidebar a.nav-item.active .ico {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff !important;
    box-shadow: none;
}
.sidebar a.nav-item.active span {
    color: #ffffff !important;
}
.sidebar a.nav-item.danger { color: #dc2626; }
.sidebar a.nav-item.danger .ico { color: #dc2626; background: #fee2e2; }
.sidebar a.nav-item.danger:hover { background: rgba(239, 68, 68, 0.10); color: #b91c1c; }

.sidebar-user {
    margin-top: auto;
    padding: 11px 14px;
    border-top: 1px solid var(--sb-border);
    display: flex; align-items: center; gap: 10px;
    color: #4c1d95;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.05);
}
.sidebar-user .avatar {
    width: 38px; height: 38px; border-radius: 50%;
    background: linear-gradient(135deg, #581c87, #7c3aed);
    display: grid; place-items: center;
    color: #fff; font-weight: 800;
}
.sidebar-user strong {
    color: #3b0764 !important;
}
.sidebar-user small {
    color: #7c3aed !important;
}

/* ---------- Topbar ---------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 26px;
    background: var(--surface);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    border-bottom: 1px solid var(--border);
}
.topbar h1 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.01em;
    color: var(--text);
}
.topbar .sub { color: var(--text-muted); font-size: 0.82rem; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }

/* Theme toggle - Hidden (Light Mode Only) */
.theme-toggle, .login-theme-toggle {
    display: none !important;
}

/* ---------- Main Content ---------- */
.main-content { padding: 24px 26px 60px; }
@media (max-width: 992px) { .main-content { padding: 18px; } }

.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}
.page-header h2 {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.02em;
    color: var(--text);
}
.page-header .lead { color: var(--text-muted); margin: 4px 0 0; font-size: 0.9rem; }

/* ---------- Cards (Glass) ---------- */
.card-glass {
    background: var(--surface);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
    position: relative;
    overflow: hidden;
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.card-glass:hover { box-shadow: var(--shadow-lg); }

/* Stat card */
.stat-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 20px;
    border-radius: var(--radius);
    background: var(--surface);
    backdrop-filter: blur(20px) saturate(150%);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    transition: transform .3s ease, box-shadow .3s ease;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.stat-card::before {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(135deg, var(--_c1, transparent), transparent 60%);
    opacity: 0.14;
    pointer-events: none;
}
.stat-card .label {
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
}
.stat-card .value {
    font-size: 2rem;
    font-weight: 800;
    margin-top: 4px;
    letter-spacing: -0.03em;
    color: var(--text);
    line-height: 1.1;
}
.stat-card .value small {
    font-size: 0.82rem;
    color: var(--text-subtle);
    font-weight: 500;
    letter-spacing: 0;
    margin-left: 6px;
}
.stat-card .stat-icon {
    width: 54px; height: 54px;
    border-radius: 14px;
    display: grid; place-items: center;
    font-size: 1.5rem;
    color: #fff;
    box-shadow: 0 10px 25px -10px currentColor;
}
.stat-card.st-success { --_c1: #10b981; }
.stat-card.st-success .stat-icon { background: linear-gradient(135deg, #10b981, #059669); }
.stat-card.st-success .value { color: #10b981; }
.stat-card.st-warning { --_c1: #f59e0b; }
.stat-card.st-warning .stat-icon { background: linear-gradient(135deg, #f59e0b, #d97706); }
.stat-card.st-warning .value { color: #f59e0b; }
.stat-card.st-danger { --_c1: #ef4444; }
.stat-card.st-danger .stat-icon { background: linear-gradient(135deg, #ef4444, #dc2626); }
.stat-card.st-danger .value { color: #ef4444; }
.stat-card.st-secondary { --_c1: #64748b; }
.stat-card.st-secondary .stat-icon { background: linear-gradient(135deg, #64748b, #475569); }
.stat-card.st-secondary .value { color: #64748b; }

/* ---------- Section Title (in forms) ---------- */
.section-title {
    background: var(--primary-grad) !important;
    color: #fff !important;
    padding: 14px 18px !important;
    border-radius: 14px !important;
    margin-top: 28px !important;
    margin-bottom: 14px !important;
    font-weight: 700;
    letter-spacing: -0.01em;
    box-shadow: 0 12px 30px -14px rgba(124, 58, 237, 0.55);
    display: flex; align-items: center; gap: 12px;
    font-size: 1rem;
}
.section-title::before {
    content: "";
    width: 6px; height: 22px;
    background: rgba(255,255,255,0.75);
    border-radius: 4px;
    flex-shrink: 0;
}
.sub-title {
    color: var(--primary) !important;
    font-weight: 700 !important;
    margin-top: 18px !important;
    border-left: 4px solid var(--primary) !important;
    padding: 4px 12px !important;
    border-radius: 4px;
    background: var(--surface-soft);
}

/* ---------- Forms ---------- */
.form-control, .form-select {
    background: var(--surface-elev) !important;
    border: 1px solid var(--border) !important;
    color: var(--text) !important;
    border-radius: 10px !important;
    padding: 10px 14px !important;
    font-size: 0.9rem !important;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.form-control::placeholder { color: var(--text-subtle); }
.form-control:focus, .form-select:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.14) !important;
    background: var(--surface-solid) !important;
    outline: none;
}
.form-control[readonly], .form-select[disabled] {
    background: var(--surface-soft) !important;
    color: var(--text-muted) !important;
}
.form-label { color: var(--text); font-weight: 600; font-size: 0.86rem; }


.form-check-input {
    background: var(--surface-elev);
    border-color: var(--border-strong);
}
.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}
.form-check-label { color: var(--text-muted); }

/* ---------- Buttons ---------- */
.btn { border-radius: 10px; font-weight: 600; letter-spacing: -0.005em; padding: 8px 16px; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary {
    background: var(--primary-grad) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 10px 25px -12px rgba(124, 58, 237, 0.6);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -14px rgba(124, 58, 237, 0.7); }
.btn-success {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 10px 25px -12px rgba(16, 185, 129, 0.6);
}
.btn-success:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -14px rgba(16, 185, 129, 0.7); }
.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    border: none !important;
    color: #fff !important;
}
.btn-danger:hover { transform: translateY(-2px); }
.btn-outline-secondary {
    background: var(--surface-elev) !important;
    border: 1px solid var(--border) !important;
    color: var(--text) !important;
}
.btn-outline-secondary:hover { border-color: var(--primary) !important; color: var(--primary) !important; }
.btn-outline-danger {
    background: transparent !important;
    border: 1px solid rgba(239,68,68,0.35) !important;
    color: #ef4444 !important;
}
.btn-outline-danger:hover { background: rgba(239,68,68,0.1) !important; }
.btn-outline-primary {
    background: transparent !important;
    border: 1px solid rgba(124, 58, 237,0.4) !important;
    color: var(--primary) !important;
}
.btn-outline-primary:hover { background: rgba(124, 58, 237,0.08) !important; }
.btn-sm { padding: 6px 12px; font-size: 0.82rem; }

/* ---------- Tables ---------- */
.table {
    color: var(--text);
    border-color: transparent;
    margin-bottom: 0;
}
.table > :not(caption) > * > * {
    background-color: transparent;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    padding: 12px 14px;
    vertical-align: middle;
}
.table thead th {
    background: var(--surface-soft) !important;
    color: var(--text-muted) !important;
    font-weight: 700 !important;
    font-size: 0.75rem !important;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--border-strong) !important;
}
.table-light thead, .table-light { --bs-table-bg: transparent !important; }
.table-bordered > :not(caption) > * > * { border: none; border-bottom: 1px solid var(--border); }
.table-hover > tbody > tr:hover > * {
    background-color: var(--surface-soft) !important;
    color: var(--text) !important;
}

/* ---------- Nav Tabs ---------- */
.nav-tabs {
    border-bottom: 1px solid var(--border);
    gap: 6px;
}
.nav-tabs .nav-link {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 10px 18px;
    border-radius: 10px 10px 0 0;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color .2s ease, background .2s ease;
}
.nav-tabs .nav-link:hover { color: var(--primary); background: var(--surface-soft); }
.nav-tabs .nav-link.active {
    background: transparent !important;
    color: var(--primary) !important;
    border-bottom: 3px solid var(--primary) !important;
    font-weight: 700 !important;
}

/* ---------- Alerts ---------- */
.alert {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 18px;
    background: var(--surface-elev);
    color: var(--text);
    backdrop-filter: blur(12px);
}
.alert-success { border-color: rgba(16,185,129,0.35); background: rgba(16,185,129,0.10); color: var(--text); }
.alert-warning { border-color: rgba(245,158,11,0.4); background: rgba(245,158,11,0.10); color: var(--text); }
.alert-info { border-color: rgba(6,182,212,0.4); background: rgba(6,182,212,0.10); color: var(--text); }
.alert-danger { border-color: rgba(239,68,68,0.4); background: rgba(239,68,68,0.10); color: var(--text); }

/* ---------- Badges ---------- */
.badge {
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
}
.badge-hijau { background: linear-gradient(135deg, #10b981, #059669); color: #fff !important; padding: 6px 14px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; }
.badge-kuning { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff !important; padding: 6px 14px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; }
.badge-merah  { background: linear-gradient(135deg, #ef4444, #dc2626); color: #fff !important; padding: 6px 14px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; }
.bg-primary { background: var(--primary-grad) !important; }
.bg-dark { background: linear-gradient(135deg, #1e293b, #0f172a) !important; }
.bg-secondary { background: linear-gradient(135deg, #64748b, #475569) !important; }
.bg-light { background: var(--surface-soft) !important; color: var(--text) !important; }

/* ---------- Accordion ---------- */
.accordion-item {
    background: transparent !important;
    border: none !important;
}
.accordion-button {
    background: var(--surface-elev) !important;
    color: var(--text) !important;
    border: 1px solid var(--border) !important;
    border-radius: 12px !important;
    font-weight: 600;
    box-shadow: none !important;
}
.accordion-button:not(.collapsed) {
    background: var(--surface-soft) !important;
    color: var(--primary) !important;
    border-color: var(--primary) !important;
}
.accordion-body { background: var(--surface-elev) !important; border-radius: 12px; margin-top: 8px; color: var(--text); }

/* ---------- Kualitatif Box (Dashboard) ---------- */
.kualitatif-box {
    background: var(--surface-soft) !important;
    border-left: 4px solid var(--primary) !important;
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 14px;
}
.kualitatif-box h6 { color: var(--text) !important; }
.kualitatif-box p { color: var(--text-muted) !important; }

.text-muted { color: var(--text-muted) !important; }
.text-secondary { color: var(--text-muted) !important; }
.text-dark { color: var(--text) !important; }
.text-primary { color: var(--primary) !important; }
.text-success { color: #10b981 !important; }
.text-warning { color: #f59e0b !important; }
.text-danger { color: #ef4444 !important; }

/* Report readable format */
.report-tree {
    font-family: var(--font-sans);
    font-size: 0.9em;
    color: var(--text);
}
.report-tree > div { color: var(--text); }

/* ---------- PPDB pendaftar item ---------- */
.pendaftaran-item {
    background: var(--surface-soft) !important;
    border: 1px solid var(--border) !important;
    border-left: 4px solid var(--primary) !important;
    border-radius: 14px !important;
    padding: 18px !important;
    transition: box-shadow .25s ease, transform .25s ease;
}
.pendaftaran-item:hover { box-shadow: var(--shadow); }

/* ---------- Login Page ---------- */
.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    background: var(--bg-base);
}
@media (min-width: 1600px) {
    .login-shell {
        grid-template-columns: 1.2fr 1fr;
    }
}
@media (max-width: 992px) {
    .login-shell {
        grid-template-columns: 1fr;
        min-height: auto;
    }
}
.login-hero {
    position: relative;
    padding: 60px 48px;
    color: #fff;
    background: linear-gradient(135deg, #1e0838 0%, #3b0764 35%, #581c87 70%, #7c3aed 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}
@media (max-width: 992px) {
    .login-hero {
        min-height: auto;
        padding: 40px 24px;
    }
}
.login-hero::before {
    content: "";
    position: absolute; inset: -40%;
    background:
        radial-gradient(circle at 20% 20%, rgba(192, 132, 252, 0.35), transparent 45%),
        radial-gradient(circle at 80% 80%, rgba(168, 85, 247, 0.3), transparent 45%),
        radial-gradient(circle at 50% 50%, rgba(124, 58, 237, 0.2), transparent 55%);
    pointer-events: none;
}
.login-hero::after {
    content: "";
    position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.08) 1px, transparent 1px);
    background-size: 24px 24px;
    opacity: 0.65;
}
.login-hero-container {
    width: 100%;
    max-width: 540px;
    margin: auto;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 32px;
}
.login-brand {
    display: flex; align-items: center; gap: 14px;
}
.login-brand .brand-logo,
.login-brand-logo {
    width: auto;
    height: auto;
    border-radius: 14px;
    background: #ffffff !important;
    padding: 6px 14px;
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.6);
}
.login-logo-img {
    height: 42px !important;
    max-height: 42px !important;
    width: auto !important;
    max-width: 60px !important;
    object-fit: contain !important;
    display: block !important;
    flex-shrink: 0 !important;
}
.login-hero h1 {
    font-size: 2.6rem; font-weight: 800; letter-spacing: -0.03em;
    line-height: 1.1; margin: 0 0 16px;
}
.login-hero h1 span {
    background: linear-gradient(135deg, #ede9fe 0%, #d8b4fe 50%, #f5d0fe 100%);
    -webkit-background-clip: text; background-clip: text;
    color: transparent;
}
.login-hero p { color: #f3e8ff; font-size: 1rem; max-width: 480px; line-height: 1.6; opacity: 0.95; margin-bottom: 0; }
.login-features { display: grid; gap: 12px; margin-top: 24px; max-width: 480px; }
.login-feature {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
.login-feature .fi {
    width: 38px; height: 38px; flex-shrink: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(237, 233, 254, 0.25), rgba(192, 132, 252, 0.35));
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: grid; place-items: center; color: #f5f3ff; font-size: 1.05rem;
}
.login-feature h6 { margin: 0; font-size: 0.92rem; font-weight: 700; color: #ffffff; }
.login-feature small { color: #e9d5ff; font-size: 0.78rem; opacity: 0.95; }

.login-panel {
    display: flex; align-items: center; justify-content: center;
    padding: 48px 32px;
    position: relative;
    background: radial-gradient(circle at 50% 35%, #ffffff 0%, #fbf8ff 50%, #f3e8ff 100%);
    overflow: hidden;
    min-height: 100vh;
}
@media (max-width: 992px) {
    .login-panel {
        min-height: auto;
        padding: 40px 20px 60px;
    }
}
.login-panel-container {
    width: 100%;
    max-width: 440px;
    margin: auto;
    position: relative;
    z-index: 2;
}
.login-card {
    width: 100%;
    background: var(--surface);
    backdrop-filter: blur(20px) saturate(150%);
    border: 1px solid #e9d5ff;
    border-radius: 24px;
    padding: 38px 36px;
    box-shadow: 0 20px 45px -10px rgba(124, 58, 237, 0.12), 0 4px 16px rgba(0, 0, 0, 0.04);
}
.login-card h3 { font-weight: 800; margin: 0 0 6px; letter-spacing: -0.02em; color: var(--text); }
.login-card p.lead { color: var(--text-muted); margin: 0 0 26px; font-size: 0.92rem; }
.login-card .input-icon {
    position: relative;
}
.login-card .input-icon .bi {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    color: var(--text-subtle); font-size: 1.05rem;
    pointer-events: none;
}
.login-card .input-icon .form-control { padding-left: 42px !important; }
.login-card .btn-login {
    width: 100%; padding: 12px 16px;
    font-weight: 700; font-size: 0.95rem;
    border-radius: 12px;
    margin-top: 8px;
}
.login-theme-toggle {
    position: absolute; top: 20px; right: 20px;
}

/* Utility */
.divider-h { height: 1px; background: var(--border); margin: 18px 0; }
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--surface-elev);
    border: 1px solid var(--border);
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
}
.chip .bi { font-size: 0.9rem; }
.chip.chip-primary { background: rgba(124, 58, 237,0.10); color: var(--primary); border-color: rgba(124, 58, 237,0.25); }

/* Fade-in entrance */
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.fade-up { animation: fadeUp .55s ease both; }
.fade-up.d1 { animation-delay: .05s; }
.fade-up.d2 { animation-delay: .12s; }
.fade-up.d3 { animation-delay: .19s; }
.fade-up.d4 { animation-delay: .26s; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* Print-safe */
@media print { .sidebar, .topbar, .theme-toggle { display: none !important; } }

/* Small helpers */
.text-uppercase-tight { letter-spacing: 0.05em; text-transform: uppercase; font-size: 0.72rem; }
.card-glass h5, .card-glass h6 { color: var(--text); }
.card p { color: var(--text-muted); }
.card { background: transparent; border: none; }
.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.rounded { border-radius: 12px !important; }

/* Mode terang tetap untuk bootstrap backgrounds */
.bg-white { background: #ffffff !important; color: var(--text) !important; }
.bg-light { background: var(--surface-soft) !important; }
.border { border-color: var(--border) !important; }

/* Modal-like border for report */
.divisi-block {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    background: var(--surface-soft);
    margin-bottom: 18px;
    transition: box-shadow .3s ease;
}
.divisi-block:hover { box-shadow: var(--shadow); }
/* Task, timeline, and readable report modules */
.empty-state{text-align:center;padding:42px 20px;color:var(--muted,#64748b)}
.empty-state i{display:block;font-size:2.4rem;margin-bottom:10px;color:#94a3b8}
.task-row{display:flex;gap:14px;align-items:center;padding:16px 0;border-bottom:1px solid var(--border);position:relative}
.task-row:last-child{border-bottom:0}.task-row.done{opacity:.68}.task-row.done .task-main>div>strong{text-decoration:line-through}
.task-check .form-check-input{width:1.45rem;height:1.45rem}.task-main{flex:1;min-width:0}
.assignee-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:10px}
.assignee-grid .form-check{display:flex;gap:10px;padding:12px;border:1px solid var(--border);border-radius:12px}
.assignee-grid small{display:block;color:#64748b;text-transform:capitalize}
.timeline-head,.timeline-row{display:grid;grid-template-columns:220px repeat(12,minmax(42px,1fr));align-items:center;min-width:900px}
.timeline-head{font-size:.72rem;font-weight:700;color:#64748b;text-align:center;border-bottom:1px solid var(--border);padding-bottom:8px}
.timeline-head>div:first-child{text-align:left}.timeline-row{position:relative;border-bottom:1px solid var(--border);min-height:65px}
.timeline-label{grid-column:1;padding:10px 12px 10px 0;min-width:0}.timeline-label strong,.timeline-label small{display:block}.timeline-label small{font-size:.72rem;color:#64748b}
.timeline-track{grid-column:2/14;display:grid;grid-template-columns:repeat(12,1fr);height:38px;background:repeating-linear-gradient(90deg,transparent 0,transparent calc(8.333% - 1px),var(--border) calc(8.333% - 1px),var(--border) 8.333%)}
.timeline-bar{grid-column:var(--start)/span var(--span);align-self:center;border-radius:10px;padding:6px 9px;color:#fff;font-size:.7rem;font-weight:700;white-space:nowrap;overflow:hidden;box-shadow:0 4px 12px rgba(15,23,42,.12)}
.status-rencana{background:#94a3b8}.status-berjalan{background:#3b82f6}.status-selesai,.status-hijau{background:#10b981}.status-tertunda,.status-merah{background:#ef4444}.status-kuning{background:#f59e0b}
.timeline-delete{position:absolute;right:-4px;top:0}.card-glass:has(.timeline-head){overflow-x:auto}
.view-switch{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;max-width:660px}
.view-option{display:flex;align-items:center;gap:13px;padding:15px 18px;border:1px solid var(--border);border-radius:15px;color:inherit;text-decoration:none;background:var(--card-bg,#fff)}
.view-option>i{font-size:1.6rem;color:#64748b}.view-option span,.view-option small{display:block}.view-option small{color:#64748b}
.view-option.active{border-color:#581c87;box-shadow:0 0 0 3px rgba(88, 28, 135,.1)}.view-option.active>i{color:#581c87}
.report-chat{max-width:920px;margin:auto}.chat-system{display:flex;gap:14px;background:linear-gradient(135deg,#eef2ff,#f8fafc);padding:18px;border-radius:18px;margin-bottom:16px;color:#1e293b}
.chat-system>i{font-size:1.6rem;color:#581c87}.chat-system p{margin:3px 0 0;color:#64748b}
.chat-report{background:var(--card-bg,#fff);border:1px solid var(--border);border-radius:18px;margin-bottom:12px;overflow:hidden}
.chat-report summary{display:flex;align-items:center;gap:12px;padding:15px 18px;cursor:pointer;list-style:none}.chat-report summary::-webkit-details-marker{display:none}
.chat-report summary small{display:block;color:#64748b}.avatar-mini{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:#581c87;color:white;font-weight:800}
.status-dot{font-size:.72rem;color:#fff;padding:5px 9px;border-radius:999px}.chat-body{background:rgba(148,163,184,.07);padding:18px 50px 20px}
.message-bubble{max-width:82%;background:var(--card-bg,#fff);border:1px solid var(--border);border-radius:4px 16px 16px 16px;padding:10px 13px;margin-bottom:9px;box-shadow:0 2px 6px rgba(15,23,42,.04)}
.message-bubble span{display:block;font-size:.7rem;font-weight:700;color:#581c87;text-transform:uppercase}.message-bubble p{margin:3px 0 0;white-space:normal}
.report-card-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:12px}.report-mini-card{display:flex;gap:12px;border:1px solid var(--border);border-radius:14px;padding:13px;overflow:hidden}
.report-mini-card small{display:block;color:#64748b}.status-strip{width:6px;border-radius:10px;flex:none}.metric{margin-top:9px;font-size:.8rem;color:#64748b}.metric b{font-size:1.15rem;color:inherit}
@media(max-width:767px){.view-switch{grid-template-columns:1fr}.task-row{align-items:flex-start}.chat-body{padding:14px}.message-bubble{max-width:100%}}

/* Structured staff reports v2.2 */
.staff-jump{display:flex;gap:8px;flex-wrap:wrap}.staff-jump a{display:flex;align-items:center;gap:7px;padding:8px 12px;border:1px solid var(--border);border-radius:999px;background:var(--card-bg,#fff);color:inherit;text-decoration:none;font-size:.82rem;font-weight:700}.staff-dot{width:9px;height:9px;border-radius:50%}
.staff-report,.staff-dashboard{background:var(--card-bg,#fff);border:1px solid var(--border);border-radius:20px;margin-bottom:24px;overflow:hidden;box-shadow:0 8px 28px rgba(15,23,42,.05);scroll-margin-top:20px}
.staff-report-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:22px 24px;border-bottom:1px solid var(--border);background:linear-gradient(135deg,rgba(88, 28, 135,.06),transparent)}
.staff-report-head h3{margin:2px 0 3px;font-size:1.3rem}.staff-report-head small{color:#64748b}.staff-role{font-size:.7rem;letter-spacing:.1em;text-transform:uppercase;font-weight:800;color:#581c87}
.performance-badge{padding:7px 12px;border-radius:999px;color:#fff;font-size:.76rem;font-weight:800}
.executive-notes{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:18px 24px 0}.executive-notes>div{display:flex;gap:11px;border-radius:14px;padding:14px}.executive-notes i{font-size:1.15rem}.executive-notes strong{display:block;font-size:.8rem}.executive-notes p{margin:3px 0 0;font-size:.85rem}.note-warning{background:#fff7ed;color:#9a3412}.note-action{background:#eef2ff;color:#3730a3}
.report-sections{padding:18px 24px 24px}.report-section{border:1px solid var(--border);border-radius:15px;margin-bottom:12px;overflow:hidden}.report-section:last-child{margin-bottom:0}.report-section-title{display:flex;justify-content:space-between;align-items:center;padding:12px 15px;background:rgba(148,163,184,.08);font-weight:800}.report-section-title span{display:flex;gap:8px;align-items:center}.report-section-title i{color:#581c87}.report-section-title small{color:#64748b;font-weight:600}
.metric-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:1px;background:var(--border)}.metric-list>div{background:var(--card-bg,#fff);padding:13px 15px}.metric-list span,.metric-list strong{display:block}.metric-list span{font-size:.74rem;color:#64748b}.metric-list strong{font-size:1rem;margin-top:3px}.report-table{margin:0}.report-table th{font-size:.69rem;text-transform:uppercase;letter-spacing:.04em;white-space:nowrap}.report-table td{font-size:.82rem;vertical-align:top;min-width:110px}
.staff-dashboard{padding-bottom:20px}.highlight-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:18px 24px}.highlight-card{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:122px;padding:15px;border:1px solid var(--border);border-radius:15px;background:linear-gradient(145deg,var(--card-bg,#fff),rgba(88, 28, 135,.035))}.highlight-copy{min-width:0}.highlight-copy small,.highlight-copy strong,.highlight-copy b{display:block}.highlight-copy small{color:#581c87;font-size:.66rem;font-weight:800;text-transform:uppercase;letter-spacing:.05em}.highlight-copy strong{font-size:.79rem;margin:5px 0;color:#475569}.highlight-copy b{font-size:1.12rem;overflow-wrap:anywhere}.mini-chart{width:68px;height:68px;flex:none}.highlight-empty{grid-column:1/-1;padding:14px;border:1px dashed var(--border);border-radius:12px;color:#64748b;font-size:.82rem}
@media(max-width:767px){.executive-notes,.highlight-grid{grid-template-columns:1fr}.staff-report-head,.report-sections,.highlight-grid{padding-left:15px;padding-right:15px}.staff-report-head{align-items:flex-start}.report-section-title small{display:none}}

/* Report layout hotfix v2.4: cache-safe spacing and compact charts */
.staff-jump{margin-top:4px!important;margin-bottom:26px!important}
.staff-jump a{margin:0 4px 6px 0!important;gap:9px!important}
.staff-jump a.active{color:#fff!important;background:#581c87!important;border-color:#581c87!important;box-shadow:0 5px 14px rgba(88, 28, 135,.22)}
.staff-report,.staff-dashboard{margin-top:10px!important;margin-bottom:36px!important}
.report-section{margin-top:0!important;margin-bottom:18px!important}
.report-section-title{gap:18px!important;padding:14px 18px!important}
.report-section-title span,.report-section-title small{display:inline-flex!important;align-items:center!important;gap:8px!important}
.metric-list{gap:1px!important}
.metric-list>div{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:22px!important;min-height:52px!important;padding:13px 18px!important}
.metric-list span{margin-right:14px!important;line-height:1.35!important}
.metric-list strong{margin-left:auto!important;text-align:right!important;white-space:nowrap!important}
.highlight-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:10px!important}
.highlight-card{min-height:94px!important;padding:12px 14px!important}
.mini-chart{width:54px!important;height:54px!important;min-width:54px!important;max-width:54px!important;max-height:54px!important;overflow:hidden!important}
.mini-chart canvas{display:block!important;width:54px!important;height:54px!important;max-width:54px!important;max-height:54px!important}
#overallChart{max-height:130px!important}
@media(max-width:1100px){.highlight-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:640px){.highlight-grid{grid-template-columns:1fr!important}.metric-list>div{align-items:flex-start!important}.report-section-title{align-items:flex-start!important}}

/* Automatic performance scoring v2.6 */
.score-summary{display:grid;grid-template-columns:repeat(3,minmax(120px,1fr));gap:10px;padding:16px 24px;background:rgba(148,163,184,.055);border-bottom:1px solid var(--border)}
.score-summary>div{padding:11px 13px;border:1px solid var(--border);border-radius:12px;background:var(--card-bg,#fff)}
.score-summary small,.score-summary strong{display:block}.score-summary small{color:#64748b;font-size:.7rem}.score-summary strong{font-size:1.1rem;margin-top:2px}.score-summary p{grid-column:1/-1;margin:0;color:#64748b;font-size:.74rem}
.score-final{border-color:#818cf8!important}.indicator-hijau{border-left:5px solid #10b981!important}.indicator-kuning{border-left:5px solid #f59e0b!important}.indicator-merah{border-left:5px solid #ef4444!important}
.indicator-hijau .highlight-copy small{color:#059669!important}.indicator-kuning .highlight-copy small{color:#d97706!important}.indicator-merah .highlight-copy small{color:#dc2626!important}
@media(max-width:640px){.score-summary{grid-template-columns:1fr;padding-left:15px;padding-right:15px}.score-summary p{grid-column:1}}

/* RTK approval and LPJ */
.rtk-create summary{cursor:pointer;font-weight:800;color:#581c87;list-style:none}.rtk-create summary i{margin-right:8px}.rtk-card{overflow:hidden}.rtk-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;padding-bottom:15px;border-bottom:1px solid var(--border)}.rtk-head h4{margin:5px 0 2px}.rtk-head small{color:#64748b}.rtk-period{font-size:.7rem;font-weight:800;letter-spacing:.08em;color:#581c87}.rtk-status{display:inline-flex;padding:6px 9px;border-radius:999px;font-size:.68rem;font-weight:800;margin-left:5px}.rtk-diajukan,.lpj-diajukan{background:#fef3c7;color:#92400e}.rtk-disetujui,.lpj-disetujui{background:#d1fae5;color:#065f46}.rtk-ditolak,.lpj-revisi{background:#fee2e2;color:#991b1b}.lpj-belum{background:#e2e8f0;color:#475569}.rtk-note{margin:14px 0;padding:12px 14px;background:rgba(148,163,184,.08);border-radius:12px}.rtk-action{margin-top:16px;padding:16px;border:1px solid var(--border);border-radius:14px;background:rgba(148,163,184,.055)}.receipt-list{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:15px}.receipt-list a{padding:7px 10px;border:1px solid var(--border);border-radius:10px;text-decoration:none;font-size:.76rem}.receipt-list i{margin-right:5px}@media(max-width:640px){.rtk-head{display:block}.rtk-head>div:last-child{margin-top:10px}.rtk-status{margin:0 5px 5px 0}}
.rtk-edit summary{cursor:pointer;font-weight:800;color:#581c87}.receipt-upload{display:grid;grid-template-columns:minmax(220px,1fr) minmax(240px,1fr) auto;align-items:center;gap:12px;border-color:#86efac;background:#f0fdf4}@media(max-width:760px){.receipt-upload{grid-template-columns:1fr}}
.rtk-view-switch{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:20px}.rtk-view-switch a{display:flex;align-items:center;gap:13px;padding:17px 19px;border:1px solid var(--border);border-radius:15px;background:var(--card-bg,#fff);color:inherit;text-decoration:none}.rtk-view-switch i{font-size:1.5rem;color:#64748b}.rtk-view-switch span,.rtk-view-switch small{display:block}.rtk-view-switch small{color:#64748b}.rtk-view-switch a.active{border-color:#581c87;box-shadow:0 0 0 3px rgba(88, 28, 135,.1)}.rtk-view-switch a.active i{color:#581c87}.lpj-deadline{padding:10px 12px;margin-bottom:14px;border-radius:10px;background:#eef2ff;color:#3730a3;font-size:.8rem;font-weight:700}.lpj-layout{display:grid;grid-template-columns:minmax(0,2fr) minmax(270px,1fr);gap:18px}.lpj-proof{padding:16px;border:1px solid var(--border);border-radius:14px;background:var(--card-bg,#fff);align-self:start;position:sticky;top:15px}.receipt-list.vertical{display:grid}.receipt-list.vertical a{overflow-wrap:anywhere}.lpj-totals{display:grid;gap:7px;margin-top:15px}.lpj-totals>div{display:flex;justify-content:space-between;gap:10px;padding:9px 10px;background:rgba(148,163,184,.08);border-radius:9px}.lpj-totals span{color:#64748b;font-size:.75rem}.lpj-totals .minus{background:#fee2e2;color:#991b1b}.lpj-totals .minus span{color:#991b1b}@media(max-width:850px){.lpj-layout{grid-template-columns:1fr}.lpj-proof{position:static}}@media(max-width:600px){.rtk-view-switch{grid-template-columns:1fr}}
.line-receipts{display:grid;gap:4px;margin-top:5px;max-width:190px}.line-receipts a{font-size:.66rem;text-decoration:none;overflow-wrap:anywhere}.lpj-workspace .report-table input[type=file]{min-width:175px;font-size:.68rem}.lpj-workspace .report-table th:last-child{min-width:190px}

/* Purchase requests */
.purchase-create summary{cursor:pointer;list-style:none;font-weight:800;color:#581c87}.purchase-create summary i{margin-right:8px}.purchase-grid{display:grid;gap:14px}.purchase-card{border-left:5px solid #94a3b8}.purchase-card.status-diajukan{border-left-color:#f59e0b}.purchase-card.status-ditinjau,.purchase-card.status-diproses{border-left-color:#3b82f6}.purchase-card.status-dibayar{border-left-color:#10b981}.purchase-card.status-ditolak{border-left-color:#ef4444}.purchase-card header{display:flex;justify-content:space-between;gap:15px}.purchase-card h4{margin:6px 0 2px}.purchase-card header small{color:#64748b}.purchase-priority,.purchase-status{display:inline-flex;padding:5px 8px;border-radius:999px;font-size:.68rem;font-weight:800;background:#e2e8f0;color:#475569}.priority-mendesak{background:#fee2e2;color:#991b1b}.purchase-metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-top:15px}.purchase-metrics>div{padding:11px;border:1px solid var(--border);border-radius:11px}.purchase-metrics small,.purchase-metrics strong{display:block}.purchase-metrics small{color:#64748b;font-size:.68rem}.purchase-description,.purchase-note{margin:12px 0 0;padding:11px;background:rgba(148,163,184,.07);border-radius:10px}.purchase-action{display:grid;grid-template-columns:170px 1fr auto;gap:9px;margin-top:13px}.purchase-dashboard-head{display:flex;justify-content:space-between;align-items:center;gap:15px}.purchase-dashboard-head h4{margin:4px 0}.purchase-dashboard-head p{margin:0;color:#64748b}.purchase-dashboard-list{display:grid;gap:1px;margin-top:14px;background:var(--border)}.purchase-dashboard-list a{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:11px 13px;background:var(--card-bg,#fff);color:inherit;text-decoration:none}.purchase-dashboard-list small{display:block;color:#64748b;font-size:.72rem}.purchase-dashboard-list b{white-space:nowrap}@media(max-width:700px){.purchase-metrics{grid-template-columns:1fr 1fr}.purchase-action{grid-template-columns:1fr}.purchase-dashboard-head{align-items:flex-start;flex-direction:column}}

/* =====================================================
   PKBM Mobile Usability v4 (Offcanvas Drawer & Bottom Nav)
   ===================================================== */
.sidebar-logo-img {
    height: 38px !important;
    max-height: 38px !important;
    width: auto !important;
    max-width: 50px !important;
    object-fit: contain !important;
    display: block !important;
    flex-shrink: 0 !important;
}

.sidebar-brand-card {
    background: #ffffff !important;
    border-radius: 12px;
    padding: 7px 11px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.35);
    min-width: 0;
    transition: transform 0.2s ease;
}
.sidebar-brand-card:hover {
    transform: translateY(-1px);
}
.sidebar-brand-card h6 {
    color: #581c87 !important;
    font-weight: 800;
    margin: 0;
    font-size: 0.9rem;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-brand-card small {
    color: #7c3aed !important;
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: block;
}

.sidebar-toggle-btn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--surface-elev);
    border: 1px solid var(--border);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}
.sidebar-toggle-btn:hover {
    background: var(--primary-soft);
    color: var(--primary);
    border-color: var(--primary-lavender);
}

/* Offcanvas Sidebar on Mobile (<= 992px) */
@media (max-width: 992px) {
    .app-shell {
        display: block !important;
        min-height: 100vh;
    }
    .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        width: 290px !important;
        max-width: 86vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        z-index: 1050 !important;
        transform: translateX(-100%) !important;
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
        box-shadow: none !important;
        border-right: 1px solid var(--sb-border) !important;
        display: flex !important;
        flex-direction: column !important;
        padding: 20px 14px !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    .sidebar.show {
        transform: translateX(0) !important;
        box-shadow: 0 0 50px rgba(12, 4, 24, 0.7) !important;
    }
    body.sidebar-open {
        overflow: hidden;
    }
    .topbar {
        position: sticky;
        top: 0;
        z-index: 30;
        padding: 12px 16px;
    }
    .topbar h1 {
        font-size: 1.05rem;
    }
    .main-content {
        padding: 18px 14px 90px !important;
    }
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 4, 20, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.sidebar-backdrop.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Floating Bottom Navigation Bar (Smartphones <= 992px) */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 6px;
    z-index: 1020;
    box-shadow: 0 -4px 20px rgba(88, 28, 135, 0.08);
}
.mobile-bottom-nav .mb-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex: 1;
    height: 100%;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 12px;
    margin: 4px 2px;
    transition: all 0.2s ease;
    border: none;
    background: transparent;
    padding: 0;
}
.mobile-bottom-nav .mb-nav-item i {
    font-size: 1.25rem;
    transition: transform 0.2s ease, color 0.2s ease;
}
.mobile-bottom-nav .mb-nav-item:active {
    transform: scale(0.92);
}
.mobile-bottom-nav .mb-nav-item.active {
    color: var(--primary);
}
.mobile-bottom-nav .mb-nav-item.active i {
    color: var(--primary);
    transform: translateY(-2px);
}

/* Smartphone Fine-tuning (<= 640px) */
@media (max-width: 640px) {
    body { font-size: 14px; }
    .page-header h2 { font-size: 1.25rem; }
    .page-header .lead { font-size: 0.82rem; }
    .btn, .form-control, .form-select { min-height: 44px; font-size: 16px !important; }
    .btn-sm, .form-control-sm, .form-select-sm { min-height: 38px; font-size: 14px !important; }
    .card-glass { padding: 14px !important; border-radius: 14px !important; }
    .table-responsive {
        width: 100%;
        max-width: 100%;
        -webkit-overflow-scrolling: touch;
        border-radius: 12px;
        box-shadow: inset -10px 0 10px -10px rgba(88, 28, 135, 0.15);
    }
    .table-responsive::after {
        content: "👉 Geser tabel ke samping untuk melihat data lengkap";
        display: block;
        position: sticky;
        left: 0;
        padding: 6px 10px;
        color: var(--primary);
        font-size: 0.72rem;
        font-weight: 600;
        background: var(--primary-soft);
        border-radius: 0 0 8px 8px;
    }
}

/* Telegram message center */
.telegram-mode{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.telegram-mode label{padding:10px;border:1px solid var(--border);border-radius:10px;font-size:.78rem;cursor:pointer}.telegram-list{display:grid;gap:10px}.telegram-list article{display:flex;justify-content:space-between;gap:14px;padding:13px;border:1px solid var(--border);border-radius:12px}.telegram-list strong,.telegram-list small{display:block}.telegram-list small{color:#64748b}.telegram-list p{margin:6px 0 0;white-space:pre-wrap;overflow-wrap:anywhere}.telegram-compose select[multiple]{min-height:210px}.telegram-response{margin-top:7px;padding:7px 9px;border-radius:8px;background:rgba(148,163,184,.09);overflow-wrap:anywhere}
@media(max-width:600px){.telegram-mode{grid-template-columns:1fr}.telegram-list article{display:block}.telegram-list article form{margin-top:10px}.telegram-compose select[multiple]{min-height:170px}}
