/* Lukas. El color principal lo elige cada cuenta (Ajustes → Apariencia): app.js pone --accent-base. */

:root {
  --bg: color-mix(in srgb, var(--accent-base, #15803D) 10%, #F2F2F7);
  --card: color-mix(in srgb, var(--accent-base, #15803D) 3%, #FFFFFF);
  --text: #1C1C1E;
  --text2: #6C6C70;
  --text3: #AEAEB2;
  --sep: rgba(60, 60, 67, 0.16);
  --fill: color-mix(in srgb, var(--accent-base, #15803D) 12%, rgba(118, 118, 128, 0.08));
  --accent: var(--accent-base, #15803D);
  --income: #2FA36B;
  --expense: #E5484D;
  --warning: #EE8A3C;
  --danger: #E5383B;
  --bar: color-mix(in srgb, var(--accent-base, #15803D) 8%, rgba(249, 249, 249, 0.86));
  --radius: 22px;
  --gutter: 16px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --tabbar-h: 54px;
  color-scheme: light dark;
}

/* Modo oscuro: automático según el iPhone, o forzado con data-theme en <html>. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: color-mix(in srgb, var(--accent-base, #15803D) 14%, #000000);
    --card: color-mix(in srgb, var(--accent-base, #15803D) 12%, #1C1C1E);
    --text: #F2F2F7;
    --text2: #98989F;
    --text3: #5A5A5F;
    --sep: rgba(84, 84, 88, 0.55);
    --fill: rgba(118, 118, 128, 0.24);
    --bar: color-mix(in srgb, var(--accent-base, #15803D) 14%, rgba(22, 22, 24, 0.86));
    --accent: color-mix(in srgb, var(--accent-base, #15803D) 78%, white);
  }
}
:root[data-theme="dark"] {
  --bg: color-mix(in srgb, var(--accent-base, #15803D) 14%, #000000);
  --card: color-mix(in srgb, var(--accent-base, #15803D) 12%, #1C1C1E);
  --text: #F2F2F7;
  --text2: #98989F;
  --text3: #5A5A5F;
  --sep: rgba(84, 84, 88, 0.55);
  --fill: rgba(118, 118, 128, 0.24);
  --bar: color-mix(in srgb, var(--accent-base, #15803D) 14%, rgba(22, 22, 24, 0.86));
  --accent: color-mix(in srgb, var(--accent-base, #15803D) 78%, white);
  color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation; /* sin zoom por doble toque */
  background: var(--bg);
}

html.sheet-open { overflow: hidden; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.35 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  overscroll-behavior-y: none;
}

button, input, select, textarea { font: inherit; color: inherit; }
button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
button:disabled { opacity: 0.35; cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
svg { display: block; }
code { font: 0.85em ui-monospace, "SF Mono", Menlo, monospace; background: var(--fill); padding: 1px 5px; border-radius: 6px; }
[hidden] { display: none !important; }

/* MARK: - Estructura */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: calc(var(--safe-top) + 6px) calc(var(--gutter) + var(--safe-right)) 6px calc(var(--gutter) + var(--safe-left));
  background: var(--bar);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--sep);
}
.topbar h1 {
  flex: 1;
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.back-btn { display: flex; align-items: center; gap: 2px; color: var(--accent); min-height: 44px; }
.back-btn svg { width: 22px; height: 22px; }
.back-btn:not([hidden]) + h1 { font-size: 20px; }
.actions { display: flex; align-items: center; gap: 6px; }

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 12px calc(var(--gutter) + var(--safe-right)) calc(var(--tabbar-h) + var(--safe-bottom) + 96px) calc(var(--gutter) + var(--safe-left));
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  padding: 4px var(--safe-right) var(--safe-bottom) var(--safe-left);
  background: var(--bar);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-top: 0.5px solid var(--sep);
}
.tab {
  flex: 1;
  min-height: var(--tabbar-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--text3);
  font-size: 10px;
  font-weight: 500;
}
.tab svg { width: 25px; height: 25px; }
.tab.active { color: var(--accent); }

.fab {
  position: fixed;
  z-index: 15;
  right: calc(20px + var(--safe-right));
  bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 20px);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 45%, transparent);
  transition: transform 0.15s ease;
}
.fab svg { width: 26px; height: 26px; }
.fab:active { transform: scale(0.94); }

/* MARK: - Componentes */

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.card p { margin: 0; }

.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-title h2, .serif-title {
  margin: 0;
  font: italic 400 24px/1.2 ui-serif, "New York", Georgia, serif;
}
.serif-title { font-size: 34px; }
.section-title span { font-size: 12px; color: var(--text2); text-align: right; }

.muted { color: var(--text2); font-size: 15px; margin: 0; }
.footnote { color: var(--text2); font-size: 13px; margin: 0; }
.footnote.pad { padding: 0 6px; margin-top: -8px; }
.ok { color: var(--income); font-weight: 600; margin: 0; }

.hero {
  font: 700 42px/1.1 ui-rounded, "SF Pro Rounded", -apple-system, system-ui, sans-serif;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.big { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.neg { color: var(--danger) !important; }
.h { font-size: 17px; font-weight: 600; }
.warn { color: var(--warning) !important; }
.danger { color: var(--danger) !important; }

.stats { display: flex; }
.stat { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 0 4px; }
.stat + .stat { border-left: 0.5px solid var(--sep); }
.stat small { font-size: 11px; font-weight: 600; color: var(--text2); text-transform: uppercase; letter-spacing: 0.02em; text-align: center; }
.stat b { font-size: clamp(12px, 3.7vw, 15px); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; font-variant-numeric: tabular-nums; }

.ticks { display: flex; gap: 3px; height: 26px; }
.ticks i { flex: 1; border-radius: 3px; background: color-mix(in srgb, var(--income) 85%, transparent); }
.ticks i.spent { background: var(--expense); }

.progress { height: 6px; border-radius: 99px; background: color-mix(in srgb, var(--c) 15%, transparent); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: inherit; background: var(--c); }
.progress i.over { background: var(--danger); }

.bubble {
  flex: none;
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: calc(var(--s) * 0.5);
  line-height: 1;
  background: color-mix(in srgb, var(--c) 18%, transparent);
}

.month-switch { display: flex; align-items: center; justify-content: space-between; }
.month-switch span { font-size: 15px; font-weight: 600; letter-spacing: 0.1em; }
.month-switch button { width: 44px; height: 44px; display: grid; place-items: center; color: var(--accent); }
.month-switch svg { width: 20px; height: 20px; }

.list { display: flex; flex-direction: column; }
.row-btn, .fixed-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 8px 0;
  text-align: left;
  border-radius: 12px;
  cursor: pointer;
}
.list > * + * { border-top: 0.5px solid var(--sep); }
.row-btn:active, .fixed-row:active { background: var(--fill); }
.row-btn.static { cursor: default; }
.row-btn.static:active { background: none; }
.grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.name.done { text-decoration: line-through; color: var(--text2); }
.cap { font-size: 12px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.end { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; }
.end p { font-size: 12px; color: var(--text2); }
.amt { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; flex: none; font-size: 15px; }
.amt.income { color: var(--income); }
.amt.allocation, .amt.muted { color: var(--text2); }
.tag { font-size: 10px; font-weight: 600; color: var(--text2); background: var(--fill); padding: 1px 6px; border-radius: 99px; vertical-align: 2px; }

.banner { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; }
.banner p { font-size: 13px; color: var(--text2); }
.banner-emoji { font-size: 26px; flex: none; }
.banner-icon { width: 28px; height: 28px; flex: none; }
.chev { width: 16px; height: 16px; color: var(--text3); flex: none; }
.close { width: 32px; height: 32px; border-radius: 50%; background: var(--fill); color: var(--text2); font-size: 20px; flex: none; align-self: flex-start; }
.card.reminder { border: 1.5px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.card.install { background: color-mix(in srgb, var(--accent) 10%, var(--card)); }
.inline-icon { display: inline-block; width: 16px; height: 16px; vertical-align: -3px; color: #0A84FF; }
.inline-icon svg { width: 100%; height: 100%; }

.pill { padding: 7px 14px; border-radius: 99px; background: var(--fill); color: var(--accent); font-weight: 600; font-size: 15px; flex: none; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--accent); flex: none; }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn.small { width: 36px; height: 36px; background: var(--fill); }
.icon-btn.small svg { width: 18px; height: 18px; }
.icon-btn.filled { background: var(--accent); color: #fff; width: 36px; height: 36px; }
.icon-btn.filled svg { width: 18px; height: 18px; }
.text-btn { color: var(--accent); min-height: 44px; padding: 0 4px; font-size: 17px; }
.text-btn.strong { font-weight: 600; }
.primary { display: inline-flex; justify-content: center; align-items: center; min-height: 50px; padding: 0 22px; border-radius: 16px; background: var(--accent); color: #fff; font-weight: 600; text-decoration: none; }
.primary.block { display: flex; width: 100%; }
.action-row { color: var(--accent); font-weight: 500; text-align: left; min-height: 44px; border-top: 0.5px solid var(--sep); padding-top: 10px; }

.legend { display: flex; flex-direction: column; gap: 8px; }
.legend-row { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.legend-row i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.legend-row .grow { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legend-row small { color: var(--text2); font-size: 12px; }
.legend-row b { font-weight: 500; font-variant-numeric: tabular-nums; }

.donut { position: relative; width: 190px; height: 190px; margin: 0 auto; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut-center small { font-size: 12px; color: var(--text2); }
.donut-center b { font-size: 17px; font-variant-numeric: tabular-nums; }

/* Bolsillo */
.pocket-hero { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 0; text-align: center; }
.pocket-hero .hero { font-size: 38px; }
.pocket-hero .progress { width: 100%; margin-top: 8px; }
.two-buttons { display: flex; gap: 12px; }
.soft { flex: 1; min-height: 48px; border-radius: 14px; font-weight: 600; font-size: 15px; }
.soft.income { color: var(--income); background: color-mix(in srgb, var(--income) 15%, transparent); }
.soft.expense { color: var(--expense); background: color-mix(in srgb, var(--expense) 15%, transparent); }

/* Gastos fijos */
.check {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--text3);
  display: grid;
  place-items: center;
  color: transparent;
  flex: none;
  transition: background 0.15s, border-color 0.15s;
}
.check svg { width: 18px; height: 18px; }
.check.on { background: var(--income); border-color: var(--income); color: #fff; }
.fixed-row .emoji { font-size: 22px; flex: none; }
.empty { text-align: center; padding: 32px 16px; color: var(--text2); }
.empty-emoji { font-size: 44px; }
.empty h3 { color: var(--text); margin: 8px 0 4px; font-size: 20px; }
.empty p { margin: 0 0 16px; }

/* Calendario */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.wd { text-align: center; font-size: 11px; font-weight: 600; color: var(--text2); }
.day {
  min-height: 48px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border: 2px solid transparent;
  min-width: 0;
}
.day span { font-size: 15px; }
.day small { font-size: 9px; font-weight: 500; color: var(--text2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.day.today span { color: var(--accent); font-weight: 700; }
.day.sel { border-color: var(--accent); }

/* Ajustes / grupos estilo iOS */
.group-title { margin: 8px 0 -10px; padding: 0 16px; font-size: 13px; font-weight: 400; text-transform: uppercase; color: var(--text2); }
.group { background: var(--card); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.group.pad { padding: 12px 16px; gap: 12px; }
.group > * + * { border-top: 0.5px solid var(--sep); }
.group.pad > * + * { border-top: 0; }
.group-foot { margin: -10px 0 0; padding: 0 16px; font-size: 13px; color: var(--text2); }
.cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 6px 16px;
  width: 100%;
  text-align: left;
  background: none;
}
button.cell:active { background: var(--fill); }
.cell .grow { display: block; }
.cell-icon { width: 24px; height: 24px; display: grid; place-items: center; color: var(--accent); flex: none; }
.cell-icon svg { width: 22px; height: 22px; }
.cell select, .cell input[type="time"], .cell input[type="datetime-local"] {
  border: 0;
  background: var(--fill);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 16px; /* 16px evita el zoom automático de iOS al enfocar */
  max-width: 60%;
  min-height: 34px;
}
.cell input.right, .cell .right { text-align: right; border: 0; background: none; font-size: 17px; width: 40%; min-width: 0; }
.cell input.short { width: 9em; }
.cell-input, .plain-input {
  border: 0;
  background: none;
  padding: 12px 16px;
  font-size: 17px;
  width: 100%;
  resize: none;
}
.plain-input { padding: 0; }
.emoji-input { width: 44px; border: 0; background: none; font-size: 28px; text-align: center; padding: 0; }
input:focus, select:focus, textarea:focus { outline: none; }
.version { text-align: center; color: var(--text3); font-size: 12px; margin: 4px 0 0; }

.switch {
  -webkit-appearance: none;
  appearance: none;
  width: 51px;
  height: 31px;
  border-radius: 99px;
  background: var(--fill);
  position: relative;
  flex: none;
  transition: background 0.2s;
  margin: 0;
}
.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s;
}
.switch:checked { background: var(--income); }
.switch:checked::after { transform: translateX(20px); }

/* Guía de Wallet */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; }
.steps p { margin: 6px 0 0; }
.step-n {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 600;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 15%, transparent);
}

/* MARK: - Hojas */

#sheet-root { position: fixed; inset: 0; z-index: 50; display: none; }
#sheet-root.open { display: block; }
.backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.35); touch-action: none; }
.sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 640px;
  margin: 0 auto;
  max-height: calc(100% - var(--safe-top) - 24px);
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.15);
}
#sheet-root.enter .backdrop { animation: fade 0.25s ease-out; }
#sheet-root.enter .sheet { animation: slide-up 0.32s cubic-bezier(0.32, 0.72, 0, 1); }
@keyframes fade { from { opacity: 0; } }
@keyframes slide-up { from { transform: translateY(100%); } }
@media (prefers-reduced-motion: reduce) {
  #sheet-root.enter .backdrop, #sheet-root.enter .sheet { animation: none; }
}
.sheet-head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 8px calc(12px + var(--safe-right)) 8px calc(12px + var(--safe-left));
  border-bottom: 0.5px solid var(--sep);
}
.sheet-head h2 { margin: 0; font-size: 17px; font-weight: 600; text-align: center; }
.sheet-head .text-btn:first-child { justify-self: start; }
.sheet-head .text-btn:last-child, .sheet-head .spacer { justify-self: end; }
.sheet-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 16px calc(var(--gutter) + var(--safe-right)) calc(24px + var(--safe-bottom)) calc(var(--gutter) + var(--safe-left));
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.segmented { display: flex; background: var(--fill); border-radius: 9px; padding: 2px; gap: 2px; }
.segmented.inner { margin: 0 12px 12px; }
.segmented button { flex: 1; min-height: 32px; border-radius: 7px; font-size: 14px; font-weight: 500; }
.segmented button.on { background: var(--card); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12); }

.amount-row { display: flex; align-items: baseline; gap: 6px; padding: 10px 16px; }
.amount-row .cur { font-size: 28px; color: var(--text2); }
.amount-row input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  font: 700 40px/1.2 ui-rounded, "SF Pro Rounded", -apple-system, system-ui, sans-serif;
}

.emoji-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; }
.emoji-grid button { aspect-ratio: 1; border-radius: 50%; font-size: 22px; display: grid; place-items: center; }
.emoji-grid button.on { background: color-mix(in srgb, var(--c) 25%, transparent); }
.emoji-grid + .cell-input { padding: 8px 0 0; }
.colors { display: flex; justify-content: space-between; }
.colors button { width: 30px; height: 30px; border-radius: 50%; }
.colors button.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--text); }
.danger-btn { color: var(--danger); background: var(--card); border-radius: 12px; min-height: 46px; font-weight: 500; }

/* MARK: - Aviso flotante */

#toast {
  position: fixed;
  z-index: 60;
  left: 50%;
  bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 92px);
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: calc(100% - 32px);
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(30, 30, 32, 0.94);
  color: #fff;
  font-size: 15px;
  transition: opacity 0.2s, transform 0.2s;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
#toast button { color: color-mix(in srgb, var(--accent-base, #15803D) 55%, white); font-weight: 600; flex: none; }

@media (min-width: 700px) {
  .topbar h1 { max-width: 640px; }
}

/* MARK: - Perfiles */

.no-profile .tabbar, .no-profile .fab { display: none !important; }
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex: none;
  background: var(--c);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
}
.picker { display: flex; flex-direction: column; gap: 14px; padding-top: 24px; }
.profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  min-height: 88px;
  background: var(--card);
  border-radius: var(--radius);
  text-align: left;
  font-size: 20px;
}
.profile-card b { flex: 1; }
.profile-card:active { background: var(--fill); }
.link-box { display: block; padding: 10px 12px; border-radius: 10px; word-break: break-all; font-size: 13px; }

/* MARK: - Ayuda */

.help-btn { font-weight: 700; font-size: 20px; }
.help { display: flex; flex-direction: column; gap: 10px; }
.help details { background: var(--card); border-radius: 16px; overflow: hidden; }
.help summary { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 8px 16px; cursor: pointer; font-weight: 600; list-style: none; }
.help summary::-webkit-details-marker { display: none; }
.help summary .chev { transition: transform 0.2s; }
.help details[open] summary .chev { transform: rotate(90deg); }
.help-emoji { font-size: 22px; flex: none; }
.help-body { padding: 0 16px 14px 50px; display: flex; flex-direction: column; gap: 8px; color: var(--text2); font-size: 15px; }
.help-body p { margin: 0; }
.help-body b { color: var(--text); }
@media (prefers-reduced-motion: reduce) { .help summary .chev { transition: none; } }

/* MARK: - Cuentas */

.avatar { --c: var(--accent); }
.avatar.static { display: grid; place-items: center; flex: none; background: var(--accent); color: #fff; width: 40px; height: 40px; border-radius: 50%; font-weight: 700; }
.picker .group { margin-top: 4px; }
.picker .text-btn { align-self: center; }
.notice { margin: 0; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--warning) 15%, var(--card)); font-size: 15px; }
.form-error { margin: 0; color: var(--danger); font-size: 15px; font-weight: 500; }

/* MARK: - Apariencia */

.swatches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.swatch { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; color: var(--text2); }
.swatch i { width: 44px; height: 44px; border-radius: 50%; background: var(--c); display: grid; place-items: center; color: #fff; }
.swatch i svg { width: 22px; height: 22px; }
.swatch.on { color: var(--text); font-weight: 600; }
.swatch.on i { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--c); }

/* Tarjeta principal ("Te queda") con el color del tema */
.card.hero-card {
  background: linear-gradient(140deg, var(--accent-base, #15803D), color-mix(in srgb, var(--accent-base, #15803D) 70%, #000));
  color: #fff;
  box-shadow: 0 10px 26px color-mix(in srgb, var(--accent-base, #15803D) 35%, transparent);
}
.hero-card .muted, .hero-card .footnote, .hero-card .stat small { color: rgba(255, 255, 255, 0.82); }
.hero-card .hero.neg, .hero-card .stat b { color: #fff !important; }
.hero-card .stat + .stat { border-left-color: rgba(255, 255, 255, 0.25); }
.hero-card .ticks i { background: rgba(255, 255, 255, 0.28); }
.hero-card .ticks i.spent { background: #fff; }

/* MARK: - Extracto del banco */

.stmt-list .stmt-row { display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
.stmt-row.off .name, .stmt-row.off .amt-pill { opacity: 0.45; }
.amt-pill { font-variant-numeric: tabular-nums; font-size: 14px; padding: 6px 10px; color: var(--text); }
.amt-pill.income { color: var(--income); }

/* Marca */
.brand-line { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }

.install-btn { margin-top: 8px; background: var(--accent); color: #fff; }
