/* Casa360 · sistema visual menta. Móvil primero. */
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Nunito Sans"; src: url("../fonts/nunito-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Nunito Sans"; src: url("../fonts/nunito-sans-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --mint-900: #064A3E;
  --mint-700: #0B7A66;   /* primario: botones, theme_color (5.2:1 con blanco) */
  --mint-600: #0F8F78;
  --mint-400: #3DD6B5;   /* acento: gráficos, íconos, barras */
  --mint-100: #E3F7F1;   /* superficie suave */
  --mint-50:  #F6FBF9;   /* fondo */
  --ink: #16302B;
  --ink-2: #4E6B64;
  --ink-3: #7F958F;
  --line: #DCEDE7;
  --surface: #FFFFFF;
  --coral: #F28C6B;
  --coral-ink: #A8401F;
  --coral-bg: #FDEEE8;
  --red: #D64545;
  --red-ink: #A32D2D;
  --red-bg: #FCEBEB;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(22,48,43,.06), 0 4px 16px rgba(22,48,43,.06);
  --nav-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --dur: 200ms;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Nunito Sans", var(--font);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.5;
  color: var(--ink); background: var(--mint-50); -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: contain;
}
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.25; margin: 0; }
h1 { font-size: 24px; } h2 { font-size: 18px; } h3 { font-size: 16px; }
p { margin: 0; }
a { color: var(--mint-700); }
button, input, select, textarea { font: inherit; color: inherit; }
.num, .amount { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.muted { color: var(--ink-2); font-size: 14px; }
.tiny { font-size: 13px; color: var(--ink-3); }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
svg.i.sm { width: 18px; height: 18px; }

/* ---------- Estructura ---------- */
#app { max-width: 560px; margin: 0 auto; min-height: 100dvh; padding-bottom: calc(var(--nav-h) + var(--safe-b) + 16px); }
.app-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 18px 10px; gap: 12px; }
.app-header .date { font-size: 13px; color: var(--ink-2); }
.app-header .hello { font-family: var(--font-head); font-weight: 700; font-size: 20px; }
.page { padding: 0 14px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.page-title { display: flex; align-items: center; gap: 8px; padding: 18px 18px 6px; }
.page-title h1 { flex: 1; }

.icon-btn {
  width: 48px; height: 48px; display: inline-grid; place-items: center; border-radius: 50%;
  border: 0; background: transparent; color: var(--mint-700); cursor: pointer; position: relative;
}
.icon-btn:active { background: var(--mint-100); }
.badge-dot { position: absolute; top: 10px; right: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--coral); border: 2px solid var(--mint-50); }

/* ---------- Navegación inferior: Inicio, Finanzas, Agregar, Listas, Más ---------- */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: var(--surface); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  max-width: 560px; margin: 0 auto;
}
.bottom-nav a, .bottom-nav button {
  display: grid; justify-items: center; gap: 2px; min-height: 48px; font-size: 12px;
  color: var(--ink-2); text-decoration: none; background: none; border: 0; cursor: pointer;
}
.bottom-nav a[aria-current="page"] { color: var(--mint-700); font-weight: 600; }
.bottom-nav .fab {
  width: 56px; height: 56px; border-radius: 50%; background: var(--mint-700); color: #fff;
  display: grid; place-items: center; margin-top: -22px; box-shadow: 0 6px 18px rgba(11,122,102,.35);
}
.bottom-nav .fab svg.i { width: 26px; height: 26px; stroke-width: 2.2; }

/* ---------- Selector de ámbito ---------- */
.scope-switch { display: inline-flex; background: var(--mint-100); border-radius: 999px; padding: 4px; gap: 4px; }
.scope-switch button {
  border: 0; background: transparent; color: var(--mint-700); padding: 0 16px; min-height: 40px;
  border-radius: 999px; font-size: 14px; font-weight: 500; cursor: pointer;
}
.scope-switch button[aria-pressed="true"] { background: var(--mint-700); color: #fff; }
.scope-row { display: flex; justify-content: space-between; align-items: center; padding: 0 18px 4px; gap: 8px; }

/* ---------- Tarjetas ---------- */
.card { background: var(--surface); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; gap: 8px; }
.card-head a, .link-btn { font-size: 14px; color: var(--mint-700); text-decoration: none; font-weight: 500; background: none; border: 0; cursor: pointer; padding: 8px 0; min-height: 40px; }
.balance-card { background: var(--mint-700); color: #fff; border-radius: 18px; padding: 18px; box-shadow: 0 8px 24px rgba(11,122,102,.25); }
.balance-card .label { font-size: 14px; opacity: .88; }
.balance-card .big { font-size: 32px; font-weight: 600; letter-spacing: -.5px; margin: 2px 0 12px; }
.balance-card .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.balance-card .k { font-size: 12px; opacity: .82; }
.balance-card .v { font-size: 16px; font-weight: 500; }
.balance-card .neg { color: #FFD9CC; }
.balance-card .split { border-top: 1px solid rgba(255,255,255,.2); margin-top: 12px; padding-top: 10px; }

.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kpi { background: var(--surface); border-radius: var(--radius-sm); padding: 10px 12px; box-shadow: var(--shadow); }
.kpi .k { font-size: 12px; color: var(--ink-2); }
.kpi .v { font-size: 16px; font-weight: 600; }
.pos { color: var(--mint-700); }
.neg { color: var(--red-ink); }

/* ---------- Filas ---------- */
.list { display: grid; }
.row-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 2px; min-height: 56px;
  border-bottom: 1px solid var(--line); background: none; border-left: 0; border-right: 0; border-top: 0;
  width: 100%; text-align: left; cursor: pointer; color: inherit;
}
.row-item:last-child { border-bottom: 0; }
.row-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--mint-100); color: var(--mint-700); flex-shrink: 0; }
.row-ico.out { background: #F2F5F4; color: var(--ink-2); }
.row-ico.warn { background: var(--coral-bg); color: var(--coral-ink); }
.row-ico.danger { background: var(--red-bg); color: var(--red-ink); }
.row-main { flex: 1; min-width: 0; display: grid; }
.row-title { display: block; font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { display: block; font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-amt { text-align: right; font-weight: 600; font-size: 15px; white-space: nowrap; }
.row-amt .tiny { font-weight: 400; display: block; }
.day-sep { font-size: 13px; color: var(--ink-3); padding: 12px 2px 2px; font-weight: 500; }

.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; background: var(--mint-100); color: var(--mint-700); }
.chip.warn { background: var(--coral-bg); color: var(--coral-ink); }
.chip.danger { background: var(--red-bg); color: var(--red-ink); }
.chip.gray { background: #EEF2F1; color: var(--ink-2); }

/* ---------- Presupuesto ---------- */
.budget { padding: 10px 0; border-bottom: 1px solid var(--line); }
.budget:last-child { border-bottom: 0; }
.budget-top { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.bar { height: 8px; background: var(--mint-100); border-radius: 4px; margin-top: 8px; overflow: hidden; }
.bar > span { display: block; height: 100%; width: 0; background: var(--mint-400); border-radius: 4px; transition: width var(--dur) ease-out; }
.bar.warning > span { background: var(--coral); }
.bar.over > span { background: var(--red); }
.budget-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-2); margin-top: 4px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--mint-700); border-color: var(--mint-700); color: #fff; }
.btn-primary:active { background: var(--mint-900); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--mint-700); }
.btn-danger { color: var(--red-ink); border-color: #F2C9C9; background: #fff; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------- Formularios ---------- */
.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field > span, .field-label { font-size: 14px; font-weight: 500; color: var(--ink-2); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px;
  background: #fff; outline: none;
}
.field textarea { min-height: 72px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--mint-700); box-shadow: 0 0 0 3px rgba(11,122,102,.15); }
.field.invalid input, .field.invalid select { border-color: var(--red); }
.field-error { color: var(--red-ink); font-size: 13px; }
.amount-input { display: flex; align-items: center; gap: 6px; border-bottom: 2px solid var(--mint-700); padding: 6px 0; }
.amount-input span { font-size: 28px; color: var(--ink-2); font-weight: 500; }
.amount-input input { border: 0; font-size: 36px; font-weight: 600; width: 100%; outline: none; background: transparent; font-variant-numeric: tabular-nums; padding: 0; min-height: 52px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: #EEF2F1; border-radius: 12px; padding: 4px; gap: 4px; }
.seg button { border: 0; background: transparent; border-radius: 9px; min-height: 42px; font-weight: 500; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.seg.kind button[aria-pressed="true"][data-v="expense"] { color: var(--red-ink); }
.seg.kind button[aria-pressed="true"][data-v="income"] { color: var(--mint-700); }
.check-row { display: flex; align-items: center; gap: 12px; min-height: 48px; font-size: 15px; cursor: pointer; }
.check-row input { width: 22px; height: 22px; accent-color: var(--mint-700); }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; max-height: 220px; overflow: auto; }
.cat-grid button {
  border: 1px solid var(--line); background: #fff; border-radius: 12px; min-height: 64px; padding: 6px;
  display: grid; justify-items: center; align-content: center; gap: 4px; font-size: 12px; cursor: pointer; color: var(--ink);
}
.cat-grid button[aria-pressed="true"] { border-color: var(--mint-700); background: var(--mint-100); color: var(--mint-900); font-weight: 600; }

/* ---------- Bottom sheet ---------- */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(22,48,43,.4); z-index: 40; opacity: 0; transition: opacity var(--dur); }
.sheet-backdrop.open { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-width: 560px; margin: 0 auto;
  background: var(--mint-50); border-radius: 20px 20px 0 0; max-height: 92dvh; overflow: auto;
  padding: 8px 18px calc(18px + var(--safe-b)); transform: translateY(100%); transition: transform 240ms cubic-bezier(.2,.8,.2,1);
}
.sheet.open { transform: translateY(0); }
.sheet-grip { width: 40px; height: 4px; border-radius: 2px; background: #C9D9D4; margin: 6px auto 10px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }

/* ---------- Toast ---------- */
.toast-wrap { gap: 8px; position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--safe-b) + 12px); z-index: 60; display: grid; justify-items: center; pointer-events: none; padding: 0 14px; }
.toast {
  pointer-events: auto; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 12px; display: flex; align-items: center; gap: 12px;
  font-size: 14px; max-width: 520px; width: 100%; opacity: 0; transform: translateY(8px); transition: opacity var(--dur), transform var(--dur);
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: var(--red-ink); }
.toast button { margin-left: auto; background: none; border: 0; color: var(--mint-400); font-weight: 600; min-height: 40px; cursor: pointer; }

/* ---------- Estados ---------- */
.empty { text-align: center; padding: 28px 12px; display: grid; gap: 8px; justify-items: center; color: var(--ink-2); }
.empty .row-ico { width: 56px; height: 56px; border-radius: 18px; }
.empty h3 { color: var(--ink); }
.banner { border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.banner-ok { background: var(--mint-100); color: var(--mint-900); }
.banner-warn { background: var(--coral-bg); color: var(--coral-ink); }
.banner-danger { background: var(--red-bg); color: var(--red-ink); }
.offline-bar { background: var(--ink); color: #fff; font-size: 13px; text-align: center; padding: 6px 12px; }
.skeleton { background: linear-gradient(90deg, #EAF3F0 25%, #F4F9F7 50%, #EAF3F0 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 12px; min-height: 64px; }
@keyframes shimmer { to { background-position: -200% 0; } }

.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 0 18px 4px; scrollbar-width: none; }
.tabs button { flex-shrink: 0; border: 1px solid var(--line); background: #fff; border-radius: 999px; min-height: 40px; padding: 0 14px; font-size: 14px; cursor: pointer; color: var(--ink-2); }
.tabs button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.month-nav { display: flex; align-items: center; justify-content: space-between; }
.month-nav strong { font-weight: 600; }
.totals { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; gap: 6px; }
.totals .k { font-size: 12px; color: var(--ink-2); }
.totals .v { font-weight: 600; }
.search { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; background: #fff; }

.acc-group h3 { font-size: 14px; color: var(--ink-2); font-weight: 600; margin: 4px 2px 0; font-family: var(--font); }
.detail-grid { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 14px; }
.detail-grid dt { color: var(--ink-2); }
.detail-grid dd { margin: 0; text-align: right; }

/* ---------- Login / instalación ---------- */
body.install, .login-screen { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.install-card, .login-card { width: 100%; max-width: 420px; background: #fff; border-radius: 20px; padding: 24px; box-shadow: var(--shadow); display: grid; gap: 16px; }
.install-card h2 { font-size: 16px; margin-top: 8px; color: var(--mint-700); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { border-radius: 12px; }
.brand h1 { font-size: 24px; color: var(--mint-700); }
.brand p { color: var(--ink-2); font-size: 14px; }
.pass-wrap { position: relative; }
.pass-wrap input { padding-right: 52px; }
.pass-wrap .icon-btn { position: absolute; right: 0; top: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; }
}
@media (min-width: 600px) {
  .bottom-nav { border-radius: 16px 16px 0 0; border: 1px solid var(--line); }
}

.tiny-white { font-size: 13px; }
a.row-item { text-decoration: none; }
.budget-btn { display: block; padding: 0; min-height: 0; border-bottom: 0; }
.budget-btn .budget { border-bottom: 1px solid var(--line); }
details.card summary { cursor: pointer; font-weight: 600; min-height: 40px; display: flex; align-items: center; color: var(--mint-700); }
details.card[open] summary { margin-bottom: 10px; }
.amount-input strong { font-size: 36px; font-weight: 600; }

/* ---------- Listas: ShoppingItem y TaskCard ---------- */
a.card { display: block; color: inherit; text-decoration: none; }
.list-card .bar { margin-top: 10px; }
.add-item { padding: 8px 8px 8px 14px; }
.add-row { display: flex; gap: 8px; align-items: center; }
.add-row input { flex: 1; min-width: 0; min-height: 48px; border: 0; outline: none; background: transparent; font-size: 16px; }
.add-row input.qty { flex: 0 0 56px; text-align: center; border: 1px solid var(--line); border-radius: 10px; min-height: 40px; }
.add-btn { background: var(--mint-700); color: #fff; flex-shrink: 0; }
.add-btn:active { background: var(--mint-900); }
.plain { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; color: inherit; font: inherit; }
.row-item > .plain { padding: 6px 0; }
.check-btn {
  width: 48px; height: 48px; flex-shrink: 0; display: grid; place-items: center; border: 0; background: none; cursor: pointer; padding: 0;
  color: #fff; position: relative;
}
.check-btn::before { content: ""; position: absolute; width: 26px; height: 26px; border-radius: 8px; border: 2px solid #A9C4BC; background: #fff; transition: background var(--dur), border-color var(--dur); }
.check-btn.round::before { border-radius: 50%; }
.check-btn[aria-pressed="true"]::before { background: var(--mint-700); border-color: var(--mint-700); }
.check-btn svg.i { position: relative; width: 18px; height: 18px; stroke-width: 2.6; }
.check-btn[disabled] { cursor: default; opacity: .6; }
.shop-item.checked .row-title, .task.checked .row-title { text-decoration: line-through; color: var(--ink-3); }
.task.cancelled .row-title { text-decoration: line-through; color: var(--ink-3); }
.row-item.shop-item, .row-item.task { cursor: default; gap: 6px; padding-left: 0; }
.row-amt .chip { margin-bottom: 2px; }
.row-amt .tiny.neg { color: var(--red-ink); }
.tabs.flush { padding: 0; }
.card h3.neg { color: var(--red-ink); }
.home-tasks .row-item { min-height: 48px; }
.warn-neg { color: var(--coral-ink); }

/* ---------- Avisos ---------- */
.notif.unread .row-title { font-weight: 600; }
.notif .row-title { white-space: normal; }
.unread-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--coral); flex-shrink: 0; }
.push-cta { display: grid; gap: 10px; }
.push-cta .btn { justify-self: start; }

/* ---------- Reportes y comprobantes ---------- */
.chart-box { position: relative; height: 220px; margin: 4px 0 8px; }
.chart-box.tall { height: 240px; }
.obs { background: var(--mint-50); border-left: 3px solid var(--mint-400); border-radius: 0; padding: 8px 12px; margin: 6px 0; font-size: 14px; }
.kpis .v.pos { color: var(--mint-700); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.thumb { display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #fff; -webkit-touch-callout: none; user-select: none; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .pdf { display: grid; place-items: center; height: 100%; color: var(--red-ink); font-size: 12px; font-weight: 600; align-content: center; gap: 2px; }
.file-btn { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.file-field input[type=file] { min-height: 0; padding: 10px; font-size: 14px; }

/* ---------- Plantillas rápidas ---------- */
.quick-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 4px; scrollbar-width: none; }
.quick { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 14px; cursor: pointer; }
.quick b { font-weight: 600; color: var(--mint-700); font-size: 13px; }
.quick svg.i { color: var(--mint-700); }
.quick:active { background: var(--mint-100); }
.danger-link { color: var(--red-ink); }

/* ---------- Proyección ---------- */
.projection .proj-line { display: flex; gap: 8px; align-items: flex-start; font-size: 15px; margin: 6px 0; }
.projection .proj-line svg { margin-top: 3px; color: var(--mint-700); }
.proj-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0 4px; }
.proj-grid > div { background: var(--mint-50); border-radius: 10px; padding: 8px 10px; }
.proj-grid .k { font-size: 12px; color: var(--ink-2); }
.proj-grid .v { font-size: 17px; font-weight: 600; }
a.banner { display: block; text-decoration: none; margin-bottom: 8px; }
.app-header > span { display: inline-flex; }

/* ---------- Calendario ---------- */
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-top: 6px; }
.cal-wd { text-align: center; font-size: 12px; color: var(--ink-3); font-weight: 600; padding: 4px 0; }
.cal-cell { aspect-ratio: 1 / 1.05; min-height: 44px; border: 0; border-radius: 10px; background: var(--mint-50); display: grid; align-content: center; justify-items: center; gap: 3px; cursor: pointer; color: var(--ink); padding: 0; }
.cal-cell.empty { background: transparent; cursor: default; }
.cal-cell .n { font-size: 14px; font-weight: 500; line-height: 1; }
.cal-cell.today .n { color: var(--mint-700); font-weight: 700; }
.cal-cell.today { box-shadow: inset 0 0 0 1.5px var(--mint-400); }
.cal-cell.sel { background: var(--mint-700); }
.cal-cell.sel .n { color: #fff; }
.dots { display: flex; gap: 2px; height: 6px; }
.dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.dot.event { background: #7F77DD; }
.dot.income { background: var(--mint-400); }
.dot.payment { background: var(--coral); }
.dot.overdue { background: var(--red); }
.dot.task { background: #4E6B64; }
.dot.done { background: #C9D9D4; }
.cal-cell.sel .dot.done { background: rgba(255,255,255,.55); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 10px; font-size: 12px; color: var(--ink-2); }
.cal-legend span { display: inline-flex; align-items: center; gap: 4px; }

/* ---------- Ahorro ---------- */
.goal { cursor: pointer; }
.goal .card-head h2 { display: inline-flex; align-items: center; gap: 6px; }
.goal .btn-row { margin-top: 10px; }
.calc { background: var(--mint-100); color: var(--mint-900); border-radius: 10px; padding: 10px 12px; font-size: 14px; display: flex; gap: 8px; align-items: flex-start; }
.calc:empty { display: none; }
.plain-link { color: inherit; text-decoration: none; display: grid; }

/* v1.4 · reembolsos, plan de deudas, cierre de mes */
.close-cta { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); border: 1px solid var(--mint-400); }
.close-cta .row-main { flex: 1; }
.close-step .card-head h2 { display: flex; align-items: center; gap: 8px; }
.step { width: 26px; height: 26px; border-radius: 50%; background: var(--mint-700); color: #fff; display: inline-grid; place-items: center; font-size: 14px; font-weight: 600; }
.recon { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.recon:last-child { border-bottom: 0; }
.recon-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.recon-main .row-title, .recon-main .row-sub { display: block; }
.recon.done .row-ico { background: var(--mint-700); color: #fff; }
.recon-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; margin-top: 8px; }
.recon-actions input { min-height: 44px; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; min-width: 0; font-size: 16px; }
.recon-actions .btn { min-height: 44px; padding: 0 12px; }
.row-item.compact { min-height: 40px; padding: 6px 0; }
.compare p { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0; font-size: 14px; }
.compare p .link-btn { margin-left: auto; padding: 0; min-height: 0; }
.debt-card .big { font-size: 28px; }
.debt-chart { width: 100%; height: 120px; display: block; }
.debt-chart .line { fill: none; stroke: var(--mint-700); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.debt-chart .area { fill: var(--mint-100); stroke: none; }
