:root {
  --bg: #f6f4fb;
  --surface: #ffffff;
  --surface-2: #f1eef9;
  --text: #1e1b2e;
  --muted: #7a7590;
  --line: #e9e5f3;
  --primary: #7c3aed;
  --primary-2: #ec4899;
  --primary-soft: #efe7fe;
  --in: #10b981;
  --in-soft: #dcfce9;
  --out: #f43f5e;
  --out-soft: #ffe4e8;
  --warn: #f59e0b;
  --warn-soft: #fef3c7;
  --shadow: 0 10px 30px -12px rgba(76, 29, 149, .18);
  --radius: 22px;
  --nav-h: 74px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #110f1a; --surface: #1b1828; --surface-2: #252136; --text: #f3f1fa; --muted: #a49fba;
    --line: #2d2940; --primary-soft: #2e2150; --in-soft: #0f3326; --out-soft: #3d1621; --warn-soft: #3a2a0b;
    --shadow: 0 10px 30px -12px rgba(0, 0, 0, .6); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #110f1a; --surface: #1b1828; --surface-2: #252136; --text: #f3f1fa; --muted: #a49fba;
  --line: #2d2940; --primary-soft: #2e2150; --in-soft: #0f3326; --out-soft: #3d1621; --warn-soft: #3a2a0b;
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, .6); color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; overscroll-behavior-y: contain;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
svg { width: 22px; height: 22px; flex: none; }
.hidden { display: none !important; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; }
.center { text-align: center; }

.app { max-width: 560px; margin: 0 auto; min-height: 100dvh; padding: 0 16px calc(var(--nav-h) + 96px + env(safe-area-inset-bottom)); }

/* Top bar */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: calc(14px + env(safe-area-inset-top)) 2px 12px; position: sticky; top: 0; z-index: 20; background: linear-gradient(var(--bg) 75%, transparent); }
.hello { margin: 0; color: var(--muted); font-size: 13px; font-weight: 500; }
.title { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.top-actions { display: flex; gap: 8px; }
.icon-btn { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: var(--surface); box-shadow: var(--shadow); color: var(--text); transition: transform .15s; }
.icon-btn:active { transform: scale(.94); }
.icon-btn.sm { width: 36px; height: 36px; border-radius: 12px; box-shadow: none; background: var(--surface-2); }
.icon-btn.sm svg { width: 18px; height: 18px; }
#installBtn { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; }

/* Views */
.view { animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Hero */
.hero {
  position: relative; overflow: hidden; color: #fff; border-radius: 28px; padding: 20px;
  background: radial-gradient(120% 120% at 100% 0%, #f472b6 0%, transparent 55%), linear-gradient(135deg, #6d28d9, #9333ea 55%, #db2777);
  box-shadow: 0 18px 40px -16px rgba(124, 58, 237, .55);
}
.hero::after { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; right: -70px; bottom: -110px; background: rgba(255,255,255,.08); }
.hero-top { display: flex; flex-direction: column; gap: 10px; }
.pill-soft { align-self: flex-start; background: rgba(255,255,255,.18); backdrop-filter: blur(6px); padding: 5px 12px; border-radius: 99px; font-size: 12px; font-weight: 600; }
.hero-label { font-size: 13px; opacity: .85; }
.hero-amount { font-size: 34px; font-weight: 800; letter-spacing: -.03em; margin: 2px 0 16px; word-break: break-all; }
.hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; position: relative; z-index: 1; }
.hs { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.14); border-radius: 16px; padding: 10px 12px; min-width: 0; }
.hs small { display: block; font-size: 11px; opacity: .85; }
.hs b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs > div { min-width: 0; }
.hs-ic { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; flex: none; background: rgba(255,255,255,.95); }
.hs-ic svg { width: 16px; height: 16px; }
.hs-ic.in { color: var(--in); } .hs-ic.out { color: var(--out); }
.budget { margin-top: 14px; position: relative; z-index: 1; cursor: pointer; }
.budget-row { display: flex; justify-content: space-between; font-size: 12px; opacity: .9; margin-bottom: 6px; gap: 8px; }
.bar { height: 8px; border-radius: 99px; background: rgba(255,255,255,.22); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: #fff; transition: width .5s ease; }
.bar i.warn { background: #fde68a; } .bar i.over { background: #fecaca; }

/* Cards */
.card { background: var(--surface); border-radius: var(--radius); padding: 16px; margin-top: 14px; box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.card-head h2 { font-size: 16px; margin: 0; font-weight: 700; }
.link { color: var(--primary); font-weight: 600; font-size: 13px; }
:root[data-theme="dark"] .link { color: #c4b5fd; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .link { color: #c4b5fd; } }

/* Alerts */
.alert { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 14px; border-radius: 18px; background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); }
.alert.late { background: var(--out-soft); border-color: color-mix(in srgb, var(--out) 30%, transparent); }
.alert .a-emoji { font-size: 22px; }
.alert .a-txt { flex: 1; min-width: 0; }
.alert .a-txt b { display: block; font-size: 14px; }
.alert .a-txt small { color: var(--muted); }

/* Transaction list */
.tx-list { display: flex; flex-direction: column; }
.tx { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--line); cursor: pointer; }
.tx:last-child { border-bottom: 0; }
.tx-ic { width: 44px; height: 44px; border-radius: 15px; display: grid; place-items: center; font-size: 21px; flex: none; }
.tx-main { flex: 1; min-width: 0; }
.tx-main b { display: block; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-main small { color: var(--muted); font-size: 12px; }
.tx-amt { font-weight: 700; font-size: 14px; white-space: nowrap; }
.tx-amt.in { color: var(--in); } .tx-amt.out { color: var(--out); }
.grouped .day-head { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; color: var(--muted); padding: 16px 4px 6px; text-transform: uppercase; letter-spacing: .04em; }
.grouped .day-group { background: var(--surface); border-radius: 18px; padding: 2px 12px; box-shadow: var(--shadow); }
.empty { text-align: center; padding: 26px 10px; color: var(--muted); }
.empty .e-emoji { font-size: 40px; display: block; margin-bottom: 6px; }

/* Top categories */
.cat-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.cat-row .tx-ic { width: 38px; height: 38px; font-size: 18px; border-radius: 12px; }
.cat-row .cr-main { flex: 1; min-width: 0; }
.cr-top { display: flex; justify-content: space-between; font-size: 13px; gap: 8px; }
.cr-top b { font-weight: 600; }
.cr-bar { height: 6px; border-radius: 99px; background: var(--surface-2); margin-top: 6px; overflow: hidden; }
.cr-bar i { display: block; height: 100%; border-radius: inherit; }

/* Controls */
.month-nav { display: flex; align-items: center; justify-content: space-between; background: var(--surface); padding: 8px; border-radius: 18px; box-shadow: var(--shadow); margin-bottom: 12px; }
.month-nav strong { font-size: 15px; }
.search { display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 16px; padding: 0 14px; box-shadow: var(--shadow); margin-bottom: 12px; }
.search svg { width: 18px; height: 18px; color: var(--muted); }
.search input { border: 0; outline: 0; background: none; flex: 1; padding: 13px 0; }
.seg { display: flex; background: var(--surface-2); border-radius: 14px; padding: 4px; gap: 4px; margin-bottom: 12px; }
.seg button { flex: 1; padding: 9px 6px; border-radius: 11px; font-weight: 600; font-size: 13px; color: var(--muted); transition: all .2s; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.seg.big button { padding: 11px; font-size: 14px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 8px 13px; border-radius: 99px; background: var(--surface); border: 1.5px solid var(--line); font-size: 13px; font-weight: 600; white-space: nowrap; transition: all .15s; }
.chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.filter-label { margin: 0 0 8px; font-size: 12px; font-weight: 600; color: var(--muted); }
.sum-strip { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 4px 0 4px; }
.sum-strip div { background: var(--surface); border-radius: 14px; padding: 10px; box-shadow: var(--shadow); min-width: 0; }
.sum-strip small { display: block; color: var(--muted); font-size: 11px; }
.sum-strip b { font-size: 13px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Charts */
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpi { background: var(--surface); border-radius: 18px; padding: 12px 14px; box-shadow: var(--shadow); min-width: 0; }
.kpi small { color: var(--muted); font-size: 12px; display: block; }
.kpi b { font-size: 17px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .delta { font-size: 11px; font-weight: 600; }
.delta.up { color: var(--out); } .delta.down { color: var(--in); }
.chart { width: 100%; position: relative; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .gridline { stroke: var(--line); stroke-dasharray: 3 4; }
.chart .axis { fill: var(--muted); font-size: 10px; }
.chart .bar-out { fill: url(#gOut); }
.chart .bar-in { fill: var(--in); opacity: .85; }
.chart .bar-hit { fill: transparent; cursor: pointer; }
.chart .bar-hit:hover + g rect, .chart .sel rect { filter: brightness(1.08); }
.chart-tip { position: absolute; pointer-events: none; background: var(--text); color: var(--bg); font-size: 12px; padding: 6px 10px; border-radius: 10px; white-space: nowrap; transform: translate(-50%, -110%); opacity: 0; transition: opacity .15s; font-weight: 600; z-index: 2; }
.chart-tip.show { opacity: 1; }
.legend { display: flex; gap: 10px; font-size: 11px; color: var(--muted); }
.legend span { display: flex; align-items: center; gap: 5px; }
.dot { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.dot.out { background: linear-gradient(135deg, var(--primary), var(--primary-2)); }
.dot.in { background: var(--in); }
.mini-chart svg { width: 100%; height: auto; display: block; }
.donut-wrap { display: grid; grid-template-columns: 150px 1fr; gap: 14px; align-items: center; }
#chDonut svg { width: 150px; height: 150px; }
.donut-legend { display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; min-width: 0; }
.donut-legend .dl { display: flex; align-items: center; gap: 8px; min-width: 0; }
.donut-legend .dl span:nth-child(2) { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.donut-legend .dl b { font-weight: 700; }
@media (max-width: 380px) { .donut-wrap { grid-template-columns: 1fr; justify-items: center; } .donut-legend { width: 100%; } }

/* Reminders */
.notif-card { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 20px; background: var(--primary-soft); margin-bottom: 14px; }
.notif-ic { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--primary); color: #fff; flex: none; }
.notif-txt { flex: 1; min-width: 0; }
.notif-txt b { display: block; font-size: 14px; }
.notif-txt small { color: var(--muted); font-size: 12px; }
.bill-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 4px; }
.bill { background: var(--surface); border-radius: 20px; padding: 14px; margin-top: 12px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.bill::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--line); }
.bill.soon::before { background: var(--warn); }
.bill.late::before { background: var(--out); }
.bill.ok::before { background: var(--in); }
.bill.off { opacity: .55; }
.bill-top { display: flex; gap: 12px; align-items: center; }
.bill-top .tx-main b { font-size: 15px; }
.bill-amt { font-weight: 800; font-size: 15px; text-align: right; }
.bill-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 12px; }
.tag { font-size: 11.5px; font-weight: 600; padding: 4px 9px; border-radius: 99px; background: var(--surface-2); color: var(--muted); }
.tag.soon { background: var(--warn-soft); color: #b45309; }
.tag.late { background: var(--out-soft); color: var(--out); }
.tag.ok { background: var(--in-soft); color: #047857; }
:root[data-theme="dark"] .tag.soon { color: #fcd34d; } :root[data-theme="dark"] .tag.ok { color: #6ee7b7; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tag.soon { color: #fcd34d; } :root:not([data-theme="light"]) .tag.ok { color: #6ee7b7; } }
.bill-actions { display: flex; gap: 8px; }
.bill-actions .btn { flex: 1; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 18px; border-radius: 15px; font-weight: 700; font-size: 14px; color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-2)); box-shadow: 0 8px 20px -10px rgba(124,58,237,.7); transition: transform .12s; }
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; }
.btn.sm { padding: 9px 14px; font-size: 13px; border-radius: 12px; }
.btn.ghost { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.btn.soft { background: var(--surface-2); color: var(--text); box-shadow: none; }
.btn.danger { background: var(--out-soft); color: var(--out); box-shadow: none; }
.btn.block { width: 100%; margin-top: 16px; }

/* Bottom nav */
.bottom-nav {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 30;
  width: min(528px, calc(100% - 24px)); height: var(--nav-h); display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-radius: 26px; box-shadow: 0 14px 40px -12px rgba(30, 27, 46, .35); border: 1px solid var(--line);
}
.bottom-nav button { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--muted); font-size: 10.5px; font-weight: 600; position: relative; padding: 6px 0; }
.bottom-nav button.on { color: var(--primary); }
.bottom-nav button.on svg { transform: translateY(-1px); }
:root[data-theme="dark"] .bottom-nav button.on { color: #c4b5fd; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bottom-nav button.on { color: #c4b5fd; } }
.fab { position: fixed; z-index: 31; right: max(18px, calc((100vw - 560px) / 2 + 18px)); bottom: calc(var(--nav-h) + 22px + env(safe-area-inset-bottom));
  width: 58px; height: 58px; border-radius: 20px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2)); box-shadow: 0 12px 24px -8px rgba(219, 39, 119, .6); transition: transform .15s; }
.fab:active { transform: scale(.92); }
.fab svg { width: 28px; height: 28px; }
.badge { position: absolute; top: 0; right: calc(50% - 20px); min-width: 17px; height: 17px; padding: 0 5px; border-radius: 99px; background: var(--out); color: #fff; font-size: 10px; font-style: normal; display: grid; place-items: center; font-weight: 700; }
.badge.info { background: var(--primary); }

/* Sheet */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(17, 12, 34, .45); z-index: 40; animation: fadeIn .2s; backdrop-filter: blur(2px); }
@keyframes fadeIn { from { opacity: 0; } }
.sheet { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: min(560px, 100%); max-height: 92dvh; overflow-y: auto; z-index: 50; background: var(--surface); border-radius: 28px 28px 0 0; padding: 8px 18px calc(22px + env(safe-area-inset-bottom)); animation: up .28s cubic-bezier(.2, .9, .3, 1.1); }
@keyframes up { from { transform: translate(-50%, 100%); } }
.sheet-grip { width: 42px; height: 5px; border-radius: 99px; background: var(--line); margin: 4px auto 12px; }
.sheet h3 { margin: 0 0 14px; font-size: 19px; font-weight: 800; }
.amount-input { display: flex; align-items: baseline; gap: 8px; padding: 14px 16px; border-radius: 18px; background: var(--surface-2); margin-bottom: 14px; }
.amount-input span { font-weight: 700; color: var(--muted); font-size: 20px; }
.amount-input input { border: 0; outline: 0; background: none; font-size: 30px; font-weight: 800; width: 100%; letter-spacing: -.02em; }
.field { margin-bottom: 14px; }
.field > label, .field > .lbl { display: block; font-size: 12.5px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); outline: 0; transition: border-color .15s; }
.field input:focus, .field select:focus { border-color: var(--primary); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cat-opt { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 14px; border: 1.5px solid var(--line); font-size: 11px; font-weight: 600; text-align: center; line-height: 1.2; }
.cat-opt .ce { font-size: 22px; }
.cat-opt.on { border-color: var(--primary); background: var(--primary-soft); }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper button { width: 40px; height: 40px; border-radius: 12px; background: var(--surface-2); font-size: 20px; font-weight: 700; }
.stepper input { text-align: center; font-weight: 800; font-size: 18px; width: 70px !important; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.quick button { padding: 6px 11px; border-radius: 99px; background: var(--surface-2); font-size: 12px; font-weight: 600; }
.quick button.on { background: var(--primary); color: #fff; }
.sheet-actions { display: flex; gap: 10px; margin-top: 6px; }
.sheet-actions .btn { flex: 1; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.set-row:last-child { border-bottom: 0; }
.set-row small { display: block; color: var(--muted); font-size: 12px; }
.ios-hint { background: var(--primary-soft); border-radius: 16px; padding: 12px 14px; font-size: 13px; margin-bottom: 10px; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 30px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: var(--text); color: var(--bg); padding: 11px 18px; border-radius: 14px; font-weight: 600; font-size: 13.5px; opacity: 0; pointer-events: none; transition: all .25s; z-index: 60; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* iOS: cegah zoom saat fokus input (font >= 16px) */
input, select, textarea { font-size: 16px !important; }
.amount-input input { font-size: 30px !important; }
.stepper input { font-size: 18px !important; }
input[type="date"], input[type="time"] { -webkit-appearance: none; appearance: none; min-height: 48px; display: block; text-align: left; }
input::-webkit-date-and-time-value { text-align: left; }

.cal-tip { margin: 14px 8px 0; }
.notif-slot:empty { display: none; }

/* Jadwal */
.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.ws-day { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 0 8px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); font-weight: 600; position: relative; }
.ws-day small { font-size: 11px; color: var(--muted); }
.ws-day b { font-size: 17px; }
.ws-day i { width: 5px; height: 5px; border-radius: 99px; background: transparent; margin-top: 1px; }
.ws-day.has i { background: var(--primary-2); }
.ws-day.today b { color: var(--primary); }
.ws-day.on { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; }
.ws-day.on small, .ws-day.on b { color: #fff; }
.ws-day.on.has i { background: #fff; }
.ev { display: flex; gap: 12px; align-items: stretch; background: var(--surface); border-radius: 20px; padding: 12px; margin-top: 10px; box-shadow: var(--shadow); cursor: pointer; }
.ev.past { opacity: .5; }
.ev-time { width: 54px; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 14px; font-weight: 800; font-size: 15px; }
.ev-time small { font-weight: 600; font-size: 10.5px; opacity: .8; }
.ev-main { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.ev-main b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-main .ev-sub { display: flex; flex-wrap: wrap; gap: 4px 10px; color: var(--muted); font-size: 12px; }
.ev-main .ev-sub span { display: inline-flex; align-items: center; gap: 3px; }
.ev-main .ev-sub svg { width: 13px; height: 13px; }
.ev-emoji { font-size: 22px; align-self: center; }
.ev-soon { font-size: 11px; font-weight: 700; color: var(--primary-2); }
.mini-ev { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.mini-ev:last-child { border-bottom: 0; }
.mini-ev .t { font-weight: 800; width: 48px; font-size: 14px; }
.mini-ev .n { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; font-size: 14px; }
.days-pick { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.days-pick button { padding: 9px 0; border-radius: 11px; background: var(--surface-2); font-size: 12px; font-weight: 700; }
.days-pick button.on { background: var(--primary); color: #fff; }
.tpl { display: flex; gap: 6px; overflow-x: auto; margin: -4px -18px 14px; padding: 0 18px 2px; scrollbar-width: none; }
.tpl::-webkit-scrollbar { display: none; }
.tpl button { flex: none; padding: 7px 11px; border-radius: 99px; border: 1.5px solid var(--line); font-size: 12.5px; font-weight: 600; }
.unit-row { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.unit-row input { width: 80px !important; text-align: center; }
.unit-row select { width: auto !important; flex: 1; }

/* Ikon & warna */
.icon-head { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.icon-preview { width: 60px; height: 60px; border-radius: 20px; display: grid; place-items: center; font-size: 30px; flex: none; }
.icon-head .field { flex: 1; margin: 0; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; max-height: 176px; overflow-y: auto; padding: 6px; border-radius: 16px; background: var(--surface-2); }
.emoji-grid button { aspect-ratio: 1; font-size: 22px; border-radius: 10px; display: grid; place-items: center; }
.emoji-grid button.on { background: var(--surface); box-shadow: 0 0 0 2px var(--primary); }
.emoji-own { display: flex; gap: 8px; align-items: center; margin-top: 8px; font-size: 13px; color: var(--muted); }
.emoji-own input { width: 74px !important; text-align: center; padding: 8px !important; }
.swatches { display: flex; flex-wrap: wrap; gap: 9px; }
.swatches button { width: 32px; height: 32px; border-radius: 11px; }
.swatches button.on { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--text); }
.cat-manage-row { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--line); cursor: pointer; }
.cat-manage-row:last-of-type { border-bottom: 0; }
.cat-manage-row .tx-ic { width: 40px; height: 40px; font-size: 19px; border-radius: 13px; }
.cat-manage-row svg { width: 18px; height: 18px; color: var(--muted); }
.cat-opt.add { border-style: dashed; color: var(--muted); }
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 600; font-size: 13px; margin: -4px 0 8px; }
.back-link svg { width: 16px; height: 16px; }
