/* AITA/Nexxus — Portal del socio (mobile first) */
:root {
  /* Tema Golden Age: negro profundo + dorado (ver bloque al final del archivo) */
  --brand-primary: #c9a830;
  --brand-accent: #b8960f;
  --gold-dark: #8b6f0a;
  --bg: #000000;
  --surface: #1a1a1a;
  --surface-2: #111111;
  --border: rgba(184, 150, 15, .32);
  --text: #e8e6e1;
  --text-2: #bdb6a4;
  --text-3: #9a8f72;
  --ok: #4ade80;   --ok-bg: rgba(74, 222, 128, .14);
  --warn: #fbbf24; --warn-bg: rgba(251, 191, 36, .14);
  --bad: #f87171;  --bad-bg: rgba(239, 68, 68, .16);
  --info: #60a5fa; --info-bg: rgba(59, 130, 246, .16);
  --muted-bg: #242424;
  --radius: 14px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --nav-h: 64px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body { font-family: var(--font); font-size: 16px; line-height: 1.45; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--info); }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: 22px; } h2 { font-size: 17px; } h3 { font-size: 15px; }
p { margin: 0 0 8px; }

.boot { min-height: 100vh; display: grid; place-items: center; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--border); border-top-color: var(--brand-accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- header ---------- */
.top { background: var(--brand-primary); color: #fff; padding: 16px 16px 20px; padding-top: max(16px, env(safe-area-inset-top)); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 640px; margin: 0 auto; }
.brand { font-weight: 700; letter-spacing: .08em; font-size: 15px; }
.brand .dot { color: var(--brand-accent); }
.top-actions { display: flex; gap: 8px; align-items: center; }
.chip-btn { background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.chip-btn:hover { background: rgba(255,255,255,.2); }
.hello { max-width: 640px; margin: 14px auto 0; }
.hello h1 { color: #fff; }
.hello p { color: rgba(255,255,255,.75); margin: 4px 0 0; font-size: 14px; }

/* ---------- layout ---------- */
main { max-width: 640px; margin: 0 auto; padding: 16px 16px calc(var(--nav-h) + 24px + env(safe-area-inset-bottom)); }
.stack > * + * { margin-top: 14px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.muted { color: var(--text-3); }
.small { font-size: 13px; }
.strong { font-weight: 600; }
.center { text-align: center; }
.m0 { margin: 0; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.row:first-child { border-top: 0; padding-top: 0; }
.row:last-child { padding-bottom: 0; }
.row .main { min-width: 0; }
.row .main .strong, .row .main .muted { display: block; }
.empty { color: var(--text-3); text-align: center; padding: 18px 8px; font-size: 14px; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.kpi .v { font-size: 22px; font-weight: 700; margin-top: 2px; }
.kpi .k { font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }

/* ---------- badges ---------- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--muted-bg); color: var(--text-2); white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); }
.badge.info { background: var(--info-bg); color: var(--info); }

/* ---------- QR ---------- */
.qr-card { text-align: center; }
.qr-img { width: 220px; max-width: 80%; height: auto; image-rendering: pixelated; background: #fff; display: block; margin: 8px auto; }
.qr-note { font-size: 12px; color: var(--text-3); margin: 6px 0 0; }

/* ---------- buttons / forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 10px; padding: 11px 16px; font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; min-height: 44px; }
.btn:disabled { opacity: .6; cursor: default; }
.btn-primary { background: var(--brand-primary); border-color: var(--brand-primary); color: #fff; }
.btn-danger { color: var(--bad); }
.btn-block { width: 100%; }
.btn-sm { min-height: 34px; padding: 6px 12px; font-size: 13px; }
.form { display: grid; gap: 12px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--text-2); }
.input { width: 100%; font: inherit; font-size: 16px; padding: 11px 12px; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: var(--text); min-height: 44px; }
.input:focus { outline: 2px solid var(--brand-accent); outline-offset: 1px; }
textarea.input { min-height: 80px; resize: vertical; }
.form-error { color: var(--bad); font-size: 14px; margin: 0; min-height: 1em; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--brand-primary); }
.login { width: 100%; max-width: 400px; background: var(--surface); border-radius: 18px; padding: 28px 22px; }
.login .brand { color: var(--brand-primary); text-align: center; margin-bottom: 18px; }
.login h1 { text-align: center; margin-bottom: 6px; }
.login .lead { text-align: center; color: var(--text-2); font-size: 14px; margin-bottom: 18px; }
.notice { border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 14px; }
.notice.bad { background: var(--bad-bg); color: var(--bad); }
.notice.ok { background: var(--ok-bg); color: var(--ok); }
.lang-row { text-align: center; margin-top: 16px; }
.link-btn { background: none; border: 0; color: var(--info); font: inherit; font-size: 14px; cursor: pointer; padding: 6px; text-decoration: underline; }

/* ---------- bottom nav ---------- */
.nav { position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--border); display: flex; justify-content: space-around; padding-bottom: env(safe-area-inset-bottom); z-index: 10; }
.nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; min-height: var(--nav-h); color: var(--text-3); text-decoration: none; font-size: 11px; font-weight: 600; }
.nav a.active { color: var(--brand-primary); }
.nav a.active svg { color: var(--brand-accent); }

/* ---------- modal / toast ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(11,31,58,.45); display: flex; align-items: flex-end; justify-content: center; z-index: 50; }
.modal { background: var(--surface); width: 100%; max-width: 520px; border-radius: 18px 18px 0 0; padding: 18px 16px calc(16px + env(safe-area-inset-bottom)); max-height: 92vh; overflow: auto; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.modal-foot { display: flex; gap: 10px; margin-top: 16px; }
.modal-foot .btn { flex: 1; }
.icon-btn { background: none; border: 0; padding: 8px; cursor: pointer; color: var(--text-2); }
#toast-root { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom)); z-index: 60; display: grid; gap: 8px; width: calc(100% - 32px); max-width: 420px; }
.toast { background: var(--text); color: #fff; border-radius: 10px; padding: 12px 14px; font-size: 14px; }
.toast.error { background: var(--bad); }

@media (min-width: 640px) {
  .modal-backdrop { align-items: center; }
  .modal { border-radius: 18px; }
}
.kpi .v.small { font-size: 15px; }

/* ================= Progreso, evaluación y bienvenida ================= */
.mt8 { margin-top: 8px; }
.btn-lg { min-height: 54px; font-size: 17px; }
.center-block { display: block; text-align: center; margin: 10px auto 0; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-col { display: grid; gap: 8px; margin-top: 10px; }
.row-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.section-title { font-size: 20px; }
.nav a { font-size: 10.5px; padding: 8px 0; }
.nav a svg { width: 21px; height: 21px; }

.welcome { background: linear-gradient(135deg, #FFFDF5, #F6EFD6); border-color: #EADFB8; }
.welcome-msg { font-size: 17px; font-weight: 600; color: var(--brand-primary); line-height: 1.4; }
.welcome-sub { margin-top: 6px; color: var(--text-2); }
.welcome-link { display: inline-block; margin-top: 8px; font-weight: 600; font-size: 15px; }
.callout { border: 2px solid var(--brand-accent); }
.support { border-left: 4px solid var(--brand-accent); }
.insights { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.insights li { font-size: 15px; }
.pending { color: var(--warn); font-weight: 600; font-size: 14px; }
.badge.gold { background: #F6EFD6; color: #7A5E0B; }
.notice.warn { background: var(--warn-bg); color: var(--warn); }
.cat-hint { font-size: 12px; color: var(--text-3); }
.empty-cta { display: grid; gap: 10px; justify-items: start; color: var(--text-2); font-size: 14px; }

/* segmentado de unidades */
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: none; padding: 8px 12px; font: inherit; font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer; min-height: 36px; }
.seg button.on { background: var(--brand-primary); color: #fff; }

/* tarjetas Antes -> Ahora -> Cambio */
.ind { border: 1px solid var(--border); border-radius: 12px; padding: 12px; display: grid; gap: 8px; }
.ind-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.bnc { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 4px; align-items: start; }
.bnc > div { display: grid; gap: 2px; min-width: 0; }
.bnc .k { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); font-weight: 600; }
.bnc .v { font-size: 16px; font-weight: 700; color: var(--text); overflow-wrap: anywhere; }
.bnc .d { font-size: 11px; color: var(--text-3); line-height: 1.3; }
.bnc .arrow { color: var(--brand-accent); font-weight: 700; padding-top: 14px; }
.ins { margin: 0; font-size: 14px; padding: 8px 10px; border-radius: 8px; }
.ins-up { background: var(--ok-bg); color: var(--ok); }
.ins-flat, .ins-single, .ins-conditions { background: var(--muted-bg); color: var(--text-2); }
.spark { width: 120px; height: 32px; flex: none; }
.spark-line { fill: none; stroke: var(--brand-accent); stroke-width: 2; }
.spark-dot { fill: var(--brand-primary); }

/* barras de asistencia */
.bars { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; align-items: end; height: 120px; margin-top: 12px; }
.bar { display: grid; grid-template-rows: auto 1fr auto; justify-items: center; height: 100%; }
.bar-v { font-size: 12px; font-weight: 700; color: var(--text-2); }
.bar-fill { align-self: end; width: 70%; background: var(--brand-primary); border-radius: 6px 6px 0 0; }
.bar-k { font-size: 11px; color: var(--text-3); margin-top: 4px; }
.bar-fill.h1 { height: 10%; }
.bar-fill.h2 { height: 20%; }
.bar-fill.h3 { height: 30%; }
.bar-fill.h4 { height: 40%; }
.bar-fill.h5 { height: 50%; }
.bar-fill.h6 { height: 60%; }
.bar-fill.h7 { height: 70%; }
.bar-fill.h8 { height: 80%; }
.bar-fill.h9 { height: 90%; }
.bar-fill.h10 { height: 100%; }

/* figura corporal */
.figure-wrap { max-width: 380px; margin: 6px auto 0; }
.figure-svg { width: 100%; height: auto; display: block; }
.fig-body { opacity: .92; }
.fig-leader { fill: none; stroke: var(--brand-accent); stroke-width: 1.6; }
.fig-dot { fill: var(--brand-accent); stroke: #fff; stroke-width: 2; }
.fig-lab-title { font: 600 13px var(--font); fill: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }
.fig-lab-val { font: 700 16px var(--font); fill: var(--text); }
.fig-lab-val.is-pending { font-weight: 600; font-size: 14px; fill: var(--warn); }
.fig-lab-delta { font: 500 12px var(--font); fill: var(--text-2); }
.sex-ask { background: var(--surface-2, #F8FAFC); border: 1px dashed var(--border); border-radius: 10px; padding: 10px; display: grid; gap: 8px; margin-top: 8px; }
.table-wrap { overflow-x: auto; margin-top: 10px; }
table.bt { width: 100%; border-collapse: collapse; font-size: 14px; }
table.bt th, table.bt td { text-align: left; padding: 8px 6px; border-top: 1px solid var(--border); vertical-align: top; }
table.bt thead th { border-top: 0; font-size: 11px; text-transform: uppercase; color: var(--text-3); letter-spacing: .04em; }
table.bt td .v { display: block; font-weight: 700; }
table.bt td .d { display: block; font-size: 11px; color: var(--text-3); }
table.bt td.num { font-weight: 700; white-space: nowrap; }

/* vista previa en el inicio */
.pp { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: center; }
.pp-fig .figure-svg { max-height: 150px; }
.pp-text { display: grid; gap: 6px; justify-items: start; }

/* modal de registro */
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.chip { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 8px 12px; font: inherit; font-size: 14px; font-weight: 600; color: var(--text-2); cursor: pointer; min-height: 40px; }
.chip.on { background: var(--brand-primary); color: #fff; border-color: var(--brand-primary); }

/* formulario por pasos */
.progressbar { height: 8px; background: var(--muted-bg); border-radius: 999px; overflow: hidden; margin-bottom: 14px; }
.pb-fill { display: block; height: 100%; background: var(--brand-accent); border-radius: 999px; }
.pb-fill.w0 { width: 0%; }
.pb-fill.w1 { width: 5%; }
.pb-fill.w2 { width: 10%; }
.pb-fill.w3 { width: 15%; }
.pb-fill.w4 { width: 20%; }
.pb-fill.w5 { width: 25%; }
.pb-fill.w6 { width: 30%; }
.pb-fill.w7 { width: 35%; }
.pb-fill.w8 { width: 40%; }
.pb-fill.w9 { width: 45%; }
.pb-fill.w10 { width: 50%; }
.pb-fill.w11 { width: 55%; }
.pb-fill.w12 { width: 60%; }
.pb-fill.w13 { width: 65%; }
.pb-fill.w14 { width: 70%; }
.pb-fill.w15 { width: 75%; }
.pb-fill.w16 { width: 80%; }
.pb-fill.w17 { width: 85%; }
.pb-fill.w18 { width: 90%; }
.pb-fill.w19 { width: 95%; }
.pb-fill.w20 { width: 100%; }

.evalform h3 { margin: 4px 0 0; font-size: 17px; }
.ev-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; }
.ev-nav .btn { flex: 1; }
.subcard { border: 1px solid var(--border); border-radius: 12px; padding: 12px; display: grid; gap: 10px; }
.opts { display: grid; gap: 8px; }
.opts.row2 { grid-template-columns: 1fr 1fr; }
.opt { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: 10px; padding: 12px; min-height: 48px; font-size: 16px; cursor: pointer; }
.opt input { width: 20px; height: 20px; accent-color: var(--brand-primary); }
.review-list { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.eval-item { border-top: 1px solid var(--border); padding: 4px 0 8px; }
.eval-item:first-child { border-top: 0; }
.eval-item details summary { cursor: pointer; color: var(--info); font-size: 14px; padding: 4px 0; }
.answers h3 { font-size: 14px; margin: 10px 0 4px; }
.answers ul { margin: 0; padding-left: 18px; font-size: 14px; display: grid; gap: 2px; }
.field small { font-size: 12px; }

@media (max-width: 360px) {
  .bnc { grid-template-columns: 1fr 1fr 1fr; }
  .bnc .arrow { display: none; }
}
a.btn { text-decoration: none; }

/* ---------- cuestionario subido: revisión y comparación ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.steps { margin: 4px 0 6px; padding-left: 20px; color: var(--text-2); display: grid; gap: 4px; }
.choice { text-align: center; margin: -4px 0; }
label.btn { display: flex; align-items: center; justify-content: center; cursor: pointer; }
.btn.disabled { opacity: .55; pointer-events: none; }
.doc-row { padding: 8px 0; border-bottom: 1px solid var(--border); }
.doc-row:last-child { border-bottom: 0; }
.doc-files { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.doc-view img { display: block; max-width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--border); }
.review .item.todo { border-color: var(--warn); background: var(--warn-bg); }
.review .item .row { align-items: flex-start; gap: 8px; }
.grow { flex: 1 1 auto; }
.seg3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.seg-btn { border: 1px solid var(--border); background: var(--surface); border-radius: 10px; min-height: 44px; font: inherit; font-size: 14px; font-weight: 600; color: var(--text-2); cursor: pointer; }
.seg-btn.on { background: var(--brand-primary); border-color: var(--brand-primary); color: #fff; }
.seg-btn:focus-visible { outline: 3px solid var(--brand-accent); outline-offset: 1px; }
.body-row { align-items: end; }
.span2 { grid-column: 1 / -1; }
.warn-text { color: var(--warn); }
.ml6 { margin-left: 6px; }
.input-sm { width: auto; min-height: 36px; padding: 4px 8px; font-size: 14px; }
table.cmp { width: 100%; border-collapse: collapse; font-size: 14px; }
table.cmp th, table.cmp td { text-align: left; vertical-align: top; padding: 8px 6px; border-bottom: 1px solid var(--border); }
table.cmp th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); }
table.cmp tr.changed td { background: #FBF6E6; }
label.btn { text-align: center; }
.link-btn.left { text-align: left; padding-left: 0; justify-self: start; }
a.chip-btn { text-decoration: none; display: inline-flex; align-items: center; }
.lang-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 12px; }

/* ================= Tema Golden Age (negro + dorado, barra lateral en escritorio) =================
   Solo estilo: no cambia la estructura que pinta app.js. */
body { background: linear-gradient(135deg, #000 0%, #0a0a0a 100%) fixed; }
a, .link-btn, .eval-item details summary { color: var(--brand-primary); }

.top { background: linear-gradient(180deg, #0d0d0d 0%, #1a1a1a 100%); border-bottom: 2px solid var(--brand-accent); box-shadow: 0 4px 15px rgba(184,150,15,.15); }
.brand { color: var(--brand-primary); text-transform: uppercase; letter-spacing: .2em; }
.hello h1 { color: var(--brand-primary); }
.hello p { color: var(--text-3); }
.chip-btn { background: rgba(184,150,15,.1); color: var(--text); border: 1px solid var(--gold-dark); }
.chip-btn:hover { background: rgba(184,150,15,.22); color: var(--brand-primary); }

.card, .kpi { background: linear-gradient(135deg, #252525 0%, #1a1a1a 100%); border: 1px solid var(--border); box-shadow: 0 8px 30px rgba(184,150,15,.08); }
.card h2, .section-title { color: var(--brand-primary); text-transform: uppercase; letter-spacing: .08em; }
.kpi .v { color: var(--brand-primary); }
.ind, .subcard, .opt, .sex-ask { background: rgba(184,150,15,.04); }
.ind { border-left: 3px solid var(--brand-accent); }

.btn { background: #1f1f1f; color: var(--text); }
.btn:hover:not(:disabled) { border-color: var(--brand-primary); }
.btn-primary { background: linear-gradient(135deg, #c9a830, #b8960f); border-color: var(--brand-accent); color: #000; }
.btn-primary:hover:not(:disabled) { filter: brightness(1.08); }
.chip.on, .seg button.on, .seg-btn.on { color: #000; }
.input { background: var(--surface-2); color: var(--text); }
.input::placeholder { color: var(--text-3); }

.login-wrap { background: radial-gradient(circle at 50% 0%, #1f1a0a 0%, #000 60%); }
.login { background: linear-gradient(135deg, #252525 0%, #1a1a1a 100%); border: 2px solid var(--brand-accent); box-shadow: 0 8px 30px rgba(184,150,15,.2); }
.login .brand { color: var(--brand-primary); }

.nav { background: #0d0d0d; border-top: 2px solid var(--brand-accent); }
.nav a { color: var(--text-3); }
.nav a.active, .nav a.active svg { color: var(--brand-primary); }

.modal-backdrop { background: rgba(0,0,0,.72); }
.modal { background: #1a1a1a; border-top: 2px solid var(--brand-accent); }
.toast { background: #252525; color: var(--text); border: 1px solid var(--brand-accent); }
.toast.error { background: #7f1d1d; color: #fff; border-color: #ef4444; }

.welcome { background: linear-gradient(135deg, rgba(184,150,15,.2), rgba(184,150,15,.05)); border-color: var(--brand-accent); }
.welcome-msg { color: var(--brand-primary); }
.badge.gold { background: rgba(184,150,15,.2); color: var(--brand-primary); }
table.cmp tr.changed td { background: rgba(184,150,15,.12); }
.qr-img { padding: 8px; border-radius: 8px; }

.bar-fill { background: linear-gradient(180deg, #c9a830, #8b6f0a); }
.spark-dot { fill: var(--brand-primary); }
#figfill stop:first-child { stop-color: #c9a830; }
#figfill stop:last-child { stop-color: #6b5508; }
.fig-dot { stroke: #000; }

/* Escritorio: la navegación inferior pasa a ser una barra lateral fija */
@media (min-width: 1024px) {
  #app:has(> .nav) { padding-left: 260px; }
  .nav { top: 0; right: auto; width: 260px; flex-direction: column; justify-content: flex-start; gap: 8px; padding: 24px 18px; border-top: 0; border-right: 2px solid var(--brand-accent); background: linear-gradient(180deg, #0d0d0d 0%, #1a1a1a 100%); box-shadow: 4px 0 15px rgba(184,150,15,.2); }
  .nav a { flex: none; flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 46px; padding: 12px 14px; font-size: 14px; font-weight: 500; letter-spacing: .02em; color: var(--text); background: rgba(184,150,15,.08); border: 1px solid var(--gold-dark); border-radius: 4px; transition: background .2s, border-color .2s, transform .2s; }
  .nav a:hover { background: rgba(184,150,15,.18); border-color: var(--brand-primary); color: var(--brand-primary); transform: translateX(4px); }
  .nav a.active { background: rgba(184,150,15,.3); border-color: var(--brand-accent); }
  .top-row, .hello { max-width: 860px; }
  main { max-width: 860px; padding: 24px 24px 40px; }
  #toast-root { bottom: 24px; left: calc(50% + 130px); }
}
@media (prefers-reduced-motion: reduce) {
  .nav a { transition: none; }
  .nav a:hover { transform: none; }
}

/* ---------- plan de entrenamiento ---------- */
.boot-inline { display: grid; place-items: center; padding: 32px 0; }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.day { position: relative; display: grid; justify-items: center; gap: 2px; min-height: 52px; padding: 8px 2px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text-3); font: inherit; font-size: 13px; font-weight: 600; text-transform: capitalize; cursor: pointer; }
.day.has { color: var(--text); }
.day.has::after { content: ""; position: absolute; top: 6px; right: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--brand-primary); }
.day.today { border-color: var(--brand-accent); }
.day.on { background: linear-gradient(135deg, #c9a830, #b8960f); border-color: var(--brand-accent); color: #000; }
.day.on::after { background: #000; }
.day-t { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.day:focus-visible { outline: 3px solid var(--brand-primary); outline-offset: 2px; }
.day-title { font-size: 18px; color: var(--brand-primary); }
.day-name { text-transform: capitalize; }
.ex-list { display: grid; gap: 12px; }
.ex { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: center; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(135deg, #252525 0%, #1a1a1a 100%); }
.ex-img { position: relative; background: #0d0d0d; border: 1px solid var(--border); border-radius: 10px; }
.ex-img img { display: block; width: 100%; height: auto; }
.ex-n { position: absolute; top: -8px; left: -8px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--brand-primary); color: #000; font-size: 13px; font-weight: 700; }
.ex-body { display: grid; gap: 4px; min-width: 0; }
.ex-body h3 { font-size: 16px; overflow-wrap: anywhere; }
.ex-dose { margin: 0; font-size: 17px; font-weight: 700; color: var(--brand-primary); }
.ex-notes { color: var(--text-2); }
/* registro y gráfica por máquina */
.ex.done { border-color: var(--ok); }
.ex.done .ex-n { background: var(--ok); }
.ex-track { grid-column: 1 / -1; display: grid; gap: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.ex-chart { display: grid; gap: 4px; }
.ex-chart-h { margin: 0; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); }
.ex-chart-h .muted { text-transform: none; letter-spacing: 0; font-weight: 500; }
.ex-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.exc { width: 100%; max-width: 300px; height: auto; display: block; }
.exc-axis { stroke: var(--border); stroke-width: 1; }
.exc-bar { fill: var(--gold-dark); }
.exc-last .exc-bar { fill: var(--brand-primary); }
.exc-val { font: 700 10px var(--font); fill: var(--text-2); }
.exc-last .exc-val { fill: var(--brand-primary); }
.exc-lbl { font: 500 9px var(--font); fill: var(--text-3); }
@media (min-width: 1024px) {
  .ex-list { grid-template-columns: 1fr 1fr; }
  .ex { grid-template-columns: 140px 1fr; }
}
@media (max-width: 360px) {
  .ex { grid-template-columns: 96px 1fr; gap: 10px; }
  .day { font-size: 12px; }
}
