/* ============================================================
   Dompet Keluarga — Sistem Desain v2
   Modern, ringan, responsif (mobile-first), mendukung mode gelap.
   Tanpa framework & tanpa build step.
   ============================================================ */

:root {
    color-scheme: light;

    /* Permukaan */
    --bg: #f5f6fb;
    --bg-loader: var(--bg);
    --bg-loader-gelap: var(--bg);
    --surface: #ffffff;
    --surface-2: #f1f3f9;
    --surface-3: #e8ebf3;
    --border: #e3e6ef;
    --border-strong: #cfd5e2;
    --overlay: rgba(15, 23, 42, 0.55);

    /* Teks */
    --text: #0f172a;
    --text-2: #3f4a5e;
    --muted: #667085;
    --faint: #98a2b3;

    /* Brand */
    --brand: #0055ea;
    --brand-hover: #0046c4;
    --brand-soft: #eaf1ff;
    --brand-ink: #0b3596;
    --brand-grad: linear-gradient(135deg, #1f6bff 0%, #0b3596 100%);

    /* Warna tulisan logo (berubah di mode gelap) */
    --logo-ink: #0b3596;
    --logo-tag: #1a58b0;
    --on-brand: #ffffff;

    /* Status */
    --success: #059669;
    --success-soft: #e8f8f1;
    --success-ink: #05603a;
    --warning: #d97706;
    --warning-soft: #fff6e5;
    --warning-ink: #93370d;
    --danger: #e11d48;
    --danger-soft: #fff0f3;
    --danger-ink: #9f1239;

    /* Warna pos anggaran */
    --c-pokok: #2563eb;
    --c-cicilan: #ea580c;
    --c-tabungan: #7c3aed;
    --c-gaya: #db2777;
    --c-sosial: #0d9488;
    --c-masuk: #059669;
    --c-lain: #64748b;

    /* Bentuk */
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-xl: 22px;
    --r-pill: 999px;

    --shadow-1: 0 1px 2px rgba(16, 24, 40, 0.05);
    --shadow-2: 0 4px 12px -2px rgba(16, 24, 40, 0.08), 0 2px 4px -2px rgba(16, 24, 40, 0.04);
    --shadow-3: 0 20px 40px -12px rgba(16, 24, 40, 0.25);

    --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --ease: cubic-bezier(0.4, 0, 0.2, 1);

    --sidebar-w: 264px;
    --bottom-nav-h: 68px;
}

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --bg: #0b1020;
        --surface: #121a2d;
        --surface-2: #19223a;
        --surface-3: #212c47;
        --border: #232d46;
        --border-strong: #33405f;
        --overlay: rgba(2, 6, 23, 0.7);

        --text: #e8ecf5;
        --text-2: #c0c8d8;
        --muted: #8e98ae;
        --faint: #6b7590;

        --brand: #6ea4ff;
        --brand-hover: #9cc1ff;
        --brand-soft: rgba(110, 164, 255, 0.14);
        --brand-ink: #cfe0ff;

        --logo-ink: #e8ecf5;
        --logo-tag: #9cc1ff;
        --on-brand: #0b1020;

        --success: #34d399;
        --success-soft: rgba(52, 211, 153, 0.12);
        --success-ink: #8af0c6;
        --warning: #fbbf24;
        --warning-soft: rgba(251, 191, 36, 0.12);
        --warning-ink: #fcd88a;
        --danger: #fb7185;
        --danger-soft: rgba(251, 113, 133, 0.12);
        --danger-ink: #fecdd6;

        --c-pokok: #60a5fa;
        --c-cicilan: #fb923c;
        --c-tabungan: #a78bfa;
        --c-gaya: #f472b6;
        --c-sosial: #2dd4bf;
        --c-masuk: #34d399;
        --c-lain: #94a3b8;

        --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3);
        --shadow-2: 0 6px 16px -4px rgba(0, 0, 0, 0.45);
        --shadow-3: 0 24px 48px -12px rgba(0, 0, 0, 0.6);
    }
}

/* ============================================================
   Dasar
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
[hidden] { display: none !important; }

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

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    min-height: 100dvh;
}

body.no-scroll { overflow: hidden; }

a { color: var(--brand); text-decoration: none; }
@media (hover: hover) {
    a:hover { color: var(--brand-hover); }
}

img, svg { display: block; }
.ikon { flex-shrink: 0; }

button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
    border-radius: 6px;
}

h1, h2, h3, h4 { line-height: 1.25; letter-spacing: -0.015em; }

.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;
}

.tabular { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.78rem; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-brand { color: var(--brand); }
.fw-bold { font-weight: 700; }
.nowrap { white-space: nowrap; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }

.stack { display: flex; flex-direction: column; gap: 1rem; }
.stack-sm { display: flex; flex-direction: column; gap: 0.5rem; }
.row { display: flex; align-items: center; gap: 0.75rem; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.wrap { flex-wrap: wrap; }
.wrap > .btn.grow { min-width: fit-content; }
.grow { flex: 1; min-width: 0; }

.grid { display: grid; gap: 1rem; }
.grid-2 { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.grid-3 { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.grid-auto { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }

@media (min-width: 640px) {
    .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
    .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .grid-main { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
}

/* ============================================================
   Kerangka Aplikasi: Sidebar (desktop), Topbar & Bottom Nav (ponsel)
   ============================================================ */
.app-shell { display: flex; min-height: 100vh; min-height: 100dvh; }

.sidebar {
    display: none;
    width: var(--sidebar-w);
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 1.25rem 1rem;
    flex-direction: column;
    gap: 1.5rem;
    overflow-y: auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--text);
    padding: 0.25rem 0.5rem;
}
.brand:hover { color: var(--text); }

.brand-mark {
    width: 46px;
    height: auto;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.brand-mark svg { width: 100%; height: auto; display: block; }
.logo-ink { fill: var(--logo-ink); }
.logo-tag { fill: var(--logo-tag); }
.brand-text .logo-tulisan { display: block; margin-bottom: 0.2rem; }

.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 1.02rem; font-weight: 800; letter-spacing: -0.02em; }
.brand-text small { font-size: 0.72rem; color: var(--muted); font-weight: 500; }

.side-nav { display: flex; flex-direction: column; gap: 0.2rem; }
.side-nav-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--faint);
    padding: 0.9rem 0.75rem 0.35rem;
}

.side-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.62rem 0.75rem;
    border-radius: var(--r-md);
    color: var(--text-2);
    font-weight: 600;
    font-size: 0.92rem;
    transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.side-link:hover { background: var(--surface-2); color: var(--text); }
.side-link.active { background: var(--brand-soft); color: var(--brand-ink); }
.side-link.active .ikon { color: var(--brand); }

.side-cta { margin-top: 0.25rem; }

.side-user {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    background: var(--surface-2);
}
.side-user .grow { line-height: 1.25; }
.side-user strong { display: block; font-size: 0.88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand-ink);
    font-weight: 800;
    font-size: 0.82rem;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}
.avatar-lg { width: 48px; height: 48px; font-size: 1rem; }

.app-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem 1rem;
    padding-top: calc(0.7rem + env(safe-area-inset-top));
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
}
.topbar .brand { padding: 0; }
.topbar .brand-mark { width: 40px; height: 34px; }

.content {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 1.1rem 1rem calc(var(--bottom-nav-h) + 2rem + env(safe-area-inset-bottom));
    flex: 1;
}

.app-footer {
    text-align: center;
    font-size: 0.75rem;
    color: var(--faint);
    padding: 0 1rem calc(var(--bottom-nav-h) + 1.25rem + env(safe-area-inset-bottom));
    margin-top: -1rem;
}

/* Bottom navigation (ponsel) */
.bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: end;
    height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom));
    padding: 0 0.25rem env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-top: 1px solid var(--border);
}

.bn-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    height: var(--bottom-nav-h);
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 600;
    background: none;
    border: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.bn-link:hover { color: var(--muted); }
.bn-link.active, .bn-link.active:hover { color: var(--brand); }
.bn-link.active .ikon { stroke-width: 2.4; }

.bn-fab-wrap { display: flex; justify-content: center; height: var(--bottom-nav-h); align-items: center; }
.bn-fab {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    border: 0;
    background: var(--brand-grad);
    color: #fff;
    display: grid;
    place-items: center;
    box-shadow: 0 10px 20px -6px rgba(0, 85, 234, 0.65);
    transform: translateY(-14px);
    cursor: pointer;
    transition: transform 0.15s var(--ease);
    -webkit-tap-highlight-color: transparent;
}
.bn-fab:active { transform: translateY(-14px) scale(0.94); }

@media (min-width: 960px) {
    .sidebar { display: flex; }
    .topbar, .bottom-nav { display: none; }
    .content { padding: 2rem 2.25rem 3rem; }
    .app-footer { padding: 0 1rem 1.5rem; margin-top: 0; }
    body { font-size: 15.5px; }
}

/* ============================================================
   Judul Halaman
   ============================================================ */
.page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.9rem 1rem;
    margin-bottom: 1.25rem;
}
.page-head h1 { font-size: 1.45rem; font-weight: 800; }
.page-head p { color: var(--muted); font-size: 0.9rem; margin-top: 0.2rem; }
.page-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }

@media (min-width: 960px) {
    .page-head h1 { font-size: 1.7rem; }
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 1.75rem 0 0.85rem;
}
.section-title h2 { font-size: 1.05rem; font-weight: 800; }

/* Pemilih bulan */
.month-switch {
    display: inline-flex;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-pill);
    padding: 0.2rem;
    box-shadow: var(--shadow-1);
}
.month-switch a {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--text-2);
}
.month-switch a:hover { background: var(--surface-2); }
.month-switch a.disabled { opacity: 0.35; pointer-events: none; }
.month-switch label {
    position: relative;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0 0.6rem;
    min-width: 132px;
    text-align: center;
    cursor: pointer;
    white-space: nowrap;
}
.month-switch input[type="month"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    width: 100%;
    cursor: pointer;
}

/* ============================================================
   Kartu
   ============================================================ */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-1);
    padding: 1.15rem;
}
.card + .card { margin-top: 1rem; }
.card-flush { padding: 0; overflow: hidden; }

@media (min-width: 640px) {
    .card { padding: 1.4rem; }
    .card-flush { padding: 0; }
}

.card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.6rem 0.75rem;
    margin-bottom: 1rem;
}
.card-head > :first-child { flex: 1 1 220px; min-width: 0; }
.card-head > :first-child:last-child { flex-basis: 100%; }
.card-head h2, .card-head h3 { font-size: 1.02rem; font-weight: 800; display: flex; align-items: center; gap: 0.5rem; }
.card-head p { font-size: 0.83rem; color: var(--muted); margin-top: 0.15rem; }
.card-flush .card-head { padding: 1.1rem 1.15rem 0; }

.icon-tile {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    background: var(--surface-2);
    color: var(--text-2);
}
.icon-tile.sm { width: 34px; height: 34px; border-radius: 10px; }
.icon-tile.brand { background: var(--brand-soft); color: var(--brand); }
.icon-tile.success { background: var(--success-soft); color: var(--success); }
.icon-tile.warning { background: var(--warning-soft); color: var(--warning); }
.icon-tile.danger { background: var(--danger-soft); color: var(--danger); }

/* Warna pos (dipakai oleh ikon & batang) */
.pos-pokok    { --pos: var(--c-pokok); }
.pos-cicilan  { --pos: var(--c-cicilan); }
.pos-tabungan { --pos: var(--c-tabungan); }
.pos-gaya     { --pos: var(--c-gaya); }
.pos-sosial   { --pos: var(--c-sosial); }
.pos-masuk    { --pos: var(--c-masuk); }
.pos-lain     { --pos: var(--c-lain); }
.icon-tile[class*="pos-"] {
    color: var(--pos);
    background: color-mix(in srgb, var(--pos) 13%, transparent);
}
.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--pos, var(--faint));
    flex-shrink: 0;
    display: inline-block;
}

/* Kartu saldo utama (hero) */
.hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--r-xl);
    padding: 1.35rem 1.25rem 1.2rem;
    background: var(--brand-grad);
    color: #fff;
    box-shadow: 0 18px 36px -16px rgba(0, 85, 234, 0.65);
}
.hero::after {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    right: -80px;
    top: -110px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 70%);
    pointer-events: none;
}
.hero-label { font-size: 0.82rem; font-weight: 600; opacity: 0.85; }
.hero-value { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; margin: 0.15rem 0 0.35rem; line-height: 1.15; word-break: break-word; }
.hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: var(--r-pill);
    background: rgba(255, 255, 255, 0.18);
}
.hero-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 1.1rem;
}
.hero-split > div {
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--r-md);
    padding: 0.7rem 0.8rem;
    min-width: 0;
}
.hero-split small { display: flex; align-items: center; gap: 0.3rem; font-size: 0.75rem; opacity: 0.85; font-weight: 600; }
.hero-split strong { display: block; font-size: 1.02rem; font-weight: 800; margin-top: 0.15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (min-width: 640px) {
    .hero { padding: 1.75rem 1.75rem 1.5rem; }
    .hero-value { font-size: 2.5rem; }
}

/* Aksi cepat */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.6rem;
    margin-top: 1rem;
}
.quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 0.8rem 0.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    color: var(--text-2);
    font-size: 0.74rem;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    box-shadow: var(--shadow-1);
    transition: transform 0.15s var(--ease), border-color 0.15s var(--ease);
    line-height: 1.25;
}
.quick-action:hover { border-color: var(--border-strong); color: var(--text); transform: translateY(-1px); }

/* Statistik */
.stat { display: flex; flex-direction: column; gap: 0.25rem; }
.stat-label { font-size: 0.8rem; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 0.4rem; }
.stat-value { font-size: 1.45rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.stat-hint { font-size: 0.78rem; color: var(--muted); }

.stat-card { display: flex; gap: 0.85rem; align-items: flex-start; }

.mini-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
    gap: 0.75rem;
}
.mini-stat {
    background: var(--surface-2);
    border-radius: var(--r-md);
    padding: 0.8rem 0.9rem;
    min-width: 0;
}
.mini-stat small { display: block; font-size: 0.74rem; color: var(--muted); font-weight: 600; }
.mini-stat strong { display: block; font-size: 1.05rem; font-weight: 800; margin-top: 0.1rem; overflow-wrap: anywhere; }
.mini-stat .badge { white-space: normal; }

/* ============================================================
   Badge & Chip
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.22rem 0.6rem;
    border-radius: var(--r-pill);
    font-size: 0.74rem;
    font-weight: 700;
    white-space: nowrap;
    background: var(--surface-2);
    color: var(--text-2);
    line-height: 1.35;
}
.badge-hijau, .badge-success { background: var(--success-soft); color: var(--success-ink); }
.badge-kuning, .badge-warning { background: var(--warning-soft); color: var(--warning-ink); }
.badge-merah, .badge-danger { background: var(--danger-soft); color: var(--danger-ink); }
.badge-brand { background: var(--brand-soft); color: var(--brand-ink); }

/* ============================================================
   Progres / Batang
   ============================================================ */
.progress {
    width: 100%;
    height: 8px;
    border-radius: var(--r-pill);
    background: var(--surface-3);
    overflow: hidden;
}
.progress.lg { height: 12px; }
.progress > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--pos, var(--brand));
    transition: width 0.6s var(--ease);
}
.progress > span.fill-hijau { background: var(--success); }
.progress > span.fill-kuning { background: var(--warning); }
.progress > span.fill-merah { background: var(--danger); }
.progress > span.fill-netral { background: var(--faint); }

/* Distribusi alokasi (batang bertumpuk) */
.stacked {
    display: flex;
    height: 14px;
    border-radius: var(--r-pill);
    overflow: hidden;
    background: var(--surface-3);
    gap: 2px;
}
.stacked > span { background: var(--pos); transition: width 0.3s var(--ease); min-width: 0; }

/* Daftar pos anggaran */
.budget-list { display: flex; flex-direction: column; gap: 1.1rem; }
.budget-item { display: flex; gap: 0.8rem; align-items: flex-start; }
.budget-item .grow { display: flex; flex-direction: column; gap: 0.4rem; }
.budget-top { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.budget-top strong { font-size: 0.92rem; }
.budget-meta { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.78rem; color: var(--muted); flex-wrap: wrap; }

/* ============================================================
   5 Lapis
   ============================================================ */
.layers { display: flex; flex-direction: column; }
.layer {
    border-top: 1px solid var(--border);
}
.layer:first-child { border-top: 0; }
.layer summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 0;
    cursor: pointer;
}
.layer summary::-webkit-details-marker { display: none; }
.layer-num {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 0.82rem;
    flex-shrink: 0;
    background: var(--surface-2);
    color: var(--text-2);
}
.layer-num.hijau { background: var(--success-soft); color: var(--success); }
.layer-num.kuning { background: var(--warning-soft); color: var(--warning); }
.layer-num.merah { background: var(--danger-soft); color: var(--danger); }
.layer-title { font-weight: 700; font-size: 0.92rem; }
.layer-sub { font-size: 0.78rem; color: var(--muted); }
.layer-chev { color: var(--faint); transition: transform 0.2s var(--ease); }
.layer[open] .layer-chev { transform: rotate(180deg); }
.layer-body {
    font-size: 0.85rem;
    color: var(--text-2);
    padding: 0 0 0.95rem 2.7rem;
}

/* ============================================================
   Daftar Transaksi
   ============================================================ */
.tx-group + .tx-group { border-top: 1px solid var(--border); }
.tx-date {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 1.15rem;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--muted);
    background: var(--surface-2);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.tx-list { list-style: none; }
.tx-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    width: 100%;
    padding: 0.8rem 1.15rem;
    background: none;
    border: 0;
    text-align: left;
    cursor: pointer;
    border-top: 1px solid var(--border);
    transition: background 0.12s var(--ease);
}
.tx-list li:first-child .tx-item { border-top: 0; }
.tx-item:hover { background: var(--surface-2); }
.tx-item.static { cursor: default; }
.tx-item.static:hover { background: none; }
.tx-main { flex: 1; min-width: 0; display: block; }
.tx-title {
    font-weight: 700;
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
}
.tx-title span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-sub {
    display: block;
    font-size: 0.78rem;
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tx-amount { font-weight: 800; font-size: 0.93rem; white-space: nowrap; text-align: right; }
.tx-amount.masuk { color: var(--success); }
.tx-amount.keluar { color: var(--text); }
.tx-edit { color: var(--faint); }

@media (max-width: 639px) {
    .tx-item { padding: 0.75rem 1rem; gap: 0.7rem; }
    .tx-item .icon-tile { width: 36px; height: 36px; border-radius: 11px; }
    .tx-amount { font-size: 0.86rem; }
    .tx-edit, .tx-title .badge { display: none; }
    .tx-date { padding: 0.6rem 1rem; }
}

.summary-bar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
    margin-bottom: 1rem;
}
.summary-bar > div {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 0.65rem 0.8rem;
    min-width: 0;
}
.summary-bar small { display: block; font-size: 0.72rem; color: var(--muted); font-weight: 600; }
.summary-bar strong { display: block; font-size: 0.8rem; font-weight: 800; letter-spacing: -0.01em; overflow-wrap: anywhere; line-height: 1.3; }

@media (min-width: 640px) {
    .summary-bar strong { font-size: 1.05rem; }
}

/* Filter */
.filters {
    display: grid;
    gap: 0.6rem;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 1rem;
}
.filters .search-field, .filters .filter-actions { grid-column: 1 / -1; }
@media (min-width: 760px) {
    .filters { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) auto; align-items: center; }
    .filters .search-field, .filters .filter-actions { grid-column: auto; }
}
.search-field { position: relative; }
.search-field .ikon {
    position: absolute;
    left: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--faint);
    pointer-events: none;
}
.search-field .input { padding-left: 2.4rem; }

/* ============================================================
   Formulir
   ============================================================ */
.field { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 1rem; }
.field:last-child { margin-bottom: 0; }
.label { font-size: 0.84rem; font-weight: 700; color: var(--text); }
.label small, .hint { font-weight: 500; color: var(--muted); font-size: 0.78rem; }

.input {
    width: 100%;
    min-height: 44px;
    padding: 0.6rem 0.85rem;
    border-radius: var(--r-md);
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text);
    font-size: 16px; /* cegah zoom otomatis iOS */
    transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
    -webkit-appearance: none;
    appearance: none;
}
.input::placeholder { color: var(--faint); }
.input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent);
}
select.input {
    padding-right: 2.2rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23889' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
}
.input-sm { min-height: 38px; padding: 0.4rem 0.7rem; font-size: 0.9rem; }

.input-money {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    min-height: 58px;
    padding-left: 3rem;
}
.money-field { position: relative; }
.money-field::before {
    content: "Rp";
    position: absolute;
    left: 0.95rem;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 800;
    color: var(--muted);
    font-size: 1.05rem;
    pointer-events: none;
}

.form-grid { display: grid; gap: 0 0.85rem; grid-template-columns: 1fr; }
@media (min-width: 520px) {
    .form-grid { grid-template-columns: 1fr 1fr; }
}

.password-field { position: relative; }
.password-field .input { padding-right: 3rem; }
.password-toggle {
    position: absolute;
    right: 0.35rem;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 0;
    background: none;
    color: var(--muted);
    border-radius: var(--r-sm);
    cursor: pointer;
}
.password-toggle:hover { color: var(--text); background: var(--surface-2); }

/* Segmented control (jenis transaksi) */
.segmented {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.3rem;
    padding: 0.3rem;
    background: var(--surface-2);
    border-radius: var(--r-md);
}
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 42px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--muted);
    cursor: pointer;
    transition: background 0.15s var(--ease), color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.segmented input:checked + label { background: var(--surface); color: var(--text); box-shadow: var(--shadow-2); }
.segmented input[value="keluar"]:checked + label { color: var(--danger); }
.segmented input[value="masuk"]:checked + label { color: var(--success); }
.segmented input:focus-visible + label { outline: 2px solid var(--brand); outline-offset: 1px; }

/* Pilihan berupa kartu radio */
.choice-list { display: flex; flex-direction: column; gap: 0.55rem; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.85rem 0.95rem;
    border: 1.5px solid var(--border);
    border-radius: var(--r-md);
    cursor: pointer;
    transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.choice label:hover { border-color: var(--border-strong); }
.choice-radio {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--border-strong);
    margin-top: 0.15rem;
    flex-shrink: 0;
    transition: border 0.15s var(--ease);
}
.choice input:checked + label { border-color: var(--brand); background: var(--brand-soft); }
.choice input:checked + label .choice-radio { border: 5px solid var(--brand); }
.choice input:focus-visible + label { outline: 2px solid var(--brand); outline-offset: 2px; }
.choice strong { display: block; font-size: 0.9rem; }
.choice small { color: var(--muted); font-size: 0.8rem; }

/* Chip saran kategori */
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }
.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-2);
    border-radius: var(--r-pill);
    padding: 0.3rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s var(--ease), border-color 0.15s var(--ease);
}
.chip:hover { background: var(--surface-2); border-color: var(--border-strong); }
.chip.active { background: var(--brand-soft); border-color: transparent; color: var(--brand-ink); }

/* Editor rincian anggaran */
.rincian-list { display: flex; flex-direction: column; gap: 0.5rem; }
.rincian-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 10.5rem) auto;
    gap: 0.45rem;
    align-items: center;
}
.rincian-row .input { min-height: 42px; }
.rincian-meta {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.76rem;
    color: var(--muted);
    margin: -0.1rem 0 0.35rem;
}
.rincian-meta .progress { height: 5px; flex: 0 0 64px; }
.rincian-meta a { color: inherit; }
.rincian-meta a:hover { color: var(--brand); text-decoration: underline; }
.rincian-lainnya {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: 0.75rem;
    padding: 0.65rem 0.8rem;
    border-radius: var(--r-md);
    background: var(--warning-soft);
    color: var(--warning-ink);
    font-size: 0.8rem;
}
.rincian-lainnya:hover { color: var(--warning-ink); filter: brightness(0.98); }
.money-field.sm::before { font-size: 0.85rem; left: 0.75rem; }
.money-field.sm .input { padding-left: 2.2rem; font-weight: 700; text-align: right; }
@media (max-width: 560px) {
    .rincian-list { gap: 0.6rem; }
    .rincian-row {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas: "nama hapus" "nominal nominal" "meta meta";
        gap: 0.4rem;
        padding: 0.55rem;
        background: var(--surface-2);
        border-radius: var(--r-md);
    }
    .rincian-row > .input { grid-area: nama; min-height: 38px; background: transparent; border-color: transparent; font-weight: 600; padding-left: 0.45rem; }
    .rincian-row > .input:focus { background: var(--surface); border-color: var(--brand); }
    .rincian-row > .money-field { grid-area: nominal; }
    .rincian-row > [data-hapus-rincian] { grid-area: hapus; }
    .rincian-row > .rincian-meta { grid-area: meta; margin: 0 0.2rem; }
}

/* Bilah simpan menempel di bawah */
.save-bar {
    position: sticky;
    bottom: calc(var(--bottom-nav-h) + 0.75rem + env(safe-area-inset-bottom));
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.9rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-3);
}
.save-bar small { display: block; font-size: 0.74rem; }
.save-bar strong { display: block; font-size: 1.05rem; font-weight: 800; }
@media (min-width: 960px) {
    .save-bar { bottom: 1rem; }
}

/* Rincian realisasi di Beranda */
.budget-detail { margin-top: 0.15rem; }
.budget-detail > summary { list-style: none; cursor: pointer; font-size: 0.78rem; font-weight: 700; color: var(--brand); display: inline-flex; align-items: center; gap: 0.2rem; }
.budget-detail > summary::-webkit-details-marker { display: none; }
.budget-detail[open] .chev { transform: rotate(180deg); }
.budget-detail .chev { color: currentColor; }
.budget-sub { list-style: none; display: flex; flex-direction: column; gap: 0.45rem; margin-top: 0.55rem; padding: 0.7rem 0.8rem; background: var(--surface-2); border-radius: var(--r-md); }
.budget-sub li { display: flex; justify-content: space-between; gap: 0.75rem; font-size: 0.8rem; }
.budget-sub li span:first-child { color: var(--text-2); min-width: 0; overflow-wrap: anywhere; }
.budget-sub li span:last-child { white-space: nowrap; font-weight: 700; }
.budget-sub .lewat { color: var(--danger); }

/* ============================================================
   Tombol
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 42px;
    padding: 0.55rem 1rem;
    border-radius: var(--r-md);
    border: 1px solid transparent;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    transition: background 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease), transform 0.1s var(--ease), box-shadow 0.15s var(--ease);
    -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.98); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-primary { background: var(--brand); color: var(--on-brand); box-shadow: 0 6px 14px -6px color-mix(in srgb, var(--brand) 70%, transparent); }
.btn-primary:hover { background: var(--brand-hover); color: var(--on-brand); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { color: #fff; filter: brightness(0.95); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { color: #fff; filter: brightness(0.95); }
.btn-outline { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn-outline:hover { background: var(--surface-2); color: var(--text); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-soft { background: var(--brand-soft); color: var(--brand-ink); }
.btn-soft:hover { color: var(--brand-ink); filter: brightness(0.97); }
.btn-danger-ghost { background: transparent; color: var(--danger); }
.btn-danger-ghost:hover { background: var(--danger-soft); color: var(--danger); }

.btn-sm { min-height: 34px; padding: 0.35rem 0.75rem; font-size: 0.82rem; border-radius: 10px; }
.btn-lg { min-height: 50px; padding: 0.75rem 1.25rem; font-size: 0.98rem; }
.btn-block { width: 100%; }
.btn-icon { width: 40px; min-height: 40px; padding: 0; }
.btn-icon.btn-sm { width: 34px; min-height: 34px; }

@media (max-width: 520px) {
    .page-actions .btn-label-optional { display: none; }
}

/* ============================================================
   Alert & Toast
   ============================================================ */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.85rem 1rem;
    border-radius: var(--r-md);
    margin-bottom: 1rem;
    font-size: 0.88rem;
    font-weight: 500;
    background: var(--surface-2);
    color: var(--text-2);
    border: 1px solid transparent;
}
.alert .ikon { margin-top: 0.1rem; }
.alert-body { flex: 1; min-width: 0; }
.alert-body strong { font-weight: 700; }
.alert-sukses { background: var(--success-soft); color: var(--success-ink); }
.alert-bahaya { background: var(--danger-soft); color: var(--danger-ink); }
.alert-peringatan { background: var(--warning-soft); color: var(--warning-ink); }
.alert-info { background: var(--brand-soft); color: var(--brand-ink); }
.alert-close {
    background: none;
    border: 0;
    color: inherit;
    opacity: 0.6;
    cursor: pointer;
    padding: 0.1rem;
    border-radius: 6px;
}
.alert-close:hover { opacity: 1; }

.toast-wrap {
    position: fixed;
    left: 50%;
    top: calc(0.75rem + env(safe-area-inset-top));
    transform: translateX(-50%);
    z-index: 1100;
    width: min(calc(100% - 1.5rem), 460px);
    pointer-events: none;
}
.toast-wrap .alert {
    pointer-events: auto;
    box-shadow: var(--shadow-3);
    border-color: color-mix(in srgb, currentColor 14%, transparent);
    background-clip: padding-box;
    animation: toastIn 0.3s var(--ease);
}
.toast-wrap .alert.hide { opacity: 0; transform: translateY(-8px); transition: all 0.25s var(--ease); }

@supports (background: color-mix(in srgb, red 50%, blue)) {
    .toast-wrap .alert-sukses { background: color-mix(in srgb, var(--success) 12%, var(--surface)); }
    .toast-wrap .alert-bahaya { background: color-mix(in srgb, var(--danger) 12%, var(--surface)); }
    .toast-wrap .alert-peringatan { background: color-mix(in srgb, var(--warning) 14%, var(--surface)); }
    .toast-wrap .alert-info { background: color-mix(in srgb, var(--brand) 12%, var(--surface)); }
}

/* ============================================================
   Modal (bottom sheet di ponsel, dialog di layar lebar)
   ============================================================ */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: flex-end;
    justify-content: center;
    background: var(--overlay);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}
.modal.open { display: flex; animation: fadeIn 0.2s var(--ease); }

.modal-box {
    width: 100%;
    max-height: 92vh;
    max-height: 92dvh;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    box-shadow: var(--shadow-3);
    animation: sheetUp 0.28s var(--ease);
    padding-bottom: env(safe-area-inset-bottom);
}
.modal-box::before {
    content: "";
    width: 40px;
    height: 4px;
    border-radius: 4px;
    background: var(--border-strong);
    margin: 0.55rem auto 0;
    flex-shrink: 0;
}
.modal-box > form { display: flex; flex-direction: column; min-height: 0; flex: 1; }

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.6rem 1.15rem 0.75rem;
}
.modal-head h3 { font-size: 1.08rem; font-weight: 800; }
.modal-head p { font-size: 0.8rem; color: var(--muted); }
.modal-body { padding: 0.25rem 1.15rem 1rem; overflow-y: auto; flex: 1; -webkit-overflow-scrolling: touch; }
.modal-foot {
    display: flex;
    gap: 0.6rem;
    padding: 0.85rem 1.15rem 1rem;
    border-top: 1px solid var(--border);
    background: var(--surface);
}
.modal-foot .btn { flex: 1; }
.modal-foot .btn-danger-ghost { flex: 0 0 auto; }

@media (min-width: 640px) {
    .modal { align-items: center; padding: 1.5rem; }
    .modal-box {
        max-width: 500px;
        border-radius: var(--r-xl);
        animation: popIn 0.22s var(--ease);
        padding-bottom: 0;
    }
    .modal-box::before { display: none; }
    .modal-head { padding: 1.2rem 1.4rem 0.6rem; }
    .modal-body { padding: 0.4rem 1.4rem 1.2rem; }
    .modal-foot { padding: 1rem 1.4rem; justify-content: flex-end; border-radius: 0 0 var(--r-xl) var(--r-xl); }
    .modal-foot .btn { flex: 0 0 auto; }
}

/* Menu lainnya (ponsel) */
.menu-list { display: flex; flex-direction: column; gap: 0.25rem; padding-bottom: 0.5rem; }
.menu-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 0.5rem;
    border-radius: var(--r-md);
    color: var(--text);
    font-weight: 600;
    width: 100%;
    background: none;
    border: 0;
    text-align: left;
    cursor: pointer;
}
.menu-item:hover { background: var(--surface-2); color: var(--text); }
.menu-item small { display: block; font-weight: 500; color: var(--muted); font-size: 0.78rem; }
.menu-item.danger { color: var(--danger); }

/* ============================================================
   Kosong, Panduan Awal, Catatan Rapat
   ============================================================ */
.empty {
    text-align: center;
    padding: 2.5rem 1.25rem;
    color: var(--muted);
}
.empty .icon-tile { margin: 0 auto 0.85rem; width: 56px; height: 56px; border-radius: 18px; }
.empty h3 { color: var(--text); font-size: 1.02rem; font-weight: 800; margin-bottom: 0.3rem; }
.empty p { font-size: 0.88rem; max-width: 380px; margin: 0 auto 1.1rem; }

.steps { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; counter-reset: step; }
.step {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    background: var(--surface);
}
.step-num {
    counter-increment: step;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--brand-soft);
    color: var(--brand);
    font-weight: 800;
    font-size: 0.8rem;
    flex-shrink: 0;
}
.step-num::before { content: counter(step); }
.step.done .step-num { background: var(--success-soft); color: var(--success); }
.step.done .step-num::before { content: "✓"; }
.step.done strong { text-decoration: line-through; color: var(--muted); }
.step strong { display: block; font-size: 0.9rem; }
.step small { color: var(--muted); font-size: 0.8rem; }

.notes { list-style: none; display: flex; flex-direction: column; gap: 0.6rem; }
.note {
    display: flex;
    gap: 0.75rem;
    padding: 0.8rem 0.9rem;
    border-radius: var(--r-md);
    background: var(--surface-2);
    font-size: 0.86rem;
    border-left: 3px solid var(--faint);
}
.note strong { display: block; font-size: 0.88rem; margin-bottom: 0.1rem; }
.note span { color: var(--text-2); }
.note-perhatian { border-left-color: var(--danger); }
.note-positif { border-left-color: var(--success); }
.note-info { border-left-color: var(--brand); }
.note-komitmen { border-left-color: var(--c-tabungan); }
.note .ikon { margin-top: 0.1rem; }
.note-perhatian .ikon { color: var(--danger); }
.note-positif .ikon { color: var(--success); }
.note-info .ikon { color: var(--brand); }
.note-komitmen .ikon { color: var(--c-tabungan); }

.collapsible > summary { list-style: none; cursor: pointer; }
.collapsible > summary::-webkit-details-marker { display: none; }
.collapsible[open] .chev { transform: rotate(180deg); }
.chev { transition: transform 0.2s var(--ease); color: var(--faint); }

/* Kartu tujuan */
.goal-card { display: flex; flex-direction: column; gap: 0.9rem; }
.goal-card .row-between h3 { font-size: 1rem; font-weight: 800; overflow-wrap: anywhere; }
.goal-amounts { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; }
.goal-amounts strong { font-size: 1.15rem; font-weight: 800; }
.kv { display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.84rem; background: var(--surface-2); border-radius: var(--r-md); padding: 0.75rem 0.85rem; }
.kv > div { display: flex; justify-content: space-between; gap: 0.75rem; }
.kv dt, .kv .k { color: var(--muted); }
.kv dd, .kv .v { font-weight: 700; text-align: right; white-space: nowrap; }
.kv .sep { border-top: 1px dashed var(--border-strong); padding-top: 0.4rem; }
.goal-actions { display: flex; gap: 0.5rem; margin-top: auto; }
.goal-actions .btn:first-child { flex: 1; }

.tip {
    border-radius: var(--r-lg);
    padding: 1.1rem 1.15rem;
    background: var(--brand-soft);
    color: var(--brand-ink);
    font-size: 0.86rem;
}
.tip strong { display: flex; align-items: center; gap: 0.45rem; margin-bottom: 0.3rem; font-size: 0.92rem; }

/* Kartu anggota */
.member {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.9rem 1.15rem;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}
.member:first-child { border-top: 0; }
.member .grow strong { display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; font-size: 0.93rem; }
.member .grow small { display: block; color: var(--muted); font-size: 0.8rem; overflow-wrap: anywhere; }
.member-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }
@media (max-width: 560px) {
    .member-actions { width: 100%; padding-left: 3.1rem; }
}

/* ============================================================
   Halaman Masuk & Instalasi
   ============================================================ */
.auth-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: 1.5rem 1rem;
    background:
        radial-gradient(1200px 600px at 10% -10%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 60%),
        radial-gradient(900px 500px at 110% 110%, color-mix(in srgb, var(--c-tabungan) 18%, transparent), transparent 60%),
        var(--bg);
}
.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-3);
    padding: 2rem 1.4rem;
}
.auth-card.wide { max-width: 560px; }
@media (min-width: 520px) {
    .auth-card { padding: 2.25rem 2rem; }
}
.auth-brand { text-align: center; margin-bottom: 1.6rem; }
.auth-brand .brand-mark { width: 84px; height: auto; margin: 0 auto 0.85rem; }
.auth-logo { display: block; width: 100%; max-width: 330px; height: auto; margin: 0 auto; }
.auth-brand h1 { font-size: 1.4rem; font-weight: 800; }
.auth-brand p { color: var(--muted); font-size: 0.88rem; margin-top: 0.2rem; }
.auth-foot { text-align: center; font-size: 0.8rem; color: var(--muted); margin-top: 1.25rem; }
.form-section { font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 1.4rem 0 0.75rem; }
.form-section:first-of-type { margin-top: 0; }

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.85em;
    background: var(--surface-2);
    padding: 0.1rem 0.35rem;
    border-radius: 5px;
}

/* ============================================================
   Animasi
   ============================================================ */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes popIn { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

@media print {
    .sidebar, .topbar, .bottom-nav, .page-actions, .quick-actions, .modal, .toast-wrap { display: none !important; }
    .content { padding: 0; }
    body { background: #fff; }
}

/* ============================================================
   Nota: lampiran & scan otomatis
   ============================================================ */
.nota-pick {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.75rem 0.85rem;
    border: 1.5px dashed var(--border-strong);
    border-radius: var(--r-md);
    background: var(--surface-2);
    cursor: pointer;
    transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.nota-pick:hover { border-color: var(--brand); background: var(--brand-soft); }
.nota-pick strong { display: block; font-size: 0.92rem; }
.nota-pick small { display: block; font-size: 0.78rem; color: var(--muted); }
input[data-nota-input]:focus-visible + .nota-pick { outline: 2px solid var(--brand); outline-offset: 2px; }

.nota-preview {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    background: var(--surface-2);
}
.nota-preview img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
    background: var(--surface-3);
}
.nota-preview strong { display: block; font-size: 0.88rem; }
.nota-preview small { display: block; font-size: 0.78rem; line-height: 1.4; }
.nota-preview small.memuat::before {
    content: "";
    display: inline-block;
    width: 11px;
    height: 11px;
    margin-right: 0.4rem;
    vertical-align: -1px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: putar 0.8s linear infinite;
}
.nota-lama { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; margin-top: 0.5rem; }
.nota-teks { margin-top: 0.4rem; }
.nota-teks summary { cursor: pointer; }
.nota-teks pre {
    margin-top: 0.4rem;
    max-height: 160px;
    overflow: auto;
    padding: 0.6rem 0.7rem;
    background: var(--surface-2);
    border-radius: var(--r-sm);
    font-size: 0.75rem;
    white-space: pre-wrap;
}
.terisi-otomatis { animation: sorot 1.6s var(--ease); }
.tx-clip { color: var(--faint); display: inline-flex; }

@keyframes putar { to { transform: rotate(360deg); } }
@keyframes sorot {
    0%, 40% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 30%, transparent); border-color: var(--success); }
    100% { box-shadow: none; }
}

/* ============================================================
   DeKa: tombol melayang + panel chat
   ============================================================ */
.dk-fab {
    position: fixed;
    right: 16px;
    bottom: calc(var(--bottom-nav-h) + 14px + env(safe-area-inset-bottom));
    z-index: 70;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: 1px solid color-mix(in srgb, var(--brand) 25%, var(--border));
    background: var(--surface);
    color: var(--brand);
    box-shadow: 0 12px 28px -10px rgba(16, 24, 40, 0.45);
    cursor: pointer;
    transition: transform 0.15s var(--ease);
    -webkit-tap-highlight-color: transparent;
}
.dk-fab:active { transform: scale(0.94); }
.dk-fab-teks { display: none; font-weight: 800; font-size: 0.92rem; }
body.dkbot-terbuka .dk-fab, body.no-scroll .dk-fab { display: none; }

.dkbot-latar {
    position: fixed;
    inset: 0;
    z-index: 940;
    background: var(--overlay);
    animation: fadeIn 0.2s var(--ease);
}
.dkbot {
    position: fixed;
    z-index: 950;
    left: 0;
    right: 0;
    bottom: 0;
    top: calc(env(safe-area-inset-top) + 4vh);
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    box-shadow: var(--shadow-3);
    overflow: hidden;
    animation: sheetUp 0.28s var(--ease);
}
.dkbot[hidden] { display: none; }
.dkbot-head {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.8rem 0.75rem 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}
.dkbot-head strong { display: block; font-size: 1rem; }
.dkbot-head small { display: block; font-size: 0.76rem; color: var(--muted); }

@media (min-width: 640px) {
    .content { padding-bottom: 6rem; }
    .dk-fab {
        right: 24px;
        bottom: 24px;
        width: auto;
        height: 52px;
        padding: 0 1.15rem 0 1rem;
        border-radius: var(--r-pill);
        border: 0;
        background: var(--brand-grad);
        color: #fff;
        box-shadow: 0 14px 30px -12px rgba(0, 85, 234, 0.7);
    }
    .dk-fab-teks { display: inline; }
    .dkbot-latar { display: none; }
    .dkbot {
        left: auto;
        top: auto;
        right: 24px;
        bottom: 24px;
        width: 400px;
        height: min(660px, calc(100vh - 48px));
        height: min(660px, calc(100dvh - 48px));
        border-radius: var(--r-xl);
        border: 1px solid var(--border);
        animation: popIn 0.22s var(--ease);
    }
}
@media (max-width: 959px) {
    .content { padding-bottom: calc(var(--bottom-nav-h) + 5.5rem + env(safe-area-inset-bottom)); }
}

.chat-log {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 1rem 0.9rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    background:
        radial-gradient(600px 300px at 100% 0, color-mix(in srgb, var(--brand) 6%, transparent), transparent 70%),
        var(--bg);
    -webkit-overflow-scrolling: touch;
}
.chat-avatar.besar { width: 36px; height: 36px; font-size: 0.78rem; }
.chat-baris { display: flex; align-items: flex-end; gap: 0.45rem; max-width: 100%; }
.chat-baris.saya { justify-content: flex-end; }
.chat-avatar {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--brand-grad);
    color: #fff;
    font-size: 0.66rem;
    font-weight: 800;
    display: grid;
    place-items: center;
}
.chat-gelembung {
    max-width: min(82%, 420px);
    padding: 0.6rem 0.8rem;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.45;
    background: var(--surface);
    border: 1px solid var(--border);
    border-bottom-left-radius: 5px;
    box-shadow: var(--shadow-1);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    overflow-wrap: anywhere;
}
.chat-baris.saya .chat-gelembung {
    background: var(--brand);
    color: var(--on-brand);
    border-color: transparent;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 5px;
}
.chat-gelembung.galat { background: var(--danger-soft); color: var(--danger-ink); border-color: transparent; }
.chat-gelembung.sukses { background: var(--success-soft); color: var(--success-ink); border-color: transparent; }
.chat-teks { white-space: pre-line; }
.chat-foto { max-width: 180px; max-height: 220px; border-radius: 10px; object-fit: cover; }
.chat-pdf { font-size: 0.8rem; font-weight: 600; }
.chat-saran { display: flex; flex-wrap: wrap; gap: 0.4rem; padding-left: 2.2rem; }

.chat-mengetik .chat-gelembung { flex-direction: row; gap: 0.25rem; padding: 0.75rem 0.85rem; }
.chat-mengetik .titik {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--faint);
    animation: ketik 1.2s infinite ease-in-out;
}
.chat-mengetik .titik:nth-child(2) { animation-delay: 0.15s; }
.chat-mengetik .titik:nth-child(3) { animation-delay: 0.3s; }
@keyframes ketik { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-4px); opacity: 1; } }

/* Kartu usulan transaksi */
.chat-kartu { display: flex; flex-direction: column; gap: 0.6rem; padding-left: 2.2rem; }
.kartu-tx {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 0.8rem;
    box-shadow: var(--shadow-2);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-width: 440px;
}
.kartu-tx.tersimpan { gap: 0.15rem; background: var(--success-soft); color: var(--success-ink); border-color: transparent; box-shadow: none; font-size: 0.85rem; }
.kartu-tx.batal { color: var(--muted); font-size: 0.82rem; box-shadow: none; background: var(--surface-2); border-style: dashed; }
.kartu-atas { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.seg-mini { display: inline-flex; padding: 0.2rem; background: var(--surface-2); border-radius: 10px; gap: 0.2rem; }
.seg-mini button { border: 0; background: none; font-size: 0.76rem; font-weight: 700; padding: 0.3rem 0.6rem; border-radius: 8px; color: var(--muted); cursor: pointer; }
.seg-mini button.aktif[data-jenis="keluar"] { background: var(--surface); color: var(--danger); box-shadow: var(--shadow-1); }
.seg-mini button.aktif[data-jenis="masuk"] { background: var(--surface); color: var(--success); box-shadow: var(--shadow-1); }
.kartu-tx .input-money { font-size: 1.35rem; min-height: 50px; }
.kartu-field { display: flex; flex-direction: column; gap: 0.25rem; }
.kartu-field .label { font-size: 0.76rem; color: var(--muted); }
.kartu-dua { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 0.45rem; }
.kartu-tx .chips { margin-top: -0.2rem; }
.kartu-nota { display: flex; align-items: center; gap: 0.55rem; font-size: 0.8rem; color: var(--muted); }
.kartu-nota img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; }
.kartu-info { font-size: 0.78rem; color: var(--muted); }
.kartu-galat { font-size: 0.8rem; color: var(--danger); font-weight: 600; }
.chat-kartu > .btn-success { max-width: 440px; }

/* Area ketik */
.chat-lampiran { display: flex; gap: 0.5rem; padding: 0.55rem 0.9rem 0; overflow-x: auto; border-top: 1px solid var(--border); background: var(--surface); }
.chat-lampiran-item { position: relative; flex-shrink: 0; }
.chat-lampiran-item img, .chat-lampiran-item .chat-pdf {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    object-fit: cover;
    display: grid;
    place-items: center;
    background: var(--surface-2);
}
.chat-lampiran-x {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 0;
    background: var(--text);
    color: var(--surface);
    font-size: 0.85rem;
    line-height: 1;
    cursor: pointer;
}
.chat-tulis {
    display: flex;
    align-items: flex-end;
    gap: 0.45rem;
    padding: 0.6rem 0.75rem calc(0.6rem + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
    background: var(--surface);
}
.chat-lampiran:not([hidden]) + .chat-tulis { border-top: 0; }
.chat-input {
    flex: 1;
    resize: none;
    min-height: 42px;
    max-height: 120px;
    padding: 0.55rem 0.8rem;
    border-radius: 21px;
    line-height: 1.4;
}
.chat-lampir, .chat-kirim { border-radius: 50%; flex-shrink: 0; }
.chat-lampir { color: var(--brand); cursor: pointer; }
@media (min-width: 640px) {
    .chat-tulis { padding-bottom: 0.75rem; }
}
@media (max-width: 480px) {
    .chat-kartu, .chat-saran { padding-left: 0; }
    .kartu-tx { max-width: none; }
    .chat-log { padding-left: 0.7rem; padding-right: 0.7rem; }
}

/* ============================================================
   Panel Superadmin
   ============================================================ */
.bottom-nav-sederhana { grid-template-columns: repeat(5, 1fr); }
.bn-form { display: contents; }
.bn-form .bn-link { width: 100%; }

@media (min-width: 640px) {
    .filters.filters-super { grid-template-columns: minmax(0, 1fr) repeat(3, 170px) auto; }
    .filters.filters-super .search-field { grid-column: auto; }
}
.keluarga-item.nonaktif > .avatar { filter: grayscale(1); opacity: 0.6; }
.keluarga-item.nonaktif .grow > strong { color: var(--muted); }
.admin-baris { display: flex !important; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
.admin-baris .ikon { flex: none; }
.link-kecil {
    background: none;
    border: 0;
    padding: 0;
    color: var(--brand);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.link-kecil:hover { text-decoration: underline; }
.keluarga-item { align-items: flex-start; }
@media (max-width: 560px) {
    .keluarga-item .member-actions { padding-left: 0; gap: 0.25rem; }
    .keluarga-item .member-actions .btn { padding-inline: 0.6rem; }
}

/* Isi halaman baru diperbarui otomatis (mis. setelah DeKa menyimpan) */
#konten.segar { animation: konten-segar 0.6s var(--ease); }
@keyframes konten-segar { from { opacity: 0.45; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { #konten.segar { animation: none; } }

/* Kartu rencana anggaran di DeKa */
.kartu-anggaran .kartu-atas .badge { font-size: 0.72rem; }
.kartu-lama { font-size: 0.78rem; color: var(--muted); margin-top: -0.2rem; }
.kartu-anggaran .input-money { font-size: 1.2rem; min-height: 46px; }

/* PWA: tombol pasang di sidebar */
.side-pasang { width: 100%; background: none; border: 0; font: inherit; cursor: pointer; text-align: left; margin-top: 0.35rem; color: var(--brand); }
/* Mode aplikasi terpasang (standalone): jarak aman notch di atas */
@media (display-mode: standalone) {
    .topbar { padding-top: max(0.75rem, env(safe-area-inset-top)); }
}

/* Rekomendasi anggaran ideal (50/30/20) */
.rek-list { display: flex; flex-direction: column; gap: 1rem; }
.rek-item strong { font-size: 0.92rem; }
.rek-item strong small { display: block; font-size: 0.74rem; }
.fw-normal { font-weight: 500; }
.rek-angka { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.15rem 0.75rem; margin: 0.35rem 0 0.4rem; }
.rek-bar { position: relative; }
.rek-bar > i {
    position: absolute;
    top: -3px;
    bottom: -3px;
    width: 2px;
    margin-left: -1px;
    background: var(--text);
    border-radius: 2px;
    opacity: 0.55;
}

/* Rencana pensiun */
.form-pensiun .form-grid { align-items: start; }
.hero-pensiun { display: flex; flex-direction: column; gap: 0.35rem; }
.hero-pensiun .hero-value { display: block; overflow-wrap: anywhere; }
.hero-pensiun p { margin: 0; opacity: 0.9; font-size: 0.88rem; position: relative; }
.form-pensiun input:disabled { opacity: 0.75; }

/* Kolom yang difokus/digulir tidak tertutup bilah simpan yang menempel di bawah */
html:has(.save-bar) { scroll-padding-bottom: calc(var(--bottom-nav-h) + 6rem); }
@media (min-width: 960px) { html:has(.save-bar) { scroll-padding-bottom: 6rem; } }
.note > span > strong { display: block; color: var(--text); }

/* Periode keuangan (mengikuti tanggal gajian) */
.periode-contoh {
    margin-top: 0.75rem;
    padding: 0.75rem 0.85rem;
    border-radius: var(--r-md);
    background: var(--brand-soft, var(--surface-2));
    font-size: 0.85rem;
    line-height: 1.5;
}
.month-switch label.dua-baris { line-height: 1.15; }
.month-switch label.dua-baris small { display: block; font-size: 0.68rem; font-weight: 600; color: var(--muted); }
.hero-rentang { display: inline-block; font-size: 0.74rem; font-weight: 600; opacity: 0.85; }
.panduan-gajian { margin: 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: 0.35rem; color: var(--text-2); }

/* Rencana pensiun: garis waktu, skenario, formulir bertahap */
.gw {
    display: grid;
    grid-template-columns: 1fr 1fr; /* lebar sebenarnya diatur di halaman sesuai lama tahun */
    row-gap: 0.55rem;
}
.gw-seg {
    padding: 0.5rem 0.65rem;
    font-size: 0.78rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gw-seg b { font-weight: 800; }
.gw-nabung { background: var(--brand); border-radius: var(--r-pill) 0 0 var(--r-pill); }
.gw-pensiun { background: var(--warning); color: #3b2a00; border-radius: 0 var(--r-pill) var(--r-pill) 0; }
.gw-titik { display: flex; flex-direction: column; font-size: 0.78rem; line-height: 1.3; }
.gw-titik small { color: var(--muted); font-size: 0.72rem; }
.gw-awal { grid-column: 1; grid-row: 2; }
.gw-tengah { grid-column: 2; grid-row: 2; }
.gw-akhir { grid-column: 2; grid-row: 2; text-align: right; align-items: flex-end; }
@media (max-width: 519px) {
    /* Layar sempit: tiga titik ditumpuk agar tidak bertabrakan */
    .gw-titik { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; text-align: left; align-items: baseline; gap: 0.5rem; }
    .gw-tengah { grid-row: 3; }
    .gw-akhir { grid-row: 4; }
}

.skenario { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.skenario li { display: flex; align-items: center; gap: 0.75rem; padding: 0.65rem 0; border-top: 1px solid var(--border); }
.skenario li:first-child { border-top: 0; }
.skenario li .grow { display: flex; flex-direction: column; min-width: 0; }
.skenario li .grow strong { font-size: 0.88rem; }
.skenario li .grow small { font-size: 0.76rem; }
.skenario li > b { text-align: right; white-space: nowrap; display: flex; flex-direction: column; align-items: flex-end; font-size: 0.95rem; }
.skenario li > b small { font-weight: 500; color: var(--muted); font-size: 0.72rem; display: inline; }
.skenario li > b em { font-style: normal; font-size: 0.72rem; font-weight: 700; }
.skenario-kini { background: var(--brand-soft); border-radius: var(--r-md); padding: 0.65rem 0.75rem !important; border-top: 0 !important; }
.skenario-kini + li { border-top: 0; }

.form-sub {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    margin: 1.25rem 0 0.7rem;
}
.form-pensiun > .form-sub:first-of-type { margin-top: 0.25rem; }
.form-sub > span {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    background: var(--brand-soft);
    color: var(--brand);
    font-size: 0.72rem;
    letter-spacing: 0;
}
.form-sub small { text-transform: none; letter-spacing: 0; font-weight: 500; }
.asumsi-lanjut > summary { cursor: pointer; list-style: none; }
.asumsi-lanjut > summary::-webkit-details-marker { display: none; }
.asumsi-lanjut > summary .chev { margin-left: auto; transition: transform 0.2s var(--ease); }
.asumsi-lanjut[open] > summary .chev { transform: rotate(180deg); }

.unit-field { position: relative; }
.unit-field::after {
    content: attr(data-unit);
    position: absolute;
    right: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
    pointer-events: none;
}
.unit-field .input { padding-right: 7.5rem; }
.unit-field[data-unit="tahun"] .input, .unit-field[data-unit="%/thn"] .input { padding-right: 3.6rem; }
.unit-field input[type=number] { -moz-appearance: textfield; }
.unit-field input[type=number]::-webkit-inner-spin-button,
.unit-field input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.form-pensiun .input-money { font-size: 1.15rem; min-height: 48px; }
.rincian-hitung > summary { cursor: pointer; }
.form-pensiun .label small { display: block; }

/* Pendaftaran mandiri */
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.auth-judul { font-size: 1.25rem; font-weight: 800; margin-top: 1rem; }
.cek-setuju { display: flex; gap: 0.6rem; align-items: flex-start; margin-top: 1rem; font-size: 0.86rem; color: var(--text-2); line-height: 1.5; cursor: pointer; }
.cek-setuju input { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; accent-color: var(--brand); }
.cek-setuju a { font-weight: 700; }

/* Dokumen publik (Syarat & Ketentuan, Kebijakan Privasi) */
.dok-page { max-width: 820px; margin: 0 auto; padding: 1rem 1rem 3rem; }
.dok-kepala { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.5rem 0 1.25rem; }
.dok-merek { display: flex; align-items: center; gap: 0.5rem; }
.dok-isi { padding: 2rem 1.4rem; }
@media (min-width: 640px) { .dok-isi { padding: 2.5rem 2.5rem; } }
.dok-isi h1 { font-size: clamp(1.6rem, 4vw, 2.1rem); font-weight: 800; letter-spacing: -0.02em; }
.dok-tanggal { color: var(--muted); font-size: 0.85rem; margin-top: 0.3rem; }
.dok-pembuka { margin-top: 1.1rem; font-size: 1.02rem; color: var(--text-2); }
.dok-isi section { margin-top: 1.75rem; }
.dok-isi h2 { font-size: 1.1rem; font-weight: 800; margin-bottom: 0.5rem; }
.dok-isi p, .dok-isi li { color: var(--text-2); font-size: 0.95rem; line-height: 1.7; }
.dok-isi p + p, .dok-isi ul + p, .dok-isi p + ul { margin-top: 0.5rem; }
.dok-isi ul { padding-left: 1.2rem; margin: 0; display: flex; flex-direction: column; gap: 0.35rem; }
.dok-kaki { text-align: center; color: var(--muted); font-size: 0.85rem; margin-top: 1.5rem; }

/* Paket & pemakaian */
.paket-nama { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; }
.paket-kini.paket-trial, .paket-kini.paket-premium { background: linear-gradient(135deg, var(--brand-soft), var(--surface) 70%); border-color: color-mix(in srgb, var(--brand) 30%, var(--border)); }
.pakai .row-between > span { display: inline-flex; align-items: center; gap: 0.4rem; }
.pakai .ikon { color: var(--muted); }
.paket-banding { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.paket-kolom { border: 1px solid var(--border); border-radius: var(--r-lg); padding: 1rem; }
.paket-kolom h3 { font-size: 1rem; font-weight: 800; }
.paket-kolom-premium { border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); background: var(--brand-soft); }
.paket-harga { font-weight: 800; font-size: 1.05rem; margin: 0.25rem 0 0.6rem; }
.paket-harga small { font-weight: 500; color: var(--muted); font-size: 0.75rem; }
.paket-kolom ul { margin: 0; padding-left: 1.05rem; display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.84rem; color: var(--text-2); }
.member-actions form.perpanjang { display: inline-flex; gap: 0.25rem; }

/* ============================================================
   Masuk & Daftar: dua kolom dengan panel ilustrasi berwarna
   (HP: ilustrasi ringkas di atas formulir)
   ============================================================ */
.auth-split { display: grid; grid-template-columns: 1fr; align-content: start; gap: 0; padding: 0 0 2rem; place-items: stretch; }
.auth-split > .auth-card { justify-self: center; width: calc(100% - 2rem); margin-top: -2.5rem; position: relative; z-index: 2; }
.auth-ilustrasi {
    position: relative;
    overflow: hidden;
    color: #fff;
    padding: 1.6rem 1.25rem 3.75rem;
    background: linear-gradient(150deg, #1f6bff 0%, #0055ea 40%, #6d3cf0 100%);
    border-radius: 0 0 32px 32px;
}
.ai-gumpal { position: absolute; border-radius: 50%; filter: blur(40px); opacity: 0.55; pointer-events: none; }
.ai-gumpal-1 { width: 260px; height: 260px; background: #7fd3ff; top: -120px; right: -80px; opacity: 0.5; }
.ai-gumpal-2 { width: 240px; height: 240px; background: #f7287a; bottom: -140px; left: -90px; opacity: 0.4; }
.ai-gumpal-3 { width: 200px; height: 200px; background: #00ae79; top: 40%; left: 55%; opacity: 0.3; }
.ai-isi { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; }
.ai-panggung { position: relative; width: 100%; max-width: 360px; height: 150px; display: grid; place-items: center; }
.ai-logo {
    width: 128px;
    height: 112px;
    display: grid;
    place-items: center;
    background: #fff;
    border-radius: 34px;
    box-shadow: 0 4px 0 rgba(11, 26, 58, 0.12), 0 20px 40px -14px rgba(11, 26, 58, 0.55);
    transform: rotate(-4deg);
}
.ai-logo .logo-tanda { width: 104px; height: auto; overflow: visible; }
.ai-judul { font-family: "Baloo 2", var(--font); font-weight: 800; font-size: 1.5rem; line-height: 1.15; margin-top: 0.4rem; color: #fff; }
.ai-teks { margin-top: 0.35rem; font-size: 0.9rem; color: rgba(255, 255, 255, 0.85); max-width: 26rem; }
.ai-poin { display: none; }

.ai-stiker {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 8px 12px 8px 8px;
    background: #fff;
    color: #0b1a3a;
    border-radius: 16px;
    font-size: 0.72rem;
    text-align: left;
    box-shadow: 0 3px 0 rgba(11, 26, 58, 0.08), 0 14px 28px -12px rgba(11, 26, 58, 0.45);
    animation: ai-ayun 5s ease-in-out infinite;
}
.ai-stiker small { display: block; color: #6b7790; font-size: 0.66rem; font-weight: 600; }
.ai-stiker b { font-weight: 800; }
.ai-stiker > span:first-child:not(.ai-gelembung):not(.ai-cincin) { width: 32px; height: 32px; border-radius: 11px; display: grid; place-items: center; background: #fff3cc; font-size: 1rem; }
.ai-stiker-gaji { left: 0; top: 6px; --r: -6deg; transform: rotate(var(--r)); }
.ai-stiker-gaji b { color: #00ae79; }
.ai-stiker-chat { right: 0; top: 20px; flex-direction: column; align-items: stretch; gap: 5px; padding: 8px; --r: 4deg; transform: rotate(var(--r)); animation-delay: -1.6s; }
.ai-gelembung { display: block; padding: 5px 9px; border-radius: 12px; font-size: 0.7rem; background: #0055ea; color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.ai-gelembung.ai-bot { background: #eef2fb; color: #0b1a3a; align-self: flex-start; border-bottom-right-radius: 12px; border-bottom-left-radius: 4px; }
.ai-stiker-darurat { right: 6%; bottom: -6px; --r: -3deg; transform: rotate(var(--r)); animation-delay: -3.2s; display: none; }
.ai-cincin { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#00ae79 68%, #d9f7ec 0); position: relative; }
.ai-cincin::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: #fff; }
.ai-cincin b { position: relative; font-size: 0.58rem; }
@keyframes ai-ayun { 50% { transform: rotate(var(--r)) translateY(-8px); } }
.ai-koin {
    position: absolute;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 0.65rem;
    color: #8a5a00;
    background: radial-gradient(circle at 35% 30%, #ffe08a, #ffb300 60%, #e09a00);
    box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.12), 0 8px 14px -6px rgba(201, 140, 0, 0.8);
    animation: ai-ayun 4s ease-in-out infinite;
}
.ai-koin-1 { --r: -12deg; left: 18%; bottom: 0; }
.ai-koin-2 { --r: 14deg; right: 26%; bottom: -10px; width: 26px; height: 26px; font-size: 0.55rem; animation-delay: -2s; }
.ai-kilau { position: absolute; fill: #ffb300; width: 22px; animation: ai-kedip 2.6s ease-in-out infinite; }
.ai-kilau-1 { top: 0; left: 40%; }
.ai-kilau-2 { bottom: 20px; left: 8%; fill: #fff; width: 14px; animation-delay: -1.3s; }
@keyframes ai-kedip { 50% { transform: scale(0.55) rotate(45deg); opacity: 0.6; } }
@media (prefers-reduced-motion: reduce) { .ai-stiker, .ai-koin, .ai-kilau { animation: none; } }

@media (max-width: 959px) {
    /* HP: cukup satu stiker agar wajah dompet tidak tertutup */
    .ai-stiker-chat { display: none; }
    .ai-stiker-gaji { left: 2%; top: 10px; }
}

/* Desktop: ilustrasi penuh di kiri, formulir di kanan */
@media (min-width: 960px) {
    .auth-split { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); padding: 0; min-height: 100vh; min-height: 100dvh; }
    .auth-split > .auth-card { align-self: center; margin: 2.5rem auto; width: 100%; max-width: 440px; }
    .auth-ilustrasi { border-radius: 0 40px 40px 0; padding: 3rem 2.5rem; display: grid; place-items: center; min-height: 100vh; min-height: 100dvh; position: sticky; top: 0; }
    .ai-panggung { height: 340px; max-width: 460px; }
    .ai-logo { width: 220px; height: 192px; border-radius: 56px; }
    .ai-logo .logo-tanda { width: 180px; }
    .ai-judul { font-size: 2.3rem; margin-top: 1.5rem; }
    .ai-teks { font-size: 1.02rem; }
    .ai-poin { display: flex; flex-direction: column; gap: 0.55rem; list-style: none; padding: 0; margin: 1.5rem 0 0; text-align: left; }
    .ai-poin li { padding: 0.6rem 0.95rem; border-radius: 14px; background: rgba(255, 255, 255, 0.14); font-weight: 600; font-size: 0.92rem; }
    .ai-stiker { font-size: 0.82rem; padding: 10px 14px 10px 10px; border-radius: 18px; }
    .ai-stiker > span:first-child:not(.ai-gelembung):not(.ai-cincin) { width: 38px; height: 38px; font-size: 1.15rem; }
    .ai-stiker-gaji { left: -2%; top: 18px; }
    .ai-stiker-chat { right: -2%; top: 90px; }
    .ai-gelembung { font-size: 0.78rem; padding: 6px 10px; }
    .ai-stiker-darurat { display: flex; right: 4%; bottom: 10px; }
    .ai-cincin { width: 42px; height: 42px; }
    .ai-koin { width: 44px; height: 44px; font-size: 0.8rem; }
    .ai-koin-1 { left: 10%; bottom: 40px; }
    .ai-koin-2 { right: 34%; bottom: 0; }
    .ai-kilau-1 { top: 10px; left: 62%; width: 30px; }
}

/* Editor artikel blog (Superadmin) */
.input-judul { font-size: 1.2rem; font-weight: 700; }
.input-artikel { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9rem; line-height: 1.6; min-height: 420px; resize: vertical; }
.md-alat { display: flex; flex-wrap: wrap; gap: 0.15rem; }
.md-alat .btn { padding: 0.25rem 0.55rem; min-height: 30px; font-size: 0.78rem; }
.md-bantuan { margin-top: 0.6rem; font-size: 0.85rem; color: var(--text-2); }
.md-bantuan summary { cursor: pointer; font-weight: 700; color: var(--brand); }
.slug-field { display: flex; align-items: center; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.slug-field span { padding: 0 0.6rem; color: var(--muted); font-size: 0.85rem; background: var(--surface-2); align-self: stretch; display: flex; align-items: center; }
.slug-field .input { border: 0; border-radius: 0; box-shadow: none; }
.sampul-pratinjau { width: 100%; border-radius: var(--r-md); aspect-ratio: 1200 / 630; object-fit: cover; }
.serp { margin-top: 0.75rem; padding: 0.85rem 1rem; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.serp small { color: var(--muted); font-size: 0.75rem; }
.serp b { display: block; color: #1a0dab; font-weight: 500; font-size: 1.05rem; margin: 0.15rem 0; }
.serp p { font-size: 0.82rem; color: var(--text-2); margin: 0; }
@media (prefers-color-scheme: dark) { .serp b { color: #8ab4f8; } }
.artikel-sampul-kecil { width: 64px; height: 44px; border-radius: 10px; flex-shrink: 0; overflow: hidden; display: block; }
.artikel-sampul-kecil img { width: 100%; height: 100%; object-fit: cover; display: block; }
.artikel-item .member-actions form { display: inline-flex; }
.lp-kat-anggaran { background: linear-gradient(135deg, #1f6bff, #0b2a78); }
.lp-kat-tabungan { background: linear-gradient(135deg, #00ae79, #0b7a5c); }
.lp-kat-pensiun { background: linear-gradient(135deg, #7c3aed, #0b2a78); }
.lp-kat-tips { background: linear-gradient(135deg, #ff7a1a, #f7287a); }
.lp-kat-produk { background: linear-gradient(135deg, #ffb300, #ff7a1a); }
.konten-faq-item { border: 1px solid var(--border); border-radius: var(--r-md); padding: 0.85rem; display: flex; flex-direction: column; gap: 0.5rem; }
.konten-faq-item .row-between { gap: 0.5rem; }

/* ============================================================
   Masuk dengan Google
   ============================================================ */
.btn-google { gap: 0.6rem; background: #fff; color: #1f1f1f; border: 1px solid #747775; font-weight: 700; }
.btn-google:hover { background: #f6f8fc; color: #1f1f1f; }
.btn-google svg { flex-shrink: 0; }
@media (prefers-color-scheme: dark) {
    .btn-google { background: #131314; color: #e3e3e3; border-color: #8e918f; }
    .btn-google:hover { background: #1f1f20; color: #e3e3e3; }
}
.pemisah-atau { display: flex; align-items: center; gap: 0.75rem; margin: 1.1rem 0 0.9rem; font-size: 0.78rem; color: var(--muted); }
.pemisah-atau::before, .pemisah-atau::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.google-dalam-app { padding: 0.85rem 1rem; border-radius: var(--r-md); background: var(--surface-2); border: 1px dashed var(--border-strong); font-size: 0.85rem; line-height: 1.5; color: var(--text); }
.google-dalam-app b:first-child { display: block; margin-bottom: 0.15rem; }
.google-profil { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 0.9rem; margin-bottom: 1rem; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border); }
.google-profil > span:not(.badge) { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.google-profil small { color: var(--muted); font-size: 0.8rem; overflow-wrap: anywhere; }

/* Lupa sandi: konfirmasi terkirim / tautan tidak berlaku */
.kirim-sukses { display: flex; flex-direction: column; align-items: center; gap: 0.4rem; text-align: center; padding: 1.25rem 1rem; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border); }
.kirim-sukses-ikon { font-size: 2.6rem; line-height: 1; }
.kirim-sukses p { font-size: 0.88rem; color: var(--muted); line-height: 1.55; }
.daftar-info { display: flex; flex-direction: column; gap: 0.5rem; margin: 0; }
.daftar-info > div { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.88rem; }
.daftar-info dt { color: var(--muted); }
.daftar-info dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }

/* Akun: zona berbahaya (hapus akun) */
.zona-bahaya { border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); }
.zona-bahaya > summary { cursor: pointer; font-weight: 700; color: var(--danger); display: flex; align-items: center; gap: 0.5rem; list-style: none; }
.zona-bahaya > summary::-webkit-details-marker { display: none; }
.zona-bahaya > summary::after { content: "▾"; margin-left: auto; transition: transform 0.2s ease; }
.zona-bahaya[open] > summary::after { transform: rotate(180deg); }
.zona-bahaya-form { margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--border); }
.zona-bahaya-form h3 { font-size: 1rem; font-weight: 800; margin-bottom: 0.3rem; }
.zona-bahaya-form .hint { display: block; margin-bottom: 0.75rem; }

/* Halaman galat 403/404/500 */
.halaman-galat .auth-card { text-align: center; }
.halaman-galat-logo { display: inline-flex; justify-content: center; margin-bottom: 0.75rem; }
.halaman-galat-kode { display: table; margin: 0 auto 0.25rem; padding: 0.3rem 0.9rem; border-radius: 999px; background: var(--surface-2); font-weight: 800; font-size: 0.9rem; color: var(--muted); }

/* ============================================================
   Superadmin → Integrasi: menu kiri + satu panel
   ============================================================ */
.intg-w-google { --w: #1a73e8; --w-soft: #e8f0fe; }
.intg-w-email { --w: var(--c-cicilan); --w-soft: #fff1e6; }
.intg-w-analitik { --w: var(--c-tabungan); --w-soft: #f1ebff; }
.intg-w-backup { --w: var(--c-masuk); --w-soft: var(--success-soft); }
.intg-w-ocr { --w: var(--c-gaya); --w-soft: #fdecf4; }
.intg-w-landing { --w: var(--c-sosial); --w-soft: #e3f7f5; }
@media (prefers-color-scheme: dark) {
    .intg-w-google, .intg-w-email, .intg-w-analitik, .intg-w-backup, .intg-w-ocr, .intg-w-landing { --w-soft: var(--surface-2); }
}

.intg { display: grid; gap: 1rem; align-items: start; }
@media (min-width: 960px) { .intg { grid-template-columns: 290px minmax(0, 1fr); gap: 1.5rem; } }

.intg-ikon { width: 38px; height: 38px; flex-shrink: 0; display: grid; place-items: center; border-radius: 12px; background: var(--w-soft); color: var(--w); }
.intg-ikon-besar { width: 52px; height: 52px; border-radius: 16px; }
.intg-ikon-besar svg { width: 26px; height: 26px; }

/* Menu */
.intg-menu { display: flex; gap: 0.5rem; overflow-x: auto; scrollbar-width: none; padding-bottom: 0.2rem; }
.intg-menu::-webkit-scrollbar { display: none; }
.intg-menu-item { position: relative; flex-shrink: 0; display: flex; align-items: center; gap: 0.7rem; padding: 0.55rem 0.8rem 0.55rem 0.55rem; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); color: var(--text); transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease); }
.intg-menu-item:hover { border-color: var(--border-strong); color: var(--text); }
.intg-menu-item.aktif { border-color: var(--w); box-shadow: 0 0 0 3px var(--w-soft); }
.intg-menu-teks { display: flex; flex-direction: column; min-width: 0; }
.intg-menu-teks b { font-size: 0.88rem; white-space: nowrap; }
.intg-menu-teks small { display: none; font-size: 0.75rem; color: var(--muted); }
.intg-titik { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); flex-shrink: 0; margin-left: auto; }
.intg-titik.nyala { background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.intg-catatan { display: none; }
@media (min-width: 960px) {
    .intg-menu { flex-direction: column; overflow: visible; position: sticky; top: 1.25rem; }
    .intg-menu-item { padding: 0.7rem 0.9rem 0.7rem 0.7rem; }
    .intg-menu-teks small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .intg-catatan { display: flex; gap: 0.45rem; align-items: flex-start; margin-top: 0.5rem; padding: 0 0.3rem; font-size: 0.76rem; line-height: 1.45; color: var(--muted); }
    .intg-catatan svg { flex-shrink: 0; margin-top: 0.1rem; }
}

/* Panel */
.intg-panel { padding: 0; overflow: hidden; }
.intg-panel > * { padding-left: 1.25rem; padding-right: 1.25rem; }
@media (min-width: 640px) { .intg-panel > * { padding-left: 1.75rem; padding-right: 1.75rem; } }
.intg-panel-kepala { display: flex; align-items: center; gap: 0.9rem; padding-top: 1.35rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--border); background: linear-gradient(180deg, var(--w-soft), transparent 140%); }
.intg-panel-kepala > div { flex: 1; min-width: 0; }
@media (max-width: 639px) {
    .intg-panel-kepala { position: relative; }
    .intg-panel-kepala .badge { position: absolute; top: 0.85rem; right: 1rem; }
    .intg-panel-kepala h2 { padding-right: 5.5rem; }
}
.intg-panel-kepala h2 { font-size: 1.2rem; font-weight: 800; }
.intg-panel-kepala p { font-size: 0.86rem; color: var(--muted); margin-top: 0.1rem; }
.intg-panel > .intg-terkunci, .intg-panel > .intg-info, .intg-panel > .intg-panduan { margin: 1.1rem 1.25rem 0; padding: 0.75rem 0.9rem; }
@media (min-width: 640px) { .intg-panel > .intg-terkunci, .intg-panel > .intg-info, .intg-panel > .intg-panduan { margin-left: 1.75rem; margin-right: 1.75rem; } }
.intg-terkunci, .intg-info { display: flex; gap: 0.55rem; align-items: flex-start; border-radius: var(--r-md); font-size: 0.83rem; line-height: 1.5; }
.intg-terkunci { background: var(--warning-soft); color: var(--warning-ink); }
.intg-info { background: var(--surface-2); color: var(--text-2); }
.intg-terkunci svg, .intg-info svg { flex-shrink: 0; margin-top: 0.15rem; }
.intg-panduan { border: 1px solid var(--border); border-radius: var(--r-md); font-size: 0.84rem; color: var(--text-2); }
.intg-panduan summary { cursor: pointer; font-weight: 700; color: var(--w); }
.intg-panduan ol { margin: 0.6rem 0 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: 0.45rem; line-height: 1.5; }
.intg-panduan a { font-weight: 700; }
.salin-teks { display: inline-block; margin-top: 0.25rem; padding: 0.2rem 0.5rem; border-radius: 6px; background: var(--surface-2); border: 1px dashed var(--border-strong); color: var(--text); overflow-wrap: anywhere; user-select: all; }

.intg-form { padding-top: 1.2rem; padding-bottom: 1.25rem; }
.intg-form:has(.intg-kaki) { padding-bottom: 0; }
.intg-bagian { padding-bottom: 1.1rem; margin-bottom: 1.1rem; border-bottom: 1px solid var(--border); }
.intg-bagian:last-of-type, .intg-bagian:has(+ .intg-kaki), .intg-bagian:has(+ input + .intg-kaki) { border-bottom: 0; margin-bottom: 0; }
.intg-bagian h3 { font-size: 0.74rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.75rem; }
.intg-kolom-2, .intg-kolom-3 { display: grid; gap: 0 1rem; }
@media (min-width: 640px) {
    .intg-kolom-2 { grid-template-columns: 1fr 1fr; }
    .intg-kolom-3 { grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr) minmax(0, 1.3fr); }
}
.intg-kolom-2 > .field, .intg-kolom-3 > .field { margin-bottom: 1rem; }
[data-tampil-jika][hidden] { display: none !important; }
.intg-tersimpan { display: inline-flex; align-items: center; gap: 0.2rem; margin-left: 0.4rem; padding: 0.05rem 0.45rem; border-radius: 999px; background: var(--success-soft); color: var(--success-ink); font-size: 0.7rem; font-weight: 700; vertical-align: middle; }
.cek-kecil { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.78rem; color: var(--muted); cursor: pointer; }
.intg-preset { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin-bottom: 0.9rem; font-size: 0.78rem; color: var(--muted); }
.intg-preset .chip { padding: 0.3rem 0.7rem; font-size: 0.78rem; }

.intg-pilihan { display: grid; gap: 0.5rem; }
@media (min-width: 640px) { .intg-pilihan { grid-template-columns: 1fr 1fr; } }
.intg-pilihan-item { display: flex; align-items: center; gap: 0.65rem; padding: 0.7rem 0.85rem; border-radius: var(--r-md); border: 1.5px solid var(--border); cursor: pointer; transition: border-color 0.15s var(--ease); }
.intg-pilihan-item:hover { border-color: var(--border-strong); }
.intg-pilihan-item:has(input:checked) { border-color: var(--w); background: var(--w-soft); }
.intg-pilihan-item input { accent-color: var(--w); }
.intg-pilihan-item span { display: flex; flex-direction: column; }
.intg-pilihan-item b { font-size: 0.88rem; }
.intg-pilihan-item small { font-size: 0.75rem; color: var(--muted); }

/* Kaki: sandi Superadmin + simpan */
.intg-kaki { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: flex-end; gap: 0.75rem; margin: 1.25rem -1.25rem 0; padding: 1rem 1.25rem; background: var(--surface-2); border-top: 1px solid var(--border); }
@media (min-width: 640px) { .intg-kaki { margin-left: -1.75rem; margin-right: -1.75rem; padding: 1rem 1.75rem; } }
.intg-kaki-sandi { flex: 1 1 220px; max-width: 320px; margin: 0 auto 0 0; }
.intg-kaki-sandi .label { display: inline-flex; align-items: center; gap: 0.35rem; }
.intg-kaki .btn { flex: 0 0 auto; }
@media (max-width: 639px) { .intg-kaki-sandi { max-width: none; } .intg-kaki .btn { flex: 1 1 100%; } }

/* Uji koneksi */
.intg-uji { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; padding-top: 1rem; padding-bottom: 1.2rem; border-top: 1px solid var(--border); }
.intg-uji > div { display: flex; flex-direction: column; font-size: 0.84rem; }
.intg-uji > div span { color: var(--muted); }
