/* =============================================================================
 * MONAI Private v2 — styles.css
 * -----------------------------------------------------------------------------
 * Minimalist, mobile-first, one-handed. Warm paper-white surface, soft gray
 * structure, ONE accent (vermilion) for money-out + primary actions, green for
 * income only. System fonts only (100% offline — no webfont requests).
 * ========================================================================== */

:root {
  --bg: #FAFAF8;
  --surface: #FFFFFF;
  --line: #ECECE8;
  --ink: #1C1C1A;
  --ink-soft: #8A8A84;
  --accent: #E5484D;
  --accent-soft: #FDECEC;
  --income: #2F9E63;
  --income-soft: #E9F6EF;

  --radius: 18px;
  --radius-pill: 999px;
  --gutter: 16px;
  --shadow: 0 1px 2px rgba(28,28,26,.05), 0 4px 16px rgba(28,28,26,.06);

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ---- reset ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, sans-serif;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; touch-action: manipulation; }
input, select { font: inherit; color: inherit; }
input { background: none; border: none; }
input:focus, button:focus, select:focus { outline: none; }
input:focus-visible, button:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px;
}
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---- shell + screens --------------------------------------------------- */
.app { max-width: 480px; margin-inline: auto; }
.screen {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 100dvh;
  padding: calc(var(--safe-top) + 12px) var(--gutter) calc(var(--safe-bottom) + 32px);
}

/* ---- header ------------------------------------------------------------ */
.header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 2px; }
.header__brand { display: flex; align-items: center; gap: 10px; }
.header__logo {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--ink); color: var(--bg);
  font-weight: 800; font-size: 18px;
}
.header__title { font-size: 17px; font-weight: 800; letter-spacing: .04em; }
.header__sub { font-weight: 500; color: var(--ink-soft); letter-spacing: .02em; }

.icon-btn {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 12px; font-size: 18px;
}
.icon-btn:active { background: var(--accent-soft); }
.icon-btn--sm { width: 32px; height: 32px; font-size: 15px; }

/* ---- shared bits -------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}
.hint { font-size: 13px; color: var(--ink-soft); padding: 0 2px; }

.mini-select {
  font-size: 13px; font-weight: 600;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 7px 8px;
  max-width: 150px;
  appearance: auto;
}

.pillchip {
  font-size: 13px; font-weight: 600;
  color: var(--ink-soft);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 8px 12px;
  white-space: nowrap;
}
.pillchip.is-on { color: var(--accent); background: var(--accent-soft); border-color: transparent; }

.minichip {
  font-size: 12px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  border-radius: var(--radius-pill);
  padding: 4px 10px;
}
.minichip--exp { color: var(--accent); background: var(--accent-soft); }
.minichip--inc { color: var(--income); background: var(--income-soft); }

/* toggle switch */
.switch {
  appearance: none;
  width: 46px; height: 28px;
  border-radius: var(--radius-pill);
  background: var(--line);
  position: relative;
  transition: background .15s ease;
  flex: 0 0 auto;
  cursor: pointer;
}
.switch::after {
  content: '';
  position: absolute; top: 3px; left: 3px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
  transition: transform .15s ease;
}
.switch:checked { background: var(--income); }
.switch:checked::after { transform: translateX(18px); }

/* ---- summary ------------------------------------------------------------ */
.summary {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px 16px;
}
.summary__toprow { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.summary__filters { display: flex; gap: 6px; }
.summary__label {
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--ink-soft);
}
.summary__amount {
  font-size: clamp(38px, 12vw, 50px);
  font-weight: 800; letter-spacing: -.03em; line-height: 1.05;
  font-variant-numeric: tabular-nums;
  margin-top: 6px;
}
.summary__usd { font-size: 15px; color: var(--ink-soft); font-variant-numeric: tabular-nums; margin-top: 2px; }
.summary__month {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 13px; color: var(--ink-soft);
}
.summary__chips { display: flex; gap: 6px; }

/* ---- category chart ------------------------------------------------------ */
.chart {
  display: flex; align-items: flex-end; gap: 8px;
  min-height: 158px;
  overflow-x: auto;
  padding: 4px 2px;
  scrollbar-width: none;
}
.chart::-webkit-scrollbar { display: none; }
.chart:empty { display: none; }

.bar {
  flex: 0 0 76px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end;
  gap: 6px;
  height: 158px;
}
.bar__fill {
  width: 100%;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 6px;
  font-size: 18px;
  min-height: 40px;
  transition: background .12s ease;
}
.bar.is-active .bar__fill { background: var(--accent-soft); border-color: transparent; }
.bar__label {
  display: flex; flex-direction: column; align-items: center;
  gap: 1px;
  font-size: 11px; font-weight: 700; line-height: 1.15;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.bar.is-active .bar__label { color: var(--accent); }

/* ---- quick add ------------------------------------------------------------ */
.quickadd {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}
.quickadd__form { display: flex; flex-direction: column; gap: 12px; }
.quickadd__row { display: flex; align-items: center; gap: 10px; min-width: 0; }

.quickadd__desc {
  flex: 1; min-width: 0;
  font-size: 16px;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.quickadd__desc::placeholder { color: var(--ink-soft); }

.quickadd__mic {
  flex: 0 0 auto;
  display: grid; place-items: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--accent); color: #fff;
  box-shadow: 0 4px 12px rgba(229,72,77,.35);
  transition: transform .12s ease;
}
.quickadd__mic:active { transform: scale(.94); }
.quickadd__mic.is-listening { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(229,72,77,.45); }
  50%      { box-shadow: 0 0 0 12px rgba(229,72,77,0); }
}

.quickadd__amountwrap {
  flex: 1 1 auto; min-width: 0; max-width: 100%;
  display: flex; align-items: center; gap: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 6px 6px 6px 8px;
}
.quickadd__currency {
  flex: 0 0 auto;
  font-size: 13px; font-weight: 700; letter-spacing: .04em;
  color: var(--accent); background: var(--accent-soft);
  border-radius: 10px; padding: 8px 10px;
}
.quickadd__amount {
  flex: 1 1 auto; min-width: 0; width: 100%;
  font-size: 24px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 6px 4px;
}
.quickadd__amount::placeholder { color: var(--ink-soft); font-weight: 500; }

.quickadd__type {
  flex: 0 0 auto;
  width: 48px; height: 48px; border-radius: 14px;
  font-size: 24px; font-weight: 700;
  border: 1px solid var(--line);
  background: var(--bg); color: var(--accent);
}
.quickadd__type[data-type="income"] { color: var(--income); background: var(--income-soft); border-color: transparent; }

.quickadd__extras { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.quickadd__extras::-webkit-scrollbar { display: none; }

.quickadd__cats { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.quickadd__cats::-webkit-scrollbar { display: none; }

.cat-chip {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px;
  font-size: 14px; font-weight: 600;
  color: var(--ink-soft);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  transition: background .1s ease, color .1s ease;
}
.cat-chip[aria-checked="true"] { color: var(--accent); background: var(--accent-soft); border-color: transparent; }

.tagpicker { display: flex; gap: 8px; flex-wrap: wrap; }
.tag-chip {
  font-size: 13px; font-weight: 600;
  padding: 7px 12px;
  color: var(--ink-soft);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
}
.tag-chip.is-on { color: var(--income); background: var(--income-soft); border-color: transparent; }

.quickadd__actions { display: flex; gap: 8px; }
.btn { padding: 14px 16px; border-radius: 14px; font-size: 16px; font-weight: 700; }
.btn--primary { flex: 1; background: var(--ink); color: var(--bg); }
.btn--primary:active { opacity: .85; }
.btn--danger { background: var(--accent-soft); color: var(--accent); }
.btn--ghost { border: 1px solid var(--line); color: var(--ink-soft); }
.btn--sm { padding: 10px 14px; font-size: 14px; }

.quickadd__voice { margin-top: 10px; font-size: 14px; color: var(--ink-soft); font-style: italic; }

/* ---- history ---------------------------------------------------------------- */
.history { display: flex; flex-direction: column; gap: 6px; }
.history__head { display: flex; align-items: center; justify-content: space-between; padding: 4px 2px; }
.history__title { font-size: 17px; font-weight: 800; }
.history__tools { display: flex; align-items: center; gap: 4px; }
.history__export { font-size: 13px; font-weight: 600; color: var(--ink-soft); padding: 6px 4px; }
.history__export:active { color: var(--accent); }

.searchbox {
  font-size: 15px;
  padding: 11px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.activefilter {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: var(--radius-pill);
  padding: 8px 14px;
  width: fit-content;
}

.day-header {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 16px 2px 6px;
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.tx-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center; gap: 12px;
  width: 100%; text-align: left;
  padding: 11px 4px;
  border-bottom: 1px solid var(--line);
}
.tx-row:active { background: var(--accent-soft); }
.tx-row__icon {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--bg); border: 1px solid var(--line);
  font-size: 18px;
}
.tx-row__body { min-width: 0; }
.tx-row__desc { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.tx-row__cat { font-size: 12px; color: var(--ink-soft); display: block; }
.tx-row__amounts { text-align: right; font-variant-numeric: tabular-nums; }
.tx-row__dop { font-size: 15px; font-weight: 700; color: var(--accent); }
.tx-row--income .tx-row__dop { color: var(--income); }
.tx-row__usd { font-size: 11px; color: var(--ink-soft); }

.history__empty { padding: 32px 8px; text-align: center; font-size: 14px; color: var(--ink-soft); }

/* ---- settings ------------------------------------------------------------------ */
.settings-list {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.settings-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; text-align: left;
  padding: 15px 16px;
  font-size: 15px; font-weight: 600;
  border-bottom: 1px solid var(--line);
}
.settings-row:last-child { border-bottom: none; }
.settings-row:active { background: var(--bg); }
.settings-row--toggle { cursor: pointer; }
.settings-row--danger { color: var(--accent); }
.settings-row__chev { color: var(--ink-soft); font-size: 18px; }
.settings-row__badge {
  font-size: 12px; font-weight: 700;
  color: var(--ink-soft);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 3px 10px;
}
.settings-row__sub { display: block; font-size: 12px; font-weight: 500; color: var(--ink-soft); }
.settings-foot { text-align: center; font-size: 12px; color: var(--ink-soft); padding-top: 4px; }

/* small inline delete/edit buttons inside settings rows */
.row-actions { display: flex; gap: 4px; }
.row-btn {
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: 10px;
  font-size: 15px;
  color: var(--ink-soft);
}
.row-btn:active { background: var(--accent-soft); color: var(--accent); }

/* inline add forms (categories, tags, lists) */
.inline-form {
  display: flex; gap: 8px; align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 10px;
}
.inline-form__icon {
  width: 56px; text-align: center;
  font-size: 18px;
  padding: 10px 6px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.inline-form__name {
  flex: 1; min-width: 0;
  font-size: 15px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
}

/* budgets */
.rangefield { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; font-size: 14px; color: var(--ink-soft); }
.rangefield input[type="range"] { accent-color: var(--accent); width: 100%; }

.budget-row { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.budget-row:last-child { border-bottom: none; }
.budget-row__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 15px; font-weight: 600; }
.budget-row__input {
  width: 120px; text-align: right;
  font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums;
  padding: 8px 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.budget-row__meter { height: 8px; border-radius: 4px; background: var(--bg); border: 1px solid var(--line); overflow: hidden; }
.budget-row__meterfill { height: 100%; background: var(--income); border-radius: 4px; transition: width .2s ease; }
.budget-row__meterfill.is-warn { background: #E9A13B; }
.budget-row__meterfill.is-over { background: var(--accent); }
.budget-row__sub { font-size: 12px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }

/* tags screen */
.tagcloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tagcloud .tag-chip { font-size: 14px; padding: 9px 14px; display: inline-flex; gap: 8px; align-items: center; }
.tag-chip__x { color: var(--ink-soft); font-weight: 700; }

/* recurring form */
.recur-form { display: flex; flex-direction: column; gap: 10px; }
.recur-form__row { display: flex; gap: 8px; }
.recur-form__row > * { flex: 1; min-width: 0; }

/* currency converter */
.conv-result {
  font-size: 28px; font-weight: 800;
  font-variant-numeric: tabular-nums;
  padding-top: 10px;
}

/* ---- toast ------------------------------------------------------------------- */
.toast {
  position: fixed; left: 50%;
  bottom: calc(var(--safe-bottom) + 20px);
  transform: translateX(-50%);
  max-width: min(420px, calc(100vw - 32px));
  background: var(--ink); color: var(--bg);
  font-size: 14px; font-weight: 600;
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow);
  z-index: 100;
  animation: toast-in .18s ease;
}
@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* =============================================================================
 * Dark MONAI dashboard pass
 * ========================================================================== */
:root {
  --bg: #111111;
  --surface: #1f1f1f;
  --surface-2: #262626;
  --surface-3: #343434;
  --line: rgba(255,255,255,.08);
  --ink: #f4f4f4;
  --ink-soft: #a6a6a6;
  --accent: #ff5a55;
  --accent-soft: rgba(255,90,85,.16);
  --income: #dfff6e;
  --income-soft: rgba(223,255,110,.16);
  --shadow: 0 16px 48px rgba(0,0,0,.35);
}

body { background: var(--bg); color: var(--ink); }
.app { max-width: 480px; min-height: 100dvh; background: var(--bg); }
.screen { gap: 22px; padding: calc(var(--safe-top) + 18px) 22px calc(var(--safe-bottom) + 118px); }
.header { padding: 4px 0 18px; }
.header__logo { background: var(--surface-2); color: var(--ink); border-radius: 14px; }
.header__title { color: var(--ink); letter-spacing: 0; }
.header__sub, .summary__label, .summary__usd, .summary__in, .hint { color: var(--ink-soft); }

.icon-btn {
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--ink); box-shadow: var(--shadow);
}

.summary {
  width: min(100%, 430px);
  background: transparent; border: 0; box-shadow: none; border-radius: 0; padding: 0;
}
.summary__toprow { display: block; }
.summary__label {
  font-size: 15px; font-weight: 700;
  text-transform: none; letter-spacing: 0;
  margin-left: 8px;
}
.summary__amount {
  display: flex; align-items: center; gap: 12px;
  margin-top: 0;
  max-width: 100%;
  font-size: clamp(58px, 14vw, 78px);
  letter-spacing: 0; line-height: .96;
  color: var(--ink);
  white-space: nowrap;
}
#todayDOP { min-width: 0; }
.summary__sign {
  display: grid; place-items: center;
  flex: 0 0 auto;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--income); color: #111;
  font-size: 28px; font-weight: 900; line-height: 1;
}
.summary__sign.is-negative { background: var(--accent); color: #fff; }
.summary__usd { margin: 4px 0 0 58px; font-size: 16px; font-weight: 700; }
.summary__month {
  display: flex; flex-direction: column; align-items: stretch; gap: 18px;
  border: 0; margin-top: 18px; padding: 0;
}
.summary__chips {
  display: inline-flex; align-self: flex-start; gap: 0;
  width: min(100%, 336px);
  max-width: 100%;
  padding: 5px; border: 1px solid var(--line);
  border-radius: 22px; background: rgba(255,255,255,.02);
}
.minichip {
  display: flex; flex: 1 1 0; flex-direction: column; justify-content: center; align-items: center; gap: 1px;
  min-width: 0;
  max-width: none;
  padding: 8px 14px;
  border-radius: 17px;
  font-size: 16px; line-height: 1.1;
  color: var(--ink); background: transparent;
  text-align: center;
}
.minichip span + span { font-size: 11px; color: var(--ink-soft); }
.minichip.is-active { background: var(--surface-3); color: var(--ink); }
.minichip--exp { color: var(--ink); }
.minichip--inc { color: var(--ink); }
.summary__filters { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.mini-select {
  max-width: none; min-height: 42px;
  padding: 9px 40px 9px 14px; border: 0; border-radius: 14px;
  appearance: none;
  background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg width='16' height='18' viewBox='0 0 16 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 7L8 3L12 7M4 11L8 15L12 11' stroke='%23f4f4f4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 16px 18px;
  color: var(--ink);
  font-size: 15px; font-weight: 800;
}

.chart { min-height: 365px; gap: 26px; padding: 28px 0 4px; }
.bar { flex-basis: 92px; height: 340px; gap: 10px; }
.bar__fill {
  border: 0; border-radius: 24px;
  background: var(--surface); color: var(--ink);
  font-size: 28px; padding-bottom: 34px; min-height: 92px;
}
.bar.is-active .bar__fill { background: var(--surface-3); outline: 1px solid rgba(255,255,255,.12); }
.bar__label { gap: 2px; font-size: 15px; line-height: 1.05; color: var(--ink); }
.bar__label span + span { font-size: 11px; color: var(--ink-soft); }
.bar__budget { color: var(--income); }
.bar.is-near-budget .bar__budget { color: #E9A13B; }
.bar.is-over-budget .bar__fill { outline: 2px solid var(--accent); }
.bar.is-over-budget .bar__budget { color: var(--accent); }

.quickadd--sheet {
  position: fixed; left: 50%; bottom: calc(var(--safe-bottom) + 16px); z-index: 25;
  width: min(440px, calc(100vw - 24px));
  max-height: min(78dvh, 690px);
  overflow-y: auto;
  transform: translateX(-50%);
  background: rgba(28,28,28,.98);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 24px 80px rgba(0,0,0,.62);
  padding: 16px;
}
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 24;
  background: rgba(0,0,0,.42);
  backdrop-filter: blur(2px);
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sheet-title { font-size: 22px; font-weight: 900; }

.quickadd__desc, .quickadd__amountwrap, .pillchip, .cat-chip, .searchbox,
.inline-form, .inline-form__icon, .inline-form__name, .card, .settings-list {
  background: var(--surface); border-color: var(--line); color: var(--ink);
}
.quickadd__desc::placeholder, .quickadd__amount::placeholder { color: var(--ink-soft); }
.quickadd__currency, .pillchip.is-on, .cat-chip[aria-checked="true"] {
  background: var(--surface-3); color: var(--ink);
}
.quickadd__type { background: var(--surface); border-color: var(--line); color: var(--accent); }
.btn--primary { background: var(--ink); color: var(--bg); }

.floating-actions {
  position: fixed; left: 50%; bottom: calc(var(--safe-bottom) + 26px); z-index: 18;
  width: min(360px, calc(100vw - 44px));
  transform: translateX(-50%);
  display: flex; align-items: flex-end; justify-content: space-between;
  pointer-events: none;
}
.fab-pill {
  pointer-events: auto;
  display: flex; align-items: center; gap: 6px;
  min-height: 62px; padding: 5px;
  border-radius: 34px;
  background: rgba(35,35,35,.86);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 12px 34px rgba(0,0,0,.42);
  backdrop-filter: blur(14px);
}
.fab {
  pointer-events: auto;
  display: grid; place-items: center;
  border-radius: 50%; color: var(--ink);
}
.fab--add {
  width: 52px; height: 52px;
  background: rgba(90,65,60,.72);
  border: 1px solid rgba(255,255,255,.12);
  font-size: 34px; font-weight: 300;
}
.fab--search {
  width: 52px; height: 52px;
  background: transparent;
  font-size: 28px;
}
.fab--mic {
  width: 74px; height: 74px;
  background: var(--accent);
  border: 1px solid rgba(255,255,255,.18);
  color: #fff;
  box-shadow: 0 12px 34px rgba(0,0,0,.42);
  backdrop-filter: blur(14px);
}
.sheet-open .floating-actions { display: none; }

.history { padding-bottom: 12px; }
.history__title { font-size: 28px; color: var(--ink); }
.history__export, .tx-row__cat, .tx-row__usd, .history__empty, .day-header { color: var(--ink-soft); }
.history__head { padding-right: 0; }
.search-panel {
  position: relative;
  display: flex; align-items: center;
}
.search-panel .searchbox {
  width: 100%;
  padding-right: 46px;
}
.search-clear {
  position: absolute; right: 8px; top: 50%;
  transform: translateY(-50%);
  display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 24px;
}
.tx-row { border-color: var(--line); }
.tx-row__icon { background: var(--surface); border-color: var(--line); border-radius: 16px; }

.settings-hero {
  position: relative;
  min-height: 130px;
  margin: calc(var(--safe-top) * -1) -22px 0;
  padding: calc(var(--safe-top) + 72px) 22px 20px;
  border-radius: 0 0 42px 42px;
  background: linear-gradient(135deg, #202020, #161616);
}
.settings-title { font-size: 38px; line-height: 1; font-weight: 900; letter-spacing: 0; }
.settings-close {
  position: absolute;
  right: 18px;
  top: calc(var(--safe-top) + 28px);
  font-size: 42px;
  font-weight: 200;
}
.settings-list {
  gap: 14px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}
.settings-row {
  display: grid;
  grid-template-columns: 66px 1fr auto;
  gap: 18px;
  min-height: 74px;
  padding: 0;
  border: 0;
  font-size: 21px;
  font-weight: 850;
}
.settings-row:active { background: transparent; }
.settings-row__icon {
  display: grid; place-items: center;
  width: 62px; height: 62px; border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  font-size: 28px;
}
.settings-row__body { align-self: center; min-width: 0; }
.settings-row__sub {
  display: block;
  margin-top: 2px;
  font-size: 15px;
  line-height: 1.25;
  color: var(--ink-soft);
}
.settings-row__badge {
  align-self: center;
  border: 0;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 15px;
  padding: 4px 12px;
}
.settings-section {
  margin: 28px 0 6px;
  color: var(--ink-soft);
  font-size: 17px;
  font-weight: 850;
}
.switch { align-self: center; width: 72px; height: 36px; background: var(--surface-2); }
.switch::after { width: 30px; height: 30px; }
.switch:checked { background: #28d657; }
.switch:checked::after { transform: translateX(36px); }
.settings-foot { color: var(--ink-soft); }

@media (max-height: 900px) {
  .screen { gap: 18px; }
  .chart {
    min-height: 270px;
    padding-top: 18px;
  }
  .bar { height: 246px; }
}

@media (max-width: 390px) {
  .screen { padding-inline: 18px; }
  .summary { width: 100%; }
  .summary__amount {
    gap: 10px;
    font-size: clamp(50px, 15vw, 64px);
  }
  .summary__sign {
    width: 34px; height: 34px;
    font-size: 25px;
  }
  .summary__usd {
    margin-left: 48px;
    font-size: 14px;
  }
  .summary__chips { width: 100%; }
  .minichip {
    flex: 1 1 0;
    min-width: 0;
    padding-inline: 12px;
    font-size: 15px;
  }
  .summary__filters { gap: 7px; }
  .mini-select { min-width: 0; max-width: calc(50vw - 38px); }
  .floating-actions { width: min(330px, calc(100vw - 36px)); }
  .fab--mic { width: 70px; height: 70px; }
}
