/* ============================================================
   Finanzas · Covadonga González
   Tema oscuro. Mobile-first. Sin frameworks.
   ============================================================ */

/* ---------- Tipografías locales ---------- */
@font-face { font-family:'Bricolage'; src:url('../fonts/bricolage-grotesque-600.woff2') format('woff2'); font-weight:600; font-display:swap; }
@font-face { font-family:'Bricolage'; src:url('../fonts/bricolage-grotesque-700.woff2') format('woff2'); font-weight:700; font-display:swap; }
@font-face { font-family:'Bricolage'; src:url('../fonts/bricolage-grotesque-800.woff2') format('woff2'); font-weight:800; font-display:swap; }
@font-face { font-family:'Hanken';    src:url('../fonts/hanken-grotesk-400.woff2') format('woff2'); font-weight:400; font-display:swap; }
@font-face { font-family:'Hanken';    src:url('../fonts/hanken-grotesk-500.woff2') format('woff2'); font-weight:500; font-display:swap; }
@font-face { font-family:'Hanken';    src:url('../fonts/hanken-grotesk-600.woff2') format('woff2'); font-weight:600; font-display:swap; }
@font-face { font-family:'Hanken';    src:url('../fonts/hanken-grotesk-700.woff2') format('woff2'); font-weight:700; font-display:swap; }

/* ---------- Tokens ---------- */
:root{
  --bg:#0A0C11;
  --bg-elev:#10131A;
  --surface:#141821;
  --surface-2:#1A1F2A;
  --surface-3:#212736;
  --line:#242A38;
  --line-soft:#1C212C;
  --text:#EAEEF7;
  --text-2:#A7B0C4;
  --muted:#6E7789;
  --accent:#6C8CFF;
  --accent-soft:#6C8CFF22;
  --green:#2FD8A6;
  --green-soft:#2FD8A61f;
  --red:#FF6B7A;
  --red-soft:#FF6B7A1f;
  --amber:#FFB020;
  --amber-soft:#FFB0201f;
  --violet:#A78BFA;
  --radius:18px;
  --radius-sm:12px;
  --radius-lg:26px;
  --shadow:0 10px 30px -12px rgba(0,0,0,.75);
  --shadow-lg:0 30px 60px -24px rgba(0,0,0,.85);
  --nav-h:calc(64px + env(safe-area-inset-bottom));
  --ease:cubic-bezier(.22,.9,.28,1);
}

*,*::before,*::after{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0; background:var(--bg); color:var(--text);
  font-family:'Hanken',system-ui,-apple-system,'Segoe UI',sans-serif;
  font-size:15px; line-height:1.5; -webkit-font-smoothing:antialiased;
  overscroll-behavior-y:none;
}
body::before{
  content:''; position:fixed; inset:0; pointer-events:none; z-index:0;
  background:
    radial-gradient(900px 500px at 12% -10%, #6C8CFF14, transparent 60%),
    radial-gradient(700px 420px at 105% 0%, #2FD8A60f, transparent 55%);
}
h1,h2,h3,h4{ font-family:'Bricolage',serif; font-weight:700; margin:0; letter-spacing:-.02em; }
button,input,select,textarea{ font:inherit; color:inherit; }
button{ background:none; border:0; cursor:pointer; }
a{ color:inherit; }
::-webkit-scrollbar{ width:8px;height:8px } ::-webkit-scrollbar-thumb{ background:var(--surface-3); border-radius:8px }
.num{ font-family:'Bricolage',serif; font-weight:700; font-variant-numeric:tabular-nums; letter-spacing:-.02em; }
.tnum{ font-variant-numeric:tabular-nums; }

/* ---------- Layout ---------- */
#app{ position:relative; z-index:1; min-height:100%; }
.shell{ display:flex; flex-direction:column; min-height:100dvh; }
main{ flex:1; padding:0 16px calc(var(--nav-h) + 24px); max-width:1180px; width:100%; margin:0 auto; }
.view{ animation:fade .28s var(--ease); }
@keyframes fade{ from{opacity:0; transform:translateY(6px)} to{opacity:1; transform:none} }

/* ---------- Cabecera ---------- */
.topbar{
  position:sticky; top:0; z-index:40; padding:calc(env(safe-area-inset-top) + 12px) 16px 10px;
  background:linear-gradient(180deg,var(--bg) 65%,transparent);
  max-width:1180px; margin:0 auto; width:100%;
}
.topbar-row{ display:flex; align-items:center; gap:12px; }
.brand{ display:flex; align-items:center; gap:10px; min-width:0; }
.brand-mark{ width:34px;height:34px;border-radius:11px; display:grid;place-items:center; flex:none;
  background:linear-gradient(145deg,#6C8CFF,#8A6CFF); box-shadow:0 6px 18px -6px #6C8CFF99; }
.brand-mark svg{ width:19px;height:19px; }
.brand-txt{ min-width:0 }
.brand-txt b{ display:block; font-family:'Bricolage'; font-size:15px; line-height:1.15; letter-spacing:-.02em; }
.brand-txt span{ display:block; font-size:11.5px; color:var(--muted); }
.topbar .spacer{ flex:1 }
.icon-btn{
  width:38px;height:38px;border-radius:12px;display:grid;place-items:center;
  background:var(--surface); border:1px solid var(--line); color:var(--text-2);
  transition:.18s var(--ease);
}
.icon-btn:hover{ background:var(--surface-2); color:var(--text) }
.icon-btn svg{ width:18px;height:18px }

/* selector de mes */
.month-nav{ display:flex; align-items:center; gap:6px; margin-top:14px; }
.month-nav .pill{
  flex:1; display:flex; align-items:center; justify-content:center; gap:8px;
  height:42px; border-radius:14px; background:var(--surface); border:1px solid var(--line);
  font-weight:600; letter-spacing:-.01em;
}
.month-nav .pill small{ color:var(--muted); font-weight:500 }
.month-nav .arrow{ width:42px;height:42px;border-radius:13px;background:var(--surface);border:1px solid var(--line);
  display:grid;place-items:center;color:var(--text-2); flex:none }
.month-nav .arrow:active{ transform:scale(.94) }

/* ---------- Tarjetas ---------- */
.card{
  background:var(--surface); border:1px solid var(--line); border-radius:var(--radius);
  padding:16px; box-shadow:var(--shadow);
}
.card + .card{ margin-top:14px }
.card-head{ display:flex; align-items:center; gap:10px; margin-bottom:14px }
.card-head h3{ font-size:15px; letter-spacing:-.01em }
.card-head .spacer{ flex:1 }
.card-head .link{ font-size:12.5px; color:var(--accent); font-weight:600 }
.section-title{ font-size:12px; text-transform:uppercase; letter-spacing:.12em; color:var(--muted); font-weight:600;
  margin:26px 0 10px; font-family:'Hanken' }

/* ---------- Hero saldo ---------- */
.hero{
  position:relative; overflow:hidden; margin-top:16px;
  border-radius:var(--radius-lg); padding:22px 20px 20px;
  background:linear-gradient(158deg,#1B2233 0%,#141821 55%,#12161E 100%);
  border:1px solid #2A3245; box-shadow:var(--shadow-lg);
}
.hero::after{ content:''; position:absolute; width:280px;height:280px; right:-110px; top:-140px; border-radius:50%;
  background:radial-gradient(circle,#6C8CFF33,transparent 65%); }
.hero-label{ font-size:12px; color:var(--text-2); letter-spacing:.06em; text-transform:uppercase; font-weight:600 }
.hero-value{ font-size:clamp(38px,11vw,52px); line-height:1.02; margin:8px 0 4px }
.hero-sub{ font-size:13px; color:var(--text-2) }
.hero-sub b{ color:var(--text) }
.hero-split{ display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:18px; position:relative }
.hero-split > div{ background:#ffffff08; border:1px solid #ffffff10; border-radius:14px; padding:11px 12px }
.hero-split .k{ font-size:11.5px; color:var(--text-2); display:flex; align-items:center; gap:6px }
.hero-split .v{ font-size:19px; margin-top:3px }
.dotmark{ width:7px;height:7px;border-radius:50%; display:inline-block }

/* barra progreso */
.bar{ height:8px; border-radius:99px; background:var(--surface-3); overflow:hidden; position:relative }
.bar > i{ display:block; height:100%; border-radius:99px; transition:width .5s var(--ease) }
.bar.thin{ height:6px }

/* ---------- Métricas ---------- */
.stat-grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:12px }
.stat{ background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-sm); padding:13px 14px }
.stat .k{ font-size:11.5px; color:var(--muted); text-transform:uppercase; letter-spacing:.07em; font-weight:600 }
.stat .v{ font-size:21px; margin-top:5px }
.stat .d{ font-size:11.5px; color:var(--text-2); margin-top:2px }

/* ---------- Listas de movimientos ---------- */
.entry{
  display:flex; align-items:center; gap:12px; padding:11px 12px; border-radius:14px;
  background:var(--surface); border:1px solid var(--line-soft); transition:.18s var(--ease);
}
.entry + .entry{ margin-top:8px }
.entry:active{ transform:scale(.995) }
.entry.done{ opacity:.55 }
.entry.overdue{ border-color:#FF6B7A44; background:linear-gradient(90deg,#FF6B7A0d,var(--surface) 40%) }
.entry-ico{ width:38px;height:38px;border-radius:12px; flex:none; display:grid;place-items:center; }
.entry-ico svg{ width:18px;height:18px }
.entry-main{ flex:1; min-width:0 }
.entry-name{ font-weight:600; font-size:14.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis }
.entry-meta{ font-size:11.5px; color:var(--muted); display:flex; align-items:center; gap:6px; margin-top:2px; flex-wrap:wrap }
.entry-amt{ text-align:right; flex:none }
.entry-amt .a{ font-size:15.5px; font-family:'Bricolage'; font-weight:700; font-variant-numeric:tabular-nums }
.entry-amt .s{ font-size:11px; color:var(--muted) }
.check{
  width:30px;height:30px;border-radius:10px; border:1.5px solid var(--line); flex:none;
  display:grid;place-items:center; color:var(--muted); transition:.18s var(--ease); background:var(--surface-2);
}
.check svg{ width:15px;height:15px; opacity:0; transform:scale(.6); transition:.18s var(--ease) }
.check.on{ background:var(--green); border-color:var(--green); color:#062018 }
.check.on svg{ opacity:1; transform:none }
.check.income.on{ background:var(--accent); border-color:var(--accent); color:#04102e }

.tag{ font-size:10.5px; padding:2px 7px; border-radius:7px; background:var(--surface-3); color:var(--text-2); font-weight:600;
  letter-spacing:.02em; white-space:nowrap }
.tag.fijo{ background:#6C8CFF1f; color:#9FB4FF }
.tag.variable{ background:#FFB0201f; color:#FFC963 }
.tag.puntual{ background:#A78BFA1f; color:#C4B2FD }
.tag.rec{ background:#2FD8A61a; color:#5FE7C0 }

/* ---------- Chips / filtros ---------- */
.chips{ display:flex; gap:8px; overflow-x:auto; padding:2px 0 4px; scrollbar-width:none; -webkit-overflow-scrolling:touch }
.chips::-webkit-scrollbar{ display:none }
.chip{
  flex:none; padding:7px 13px; border-radius:99px; background:var(--surface); border:1px solid var(--line);
  font-size:13px; color:var(--text-2); font-weight:500; white-space:nowrap; transition:.16s var(--ease);
}
.chip.on{ background:var(--text); color:#0A0C11; border-color:var(--text); font-weight:600 }

/* ---------- Navegación inferior ---------- */
.tabbar{
  position:fixed; left:0; right:0; bottom:0; z-index:50; height:var(--nav-h);
  padding-bottom:env(safe-area-inset-bottom);
  display:grid; grid-template-columns:repeat(5,1fr);
  background:rgba(12,15,21,.86); backdrop-filter:blur(18px) saturate(160%);
  border-top:1px solid var(--line);
}
.tabbar button{ display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px;
  color:var(--muted); font-size:10.5px; font-weight:600; letter-spacing:.01em; position:relative }
.tabbar svg{ width:21px;height:21px }
.tabbar button.on{ color:var(--text) }
.tabbar button.on::before{ content:''; position:absolute; top:0; width:26px; height:2.5px; border-radius:0 0 4px 4px;
  background:var(--accent); box-shadow:0 0 14px var(--accent) }

/* botón flotante añadir */
.fab{
  position:fixed; right:16px; bottom:calc(var(--nav-h) + 14px); z-index:45;
  width:56px;height:56px;border-radius:19px; display:grid;place-items:center;
  background:linear-gradient(150deg,#6C8CFF,#7A6CFF); color:#fff;
  box-shadow:0 14px 34px -10px #6C8CFFaa; transition:.2s var(--ease);
}
.fab:active{ transform:scale(.92) }
.fab svg{ width:24px;height:24px }

/* ---------- Botones ---------- */
.btn{
  height:46px; padding:0 18px; border-radius:14px; display:inline-flex; align-items:center; justify-content:center; gap:8px;
  background:var(--surface-2); border:1px solid var(--line); color:var(--text); font-weight:600; font-size:14.5px;
  transition:.16s var(--ease);
}
.btn:hover{ background:var(--surface-3) }
.btn:active{ transform:scale(.985) }
.btn.primary{ background:linear-gradient(150deg,#6C8CFF,#7A6CFF); border-color:transparent; color:#fff;
  box-shadow:0 10px 26px -12px #6C8CFFcc }
.btn.ghost{ background:transparent }
.btn.danger{ color:var(--red); border-color:#FF6B7A33 }
.btn.block{ width:100% }
.btn.sm{ height:38px; padding:0 13px; font-size:13.5px; border-radius:11px }
.btn svg{ width:17px;height:17px }
.btn[disabled]{ opacity:.5; pointer-events:none }

/* ---------- Formularios ---------- */
.field{ margin-bottom:14px }
.field > label{ display:block; font-size:12px; color:var(--text-2); font-weight:600; margin-bottom:6px; letter-spacing:.01em }
.input, select.input, textarea.input{
  width:100%; height:48px; padding:0 14px; border-radius:14px;
  background:var(--surface-2); border:1px solid var(--line); color:var(--text); outline:none;
  transition:.16s var(--ease); font-size:16px; /* 16px evita el zoom en iOS */
}
textarea.input{ height:auto; padding:12px 14px; resize:vertical; min-height:80px }
select.input{ appearance:none; background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236E7789' stroke-width='2.2' stroke-linecap='round'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat:no-repeat; background-position:right 12px center; background-size:18px; padding-right:38px }
.input:focus{ border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-soft) }
.input.big{ height:64px; font-family:'Bricolage'; font-weight:700; font-size:30px; text-align:center; letter-spacing:-.02em }
.row2{ display:grid; grid-template-columns:1fr 1fr; gap:10px }
.row3{ display:grid; grid-template-columns:repeat(3,1fr); gap:8px }
.seg{ display:grid; gap:6px; background:var(--surface-2); border:1px solid var(--line); border-radius:14px; padding:4px }
.seg.c2{ grid-template-columns:1fr 1fr } .seg.c3{ grid-template-columns:repeat(3,1fr) }
.seg button{ height:38px; border-radius:10px; font-size:13.5px; font-weight:600; color:var(--text-2); transition:.16s var(--ease) }
.seg button.on{ background:var(--surface-3); color:var(--text); box-shadow:0 2px 10px -4px #000 }
.seg button.on.gasto{ background:#FF6B7A22; color:#FF97A2 }
.seg button.on.ingreso{ background:#2FD8A622; color:#5FE7C0 }
.switch{ display:flex; align-items:center; gap:12px; padding:12px 14px; background:var(--surface-2);
  border:1px solid var(--line); border-radius:14px; margin-bottom:10px }
.switch .t{ flex:1 }
.switch .t b{ display:block; font-size:14px; font-weight:600 }
.switch .t span{ font-size:11.5px; color:var(--muted) }
.toggle{ width:48px;height:28px;border-radius:99px;background:var(--surface-3); position:relative; flex:none; transition:.2s var(--ease) }
.toggle::after{ content:''; position:absolute; top:3px; left:3px; width:22px;height:22px;border-radius:50%; background:#fff;
  transition:.22s var(--ease) }
.toggle.on{ background:var(--green) }
.toggle.on::after{ left:23px }
.hint{ font-size:11.5px; color:var(--muted); margin-top:-6px; margin-bottom:12px }

/* selector de categoría */
.catgrid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(84px,1fr)); gap:8px; max-height:240px; overflow:auto; padding:2px }
.catgrid button{ padding:10px 6px; border-radius:13px; background:var(--surface-2); border:1px solid var(--line);
  display:flex; flex-direction:column; align-items:center; gap:6px; font-size:11px; color:var(--text-2); font-weight:600;
  text-align:center; line-height:1.2 }
.catgrid button svg{ width:20px;height:20px }
.catgrid button.on{ border-color:var(--accent); background:var(--accent-soft); color:var(--text) }

/* ---------- Hoja / modal ---------- */
.sheet-back{
  position:fixed; inset:0; z-index:100; background:rgba(5,7,11,.6); backdrop-filter:blur(4px);
  display:flex; align-items:flex-end; justify-content:center; animation:fadein .2s var(--ease);
}
@keyframes fadein{ from{opacity:0} to{opacity:1} }
.sheet{
  width:100%; max-width:520px; max-height:92dvh; overflow:auto; background:var(--bg-elev);
  border:1px solid var(--line); border-bottom:0; border-radius:26px 26px 0 0;
  padding:8px 18px calc(22px + env(safe-area-inset-bottom));
  animation:up .3s var(--ease); box-shadow:0 -20px 60px -20px #000;
}
@keyframes up{ from{ transform:translateY(28px); opacity:.4 } to{ transform:none; opacity:1 } }
.sheet-grip{ width:38px;height:4px;border-radius:99px;background:var(--surface-3); margin:6px auto 14px }
.sheet h2{ font-size:20px; margin-bottom:4px }
.sheet .sub{ font-size:12.5px; color:var(--muted); margin-bottom:18px }
.sheet-actions{ display:flex; gap:10px; margin-top:20px }
.sheet-actions .btn{ flex:1 }

/* ---------- Toast ---------- */
.toasts{ position:fixed; left:0; right:0; bottom:calc(var(--nav-h) + 12px); z-index:200; display:flex;
  flex-direction:column; align-items:center; gap:8px; pointer-events:none; padding:0 16px }
.toast{ background:var(--surface-3); border:1px solid var(--line); color:var(--text); padding:11px 16px;
  border-radius:14px; font-size:13.5px; font-weight:500; box-shadow:var(--shadow-lg); animation:up .25s var(--ease);
  max-width:420px; display:flex; align-items:center; gap:9px }
.toast.err{ border-color:#FF6B7A55; background:#2A1A1F }
.toast.ok{ border-color:#2FD8A655 }
.toast svg{ width:16px;height:16px; flex:none }

/* ---------- Cuentas ---------- */
.acc{ display:flex; align-items:center; gap:13px; padding:14px; border-radius:16px; background:var(--surface);
  border:1px solid var(--line); }
.acc + .acc{ margin-top:10px }
.acc-ico{ width:44px;height:44px;border-radius:14px; display:grid;place-items:center; flex:none }
.acc-ico svg{ width:20px;height:20px }
.acc-main{ flex:1; min-width:0 }
.acc-main b{ font-size:14.5px; font-weight:600; display:block }
.acc-main span{ font-size:11.5px; color:var(--muted) }
.acc-val{ text-align:right }
.acc-val .b{ font-family:'Bricolage'; font-weight:700; font-size:17px; font-variant-numeric:tabular-nums }
.acc-val .p{ font-size:11px; color:var(--muted) }

/* ---------- Presupuestos ---------- */
.budget{ padding:12px 0 }
.budget + .budget{ border-top:1px solid var(--line-soft) }
.budget-top{ display:flex; align-items:center; gap:9px; margin-bottom:8px; font-size:13.5px }
.budget-top .n{ flex:1; font-weight:600 }
.budget-top .v{ font-size:12.5px; color:var(--text-2); font-variant-numeric:tabular-nums }

/* ---------- Gráficos ---------- */
.chart{ width:100%; display:block; overflow:visible }
.legend{ display:flex; flex-wrap:wrap; gap:9px 16px; margin-top:14px }
.legend span{ display:flex; align-items:center; gap:7px; font-size:12px; color:var(--text-2) }
.donut-wrap{ position:relative; display:grid; place-items:center }
.donut-center{ position:absolute; text-align:center; pointer-events:none }
.donut-center .v{ font-family:'Bricolage'; font-weight:700; font-size:23px; letter-spacing:-.02em }
.donut-center .k{ font-size:11px; color:var(--muted) }

/* ---------- Vacío ---------- */
.empty{ text-align:center; padding:36px 20px; color:var(--muted) }
.empty svg{ width:40px;height:40px; opacity:.35; margin-bottom:12px }
.empty p{ margin:0 0 4px; font-size:14px; color:var(--text-2) }
.empty small{ font-size:12.5px }

/* ---------- Login ---------- */
.auth{ min-height:100dvh; display:grid; place-items:center; padding:24px }
.auth-card{ width:100%; max-width:380px; }
.auth-logo{ width:60px;height:60px;border-radius:20px; display:grid;place-items:center; margin:0 auto 20px;
  background:linear-gradient(145deg,#6C8CFF,#8A6CFF); box-shadow:0 16px 40px -14px #6C8CFFaa }
.auth-logo svg{ width:30px;height:30px }
.auth h1{ font-size:26px; text-align:center; margin-bottom:6px }
.auth .sub{ text-align:center; color:var(--muted); font-size:13.5px; margin-bottom:26px }
.auth-box{ background:var(--surface); border:1px solid var(--line); border-radius:22px; padding:22px; box-shadow:var(--shadow-lg) }
.err-box{ background:#FF6B7A14; border:1px solid #FF6B7A44; color:#FF9AA5; border-radius:13px; padding:11px 13px;
  font-size:13px; margin-bottom:14px }
.pin-dots{ display:flex; justify-content:center; gap:13px; margin:24px 0 28px }
.pin-dots i{ width:13px;height:13px;border-radius:50%; background:var(--surface-3); transition:.2s var(--ease) }
.pin-dots i.on{ background:var(--accent); transform:scale(1.15); box-shadow:0 0 14px var(--accent) }
.pin-dots.shake{ animation:shake .4s }
@keyframes shake{ 0%,100%{transform:none} 20%{transform:translateX(-9px)} 40%{transform:translateX(9px)} 60%{transform:translateX(-5px)} 80%{transform:translateX(5px)} }
.keypad{ display:grid; grid-template-columns:repeat(3,1fr); gap:12px; max-width:290px; margin:0 auto }
.keypad button{ height:64px; border-radius:20px; background:var(--surface-2); border:1px solid var(--line);
  font-family:'Bricolage'; font-weight:700; font-size:24px; transition:.12s var(--ease) }
.keypad button:active{ background:var(--surface-3); transform:scale(.94) }
.keypad button.fn{ font-size:14px; font-family:'Hanken'; color:var(--text-2); background:transparent; border-color:transparent }

/* ---------- Ajustes ---------- */
.list-row{ display:flex; align-items:center; gap:12px; padding:13px 14px; background:var(--surface);
  border:1px solid var(--line); border-radius:14px }
.list-row + .list-row{ margin-top:8px }
.list-row .t{ flex:1; min-width:0 }
.list-row .t b{ display:block; font-size:14px; font-weight:600 }
.list-row .t span{ font-size:11.5px; color:var(--muted) }
.list-row .chev{ color:var(--muted) }
.list-row .chev svg{ width:17px;height:17px }
.swatch{ width:32px;height:32px;border-radius:10px; flex:none; display:grid;place-items:center }
.swatch svg{ width:16px;height:16px }

/* ---------- Escritorio ---------- */
@media (min-width:860px){
  body{ font-size:15px }
  main{ padding:0 28px 60px }
  .topbar{ padding:22px 28px 12px }
  .tabbar{
    top:0; bottom:auto; height:auto; width:224px; right:auto; grid-template-columns:1fr;
    border-top:0; border-right:1px solid var(--line); padding:96px 14px 20px; gap:4px; align-content:start;
    background:rgba(10,13,18,.7);
  }
  .tabbar button{ flex-direction:row; justify-content:flex-start; gap:12px; height:46px; padding:0 14px;
    border-radius:13px; font-size:14px }
  .tabbar button.on{ background:var(--surface-2) }
  .tabbar button.on::before{ top:50%; left:0; transform:translateY(-50%); width:3px; height:22px; border-radius:0 4px 4px 0 }
  .shell{ padding-left:224px }
  .topbar, main{ max-width:1180px }
  .fab{ right:36px; bottom:36px }
  .stat-grid{ grid-template-columns:repeat(4,1fr) }
  .hero-split{ grid-template-columns:repeat(4,1fr) }
  .grid2{ display:grid; grid-template-columns:1fr 1fr; gap:14px; align-items:start }
  .grid2 .card + .card{ margin-top:0 }
  .sheet-back{ align-items:center }
  .sheet{ border-radius:24px; border-bottom:1px solid var(--line); max-height:88dvh }
  .toasts{ bottom:24px }
}
@media (max-width:859px){ .grid2 > * + *{ margin-top:14px } }

/* accesibilidad */
@media (prefers-reduced-motion:reduce){ *{ animation-duration:.01ms !important; transition-duration:.01ms !important } }
:focus-visible{ outline:2px solid var(--accent); outline-offset:2px }
