/* ClubTrack · demo — dirección «Marcador»
   El panel del club como el marcador de la pista: rótulo condensado, campos de color planos,
   el dato que importa enorme y lo secundario pequeño. Sin degradados, sin sombras en reposo. */
:root {
  --brand: #1554c9;            /* color del club (lo elige cada club; app.js calcula --on-brand y --brand-text) */
  --on-brand: #fff;
  --brand-text: var(--brand);
  --brand-soft: color-mix(in srgb, var(--brand) 13%, var(--surface));
  --brand-ink: color-mix(in srgb, var(--brand) 80%, #0a0f1c);

  --bg: #e7e7e0;               /* papel de acta */
  --surface: #f6f6f1;
  --tone: #dcdcd3;
  --tone-2: #cdcdc3;
  --line: #d2d2c8;
  --line-2: #e2e2da;
  --text: #10172a;             /* tinta marino del marcador */
  --muted: #535a6b;

  --board: #10172a;
  --board-2: #1b2339;
  --board-3: #283149;
  --board-ink: #f2f1ea;
  --board-muted: #9aa2b6;

  --ok: #156a3b;   --ok-bg: #cfe5d5;   --ok-lit: #63d394;
  --warn: #7f5300; --warn-bg: #f2dc9c; --mustard: #e3a810;
  --bad: #be111e;  --bad-bg: #f5cfcb;  --red: #d7192a; --bad-lit: #ff7a72;
  --info: #1d3f8f; --info-bg: #d5ddef;
  --wa: #1a8549;

  --r: 3px;
  --shadow-lg: 0 24px 60px rgba(10, 15, 28, .28);
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --top: var(--erma-h, 0px);
  --ease: cubic-bezier(.2, .75, .2, 1);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 15px/1.45 var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body.noscroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.1; font-family: var(--display); font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }
::selection { background: var(--brand); color: var(--on-brand); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.ic { width: 18px; height: 18px; flex: none; }
.muted { color: var(--muted); }
.small, small { font-size: 13px; }
.grow { flex: 1; }
.nowrap { white-space: nowrap; }
.t-bad { color: var(--bad); font-style: normal; font-weight: 600; }
.center { justify-content: center; text-align: center; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap, .wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.num, .tbl, time { font-variant-numeric: tabular-nums; }

/* ---------- botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 15px; border: 0; border-radius: var(--r); background: var(--tone); font-weight: 600; font-size: 14px; white-space: nowrap; transition: background .15s, color .15s, transform .08s; }
.btn:hover { background: var(--tone-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .4; pointer-events: none; }
.btn.primary { background: var(--brand); color: var(--on-brand); }
.btn.primary:hover { background: var(--brand-ink); color: #fff; }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--tone); color: var(--text); }
.btn.bad { background: var(--bad-bg); color: var(--bad); }
.btn.bad:hover { background: var(--red); color: #fff; }
.btn.danger-ghost { background: transparent; color: var(--bad); }
.btn.danger-ghost:hover { background: var(--bad-bg); }
.btn.wa { background: var(--wa); color: #fff; }
.btn.wa:hover { background: #136a39; }
.btn.sm { height: 34px; padding: 0 12px; font-size: 13.5px; }
.btn.xs { height: 28px; padding: 0 10px; font-size: 13px; }
.btn.big { height: 52px; padding: 0 22px; font-size: 16px; }
.btn .ic { width: 16px; height: 16px; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: var(--r); background: transparent; color: var(--muted); flex: none; transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--tone); color: var(--text); }
.link { color: var(--brand-text); font-weight: 600; font-size: 14px; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.link-like { border: 0; background: none; padding: 0; text-align: left; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.back:hover { color: var(--text); }

/* ---------- etiquetas ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; height: 23px; padding: 0 8px; border-radius: 2px; background: var(--tone); color: var(--text); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.badge .ic { width: 13px; height: 13px; }
.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); }
.badge.brand { background: var(--brand-soft); color: var(--brand-text); }
.badge.muted { background: var(--line-2); color: var(--muted); }
.badge.wa { background: var(--ok-bg); color: var(--wa); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { height: 32px; padding: 0 12px; border: 0; border-radius: var(--r); background: var(--tone); font-size: 13.5px; font-weight: 500; transition: background .15s; }
.chip:hover { background: var(--brand); color: var(--on-brand); }
.pill { display: inline-block; padding: 2px 8px; border-radius: 2px; background: var(--tone); font: 600 15px/1.3 var(--display); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- avatares: dorsales cuadrados ---------- */
.av { --h: 200; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 2px; flex: none; background: hsl(var(--h) 38% 84%); color: hsl(var(--h) 55% 22%); font: 700 14px/1 var(--display); letter-spacing: .02em; }
.av.xs { width: 24px; height: 24px; font-size: 11px; }
.av.lg { width: 60px; height: 60px; font-size: 22px; }
.av.xl { width: 88px; height: 88px; font-size: 32px; }

/* ---------- formularios ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 600; color: var(--muted); }
.field.inline { flex-direction: row; align-items: center; }
.field.inline input { width: 76px; }
input:not([type=checkbox]):not([type=radio]), select, textarea { width: 100%; min-height: 40px; padding: 8px 11px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); outline: none; transition: border-color .15s, box-shadow .15s; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.input-sm { width: auto !important; min-height: 36px !important; padding: 5px 10px !important; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .span2 { grid-column: span 2; }
.inp-flat { border-color: transparent !important; background: transparent !important; min-height: 34px !important; padding: 4px 8px !important; }
.inp-flat:hover { border-color: var(--line) !important; }
.inp-flat:focus { border-color: var(--brand) !important; background: var(--surface) !important; }
.inp-flat.num { width: 80px !important; text-align: right; }
.inp-flat.res { width: 116px !important; text-align: right; font: 700 18px var(--display) !important; font-variant-numeric: tabular-nums; }
.days { display: flex; flex-wrap: wrap; gap: 4px; }
.days label, .seg label { position: relative; }
.days input, .seg input, .radios input { position: absolute; opacity: 0; pointer-events: none; }
.days span { display: inline-flex; align-items: center; height: 36px; padding: 0 13px; border-radius: var(--r); background: var(--tone); font-weight: 600; font-size: 14px; cursor: pointer; transition: background .15s, color .15s; }
.days span:hover { background: var(--tone-2); }
.days input:checked + span { background: var(--brand); color: var(--on-brand); }
.days input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.radios { display: grid; gap: 4px; }
.radios span { display: flex; justify-content: space-between; align-items: center; padding: 13px 14px; border-radius: var(--r); background: var(--tone); font-weight: 600; cursor: pointer; transition: background .15s; }
.radios small { color: var(--muted); font-weight: 500; }
.radios input:checked + span { background: var(--brand); color: var(--on-brand); }
.radios input:checked + span small { color: inherit; opacity: .8; }
.search { position: relative; flex: 1 1 260px; max-width: 400px; }
.search .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 16px; }
.search input { padding-left: 34px !important; }
.inline-add { display: flex; gap: 6px; margin-top: 12px; }
.inline-add.two select { flex: 1; }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.sw { width: 34px; height: 34px; border: 0; border-radius: 2px; background: var(--c); transition: transform .12s; }
.sw:hover { transform: translateY(-2px); }
.sw.on { outline: 3px solid var(--text); outline-offset: 2px; }
.switch { position: relative; display: inline-block; width: 44px; height: 24px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 2px; background: var(--tone-2); transition: background .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 1px; background: var(--surface); transition: transform .22s var(--ease); }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.sw-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; }
.sw-row + .sw-row { border-top: 1px solid var(--line-2); }

/* segmentado: el elegido se enciende en tinta, como una casilla del marcador */
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--r); background: var(--tone); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button, .seg label span { display: inline-flex; align-items: center; justify-content: center; height: 32px; padding: 0 13px; border: 0; border-radius: 2px; background: transparent; font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap; cursor: pointer; transition: background .15s, color .15s; }
.seg button:hover, .seg label span:hover { color: var(--text); }
.seg button.on, .seg input:checked + span { background: var(--board); color: var(--board-ink); }
.seg.full { display: flex; width: 100%; margin-bottom: 14px; }
.seg.full > * { flex: 1; }
.seg.full label span { width: 100%; }

/* ---------- panel de administración ---------- */
.admin { display: grid; grid-template-columns: 252px 1fr; min-height: calc(100vh - var(--top)); background: var(--board); }
.main { background: var(--bg); }
.side { position: sticky; top: var(--top); height: calc(100vh - var(--top)); display: flex; flex-direction: column; background: var(--board); color: var(--board-ink); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--board-3) transparent; }
.side-head { display: flex; align-items: flex-start; gap: 12px; padding: 22px 18px 18px; }
.side-head b { display: block; font: 700 23px/.95 var(--display); text-transform: uppercase; letter-spacing: -.005em; }
.side-head small { display: block; margin-top: 6px; color: var(--board-muted); font-size: 13px; }
.logo { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 2px; background: var(--brand); color: var(--on-brand); font: 700 18px/1 var(--display); letter-spacing: .02em; flex: none; }
.side nav { display: flex; flex-direction: column; gap: 1px; padding: 4px 10px 14px; flex: 1; }
.side nav a { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 2px; color: var(--board-muted); font-weight: 500; font-size: 15px; transition: background .15s, color .15s; }
.side nav a .ic { opacity: .75; }
.side nav a:hover { background: var(--board-2); color: var(--board-ink); }
.side nav a.on { background: var(--brand); color: var(--on-brand); font-weight: 600; }
.side nav a.on .ic { opacity: 1; }
.nb { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 2px; background: var(--red); color: #fff; font: 700 14px/22px var(--display); text-align: center; }
.side-foot { display: flex; align-items: center; gap: 8px; padding: 14px 18px; background: var(--board-2); color: var(--board-muted); font: 600 15px var(--display); letter-spacing: .02em; }
.side-back { display: none; }
.main { min-width: 0; }
.top { position: sticky; top: var(--top); z-index: 20; display: flex; align-items: flex-end; gap: 10px; min-height: 78px; padding: 18px 32px 12px; background: var(--bg); }
.top h1 { font-size: 38px; line-height: .92; text-transform: uppercase; letter-spacing: -.01em; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-actions { display: flex; align-items: center; gap: 6px; }
.content { padding: 8px 32px 56px; display: flex; flex-direction: column; gap: 18px; max-width: 1440px; }
.only-sm { display: none; }

.card { background: var(--surface); border-radius: var(--r); padding: 20px; min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-h h3 { font-size: 22px; font-weight: 700; }
.box { background: var(--bg); border-radius: var(--r); padding: 14px; min-width: 0; }
.box h4, .mbody h4 { font: 700 18px/1.1 var(--display); margin-bottom: 10px; }
h3.sec { font-size: 22px; margin: 10px 0 -4px; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.note { position: relative; display: block; padding: 13px 15px 13px 43px; border-radius: var(--r); background: var(--tone); color: var(--text); font-size: 14px; }
.note .ic { position: absolute; left: 15px; top: 14px; color: var(--brand-text); }
.note b { font-weight: 600; }
.note.small { font-size: 13px; padding: 10px 12px 10px 38px; }
.note.small .ic { left: 12px; top: 11px; width: 16px; height: 16px; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 36px 16px; color: var(--muted); text-align: center; }
.empty .ic { width: 30px; height: 30px; opacity: .45; }
.toolbar { display: flex; align-items: center; gap: 8px; }

/* ---------- inicio: el marcador ---------- */
.board { display: grid; grid-template-columns: minmax(250px, .8fr) minmax(0, 2fr); gap: 28px; padding: 26px 28px 22px; border-radius: var(--r); background: var(--board); color: var(--board-ink); }
.board-main { display: flex; flex-direction: column; justify-content: space-between; gap: 10px; min-width: 0; }
.board-l { font: 600 20px/1.05 var(--display); color: var(--board-muted); }
.board-v { display: flex; align-items: baseline; gap: 4px; font: 700 clamp(104px, 11vw, 172px)/.8 var(--display); letter-spacing: -.035em; font-variant-numeric: tabular-nums; color: var(--board-ink); transition: color .15s; }
.board-v small { font-size: .3em; letter-spacing: 0; color: var(--board-muted); }
a.board-v:hover { color: var(--brand-on-board, var(--board-ink)); }
.board-s { font-size: 15px; color: var(--board-muted); }
.board-s b { color: var(--board-ink); font-weight: 600; }
.board-chart { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.board-chart h3 { font: 600 20px var(--display); color: var(--board-muted); }
/* bombillas: una casilla por pista y franja */
.bulbs { display: grid; grid-template-columns: 74px repeat(var(--cols), minmax(0, 1fr)); gap: 4px; font-variant-numeric: tabular-nums; }
.bulbs .bl { align-self: center; font: 600 14px/1 var(--display); color: var(--board-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bulbs .bt { text-align: center; font: 600 13px/1 var(--display); color: var(--board-muted); padding-top: 4px; }
.bulbs .bt.now { color: var(--board-ink); }
.bulbs i { height: 22px; border-radius: 1px; background: var(--board-2); }
.bulbs i.on { background: var(--brand-on-board, var(--board-ink)); }
.bulbs i.pt { background: var(--brand-on-board, var(--board-ink)); opacity: .55; }
.bulbs i.pt.past { opacity: .25; }
.bulbs i.cls { background: var(--mustard); }
.bulbs i.blk { background: #5b6276; }
.bulbs i.past { opacity: .4; }
.bulbs i.nowc { box-shadow: inset 0 0 0 2px var(--board-ink); }
.bulb-key { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--board-muted); }
.bulb-key span { display: inline-flex; align-items: center; gap: 6px; }
.bulb-key i { width: 12px; height: 12px; border-radius: 1px; background: var(--board-2); }
.bulb-key i.on { background: var(--brand-on-board, var(--board-ink)); }
.bulb-key i.pt { background: var(--brand-on-board, var(--board-ink)); opacity: .55; }
.bulb-key i.cls { background: var(--mustard); }
/* columnas de entradas por hora (gimnasio / box) */
.cols { display: flex; align-items: flex-end; gap: 4px; height: 170px; }
.cols > div { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; height: 100%; min-width: 0; }
.cols span { width: 100%; border-radius: 1px; background: var(--brand-on-board, var(--board-ink)); min-height: 3px; }
.cols > div.past span { opacity: .45; }
.cols > div.nowc span { background: var(--mustard); }
.cols em { font: 600 14px/1 var(--display); font-style: normal; color: var(--board-ink); }
.cols small { font: 600 13px/1 var(--display); color: var(--board-muted); }

/* línea de datos secundarios: pequeños, sin cajas */
.kline { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.kl { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: end; padding: 14px 18px; border-radius: var(--r); background: var(--surface); transition: background .15s; }
.kl:hover { background: var(--brand-soft); }
.kl-v { grid-row: span 2; font: 700 46px/.85 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kl-v small { font-size: .45em; color: var(--muted); }
.kl-l { font-weight: 600; font-size: 15px; }
.kl-s { font-size: 13px; color: var(--muted); }
.kl.alert { background: var(--red); color: #fff; }
.kl.alert .kl-s { color: rgba(255, 255, 255, .85); }
.kl.alert:hover { background: var(--bad); }

/* KPIs (filtros de cuotas) */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.kpi { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 0; border-radius: var(--r); background: var(--surface); text-align: left; transition: background .15s, color .15s; }
.kpi:hover { background: var(--brand-soft); }
.kpi-i { display: none; }
.kpi-l { font-size: 14px; font-weight: 600; }
.kpi-v { font: 700 44px/.9 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi-v small { font-size: .45em; color: var(--muted); }
.kpi-s { color: var(--muted); font-size: 13px; }
.kpi.sm { padding: 12px 14px; }
.kpi.sm .kpi-v { font-size: 38px; }
.kpi.cobrado .kpi-v { color: var(--ok); } .kpi.pendiente .kpi-v { color: var(--warn); } .kpi.devuelto .kpi-v { color: var(--bad); }
.kpi.sel { background: var(--board); color: var(--board-ink); }
.kpi.sel .kpi-s { color: var(--board-muted); }
.kpi.sel.cobrado .kpi-v { color: var(--ok-lit); } .kpi.sel.pendiente .kpi-v { color: var(--mustard); } .kpi.sel.devuelto .kpi-v { color: var(--bad-lit); }
/* reparto de recibos del mes: una sola barra */
.split { display: flex; height: 14px; gap: 2px; border-radius: 2px; overflow: hidden; background: var(--tone); }
.split span { min-width: 2px; }
.split .cobrado { background: var(--ok); } .split .pendiente { background: var(--mustard); } .split .devuelto { background: var(--red); }

.stats-row { display: flex; flex-wrap: wrap; gap: 4px; }
.stats-row > div { flex: 1 1 120px; padding: 12px 16px; border-radius: var(--r); background: var(--surface); }
.stats-row b { display: block; font: 700 34px/.95 var(--display); letter-spacing: -.015em; font-variant-numeric: tabular-nums; }
.stats-row small { color: var(--muted); }
.stats-row > div:first-child { background: var(--board); color: var(--board-ink); }
.stats-row > div:first-child small { color: var(--board-muted); }
.stats-row.sm > div, .stats-row.sm > div:first-child { padding: 8px 10px; background: var(--bg); color: var(--text); }
.stats-row.sm > div:first-child small { color: var(--muted); }
.stats-row.sm b { font-size: 21px; }

/* listas del inicio */
.attn li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.attn li:last-child { border: 0; }
.attn li > span { flex: 1; font-weight: 500; }
.att i { width: 10px; height: 10px; border-radius: 1px; flex: none; background: var(--info); }
.att.bad i { background: var(--red); } .att.warn i { background: var(--mustard); }
.agenda li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.agenda li:last-child { border: 0; }
.agenda time { width: 54px; font: 700 21px/1 var(--display); }
.agenda .ic { color: var(--brand-text); }
.agenda div { flex: 1; min-width: 0; }
.agenda b, .agenda small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agenda b { font-weight: 600; }
.agenda small { color: var(--muted); }
.agenda li.done { opacity: .45; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 190px; padding-top: 20px; }
.bars.short { height: 130px; margin-top: 18px; }
.bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; min-width: 0; }
.bar span { width: 100%; max-width: 44px; border-radius: 1px; background: var(--brand); min-height: 3px; transform-origin: bottom; }
.bar.past span { opacity: .45; }
.bar.now span { background: var(--mustard); }
.bar em { position: absolute; top: -2px; font: 600 13px/1 var(--display); font-style: normal; color: var(--muted); }
.bar small { margin-top: 6px; font: 600 13px/1 var(--display); color: var(--muted); white-space: nowrap; }
.saved-n { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r); background: var(--mustard); color: var(--text); margin-bottom: 8px; }
.saved-n .ic { width: 28px; height: 28px; }
.saved-n b { display: block; font: 700 46px/.9 var(--display); letter-spacing: -.02em; }
.saved-n small { font-size: 14px; }
.feed li { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.feed li:last-child { border: 0; }
.feed .ic { color: var(--brand-text); margin-top: 2px; }
.feed span { display: block; }
.feed small { color: var(--muted); }
.next-ev { display: flex; align-items: center; gap: 18px; background: var(--board); color: var(--board-ink); padding: 18px 22px; transition: background .15s; }
.next-ev:hover { background: var(--board-2); }
.next-ev > .ic:first-child { width: 40px; height: 40px; padding: 9px; border-radius: 2px; background: var(--mustard); color: var(--text); }
.next-ev div { flex: 1; min-width: 0; }
.next-ev b { display: block; font: 700 30px/1 var(--display); text-transform: uppercase; margin-top: 4px; }
.next-ev small { color: var(--board-muted); font-size: 14px; }
.next-ev .pill { background: var(--board-3); color: var(--board-ink); }
.grid:has(> .next-ev) { align-items: start; }
.g-main > .next-ev { flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 14px; min-height: 280px; padding: 22px 24px; }
.g-main > .next-ev b { font-size: clamp(34px, 3.4vw, 52px); line-height: .9; margin-top: 8px; }
.g-main > .next-ev > .ic:last-child { align-self: flex-end; width: 26px; height: 26px; margin-top: -40px; }
.next-ev > .ic:last-child { transition: transform .2s var(--ease); }
.next-ev:hover > .ic:last-child { transform: translateX(4px); }

/* ---------- tablas ---------- */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; padding: 11px 16px 9px; font-size: 13px; font-weight: 600; color: var(--muted); border-bottom: 2px solid var(--text); }
.tbl td { padding: 10px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl.hover tbody tr { cursor: pointer; transition: background .12s; }
.tbl.hover tbody tr:hover { background: var(--brand-soft); }
.tbl.compact td { padding: 8px 6px; }
.tbl .r { text-align: right; } .tbl .c { text-align: center; }
.tbl td.strong { font: 700 19px var(--display); }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who b, .who small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who b { font-weight: 600; }
.who small { color: var(--muted); }
.st-sel { width: auto !important; min-height: 30px !important; padding: 3px 26px 3px 10px !important; border-radius: 2px !important; border-color: transparent !important; font-size: 13px; font-weight: 600; }
.st-sel.cobrado { background-color: var(--ok-bg) !important; color: var(--ok); }
.st-sel.pendiente { background-color: var(--warn-bg) !important; color: var(--warn); }
.st-sel.devuelto { background-color: var(--bad-bg) !important; color: var(--bad); }
.mnav { display: flex; align-items: center; gap: 2px; background: var(--tone); border-radius: var(--r); padding: 2px; }
.mnav b { min-width: 130px; text-align: center; font: 700 18px var(--display); text-transform: capitalize; }

/* ---------- reservas de pistas ---------- */
.bk-wrap { overflow-x: auto; background: var(--surface); border-radius: var(--r); }
.bk-grid { display: grid; grid-template-columns: 62px repeat(var(--cols), minmax(118px, 1fr)); min-width: max-content; padding: 0 4px 4px; }
.bk-h { position: sticky; top: 0; padding: 12px 8px 10px; font: 700 18px/1 var(--display); text-transform: uppercase; text-align: center; background: var(--surface); }
.bk-h small { display: block; margin-top: 3px; color: var(--muted); font: 500 12.5px var(--font); text-transform: none; }
.bk-t { display: grid; place-items: center; font: 700 17px var(--display); color: var(--muted); }
.cell { margin: 2px; min-height: 54px; border: 0; border-radius: 2px; padding: 6px 9px; text-align: left; display: flex; flex-direction: column; justify-content: center; gap: 1px; font-size: 12.5px; min-width: 0; overflow: hidden; transition: background .12s, transform .12s; }
.cell b { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell.free { background: var(--bg); color: transparent; align-items: center; }
.cell.free:hover { background: var(--brand-soft); color: var(--brand-text); }
.cell.free:focus-visible { color: var(--brand-text); }
.cell.free.past { background: transparent; }
.cell.busy { background: var(--brand); color: var(--on-brand); }
.cell.busy:has(.src.playtomic) { background: var(--board); color: var(--board-ink); }
.cell.cls { background: var(--mustard); color: var(--text); }
.cell.blk { background: var(--tone-2); color: var(--muted); }
button.cell:not(.free):hover { transform: translateY(-1px); }
.cell.past { opacity: .5; }
.src { font-size: 12px; font-weight: 600; opacity: .8; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; font-size: 13px; color: var(--muted); }
.lg { display: inline-block; width: 13px; height: 13px; border-radius: 1px; margin-right: -10px; vertical-align: -2px; }
.lg.busy { background: var(--brand); }
.lg.pt { background: var(--board); }
.lg.cls { background: var(--mustard); }
.lg.blk { background: var(--tone-2); }
.bk-info { display: flex; align-items: center; gap: 12px; padding: 13px; border-radius: var(--r); background: var(--bg); margin-bottom: 14px; }
.bk-info > div { flex: 1; }
.bk-info b, .bk-info small { display: block; }
.bk-info b { font: 700 20px var(--display); }
.bk-info small { color: var(--muted); }

/* ---------- listas de personas ---------- */
.people li, .mini li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.people li:last-child, .mini li:last-child { border: 0; }
.box .people li, .box .mini li { border-color: var(--line); }
.people li > div { flex: 1; min-width: 0; }
.people b, .people small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.people b { font-weight: 600; }
.people small { color: var(--muted); }
.mini li { font-size: 14px; }
.mini li .ic { color: var(--brand-text); width: 16px; }
.mini li > span { flex: 1; }
.mini li small { color: var(--muted); }
.dl { display: grid; grid-template-columns: auto 1fr; gap: 7px 16px; margin: 0; font-size: 14px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

/* ficha */
.ficha-head { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.ficha-head h2 { font-size: 34px; line-height: .95; text-transform: uppercase; margin-bottom: 8px; }
.ficha-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.mbody .grid { margin: 12px 0; }
.mbody .box + .box { margin-top: 12px; }
.mbody > .chips { margin-bottom: 12px; }

/* ---------- escuela ---------- */
.gcards { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px; }
.gcard { display: flex; flex-direction: column; gap: 6px; border: 0; text-align: left; transition: background .15s, transform .15s var(--ease); }
.gcard:hover { background: var(--brand-soft); transform: translateY(-2px); }
.gc-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.gc-top b { font: 700 23px/1 var(--display); }
.gcard > small { color: var(--muted); }
.gc-staff { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.gc-staff .ic { width: 15px; color: var(--muted); }
.gc-foot { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; flex-wrap: wrap; }
/* plazas: una casilla por plaza; las de espera, en mostaza */
.seats { display: flex; flex-wrap: wrap; gap: 3px; margin: 6px 0 4px; }
.seats i { width: 22px; height: 22px; border-radius: 1px; background: var(--tone); }
.seats i.in { background: var(--brand); }
.seats i.wait { background: var(--mustard); }
.meter { height: 8px; border-radius: 1px; background: var(--tone); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--brand); transform-origin: left; }
.meter.big { height: 16px; margin: 16px 0; }
.meter.hot span { background: var(--red); }

/* ---------- eventos ---------- */
.evs { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 4px; }
.ev-card { display: flex; align-items: center; gap: 16px; transition: background .15s; }
.ev-card:hover { background: var(--brand-soft); }
.ev-date { display: grid; place-items: center; align-content: center; width: 64px; height: 70px; border-radius: 2px; background: var(--board); color: var(--board-ink); flex: none; line-height: 1; }
.ev-date b { font: 700 36px/.85 var(--display); } .ev-date small { font: 600 15px var(--display); text-transform: uppercase; color: var(--board-muted); }
.ev-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ev-main > b { font: 700 22px/1.05 var(--display); }
.ev-main > small { color: var(--muted); }
.ev-n { text-align: right; }
.ev-n b { font: 700 34px/.9 var(--display); font-variant-numeric: tabular-nums; } .ev-n b small { color: var(--muted); font-size: 18px; }
.ev-n > small { display: block; color: var(--muted); }
.ev-head { display: flex; flex-direction: column; gap: 14px; }
.ev-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 15px; }
.ev-meta span { display: inline-flex; align-items: center; gap: 7px; }
.ev-meta .ic { width: 16px; color: var(--muted); }
.pchips { display: flex; flex-wrap: wrap; gap: 4px; }
.pchip { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 10px 0 4px; border-radius: 2px; background: var(--tone); font-size: 13.5px; font-weight: 600; }
.pchip button { display: grid; place-items: center; width: 22px; height: 22px; margin-right: -6px; border: 0; border-radius: 2px; background: transparent; color: var(--muted); }
.pchip button:hover { background: var(--bad-bg); color: var(--bad); }
.pchip button .ic { width: 13px; }
.teams li { display: flex; align-items: center; gap: 4px; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.teams li b { margin-left: 6px; flex: 1; font-weight: 600; }
.center-card { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 32px; }
.center-card > .ic { width: 36px; height: 36px; color: var(--brand-text); }
.center-card h3 { font-size: 30px; text-transform: uppercase; }
.center-card p { max-width: 480px; }
.round + .round { margin-top: 18px; }
.round h4 { font: 700 18px var(--display); color: var(--muted); margin-bottom: 4px; }
.match { display: grid; grid-template-columns: auto 1fr auto 1fr; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.match .tm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.match .tm.r { text-align: right; }
.match .tm.win { font-weight: 700; color: var(--brand-text); }
.mc { font: 700 14px/1 var(--display); color: var(--board-ink); background: var(--board); border-radius: 2px; padding: 4px 6px; }
.match:not(:has(.mc)) { grid-template-columns: 1fr auto 1fr; }
.score { display: inline-flex; align-items: center; gap: 4px; }
.score input { width: 46px !important; min-height: 38px !important; padding: 2px !important; text-align: center; font: 700 21px var(--display) !important; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.score input::-webkit-outer-spin-button, .score input::-webkit-inner-spin-button { -webkit-appearance: none; }
.score i { color: var(--muted); font-style: normal; }
.rank td { padding: 8px 10px; }
.rank th { padding: 8px 10px; }
.pos { width: 38px; font: 700 17px var(--display); color: var(--muted); text-align: center; }
.medal { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 2px; color: var(--text); font: 700 16px/1 var(--display); }
.medal.m1 { background: var(--mustard); } .medal.m2 { background: #bfc3cc; } .medal.m3 { background: #d39a6a; }
.bracket { display: flex; gap: 20px; overflow-x: auto; padding-bottom: 6px; }
.bcol { display: flex; flex-direction: column; justify-content: space-around; gap: 12px; min-width: 200px; }
.bcol h4 { font: 700 18px var(--display); color: var(--muted); text-align: center; }
.bmatch { display: flex; flex-direction: column; gap: 2px; border-radius: 2px; overflow: hidden; }
.bteam { padding: 10px 11px; border: 0; background: var(--bg); text-align: left; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: background .12s; }
button.bteam:not(:disabled):hover { background: var(--brand-soft); }
.bteam.win { background: var(--brand); color: var(--on-brand); }
.bteam.lose { color: var(--muted); text-decoration: line-through; }
.bteam.empty { color: var(--muted); font-weight: 500; font-style: italic; padding: 10px 11px; }
.champ { display: flex; align-items: center; gap: 16px; background: var(--mustard); }
.champ .ic { width: 38px; height: 38px; }
.champ small { font-weight: 600; }
.champ b { display: block; font: 700 34px/.95 var(--display); text-transform: uppercase; }

/* ---------- clases (semana) ---------- */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.wday { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.wday h4 { font-size: 20px; padding: 6px 8px; border-radius: 2px; }
.wday h4 small { color: var(--muted); font-weight: 600; }
.wday.today h4 { background: var(--board); color: var(--board-ink); }
.wday.today h4 small { color: var(--board-muted); }
.wcls { display: flex; flex-direction: column; gap: 3px; padding: 10px; border: 0; border-radius: 2px; background: var(--surface); text-align: left; min-width: 0; transition: background .15s, transform .15s var(--ease); }
.wcls:hover { background: var(--brand-soft); transform: translateY(-1px); }
.wcls time { font: 700 20px/1 var(--display); color: var(--brand-text); }
.wcls b { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wcls small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wcls .meter { margin-top: 4px; height: 6px; }
.wcls.full .meter span { background: var(--red); }
.wcls.past { opacity: .5; }

/* ---------- accesos ---------- */
.card.aforo { background: var(--board); color: var(--board-ink); text-align: left; }
.aforo > small { color: var(--board-muted); font-size: 15px; }
.aforo-n { display: flex; align-items: baseline; gap: 8px; }
.aforo-n b { font: 700 clamp(110px, 10vw, 160px)/.8 var(--display); letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.aforo-n span { font: 700 34px var(--display); color: var(--board-muted); }
.aforo .meter { background: var(--board-2); }
.aforo .meter span { background: var(--brand-on-board, var(--board-ink)); }
.aforo .meter.hot span { background: var(--red); }
.aforo .stats-row > div, .aforo .stats-row > div:first-child { background: var(--board-2); color: var(--board-ink); }
.aforo .stats-row small { color: var(--board-muted) !important; }
.aforo .bar span { background: var(--board-3); }
.aforo .bar.now span { background: var(--mustard); }
.aforo .bar em { color: var(--board-ink); }
.aforo .bar small { color: var(--board-muted); }
.acc li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line-2); }
.acc li:last-child { border: 0; }
.acc time { width: 46px; font: 700 17px var(--display); color: var(--muted); }
.acc li button { flex: 1; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc li.denied { background: var(--bad-bg); margin: 0 -10px; padding-left: 10px; padding-right: 10px; border-radius: 2px; }

/* ---------- equipo ---------- */
.sess-list { display: grid; gap: 2px; }
.sess-list > div { display: grid; grid-template-columns: 18px 140px 1fr auto; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 2px; font-size: 14px; color: var(--muted); }
.sess-list > div.done { color: var(--text); background: var(--bg); }
.sess-list > div.done .ic { color: var(--ok); }
.sess-list .ic { width: 15px; }
.sess-list b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- comunicaciones / solicitudes ---------- */
.tpls { display: flex; flex-wrap: wrap; gap: 4px; }
.notices li { padding: 13px 0; border-bottom: 1px solid var(--line-2); }
.notices li:last-child { border: 0; }
.notices p { margin: 4px 0 8px; }
.n-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.n-top b { font-weight: 600; }
.n-top small { color: var(--muted); }
.reqs li { display: flex; align-items: flex-start; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line-2); }
.reqs li:last-child { border: 0; }
.reqs li > div:nth-child(2) { flex: 1; min-width: 0; }
.reqs .n-top { justify-content: flex-start; flex-wrap: wrap; }
.reqs p { margin-top: 4px; }
.req-a { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- automatizaciones: frases con interruptor ---------- */
.hero-save { display: flex; align-items: center; gap: 22px; background: var(--mustard); color: var(--text); padding: 22px 26px; }
.hero-save > .ic { width: 42px; height: 42px; }
.hero-save b { display: block; font: 700 clamp(56px, 6vw, 88px)/.85 var(--display); letter-spacing: -.025em; margin-bottom: 6px; }
.hero-save span { font-size: 15px; max-width: 62ch; display: block; }
.grid.autos { grid-template-columns: minmax(0, 1fr); gap: 3px; }
.auto { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 28px; row-gap: 3px; align-items: center; padding: 15px 20px; transition: background .25s; }
.auto-h { display: flex; align-items: center; gap: 12px; grid-column: 1; }
.auto-h b { flex: 1; font: 700 23px/1.05 var(--display); color: var(--muted); transition: color .25s; }
.auto-h .switch { order: -1; }
.auto-i { display: none; }
.auto p { grid-column: 1; padding-left: 56px; color: var(--muted); font-size: 14px; }
.auto-f { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-size: 13px; }
.auto-f .muted { font: 700 19px var(--display); color: var(--muted); }
.auto.on { background: var(--brand-soft); }
.auto.on .auto-h b { color: var(--text); }
.auto.on p { color: var(--text); }
.auto.on .auto-f .muted { color: var(--brand-text); }

/* ---------- ajustes ---------- */
.integ { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 4px; }
.integ-c { display: flex; align-items: flex-start; gap: 12px; padding: 15px; border-radius: var(--r); background: var(--bg); transition: background .15s; }
.integ-c > .ic { width: 22px; height: 22px; color: var(--muted); margin-top: 2px; }
.integ-c.on { background: var(--brand-soft); }
.integ-c.on > .ic { color: var(--brand-text); }
.integ-c > div { flex: 1; }
.integ-c b { font: 700 19px var(--display); }
.integ-c p { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.integ-c.on .btn { background: var(--ok-bg); color: var(--ok); }

/* ---------- modal ---------- */
#modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 16px; }
#modal.open { display: flex; }
.mback { position: absolute; inset: 0; background: rgba(10, 15, 28, .55); animation: fade .15s; }
.mbox { position: relative; width: 100%; max-width: 540px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-lg); animation: pop .24s var(--ease); overflow: hidden; }
.mbox.wide { max-width: 860px; }
.mbox > header { display: flex; align-items: center; gap: 10px; padding: 18px 20px 10px; }
.mbox > header h3 { flex: 1; font-size: 30px; line-height: .95; text-transform: uppercase; }
.mbody { padding: 4px 20px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.mbody > .grid, .mbody > .box { margin: 0; }
.mbox > footer { display: flex; align-items: center; gap: 6px; padding: 12px 20px; background: var(--bg); flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(14px); } }

/* ---------- toasts ---------- */
#toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 6px; align-items: center; width: max-content; max-width: calc(100vw - 32px); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--r); background: var(--board); color: var(--board-ink); font-weight: 500; box-shadow: var(--shadow-lg); animation: pop .24s var(--ease); transition: opacity .3s, transform .3s; }
.toast .ic { color: var(--ok-lit); }
.toast.bad .ic { color: var(--bad-lit); }
.toast.out { opacity: 0; transform: translateY(8px); }
body[data-role=socio] #toasts, body[data-role=monitor] #toasts { bottom: 90px; }

/* ---------- portada de la demo: cartel ---------- */
.welcome { min-height: calc(100vh - var(--top)); display: flex; flex-direction: column; }
.w-hero { display: flex; flex-direction: column; gap: 18px; padding: 26px 28px 34px; background: var(--brand); color: var(--on-brand); }
.w-brand { display: flex; align-items: center; gap: 10px; font: 700 22px var(--display); letter-spacing: .01em; }
.w-brand .ic { width: 26px; height: 26px; }
.w-hero h1 { font-size: clamp(76px, 12.5vw, 210px); line-height: .82; letter-spacing: -.03em; text-transform: uppercase; margin-top: clamp(40px, 9vh, 110px); }
.w-hero h1 span { display: block; overflow: hidden; padding-bottom: .04em; white-space: nowrap; }
.w-hero h1 span i { display: block; font-style: normal; }
.w-hero > p { max-width: 54ch; font-size: 18px; line-height: 1.45; }
.w-hero > p b { font-weight: 600; }
.w-roles { display: grid; grid-template-columns: 1.25fr 1fr 1fr; }
.role { display: flex; flex-direction: column; justify-content: space-between; gap: 34px; min-height: 230px; padding: 22px 28px 26px; transition: filter .2s; }
.role:nth-child(1) { background: var(--board); color: var(--board-ink); }
.role:nth-child(2) { background: var(--mustard); color: var(--text); }
.role:nth-child(3) { background: var(--surface); color: var(--text); }
.role:hover { filter: brightness(1.08); }
.role:nth-child(3):hover { filter: brightness(.96); }
.role b { display: block; font: 700 clamp(40px, 4.2vw, 64px)/.88 var(--display); text-transform: uppercase; letter-spacing: -.02em; }
.role small { display: block; margin-top: 10px; font-size: 16px; opacity: .85; max-width: 32ch; }
.role-go { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.role-go .ic { transition: transform .2s var(--ease); }
.role:hover .role-go .ic { transform: translateX(5px); }
.w-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 32px; padding: 44px 28px 56px; }
.w-points { display: flex; flex-direction: column; gap: 18px; }
.w-points h2 { font-size: 38px; line-height: .95; text-transform: uppercase; }
.w-points li { display: flex; gap: 12px; font-size: 16px; }
.w-points .ic { width: 22px; height: 22px; color: var(--brand-text); margin-top: 1px; }
.w-points b { font-weight: 600; }
.w-card { display: flex; flex-direction: column; gap: 14px; padding: 24px; border-radius: var(--r); background: var(--surface); }
.w-card h2 { font-size: 30px; line-height: .95; text-transform: uppercase; }
.types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.type { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 13px; border: 0; border-radius: var(--r); background: var(--tone); text-align: left; transition: background .15s, color .15s; }
.type:hover { background: var(--tone-2); }
.type .ic { width: 22px; height: 22px; }
.type b { font: 700 19px/1 var(--display); }
.type small { font-size: 13px; opacity: .85; }
.type.on { background: var(--board); color: var(--board-ink); }
.type.on .ic { color: var(--mustard); }

/* ---------- app móvil (socio / monitor) ---------- */
body[data-role=socio], body[data-role=monitor] { background: #d5d5cc; }
.mob { max-width: 480px; margin: 0 auto; min-height: calc(100vh - var(--top)); background: var(--bg); padding-bottom: 88px; }
.mhead { position: sticky; top: var(--top); z-index: 20; display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--board); color: var(--board-ink); }
.mh-t { flex: 1; min-width: 0; }
.mh-t b, .mh-t small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mh-t b { font: 700 19px/1 var(--display); text-transform: uppercase; }
.mh-t small { color: var(--board-muted); }
.who-sel { width: 136px !important; min-height: 34px !important; padding: 4px 8px !important; font-size: 13px; background: var(--board-2) !important; color: var(--board-ink); border-color: var(--board-3) !important; }
.mcontent { padding: 18px 16px; display: flex; flex-direction: column; gap: 14px; }
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; z-index: 30; display: grid; grid-template-columns: repeat(var(--n), 1fr); padding: 4px 4px calc(6px + env(safe-area-inset-bottom)); background: var(--surface); }
.tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 0 5px; font-size: 12px; font-weight: 600; color: var(--muted); transition: color .15s; }
.tabbar a::before { content: ""; position: absolute; top: -4px; left: 22%; right: 22%; height: 4px; background: var(--brand); transform: scaleX(0); transition: transform .25s var(--ease); }
.tabbar a .ic { width: 22px; height: 22px; }
.tabbar a.on { color: var(--text); }
.tabbar a.on .ic { color: var(--brand-text); }
.tabbar a.on::before { transform: scaleX(1); }
.tabbar .nb { position: absolute; top: 2px; right: 22%; }
.hello { font-size: 46px; line-height: .86; text-transform: uppercase; letter-spacing: -.015em; }
.hello + p { margin-top: -6px; }
.alert { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--r); }
.alert.bad { background: var(--red); color: #fff; }
.alert .ic { margin-top: 2px; }
.alert b { display: block; font: 700 21px/1.05 var(--display); margin-bottom: 2px; }
.carnet { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 18px 20px 20px; border: 0; border-radius: var(--r); text-align: left; color: var(--on-brand); background: var(--brand); overflow: hidden; transition: transform .2s var(--ease); }
.carnet:hover { transform: translateY(-2px); }
.carnet:active { transform: translateY(0); }
.c-top { display: flex; justify-content: space-between; align-items: center; }
.c-club { font: 700 17px var(--display); text-transform: uppercase; letter-spacing: .02em; opacity: .9; }
.c-top .ic { width: 30px; height: 30px; }
.c-name { font: 700 44px/.86 var(--display); text-transform: uppercase; letter-spacing: -.015em; margin-top: 14px; }
.c-foot { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; font-weight: 600; }
.c-foot span:last-child { font: 700 26px var(--display); letter-spacing: .02em; }
.c-hint { opacity: .8; }
.quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
.quick a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px; border-radius: var(--r); background: var(--surface); font: 700 19px/1 var(--display); transition: background .15s; }
.quick a:hover { background: var(--brand-soft); }
.quick .ic { width: 20px; height: 20px; color: var(--brand-text); order: 2; }
.up li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border-radius: var(--r); }
.up li + li { margin-top: 4px; }
.up li > .ic { color: var(--brand-text); }
.up li > div { flex: 1; min-width: 0; }
.up b, .up small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up b { font-weight: 600; }
.up small { color: var(--muted); }
.up li.mine { background: var(--brand-soft); }
.when { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.when.l { text-align: left; align-items: flex-start; min-width: 50px; }
.when b { font: 700 19px/1 var(--display); }
.promo { display: flex; align-items: center; gap: 12px; padding: 15px 16px; border-radius: var(--r); background: var(--mustard); color: var(--text); transition: filter .15s; }
.promo:hover { filter: brightness(1.05); }
.promo div { flex: 1; }
.promo b, .promo small { display: block; }
.promo b { font: 700 22px/1 var(--display); text-transform: uppercase; }
.news li { padding: 13px 14px; background: var(--surface); border-radius: var(--r); }
.news li + li { margin-top: 4px; }
.news b { font: 700 19px var(--display); }
.news p { margin: 3px 0; }
.news small { color: var(--muted); }
.qr-wrap { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.qr-wrap > b { font: 700 26px var(--display); text-transform: uppercase; }
.qrbox { padding: 16px; background: #fff; border-radius: var(--r); margin-bottom: 6px; min-width: 200px; min-height: 200px; display: grid; place-items: center; font-size: 12px; word-break: break-all; }
.qrbox img, .qrbox canvas { display: block; }
.dchips { display: flex; gap: 3px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.dchips::-webkit-scrollbar { display: none; }
.dchips button { flex: 1 0 52px; display: flex; flex-direction: column; align-items: center; padding: 8px 0; border: 0; border-radius: 2px; background: var(--surface); transition: background .15s, color .15s; }
.dchips button:hover { background: var(--tone); }
.dchips small { color: var(--muted); font-weight: 600; }
.dchips b { font: 700 25px/1 var(--display); }
.dchips button.on { background: var(--board); color: var(--board-ink); }
.dchips button.on small { color: var(--board-muted); }
.slots { display: grid; gap: 3px; }
.slot { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border: 0; border-radius: 2px; background: var(--surface); text-align: left; transition: background .15s; }
.slot time { font: 700 24px/1 var(--display); width: 58px; }
.slot span { flex: 1; color: var(--ok); font-weight: 600; font-size: 14px; }
.slot .ic { color: var(--muted); transition: transform .2s var(--ease); }
.slot.full { background: transparent; color: var(--muted); }
.slot.full span { color: var(--muted); }
.slot:not(.full):hover { background: var(--brand-soft); }
.slot:not(.full):hover .ic { transform: translateX(3px); color: var(--brand-text); }
.mcard { display: flex; flex-direction: column; gap: 8px; padding: 15px; }
.mcard > small { color: var(--muted); }
.mcard .n-top b { font: 700 21px/1.05 var(--display); }
.mcard.mine { background: var(--brand-soft); }
.mcard.soon { background: color-mix(in srgb, var(--surface) 55%, var(--bg)); }
.mcard > .btn { align-self: flex-start; }
.mypos { display: flex; align-items: center; gap: 6px; padding: 9px 11px; border-radius: 2px; background: var(--board); color: var(--board-ink); font-size: 14px; }
.mypos b { font: 700 19px var(--display); color: var(--mustard); }
.mypos .ic { width: 16px; color: var(--mustard); }
.podium { list-style: none; counter-reset: p; display: grid; gap: 4px; }
.podium li { counter-increment: p; font-size: 14px; font-weight: 600; }
.podium li::before { content: counter(p) "º  "; font-family: var(--display); color: var(--muted); }
.podium small { color: var(--muted); font-weight: 500; }
.plan-card { display: flex; flex-direction: column; gap: 6px; }
.plan-card > small { color: var(--muted); font-weight: 600; }
.plan-card > b { font: 700 26px/1 var(--display); text-transform: uppercase; }
.pc-price { font: 700 64px/.85 var(--display); letter-spacing: -.025em; margin: 4px 0 6px; font-variant-numeric: tabular-nums; }
.pc-price small { font-size: 20px; color: var(--muted); letter-spacing: 0; }
.pc-row { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.pc-row .ic { width: 16px; color: var(--muted); }
.profile { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 8px 0; }
.profile h2 { font-size: 36px; line-height: .9; text-transform: uppercase; margin-top: 6px; }
.profile small { color: var(--muted); }
.roll li label { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.roll li:last-child label { border: 0; }
.roll li span:not(.av) { flex: 1; font-weight: 500; }
.roll input { position: absolute; opacity: 0; pointer-events: none; }
.roll .tick { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 2px; background: var(--tone); color: transparent; transition: background .15s, color .15s, transform .15s var(--ease); }
.roll input:checked + .tick { background: var(--ok); color: #fff; transform: scale(1.06); }
.roll input:focus-visible + .tick { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- movimiento: entrada escalonada al cambiar de pantalla ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes grow-y { from { transform: scaleY(0); } }
@keyframes grow-x { from { transform: scaleX(0); } }
@keyframes light { from { opacity: 0; transform: scale(.6); } }
.enter > * { animation: rise .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms); }
.enter .bar span, .enter .cols span { animation: grow-y .7s var(--ease) both; animation-delay: calc(200ms + var(--d, 0) * 30ms); }
.enter .meter span, .enter .split span { animation: grow-x .8s var(--ease) both; animation-delay: 220ms; transform-origin: left; }
.enter .bulbs i, .enter .seats i { animation: light .35s var(--ease) both; animation-delay: calc(160ms + var(--d, 0) * 7ms); }
.enter .w-hero h1 span i { animation: line-up .9s cubic-bezier(.16, 1, .3, 1) both; }
.enter .w-hero h1 span + span i { animation-delay: .11s; }
@keyframes line-up { from { transform: translateY(105%); } }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-main { grid-template-columns: minmax(0, 1fr); }
  .week { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hide-md { display: none; }
  .board { grid-template-columns: minmax(0, 1fr); }
  .board-main { flex-direction: row; align-items: flex-end; flex-wrap: wrap; }
  .w-roles { grid-template-columns: 1fr 1fr; }
  .role:nth-child(1) { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .w-hero { grid-template-columns: 1fr; padding: 22px 16px 26px; }
  .w-body { grid-template-columns: 1fr; padding: 32px 16px 48px; }
  .w-roles { grid-template-columns: 1fr; }
  .role { min-height: 0; gap: 18px; padding: 20px 16px; }
}
@media (max-width: 860px) {
  .admin { grid-template-columns: 1fr; }
  .side { position: fixed; top: 0; left: 0; bottom: 0; height: 100dvh; width: 276px; z-index: 95; transform: translateX(-102%); transition: transform .26s var(--ease); }
  body.side-open .side { transform: none; box-shadow: var(--shadow-lg); }
  body.side-open .side-back { display: block; position: fixed; inset: 0; z-index: 94; background: rgba(10, 15, 28, .45); }
  .only-sm { display: inline-grid; }
  .top { padding: 14px 16px 10px; min-height: 64px; align-items: center; }
  .top h1 { font-size: 28px; }
  .content { padding: 6px 16px 36px; }
  .g2 { grid-template-columns: minmax(0, 1fr); }
  .week { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kline { grid-template-columns: minmax(0, 1fr); }
  .board { padding: 20px 16px 18px; gap: 20px; }
  .bulbs { grid-template-columns: 56px repeat(var(--cols), minmax(0, 1fr)); gap: 3px; }
  .bulbs i { height: 18px; }
  .bulbs .bt:nth-child(odd of .bt) { visibility: hidden; }
  .auto p { padding-left: 0; }
  .auto-h .switch { order: 0; }
}
@media (max-width: 600px) {
  .hide-sm { display: none !important; }
  .kpi { padding: 12px 14px; }
  .kpi-v, .kpi.sm .kpi-v { font-size: 32px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span2 { grid-column: auto; }
  .tbl th, .tbl td { padding: 9px 10px; }
  .types { grid-template-columns: 1fr; }
  #modal { padding: 0; align-items: flex-end; }
  .mbox, .mbox.wide { max-width: none; max-height: 92vh; max-height: 92dvh; }
  .mbox > header h3 { font-size: 26px; }
  .evs { grid-template-columns: 1fr; }
  .match { grid-template-columns: auto 1fr auto; grid-template-areas: "c a s" "c b s"; row-gap: 2px; }
  .match .mc { grid-area: c; } .match .tm:not(.r) { grid-area: a; } .match .tm.r { grid-area: b; text-align: left; } .match .score { grid-area: s; }
  .match:not(:has(.mc)) { grid-template-columns: 1fr auto; grid-template-areas: "a s" "b s"; }
  .week { grid-template-columns: minmax(0, 1fr); }
  .sess-list > div { grid-template-columns: 18px 1fr auto; }
  .sess-list > div > span { grid-column: 2 / -1; font-size: 12.5px; }
  .sess-list > div > b { grid-column: 2; }
  .mnav b { min-width: 0; font-size: 15px; padding: 0 2px; }
  .auto { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  .auto-f { grid-column: 1; grid-row: auto; flex-direction: row; justify-content: space-between; align-items: center; margin-top: 6px; }
  .hero-save { flex-direction: column; align-items: flex-start; gap: 10px; padding: 18px; }
  .w-hero h1 { font-size: 13vw; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}
