/* ============================================================
   Buku Toko — design system (ported from prototype)
   Modern bank-app aesthetic · white surfaces · single blue accent
   Large & high-contrast for elderly users.
   ============================================================ */

/* ---------- tokens ---------- */
:root {
  --bg: #eef1f5;
  --surface: #ffffff;
  --surface-2: #f6f8fb;
  --line: #e6eaf0;
  --line-2: #dfe4ec;
  --ink: #18222e;
  --ink-2: #3d4a58;
  --soft: #76808d;
  --blue: #2563b3;
  --blue-600: #1f5599;
  --blue-700: #18467f;
  --blue-50: #eaf2fc;
  --blue-100: #d7e6f8;
  --green: #138a5a; --green-50: #e6f4ec;
  --red:   #c0492f; --red-50:   #f9e9e4;
  --amber: #b07d14; --amber-50: #f7efd9;
  --orange: #e0861a; --orange-50: #fdf2e0;
  --danger-border: #e6cfc7;
  --moon-new-ring: rgba(24,34,46,.22);
  --moon-full-ring: rgba(176,125,20,.45);
  --holiday-nat-border: rgba(192,73,47,.35);
  --holiday-trad-border: rgba(176,125,20,.35);
  --heat-1: #9be9a8; --heat-2: #40c463; --heat-3: #30a14e; --heat-4: #216e39;
  --bank-gray: #c2c8d0; --bank-green: #137a4b; --bank-blue: #1f6feb; --bank-red: #b3261e;
  --r-card: 18px;
  --r-btn: 14px;
  --r-pill: 999px;
  --shadow: 0 1px 2px rgba(24,34,46,.05), 0 6px 18px rgba(24,34,46,.06);
  --shadow-lg: 0 8px 30px rgba(24,34,46,.16);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
}

html.dark {
  --bg: #1a1e26;
  --surface: #242830;
  --surface-2: #2c3038;
  --line: #363a42;
  --line-2: #40444c;
  --ink: #e8ecf2;
  --ink-2: #b0b8c4;
  --soft: #98a2b0;
  --blue: #5590d6;
  --blue-600: #4a7fc4;
  --blue-700: #4070b0;
  --blue-50: #1e2a3a;
  --blue-100: #253548;
  --green: #3db882; --green-50: #1a2e24;
  --red: #e06850; --red-50: #2e1e1a;
  --amber: #d49820; --amber-50: #2e2414;
  --orange: #e8a040; --orange-50: #2e2414;
  --danger-border: #5c3a32;
  --moon-new-ring: rgba(255,255,255,.15);
  --moon-full-ring: rgba(212,152,32,.45);
  --holiday-nat-border: rgba(224,104,80,.35);
  --holiday-trad-border: rgba(212,152,32,.35);
  --heat-1: #0e4429; --heat-2: #006d32; --heat-3: #26a641; --heat-4: #39d353;
  --bank-gray: #4a5058; --bank-green: #3db882; --bank-blue: #5590d6; --bank-red: #e06850;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 18px rgba(0,0,0,.25);
  --shadow-lg: 0 8px 30px rgba(0,0,0,.4);
}

/* ---------- reset ---------- */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
html { font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  min-height: 100%;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
}

html, body, .screen, .screen-body, .card, .banner, .tile, .appbar, .home-head,
.btn, .chip, .inp, .seg div, .datenav, .row, .sheet, .scrim, .tick,
.heat .hc, .cal .c, .mo-btn, .seg-btn, .tf-chip, .tab-btn { transition: background-color .3s ease, color .3s ease, border-color .3s ease, box-shadow .3s ease; }

/* ---------- app shell ---------- */
.wrap { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
#app { flex: 1; display: flex; flex-direction: column; position: relative; }

.screen { flex: 1; display: flex; flex-direction: column; background: var(--bg); }
.screen-body { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 0 20px 32px; -webkit-overflow-scrolling: touch; }
.pad { padding: 4px 20px 32px; }
.screen-body::-webkit-scrollbar { width: 0; }

/* ---------- app bar ---------- */
.appbar { flex: none; display: flex; align-items: center; gap: 12px; padding: 8px 20px 14px; }
.appbar .back {
  width: 44px; height: 44px; flex: none; border-radius: 13px; border: 1.5px solid var(--line-2);
  background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--ink);
}
.appbar .back:active { background: var(--surface-2); }
.appbar h1 { font-size: 21px; font-weight: 800; margin: 0; letter-spacing: -.02em; white-space: nowrap; }
.appbar .sub { font-size: 13px; color: var(--soft); font-weight: 600; margin-top: 1px; }
.appbar .grow { flex: 1; }

/* big home header */
.home-head { padding: 6px 18px 16px; }
.home-head .greet { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.home-head .date { font-size: 14px; color: var(--soft); font-weight: 600; margin-top: 3px; }
.home-logo { width: 74px; height: 74px; border-radius: 14px; background: #fff;
  display: block; object-fit: contain; border: 1.5px solid var(--line-2);
  padding: 4px; box-shadow: var(--shadow);
  image-rendering: -webkit-optimize-contrast; }
.home-logo-wide { height: 66px; width: auto; border-radius: 12px; background: #fff;
  display: block; object-fit: contain; border: 1.5px solid var(--line-2);
  padding: 4px; box-shadow: var(--shadow);
  image-rendering: -webkit-optimize-contrast; margin-bottom: 10px; }
.dark-toggle { width: 42px; height: 42px; border-radius: 13px; border: 1.5px solid var(--line-2);
  background: var(--surface); color: var(--ink-2); display: grid; place-items: center; cursor: pointer;
  flex-shrink: 0; }

/* ---------- tiles ---------- */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tile {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 16px; box-shadow: var(--shadow); cursor: pointer; position: relative;
  display: flex; flex-direction: column; min-height: 124px; transition: transform .12s, box-shadow .12s;
}
.tile:active { transform: scale(.975); }
.tile .ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; }
.tile .nm { font-weight: 800; font-size: 17px; line-height: 1.18; margin-top: 10px; letter-spacing: -.01em; }
.tile .hint { font-size: 12.5px; color: var(--soft); font-weight: 600; margin-top: 2px; }
.tile .badge {
  position: absolute; top: 14px; right: 14px; min-width: 26px; height: 26px; padding: 0 8px;
  border-radius: 999px; background: var(--red); color: #fff; font-size: 13px; font-weight: 800;
  display: grid; place-items: center;
}
.tile .badge.blue { background: var(--blue); }
.tile .badge.amber { background: var(--amber); }
.ic.blue { background: var(--blue-50); color: var(--blue); }
.ic.green { background: var(--green-50); color: var(--green); }
.ic.amber { background: var(--amber-50); color: var(--amber); }
.ic.red { background: var(--red-50); color: var(--red); }
.ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.count { min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; background: var(--blue-50); color: var(--blue); font-size: 13px; font-weight: 800; display: grid; place-items: center; margin-right: 6px; }
.done-row { display: flex; align-items: center; gap: 8px; color: var(--green); font-weight: 700; padding: 6px 2px; }
.done-row svg { width: 20px; height: 20px; }
.revbar { display: flex; justify-content: space-between; align-items: center; margin: 2px 0 10px; font-weight: 700; color: var(--soft); font-size: 13px; }
.revbar button { border: none; background: var(--blue-50); color: var(--blue); font-weight: 800; padding: 6px 12px; border-radius: 8px; cursor: pointer; }
.txhead { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.th-main { flex: 1; min-width: 0; }
.th-tag { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 5px; }
.th-name { font-weight: 700; font-size: 16px; line-height: 1.3; overflow-wrap: anywhere; word-break: break-word; }
.th-meta { font-size: 13px; color: var(--ink-2); line-height: 1.4; margin-top: 3px; overflow-wrap: anywhere; }
.th-meta .chip { margin: 0; }
.amt-in { font-weight: 800; font-size: 18px; color: var(--green); white-space: nowrap; flex-shrink: 0; align-self: center; }
.amt-out { font-weight: 800; font-size: 18px; color: var(--red); white-space: nowrap; flex-shrink: 0; align-self: center; }
.sumbar { display: flex; justify-content: space-between; align-items: center; font-size: 16px; }
.catopt { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--surface); border: 1.5px solid var(--line-2); border-radius: var(--r-card); padding: 12px 14px; margin-bottom: 10px; cursor: pointer; }
.catopt.on { border-color: var(--blue); background: var(--blue-50); }
.catopt .mid { flex: 1; min-width: 0; }
.catopt .mid b { font-size: 16px; }
.catopt .mid small { display: block; color: var(--soft); font-size: 13px; }
.catmark { width: 24px; color: var(--blue); flex: none; }
.catmark svg { width: 22px; height: 22px; }
.chiprow { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.chip.sm.on { background: var(--blue); color: #fff; border-color: var(--blue); }
.datenav .arr.off { opacity: .3; pointer-events: none; }
.cardnote { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--soft); margin-bottom: 8px; }
.ic.sm { width: 28px; height: 28px; border-radius: 8px; }
.ic.sm svg { width: 16px; height: 16px; }
.iconbtn { border: none; background: transparent; color: var(--soft); cursor: pointer; padding: 8px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.iconbtn svg { width: 20px; height: 20px; }
.iconbtn:active { color: var(--red); background: var(--red-50); }
.sumcat { margin-top: 14px; }
.sumcat:first-child { margin-top: 2px; }
.sumcat-h { display: flex; justify-content: space-between; font-weight: 700; font-size: 14.5px; }
.sumcat-b { display: flex; align-items: center; gap: 10px; margin-top: 5px; }
.sumbar-fill { height: 18px; border-radius: 9px; min-width: 6%; }
.sumcat-b .tnum { white-space: nowrap; font-weight: 700; }
.pi-txt { flex: 1; min-width: 0; }
.pi-name { font-weight: 700; font-size: 15.5px; }
.pi-meta { color: var(--soft); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.pi-tag { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 5px; }
.chip.blue { color: var(--blue); background: var(--blue-50); }
.chip.warn { color: var(--amber); background: var(--amber-50); }

.tile.wide { grid-column: 1 / -1; flex-direction: row; align-items: center; min-height: 0; gap: 14px; padding: 16px; }
.tile.wide .ic { width: 44px; height: 44px; }
.tile.wide .nm { margin: 0; padding: 0; }
.tile.wide .chev { margin-left: auto; color: var(--line-2); font-size: 22px; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); padding: 16px; margin-bottom: 14px; }
.card.flush { padding: 6px 16px; }
.card-h { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); margin-bottom: 10px; }
.section-label { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--soft); margin: 18px 4px 10px; }

/* hero number */
.hero { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); padding: 18px; margin-bottom: 14px; }
.hero .k { font-size: 12.5px; font-weight: 700; color: var(--soft); text-transform: uppercase; letter-spacing: .05em; }
.hero .v { font-size: 34px; font-weight: 800; letter-spacing: -.025em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.v.green { color: var(--green); } .v.red { color: var(--red); } .v.amber { color: var(--amber); }
.hero .hero-unit { font-size: 15px; font-weight: 600; color: var(--soft); }
.hero-upd { font-size: 13px; font-weight: 600; color: var(--soft); margin-top: 4px; }
.hero-tr { font-size: 14px; font-weight: 700; margin-top: 6px; }
.hero-tr.up { color: var(--red); }
.hero-tr.dn { color: var(--green); }
/* prototype-style hero (Laporan Untung) */
.laba-hero { text-align: center; }
.hero-k { font-size: 12px; font-weight: 700; color: var(--soft); text-transform: uppercase; letter-spacing: .05em; }
.hero-v { font-size: 34px; font-weight: 800; letter-spacing: -.025em; margin: 4px 0; line-height: 1.1; }
.hero-v.green { color: var(--green); } .hero-v.red { color: var(--red); }
.hero-period { font-size: 12px; font-weight: 600; color: var(--soft); margin-top: 2px; }
.hero-sub { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-top: 6px; }
.hero-sub .up { color: var(--green); } .hero-sub .dn { color: var(--red); }
.tr { font-size: 12px; font-weight: 800; }
.tr.up { color: var(--red); }
.tr.dn { color: var(--green); }

/* ---------- kartu rincian kue ---------- */
.dcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); padding: 16px; margin-bottom: 14px; }
.dcard-h { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.dcard-h .ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.dcard-t { font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.ubah { margin-left: auto; flex: none; min-height: 44px; padding: 0 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); font-family: inherit; font-size: 15px; font-weight: 700; color: var(--blue); cursor: pointer; }
.ubah:active { background: var(--line); }
.kv { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.kv:last-child { border-bottom: none; }
.kv-k { color: var(--soft); font-weight: 600; }
.kv-v { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.dk-tags { font-size: 15px; font-weight: 600; padding: 2px 0 8px; line-height: 1.5; }
.dk-note { font-size: 13px; font-weight: 600; color: var(--soft); margin-top: 10px; }
.dk-empty { font-size: 15px; font-weight: 600; color: var(--soft); padding: 2px 0; }

/* ---------- resep: halaman penuh ---------- */
.section-row { display: flex; align-items: center; justify-content: space-between; margin: 18px 4px 10px; }
.section-row .section-label { margin: 0; }
.addbtn { border: 1px solid var(--blue); color: var(--blue); background: var(--blue-50); border-radius: 11px; font-family: inherit; font-size: 14px; font-weight: 800; padding: 9px 16px; cursor: pointer; }
.addbtn:active { background: var(--blue); color: #fff; }
.ing-card { padding: 2px 14px; }
.ing { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ing:last-child { border-bottom: none; }
.ing-main { flex: 1; min-width: 0; }
.ing-nm { font-size: 16px; font-weight: 700; }
.ing-sub { font-size: 12.5px; font-weight: 600; color: var(--soft); margin-top: 1px; }
.ing .inp { flex: 0 0 82px; width: 82px; margin: 0; text-align: right; padding: 10px; }
.ing-u { flex: none; min-width: 26px; font-size: 13.5px; font-weight: 700; color: var(--soft); }
.ing-del { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border: none; background: transparent; color: var(--soft); cursor: pointer; border-radius: 10px; }
.ing-del:active { background: var(--surface-2); }
.ing-del svg { width: 20px; height: 20px; }
.ing-empty { padding: 18px 4px; font-size: 14.5px; font-weight: 600; color: var(--soft); text-align: center; }
.infoline { display: block; width: 100%; text-align: left; margin-top: 12px; padding: 0; border: none; background: transparent; color: var(--soft); font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; line-height: 1.45; }
.infomore { margin-top: 6px; }
.foot-modal { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 14px; font-weight: 700; color: var(--soft); margin-bottom: 10px; }
.foot-modal b { font-size: 20px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---------- karyawan & gaji ---------- */
.absrow { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.absrow:last-child { border-bottom: none; }
.absmid { flex: 1; min-width: 0; }
.absmid b { font-size: 16px; font-weight: 700; }
.absmid small { display: block; font-size: 12.5px; font-weight: 600; color: var(--soft); }
.absot { display: flex; align-items: center; gap: 7px; flex: none; }
.absot .abs-ot { width: 58px; margin: 0; text-align: right; padding: 9px 8px; }
.absot-u { font-size: 11px; font-weight: 700; color: var(--soft); line-height: 1.05; }
.gcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); padding: 14px 16px; margin-bottom: 12px; }
.gcard-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; font-size: 16px; font-weight: 800; }
.gline { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14.5px; font-weight: 600; padding: 4px 0; }
.gline.red { color: var(--red); }
.gline.gtot { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 8px; font-size: 16px; }
.echips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.echip { padding: 9px 14px; border: 1.5px solid var(--line-2); border-radius: 11px; font-weight: 700; font-size: 14px; cursor: pointer; background: var(--surface); }
.echip.on { border-color: var(--blue); background: var(--blue-50); color: var(--blue); }
.tick.half { background: var(--amber); border-color: var(--amber); color: #fff; font-size: 18px; font-weight: 800; animation: pop .26s ease; }
.kbx { margin-left: 8px; border: none; background: transparent; color: var(--soft); font-size: 14px; font-weight: 700; cursor: pointer; padding: 2px 4px; line-height: 1; }
.kbx:active { color: var(--red); }
.gline .tnum { display: inline-flex; align-items: center; }

/* ---------- list rows ---------- */
.row { display: flex; align-items: center; gap: 13px; padding: 14px 2px; border-bottom: 1px solid var(--line); cursor: pointer; }
.row:last-child { border-bottom: none; }
.row .av { width: 42px; height: 42px; border-radius: 50%; background: var(--blue-50); color: var(--blue);
  display: grid; place-items: center; font-weight: 800; font-size: 16px; flex: none; }
.row .mid { flex: 1; min-width: 0; }
.row .mid b { font-size: 16.5px; font-weight: 700; display: block; letter-spacing: -.01em; }
.row .mid small { font-size: 13px; color: var(--soft); font-weight: 600; }
.row .amt { font-weight: 800; font-size: 16.5px; font-variant-numeric: tabular-nums; text-align: right; flex: none; }
.amt.green { color: var(--green); } .amt.red { color: var(--red); } .amt.amber { color: var(--amber); }
.row .chev { color: var(--line-2); font-size: 22px; flex: none; }

/* check / tick */
.tick { width: 34px; height: 34px; border-radius: 50%; border: 2.5px solid var(--line-2); background: var(--surface);
  display: grid; place-items: center; flex: none; cursor: pointer; color: transparent; transition: all .16s; }
.tick svg { width: 18px; height: 18px; }
.tick.on { background: var(--green); border-color: var(--green); color: #fff; animation: pop .26s ease; }
@keyframes pop { 0% { transform: scale(.7); } 55% { transform: scale(1.12); } 100% { transform: scale(1); } }

/* ---------- buttons ---------- */
.btn { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; min-height: 56px;
  border: none; border-radius: var(--r-btn); font-family: var(--font); font-weight: 800; font-size: 17.5px;
  background: var(--blue); color: #fff; cursor: pointer; letter-spacing: -.01em; transition: transform .1s, filter .12s; flex-shrink: 0; }
.btn:active { transform: scale(.985); filter: brightness(.96); }
.btn.lg { min-height: 62px; font-size: 18.5px; }
.btn.green { background: var(--green); }
.btn.ghost { background: var(--surface); color: var(--ink); border: 1.5px solid var(--line-2); }
.btn.soft { background: var(--blue-50); color: var(--blue); }
.btn.danger-ghost { background: var(--surface); color: var(--red); border: 1.5px solid var(--red-50); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn .ic-l { font-size: 20px; }
.btn > svg { width: 21px; height: 21px; }

/* sticky bottom action */
.foot { flex: none; padding: 12px 18px calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 72%, transparent); }
.foot .btn + .btn { margin-top: 10px; }

/* ---------- date nav ---------- */
.datenav { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-btn); box-shadow: var(--shadow); padding: 7px; margin-bottom: 14px; }
.datenav .arr { width: 46px; height: 46px; border-radius: 11px; background: var(--surface-2); display: grid; place-items: center; font-size: 22px; cursor: pointer; color: var(--ink-2); }
.datenav .arr:active { background: var(--line); }
.datenav .lbl { flex: 1; text-align: center; font-weight: 800; font-size: 16.5px; }
.datenav .lbl small { display: block; font-size: 12.5px; font-weight: 600; color: var(--soft); }

/* ---------- segmented ---------- */
.seg { display: flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 13px; padding: 4px; gap: 4px; margin-bottom: 14px; }
.seg div { flex: 1; display: flex; align-items: center; justify-content: center; padding: 10px 6px; font-size: 14.5px; font-weight: 800; color: var(--soft); border-radius: 10px; cursor: pointer; }
.seg div.on { background: var(--surface); color: var(--blue); box-shadow: var(--shadow); }

/* ---------- panel layar pelanggan (tinggi tetap, scroll dalam) ---------- */
.screen-body.custd { display: flex; flex-direction: column; overflow: hidden; }
.cpanel { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); overflow: hidden; }
.cpanel-h { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.cpanel-t { font-size: 13px; font-weight: 700; color: var(--soft); }
.cpanel-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 16px; -webkit-overflow-scrolling: touch; }
.cpanel-body::-webkit-scrollbar { width: 0; }
.cpanel-foot { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 16px; border-top: 1px solid var(--line); background: var(--surface-2); }
.cpanel-foot .ftxt { font-size: 14px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.lnk { background: none; border: 0; padding: 4px 2px; font-family: inherit; font-size: 14px; font-weight: 800; color: var(--blue); cursor: pointer; }
.mininav { display: flex; align-items: center; gap: 14px; width: 100%; justify-content: center; }
.mn-arr { width: 34px; height: 34px; border-radius: 9px; border: 0; background: var(--surface-2); color: var(--ink-2); font-size: 19px; cursor: pointer; display: grid; place-items: center; font-family: inherit; }
.mn-arr:active { background: var(--line); }
.mn-lbl { font-weight: 800; font-size: 15.5px; min-width: 120px; text-align: center; }
.daysub { font-size: 11.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--soft); padding: 13px 2px 5px; }
.empty.sm { padding: 34px 16px; }
.wait { display: inline-block; margin-top: 5px; font-size: 11.5px; font-weight: 800; color: var(--blue); background: var(--blue-50); padding: 2px 9px; border-radius: 999px; }
/* rincian pesanan: baris kue + sub-baris barang sisa */
.lineitem { padding: 13px 2px; border-bottom: 1px solid var(--line); }
.li-main { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; }
.li-sub { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 6px; color: var(--red); font-size: 13.5px; font-weight: 600; }

/* ---------- chips ---------- */
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 800; border-radius: var(--r-pill); padding: 4px 11px; }
.chip.ok { color: var(--green); background: var(--green-50); }
.chip.no { color: var(--soft); background: var(--surface-2); }
.chip.part { color: var(--amber); background: var(--amber-50); }
.chip.sm { border: 1.5px solid var(--gray-20); background: var(--surface); cursor: pointer; }
.chip.sm.sel { border-color: var(--primary); color: var(--primary); background: var(--primary-50); }

/* ---------- sort bar (Pelanggan & Piutang) ---------- */
.sortbar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.sortbar-label { font-size: 12.5px; font-weight: 700; color: var(--soft); flex-shrink: 0; }
.segmented { display: inline-flex; flex: 1; background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; padding: 3px; gap: 3px; }
.seg-btn { flex: 1; text-align: center; padding: 8px 6px; font-size: 13px; font-weight: 700; color: var(--soft); background: transparent; border: 0; border-radius: 9px; cursor: pointer; white-space: nowrap; font-family: inherit; transition: color .12s, background .12s; }
.seg-btn.on { background: var(--surface); color: var(--blue); box-shadow: var(--shadow); font-weight: 800; }

/* month picker grid */
.mo-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.mo-btn {
  padding: 14px 4px; font-family: var(--font); font-size: 15px; font-weight: 700;
  color: var(--ink-2); background: var(--surface-2); border: 1.5px solid var(--line);
  border-radius: 13px; cursor: pointer; text-align: center; transition: all .12s;
}
.mo-btn:active { transform: scale(.96); }
.mo-btn.on { background: var(--blue-50); border-color: var(--blue); color: var(--blue); font-weight: 800; }

/* ---------- stepper ---------- */
.steprow { display: flex; flex-direction: column; align-items: stretch; gap: 12px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); padding: 14px 16px; margin-bottom: 12px; }
.steprow .nm { font-weight: 700; font-size: 17px; }
.steprow .nm small { font-size: 12.5px; color: var(--soft); font-weight: 600; margin-left: 6px; }
.stepper { display: flex; align-items: center; gap: 8px; }
.pm { flex: 1; height: 52px; border-radius: 13px; border: 1.5px solid var(--line-2); background: var(--surface);
  display: grid; place-items: center; font-size: 26px; font-weight: 700; cursor: pointer; color: var(--ink); }
.pm:active { background: var(--surface-2); }
.pm.j { font-size: 16px; font-weight: 800; }
.pm.add { background: var(--blue); border-color: var(--blue); color: #fff; }
.pm[disabled] { opacity: .4; pointer-events: none; }
.stepper .n { flex: 1; font-size: 25px; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }

/* ---------- strip stats ---------- */
.strip { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.strip .st { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); padding: 14px; }
.strip .st .k { font-size: 0.75rem; font-weight: 700; color: var(--soft); text-transform: uppercase; letter-spacing: .04em; }
.strip .st .v { font-size: 22px; font-weight: 800; margin-top: 3px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; word-break: break-word; }

/* ---------- search ---------- */
.search { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-btn); box-shadow: var(--shadow); padding: 13px 15px; margin-bottom: 14px; color: var(--soft); }
.search input { border: none; outline: none; font-family: var(--font); font-size: 16px; font-weight: 600; flex: 1; background: transparent; color: var(--ink); }

/* ---------- bottom sheet ---------- */
.scrim { position: fixed; inset: 0; background: rgba(16,22,30,.42); z-index: 40; display: flex; align-items: flex-end; }
.scrim.modal-scrim { z-index: 1000; align-items: center; }
.sheet { width: 100%; background: var(--bg); border-radius: 26px 26px 0 0;
  max-height: 88%; display: flex; flex-direction: column; overflow: hidden; animation: rise .3s cubic-bezier(.22,.61,.36,1); }
/* sheet layar penuh (alur berat: cocokkan transfer, kenali nama) */
.sheet.full { max-height: 100%; height: 100%; border-radius: 0; }
@keyframes rise { from { transform: translateY(36px); } to { transform: none; } }
/* kepala sheet: menetap di atas (tak ikut gulir) — utk konteks yg harus selalu terlihat, mis. bukti transfer */
.sheet-head { flex: none; position: relative; padding: 6px 18px 12px; background: var(--bg); border-bottom: 1px solid var(--line); }
.sheet-head .grab { margin: 6px auto 12px; }
.sheet-head .txhead { margin-bottom: 0; }
.sheet-head.bar { padding-top: 0; }
/* bar atas: 3 kolom seimbang — kiri (tutup/kembali) · tengah (judul+penghitung) · kanan (lewati) */
.sheetbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: calc(6px + env(safe-area-inset-top)) 10px 8px; }
.sheetbar-side { display: flex; align-items: center; min-width: 0; }
.sheetbar-side.end { justify-content: flex-end; }
.sheetbar-mid { min-width: 0; text-align: center; padding: 0 6px; }
.sheetbar-title { font-weight: 800; font-size: 16px; letter-spacing: -.01em; }
.sheetbar-sub { font-size: 12.5px; color: var(--soft); font-weight: 700; margin-top: 1px; }
.sheetbar-btn { border: none; background: transparent; color: var(--ink-2); font-size: 19px; font-weight: 700;
  min-width: 40px; height: 40px; padding: 0 8px; border-radius: 10px; cursor: pointer; }
.sheetbar-btn.skip { height: auto; padding: 7px 14px; background: var(--blue-50); color: var(--blue); font-size: 14px; font-weight: 800; border-radius: 999px; }
.sheetbar-btn:active { background: var(--line); }
/* baris pelanggan ramping (bisa diketuk utk ganti) — ganti tombol "Ganti" yg makan tempat */
.custline { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: transparent; border: none; border-bottom: 1px solid var(--line); padding: 4px 2px 12px; margin: 0 0 8px;
  font-size: 15px; color: var(--ink); text-align: left; cursor: pointer; }
.custline-edit { flex: none; color: var(--blue); font-weight: 800; font-size: 12.5px; background: var(--blue-50); padding: 5px 12px; border-radius: 999px; }
.custline:active { opacity: .6; }
/* "Bukan pelanggan" — beri warna merah biar jelas tombol penolak, beda dari daftar pelanggan */
.catopt.reject { border-color: var(--red); background: var(--red-50); }
.catopt.reject .mid b { color: var(--red); }
/* badan sheet: bagian yang bisa digulir */
.sheet-scroll { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 8px 18px calc(18px + env(safe-area-inset-bottom)); scrollbar-width: none; }
.sheet-scroll::-webkit-scrollbar { width: 0; height: 0; }
.sheet-head + .sheet-scroll { padding-top: 12px; }
.grab { width: 42px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 6px auto 14px; }
.sheet h2 { font-size: 21px; font-weight: 800; margin: 0 0 4px; letter-spacing: -.02em; }
.sheet .sheet-sub { color: var(--soft); font-weight: 600; font-size: 14px; margin-bottom: 14px; }
/* footer aksi: menetap di bawah, tak ikut gulir — tombol selalu kelihatan */
.sheet-act { flex: none; padding: 12px 18px calc(14px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); }
.sheet-act > .btn:first-child, .sheet-act > .catopt:first-child { margin-top: 0; }
.sheet-act > * + * { margin-top: 10px; }

/* ---------- popup custom (confirm/alert) ---------- */
.modal-scrim { align-items: center; justify-content: center; z-index: 70; padding: 24px; }
.modal-sheet { width: 100%; max-width: 380px; border-radius: 22px; padding: 22px 20px 18px;
  max-height: 88%; overflow-y: auto; animation: pop .22s cubic-bezier(.22,.61,.36,1); scrollbar-width: none; }
.modal-sheet::-webkit-scrollbar { width: 0; height: 0; }
@keyframes pop { from { transform: scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
.modal-sheet h2 { font-size: 19px; }
.modal-body { color: var(--ink-2); font-size: 14.5px; line-height: 1.5; margin: 6px 0 18px; white-space: pre-line; }
.modal-acts { display: flex; flex-direction: column; gap: 10px; }
.modal-acts .btn { margin: 0; }

/* ---------- tour / panduan (spotlight) ---------- */
.tour { position: fixed; inset: 0; z-index: 2000; }
.tour-hole { position: fixed; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(0,0,0,.55); transition: top .2s, left .2s, width .2s, height .2s; pointer-events: none; }
.tour-cardwrap { position: fixed; left: 16px; right: 16px; display: flex; justify-content: center; z-index: 2001; }
.tour-cardwrap.mid { inset: 0; align-items: center; padding: 16px; background: rgba(0,0,0,.55); }
.tour-card { background: var(--surface); border-radius: 16px; padding: 18px; width: 100%; max-width: 380px; box-shadow: 0 12px 40px rgba(0,0,0,.3); }
.tour-step { font-size: 12px; font-weight: 700; color: var(--soft, #7c756a); }
.tour-card h3 { margin: 4px 0 6px; font-size: 18px; }
.tour-card p { margin: 0 0 14px; font-size: 14.5px; line-height: 1.5; }
.tour-btns { display: flex; gap: 10px; justify-content: flex-end; }
.tour-btns .btn { width: auto; margin: 0; }
/* overlay tak boleh menghalangi ketukan ke tombol asli yang disorot; kartu & backdrop mid tetap aktif */
.tour { pointer-events: none; }
.tour-cardwrap, .tour-cardwrap.mid { pointer-events: auto; }
.tour-tap { font-size: 13px; font-weight: 700; color: var(--blue, #2f6df6); margin: -6px 0 12px; }
.tour-good { position: fixed; left: 50%; top: 42%; transform: translate(-50%,-50%); z-index: 2100;
  background: var(--green, #18a558); color: #fff; font-weight: 800; font-size: 22px;
  padding: 14px 26px; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,.3);
  pointer-events: none; animation: tourGood .9s ease both; }
@keyframes tourGood { 0% { opacity: 0; transform: translate(-50%,-50%) scale(.7); }
  20% { opacity: 1; transform: translate(-50%,-50%) scale(1.05); }
  75% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%,-58%) scale(1); } }
.practice-bar { position: fixed; left: 0; right: 0; top: 0; z-index: 2200; text-align: center;
  background: #f6c343; color: #3a2f00; font-weight: 800; font-size: 13.5px; padding: 7px 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.18); }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 60;
  background: var(--ink); color: var(--surface); font-weight: 700; font-size: 14.5px; padding: 12px 18px; border-radius: 18px;
  box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 8px; animation: toastIn .26s ease;
  max-width: 92vw; width: max-content; text-align: center; line-height: 1.35; box-sizing: border-box; }
@keyframes toastIn { from { transform: translate(-50%, 14px); } to { transform: translate(-50%, 0); } }

/* ---------- empty ---------- */
.empty { text-align: center; padding: 40px 20px; color: var(--soft); }
.empty .big { font-size: 42px; margin-bottom: 8px; }
.empty b { display: block; color: var(--ink-2); font-size: 17px; margin-bottom: 4px; }

/* ---------- calendar ---------- */
.calwrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); padding: 14px; margin-bottom: 14px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal .dh { text-align: center; font-size: 11px; font-weight: 700; color: var(--soft); padding: 4px 0 8px; text-transform: uppercase; letter-spacing: .03em; }
.cal .dh.sun { color: var(--red); }
.cal .c { aspect-ratio: 1; border-radius: 11px; background: var(--surface-2); display: flex; flex-direction: column;
  align-items: center; justify-content: center; font-size: 14px; font-weight: 700; position: relative; gap: 0; cursor: pointer; border: none; padding: 2px 1px; min-width: 0; }
.cal .c.dim { color: var(--line-2); background: transparent; }
.cal .c.today { background: var(--blue); color: #fff; }
.cal .dots { display: flex; gap: 3px; height: 5px; }
.cal .dot { width: 5px; height: 5px; border-radius: 50%; }
.dot.g { background: var(--green); } .dot.a { background: var(--amber); } .dot.b { background: var(--blue); }
.cal .c.today .dot.g { background: #bfe6d2; } .c.today .dot.a { background: #f0d79a; }

/* ---------- heatmap ---------- */
.heat { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.heat .hc { aspect-ratio: 1; border-radius: 4px; background: var(--surface-2); cursor: pointer; border: none;
  display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--ink-2); }
.hc.l1 { background: var(--heat-1); } .hc.l2 { background: var(--heat-2); } .hc.l3 { background: var(--heat-3); color: #fff; } .hc.l4 { background: var(--heat-4); color: #fff; }
.legend { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--soft); font-weight: 600; margin-top: 12px; }
.legend .sq { width: 13px; height: 13px; border-radius: 3px; }

/* bar chart */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 110px; margin: 8px 0 6px; }
.bars .col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; height: 100%; }
.bars .b { width: 100%; background: var(--blue); border-radius: 6px 6px 3px 3px; min-height: 4px; }
.bars .b.alt { background: var(--blue-100); }
.bars .lab { text-align: center; font-size: 11px; font-weight: 700; color: var(--soft); }

/* info banner */
.banner { display: flex; gap: 10px; align-items: flex-start; border-radius: 13px; padding: 12px 14px; font-size: 13.5px; font-weight: 600; line-height: 1.45; margin-bottom: 14px; }
.banner.amber { background: var(--amber-50); color: var(--amber); }
.banner.blue { background: var(--blue-50); color: var(--blue-700); }
.banner.green { background: var(--green-50); color: var(--green); }
.banner.red { background: var(--red-50); color: var(--red); }
.store-bar { height: 12px; border-radius: 8px; background: var(--blue-50); overflow: hidden; }
.store-fill { height: 100%; background: var(--blue); border-radius: 8px; transition: width .3s; }
.store-fill.warn { background: var(--amber); }
.banner .bic { font-size: 17px; flex: none; }
.banner .bic svg { width: 18px; height: 18px; display: block; }

/* form inputs */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 800; color: var(--ink-2); margin-bottom: 7px; }
.inp { width: 100%; border: 1.5px solid var(--line-2); background: var(--surface); border-radius: var(--r-btn);
  padding: 14px 15px; font-family: var(--font); font-size: 17px; font-weight: 600; color: var(--ink); outline: none; }
.inp:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-50); }

.spacer-sm { height: 6px; } .spacer { height: 14px; } .spacer-lg { height: 22px; }

/* ---- backward compatibility (old class → new style) ---- */
.pi { display: flex; align-items: flex-start; gap: 13px; padding: 14px 2px; border-bottom: 1px solid var(--line); cursor: pointer; }
.pi:last-child { border-bottom: none; }
.bal { font-weight: 800; font-size: 16.5px; font-variant-numeric: tabular-nums; text-align: right; flex: none; }
.bal.green, .bal.z { color: var(--green); }
.pichev { color: var(--line-2); font-size: 22px; flex: none; }
.cal-grid { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); padding: 14px; margin-bottom: 14px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-c { aspect-ratio: 1; border-radius: 11px; background: var(--surface-2); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; position: relative; gap: 3px; cursor: pointer; border: none; }
.cal-c.today { background: var(--blue); color: #fff; }
.cal-c.empty { color: var(--line-2); background: transparent; }
.cal-h { text-align: center; font-size: 11px; font-weight: 800; color: var(--soft); padding-bottom: 4px; }
.cd { font-size: 14px; font-weight: 700; }
.dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); }
.dn-mid { flex: 1; text-align: center; font-weight: 800; font-size: 16.5px; }
.muted { color: var(--soft); }
.small { font-size: 13px; font-weight: 600; }
.tnum { font-variant-numeric: tabular-nums; }
.center { text-align: center; }
.lbl { font-size: 13px; font-weight: 800; color: var(--ink-2); margin-bottom: 4px; }
.field-row { display: flex; gap: 10px; }
.hr { border: none; border-top: 1px solid var(--line); margin: 14px 0; }

/* B1: bump tiny text to minimum 0.875rem (14px) */
.card-h, .section-label, .tr, .appbar .sub, .home-head .date,
.tile .hint, .revbar, .badge, .sortbar-label, .count,
.th-meta, .row .mid small, .catopt .mid small, .absmid small,
.cpanel-t, .lnk, .mn-lbl small, .dk-note, .infoline, .small, .lbl, .field label {
  font-size: 0.875rem;
}

/* B2: touch targets minimum 48×48px */
button:not(.hc):not(.c):not(.tog):not(.appgear), .btn, [role="button"], input[type="checkbox"], input[type="radio"],
select, .row, .catopt, .seg div, .echip, .mn-arr, .kbx, .lnk {
  min-height: 48px;
  min-width: 48px;
}
.row { padding: 16px 8px; }
.row .chev { padding: 8px; margin: -8px; }
.kbx { padding: 12px; margin: -12px; }

/* B6: tab aktif lebih jelas */
.bnav .on { box-shadow: inset 0 3px 0 0 var(--blue); }
.seg .on { outline: 2px solid var(--blue); outline-offset: -2px; }

/* B7: tombol bantuan */
.help-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line-2);
  background: var(--surface); font-family: var(--font); font-size: 1.125rem;
  font-weight: 800; color: var(--ink-2); cursor: pointer; display: grid; place-items: center;
  flex-shrink: 0;
}
.field-help { font-size: 0.875rem; color: var(--soft); margin-top: 4px; }

/* ---------- kalender pintar ---------- */
/* pasaran & lunar */
.cal .c .dn { font-size: 14px; line-height: 1.1; }
.cal .c .ps { font-size: 9px; font-weight: 500; color: var(--soft); line-height: 1.2; white-space: nowrap; }
.cal .c .lx { font-size: 9px; font-weight: 500; color: var(--ink-2); line-height: 1.2; white-space: nowrap; }
.cal .c .fx { font-size: 9px; font-weight: 700; color: var(--amber); line-height: 1.2; white-space: nowrap; }
.cal .c.today .ps { color: rgba(255,255,255,.7); }
.cal .c.today .lx { color: rgba(255,255,255,.75); }
.cal .c.today .fx { color: rgba(255,225,150,.85); }
.cal .c .row-bot { display: flex; align-items: center; gap: 2px; min-height: 5px; margin-top: 1px; }

/* holiday - red date */
.cal .c.holiday .dn { color: var(--red); }
.cal .c.today.holiday .dn { color: #fff; }

/* moon phase ring */
.cal .c.moon-new  { box-shadow: inset 0 0 0 2.5px var(--moon-new-ring); }
.cal .c.moon-full { box-shadow: inset 0 0 0 2.5px var(--moon-full-ring); }
.cal .c.today.moon-new  { box-shadow: inset 0 0 0 2.5px rgba(255,255,255,.3); }
.cal .c.today.moon-full { box-shadow: inset 0 0 0 2.5px rgba(255,225,150,.55); }

/* holiday banner */
.holiday-list {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); box-shadow: var(--shadow);
  padding: 12px 14px; margin-bottom: 10px;
  display: none;
}
.holiday-list.has-items { display: block; }
.holiday-list .hl-sec { margin-bottom: 10px; padding-left: 10px; border-left: 3px solid transparent; border-radius: 0 4px 4px 0; }
.holiday-list .hl-sec:last-child { margin-bottom: 0; }
.holiday-list .hl-sec.nat { border-left-color: var(--holiday-nat-border); }
.holiday-list .hl-sec.trad { border-left-color: var(--holiday-trad-border); }
.holiday-list .hl-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.holiday-list .hl-title.nat { color: var(--red); }
.holiday-list .hl-title.trad { color: var(--amber); }
.holiday-list .hl-item { font-size: 12.5px; font-weight: 600; color: var(--ink-2); padding: 3px 0; }
.holiday-list .hl-item .hld { font-weight: 700; margin-right: 4px; }
.holiday-list .hl-item .hld.nat { color: var(--red); }
.holiday-list .hl-item .hld.trad { color: var(--amber); }

/* statscard */
.statscard {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-card); box-shadow: var(--shadow);
  padding: 14px 16px; margin-bottom: 10px;
}
.statscard .sh { font-weight: 700; font-size: 12px; color: var(--soft); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }
.statscard .sr { display: flex; gap: 0; flex-wrap: wrap; }
.statscard .si { flex: 1 1 auto; min-width: fit-content; padding-right: 12px; }
.statscard .si .k { font-size: 11px; color: var(--soft); font-weight: 600; margin-bottom: 2px; }
.statscard .si .v { font-size: 17px; font-weight: 800; color: var(--ink); letter-spacing: -.01em; white-space: nowrap; }
.statscard .si .v.green { color: var(--green); }

/* gear button */
.appgear {
  width: 44px; height: 44px; flex: none; border-radius: 13px; border: 1.5px solid var(--line-2);
  background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--ink);
  font-size: 18px;
}

/* toggle rows */
.tog-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--line); }
.tog-row .tl { font-weight: 700; font-size: 14px; color: var(--ink); }
.tog-row .ts { font-size: 11px; color: var(--soft); font-weight: 500; }
button.tog { width: 48px; height: 28px; border-radius: 14px; background: var(--line); border: none; cursor: pointer; position: relative; flex-shrink: 0; transition: background .2s; }
button.tog.on { background: var(--blue); }
button.tog::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff; transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
button.tog.on::after { transform: translateX(20px); }

/* day note card */
.day-note-card {
  background: var(--amber-50); border: 1px solid var(--holiday-trad-border);
  border-radius: 11px; padding: 10px 12px; margin-bottom: 14px;
  font-size: 13px; color: var(--ink-2); cursor: pointer;
}
.day-note-card .nlbl { font-size: 10px; font-weight: 700; color: var(--amber); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.day-note-card .nact { font-size: 10px; font-weight: 600; color: var(--soft); margin-top: 6px; }
.day-note-empty { display: flex; align-items: center; justify-content: center; padding: 12px 14px; font-size: 13px; color: var(--soft); font-weight: 700; cursor: pointer; border: 1.5px dashed var(--line-2); border-radius: 13px; background: var(--surface-2); margin-bottom: 14px; }
.day-note-empty:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-50); }
.day-info { font-size: 10px; font-weight: 600; color: var(--soft); margin-bottom: 10px; text-transform: uppercase; letter-spacing: .04em; }
.day-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.day-row .dr-l { font-weight: 600; }
.day-row .dr-r { color: var(--ink-2); font-weight: 600; white-space: nowrap; }
.day-summary { display: flex; justify-content: space-between; padding: 12px 0 0; font-weight: 700; font-size: 15px; border-top: 1.5px solid var(--line); margin-top: 4px; }
.day-buttons { display: flex; gap: 6px; margin-top: 6px; }

.note-textarea {
  width: 100%; min-height: 72px; border: 1px solid var(--line-2);
  border-radius: 11px; padding: 10px 12px; font-family: var(--font); font-size: 14px;
  color: var(--ink); resize: vertical; background: var(--surface-2);
}
.note-textarea:focus { outline: none; border-color: var(--blue); background: var(--surface); }

/* ---------- Trend Sheet (Laporan Untung) ---------- */
.trend-table { margin: 10px 0; }
.trend-hd { display: flex; justify-content: space-between; padding: 6px 0; font-size: 10px; font-weight: 700; color: var(--soft); text-transform: uppercase; letter-spacing: .04em; border-bottom: 2px solid var(--line-2); margin-bottom: 2px; }
.trend-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.trend-row:last-child { border-bottom: none; }
.tr-date { min-width: 50px; font-weight: 600; color: var(--soft); font-size: 12px; }
.tr-bar { flex: 1; height: 16px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.tr-fill { display: block; height: 100%; background: var(--blue); border-radius: 4px; min-width: 2px; transition: width .3s ease; }
.tr-val { min-width: 48px; text-align: right; font-weight: 700; font-size: 12.5px; white-space: nowrap; }

/* ---------- Laporan Untung (M4) ---------- */
.tf-row { display: flex; gap: 6px; margin-bottom: 12px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
.tf-row::-webkit-scrollbar { display: none; }
.tf-chip { flex-shrink: 0; padding: 8px 14px; border-radius: 11px; font-weight: 700; font-size: 12.5px; font-family: var(--font); cursor: pointer; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); white-space: nowrap; }
.tf-chip.on { background: var(--blue); color: #fff; border-color: var(--blue); }
.kustom-row { display: none; gap: 8px; align-items: center; margin-bottom: 12px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.kustom-row.show { display: flex; }
.kustom-row input[type=date] { flex: 1; border: 1px solid var(--line-2); border-radius: 10px; padding: 7px 10px; font-family: var(--font); font-size: 13px; color: var(--ink); background: var(--surface); min-width: 0; }
.kustom-row .sep { color: var(--soft); flex-shrink: 0; }

.tab-bar { display: flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 13px; padding: 4px; gap: 4px; margin-bottom: 14px; }
.tab-btn { flex: 1; padding: 10px 4px; font-weight: 700; font-size: 13px; text-align: center; border-radius: 10px; border: none; background: transparent; color: var(--ink-2); cursor: pointer; font-family: var(--font); white-space: nowrap; }
.tab-btn.on { background: var(--surface); color: var(--blue); box-shadow: var(--shadow); outline: 2px solid var(--blue); }
.tab-content { display: none; }
.tab-content.on { display: block; }

.chart-wrap { position: relative; width: 100%; }
.chart-wrap svg { display: block; width: 100%; }
.chart-legend { display: flex; gap: 16px; justify-content: center; padding: 6px 0 0; font-size: 11px; font-weight: 600; color: var(--ink-2); flex-wrap: wrap; }
.chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.cl-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.cl-dot.omz { background: var(--blue); } .cl-dot.unt { background: var(--green); }

.donut-big { text-align: center; }
.donut-big svg { display: block; margin: 0 auto; }
.donut-desc { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 16px; margin-top: 10px; font-size: 11px; font-weight: 600; color: var(--ink-2); }
.donut-desc span { display: inline-flex; align-items: center; gap: 4px; }
.ds-dot { width: 9px; height: 9px; border-radius: 2px; flex-shrink: 0; }

.pl-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.pl-row:last-child { border-bottom: none; }
.pl-row .pl-l { font-weight: 600; font-size: 14px; }
.pl-row .pl-l small { display: block; font-size: 11px; font-weight: 500; color: var(--soft); }
.pl-row .pl-r { font-weight: 700; text-align: right; white-space: nowrap; font-size: 14px; }
.pl-row .pl-r.green { color: var(--green); } .pl-row .pl-r.red { color: var(--red); }
.pl-total { display: flex; align-items: center; justify-content: space-between; padding: 12px 0 0; border-top: 2px solid var(--line); margin-top: 4px; font-size: 15px; font-weight: 800; }

.spark-header { display: flex; align-items: center; gap: 8px; padding: 0 0 6px; border-bottom: 2px solid var(--line-2); margin-bottom: 2px; font-size: 11px; font-weight: 700; color: var(--soft); }
.spark-header>.sh-rank{width:18px;text-align:center;flex-shrink:0}
.spark-header>.sh-name{flex:1;min-width:0}
.spark-header>.sh-spark{width:64px;text-align:center;flex-shrink:0}
.spark-header>.sh-val{min-width:60px;text-align:right}
.spark-header>.sh-trend{min-width:32px;text-align:right}
.spark-item { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.spark-item:last-child { border-bottom: none; }
.si-rank { width: 18px; font-size: 11px; font-weight: 800; color: var(--soft); text-align: center; flex-shrink: 0; }
.si-name { flex: 1; font-weight: 600; font-size: 12.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.si-spark { flex-shrink: 0; }
.si-val { font-weight: 700; font-size: 13px; text-align: right; min-width: 60px; }
.si-trend { font-weight: 700; font-size: 11px; min-width: 32px; text-align: right; }
.si-trend.up { color: var(--green); } .si-trend.dn { color: var(--red); } .si-trend.flat { color: var(--soft); }
.table-hint { font-size: 10px; color: var(--soft); font-weight: 500; margin-top: 8px; line-height: 1.4; }

.insight { background: var(--blue-50); border-radius: 11px; padding: 10px 12px; margin-top: 10px; font-size: 12px; font-weight: 600; color: var(--ink-2); display: flex; align-items: flex-start; gap: 6px; line-height: 1.5; }

.exp-row { display: flex; align-items: center; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.exp-row .ex-date { color: var(--soft); font-weight: 500; min-width: 70px; }
.exp-row .ex-cat { flex: 1; font-weight: 600; font-size: 12px; padding: 0 8px; }
.exp-row .ex-cat .chip { display: inline-block; padding: 2px 6px; border-radius: 6px; font-size: 10px; font-weight: 700; }
.exp-row .ex-amt { font-weight: 600; text-align: right; min-width: 80px; white-space: nowrap; }

.gaji-row { display: flex; align-items: center; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.gaji-row .gj-name { font-weight: 600; min-width: 50px; }
.gaji-row .gj-period { color: var(--soft); font-weight: 500; flex: 1; padding: 0 8px; }
.gaji-row .gj-hari { color: var(--ink-2); font-weight: 600; min-width: 50px; text-align: right; }
.gaji-row .gj-amt { font-weight: 700; min-width: 80px; text-align: right; white-space: nowrap; }

.cmp-row { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
.cmp { flex: 1; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow); padding: 12px 14px; }
.cmp .cmp-k { font-size: 11px; font-weight: 700; color: var(--soft); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmp .cmp-v { font-size: 20px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmp .cmp-v.green { color: var(--green); } .cmp .cmp-v.red { color: var(--red); }
.cmp .cmp-sub { font-size: 11px; font-weight: 600; color: var(--soft); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- animations ---------- */
@media (prefers-reduced-motion: no-preference) {
  .ani-page { animation: pageIn .22s ease-out; }
  @keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

  .ani-item { animation: itemIn .28s ease-out both; opacity: 0; }
  @keyframes itemIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

  .badge { transition: transform .15s ease-out; }
  .badge.changed { animation: badgePop .3s ease-out; }
  @keyframes badgePop { 0% { transform: scale(1); } 50% { transform: scale(1.25); } 100% { transform: scale(1); } }
}

/* ---------- portrait lock ---------- */
.lock-portrait { display: none; }
@media screen and (orientation: landscape) {
  .lock-portrait {
    display: flex; align-items: center; justify-content: center;
    position: fixed; inset: 0; z-index: 99999;
    background: var(--bg); font-family: var(--font);
  }
  .lock-portrait-inner { text-align: center; color: var(--soft); }
  .lock-portrait-inner svg { margin-bottom: 14px; }
  .lock-portrait-inner p { font-size: 17px; font-weight: 700; margin: 0; }
}

/* ---------- catatan & foto ---------- */
.photo-grid { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.photo-grid .ph { position: relative; width: 72px; height: 72px; border-radius: 10px; overflow: hidden; cursor: pointer; border: 1.5px solid var(--line); background: var(--surface-2); flex-shrink: 0; }
.photo-grid .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-grid .ph .ph-del { position: absolute; top: -5px; right: -5px; width: 22px; height: 22px; border-radius: 50%; background: var(--red); color: #fff; font-size: 12px; line-height: 22px; text-align: center; border: 2px solid var(--surface); cursor: pointer; font-weight: 700; }
.photo-grid .ph-add { width: 72px; height: 72px; border-radius: 10px; border: 1.5px dashed var(--line-2); display: flex; align-items: center; justify-content: center; font-size: 24px; color: var(--soft); cursor: pointer; background: var(--surface-2); flex-shrink: 0; }
.photo-grid .ph-add:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-50); }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 999; background: rgba(0,0,0,.88); display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; padding: 20px; animation: lbIn .22s ease; }
@keyframes lbIn { from { opacity: 0; } to { opacity: 1; } }
.lightbox .lb-img { flex: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.lightbox .lb-img img { max-width: 100%; max-height: 100%; border-radius: 8px; object-fit: contain; animation: imgIn .25s ease; }
@keyframes imgIn { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: scale(1); } }
.lightbox .lb-btns { display: flex; flex-direction: column; gap: 8px; padding: 12px 0 4px; flex-shrink: 0; width: 100%; }

/* note inline */
.note-card { background: var(--amber-50); border: 1.5px solid var(--amber); border-radius: 13px; padding: 12px 14px; margin: 10px 0; font-size: 14px; line-height: 1.5; }
.note-card .nlbl { font-size: 10px; font-weight: 700; color: var(--amber); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.note-textarea-sm { width: 100%; box-sizing: border-box; border: 1.5px solid var(--line-2); border-radius: 13px; padding: 10px 14px; font: inherit; font-size: 14px; background: var(--surface); resize: vertical; min-height: 50px; }
.note-textarea-sm:focus { outline: none; border-color: var(--blue); }

/* indikator note/photo di row pesanan */
.order-indicator { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--soft); margin-top: 2px; }
.order-indicator span { font-size: 12px; }

