/* ==========================================================================
   Financial Dashboard - design system
   Ditulis tanpa framework agar aplikasi berjalan penuh secara offline.
   ========================================================================== */

:root {
    color-scheme: light;

    --bg: #f4f6fb;
    --bg-grad-1: #eef2ff;
    --bg-grad-2: #f5f3ff;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --surface-3: #f1f5f9;
    --border: #e3e8f0;
    --border-strong: #cbd5e1;

    --text: #0f172a;
    --text-muted: #5c6b83;
    --text-faint: #94a3b8;

    --accent: #4f46e5;
    --accent-soft: #eef2ff;
    --accent-hover: #4338ca;
    --accent-2: #0ea5a5;
    --positive: #059669;
    --positive-soft: #ecfdf5;
    --negative: #e11d48;
    --negative-soft: #fff1f2;
    --warning: #d97706;
    --warning-soft: #fffbeb;

    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
    --shadow: 0 4px 16px -4px rgba(15, 23, 42, .10), 0 1px 3px rgba(15, 23, 42, .05);
    --shadow-lg: 0 24px 48px -20px rgba(15, 23, 42, .25);

    --radius: 14px;
    --radius-sm: 9px;
    --radius-lg: 22px;

    --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --mono: "JetBrains Mono", "Cascadia Mono", Consolas, "SF Mono", monospace;
}

[data-theme="dark"] {
    color-scheme: dark;

    --bg: #080c17;
    --bg-grad-1: #0d1425;
    --bg-grad-2: #12102a;
    --surface: #101827;
    --surface-2: #151f31;
    --surface-3: #1b263b;
    --border: #223046;
    --border-strong: #33425c;

    --text: #e8eef9;
    --text-muted: #97a7c0;
    --text-faint: #6a7c98;

    --accent: #7c7cf9;
    --accent-soft: #1c1f43;
    --accent-hover: #918ffb;
    --accent-2: #2dd4bf;
    --positive: #34d399;
    --positive-soft: #0c2a22;
    --negative: #fb7185;
    --negative-soft: #2c1220;
    --warning: #fbbf24;
    --warning-soft: #2a2010;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 6px 20px -6px rgba(0, 0, 0, .6);
    --shadow-lg: 0 28px 56px -24px rgba(0, 0, 0, .8);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.55;
    color: var(--text);
    background:
        radial-gradient(1200px 600px at 12% -10%, var(--bg-grad-1), transparent 60%),
        radial-gradient(1000px 500px at 100% 0%, var(--bg-grad-2), transparent 55%),
        var(--bg);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    margin: 0;
    line-height: 1.25;
    letter-spacing: -.015em;
    font-weight: 650;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.mono {
    font-family: var(--mono);
    font-variant-numeric: tabular-nums;
}

.num {
    font-variant-numeric: tabular-nums;
}

/* ---------- Layout ---------------------------------------------------- */

.shell {
    max-width: 1420px;
    margin: 0 auto;
    padding: 0 22px 64px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    backdrop-filter: saturate(150%) blur(12px);
    background: color-mix(in srgb, var(--surface) 82%, transparent);
    border-bottom: 1px solid var(--border);
}

@supports not (background: color-mix(in srgb, red, blue)) {
    .topbar { background: var(--surface); }
}

.topbar__inner {
    max-width: 1420px;
    margin: 0 auto;
    padding: 12px 22px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    color: var(--text);
    text-decoration: none;
}

.brand:hover {
    text-decoration: none;
}

.brand__mark {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: linear-gradient(140deg, var(--accent), var(--accent-2));
    display: grid;
    place-items: center;
    box-shadow: var(--shadow-sm);
    flex: 0 0 auto;
}

.brand__mark svg {
    width: 21px;
    height: 21px;
}

.brand__text strong {
    display: block;
    font-size: 14.5px;
    font-weight: 680;
    letter-spacing: -.02em;
}

.brand__text span {
    display: block;
    font-size: 11.5px;
    color: var(--text-muted);
}

.topbar__spacer {
    flex: 1;
}

.userchip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 12px 5px 6px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-2);
}

.avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(140deg, var(--accent), var(--accent-2));
    flex: 0 0 auto;
}

.userchip__meta {
    line-height: 1.2;
}

.userchip__meta strong {
    display: block;
    font-size: 12.5px;
    font-weight: 620;
}

.userchip__meta span {
    display: block;
    font-size: 10.5px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .06em;
}

/* ---------- Page head -------------------------------------------------- */

.pagehead {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 14px;
    padding: 30px 0 22px;
}

.pagehead h1 {
    font-size: 25px;
}

.pagehead p {
    margin: 6px 0 0;
    color: var(--text-muted);
    font-size: 13px;
}

/* ---------- Buttons ---------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 15px;
    font: inherit;
    font-size: 13px;
    font-weight: 570;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background .14s, border-color .14s, transform .08s, box-shadow .14s;
    white-space: nowrap;
    text-decoration: none;
}

.btn:hover {
    background: var(--surface-3);
    border-color: var(--border-strong);
    text-decoration: none;
}

.btn:active {
    transform: translateY(1px);
}

.btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.btn svg {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
}

.btn--primary {
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    border-color: transparent;
    box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
    background: linear-gradient(135deg, var(--accent-hover), var(--accent-hover));
    filter: brightness(1.05);
}

.btn--ghost {
    background: transparent;
    border-color: transparent;
    color: var(--text-muted);
}

.btn--ghost:hover {
    background: var(--surface-3);
    color: var(--text);
}

.btn--icon {
    padding: 9px;
    width: 36px;
}

.btn--sm {
    padding: 6px 11px;
    font-size: 12px;
}

.btn--block {
    width: 100%;
}

/* ---------- Cards ------------------------------------------------------ */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.card__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
}

.card__head h2 {
    font-size: 15px;
}

.card__head p {
    margin: 3px 0 0;
    font-size: 12px;
    color: var(--text-muted);
}

.card__body {
    padding: 18px;
}

.card__body--flush {
    padding: 0;
}

.spacer {
    flex: 1;
}

/* ---------- Filter form ------------------------------------------------ */

.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.field > label,
.field__label {
    font-size: 11.5px;
    font-weight: 620;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.field__hint {
    font-size: 11px;
    color: var(--text-faint);
}

.input,
select.input,
textarea.input {
    width: 100%;
    padding: 9px 11px;
    font: inherit;
    font-size: 13.5px;
    color: var(--text);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color .14s, box-shadow .14s, background .14s;
    appearance: none;
}

select.input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 9px center;
    background-size: 16px;
    padding-right: 32px;
}

.input:hover {
    border-color: var(--border-strong);
}

.input:focus {
    outline: none;
    background: var(--surface);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.input::placeholder {
    color: var(--text-faint);
}

.checkline {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 13px;
    cursor: pointer;
    user-select: none;
}

.checkline input {
    width: 17px;
    height: 17px;
    margin: 1px 0 0;
    accent-color: var(--accent);
    cursor: pointer;
    flex: 0 0 auto;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.chip {
    padding: 6px 12px;
    font: inherit;
    font-size: 12px;
    font-weight: 570;
    color: var(--text-muted);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 999px;
    cursor: pointer;
    transition: all .14s;
}

.chip:hover {
    color: var(--text);
    border-color: var(--border-strong);
    background: var(--surface-3);
}

.chip[aria-pressed="true"] {
    color: #fff;
    background: var(--accent);
    border-color: var(--accent);
}

.formactions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px dashed var(--border);
}

/* ---------- KPI -------------------------------------------------------- */

.kpigrid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
    gap: 14px;
    margin: 18px 0;
}

.kpi {
    position: relative;
    padding: 16px 17px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.kpi::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    opacity: .85;
}

.kpi--positive::before { background: linear-gradient(90deg, var(--positive), var(--accent-2)); }
.kpi--negative::before { background: linear-gradient(90deg, var(--negative), var(--warning)); }
.kpi--neutral::before  { background: linear-gradient(90deg, var(--text-faint), var(--border-strong)); }

.kpi__label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11.5px;
    font-weight: 620;
    letter-spacing: .045em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.kpi__value {
    margin-top: 9px;
    font-size: 24px;
    font-weight: 680;
    letter-spacing: -.03em;
    font-variant-numeric: tabular-nums;
    word-break: break-word;
}

.kpi__meta {
    margin-top: 5px;
    font-size: 12px;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 640;
}

.trend--up   { color: var(--positive); background: var(--positive-soft); }
.trend--down { color: var(--negative); background: var(--negative-soft); }
.trend--flat { color: var(--text-muted); background: var(--surface-3); }

/* ---------- Chart ------------------------------------------------------ */

.chartwrap {
    position: relative;
    height: 400px;
}

.chartwrap--short {
    height: 320px;
}

.grid2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

@media (min-width: 1080px) {
    .grid2--split {
        grid-template-columns: 1.55fr 1fr;
    }
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* ---------- Table ------------------------------------------------------ */

.tablewrap {
    overflow: auto;
    max-height: 460px;
}

table.data {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}

table.data th,
table.data td {
    padding: 9px 14px;
    text-align: right;
    white-space: nowrap;
    border-bottom: 1px solid var(--border);
}

table.data th:first-child,
table.data td:first-child {
    text-align: left;
    position: sticky;
    left: 0;
    background: var(--surface);
}

table.data thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--surface-3);
    font-size: 11px;
    font-weight: 650;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--text-muted);
}

table.data thead th:first-child {
    z-index: 3;
    background: var(--surface-3);
}

table.data tbody tr:hover td {
    background: var(--surface-2);
}

table.data tbody tr:hover td:first-child {
    background: var(--surface-2);
}

table.data td.num {
    font-variant-numeric: tabular-nums;
}

table.data tfoot td {
    position: sticky;
    bottom: 0;
    background: var(--surface-3);
    font-weight: 660;
    border-top: 2px solid var(--border-strong);
    border-bottom: none;
}

.val-pos { color: var(--positive); }
.val-neg { color: var(--negative); }
.val-nil { color: var(--text-faint); }

.rowempty td {
    color: var(--text-faint);
}

/* ---------- Alerts ----------------------------------------------------- */

.alert {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius);
    border: 1px solid;
    font-size: 13px;
    margin-bottom: 18px;
}

.alert svg {
    width: 19px;
    height: 19px;
    flex: 0 0 auto;
    margin-top: 1px;
}

.alert strong {
    display: block;
    margin-bottom: 3px;
}

.alert--error {
    color: var(--negative);
    background: var(--negative-soft);
    border-color: color-mix(in srgb, var(--negative) 30%, transparent);
}

.alert--info {
    color: var(--accent);
    background: var(--accent-soft);
    border-color: color-mix(in srgb, var(--accent) 28%, transparent);
}

.alert--success {
    color: var(--positive);
    background: var(--positive-soft);
    border-color: color-mix(in srgb, var(--positive) 30%, transparent);
}

.alert__body {
    min-width: 0;
}

.alert code {
    display: block;
    margin-top: 8px;
    padding: 9px 11px;
    font-family: var(--mono);
    font-size: 11.5px;
    line-height: 1.5;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 170px;
    overflow: auto;
}

.empty {
    padding: 56px 20px;
    text-align: center;
    color: var(--text-muted);
}

.empty svg {
    width: 44px;
    height: 44px;
    margin-bottom: 12px;
    color: var(--text-faint);
}

/* ---------- Footer ----------------------------------------------------- */

.pagefoot {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    justify-content: space-between;
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-faint);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 999px;
    background: var(--surface-3);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

/* ==========================================================================
   Halaman login
   ========================================================================== */

.auth {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr;
}

@media (min-width: 940px) {
    .auth {
        grid-template-columns: 1.05fr .95fr;
    }
}

.auth__aside {
    display: none;
    position: relative;
    padding: 52px 54px;
    color: #eef2ff;
    background: linear-gradient(150deg, #312e81 0%, #4f46e5 45%, #0f766e 100%);
    overflow: hidden;
    flex-direction: column;
}

@media (min-width: 940px) {
    .auth__aside {
        display: flex;
    }
}

.auth__aside::after {
    content: "";
    position: absolute;
    right: -140px;
    bottom: -160px;
    width: 460px;
    height: 460px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .16), transparent 65%);
}

.auth__aside .brand__text strong,
.auth__aside .brand__text span {
    color: #eef2ff;
}

.auth__aside .brand__mark {
    background: rgba(255, 255, 255, .18);
    backdrop-filter: blur(6px);
}

.auth__pitch {
    margin-top: auto;
    position: relative;
    z-index: 1;
}

/* ---------- Slideshow sisi kiri login --------------------------------- */

.slideshow {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: #0f172a;
}

/*
 * Crossfade tanpa meredup: gambar baru (.is-active, paling atas) memudar
 * masuk di atas gambar lama (.is-prev) yang tetap utuh di bawahnya.
 * Selama tampil, gambar perlahan zoom-out (efek Ken Burns).
 */
.slideshow__slide {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.07);
    transition: opacity 1.2s cubic-bezier(.4, 0, .2, 1);
    will-change: opacity, transform;
}

.slideshow__slide.is-prev {
    z-index: 1;
    opacity: 1;
}

.slideshow__slide.is-active {
    z-index: 2;
    opacity: 1;
}

/* Satu deklarasi untuk keduanya agar zoom tidak terulang saat berpindah kelas */
.slideshow__slide.is-active,
.slideshow__slide.is-prev {
    animation: slideshow-zoom 5s cubic-bezier(.25, .1, .25, 1) forwards;
}

@keyframes slideshow-zoom {
    from { transform: scale(1.07); }
    to   { transform: scale(1); }
}

/* Gelapkan bagian atas & bawah agar logo dan teks tetap terbaca */
.slideshow::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    background: linear-gradient(180deg,
        rgba(15, 23, 42, .55) 0%,
        rgba(15, 23, 42, .10) 30%,
        rgba(15, 23, 42, .25) 55%,
        rgba(15, 23, 42, .85) 100%);
}

.auth__aside--slides::after {
    display: none;
}

.auth__aside--slides > .brand {
    position: relative;
    z-index: 1;
}

.auth__aside--slides .auth__pitch {
    text-shadow: 0 1px 14px rgba(0, 0, 0, .35);
}

.slideshow__dots {
    display: flex;
    gap: 6px;
    margin-top: 28px;
}

.slideshow__dots span {
    width: 20px;
    height: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, .35);
    transition: width .8s cubic-bezier(.4, 0, .2, 1), background .8s;
}

.slideshow__dots span.is-active {
    width: 34px;
    background: #fff;
}

/*
 * Mode kurangi-gerak (bawaan Windows Server & PC yang efek animasinya
 * dimatikan): zoom dimatikan, tetapi crossfade dipertahankan. Pudar
 * bukan gerakan, dan tanpa ini gambar meloncat kasar. !important +
 * selektor kelas mengalahkan aturan global `* { transition: none !important }`.
 */
@media (prefers-reduced-motion: reduce) {
    .slideshow__slide {
        transition: opacity 1.2s cubic-bezier(.4, 0, .2, 1) !important;
    }

    .slideshow__slide.is-active,
    .slideshow__slide.is-prev {
        animation: none;
        transform: none;
    }

    .slideshow__dots span {
        transition: none;
    }
}

.auth__pitch h2 {
    font-size: 30px;
    line-height: 1.2;
    letter-spacing: -.03em;
}

.auth__pitch p {
    margin: 14px 0 0;
    max-width: 42ch;
    font-size: 14px;
    color: rgba(238, 242, 255, .82);
}

.auth__points {
    list-style: none;
    margin: 30px 0 0;
    padding: 0;
    display: grid;
    gap: 11px;
    font-size: 13.5px;
    color: rgba(238, 242, 255, .9);
}

.auth__points li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth__points svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    opacity: .9;
}

.auth__main {
    display: grid;
    place-items: center;
    padding: 40px 22px;
}

.auth__card {
    width: 100%;
    max-width: 404px;
}

.auth__card > .brand {
    margin-bottom: 26px;
}

@media (min-width: 940px) {
    .auth__card > .brand {
        display: none;
    }
}

.auth__card h1 {
    font-size: 22px;
}

.auth__card > p {
    margin: 7px 0 26px;
    color: var(--text-muted);
    font-size: 13.5px;
}

.authform {
    display: grid;
    gap: 16px;
}

.pwwrap {
    position: relative;
}

.pwwrap .input {
    padding-right: 42px;
}

.pwtoggle {
    position: absolute;
    top: 50%;
    right: 5px;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    color: var(--text-faint);
    background: none;
    border: none;
    border-radius: 7px;
    cursor: pointer;
}

.pwtoggle:hover {
    color: var(--text);
    background: var(--surface-3);
}

.pwtoggle svg {
    width: 17px;
    height: 17px;
}

.errtext {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--negative);
}

.errtext svg {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
}

.input--error {
    border-color: var(--negative);
}

.hintbox {
    margin-top: 24px;
    padding: 13px 15px;
    font-size: 12.5px;
    background: var(--surface-2);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
}

.hintbox strong {
    display: block;
    margin-bottom: 7px;
    color: var(--text);
    font-size: 12px;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.hintbox table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--mono);
    font-size: 12px;
}

.hintbox td {
    padding: 2px 0;
}

.hintbox td:first-child {
    color: var(--text);
    padding-right: 14px;
}

.authfoot {
    margin-top: 26px;
    font-size: 11.5px;
    color: var(--text-faint);
    text-align: center;
}

/* ---------- Pengaturan slideshow --------------------------------------- */

.slidegrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.slidecard {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.slidecard__img {
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
}

.slidecard__img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slidecard__empty {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    height: 100%;
    font-size: 12.5px;
    color: var(--text-faint);
}

.slidecard__empty svg {
    width: 34px;
    height: 34px;
}

.slidecard__num {
    position: absolute;
    top: 10px;
    left: 10px;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    font-size: 12.5px;
    font-weight: 700;
    color: #fff;
    background: rgba(15, 23, 42, .7);
    border-radius: 50%;
}

.slidecard__body {
    display: grid;
    gap: 12px;
    padding: 14px 16px 16px;
}

.slidecard__meta {
    display: grid;
    gap: 2px;
    font-size: 12px;
    color: var(--text-muted);
}

.slidecard__meta strong {
    font-size: 14px;
    color: var(--text);
}

.slidecard__form {
    display: grid;
    gap: 8px;
}

.slidecard__form .input {
    padding: 7px 9px;
    font-size: 12.5px;
}

.slidecard__del {
    width: 100%;
    justify-content: center;
    color: var(--negative);
}

/* ---------- Utilities -------------------------------------------------- */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.is-busy {
    position: relative;
    pointer-events: none;
}

.is-busy::after {
    content: "";
    position: absolute;
    inset: 0;
    background: color-mix(in srgb, var(--surface) 62%, transparent);
    border-radius: inherit;
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}

@media print {
    .topbar, .formactions, .chips, .btn { display: none !important; }
    body { background: #fff; }
    .card { break-inside: avoid; box-shadow: none; }
}

/* ==========================================================================
   Navigasi utama (Ringkasan, Union, dan 7 Business Unit)
   ========================================================================== */

.mainnav {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: wrap;
    min-width: 0;
}

.mainnav__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    font-size: 12.5px;
    font-weight: 580;
    letter-spacing: .01em;
    color: var(--text-muted);
    border-radius: 8px;
    text-decoration: none;
    white-space: nowrap;
    transition: background .14s, color .14s;
}

.mainnav__link:hover {
    color: var(--text);
    background: var(--surface-3);
    text-decoration: none;
}

.mainnav__link[aria-current="page"] {
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    box-shadow: var(--shadow-sm);
}

.mainnav__sep {
    width: 1px;
    height: 18px;
    margin: 0 6px;
    background: var(--border-strong);
    flex: 0 0 auto;
}

@media (max-width: 900px) {
    .topbar__inner { flex-wrap: wrap; }
    .mainnav { order: 3; width: 100%; padding-top: 6px; }
}

/* Baris Business Unit pada halaman ringkasan */
.burow {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
    transition: background .14s;
}

.burow:last-child { border-bottom: none; }
.burow:hover { background: var(--surface-2); text-decoration: none; }

.burow__code {
    display: grid;
    place-items: center;
    padding: 4px 0;
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    border-radius: 7px;
    background: linear-gradient(140deg, var(--accent), var(--accent-2));
}

.burow--error .burow__code {
    background: linear-gradient(140deg, var(--negative), var(--warning));
}

.burow__name { font-size: 13.5px; font-weight: 560; }
.burow__meta { font-size: 11.5px; color: var(--text-faint); }
.burow__val  { text-align: right; font-variant-numeric: tabular-nums; }
.burow__val strong { display: block; font-size: 15px; font-weight: 680; }
.burow__val span   { font-size: 11.5px; color: var(--text-muted); }
