/*
 * UD Key Mobil — tema di atas Bootstrap 5.3 (tanpa build step).
 * Palet diambil dari logo: ungu tua + perak/lavender.
 */

:root {
    --brand-50: #f6f3fb;
    --brand-100: #ece5f6;
    --brand-200: #d9ccee;
    --brand-300: #bba5df;
    --brand-400: #9a7bcb;
    --brand-500: #7b56b2;
    --brand-600: #633f97;
    --brand-700: #50307f;
    --brand-800: #3d1f6e;
    --brand-900: #2b1452;
    --brand-950: #1b0a37;

    --silver-50: #f8f7fa;
    --silver-100: #f1eff5;
    --silver-200: #e4e1ea;
    --silver-300: #cfcad8;
    --silver-400: #a8a1b6;
    --silver-500: #7f7890;
    --silver-600: #625b72;
    --silver-700: #4a445a;
    --silver-800: #322d3f;
    --silver-900: #1f1b29;

    --green-50: #ecfdf5;
    --green-200: #a7f3d0;
    --green-500: #10b981;
    --green-600: #059669;
    --green-700: #047857;
    --green-800: #065f46;
    --rose-50: #fff1f2;
    --rose-200: #fecdd3;
    --rose-400: #fb7185;
    --rose-500: #f43f5e;
    --rose-600: #e11d48;
    --rose-700: #be123c;
    --rose-800: #9f1239;

    --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-display: 'Montserrat', 'Plus Jakarta Sans', system-ui, sans-serif;
    --sidebar-width: 17rem;
    --shadow-card: 0 1px 2px rgb(43 20 82 / .04), 0 4px 16px -6px rgb(43 20 82 / .08);

    /* Override variabel Bootstrap */
    --bs-body-font-family: var(--font-sans);
    --bs-body-font-size: .9375rem;
    --bs-body-color: var(--silver-800);
    --bs-body-bg: #fff;
    --bs-border-color: var(--silver-200);
    --bs-link-color: var(--brand-700);
    --bs-link-color-rgb: 80, 48, 127;
    --bs-link-hover-color: var(--brand-800);
    --bs-link-hover-color-rgb: 61, 31, 110;
    --bs-primary: var(--brand-800);
    --bs-primary-rgb: 61, 31, 110;
    --bs-secondary-color: var(--silver-500);
    --bs-emphasis-color: var(--silver-900);
    --bs-heading-color: var(--silver-900);
}

body {
    min-height: 100vh;
    background: var(--silver-50);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .font-display { font-family: var(--font-display); }

a { text-decoration: none; }
a:hover { text-decoration: underline; }
a.btn:hover, a.btn-icon:hover, a.badge:hover, a.side-link:hover, a.dropdown-item:hover, a.segmented-item:hover { text-decoration: none; }

.tabular-nums { font-variant-numeric: tabular-nums; }
.fw-extrabold { font-weight: 800 !important; }
.min-w-0 { min-width: 0; }
.text-muted-2 { color: var(--silver-400) !important; }
.text-silver-500 { color: var(--silver-500) !important; }
.text-silver-600 { color: var(--silver-600) !important; }
.text-strong { color: var(--silver-900) !important; }
.text-brand { color: var(--brand-700) !important; }
.text-success-2 { color: var(--green-700) !important; }
.text-danger-2 { color: var(--rose-700) !important; }
.text-xs { font-size: .75rem !important; }
.text-sm { font-size: .875rem !important; }

/* ---------- Ikon SVG ---------- */
.icon { width: 1rem; height: 1rem; flex-shrink: 0; vertical-align: -.125em; }
.icon-xs { width: .75rem; height: .75rem; }
.icon-md { width: 1.125rem; height: 1.125rem; }
.icon-lg { width: 1.25rem; height: 1.25rem; }
.icon-xl { width: 1.5rem; height: 1.5rem; }

.sparkle { position: absolute; pointer-events: none; color: rgb(255 255 255 / .06); }

/* ---------- Layout: sidebar ---------- */
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    width: var(--sidebar-width);
    overflow: hidden;
    background: linear-gradient(to bottom, var(--brand-900), var(--brand-800), var(--brand-950));
    transform: translateX(-100%);
    transition: transform .3s ease;
}
.sidebar.show { transform: none; }

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1030;
    display: none;
    background: rgb(27 10 55 / .5);
    backdrop-filter: blur(4px);
}
.sidebar-backdrop.show { display: block; }

@media (min-width: 992px) {
    .sidebar { transform: none; }
    .sidebar-backdrop { display: none !important; }
    .app-main { padding-left: var(--sidebar-width); }
}

.sidebar-brand { display: flex; align-items: center; gap: .75rem; padding: 1.5rem 1.25rem 1.25rem; }
.sidebar-logo {
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    width: 4rem; height: 3rem; padding: .25rem; overflow: hidden;
    background: #fff; border-radius: .75rem; box-shadow: 0 10px 15px -3px rgb(0 0 0 / .2);
}
.sidebar-logo img, .logo-box img { width: 100%; height: 100%; object-fit: contain; }
.sidebar-title { margin: 0; font-family: var(--font-display); font-size: 17px; font-weight: 800; line-height: 1.2; letter-spacing: -.01em; color: #fff; }
.sidebar-tagline { margin: 0; font-size: 11px; color: rgb(217 204 238 / .7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-close { margin-left: auto; padding: .375rem; border: 0; border-radius: .5rem; background: none; color: var(--brand-200); line-height: 0; }
.sidebar-close:hover { background: rgb(255 255 255 / .1); }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 0 .75rem 1.5rem; }
.sidebar-footer { padding: 1rem 1.25rem; border-top: 1px solid rgb(255 255 255 / .1); font-size: 11px; color: rgb(217 204 238 / .5); }

.side-link {
    display: flex; align-items: center; gap: .75rem;
    padding: .625rem .75rem; margin-bottom: 2px;
    border-radius: .75rem;
    font-size: .875rem; font-weight: 500;
    color: rgb(236 229 246 / .75);
    transition: background-color .15s, color .15s;
}
.side-link .icon { width: 18px; height: 18px; }
.side-link:hover { background: rgb(255 255 255 / .08); color: #fff; }
.side-link.active { background: rgb(255 255 255 / .12); color: #fff; box-shadow: inset 3px 0 0 var(--silver-300); }

.nav-heading {
    margin: 1.5rem 0 .5rem; padding: 0 .75rem;
    font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
    color: rgb(187 165 223 / .7);
}

/* ---------- Layout: topbar ---------- */
.topbar {
    position: sticky; top: 0; z-index: 1020;
    border-bottom: 1px solid rgb(228 225 234 / .7);
    background: rgb(255 255 255 / .85);
    backdrop-filter: blur(12px);
}
.topbar-inner { display: flex; align-items: center; gap: .75rem; height: 4rem; padding: 0 1rem; }
@media (min-width: 576px) { .topbar-inner { padding: 0 1.5rem; } }
@media (min-width: 992px) { .topbar-inner { padding: 0 2rem; } }

.topbar-toggle { margin-left: -.25rem; padding: .5rem; border: 0; border-radius: .5rem; background: none; color: var(--silver-600); line-height: 0; }
.topbar-toggle:hover { background: var(--silver-100); }

.user-toggle {
    display: flex; align-items: center; gap: .75rem;
    padding: .375rem .5rem .375rem .375rem;
    border: 0; border-radius: .75rem; background: none; text-align: left;
    transition: background-color .15s;
}
.user-toggle:hover, .user-toggle[aria-expanded="true"] { background: var(--silver-100); }
.user-toggle::after { display: none; }

.avatar {
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    width: 2.25rem; height: 2.25rem; border-radius: 50%;
    font-size: .75rem; font-weight: 700;
    background: var(--brand-100); color: var(--brand-800);
}
.avatar-gradient { background: linear-gradient(to bottom right, var(--brand-600), var(--brand-900)); color: #fff; box-shadow: 0 0 0 2px var(--brand-100); }

.dropdown-menu {
    --bs-dropdown-min-width: 13rem;
    --bs-dropdown-padding-x: .375rem;
    --bs-dropdown-padding-y: .375rem;
    --bs-dropdown-border-color: var(--silver-200);
    --bs-dropdown-border-radius: .75rem;
    --bs-dropdown-link-color: var(--silver-700);
    --bs-dropdown-link-hover-bg: var(--brand-50);
    --bs-dropdown-link-hover-color: var(--brand-800);
    --bs-dropdown-link-active-bg: var(--brand-100);
    --bs-dropdown-link-active-color: var(--brand-800);
    box-shadow: 0 20px 25px -5px rgb(27 10 55 / .1), 0 8px 10px -6px rgb(27 10 55 / .1);
}
.dropdown-item { display: flex; align-items: center; gap: .625rem; padding: .5rem .75rem; border-radius: .5rem; font-size: .875rem; }
.dropdown-item.text-danger:hover { background: var(--rose-50); color: var(--rose-600) !important; }

/* ---------- Konten ---------- */
.page { padding: 1.5rem 1rem; }
@media (min-width: 576px) { .page { padding: 1.5rem; } }
@media (min-width: 992px) { .page { padding: 2rem; } }

.page-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.page-title { margin: 0; font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; color: var(--brand-900); }
.page-subtitle { margin: .25rem 0 0; font-size: .875rem; color: var(--silver-500); }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }

/* ---------- Card ---------- */
.card {
    --bs-card-border-color: rgb(228 225 234 / .8);
    --bs-card-border-radius: 1rem;
    --bs-card-inner-border-radius: 1rem;
    --bs-card-cap-bg: transparent;
    --bs-card-cap-padding-y: 1rem;
    --bs-card-cap-padding-x: 1.25rem;
    --bs-card-spacer-y: 1.25rem;
    --bs-card-spacer-x: 1.25rem;
    box-shadow: var(--shadow-card);
}
.card-header {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem;
    border-bottom-color: var(--silver-100);
}
.card-title { margin: 0; font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--silver-900); }
.card-footer {
    --bs-card-cap-padding-y: 1rem;
    display: flex; justify-content: flex-end; gap: .5rem;
    background: transparent; border-top-color: var(--silver-100);
}
@media (min-width: 576px) {
    .card-body-lg { padding: 1.5rem; }
    .card-footer { padding-left: 1.5rem; padding-right: 1.5rem; }
}
.card-divider { border-bottom: 1px solid var(--silver-100); }

.mw-sm { max-width: 32rem; }
.mw-md { max-width: 36rem; }
.mw-lg { max-width: 48rem; }

/* Kartu statistik */
.stat-label { margin: 0; font-size: .875rem; font-weight: 500; color: var(--silver-500); display: flex; align-items: center; gap: .5rem; }
.stat-value { margin: .75rem 0 0; font-family: var(--font-display); font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: var(--silver-900); font-variant-numeric: tabular-nums; }
.stat-value-lg { margin-top: .5rem; font-size: 1.5rem; }
.stat-chip { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 2.25rem; height: 2.25rem; border-radius: .75rem; }
.chip-green { background: var(--green-50); color: var(--green-600); }
.chip-red { background: var(--rose-50); color: var(--rose-600); }
.chip-brand { background: var(--brand-50); color: var(--brand-700); }

.stat-hero {
    position: relative; overflow: hidden; height: 100%;
    padding: 1.25rem; border-radius: 1rem; color: #fff;
    background: linear-gradient(to bottom right, var(--brand-900), var(--brand-800), var(--brand-600));
    box-shadow: 0 10px 15px -3px rgb(43 20 82 / .25), 0 4px 6px -4px rgb(43 20 82 / .25);
}
.stat-hero .stat-label { color: var(--brand-100); }
.stat-hero .stat-value { color: #fff; font-size: 26px; }
.stat-hero .stat-value-lg { font-size: 1.5rem; }
.stat-hero .stat-note { margin: .25rem 0 0; font-size: .75rem; color: rgb(217 204 238 / .8); }
.stat-hero .sparkle { color: rgb(255 255 255 / .25); }

/* ---------- Tombol ---------- */
.btn {
    --bs-btn-padding-x: 1rem;
    --bs-btn-padding-y: .625rem;
    --bs-btn-font-size: .875rem;
    --bs-btn-font-weight: 600;
    --bs-btn-border-radius: .75rem;
    --bs-btn-focus-box-shadow: 0 0 0 .25rem var(--brand-200);
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    white-space: nowrap;
}
.btn .icon { width: 1rem; height: 1rem; }
.btn-sm { --bs-btn-padding-x: .75rem; --bs-btn-padding-y: .375rem; --bs-btn-font-size: .75rem; --bs-btn-border-radius: .5rem; }
.btn-lg-block { width: 100%; padding-top: .75rem; padding-bottom: .75rem; }

.btn-primary {
    --bs-btn-bg: var(--brand-800);
    --bs-btn-border-color: var(--brand-800);
    --bs-btn-hover-bg: var(--brand-700);
    --bs-btn-hover-border-color: var(--brand-700);
    --bs-btn-active-bg: var(--brand-900);
    --bs-btn-active-border-color: var(--brand-900);
    --bs-btn-disabled-bg: var(--brand-800);
    --bs-btn-disabled-border-color: var(--brand-800);
    --bs-btn-focus-box-shadow: 0 0 0 .25rem var(--brand-300);
    box-shadow: 0 1px 2px rgb(43 20 82 / .2);
}
.btn-secondary {
    --bs-btn-color: var(--silver-700);
    --bs-btn-bg: #fff;
    --bs-btn-border-color: var(--silver-200);
    --bs-btn-hover-color: var(--brand-800);
    --bs-btn-hover-bg: var(--brand-50);
    --bs-btn-hover-border-color: var(--brand-300);
    --bs-btn-active-color: var(--brand-800);
    --bs-btn-active-bg: var(--brand-100);
    --bs-btn-active-border-color: var(--brand-300);
    --bs-btn-focus-box-shadow: 0 0 0 .25rem var(--brand-100);
}
.btn-danger {
    --bs-btn-bg: var(--rose-600);
    --bs-btn-border-color: var(--rose-600);
    --bs-btn-hover-bg: var(--rose-700);
    --bs-btn-hover-border-color: var(--rose-700);
    --bs-btn-active-bg: var(--rose-800);
    --bs-btn-active-border-color: var(--rose-800);
    --bs-btn-focus-box-shadow: 0 0 0 .25rem var(--rose-200);
}
.btn-excel {
    --bs-btn-color: var(--green-700);
    --bs-btn-bg: var(--green-50);
    --bs-btn-border-color: var(--green-200);
    --bs-btn-hover-color: var(--green-700);
    --bs-btn-hover-bg: #d1fae5;
    --bs-btn-hover-border-color: var(--green-200);
    --bs-btn-active-color: var(--green-800);
    --bs-btn-active-bg: #d1fae5;
    --bs-btn-focus-box-shadow: 0 0 0 .25rem #d1fae5;
}
.btn-pdf {
    --bs-btn-color: var(--rose-700);
    --bs-btn-bg: var(--rose-50);
    --bs-btn-border-color: var(--rose-200);
    --bs-btn-hover-color: var(--rose-700);
    --bs-btn-hover-bg: #ffe4e6;
    --bs-btn-hover-border-color: var(--rose-200);
    --bs-btn-active-color: var(--rose-800);
    --bs-btn-active-bg: #ffe4e6;
    --bs-btn-focus-box-shadow: 0 0 0 .25rem #ffe4e6;
}

.btn-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2rem; height: 2rem; padding: 0;
    border: 0; border-radius: .5rem; background: none;
    color: var(--silver-500);
    transition: background-color .15s, color .15s;
}
.btn-icon:hover { background: var(--brand-50); color: var(--brand-800); }
.btn-icon-danger:hover { background: var(--rose-50); color: var(--rose-600); }
.btn-icon:disabled { opacity: .4; pointer-events: none; }
.row-actions { display: flex; justify-content: flex-end; gap: .25rem; }
.row-actions form { margin: 0; }

/* ---------- Form ---------- */
.form-label { margin-bottom: .375rem; font-size: .875rem; font-weight: 600; color: var(--silver-700); }
.form-control, .form-select {
    padding: .625rem .875rem;
    font-size: .875rem;
    color: var(--silver-900);
    background-color: #fff;
    border-color: var(--silver-200);
    border-radius: .75rem;
    transition: border-color .15s, box-shadow .15s;
}
.form-select { padding-right: 2.25rem; }
.form-control::placeholder { color: var(--silver-400); }
.form-control:focus, .form-select:focus { border-color: var(--brand-500); box-shadow: 0 0 0 .25rem var(--brand-100); }
.form-control.is-invalid, .form-select.is-invalid { border-color: var(--rose-400); background-image: none; padding-right: .875rem; }
.form-select.is-invalid { padding-right: 2.25rem; background-image: var(--bs-form-select-bg-img); }
.form-control.is-invalid:focus, .form-select.is-invalid:focus { border-color: var(--rose-500); box-shadow: 0 0 0 .25rem #ffe4e6; }
.form-text { margin-top: .375rem; font-size: .75rem; color: var(--silver-500); }
.invalid-feedback { display: block; margin-top: .375rem; font-size: .75rem; font-weight: 500; color: var(--rose-600); }

.form-check-input { border-color: var(--silver-300); }
.form-check-input:checked { background-color: var(--brand-800); border-color: var(--brand-800); }
.form-check-input:focus { border-color: var(--brand-400); box-shadow: 0 0 0 .25rem var(--brand-100); }
.form-check-input.danger:checked { background-color: var(--rose-600); border-color: var(--rose-600); }
.form-check-label { font-size: .875rem; color: var(--silver-600); }

/* Input dengan ikon / prefix di kiri */
.input-icon { position: relative; }
.input-icon > .icon, .input-icon > .input-prefix {
    position: absolute; top: 50%; left: .875rem; transform: translateY(-50%);
    pointer-events: none; color: var(--silver-400);
}
.input-icon > .input-prefix { font-size: .875rem; font-weight: 600; }
.input-icon > .form-control { padding-left: 2.5rem; }

/* Pilihan kartu (radio) */
.choice {
    display: flex; gap: .75rem; height: 100%;
    padding: 1rem; margin: 0;
    border: 1px solid var(--silver-200); border-radius: .75rem;
    cursor: pointer; transition: border-color .15s, background-color .15s, color .15s;
}
.choice:hover { border-color: var(--brand-300); }
.choice:has(input:checked) { border-color: var(--brand-600); background: var(--brand-50); }
.choice .form-check-input { margin: .125rem 0 0; flex-shrink: 0; }
.choice-title { display: block; font-size: .875rem; font-weight: 600; color: var(--silver-900); }
.choice-desc { display: block; font-size: .75rem; color: var(--silver-500); }

.choice-pill {
    display: flex; align-items: center; justify-content: center;
    padding: .625rem .75rem; margin: 0;
    border: 1px solid var(--silver-200); border-radius: .75rem;
    font-size: .875rem; font-weight: 600; color: var(--silver-600);
    cursor: pointer; transition: border-color .15s, background-color .15s, color .15s;
}
.choice-pill:hover { border-color: var(--brand-300); }
.choice-pill:has(input:checked) { border-color: var(--brand-600); background: var(--brand-50); color: var(--brand-800); }

/* Upload file */
.file-drop {
    display: flex; align-items: center; gap: .75rem;
    padding: 1rem; margin: 0;
    border: 2px dashed var(--silver-200); border-radius: .75rem;
    cursor: pointer; transition: border-color .15s, background-color .15s;
}
.file-drop:hover { border-color: var(--brand-300); background: rgb(246 243 251 / .5); }
.file-drop-name { display: block; font-size: .875rem; font-weight: 600; color: var(--silver-800); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Filter bar */
.filter-bar { padding: 1rem; }
.filter-bar.card-divider { border-bottom: 1px solid var(--silver-100); }

/* ---------- Tabel ---------- */
.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--silver-800);
    --bs-table-border-color: var(--silver-100);
    --bs-table-hover-bg: rgb(246 243 251 / .5);
    margin-bottom: 0;
    font-size: .875rem;
}
.table > thead > tr > th {
    padding: .75rem 1.25rem;
    background: var(--silver-50);
    border-bottom: 0;
    font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
    color: var(--silver-500);
    white-space: nowrap;
}
.table > tbody > tr > td { padding: .875rem 1.25rem; vertical-align: middle; border-top: 1px solid var(--silver-100); border-bottom: 0; }
.table > tbody > tr { transition: background-color .15s; }
.table > tbody > tr:hover > td { background: rgb(246 243 251 / .5); }
.table > tbody > tr.row-static:hover > td { background: transparent; }
.table > tbody > tr.row-active > td { background: var(--brand-50); }
.table > tfoot > tr > td, .table > tfoot > tr > th {
    padding: .875rem 1.25rem;
    border-top: 2px solid var(--silver-200); border-bottom: 0;
    background: rgb(246 243 251 / .6);
    font-weight: 700; color: var(--silver-900);
}
.table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.col-w-date { width: 8rem; }
.col-w-no { width: 3rem; }
.col-w-actions { width: 6rem; }
.col-w-actions-lg { width: 8rem; }
.td-note { max-width: 20rem; }

.table-card { overflow: hidden; }

/* ---------- Badge ---------- */
.badge {
    display: inline-flex; align-items: center; gap: .25rem;
    padding: .125rem .625rem;
    border-radius: 999px;
    font-size: .75rem; font-weight: 600; line-height: 1.5;
    white-space: nowrap;
}
.badge .icon { width: .75rem; height: .75rem; }
.badge-brand { background: var(--brand-100); color: var(--brand-800); }
a.badge-brand:hover { background: var(--brand-200); }
.badge-muted { background: var(--silver-100); color: var(--silver-500); }
.badge-green { background: var(--green-50); color: var(--green-700); box-shadow: inset 0 0 0 1px var(--green-200); }
.badge-red { background: var(--rose-50); color: var(--rose-700); box-shadow: inset 0 0 0 1px var(--rose-200); }

/* ---------- Notifikasi / alert ---------- */
.flash {
    display: flex; align-items: flex-start; gap: .75rem;
    padding: .75rem 1rem; margin-bottom: 1.25rem;
    border: 1px solid; border-radius: .75rem;
    font-size: .875rem; font-weight: 500;
    transition: opacity .5s;
}
.flash p { flex: 1; margin: 0; }
.flash .icon-lg { margin-top: .0625rem; }
.flash-close { padding: 0; border: 0; background: none; color: inherit; opacity: .6; line-height: 0; }
.flash-close:hover { opacity: 1; }
.flash.fade-out { opacity: 0; }
.flash-success { border-color: var(--green-200); background: var(--green-50); color: var(--green-800); }
.flash-danger { border-color: var(--rose-200); background: var(--rose-50); color: var(--rose-800); }

.status-box {
    display: flex; align-items: center; gap: .75rem;
    padding: 1rem 1.25rem; margin-bottom: 1.5rem;
    border: 1px solid var(--silver-200); border-radius: 1rem;
    background: #fff; font-size: .875rem; color: var(--silver-600);
}
.status-box p { margin: 0; }
.status-box.success { border-color: var(--green-200); background: var(--green-50); color: var(--green-800); }
.status-box.danger { border-color: var(--rose-200); background: var(--rose-50); color: var(--rose-800); }

/* ---------- Empty state ---------- */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 3.5rem 1rem; }
.empty-icon { display: flex; align-items: center; justify-content: center; width: 3rem; height: 3rem; margin-bottom: .75rem; border-radius: 1rem; background: var(--brand-50); color: var(--brand-400); }
.empty-title { margin: 0; font-weight: 600; color: var(--silver-700); }
.empty-text { margin: .25rem 0 0; font-size: .875rem; color: var(--silver-500); }
.table > tbody > tr > td.empty-cell { padding: 0; }

/* ---------- Segmented tab ---------- */
.segmented { display: inline-flex; gap: .25rem; padding: .25rem; margin-bottom: 1.25rem; border: 1px solid var(--silver-200); border-radius: .75rem; background: #fff; }
.segmented-item {
    display: flex; align-items: center; gap: .5rem;
    padding: .5rem 1rem; border-radius: .5rem;
    font-size: .875rem; font-weight: 600; color: var(--silver-600);
    transition: background-color .15s, color .15s;
}
.segmented-item:hover { color: var(--brand-800); }
.segmented-item.active { background: var(--brand-800); color: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .1); }
.segmented-count { padding: 0 .375rem; border-radius: 999px; font-size: 11px; background: var(--silver-100); }
.segmented-item.active .segmented-count { background: rgb(255 255 255 / .2); }

/* ---------- Grid khusus ---------- */
.grid-aside-right, .grid-aside-left { display: grid; gap: 1.5rem; align-items: start; }
@media (min-width: 992px) { .grid-aside-right { grid-template-columns: minmax(0, 1fr) 20rem; } }
@media (min-width: 1200px) { .grid-aside-left { grid-template-columns: 22rem minmax(0, 1fr); } }
.grid-kode { display: grid; grid-template-columns: 6rem minmax(0, 1fr); gap: .75rem; }

/* ---------- Beranda ---------- */
.chart-box { height: 20rem; padding: 1.25rem; }
.recent-list { margin: 0; padding: 0; list-style: none; }
.recent-list li { display: flex; align-items: center; gap: .75rem; padding: .875rem 1.25rem; }
.recent-list li + li { border-top: 1px solid var(--silver-100); }
.recent-list p { margin: 0; }

/* ---------- Progress mini (rekap) ---------- */
.bar { height: .375rem; max-width: 12rem; margin-top: .375rem; overflow: hidden; border-radius: 999px; background: var(--silver-100); }
.bar > div { height: 100%; border-radius: 999px; }
.bar-green { background: var(--green-500); }
.bar-red { background: var(--rose-500); }

/* ---------- Collapse "details" ---------- */
.details-card > summary {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 1.25rem; list-style: none; cursor: pointer;
    font-size: .875rem; font-weight: 600; color: var(--silver-700);
}
.details-card > summary::-webkit-details-marker { display: none; }
.details-card > summary .icon { color: var(--silver-400); transition: transform .2s; }
.details-card[open] > summary .icon { transform: rotate(180deg); }

/* ---------- Pagination ---------- */
.pagination {
    --bs-pagination-color: var(--silver-700);
    --bs-pagination-border-color: var(--silver-200);
    --bs-pagination-hover-color: var(--brand-800);
    --bs-pagination-hover-bg: var(--brand-50);
    --bs-pagination-hover-border-color: var(--brand-200);
    --bs-pagination-focus-color: var(--brand-800);
    --bs-pagination-focus-bg: var(--brand-50);
    --bs-pagination-focus-box-shadow: 0 0 0 .25rem var(--brand-100);
    --bs-pagination-active-bg: var(--brand-800);
    --bs-pagination-active-border-color: var(--brand-800);
    --bs-pagination-disabled-color: var(--silver-400);
    --bs-pagination-font-size: .875rem;
    --bs-pagination-border-radius: .625rem;
    margin: 0;
}
nav .small.text-muted { font-size: .8125rem; }

/* ---------- Login ---------- */
.login-wrap { display: grid; min-height: 100vh; background: #fff; }
@media (min-width: 992px) { .login-wrap { grid-template-columns: 1.1fr 1fr; } }
.login-brand {
    position: relative; overflow: hidden; display: none;
    padding: 3rem; color: #fff;
    background: linear-gradient(to bottom right, var(--brand-950), var(--brand-800), var(--brand-600));
}
@media (min-width: 992px) { .login-brand { display: flex; flex-direction: column; justify-content: space-between; } }
.login-brand .sparkle { color: rgb(228 225 234 / .35); }
.login-ring { position: absolute; border-radius: 50%; border-style: solid; border-color: rgb(255 255 255 / .05); }
.login-ring.lg { right: -8rem; bottom: -8rem; width: 28rem; height: 28rem; border-width: 40px; }
.login-ring.sm { right: -2.5rem; bottom: -2.5rem; width: 16rem; height: 16rem; border-width: 24px; }
.logo-box { display: flex; align-items: center; justify-content: center; width: 3.5rem; height: 2.75rem; padding: .25rem; overflow: hidden; border-radius: .75rem; background: #fff; }
.login-pill {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .25rem .75rem; margin-bottom: 1rem;
    border-radius: 999px; background: rgb(255 255 255 / .1); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .15);
    font-size: .75rem; font-weight: 600; color: var(--brand-100);
}
.login-heading { margin: 0; font-size: 2.25rem; line-height: 1.2; font-weight: 800; color: #fff; }
.login-lead { margin: 1rem 0 0; color: rgb(236 229 246 / .8); }
.login-form { display: flex; align-items: center; justify-content: center; padding: 3rem 1.5rem; }
@media (min-width: 576px) { .login-form { padding: 3rem; } }
.login-form-inner { width: 100%; max-width: 24rem; }
.login-logo { display: block; width: 15rem; margin: 0 auto 1.5rem; }

/* ---------- Halaman error ---------- */
.error-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 0 1.5rem; text-align: center; }
.error-code { margin: 0; font-family: var(--font-display); font-size: 3.75rem; font-weight: 800; line-height: 1; color: var(--brand-800); }

/* ---------- SweetAlert2 ---------- */
.swal2-popup { border-radius: 1rem !important; font-family: var(--font-sans) !important; }
.swal2-title { font-family: var(--font-display) !important; font-size: 1.125rem !important; color: var(--silver-900) !important; }
.swal2-html-container { font-size: .875rem !important; color: var(--silver-600) !important; }
.swal2-actions { gap: .5rem; }

.text-green { color: var(--green-600) !important; }
.text-red { color: var(--rose-600) !important; }
