/* Consolia · sistema de diseño (tokens de sistema-de-diseno/tokens.json) */
:root {
  --brand: #5247B8; --brand-strong: #3F358F; --brand-soft: #ECEAF8;
  --accent: #26796F; --accent-soft: #E3F2EF; --night: #1C1A27;
  --surface: #F6F5FA; --raised: #FFFFFF; --ink: #1C1A27; --muted: #5E5A6E;
  --border: #DEDBE8; --on-brand: #FFFFFF; --warning: #9A5B12; --danger: #A8363B;
  --brand-a12: rgba(82,71,184,0.12); --brand-a08: rgba(82,71,184,0.08); --brand-a40: rgba(82,71,184,0.4);
  --warn-a10: rgba(154,91,18,0.1); --danger-a08: rgba(168,54,59,0.08);
  --sans: 'Sora', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --shadow: 0 24px 60px rgba(28,26,39,0.14);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--surface); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; }
a { color: var(--brand); }
a:hover { color: var(--brand-strong); }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
img { display: block; max-width: 100%; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.h { font-family: var(--sans); font-weight: 700; letter-spacing: -0.025em; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.row { display: flex; align-items: center; gap: 12px; }
.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; }
.grow { flex: 1 1 auto; min-width: 0; }
.between { justify-content: space-between; }
.end { justify-content: flex-end; }

/* ---------- Encabezado del negocio ---------- */
.hdr { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 32px; border-bottom: 1px solid var(--border); background: var(--raised); }
.brandlink { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); min-width: 0; }
.brandlink img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.brandlink .logo-ph { width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 18px; }
.brandlink .word { font-weight: 700; font-size: 19px; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.turno { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border-radius: 999px; background: var(--brand-a12); color: var(--brand-strong); font-size: 14px; font-weight: 600; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); flex-shrink: 0; display: inline-block; }
.iconbtn { width: 52px; height: 52px; border-radius: 14px; border: 1px solid var(--border); background: var(--raised); color: var(--brand); display: flex; align-items: center; justify-content: center; flex-shrink: 0; position: relative; }
.iconbtn.sm { width: 44px; height: 44px; border-radius: 12px; color: var(--ink); }
.iconbtn .badge { position: absolute; top: -6px; right: -6px; }
.menu { position: absolute; top: 78px; right: 24px; z-index: 50; width: 290px; padding: 10px; border-radius: 16px; background: var(--raised); border: 1px solid var(--border); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; }
.menu a, .menu button.mi { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 14px; border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 500; border: none; background: transparent; font-size: 16px; text-align: left; width: 100%; }
.menu a:hover, .menu button.mi:hover { background: var(--surface); }
.menu a.on { color: var(--brand); background: var(--brand-soft); font-weight: 600; }
.menu .sep { height: 1px; background: var(--border); margin: 6px 4px; }
.menu .danger { color: var(--danger); }
.badge { min-width: 26px; height: 26px; padding: 0 8px; border-radius: 13px; background: var(--brand); color: #fff; font-family: var(--mono); font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.backdrop-click { position: fixed; inset: 0; z-index: 35; }

/* ---------- Página ---------- */
.main { max-width: 1240px; margin: 0 auto; padding: 32px 24px 56px; display: flex; flex-direction: column; gap: 24px; }
.main.narrow { max-width: 1040px; }
.ptitle { margin: 0; font-size: 36px; line-height: 1.1; font-weight: 700; letter-spacing: -0.025em; }
.psub { color: var(--muted); font-size: 16px; }
.eyebrow { font-size: 14px; font-weight: 600; color: var(--muted); }
.lbl { font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }
.card { padding: 24px; border-radius: 20px; background: var(--raised); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 20px; }
.card.tight { padding: 18px; gap: 14px; }
.card h2, .sec-title { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.card h3 { margin: 0; font-size: 17px; font-weight: 700; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 64px 24px; border-radius: 20px; border: 2px dashed var(--border); text-align: center; color: var(--muted); }
.empty h2 { margin: 0; font-size: 28px; color: var(--ink); font-weight: 700; letter-spacing: -0.025em; }
.empty p { margin: 0; font-size: 17px; }
.note { padding: 40px 24px; border-radius: 18px; border: 2px dashed var(--border); text-align: center; color: var(--muted); font-size: 17px; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 20px; border-radius: 14px; border: 1px solid var(--border); background: transparent; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 16px; white-space: nowrap; }
.btn:hover { background: var(--raised); color: var(--ink); }
.btn.p { background: var(--brand); border-color: var(--brand); color: var(--on-brand); font-weight: 700; }
.btn.p:hover { background: var(--brand-strong); border-color: var(--brand-strong); color: #fff; }
.btn.p:disabled { background: var(--brand-soft); border-color: var(--brand-soft); color: var(--muted); }
.btn.d { background: var(--danger); border-color: var(--danger); color: #fff; font-weight: 700; }
.btn.d:hover { filter: brightness(1.08); color: #fff; }
.btn.dg { color: var(--danger); border-color: rgba(168,54,59,0.4); }
.btn.dg:hover { background: var(--danger-a08); color: var(--danger); }
.btn.w { background: var(--raised); }
.btn.sm { min-height: 44px; padding: 0 14px; border-radius: 12px; font-size: 15px; }
.btn.lg { min-height: 54px; padding: 0 28px; font-size: 18px; }
.btn.full { width: 100%; }
.btn .plus { width: 30px; height: 30px; border-radius: 9px; background: rgba(255,255,255,0.2); display: flex; align-items: center; justify-content: center; margin-left: -6px; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.linkbtn { background: none; border: none; padding: 0; color: var(--brand); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Formularios ---------- */
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field > label, .field > .lbl2 { font-size: 14px; font-weight: 600; color: var(--muted); }
.field.up > label, .field.up > .lbl2 { letter-spacing: 0.04em; text-transform: uppercase; }
.in { width: 100%; min-height: 52px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--raised); color: var(--ink); font-size: 17px; }
.in.sm { min-height: 44px; font-size: 15px; border-radius: 10px; padding: 0 12px; }
.in.hl { border-color: var(--brand); }
.in.err { border-color: var(--danger); }
select.in { padding: 0 10px; }
.hint { font-size: 13px; color: var(--muted); }
.hint.ok { color: var(--brand); }
.hint.err { color: var(--danger); }
.hint.warn { color: var(--warning); }
.lock { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.affix { display: flex; align-items: stretch; border: 1px solid var(--border); border-radius: 12px; background: var(--raised); overflow: hidden; }
.affix input { border: none; flex: 1; min-width: 0; min-height: 50px; padding: 0 12px; font-size: 17px; background: transparent; }
.affix input:focus-visible { outline: none; }
.affix:focus-within { outline: 2px solid var(--brand); outline-offset: 1px; }
.affix span { display: flex; align-items: center; padding: 0 12px; background: var(--surface); color: var(--muted); }
.search { position: relative; display: flex; align-items: center; }
.search svg { position: absolute; left: 14px; color: var(--brand); pointer-events: none; }
.search .in { padding-left: 44px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(110px, 100%), 1fr)); gap: 12px; }
.checkrow { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.checkrow input { width: 22px; height: 22px; margin: 0; accent-color: var(--brand); cursor: pointer; flex-shrink: 0; }
.alert { padding: 12px 16px; border-radius: 12px; font-size: 15px; display: flex; align-items: center; gap: 10px; }
.alert.err { background: var(--danger-a08); color: var(--danger); border: 1px solid rgba(168,54,59,0.35); }
.alert.ok { background: var(--brand-a08); color: var(--brand-strong); border: 1px solid var(--brand-a40); }
.alert.warn { background: var(--warn-a10); color: var(--warning); border: 1px solid rgba(154,91,18,0.4); }

/* Segmentado (tipo de cliente, periodo) */
.seg { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 6px; padding: 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.seg button { min-height: 48px; border-radius: 10px; border: none; font-size: 16px; font-weight: 700; background: transparent; color: var(--muted); padding: 0 12px; }
.seg button[aria-pressed="true"] { background: var(--brand); color: #fff; }
.seg.sm button { min-height: 40px; font-size: 15px; }

/* Chips (tarifas, categorías) */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { min-height: 52px; padding: 0 18px; border-radius: 999px; font-size: 16px; font-weight: 700; border: 2px solid var(--border); background: var(--raised); color: var(--ink); font-family: var(--mono); }
.chip[aria-pressed="true"] { border-color: var(--brand); background: var(--brand); color: #fff; }
.chip.sans { font-family: var(--sans); }
.chip.sm { min-height: 44px; padding: 0 14px; font-size: 15px; border-width: 1px; }
.pill { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: transparent; color: var(--muted); font-size: 14px; font-weight: 600; }
.pill[aria-pressed="true"] { border-color: var(--brand); background: rgba(82,71,184,0.15); color: var(--brand); }
.tag { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.mtag { padding: 3px 9px; border-radius: 6px; background: rgba(82,71,184,0.15); color: var(--brand); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.opt-card { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 64px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--raised); color: var(--ink); text-align: left; }
.opt-card[aria-checked="true"], .opt-card[aria-pressed="true"] { border-color: var(--brand); background: rgba(82,71,184,0.1); }
.opt-card[aria-checked="true"] > b, .opt-card[aria-pressed="true"] > b { color: var(--brand); }
.opt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(130px, 100%), 1fr)); gap: 8px; }

/* Stepper */
.stepper { display: flex; align-items: center; gap: 6px; padding: 4px; border-radius: 12px; background: var(--raised); border: 1px solid var(--border); }
.stepper button { width: 44px; height: 44px; border-radius: 9px; border: none; background: var(--raised); font-size: 22px; font-weight: 700; }
.stepper button.add { color: var(--brand); }
.stepper span { min-width: 44px; text-align: center; font-size: 22px; font-weight: 700; font-family: var(--mono); }
.qty { display: flex; align-items: center; gap: 4px; }
.qty button { width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); font-size: 18px; font-weight: 700; }
.qty button.add { border: none; background: var(--brand); color: #fff; }
.qty span { min-width: 24px; text-align: center; font-weight: 700; font-family: var(--mono); }

/* Switch */
.sw { display: inline-flex; align-items: center; gap: 10px; border: none; background: transparent; padding: 0; font-weight: 600; font-size: 14px; color: var(--muted); min-height: 44px; }
.sw .track { width: 46px; height: 28px; border-radius: 14px; background: var(--border); display: flex; align-items: center; padding: 3px; justify-content: flex-start; transition: background .15s; flex-shrink: 0; }
.sw .knob { width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(28,26,39,0.25); }
.sw[aria-checked="true"] { color: var(--brand); }
.sw[aria-checked="true"] .track { background: var(--brand); justify-content: flex-end; }

/* Avatares */
.av { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; background: var(--brand-soft); color: var(--brand); font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.av.on { background: var(--brand); color: #fff; }
.av.lg { width: 56px; height: 56px; font-size: 20px; }

/* ---------- Panel de rentas ---------- */
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr)); gap: 1px; border-radius: 14px; overflow: hidden; background: var(--border); border: 1px solid var(--border); }
.filters > * { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px 18px; border: none; background: var(--raised); text-align: left; }
.filters button:hover { filter: brightness(0.98); }
.filters .k { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 600; color: var(--muted); }
.filters .v { font-family: var(--mono); font-size: 26px; font-weight: 700; color: var(--ink); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 20px; }
.rcard { position: relative; display: flex; flex-direction: column; gap: 14px; min-height: 290px; padding: 20px; border-radius: 18px; background: var(--raised); border: 2px solid var(--brand); }
.rcard h3 { margin: 0; font-size: 24px; font-weight: 700; }
.rcard .timer { font-family: var(--mono); font-size: 56px; line-height: 1; font-weight: 700; }
.bar { height: 10px; border-radius: 5px; background: var(--brand-soft); overflow: hidden; }
.bar > div { height: 100%; border-radius: 5px; transition: width .9s linear; }
.extra { align-self: flex-start; display: flex; align-items: center; gap: 8px; padding: 5px 10px; border-radius: 8px; font-size: 13px; font-weight: 600; }
.extra.ctrl { background: rgba(82,71,184,0.1); color: var(--brand-strong); }
.extra.tienda { background: var(--warn-a10); color: var(--warning); }
.addcard { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 290px; padding: 20px; border-radius: 18px; border: 2px dashed var(--border); background: var(--raised); color: var(--ink); text-decoration: none; text-align: center; font: inherit; }
.addcard:hover { border-color: var(--brand-a40); }
.addcard .ic { width: 56px; height: 56px; border-radius: 16px; background: var(--brand-a12); color: var(--brand); display: flex; align-items: center; justify-content: center; }
.cmenu { position: absolute; top: 72px; right: 16px; z-index: 30; width: 240px; padding: 8px; border-radius: 14px; background: var(--raised); border: 1px solid var(--border); box-shadow: 0 18px 40px rgba(28,26,39,0.14); display: flex; flex-direction: column; gap: 2px; }
.cmenu button { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 12px; border-radius: 10px; border: none; background: transparent; font-size: 16px; text-align: left; color: var(--ink); }
.cmenu button:hover { background: var(--brand-soft); }
.cmenu button.pr { color: var(--brand); }
.banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--raised); font-size: 15px; }
.reqbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-radius: 14px; background: var(--brand-a08); border: 1px solid var(--brand-a40); color: var(--ink); text-decoration: none; }
.reqbar:hover { color: var(--ink); background: var(--brand-a12); }
.reqbar .n { width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.soundbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--raised); border: 1px dashed var(--border); font-size: 14px; color: var(--muted); }

/* ---------- Modales ---------- */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(28,26,39,0.45); display: flex; align-items: flex-start; justify-content: center; padding: 24px 12px; overflow-y: auto; }
.modal { position: relative; width: 1040px; max-width: 100%; margin: auto 0; padding: 28px; border-radius: 24px; background: var(--raised); border: 1px solid rgba(82,71,184,0.45); box-shadow: 0 30px 80px rgba(28,26,39,0.14); display: flex; flex-direction: column; gap: 22px; }
.modal.md { width: 720px; }
.modal.sm { width: 520px; }
.modal h2.mt { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -0.025em; }
.modal .msub { color: var(--muted); font-size: 15px; }
.cols { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.cols > .c1 { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.cols > .c2 { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.box { display: flex; flex-direction: column; gap: 16px; padding: 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.box.on { border-color: rgba(82,71,184,0.45); }
.box.won { border-color: rgba(154,91,18,0.45); }
.box.dashed { border-style: dashed; }
.box .inner { display: flex; flex-direction: column; gap: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.calc { padding: 12px 14px; border-radius: 10px; background: var(--raised); color: var(--muted); font-size: 15px; font-family: var(--mono); }
.summary { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; border-radius: 14px; background: rgba(82,71,184,0.07); border: 1px solid rgba(82,71,184,0.35); }
.summary .ln { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 15px; }
.summary .tot { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 8px; border-top: 1px solid rgba(82,71,184,0.25); color: var(--ink); font-weight: 600; }
.summary .tot .num { font-size: 28px; font-weight: 700; color: var(--brand); }
.reslist { display: flex; flex-direction: column; gap: 2px; padding: 6px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); max-height: 220px; overflow-y: auto; }
.reslist button { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 10px; border-radius: 10px; border: none; background: transparent; text-align: left; }
.reslist button:hover { background: var(--brand-soft); }
.selbox { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 12px; background: rgba(82,71,184,0.1); border: 1px solid var(--brand); }
.pline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--raised); }
.qchip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--raised); font-size: 14px; font-weight: 600; font-family: var(--mono); }
.qchip.on { border-color: rgba(154,91,18,0.6); }
.qchip .b { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--border); color: var(--muted); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.qchip.on .b { background: var(--warning); color: #fff; }
.prow { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--raised); }
.prow .cdot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* ---------- Tablas ---------- */
.tblwrap { overflow-x: auto; border-radius: 14px; border: 1px solid var(--border); background: var(--raised); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th { text-align: left; padding: 12px 16px; font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; background: var(--surface); border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr.sel td { background: var(--brand-soft); }
.tbl .nowrap { white-space: nowrap; }

/* ---------- Listas y detalles ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr); gap: 24px; align-items: flex-start; }
.listbtn { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--border); background: var(--raised); text-align: left; }
.listbtn[aria-pressed="true"] { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.aside { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 20px; padding: 24px; border-radius: 20px; background: var(--raised); border: 1px solid var(--border); }
.kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; border-radius: 14px; overflow: hidden; background: var(--border); border: 1px solid var(--border); }
.kv > div { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; background: var(--raised); }
.kv span:first-child { font-size: 13px; color: var(--muted); }
.kv .num { font-size: 18px; font-weight: 700; }
.lrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.lrow:last-child { border-bottom: none; }
.lrow .t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lrow .t span:first-child { font-weight: 600; }
.lrow .t span:last-child { font-size: 13px; color: var(--muted); }
.statgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 16px; }
.stat { display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: 18px; background: var(--raised); border: 1px solid var(--border); }
.stat > span:first-child { font-size: 14px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.stat .big { font-family: var(--mono); font-size: 34px; font-weight: 700; line-height: 1.1; }
.stat .sub { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.stat.hero { background: var(--brand); border-color: var(--brand); color: #fff; }
.stat.hero > span:first-child, .stat.hero .sub { color: rgba(255,255,255,0.8); }
.chart { display: flex; align-items: flex-end; gap: 8px; height: 220px; padding-top: 24px; }
.chart .b { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; }
.chart .b span { font-size: 12px; color: var(--muted); font-family: var(--mono); white-space: nowrap; }
.chart .b div { width: 100%; max-width: 56px; border-radius: 8px 8px 3px 3px; background: var(--brand); min-height: 3px; }
.chart .b.best div { background: var(--brand-strong); }
.chart .b.zero div { background: var(--brand-soft); }
.xlabels { display: flex; gap: 8px; }
.xlabels span { flex: 1 1 0; min-width: 0; text-align: center; font-size: 12px; color: var(--muted); font-family: var(--mono); white-space: nowrap; overflow: hidden; }
.hbar { height: 8px; border-radius: 4px; background: var(--brand-soft); overflow: hidden; }
.hbar div { height: 100%; background: var(--brand); border-radius: 4px; }
.navrow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.navrow .arrow { width: 48px; height: 48px; border-radius: 12px; border: 1px solid var(--border); background: var(--raised); display: flex; align-items: center; justify-content: center; }
.navrow .arrow:disabled { color: var(--border); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200; display: flex; align-items: center; gap: 12px; max-width: calc(100% - 32px); padding: 14px 18px; border-radius: 14px; background: var(--night); color: #fff; box-shadow: var(--shadow); font-size: 15px; }
.toast button { background: none; border: none; color: #fff; font-size: 20px; }

/* ---------- Ring (temporizador) ---------- */
.ring { position: relative; flex-shrink: 0; }
.ring svg { display: block; transform: rotate(-90deg); }
.ring .in { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: none; background: none; min-height: 0; padding: 0; }

/* ---------- Auth / pantallas centradas ---------- */
.center { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; padding: 32px 16px; }
.authcard { width: 440px; max-width: 100%; display: flex; flex-direction: column; gap: 18px; padding: 32px; border-radius: 24px; background: var(--raised); border: 1px solid var(--border); }
.authcard h1 { margin: 0; font-size: 28px; font-weight: 700; letter-spacing: -0.025em; }
.biglogo { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); background: var(--raised); }
.biglogo.ph { display: flex; align-items: center; justify-content: center; font-size: 40px; font-weight: 700; color: var(--brand); background: var(--brand-soft); }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.gbtn { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 52px; border-radius: 12px; border: 1px solid var(--border); background: var(--raised); font-weight: 600; font-size: 16px; }
.gbtn:hover { background: var(--surface); }
.strength { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.strength div { height: 6px; border-radius: 3px; background: var(--brand-soft); }
.foot { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.foot img { width: 18px; height: 18px; }
.demo-banner { position: fixed; left: 12px; bottom: 12px; z-index: 90; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 999px; background: var(--night); color: #fff; font-size: 13px; box-shadow: var(--shadow); }
.demo-banner button { background: rgba(255,255,255,0.14); border: none; color: #fff; border-radius: 999px; padding: 4px 10px; font-size: 12px; }

/* ---------- Miembro (celular) ---------- */
.mhdr { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: var(--raised); border-bottom: 1px solid var(--border); }
.mhdr .brandlink img, .mhdr .brandlink .logo-ph { width: 40px; height: 40px; font-size: 15px; }
.mhdr .brandlink .word { font-size: 16px; }
.mmain { max-width: 560px; margin: 0 auto; padding: 20px 16px 48px; display: flex; flex-direction: column; gap: 20px; }
.sheet { position: relative; width: 520px; max-width: 100%; margin: auto 0; padding: 24px 20px; border-radius: 24px; background: var(--raised); border: 1px solid var(--border); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 20px; }
.stbox { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; }
.stbox .ic { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; flex-shrink: 0; }

/* ---------- Plataforma ---------- */
.phdr { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 40px; background: var(--raised); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 40; }
.phdr .logo { height: 34px; width: auto; }
.navl { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; }
.navl:hover { color: var(--ink); }
.pwrap { max-width: 1160px; margin: 0 auto; padding: 72px 40px 48px; }
.hero h1 { margin: 0; font-size: 56px; line-height: 60px; font-weight: 700; letter-spacing: -0.03em; }
.monolbl { font-family: var(--mono); font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand); }
.feat { display: flex; gap: 16px; padding: 24px; border-radius: 20px; background: var(--raised); border: 1px solid var(--border); }
.feat .ic { width: 48px; height: 48px; border-radius: 14px; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.feat h3 { margin: 0 0 6px; font-size: 18px; }
.feat p { margin: 0; color: var(--muted); line-height: 1.5; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 16px; }
.steps li { padding: 24px; border-radius: 20px; background: var(--raised); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.steps h3 { margin: 0; font-size: 20px; }
.steps p { margin: 0; color: var(--muted); line-height: 1.5; }
.darkcard { padding: 40px; border-radius: 24px; background: var(--night); color: #F2F0F8; display: flex; flex-wrap: wrap; gap: 32px; align-items: center; justify-content: space-between; }
.darkcard p { color: #A9A5BA; }

@media (max-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .aside { position: static; }
}
@media (max-width: 640px) {
  .hdr { padding: 10px 16px; }
  .brandlink .word { font-size: 16px; }
  .main { padding: 20px 16px 40px; }
  .ptitle { font-size: 28px; }
  .card { padding: 18px; }
  .modal { padding: 20px; border-radius: 20px; gap: 18px; }
  .rcard .timer { font-size: 46px; }
  .m-btns { width: 100%; }
  .m-btns > * { flex: 1 1 auto; }
  .m-hide { display: none !important; }
  .menu { right: 12px; top: 70px; }
  .phdr { padding: 12px 16px; }
  .pwrap { padding: 40px 16px 32px; }
  .hero h1 { font-size: 36px; line-height: 42px; }
  .darkcard { padding: 24px; }
  .authcard { padding: 22px; }
  .kv { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .chart .b span { display: none; }
}
