/* Dona — sistem desain v1.1
   Palet "plum dan pasir", mode terang dan gelap, Plus Jakarta Sans. */

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/PlusJakartaSans-var.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #F7F3F0;
  --surface: #FFFFFF;
  --surface-2: #FBF8F6;
  --surface-3: #F2EBE7;
  --ink: #2B2230;
  --ink-2: #5A4F5E;
  --ink-3: #8A7F8D;
  --line: #EBE3DE;
  --line-2: #DDD3CD;
  --brand: #6B4E71;
  --brand-2: #7E5F85;
  --brand-soft: #F1E8F2;
  --brand-ink: #FFFFFF;
  --accent: #C99A3B;
  --accent-ink: #2B2230;
  --accent-soft: #F6ECD6;
  --pos: #3E8A5F;
  --pos-soft: #E3F1E8;
  --neg: #B4495A;
  --warn: #9C6A12;
  --warn-soft: #F8EDD5;
  --info-soft: #E8EDF6;
  --info: #4F6D9A;
  --danger-soft: #F7E3E6;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(43, 34, 48, .04), 0 8px 24px -16px rgba(43, 34, 48, .18);
  --shadow-lg: 0 18px 40px -20px rgba(107, 78, 113, .45);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --sidebar: 264px;
  --tabbar: 70px;
  color-scheme: light;
}

/* Gelap: otomatis mengikuti perangkat, kecuali pengguna memilih terang */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #161219; --surface: #201A24; --surface-2: #261F2B; --surface-3: #2F2735;
    --ink: #EEE7F0; --ink-2: #C9BDCC; --ink-3: #9A8F9E; --line: #342A3A; --line-2: #43374A;
    --brand: #C7A8CC; --brand-2: #D6BCDA; --brand-soft: #382B3E; --brand-ink: #1E1622;
    --accent: #E2BD6A; --accent-ink: #1E1622; --accent-soft: #3A2F1A;
    --pos: #7BC79A; --pos-soft: #1F3328; --neg: #EE8E9C; --warn: #E7B962; --warn-soft: #3A2F18;
    --info-soft: #222C3D; --info: #9DB8E3; --danger-soft: #3D2229;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35); --shadow-lg: 0 18px 40px -20px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #161219; --surface: #201A24; --surface-2: #261F2B; --surface-3: #2F2735;
  --ink: #EEE7F0; --ink-2: #C9BDCC; --ink-3: #9A8F9E; --line: #342A3A; --line-2: #43374A;
  --brand: #C7A8CC; --brand-2: #D6BCDA; --brand-soft: #382B3E; --brand-ink: #1E1622;
  --accent: #E2BD6A; --accent-ink: #1E1622; --accent-soft: #3A2F1A;
  --pos: #7BC79A; --pos-soft: #1F3328; --neg: #EE8E9C; --warn: #E7B962; --warn-soft: #3A2F18;
  --info-soft: #222C3D; --info: #9DB8E3; --danger-soft: #3D2229;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35); --shadow-lg: 0 18px 40px -20px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  transition: background-color .25s ease, color .25s ease;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 16px; font-weight: 650; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0 0 .75em; }
code { font-size: .9em; background: var(--surface-3); padding: 1px 5px; border-radius: 5px; }
small { font-size: 12.5px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

.i { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.75; fill: none; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: middle; }
.i-xs { width: 14px; height: 14px; }
.muted { color: var(--ink-3); }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.pre { white-space: pre-wrap; }
.link { color: var(--brand-2); font-weight: 550; font-size: 14px; }
.link:hover { text-decoration: underline; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- shell */
.shell { min-height: 100vh; }
.hide-sm { display: none !important; }
.sidebar { display: none; }
.main { min-width: 0; }
.content { padding: 16px 16px calc(var(--tabbar) + 32px + env(safe-area-inset-bottom)); max-width: 1160px; margin: 0 auto; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top));
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-title { font-weight: 650; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.logo { width: 40px; height: 40px; flex: none; display: block; }
.logo .logo-bg { fill: var(--brand); }
.logo .logo-d { stroke: var(--brand-ink); }
.logo .logo-dot { fill: var(--accent); }
.topbar-logo .logo { width: 34px; height: 34px; }
.auth-brand .logo { width: 54px; height: 54px; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  height: calc(var(--tabbar) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: var(--ink-3); font-weight: 550; padding: 6px 0; }
.tabbar a.active { color: var(--brand-2); }
.tabbar .fab {
  justify-self: center; width: 54px; height: 54px; border-radius: 18px;
  background: var(--brand); color: var(--brand-ink); display: grid; place-items: center;
  box-shadow: 0 6px 18px -6px rgba(22, 72, 61, .6); margin-top: -18px;
}
.tabbar .fab .i { width: 26px; height: 26px; stroke-width: 2.2; }

@media (min-width: 960px) {
  .shell { display: grid; grid-template-columns: var(--sidebar) 1fr; }
  .sidebar {
    display: flex; flex-direction: column; gap: 6px;
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
    padding: 20px 14px; background: var(--surface); border-right: 1px solid var(--line);
  }
  .topbar, .tabbar { display: none; }
  .content { padding: 28px 36px 64px; }
  .hide-sm { display: inline-flex !important; }
}

.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 14px; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text strong { font-size: 18px; letter-spacing: -0.02em; }
.brand-text small { color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.sidebar-cta { margin: 0 4px 10px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px; color: var(--ink-2); font-weight: 550; font-size: 14.5px; }
.side-nav a:hover { background: var(--surface-2); color: var(--ink); }
.side-nav a.active { background: var(--brand-soft); color: var(--brand); }
.side-nav .count { margin-left: auto; background: var(--accent); color: #fff; font-size: 11.5px; min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; padding: 0 6px; }
.side-nav-secondary { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.sidebar-user { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 8px 4px; border-top: 1px solid var(--line); }
.sidebar-user .who { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.sidebar-user .who strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user .who small { color: var(--ink-3); }

.avatar { width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 13px; flex: none; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; position: relative; }
.icon-btn:hover { background: var(--surface-3); color: var(--ink); }
.icon-btn.has-dot::after { content: ""; position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--bg); }

.offline-bar { position: fixed; left: 12px; right: 12px; bottom: calc(var(--tabbar) + 12px); z-index: 40; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 12px; font-size: 13.5px; text-align: center; }
@media (min-width: 960px) { .offline-bar { left: auto; right: 24px; bottom: 24px; max-width: 360px; } }

/* ---------------------------------------------------------------- page */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 4px 0 20px; }
.page-head p.muted { margin: 4px 0 0; max-width: 62ch; }
.page-head h1 { display: flex; align-items: center; gap: 10px; }
.eyebrow { color: var(--ink-3); font-size: 13px; font-weight: 550; margin: 0 0 2px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-3); font-size: 13.5px; font-weight: 550; margin-bottom: 6px; }
.back:hover { color: var(--ink); }
.back .i { width: 16px; height: 16px; }
.narrow { max-width: 640px; margin-left: auto; margin-right: auto; width: 100%; }
.page-head.narrow { margin-bottom: 12px; }

.cols { display: grid; gap: 16px; }
.col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
@media (min-width: 900px) { .cols { grid-template-columns: 1fr 1fr; align-items: start; } }

/* ---------------------------------------------------------------- card */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.col > .card { margin-bottom: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2 { display: flex; align-items: center; gap: 8px; }
.card h2 + p.muted { margin-top: 4px; }
.card > h2 { margin-bottom: 10px; }
.card.flush { padding: 4px 0; }
details.card > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::after { content: "▾"; color: var(--ink-3); }
details.card[open] > summary { margin-bottom: 10px; }
h2.sub { font-size: 14px; color: var(--ink-2); margin: 18px 0 6px; }

.attention { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: linear-gradient(0deg, var(--surface), var(--surface)) padding-box; box-shadow: 0 0 0 3px var(--accent-soft); }

/* ---------------------------------------------------------------- stats */
.stats { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; margin-bottom: 16px; }
.stats-3 { grid-template-columns: 1fr 1fr; }
@media (min-width: 900px) { .stats { grid-template-columns: 1.35fr 1fr 1fr 1fr; } .stats-3 { grid-template-columns: repeat(3, 1fr); } }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 4px; min-width: 0; box-shadow: var(--shadow); }
.stat-label { color: var(--ink-3); font-size: 13px; font-weight: 550; }
.stat-value { font-size: clamp(16px, 4.4vw, 21px); font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-sub { color: var(--ink-3); font-size: 12.5px; }
@media (max-width: 899px) {
  .stats > .stat-hero ~ .stat:last-child:nth-child(even),
  .stats > .stat:first-child:not(.stat-hero) ~ .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
.stat-hero { grid-column: 1 / -1; background: var(--brand); border-color: var(--brand); color: var(--brand-ink); position: relative; overflow: hidden; box-shadow: var(--shadow-lg); }
.stat-hero > * { position: relative; z-index: 1; }
.stat-hero::after { content: ""; position: absolute; width: 150px; height: 150px; right: -64px; top: -78px; border-radius: 50%; background: var(--accent); opacity: .30; pointer-events: none; }
.stat-hero::before { content: ""; position: absolute; width: 90px; height: 90px; right: 40px; bottom: -55px; border-radius: 50%; border: 14px solid var(--brand-ink); opacity: .08; pointer-events: none; }
.stat-hero .stat-label, .stat-hero .stat-sub { color: color-mix(in srgb, var(--brand-ink) 72%, transparent); }
.stat-hero .stat-value { font-size: 30px; }
.stat-hero .bar { background: color-mix(in srgb, var(--brand-ink) 22%, transparent); margin-top: 6px; }
.stat-hero .bar i { background: var(--brand-ink); }
@media (min-width: 900px) { .stat-hero { grid-column: auto; } .stats-3 .stat-hero { grid-column: auto; } }

.summary-strip { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; }
.summary-strip > div { padding: 10px; min-width: 0; display: flex; flex-direction: column; }
.summary-strip > div + div { border-left: 1px solid var(--line); }
.summary-strip small { color: var(--ink-3); font-weight: 550; }
.summary-strip strong { font-size: clamp(12.5px, 3.3vw, 15.5px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------------------------------------------------------- rows / lists */
.list { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-radius: 10px; min-width: 0; }
.list > .row + .row { border-top: 1px solid var(--line); border-radius: 0; }
a.row:hover { background: var(--surface-2); }
.card.list .row { padding: 11px 16px; }
.row.static { cursor: default; }
.row.struck .row-title, .row.struck .amount { text-decoration: line-through; color: var(--ink-3); }
.row-ic { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none; color: var(--c, var(--ink-3)); background: color-mix(in srgb, var(--c, #888) 14%, transparent); }
.row-ic.sq { border-radius: 11px; }
.row-ic .i { width: 18px; height: 18px; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.row-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.row-title .i { margin-left: 4px; vertical-align: -2px; }
.row-sub { color: var(--ink-3); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-end { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex: none; text-align: right; }
.row-end form { margin: 0; }
.row-date { width: 44px; height: 46px; border-radius: 11px; background: var(--surface-3); display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; line-height: 1.1; }
.row-date b { font-size: 17px; }
.row-date small { font-size: 11px; color: var(--ink-3); text-transform: uppercase; font-weight: 600; }
.row-date.late { background: var(--danger-soft); color: var(--neg); }
.row-date.late small { color: var(--neg); }
.amount { font-weight: 650; white-space: nowrap; }
.amount.neu { color: var(--ink-2); }

.day { margin-bottom: 14px; }
.day-head { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-3); font-weight: 600; margin: 0 4px 6px; }

.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--ink-3)); margin-right: 7px; vertical-align: 1px; flex: none; }
.dot.lg { width: 14px; height: 14px; margin-right: 0; }

/* ---------------------------------------------------------------- badges */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 650; padding: 2px 8px; border-radius: 999px; background: var(--surface-3); color: var(--ink-2); white-space: nowrap; }
.badge-pending_approval, .badge-due, .badge-partial { background: var(--warn-soft); color: var(--warn); }
.badge-draft, .badge-upcoming { background: var(--info-soft); color: var(--info); }
.badge-posted, .badge-paid { background: var(--pos-soft); color: var(--pos); }
.badge-pro { background: var(--brand-soft); color: var(--brand); }
.badge-rejected, .badge-voided, .badge-overdue, .badge-discarded { background: var(--danger-soft); color: var(--neg); }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; padding: 0 15px; border-radius: 11px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  font: inherit; font-weight: 600; font-size: 14.5px; cursor: pointer; white-space: nowrap;
  transition: background .12s, border-color .12s, transform .05s;
}
.btn:hover { background: var(--surface-2); border-color: var(--ink-3); }
.btn:active { transform: translateY(1px); }
.btn .i { width: 18px; height: 18px; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn-danger { background: var(--neg); border-color: var(--neg); color: #fff; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn-ghost-danger { border-color: transparent; background: transparent; color: var(--neg); }
.btn-ghost-danger:hover { background: var(--danger-soft); border-color: transparent; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 9px; }
.btn-xs { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.btn-lg { height: 48px; font-size: 15.5px; padding: 0 22px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------------------------------------------------------------- forms */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span, .field > legend { font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 0; }
.field > legend { margin-bottom: 6px; }
.field small, fieldset > small { color: var(--ink-3); font-size: 12.5px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset[disabled] { opacity: .65; }
input, select, textarea {
  font: inherit; color: var(--ink); width: 100%;
  background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  padding: 10px 12px; min-height: 44px; outline: none;
  transition: border-color .12s, box-shadow .12s, background .12s;
}
textarea { min-height: 80px; resize: vertical; }
select { appearance: none; -webkit-appearance: none; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
input:focus, select:focus, textarea:focus { border-color: var(--brand-2); background: var(--surface); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-2) 22%, transparent); }
input[readonly] { background: var(--surface-3); }
input.bare { background: transparent; border-color: transparent; min-height: 34px; padding: 4px 6px; }
input.bare:hover { border-color: var(--line); }
.grid-2, .grid-3 { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .grid-2 { grid-template-columns: 1fr 1fr; } .grid-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .grid-3 { grid-template-columns: repeat(4, 1fr); } }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.form-actions form { display: flex; gap: 8px; margin: 0; }
.form-actions .grow { flex: 1; }
.static-val { margin: 0; font-weight: 600; }
.inline-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.inline-form .field { flex: 1 1 160px; }
.sub-field { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
details.field > summary { cursor: pointer; color: var(--ink-2); font-size: 13.5px; font-weight: 600; margin-bottom: 6px; }
.fine { color: var(--ink-3); font-size: 12.5px; margin: 8px 0 0; display: flex; gap: 6px; align-items: baseline; }
.fine .i { flex: none; transform: translateY(2px); }

.amount-field .amount-input { display: flex; align-items: center; gap: 8px; border-bottom: 2px solid var(--line-2); padding: 4px 0 6px; }
.amount-field .amount-input:focus-within { border-color: var(--brand-2); }
.amount-field em { font-style: normal; font-weight: 700; font-size: 22px; color: var(--ink-3); }
.amount-field input { border: 0; background: transparent; box-shadow: none; padding: 0; font-size: 34px; font-weight: 750; letter-spacing: -0.02em; min-height: 48px; }
.amount-field input:focus { box-shadow: none; background: transparent; }
.txn-expense .amount-field input { color: var(--neg); }
.txn-income .amount-field input { color: var(--pos); }

.seg { display: flex; gap: 4px; background: var(--surface-3); padding: 4px; border-radius: 13px; margin-bottom: 12px; overflow-x: auto; }
.seg a { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 10px; border-radius: 10px; color: var(--ink-2); font-weight: 600; font-size: 14px; white-space: nowrap; }
.seg a .i { width: 17px; height: 17px; }
.seg a.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.seg a.seg-expense { color: var(--neg); }
.seg a.seg-income { color: var(--pos); }
@media (max-width: 420px) { .seg a span { font-size: 12.5px; } .seg a .i { display: none; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; min-height: 0; }
.chip span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 13.5px; font-weight: 550; cursor: pointer; background: var(--surface); transition: all .12s; }
.chip span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.chip input:checked + span { background: color-mix(in srgb, var(--c) 16%, var(--surface)); border-color: var(--c); color: var(--ink); box-shadow: 0 0 0 1px var(--c); }
.chip input:focus-visible + span { outline: 2px solid var(--brand-2); outline-offset: 2px; }

.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.choice span { display: block; padding: 11px 12px; border: 1px solid var(--line-2); border-radius: 11px; font-weight: 600; font-size: 14px; cursor: pointer; background: var(--surface); }
.choice input:checked + span { border-color: var(--brand-2); background: var(--brand-soft); color: var(--brand); box-shadow: 0 0 0 1px var(--brand-2); }
.choice-card { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 14px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); }
.choice-card:hover { border-color: var(--brand-2); }
.choice-card small { color: var(--ink-3); }

.radio-list, .radio-inline { display: flex; flex-direction: column; gap: 8px; }
.radio-inline { flex-direction: row; flex-wrap: wrap; gap: 16px; }
.radio, .check { display: flex; align-items: center; gap: 9px; font-size: 14.5px; cursor: pointer; }
.radio input, .check input { width: 18px; height: 18px; min-height: 0; accent-color: var(--brand-2); margin: 0; flex: none; }

.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.swatch span { display: block; width: 30px; height: 30px; border-radius: 50%; background: var(--c); cursor: pointer; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .5); }
.swatch input:checked + span { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--c); }

.search { position: relative; display: flex; align-items: center; flex: 1 1 100%; }
.search .i { position: absolute; left: 12px; color: var(--ink-3); width: 18px; height: 18px; }
.search input { padding-left: 38px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; align-items: center; }
.filters select { width: auto; min-width: 0; flex: 1 1 calc(50% - 8px); min-height: 40px; padding-top: 7px; padding-bottom: 7px; font-size: 14px; }
.filters .search input { min-height: 40px; }
@media (min-width: 900px) { .search { flex-basis: 220px; } .filters select { flex: 1 1 140px; } }

/* ---------------------------------------------------------------- flashes / notices */
.flashes { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.flash { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 12px; font-size: 14.5px; font-weight: 500; border: 1px solid transparent; margin-bottom: 8px; animation: slide .25s ease-out; }
.flashes .flash { margin-bottom: 0; }
.flash span { flex: 1; }
.flash-success { background: var(--brand-soft); color: var(--brand); border-color: color-mix(in srgb, var(--brand-2) 30%, transparent); }
.flash-error { background: var(--danger-soft); color: var(--neg); border-color: color-mix(in srgb, var(--neg) 30%, transparent); }
.flash-warning { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.flash-info { background: var(--info-soft); color: var(--info); }
.flash-x { background: none; border: 0; color: inherit; cursor: pointer; padding: 0; opacity: .6; }
.flash-x .i { width: 16px; height: 16px; }
@keyframes slide { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.notices { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.notice { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; font-size: 14px; border: 1px solid var(--line); background: var(--surface); }
.notice > span { flex: 1; }
.notice > .i:last-child { color: var(--ink-3); width: 16px; height: 16px; }
.notice-info { background: var(--info-soft); border-color: transparent; color: var(--info); }
.notice-warn { background: var(--warn-soft); border-color: transparent; color: var(--warn); }
.notice-muted { color: var(--ink-2); }

.empty { text-align: center; padding: 36px 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty h1, .empty h2 { font-size: 19px; }
.empty p { max-width: 44ch; }
.empty-ic { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-2); margin-bottom: 4px; }
.empty-ic .i { width: 26px; height: 26px; }
.empty .choice-grid { width: 100%; margin-top: 10px; }
.empty-inline { color: var(--ink-3); font-size: 14px; margin: 4px 0; display: flex; align-items: center; gap: 8px; }
.empty-inline .i { color: var(--pos); }

/* ---------------------------------------------------------------- progress */
.bar { display: block; height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--c, var(--brand-2)); transition: width .4s ease; }
.bar-thin { height: 4px; margin-top: 6px; max-width: 220px; }
.bar-lg { height: 12px; }
.bar-warn i, .bar-fast i { background: var(--accent); }
.bar-over i { background: var(--neg); }
.budget { display: block; padding: 8px 0; }
.budget + .budget { border-top: 1px dashed var(--line); }
.budget-row { padding: 12px 4px; border-radius: 10px; }
.budget-row:hover { background: var(--surface-2); }
.budget-top { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; margin-bottom: 6px; font-weight: 550; }
.budget-top > span:first-child { display: flex; align-items: center; min-width: 0; }
.budget-foot { display: flex; justify-content: space-between; font-size: 12.5px; margin-top: 5px; }
.budget-hero-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.budget-hero-nums small, .goal-hero-nums small, .goal-card-nums small { display: block; color: var(--ink-3); font-weight: 550; }
.budget-hero-nums strong { font-size: 18px; }
.budget-edit { display: flex; flex-direction: column; }
.budget-edit-row { display: grid; grid-template-columns: 1fr 170px; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.budget-edit-row > span { display: flex; flex-direction: column; }
.budget-edit-row > span small { margin-left: 16px; }
.budget-edit-row input { text-align: right; font-weight: 600; }

.month-nav { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 14px; }
.month-nav strong { min-width: 150px; text-align: center; font-size: 16px; }

/* ring */
.ring { --size: 46px; width: var(--size); height: var(--size); border-radius: 50%; flex: none; display: grid; place-items: center;
  background: conic-gradient(var(--c, var(--brand-2)) calc(var(--p) * 1%), var(--surface-3) 0); position: relative; }
.ring::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--surface); }
.ring b { position: relative; font-size: 11.5px; }
.ring.lg { --size: 60px; } .ring.lg b { font-size: 13px; }
.ring.xl { --size: 112px; } .ring.xl::before { inset: 10px; } .ring.xl b { font-size: 22px; }

.goal-mini { display: flex; align-items: center; gap: 12px; padding: 9px 4px; border-radius: 10px; }
.goal-mini + .goal-mini { border-top: 1px solid var(--line); }
.goal-mini:hover { background: var(--surface-2); }
.goal-mini > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.goal-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.goal-card { display: flex; flex-direction: column; gap: 14px; margin: 0; border-top: 4px solid var(--c); }
.goal-card:hover { border-color: var(--line-2); border-top-color: var(--c); }
.goal-card-top { display: flex; gap: 14px; align-items: center; }
.goal-card-top p { margin: 2px 0 0; font-size: 13px; }
.goal-card-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.goal-hint { margin: 0; font-size: 13px; color: var(--ink-2); background: var(--surface-2); padding: 8px 10px; border-radius: 9px; display: flex; gap: 6px; align-items: center; }
.goal-hero { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.goal-hero-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 14px; flex: 1; }
.goal-hero-nums strong { font-size: 19px; display: block; }

/* ---------------------------------------------------------------- approvals / drafts */
.approval { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.approval:first-of-type { border-top: 0; }
.approval > div:first-child { display: flex; flex-direction: column; min-width: 0; }
.approval > div:first-child .muted { font-size: 13px; }
.approval-actions { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; }
.approval-actions form { margin: 0; }
@media (min-width: 700px) { .approval { grid-template-columns: 1fr auto auto; } .approval-actions { grid-column: auto; } }
.draft { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; padding: 14px 0; border-top: 1px solid var(--line); align-items: end; }
.draft:first-of-type { border-top: 0; }
.draft-main { grid-column: 1 / -1; display: flex; flex-direction: column; }
.draft-main .muted { font-size: 13px; }
.draft-actions { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: flex-end; }
.field.compact input { min-height: 38px; padding: 7px 10px; }
@media (min-width: 800px) { .draft { grid-template-columns: 1.6fr 1fr 1fr auto; } .draft-main, .draft-actions { grid-column: auto; } }

/* ---------------------------------------------------------------- receipt / tables */
.receipt-top { text-align: center; padding: 8px 0 16px; border-bottom: 1px dashed var(--line-2); margin-bottom: 14px; }
.receipt-top p { margin: 6px 0 0; }
.receipt-amount { font-size: 36px; letter-spacing: -0.03em; margin-top: 4px; }
.receipt-desc { font-size: 16px; font-weight: 600; color: var(--ink); }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 9px 14px; margin: 0; font-size: 14.5px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; }
.danger-zone { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--line); }
.danger-zone form { margin: 0; }
.void-box > summary { list-style: none; }
.void-box > summary::-webkit-details-marker { display: none; }
.void-box form { display: flex; gap: 8px; margin-top: 10px; }
.void-box[open] { flex-basis: 100%; }
.revision { padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.revision ul { margin: 6px 0 0; padding-left: 18px; color: var(--ink-2); }

.table-wrap { overflow-x: auto; margin: 0 -4px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); font-weight: 650; padding: 8px 6px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.table td { padding: 10px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table.compact td { padding: 7px 6px; }
.table .num { text-align: right; white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 9px 14px; font-weight: 600; font-size: 14px; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.active { color: var(--brand); border-color: var(--brand); }
.pager { display: flex; justify-content: center; align-items: center; gap: 12px; margin: 16px 0; }

.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--ink-3); }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.lg-in { background: var(--pos); } .lg-out { background: var(--accent); }
.chart-wrap { overflow-x: auto; }
.chart { width: 100%; min-width: 420px; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .tick { fill: var(--ink-3); font-size: 11px; font-family: var(--font); }
.chart .tick.strong { fill: var(--ink); font-weight: 700; }
.chart .b-in { fill: var(--pos); opacity: .82; }
.chart .b-out { fill: var(--accent); opacity: .82; }
.chart g.cur rect { opacity: 1; }

/* ---------------------------------------------------------------- misc */
.menu-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
@media (min-width: 600px) { .menu-grid { grid-template-columns: repeat(4, 1fr); } }
.menu-grid a { display: flex; flex-direction: column; gap: 10px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-weight: 600; box-shadow: var(--shadow); }
.menu-grid a .i { color: var(--brand-2); width: 24px; height: 24px; }
.menu-grid a:hover { border-color: var(--brand-2); }

.onboarding { background: var(--surface); }
.steps { list-style: none; padding: 0; margin: 14px 0 18px; display: grid; gap: 10px; counter-reset: s; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: s; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); display: flex; flex-direction: column; font-size: 14px; }
.steps li::before { content: counter(s); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font-weight: 700; font-size: 12.5px; margin-bottom: 6px; }
.steps li.current { border-color: var(--brand-2); background: var(--brand-soft); }
.steps li.current::before { background: var(--brand); color: var(--brand-ink); }
.steps span { color: var(--ink-3); font-size: 13px; }

.bullets { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; color: var(--ink-2); font-size: 14.5px; }
.copy-row { display: flex; gap: 8px; }
.invite-box { border-color: var(--brand-2); box-shadow: 0 0 0 3px var(--brand-soft); }
.invite-box h2 { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.cat-row { gap: 6px; }
.cat-row input.bare { flex: 1; }
pre.code, textarea.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; background: var(--surface-3); padding: 12px; border-radius: 10px; overflow-x: auto; white-space: pre; }
.install-btn { margin-top: 8px; }

/* ---------------------------------------------------------------- auth */
.auth-body { min-height: 100vh; background: radial-gradient(900px 420px at 15% -10%, var(--brand-soft), transparent 70%), radial-gradient(700px 380px at 110% 10%, var(--accent-soft), transparent 70%), var(--bg); }
.auth-wrap { max-width: 460px; margin: 0 auto; padding: 40px 16px 60px; }
.auth-wrap .card { padding: 24px; }
.auth-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.auth-brand strong { font-size: 22px; display: block; letter-spacing: -0.02em; }
.auth-brand small { color: var(--ink-3); font-size: 13.5px; }
.auth-card { display: flex; flex-direction: column; gap: 14px; }
.auth-card h1 { font-size: 22px; }
.auth-card h2 { margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.auth-card h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.auth-card > p.muted { margin: -6px 0 0; }
.checklist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.checklist li { display: flex; align-items: center; gap: 8px; }
.checklist .ok .i { color: var(--pos); }
.checklist .bad { color: var(--neg); }
.notice-warn code { background: transparent; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media print { .sidebar, .topbar, .tabbar, .actions, .filters, .danger-zone, .form-actions { display: none !important; } .shell { display: block; } .card, .stat { box-shadow: none; } }

.notice-box { background: var(--warn-soft); color: var(--ink); border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.notice-box p { margin: 0 0 8px; }
.notice-box p:last-child, .notice-box pre:last-child { margin-bottom: 0; }
.notice-box pre.code { white-space: pre-wrap; word-break: break-all; background: var(--surface); margin: 0 0 8px; }

/* ---------------------------------------------------------------- v1.1 */
h1 { font-weight: 750; letter-spacing: -0.025em; }
h2 { font-weight: 700; }
.side-nav a.active { background: var(--brand-soft); color: var(--brand); font-weight: 650; }
.side-nav a.active .i { stroke-width: 2.1; }
.side-nav .count { background: var(--accent); color: var(--accent-ink); }
.btn-primary { box-shadow: 0 6px 16px -10px var(--brand); }
.tabbar .fab { background: var(--brand); color: var(--brand-ink); box-shadow: 0 10px 22px -10px var(--brand); border-radius: 20px; }
.tabbar a.active { color: var(--brand); }
.avatar { background: var(--accent-soft); color: var(--warn); }
.empty-ic { background: var(--brand-soft); color: var(--brand); }
.link { color: var(--brand); }
.chip input:checked + span { background: color-mix(in srgb, var(--c) 18%, var(--surface)); }
.chip span::before { display: none; }
.chip span .i { color: var(--c); }
.row-ic { background: color-mix(in srgb, var(--c, #888) 16%, var(--surface)); }
.row-ic.lg { width: 44px; height: 44px; border-radius: 14px; }
.row-ic.lg .i { width: 22px; height: 22px; }
.mini-ic { width: 26px; height: 26px; border-radius: 9px; display: inline-grid; place-items: center; flex: none; margin-right: 9px; color: var(--c, var(--ink-3)); background: color-mix(in srgb, var(--c, #888) 16%, var(--surface)); }
.mini-ic .i { width: 15px; height: 15px; }
.budget-name { display: flex; align-items: center; }
.lg-in { background: var(--pos); } .lg-out { background: var(--accent); }
.chart .b-out { fill: var(--accent); }

/* tombol tema: tampilkan ikon sesuai pilihan */
.theme-toggle .i { display: none; }
:root[data-theme-pref="system"] .theme-toggle .t-system,
:root[data-theme-pref="light"] .theme-toggle .t-light,
:root[data-theme-pref="dark"] .theme-toggle .t-dark,
:root:not([data-theme-pref]) .theme-toggle .t-system { display: inline-block; }
.auth-theme { position: fixed; top: 14px; right: 14px; z-index: 5; background: var(--surface); border: 1px solid var(--line); }
.menu-tile { display: flex; flex-direction: column; gap: 10px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font: inherit; font-weight: 600; color: var(--ink); text-align: left; cursor: pointer; box-shadow: var(--shadow); }
.menu-tile .i { color: var(--brand); width: 24px; height: 24px; }
.theme-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.theme-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.theme-opt span { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px; border: 1px solid var(--line-2); border-radius: 14px; font-size: 13.5px; font-weight: 600; cursor: pointer; background: var(--surface); text-align: center; }
.theme-opt input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }

/* pemilih ikon kategori */
.icon-field { flex-basis: 100% !important; }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 6px; }
.icon-opt { position: relative; }
.icon-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.icon-opt span { display: grid; place-items: center; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.icon-opt input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.icon-pop { position: relative; }
.icon-pop > summary { list-style: none; cursor: pointer; }
.icon-pop > summary::-webkit-details-marker { display: none; }
.icon-grid.pop { position: absolute; z-index: 10; top: 46px; left: 0; width: 290px; padding: 10px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: var(--shadow-lg); }

/* pendaftaran & admin */
.auth-switch { text-align: center; color: var(--ink-2); font-size: 14px; margin: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.check span { font-size: 13.5px; color: var(--ink-2); line-height: 1.45; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .04em; font-size: 16px; }
.admin-user { align-items: flex-start; }
.admin-user .row-main { gap: 2px; }
.admin-user .row-title { white-space: normal; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; max-width: 330px; margin-top: 4px; }
.admin-actions form { margin: 0; }
.stat-label .i { margin-right: 4px; vertical-align: -2px; color: var(--brand); }
@media (max-width: 640px) {
  .admin-user { flex-wrap: wrap; }
  .admin-user .row-end { width: 100%; align-items: flex-start; padding-left: 48px; }
  .admin-actions { justify-content: flex-start; max-width: none; }
}

/* ---------------------------------------------------------------- tur pengenalan */
.tour-overlay { position: fixed; inset: 0; z-index: 100; }
.tour-spot { position: fixed; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(22, 18, 25, .62), 0 0 0 3px var(--accent); transition: top .25s ease, left .25s ease, width .25s ease, height .25s ease; pointer-events: none; }
.tour-overlay.centered { background: rgba(22, 18, 25, .62); display: grid; place-items: center; padding: 16px; }
.tour-overlay.centered .tour-spot { display: none; }
.tour-card { position: fixed; z-index: 101; width: 340px; max-width: calc(100vw - 24px); background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 20px; padding: 20px; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .55); animation: tour-in .22s ease-out; }
.tour-overlay.centered .tour-card { position: relative; width: 380px; text-align: center; padding: 26px 22px 20px; }
.tour-badge { width: 52px; height: 52px; border-radius: 16px; margin: 0 auto 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.tour-badge .i { width: 26px; height: 26px; }
.tour-step { margin: 0 0 4px; font-size: 12px; font-weight: 650; color: var(--accent); letter-spacing: .03em; text-transform: uppercase; }
.tour-card h2 { font-size: 18px; margin-bottom: 6px; }
.tour-text { color: var(--ink-2); font-size: 14.5px; line-height: 1.55; margin: 0 0 16px; }
.tour-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tour-overlay.centered .tour-foot { flex-direction: column-reverse; }
.tour-dots { display: flex; gap: 5px; }
.tour-dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--line-2); transition: width .2s; }
.tour-dots i.on { width: 18px; background: var(--brand); }
.tour-btns { display: flex; gap: 6px; }
.tour-again { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; }
@keyframes tour-in { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .tour-spot, .tour-card { transition: none; animation: none; } }

/* ---------------------------------------------------------------- premium */
.plan-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 650; white-space: nowrap; }
.plan-premium { background: var(--brand-soft); color: var(--brand); }
.plan-trial { background: var(--accent-soft); color: var(--warn); }
.plan-free { background: var(--surface-3); color: var(--ink-2); }
.sidebar-plan { margin: -6px 8px 12px; align-self: flex-start; }
.sidebar-plan:hover { filter: brightness(.97); }
.flash-premium { background: var(--accent-soft); color: var(--ink); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.flash-premium > .i { color: var(--warn); flex: none; margin-top: 1px; }
.premium-banner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 16px; border-radius: 14px; background: var(--accent-soft); color: var(--ink); font-size: 14px; border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.premium-banner > span:nth-child(2) { flex: 1; }
.premium-banner > .i { color: var(--ink-3); width: 16px; height: 16px; }
.premium-hero { display: grid; gap: 20px; align-items: center; background: linear-gradient(135deg, var(--brand-soft), var(--surface) 70%); }
@media (min-width: 760px) { .premium-hero { grid-template-columns: 1fr 1.2fr; } .premium-hero.is-owned { grid-template-columns: auto 1fr; } }
.premium-price small { display: block; color: var(--ink-3); font-weight: 600; }
.premium-price strong { display: block; font-size: 40px; letter-spacing: -0.03em; color: var(--brand); line-height: 1.15; margin: 4px 0; }
.premium-cta { display: flex; flex-direction: column; gap: 12px; }
.premium-cta .notice { margin: 0; }
.premium-hero-ic { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); }
.premium-hero-ic .i { width: 28px; height: 28px; }
.invoice { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.invoice-grid { display: grid; gap: 16px; margin: 6px 0 16px; }
@media (min-width: 700px) { .invoice-grid { grid-template-columns: 1fr 1fr; } }
.invoice-amount, .invoice-bank { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.invoice-amount small, .invoice-bank small { color: var(--ink-3); font-weight: 600; }
.invoice-amount strong { font-size: 28px; letter-spacing: -0.02em; }
.proof-form { border-top: 1px dashed var(--line-2); padding-top: 14px; }
.feature-list { display: grid; gap: 10px; }
@media (min-width: 700px) { .feature-list { grid-template-columns: 1fr 1fr; } }
.feature { display: flex; gap: 10px; align-items: flex-start; }
.feature b { display: block; font-size: 14.5px; }
.feature small { display: block; }
.limit-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); margin-bottom: 10px; }
.inline-actions { display: flex; gap: 6px; margin: 0; }
a.stat:hover { border-color: var(--brand); }
