/* Duitly — gaya tampilan (tanpa framework, semua aset lokal) */
@font-face { font-family: "DM Sans"; font-weight: 400; font-display: swap; src: url(../fonts/dm-sans-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 500; font-display: swap; src: url(../fonts/dm-sans-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 600; font-display: swap; src: url(../fonts/dm-sans-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "DM Sans"; font-weight: 700; font-display: swap; src: url(../fonts/dm-sans-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 500; font-display: swap; src: url(../fonts/plus-jakarta-sans-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 600; font-display: swap; src: url(../fonts/plus-jakarta-sans-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 700; font-display: swap; src: url(../fonts/plus-jakarta-sans-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 800; font-display: swap; src: url(../fonts/plus-jakarta-sans-latin-800-normal.woff2) format("woff2"); }

:root {
  --bg: #f6ecf0; --phone-bg: #fdf5f7; --surface: #ffffff; --surface-2: #fcf1f4; --field: #eef0f4;
  --line: #e9dbe1; --text: #121a2f; --text-2: #6b7385; --accent: #8b4a5c; --accent-soft: #f6e2e8;
  --income: #a04e64; --expense: #d17a0f; --income-hero: #f4bccb; --expense-hero: #f3c57a; --hero: #2b1a1f;
  --danger: #c0392b;
}
.dark {
  --bg: #0d090b; --phone-bg: #150f12; --surface: #1e161a; --surface-2: #271d22; --field: #271d22;
  --line: #3a2c32; --text: #f7eef1; --text-2: #a8999f; --accent: #e8a0b4; --accent-soft: #3b232b;
  --income: #e590a8; --expense: #e9b25e; --hero: #34212a; --danger: #ef7d6f;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; overflow: hidden; overscroll-behavior: none; }
body { font-family: "DM Sans", system-ui, sans-serif; background: var(--bg); color: var(--text); line-height: 1.5; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; text-decoration: none; }
svg { display: block; flex-shrink: 0; }
input[type="date"] { color-scheme: light; }
.dark input[type="date"] { color-scheme: dark; }
.mono { font-family: "Plus Jakarta Sans", "DM Sans", system-ui, sans-serif; font-variant-numeric: tabular-nums lining-nums; letter-spacing: -.01em; }
input[type="date"], .tm-table td, .client-date { font-family: "Plus Jakarta Sans", "DM Sans", system-ui, sans-serif; font-variant-numeric: tabular-nums; }
::selection { background: var(--accent-soft); color: var(--accent); }

/* Bingkai HP */
.stage {
  height: 100vh; height: var(--app-h, 100vh); height: 100dvh; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(60% 50% at 15% 10%, rgba(232, 170, 190, .25), transparent),
    radial-gradient(50% 40% at 90% 90%, rgba(243, 197, 122, .15), transparent), var(--bg);
}
.phone { position: relative; display: flex; flex-direction: column; overflow: hidden; width: 100%; height: 100vh; height: var(--app-h, 100vh); height: 100dvh; padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); background: var(--phone-bg); color: var(--text); }
#app { display: flex; flex-direction: column; flex: 1; min-height: 0; }
@media (min-width: 640px) {
  .phone .bottom-nav { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  #app { width: 100%; max-width: 1100px; margin: 0 auto; }
  .phone .page { padding: 12px 24px 32px; gap: 18px; }
  .phone:not(.tm-white) .page { max-width: 720px; width: 100%; margin: 0 auto; }
  .phone .app-header { padding: 18px 24px 10px; }
  .phone .subnav { margin: 0 24px 10px; }
  .phone .subnav.scroll { overflow-x: visible; }
  .phone .subnav.scroll .subnav-item { flex: 1 0 auto; }
  .phone .bottom-nav { justify-content: center; gap: 48px; }
  .phone .sheet-panel { width: 100%; max-width: 640px; margin: 0 auto; }
  .phone .tm-stats { grid-template-columns: repeat(4, 1fr); }
  .stack.db-body { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
  .db-body > .db-note, .db-body > .db-full, .db-body > .alert, .db-body > .loading { grid-column: 1 / -1; }
  .db-body > .grid2 { align-self: stretch; }
  .db-body > .grid2 .db-tile { height: 100%; }
  .phone .rk-table { font-size: 13px; }
}
@media (max-width: 639px) {
  .phone { padding-top: env(safe-area-inset-top); }
  .bottom-nav { padding-top: 6px !important; padding-bottom: max(4px, calc(env(safe-area-inset-bottom) - 18px)) !important; }
}
.scroll-area { flex: 1 1; overflow-y: auto; scrollbar-width: none; }
.scroll-area::-webkit-scrollbar { display: none; }
.page { padding: 8px 16px 28px; display: flex; flex-direction: column; gap: 14px; }
.page-title { font-size: 2rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; margin-top: -6px; }
.eyebrow { font-size: 12px; font-weight: 600; color: var(--text-2); }
.loading { padding: 40px; text-align: center; font-size: 14px; color: var(--text-2); }

.app-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 8px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-name { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.header-actions { display: flex; gap: 8px; }
.logo { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); box-shadow: 0 2px 6px rgba(139, 74, 92, .15); object-fit: cover; }
.icon-btn { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text); transition: transform .15s, background-color .15s; flex-shrink: 0; }
.icon-btn:hover { background: var(--accent-soft); }
.icon-btn:active { transform: scale(.92); }
.icon-btn.sm { width: 32px; height: 32px; }
.icon-btn.flat { border: 0; }
.icon-btn:disabled { opacity: .3; }

/* Kartu */
.card { background: var(--surface); border-radius: 24px; border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(43, 26, 31, .04); }
.pad { padding: 16px; }
.pad-sm { padding: 6px; }
.hero { border-radius: 26px; color: #fff; padding: 20px; background: radial-gradient(90% 90% at 100% 0%, rgba(160, 78, 100, .45), transparent 60%), var(--hero); box-shadow: 0 18px 40px -18px rgba(43, 26, 31, .6); }
.hero.compact { padding: 16px; display: flex; align-items: center; justify-content: space-between; }
.label { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--text-2); }
.hero .label { color: rgba(255, 255, 255, .7); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid2.tight { gap: 8px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-5 { margin-top: 20px; }
.muted { color: var(--text-2); font-size: 14px; }
.small { font-size: 12px; }
.xs { font-size: 12px; }
.center { text-align: center; }
.h2 { font-size: 16px; font-weight: 700; }
.bold { font-weight: 700; }

.hero-badge { border-radius: 999px; background: rgba(255, 255, 255, .1); padding: 4px 10px; font-size: 11px; color: rgba(255, 255, 255, .8); }
.hero-net { margin-top: 8px; font-size: 30px; font-weight: 700; line-height: 1.2; }
.hero-stat { border-radius: 16px; background: rgba(255, 255, 255, .1); padding: 12px; }
.hero-stat-label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: rgba(255, 255, 255, .85); }
.hero-dot { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 999px; background: rgba(255, 255, 255, .15); }
.hero-stat-val { margin-top: 6px; font-size: 14px; font-weight: 600; }
.hero-today { margin-top: 10px; display: flex; align-items: center; justify-content: space-between; border-radius: 16px; background: rgba(0, 0, 0, .25); padding: 10px 12px; font-size: 12px; }
.hero-today > span:first-child { color: rgba(255, 255, 255, .85); }
.c-inc-hero { color: var(--income-hero); } .c-exp-hero { color: var(--expense-hero); }
.hero-side { display: flex; align-items: center; gap: 8px; border-radius: 16px; background: rgba(255, 255, 255, .1); padding: 8px 12px; }

.asset-total { font-size: 18px; font-weight: 700; white-space: nowrap; }
.acc { display: flex; align-items: center; gap: 10px; border-radius: 16px; background: var(--surface-2); padding: 10px; min-width: 0; }
.acc-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); flex-shrink: 0; }
.acc-label { font-size: 11px; color: var(--text-2); }
.acc-val { white-space: nowrap; font-size: 13px; font-weight: 700; }

/* Segmen, chip */
.segment { display: flex; padding: 4px; border-radius: 16px; background: var(--field); }
.segment.mini { padding: 2px; }
.seg-item { flex: 1 1; padding: 8px 6px; border-radius: 12px; font-size: 13px; font-weight: 600; color: var(--text-2); transition: background-color .2s, color .2s; }
.segment.mini .seg-item { padding: 4px 12px; font-size: 12px; }
.seg-item.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
.seg-item.active.expense { color: var(--expense); }
.seg-item.active.income { color: var(--income); }
.seg-item.active.transfer { color: var(--accent); }

.chip-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.chip-row::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--surface); border: 1px solid var(--line); color: var(--text); transition: background-color .15s, transform .15s; white-space: nowrap; flex-shrink: 0; position: relative; }
.chip:active { transform: scale(.95); }
.chip.on { background: var(--text); color: var(--phone-bg); border-color: var(--text); }
.chip.grow { flex: 1; justify-content: center; }
.pill-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--accent-soft); color: var(--accent); transition: transform .15s; position: relative; cursor: pointer; }
.pill-btn:active { transform: scale(.95); }
.date-overlay { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }

/* Form */
.amount-box { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line); transition: border-color .2s; }
.amount-box:focus-within { border-color: var(--accent); }
.amount-box .cur { font-size: 18px; font-weight: 600; color: var(--text-2); }
.amount-input { width: 100%; min-width: 0; background: transparent; border: 0; outline: none; font-size: 30px; font-weight: 700; padding: 0; }
.amount-input::placeholder { color: var(--line); }
.amount-box.sm .amount-input { font-size: 18px; }
.amount-box.sm { padding: 10px 14px; }
.field { width: 100%; padding: 12px 14px; border-radius: 16px; background: var(--field); border: 1px solid transparent; outline: none; color: var(--text); transition: border-color .2s; font-size: 16px; }
.field:focus { border-color: var(--accent); }
.field::placeholder { color: var(--text-2); opacity: .8; }
.field.sm { padding: 8px 12px; font-size: 14px; margin-top: 4px; }
textarea.field { resize: vertical; font-size: 12px; }
.flabel { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-2); margin-top: 10px; }
.search-wrap { position: relative; }
.search-wrap svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-2); }
.search-wrap .field { padding-left: 40px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }

.opt { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border-radius: 16px; font-weight: 600; font-size: 14px; background: var(--surface-2); border: 1.5px solid transparent; color: var(--text); transition: border-color .15s, background-color .15s, transform .15s; position: relative; }
.opt:active { transform: scale(.97); }
.opt.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.cat { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border-radius: 16px; font-size: 11px; font-weight: 600; background: var(--surface-2); border: 1.5px solid transparent; color: var(--text-2); transition: border-color .15s, background-color .15s, transform .15s; }
.cat:active { transform: scale(.95); }
.cat.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

.transfer-row { display: flex; align-items: center; gap: 8px; }
.transfer-box { flex: 1; border-radius: 16px; background: var(--surface-2); padding: 12px; }
.transfer-box p:first-child { font-size: 11px; color: var(--text-2); }
.transfer-box p:last-child { margin-top: 4px; display: flex; align-items: center; gap: 6px; font-weight: 600; }

.primary-btn { display: block; text-align: center; width: 100%; padding: 14px; border-radius: 18px; font-weight: 700; color: #fff; background: var(--accent); transition: transform .15s, opacity .2s, filter .2s; }
.primary-btn.expense { background: linear-gradient(135deg, #8b4a5c, #6e3546); }
.primary-btn:hover:not(:disabled) { filter: brightness(1.08); }
.primary-btn:active:not(:disabled) { transform: scale(.98); }
.primary-btn:disabled { opacity: .45; }
.dark .primary-btn { color: #1e161a; }
.dark .primary-btn.expense { background: var(--accent); }
.danger-btn { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border-radius: 18px; font-weight: 600; font-size: 14px; color: var(--danger); background: rgba(192, 57, 43, .08); transition: background-color .15s; }
.danger-btn:hover { background: rgba(192, 57, 43, .15); }
.ghost-btn { width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border-radius: 18px; font-weight: 600; font-size: 14px; color: var(--accent); background: var(--accent-soft); transition: filter .15s, transform .15s; }
.ghost-btn:active { transform: scale(.98); }

/* Transaksi */
.tx-item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 18px; transition: background-color .15s; text-align: left; }
.tx-item:hover { background: var(--surface-2); }
.tx-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 14px; flex-shrink: 0; }
.tx-icon.expense { background: rgba(209, 122, 15, .12); color: var(--expense); }
.tx-icon.income { background: var(--accent-soft); color: var(--income); }
.tx-icon.transfer { background: var(--field); color: var(--text-2); }
.tx-body { min-width: 0; flex: 1; }
.tx-title { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-sub { font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-amt { flex-shrink: 0; font-size: 14px; font-weight: 700; }
.amt-income { color: var(--income); } .amt-expense { color: var(--expense); } .amt-transfer { color: var(--text-2); }
.empty { padding: 24px; text-align: center; font-size: 14px; color: var(--text-2); }
.link { font-size: 12px; font-weight: 600; color: var(--accent); }
.section-head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px; margin-bottom: 8px; }
.group-label { margin-bottom: 6px; padding: 0 4px; }

/* Laporan */
.stat-val { margin-top: 6px; font-size: 18px; font-weight: 700; }
.chart-box { margin-top: 12px; height: 192px; position: relative; }
.bar-track { margin-top: 6px; height: 8px; overflow: hidden; border-radius: 999px; background: var(--surface-2); }
.bar-fill { height: 100%; border-radius: 999px; transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.cat-rows { margin-top: 12px; display: flex; flex-direction: column; gap: 12px; }
.cat-name { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.cat-name svg { color: var(--accent); }
.capitalize { text-transform: capitalize; }

/* Navigasi bawah */
.bottom-nav { display: flex; justify-content: space-around; padding: 8px 12px 12px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--phone-bg) 85%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 12px; border-radius: 18px; font-size: 11px; font-weight: 600; color: var(--text-2); transition: background-color .2s, color .2s; }
.nav-item.active { background: var(--accent-soft); color: var(--accent); }

/* Sheet */
.sheet-root { position: absolute; inset: 0; z-index: 50; display: flex; flex-direction: column; justify-content: flex-end; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(20, 12, 16, .35); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .2s ease-out; }
.sheet-panel { position: relative; max-height: 90%; overflow-y: auto; padding: 10px 16px 24px; border-radius: 28px 28px 0 0; background: var(--phone-bg); animation: up .28s cubic-bezier(.2, .8, .2, 1); scrollbar-width: none; }
.sheet-grip { margin: 0 auto 12px; height: 6px; width: 40px; border-radius: 999px; background: var(--line); }
.sheet-close { position: absolute; right: 16px; top: 16px; }
.sheet-title { padding-right: 40px; font-size: 20px; font-weight: 700; }
.sheet-body { margin-top: 20px; }

/* Login & pengaturan */
.login-wrap { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 24px 20px 40px; gap: 16px; overflow-y: auto; }
.login-logo { width: 56px; height: 56px; border-radius: 18px; }
.alert { border-radius: 16px; padding: 12px 14px; font-size: 13px; font-weight: 600; color: var(--danger); background: rgba(192, 57, 43, .08); }
.notice { border-radius: 16px; padding: 12px 14px; font-size: 13px; color: var(--text); background: var(--accent-soft); }
.set-row { display: flex; align-items: center; gap: 12px; }
.set-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); flex-shrink: 0; }
.file-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 18px; border-radius: 18px; border: 1.5px dashed var(--line); background: var(--surface-2); color: var(--text-2); font-size: 13px; font-weight: 600; cursor: pointer; text-align: center; position: relative; transition: border-color .15s; }
.file-drop:hover { border-color: var(--accent); color: var(--accent); }
.file-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.preview-list { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.preview-list div { display: flex; justify-content: space-between; }
.version { font-size: 11px; color: var(--text-2); text-align: center; }

/* Fee */
.icon-btn.on { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.fee-list { display: flex; flex-direction: column; gap: 6px; }
.fee-master-row { display: flex; align-items: center; gap: 8px; border-radius: 16px; background: var(--surface-2); padding: 8px 12px; }
.fee-item { border-radius: 16px; background: var(--surface-2); padding: 8px 12px; }
.fee-x { color: var(--text-2); transition: color .15s; }
.fee-x:hover { color: #c0392b; }
.fee-num { position: relative; flex: 1; }
.fee-num input { width: 100%; border: 0; border-radius: 12px; background: var(--surface); padding: 6px 20px 6px 8px; text-align: right; font-size: 14px; outline: none; }
.fee-num input:focus, .fee-note:focus { box-shadow: 0 0 0 1px var(--accent); }
.fee-num span, .fee-k span { pointer-events: none; position: absolute; top: 50%; transform: translateY(-50%); color: var(--text-2); }
.fee-num span { right: 8px; font-size: 10px; }
.fee-k { position: relative; }
.fee-k span { right: 12px; font-size: 12px; }
.fee-k .field { padding-right: 28px; }
.fee-num input, .fee-note { -webkit-appearance: none; appearance: none; -webkit-user-select: text; user-select: text; }
.fee-lbl { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-2); }
.fee-note { width: 100%; border: 0; border-radius: 12px; background: var(--surface); padding: 6px 8px; font-size: 12px; outline: none; }
.fee-field { padding-top: 8px; padding-bottom: 8px; font-size: 14px; }
.fee-add { width: 38px; height: 38px; border: 0; background: var(--accent); color: #fff; flex-shrink: 0; }
.fee-add:hover { background: var(--accent); filter: brightness(1.08); }
.fee-new { border-radius: 16px; border: 1px dashed var(--line); padding: 10px; }
.fee-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip.sm { padding: 6px 10px; font-size: 12px; }
.fee-total { border-top: 1px solid var(--line); padding-top: 12px; }
.fee-add-day { border: 1.5px dashed var(--accent); background: transparent; color: var(--accent); }
.fee-copy { display: flex; align-items: center; gap: 6px; border-radius: 999px; background: #fff; padding: 8px 14px; font-size: 12px; font-weight: 700; color: #2b1a1f; transition: transform .15s; }
.fee-copy:active { transform: scale(.95); }
.fee-copy:disabled { opacity: .4; }
.fee-pre { margin: 12px 0 0; white-space: pre-wrap; word-break: break-word; border-radius: 16px; background: rgba(0, 0, 0, .25); padding: 14px; font-size: 12.5px; line-height: 1.6; color: rgba(255, 255, 255, .95); }

/* Pasang aplikasi */
.install-banner { margin: 0 16px 8px; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 8px 24px -12px rgba(43, 26, 31, .25); }
.install-banner img { width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0; }
.install-hint { font-size: 11px; line-height: 1.35; color: var(--text-2); }
.inline-ic { display: inline-block; vertical-align: -1px; }
.inline-ic svg { display: inline; }
.install-btn { display: flex; align-items: center; gap: 4px; flex-shrink: 0; border-radius: 999px; background: var(--accent); color: #fff; padding: 8px 12px; font-size: 12px; font-weight: 700; transition: transform .15s; }
.install-btn:active { transform: scale(.95); }
.dark .install-btn { color: #1e161a; }

/* Toast */
.save-status { position: fixed; top: calc(env(safe-area-inset-top) + 10px); left: 50%; margin-left: -60px; width: 120px; text-align: center; z-index: 101; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #fff; color: #6b7385; border: 1px solid #eee; box-shadow: 0 4px 12px rgba(0, 0, 0, .08); opacity: 0; transform: translateY(-6px); transition: opacity .2s, transform .2s; pointer-events: none; }
.save-status.show { opacity: 1; transform: none; }
.save-status.saved { color: #008a2e; background: #ecfdf3; border-color: #bffcd9; }
.save-status.error { color: #e60000; background: #fff0f0; border-color: #ffe0e1; }
.toasts { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; width: min(356px, calc(100vw - 32px)); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 12px; font-size: 13px; font-weight: 500; background: #fff; color: #121a2f; border: 1px solid #eee; box-shadow: 0 4px 12px rgba(0, 0, 0, .1); animation: toastIn .35s cubic-bezier(.2, .8, .2, 1); pointer-events: auto; transition: opacity .25s, transform .25s; }
.toast.success { background: #ecfdf3; color: #008a2e; border-color: #bffcd9; }
.toast.error { background: #fff0f0; color: #e60000; border-color: #ffe0e1; }
.toast.out { opacity: 0; transform: translateY(-8px); }

.rise { animation: up .45s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes up { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } }
@keyframes toastIn { from { transform: translateY(-12px); opacity: 0; } }

/* Sub-menu DUITLY / TEMANTEN */
.subnav { display: flex; gap: 4px; margin: 0 16px 8px; padding: 4px; border-radius: 16px; background: var(--field); }
.subnav-item { flex: 1 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 4px; border-radius: 12px; font-size: 12.5px; font-weight: 600; color: var(--text-2); transition: background-color .2s, color .2s; }
.subnav-item.active { background: var(--surface); color: var(--accent); box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }

/* Temanten */
select.field { cursor: pointer; }
.client-item { width: 100%; display: flex; align-items: flex-start; gap: 12px; padding: 10px; border-radius: 18px; text-align: left; transition: background-color .15s; }
.client-item:hover { background: var(--surface-2); }
.client-date { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 50px; min-height: 50px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); flex-shrink: 0; font-size: 10px; font-weight: 600; line-height: 1.2; text-align: center; }
.client-date .mono { font-size: 17px; font-weight: 700; }
.client-money { margin-top: 4px; font-size: 11px; color: var(--text-2); display: flex; flex-wrap: wrap; gap: 2px 10px; }
.client-money b { color: var(--text); font-weight: 600; }
.tm-badge { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--field); color: var(--text-2); font-size: 10px; font-weight: 700; letter-spacing: .04em; vertical-align: 1px; }
.tm-pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; }
.tm-map { display: grid; grid-template-columns: 96px 1fr; gap: 6px 10px; align-items: center; font-size: 12px; font-weight: 600; color: var(--text-2); }
.tm-scroll { max-height: 180px; overflow-y: auto; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); padding: 6px 10px; }
.tm-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.tm-table th, .tm-table td { padding: 5px 4px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.tm-table th { color: var(--text-2); font-weight: 600; }
.log-item { display: flex; flex-direction: column; gap: 2px; border-radius: 12px; background: var(--surface-2); padding: 8px 10px; }
.opt:disabled { opacity: .45; }
.subnav.scroll { overflow-x: auto; scrollbar-width: none; }
.subnav.scroll::-webkit-scrollbar { display: none; }
.subnav.scroll .subnav-item { flex: 0 0 auto; padding: 8px 12px; }
.tm-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; }
.tm-stats.three { grid-template-columns: repeat(3, 1fr); }
.tm-stat { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tm-stat b { font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
.tm-bar { height: 6px; border-radius: 999px; background: var(--field); overflow: hidden; }
.tm-bar span { display: block; height: 100%; border-radius: 999px; background: var(--accent); transition: width .4s; }
.tm-rekap { padding: 12px; border-radius: 16px; background: var(--surface-2); }
.tm-rekap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tm-rekap-grid.three { grid-template-columns: repeat(3, 1fr); }
.tm-mini { display: flex; flex-direction: column; gap: 3px; font-size: 10.5px; font-weight: 600; color: var(--text-2); min-width: 0; }
.tm-mini b { font-size: 13px; color: var(--text); }
.tm-prog { flex-shrink: 0; padding: 3px 9px; border-radius: 999px; font-size: 10px; font-weight: 700; letter-spacing: .03em; background: var(--field); color: var(--text-2); }
.tm-prog[data-p="EDITING"] { background: var(--accent-soft); color: var(--accent); }
.tm-prog[data-p="OVERDUE"] { background: rgba(220, 38, 38, .12); color: var(--danger); }
.tm-prog[data-p="COMPLETED"] { background: rgba(22, 163, 74, .14); color: #15803d; }
.tm-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.tm-chips::-webkit-scrollbar { display: none; }
.tm-chip { flex: 0 0 auto; padding: 6px 12px; border-radius: 999px; background: var(--field); font-size: 11px; font-weight: 600; color: var(--text-2); transition: background-color .2s, color .2s; }
.tm-chip.active { background: var(--accent); color: #fff; }
.pkg-list { display: flex; flex-direction: column; gap: 6px; }
.pkg-opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--field); font-size: 13px; font-weight: 600; cursor: pointer; }
.pkg-opt span:nth-of-type(1) { flex: 1; }
.pkg-opt input { width: 16px; height: 16px; accent-color: var(--accent); }
.pkg-custom { gap: 6px; }
.pkg-custom-box { gap: 6px; padding: 8px; border-radius: 14px; background: var(--field); }
.pkg-custom-box > .field { margin-top: 0; }
.master-row.wrap { flex-wrap: wrap; }
.master-row.wrap .field[data-f=name] { flex: 1; min-width: 0; }
.master-desc { flex-basis: 100%; }
.pkg-custom .field { margin-top: 0; flex: 1; min-width: 0; }
.pkg-custom .amount-box { width: 140px; flex-shrink: 0; }
.pkg-custom .amount-box .amount-input { font-size: 16px; min-width: 0; width: 100%; }
.inv-card { padding: 12px 14px; }
.inv-preview { border-radius: 14px; overflow: hidden; background: #fff; border: 1px solid var(--line); box-shadow: 0 4px 16px rgba(0, 0, 0, .06); }
.inv-preview img { display: block; width: 100%; height: auto; }
.inv-preview .loading, .inv-preview p { padding: 16px; }
.inv-st { padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--accent-soft); color: var(--accent); }
.master-row { display: flex; align-items: center; gap: 6px; }
.client-item:disabled { opacity: .5; }
html:not(.dark) .phone.tm-white { --phone-bg: #ffffff; }

/* Dashboard Temanten */
.db-hero { border-radius: 24px; padding: 18px; color: #4a2532; background: linear-gradient(135deg, #fbe3ea, #f6d4df); border: 1px solid #f3cfdb; }
.db-hero .db-lbl { color: #8b4a5c; }
.db-big { display: block; margin-top: 4px; font-size: 30px; font-weight: 800; line-height: 1.15; }
.db-hero-row { margin-top: 14px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; }
.db-hero-row > div { display: flex; flex-direction: column; gap: 2px; border-radius: 14px; background: rgba(255, 255, 255, .6); padding: 10px 12px; }
.db-hero-row span { font-size: 11px; color: #8b4a5c; }
.db-hero-row b { font-size: 15px; font-weight: 700; }
.db-lbl { font-size: 12px; font-weight: 600; color: var(--text-2); }
.db-tile { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 14px; border-radius: 20px; border: 1px solid transparent; }
.db-tile b { font-size: 17px; font-weight: 800; overflow-wrap: anywhere; line-height: 1.2; }
.db-ic { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 11px; background: #fff; margin-bottom: 6px; }
.db-tile.pink { background: #fdf3f6; border-color: #f8e1e8; } .db-tile.pink .db-ic, .db-tile.pink b { color: #c06a88; }
.db-tile.violet { background: #f6f3fd; border-color: #e9e2f8; } .db-tile.violet .db-ic, .db-tile.violet b { color: #8a74c4; }
.db-tile.amber { background: #fdf8ee; border-color: #f6e9cc; } .db-tile.amber .db-ic, .db-tile.amber b { color: #c4943e; }
.db-tile.blue { background: #f1f6fd; border-color: #dde8f8; } .db-tile.blue .db-ic, .db-tile.blue b { color: #5b85c9; }
.db-tile.red { background: #fdf3f2; border-color: #f6dedb; } .db-tile.red .db-ic, .db-tile.red b { color: #cc6f66; }
.db-three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.db-three .db-tile { padding: 12px 10px; }
.db-three .db-tile b { font-size: 22px; }
.db-three .db-lbl { font-size: 11px; }
.db-head { padding: 0 4px; margin-bottom: 8px; }
.db-note { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); padding: 0 4px; margin-top: -4px; }
.db-cat { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: center; }
.db-donut { position: relative; width: 120px; height: 120px; }
.db-donut-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.db-donut-c b { font-size: 22px; font-weight: 800; line-height: 1; }
.db-donut-c span { font-size: 10px; color: var(--text-2); }
.db-legend { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.db-leg { display: grid; grid-template-columns: 10px 1fr auto 36px; align-items: center; gap: 8px; font-size: 12.5px; }
.db-leg i { width: 10px; height: 10px; border-radius: 4px; }
.db-leg span { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-leg em { font-style: normal; font-size: 11px; color: var(--text-2); text-align: right; }
.db-up { display: flex; align-items: center; gap: 12px; }
.db-up .client-date { width: 44px; min-height: 44px; }
.db-when { flex-shrink: 0; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--field); color: var(--text-2); }
.db-when.now { background: #fdf3f6; color: #c06a88; }
/* Rekap tabel */
.rk-card { overflow: hidden; }
.rk-table tr.tm-rekap { background: none; }
.rk-scroll { overflow-x: auto; scrollbar-width: thin; }
.rk-table { width: 100%; min-width: 600px; border-collapse: collapse; font-size: 12px; }
.rk-table th { background: #fbe9ef; color: #6b3a4a; font-weight: 700; font-size: 11px; text-align: left; padding: 10px 8px; white-space: nowrap; }
.rk-table td { padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
.rk-table tbody tr:nth-child(even) td { background: #fffafb; }
.rk-table tfoot td { font-weight: 800; background: #fdf3f6; border-bottom: 0; }
.rk-name { position: sticky; left: 0; z-index: 1; background: var(--surface); font-weight: 700; max-width: 130px; overflow: hidden; text-overflow: ellipsis; box-shadow: 1px 0 0 var(--line); }
.rk-table th.rk-name { background: #fbe9ef; }
.rk-num { text-align: right !important; }
.rk-owner { color: var(--accent); font-weight: 700; }
.rk-in { width: 92px; padding: 6px 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--field); text-align: right; font-size: 12px; outline: none; }
.rk-in:focus { border-color: var(--accent); background: var(--surface); }
.rk-empty-ic { margin: 0 auto; color: var(--text-2); opacity: .6; }
.rk-click { cursor: pointer; }
.rk-click:hover td { background: #fdf3f6 !important; }
.rk-wrap { white-space: normal !important; min-width: 120px; max-width: 180px; }
.rk-date { width: 132px; text-align: left; }
.rk-sel { width: auto; text-align: left; cursor: pointer; }
.rk-note { width: 150px; text-align: left; }
.dark .rk-table th, .dark .rk-table tfoot td, .dark .rk-table tbody tr:nth-child(even) td { background: var(--surface-2); color: var(--text); }
.dark .db-hero { background: var(--surface-2); border-color: var(--line); color: var(--text); }
.dark .db-tile { background: var(--surface-2) !important; border-color: var(--line) !important; }
.dark .db-ic { background: var(--surface); }
