/* Sistema para talleres de moto — identidad de competición: azul eléctrico, noche, blanco y plata.
   Mobile-first. Un único archivo para web pública, panel y hojas imprimibles.
   Tokens en :root para tematizar por taller. Sin estilos incrustados (CSP): todo va en clases. */
@font-face { font-family: "Oswald"; src: url("../fonts/oswald.woff2?v=20261018") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter.woff2?v=20261018") format("woff2"); font-weight: 400 700; font-display: swap; }

:root {
  color-scheme: dark;
  --night: #060d24;
  --bg: #08122f;
  --surface: #0e1b42;
  --surface-2: #14255a;
  --line: #243468;
  --line-2: #3a4d8c;
  --ink: #ffffff;
  --muted: #aab6d6;
  --brand: #2551e8;
  --brand-hover: #3d68f5;
  --brand-ink: #ffffff;
  --accent: #7ba3ff;
  --silver: #c9d1e3;
  --ok: #5fe0a3;
  --warn: #ffc857;
  --err: #ff7b80;
  --side-w: 248px;
  --head: "Oswald", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --cut: 14px;
  --shadow: 0 14px 34px rgba(0, 0, 0, .4);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 16px/1.55 var(--font); color: var(--ink); background: var(--bg); overflow-x: hidden; min-height: 100vh; }
img, svg { max-width: 100%; }
a { color: var(--accent); text-underline-offset: .15em; }
a:hover { color: #fff; }
h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.12; margin: 0 0 .7rem; text-transform: uppercase; font-style: italic; letter-spacing: .02em; }
h1 { font-size: clamp(1.7rem, 1.1rem + 2.6vw, 2.7rem); }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .75rem; }
code { font-family: ui-monospace, Consolas, monospace; background: var(--surface-2); padding: .1rem .4rem; border-radius: 3px; font-size: .88em; }
small { font-size: .82em; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: #fff; color: var(--night); padding: .5rem .8rem; z-index: 100; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.break { overflow-wrap: anywhere; }
.top-gap { margin-top: .9rem; }
.span-2 { grid-column: 1 / -1; }
.span-3 { grid-column: 1 / -1; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.eyebrow { font: 600 .78rem/1 var(--font); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin: 0 0 .5rem; }
.ico { flex: none; }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 46px; padding: .7rem 1.3rem;
  border: 0; background: var(--brand); color: var(--brand-ink); font: 700 .92rem/1.1 var(--head); font-style: italic; letter-spacing: .08em;
  text-transform: uppercase; text-decoration: none; cursor: pointer; clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  transition: background-color .15s, transform .15s; }
.btn:hover { background: var(--brand-hover); color: #fff; transform: translateX(2px); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn:focus-visible { outline-offset: -4px; outline-color: #fff; }
.btn-lg { min-height: 54px; padding: .9rem 1.8rem; font-size: 1.02rem; }
.btn-sm { min-height: 40px; padding: .45rem 1rem; font-size: .8rem; }
.btn-block { display: flex; width: 100%; }
.btn-ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 2px var(--line-2); clip-path: none; }
.btn-ghost:hover { background: var(--surface-2); box-shadow: inset 0 0 0 2px var(--accent); transform: none; }
.btn-secondary { background: var(--surface-2); color: #fff; }
.btn-secondary:hover { background: var(--line-2); }
.btn-danger { background: transparent; color: var(--err); box-shadow: inset 0 0 0 2px var(--err); clip-path: none; }
.btn-danger:hover { background: var(--err); color: var(--night); transform: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; min-height: 32px; }
.link-danger { color: var(--err); }
.link-btn { color: var(--accent); font-weight: 600; text-decoration: none; padding: .4rem .2rem; white-space: nowrap; }
.link-btn:hover { text-decoration: underline; }
.inline { display: inline; }

/* ---------- Formularios ---------- */
.form { display: grid; gap: .9rem; }
.form label, .filters label { display: grid; gap: .35rem; font-weight: 600; font-size: .9rem; }
.form label.check, label.check { display: flex; gap: .65rem; align-items: flex-start; font-weight: 400; min-height: 44px; }
input, select, textarea { width: 100%; font: inherit; color: var(--ink); background: var(--night); border: 1px solid var(--line-2); border-radius: 4px; padding: .65rem .75rem; min-height: 46px; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2rem; }
input::placeholder, textarea::placeholder { color: #7f8db5; }
input[type="checkbox"] { width: 1.3rem; min-height: 1.3rem; height: 1.3rem; margin-top: .1rem; flex: none; accent-color: var(--brand); }
input[type="date"], input[type="time"] { min-width: 0; }
input[aria-invalid="true"] { border-color: var(--err); }
.error { color: var(--err); margin: -.4rem 0 0; font-size: .9rem; }
.note { background: var(--surface); border-left: 4px solid var(--brand); padding: .7rem .9rem; color: var(--ink); font-size: .92rem; }
.flash { padding: .75rem 1rem; margin: 0 0 1rem; border-left: 4px solid; background: var(--surface); }
.flash-ok { border-color: var(--ok); color: var(--ok); }
.flash-info { border-color: var(--accent); color: #cbdaff; }
.flash-error { border-color: var(--err); color: var(--err); }
.grid-2, .grid-3 { display: grid; gap: .9rem; grid-template-columns: 1fr; }
.inline-form { display: flex; gap: .6rem; align-items: stretch; }
.inline-form select, .inline-form input { flex: 1; min-width: 0; }
.filters { display: grid; gap: .6rem; margin-bottom: 1rem; grid-template-columns: 1fr; }
.inline-check { align-items: center; }
fieldset { border: 1px solid var(--line); padding: 1rem; margin: 0; min-width: 0; }
legend { font: 700 1rem var(--head); font-style: italic; text-transform: uppercase; letter-spacing: .05em; padding: 0 .5rem; display: flex; gap: .4rem; align-items: center; }

/* ---------- Etiquetas ---------- */
.badge, .st, .prio, .rg { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .04em; padding: .2rem .6rem; white-space: nowrap; text-transform: uppercase; clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%); }
.badge { background: var(--surface-2); color: #fff; }
.badge-ok { background: #0f3b2c; color: var(--ok); }
.badge-off { background: #2a3355; color: var(--muted); }
.st { background: #1d2c66; color: #dbe5ff; }
.st-recibida { background: #34407a; color: #e6ecff; }
.st-diagnostico { background: #284ea8; color: #fff; }
.st-esperando_aprobacion { background: #5a3d8f; color: #f0e6ff; }
.st-en_reparacion { background: #1f5be0; color: #fff; }
.st-esperando_pieza { background: #6b4a12; color: #ffe1a3; }
.st-lista { background: #0f4d38; color: #8ff0c4; }
.st-entregada { background: #28324f; color: #b9c4e3; }
.st-cancelada { background: #4a1d27; color: #ffb3b8; }
.prio { background: #2a3355; color: #fff; }
.prio-alta { background: #6b4a12; color: #ffe1a3; }
.prio-urgente { background: #6e1f2a; color: #ffc4c8; }
.prio-baja { background: #1d2c66; color: #aab6d6; }
.rg { background: #2a3355; color: #cdd7f0; }
.rg-vencida { background: #6e1f2a; color: #ffc4c8; }
.rg-proxima { background: #6b4a12; color: #ffe1a3; }
.rg-ok { background: #0f3b2c; color: var(--ok); }
.rg-sin_datos { background: #2a3355; color: var(--muted); }
.st-av-pendiente, .st-av-fallido { background: #6b4a12; color: #ffe1a3; }
.st-av-enviado, .st-av-simulado { background: #1d2c66; color: #dbe5ff; }
.st-av-sin_consentimiento { background: #2a3355; color: var(--muted); }
.st-av-gestionado { background: #0f3b2c; color: var(--ok); }
.pill { display: inline-block; min-width: 1.4rem; padding: 0 .4rem; border-radius: 999px; background: var(--err); color: var(--night); font-size: .72rem; font-weight: 800; text-align: center; margin-left: .3rem; }
.plate { display: inline-block; font: 700 .85rem/1 var(--head); letter-spacing: .12em; color: var(--night); background: #fff; padding: .3rem .55rem; border-left: 8px solid #1f4fe0; white-space: nowrap; }
.demo-bar { background: var(--brand); color: #fff; text-align: center; font-size: .76rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: .35rem 1rem; }
.demo-chip { font: 700 .72rem var(--head); letter-spacing: .12em; background: var(--brand); color: #fff; padding: .2rem .6rem; margin-left: auto; }
.mark .mk-a { fill: #2f66ff; }
.mark .mk-b { fill: #fff; }

/* ---------- Tarjetas y tablas ---------- */
.card { background: var(--surface); border: 1px solid var(--line); padding: 1.1rem; margin-bottom: 1rem; min-width: 0; }
.card-accent { border-color: var(--brand); box-shadow: inset 4px 0 0 var(--brand); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .6rem; }
.card-head h2 { margin: 0; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .9rem; margin-bottom: 1.1rem; }
.page-head h1 { margin: 0; }
.head-badges { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: .65rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 600 .74rem var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
td.actions { white-space: nowrap; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; align-items: center; gap: .75rem; padding: .65rem 0; border-bottom: 1px solid var(--line); justify-content: space-between; }
.rows li:last-child { border-bottom: 0; }
.rows li > span, .rows .moto-name { display: grid; min-width: 0; flex: 1; }
.rows small { color: var(--muted); display: block; overflow-wrap: anywhere; }
.row-link { display: flex; align-items: center; gap: .6rem; width: 100%; color: inherit; text-decoration: none; flex-wrap: wrap; }
.row-link:hover .moto-name { color: var(--accent); }
.rows-orders .row-link { justify-content: space-between; }
.moto-name { font-weight: 600; }
.time { font: 700 1.15rem var(--head); font-style: italic; color: var(--accent); min-width: 3.4rem; }
.small-rows li { padding: .45rem 0; font-size: .9rem; }
.stock-low { color: var(--err); font-size: 1.1rem; }
.stock-ok { color: var(--ok); font-size: 1.1rem; }
.facts { margin: 0; display: grid; gap: .7rem; }
.facts div { display: grid; gap: .1rem; }
.facts dt { font: 600 .72rem var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.big-num { font: 700 2rem/1 var(--head); font-style: italic; margin: 0 0 .8rem; color: var(--accent); }
.big-status { margin: 1rem 0; }

/* ---------- Panel: estructura ---------- */
body.panel .shell { min-height: 100vh; display: flex; flex-direction: column; }
.side { display: none; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: .7rem; padding: .6rem 16px; background: var(--night); border-bottom: 1px solid var(--line); }
.brand, .side-brand, .pub-brand { display: inline-flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; font: 700 1.05rem var(--head); font-style: italic; text-transform: uppercase; letter-spacing: .05em; min-width: 0; }
.brand span, .pub-brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-brand span { line-height: 1.1; overflow-wrap: anywhere; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 18px 16px 110px; flex: 1; }
.footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 0 16px 100px; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); background: var(--night); border-top: 1px solid var(--line-2);
  padding-bottom: env(safe-area-inset-bottom); }
.tabbar a { position: relative; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; min-height: 58px; padding: .4rem .2rem; color: var(--muted); text-decoration: none; font-size: .68rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.tabbar a[aria-current="page"] { color: #fff; box-shadow: inset 0 3px 0 var(--brand); background: var(--surface); }
.tabbar .pill { position: absolute; top: 5px; left: calc(50% + 6px); margin: 0; min-width: 1.2rem; font-size: .65rem; }
.menu-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; margin-bottom: 1.2rem; }
.menu-item { display: flex; flex-direction: column; gap: .6rem; padding: 1rem; min-height: 96px; background: var(--surface); border: 1px solid var(--line); color: #fff; text-decoration: none; font-weight: 600; }
.menu-item:hover { border-color: var(--accent); }

/* ---------- Panel: inicio ---------- */
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; margin-bottom: 1.1rem; }
.kpis-2 { grid-template-columns: repeat(2, 1fr); }
.kpi { display: grid; gap: .1rem; padding: 1rem 1rem 1.1rem; background: var(--surface); border: 1px solid var(--line); color: #fff; text-decoration: none; position: relative; min-width: 0;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%); transition: transform .15s, background-color .15s; }
a.kpi:hover { transform: translateY(-2px); background: var(--surface-2); color: #fff; }
a.kpi:focus-visible { outline-offset: -4px; }
.kpi .ico { color: var(--accent); margin-bottom: .35rem; }
.kpi b { font: 700 2.5rem/1 var(--head); font-style: italic; }
.kpi .kpi-small { font-size: 1.5rem; padding-top: .55rem; }
.kpi span { font-size: .78rem; color: var(--muted); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.k-brand { background: var(--brand); border-color: var(--brand); }
.k-brand .ico, .k-brand span { color: #fff; }
a.k-brand:hover { background: var(--brand-hover); }
.k-warn { border-color: var(--warn); }
.k-warn b, .k-warn .ico { color: var(--warn); }
.k-danger { border-color: var(--err); }
.k-danger b, .k-danger .ico { color: var(--err); }
.dash-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.dash-grid .card { margin: 0; }
.chart { width: 100%; height: auto; display: block; }
.ch-l { fill: var(--muted); font: 600 13px var(--font); }
.ch-n { fill: #fff; font: 700 17px var(--head); font-style: italic; }
.ch-track { fill: var(--night); }
.ch-bar { fill: var(--brand); }
.bar-recibida { fill: #6a78c4; } .bar-diagnostico { fill: #3f6fe0; } .bar-esperando_aprobacion { fill: #9a73e0; }
.bar-en_reparacion { fill: #2f66ff; } .bar-esperando_pieza { fill: #e0a63b; } .bar-lista { fill: #36c88a; }

/* ---------- Tablero ---------- */
.hint-drag { display: none; }
.board { display: grid; gap: .9rem; grid-template-columns: 1fr; }
.col { background: var(--night); border: 1px solid var(--line); min-width: 0; }
.col-h { display: flex; justify-content: space-between; align-items: center; margin: 0; padding: .7rem .9rem; font-size: .95rem; border-bottom: 3px solid var(--line-2); background: var(--surface); }
.col-h b { font: 700 1rem var(--head); background: #fff; color: var(--night); padding: .05rem .55rem; clip-path: polygon(5px 0, 100% 0, calc(100% - 5px) 100%, 0 100%); }
.col-recibida .col-h { border-color: #6a78c4; } .col-diagnostico .col-h { border-color: #3f6fe0; } .col-esperando_aprobacion .col-h { border-color: #9a73e0; }
.col-en_reparacion .col-h { border-color: #2f66ff; } .col-esperando_pieza .col-h { border-color: #e0a63b; } .col-lista .col-h { border-color: #36c88a; }
.col-body { display: grid; gap: .6rem; padding: .6rem; min-height: 64px; align-content: start; }
.col-body.is-over { background: rgba(47, 102, 255, .14); outline: 2px dashed var(--accent); outline-offset: -4px; }
.col-empty { color: var(--muted); font-size: .85rem; text-align: center; margin: .6rem 0; }
.ocard { background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--line-2); padding: .75rem; display: grid; gap: .5rem; min-width: 0; }
.ocard.prio-b-alta { border-left-color: var(--warn); } .ocard.prio-b-urgente { border-left-color: var(--err); } .ocard.prio-b-normal { border-left-color: var(--brand); }
.ocard.is-stalled { box-shadow: inset 0 0 0 1px var(--warn); }
.ocard.is-drag { opacity: .45; }
.oc-main { display: grid; gap: .25rem; color: inherit; text-decoration: none; }
.oc-top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; font-family: var(--head); font-style: italic; font-size: 1.05rem; }
.oc-moto { font-weight: 700; }
.oc-meta, .oc-motivo { font-size: .85rem; color: var(--muted); overflow-wrap: anywhere; }
.oc-foot { display: flex; align-items: center; gap: .5rem; font-size: .8rem; color: var(--muted); flex-wrap: wrap; }
.oc-mec { flex: 1; min-width: 0; }
.oc-age { font-weight: 700; } .oc-age.stalled { color: var(--warn); }
.oc-move { display: flex; gap: .4rem; flex-wrap: wrap; }
.oc-move select { flex: 1 1 100%; min-width: 0; min-height: 40px; padding-top: .3rem; padding-bottom: .3rem; }
.oc-move .btn { flex: 1 1 auto; }
.toast { position: fixed; left: 50%; bottom: calc(80px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: #fff; color: var(--night); padding: .7rem 1.1rem; font-weight: 600; z-index: 60; box-shadow: var(--shadow); max-width: calc(100vw - 32px); }
.toast[hidden] { display: none; }

/* ---------- Orden ---------- */
.split { display: grid; gap: 1rem; grid-template-columns: 1fr; align-items: start; }
.col-main, .col-side { min-width: 0; }
.track { list-style: none; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0; margin: 0 0 1.2rem; padding: 0; position: relative; }
.track li { display: grid; justify-items: center; align-content: start; gap: .35rem; position: relative; min-width: 0; font-size: .58rem; font-weight: 600; color: var(--muted); text-align: center; letter-spacing: 0; text-transform: uppercase; }
.tk-l { max-width: 100%; overflow-wrap: anywhere; }
.track li::before { content: ""; position: absolute; top: 14px; left: -50%; width: 100%; height: 3px; background: var(--line-2); z-index: 0; }
.track li:first-child::before { display: none; }
.track li.done::before, .track li.current::before { background: var(--brand); }
.tk-dot { position: relative; z-index: 1; width: 30px; height: 30px; display: grid; place-items: center; background: var(--night); border: 2px solid var(--line-2); font: 700 .85rem var(--head); clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%); border-radius: 0; }
.track li.done .tk-dot { background: var(--brand); border-color: var(--brand); color: #fff; }
.track li.current .tk-dot { background: #fff; border-color: #fff; color: var(--night); }
.track li.current, .track li.done { color: #fff; }
.thread { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .7rem; }
.thread li { background: var(--night); border-left: 3px solid var(--brand); padding: .65rem .85rem; }
.thread li.is-sys { border-left-color: var(--line-2); color: var(--muted); font-size: .9rem; }
.th-h { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; font-size: .8rem; color: var(--muted); margin-bottom: .25rem; }
.th-h b { color: #fff; }
.thread p { margin: 0; }
.lines { list-style: none; margin: 0 0 .8rem; padding: 0; }
.lines li { display: flex; gap: .6rem; align-items: baseline; justify-content: space-between; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.lines li > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.lines small { display: block; color: var(--muted); }
.totals { margin: 0 0 1rem; display: grid; gap: .25rem; }
.totals div { display: flex; justify-content: space-between; }
.totals dt, .totals dd { margin: 0; }
.totals .grand { font: 700 1.4rem var(--head); font-style: italic; border-top: 2px solid var(--brand); padding-top: .4rem; margin-top: .3rem; }
.timer-on { border-color: var(--ok); box-shadow: inset 4px 0 0 var(--ok); }
.live { color: var(--ok); font-weight: 700; }

/* ---------- Clientes, motos, equipo ---------- */
.moto-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.moto-card { background: var(--night); border: 1px solid var(--line); padding: .85rem; display: grid; gap: .6rem; }
.moto-card.is-off { opacity: .6; }
.mc-head { display: flex; align-items: center; gap: .7rem; color: #fff; text-decoration: none; flex-wrap: wrap; }
.mc-head > span { flex: 1; min-width: 0; display: grid; }
.mc-head small { color: var(--muted); }
.mc-rules { display: grid; gap: .3rem; font-size: .9rem; }
.rules-hero { display: grid; gap: .75rem; grid-template-columns: 1fr; margin-bottom: 1rem; }
.rh-card { display: grid; gap: .3rem; justify-items: start; padding: 1.1rem; background: var(--surface); border: 1px solid var(--line); clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%); }
.rh-card .ico { color: var(--accent); }
.rh-t { font: 600 .75rem var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.rh-card b { font: 700 2rem/1 var(--head); font-style: italic; }
.rule-set { margin-bottom: .2rem; }
.team { display: grid; gap: 1rem; grid-template-columns: 1fr; margin-bottom: 1rem; }
.mec-card { background: var(--surface); border: 1px solid var(--line); padding: 1rem; min-width: 0; }
.mec-card header { display: flex; gap: .8rem; align-items: center; margin-bottom: .7rem; }
.mec-card header > div { flex: 1; min-width: 0; }
.mec-card h2 { margin: 0; font-size: 1.1rem; }
.avatar { width: 44px; height: 44px; display: grid; place-items: center; flex: none; background: var(--brand); color: #fff; font: 700 1.3rem var(--head); font-style: italic; clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%); }
.mec-open { font: 700 1.9rem/1 var(--head); font-style: italic; text-align: center; }
.mec-open small { display: block; font: 600 .6rem var(--font); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.hours { width: 100%; height: 14px; display: block; margin-bottom: .3rem; }
.svc.is-off { opacity: .65; }

/* ---------- Autenticación ---------- */
body.auth { background: radial-gradient(1200px 500px at 80% -10%, #14307f 0%, var(--night) 60%); display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.auth-card { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--line); padding: 1.6rem; border-top: 5px solid var(--brand); }
.auth-card .brand { margin-bottom: 1rem; }

/* ---------- Reserva (pública) ---------- */
.stepper { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; padding: 0; margin: 0 0 1.4rem; }
.stepper li { display: flex; flex-direction: column; align-items: center; gap: .3rem; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); text-align: center; padding-top: .7rem; border-top: 4px solid var(--line-2); }
.stepper .step-n { width: 30px; height: 30px; display: grid; place-items: center; background: var(--night); border: 2px solid var(--line-2); font: 700 .9rem var(--head); }
.stepper li.current { color: #fff; border-color: var(--brand); } .stepper li.current .step-n { background: #fff; color: var(--night); border-color: #fff; }
.stepper li.done { color: #fff; border-color: var(--brand); } .stepper li.done .step-n { background: var(--brand); border-color: var(--brand); }
.pick-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .65rem; }
.pick { display: flex; align-items: center; gap: .85rem; padding: .85rem; background: var(--surface); border: 1px solid var(--line); color: #fff; text-decoration: none; min-height: 72px; flex-wrap: wrap; }
.pick:hover { border-color: var(--accent); background: var(--surface-2); color: #fff; }
.pick-ico { width: 48px; height: 48px; display: grid; place-items: center; flex: none; background: var(--brand); color: #fff; clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%); }
.pick-body { flex: 1; min-width: 160px; display: grid; }
.pick-name { font: 700 1.05rem var(--head); font-style: italic; text-transform: uppercase; letter-spacing: .04em; }
.pick-meta { color: var(--muted); font-size: .85rem; }
.pick-price { font-weight: 700; color: var(--accent); white-space: nowrap; }
.summary { display: flex; align-items: center; gap: .85rem; padding: .85rem; background: var(--surface); border: 1px solid var(--line); margin-bottom: 1.2rem; flex-wrap: wrap; }
.summary > div { flex: 1; min-width: 160px; }
.summary-name { font: 700 1.05rem var(--head); font-style: italic; text-transform: uppercase; margin: 0; }
.summary-when { margin: 0; color: var(--muted); }
.days { list-style: none; display: flex; gap: .5rem; overflow-x: auto; padding: 0 0 .6rem; margin: 0 0 1rem; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.days li { flex: none; scroll-snap-align: start; }
.day { display: grid; justify-items: center; gap: .1rem; width: 62px; padding: .5rem .2rem; background: var(--surface); border: 1px solid var(--line); color: #fff; text-decoration: none; }
.day-w, .day-m { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.day-n { font: 700 1.4rem/1 var(--head); font-style: italic; }
.day.is-on { background: var(--brand); border-color: var(--brand); } .day.is-on .day-w, .day.is-on .day-m { color: #fff; }
.day.is-off { opacity: .35; }
.slots-title { font-size: 1.1rem; }
.slots-group { font: 600 .75rem var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 1rem 0 .4rem; }
.slot-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(82px, 1fr)); gap: .5rem; }
.slot { display: grid; place-items: center; min-height: 46px; background: var(--surface); border: 1px solid var(--line-2); color: #fff; text-decoration: none; font: 700 1.05rem var(--head); }
.slot:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.done { text-align: center; margin-bottom: 1rem; }
.done-mark { display: inline-grid; place-items: center; width: 64px; height: 64px; background: var(--ok); color: var(--night); margin-bottom: .8rem; clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%); }
.ticket { margin: 0 0 1.2rem; display: grid; gap: 0; background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--brand); }
.ticket div { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 1rem; border-bottom: 1px solid var(--line); }
.ticket div:last-child { border-bottom: 0; }
.ticket dt { color: var(--muted); } .ticket dd { margin: 0; text-align: right; font-weight: 600; }
.ticket.is-cancelled { opacity: .6; border-left-color: var(--err); }
.cancel-box { margin: 1.2rem 0; padding: 1rem; border: 1px dashed var(--line-2); }

/* ---------- Web pública ---------- */
body.pub { background: #f2f5fc; color: #0b1533; --ink: #0b1533; }
body.pub a { color: #1b45d0; }
body.pub a:hover { color: #0b2a99; }
.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 680px; }
.pub-head { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .6rem 16px; background: var(--night); border-bottom: 1px solid var(--line); }
body.pub .pub-head a, body.pub .pub-brand { color: #fff; }
body.pub .pub-head a.btn { color: #fff; }
body.pub .pub-head .pub-link { color: var(--silver); }
.pub-nav { display: flex; align-items: center; gap: 1rem; }
.pub-link { display: none; text-decoration: none; font-weight: 600; font-size: .9rem; }
body.pub .btn { color: #fff; }
body.pub .btn:hover { color: #fff; }
body.pub .btn-ghost { color: #0b1533; box-shadow: inset 0 0 0 2px #aab6d6; }
body.pub .hero .btn-ghost, body.pub .cta-box .btn-ghost { color: #fff; box-shadow: inset 0 0 0 2px var(--line-2); }
body.pub .btn-ghost:hover { background: #e6edff; }
body.pub .hero .btn-ghost:hover { background: var(--surface-2); }
.pub-main { min-height: 60vh; }
.hero { position: relative; background: linear-gradient(135deg, var(--night) 0%, #0a1a52 55%, #11307f 100%); color: #fff; overflow: hidden; padding: 56px 0 72px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 38px), 0 100%); }
.hero-in { position: relative; z-index: 2; }
.hero-h { font-size: clamp(2.4rem, 1.2rem + 7vw, 5rem); line-height: 1; margin-bottom: 1rem; text-shadow: 0 4px 30px rgba(0, 0, 0, .4); }
.hero-lead { font-size: 1.08rem; color: #d3dcf5; max-width: 560px; margin-bottom: 1.6rem; }
.hero .eyebrow { color: #8fb0ff; }
.hero-bg { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.hero-bike { position: absolute; right: -90px; bottom: 6px; width: min(640px, 130%); color: #4a7bff; opacity: .5; }
.speed { position: absolute; height: 5px; background: linear-gradient(90deg, transparent, #fff 40%, #2f66ff); transform: skewX(-35deg); opacity: .5; }
.s1 { top: 18%; right: 6%; width: 38%; } .s2 { top: 26%; right: 0; width: 22%; opacity: .3; } .s3 { top: 34%; right: 14%; width: 30%; height: 3px; opacity: .25; }
.stats { list-style: none; display: flex; flex-wrap: wrap; gap: 1.6rem; padding: 0; margin: 2rem 0 0; }
.stats li { display: grid; border-left: 4px solid var(--brand); padding-left: .8rem; }
.stats b { font: 700 1.9rem/1 var(--head); font-style: italic; }
.stats span { font-size: .78rem; color: #aebde6; text-transform: uppercase; letter-spacing: .08em; }
.section { padding: 56px 0; }
.section-title { font-size: clamp(1.6rem, 1.1rem + 2.4vw, 2.5rem); }
.section-dark { background: var(--night); color: #fff; clip-path: polygon(0 28px, 100% 0, 100% 100%, 0 100%); padding-top: 76px; }
.section-dark .eyebrow { color: #8fb0ff; }
.svc-grid { list-style: none; display: grid; gap: 1rem; padding: 0; margin: 1.4rem 0 0; grid-template-columns: 1fr; }
.svc-card { background: #fff; border: 1px solid #d8dff0; padding: 1.2rem; display: grid; gap: .35rem; align-content: start; clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%); box-shadow: 0 1px 0 #d8dff0; transition: transform .15s; }
.svc-card:hover { transform: translateY(-3px); }
.svc-card h3 { margin: .3rem 0 0; color: #0b1533; }
.svc-card p { color: #4a5678; margin: 0; }
.svc-ico { width: 52px; height: 52px; display: grid; place-items: center; background: var(--brand); color: #fff; clip-path: polygon(9px 0, 100% 0, calc(100% - 9px) 100%, 0 100%); }
.svc-meta { display: flex; justify-content: space-between; margin-top: .4rem !important; color: #0b1533 !important; }
.svc-meta span { color: #4a5678; }
.svc-go { font-weight: 700; text-decoration: none; margin-top: .4rem; }
.flow { list-style: none; display: grid; gap: 1.2rem; padding: 0; margin: 1.6rem 0 0; grid-template-columns: 1fr; counter-reset: s; }
.flow li { padding-left: 4.2rem; position: relative; min-height: 56px; }
.flow-n { position: absolute; left: 0; top: 0; width: 52px; height: 52px; display: grid; place-items: center; background: var(--brand); font: 700 1.6rem var(--head); font-style: italic; clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%); }
.flow h3 { margin: 0 0 .2rem; } .flow p { color: #b9c6ea; margin: 0; }
.visit { display: grid; gap: 2rem; grid-template-columns: 1fr; }
.hours-row { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid #d8dff0; margin: 0; }
.cta-box { background: var(--night); color: #fff; padding: 1.6rem; align-self: start; border-top: 5px solid var(--brand); }
.cta-box h3 { font-size: 1.4rem; }
.cta-box p { color: #b9c6ea; }
body.pub .muted { color: #4a5678; }
body.pub .booking { background: #f2f5fc; }
body.pub .booking .card, body.pub .booking .summary, body.pub .booking .pick, body.pub .booking .slot, body.pub .booking .day, body.pub .booking .ticket { background: #fff; color: #0b1533; border-color: #d0d8ee; }
body.pub .booking .pick-name, body.pub .booking .summary-name { color: #0b1533; }
body.pub .booking .pick-meta, body.pub .booking .summary-when, body.pub .booking .day-w, body.pub .booking .day-m, body.pub .booking .ticket dt { color: #4a5678; }
body.pub .booking .pick-price { color: #1b45d0; }
body.pub .booking .pick:hover, body.pub .booking .slot:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
body.pub .booking .pick:hover .pick-name, body.pub .booking .pick:hover .pick-meta, body.pub .booking .pick:hover .pick-price { color: #fff; }
body.pub .booking .day.is-on { background: var(--brand); color: #fff; } body.pub .booking .day.is-on .day-n { color: #fff; }
body.pub .booking .day-n { color: #0b1533; } body.pub .booking .day.is-on .day-w, body.pub .booking .day.is-on .day-m { color: #fff; }
body.pub .booking input, body.pub .booking select, body.pub .booking textarea { background: #fff; color: #0b1533; border-color: #aab6d6; }
body.pub .booking input::placeholder, body.pub .booking textarea::placeholder { color: #6a7696; }
body.pub .booking .note { background: #e6edff; color: #0b1533; }
body.pub .booking .stepper li { color: #4a5678; border-color: #c4cde6; } body.pub .booking .stepper li.current, body.pub .booking .stepper li.done { color: #0b1533; border-color: var(--brand); }
body.pub .booking .stepper .step-n { background: #fff; color: #0b1533; border-color: #aab6d6; }
body.pub .booking .stepper li.current .step-n { background: var(--night); color: #fff; border-color: var(--night); } body.pub .booking .stepper li.done .step-n { background: var(--brand); color: #fff; border-color: var(--brand); }
body.pub .booking .flash-ok { background: #e3f8ee; color: #0a5a38; } body.pub .booking .flash-error { background: #ffe8ea; color: #9b1c25; }
body.pub .booking .error { color: #b3202a; }
body.pub .booking .thread li { background: #fff; color: #0b1533; } body.pub .booking .th-h, body.pub .booking .th-h b { color: #4a5678; }
body.pub .booking .btn-ghost { color: #0b1533; box-shadow: inset 0 0 0 2px #aab6d6; } body.pub .booking .btn-ghost:hover { background: #e6edff; }
body.pub .booking .btn-danger { color: #b3202a; box-shadow: inset 0 0 0 2px #b3202a; }
body.pub .flash { background: #fff; }
body.pub .flash-ok { color: #0a5a38; } body.pub .flash-error { color: #9b1c25; } body.pub .flash-info { color: #1b45d0; }
body.pub h1, body.pub h2, body.pub h3 { color: #0b1533; } body.pub .hero h1, body.pub .section-dark h2, body.pub .section-dark h3, body.pub .cta-box h3 { color: #fff; }
body.pub .rg-ok { background: #d8f5e8; color: #0a5a38; } body.pub .st { background: #e6edff; color: #12308c; } body.pub .plate { box-shadow: 0 0 0 1px #0b1533; }
body.pub .done-mark { color: #fff; background: #0a7a4d; }
.prose h2 { margin-top: 1.4rem; font-size: 1.1rem; }
.prose li { margin-bottom: .4rem; }
.pub-foot { background: var(--night); color: #cbd5f0; padding: 2.2rem 0 5.5rem; margin-top: 0; font-size: .92rem; }
body.pub .pub-foot a { color: #fff; }
body.pub .hero a.btn, body.pub .cta-box a.btn { color: #fff; }
body.pub .section-dark a { color: #9ebaff; }
.foot-grid { display: grid; gap: 1.6rem; grid-template-columns: 1fr; }
.foot-brand { font: 700 1.2rem var(--head); font-style: italic; text-transform: uppercase; color: #fff; }
.foot-title { font: 600 .75rem var(--font); letter-spacing: .14em; text-transform: uppercase; color: #8fb0ff; }
.pub-foot p { margin: 0 0 .4rem; }
.wa-float { position: fixed; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 45; display: inline-flex; align-items: center; gap: .5rem; min-height: 50px; padding: .6rem 1rem; background: #25d366; color: #04210f !important; font-weight: 700; text-decoration: none; box-shadow: var(--shadow); clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%); }
.wa-float:hover { background: #3fe07f; }
body.pub.has-wa .pub-foot { padding-bottom: 6.5rem; }

/* ---------- Hojas imprimibles ---------- */
body.sheet { background: #fff; color: #111; color-scheme: light; }
.sheet-page { max-width: 780px; margin: 0 auto; padding: 24px 18px; }
.sheet-actions { display: flex; gap: .6rem; margin-bottom: 1rem; flex-wrap: wrap; }
.sheet-head { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 4px solid #1f4fe0; padding-bottom: .8rem; margin-bottom: 1rem; flex-wrap: wrap; }
.sheet-brand { font: 700 1.5rem var(--head); font-style: italic; text-transform: uppercase; margin: 0; }
.sheet-title h1 { font-size: 1.6rem; margin: 0; color: #111; } .sheet-title p { margin: 0; }
body.sheet .facts dt { color: #555; } body.sheet code { background: #eee; color: #111; }
.sheet-table th, .sheet-table td { border-bottom: 1px solid #ccc; padding: .5rem; } .sheet-table th { color: #555; }
.sheet-table td:nth-child(n+2), .sheet-table th:nth-child(n+2) { text-align: right; }
.sheet-table tfoot td { border: 0; } .sheet-table .grand td { font-weight: 700; font-size: 1.2rem; border-top: 2px solid #111; }
.sign-row { display: flex; gap: 2rem; margin-top: 3.5rem; } .sign-row div { flex: 1; border-top: 1px solid #111; padding-top: .3rem; font-size: .85rem; }
@media print { .no-print { display: none !important; } body.sheet { font-size: 12px; } }

/* ---------- Tablas apiladas en móvil ---------- */
@media (max-width: 719px) {
  .track .tk-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack tr { background: var(--night); border: 1px solid var(--line); border-left: 4px solid var(--brand); padding: .4rem .7rem; margin-bottom: .6rem; }
  table.stack td { border: 0; display: flex; justify-content: space-between; gap: 1rem; padding: .3rem 0; text-align: right; overflow-wrap: anywhere; }
  table.stack td::before { content: attr(data-label); color: var(--muted); font: 600 .7rem var(--font); letter-spacing: .08em; text-transform: uppercase; text-align: left; flex: none; padding-top: .15rem; }
  table.stack td.actions { justify-content: flex-start; flex-wrap: wrap; }
  table.stack td.actions::before { display: none; }
  .btn-row .btn-lg { width: 100%; }
}

/* ---------- Tablet y escritorio ---------- */
@media (min-width: 720px) {
  .track li { font-size: .7rem; letter-spacing: .03em; }
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .filters { grid-template-columns: minmax(200px, 2fr) repeat(3, minmax(130px, 1fr)) auto; align-items: center; }
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .kpis-2 { grid-template-columns: repeat(2, 1fr); }
  .menu-grid { grid-template-columns: repeat(3, 1fr); }
  .rules-hero { grid-template-columns: repeat(2, 1fr); }
  .team { grid-template-columns: repeat(2, 1fr); }
  .svc-grid { grid-template-columns: repeat(2, 1fr); }
  .flow { grid-template-columns: repeat(2, 1fr); }
  .visit { grid-template-columns: 1.2fr 1fr; }
  .foot-grid { grid-template-columns: repeat(3, 1fr); }
  .pub-link { display: inline; }
  .hero { padding: 90px 0 110px; }
  .hero-bike { right: -30px; width: 600px; opacity: .6; }
  .board { grid-template-columns: repeat(3, 1fr); }
  .hint-drag { display: block; }
}
@media (min-width: 900px) {
  .side { display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; width: var(--side-w); background: var(--night); border-right: 1px solid var(--line); z-index: 30; padding: 1rem .8rem; overflow-y: auto; }
  .side-brand { padding: .4rem .5rem 1.1rem; font-size: 1.15rem; }
  .side-nav { display: grid; gap: .15rem; align-content: start; flex: 1; }
  .side-nav a { display: flex; align-items: center; gap: .7rem; padding: .65rem .7rem; color: var(--silver); text-decoration: none; font-weight: 600; font-size: .92rem; border-left: 4px solid transparent; }
  .side-nav a:hover { background: var(--surface); color: #fff; }
  .side-nav a[aria-current="page"] { background: var(--surface-2); color: #fff; border-left-color: var(--brand); }
  .side-nav a .pill { margin-left: auto; }
  .side-nav .sub { padding-left: 2.5rem; font-weight: 500; font-size: .86rem; }
  .side-title { font: 600 .7rem var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 1.1rem .7rem .3rem; }
  .side-foot { border-top: 1px solid var(--line); padding-top: .8rem; font-size: .82rem; color: var(--muted); display: grid; gap: .3rem; }
  .side-foot .who { color: #fff; font-weight: 600; }
  .topbar, .tabbar { display: none; }
  body.panel .shell { margin-left: var(--side-w); }
  .container { padding: 28px 28px 60px; }
  .footer { padding-bottom: 24px; }
  .kpis { grid-template-columns: repeat(5, 1fr); }
  .kpis-2 { grid-template-columns: repeat(2, minmax(0, 260px)); }
  .dash-grid { grid-template-columns: 1.3fr 1fr; }
  .dash-grid .wide { grid-column: 1; }
  .split { grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); }
  .board { grid-template-columns: repeat(6, minmax(210px, 1fr)); overflow-x: auto; padding-bottom: .5rem; }
  .menu-grid + form { display: none; }
  .team { grid-template-columns: repeat(3, 1fr); }
  .toast { bottom: 24px; }
}
@media (min-width: 1100px) {
  .svc-grid { grid-template-columns: repeat(4, 1fr); }
  .flow { grid-template-columns: repeat(4, 1fr); }
  .flow li { padding-left: 0; padding-top: 4.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
