/* Naija BizManager — Phase 1 styles
   Light theme only. Mobile first. No external fonts. */

:root {
  --bg: #f4f6f4;
  --surface: #ffffff;
  --border: #e3e7e3;
  --text: #16211a;
  --muted: #6b766f;
  --accent: #0b6b3a;
  --accent-soft: #e4f3ea;
  --accent-text: #0a5a31;
  --danger: #c0392b;
  --danger-soft: #fbe9e7;
  --warn: #b7791f;
  --warn-soft: #fcf3e2;
  --radius: 14px;
  --radius-sm: 10px;
  --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.4;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }

#app { max-width: 520px; margin: 0 auto; min-height: 100dvh; position: relative; }

.view {
  padding: 16px 16px calc(var(--nav-h) + var(--safe-b) + 88px);
  min-height: 100dvh;
}

/* ---------- Typography helpers ---------- */
.page-title { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.page-sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.section-title {
  font-size: 13px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.06em;
  margin: 22px 0 8px;
  display: flex; justify-content: space-between; align-items: center;
}
.section-title a { color: var(--accent-text); text-transform: none; letter-spacing: 0; font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
.pos { color: var(--accent-text); }
.neg { color: var(--danger); }

/* ---------- Header ---------- */
.header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); color: var(--muted); white-space: nowrap;
}
.chip.open { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }
.chip.closed { background: #eef0ee; color: var(--muted); }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
}
.card + .card { margin-top: 12px; }
.card-label { font-size: 13px; color: var(--muted); font-weight: 500; }
.card-value { font-size: 22px; font-weight: 700; margin-top: 4px; letter-spacing: -0.01em; }
.hero { background: var(--accent); color: #fff; border-color: transparent; }
.hero .card-label { color: rgba(255,255,255,0.8); }
.hero .card-value { font-size: 34px; margin-top: 6px; }
.hero .card-note { font-size: 13px; color: rgba(255,255,255,0.85); margin-top: 8px; }
.hero .hero-bank { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.2); font-weight: 600; color: #fff; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.grid-2 .card { margin: 0; }
.card-note { font-size: 13px; color: var(--muted); margin-top: 6px; }
.card.link { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.card.link .chev { color: var(--muted); flex: none; }

/* ---------- Day banner ---------- */
.banner {
  margin-top: 12px; padding: 14px 16px; border-radius: var(--radius);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: var(--surface); border: 1px solid var(--border);
}
.banner.warn { background: var(--warn-soft); border-color: transparent; }
.banner.good { background: var(--accent-soft); border-color: transparent; }
.banner.bad { background: var(--danger-soft); border-color: transparent; }
.banner .b-title { font-weight: 600; }
.banner .b-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 600; font-size: 16px; background: var(--accent); color: #fff;
  white-space: nowrap; flex: none;
}
.btn:active { transform: translateY(1px); }
.btn.secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn.ghost { background: transparent; color: var(--accent-text); }
.btn.danger { background: var(--danger); }
.btn.danger-outline { background: var(--surface); color: var(--danger); border-color: var(--danger); }
.btn.sm { min-height: 40px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
/* Google requires its own mark on a white or light button. */
.btn.google { background: var(--surface); color: var(--text); border-color: var(--border); font-weight: 600; }
.btn.google svg { flex: none; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.btn-row { display: flex; gap: 10px; margin-top: 14px; }
.btn-row .btn { flex: 1; }

/* ---------- Lists ---------- */
.list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.row {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 60px;
  border-top: 1px solid var(--border); width: 100%; text-align: left; background: none; border-left: 0; border-right: 0; border-bottom: 0;
}
.row:first-child { border-top: 0; }
.row:active { background: #f7f9f7; }
.row .ic {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: 15px;
}
.ic.sale { background: var(--accent-soft); color: var(--accent-text); }
.ic.expense { background: var(--danger-soft); color: var(--danger); }
.ic.personal { background: #eeeaf7; color: #5b3fa0; }
.ic.repayment { background: #e5f0fb; color: #1d5b9b; }
.ic.other-in { background: #e3f1f6; color: #12667f; }
.ic.other-out { background: #fdeee3; color: #a8571b; }
.ic.capital { background: #eeeaf7; color: #5b3fa0; }
.ic.person { background: #eef0ee; color: var(--muted); }
.ic.pos { background: #e5edf8; color: #2f5f9e; }
.ic.move { background: #eef0ee; color: var(--text); }
.ic.supplier { background: #fdeee3; color: #a8571b; }
.row .amt .s.pos { color: var(--accent-text); }
.row .main { flex: 1; min-width: 0; }
.row .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .s { font-size: 13px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .amt { flex: none; font-weight: 700; text-align: right; }
.row .amt .s { font-weight: 500; }
.tag {
  display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 6px;
  background: #eef0ee; color: var(--muted); margin-left: 6px; vertical-align: middle; text-transform: uppercase; letter-spacing: 0.04em;
}
.day-head {
  display: flex; justify-content: space-between; padding: 14px 4px 6px;
  font-size: 13px; font-weight: 600; color: var(--muted);
}
.day-head .num { font-weight: 600; }
.empty { text-align: center; color: var(--muted); padding: 28px 16px; font-size: 15px; }
.empty strong { display: block; color: var(--text); font-size: 16px; margin-bottom: 4px; }

/* ---------- Filters ---------- */
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filter {
  flex: none; padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--border); color: var(--muted);
}
.filter.active { background: var(--text); color: #fff; border-color: transparent; }
.month-nav { display: flex; align-items: center; justify-content: space-between; margin: 12px 0 6px; }
.month-nav .btn { min-width: 44px; }
.month-nav .m { font-weight: 700; }

/* ---------- Forms ---------- */
.field { margin-top: 16px; }
.field label, .field .lbl { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.input {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface); font-size: 16px;
}
.input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
textarea.input { min-height: 72px; resize: vertical; }
.amount-wrap { position: relative; }
.amount-wrap .cur {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  font-size: 28px; font-weight: 700; color: var(--muted);
}
.amount-wrap .input {
  padding-left: 44px; font-size: 32px; font-weight: 700; min-height: 64px; letter-spacing: -0.01em;
}
/* A label with a control beside it, e.g. Password + the Show button. */
.field-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.field-top label { margin-bottom: 6px; }
.peek {
  background: none; border: 0; padding: 4px 2px; font-size: 13px; font-weight: 600;
  color: var(--accent-text); min-height: 0;
}

/* "or" between two ways of signing in, with a rule either side. */
.or { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin: 16px 0; }
.or::before, .or::after { content: ""; height: 1px; background: var(--border); }
.or span { font-size: 13px; color: var(--muted); font-weight: 600; }

.field-lbl { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.fee-rule { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.fee-rule .muted { font-size: 14px; }
.amount-wrap.sm .cur { font-size: 20px; }
.amount-wrap.sm .input { padding-left: 36px; font-size: 22px; min-height: 52px; }
/* What to do at the counter for a POS entry. */
.pos-guide {
  margin-top: 12px; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--accent-soft); color: var(--accent-text); font-weight: 600; font-size: 14px; line-height: 1.5;
}
.toggle button { padding: 6px 8px; line-height: 1.25; }
/* Native picker on Android: big targets, almost no vertical space. */
select.input {
  appearance: none; -webkit-appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b766f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px 16px;
}

/* Step 1 of add-entry: Business or Personal */
.choice {
  display: block; width: 100%; text-align: left; min-height: 76px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 15px 16px; margin-bottom: 10px;
}
.choice:active { background: #f7f9f7; }
.choice-t { display: block; font-size: 17px; font-weight: 700; }
.choice-s { display: block; font-size: 13px; color: var(--muted); margin-top: 3px; }

.kv-gap { height: 12px; }
.card-note.overdue, .row .s.overdue { color: var(--danger); font-weight: 600; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; background: #eef0ee; padding: 4px; border-radius: 12px; }
.seg button, .seg a {
  min-height: 42px; border: 0; border-radius: 9px; background: transparent; font-weight: 600; font-size: 14px; color: var(--muted);
}
.seg a { display: grid; place-items: center; text-align: center; }
.seg button.active, .seg a.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,0.08); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button {
  min-height: 40px; padding: 0 14px; border-radius: 999px; font-size: 14px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
}
.chips button.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); }
.toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); }
.toggle button { min-height: 44px; border: 0; background: transparent; font-weight: 600; color: var(--muted); }
.toggle button.active { background: var(--text); color: #fff; }
.toggle button.active.personal { background: #5b3fa0; }
/* Exactly what the customer will receive, so the owner can check before sending. */
.msg-preview {
  white-space: pre-wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.5;
  max-height: 38dvh;
  overflow-y: auto;
}

.help { font-size: 13px; color: var(--muted); margin-top: 6px; }
.error { color: var(--danger); font-size: 13px; margin-top: 8px; font-weight: 600; }

/* ---------- The free/paid split ---------- */

/* A small badge on a card whose contents are all gated. */
.lock-pill {
  display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px;
  background: var(--warn-soft); color: var(--muted); font-size: 11px; font-weight: 700;
  vertical-align: middle; letter-spacing: 0.02em;
}

.filter.locked { opacity: 0.6; }

/* The Dashboard behind glass: their own figures, out of focus. Never a blank
   panel — the pitch is what they already have. The height is capped so the
   card stays on screen instead of floating over a metre of blur. */
.locked-preview { position: relative; max-height: 520px; overflow: hidden; }
.locked-inner { filter: blur(7px); opacity: 0.5; pointer-events: none; user-select: none; }
.locked-over {
  position: absolute; inset: 0; display: flex; align-items: flex-start;
  justify-content: center; padding: 48px 4px 0;
}
.locked-over .card { width: 100%; max-width: 420px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18); }

/* What is free and what paying adds, always shown together. */
.card.good-card { background: var(--accent-soft); }
.tick-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 7px; }
.tick-list li { position: relative; padding-left: 22px; font-size: 14px; }
.tick-list li::before { content: "\2713"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.tick-list li.hi { font-weight: 700; }

/* ---------- Landing page ---------- */

/* The wall has no tabs and no add button: there is nothing yet to add to. */
#app.landing #nav, #app.landing #fab { display: none; }
#app.landing .view { padding-bottom: 24px; }

.landing-hero { padding: 20px 0 4px; }
.landing-mark {
  width: 52px; height: 52px; border-radius: 15px; background: var(--accent); color: #fff;
  display: grid; place-items: center; font-size: 28px; font-weight: 700; margin-bottom: 18px;
}
.landing-hero h1 { font-size: 27px; line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }
.landing-hero .lede { margin-top: 10px; font-size: 15px; color: var(--muted); line-height: 1.5; }
.landing-hero .btn { margin-top: 18px; }
.btn.lg { min-height: 54px; font-size: 17px; }

/* ---------- Legal pages (privacy, terms) ---------- */
.legal { max-width: 640px; margin: 0 auto; padding-bottom: 48px; }
.legal h2 { font-size: 17px; font-weight: 700; margin: 22px 0 6px; }
.legal p { margin-bottom: 12px; line-height: 1.55; }
.legal a { color: var(--accent-text); font-weight: 600; }

/* ---------- Bottom nav ---------- */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  max-width: 520px; margin: 0 auto;
  height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: grid; grid-template-columns: 1fr 1fr 72px 1fr 1fr;
  background: var(--surface); border-top: 1px solid var(--border);
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 11px; font-weight: 600; color: var(--muted);
}
.nav-item svg { width: 24px; height: 24px; }
.nav-item.active { color: var(--accent-text); }
.fab {
  position: fixed; z-index: 21; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--nav-h) + var(--safe-b) - 26px);
  width: 60px; height: 60px; border-radius: 50%; border: 4px solid var(--bg);
  background: var(--accent); color: #fff; display: grid; place-items: center;
  box-shadow: 0 6px 16px rgba(11,107,58,0.35);
}
.fab:active { transform: translateX(-50%) scale(0.96); }

/* ---------- Sheet (modal) ---------- */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 30; background: rgba(10,20,14,0.45);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fade 0.15s ease-out;
}
.sheet {
  width: 100%; max-width: 520px; max-height: 94dvh; overflow-y: auto;
  background: var(--bg); border-radius: 20px 20px 0 0;
  padding: 8px 16px calc(24px + var(--safe-b));
  animation: rise 0.2s ease-out;
}
.sheet-handle { width: 40px; height: 4px; border-radius: 2px; background: #cfd5d0; margin: 6px auto 12px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.sheet-head h2 { font-size: 18px; font-weight: 700; }
.sheet-head .close { background: none; border: 0; color: var(--muted); font-size: 15px; font-weight: 600; padding: 8px; }
.dialog { align-items: center; padding: 16px; }
.dialog .sheet { border-radius: 18px; max-width: 420px; padding: 20px; animation: fade 0.15s ease-out; }
.dialog p { color: var(--muted); margin-top: 8px; font-size: 15px; }
@keyframes rise { from { transform: translateY(24px); opacity: 0.6; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Toast ---------- */
.toast-root { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--safe-b) + 52px); z-index: 40; display: flex; justify-content: center; pointer-events: none; }
.toast {
  background: var(--text); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; font-weight: 600;
  animation: fade 0.15s ease-out; max-width: 90%;
}

/* ---------- Settings ---------- */
.setting-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px; border-top: 1px solid var(--border); }
.setting-row:first-child { border-top: 0; }
.setting-row .t { font-weight: 600; }
.setting-row .s { font-size: 13px; color: var(--muted); margin-top: 2px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--border); }
.kv .v { text-align: right; }
.kv.sub { border-top: 0; padding-top: 0; font-size: 13px; }
.kv.sub .k { padding-left: 12px; }
.kv:first-child { border-top: 0; }
.kv .k { color: var(--muted); }
.kv .v { font-weight: 600; }
.kv.total .v, .kv.total .k { font-weight: 700; color: var(--text); }

/* ---------- Report ---------- */
/* Five equal chips that fit a phone width, so "All time" is never hidden off-screen. */
.period-chips { margin-top: 12px; gap: 5px; }
.period-chips .filter { flex: 1 1 0; min-width: max-content; padding: 8px 6px; font-size: 13px; text-align: center; white-space: nowrap; }
.kpi-head { margin-top: 12px; }
.kpi-value { font-size: 34px; font-weight: 700; margin-top: 4px; letter-spacing: -0.02em; }
.delta { font-size: 14px; font-weight: 600; margin-top: 6px; color: var(--muted); }
.delta.pos { color: var(--accent-text); }
.delta.neg { color: var(--danger); }
.kpi-split { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 12px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.kpi-split .k { display: block; font-size: 13px; color: var(--muted); }
.kpi-split .num { font-size: 18px; font-weight: 700; }
.kpi-split.three { gap: 8px; }
.kpi-split.three .num { font-size: 15px; }
.grid-2.flush { margin-top: 0; }
.grid-2 .span-2 { grid-column: 1 / -1; }
.warn-t { color: var(--warn); }

.chart-card { padding: 14px 12px 12px; }
.chart { display: block; width: 100%; height: auto; overflow: visible; }
.ch-in { fill: var(--accent); }
.ch-out { fill: #e08a7f; }
.ch-in-bg { background: var(--accent); }
.ch-out-bg { background: #e08a7f; }
.ch-lbl, .ch-scale { font-size: 10px; fill: var(--muted); font-family: var(--font); }
.ch-grid { stroke: var(--border); stroke-dasharray: 3 3; }
.ch-base { stroke: var(--border); }
.ch-hit { fill: transparent; }
.ch-tap { cursor: pointer; outline: none; }
.ch-tap:hover .ch-hit, .ch-tap:focus .ch-hit { fill: rgba(11, 107, 58, 0.08); }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; }

.hbar + .hbar { margin-top: 12px; }
.hbar-top { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.hbar-l { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-top .num { flex: none; }
.hbar-track { height: 8px; background: #eef0ee; border-radius: 4px; margin-top: 6px; overflow: hidden; }
.hbar-fill { height: 100%; background: #e08a7f; border-radius: 4px; }

.stack { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: #eef0ee; }
.stack-part { height: 100%; }
.stack-part + .stack-part { border-left: 2px solid var(--surface); }
.stack-legend { margin-top: 8px; font-size: 14px; }
.stack-legend .k { display: inline-flex; align-items: center; gap: 8px; }
.m-cash { background: var(--accent); }
.m-pos { background: #2f6fb3; }
.m-transfer { background: #7a5cc0; }
.m-credit { background: #d9962b; }

.till-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; margin-bottom: 8px; }
.till-stats .n { display: block; font-size: 26px; font-weight: 700; }
.till-stats .l { font-size: 13px; color: var(--muted); }

.mrow.active { background: var(--accent-soft); }
.mrow .amt .s { display: block; }
.mrow .t small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 6px; }
.row .s.pos { color: var(--accent-text); }
.row .s.neg { color: var(--danger); }

/* ---------- Categories ---------- */
.cat-row { display: flex; align-items: center; gap: 4px; padding: 4px 6px 4px 0; border-top: 1px solid var(--border); }
.cat-row:first-child { border-top: 0; }
.cat-main { flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 10px 14px; }
.cat-main .t { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-main .s { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.cat-row.is-hidden .cat-main .t { color: var(--muted); }
.icon-btn { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.icon-btn[disabled] { opacity: 0.35; }
.add-row { display: flex; gap: 8px; }
.add-row .input { flex: 1; min-width: 0; }

/* ---------- Detail header ---------- */
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--accent-text); font-weight: 600; font-size: 15px; background: none; border: 0; padding: 6px 0; margin-bottom: 6px; }
.back svg { width: 20px; height: 20px; }

@media (min-width: 521px) {
  .nav, .fab { box-shadow: 0 -1px 0 var(--border); }
  .nav { border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
  #app { border-left: 1px solid var(--border); border-right: 1px solid var(--border); background: var(--bg); }
}
