/* Portal klien
   Hijau hutan + emas lembut di atas putih gading. Satu aksen, ruang lega, tipografi yang tenang.
   Tanpa dependensi eksternal; font disimpan sendiri (Plus Jakarta Sans, SIL OFL). */

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

:root {
  --bg: #f7f5f0;
  --surface: #ffffff;
  --surface-2: #fbfaf7;
  --ink: #17201b;
  --ink-2: #3d4842;
  --muted: #6b746e;
  --line: #e7e3da;
  --line-strong: #d8d3c7;

  --brand: #1e4d3b;
  --brand-hover: #173e2f;
  --brand-soft: #e9f0ec;
  --brand-ink: #ffffff;
  --gold: #b38b3f;
  --gold-soft: #f6eedd;

  --ok: #2c7048;      --ok-soft: #e5f2e9;
  --info: #2f5f8a;    --info-soft: #e7eff7;
  --warn: #92600a;    --warn-soft: #fbf0d9;
  --danger: #b0352a;  --danger-soft: #fbe8e5;

  --hero-bg: #1e4d3b;
  --hero-ink: #f3f1ea;
  --hero-muted: #b9cdc3;
  --hero-line: rgba(255, 255, 255, .16);

  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(23, 32, 27, .05);
  --shadow: 0 1px 2px rgba(23, 32, 27, .04), 0 8px 24px -12px rgba(23, 32, 27, .12);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1311;
    --surface: #151b18;
    --surface-2: #19201c;
    --ink: #eaede9;
    --ink-2: #c9d0cb;
    --muted: #96a29b;
    --line: #242d28;
    --line-strong: #313c36;
    --brand: #86c9a8;
    --brand-hover: #9bd5b8;
    --brand-soft: #1b2c24;
    --brand-ink: #0d1a14;
    --gold: #d6b26a;
    --gold-soft: #2c2618;
    --ok: #86cc9d;      --ok-soft: #1a2c20;
    --info: #8fb8de;    --info-soft: #1a2633;
    --warn: #e4b867;    --warn-soft: #2e2616;
    --danger: #f0928a;  --danger-soft: #331d1a;
    --hero-bg: #17352a;
    --hero-ink: #eef2ee;
    --hero-muted: #a8c2b5;
    --shadow-sm: none;
    --shadow: none;
    color-scheme: dark;
  }
}

/* --- Dasar ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.6 var(--font); font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-hover); }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.02em; color: var(--ink); }
h1 { font-size: 1.75rem; font-weight: 700; }
h2 { font-size: 1.05rem; font-weight: 650; letter-spacing: -.01em; }
p { margin: 0; }
.i { flex-shrink: 0; display: block; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
@media (max-width: 480px) { .wrap { padding: 0 16px; } }

/* --- Monogram ---------------------------------------------------------------- */
.mark {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px;
  background: #1e4d3b; color: #d6b26a;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.mark .logo { display: block; }
.mark.lg .logo { width: 36px; height: 36px; }
@media (prefers-color-scheme: dark) { .mark { background: #24503f; color: #e2c17f; } }
.mark.lg { width: 56px; height: 56px; border-radius: 16px; font-size: 1.3rem; }

/* --- Header ------------------------------------------------------------------ */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); min-width: 0; }
.brand:hover { color: var(--ink); }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand-text strong { font-weight: 700; font-size: .95rem; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text span { font-size: .75rem; color: var(--muted); white-space: nowrap; }
.brand { flex-shrink: 0; }
.nav { display: flex; gap: 2px; flex: 1; }
.nav a {
  display: flex; align-items: center; gap: 8px; padding: 8px 13px; border-radius: 10px;
  color: var(--muted); font-weight: 550; font-size: .92rem; transition: color .15s, background .15s;
}
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a.active { color: var(--brand); background: var(--brand-soft); }
.nav .i { width: 18px; height: 18px; }

/* Menu pengguna */
.usermenu { position: relative; }
.topbar-lang { margin-left: auto; display: flex; align-items: center; }
.usermenu summary {
  list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 5px 8px 5px 5px; border-radius: 999px; border: 1px solid transparent; transition: border-color .15s, background .15s;
}
.usermenu summary::-webkit-details-marker { display: none; }
.usermenu summary:hover, .usermenu[open] summary { background: var(--surface-2); border-color: var(--line); }
.avatar {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--gold-soft); color: var(--gold); font-weight: 700; font-size: .8rem;
}
.who { display: flex; flex-direction: column; line-height: 1.2; text-align: left; }
.who strong { font-size: .86rem; font-weight: 650; }
.who span { font-size: .75rem; color: var(--muted); max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.usermenu .i { color: var(--muted); }
.menu {
  position: absolute; right: 0; top: calc(100% + 8px); width: 248px; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
  animation: pop .14s ease-out;
}
.menu-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu-head strong { display: block; font-size: .9rem; }
.menu-head span { font-size: .8rem; color: var(--muted); }
.menu a, .menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 9px;
  color: var(--ink-2); font: inherit; font-size: .9rem; background: none; border: 0; cursor: pointer; text-align: left;
}
.menu a:hover, .menu button:hover { background: var(--surface-2); color: var(--ink); }
.menu form { margin: 0; }
.menu .i { width: 18px; height: 18px; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* Tab bawah di HP */
.tabbar { display: none; }
@media (max-width: 820px) {
  .nav, .who { display: none; }
  .topbar-inner { height: 60px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px);
    border-top: 1px solid var(--line);
  }
  .tabbar a {
    display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0;
    font-size: .7rem; font-weight: 600; color: var(--muted); border-radius: 10px;
  }
  .tabbar a.active { color: var(--brand); }
  .tabbar a.active .i { background: var(--brand-soft); }
  .tabbar .i { width: 40px; height: 26px; padding: 3px 10px; border-radius: 999px; }
  main.wrap { padding-bottom: 104px; }
}

/* --- Halaman ----------------------------------------------------------------- */
main.wrap { padding-top: 40px; padding-bottom: 72px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head p { margin-top: 6px; color: var(--muted); }
.eyebrow { font-size: .75rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.stack > * + * { margin-top: 20px; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) { h1 { font-size: 1.45rem; } main.wrap { padding-top: 24px; } }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); min-width: 0;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 22px; border-bottom: 1px solid var(--line);
}
.card-head .link {
  display: inline-flex; align-items: center; gap: 4px; padding: 6px 8px 6px 12px; border-radius: 9px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2);
  font-size: .82rem; font-weight: 600; transition: border-color .15s, color .15s, background .15s;
}
.card-head .link:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.card-head .link .i { width: 16px; height: 16px; transition: transform .15s; }
.card-head .link:hover .i { transform: translateX(2px); }
.card-body { padding: 22px; }
@media (max-width: 480px) { .card-head, .card-body { padding-left: 18px; padding-right: 18px; } }

/* Hero periode */
.hero {
  position: relative; overflow: hidden; border-radius: 20px; padding: 28px 30px 26px;
  background: var(--hero-bg); color: var(--hero-ink);
}
.hero::after {
  content: ""; position: absolute; right: -80px; top: -120px; width: 340px; height: 340px; border-radius: 50%;
  border: 1px solid var(--hero-line); box-shadow: 0 0 0 48px rgba(255, 255, 255, .025), 0 0 0 96px rgba(255, 255, 255, .02);
  pointer-events: none;
}
.hero-top { position: relative; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.hero .eyebrow { color: var(--hero-muted); }
.hero h2 { color: var(--hero-ink); font-size: 1.6rem; font-weight: 700; margin-top: 6px; letter-spacing: -.025em; }
.hero p.lead { color: var(--hero-muted); margin-top: 6px; max-width: 520px; }
.hero .btn-gold { margin-top: 2px; }
.stepper { position: relative; z-index: 1; list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); }
.stepper li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.stepper li::before {
  content: ""; position: absolute; top: 15px; left: calc(-50% + 18px); right: calc(50% + 18px); height: 2px;
  background: var(--hero-line); border-radius: 2px;
}
.stepper li:first-child::before { display: none; }
.stepper li.done::before, .stepper li.current::before { background: var(--gold); }
.dot {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  border: 1.5px solid var(--hero-line); color: var(--hero-muted); font-size: .8rem; font-weight: 650;
  background: var(--hero-bg);
}
.dot .i { width: 16px; height: 16px; }
.stepper li.done .dot { background: var(--gold); border-color: var(--gold); color: #1c2a22; }
.stepper li.current .dot { border-color: var(--gold); color: var(--gold); box-shadow: 0 0 0 5px rgba(214, 178, 106, .16); }
.stepper .label { font-size: .78rem; color: var(--hero-muted); line-height: 1.3; }
.stepper li.current .label { color: var(--hero-ink); font-weight: 650; }
@media (max-width: 640px) {
  .hero { padding: 22px 20px; }
  .stepper .label { display: none; }
  .stepper li.current .label { display: block; position: absolute; top: 40px; white-space: nowrap; }
  .stepper { margin-bottom: 18px; }
}

/* Kartu angka */
.stat { display: flex; flex-direction: column; gap: 4px; padding: 20px 22px; color: inherit; transition: border-color .15s, box-shadow .15s, transform .15s; }
a.stat:hover { color: inherit; border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-1px); }
.stat-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.chip-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); }
.chip-icon.gold { background: var(--gold-soft); color: var(--gold); }
.chip-icon.danger { background: var(--danger-soft); color: var(--danger); }
.chip-icon .i { width: 20px; height: 20px; }
.stat .go { color: var(--line-strong); transition: color .15s, transform .15s; }
a.stat:hover .go { color: var(--brand); transform: translateX(2px); }
.stat .label { color: var(--muted); font-size: .86rem; font-weight: 550; }
.stat .value { font-size: 1.65rem; font-weight: 700; letter-spacing: -.025em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat .value.sm { font-size: 1.25rem; }
.stat .hint { font-size: .82rem; color: var(--muted); }
.stat.alert .value { color: var(--danger); }

/* Daftar */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 14px; padding: 14px 22px; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list .main { flex: 1; min-width: 0; }
.list .title { font-weight: 600; font-size: .93rem; overflow-wrap: anywhere; }
.list .sub { font-size: .82rem; color: var(--muted); margin-top: 1px; }
.list .chip-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.list .chip-icon .i { width: 18px; height: 18px; }
.list > li > .badge, .list > li > .btn { flex-shrink: 0; }
@media (max-width: 480px) { .list li { padding: 13px 18px; } }

/* Badge */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px;
  font-size: .76rem; font-weight: 650; white-space: nowrap; background: var(--surface-2); color: var(--muted);
  border: 1px solid var(--line);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.badge.gold { background: rgba(214, 178, 106, .18); color: #f1dcae; border-color: transparent; }

/* Tabel (menjadi kartu di layar kecil) */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 14px 22px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 650; background: var(--surface-2); }
tbody tr { transition: background .12s; }
tbody tr:hover { background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }
td.right, th.right { text-align: right; }
td .sub { font-size: .82rem; color: var(--muted); margin-top: 2px; }
td .file { display: flex; align-items: center; gap: 12px; }
td .file a { font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .stack-table thead { display: none; }
  .stack-table, .stack-table tbody, .stack-table tr, .stack-table td { display: block; width: 100%; }
  .stack-table tr { padding: 14px 18px; border-bottom: 1px solid var(--line); }
  .stack-table tr:last-child { border-bottom: 0; }
  .stack-table tbody tr:hover { background: none; }
  .stack-table td { padding: 3px 0; border: 0; text-align: left !important; display: flex; justify-content: space-between; gap: 12px; }
  .stack-table td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: .8rem; flex-shrink: 0; }
  .stack-table td.primary { display: block; padding-bottom: 8px; }
  .stack-table td.primary::before { display: none; }
  .stack-table td:empty { display: none; }
}

/* Tombol */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 11px; border: 1px solid var(--brand);
  background: var(--brand); color: var(--brand-ink); font: inherit; font-weight: 650; font-size: .92rem;
  cursor: pointer; transition: background .15s, transform .1s, box-shadow .15s; white-space: nowrap;
}
.btn:hover { background: var(--brand-hover); color: var(--brand-ink); box-shadow: 0 6px 16px -8px rgba(30, 77, 59, .6); }
.btn:active { transform: translateY(1px); }
.btn .i { width: 18px; height: 18px; }
.btn.block { width: 100%; }
.btn.sm { padding: 7px 12px; font-size: .84rem; border-radius: 9px; }
.btn.ghost { background: var(--surface); color: var(--ink-2); border-color: var(--line-strong); }
.btn.ghost:hover { background: var(--surface-2); color: var(--ink); box-shadow: none; }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #1c2a22; }
.btn-gold:hover { background: #c39a4c; color: #1c2a22; box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .5); }
.btn[disabled] { opacity: .65; cursor: progress; }
.btn-link { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 6px; font: inherit; color: var(--muted); cursor: pointer; border-radius: 8px; }
.btn-link:hover { color: var(--danger); background: var(--danger-soft); }
.btn-link .i { width: 17px; height: 17px; }

/* Form */
.form-row { display: grid; gap: 7px; margin-bottom: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
@media (max-width: 560px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
label { font-weight: 600; font-size: .88rem; color: var(--ink-2); }
input[type=text], input[type=email], input[type=password], select {
  width: 100%; padding: 11px 14px; font: inherit; font-size: .94rem; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 11px;
  transition: border-color .15s, box-shadow .15s; appearance: none;
}
select {
  padding-right: 38px; cursor: pointer;
  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='%236b746e' 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 12px center;
}
input:hover, select:hover { border-color: var(--muted); }
input:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
input::placeholder { color: var(--muted); opacity: .75; }
.helptext { font-size: .8rem; color: var(--muted); }
.errorlist { list-style: none; margin: 0; padding: 0; color: var(--danger); font-size: .84rem; }

/* Area upload */
.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 30px 20px; text-align: center;
  border: 1.5px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface-2);
  cursor: pointer; transition: border-color .15s, background .15s; font-weight: 500; color: var(--ink-2);
}
.dropzone:hover, .dropzone.over { border-color: var(--brand); background: var(--brand-soft); }
.dropzone .chip-icon { width: 48px; height: 48px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.dropzone .chip-icon .i { width: 22px; height: 22px; }
.dropzone strong { color: var(--brand); font-weight: 650; }
.dropzone .helptext { max-width: 460px; }
.filelist { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.filelist:empty { display: none; }
.filelist li {
  display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 14px; border: 1px solid var(--line);
  border-radius: 11px; background: var(--surface); animation: pop .14s ease-out;
}
.filelist .name { flex: 1; min-width: 0; font-weight: 600; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.filelist .size { font-size: .8rem; color: var(--muted); }
.filelist .i { color: var(--muted); }
.filelist .bad { border-color: var(--danger); background: var(--danger-soft); }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 6px; }

/* Filter */
.filter select { width: auto; padding: 8px 36px 8px 12px; font-size: .86rem; border-radius: 10px; }

/* Pesan */
.messages { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 10px; }
.messages li {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 16px; border-radius: 12px;
  background: var(--brand-soft); color: var(--ink); font-weight: 550; font-size: .92rem; animation: pop .2s ease-out;
  transition: opacity .3s, transform .3s;
}
.messages li.success { background: var(--ok-soft); }
.messages li.success > .i { color: var(--ok); }
.messages li.error { background: var(--danger-soft); }
.messages li.error > .i { color: var(--danger); }
.messages li span { flex: 1; }
.messages button { background: none; border: 0; padding: 4px; color: var(--muted); cursor: pointer; border-radius: 6px; }
.messages li.hide { opacity: 0; transform: translateY(-4px); }
.note {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: 12px;
  background: var(--warn-soft); color: var(--ink); font-size: .9rem;
}
.note > .i { color: var(--warn); margin-top: 1px; }
.note.info { background: var(--brand-soft); }
.note.info > .i { color: var(--brand); }
.note a { font-weight: 650; }
.note.slim { padding: 8px 12px; margin-top: 8px; font-size: .84rem; }
.pre { white-space: pre-line; }

/* Kosong */
.empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 44px 22px; text-align: center; color: var(--muted); }
.empty .chip-icon { width: 52px; height: 52px; border-radius: 16px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.empty .chip-icon .i { width: 24px; height: 24px; }
.empty strong { color: var(--ink); font-weight: 650; }

/* Kartu laporan */
.reports { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.report { display: flex; flex-direction: column; gap: 14px; padding: 20px; }
.report .top { display: flex; align-items: center; justify-content: space-between; }
.report h3 { font-size: 1.05rem; font-weight: 650; }
.report .sub { font-size: .82rem; color: var(--muted); margin-top: 2px; }
.report.pending { background: var(--surface-2); box-shadow: none; }
.report.pending .chip-icon { background: var(--surface); color: var(--muted); border: 1px solid var(--line); }

/* Ringkasan tagihan */
.summary { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; padding: 22px; }
.summary .value { font-size: 1.9rem; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.summary .pay { border-left: 1px solid var(--line); padding-left: 24px; }
.summary .pay strong { display: block; margin-bottom: 4px; font-size: .88rem; }
.summary .pay div { color: var(--ink-2); font-size: .9rem; }
@media (max-width: 640px) { .summary { grid-template-columns: 1fr; } .summary .pay { border-left: 0; border-top: 1px solid var(--line); padding: 16px 0 0; } }

.pagination { display: flex; gap: 8px; justify-content: center; align-items: center; padding: 16px; font-size: .88rem; border-top: 1px solid var(--line); }

/* Bantuan */
.help h2 { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.help h2 .chip-icon { width: 34px; height: 34px; border-radius: 10px; }
.help h2 .chip-icon .i { width: 18px; height: 18px; }
.help ol, .help ul { margin: 0 0 12px; padding-left: 22px; color: var(--ink-2); }
.help li { margin: 6px 0; }
.help li::marker { color: var(--muted); }
.help p + p { margin-top: 10px; }
.help table td { padding: 12px 14px 12px 0; }
.help table td:first-child { white-space: nowrap; width: 1%; }
.help table tbody tr:hover { background: none; }

/* --- Halaman masuk ---------------------------------------------------------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.auth-panel {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between;
  padding: 44px 56px; background: var(--hero-bg); color: var(--hero-ink);
}
.auth-panel::after {
  content: ""; position: absolute; left: -160px; bottom: -220px; width: 520px; height: 520px; border-radius: 50%;
  border: 1px solid var(--hero-line); box-shadow: 0 0 0 64px rgba(255, 255, 255, .025), 0 0 0 128px rgba(255, 255, 255, .02);
}
.auth-panel .brand, .auth-panel .brand:hover { color: var(--hero-ink); }
.auth-panel .brand-text span { color: var(--hero-muted); }
.auth-panel .mark { background: rgba(255, 255, 255, .08); color: #e2c17f; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.auth-copy { position: relative; z-index: 1; max-width: 440px; }
.auth-copy h1 { color: var(--hero-ink); font-size: 2.1rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; }
.auth-copy h1 em { font-style: normal; color: #e2c17f; }
.auth-sub { color: var(--hero-muted); margin-top: 14px; font-size: 1.02rem; }
.auth-copy ul { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 14px; }
.auth-copy li { display: flex; gap: 12px; align-items: flex-start; color: var(--hero-muted); }
.auth-copy li .i { color: #e2c17f; margin-top: 2px; }
.auth-copy li strong { color: var(--hero-ink); font-weight: 600; display: block; }
.auth-foot-note { position: relative; z-index: 1; font-size: .8rem; color: var(--hero-muted); }
.auth-main { display: grid; place-items: center; padding: 40px 24px; }
.auth-box { width: 100%; max-width: 380px; }
.auth-box h1 { font-size: 1.6rem; margin-bottom: 6px; }
.auth-box .intro { color: var(--muted); margin-bottom: 28px; }
.auth-links { margin-top: 22px; display: grid; gap: 8px; text-align: center; font-size: .88rem; color: var(--muted); }
.auth-links a { font-weight: 600; }
.auth-mobile-brand { display: none; }
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-panel { display: none; }
  .auth-main { place-items: start center; padding-top: 56px; }
  .auth-mobile-brand { display: flex; margin-bottom: 36px; }
}
td .file .chip-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
td .file .chip-icon .i { width: 18px; height: 18px; }

/* Kartu angka ringkas di HP: ikon di kiri, teks di kanan */
@media (max-width: 640px) {
  .grid-3 { gap: 12px; }
  .stat { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; row-gap: 0; padding: 16px 18px; align-items: center; }
  .stat-top { grid-row: 1 / span 3; margin: 0; }
  .stat-top .go { display: none; }
  .stat .value { font-size: 1.3rem; }
  .stat .value.sm { font-size: 1.1rem; }
}

/* --- Laporan keuangan -------------------------------------------------------- */
.back { margin-bottom: 12px; }
.back .i { width: 16px; height: 16px; }
.fin-cta { display: flex; align-items: center; gap: 16px; padding: 18px 22px; margin-bottom: 20px; color: inherit; transition: border-color .15s, box-shadow .15s; }
.fin-cta:hover { color: inherit; border-color: var(--line-strong); box-shadow: var(--shadow); }
.fin-cta .main { flex: 1; display: flex; flex-direction: column; }
.fin-cta .main span { color: var(--muted); font-size: .88rem; }
.fin-cta .go { color: var(--muted); }
.seg { display: flex; gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }
.seg a { padding: 7px 14px; border-radius: 9px; font-size: .88rem; font-weight: 600; color: var(--muted); }
.seg a.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.statement-head { text-align: center; margin: 4px 0 22px; display: flex; flex-direction: column; gap: 2px; }
.statement-head strong { font-size: .95rem; }
.statement-head h2 { font-size: 1.2rem; }
.statement-head span { color: var(--muted); font-size: .9rem; }
.statement-head small { color: var(--muted); font-size: .78rem; }
table.fin { width: 100%; border-collapse: collapse; font-size: .93rem; }
table.fin th { background: none; text-align: right; font-size: .74rem; padding: 8px 6px; border-bottom: 1px solid var(--line); }
table.fin td { padding: 8px 6px; border-bottom: 1px solid var(--line); }
table.fin tbody tr:hover { background: none; }
table.fin .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; width: 160px; }
table.fin .fin-section td { padding-top: 22px; font-weight: 700; letter-spacing: .04em; border-bottom: 0; }
table.fin .fin-head td { padding-top: 16px; font-weight: 650; border-bottom: 0; }
table.fin .fin-item td:first-child { padding-left: 22px; color: var(--ink-2); }
table.fin .fin-subtotal td { font-weight: 600; border-top: 1px solid var(--line-strong); }
table.fin .fin-total td { font-weight: 650; background: var(--surface-2); }
table.fin .fin-grand td { font-weight: 700; border-top: 2px solid var(--ink); border-bottom: 3px double var(--ink); }
@media (max-width: 640px) { table.fin .num { width: auto; } table.fin { font-size: .86rem; } table.fin .fin-item td:first-child { padding-left: 12px; } }
@media print {
  .topbar, .tabbar, .noprint, .messages { display: none !important; }
  body { background: #fff; color: #000; }
  main.wrap { padding: 0; max-width: none; }
  .card { border: 0; box-shadow: none; }
  .page-head p, .back { display: none; }
}
.note .btn { margin-left: auto; flex-shrink: 0; }
.note > span { flex: 1; }
.btn.xs { padding: 5px 10px; font-size: .8rem; border-radius: 8px; gap: 5px; }
.btn.xs .i { width: 15px; height: 15px; }
.i.flip { transform: scaleX(-1); }

/* Ganti bahasa */
.lang { display: inline-flex; gap: 2px; padding: 3px; margin: 0; background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; }
.lang button { border: 0; background: none; padding: 4px 9px; border-radius: 7px; font: inherit; font-size: .75rem; font-weight: 700; letter-spacing: .04em; color: var(--muted); cursor: pointer; }
.lang button:hover { color: var(--ink); }
.lang button.active { background: var(--surface); color: var(--brand); box-shadow: var(--shadow-sm); }
.menu-lang { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; margin: 4px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: .85rem; color: var(--ink-2); }
.auth-main { position: relative; }
.auth-lang { position: absolute; top: 20px; right: 24px; }

/* Logo besar di halaman masuk */
.mark.lg { width: 60px; height: 60px; border-radius: 17px; }
.mark.lg .logo { width: 40px; height: 40px; }
.auth .brand { gap: 16px; }
.auth .brand-text strong { font-size: 1.45rem; letter-spacing: -.02em; }
.auth .brand-text span { font-size: .9rem; margin-top: 2px; }
