/* Kit de wireframes RUNN League. Las clases son las piezas atómicas.
   Ningún valor de aspecto se escribe aquí: todo sale de los tokens de tema.css. */
/* ---------- Tablero de flujo ---------- */
.board { position: relative; padding: 56px 56px 96px; }
.board-row { display: flex; gap: 120px; align-items: flex-start; }
.row-label { margin: 110px 0 28px; display: flex; align-items: baseline; gap: 16px; }
.row-label:first-child { margin-top: 0; }
.row-label b { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.row-label span { font-size: 14px; color: var(--ink-3); }
svg.wires { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; z-index: 20; }
.hot { outline: 2px dashed var(--ink); outline-offset: 3px; }

/* ---------- Pantalla ---------- */
.scr { display: flex; flex-direction: column; gap: 14px; width: 390px; flex-shrink: 0; font-family: var(--fuente); }
.scr-head { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: var(--peso-semi); color: var(--ink); white-space: nowrap; }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 28px; padding: 0 8px; border-radius: var(--r-full); background: var(--ink); color: var(--bg); font: 700 12px/1 var(--fuente-mono); }
.scr-note { margin: 0; padding: 0 0 0 18px; font-size: 13px; line-height: 1.5; color: var(--ink-3); max-width: 390px; }
.scr-note li + li { margin-top: 4px; }
.scr-note b { color: var(--ink); }

.phone { width: 390px; height: 844px; border: var(--borde-fuerte) solid var(--ink); border-radius: var(--r-pantalla); background: var(--bg); overflow: hidden; position: relative; display: flex; flex-direction: column; color: var(--ink); }
.p-status { height: 50px; flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; padding: 4px 32px 0; font-size: 15px; font-weight: var(--peso-semi); }
.p-status .sig { display: flex; gap: 5px; align-items: center; }
.p-status .sig i { display: block; background: var(--ink); border-radius: var(--r-full); }
.p-body { flex: 1; min-height: 0; overflow: hidden; padding: 6px 20px 16px; display: flex; flex-direction: column; gap: 18px; }
.p-body.flush { padding-left: 0; padding-right: 0; }
.p-foot { flex-shrink: 0; padding: 12px 20px 34px; display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); background: var(--bg); }
.p-foot.plain { border-top: 0; }
.p-home { position: absolute; bottom: 8px; left: 50%; width: 134px; height: 5px; margin-left: -67px; border-radius: var(--r-full); background: var(--ink); z-index: 9; }

.under { position: relative; }
.dim { position: absolute; inset: 0; background: var(--veil); z-index: 6; display: flex; flex-direction: column; justify-content: flex-end; }
.dim.center { justify-content: center; align-items: center; padding: 0 36px; }
.sheet { background: var(--bg); border-radius: var(--r-3xl) var(--r-3xl) 0 0; padding: 10px 20px 40px; display: flex; flex-direction: column; gap: 16px; }
.grab { width: 40px; height: 5px; border-radius: var(--r-full); background: var(--bar); margin: 0 auto 4px; }
.dialog { width: 100%; background: var(--surface); border-radius: var(--r-xl); overflow: hidden; text-align: center; }
.dialog .d-body { padding: 20px 18px 16px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-2); }
.dialog .d-body b { font-size: var(--t-h3); color: var(--ink); }
.dialog .d-opt { padding: 13px; border-top: 1px solid var(--line-2); font-size: var(--t-h3); font-weight: var(--peso-medio); }

/* ---------- Tipografía ---------- */
.h1 { font-size: var(--t-h1); line-height: 1.12; font-weight: var(--peso-alto); letter-spacing: -.02em; margin: 0; }
.h2 { font-size: var(--t-h2); line-height: 1.2; font-weight: var(--peso-alto); letter-spacing: -.01em; margin: 0; }
.h3 { font-size: var(--t-h3); line-height: 1.3; font-weight: var(--peso-semi); margin: 0; }
.b { font-size: var(--t-cuerpo); line-height: 1.45; color: var(--ink-2); }
.s { font-size: var(--t-peq); line-height: 1.4; color: var(--ink-4); }
.cap { font-size: var(--t-cap); letter-spacing: .09em; text-transform: uppercase; font-weight: var(--peso-semi); color: var(--ink-4); }
.num { font-variant-numeric: tabular-nums; }
.xl { font-size: var(--t-xl); line-height: 1; font-weight: var(--peso-alto); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.link { font-size: 14px; font-weight: var(--peso-medio); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.center { text-align: center; align-items: center; }

/* Barras de texto simulado */
.ln { display: block; height: 9px; border-radius: var(--r-full); background: var(--bar); flex-shrink: 0; }
.ln.t { height: 13px; background: var(--ink-2); }
.ln.s { height: 7px; background: var(--bar-2); }
.lines { display: flex; flex-direction: column; gap: 8px; }

/* ---------- Átomos ---------- */
.btn { height: 54px; width: 100%; border: 0; border-radius: var(--r-xl); display: flex; align-items: center; justify-content: center; gap: 10px; font: 650 16px/1 inherit; white-space: nowrap; flex-shrink: 0; }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-secondary { background: var(--bg); color: var(--ink); box-shadow: inset 0 0 0 var(--borde) var(--ink); }
.btn-tertiary { background: var(--surface-2); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); height: 44px; text-decoration: underline; text-underline-offset: 3px; }
.btn-disabled { background: var(--bar-2); color: var(--ink-4); }
.btn-sm { height: 38px; width: auto; padding: 0 16px; border-radius: var(--r-md); font-size: 14px; }
.btn-go { width: 112px; height: 112px; border-radius: 50%; font-size: 26px; font-weight: var(--peso-max); letter-spacing: .04em; margin: 0 auto; }

.ic { display: inline-flex; width: 22px; height: 22px; flex-shrink: 0; }
.ic svg { width: 100%; height: 100%; }
.icb { width: 44px; height: 44px; border-radius: var(--r-lg); background: var(--surface-2); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.icb.round { border-radius: 50%; }
.icb.lg { width: 88px; height: 88px; border-radius: 50%; }
.icb.lg .ic { width: 38px; height: 38px; }
.icb.xl { width: 132px; height: 132px; border-radius: 50%; }
.icb.xl .ic { width: 54px; height: 54px; }

.av { width: 40px; height: 40px; border-radius: 50%; background: var(--bar); flex-shrink: 0; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; }
.av.con-foto { background: var(--surface-2); }
.av svg { width: 100%; height: 100%; display: block; }
.av.sm { width: 30px; height: 30px; }
.av.lg { width: 84px; height: 84px; }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: var(--r-full); background: var(--surface-2); font-size: 13.5px; font-weight: var(--peso-medio); color: var(--ink-2); white-space: nowrap; flex-shrink: 0; }
.chip.on { background: var(--ink); color: var(--bg); }
.chip.out { background: var(--bg); box-shadow: inset 0 0 0 var(--borde) var(--line-2); }
.chips { display: flex; gap: 8px; overflow: hidden; }
.tag { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: var(--r-full); background: var(--surface-2); font-size: 11.5px; font-weight: var(--peso-semi); color: var(--ink-2); white-space: nowrap; flex-shrink: 0; }
.tag.dark { background: var(--ink); color: var(--bg); }
.tag.out { background: transparent; box-shadow: inset 0 0 0 var(--borde) var(--ink-2); }
.tag.dash { background: transparent; box-shadow: none; border: 1.5px dashed var(--ink-4); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); flex-shrink: 0; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface-2); border-radius: var(--r-lg); padding: 4px; }
.seg span { height: 36px; display: flex; align-items: center; justify-content: center; font-size: 13.5px; font-weight: var(--peso-medio); color: var(--ink-3); border-radius: var(--r-sm); white-space: nowrap; }
.seg span.on { background: var(--bg); color: var(--ink); box-shadow: var(--sombra-sm); }

.inp { display: flex; flex-direction: column; gap: 7px; }
.inp label { font-size: 13px; font-weight: var(--peso-medio); color: var(--ink-2); }
.inp-box { height: 52px; border-radius: var(--r-lg); box-shadow: inset 0 0 0 var(--borde) var(--line-2); display: flex; align-items: center; gap: 10px; padding: 0 14px; font-size: 15.5px; color: var(--ink); background: var(--bg); }
.inp-box .ph-t { color: var(--ink-5); }
.inp-box .grow { flex: 1; }
.inp.focus .inp-box { box-shadow: inset 0 0 0 var(--borde-fuerte) var(--ink); }
.inp.error .inp-box { box-shadow: inset 0 0 0 var(--borde-fuerte) var(--ink); background: var(--surface); }
.inp-msg { display: flex; gap: 6px; align-items: flex-start; font-size: var(--t-peq); line-height: 1.4; color: var(--ink-2); }
.inp-msg .ic { width: 16px; height: 16px; }
.inp .hint { font-size: 12px; color: var(--ink-4); }

.check { width: 22px; height: 22px; border-radius: var(--r-xs); box-shadow: inset 0 0 0 var(--borde) var(--ink-4); flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; }
.check.on { background: var(--ink); box-shadow: none; }
.radio { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 var(--borde) var(--ink-4); flex-shrink: 0; }
.radio.on { box-shadow: inset 0 0 0 7px var(--ink); }
.toggle { width: 50px; height: 30px; border-radius: var(--r-full); background: var(--bar); position: relative; flex-shrink: 0; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--bg); }
.toggle.on { background: var(--ink); }
.toggle.on::after { left: 23px; }

.divider { height: 1px; background: var(--line); flex-shrink: 0; }
.or { display: flex; align-items: center; gap: 12px; font-size: var(--t-peq); color: var(--ink-4); }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.progress { height: 8px; border-radius: var(--r-full); background: var(--surface-2); overflow: hidden; flex-shrink: 0; }
.progress i { display: block; height: 100%; background: var(--ink); border-radius: var(--r-full); }
.steps { display: flex; gap: 6px; }
.steps i { flex: 1; height: 4px; border-radius: var(--r-full); background: var(--bar-2); }
.steps i.on { background: var(--ink); }

.skel { background: var(--surface-2); border-radius: var(--r-lg); }
.ph { background: repeating-linear-gradient(135deg, var(--surface-2) 0 10px, var(--bar-2) 10px 20px); border-radius: var(--r-2xl); display: flex; align-items: center; justify-content: center; color: var(--ink-4); font-size: var(--t-cap); font-weight: var(--peso-alto); letter-spacing: .1em; text-transform: uppercase; flex-shrink: 0; }
.logo { display: inline-flex; align-items: center; justify-content: center; border: var(--borde-fuerte) solid var(--ink); border-radius: var(--r-md); font: 800 13px/1 var(--fuente-mono); letter-spacing: .12em; }

/* ---------- Moléculas ---------- */
.top { display: flex; align-items: center; gap: 12px; min-height: 44px; flex-shrink: 0; }
.top .t { flex: 1; font-size: 17px; font-weight: var(--peso-semi); text-align: center; white-space: nowrap; overflow: hidden; }
.top .side { width: 44px; display: flex; }
.top .side:last-child { justify-content: flex-end; }
.hstack { display: flex; align-items: center; gap: 12px; }
.hstack.between { justify-content: space-between; }
.vstack { display: flex; flex-direction: column; gap: 12px; }
.grow { flex: 1; min-width: 0; }

.row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row .r-t { font-size: 15px; font-weight: var(--peso-medio); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .r-s { margin-top: 3px; font-size: var(--t-peq); color: var(--ink-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .r-v { font-size: 15px; font-weight: var(--peso-semi); font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.row .r-v small { display: block; font-size: 12px; font-weight: var(--peso-normal); color: var(--ink-4); margin-top: 2px; }
.row .rank { width: 26px; font-size: 15px; font-weight: var(--peso-alto); font-variant-numeric: tabular-nums; text-align: center; flex-shrink: 0; }
.row.me { margin: 0 -12px; padding: 13px 12px; border-radius: var(--r-lg); background: var(--surface-2); border-bottom: 0; box-shadow: inset 0 0 0 var(--borde-fuerte) var(--ink); }

.card { border-radius: var(--r-2xl); box-shadow: inset 0 0 0 var(--borde) var(--line); padding: 16px; display: flex; flex-direction: column; gap: 12px; background: var(--bg); flex-shrink: 0; }
.card.fill { background: var(--surface); box-shadow: none; }
.card.dark { background: var(--ink); color: var(--bg); box-shadow: none; }
.card.dark .s, .card.dark .cap { color: var(--on-ink-3); }
.card.dark .b { color: var(--on-ink-2); }
.card.flat { padding: 0; box-shadow: none; }

.stat .v { font-size: 26px; font-weight: var(--peso-alto); letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; white-space: nowrap; }
.stat .v small { font-size: 13px; font-weight: var(--peso-medio); color: var(--ink-4); margin-left: 3px; letter-spacing: 0; }
.stat .l { margin-top: 4px; font-size: var(--t-cap); letter-spacing: .08em; text-transform: uppercase; font-weight: var(--peso-semi); color: var(--ink-4); white-space: nowrap; }
.stat.sm .v { font-size: 18px; }
.stats { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
.stats > .stat + .stat { border-left: 1px solid var(--line); padding-left: 14px; }
.card.dark .stats > .stat + .stat { border-color: var(--ink-2); }

.banner { display: flex; gap: 12px; align-items: flex-start; padding: 13px 14px; border-radius: var(--r-lg); background: var(--surface-2); font-size: 13.5px; line-height: 1.45; flex-shrink: 0; }
.banner b { display: block; font-size: 14px; margin-bottom: 2px; }
.banner.strong { background: var(--ink); color: var(--bg); }
.banner.strong .ic svg { stroke: var(--bg); }

.sec { display: flex; flex-direction: column; gap: 12px; flex-shrink: 0; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }

.code { display: flex; gap: 10px; }
.code i { flex: 1; height: 58px; border-radius: var(--r-lg); box-shadow: inset 0 0 0 var(--borde) var(--line-2); display: flex; align-items: center; justify-content: center; font: 700 24px/1 inherit; font-style: normal; }
.code i.on { box-shadow: inset 0 0 0 var(--borde-fuerte) var(--ink); }

.map { position: relative; border-radius: var(--r-2xl); background: var(--surface-2); overflow: hidden; flex-shrink: 0; }
.map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map .tag { position: absolute; top: 12px; left: 12px; background: var(--bg); }

.tabbar { flex-shrink: 0; height: 86px; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr); padding: 8px 6px 30px; background: var(--bg); }
.tab { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 10.5px; font-weight: var(--peso-medio); color: var(--ink-5); }
.tab .ic { width: 24px; height: 24px; }
.tab .ic svg { stroke: var(--ink-5); }
.tab.on { color: var(--ink); }
.tab.on .ic svg { stroke: var(--ink); }
.tab.run .runb { width: 58px; height: 58px; margin-top: -26px; border-radius: 50%; background: var(--ink); color: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: var(--peso-max); letter-spacing: .06em; box-shadow: 0 0 0 5px var(--bg); }
.tab.run.on .runb { box-shadow: 0 0 0 5px var(--bg), 0 0 0 7px var(--ink); }

.gps { display: flex; align-items: flex-end; gap: 3px; height: 18px; }
.gps i { width: 5px; border-radius: var(--r-full); background: var(--bar-2); }
.gps i:nth-child(1) { height: 6px; } .gps i:nth-child(2) { height: 10px; } .gps i:nth-child(3) { height: 14px; } .gps i:nth-child(4) { height: 18px; }
.gps i.on { background: var(--ink); }

.bars { display: flex; flex-direction: column; gap: 9px; }
.bars .br { display: grid; grid-template-columns: 40px 1fr 52px; align-items: center; gap: 10px; font-size: var(--t-peq); font-variant-numeric: tabular-nums; }
.bars .br i { height: 12px; border-radius: var(--r-full); background: var(--ink-2); display: block; }
.bars .br span:last-child { text-align: right; font-weight: var(--peso-medio); }

.timeline { display: flex; flex-direction: column; }
.tl { display: grid; grid-template-columns: 24px 1fr; gap: 12px; position: relative; padding-bottom: 18px; }
.tl::before { content: ""; position: absolute; left: 11px; top: 24px; bottom: 0; width: 2px; background: var(--line-2); }
.tl:last-child::before { display: none; }
.tl .m { width: 24px; height: 24px; border-radius: 50%; box-shadow: inset 0 0 0 var(--borde-fuerte) var(--line-2); background: var(--bg); display: flex; align-items: center; justify-content: center; }
.tl .m.on { background: var(--ink); box-shadow: none; }
.tl .m.now { box-shadow: inset 0 0 0 7px var(--ink); }
.tl .m .ic { width: 14px; height: 14px; }
.tl .m .ic svg { stroke: var(--bg); }

.keyrow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.keyrow span { height: 50px; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: var(--peso-normal); }

.push { background: var(--surface); border-radius: var(--r-2xl); padding: 12px 14px; display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: start; }
.push .logo { width: 36px; height: 36px; border-radius: var(--r-sm); font-size: 8px; }

/* ---------- Escritorio (admin) ---------- */
.scr.desk-scr { width: 1280px; }
.desk { width: 1280px; height: 820px; border: var(--borde-fuerte) solid var(--ink); border-radius: var(--r-xl); background: var(--bg); overflow: hidden; display: grid; grid-template-rows: 40px 1fr; color: var(--ink); position: relative; }
.desk-bar { display: flex; align-items: center; gap: 8px; padding: 0 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
.desk-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--bar); }
.desk-bar span { margin-left: 16px; height: 24px; width: 420px; border-radius: var(--r-sm); background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); font-size: 12px; color: var(--ink-4); display: flex; align-items: center; padding: 0 10px; }
.desk-in { display: grid; grid-template-columns: 232px 1fr; min-height: 0; }
.side { border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; }
.side .nav { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; border-radius: var(--r-sm); font-size: 14px; font-weight: var(--peso-medio); color: var(--ink-3); }
.side .nav .ic { width: 18px; height: 18px; }
.side .nav.on { background: var(--ink); color: var(--bg); }
.side .nav.on .ic svg { stroke: var(--bg); }
.main { padding: 26px 32px; display: flex; flex-direction: column; gap: 22px; min-width: 0; overflow: hidden; position: relative; }
.main-h { display: flex; align-items: center; gap: 14px; }
.main-h .h1 { font-size: 26px; }
table.tb { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.tb th { text-align: left; font-size: var(--t-cap); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-4); font-weight: var(--peso-semi); padding: 10px 12px; border-bottom: var(--borde) solid var(--line-2); white-space: nowrap; }
table.tb td { padding: 12px; border-bottom: 1px solid var(--line); white-space: nowrap; font-variant-numeric: tabular-nums; }
table.tb tr.sel td { background: var(--surface); }
.cols { display: grid; gap: 20px; min-height: 0; }
.box { border-radius: var(--r-xl); box-shadow: inset 0 0 0 var(--borde) var(--line); padding: 18px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.box.fill { background: var(--surface); box-shadow: none; }
.textarea { min-height: 84px; border-radius: var(--r-md); box-shadow: inset 0 0 0 var(--borde) var(--line-2); padding: 12px; font-size: 13.5px; color: var(--ink-5); }
.vsteps { display: flex; flex-direction: column; gap: 4px; }
.vsteps div { display: flex; align-items: center; gap: 12px; height: 46px; padding: 0 12px; border-radius: var(--r-md); font-size: 14px; font-weight: var(--peso-medio); color: var(--ink-4); }
.vsteps div b { width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 var(--borde) var(--line-2); display: flex; align-items: center; justify-content: center; font-size: 12px; }
.vsteps div.done { color: var(--ink); }
.vsteps div.done b { background: var(--surface-2); box-shadow: none; }
.vsteps div.on { background: var(--surface-2); color: var(--ink); }
.vsteps div.on b { background: var(--ink); color: var(--bg); box-shadow: none; }
.hstack > .btn { flex: 1 1 0; width: auto; min-width: 0; }
.hstack > .btn.btn-sm, .hstack > .btn.btn-go { flex: 0 0 auto; }

/* Estados documentados en el design system */
.btn.is-hover.btn-primary { background: var(--ink-2); }
.btn.is-hover.btn-secondary, .btn.is-hover.btn-tertiary { background: var(--surface-2); }
.btn.is-pressed { transform: scale(.97); filter: brightness(.85); }
.btn.is-focus, .inp.is-focus .inp-box, .chip.is-focus, .toggle.is-focus { outline: 3px solid var(--ink); outline-offset: 3px; }
.btn.is-loading { color: transparent; position: relative; }
.btn.is-loading::after { content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid currentColor; border-color: var(--bg) var(--bg) transparent transparent; }
.btn-secondary.is-loading::after { border-color: var(--ink) var(--ink) transparent transparent; }
