/* Olimpo · portal · CSS propio (privacy-first: cero CDNs, cero fuentes externas).
   Usamos la pila de fuentes del sistema. Tema "Obsidiana": gestión de
   patrimonio / banca privada. Fondo obsidiana, esmeralda = dinero, oro = lujo. */

:root {
  --bg: #0e1512;
  --bg-elev: #161e1a;
  --bg-elev-2: #1c2722;
  --border: #22302a;
  --text: #e8efe9;
  --text-dim: #8fa39a;
  --text-mute: #687c72;
  --accent: #34d399;          /* esmeralda clara (enlaces) */
  --accent-strong: #10b981;   /* esmeralda (CTA, activo) */
  --on-accent: #06231a;       /* texto sobre esmeralda */

  --gold: #c8a04e;   --gold-bg: #2a2310;   /* oro: lujo / premium */

  --green: #34d399;  --green-bg: #0f2e22;
  --red: #f2786b;    --red-bg: #321614;    /* coral suave = gastos */
  --amber: #d9a93c;  --amber-bg: #2a2310;
  --blue: #5fb0e8;   --blue-bg: #102434;
  --teal: #2dd4bf;   --teal-bg: #0e2a26;
  --indigo: #a78bfa; --indigo-bg: #20183a;
  --slate: #94a3b8;  --slate-bg: #1a222a;
  --gray: #9aa4ac;   --gray-bg: #1c2420;

  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(0,0,0,.45);
  --glow: 0 0 0 1px rgba(16,185,129,.07), 0 10px 30px rgba(0,0,0,.45);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

/* -------- Tema CLARO ("marfil + verde dinero") · conmutable -------- */
[data-theme="light"] {
  --bg: #e9ecf0;
  --bg-elev: #ffffff;
  --bg-elev-2: #f1f4f6;
  --border: #e4e8ec;
  --text: #15201b;
  --text-dim: #5a6a61;
  --text-mute: #8b988f;
  --accent: #0a9d63;
  --accent-strong: #0a9d63;
  --on-accent: #ffffff;

  --gold: #a9821f;   --gold-bg: #f7eecf;

  --green: #0a9d63;  --green-bg: #e4f4ec;
  --red: #d65745;    --red-bg: #fbe9e5;
  --amber: #a9821f;  --amber-bg: #f7eecf;
  --blue: #2f6bdc;   --blue-bg: #e8f0fe;
  --teal: #0d9488;   --teal-bg: #d9f2ee;
  --indigo: #6d4ad6; --indigo-bg: #ece5fb;
  --slate: #51606b;  --slate-bg: #eef1f4;
  --gray: #5b6770;   --gray-bg: #eef1f3;

  --shadow: 0 1px 2px rgba(20,30,24,.04), 0 10px 30px rgba(20,30,24,.06);
  --glow: 0 1px 2px rgba(20,30,24,.04), 0 10px 30px rgba(20,30,24,.06);
}
/* Grafito sólido (tiles oscuros del bento), constante en ambos temas. */
:root { --graphite: #16211c; --graphite-2: #1f2c25; }
/* En claro, la tarjeta tipo banco se ve mejor con superficie blanca. */
[data-theme="light"] .wallet { background: linear-gradient(145deg, #ffffff, #f1f5f2); }
[data-theme="light"] .wallet--gold { background: linear-gradient(145deg, #fffaf0, #ffffff); }
[data-theme="light"] .card--feature {
  background: linear-gradient(160deg, #ffffff, var(--gold-bg));
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Layout con barra lateral ---------- */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 240px; flex-shrink: 0;
  background: var(--bg-elev);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 20px 14px;
  position: sticky; top: 0; height: 100vh;
}

.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 18px; }
.brand__logo { font-size: 24px; color: var(--gold); }
.brand__name { font-weight: 700; font-size: 19px; letter-spacing: .5px; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav__item {
  display: block; padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--text-dim); font-weight: 500;
}
.nav__item:hover { background: var(--bg-elev-2); color: var(--text); text-decoration: none; }
.nav__item.is-active { background: var(--accent-strong); color: var(--on-accent); font-weight: 700; }
.nav__item--ext { color: var(--text-mute); font-size: 14px; }
.nav__sep {
  margin: 18px 12px 6px; font-size: 11px; letter-spacing: 1px;
  text-transform: uppercase; color: var(--text-mute);
}

.sidebar__foot {
  margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.sidebar__user { font-size: 14px; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; }

.content { flex: 1; min-width: 0; padding: 24px 32px 56px; max-width: 1200px; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 22px;
}
.topbar__title { font-size: 24px; font-weight: 700; margin: 0; }
.topbar__actions { display: flex; gap: 10px; align-items: center; }

/* ===================== TOP NAV (menú arriba, elegante) ===================== */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.ic { width: 20px; height: 20px; display: block; flex-shrink: 0; }

.topnav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 18px;
  padding: 11px 26px;
  background: color-mix(in srgb, var(--bg-elev) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--border);
}
.brand--top { display: flex; align-items: center; gap: 9px; flex-shrink: 0; padding: 0; }

.topnav__menu { display: flex; gap: 3px; margin: 0 auto; flex-wrap: wrap; justify-content: center; }
.topnav__item {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 15px; border-radius: 999px;
  color: var(--text-dim); font-weight: 600; font-size: 14px;
  transition: background .15s, color .15s, box-shadow .15s;
}
.topnav__item:hover { background: var(--bg-elev-2); color: var(--text); text-decoration: none; }
.topnav__item.is-active { background: var(--accent-strong); color: #fff; box-shadow: 0 6px 16px rgba(10,157,99,.30); }
.topnav__item .ic { width: 18px; height: 18px; }

.topnav__right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.iconbtn {
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-dim); border: 1px solid var(--border); background: var(--bg-elev);
}
.iconbtn:hover { background: var(--bg-elev-2); color: var(--text); }
.iconbtn--active { background: var(--accent-strong); color: #fff; border-color: transparent; box-shadow: 0 6px 16px rgba(10,157,99,.30); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(150deg, #12c074, var(--accent-strong)); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px;
}

/* Menú de usuario (details, sin JS) */
.usermenu { position: relative; }
.usermenu__btn {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 8px 4px 4px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg-elev);
}
.usermenu__btn::-webkit-details-marker { display: none; }
.usermenu__btn .ic { width: 15px; height: 15px; color: var(--text-mute); }
.usermenu[open] .usermenu__btn { background: var(--bg-elev-2); }
.usermenu__panel {
  position: absolute; right: 0; top: calc(100% + 10px); width: 232px;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow); padding: 8px; z-index: 60;
}
.usermenu__head { padding: 8px 10px 4px; font-weight: 700; font-size: 14px; }
.usermenu__sep { height: 1px; background: var(--border); margin: 6px 6px; }
.usermenu__sep:not(:empty) {
  height: auto; background: none; margin: 0; padding: 10px 10px 4px;
  font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--text-mute); font-weight: 600;
}
.usermenu__item {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px;
  color: var(--text-dim); font-size: 14px; width: 100%;
  background: none; border: 0; cursor: pointer; font-family: inherit; text-align: left;
}
.usermenu__item:hover { background: var(--bg-elev-2); color: var(--text); text-decoration: none; }
.usermenu__item .ic { width: 17px; height: 17px; color: var(--text-mute); }

/* Sub-navegación (pestañas de Personal) */
.subnav { background: var(--bg-elev); border-bottom: 1px solid var(--border); position: sticky; top: 63px; z-index: 40; }
.subnav__inner { max-width: 1340px; margin: 0 auto; padding: 0 28px; display: flex; gap: 2px; }
.subnav__item {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 13px 14px; color: var(--text-dim); font-weight: 600; font-size: 14px;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.subnav__item:hover { color: var(--text); text-decoration: none; }
.subnav__item.is-active { color: var(--accent-strong); border-bottom-color: var(--accent-strong); }
.subnav__item .ic { width: 17px; height: 17px; }

/* Lienzo de página a todo el ancho */
.page { width: 100%; max-width: 1340px; margin: 0 auto; padding: 26px 28px 64px; }
/* flex-wrap: en móvil el título + acciones (Volver/Editar/Eliminar) no caben en una
   línea; sin wrap los botones se salían de la pantalla y no se podía borrar un airdrop.
   Ahora las acciones bajan a la línea siguiente y quedan siempre accesibles. */
.pagehead { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; margin-bottom: 22px; flex-wrap: wrap; }
.pagehead__title { font-size: 26px; font-weight: 700; margin: 0; letter-spacing: -.4px; }
.pagehead__actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

@media (max-width: 1040px) {
  .topnav__item span { display: none; }
  .topnav__item { padding: 9px; }
}
@media (max-width: 640px) {
  .topnav { flex-wrap: wrap; gap: 10px; padding: 10px 16px; }
  .topnav__menu { order: 3; width: 100%; }
  .subnav { top: 0; position: static; }
  .subnav__inner { padding: 0 16px; overflow-x: auto; }
  .page { padding: 18px 16px 48px; }
}

/* ---------- Flash ---------- */
.flash {
  border-radius: var(--radius-sm); padding: 11px 14px; margin-bottom: 18px;
  border: 1px solid var(--border); font-size: 14px;
}
/* color con variable (reacciona al tema): texto oscuro legible sobre los *-bg claros.
   Antes iba a hex del tema oscuro retirado (#c8f7e6...) -> verde sobre verde ilegible. */
.flash--ok  { background: var(--green-bg); border-color: var(--green); color: var(--green); }
.flash--err { background: var(--red-bg);  border-color: var(--red);  color: var(--red); }
.flash--info{ background: var(--blue-bg); border-color: var(--blue); color: var(--blue); }

/* ---------- Cards (dashboard) ---------- */
.cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px; margin-bottom: 24px;
}
.card {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--glow);
}
.card--feature {
  grid-column: span 1; border-color: var(--gold);
  background: linear-gradient(160deg, var(--bg-elev), var(--gold-bg));
}
.card__label { font-size: 13px; color: var(--text-dim); margin-bottom: 8px;
  text-transform: uppercase; letter-spacing: .6px; }
.card__value { font-size: 30px; font-weight: 700; letter-spacing: -.3px; }
.card__value--muted { color: var(--text-mute); font-size: 20px; }
.card--feature .card__value { font-size: 38px; color: var(--text); }
.card--feature .card__label { color: var(--gold); }
.card__meta { font-size: 12.5px; color: var(--text-mute); margin-top: 6px; }

/* ---------- Panels ---------- */
.panel {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; margin-bottom: 20px;
}
.panel__title { font-size: 16px; font-weight: 700; margin: 0 0 14px; }
.panel__title.mt { margin-top: 26px; }
.panel__subtitle { font-size: 13px; text-transform: uppercase; letter-spacing: .6px;
  color: var(--text-mute); margin: 20px 0 10px; }
.panel__hint, .panel__heading { color: var(--text-dim); font-size: 13.5px; margin: 0 0 14px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }

/* ---------- Tablas ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.table th { color: var(--text-dim); font-weight: 600; font-size: 12.5px;
  text-transform: uppercase; letter-spacing: .5px; }
.table tbody tr:hover { background: var(--bg-elev-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.row--suspect { background: var(--red-bg); }
.row--suspect:hover { background: #3d181c; }
.strong { font-weight: 600; }
.cap { text-transform: capitalize; }

/* ---------- Badges ---------- */
.badge {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1.6;
  border: 1px solid transparent; white-space: nowrap;
}
.badge--lg { font-size: 14px; padding: 5px 14px; }
.badge--green  { background: var(--green-bg);  color: var(--green);  border-color: var(--green); }
.badge--red    { background: var(--red-bg);    color: var(--red);    border-color: var(--red); }
.badge--amber  { background: var(--amber-bg);  color: var(--amber);  border-color: var(--amber); }
.badge--blue   { background: var(--blue-bg);   color: var(--blue);   border-color: var(--blue); }
.badge--teal   { background: var(--teal-bg);   color: var(--teal);   border-color: var(--teal); }
.badge--indigo { background: var(--indigo-bg); color: var(--indigo); border-color: var(--indigo); }
.badge--slate  { background: var(--slate-bg);  color: var(--slate);  border-color: var(--slate); }
.badge--gray   { background: var(--gray-bg);   color: var(--gray);   border-color: var(--gray); }
.badge--gold   { background: var(--gold-bg);   color: var(--gold);   border-color: var(--gold); }

.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-amber { color: var(--amber); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg-elev-2);
  color: var(--text); font-size: 14px; font-weight: 600; cursor: pointer;
  font-family: inherit; transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--border); text-decoration: none; }
.btn--sm { padding: 5px 10px; font-size: 13px; }
.btn--block { width: 100%; justify-content: center; }
.btn--primary { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent); }
.btn--primary:hover { background: #34d399; border-color: #34d399; }
.btn--gold { background: var(--gold); border-color: var(--gold); color: #221a06; }
.btn--gold:hover { background: #d9b25e; border-color: #d9b25e; }
.btn--ghost { background: transparent; }
.btn--danger { background: var(--red-bg); border-color: var(--red); color: var(--red); }
.btn--danger:hover { background: #4a1a1f; }
.btn--outline { background: transparent; }
.btn--outline.btn--green { border-color: var(--green); color: var(--green); }
.btn--outline.btn--red { border-color: var(--red); color: var(--red); }
.btn--outline.btn--amber { border-color: var(--amber); color: var(--amber); }
.btn--outline.btn--teal { border-color: var(--teal); color: var(--teal); }
.btn--outline.btn--indigo { border-color: var(--indigo); color: var(--indigo); }
.btn--outline.btn--blue { border-color: var(--blue); color: var(--blue); }
.btn--outline.btn--gray { border-color: var(--gray); color: var(--gray); }
.btn--outline.btn--slate { border-color: var(--slate); color: var(--slate); }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Forms ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.form--row { flex-direction: row; align-items: flex-end; gap: 8px; margin-top: 14px; }
.form__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--inline { flex-direction: row; align-items: center; gap: 10px; }
.field--check { flex-direction: row; align-items: center; gap: 8px; color: var(--text-dim); font-size: 14px; }
.field__label { font-size: 13px; color: var(--text-dim); font-weight: 500; }
.field__label small { color: var(--text-mute); font-weight: 400; }
.field__input {
  background: var(--bg); border: 1px solid var(--border); color: var(--text);
  border-radius: var(--radius-sm); padding: 9px 11px; font-size: 14px;
  font-family: inherit; width: 100%;
}
.field__input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(16,185,129,.22); }
.field__input--sm { width: 80px; }
textarea.field__input { resize: vertical; }
.filters { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }

/* ---------- Detail list ---------- */
.detail { display: grid; grid-template-columns: 130px 1fr; gap: 8px 14px; margin: 0; font-size: 14px; }
.detail dt { color: var(--text-mute); }
.detail dd { margin: 0; word-break: break-word; }
.mono { font-family: var(--mono); font-size: 13px; }
.mono--ellipsis { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: bottom; }

/* ---------- Checklist ---------- */
.checklist { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-direction: column; gap: 6px; }
.checklist__item { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.checklist__item.is-done .checklist__text { color: var(--text-mute); text-decoration: line-through; }
.checklist__form { display: inline-flex; }
.checkbox {
  width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--bg); color: var(--green); cursor: pointer; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.checklist__item.is-done .checkbox { border-color: var(--green); background: var(--green-bg); }

/* ---------- Reminders ---------- */
.reminders { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.reminder { background: var(--bg-elev-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 10px 12px; }
.reminder--critical { border-color: var(--red); background: var(--red-bg); }
.reminder__head { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 4px; }
.reminder__msg { font-size: 14px; }
.reminder__meta { font-size: 12px; color: var(--text-mute); margin-top: 4px; }

/* ---------- Alerts ---------- */
.alerts { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 10px; }
.alert-row { display: flex; gap: 12px; align-items: flex-start; }
.alert-row__title { font-weight: 600; font-size: 14px; }
.alert-row__meta { font-size: 12px; color: var(--text-mute); }
.alerts--full { gap: 14px; }
.alert-card { background: var(--bg-elev-2); border: 1px solid var(--border);
  border-left-width: 4px; border-radius: var(--radius-sm); padding: 14px 16px; }
.alert-card--red { border-left-color: var(--red); }
.alert-card--amber { border-left-color: var(--amber); }
.alert-card--blue { border-left-color: var(--blue); }
.alert-card--gray { border-left-color: var(--gray); }
.alert-card__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.alert-card__title { font-weight: 700; }
.alert-card__date { margin-left: auto; font-size: 12px; color: var(--text-mute); }
.alert-card__body { margin: 8px 0; font-size: 14px; color: var(--text-dim); }
.alert-card__meta { font-size: 12px; color: var(--text-mute); }

.empty { color: var(--text-mute); font-size: 14px; padding: 8px 0; }
.link { font-size: 13px; }

/* ---------- Finanzas (ingresos / gastos del mes) ---------- */
.finanzas-flujo { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.flujo {
  flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 4px;
  background: var(--bg-elev-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 14px;
}
.flujo__label { font-size: 12.5px; color: var(--text-mute); }
.flujo__val { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- Auth (login / setup) ---------- */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth__card {
  width: 100%; max-width: 380px; background: var(--bg-elev);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 32px 28px; box-shadow: var(--shadow);
}
.brand--auth { justify-content: center; padding-bottom: 6px; }
.auth__sub { text-align: center; color: var(--text-dim); font-size: 14px; margin: 0 0 20px; }
.auth__note { text-align: center; color: var(--text-mute); font-size: 12px; margin: 16px 0 0; }

/* ---------- Dashboard: saludo / fecha ---------- */
.topbar__date { color: var(--text-dim); font-size: 14px; font-weight: 500; }

/* ---------- Casa ---------- */
.periodo-form { display: flex; gap: 8px; align-items: center; }
.cell-sub { font-size: 12px; color: var(--text-mute); text-transform: capitalize; }
/* Tablas con celdas editables (inputs en línea) */
.table--edit td { padding: 6px 8px; vertical-align: middle; }
.field__input--cell { padding: 6px 8px; font-size: 13px; min-width: 90px; }
.field__input--sm[type="date"] { width: 130px; }
.actions-cell { white-space: nowrap; display: flex; gap: 4px; justify-content: flex-end; align-items: center; }
.actions-cell .btn { padding: 5px 9px; }

/* Zonas Hogar: ① Presupuesto vs ② Registro */
.panel--zone { border-width: 1px; }
.zone-tag { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; padding: 3px 10px; border-radius: 999px; margin-left: 8px; vertical-align: middle; }
.zone-tag--plan { background: var(--blue-bg); color: var(--blue); }
.zone-tag--real { background: var(--green-bg); color: var(--green); }

/* (La "Regla 50/30/20" se retiró en v0.10 — aquí no aportaba nada útil.) */

/* ---------- Dashboard: tarjetas wallet (cuentas) ---------- */
.wallets {
  display: flex; gap: 14px; overflow-x: auto; padding: 2px 2px 12px;
  margin-bottom: 22px; scrollbar-width: thin;
}
.wallet {
  flex: 0 0 200px; min-height: 116px;
  background: linear-gradient(145deg, var(--bg-elev-2), var(--bg-elev));
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.wallet::after {
  content: ""; position: absolute; right: -30px; top: -30px;
  width: 90px; height: 90px; border-radius: 50%;
  background: radial-gradient(circle, rgba(16,185,129,.10), transparent 70%);
}
.wallet--gold {
  border-color: var(--gold);
  background: linear-gradient(145deg, var(--gold-bg), var(--bg-elev));
}
.wallet--gold::after { background: radial-gradient(circle, rgba(200,160,78,.18), transparent 70%); }
.wallet__top { display: flex; align-items: center; justify-content: space-between; }
.wallet__bank { font-weight: 600; font-size: 14px; color: var(--text); }
.wallet__chip {
  width: 26px; height: 18px; border-radius: 4px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold), #8a6f33);
}
.wallet__balance { font-size: 22px; font-weight: 700; letter-spacing: -.3px; font-variant-numeric: tabular-nums; }
.wallet__foot { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-mute); }
.wallet__cur { font-family: var(--mono); }

/* ---------- Dashboard: rejilla central (barras / dona / cripto) ---------- */
.dash-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 20px; margin-bottom: 20px;
  align-items: start;
}

/* Barras de patrimonio por entidad */
.bars { list-style: none; margin: 0 0 4px; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.bar__head { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; }
.bar__track { height: 10px; background: var(--bg-elev-2); border-radius: 999px; overflow: hidden; }
.bar__fill { height: 100%; border-radius: 999px; min-width: 2px; transition: width .4s ease; }
.bars__total { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; color: var(--text-dim); font-size: 14px; }
.bars__total strong { color: var(--text); font-size: 16px; }

/* Dona SVG */
.donut-wrap { position: relative; width: 168px; height: 168px; margin: 4px auto 14px; }
.donut { width: 100%; height: 100%; display: block; }
.donut__bg { stroke: var(--bg-elev-2); }
.donut__center { position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px; }
.donut__cap { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--text-mute); }
.donut__val { font-size: 18px; font-weight: 700; }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.legend__item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-dim); }
.legend__dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.legend__pct { margin-left: auto; color: var(--text); font-variant-numeric: tabular-nums; }

/* Tarjeta cripto */
.crypto-total { font-size: 24px; font-weight: 700; margin-bottom: 12px; }
.crypto-list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.crypto-row { display: flex; align-items: center; gap: 10px; }
.crypto-row__icon {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
  background: var(--gold-bg); color: var(--gold); border: 1px solid var(--gold);
}
.crypto-row__body { flex: 1; min-width: 0; }
.crypto-row__name { font-weight: 600; font-size: 14px; }
.crypto-row__sub { font-size: 12px; color: var(--text-mute); font-family: var(--mono); }
.crypto-row__val { font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- Dashboard: movimientos ---------- */
.movs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.mov { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.mov:last-child { border-bottom: 0; }
.mov__icon {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700;
}
.mov__icon--in { background: var(--green-bg); color: var(--green); }
.mov__icon--out { background: var(--red-bg); color: var(--red); }
.mov__body { flex: 1; min-width: 0; }
.mov__desc { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mov__meta { font-size: 12px; color: var(--text-mute); }
.mov__amt { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- BENTO (dashboard mosaico, estilo referencia) ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  /* Altura automática: cada tarjeta se ajusta a su contenido. Antes era 168px FIJO,
     lo que estiraba también las filas de los títulos (huecos vacíos bajo Patrimonio/
     Hogar) y forzaba tarjetas cuadradas. Ahora es un stack de tarjetas limpio. */
  grid-auto-rows: auto;
  align-items: start;
  /* SIN `dense`: cada título (grid-column: 1/-1) corta limpio su sección. Con `dense`,
     el hueco que deja una sección impar (p. ej. "Ahorro" en Personal) lo rellenaba la
     primera tarjeta de la sección siguiente → "Patrimonio·Empresa" se colaba en Personal
     y "Bote de la casa" en Inversión, dejando el título Hogar vacío más abajo. */
  grid-auto-flow: row;
  gap: 16px;
  margin-bottom: 20px;
}
.tile {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; position: relative; overflow: hidden;
  min-width: 0;
  transition: transform .18s ease, box-shadow .18s ease;
}
.tile:hover { transform: translateY(-3px); box-shadow: 0 2px 6px rgba(20,30,24,.05), 0 18px 40px rgba(20,30,24,.10); }
.tile--2x2 { grid-column: span 2; }
.tile--2x1 { grid-column: span 2; }
.tile--1x2 { grid-column: span 1; }

.tile__label { font-size: 11.5px; letter-spacing: .7px; text-transform: uppercase; color: var(--text-mute); font-weight: 600; }
.tile__value { font-size: 30px; font-weight: 700; letter-spacing: -.6px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.tile--hero .tile__value { font-size: 50px; line-height: 1.05; }
.tile__meta { font-size: 12.5px; color: var(--text-mute); margin-top: auto; }
.tile__delta { font-size: 13px; font-weight: 700; margin-top: 8px; }
.tile__delta--up { color: var(--green); } .tile__delta--down { color: var(--red); }
.tile__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tile__spark { margin-top: auto; }

/* Variantes PASTEL suaves (estilo Apple, sin oscuros) */
.tile--mint { background: linear-gradient(160deg, #ecfaf2, #ddf3e6); border-color: #d4ecdd; }
.tile--mint .tile__value { color: #088457; }
.tile--mint .tile__label { color: #5d9a7e; }
.tile--mint .tile__meta { color: #6fa389; }
.tile--cream { background: linear-gradient(160deg, #fbf5e2, #f6ecc9); border-color: #ecdfb6; }
.tile--cream .tile__value { color: #7c6011; }
.tile--cream .tile__label { color: #9a8126; } .tile--cream .tile__meta { color: #9a8740; }
.tile--sky { background: linear-gradient(160deg, #ecf2fe, #dfe9fe); border-color: #d6e2fb; }
.tile--sky .tile__value { color: #2553b8; } .tile--sky .tile__label { color: #5b7ec4; }
.tile--lilac { background: linear-gradient(160deg, #f2ecfc, #e8defb); border-color: #ddcef7; }
.tile--lilac .tile__value { color: #5b3bbf; } .tile--lilac .tile__label { color: #8064c9; }

/* Hero: patrimonio + mini desglose */
.tile--hero .hero-breakdown { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 12.5px; color: var(--text-dim); }
.tile--hero .hero-breakdown b { color: var(--text); font-weight: 600; }

/* Dos mitades dentro de un tile (Personal | Empresa) */
.tile-split { display: grid; grid-template-columns: 1fr 1px 1fr; gap: 0 16px; align-items: stretch; height: 100%; }
.tile-split__div { background: var(--border); }
.tile-split__half { display: flex; flex-direction: column; justify-content: center; }
.tile-split__half .tile__value { font-size: 24px; }

/* Bitcoin / cripto dentro de tile grafito */
.tile-crypto__row { display: flex; align-items: center; gap: 10px; margin-top: auto; }
.tile-crypto__icon { width: 30px; height: 30px; border-radius: 50%; display:flex; align-items:center; justify-content:center; background: rgba(200,160,78,.18); color: var(--gold); border: 1px solid rgba(200,160,78,.5); font-size: 15px; }

/* Mini dona dentro de tile */
.tile .donut-wrap { width: 110px; height: 110px; margin: 0; }
.tile .donut__val { font-size: 14px; }
.tile-dona { flex-direction: row; align-items: center; gap: 16px; }
.tile-dona .legend { flex: 1; }

/* Movimientos dentro de tile (compacto) */
.tile .movs { margin-top: 6px; }
.tile .mov { padding: 8px 0; }

/* Sello "En vivo" sobre tiles claros */
.badge--live { background: var(--green-bg); color: var(--green); border-color: var(--green); }

/* Píldora de navegación más suave + filo activo */
.nav__item { border-radius: 999px; padding: 10px 14px; }
.nav__item.is-active { box-shadow: 0 6px 16px rgba(10,157,99,.28); }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .tile--2x2 { grid-column: span 2; }
}
@media (max-width: 1080px) {
  .dash-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .bento { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .tile, .tile--2x2, .tile--2x1, .tile--1x2 { grid-column: auto; grid-row: auto; min-height: 0; }
  .tile--hero .tile__value { font-size: 40px; }
}
@media (max-width: 860px) {
  .dash-grid { grid-template-columns: 1fr; }
  .layout { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row;
    flex-wrap: wrap; align-items: center; gap: 8px; }
  .sidebar .nav { flex-direction: row; flex-wrap: wrap; }
  .nav__sep { display: none; }
  .sidebar__foot { margin: 0 0 0 auto; border: 0; padding: 0; }
  .content { padding: 18px; }
  .grid-2 { grid-template-columns: 1fr; }
  .form__cols { grid-template-columns: 1fr; }
}

/* ===========================================================================
   Entidad (Personal/Empresa): barra de periodo, cuentas por divisa, año, edición
   =========================================================================== */
.periodbar {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 18px; flex-wrap: wrap;
}
.periodbar__nav {
  width: 36px; height: 36px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 20px; line-height: 1; text-decoration: none;
  color: var(--text); background: var(--bg-elev);
  border: 1px solid var(--border); box-shadow: var(--shadow);
}
.periodbar__nav:hover { border-color: var(--accent); color: var(--accent); }
.periodbar__label { font-size: 17px; font-weight: 700; min-width: 150px; text-align: center; }
.periodbar__toggle { margin-left: auto; display: inline-flex; background: var(--bg-elev);
  border: 1px solid var(--border); border-radius: 999px; padding: 3px; box-shadow: var(--shadow); }
.seg { padding: 6px 16px; border-radius: 999px; font-size: 13px; font-weight: 600;
  text-decoration: none; color: var(--text-dim); }
.seg--on { background: var(--accent-strong); color: var(--on-accent); }

/* Salto rápido de mes: tira de chips + desplegable (sin JS) */
.periodjump {
  display: flex; align-items: center; gap: 14px 18px; flex-wrap: wrap;
  margin: 0 0 18px;
}
.periodjump__chips { display: flex; gap: 6px; flex-wrap: wrap; }
.mchip {
  padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  text-decoration: none; color: var(--text-dim);
  background: var(--bg-elev); border: 1px solid var(--border);
  white-space: nowrap;
}
.mchip:hover { border-color: var(--accent); color: var(--accent); }
.mchip--on { background: var(--accent-strong); color: var(--on-accent); border-color: transparent; }
.periodjump__pick { display: inline-flex; align-items: center; gap: 8px; }
.periodjump__lbl { font-size: 13px; color: var(--text-dim); font-weight: 600; }
.periodjump__sel {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 7px 10px; font-size: 13px;
  color: var(--text); font-weight: 600;
}
.periodjump__go { padding: 7px 14px; font-size: 13px; }

/* Cuentas agrupadas por divisa */
.divisas { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.divisa { background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px; box-shadow: var(--shadow); }
.divisa__head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.divisa__flag { font-size: 30px; line-height: 1; }
.divisa__code { font-weight: 800; font-size: 15px; letter-spacing: .02em; }
.divisa__pais { font-size: 12px; color: var(--text-mute); }
.divisa__total { margin-left: auto; text-align: right; }
.divisa__amount { font-weight: 800; font-size: 16px; }
.divisa__eur { font-size: 12px; color: var(--text-mute); }
.divisa__accs { list-style: none; margin: 0; padding: 10px 0 0; border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 8px; }
.divisa__acc { display: flex; justify-content: space-between; font-size: 13px; }
.divisa__acc-name { color: var(--text-dim); }
.divisa__acc-bal { font-variant-numeric: tabular-nums; font-weight: 600; }

/* Mini-gráfico anual: barras ingresos/gastos por mes */
.yearchart { display: flex; align-items: flex-end; gap: 8px; height: 180px; padding: 6px 0; }
.yearchart__col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; }
.yearchart__bars { flex: 1; display: flex; align-items: flex-end; gap: 3px; width: 100%; justify-content: center; }
.yearchart__bar { width: 42%; min-height: 2px; border-radius: 4px 4px 0 0; }
.yearchart__bar--in { background: var(--green); }
.yearchart__bar--out { background: var(--red); }
.yearchart__m { font-size: 11px; color: var(--text-mute); margin-top: 6px; }
.yearchart__legend { display: flex; gap: 18px; font-size: 12px; color: var(--text-dim); margin-top: 10px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: middle; margin-right: 4px; }
.dot--in { background: var(--green); }
.dot--out { background: var(--red); }

/* Edición inline de categoría en movimientos */
.hint { font-size: 12px; color: var(--text-mute); margin: -6px 0 10px; }
.movs--scroll { max-height: 460px; overflow-y: auto; }
.catedit { display: inline; }
.catedit__sel { font-size: 12px; color: var(--accent); background: transparent;
  border: 1px dashed var(--border); border-radius: 8px; padding: 1px 4px; cursor: pointer;
  max-width: 180px; font-family: inherit; }
.catedit__sel:hover { border-color: var(--accent); }

/* ===========================================================================
   Modo privacidad: oculta (desenfoca) todos los importes con un toque
   =========================================================================== */
/* La clase .privacy vive en <html>. Todo importe se desenfoca y no se puede
   seleccionar/copiar mientras está activo. */
/* .money = convención única: cualquier importe envuelto con ella queda cubierto por
   construcción (listas, badges, tablas), sin depender de acordarse de cada clase. El
   resto de selectores son red de seguridad para los importes ya marcados por su clase. */
html.privacy .money,
html.privacy .tile__value,
html.privacy .card__value,
html.privacy .donut__val,
html.privacy .hero-breakdown b,
html.privacy .divisa__amount,
html.privacy .divisa__eur,
html.privacy .divisa__acc-bal,
html.privacy .mov__amt,
html.privacy .bar__head .strong,
html.privacy .aporte__amt,
html.privacy .aporte__falta,
html.privacy .aportes-total strong,
html.privacy .num,
html.privacy .yearchart {
  filter: blur(10px);
  -webkit-filter: blur(10px);
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
  transition: filter .12s ease;
}

/* Botón ojo: alterna eye / eye-off según el estado de privacidad. */
.privacy-toggle { cursor: pointer; }
.privacy-toggle .pv-eye,
.privacy-toggle .pv-eyeoff { display: inline-flex; }
.privacy-toggle .pv-eyeoff { display: none; }
html.privacy .privacy-toggle .pv-eye { display: none; }
html.privacy .privacy-toggle .pv-eyeoff { display: inline-flex; }
.privacy-toggle.is-on { color: var(--accent-strong); border-color: var(--accent); }

/* Privacidad: ocultar también metadatos con cifras (bote casa, BTC, %, etc.). */
html.privacy .mono,
html.privacy .tile__meta,
html.privacy .card__meta {
  filter: blur(8px);
  -webkit-filter: blur(8px);
  user-select: none;
  pointer-events: none;
}

/* ===========================================================================
   Ingresos por fuente (donut + leyenda) + reconciliación del disponible
   =========================================================================== */
.fuente-grid {
  display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center;
}
@media (max-width: 560px) { .fuente-grid { grid-template-columns: 1fr; } }
.fuente-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fuente-item {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px;
  padding: 8px 12px; background: var(--surface-2, rgba(0,0,0,.03)); border-radius: 12px;
}
.fuente-dot { width: 12px; height: 12px; border-radius: 999px; display: inline-block; }
.fuente-name { font-weight: 600; }
.fuente-eur { font-variant-numeric: tabular-nums; }

.reconcile {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
  margin-top: 18px; padding: 14px 16px; border: 1px dashed var(--border);
  border-radius: var(--radius-sm); background: var(--surface-2, rgba(0,0,0,.02));
}
.reconcile__cell { display: flex; flex-direction: column; line-height: 1.15; }
.reconcile__cell b { font-size: 17px; font-variant-numeric: tabular-nums; }
.reconcile__cell small { color: var(--muted); font-size: 12px; }
.reconcile__op { font-size: 18px; color: var(--muted); font-weight: 700; }
.reconcile__cell--total b { color: var(--accent-strong); }
.reconcile__cell--total { padding-left: 4px; }

/* ---------- Recibos ---------- */
.recibo-form__grid { display: grid; grid-template-columns: 1fr 2fr; gap: 14px; }
@media (max-width: 560px) { .recibo-form__grid { grid-template-columns: 1fr; } }
.recibo-form__actions { display: flex; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.recibo-confirm { display: grid; grid-template-columns: 1fr 1.2fr; gap: 20px; align-items: start; }
@media (max-width: 720px) { .recibo-confirm { grid-template-columns: 1fr; } }
.recibo-img {
  max-width: 100%; border-radius: 12px; border: 1px solid var(--border);
  display: block; margin-top: 8px;
}

/* ===========================================================================
   Jarras (sobres virtuales)
   =========================================================================== */
.jarras-sum { margin-left: auto; font-size: 14px; color: var(--text-dim); display: flex; align-items: center; gap: 8px; }
.jarras-sum--bad strong { color: var(--red); }

.jarras-sim__row { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.jarras-sim__row .field { flex: 1 1 180px; }
.jarras-sim__row .btn { flex: 0 0 auto; }

.jars { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin: 18px 0; }
.jar {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px;
}
.jar--linked { border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal), var(--shadow); }
.jar__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.jar__title { font-weight: 700; font-size: 15px; }
.jar__pct { font-weight: 800; color: var(--accent-strong); font-variant-numeric: tabular-nums; }
.jar__sim { display: flex; align-items: baseline; justify-content: space-between;
  background: var(--green-bg); border-radius: 10px; padding: 8px 12px; }
.jar__sim-cap { font-size: 12px; color: var(--text-mute); }
.jar__sim-val { font-weight: 800; font-size: 17px; color: var(--green); }
.jar__acum-cap { font-size: 12px; color: var(--text-mute); }
.jar__acum-val { font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; }
.jar__bar { height: 7px; background: var(--bg); border-radius: 999px; overflow: hidden; margin-top: 6px; }
.jar__fill { height: 100%; background: var(--accent-strong); border-radius: 999px; }
.jar__link { font-size: 12px; }
.jar__edit { font-size: 13px; }
.jar__edit > summary { cursor: pointer; color: var(--text-dim); font-size: 12px; list-style: none; }
.jar__edit > summary:hover { color: var(--accent); }
.jar__edit[open] > summary { margin-bottom: 10px; }
.jar__form { display: flex; flex-direction: column; gap: 10px; }
.jarras-apply { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }

/* ---- Registrar movimiento (entidad Personal/Empresa) + tarjeta rápida ---- */
.regmov {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 6px 18px; margin-bottom: 20px;
  box-shadow: var(--glow);
}
.regmov__summary {
  cursor: pointer; font-weight: 700; color: var(--accent-strong);
  padding: 12px 2px; list-style: none; user-select: none;
}
.regmov__summary::-webkit-details-marker { display: none; }
.regmov[open] .regmov__summary { border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.regmov__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px; padding-bottom: 6px;
}
.field--wide { grid-column: 1 / -1; }
.field__hint { color: var(--text-mute); font-weight: 400; font-size: 12px; }
.regmov__actions { display: flex; align-items: center; gap: 12px; padding: 12px 0 14px; flex-wrap: wrap; }
.regmov__note { color: var(--text-dim); font-size: 13px; }

/* Tarjeta compacta "Movimiento rápido" del dashboard */
.quickmov__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px;
}
.quickmov__row { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }

/* ---- Changelog / novedades ---- */
.changelog { display: flex; flex-direction: column; gap: 16px; }
.clog {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--glow);
}
.clog--latest { border-color: var(--accent-strong); }
.clog__head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.clog__ver { font-weight: 800; font-size: 18px; color: var(--text); }
.clog__date { color: var(--text-dim); font-size: 13px; }
.clog__list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.clog__item { display: flex; gap: 10px; align-items: flex-start; }
.clog__text { color: var(--text); font-size: 14.5px; line-height: 1.5; }
.clog__notes { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border);
  color: var(--text-dim); font-size: 13px; font-style: italic; }
.clogbadge {
  flex: 0 0 auto; font-size: 11.5px; font-weight: 700; padding: 3px 9px;
  border-radius: 999px; white-space: nowrap; margin-top: 1px;
}
.clogbadge--feat     { background: var(--green-bg); color: var(--green); }
.clogbadge--fix      { background: var(--amber-bg); color: var(--amber); }
.clogbadge--security { background: var(--red-bg);   color: var(--red); }
.clogbadge--refactor { background: var(--blue-bg);  color: var(--blue); }
.clogbadge--docs     { background: var(--teal-bg);  color: var(--teal); }
.clogbadge--chore    { background: var(--bg-elev-2); color: var(--text-dim); }

/* ==========================================================================
   v0.7.0 — Plantillas (chips), editar/borrar movimientos, gráfica patrimonio
   ========================================================================== */

/* --- Chips de plantillas rápidas (un toque = movimiento) --- */
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; }
.chips--tile { margin: 8px 0 10px; }
.chips__label { font-size: 13px; color: var(--text-mute); }
.chips__form { display: inline-flex; margin: 0; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--bg-elev-2); border: 1px solid var(--border);
  color: var(--text); border-radius: 999px; padding: 7px 13px;
  font-size: 13px; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s;
}
.chip:hover { background: var(--green-bg); border-color: var(--green); color: var(--green); }
.chips__manage { font-size: 12.5px; color: var(--text-mute); margin-left: 4px; }

/* --- Guardar como plantilla (bajo el grid de registrar movimiento) --- */
.regmov__plantilla { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 12px 0 4px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-dim); cursor: pointer; }
.regmov__plantilla-nombre { max-width: 240px; }

/* --- Acciones editar/borrar en cada movimiento --- */
.mov__actions { display: inline-flex; align-items: center; gap: 2px; margin-left: 8px; }
.mov__act-form { display: inline-flex; margin: 0; }
.mov__act {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px; border: 0; background: transparent;
  color: var(--text-mute); font-size: 14px; text-decoration: none; cursor: pointer;
}
.mov__act:hover { background: var(--bg-elev-2); color: var(--text); }
.mov__act--del:hover { background: var(--red-bg); color: var(--red); }

/* --- Metadatos del movimiento en edición --- */
.editmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 14px; }
.editmeta__acc { font-size: 13px; color: var(--text-mute); }

/* --- Lista de plantillas (página de gestión) --- */
.plist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.plist__item { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px; background: var(--bg-elev-2); border-radius: 10px; }
.plist__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.plist__name { font-weight: 600; font-size: 14px; }
.plist__meta { font-size: 12.5px; color: var(--text-mute); }

/* --- Gráfica de patrimonio (SVG server-rendered) --- */
.networth-chart { display: block; width: 100%; height: 64px; margin: 6px 0 2px; overflow: visible; }

/* --- Objetivos táctiles cómodos en móvil (PWA) --- */
@media (max-width: 640px) {
  .regmov__grid .field__input,
  .quickmov .field__input,
  .chip,
  .btn { min-height: 44px; }
  .chips { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .mov__act { width: 38px; height: 38px; }
  .regmov__plantilla-nombre { max-width: 100%; }
}

/* --- Pie de página: nombre + versión enlazando al changelog --- */
.appfoot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; max-width: 1180px; margin: 28px auto 20px; padding: 14px 20px 0;
  border-top: 1px solid var(--border);
  font-size: 12.5px; color: var(--text-mute);
}
.appfoot__brand { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.appfoot__logo { color: var(--accent-strong); }
.appfoot__ver { color: var(--text-mute); text-decoration: none; }
a.appfoot__ver:hover { color: var(--accent-strong); }
.appfoot--auth { max-width: 420px; justify-content: center; gap: 8px; }

/* --- Detalle de monedas en el tile de Cripto --- */
.cripto-list { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.cripto-row { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: baseline;
  font-size: 12.5px; }
.cripto-row__asset { font-weight: 600; color: var(--text); }
.cripto-row__amt { color: var(--text-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cripto-row__eur { color: var(--text-dim); font-variant-numeric: tabular-nums; }

/* ==========================================================================
   v0.8.0 "Claridad" — vista contable (ingresos|gastos), cuentas enlazables
   ========================================================================== */
.ledger { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ledger__col { min-width: 0; }
.ledger__head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--text-dim);
  padding: 0 0 8px; margin-bottom: 6px; border-bottom: 1px solid var(--border);
}
.ledger__head--in  { color: var(--green); }
.ledger__head--out { color: var(--red); }
.panel--traspasos { margin-top: 14px; }
.divisa__acc-link { color: var(--text); text-decoration: none; }
.divisa__acc-link:hover { color: var(--accent-strong); }

@media (max-width: 720px) {
  .ledger { grid-template-columns: 1fr; }
}

/* --- Secciones del inicio (separan dominios: Patrimonio/Personal/Empresa/...) --- */
.bento__section {
  grid-column: 1 / -1; margin: 10px 0 -4px; padding: 0 2px;
  font-size: 13px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase;
  color: var(--text-mute);
}
.bento__section:first-child { margin-top: 0; }
.bento__section small { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--text-mute); }
/* Empresa: dorado (coherente con la paleta de entidades) */
.tile--gold { background: linear-gradient(160deg, #fbf3df, #f7eccf); border-color: #efe0b8; }
.tile--gold .tile__value { color: #8a6d16; } .tile--gold .tile__label { color: #a9821f; }

/* --- Panel de aviso (p.ej. "por migrar a Ghostfolio") --- */
.panel--warn { border-color: var(--amber); background: var(--amber-bg); }

/* ===========================================================================
   REDISEÑO v0.10 — tokens de espaciado, saludo especial, hamburguesa/drawer,
   barra inferior con "+", quick-add, barra de gasto segmentada y progreso.
   Todo server-rendered / CSS puro (CSP script-src 'self', cero JS inline).
   =========================================================================== */
:root {
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 22px; --space-6: 30px; --space-7: 40px; --space-8: 56px;
  --fab: 58px;                 /* diámetro del botón "+" central */
  --botnav-h: 68px;            /* alto de la barra inferior móvil */
}

/* ---------- Saludo especial (dashboard) ---------- */
.greet { display: inline-flex; align-items: center; gap: 14px; }
.greet__icon {
  width: 46px; height: 46px; border-radius: 16px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.04);
}
.greet__icon .ic { width: 24px; height: 24px; }
.greet__icon--sun    { background: linear-gradient(150deg,#fff3d0,#ffe19b); color: #c8890f; }
.greet__icon--sunset { background: linear-gradient(150deg,#ffe6d6,#ffd0b0); color: #d5663a; }
.greet__icon--moon   { background: linear-gradient(150deg,#e4e9fb,#cfd8f6); color: #5566c9; }
.greet__text { display: flex; flex-direction: column; line-height: 1.15; }
.greet__hello { font-size: 24px; font-weight: 800; letter-spacing: -.5px; }
.greet__name {
  background: linear-gradient(96deg, var(--accent-strong), #12c074 60%, var(--teal));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.greet__sub { font-size: 13px; color: var(--text-mute); font-weight: 500; margin-top: 2px; }
.pagehead__title .greet { font-weight: inherit; }

/* ---------- Hamburguesa ---------- */
.hamb {
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-dim); border: 1px solid var(--border); background: var(--bg-elev);
}
.hamb:hover { background: var(--bg-elev-2); color: var(--text); }

/* ---------- Drawer lateral (menú completo) ---------- */
.drawer__scrim {
  position: fixed; inset: 0; z-index: 90; background: rgba(15,25,20,.42);
  opacity: 0; pointer-events: none; transition: opacity .22s ease;
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.drawer {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 100; width: min(320px, 86vw);
  background: var(--bg-elev); border-right: 1px solid var(--border);
  box-shadow: 0 10px 40px rgba(20,30,24,.18);
  transform: translateX(-100%); transition: transform .24s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column; padding: 14px 12px; overflow-y: auto;
}
.drawer.is-open { transform: none; }
.drawer__scrim.is-open { opacity: 1; pointer-events: auto; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 14px; }
.drawer__nav { display: flex; flex-direction: column; gap: 2px; }
.drawer__item {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px;
  color: var(--text-dim); font-weight: 600; font-size: 15px;
  background: none; border: 0; width: 100%; cursor: pointer; font-family: inherit; text-align: left;
}
.drawer__item:hover { background: var(--bg-elev-2); color: var(--text); text-decoration: none; }
.drawer__item.is-active { background: var(--accent-strong); color: #fff; box-shadow: 0 6px 16px rgba(10,157,99,.28); }
.drawer__item .ic { width: 19px; height: 19px; flex-shrink: 0; }
.drawer__sep {
  margin: 14px 12px 6px; font-size: 11px; letter-spacing: .8px; text-transform: uppercase;
  color: var(--text-mute); font-weight: 700;
}
.drawer__sep:empty { margin: 8px 12px; border-top: 1px solid var(--border); }

/* ---------- Barra inferior (móvil) con "+" central ---------- */
.botnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; display: none;
  align-items: flex-end; justify-content: space-around;
  height: calc(var(--botnav-h) + env(safe-area-inset-bottom, 0px));
  padding: 0 8px env(safe-area-inset-bottom, 0px);
  background: color-mix(in srgb, var(--bg-elev) 90%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-top: 1px solid var(--border);
}
.botnav__item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 11px 0 10px; color: var(--text-mute); font-size: 11px; font-weight: 600;
}
.botnav__item:hover { text-decoration: none; }
.botnav__item .ic { width: 22px; height: 22px; }
.botnav__item.is-active { color: var(--accent-strong); }
.botnav__fab {
  flex: 0 0 var(--fab); width: var(--fab); height: var(--fab); border-radius: 50%;
  transform: translateY(-16px); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg,#12c074,var(--accent-strong)); color: #fff;
  box-shadow: 0 10px 22px rgba(10,157,99,.42); border: 3px solid var(--bg-elev);
}
.botnav__fab .ic { width: 28px; height: 28px; }

/* ---------- Bottom-sheet de acceso rápido (el botón "+") ---------- */
.drawer__scrim--sheet { z-index: 110; }
.quickadd {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 120;
  background: var(--bg-elev); border-radius: 22px 22px 0 0;
  box-shadow: 0 -10px 40px rgba(20,30,24,.20); padding: 10px 18px calc(24px + env(safe-area-inset-bottom,0px));
  transform: translateY(102%); transition: transform .26s cubic-bezier(.4,0,.2,1);
  max-height: 82vh; overflow-y: auto; margin: 0 auto; max-width: 620px;
}
.quickadd.is-open { transform: none; }
html.has-overlay { overflow: hidden; }
.quickadd__grip { width: 42px; height: 5px; border-radius: 999px; background: var(--border); margin: 4px auto 12px; }
.quickadd__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.quickadd__title { font-size: 18px; font-weight: 800; margin: 0; }
.quickadd__links { display: grid; gap: 10px; }
.quickadd__link {
  display: flex; align-items: center; gap: 14px; padding: 15px 16px; border-radius: 14px;
  border: 1px solid var(--border); background: var(--bg-elev-2); color: var(--text); font-size: 15px;
}
.quickadd__link:hover { border-color: var(--accent); text-decoration: none; }
.quickadd__link .ic { width: 22px; height: 22px; color: var(--accent-strong); flex-shrink: 0; }
.quickadd__link b { font-weight: 700; }

/* ---------- Barra de gasto SEGMENTADA (spending breakdown) ---------- */
.segbar {
  display: flex; height: 16px; border-radius: 999px; overflow: hidden;
  background: var(--bg-elev-2); box-shadow: inset 0 0 0 1px rgba(0,0,0,.03);
}
.segbar__seg { height: 100%; }
.segbar__seg + .segbar__seg { box-shadow: -1px 0 0 rgba(255,255,255,.85); }
.segbar-legend {
  list-style: none; margin: 14px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 16px;
}
.segbar-legend li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.segbar-dot { width: 10px; height: 10px; border-radius: 999px; flex-shrink: 0; }
.segbar-legend .seg-cat { color: var(--text-dim); }
.segbar-legend .seg-eur { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- Barra de progreso presupuesto vs real ---------- */
.progress { height: 12px; border-radius: 999px; background: var(--bg-elev-2); overflow: hidden; }
.progress__fill { height: 100%; border-radius: 999px; background: var(--accent-strong); transition: width .3s ease; }
.progress__fill--over { background: var(--red); }
.progress__fill--indigo { background: var(--indigo); }
.progress-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.progress-row .strong { font-variant-numeric: tabular-nums; }

/* ---------- Responsive: hamburguesa siempre; barra inferior en móvil ---------- */
.topnav__add { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.topnav__add .ic { width: 17px; height: 17px; }

@media (max-width: 860px) {
  .topnav__menu { display: none; }
  .topnav__add { display: none; }   /* en móvil se usa el "+" de la barra inferior */
  .usermenu { display: none; }       /* en móvil, usuario/salir viven en el drawer */
  .botnav { display: flex; }
  .app { padding-bottom: calc(var(--botnav-h) + env(safe-area-inset-bottom, 0px)); }
  .subnav { display: none; } /* en móvil, Personal y sus pestañas viven en el drawer */
  .appfoot { display: none; }
}
@media (max-width: 560px) {
  .greet__hello { font-size: 21px; }
  .greet__icon { width: 42px; height: 42px; }
}
/* Privacidad: la barra segmentada y el progreso no revelan importes por su forma,
   pero sus leyendas sí -> ya usan .money donde toca. */

/* ---------- Aportes del piso / categorías con barra de progreso ---------- */
.aportes-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 14px; }
.aporte {
  background: var(--bg-elev-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.aporte__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.aporte__name { font-weight: 700; font-size: 15px; }
.aporte__amt { font-size: 14px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.aporte__amt strong { color: var(--text); }
.aporte__falta { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.aporte__mark { margin-top: 12px; }
.aporte__mark > summary {
  list-style: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
}
.aporte__mark > summary::-webkit-details-marker { display: none; }
.aporte__mark[open] > summary { margin-bottom: 12px; }
.aporte__form {
  display: grid; gap: 10px; padding: 14px; background: var(--bg-elev);
  border: 1px solid var(--border); border-radius: 12px;
  grid-template-columns: 1fr 1fr auto; align-items: end;
}
.aporte__form .field { margin: 0; }
.aporte__form button { white-space: nowrap; }
@media (max-width: 560px) { .aporte__form { grid-template-columns: 1fr; } }
.field__hint { font-weight: 400; font-size: 11px; color: var(--text-mute); }
.aportes-total {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 14px; padding: 12px 16px; border-top: 1px dashed var(--border);
  font-size: 14px; color: var(--text-dim);
}
.aportes-total strong { font-size: 16px; font-variant-numeric: tabular-nums; }

/* ===========================================================================
   Auto-categorización (/categorizar): resumen + listas de gastos
   ========================================================================= */
.cat-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 6px 0 18px; }
.cat-summary__pill { display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 120px; padding: 10px 16px; border-radius: 14px; border: 1px solid var(--border); }
.cat-summary__pill--ok { background: var(--green-bg); }
.cat-summary__pill--warn { background: var(--amber-bg); }
.cat-summary__n { font-size: 24px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.cat-summary__lbl { font-size: 12px; color: var(--text-dim); margin-top: 4px; text-align: center; }
.cat-summary__go { margin-left: auto; }

.catlist { list-style: none; margin: 0; padding: 0; }
.catlist__item { display: flex; align-items: center; gap: 10px; padding: 9px 2px;
  border-bottom: 1px solid var(--border); }
.catlist__item:last-child { border-bottom: 0; }
.catlist__body { flex: 1 1 auto; min-width: 0; }
.catlist__desc { font-size: 14px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.catlist__meta { font-size: 12px; color: var(--text-dim); }
.catlist__why { color: var(--amber, #b26b00); }
.catlist__amt { font-size: 14px; font-variant-numeric: tabular-nums; color: var(--red, #c0392b);
  white-space: nowrap; flex: 0 0 auto; }

/* ===========================================================================
   Patrimonio · análisis (/patrimonio): evolución por entidad + gastos categoría
   ========================================================================= */
.evo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.evo-card { border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; background: var(--surface, transparent); }
.evo-card__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.evo-card__label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-dim); }
.evo-card__val { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; margin: 4px 0 2px; }
.evo-chart { width: 100%; height: 56px; overflow: visible; display: block; }
.evo-card__meta { font-size: 11px; color: var(--text-dim); margin-top: 4px; }

.stackchart { display: flex; align-items: flex-end; gap: 10px; height: 190px; padding: 4px 0 0; overflow-x: auto; }
.stackchart__col { display: flex; flex-direction: column; align-items: center; flex: 1 1 0; min-width: 42px; height: 100%; justify-content: flex-end; }
.stackchart__bar { width: 34px; height: 150px; display: flex; flex-direction: column-reverse;
  border-radius: 7px 7px 0 0; overflow: hidden; background: var(--slate-bg); }
.stackchart__seg { width: 100%; }
.stackchart__total { font-size: 11px; font-variant-numeric: tabular-nums; margin-top: 6px; color: var(--text); }
.stackchart__mes { font-size: 11px; color: var(--text-dim); margin-top: 2px; }

.cat-legend { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.cat-legend__item { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.cat-legend__name { color: var(--text-dim); }
.cat-legend__eur { font-variant-numeric: tabular-nums; }

.mrr-head { margin: 6px 0 10px; }
.mrr-head__val { font-size: 30px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--gold); }
.mrr-head__per { font-size: 15px; font-weight: 500; color: var(--text-dim); margin-left: 3px; }
.mrr-head__meta { font-size: 13px; color: var(--text-dim); margin-top: 2px; }

/* ===========================================================================
   Aportación FIRE (/aportacion): flujo MRR→aportación + formulario de confirmar
   ========================================================================= */
.subhead { font-size: 14px; font-weight: 600; color: var(--text-dim); margin: 16px 0 8px; }
.apo-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 8px 0 6px; }
.apo-step { border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; min-width: 130px; }
.apo-step--fin { border-color: var(--green); background: var(--green-bg); }
.apo-step__lbl { font-size: 12px; color: var(--text-dim); }
.apo-step__val { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.apo-step__sub { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.apo-arrow { font-size: 13px; color: var(--text-dim); font-variant-numeric: tabular-nums; white-space: nowrap; }

.panel--danger { border: 1px solid var(--red); }
.apo-form { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.apo-form__row { display: flex; flex-wrap: wrap; gap: 12px; }
.apo-form__field { display: flex; flex-direction: column; gap: 4px; flex: 1 1 180px; font-size: 13px; color: var(--text-dim); }
.apo-form__field input, .apo-form__field select { font-family: inherit; font-size: 15px; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface, transparent); color: var(--text); }
