/* Penny — minimalist but cute. Warm cream, coral accent, pastel chips, springy motion. */

:root {
  --bg: #FAF6F0;
  --card: #FFFFFF;
  --ink: #2E2A33;
  --muted: #948B9E;
  --line: #F0EAE2;
  --coral: #FF6B5E;
  --coral-deep: #F4564A;
  --peach: #FFD9C7;
  --lilac: #E4DCFB;
  --mint: #D7F0E1;
  --butter: #FFF0BF;
  --radius: 22px;
  --shadow: 0 10px 30px -12px rgba(72, 48, 40, 0.18);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --nav-h: 84px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: "Nunito", ui-rounded, -apple-system, "SF Pro Rounded", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100dvh;
  max-width: 520px;
  margin: 0 auto;
  padding: max(env(safe-area-inset-top), 16px) 20px calc(var(--nav-h) + 24px);
  overscroll-behavior-y: none;
}

[hidden] { display: none !important; }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
input { font: inherit; color: inherit; }

/* ---------- header ---------- */
.app-header { display: flex; align-items: flex-start; justify-content: space-between; padding: 8px 2px 18px; }
.greeting { font-size: 24px; font-weight: 900; letter-spacing: -0.02em; }
.subgreeting { font-size: 14px; font-weight: 600; color: var(--muted); }
.sync-pill {
  display: flex; align-items: center; gap: 6px;
  background: var(--butter); border-radius: 999px; padding: 6px 12px;
  font-size: 12px; font-weight: 700; color: #8A6D1A;
}
.sync-dot { width: 7px; height: 7px; border-radius: 50%; background: #E4A11B; animation: pulse 1.2s ease infinite; }
@keyframes pulse { 50% { opacity: 0.35; transform: scale(0.8); } }

/* ---------- views ---------- */
.view { display: none; }
.view.active { display: block; animation: view-in 0.32s var(--spring); }
@keyframes view-in { from { opacity: 0; transform: translateY(10px); } }

/* ---------- hero ---------- */
.hero-card {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #FFE7D9 0%, #F3EBFF 100%);
  border-radius: 26px;
  padding: 26px 24px 24px;
  box-shadow: var(--shadow);
}
.hero-label { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: #A2708B; }
.hero-amount { font-size: 42px; font-weight: 900; letter-spacing: -0.03em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.hero-meta { font-size: 14px; font-weight: 700; color: #A2708B; margin-top: 4px; }
@keyframes floaty { 50% { transform: translateY(-8px); } }

/* ---------- sections & lists ---------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 2px 12px; }
.section-head h2 { font-size: 18px; font-weight: 900; letter-spacing: -0.01em; }
.link-btn { font-size: 14px; font-weight: 800; color: var(--coral); transition: transform 0.15s var(--spring); }
.link-btn:active { transform: scale(0.92); }

.expense-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.expense-row {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  background: var(--card); border-radius: var(--radius); padding: 14px 16px;
  box-shadow: 0 4px 14px -8px rgba(72, 48, 40, 0.12);
  transition: transform 0.15s var(--spring);
  animation: row-in 0.35s var(--spring) backwards;
}
.expense-row:active { transform: scale(0.975); }
@keyframes row-in { from { opacity: 0; transform: translateY(8px) scale(0.98); } }
.row-emoji {
  width: 44px; height: 44px; border-radius: 15px; flex: none;
  display: grid; place-items: center; font-size: 21px;
}
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 800; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-amount { flex: none; text-align: right; font-weight: 900; font-size: 15px; font-variant-numeric: tabular-nums; }
.row-amount > span, .row-amount > small { display: block; }
.row-amount > small { margin-top: 2px; color: var(--muted); font-size: 9px; font-weight: 750; white-space: nowrap; }
.income-row .row-amount > span { color: #2F7D55; }
.row-amount .unsynced { color: #E4A11B; font-size: 11px; display: block; text-align: right; }

.day-group { margin-bottom: 18px; }
.day-head { display: flex; justify-content: space-between; align-items: baseline; margin: 0 2px 8px; }
.day-title { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); }
.day-total { font-size: 13px; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- empty states ---------- */
.empty-state { text-align: center; padding: 44px 0 30px; }
.empty-emoji { font-size: 44px; margin-bottom: 10px; animation: floaty 4s ease-in-out infinite; }
.empty-state p { font-weight: 800; }
.empty-sub { color: var(--muted); font-weight: 600 !important; font-size: 14px; margin-top: 2px; }

/* ---------- bottom nav ---------- */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 520px; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-around;
  background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 20;
}
.nav-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 84px; opacity: 0.45; transition: opacity 0.2s, transform 0.2s var(--spring); }
.nav-btn.active { opacity: 1; }
.nav-btn:active { transform: scale(0.9); }
.nav-icon { font-size: 20px; }
.nav-text { font-size: 11.5px; font-weight: 800; }
.fab {
  width: 62px; height: 62px; border-radius: 22px; margin-top: -26px;
  background: linear-gradient(145deg, var(--coral), var(--coral-deep));
  color: #fff; display: grid; place-items: center;
  box-shadow: 0 12px 24px -8px rgba(244, 86, 74, 0.55);
  transition: transform 0.2s var(--spring), box-shadow 0.2s;
}
.fab:active { transform: scale(0.86) rotate(90deg); box-shadow: 0 6px 14px -6px rgba(244, 86, 74, 0.5); }

/* ---------- sheets ---------- */
.sheet-backdrop {
  position: fixed; inset: 0; background: rgba(46, 42, 51, 0.4); z-index: 30;
  animation: fade-in 0.25s ease;
}
@keyframes fade-in { from { opacity: 0; } }
.sheet {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0;
  width: 100%; max-width: 520px; max-height: 92dvh; overflow-y: auto;
  background: var(--bg); border-radius: 28px 28px 0 0;
  padding: 10px 22px calc(env(safe-area-inset-bottom) + 22px);
  z-index: 40;
  animation: sheet-up 0.38s var(--spring);
}
@keyframes sheet-up { from { transform: translate(-50%, 100%); } }
.sheet-handle { width: 42px; height: 5px; border-radius: 99px; background: #E3DBD1; margin: 6px auto 14px; }
.sheet-title { font-size: 21px; font-weight: 900; letter-spacing: -0.02em; margin-bottom: 16px; }

/* ---------- add form ---------- */
.snap-entry { margin-bottom: 16px; }
.snap-button {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: linear-gradient(135deg, #FFE7D9 0%, #FFF5D9 100%);
  border-radius: 18px; padding: 12px 15px;
  box-shadow: 0 5px 16px -10px rgba(72, 48, 40, 0.18);
  transition: transform 0.18s var(--spring), opacity 0.2s;
}
.snap-button:active { transform: scale(0.97); }
.snap-button:disabled { opacity: 0.55; }
.snap-icon {
  width: 42px; height: 42px; flex: none; display: grid; place-items: center;
  border-radius: 14px; background: rgba(255,255,255,0.72); font-size: 21px;
}
.snap-button b { display: block; font-size: 14.5px; font-weight: 900; }
.snap-button small { display: block; color: #9B7569; font-size: 12px; font-weight: 700; margin-top: 1px; }
.snap-status {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--card); border-radius: 18px; padding: 13px 15px; margin-top: 9px;
  box-shadow: 0 5px 16px -10px rgba(72, 48, 40, 0.16);
  animation: row-in 0.3s var(--spring);
}
.snap-spinner {
  width: 22px; height: 22px; flex: none; border-radius: 50%;
  border: 3px solid var(--peach); border-top-color: var(--coral);
  animation: snap-spin 0.8s linear infinite;
}
@keyframes snap-spin { to { transform: rotate(360deg); } }
.snap-status-copy { flex: 1; min-width: 180px; }
.snap-status-copy b { display: block; font-size: 14px; font-weight: 900; }
.snap-status-copy small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 700; margin-top: 1px; }
.snap-status-actions { display: flex; gap: 6px; width: 100%; }
.snap-status-actions .btn-ghost { padding: 9px 12px; font-size: 13px; background: var(--bg); }
.snap-manual { color: var(--coral-deep); }

.amount-card {
  background: var(--card); border-radius: var(--radius); padding: 18px; margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.amount-row { display: flex; align-items: center; gap: 12px; justify-content: center; }
.currency-btn {
  flex: none; display: flex; align-items: center; gap: 6px;
  background: var(--bg); border-radius: 999px; padding: 8px 13px;
  font-size: 14px; font-weight: 900; color: var(--ink);
  transition: transform 0.18s var(--spring);
}
.currency-btn:active { transform: scale(0.9); }
.conv-line {
  display: block; width: 100%; text-align: center; margin-top: 10px;
  font-size: 13.5px; font-weight: 800; color: var(--muted);
}
.conv-line .fx-flag { opacity: 0.9; }
.override-row {
  display: flex; align-items: center; gap: 10px; justify-content: space-between;
  margin-top: 10px; background: var(--bg); border-radius: 14px; padding: 10px 14px;
  font-size: 13px; font-weight: 800; color: var(--muted);
  animation: row-in 0.3s var(--spring);
}
.override-row input {
  width: 110px; border: 0; outline: 0; background: transparent; text-align: right;
  font-weight: 900; font-size: 16px; font-variant-numeric: tabular-nums; caret-color: var(--coral);
}
.amount-input {
  border: 0; outline: 0; background: transparent; width: 60%;
  font-size: 44px; font-weight: 900; letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
  caret-color: var(--coral);
}
.amount-input::placeholder { color: #E4DCD2; }

.field-label { font-size: 13px; font-weight: 800; color: var(--muted); margin-bottom: 8px; display: block; }
.field-label em { font-style: normal; font-weight: 600; opacity: 0.7; }

.chip-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip {
  display: flex; align-items: center; gap: 7px;
  border-radius: 999px; padding: 9px 14px 9px 10px;
  background: var(--card); border: 2px solid transparent;
  font-size: 14px; font-weight: 800;
  transition: transform 0.18s var(--spring), border-color 0.15s, background 0.15s;
}
.chip:active { transform: scale(0.9); }
.chip.selected { border-color: var(--ink); animation: chip-pop 0.3s var(--spring); }
@keyframes chip-pop { 40% { transform: scale(1.12); } }

.field { display: block; margin-bottom: 16px; }
.field-cols { display: grid; grid-template-columns: 1fr 1.4fr; gap: 12px; }
.field input {
  width: 100%; border: 0; outline: 0; background: var(--card);
  border-radius: 16px; padding: 13px 14px; font-weight: 700; font-size: 15px;
  box-shadow: 0 3px 10px -6px rgba(72, 48, 40, 0.12);
  transition: box-shadow 0.15s;
  -webkit-appearance: none; appearance: none; min-height: 48px;
}
.field input:focus { box-shadow: 0 0 0 2.5px var(--peach); }
.field input::placeholder { color: #CFC7BC; }

.btn-primary {
  width: 100%; padding: 16px; border-radius: 999px;
  background: linear-gradient(145deg, var(--coral), var(--coral-deep));
  color: #fff; font-weight: 900; font-size: 16.5px;
  box-shadow: 0 12px 24px -10px rgba(244, 86, 74, 0.55);
  transition: transform 0.18s var(--spring);
  margin-top: 6px;
}
.btn-primary:active { transform: scale(0.96); }
.btn-ghost { width: 100%; padding: 14px; border-radius: 999px; font-weight: 800; color: var(--muted); transition: transform 0.18s var(--spring); }
.btn-ghost:active { transform: scale(0.96); }
.btn-danger {
  width: 100%; padding: 15px; border-radius: 999px;
  background: #FFE3E0; color: #D33A2E; font-weight: 900;
  transition: transform 0.18s var(--spring);
}
.btn-danger:active { transform: scale(0.96); }

.shake { animation: shake 0.4s ease; }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }

/* ---------- confirm ---------- */
.confirm-card {
  background: var(--card); border-radius: 26px; padding: 26px 22px;
  text-align: center; box-shadow: var(--shadow); margin-bottom: 16px;
}
.confirm-emoji {
  width: 64px; height: 64px; border-radius: 22px; margin: 0 auto 12px;
  display: grid; place-items: center; font-size: 30px; background: var(--peach);
  animation: chip-pop 0.45s var(--spring);
}
.confirm-amount { font-size: 38px; font-weight: 900; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.confirm-category { font-size: 14px; font-weight: 800; color: var(--muted); margin-top: 2px; }
.confirm-details { list-style: none; margin-top: 18px; border-top: 1.5px dashed var(--line); padding-top: 6px; }
.confirm-details li { display: flex; justify-content: space-between; gap: 14px; padding: 9px 2px; font-size: 14.5px; }
.confirm-details span { color: var(--muted); font-weight: 700; flex: none; }
.confirm-details b { font-weight: 800; text-align: right; overflow-wrap: anywhere; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px; }

.duplicate-card {
  background: linear-gradient(135deg, #FFF0E2 0%, #F3EBFF 100%);
  border-radius: 24px; padding: 24px 20px; text-align: center;
  box-shadow: var(--shadow); margin-bottom: 12px;
}
.duplicate-emoji { font-size: 34px; margin-bottom: 6px; }
.duplicate-card h2 { font-size: 20px; font-weight: 900; }
.duplicate-card p { color: var(--muted); font-size: 14px; font-weight: 700; margin-top: 4px; }

/* ---------- row action sheet ---------- */
.sheet-mini { padding-bottom: calc(env(safe-area-inset-bottom) + 16px); }
.expense-detail { margin-bottom: 14px; }
.detail-head { display: flex; align-items: center; gap: 13px; margin-bottom: 10px; }
.detail-head > span:last-child { min-width: 0; }
.detail-head small { display: block; color: var(--muted); font-size: 13px; font-weight: 800; }
.detail-head b { display: block; font-size: 27px; font-weight: 900; letter-spacing: -0.02em; }
.detail-emoji { width: 52px; height: 52px; border-radius: 17px; display: grid; place-items: center; font-size: 24px; flex: none; }
.detail-fx { background: var(--card); border-radius: 14px; padding: 10px 12px; margin: 0 0 12px; color: var(--muted); font-size: 12.5px; font-weight: 800; }
.detail-list { margin: 0; background: var(--card); border-radius: 18px; padding: 4px 14px; }
.detail-list div { display: flex; justify-content: space-between; gap: 18px; padding: 11px 0; border-bottom: 1.5px dashed var(--line); }
.detail-list div:last-child { border-bottom: 0; }
.detail-list dt { color: var(--muted); font-size: 12.5px; font-weight: 700; }
.detail-list dd { margin: 0; text-align: right; font-size: 13px; font-weight: 800; overflow-wrap: anywhere; }
.receipt-view { margin-top: 14px; }
.receipt-view img { display: block; width: 100%; max-height: 46dvh; object-fit: contain; background: var(--card); border-radius: 18px; margin-top: 7px; transition: opacity 0.2s; }
.receipt-view.receipt-loading img { min-height: 120px; opacity: 0.2; }
#sheet-row .btn-primary, #sheet-row .btn-danger, #sheet-row .btn-ghost { margin-top: 8px; }

/* ---------- lock overlay ---------- */
.lock-overlay {
  position: fixed; inset: 0; z-index: 80;
  background: var(--bg);
  display: grid; place-items: center;
}
.lock-card {
  background: var(--card); border-radius: 26px; padding: 34px 28px;
  text-align: center; width: min(320px, 84vw); box-shadow: var(--shadow);
}
.lock-coin { font-size: 44px; animation: floaty 4s ease-in-out infinite; }
.lock-title { font-size: 20px; font-weight: 900; margin-top: 8px; }
.lock-sub { font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: 16px; }
.lock-card input {
  width: 100%; box-sizing: border-box; border: 0; outline: 0; background: var(--bg);
  border-radius: 14px; padding: 14px; font: inherit; font-weight: 700; text-align: center;
}
.lock-card input:focus { box-shadow: 0 0 0 2.5px var(--peach); }
.lock-card .btn-primary { margin-top: 12px; }
.lock-err { color: #D33A2E; font-size: 13px; font-weight: 700; min-height: 18px; margin-top: 10px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 18px);
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--ink); color: #FFF8F0; font-weight: 800; font-size: 14.5px;
  padding: 12px 20px; border-radius: 999px; z-index: 60;
  box-shadow: 0 10px 30px -10px rgba(46, 42, 51, 0.5);
  transition: transform 0.35s var(--spring), opacity 0.25s;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ---------- confetti ---------- */
.confetti-layer { position: fixed; inset: 0; pointer-events: none; z-index: 70; }
.confetti-bit {
  position: absolute; width: 9px; height: 9px; border-radius: 3px;
  animation: confetti-fly 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes confetti-fly {
  0% { transform: translate(0, 0) scale(1) rotate(0deg); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(0.4) rotate(var(--rot)); opacity: 0; }
}

/* ---------- pills (insights filters) ---------- */
.pill-row { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.pill {
  border-radius: 999px; padding: 8px 15px; background: var(--card);
  font-size: 13.5px; font-weight: 800; color: var(--muted);
  box-shadow: 0 3px 10px -6px rgba(72, 48, 40, 0.12);
  transition: transform 0.18s var(--spring), background 0.15s, color 0.15s;
}
.pill:active { transform: scale(0.92); }
.pill.selected { background: var(--ink); color: #FFF8F0; }

/* ---------- insights ---------- */
.insight-total-card {
  background: linear-gradient(135deg, #FFE7D9 0%, #F3EBFF 100%);
  border-radius: var(--radius); padding: 18px 20px; margin: 6px 0 18px;
  box-shadow: var(--shadow);
}
.insight-total { font-size: 30px; font-weight: 900; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.insight-meta { font-size: 13px; font-weight: 700; color: #A2708B; }
.insight-bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; animation: row-in 0.35s var(--spring) backwards; }
.insight-bar-emoji { width: 40px; height: 40px; border-radius: 14px; flex: none; display: grid; place-items: center; font-size: 19px; }
.insight-bar-main { flex: 1; min-width: 0; }
.insight-bar-top { display: flex; justify-content: space-between; font-size: 13.5px; font-weight: 800; margin-bottom: 5px; }
.insight-bar-top .amt { font-variant-numeric: tabular-nums; }
.insight-bar-track { display: block; height: 10px; border-radius: 99px; background: var(--card); overflow: hidden; }
.insight-bar-fill { display: block; height: 100%; border-radius: 99px; width: 0; transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1); }

/* ---------- settings ---------- */
.settings-card {
  background: var(--card); border-radius: var(--radius); padding: 4px 18px;
  box-shadow: var(--shadow);
}
.settings-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 16px 0; border-bottom: 1.5px dashed var(--line);
}
.settings-row:last-child { border-bottom: 0; }
.settings-row b { font-size: 15px; font-weight: 800; display: block; }
.settings-row small { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.settings-row select {
  border: 0; outline: 0; background: var(--bg); border-radius: 12px;
  padding: 10px 12px; font: inherit; font-weight: 800; color: var(--ink);
  -webkit-appearance: none; appearance: none; text-align: right;
}
.settings-row .settings-number {
  border: 0; outline: 0; background: var(--bg); border-radius: 12px;
  padding: 10px 12px; font: inherit; font-weight: 800; color: var(--ink);
  text-align: right; width: 100px;
}
.settings-link-row { width: 100%; text-align: left; }
.settings-link-row > span:first-child { flex: 1; min-width: 0; }
.settings-chevron { flex: none; color: var(--muted); font-size: 25px; font-weight: 700; line-height: 1; }
.switch { position: relative; flex: none; }
.switch input { position: absolute; opacity: 0; }
.switch i {
  display: block; width: 52px; height: 31px; border-radius: 99px;
  background: #E8E1D7; transition: background 0.25s; position: relative;
}
.switch i::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 25px; height: 25px;
  border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: transform 0.25s var(--spring);
}
.switch input:checked + i { background: var(--coral); }
.switch input:checked + i::after { transform: translateX(21px); }
.settings-note { font-size: 12.5px; font-weight: 600; color: var(--muted); margin: 14px 6px 0; line-height: 1.5; }
.made-with { text-align: center; font-size: 12.5px; font-weight: 700; color: var(--muted); margin-top: 34px; }

/* ---------- business toggle in add form ---------- */
.biz-block { margin-bottom: 18px; }
.biz-toggle { display: block; margin-bottom: 12px; }
.biz-toggle input { position: absolute; opacity: 0; }
.biz-chip {
  display: inline-flex; align-items: center; gap: 7px;
  border-radius: 999px; padding: 9px 15px;
  background: var(--card); border: 2px solid transparent;
  font-size: 14px; font-weight: 800;
  transition: transform 0.18s var(--spring), border-color 0.15s;
}
.biz-toggle input:checked + .biz-chip { border-color: var(--ink); animation: chip-pop 0.3s var(--spring); }
.biz-toggle:active .biz-chip { transform: scale(0.94); }

/* ---------- currency sheet ---------- */
.currency-search {
  width: 100%; border: 0; outline: 0; background: var(--card);
  border-radius: 16px; padding: 13px 16px; font: inherit; font-weight: 700;
  box-shadow: 0 3px 10px -6px rgba(72, 48, 40, 0.12); margin-bottom: 12px;
  -webkit-appearance: none; appearance: none;
}
.currency-search:focus { box-shadow: 0 0 0 2.5px var(--peach); }
.currency-list { max-height: 46dvh; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding-bottom: 8px; }
.currency-opt {
  display: flex; align-items: center; gap: 12px; text-align: left;
  background: var(--card); border-radius: 16px; padding: 12px 14px;
  font-size: 15px; font-weight: 800;
  transition: transform 0.15s var(--spring);
}
.currency-opt:active { transform: scale(0.97); }
.currency-opt .code { flex: none; }
.currency-opt .cname { flex: 1; font-weight: 600; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.currency-opt .sel { color: var(--coral); font-weight: 900; }
.currency-btn.locked { opacity: 0.62; cursor: not-allowed; }

/* ---------- trips ---------- */
.trips-head { margin-top: 32px; }
.trip-card {
  width: 100%; text-align: left;
  background: linear-gradient(135deg, #FFF0E2 0%, #EAF3FF 100%);
  border-radius: var(--radius); padding: 16px 18px; margin-bottom: 10px;
  box-shadow: 0 4px 14px -8px rgba(72, 48, 40, 0.14);
  transition: transform 0.15s var(--spring);
  animation: row-in 0.35s var(--spring) backwards;
}
.trip-card:active { transform: scale(0.98); }
.trip-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.trip-name { font-size: 16px; font-weight: 900; }
.trip-total { font-size: 16px; font-weight: 900; font-variant-numeric: tabular-nums; }
.trip-sub { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 700; color: #9B8B7E; margin-top: 3px; }
.trip-expenses { margin-top: 12px; }
.empty-state.slim { padding: 10px 0 4px; text-align: left; }
.trip-nudge {
  position: relative; display: flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, #FFF0E2 0%, #EAF3FF 100%);
  border-radius: 18px; padding: 13px 42px 13px 14px; box-shadow: 0 4px 14px -8px rgba(72, 48, 40, 0.14);
}
.trip-nudge > span { flex: 1; min-width: 0; }
.trip-nudge b, .trip-nudge small { display: block; }
.trip-nudge b { font-size: 14px; font-weight: 900; }
.trip-nudge small { color: var(--muted); font-size: 11.5px; font-weight: 700; margin-top: 2px; }
.trip-nudge-create { flex: none; color: var(--coral); font-size: 12.5px; font-weight: 900; }
.trip-nudge-dismiss { position: absolute; right: 10px; top: 7px; color: var(--muted); font-size: 22px; line-height: 1; }

/* ---------- category management (settings) ---------- */
.cat-row {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 12px 0; border-bottom: 1.5px dashed var(--line);
  transition: transform 0.15s var(--spring);
}
.cat-row:active { transform: scale(0.98); }
.cat-row:last-child { border-bottom: 0; }
.cat-row .row-emoji { width: 38px; height: 38px; font-size: 18px; border-radius: 13px; }
.cat-row-name { flex: 1; font-size: 15px; font-weight: 800; }
.cat-row-count { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.archived-toggle {
  display: block; margin: 14px 6px 8px; font-size: 13.5px; font-weight: 800; color: var(--muted);
}
.cat-action-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.cat-action-head .row-emoji { width: 44px; height: 44px; border-radius: 15px; display: grid; place-items: center; font-size: 21px; }
.cat-action-head b { font-size: 17px; font-weight: 900; display: block; }
.cat-action-head small { font-size: 13px; font-weight: 700; color: var(--muted); }
#cat-action-body .btn-primary, #cat-action-body .btn-danger, #cat-action-body .btn-ghost { margin-top: 8px; }
.reassign-note { font-size: 13.5px; font-weight: 700; color: var(--muted); margin: 4px 2px 10px; }
.field-cols.even { grid-template-columns: 1fr 1fr; }
.field-cols.emoji-name { grid-template-columns: 84px 1fr; }
#in-cat-emoji { text-align: center; font-size: 22px; }

/* ---------- shared / export bits ---------- */
.joint-hint { font-size: 12.5px; font-weight: 700; color: var(--muted); margin: 10px 4px 16px; }
.export-controls { display: flex; align-items: center; gap: 10px; flex: none; }
.export-controls select {
  border: 0; outline: 0; background: var(--bg); border-radius: 12px;
  padding: 8px 10px; font: inherit; font-weight: 800; color: var(--ink);
  -webkit-appearance: none; appearance: none;
}

/* ---------- payment methods ---------- */
.cat-row-name small { font-size: 11.5px; font-weight: 800; color: var(--muted); }
.acc-joint-row { border-bottom: 0 !important; padding: 6px 0 14px !important; }

/* ---------- confirm fx line ---------- */
.confirm-fx { font-size: 14px; font-weight: 800; color: var(--muted); margin-top: 2px; }

/* ---------- motion respect ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ========================================================================== */
/* Phase 2.5 redesign — Soft Alarm                                            */
/* ========================================================================== */

:root {
  --bg: #F3F2FA;
  --card: #FFFEFD;
  --ink: #292834;
  --muted: #706D7E;
  --line: #E8E5F0;
  --coral: #756BD7;
  --coral-deep: #655BC7;
  --peach: #FFE1AC;
  --lilac: #E8E5FF;
  --mint: #D9F1E8;
  --butter: #FFE1AC;
  --orange: #FFAD42;
  --orange-soft: #FFE1AC;
  --lavender: #AAA2F7;
  --lavender-deep: #6F64D2;
  --lavender-deep-tint: #5A4FC4;
  --lavender-soft: #E8E5FF;
  --muted-on-tint: #5C5868;
  --night: #302F34;
  --radius: 20px;
  --shadow: 0 12px 30px -18px rgba(64, 59, 88, .35);
  --spring: cubic-bezier(.22, 1, .36, 1);
  --nav-h: 86px;
}

html { background: #E9EAF4; }
body {
  background:
    radial-gradient(circle at 10% -5%, rgba(255, 225, 172, .55), transparent 24%),
    radial-gradient(circle at 100% 0, rgba(217, 241, 232, .65), transparent 25%),
    var(--bg);
  padding: max(env(safe-area-inset-top), 12px) 18px calc(var(--nav-h) + 28px);
}
button { min-width: 44px; min-height: 44px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline-color: rgba(111, 100, 210, .42); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* App shell */
.app-header { align-items: center; min-height: 52px; padding: 4px 2px 14px; }
.wordmark { color: var(--ink); text-decoration: none; font-size: 22px; font-weight: 900; letter-spacing: -.04em; }
.wordmark span { color: var(--orange); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.header-button {
  width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 15px; background: var(--card); box-shadow: var(--shadow);
}
.header-button svg, .quick-log-icon svg, .ledger-search svg, .select-field > svg, .nav-icon, .back-button svg {
  width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}
.header-button:disabled { cursor: wait; opacity: .58; }
.header-button.refreshing svg { animation: refresh-spin .8s linear infinite; }
@keyframes refresh-spin { to { transform: rotate(360deg); } }
.sync-pill { background: var(--orange-soft); color: #79561F; }
.sync-dot { background: var(--orange); }
.sync-banner {
  min-height: 44px; margin: -4px 0 14px; padding: 9px 12px; display: flex; align-items: center; gap: 9px;
  border-radius: 14px; color: #72511E; background: var(--orange-soft); font-size: 11px; font-weight: 800; line-height: 1.3;
}
.sync-banner-icon { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 9px; background: rgba(255,255,255,.65); }
.home-intro { margin: 4px 2px 16px; }
.greeting { font-size: 26px; letter-spacing: -.035em; }
.subgreeting { margin-top: 4px; color: var(--muted); font-size: 13px; }
.view-heading { margin: 5px 2px 18px; }
.view-heading h1 { margin: 1px 0 0; font-size: 28px; line-height: 1; letter-spacing: -.035em; }
.view-kicker { margin: 0; color: var(--muted); font-size: 11px; font-weight: 800; }
.settings-heading { display: flex; align-items: center; gap: 10px; }
.back-button { flex: none; border-radius: 14px; background: var(--card); color: var(--lavender-deep); font-size: 20px; box-shadow: var(--shadow); }

/* Home */
.hero-card {
  min-height: 168px; padding: 22px 20px;
  background: linear-gradient(140deg, #E8E5FF 0%, #DCD9FF 100%);
  border-radius: 28px; box-shadow: 0 16px 32px -22px rgba(71, 62, 151, .55);
}
.hero-label { color: #696390; font-size: 11px; letter-spacing: .05em; text-transform: none; }
.hero-amount { position: relative; z-index: 2; font-size: 38px; }
.hero-meta { position: relative; z-index: 2; color: #696390; font-size: 12px; }
.hero-progress { position: relative; z-index: 2; margin: 13px 74px 0 0; }
.hero-progress .progress { width: 100%; height: 8px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.72); }
.hero-progress .progress span { display: block; height: 100%; border-radius: inherit; background: var(--lavender-deep); transition: width .4s var(--spring); }
.hero-progress.over .progress span { background: var(--coral-deep); }
.hero-progress .progress-copy { margin: 7px 0 0; color: #5F587F; font-size: 10px; font-weight: 850; }
.coin {
  position: absolute; right: 18px; bottom: 18px; z-index: 1;
  width: 56px; height: 56px; border: 4px solid #ED9329; border-radius: 50%;
  background: var(--orange); box-shadow: inset -6px -7px 0 rgba(218,120,22,.14);
}
.coin::before, .coin::after {
  content: ""; position: absolute; top: 21px; width: 4px; height: 6px;
  border-radius: 50%; background: var(--night);
}
.coin::before { left: 14px; } .coin::after { right: 14px; }
.coin-smile {
  position: absolute; left: 50%; top: 31px; width: 15px; height: 7px;
  translate: -50% 0; border-bottom: 2.5px solid var(--night); border-radius: 0 0 12px 12px;
}
.glance-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.glance { min-height: 78px; padding: 13px 14px; border-radius: 20px; }
.glance.orange { background: var(--orange-soft); } .glance.mint { background: var(--mint); }
.glance small { display: block; color: #6C6470; font-size: 10px; font-weight: 800; }
.glance b { display: block; margin: 5px 0 1px; font-size: 18px; font-weight: 950; }
.quick-head { margin-top: 20px; }
.quick-log-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#quick-income { grid-column: 1 / -1; }
.cash-flow-card {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin: 10px 0 16px; padding: 14px; border-radius: 20px; background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.cash-flow-card span { min-width: 0; display: grid; gap: 4px; }
.cash-flow-card small { color: var(--ink-muted); font-size: .74rem; }
.cash-flow-card b { font-size: .92rem; overflow-wrap: anywhere; }
.quick-log-card {
  min-height: 82px; padding: 12px; display: flex; align-items: center; gap: 10px;
  border-radius: 19px; background: var(--card); text-align: left; box-shadow: var(--shadow);
}
.quick-log-card:active { transform: scale(.975); }
.quick-log-icon { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 13px; }
.quick-log-icon.lavender { color: var(--lavender-deep); background: var(--lavender-soft); }
.quick-log-icon.orange { color: #98601A; background: var(--orange-soft); }
.quick-log-icon svg { width: 18px; height: 18px; }
.quick-log-card b, .quick-log-card small { display: block; }
.quick-log-card b { font-size: 13px; font-weight: 900; }
.quick-log-card small { margin-top: 2px; color: var(--muted); font-size: 10px; font-weight: 700; line-height: 1.25; }
.section-head { margin: 23px 2px 10px; }
.section-head h2 { font-size: 17px; }
.link-btn { color: var(--lavender-deep); font-size: 13px; }

/* Transaction rows and Ledger */
.expense-list { gap: 8px; }
.expense-row { min-height: 66px; padding: 11px 12px; gap: 11px; border-radius: 18px; box-shadow: var(--shadow); }
.row-emoji { width: 40px; height: 40px; border-radius: 13px; font-size: 19px; }
.row-title { font-size: 14px; font-weight: 900; }
.row-sub { margin-top: 2px; font-size: 11px; font-weight: 650; }
.row-amount { font-size: 13px; }
.day-group { margin-bottom: 17px; }
.day-head { margin-bottom: 7px; }
.day-title { color: #686476; font-size: 11px; letter-spacing: .04em; text-transform: none; }
.day-total { color: #686476; font-size: 11px; }
.ledger-search {
  min-height: 48px; display: flex; align-items: center; gap: 9px;
  padding: 0 13px; border-radius: 16px; background: var(--card); box-shadow: var(--shadow);
}
.ledger-search svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
.ledger-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 13px; font-weight: 700; }
.ledger-search input::placeholder { color: #A29EAC; }
.ledger-filters { display: flex; gap: 7px; margin: 9px 0 15px; overflow-x: auto; scrollbar-width: none; }
.ledger-filters::-webkit-scrollbar { display: none; }
.ledger-filter { min-width: 44px; min-height: 44px; flex: none; padding: 8px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--muted); font-size: 11px; font-weight: 850; }
.ledger-filter.selected { border-color: var(--lavender); color: #5248B5; background: var(--lavender-soft); }

/* Bottom navigation */
.bottom-nav { height: var(--nav-h); padding: 8px 20px env(safe-area-inset-bottom); justify-content: space-between; background: rgba(255,254,253,.96); border-color: var(--line); }
/* Two equal-weight groups flank the FAB so it sits dead-centre; each group
   spreads its tabs evenly across its half. */
.nav-group { flex: 1; display: flex; align-items: center; justify-content: space-evenly; }
.nav-btn { width: 64px; min-height: 54px; gap: 3px; color: #8C8997; opacity: 1; }
.nav-btn.active { color: var(--lavender-deep); }
.nav-icon { width: 21px; height: 21px; }
.nav-text { font-size: 10px; }
.fab { width: 60px; min-width: 60px; height: 60px; margin-top: -30px; border-radius: 20px; background: var(--night); box-shadow: 0 13px 24px -9px rgba(48,47,52,.5); }
.fab:active { transform: scale(.9); }
body[data-view="settings"] .nav-btn,
body[data-view="categories"] .nav-btn,
body[data-view="category-detail"] .nav-btn,
body[data-view="payment-methods"] .nav-btn { opacity: .45; }

/* Optional Accounts tab */
.net-worth-card {
  min-height: 132px; padding: 22px; display: flex; align-items: center; gap: 16px;
  border-radius: 26px; color: white; background: var(--night); box-shadow: var(--shadow);
}
.net-worth-icon {
  width: 48px; height: 48px; flex: none; display: grid; place-items: center;
  border-radius: 16px; color: var(--lavender); background: #49484E;
}
.net-worth-icon svg { width: 25px; height: 25px; }
.net-worth-card > span:last-child { min-width: 0; }
.net-worth-card small, .net-worth-card strong, .net-worth-card em { display: block; }
.net-worth-card small { color: #D1CED6; font-size: 10px; font-weight: 850; text-transform: uppercase; letter-spacing: .08em; }
.net-worth-card strong { margin-top: 4px; font-size: 30px; font-weight: 950; font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.net-worth-card em { margin-top: 5px; color: #D1CED6; font-size: 11px; font-style: normal; font-weight: 700; line-height: 1.35; }
.account-balance-list { display: grid; gap: 9px; }
.account-group-head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 12px 4px 1px; color: var(--ink-muted); font-size: .82rem;
}
.account-group-head b { color: var(--ink); font-size: .92rem; }
.account-balance-row {
  width: 100%; min-height: 70px; padding: 11px 12px; display: flex; align-items: center; gap: 11px;
  border-radius: 19px; background: var(--card); text-align: left; box-shadow: var(--shadow);
}
.account-balance-icon {
  width: 42px; height: 42px; flex: none; display: grid; place-items: center;
  border-radius: 14px; background: var(--lavender-soft); font-size: 19px;
}
.account-balance-copy { flex: 1; min-width: 0; }
.account-balance-copy b, .account-balance-copy small,
.account-balance-amount b, .account-balance-amount small { display: block; }
.account-balance-copy b { overflow: hidden; font-size: 14px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.account-balance-copy small { margin-top: 2px; color: var(--muted); font-size: 10px; font-weight: 700; }
.account-balance-amount { flex: none; max-width: 42%; text-align: right; }
.account-balance-amount b { font-size: 13px; font-weight: 950; font-variant-numeric: tabular-nums; }
.account-balance-amount small { margin-top: 2px; color: var(--muted); font-size: 9px; font-weight: 700; }
.account-actions { margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.account-actions .quick-log-card { min-width: 0; }
.account-actions .quick-log-icon { font-size: 18px; font-weight: 950; }
.account-activity-list { display: grid; gap: 8px; }
.account-activity-row {
  min-height: 62px; padding: 10px 12px; display: flex; align-items: center; gap: 10px;
  border-radius: 18px; background: var(--card); box-shadow: var(--shadow);
}
.account-activity-icon {
  width: 38px; height: 38px; flex: none; display: grid; place-items: center;
  border-radius: 13px; color: var(--lavender-deep); background: var(--lavender-soft); font-weight: 950;
}
.account-activity-copy { min-width: 0; flex: 1; }
.account-activity-copy b, .account-activity-copy small { display: block; }
.account-activity-copy b { overflow: hidden; font-size: 12px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.account-activity-copy small { margin-top: 2px; overflow: hidden; color: var(--muted); font-size: 9px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.account-activity-amount { flex: none; font-size: 11px; font-weight: 950; font-variant-numeric: tabular-nums; }
.account-activity-amount.negative { color: var(--coral-deep); }
.balance-before {
  margin: 2px 0 14px; padding: 14px 16px; border-radius: 18px; background: var(--lavender-soft);
}
.balance-before small, .balance-before b { display: block; }
.balance-before small { color: var(--muted); font-size: 10px; font-weight: 800; }
.balance-before b { margin-top: 3px; font-size: 22px; font-weight: 950; font-variant-numeric: tabular-nums; }
.accounts-optional-note { margin-top: 22px; }
.account-create-options { margin-top: 14px; }

/* Sheets and add flow */
.sheet-backdrop { background: rgba(38,36,47,.52); }
.sheet { max-height: 94dvh; padding: 9px 19px calc(env(safe-area-inset-bottom) + 20px); border-radius: 28px 28px 0 0; background: var(--bg); }
.sheet-title { margin-bottom: 13px; font-size: 22px; }
.sheet-handle { background: #D7D4DF; }
.entry-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 12px; padding: 4px; border-radius: 15px; background: #E4E2EC; }
.entry-method { min-height: 44px; border-radius: 12px; color: var(--muted); font-size: 12px; font-weight: 900; }
.entry-method.selected { color: var(--ink); background: var(--card); box-shadow: 0 4px 12px rgba(64,59,88,.08); }
.snap-entry { margin-bottom: 12px; }
.snap-button { border-radius: 18px; background: var(--orange-soft); }
.snap-icon { color: #98601A; background: rgba(255,255,255,.68); }
.amount-card { padding: 18px; border-radius: 24px; color: white; background: var(--night); box-shadow: var(--shadow); }
.amount-input { color: white; caret-color: var(--orange); }
.amount-input::placeholder { color: #77747D; }
.currency-btn { color: white; background: #49484E; }
.conv-line, .override-row { color: #D1CED6; }
.override-row { background: #49484E; }
.override-row input { color: white; }
.field-label { margin: 13px 2px 7px; color: #676475; font-size: 11px; font-weight: 900; }
.field input, .currency-search { min-height: 50px; padding: 12px 13px; border-radius: 15px; background: var(--card); box-shadow: var(--shadow); }
.field select {
  width: 100%; min-height: 50px; padding: 12px 13px; border: 0; outline: 0;
  border-radius: 15px; background: var(--card); box-shadow: var(--shadow);
  font: inherit; font-weight: 800; color: var(--ink);
}
.select-field {
  width: 100%; min-height: 60px; padding: 9px 11px; display: flex; align-items: center; gap: 10px;
  border-radius: 17px; background: var(--card); box-shadow: var(--shadow); text-align: left;
}
.select-field-icon { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 13px; background: var(--lavender-soft); font-size: 18px; }
.select-field > span:nth-child(2) { flex: 1; min-width: 0; }
.select-field small, .select-field b { display: block; }
.select-field small { color: var(--muted); font-size: 9px; font-weight: 800; }
.select-field b { margin-top: 2px; overflow: hidden; font-size: 12px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.select-field > svg { width: 18px; height: 18px; color: var(--muted); }
.confidence-badge {
  flex: none; padding: 5px 9px; border-radius: 9px; font-size: 10px; font-weight: 950;
  color: #8A5717; background: var(--orange-soft);
}
.chip-grid { gap: 8px; margin-bottom: 14px; }
.chip { min-height: 44px; border-radius: 14px; padding: 8px 11px; background: var(--card); font-size: 12px; box-shadow: 0 5px 14px rgba(64,59,88,.05); }
.chip.selected { border-color: var(--lavender-deep); color: #5248B5; background: var(--lavender-soft); }
.biz-chip { min-height: 44px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow); }
.biz-toggle input:checked + .biz-chip { border-color: var(--lavender-deep); background: var(--lavender-soft); }
.more-options-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.more-options-chips .biz-toggle { display: inline-flex; margin: 0; }
.more-options-detail { margin-top: 12px; }
.btn-primary { min-height: 52px; border-radius: 17px; background: var(--lavender); color: #282638; box-shadow: 0 12px 22px -10px rgba(117,107,215,.5); }
.btn-ghost { min-height: 48px; border-radius: 16px; }
.btn-danger { min-height: 50px; border-radius: 16px; }

/* Category picker */
.picker-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.picker-heading .sheet-title { margin-top: 2px; }
.text-button { min-width: 44px; color: var(--lavender-deep); font-size: 12px; font-weight: 900; }
.category-search { margin-bottom: 12px; }
.category-picker-list { max-height: 61dvh; overflow-y: auto; display: grid; gap: 9px; padding-bottom: 12px; scrollbar-width: none; }
.category-picker-list::-webkit-scrollbar { display: none; }
.category-picker-group { padding: 7px; border-radius: 18px; background: var(--card); box-shadow: var(--shadow); }
.category-group-title { padding: 5px 7px 7px; color: var(--muted); font-size: 10px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.category-choice { width: 100%; min-height: 52px; margin: 2px 0; padding: 7px 8px; display: flex; align-items: center; gap: 10px; border: 1px solid transparent; border-radius: 14px; background: #F7F6FB; text-align: left; box-shadow: none; }
.category-choice.selected { border-color: var(--lavender); background: var(--lavender-soft); }
.category-choice-icon { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 11px; }
.category-choice > span:last-child { min-width: 0; }
.category-choice b, .category-choice small { display: block; }
.category-choice b { font-size: 12px; font-weight: 900; }
.category-choice small { margin-top: 1px; color: var(--muted); font-size: 9px; font-weight: 750; }

/* Insights, trips and settings */
.pill-row { gap: 7px; margin-bottom: 9px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.pill { min-width: 44px; min-height: 44px; flex: none; padding: 8px 12px; border-radius: 14px; box-shadow: var(--shadow); }
.pill.selected { color: var(--ink); background: var(--lavender-soft); box-shadow: inset 0 0 0 1px var(--lavender); }
.insight-total-card { margin-top: 12px; padding: 18px; border-radius: 23px; background: linear-gradient(140deg, var(--lavender-soft), #DCD9FF); }
.insight-meta { color: #696390; }
.insight-bar-row { padding: 10px 11px; margin-bottom: 8px; border-radius: 17px; background: var(--card); box-shadow: var(--shadow); }
.insight-bar-track { height: 7px; background: #EFEAF5; }
.chart-card { margin-top: 11px; padding: 16px; border-radius: 23px; background: var(--card); box-shadow: var(--shadow); }
.chart-head { display: flex; align-items: flex-start; justify-content: space-between; }
.chart-head small { color: var(--muted); font-size: 9px; font-weight: 800; }
.chart-head strong { display: block; margin-top: 3px; font-size: 23px; font-weight: 950; }
.trend { padding: 6px 8px; border-radius: 9px; color: #2F715C; background: var(--mint); font-size: 9px; font-weight: 950; }
.trend.up { color: #8A5717; background: var(--orange-soft); }
.chart { position: relative; height: 110px; margin-top: 16px; border-bottom: 1px solid var(--line); }
.chart svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.chart-labels { display: flex; justify-content: space-between; margin-top: 7px; color: var(--muted); font-size: 8px; font-weight: 800; }
.insight-note { margin-top: 11px; padding: 13px; display: flex; align-items: center; gap: 10px; border-radius: 18px; background: var(--orange-soft); }
.insight-note-mark { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 12px; font-size: 15px; background: rgba(255,255,255,.68); }
.insight-note b { display: block; font-size: 11px; font-weight: 950; }
.insight-note small { display: block; margin-top: 2px; color: #776044; font-size: 9px; font-weight: 720; line-height: 1.35; }
.trip-card { border-radius: 20px; background: linear-gradient(135deg, var(--orange-soft), var(--lavender-soft)); box-shadow: var(--shadow); }
.trip-nudge { background: linear-gradient(135deg, var(--orange-soft), var(--lavender-soft)); }
.settings-card { padding: 4px 15px; border-radius: 20px; box-shadow: var(--shadow); }
.settings-row { min-height: 62px; border-bottom: 1px solid var(--line); }
.settings-row select, .export-controls select, .settings-row .settings-number { min-height: 44px; background: var(--bg); }
.cat-row { min-height: 58px; border-bottom: 1px solid var(--line); }
.compact-list { overflow: hidden; }
.compact-list .cat-row { padding: 9px 0; }
.category-nav-row .cat-row-count { max-width: 112px; text-align: right; }
.cat-row-static { cursor: default; }
.cat-row-name small { display: block; margin-top: 1px; }
.settings-note-top { margin: -5px 4px 4px; }
.category-detail-summary { margin-bottom: 4px; }
.category-summary-card {
  width: 100%; min-height: 72px; padding: 12px; display: flex; align-items: center; gap: 12px;
  border-radius: 20px; background: var(--card); text-align: left; box-shadow: var(--shadow);
}
.category-summary-card > span:nth-child(2) { flex: 1; min-width: 0; }
.category-summary-card b, .category-summary-card small { display: block; }
.category-summary-card b { font-size: 15px; font-weight: 900; }
.category-summary-card small { margin-top: 2px; color: var(--muted); font-size: 11px; font-weight: 700; }

/* Confirmation and detail */
.confirm-card { padding: 22px 18px; border-radius: 24px; }
.confirm-emoji { background: var(--orange-soft); }
.confirm-details { border-color: var(--line); }
.confirm-details li { border-bottom: 1px solid var(--line); }
.confirm-details li:last-child { border-bottom: 0; }
.detail-head { padding: 14px; border-radius: 20px; background: var(--lavender-soft); }
.detail-list { border-radius: 18px; box-shadow: var(--shadow); }
.detail-list div { border-color: var(--line); }
.receipt-view img { border: 1px solid var(--line); box-shadow: var(--shadow); }

@media (max-width: 360px) {
  body { padding-left: 14px; padding-right: 14px; }
  .quick-log-grid { grid-template-columns: 1fr; }
  .nav-btn { width: 58px; }
  .field-cols { grid-template-columns: 1fr; gap: 0; }
}

/* ---------- household (Phase 3B/C) — Soft Alarm ---------- */
.balance-panel {
  padding: 16px; border-radius: 18px; margin-bottom: 12px;
  background: linear-gradient(135deg, var(--lavender-soft), var(--orange-soft));
}
.balance-panel small { display: block; color: var(--muted-on-tint); font-size: 11px; font-weight: 800; }
.balance-panel b { display: block; font-size: 20px; font-weight: 950; margin: 3px 0 1px; }
.balance-panel span { color: var(--muted-on-tint); font-size: 12px; font-weight: 700; }
.household-members { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.member-pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px;
  border-radius: 999px; background: var(--lavender-soft); color: var(--lavender-deep-tint);
  font-size: 12px; font-weight: 800;
}
.member-remove { min-width: 0; min-height: 0; padding: 0 4px; color: inherit; font-size: 15px; line-height: 1; background: transparent; }
.household-actions { display: flex; gap: 9px; margin-bottom: 10px; }
.household-actions .btn-primary, .household-actions .btn-ghost { flex: 1; }
.household-empty { text-align: center; padding: 12px 4px; }
.household-empty b { display: block; margin-top: 6px; font-size: 15px; font-weight: 900; }
.household-empty p { color: var(--muted); font-size: 12.5px; font-weight: 700; margin: 4px 0 14px; }
.household-leave { display: block; margin: 6px auto 2px; color: #D33A2E; font-size: 12.5px; font-weight: 800; }
.legacy-card { padding: 12px 13px; border-radius: 15px; background: var(--orange-soft); margin-bottom: 11px; }
.legacy-card b { display: block; font-size: 12.5px; font-weight: 900; }
.legacy-card small { display: block; color: var(--muted-on-tint); font-size: 11px; font-weight: 700; margin: 2px 0 6px; }
.settlement-list { display: grid; gap: 7px; margin-top: 4px; }
.settlement-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 11px; border-radius: 13px; background: var(--bg); }
.settlement-row b { display: block; font-size: 11.5px; font-weight: 850; }
.settlement-row small { display: block; color: var(--muted); font-size: 10px; font-weight: 700; margin-top: 2px; }
.settlement-delete { min-width: 0; min-height: 0; padding: 4px 8px; border-radius: 9px; background: var(--card); color: var(--muted); font-size: 14px; }
.identity-row { display: flex; align-items: center; gap: 11px; }
.identity-avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; background: var(--lavender-soft); color: var(--lavender-deep); object-fit: cover; }
.identity-copy { flex: 1; min-width: 0; }
.identity-copy b { display: block; font-size: 14px; font-weight: 900; }
.identity-copy small { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.invite-code {
  display: block; width: 100%; margin: 8px 0 10px; padding: 16px; border-radius: 16px;
  background: var(--lavender-soft); color: var(--lavender-deep);
  font-size: 22px; font-weight: 950; letter-spacing: .16em; text-align: center;
}
.invite-link {
  margin: 0 0 14px; color: #5C5868; font-size: 11px; font-weight: 700;
  text-align: center; word-break: break-all;
}

/* ---------- UX efficiency pass ---------- */

/* iOS zooms the viewport when a focused text control is smaller than 16px. */
.field input,
.field select,
.ledger-search input,
.currency-search,
.settings-row input,
.settings-row select,
.export-controls select {
  font-size: 16px;
}

.glance {
  width: 100%;
  color: inherit;
  text-align: left;
}
.glance:active { opacity: .78; }

/* Transactions are one continuous list; cards are reserved for summaries. */
#recent-list,
#history-groups .expense-list {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
}
#recent-list .expense-row,
#history-groups .expense-row {
  min-height: 58px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
#recent-list li:last-child .expense-row,
#history-groups li:last-child .expense-row { border-bottom: 0; }
#recent-list .row-emoji,
#history-groups .row-emoji {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  font-size: 18px;
}
#history-groups .day-group { margin-bottom: 14px; }

/* Grouped accounts use headers and dividers instead of separate bubbles. */
.account-balance-list { gap: 0; }
.account-group-head {
  margin-top: 8px;
  padding: 13px 4px 7px;
}
.account-balance-row {
  min-height: 60px;
  padding: 9px 4px;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.account-balance-row + .account-group-head { margin-top: 12px; }
.account-balance-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  font-size: 17px;
}
.account-balance-copy small,
.account-balance-amount small { font-size: 11px; }

.settings-first-head { margin-top: 10px; }
.account-action { min-height: 58px; }
.account-action.danger {
  margin-top: 5px;
  color: #B8352C;
  border-top: 1px solid var(--line);
}
.account-action.danger small { color: #9C625D; }

body[data-view="bills"] .nav-btn { opacity: .45; }

.sheet-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.sheet-heading .sheet-title { margin: 0; }
.sheet-close {
  width: 44px;
  min-width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--ink-muted);
  background: var(--card);
  font-size: 25px;
  line-height: 1;
  box-shadow: var(--shadow-soft);
}
.sheet-close:active { opacity: .72; }

.more-options-disclosure {
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.52);
}
.more-options-disclosure summary {
  min-height: 50px;
  padding: 11px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
  font-size: 13px;
  font-weight: 900;
}
.more-options-disclosure summary::-webkit-details-marker { display: none; }
.more-options-disclosure summary::after {
  content: "⌄";
  flex: none;
  color: var(--lavender-deep);
  font-size: 18px;
  transition: transform .2s var(--spring);
}
.more-options-disclosure[open] summary::after { transform: rotate(180deg); }
.more-options-disclosure summary small {
  flex: 1;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-align: right;
}
.more-options-content {
  padding: 0 12px 12px;
  border-top: 1px solid var(--line);
}

.form-error {
  margin: -4px 3px 10px;
  color: #B8352C;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}
[aria-invalid="true"] { box-shadow: 0 0 0 2px #D85A50 !important; }

.add-submit-bar {
  position: sticky;
  bottom: -20px;
  z-index: 3;
  margin: 4px -2px -20px;
  padding: 10px 2px calc(env(safe-area-inset-bottom) + 12px);
  background: linear-gradient(to bottom, rgba(243,242,250,0), var(--bg) 22%);
}
.add-submit-bar .btn-primary { margin-top: 8px; }

/* ---------- UX pass B: transaction composer ---------- */

.direction-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
  padding: 4px;
  border-radius: 15px;
  background: #E4E2EC;
}
.direction-tab {
  flex: 1;
  min-height: 40px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.direction-tab.selected { color: var(--ink); background: var(--card); box-shadow: 0 4px 12px rgba(64,59,88,.08); }

/* Scalable category picker: recents, parent rows, drill-down drawers.
   Fixed height so switching Personal/Business never resizes the sheet. */
#sheet-category .category-picker-list { height: 58dvh; max-height: 58dvh; }
.category-parent-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 54px;
  padding: 8px 10px;
  border-radius: 15px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
  text-align: left;
}
.category-parent-row > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.category-parent-row b { font-size: 14px; font-weight: 800; }
.category-parent-row small { color: var(--muted); font-size: 11px; font-weight: 700; }
.category-parent-row svg { width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 2.4; transition: transform .18s var(--spring); }
.category-parent-row[aria-expanded="true"] svg { transform: rotate(90deg); }
.category-drawer { display: grid; gap: 7px; padding: 7px 0 3px 14px; }
.category-recents .category-choice { min-height: 46px; }

/* "My share" primary with the joint picture kept in view. */
.share-breakdown { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; font-weight: 700; }
.share-breakdown-warn { color: #B8352C; }

.bill-hint { margin: 2px 3px 10px; color: var(--muted); font-size: 12px; font-weight: 700; line-height: 1.4; }

/* ---------- UX pass C: information architecture ---------- */
body[data-view="accounts"] .nav-btn,
body[data-view="budgets"] .nav-btn,
body[data-view="household"] .nav-btn { opacity: .45; }
body[data-view="accounts"] .nav-btn[data-view="more"],
body[data-view="budgets"] .nav-btn[data-view="more"],
body[data-view="household"] .nav-btn[data-view="more"] { opacity: 1; color: var(--lavender-deep); }

/* Budgets management screen */
.budget-progress-card {
  margin: 0 0 18px !important;
  padding: 16px 17px;
  border-radius: 21px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
}
.budget-spent { margin: 4px 0 10px; font-size: 32px; font-weight: 900; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.budget-progress-card .progress { background: #E7E4F0; }
.accounts-toggle-card { margin-top: 18px; }

/* Page freeze while any sheet is open (see openSheet/closeSheets). */
body.sheet-open { position: fixed; left: 0; right: 0; width: 100%; overflow: hidden; }

/* Compact household card on Home */
.home-household {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 17px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
  text-align: left;
}
.home-household-icon { font-size: 20px; }
.home-household-copy { flex: 1; display: flex; flex-direction: column; }
.home-household-copy b { font-size: 14px; font-weight: 800; }
.home-household-copy small { color: var(--muted); font-size: 12px; font-weight: 700; }

/* Category budget rows */
.category-budget-row {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 58px;
  padding: 9px 4px;
  border-bottom: 1px solid var(--line);
}
.category-budget-row:last-child { border-bottom: 0; }
.category-budget-copy { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.category-budget-copy b { font-size: 14px; font-weight: 800; }
.category-budget-copy small { color: var(--muted); font-size: 11px; font-weight: 700; }
.category-budget-track { width: 100%; max-width: 150px; height: 5px; border-radius: 99px; background: #E7E4F0; overflow: hidden; }
.category-budget-track span { display: block; height: 100%; border-radius: inherit; background: var(--lavender-deep); transition: width .3s var(--spring); }
.category-budget-track span.over { background: var(--coral-deep); }
.category-budget-row .settings-number { width: 88px; }
.bill-mode-row { margin: 2px 0 12px; padding: 0 2px; }

/* Feedback textarea */
.feedback-input {
  width: 100%; border: 0; outline: 0; background: var(--card);
  border-radius: 16px; padding: 13px 14px; font-weight: 700; font-size: 16px;
  font-family: inherit; resize: vertical; min-height: 120px;
  box-shadow: 0 3px 10px -6px rgba(72, 48, 40, 0.12);
}
.feedback-input:focus { box-shadow: 0 0 0 2.5px var(--peach); }
.feedback-input::placeholder { color: #CFC7BC; }

/* Shared trips */
.trip-share-row { margin: 2px 0 12px; padding: 0 2px; }
.trip-breakdown { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; font-weight: 700; }
.trip-private-note { display: block; margin-top: 8px; color: var(--muted); font-size: 11px; font-weight: 700; }
.trip-share-btn { display: inline-block; margin-top: 10px; font-size: 13px; }

/* Trip overview + compact cards */
.trip-total small { display: block; color: var(--muted); font-size: 11px; font-weight: 700; text-align: right; }
.trip-card { transition: transform .18s ease; }
.trip-summary-card {
  margin: 0 0 18px;
  padding: 16px 17px;
  border-radius: 21px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.trip-summary-card small { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.trip-summary-card b { font-size: 32px; font-weight: 900; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.trip-summary-total { color: var(--muted); font-size: 13px; font-weight: 700; }
.trip-owes {
  margin-bottom: 8px;
  padding: 9px 12px;
  border-radius: 13px;
  background: #EAF3FF;
  font-size: 13px;
  font-weight: 800;
}
body[data-view="trip"] .nav-btn { opacity: .45; }
#view-trip .btn-danger { margin-top: 8px; }

/* Feedback inbox */
.feedback-row { display: flex; align-items: flex-start; gap: 10px; padding: 11px 4px; border-bottom: 1px solid var(--line); }
.feedback-row:last-child { border-bottom: 0; }
.feedback-copy { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.feedback-copy b { font-size: 13.5px; font-weight: 700; line-height: 1.4; word-break: break-word; }
.feedback-copy small { color: var(--muted); font-size: 11px; font-weight: 700; }
body[data-view="feedback"] .nav-btn { opacity: .45; }

/* Voice entry */
.entry-methods-3 { grid-template-columns: 1fr 1fr 1fr; }
.voice-entry { margin-bottom: 12px; }
.voice-recording { box-shadow: 0 0 0 3px rgba(244, 86, 74, .35); animation: voice-pulse 1.2s ease-in-out infinite; }
@keyframes voice-pulse { 50% { box-shadow: 0 0 0 7px rgba(244, 86, 74, .15); } }

/* ---------- UI/UX pass: home compaction, privacy eye, insights clarity ---------- */

/* Quick log: one row of three, compact */
.quick-log-row { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.quick-log-row .quick-log-card { flex-direction: column; text-align: center; gap: 7px; min-height: 78px; padding: 11px 6px; }
.quick-log-row .quick-log-icon { width: 34px; height: 34px; font-size: 16px; }
.quick-log-row b { font-size: 13px; }

/* Slimmer hero with a privacy eye (44px target) */
.hero-card { padding: 16px 18px 15px; }
.hero-amount { font-size: 34px; margin-top: 3px; }
.hero-label-row { display: flex; align-items: center; justify-content: space-between; }
.hero-eye {
  width: 44px; height: 44px; margin: -12px -12px -12px 0;
  display: grid; place-items: center; font-size: 17px; border-radius: 14px; opacity: .75;
}
.hero-eye:active { transform: scale(.9); }
.hero-card .coin { transform: scale(.8); right: 6px; }
.home-intro { margin-bottom: 12px; }

/* Compact composer amount box */
.amount-card { padding: 12px 14px; }
.amount-input { font-size: 32px; }

/* Insights: single scrollable filter row; combined summary card */
.pill-row-scroll { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; }
.pill-row-scroll::-webkit-scrollbar { display: none; }
.pill-row-scroll > span { display: flex; gap: 6px; }
.pill-row-scroll > span + span { padding-left: 10px; border-left: 1px solid var(--line); margin-left: 4px; }
.insight-total-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.cash-flow-strip { display: flex; margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--line); }
.cash-flow-strip > span { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.cash-flow-strip small { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.cash-flow-strip b { font-size: 14px; font-weight: 900; font-variant-numeric: tabular-nums; }
.insight-bar-delta { display: block; margin-top: 3px; font-size: 11px; font-weight: 800; }
.insight-bar-delta.down { color: #2E9E6B; }
.insight-bar-delta.up { color: #D85A50; }

/* Feedback compose */
.feedback-actions { display: flex; gap: 9px; }
.feedback-actions .btn-primary { flex: 1; margin-top: 0; }
.feedback-mic { flex: none; min-width: 120px; margin-top: 0; }

/* Usual suspects: one sideways-scrolling row */
#suspects-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
#suspects-chips::-webkit-scrollbar { display: none; }
#suspects-chips .chip { flex: none; }

/* Household: compact balance + tucked-away history; joint category bar */
.balance-panel-compact { display: flex; align-items: center; gap: 12px; }
.balance-panel-compact .balance-copy { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.settle-mini { flex: none; width: auto; min-height: 44px; padding: 10px 16px; margin: 0; font-size: 14px; }
.settle-done { flex: none; font-size: 20px; color: #2E9E6B; font-weight: 900; }
.settle-history { margin-top: 10px; }
.settle-history summary { cursor: pointer; list-style: none; color: var(--muted); font-size: 13px; font-weight: 800; padding: 8px 2px; }
.settle-history summary::-webkit-details-marker { display: none; }
.settle-history summary::after { content: " ▾"; }
.settle-history[open] summary::after { content: " ▴"; }
.joint-cat-bar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; margin: 0 0 8px; background: #E7E4F0; }
.joint-cat-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-bottom: 14px; color: var(--muted); font-size: 11.5px; font-weight: 800; }
.household-members-settings { padding: 4px 0 10px; }
.settle-context { margin: 4px 0 14px; padding: 10px 12px; border-radius: 14px; background: var(--card); box-shadow: var(--shadow-soft); }
.settle-context-head { display: block; margin-bottom: 6px; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.settle-context-row { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; font-size: 13px; font-weight: 700; }
.settle-context-row b { font-variant-numeric: tabular-nums; }

/* Statement import */
.import-summary { margin-bottom: 14px; padding: 14px 16px; border-radius: 18px; background: var(--card); box-shadow: var(--shadow-soft); display: flex; flex-direction: column; gap: 3px; }
.import-summary b { font-size: 17px; font-weight: 900; }
.import-summary small { color: var(--muted); font-size: 12px; font-weight: 700; }
.import-row { display: flex; align-items: center; gap: 11px; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.import-row:last-child { border-bottom: 0; }
.import-row input[type="checkbox"] { width: 20px; height: 20px; flex: none; accent-color: var(--lavender-deep); }
.import-row-off { opacity: .5; }
.import-copy { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.import-copy b { font-size: 13.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.import-copy small { color: var(--muted); font-size: 11px; font-weight: 700; }
.import-amount { flex: none; font-size: 13.5px; font-weight: 900; font-variant-numeric: tabular-nums; }
.import-amount.income { color: #2E9E6B; }
body[data-view="import"] .nav-btn { opacity: .45; }
