/* ==========================================================================
   CBT Sekolah — Design System
   Dibangun di atas Bootstrap 5.3 (mendukung mode terang & gelap).
   ========================================================================== */

/* ---------- Font (self-host, tanpa CDN) ---------- */
@font-face {
    font-family: 'Plus Jakarta Sans';
    font-style: normal;
    font-display: swap;
    font-weight: 200 800;
    src: url('../vendor/fonts/plus-jakarta-sans/plus-jakarta-sans-latin-ext-wght-normal.woff2') format('woff2-variations');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Plus Jakarta Sans';
    font-style: normal;
    font-display: swap;
    font-weight: 200 800;
    src: url('../vendor/fonts/plus-jakarta-sans/plus-jakarta-sans-latin-wght-normal.woff2') format('woff2-variations');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Token warna ---------- */
:root,
[data-bs-theme="light"] {
    --cbt-primary: #4f46e5;
    --cbt-primary-rgb: 79, 70, 229;
    --cbt-primary-hover: #4338ca;
    --cbt-primary-soft: #eef2ff;
    --cbt-accent: #0ea5a4;

    --cbt-bg: #f4f6fb;
    --cbt-surface: #ffffff;
    --cbt-surface-2: #f8fafc;
    --cbt-border: #e6e9f0;
    --cbt-text: #0f172a;
    --cbt-text-2: #475569;
    --cbt-muted: #64748b;

    --cbt-sidebar-bg: #0f172a;
    --cbt-sidebar-text: #cbd5e1;
    --cbt-sidebar-muted: #64748b;
    --cbt-sidebar-hover: rgba(255, 255, 255, .06);
    --cbt-sidebar-active: rgba(99, 102, 241, .18);
    --cbt-sidebar-active-text: #ffffff;

    --cbt-shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
    --cbt-shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 6px 16px -4px rgba(15, 23, 42, .08);
    --cbt-radius: 14px;
    --cbt-radius-sm: 10px;

    --cbt-sidebar-w: 264px;
    --cbt-sidebar-mini: 76px;
    --cbt-topbar-h: 64px;

    --bs-primary: var(--cbt-primary);
    --bs-primary-rgb: var(--cbt-primary-rgb);
    --bs-link-color: var(--cbt-primary);
    --bs-link-color-rgb: var(--cbt-primary-rgb);
    --bs-link-hover-color: var(--cbt-primary-hover);
    --bs-body-bg: var(--cbt-bg);
    --bs-body-color: var(--cbt-text);
    --bs-border-color: var(--cbt-border);
    --bs-secondary-color: var(--cbt-muted);
    --bs-body-font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --bs-body-font-size: .9375rem;
    --bs-border-radius: 10px;
    --bs-border-radius-lg: 14px;
    --bs-focus-ring-color: rgba(var(--cbt-primary-rgb), .25);
}

[data-bs-theme="dark"] {
    --cbt-primary: #818cf8;
    --cbt-primary-rgb: 129, 140, 248;
    --cbt-primary-hover: #a5b4fc;
    --cbt-primary-soft: rgba(129, 140, 248, .14);

    --cbt-bg: #0b1120;
    --cbt-surface: #111827;
    --cbt-surface-2: #0f172a;
    --cbt-border: #1f2937;
    --cbt-text: #e2e8f0;
    --cbt-text-2: #cbd5e1;
    --cbt-muted: #94a3b8;

    --cbt-sidebar-bg: #0a0f1c;
    --cbt-shadow: 0 1px 3px rgba(0, 0, 0, .3), 0 8px 24px -8px rgba(0, 0, 0, .4);

    --bs-body-bg: var(--cbt-bg);
    --bs-body-color: var(--cbt-text);
    --bs-border-color: var(--cbt-border);
    --bs-secondary-color: var(--cbt-muted);
    --bs-tertiary-bg: #1e293b;
}

/* ---------- Dasar ---------- */
html { -webkit-text-size-adjust: 100%; }
body {
    background: var(--cbt-bg);
    color: var(--cbt-text);
    font-feature-settings: "cv11", "ss01";
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-weight: 700; letter-spacing: -.01em; color: var(--cbt-text); }
.text-muted, .text-secondary { color: var(--cbt-muted) !important; }
a { text-decoration: none; }
::selection { background: rgba(var(--cbt-primary-rgb), .2); }

/* ---------- Tombol ---------- */
.btn { font-weight: 600; border-radius: var(--cbt-radius-sm); padding: .55rem 1rem; transition: all .15s ease; }
.btn-sm { padding: .35rem .7rem; border-radius: 8px; }
.btn-lg { padding: .8rem 1.25rem; }
.btn-primary {
    --bs-btn-bg: var(--cbt-primary);
    --bs-btn-border-color: var(--cbt-primary);
    --bs-btn-hover-bg: var(--cbt-primary-hover);
    --bs-btn-hover-border-color: var(--cbt-primary-hover);
    --bs-btn-active-bg: var(--cbt-primary-hover);
    --bs-btn-active-border-color: var(--cbt-primary-hover);
    --bs-btn-disabled-bg: var(--cbt-primary);
    --bs-btn-disabled-border-color: var(--cbt-primary);
    box-shadow: 0 4px 12px -4px rgba(var(--cbt-primary-rgb), .55);
}
[data-bs-theme="dark"] .btn-primary { --bs-btn-color: #0b1120; --bs-btn-hover-color: #0b1120; --bs-btn-active-color: #0b1120; }
.btn-soft-primary { background: var(--cbt-primary-soft); color: var(--cbt-primary); border: 0; }
.btn-soft-primary:hover { background: var(--cbt-primary); color: #fff; }
.btn-light { background: var(--cbt-surface-2); border-color: var(--cbt-border); color: var(--cbt-text-2); }
.btn-icon { width: 40px; height: 40px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; }

/* ---------- Form ---------- */
.form-control, .form-select {
    border-radius: var(--cbt-radius-sm);
    border-color: var(--cbt-border);
    padding: .6rem .85rem;
    background-color: var(--cbt-surface);
}
.form-control:focus, .form-select:focus { border-color: var(--cbt-primary); box-shadow: 0 0 0 4px rgba(var(--cbt-primary-rgb), .15); }
.form-label { font-weight: 600; font-size: .875rem; color: var(--cbt-text-2); margin-bottom: .4rem; }
.input-icon { position: relative; }
.input-icon > .bi { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--cbt-muted); pointer-events: none; font-size: 1.05rem; }
.input-icon > .form-control { padding-left: 2.6rem; }
.input-icon > .input-action {
    position: absolute; right: .35rem; top: 50%; transform: translateY(-50%);
    border: 0; background: transparent; color: var(--cbt-muted); width: 36px; height: 36px; border-radius: 8px;
}
.input-icon > .input-action:hover { background: var(--cbt-surface-2); color: var(--cbt-text); }
.form-check-input:checked { background-color: var(--cbt-primary); border-color: var(--cbt-primary); }

/* ---------- Card ---------- */
.card {
    --bs-card-bg: var(--cbt-surface);
    --bs-card-border-color: var(--cbt-border);
    --bs-card-border-radius: var(--cbt-radius);
    --bs-card-inner-border-radius: calc(var(--cbt-radius) - 1px);
    --bs-card-cap-bg: transparent;
    box-shadow: var(--cbt-shadow-sm);
}
.card-header { padding: 1rem 1.25rem; border-bottom-color: var(--cbt-border); display: flex; align-items: center; gap: .75rem; }
.card-header .card-title { margin: 0; font-size: 1rem; font-weight: 700; }
.card-body { padding: 1.25rem; }

/* ---------- Badge ---------- */
.badge { font-weight: 600; padding: .4em .65em; border-radius: 6px; }
.badge-soft { background: var(--cbt-primary-soft); color: var(--cbt-primary); }
.badge-soft-success { background: rgba(16, 185, 129, .12); color: #059669; }
.badge-soft-warning { background: rgba(245, 158, 11, .14); color: #b45309; }
.badge-soft-danger { background: rgba(244, 63, 94, .12); color: #e11d48; }
.badge-soft-secondary { background: rgba(100, 116, 139, .12); color: var(--cbt-muted); }
[data-bs-theme="dark"] .badge-soft-success { color: #34d399; }
[data-bs-theme="dark"] .badge-soft-warning { color: #fbbf24; }
[data-bs-theme="dark"] .badge-soft-danger { color: #fb7185; }

/* ==========================================================================
   LAYOUT DASHBOARD
   ========================================================================== */
.app-wrapper { display: flex; min-height: 100vh; }

/* ---------- Sidebar ---------- */
.app-sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 1040;
    width: var(--cbt-sidebar-w);
    background: var(--cbt-sidebar-bg);
    color: var(--cbt-sidebar-text);
    display: flex; flex-direction: column;
    transition: width .2s ease, transform .25s ease;
}
.sidebar-brand {
    height: var(--cbt-topbar-h); flex-shrink: 0;
    display: flex; align-items: center; gap: .75rem;
    padding: 0 1.25rem; border-bottom: 1px solid rgba(255, 255, 255, .06);
    color: #fff;
}
.brand-logo {
    width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: grid; place-items: center; color: #fff; font-size: 1.2rem;
    box-shadow: 0 6px 16px -6px rgba(99, 102, 241, .8);
    overflow: hidden;
}
.brand-logo img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.brand-text { line-height: 1.15; overflow: hidden; white-space: nowrap; }
.brand-text strong { display: block; font-size: 1rem; letter-spacing: -.01em; }
.brand-text small { color: var(--cbt-sidebar-muted); font-size: .75rem; display: block; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 1rem .75rem; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.12) transparent; }
.nav-header {
    font-size: .6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
    color: var(--cbt-sidebar-muted); padding: 1rem .75rem .4rem; white-space: nowrap;
}
.nav-header:first-child { padding-top: .25rem; }
.side-link {
    display: flex; align-items: center; gap: .8rem;
    padding: .6rem .75rem; margin-bottom: 2px; border-radius: 10px;
    color: var(--cbt-sidebar-text); font-weight: 500; font-size: .9rem; white-space: nowrap;
    transition: background .15s, color .15s;
}
.side-link .bi { font-size: 1.1rem; width: 22px; text-align: center; flex-shrink: 0; opacity: .85; }
.side-link:hover { background: var(--cbt-sidebar-hover); color: #fff; }
.side-link.active { background: var(--cbt-sidebar-active); color: var(--cbt-sidebar-active-text); font-weight: 600; }
.side-link.active .bi { color: #a5b4fc; opacity: 1; }
.side-link.active::before {
    content: ''; position: absolute; left: 0; width: 3px; height: 22px; border-radius: 0 3px 3px 0; background: #818cf8;
}
.side-link { position: relative; }
.side-link > span:not(.soon) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.side-link .soon { flex-shrink: 0; }
.side-link.disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
.side-link .soon {
    margin-left: auto; font-size: .625rem; font-weight: 700; padding: .15rem .45rem; border-radius: 5px;
    background: rgba(255, 255, 255, .08); color: var(--cbt-sidebar-muted); letter-spacing: .02em;
}
.sidebar-footer { padding: .9rem 1rem; border-top: 1px solid rgba(255, 255, 255, .06); flex-shrink: 0; }
.year-chip {
    display: flex; align-items: center; gap: .6rem; padding: .6rem .75rem; border-radius: 10px;
    background: rgba(255, 255, 255, .05); font-size: .8rem; white-space: nowrap; overflow: hidden;
}
.year-chip .bi { color: #a5b4fc; font-size: 1rem; }
.year-chip small { display: block; color: var(--cbt-sidebar-muted); font-size: .6875rem; }

/* ---------- Area utama ---------- */
.app-main { flex: 1; min-width: 0; margin-left: var(--cbt-sidebar-w); display: flex; flex-direction: column; transition: margin .2s ease; }
.app-topbar {
    position: sticky; top: 0; z-index: 1030;
    height: var(--cbt-topbar-h);
    display: flex; align-items: center; gap: .75rem;
    padding: 0 1.5rem;
    background: color-mix(in srgb, var(--cbt-surface) 85%, transparent);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--cbt-border);
}
.topbar-btn {
    width: 40px; height: 40px; border-radius: 10px; border: 1px solid transparent;
    background: transparent; color: var(--cbt-text-2);
    display: inline-flex; align-items: center; justify-content: center; font-size: 1.15rem;
}
.topbar-btn:hover { background: var(--cbt-surface-2); border-color: var(--cbt-border); color: var(--cbt-text); }
.topbar-title { font-weight: 700; font-size: 1.05rem; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-clock {
    display: flex; align-items: center; gap: .5rem; padding: .4rem .75rem; border-radius: 10px;
    background: var(--cbt-surface-2); border: 1px solid var(--cbt-border);
    font-variant-numeric: tabular-nums; font-weight: 600; font-size: .85rem; color: var(--cbt-text-2);
}
.user-menu-btn {
    display: flex; align-items: center; gap: .65rem; padding: .3rem .5rem .3rem .3rem;
    border-radius: 12px; border: 1px solid transparent; background: transparent; color: var(--cbt-text);
}
.user-menu-btn:hover, .user-menu-btn[aria-expanded="true"] { background: var(--cbt-surface-2); border-color: var(--cbt-border); }
.user-menu-btn .meta { text-align: left; line-height: 1.2; }
.user-menu-btn .meta strong { display: block; font-size: .875rem; }
.user-menu-btn .meta small { color: var(--cbt-muted); font-size: .75rem; }

.avatar {
    width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
    display: inline-grid; place-items: center; font-weight: 700; font-size: .85rem;
    background: var(--cbt-primary-soft); color: var(--cbt-primary);
}
.avatar-lg { width: 56px; height: 56px; font-size: 1.15rem; border-radius: 14px; }

.dropdown-menu {
    --bs-dropdown-bg: var(--cbt-surface);
    --bs-dropdown-border-color: var(--cbt-border);
    --bs-dropdown-link-active-bg: var(--cbt-primary);
    --bs-dropdown-border-radius: 12px;
    box-shadow: var(--cbt-shadow); padding: .4rem;
}
.dropdown-item { border-radius: 8px; padding: .5rem .75rem; font-size: .9rem; display: flex; align-items: center; gap: .6rem; }

.app-content { flex: 1; padding: 1.5rem; }
.app-footer { padding: 1rem 1.5rem; font-size: .8rem; color: var(--cbt-muted); border-top: 1px solid var(--cbt-border); }

/* Header halaman */
.page-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.page-header h1 { font-size: 1.5rem; margin: 0; }
.page-header p { margin: .25rem 0 0; color: var(--cbt-muted); }
.breadcrumb { --bs-breadcrumb-divider-color: var(--cbt-muted); font-size: .8rem; margin-bottom: .35rem; }
.breadcrumb-item a { color: var(--cbt-muted); }
.breadcrumb-item.active { color: var(--cbt-text-2); }

/* ---------- Sidebar ringkas (desktop) ---------- */
@media (min-width: 992px) {
    body.sidebar-mini .app-sidebar { width: var(--cbt-sidebar-mini); }
    body.sidebar-mini .app-main { margin-left: var(--cbt-sidebar-mini); }
    body.sidebar-mini .brand-text,
    body.sidebar-mini .nav-header,
    body.sidebar-mini .side-link span,
    body.sidebar-mini .side-link .soon,
    body.sidebar-mini .year-chip div { display: none; }
    body.sidebar-mini .sidebar-brand { padding: 0; justify-content: center; }
    body.sidebar-mini .side-link { justify-content: center; padding: .7rem; }
    body.sidebar-mini .year-chip { justify-content: center; }
    body.sidebar-mini .sidebar-nav { padding: 1rem .6rem; }
}

/* ---------- Mobile: sidebar jadi off-canvas ---------- */
.sidebar-backdrop { display: none; }
@media (max-width: 991.98px) {
    .app-sidebar { transform: translateX(-100%); box-shadow: none; }
    .app-main { margin-left: 0; }
    body.sidebar-open .app-sidebar { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .35); }
    body.sidebar-open .sidebar-backdrop {
        display: block; position: fixed; inset: 0; z-index: 1035; background: rgba(15, 23, 42, .5);
        backdrop-filter: blur(2px);
    }
    body.sidebar-open { overflow: hidden; }
    .app-topbar { padding: 0 1rem; }
    .app-content { padding: 1rem; }
    .page-header h1 { font-size: 1.25rem; }
}

/* ==========================================================================
   KOMPONEN DASHBOARD
   ========================================================================== */

/* Banner sapaan */
.hero-card {
    position: relative; overflow: hidden; border: 0; color: #fff;
    background: linear-gradient(120deg, #4f46e5 0%, #6d28d9 55%, #9333ea 100%);
    border-radius: var(--cbt-radius);
    box-shadow: 0 12px 32px -12px rgba(79, 70, 229, .6);
}
.hero-card::before, .hero-card::after {
    content: ''; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .08);
}
.hero-card::before { width: 280px; height: 280px; right: -60px; top: -120px; }
.hero-card::after { width: 180px; height: 180px; right: 140px; bottom: -110px; }
.hero-card .card-body { position: relative; z-index: 1; padding: 1.75rem; }
.hero-card h2 { color: #fff; font-size: 1.5rem; margin-bottom: .35rem; }
.hero-card p { color: rgba(255, 255, 255, .82); margin: 0; }
.hero-card .hero-chip {
    display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .75rem; border-radius: 999px;
    background: rgba(255, 255, 255, .15); font-size: .8rem; font-weight: 600; color: #fff;
}
.hero-card .btn-hero { background: #fff; color: #4f46e5; border: 0; box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .3); }
.hero-card .btn-hero:hover { background: #eef2ff; }
.hero-card .btn-hero-ghost { background: rgba(255, 255, 255, .14); color: #fff; border: 1px solid rgba(255, 255, 255, .25); }
.hero-card .btn-hero-ghost:hover { background: rgba(255, 255, 255, .24); }

/* Kartu statistik */
.stat-card { height: 100%; transition: transform .15s ease, box-shadow .15s ease; }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--cbt-shadow); }
.stat-card .card-body { display: flex; align-items: center; gap: 1rem; }
.stat-icon {
    width: 50px; height: 50px; border-radius: 14px; flex-shrink: 0;
    display: grid; place-items: center; font-size: 1.35rem;
}
.stat-value { font-size: 1.6rem; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--cbt-muted); font-size: .825rem; font-weight: 500; }
@media (max-width: 575.98px) {
    .stat-card .card-body { flex-direction: column; align-items: flex-start; gap: .75rem; padding: 1rem; }
    .stat-icon { width: 42px; height: 42px; font-size: 1.15rem; border-radius: 12px; }
    .stat-value { font-size: 1.4rem; }
    .hero-card .card-body { padding: 1.25rem; }
    .hero-card h2 { font-size: 1.25rem; }
}
.tone-indigo { background: #eef2ff; color: #4f46e5; }
.tone-teal { background: #ccfbf1; color: #0f766e; }
.tone-amber { background: #fef3c7; color: #b45309; }
.tone-rose { background: #ffe4e6; color: #be123c; }
.tone-sky { background: #e0f2fe; color: #0369a1; }
.tone-violet { background: #f3e8ff; color: #7e22ce; }
[data-bs-theme="dark"] .tone-indigo { background: rgba(129, 140, 248, .14); color: #a5b4fc; }
[data-bs-theme="dark"] .tone-teal { background: rgba(45, 212, 191, .12); color: #5eead4; }
[data-bs-theme="dark"] .tone-amber { background: rgba(251, 191, 36, .12); color: #fcd34d; }
[data-bs-theme="dark"] .tone-rose { background: rgba(251, 113, 133, .12); color: #fda4af; }
[data-bs-theme="dark"] .tone-sky { background: rgba(56, 189, 248, .12); color: #7dd3fc; }
[data-bs-theme="dark"] .tone-violet { background: rgba(192, 132, 252, .12); color: #d8b4fe; }

/* Aksi cepat */
.quick-action {
    display: flex; align-items: center; gap: .85rem; padding: .85rem 1rem;
    border-radius: 12px; border: 1px solid var(--cbt-border); background: var(--cbt-surface);
    color: var(--cbt-text); transition: all .15s ease; height: 100%;
}
.quick-action:hover { border-color: rgba(var(--cbt-primary-rgb), .4); box-shadow: var(--cbt-shadow); color: var(--cbt-text); transform: translateY(-1px); }
.quick-action .qa-icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-size: 1.1rem; flex-shrink: 0; }
.quick-action strong { display: block; font-size: .9rem; }
.quick-action small { color: var(--cbt-muted); font-size: .775rem; }
.quick-action.is-disabled { opacity: .55; pointer-events: none; }

/* Daftar ringkas */
.list-clean { list-style: none; margin: 0; padding: 0; }
.list-clean > li { display: flex; align-items: center; gap: .85rem; padding: .8rem 1.25rem; border-bottom: 1px solid var(--cbt-border); }
.list-clean > li:last-child { border-bottom: 0; }
.list-clean .li-main { flex: 1; min-width: 0; }
.list-clean .li-main strong { display: block; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-clean .li-main small { color: var(--cbt-muted); font-size: .8rem; }

/* Empty state */
.empty-state { text-align: center; padding: 2.25rem 1rem; color: var(--cbt-muted); }
.empty-state .empty-icon {
    width: 64px; height: 64px; margin: 0 auto .85rem; border-radius: 18px;
    display: grid; place-items: center; font-size: 1.6rem;
    background: var(--cbt-surface-2); border: 1px dashed var(--cbt-border); color: var(--cbt-muted);
}
.empty-state strong { display: block; color: var(--cbt-text); margin-bottom: .2rem; }

/* Progress tipis */
.progress-thin { height: 6px; border-radius: 99px; background: var(--cbt-surface-2); }
.progress-thin .progress-bar { border-radius: 99px; background: var(--cbt-primary); }

/* Tabel */
.table { --bs-table-bg: transparent; --bs-table-border-color: var(--cbt-border); margin: 0; }
.table > thead th {
    font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700;
    color: var(--cbt-muted); background: var(--cbt-surface-2); border-bottom-width: 1px; padding: .75rem 1rem; white-space: nowrap;
}
.table > tbody td { padding: .8rem 1rem; vertical-align: middle; }

/* ==========================================================================
   HALAMAN LOGIN
   ========================================================================== */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: var(--cbt-surface); }
.auth-aside {
    position: relative; overflow: hidden; color: #fff; padding: 3rem;
    display: flex; flex-direction: column; justify-content: space-between;
    background: radial-gradient(1200px 600px at -10% -10%, #6366f1 0%, transparent 60%),
                radial-gradient(900px 600px at 110% 110%, #9333ea 0%, transparent 55%),
                #1e1b4b;
}
.auth-aside::before {
    content: ''; position: absolute; inset: 0; opacity: .35;
    background-image: radial-gradient(rgba(255, 255, 255, .18) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
    -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}
.auth-aside > * { position: relative; z-index: 1; }
.auth-brand { display: flex; align-items: center; gap: .85rem; }
.auth-brand .brand-logo { width: 48px; height: 48px; border-radius: 14px; font-size: 1.4rem; background: rgba(255, 255, 255, .14); box-shadow: none; border: 1px solid rgba(255, 255, 255, .2); }
.auth-brand strong { font-size: 1.15rem; display: block; }
.auth-brand small { color: rgba(255, 255, 255, .7); }
.auth-headline { max-width: 480px; }
.auth-headline h1 { color: #fff; font-size: 2.4rem; line-height: 1.15; font-weight: 800; letter-spacing: -.03em; margin-bottom: 1rem; }
.auth-headline h1 span { background: linear-gradient(90deg, #c7d2fe, #f0abfc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-headline p { color: rgba(255, 255, 255, .75); font-size: 1.05rem; }
.auth-features { display: grid; gap: .85rem; margin-top: 2rem; }
.auth-feature { display: flex; align-items: center; gap: .85rem; }
.auth-feature .bi {
    width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0;
    background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .14); font-size: 1.1rem;
}
.auth-feature strong { display: block; font-size: .95rem; }
.auth-feature small { color: rgba(255, 255, 255, .65); }
.auth-aside-foot { color: rgba(255, 255, 255, .55); font-size: .8rem; }

.auth-main { display: flex; align-items: center; justify-content: center; padding: 2rem 1.5rem; position: relative; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h2 { font-size: 1.75rem; font-weight: 800; letter-spacing: -.02em; }
.auth-card .form-control { padding-top: .75rem; padding-bottom: .75rem; }
.auth-theme-btn { position: absolute; top: 1.25rem; right: 1.25rem; }
.auth-mobile-brand { display: none; }

@media (max-width: 991.98px) {
    .auth-page { grid-template-columns: 1fr; }
    .auth-aside { display: none; }
    .auth-mobile-brand { display: flex; align-items: center; gap: .75rem; margin-bottom: 2rem; }
    .auth-mobile-brand strong { display: block; }
    .auth-mobile-brand small { color: var(--cbt-muted); font-size: .8rem; }
}

/* ---------- Alert ---------- */
.alert { border-radius: 12px; border: 0; display: flex; gap: .65rem; align-items: flex-start; }
.alert .bi { font-size: 1.1rem; line-height: 1.3; }
.alert-danger { background: rgba(244, 63, 94, .1); color: #be123c; }
.alert-success { background: rgba(16, 185, 129, .1); color: #047857; }
.alert-warning { background: rgba(245, 158, 11, .12); color: #92400e; }
.alert-info { background: var(--cbt-primary-soft); color: var(--cbt-primary); }
[data-bs-theme="dark"] .alert-danger { color: #fda4af; }
[data-bs-theme="dark"] .alert-success { color: #6ee7b7; }
[data-bs-theme="dark"] .alert-warning { color: #fcd34d; }

/* SweetAlert2 menyesuaikan tema */
.swal2-popup { font-family: var(--bs-body-font-family) !important; border-radius: 16px !important; }
[data-bs-theme="dark"] .swal2-popup { background: var(--cbt-surface) !important; color: var(--cbt-text) !important; }
[data-bs-theme="dark"] .swal2-title, [data-bs-theme="dark"] .swal2-html-container { color: var(--cbt-text) !important; }

/* Utilitas */
.fw-800 { font-weight: 800; }
.min-w-0 { min-width: 0; }
.chart-box { position: relative; height: 280px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ==========================================================================
   TAHAP 2 — Tabel data, modal, Select2, toolbar
   ========================================================================== */

/* ---------- DataTables ---------- */
div.dt-container { font-size: .9rem; }
div.dt-container .dt-layout-row { margin: 0 !important; padding: .9rem 1.25rem; }
div.dt-container .dt-layout-row.dt-layout-table { padding: 0; }
div.dt-container .dt-layout-table > .dt-layout-cell { overflow-x: auto; padding: 0; }
div.dt-container .dt-layout-row:first-child { border-bottom: 1px solid var(--cbt-border); }
div.dt-container .dt-layout-row:last-child { border-top: 1px solid var(--cbt-border); }
div.dt-container .dt-search input {
    border-radius: 10px; border: 1px solid var(--cbt-border); padding: .5rem .85rem .5rem 2.2rem; margin-left: 0 !important;
    min-width: 240px; background: var(--cbt-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242.656a5 5 0 1 1 0-10 5 5 0 0 1 0 10'/%3E%3C/svg%3E") no-repeat .8rem center;
}
div.dt-container .dt-search input:focus { border-color: var(--cbt-primary); box-shadow: 0 0 0 4px rgba(var(--cbt-primary-rgb), .15); outline: 0; }
div.dt-container .dt-length select { border-radius: 8px; border-color: var(--cbt-border); padding: .35rem 2rem .35rem .65rem; }
div.dt-container .dt-info { color: var(--cbt-muted); font-size: .825rem; padding-top: .35rem !important; }
div.dt-container .dt-paging .pagination { margin: 0; gap: 4px; }
div.dt-container .dt-paging .page-link { border-radius: 8px !important; border: 1px solid var(--cbt-border); color: var(--cbt-text-2); min-width: 34px; text-align: center; padding: .3rem .6rem; background: var(--cbt-surface); }
div.dt-container .dt-paging .page-item.active .page-link { background: var(--cbt-primary); border-color: var(--cbt-primary); color: #fff; }
div.dt-container .dt-paging .page-item.disabled .page-link { opacity: .5; }
div.dt-container .dt-processing { background: var(--cbt-surface); border: 1px solid var(--cbt-border); border-radius: 12px; box-shadow: var(--cbt-shadow); padding: .75rem 1.25rem; margin: 0 !important; transform: translate(-50%, -50%); width: auto !important; }
div.dt-container .dt-processing > div:last-child { display: none; }
table.dataTable { margin: 0 !important; border-collapse: collapse !important; }
table.dataTable > thead > tr > th { border-bottom: 1px solid var(--cbt-border) !important; }
table.dataTable > tbody > tr:hover > * { background: rgba(var(--cbt-primary-rgb), .035); }
table.dataTable > tbody > tr.selected > * { box-shadow: inset 0 0 0 9999px rgba(var(--cbt-primary-rgb), .08) !important; color: inherit !important; }
table.dataTable td.dt-empty { padding: 0 !important; }
.table .btn-light { --bs-btn-padding-x: .45rem; }
.cell-main { font-weight: 600; color: var(--cbt-text); }
.cell-sub { font-size: .8rem; color: var(--cbt-muted); }
.font-mono, code.pin { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .08em; }
code.pin { color: var(--cbt-primary); background: var(--cbt-primary-soft); padding: .15rem .45rem; border-radius: 6px; font-size: .85rem; }
@media (max-width: 767.98px) {
    div.dt-container .dt-layout-row { padding: .75rem 1rem; }
    div.dt-container .dt-search input { min-width: 0; width: 100%; }
    div.dt-container .dt-layout-cell { width: 100%; }
}

/* ---------- Toolbar filter di atas tabel ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid var(--cbt-border); background: var(--cbt-surface-2); border-radius: var(--cbt-radius) var(--cbt-radius) 0 0; }
.toolbar .form-select, .toolbar .form-control { width: auto; min-width: 180px; padding-top: .45rem; padding-bottom: .45rem; }
.toolbar .toolbar-label { font-size: .8rem; font-weight: 600; color: var(--cbt-muted); }
.bulk-bar { display: none; align-items: center; gap: .5rem; flex-wrap: wrap; padding: .65rem 1.25rem; background: var(--cbt-primary-soft); color: var(--cbt-primary); font-weight: 600; font-size: .875rem; }
.bulk-bar.show { display: flex; }
@media (max-width: 575.98px) { .toolbar .form-select, .toolbar .form-control { min-width: 0; flex: 1 1 140px; } }

/* ---------- Modal ---------- */
.modal-content { border: 0; border-radius: 18px; background: var(--cbt-surface); box-shadow: 0 24px 64px -16px rgba(15, 23, 42, .35); }
.modal-header { border-bottom: 1px solid var(--cbt-border); padding: 1.1rem 1.5rem; }
.modal-title { font-weight: 700; font-size: 1.1rem; }
.modal-body { padding: 1.5rem; }
.modal-footer { border-top: 1px solid var(--cbt-border); padding: .9rem 1.5rem; background: var(--cbt-surface-2); border-radius: 0 0 18px 18px; }
.modal-backdrop.show { opacity: .45; }
.form-section-title { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--cbt-muted); margin: .5rem 0 .75rem; display: flex; align-items: center; gap: .5rem; }
.form-section-title::after { content: ''; flex: 1; height: 1px; background: var(--cbt-border); }
.form-text { color: var(--cbt-muted); font-size: .8rem; }
.req::after { content: ' *'; color: #e11d48; }

/* Upload zone */
.upload-zone { border: 2px dashed var(--cbt-border); border-radius: 14px; padding: 1.5rem; text-align: center; background: var(--cbt-surface-2); transition: border-color .15s; }
.upload-zone:hover { border-color: rgba(var(--cbt-primary-rgb), .5); }
.upload-zone .bi { font-size: 2rem; color: var(--cbt-primary); }
.step-num { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--cbt-primary-soft); color: var(--cbt-primary); font-weight: 700; font-size: .8rem; flex-shrink: 0; }

/* ---------- Select2 menyesuaikan tema ---------- */
.select2-container--bootstrap-5 .select2-selection { border-radius: var(--cbt-radius-sm); border-color: var(--cbt-border); min-height: calc(1.5em + 1.2rem + 2px); padding: .45rem .85rem; background-color: var(--cbt-surface); }
.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection { border-color: var(--cbt-primary); box-shadow: 0 0 0 4px rgba(var(--cbt-primary-rgb), .15); }
.select2-container--bootstrap-5 .select2-dropdown { border-color: var(--cbt-border); border-radius: 10px; background: var(--cbt-surface); box-shadow: var(--cbt-shadow); }
.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option.select2-results__option--highlighted { background: var(--cbt-primary-soft); color: var(--cbt-primary); }
.select2-container--bootstrap-5 .select2-dropdown .select2-results__options .select2-results__option.select2-results__option--selected { background: var(--cbt-primary); color: #fff; }
.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered .select2-selection__choice { background: var(--cbt-primary-soft); border-color: transparent; color: var(--cbt-primary); border-radius: 6px; }
[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-selection__rendered,
[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-dropdown .select2-results__option { color: var(--cbt-text); }
[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-dropdown .select2-search .select2-search__field { background: var(--cbt-surface-2); color: var(--cbt-text); border-color: var(--cbt-border); }

/* ---------- Tab pills ---------- */
.nav-pills-soft { gap: .35rem; }
.nav-pills-soft .nav-link { border-radius: 10px; color: var(--cbt-text-2); font-weight: 600; padding: .5rem .9rem; }
.nav-pills-soft .nav-link.active { background: var(--cbt-primary-soft); color: var(--cbt-primary); }

/* Logo preview */
.logo-preview { width: 96px; height: 96px; border-radius: 20px; border: 1px solid var(--cbt-border); background: var(--cbt-surface-2); display: grid; place-items: center; overflow: hidden; flex-shrink: 0; }
.logo-preview img { width: 100%; height: 100%; object-fit: contain; }
.logo-preview .bi { font-size: 2.2rem; color: var(--cbt-muted); }
/* Perbaikan tata letak DataTables (padding & perataan kolom) */
div.dt-container div.dt-layout-row { padding: .9rem 1.25rem !important; margin: 0 !important; }
div.dt-container div.dt-layout-row.dt-layout-table { padding: 0 !important; }
table.dataTable th.dt-type-numeric, table.dataTable td.dt-type-numeric,
table.dataTable th.dt-type-date, table.dataTable td.dt-type-date { text-align: left; }
table.dataTable th.text-center, table.dataTable td.text-center { text-align: center !important; }
table.dataTable th.text-end, table.dataTable td.text-end { text-align: right !important; }
table.dataTable > thead > tr > th:first-child, table.dataTable > tbody > tr > td:first-child { padding-left: 1.25rem; }
table.dataTable > thead > tr > th:last-child, table.dataTable > tbody > tr > td:last-child { padding-right: 1.25rem; }
#fYear { min-width: 250px; }div.dt-container .dt-layout-table > div { overflow-x: auto; }
@media (max-width: 767.98px) { div.dt-container .dt-layout-start, div.dt-container .dt-layout-end { width: 100%; margin: 0 !important; } div.dt-container .dt-search { width: 100%; } div.dt-container .dt-paging { margin: 0 auto; } }@media (max-width: 767.98px) { div.dt-container .dt-search { display: flex; } div.dt-container .dt-search input { flex: 1; width: 100% !important; } div.dt-container .dt-search label { display: none; } }
/* ---------- Kredit pembuat (Logika.Lab) ---------- */
.credit { display: inline-flex; align-items: center; flex-wrap: wrap; gap: .4rem; font-size: .8rem; color: var(--cbt-muted); }
.credit-brand { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; color: var(--cbt-text); letter-spacing: -.01em; }
.credit-brand img { width: 20px; height: 20px; border-radius: 50%; }
.credit-brand b { color: #f07d3c; }
.credit-ig { display: inline-flex; align-items: center; gap: .3rem; color: inherit; font-weight: 600; }
.credit-ig:hover { color: #e1306c; }
.credit-light { color: rgba(255, 255, 255, .7); }
.credit-light .credit-brand { color: #fff; }
.credit-light .credit-brand img { box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .35); }
.credit-light .credit-ig:hover { color: #fff; }
/* ---------- Mode demo ---------- */
.demo-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem; padding: .55rem 1rem; margin: -1.5rem -1.5rem 1.25rem; background: linear-gradient(90deg, #f07d3c, #f59e0b); color: #fff; font-size: .85rem; font-weight: 500; text-align: center; }
.stu-body > .demo-bar { margin: 0; }
.demo-bar b { letter-spacing: .06em; }
@media (max-width: 991.98px) { .app-content > .demo-bar { margin: -1rem -1rem 1rem; } }
.demo-box { border: 1.5px dashed #f07d3c; background: rgba(240, 125, 60, .07); border-radius: 14px; padding: .8rem 1rem; margin-bottom: 1.25rem; font-size: .85rem; }
.demo-box-title { font-weight: 800; color: #ea580c; letter-spacing: .04em; margin-bottom: .4rem; }
.demo-box-title span { font-weight: 500; letter-spacing: 0; color: var(--cbt-muted); font-size: .8rem; margin-left: .35rem; }
.demo-box table { width: 100%; }
.demo-box td { padding: .15rem .25rem .15rem 0; }
.demo-box code { color: var(--cbt-text); background: var(--cbt-surface); padding: .05rem .4rem; border-radius: 5px; border: 1px solid var(--cbt-border); }
.demo-box small { color: var(--cbt-muted); display: block; margin-top: .35rem; }