/* ============================================================
   SIKEU YPI Misbahul Munir — Tema TEAL (gaya internet banking)
   ------------------------------------------------------------
   Hanya tampilan. Semua nama class lama dipertahankan agar
   halaman yang sudah ada tetap berfungsi tanpa diubah.
   Urutan: 1 Token warna · 2 Dasar · 3 Sidebar · 4 Header ·
   5 Konten & kartu · 6 Tombol · 7 Badge & alert · 8 Form ·
   9 Tabel · 10 Dashboard · 11 Login · 12 Responsif · 13 Cetak
   ============================================================ */

/* ---------- 1. Token warna (palet dari pengguna) ---------- */
:root {
    --primary: #009F9A;         /* Primary Teal */
    --primary-dark: #008F8A;    /* Dark Teal */
    --primary-deep: #00736F;    /* teal gelap untuk teks/tautan di atas putih (lebih mudah dibaca) */
    --primary-light: #55C3BF;   /* Light Teal */
    --primary-bg: #E8F7F6;      /* Teal Background */
    --primary-bg-2: #F3FBFA;    /* teal sangat muda (hover/zebra) */
    --white: #FFFFFF;
    --bg: #F5F7FA;              /* Background */
    --ink: #263238;             /* Text Primary */
    --muted: #6B767D;           /* Text Secondary (sedikit digelapkan dari #7A858C agar terbaca) */
    --border: #E0E5E9;          /* Border */
    --orange: #FFA726;          /* Accent Orange */
    --orange-ink: #9A5B00;      /* teks oranye di atas latar muda */
    --danger: #E53935;          /* Danger Red */

    /* Status (makna tetap: hijau = masuk/berhasil, merah = keluar/bahaya) */
    --green: #2E7D32;
    --red: #D32F2F;
    --amber: #9A5B00;
    --purple: #6A4FB3;          /* titipan / lebih bayar */

    /* Alias nama lama — dipakai halaman lama, diarahkan ke teal */
    --indigo: var(--primary-deep);
    --violet: var(--primary);
    --blue: var(--primary);
    --blue-dark: var(--primary-deep);
    --blue-light: var(--primary-bg);
    --teal: var(--primary-light);
    --sky: var(--primary-light);
    --bg-soft: var(--primary-bg-2);

    /* Garis, bayangan, ukuran */
    --line: var(--border);
    --line-soft: #EBEFF2;
    --glass: #FFFFFF;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 2px rgba(38,50,56,0.04), 0 4px 14px -6px rgba(38,50,56,0.10);
    --shadow-lg: 0 12px 34px -14px rgba(38,50,56,0.22);
    --sidebar-w: 260px;
    --sidebar-mini: 76px;
    --header-h: 64px;

    /* Sidebar */
    --side-1: #00A39E;
    --side-2: #00958F;
    --side-3: #00847F;
    --side-ink: #FFFFFF;
    --side-muted: rgba(255,255,255,0.80);
}

/* ---------- 2. Dasar ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: "Inter", "Poppins", "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    color: var(--ink);
    background: var(--bg);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
    font-size: 14px;
}
a { color: var(--primary-deep); text-decoration: none; }
a:hover { color: var(--primary-dark); text-decoration: underline; text-underline-offset: 2px; }
.btn:hover, .side-link:hover, .side-logout:hover, .crumb a:hover { text-decoration: none; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.glass { background: #fff; border-radius: var(--radius); }
.muted { color: var(--muted); }
.ic { width: 18px; height: 18px; }

.app { min-height: 100vh; }

/* ---------- 3. Sidebar ---------- */
.sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 50;
    width: var(--sidebar-w);
    display: flex; flex-direction: column;
    background: linear-gradient(180deg, var(--side-1) 0%, var(--side-2) 45%, var(--side-3) 100%);
    color: var(--side-ink);
    box-shadow: 4px 0 18px -10px rgba(0,80,77,0.45);
    transition: width .25s ease, transform .25s ease;
}
.main {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    display: flex; flex-direction: column;
    transition: margin-left .25s ease;
}

/* Merek / logo yayasan */
.brand { display: flex; align-items: center; gap: 12px; padding: 18px 18px 16px; }
.brand-center { flex-direction: column; text-align: center; gap: 10px; padding: 0; }
.brand-logo {
    width: 42px; height: 42px; flex: 0 0 auto;
    display: grid; place-items: center; overflow: hidden;
    border-radius: 12px; background: #fff; color: var(--primary-deep);
    font-weight: 800; font-size: 14px;
    box-shadow: 0 4px 12px -6px rgba(0,0,0,0.35);
}
.brand-logo img { width: 100%; height: 100%; object-fit: contain; }
.brand-logo svg { width: 28px; height: 28px; }
.brand-logo-lg { width: 64px; height: 64px; border-radius: 18px; }
.brand-logo-lg svg { width: 40px; height: 40px; }
.brand-text { min-width: 0; }
.brand-name { font-weight: 800; font-size: 16px; letter-spacing: .4px; line-height: 1.2; }
.brand-sub { font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.sidebar .brand { border-bottom: 1px solid rgba(255,255,255,0.16); }
.sidebar .brand-name { color: #fff; }
.sidebar .brand-sub { color: var(--side-muted); }

/* Navigasi */
.side-nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 12px 12px 16px; display: flex; flex-direction: column; gap: 2px;
    scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.35) transparent; }
.side-link {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: 10px;
    color: #fff; font-size: 13.5px; font-weight: 500; white-space: nowrap;
    transition: background .18s ease;
    position: relative;
}
.side-link span { overflow: hidden; text-overflow: ellipsis; }
.side-link:hover { background: rgba(255,255,255,0.14); color: #fff; }
.side-link.active { background: rgba(255,255,255,0.24); font-weight: 700; color: #fff; }
.side-link.active::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: #fff; }
.side-link .ic { width: 19px; height: 19px; flex: 0 0 auto; }

/* Kelompok menu (accordion) */
.side-group-wrap { display: flex; flex-direction: column; margin-top: 4px; }
.side-group-btn {
    display: flex; align-items: center; gap: 12px; width: 100%;
    padding: 10px 12px; border: 0; border-radius: 10px; cursor: pointer;
    background: transparent; color: #fff; text-align: left;
    font-family: inherit; font-size: 13.5px; font-weight: 600;
    transition: background .18s ease;
}
.side-group-btn:hover { background: rgba(255,255,255,0.12); }
.side-group-btn > span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-group-btn .ic { width: 19px; height: 19px; flex: 0 0 auto; }
.side-group-btn .ic-chev { width: 15px; height: 15px; opacity: .85; transition: transform .25s ease; }
.side-group-wrap.open > .side-group-btn .ic-chev { transform: rotate(180deg); }
.side-group-wrap.has-active > .side-group-btn { background: rgba(255,255,255,0.08); }
.side-group-items { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .28s ease; }
.side-group-wrap.open > .side-group-items { grid-template-rows: 1fr; }
.side-group-inner { overflow: hidden; display: flex; flex-direction: column; gap: 2px; padding-left: 14px; margin-left: 21px; border-left: 1px solid rgba(255,255,255,0.22); }
.side-group-inner .side-link { padding: 8px 10px; font-size: 13px; }
.side-group-inner .side-link .ic { width: 16px; height: 16px; opacity: .9; }
.side-group-inner .side-link.active::before { left: -15px; }
.side-group { font-size: 11px; color: var(--side-muted); padding: 12px 12px 6px; text-transform: uppercase; letter-spacing: .1em; } /* gaya lama */

.side-foot { padding: 12px 18px 16px; border-top: 1px solid rgba(255,255,255,0.16); font-size: 11px; color: var(--side-muted); line-height: 1.4; }
.side-user, .side-logout { display: none; } /* pindah ke header */

/* Mode ringkas (desktop): hanya ikon */
body.side-mini .sidebar { width: var(--sidebar-mini); }
body.side-mini .main { margin-left: var(--sidebar-mini); }
body.side-mini .brand { justify-content: center; padding: 18px 0 16px; }
body.side-mini .brand-text,
body.side-mini .side-link span,
body.side-mini .side-group-btn,
body.side-mini .side-foot { display: none; }
body.side-mini .side-nav { padding: 12px 10px; align-items: center; }
body.side-mini .side-group-items { grid-template-rows: 1fr; }
body.side-mini .side-group-inner { padding-left: 0; margin-left: 0; border-left: 0; }
body.side-mini .side-group-wrap { margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(255,255,255,0.14); width: 100%; align-items: center; }
body.side-mini .side-link, body.side-mini .side-group-inner .side-link { justify-content: center; padding: 10px; width: 48px; }
body.side-mini .side-link.active::before { display: none; }

.sidebar-backdrop { display: none; }

/* ---------- 4. Header ---------- */
.topbar {
    position: sticky; top: 0; z-index: 40;
    display: flex; align-items: center; gap: 14px;
    min-height: var(--header-h); padding: 10px 28px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 10px -8px rgba(38,50,56,0.25);
}
.topbar-main { flex: 1; min-width: 0; }
.crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); line-height: 1.3; }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--primary-deep); }
.crumb .sep { opacity: .6; }
.crumb .now { color: var(--primary-deep); font-weight: 600; }
.topbar-title { font-size: 17px; font-weight: 700; color: var(--ink); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.icon-btn {
    width: 40px; height: 40px; flex: 0 0 auto; border-radius: 10px; cursor: pointer;
    border: 1px solid var(--border); background: #fff; color: var(--primary-deep);
    display: grid; place-items: center;
    transition: background .15s ease, border-color .15s ease;
}
.icon-btn:hover { background: var(--primary-bg); border-color: var(--primary-light); }
.icon-btn .ic { width: 20px; height: 20px; }
.icon-btn.logout { color: var(--danger); }
.icon-btn.logout:hover { background: #FDECEC; border-color: #F5B5B4; }
.menu-btn { display: grid; }
.chip { font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 999px; background: var(--primary-bg); color: var(--primary-deep); border: 1px solid #CDEDEB; white-space: nowrap; }
.chip-role { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Profil + dropdown */
.profile { position: relative; }
.profile > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 4px; border-radius: 12px; border: 1px solid transparent; }
.profile > summary::-webkit-details-marker { display: none; }
.profile > summary:hover, .profile[open] > summary { background: var(--primary-bg-2); border-color: var(--border); }
.profile-text { text-align: right; line-height: 1.25; }
.profile-name { font-size: 13px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.profile-unit { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.profile .ic-chev { width: 15px; height: 15px; color: var(--muted); }
.avatar {
    width: 38px; height: 38px; flex: 0 0 auto; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--primary); color: #fff; font-weight: 700; font-size: 15px;
}
.profile-menu {
    position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; width: 260px;
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg);
    padding: 8px; animation: munculMenu .16s ease;
}
@keyframes munculMenu { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.profile-head { display: flex; gap: 12px; align-items: center; padding: 10px; border-bottom: 1px solid var(--line-soft); margin-bottom: 6px; }
.profile-head .k { font-size: 13.5px; font-weight: 700; }
.profile-head .s { font-size: 12px; color: var(--muted); }
.profile-row { display: flex; justify-content: space-between; gap: 10px; padding: 7px 10px; font-size: 12.5px; }
.profile-row span:first-child { color: var(--muted); }
.profile-row span:last-child { font-weight: 600; text-align: right; }
.profile-logout { display: flex; align-items: center; gap: 10px; margin-top: 6px; padding: 10px; border-radius: var(--radius-sm); color: var(--danger); font-weight: 600; font-size: 13px; }
.profile-logout:hover { background: #FDECEC; color: var(--danger); text-decoration: none; }
.profile-logout .ic { width: 17px; height: 17px; }

/* ---------- 5. Konten & kartu ---------- */
.content { padding: 26px 28px 40px; max-width: 1480px; width: 100%; margin: 0 auto; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 20px; }
.page-head > div:first-child { flex: 1; min-width: 220px; }
.page-head h1 { font-size: 21px; margin: 0; color: var(--ink); font-weight: 700; letter-spacing: -.01em; }
.page-head .sub { color: var(--muted); font-size: 13px; margin-top: 3px; }

.card {
    position: relative;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px 22px;
}
.card + .card { margin-top: 20px; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }
.card-head h2, .card-head h3 { margin: 0; font-size: 15.5px; font-weight: 700; flex: 1; color: var(--ink); }
.card-head .muted { color: var(--muted); font-size: 12.5px; }
.card h3 { font-size: 14px; color: var(--ink); }

.grid { display: grid; gap: 18px; }
.grid-stats { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* Kartu angka (dipakai banyak halaman) */
.stat {
    --ac: var(--primary);
    position: relative;
    padding: 18px 20px;
    border-radius: var(--radius);
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.stat::before { content: ''; position: absolute; left: 0; top: 16px; bottom: 16px; width: 3px; border-radius: 0 3px 3px 0; background: var(--ac); }
.stat-label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.stat-value { font-size: 22px; font-weight: 700; margin-top: 6px; color: var(--ink); word-break: break-word; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.stat-value.small { font-size: 18px; }
.stat-hint { font-size: 11.5px; color: var(--muted); margin-top: 5px; }
.stat.accent { --ac: var(--primary); }
.stat.blue   { --ac: var(--primary-light); }
.stat.green  { --ac: var(--green); }
.stat.red    { --ac: var(--red); }
.stat.violet { --ac: var(--purple); }
.stat.amber  { --ac: var(--orange); }
.stat.green .stat-value { color: var(--green); }
.stat.red .stat-value { color: var(--red); }

/* Kartu berikon (dashboard) */
.stat.has-icon { display: flex; gap: 14px; align-items: flex-start; }
.stat.has-icon::before { display: none; }
.stat-icon { width: 44px; height: 44px; flex: 0 0 auto; border-radius: 12px; display: grid; place-items: center; background: var(--primary-bg); color: var(--primary); }
.stat-icon .ic { width: 22px; height: 22px; }
.stat-icon.orange { background: #FFF3E0; color: #E08600; }
.stat-icon.red { background: #FDECEC; color: var(--danger); }
.stat-body { min-width: 0; flex: 1; }

/* ---------- 6. Tombol ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 9px 16px; border-radius: var(--radius-sm); border: 1px solid transparent;
    font-family: inherit; font-size: 13px; font-weight: 600; line-height: 1.2; cursor: pointer;
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, color .15s ease;
    white-space: nowrap;
}
.btn .ic { width: 16px; height: 16px; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 10px -6px rgba(0,159,154,0.8); }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-ghost { background: #fff; border-color: var(--border); color: var(--ink); }   /* Batal / sekunder: abu-abu */
.btn-ghost:hover { background: #F1F4F6; border-color: #CFD6DB; color: var(--ink); }
.btn-danger { background: #fff; color: var(--danger); border-color: #F3B6B5; }
.btn-danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-success { background: var(--primary-bg); color: var(--primary-deep); border-color: #BFE7E5; }
.btn-success:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-sm { padding: 6px 11px; font-size: 12px; border-radius: 7px; }
.btn-block { width: 100%; }
.btn-group { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btn[disabled] { opacity: .55; pointer-events: none; }

/* ---------- 7. Badge & alert ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.badge-green  { background: #E7F4E8; color: #1E6B23; }
.badge-red    { background: #FDECEC; color: #B71C1C; }
.badge-amber  { background: #FFF3E0; color: var(--orange-ink); }
.badge-blue   { background: var(--primary-bg); color: var(--primary-deep); }
.badge-indigo { background: var(--primary-bg); color: var(--primary-deep); }
.badge-purple { background: #EFEBF9; color: #4F3A93; }
.badge-gray   { background: #EEF1F3; color: #4B575E; }

.alert { padding: 12px 16px; border-radius: 10px; font-size: 13.5px; margin-bottom: 16px; border: 1px solid transparent; border-left-width: 4px; background: #fff; }
.alert-success { background: #EEF8EF; color: #1E6B23; border-color: #CDE8CF; border-left-color: var(--green); }
.alert-error   { background: #FDEFEE; color: #B71C1C; border-color: #F6CACA; border-left-color: var(--danger); }
.alert-warning { background: #FFF6E8; color: var(--orange-ink); border-color: #FFE0B2; border-left-color: var(--orange); }
.alert-info    { background: var(--primary-bg); color: #005A57; border-color: #C8ECEA; border-left-color: var(--primary); }
.alert ul { margin: 6px 0 0; padding-left: 18px; }
.alert a { font-weight: 600; }

/* ---------- 8. Form ---------- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.form-grid .span-2 { grid-column: span 2; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 12.5px; font-weight: 600; color: #4B575E; }
.field-label .req { color: var(--danger); }
.field input, .field select, .field textarea,
.filter-bar input, .filter-bar select {
    width: 100%; padding: 10px 12px; border-radius: var(--radius-sm);
    border: 1px solid #D5DCE1; background: #fff;
    font-family: inherit; font-size: 14px; color: var(--ink);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.field select, .filter-bar select {
    appearance: none; -webkit-appearance: none; padding-right: 34px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B767D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center; background-size: 16px;
}
.field select[multiple] { background-image: none; padding-right: 12px; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #B9C3CA; }
.field input:focus, .field select:focus, .field textarea:focus,
input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,159,154,0.16);
}
.field input[type=checkbox], .field input[type=radio] { width: auto; accent-color: var(--primary); }
input[type=checkbox], input[type=radio] { accent-color: var(--primary); }
.field textarea { resize: vertical; min-height: 74px; }
.field .hint { font-size: 11.5px; color: var(--muted); }
.field input[readonly], .field input:disabled, .field select:disabled { background: #F4F6F8; color: var(--muted); }
.field input:invalid:not(:placeholder-shown):not(:focus) { border-color: #EF9A9A; }
.tbl input[type=text], .tbl input[type=date], .tbl select, details input[type=text], details input[type=date] {
    padding: 7px 10px; border-radius: 7px; border: 1px solid #D5DCE1; font-family: inherit; font-size: 13px; background: #fff;
}

.filter-bar {
    display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end;
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 16px 18px; margin-bottom: 20px; box-shadow: var(--shadow);
}
.filter-bar .field { min-width: 150px; flex: 1 1 150px; }
.filter-bar .field.wide { flex: 2 1 240px; }
.filter-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- 9. Tabel ---------- */
.table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--line-soft); -webkit-overflow-scrolling: touch; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th {
    text-align: left; padding: 12px 14px; white-space: nowrap;
    background: var(--primary-bg); color: #005A57;
    font-size: 12px; font-weight: 700; letter-spacing: .02em;
    border-bottom: 1px solid #CDEDEB;
}
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; background: #fff; }
.tbl tbody tr:nth-child(even) td { background: #FAFBFC; }
.tbl tbody tr:hover td { background: var(--primary-bg-2); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl th.num { text-align: right; }
.tbl .nowrap { white-space: nowrap; }
.tbl .muted { color: var(--muted); }
.tbl tfoot td { font-weight: 700; background: #F4F7F8 !important; border-top: 1px solid var(--border); border-bottom: 0; }
.tbl-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.mini-btn {
    width: 32px; height: 32px; border-radius: 8px; cursor: pointer;
    border: 1px solid var(--border); background: #fff; color: var(--primary-deep);
    display: grid; place-items: center; transition: background .15s ease, color .15s ease;
}
.mini-btn:hover { background: var(--primary-bg); }
.mini-btn .ic { width: 15px; height: 15px; }
.mini-btn.danger { color: var(--danger); border-color: #F3C2C1; }
.mini-btn.danger:hover { background: var(--danger); color: #fff; }
.mini-btn.green { color: var(--green); border-color: #C8E3CA; }
.mini-btn.blue { color: var(--primary-deep); border-color: #BFE7E5; }
.empty { text-align: center; color: var(--muted); padding: 32px 10px; font-size: 13.5px; }

/* Penomoran halaman (bila dipakai) */
.pagination { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; margin-top: 14px; }
.pagination a, .pagination span { min-width: 34px; height: 34px; padding: 0 10px; display: inline-grid; place-items: center; border-radius: 8px; border: 1px solid var(--border); background: #fff; font-size: 13px; color: var(--ink); }
.pagination a:hover { background: var(--primary-bg); text-decoration: none; }
.pagination .active, .pagination .current { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }

/* Detail / info */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.info-item { padding: 12px 14px; border-radius: 10px; background: #fff; border: 1px solid var(--border); }
.info-item .k { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.info-item .v { font-size: 15px; font-weight: 700; margin-top: 3px; word-break: break-word; }
details > summary { cursor: pointer; }

/* Grafik */
.chart-box { position: relative; height: 280px; }
.chart-box.tall { height: 320px; }
.chart-box canvas { max-width: 100%; }

.picker-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 12px; margin-top: 6px; }

/* ---------- 10. Dashboard ---------- */
.dash-grid { display: grid; gap: 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dash-grid .stat-value { font-size: clamp(18px, 1.6vw, 23px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-grid .stat-hint { overflow-wrap: anywhere; }
.chart-off { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px; color: var(--muted); font-size: 13px; background: var(--primary-bg-2); border-radius: 10px; }
.dash-2 { display: grid; gap: 18px; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); margin-top: 18px; }
.dash-2b { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin-top: 18px; }
.dash-2 > .card, .dash-2b > .card { margin: 0; }
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li { display: flex; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.mini-list li:last-child { border-bottom: 0; }
.mini-ic { width: 36px; height: 36px; flex: 0 0 auto; border-radius: 10px; display: grid; place-items: center; background: var(--primary-bg); color: var(--primary); }
.mini-ic .ic { width: 18px; height: 18px; }
.mini-ic.out { background: #FFF3E0; color: #E08600; }
.mini-ic.warn { background: #FFF3E0; color: #E08600; }
.mini-ic.danger { background: #FDECEC; color: var(--danger); }
.mini-main { flex: 1; min-width: 0; }
.mini-title { font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-sub { font-size: 11.5px; color: var(--muted); }
.mini-amt { font-weight: 700; font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mini-amt.in { color: var(--green); }
.mini-amt.out { color: var(--red); }
.todo-ok { display: flex; gap: 10px; align-items: center; color: var(--green); font-weight: 600; font-size: 13px; padding: 10px 0; }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }

/* ---------- 11. Login ---------- */
.login-body { min-height: 100vh; display: grid; place-items: center; padding: 24px; background:
    radial-gradient(900px 500px at 0% 0%, rgba(0,159,154,0.16), transparent 60%),
    radial-gradient(800px 500px at 100% 100%, rgba(85,195,191,0.18), transparent 60%), var(--bg); }
.login-wrap { width: 100%; max-width: 920px; }
.login-split { display: grid; grid-template-columns: 1fr 1fr; background: #fff; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-lg); border: 1px solid var(--border); }
.login-side { background: linear-gradient(160deg, var(--side-1), var(--side-3)); color: #fff; padding: 42px 38px; display: flex; flex-direction: column; justify-content: space-between; gap: 28px; }
.login-side h2 { font-size: 24px; margin: 0 0 10px; line-height: 1.25; }
.login-side p { margin: 0; color: rgba(255,255,255,0.88); font-size: 14px; }
.login-side .brand { padding: 0; }
.login-side .brand-name { color: #fff; }
.login-side .brand-sub { color: rgba(255,255,255,0.85); }
.login-card { padding: 42px 38px; border: 0; box-shadow: none; }
.login-card h1 { font-size: 21px; margin: 0 0 4px; }
.login-hint { color: var(--muted); font-size: 13.5px; margin: 0 0 22px; }
.login-form { display: flex; flex-direction: column; gap: 16px; }
.login-form .btn { padding: 12px 16px; font-size: 14px; }
.login-foot { color: var(--muted); font-size: 11.5px; margin-top: 22px; }

/* ---------- 12. Responsif ---------- */
@media (max-width: 1180px) {
    .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dash-2, .dash-2b { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
    /* Tablet & HP: sidebar menjadi laci (drawer) */
    .sidebar, body.side-mini .sidebar { width: var(--sidebar-w); transform: translateX(-105%); }
    .sidebar.open { transform: translateX(0); }
    body.side-mini .brand-text, body.side-mini .side-link span, body.side-mini .side-group-btn, body.side-mini .side-foot { display: revert; }
    body.side-mini .side-group-btn { display: flex; }
    body.side-mini .side-link { justify-content: flex-start; width: auto; }
    body.side-mini .side-nav { align-items: stretch; }
    .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(38,50,56,0.45); z-index: 45; opacity: 0; pointer-events: none; transition: opacity .25s ease; }
    .sidebar-backdrop.show { opacity: 1; pointer-events: auto; }
    .main, body.side-mini .main { margin-left: 0; }
    .content { padding: 18px 16px 32px; }
    .topbar { padding: 10px 16px; gap: 10px; }
    .profile-text { display: none; }
    .form-grid .span-2 { grid-column: span 1; }
    .login-split { grid-template-columns: 1fr; }
    .login-side { padding: 28px 26px; }
    .login-side .login-tagline { display: none; }
    .login-card { padding: 28px 26px; }
}
@media (max-width: 560px) {
    .crumb { display: none; }
    .topbar-title { font-size: 15px; }
    .icon-btn.logout { display: none; }
    .grid-stats { grid-template-columns: 1fr 1fr; gap: 12px; }
    .dash-grid { grid-template-columns: minmax(0, 1fr); }
    .dash-grid .stat-value { font-size: 20px; }
    .stat { padding: 14px 14px; }
    .stat-value { font-size: 18px; }
    .stat-value.small { font-size: 16px; }
    .page-head h1 { font-size: 18px; }
    .card { padding: 16px; }
    .filter-bar { padding: 14px; }
}

/* ---------- 13. Cetak ---------- */
@media print {
    .sidebar, .topbar, .sidebar-backdrop, .filter-bar, .btn, .no-print { display: none !important; }
    .main { margin-left: 0 !important; }
    body { background: #fff; }
    .card, .stat { box-shadow: none; }
}

/* ---------- 14. Dashboard v2 (ringkasan eksekutif) ----------
   Kelas baru berawalan d2-. Kelas lama tidak diubah. */
.d2-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--border); margin: -6px 0 18px; }
.d2-tab { padding: 10px 16px; font-size: 14px; font-weight: 500; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.d2-tab:hover { color: var(--primary-deep); text-decoration: none; }
.d2-tab.active { color: var(--primary-deep); font-weight: 600; border-bottom-color: var(--primary); }

.d2-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 18px; }
.d2-action { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 46px; padding: 12px 16px; border-radius: 12px;
    border: 1px solid var(--primary); background: #fff; color: var(--primary-deep); font-weight: 600; font-size: 14px; }
.d2-action:hover { background: var(--primary-bg); text-decoration: none; color: var(--primary-deep); }
.d2-action.primary { background: var(--primary-deep); border-color: var(--primary-deep); color: #fff; }
.d2-action.primary:hover { background: #005A57; color: #fff; }

.d2-top { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.d2-row { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 16px; }
.d2-row > * { min-width: 0; }
.d2-fx1 { flex: 1 1 320px; }
.d2-fx16 { flex: 1.6 1 460px; }
.d2-fx17 { flex: 1.7 1 520px; }
.d2-col { display: flex; flex-direction: column; gap: 16px; }

.d2-card { background: #fff; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.d2-card.pad { padding: 20px; gap: 12px; }
.d2-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.d2-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; }
.d2-card.pad > .d2-head { font-size: 16px; font-weight: 700; }
.d2-pill { font-size: 11px; font-weight: 600; border-radius: 999px; padding: 3px 10px; background: var(--primary-bg); color: var(--primary-deep); white-space: nowrap; }
.d2-pill.warn { background: #FFF3E0; color: var(--orange-ink); }
.d2-big { font-size: clamp(22px, 2.2vw, 30px); font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; line-height: 1.2; }
.d2-big.pos { color: var(--green); }
.d2-big.neg { color: var(--red); }
.d2-hint { font-size: 12px; color: var(--muted); line-height: 1.5; }
.d2-foot { padding: 12px 20px; border-top: 1px solid var(--line-soft); font-size: 13px; display: flex; justify-content: space-between; gap: 10px; color: var(--ink); }
a.d2-foot:hover { background: var(--primary-bg-2); text-decoration: none; color: var(--primary-deep); }

.d2-card.hero { background: linear-gradient(135deg, #005A57, #00847F); border-color: #005A57; color: #fff; }
.d2-card.hero .d2-pill { background: rgba(255,255,255,.2); color: #fff; }
.d2-card.hero .d2-hint { color: #DDF4F2; }
.d2-card.hero .d2-foot { border-top-color: rgba(255,255,255,.22); color: #fff; }
.d2-card.hero a.d2-foot:hover { background: rgba(255,255,255,.1); color: #fff; }

.d2-bar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: var(--line-soft); }
.d2-funds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.d2-fund { background: var(--bg); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.d2-fund-name { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: #33463F; }
.d2-dot { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 auto; }
.d2-fund-val { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

.d2-line { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.d2-line.total { font-size: 14px; font-weight: 700; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.d2-line .v { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.d2-sum { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 13px; color: var(--muted); }
.d2-sum b { color: var(--ink); font-variant-numeric: tabular-nums; }

.d2-share { height: 6px; border-radius: 99px; background: var(--line-soft); margin-top: 5px; }
.d2-share > i { display: block; height: 6px; border-radius: 99px; background: var(--primary); min-width: 2px; }
.d2-note { font-size: 11.5px; color: var(--muted); line-height: 1.5; }

/* Tampilkan / sembunyikan (details) */
.d2-collapse { background: #fff; border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); margin-top: 16px; }
.d2-collapse > summary { list-style: none; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; cursor: pointer; }
.d2-collapse > summary::-webkit-details-marker { display: none; }
.d2-collapse-title { font-size: 16px; font-weight: 700; }
.d2-collapse-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.d2-sumside { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.d2-toggle { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--primary-deep); background: #fff; color: var(--primary-deep); font-size: 13px; font-weight: 600; }
.d2-collapse > summary:hover .d2-toggle { background: var(--primary-bg); }
.d2-collapse .when-open { display: none; }
.d2-collapse[open] .when-open { display: inline; }
.d2-collapse[open] .when-closed { display: none; }
.d2-collapse-body { padding: 18px 20px 20px; border-top: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 14px; }
.d2-2col { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.d2-tbl-wrap { overflow-x: auto; }
.d2-tbl-wrap .tbl { min-width: 560px; }
.d2-empty { padding: 14px; border-radius: 10px; background: var(--bg); color: var(--muted); font-size: 13px; line-height: 1.5; }

@media (max-width: 560px) {
    .d2-funds { grid-template-columns: minmax(0, 1fr); }
    .d2-tab { padding: 10px 12px; }
}
@media print {
    .d2-actions, .d2-toggle { display: none !important; }
    .d2-collapse > .d2-collapse-body { display: flex !important; }
}
