:root {
  --bg: #f2f2f7;
  --card: #ffffff;
  --card-2: #f7f7fa;
  --text: #111114;
  --muted: #6e6e76;
  --line: rgba(60, 60, 67, 0.14);
  --accent: #0f766e;
  --accent-soft: rgba(15, 118, 110, 0.12);
  --on-accent: #ffffff;
  --green: #16a34a;
  --red: #dc2626;
  --c-jojo: #2563eb;
  --c-riko: #db2777;
  --c-shared: #0f766e;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.05);
  --radius: 18px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --card: #1c1c1e;
    --card-2: #2c2c2e;
    --text: #f5f5f7;
    --muted: #98989f;
    --line: rgba(84, 84, 88, 0.55);
    --accent: #2dd4bf;
    --accent-soft: rgba(45, 212, 191, 0.16);
    --on-accent: #042f2c;
    --green: #4ade80;
    --red: #f87171;
    --c-jojo: #60a5fa;
    --c-riko: #f472b6;
    --c-shared: #2dd4bf;
    --shadow: none;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.pos { color: var(--green); }
.neg { color: var(--red); }
.hidden { display: none !important; }

.splash {
  min-height: 100dvh; display: grid; place-items: center;
  font-size: 28px; font-weight: 700; color: var(--accent);
}

/* ---------- Layar login & pilih user ---------- */
.center-screen {
  min-height: 100dvh;
  display: flex; flex-direction: column; justify-content: center;
  padding: calc(24px + var(--safe-top)) 24px calc(24px + var(--safe-bottom));
  max-width: 440px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.brand img { width: 56px; height: 56px; border-radius: 14px; }
.brand h1 { margin: 0; font-size: 28px; letter-spacing: -0.02em; }
.brand p { margin: 2px 0 0; color: var(--muted); font-size: 15px; }
.center-screen h2 { font-size: 22px; margin: 0 0 6px; letter-spacing: -0.01em; }
.center-screen > p { margin: 0 0 20px; color: var(--muted); }

.user-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.user-card {
  background: var(--card); border-radius: 22px; padding: 22px 12px 18px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  box-shadow: var(--shadow); border: 2px solid transparent;
  transition: transform 0.12s ease;
}
.user-card:active { transform: scale(0.97); }
.user-card.last { border-color: var(--accent-soft); }
.user-card .avatar { width: 72px; height: 72px; font-size: 30px; }
.user-card strong { font-size: 18px; }
.user-card small { color: var(--muted); font-size: 12px; min-height: 16px; }

.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; color: #fff;
  background: var(--c-shared); flex: none;
}
.avatar.jojo { background: var(--c-jojo); }
.avatar.riko { background: var(--c-riko); }
.avatar.sm { width: 34px; height: 34px; font-size: 14px; }

/* ---------- Form dasar ---------- */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; color: var(--muted); margin: 0 0 6px 4px; }
.input {
  width: 100%; padding: 13px 14px; border-radius: 12px;
  background: var(--card-2); border: 1px solid var(--line); outline: none;
  font-size: 17px; /* >=16px agar iOS tidak zoom */
  -webkit-appearance: none; appearance: none; min-height: 48px;
}
.input:focus { border-color: var(--accent); }
.input.big { font-size: 30px; font-weight: 700; padding: 12px 14px; letter-spacing: -0.01em; }
.amount-wrap { position: relative; }
.amount-wrap .prefix { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; font-size: 18px; }
.amount-wrap .input { padding-left: 46px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 50px; padding: 0 18px; border-radius: 14px;
  background: var(--accent); color: var(--on-accent); font-weight: 600; font-size: 17px; width: 100%;
}
.btn:disabled { opacity: 0.5; }
.btn.secondary { background: var(--accent-soft); color: var(--accent); }
.btn.danger { background: transparent; color: var(--red); }
.btn.small { min-height: 38px; font-size: 15px; width: auto; padding: 0 14px; border-radius: 12px; }
.btn-row { display: flex; gap: 10px; }
.btn-row > * { flex: 1; }
.error-text { color: var(--red); font-size: 14px; min-height: 20px; margin: 4px 4px 10px; }

/* Segmented control */
.segmented {
  display: flex; background: var(--card-2); border-radius: 12px; padding: 3px; gap: 2px;
  border: 1px solid var(--line);
}
.segmented label, .segmented button {
  flex: 1; text-align: center; padding: 8px 4px; border-radius: 9px; font-size: 14px; font-weight: 600;
  color: var(--muted); cursor: pointer; white-space: nowrap; min-height: 36px;
  display: flex; align-items: center; justify-content: center;
}
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label:has(input:checked), .segmented button.active {
  background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
.segmented.type label:has(input[value="income"]:checked) { color: var(--green); }
.segmented.type label:has(input[value="expense"]:checked) { color: var(--red); }

/* Chip kategori */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { position: relative; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span {
  display: inline-block; padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 500;
  background: var(--card-2); border: 1px solid var(--line); cursor: pointer;
}
.chips input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* ---------- Layout utama ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  padding: calc(10px + var(--safe-top)) 16px 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
}
.topbar .eyebrow { font-size: 13px; color: var(--muted); }
.topbar h1 { margin: 0; font-size: 28px; letter-spacing: -0.02em; line-height: 1.15; }
.user-switch { display: flex; align-items: center; gap: 8px; padding: 4px 4px 4px 12px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow); font-weight: 600; font-size: 15px; }

main.view {
  padding: 4px 16px calc(100px + var(--safe-bottom));
  max-width: 720px; margin: 0 auto;
}

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; justify-content: space-around;
  padding: 6px 4px calc(6px + var(--safe-bottom));
  background: color-mix(in srgb, var(--card) 88%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--line);
}
.tabbar button {
  flex: 1; max-width: 120px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 11px; font-weight: 500; color: var(--muted); padding: 4px 0; min-height: 48px;
}
.tabbar button svg { width: 26px; height: 26px; }
.tabbar button.active { color: var(--accent); }

.fab {
  position: fixed; right: 18px; bottom: calc(76px + var(--safe-bottom)); z-index: 21;
  width: 58px; height: 58px; border-radius: 50%; background: var(--accent); color: var(--on-accent);
  display: grid; place-items: center; box-shadow: 0 6px 20px rgba(15, 118, 110, 0.4);
}
.fab svg { width: 28px; height: 28px; }
.fab:active { transform: scale(0.94); }

/* ---------- Kartu ---------- */
.card { background: var(--card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-bottom: 14px; }
.card h3 { margin: 0 0 12px; font-size: 15px; font-weight: 600; color: var(--muted); }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.card-head h3 { margin: 0; }
.link { color: var(--accent); font-weight: 600; font-size: 15px; }

.hero { background: linear-gradient(135deg, #0f766e, #14b8a6); color: #fff; }
.hero .label { font-size: 14px; opacity: 0.85; }
.hero .big { font-size: 34px; font-weight: 750; letter-spacing: -0.02em; margin: 2px 0 14px; word-break: break-word; }
.hero-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.hero-grid > div { background: rgba(255,255,255,0.16); border-radius: 12px; padding: 8px 10px; min-width: 0; }
.hero-grid small { display: block; font-size: 12px; opacity: 0.85; }
.hero-grid strong { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.stats { display: flex; flex-direction: column; }
.stats > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 7px 0; }
.stats > div + div { border-top: 1px solid var(--line); }
.stats small { color: var(--muted); font-size: 15px; }
.stats strong { font-size: 17px; white-space: nowrap; }

.toolbar { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.month-nav { display: flex; align-items: center; justify-content: space-between; }
.month-nav strong { font-size: 17px; }
.month-nav button { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--accent); }
.month-nav button svg { width: 22px; height: 22px; }
.month-nav button:disabled { opacity: 0.3; }

.chart-box { position: relative; height: 210px; }
.chart-box.donut { height: 220px; }

/* List baris */
.list { list-style: none; margin: 0; padding: 0; }
.list li + li { border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 12px; padding: 11px 0; width: 100%; text-align: left; }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .amt { font-weight: 650; font-size: 16px; white-space: nowrap; }
.ico {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none;
  font-size: 18px; background: var(--card-2);
}
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; background: var(--c-shared); }
.dot.jojo { background: var(--c-jojo); }
.dot.riko { background: var(--c-riko); }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--muted); }

.day-label { font-size: 13px; font-weight: 600; color: var(--muted); margin: 18px 4px 6px; display: flex; justify-content: space-between; }
.day-label:first-child { margin-top: 0; }
.group { padding: 2px 16px; }

.progress { height: 8px; background: var(--card-2); border-radius: 999px; overflow: hidden; margin-top: 10px; }
.progress div { height: 100%; background: var(--accent); border-radius: 999px; width: 0; }
.saving-card .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.saving-card .name { font-weight: 650; font-size: 17px; }
.saving-card .bal { font-size: 24px; font-weight: 750; margin-top: 6px; letter-spacing: -0.01em; }
.saving-card .meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-top: 6px; }
.saving-card { width: 100%; text-align: left; display: block; }

.empty { text-align: center; padding: 28px 12px; color: var(--muted); }
.empty .emoji { font-size: 34px; display: block; margin-bottom: 6px; }

.section-title { font-size: 20px; font-weight: 700; margin: 22px 4px 10px; letter-spacing: -0.01em; }

/* ---------- Bottom sheet ---------- */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,0.38);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fade 0.18s ease;
}
.sheet {
  background: var(--card); width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto;
  border-radius: 22px 22px 0 0; padding: 8px 18px calc(18px + var(--safe-bottom));
  animation: up 0.24s cubic-bezier(.2,.8,.2,1);
  -webkit-overflow-scrolling: touch;
}
.sheet .grabber { width: 38px; height: 5px; border-radius: 3px; background: var(--line); margin: 4px auto 10px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sheet-head h2 { margin: 0; font-size: 20px; }
.sheet-head button { color: var(--accent); font-weight: 600; font-size: 16px; padding: 6px; }
@keyframes up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.toast {
  position: fixed; left: 50%; bottom: calc(150px + var(--safe-bottom)); transform: translateX(-50%);
  background: rgba(30,30,32,0.94); color: #fff; padding: 10px 18px; border-radius: 999px;
  font-size: 15px; z-index: 100; animation: fade 0.2s ease; max-width: calc(100% - 32px); text-align: center;
}

@media (min-width: 720px) {
  .hero .big { font-size: 40px; }
  .dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .dash-grid .card { margin-bottom: 0; }
}

.row .sub.pos { color: var(--green); }
.row .sub.neg { color: var(--red); }
.toast { white-space: nowrap; }

/* ---------- Read-only & Work ---------- */
fieldset.plain { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.plain:disabled .input, fieldset.plain:disabled .chips span, fieldset.plain:disabled .segmented { opacity: 0.75; }
.ro-note {
  background: var(--accent-soft); color: var(--text); border-radius: 12px;
  padding: 10px 14px; font-size: 14px; margin-bottom: 14px;
}
.small-note { font-size: 13px; margin: 0 4px 10px; }
textarea.input { font-size: 16px; resize: vertical; min-height: 96px; line-height: 1.45; }
.avatar.student { background: #7c3aed; }
.hero.work { background: linear-gradient(135deg, #6d28d9, #a855f7); }
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 22px 0 10px; }
.section-head .section-title { margin: 0 4px; }
details.archived { margin-bottom: 14px; }
details.archived summary { color: var(--muted); font-size: 14px; font-weight: 600; padding: 4px 4px 10px; cursor: pointer; }
.toggle { display: flex; align-items: center; gap: 10px; margin: 0 4px 14px; font-weight: 500; }
.toggle input { width: 22px; height: 22px; accent-color: var(--accent); }
.card.inset { background: var(--card-2); box-shadow: none; }
.student-note { white-space: pre-wrap; color: var(--muted); margin: 0 0 14px; font-size: 15px; }
.lesson-log {
  display: block; width: 100%; text-align: left; background: var(--card-2); border-radius: 14px;
  padding: 12px 14px; margin-bottom: 10px;
}
.lesson-log-head { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; margin-bottom: 4px; }
.lesson-log-body { white-space: pre-wrap; font-size: 15px; }
.tabbar button span { white-space: nowrap; }
.amount-wrap .input { padding-left: 38px; }

/* ---------- Sembunyikan nominal ---------- */
.top-actions { display: flex; align-items: center; gap: 8px; }
.eye-btn {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: var(--card); box-shadow: var(--shadow); color: var(--muted);
}
.eye-btn svg { width: 22px; height: 22px; }

/* ---------- Debts ---------- */
.hero.debt { background: linear-gradient(135deg, #b45309, #f59e0b); }
.hero-grid.two { grid-template-columns: repeat(2, 1fr); }
.big-seg button { font-size: 15px; min-height: 40px; }

/* ---------- Accounts model & login PIN ---------- */
.back-link { align-self: flex-start; margin-bottom: 18px; font-size: 16px; }
.pin-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.pin-head h2 { margin: 0 !important; }
.pin-input { font-size: 24px !important; letter-spacing: 0.4em; text-align: center; }
.head-actions { display: flex; gap: 14px; }
.split-bar { height: 10px; border-radius: 999px; background: var(--green); opacity: 0.9; overflow: hidden; margin: 4px 0 8px; }
.split-bar div { height: 100%; background: var(--accent); width: 0; }
.split-legend { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 4px; gap: 8px; flex-wrap: wrap; }
.split-legend .lg { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; vertical-align: 0; }
.lg.saved { background: var(--accent); }
.lg.free { background: var(--green); }
.total-row .title { font-weight: 750; }
.total-row .amt { font-size: 18px; }
.explain { font-size: 14px; margin: 0 4px 6px; line-height: 1.5; }
.badge { background: var(--card-2); padding: 3px 9px; border-radius: 999px; }
.hidden { display: none !important; }

/* ---------- Bills & Settings ---------- */
.hero.bills { background: linear-gradient(135deg, #be123c, #f43f5e); }
.bill-card { width: 100%; text-align: left; display: block; }
.bill-card .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.bill-card .name { font-weight: 650; font-size: 17px; }
.bill-line { display: flex; align-items: baseline; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.bill-line .bal { font-size: 22px; font-weight: 750; }
.status { margin-left: auto; font-size: 13px; font-weight: 600; padding: 3px 9px; border-radius: 999px; }
.status.ok { color: var(--green); background: color-mix(in srgb, var(--green) 14%, transparent); }
.status.due { color: #e11d48; background: color-mix(in srgb, #e11d48 14%, transparent); }
.due-card { border: 1px solid color-mix(in srgb, #e11d48 35%, transparent); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.purpose { font-size: 14px; color: var(--muted); margin-top: 6px; white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.purpose-box { background: var(--card-2); border-radius: 12px; padding: 10px 14px; margin-top: 12px; }
.purpose-box small { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.purpose-box p { margin: 4px 0 0; white-space: pre-wrap; }
.switch-row { cursor: pointer; }
.switch { appearance: none; -webkit-appearance: none; width: 51px; height: 31px; border-radius: 999px; background: var(--line); position: relative; flex: none; cursor: pointer; transition: background 0.2s; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,0.2); transition: transform 0.2s; }
.switch:checked { background: var(--green); }
.switch:checked::after { transform: translateX(20px); }
.link-card { width: 100%; display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 16px; }
.hero-grid.two { grid-template-columns: repeat(2, 1fr); }
.bill-card .meta { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); margin-top: 6px; }

/* ---------- Onboarding & account labels ---------- */
.onboarding { justify-content: flex-start; padding-top: calc(28px + var(--safe-top)); }
.onboarding h2 { font-size: 26px !important; }
.ob-dots { display: flex; gap: 6px; margin-bottom: 22px; }
.ob-dots span { flex: 1; height: 4px; border-radius: 999px; background: var(--line); }
.ob-dots span.on { background: var(--accent); }
.ob-nav { display: flex; gap: 10px; margin-top: 18px; }
.ob-nav .btn.secondary { flex: 0 0 34%; }
.ob-add { box-shadow: none; border: 1px dashed var(--line); background: transparent; }
.currency-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.currency-grid label { position: relative; }
.currency-grid input { position: absolute; opacity: 0; pointer-events: none; }
.currency-grid span { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 6px; border-radius: 16px; background: var(--card); border: 2px solid transparent; cursor: pointer; text-align: center; }
.currency-grid strong { font-size: 22px; }
.currency-grid small { font-weight: 700; font-size: 13px; }
.currency-grid em { font-style: normal; font-size: 11px; color: var(--muted); line-height: 1.2; }
.currency-grid input:checked + span { border-color: var(--accent); background: var(--accent-soft); }
.tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: var(--accent); color: var(--on-accent); vertical-align: 2px; }
.tag.soft { background: var(--card-2); color: var(--muted); }

/* ---------- Language ---------- */
.lang-switch { margin-bottom: 18px; }
.lang-switch button { font-size: 13px; }
.card .lang-switch { margin-bottom: 0; }
:lang(th) body { line-height: 1.5; }

/* ---------- Struktur baru: Goals, Menu, Account detail ---------- */
.hero.goals { background: linear-gradient(135deg, #0369a1, #0ea5e9); }
.hero.acc { background: linear-gradient(135deg, #334155, #64748b); }
.hero-note { font-size: 13px; opacity: 0.9; margin: 12px 0 0; line-height: 1.45; }
.tag.light { background: rgba(255,255,255,0.25); color: #fff; }
.month-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.month-grid > div { min-width: 0; }
.month-grid small { display: block; color: var(--muted); font-size: 12px; }
.month-grid strong { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-goal { padding: 6px 0 10px; }
.mini-goal + .mini-goal { border-top: 1px solid var(--line); padding-top: 10px; }
.mini-goal-head { display: flex; justify-content: space-between; gap: 10px; font-weight: 600; font-size: 15px; }
.mini-goal .progress { margin-top: 8px; }
.spend-row + .spend-row { margin-top: 12px; }
.spend-head { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; }
.spend-bar { height: 6px; border-radius: 999px; background: var(--card-2); margin-top: 6px; overflow: hidden; }
.spend-bar div { height: 100%; background: var(--red); opacity: 0.75; border-radius: 999px; width: 0; }
.list.calc .row { padding: 9px 0; }
.list.calc .grow { color: var(--muted); }
.list.calc .total-row .grow { color: var(--text); font-weight: 700; }
.chip-link { color: var(--accent); font-weight: 600; font-size: 14px; padding: 8px 6px; }
.chev { font-size: 22px; line-height: 1; }
.emoji-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.emoji-grid label { position: relative; }
.emoji-grid input { position: absolute; opacity: 0; pointer-events: none; }
.emoji-grid span { display: grid; place-items: center; height: 42px; border-radius: 12px; background: var(--card-2); font-size: 20px; cursor: pointer; border: 2px solid transparent; }
.emoji-grid input:checked + span { border-color: var(--accent); background: var(--accent-soft); }
.between { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; margin-top: 6px; }
.muted.small { font-size: 13px; }
.sub.wrap { white-space: normal; }
.back-link.small { margin: 0 0 2px; font-size: 15px; display: block; }
.btn-row .btn.small { flex: 1; }
.section-head .muted { white-space: nowrap; }

/* ---------- Tab bar dengan banyak tab ---------- */
.tabbar.many { padding-left: 2px; padding-right: 2px; }
.tabbar.many button { font-size: 10px; letter-spacing: -0.01em; min-width: 0; }
.tabbar.many button svg { width: 23px; height: 23px; }
.tabbar.many button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.title.neg { color: var(--red); }
.user-switch { padding: 3px; }

/* Warna avatar user tambahan */
.avatar.sika { background: #f59e0b; }
.avatar.ling { background: #7c3aed; }
.avatar.dede { background: #0891b2; }
.user-pick { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }

/* ---------- Kotak PIN [ ][ ][ ][ ][ ][ ] ---------- */
.pin-boxes { position: relative; }
.pin-hidden {
  position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0;
  font-size: 16px; /* cegah zoom di iOS */ color: transparent; caret-color: transparent;
  border: 0; background: transparent; z-index: 2; cursor: pointer;
}
.pin-cells { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.pin-cell {
  height: 56px; border-radius: 14px; background: var(--card-2);
  border: 2px solid var(--line); display: grid; place-items: center; transition: border-color 0.15s;
}
.pin-cell.filled::after { content: ''; width: 14px; height: 14px; border-radius: 50%; background: var(--text); }
.pin-cell.active { border-color: var(--accent); }
.pin-boxes.shake { animation: pin-shake 0.35s; }
.pin-boxes.shake .pin-cell { border-color: var(--red); }
@keyframes pin-shake {
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}
