/* Layout: satu kolom lebar maksimal 960px; pita ringkasan di atas, panel grafik dua kolom yang menumpuk di layar sempit. */
:root {
  color-scheme: light;
  --hdr: #050b1c;
  --g1: #1e3fd0;
  --g2: #2a6ae8;
  --bg: #f2f5ff;
  --surface: #ffffff;
  --surface2: #eef1f7;
  --line: #dbe1ec;
  --fg: #111827;
  --muted: #586174;
  --accent: #2f5bff;
  --accent-fg: #ffffff;
  --accent-soft: #e4ebff;
  --in: #0f7a55;
  --in-soft: #dcf3ea;
  --out: #c23a2b;
  --out-soft: #fbe3df;
  --warn: #a86500;
  --warn-soft: #fdeccb;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-num: 'Space Grotesk', 'Plus Jakarta Sans', system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d111a; --surface: #151b27; --surface2: #1c2433; --line: #2a3446;
    --fg: #e8ecf4; --muted: #9aa5b8; --accent: #8fa6ff; --accent-fg: #0d111a; --accent-soft: #222c4d;
    --in: #4cc99a; --in-soft: #123428; --out: #ff8f7e; --out-soft: #3d1d19; --warn: #f0b34a; --warn-soft: #3a2c0e;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d111a; --surface: #151b27; --surface2: #1c2433; --line: #2a3446;
  --fg: #e8ecf4; --muted: #9aa5b8; --accent: #8fa6ff; --accent-fg: #0d111a; --accent-soft: #222c4d;
  --in: #4cc99a; --in-soft: #123428; --out: #ff8f7e; --out-soft: #3d1d19; --warn: #f0b34a; --warn-soft: #3a2c0e;
  color-scheme: dark;
}
[hidden] { display: none !important; }
img { max-width: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: 15px; line-height: 1.5; }
* { box-sizing: border-box; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap {
  max-width: 960px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 20px 56px;
}
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.in { color: var(--in); }
.out { color: var(--out); }
.tf { color: var(--muted); }

/* header */
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 10px; }
.logo { width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: var(--accent-fg); display: grid; place-items: center; font-family: var(--font-num); font-weight: 700; font-size: 18px; }
h1 { font-family: var(--font-num); font-size: 24px; letter-spacing: -0.01em; }
.monthnav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mlabel { min-width: 140px; text-align: center; font-weight: 600; }
.icon-btn { width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 18px; line-height: 1; }
.icon-btn:hover { background: var(--surface2); }

/* tabs */
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 18px; min-width: 0; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; margin-bottom: -1px; }
.tabs a:hover { color: var(--fg); }
.tabs a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }

/* panels */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; min-width: 0; }
.panel + .panel, .panel + .cols, .cols + .panel, .cols + .cols, .notice + .panel { margin-top: 16px; }
.panel-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 12px; }
h2 { font-family: var(--font-num); font-size: 17px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 16px; }
.lbl { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 600; }
.notice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; background: var(--accent-soft); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; }
.notice.warn { background: var(--warn-soft); }
.notice p { flex: 1 1 260px; min-width: 0; }

/* summary band */
.band { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr); gap: 16px 28px; align-items: center; }
.big { font-size: clamp(28px, 7vw, 40px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; margin-top: 2px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stats > div { border-left: 1px solid var(--line); padding-left: 14px; min-width: 0; }
.stats .num { font-size: clamp(16px, 3.6vw, 21px); font-weight: 600; margin-top: 2px; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .band { grid-template-columns: 1fr; }
  .stats > div:first-child { border-left: 0; padding-left: 0; }
}

/* category bars */
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.bar-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
.bar-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pct { color: var(--muted); font-size: 13px; width: 38px; text-align: right; }
.track { height: 8px; background: var(--surface2); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.track > span { display: block; height: 100%; border-radius: 99px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }

/* charts */
.chart { width: 100%; min-height: 120px; }
.chart svg { display: block; max-width: 100%; }
.grid { stroke: var(--line); stroke-width: 1; fill: none; }
.axis { fill: var(--muted); font-size: 11px; font-family: var(--font-body); }
.bar-out { fill: var(--out); }
.bar-in { fill: var(--in); }
.legend { display: flex; gap: 14px; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; }
.legend .li-in { background: var(--in); }
.legend .li-out { background: var(--out); }

.insights { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 14px 20px; }
.insights .num { font-size: 18px; font-weight: 600; }
.alerts { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--warn-soft); color: var(--fg); list-style: none; display: grid; gap: 2px; font-size: 14px; }
.alerts strong { color: var(--warn); }

/* lists and rows */
.list { list-style: none; margin: 0; padding: 0; }
.row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); }
.row .main { min-width: 0; }
.ttl { font-weight: 600; overflow-wrap: anywhere; }
.sub { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.amt { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-weight: 600; text-align: right; white-space: nowrap; }
.acts { grid-column: 2 / 4; display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.dhead { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 600; padding: 16px 0 6px; }
.dhead:first-child { padding-top: 0; }
.empty { padding: 22px 8px; text-align: center; color: var(--muted); }
.empty a { color: var(--accent); }
.wicon { width: 34px; height: 34px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-family: var(--font-num); font-weight: 700; }

/* budgets */
.brow { padding: 14px 0; border-top: 1px solid var(--line); }
.bhead { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.meter { height: 10px; background: var(--surface2); border-radius: 99px; overflow: hidden; margin: 8px 0; }
.meter > span { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.meter > span.warn { background: var(--warn); }
.meter > span.over { background: var(--out); }
.bfoot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; font-size: 14px; }
.bfoot label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.bfoot input { width: 140px; }

/* forms */
.form { display: grid; gap: 14px; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 12px; }
.field { display: grid; gap: 4px; min-width: 0; align-content: start; }
.field label, .check { font-size: 13px; font-weight: 600; color: var(--muted); }
input[type="text"], input[type="search"], input[type="date"], input[type="email"], input[type="password"], select, textarea {
  width: 100%; min-width: 0; padding: 9px 11px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--fg);
}
input.money { text-align: right; font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.bfoot input.money { width: 140px; }
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible, textarea:focus-visible, .seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; background: var(--surface2); padding: 3px; gap: 3px; max-width: 100%; flex-wrap: wrap; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: block; padding: 7px 14px; border-radius: 8px; font-weight: 600; font-size: 14px; color: var(--muted); }
.seg input:checked + span { background: var(--surface); color: var(--fg); box-shadow: 0 0 0 1px var(--line); }
.btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btn { padding: 9px 14px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 600; font-size: 14px; }
.btn:hover { background: var(--surface2); }
.btn.primary { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.sm { padding: 4px 10px; font-size: 13px; font-weight: 500; }
.btn.danger { color: var(--out); }
.btn.armed { background: var(--out); color: #fff; border-color: var(--out); }
.err { color: var(--out); font-size: 14px; min-height: 1.2em; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 12px; align-items: end; margin-bottom: 14px; }
.check { display: flex; align-items: center; gap: 8px; padding-bottom: 10px; }
.group-title { font-size: 13px; font-weight: 700; color: var(--muted); margin: 16px 0 4px; text-transform: uppercase; letter-spacing: 0.05em; }
.catrow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 0; }
.export-box { margin-top: 12px; display: grid; gap: 8px; }
.export-box textarea { min-height: 140px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.foot { margin-top: 28px; font-size: 13px; color: var(--muted); }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); max-width: calc(100% - 32px); background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-weight: 600; font-size: 14px; z-index: 20; }
@media (prefers-reduced-motion: no-preference) {
  .meter > span, .track > span { transition: width 0.3s ease; }
}

.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who-mail { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; font-size: 13px; }
.authwrap { max-width: 420px; margin: 20px auto 0; }
.authwrap h2 { font-size: 22px; }
.links { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; }
.linkbtn { background: none; border: 0; padding: 2px 0; color: var(--accent); cursor: pointer; font-weight: 600; text-decoration: underline; }
.linkbtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* ---- Nexara ---- */
.top { display: block; margin-bottom: 0; }
.top-in { width: 100%; box-sizing: border-box; }
.band .stats .num { overflow-wrap: normal; }
@media (max-width: 640px) {
  .band .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
  .band .stats > div:nth-child(2) { border-left: 1px solid rgba(255,255,255,0.28); }
  .band .stats > div:nth-child(3) { grid-column: 1 / -1; border-left: 0; padding-left: 0; border-top: 1px solid rgba(255,255,255,0.28); padding-top: 12px; }
  .band .stats .num { font-size: 19px; }
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.top { background: var(--hdr); color: #fff; padding-top: env(safe-area-inset-top, 0px); }
.top-in { max-width: 960px; margin: 0 auto; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "brand month who"; align-items: center; gap: 0 16px;
  padding-block: 12px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.brand-h { margin: 0; grid-area: brand; display: flex; font-size: inherit; }
.brand { display: block; border-radius: 6px; }
.brand:focus-visible { outline: 2px solid #8fb4ff; outline-offset: 4px; }
.logo-img { display: block; height: 34px; width: auto; max-width: 100%; }
.top .monthnav { grid-area: month; justify-content: center; }
.top .who { grid-area: who; }
.top .mlabel { color: #fff; }
.top .icon-btn { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.2); color: #fff; }
.top .icon-btn:hover { background: rgba(255,255,255,0.18); }
.top .btn.sm { background: rgba(255,255,255,0.1); color: #fff; border-color: rgba(255,255,255,0.28); }
.top .btn.sm:hover { background: rgba(255,255,255,0.2); }
.top .who-mail { color: #b9c6ea; }
.top :focus-visible { outline-color: #8fb4ff; }
.wrap { padding-block: 20px 56px; }
#view > * + * { margin-top: 16px; }

.tabs a { display: inline-flex; align-items: center; gap: 8px; }
.tabs svg { width: 18px; height: 18px; flex: none; }

.panel { border-radius: 18px; }
.panel.band { position: relative; overflow: hidden; background: linear-gradient(135deg, var(--g1), var(--g2)); color: #fff; border: 0; box-shadow: 0 14px 30px -18px rgba(30, 63, 208, 0.75); }
.band::before, .band::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255,255,255,0.07); pointer-events: none; }
.band::before { width: 220px; height: 220px; right: -60px; top: -90px; }
.band::after { width: 150px; height: 150px; right: 90px; bottom: -90px; }
.band > * { position: relative; z-index: 1; }
.band .lbl { color: rgba(255,255,255,0.8); }
.band .muted { color: rgba(255,255,255,0.85); }
.band .stats > div { border-left-color: rgba(255,255,255,0.28); }
.band .in { color: #a9f6d6; }
.band .out { color: #ffd3cc; }
.hero-sub { color: rgba(255,255,255,0.8); font-size: 13px; margin-top: 2px; }
.chip { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: rgba(255,255,255,0.18); font-size: 11px; margin-right: 6px; vertical-align: 1px; }

.qa { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.qa button, .qa a { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 10px 2px; border: 0; background: transparent; color: var(--fg); font-weight: 600; font-size: 13px; text-decoration: none; cursor: pointer; border-radius: 14px; }
.qa button:hover, .qa a:hover { background: var(--surface2); }
.qi { width: 54px; height: 54px; border-radius: 18px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.qi svg { width: 24px; height: 24px; }

.wsec { min-width: 0; }
.wscroll { list-style: none; margin: 0; padding: 2px 0 8px; display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; min-width: 0; }
.wscroll .wcard { flex: 0 0 min(78%, 280px); scroll-snap-align: start; }
.wgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 14px; }
.wcard { position: relative; overflow: hidden; border-radius: 20px; padding: 16px; color: #fff; min-height: 132px; display: flex; flex-direction: column; box-shadow: 0 14px 28px -18px rgba(5, 11, 28, 0.7); }
.wcard::after { content: ""; position: absolute; right: -34px; bottom: -44px; width: 140px; height: 140px; border-radius: 50%; background: rgba(255,255,255,0.1); pointer-events: none; }
.wcard > * { position: relative; z-index: 1; }
.wc-type { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.88; font-weight: 600; }
.wc-name { font-weight: 600; margin-top: 14px; overflow-wrap: anywhere; }
.wc-bal { font-size: 24px; font-weight: 700; margin-top: 2px; font-family: var(--font-num); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.wc-sub { font-size: 12px; opacity: 0.85; }
.wc-acts { display: flex; gap: 6px; margin-top: auto; padding-top: 12px; flex-wrap: wrap; }
.wcard .btn { background: rgba(255,255,255,0.16); color: #fff; border-color: rgba(255,255,255,0.4); }
.wcard .btn:hover { background: rgba(255,255,255,0.28); }
.wcard .btn.armed { background: #fff; color: #b3261e; border-color: #fff; }
.g-blue { background: linear-gradient(135deg, #1e3fd0, #2a6ae8); }
.g-cyan { background: linear-gradient(135deg, #0c4fb3, #1479c9); }
.g-violet { background: linear-gradient(135deg, #4627c4, #7140e6); }
.g-green { background: linear-gradient(135deg, #0b6b5a, #0e8670); }

.fab { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--g1), var(--g2)); box-shadow: 0 12px 26px -10px rgba(30, 63, 208, 0.85); z-index: 14; }
.fab:hover { filter: brightness(1.1); }
.fab svg { width: 26px; height: 26px; }
.fab:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

@media (max-width: 760px) {
  .top-in { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand who" "month month"; }
  .top .monthnav { justify-content: space-between; margin-top: 10px; }
  .top .mlabel { flex: 1; }
  .who-mail { display: none; }
  .tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; margin: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; overflow: visible;
    background: var(--surface); border-top: 1px solid var(--line); border-bottom: 0;
    padding: 0 env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); box-shadow: 0 -8px 22px -14px rgba(5, 11, 28, 0.5); }
  .tabs a { flex-direction: column; justify-content: center; gap: 3px; padding: 9px 2px 8px; font-size: 11px; border-bottom: 0; margin: 0; }
  .tabs a[aria-current="page"] { border-bottom: 0; }
  .tabs svg { width: 22px; height: 22px; }
  .wrap { padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px)); }
  .fab { bottom: calc(78px + env(safe-area-inset-bottom, 0px)); }
  .toast { bottom: calc(142px + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: no-preference) {
  .fab, .qa button, .qa a { transition: transform 0.15s ease, background 0.15s ease, filter 0.15s ease; }
  .fab:active { transform: scale(0.94); }
}

/* ---- v3: gerakan ikon, menu aksi, profil ---- */
@keyframes icon-pop { 0% { transform: scale(1) rotate(0); } 35% { transform: scale(0.74) rotate(-10deg); } 70% { transform: scale(1.22) rotate(7deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes icon-bounce { 0% { transform: translateY(0) scale(1); } 35% { transform: translateY(-7px) scale(1.18); } 65% { transform: translateY(1px) scale(0.94); } 100% { transform: translateY(0) scale(1); } }
@media (prefers-reduced-motion: no-preference) {
  .tabs a svg, .qi, .icon-btn, .who-link .avatar, .fab svg, .fab-menu .fi, .avatar-edit { transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1); }
  .tabs a:active svg { transform: scale(0.7) translateY(1px); }
  .tabs a.pop svg { animation: icon-bounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); }
  .qa button:active .qi, .qa a:active .qi { transform: scale(0.84) rotate(-8deg); }
  .qi.pop { animation: icon-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
  .icon-btn:active { transform: scale(0.86); }
  .who-link:active .avatar { transform: scale(0.88); }
  .avatar-edit:active { transform: scale(0.82) rotate(-10deg); }
  .fab-menu button:active .fi { transform: scale(0.8) rotate(-12deg); }
  .wcard { transition: transform 0.15s ease; }
  .wcard:active { transform: scale(0.985); }
  .fab-scrim { transition: opacity 0.2s ease, visibility 0s linear 0.2s; }
  .fab-wrap.open .fab-scrim { transition: opacity 0.2s ease; }
  .fab-menu li { transition: opacity 0.16s ease, transform 0.24s cubic-bezier(0.34, 1.56, 0.64, 1), visibility 0s linear 0.24s; transition-delay: calc((6 - var(--i)) * 18ms); }
  .fab-wrap.open .fab-menu li { transition-delay: calc(var(--i) * 32ms); transition: opacity 0.16s ease, transform 0.26s cubic-bezier(0.34, 1.56, 0.64, 1); transition-delay: calc(var(--i) * 32ms); }
}
.fab-wrap { position: fixed; inset: 0; z-index: 30; pointer-events: none; }
.fab-wrap .fab { pointer-events: auto; z-index: 2; }
.fab-wrap .fab svg { transition: transform 0.25s ease; }
.fab-wrap.open .fab svg { transform: rotate(135deg); }
.fab-scrim { position: absolute; inset: 0; background: rgba(5, 11, 28, 0.55); opacity: 0; visibility: hidden; }
.fab-wrap.open .fab-scrim { opacity: 1; visibility: visible; pointer-events: auto; }
.fab-menu { position: absolute; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(88px + env(safe-area-inset-bottom, 0px)); list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column-reverse; gap: 10px; align-items: flex-end; max-height: calc(100dvh - 130px); overflow-y: auto; overscroll-behavior: contain; pointer-events: none; }
.fab-menu li { opacity: 0; visibility: hidden; transform: translateY(14px) scale(0.96); }
.fab-wrap.open .fab-menu li { opacity: 1; visibility: visible; transform: none; }
.fab-wrap.open .fab-menu { pointer-events: auto; }
.fab-menu button { display: flex; align-items: center; gap: 12px; border: 0; cursor: pointer; background: var(--surface); color: var(--fg); padding: 6px 6px 6px 18px; border-radius: 999px; font-weight: 600; font-size: 14px; box-shadow: 0 10px 22px -12px rgba(5, 11, 28, 0.7); }
.fab-menu button:hover { background: var(--surface2); }
.fab-menu .fi { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--g1), var(--g2)); flex: none; }
.fab-menu .fi svg { width: 20px; height: 20px; }
.fab-menu button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (max-width: 760px) { .fab-menu { bottom: calc(146px + env(safe-area-inset-bottom, 0px)); max-height: calc(100dvh - 190px); } }

.avatar { display: inline-grid; place-items: center; border-radius: 50%; overflow: hidden; flex: none; background: linear-gradient(135deg, var(--g1), var(--g2)); color: #fff; font-family: var(--font-num); font-weight: 700; line-height: 1; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.who-link { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; border-radius: 999px; padding: 3px 3px 3px 14px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.2); }
.who-link:hover { background: rgba(255,255,255,0.16); }
.who-link .who-mail { color: #e6ecff; max-width: 150px; font-size: 13px; font-weight: 600; }
@media (max-width: 760px) { .who-link { padding: 2px; } }

.pcard { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px 24px; align-items: center; }
.avatar-box { position: relative; width: 104px; height: 104px; }
.avatar-edit { position: absolute; right: -4px; bottom: -4px; width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--surface); background: var(--accent); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }
.avatar-edit svg { width: 18px; height: 18px; }
.avatar-edit:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pinfo { min-width: 0; display: grid; gap: 4px; }
.pname { font-family: var(--font-num); font-size: 24px; overflow-wrap: anywhere; line-height: 1.2; }
.pmail, .psince { overflow-wrap: anywhere; font-size: 14px; }
.pstats { list-style: none; margin: 8px 0 4px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--muted); }
.pstats b { color: var(--fg); font-size: 16px; }
.pbtns { margin-top: 6px; }
.pcols { align-items: start; }
.stack { display: grid; gap: 16px; min-width: 0; align-content: start; }
.fields.one { grid-template-columns: minmax(0, 1fr); }
input[readonly] { background: var(--surface2); color: var(--muted); }
.catadd { margin-top: 18px; padding-top: 4px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.catadd .group-title { margin: 12px 0 0; }
.group-title.first { margin-top: 0; }
.logout { display: flex; justify-content: center; }
.logout .btn { min-width: 220px; padding: 11px 18px; color: var(--out); border-color: var(--out); background: transparent; }
.logout .btn:hover { background: var(--out-soft); }
@media (max-width: 520px) {
  .pcard { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .pstats, .pbtns { justify-content: center; }
  .logout .btn { width: 100%; }
}

.crop { position: fixed; inset: 0; z-index: 40; background: rgba(5, 11, 28, 0.62); display: grid; place-items: center; padding: 16px; }
.crop-card { background: var(--surface); color: var(--fg); border-radius: 22px; padding: 20px; width: min(100%, 360px); display: grid; gap: 12px; max-height: 100%; overflow: auto; box-shadow: 0 30px 60px -20px rgba(0,0,0,0.6); }
.crop-stage { position: relative; width: 288px; max-width: 100%; margin: 0 auto; aspect-ratio: 1; border-radius: 16px; overflow: hidden; touch-action: none; background: var(--surface2); }
.crop-stage canvas { width: 100%; height: 100%; display: block; cursor: grab; }
.crop-stage canvas:active { cursor: grabbing; }
.crop-ring { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 999px rgba(5, 11, 28, 0.55); border: 2px solid #fff; pointer-events: none; }
input[type="range"] { width: 100%; accent-color: var(--accent); }

/* ---- Hari ini dan kemarin ---- */
.dy { margin-top: 16px; }
.dy-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.dy-tile { background: var(--surface2); border-radius: 14px; padding: 14px; min-width: 0; }
.dy-amt { font-size: clamp(17px, 4.6vw, 24px); font-weight: 700; margin-top: 4px; overflow-wrap: anywhere; }
.dy-sub { font-size: 13px; margin: 4px 0 0; }
.dy-cmp { font-size: 14px; margin: 12px 0 0; }
.dy-cmp { display: flex; align-items: center; gap: 8px; }
.dy-arrow { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 10px; flex: none; }
.dy-arrow.up { background: rgba(179, 38, 30, 0.12); color: var(--out); }
.dy-arrow.down { background: rgba(14, 140, 84, 0.14); color: #0e8c54; }
.dy-arrow.same { background: var(--surface2); color: var(--muted); }
@keyframes dyIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes dyPop { 0% { transform: scale(0.4); opacity: 0; } 70% { transform: scale(1.18); opacity: 1; } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: no-preference) {
  .dy-tile { transition: transform 0.2s ease, box-shadow 0.2s ease; }
  .dy-tile:hover { transform: translateY(-3px); box-shadow: 0 10px 22px -14px rgba(30, 63, 208, 0.55); }
  .dy-tile:active { transform: scale(0.98); }
  .dy-play { animation: dyIn 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
  .dy-play .dy-tile { animation: dyIn 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) 0.1s both; }
  .dy-play .dy-tile:nth-child(2) { animation-delay: 0.22s; }
  .dy-play .dy-cmp { animation: dyIn 0.5s ease 0.45s both; }
  .dy-play .dy-arrow { animation: dyPop 0.5s ease 0.7s both; }
}

/* ---- Bilah tanggal & bulan, tab tanpa scrollbar ---- */
.top-in { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand who"; }
.tabs { overflow-y: hidden; scrollbar-width: none; -ms-overflow-style: none; }
.tabs::-webkit-scrollbar { display: none; }
.datebar { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 16px; }
.datebar[hidden] { display: none; }
.today { margin: 0; display: flex; align-items: center; gap: 12px; min-width: 0; }
.dt-ic { width: 42px; height: 42px; border-radius: 13px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.dt-ic svg { width: 22px; height: 22px; }
.dt-tx { display: grid; min-width: 0; }
.dt-tx strong { font-size: 17px; line-height: 1.25; }
.datebar .monthnav { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 4px; flex-wrap: nowrap; }
.datebar .icon-btn { border: 0; background: var(--surface2); }
.datebar .mlabel { min-width: 128px; }
@media (max-width: 520px) {
  .datebar { flex-direction: column; align-items: stretch; }
  .datebar .monthnav { justify-content: space-between; }
  .datebar .mlabel { flex: 1; }
}

/* ---- Menu akun ---- */
.top { position: relative; z-index: 20; }
button.who-link { font: inherit; cursor: pointer; }
.acct { position: relative; }
.acct-menu { position: absolute; right: 0; top: calc(100% + 12px); width: min(330px, calc(100vw - 32px)); box-sizing: border-box; z-index: 30; color: var(--fg); background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 14px; box-shadow: 0 28px 60px -18px rgba(8, 14, 40, 0.45); transform-origin: top right; display: grid; gap: 10px; text-align: left; }
.acct-menu[hidden] { display: none; }
.acct-head { display: flex; align-items: center; gap: 12px; padding: 4px 4px 10px; border-bottom: 1px solid var(--line); min-width: 0; }
.acct-who { display: grid; min-width: 0; }
.acct-who strong { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-who span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-strip { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; border-radius: 16px; padding: 12px 14px; cursor: pointer; color: #fff; font: 700 15px var(--font-body); background: linear-gradient(110deg, #2f5bff, #17b3e6 60%, #7fd6c2); text-align: left; }
.acct-strip .acct-ic { background: rgba(255,255,255,0.22); color: #fff; }
.acct-st { flex: 1; min-width: 0; }
.acct-chip { background: rgba(255,255,255,0.92); color: #0b1c4d; border-radius: 999px; padding: 4px 14px; font-size: 13px; font-weight: 700; }
.acct-group { background: var(--surface2); border-radius: 18px; padding: 6px; display: grid; gap: 2px; }
.acct-item { display: flex; align-items: center; gap: 12px; padding: 10px 10px; border-radius: 13px; color: var(--fg); text-decoration: none; font-weight: 600; font-size: 15px; }
a.acct-item:hover, a.acct-item:focus-visible { background: var(--surface); box-shadow: 0 2px 10px -4px rgba(8, 14, 40, 0.3); }
.acct-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; color: var(--muted); }
.acct-ic svg { width: 20px; height: 20px; }
.acct-row .acct-lbl { flex: 1; }
.acct-sw { width: 46px; height: 28px; border-radius: 999px; border: 0; padding: 0; cursor: pointer; background: #c9cfdf; position: relative; flex: none; transition: background 0.2s ease; }
.acct-sw i { position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.3); transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1); }
.acct-sw[aria-checked="true"] { background: var(--accent); }
.acct-sw[aria-checked="true"] i { transform: translateX(18px); }
.acct-out { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; border-radius: 16px; padding: 10px 14px 10px 10px; cursor: pointer; background: rgba(224, 62, 52, 0.12); color: #d23a2e; font: 700 15px var(--font-body); }
.acct-out .acct-ic { color: #d23a2e; }
.acct-out:hover { background: rgba(224, 62, 52, 0.2); }
.acct-strip:focus-visible, .acct-out:focus-visible, .acct-sw:focus-visible, .acct-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@keyframes acctIn { from { opacity: 0; transform: translateY(-8px) scale(0.94); } to { opacity: 1; transform: none; } }
@keyframes acctRow { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .acct-menu:not([hidden]) { animation: acctIn 0.24s cubic-bezier(0.2, 0.9, 0.3, 1.1); }
  .acct-menu:not([hidden]) > * { animation: acctRow 0.32s ease both; }
  .acct-menu:not([hidden]) > :nth-child(2) { animation-delay: 0.05s; }
  .acct-menu:not([hidden]) > :nth-child(3) { animation-delay: 0.1s; }
  .acct-menu:not([hidden]) > :nth-child(4) { animation-delay: 0.15s; }
  .acct-menu:not([hidden]) > :nth-child(5) { animation-delay: 0.2s; }
}

/* laporan */
.rp-hero { display: grid; gap: 16px; }
.rp-scroll { overflow-x: auto; min-width: 0; }
.rtab { width: 100%; border-collapse: collapse; font-size: 14px; }
.rtab th, .rtab td { padding: 9px 8px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: baseline; }
.rtab .r { text-align: right; white-space: nowrap; }
.rtab thead th { color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.rtab.wide { min-width: 560px; }
.rtab tr.rh th { background: var(--surface2); font-size: 13px; padding: 8px; }
.rtab tr.rs td { font-weight: 600; }
.rtab tr.rt td { font-weight: 700; border-bottom: 0; border-top: 2px solid var(--fg); }
.rtab tr.rt.pos td.num { color: var(--in); }
.rtab tr.rt.neg td.num { color: var(--out); }
.rtab td.in { color: var(--in); } .rtab td.out { color: var(--out); }
.rp-d { margin-left: 8px; font-size: 12px; font-weight: 600; }
.rp-d.good { color: var(--in); } .rp-d.bad { color: var(--out); }
.rp-track { margin: 12px 0 8px; height: 10px; }
.rp-small { font-size: 13px; margin-top: 6px; }
@media (max-width: 380px) { .tabs a { font-size: 10px; } }

.rp-code { display: inline-block; min-width: 40px; margin-right: 8px; padding: 1px 6px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font: 600 12px var(--font-num); text-align: center; }
.coa-h { margin: 16px 0 6px; font-size: 14px; color: var(--muted); }
.coa-g { border-top: 1px solid var(--line); }
.coa-g summary { display: flex; align-items: center; gap: 4px; padding: 10px 0; cursor: pointer; list-style: none; }
.coa-g summary::-webkit-details-marker { display: none; }
.coa-g summary::after { content: "\203A"; margin-left: auto; transition: transform 0.2s; color: var(--muted); }
.coa-g[open] summary::after { transform: rotate(90deg); }
.coa-nb { margin-left: 8px; font-size: 12px; }
.coa-l { list-style: none; margin: 0 0 10px; padding: 0 0 0 4px; display: grid; gap: 6px; font-size: 14px; }
@media (prefers-reduced-motion: reduce) { .coa-g summary::after { transition: none; } }
