/* Layout: arriba la pesa para marcar el día + números del mes; abajo el tablero
   (tabla del reto, faltazos, invictos, calendario y multas). En celular se apila todo. */
:root {
  --bg: #ECEEF1;
  --surface: #FFFFFF;
  --surface-2: #F3F4F7;
  --ink: #15181D;
  --muted: #5A6370;
  --line: #D5D9DF;
  --accent: #1F55C6;
  --accent-deep: #163F95;
  --accent-ink: #FFFFFF;
  --hit: #1B8549;
  --hit-deep: #136236;
  --miss: #C92536;
  --warn: #E0A500;
  --warn-ink: #1A1400;
  --plate-black: #2C313A;
  --shadow: 0 1px 2px rgba(20, 24, 32, .06), 0 6px 18px rgba(20, 24, 32, .06);
  --f-display: 'Big Shoulders Display', 'Arial Narrow', Impact, sans-serif;
  --f-body: 'Barlow', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace;
  --r: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F1216; --surface: #181C22; --surface-2: #1F242B; --ink: #E8EBEF; --muted: #9AA3AE;
    --line: #2B313A; --accent: #5B8BEE; --accent-deep: #3A68C8; --accent-ink: #0B1222;
    --hit: #37BE76; --hit-deep: #23894F; --miss: #EF5466; --warn: #F0BF2E; --warn-ink: #1A1400;
    --plate-black: #3A414C; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 22px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0F1216; --surface: #181C22; --surface-2: #1F242B; --ink: #E8EBEF; --muted: #9AA3AE;
  --line: #2B313A; --accent: #5B8BEE; --accent-deep: #3A68C8; --accent-ink: #0B1222;
  --hit: #37BE76; --hit-deep: #23894F; --miss: #EF5466; --warn: #F0BF2E; --warn-ink: #1A1400;
  --plate-black: #3A414C; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 22px rgba(0,0,0,.25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--f-body); font-size: 15px; line-height: 1.45;
  padding-inline: 16px; padding-block: 0 48px;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.wrap { max-width: 1120px; margin-inline: auto; display: grid; gap: 20px; }

/* Encabezado */
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5;
  margin-inline: -16px; padding: 12px 16px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top-in { max-width: 1120px; margin-inline: auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: baseline; gap: 10px; margin-right: auto; min-width: 0; }
.brand h1 {
  margin: 0; font-family: var(--f-display); font-weight: 900; font-size: 30px; line-height: 1;
  text-transform: uppercase; letter-spacing: .01em;
}
.brand .tag { font-family: var(--f-mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; }
.monthnav { display: flex; align-items: center; gap: 4px; }
.monthnav .lbl {
  font-family: var(--f-display); font-weight: 800; font-size: 20px; text-transform: uppercase;
  min-width: 9.5ch; text-align: center; letter-spacing: .02em;
}
.iconbtn {
  width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface);
  display: inline-grid; place-items: center; font-size: 18px; line-height: 1;
}
.iconbtn:disabled { opacity: .35; cursor: default; }
.btn {
  border: 1px solid var(--line); background: var(--surface); border-radius: 8px;
  padding: 8px 14px; font-weight: 600; line-height: 1.2;
}
.btn:hover:not(:disabled) { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover:not(:disabled) { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn.danger { color: var(--miss); }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.banner {
  border: 1px solid var(--line); border-left: 4px solid var(--warn); background: var(--surface);
  border-radius: var(--r); padding: 12px 14px; font-size: 14px;
}
.banner b { font-weight: 700; }

/* Bloque superior: pesa + números */
.hero { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 20px; margin-top: 20px; }
@media (max-width: 820px) { .hero { grid-template-columns: minmax(0, 1fr); } }

.today {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
  padding: 20px; display: grid; gap: 14px; justify-items: center; text-align: center;
}
.today .date { font-family: var(--f-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.today .who { font-family: var(--f-display); font-weight: 800; font-size: 26px; text-transform: uppercase; line-height: 1; }
.today .note { color: var(--muted); font-size: 14px; max-width: 34ch; }
.today .meta { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.today .meta b { color: var(--ink); font-size: 16px; }

/* La pesa: un disco olímpico. Azul = por marcar, verde = listo. */
.plate {
  --c: var(--accent); --c-deep: var(--accent-deep);
  width: min(220px, 62vw); aspect-ratio: 1; max-width: 100%; border-radius: 50%; border: 0;
  background:
    radial-gradient(circle, transparent 0 57%, color-mix(in srgb, var(--c-deep) 70%, #000) 57.5% 59%, transparent 59.5%),
    radial-gradient(circle, transparent 0 85%, var(--c-deep) 85.5% 100%),
    var(--c);
  color: #fff; display: grid; place-content: center; gap: 4px;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--c) 35%, transparent), inset 0 -6px 0 rgba(0,0,0,.12);
  transition: transform .15s ease, box-shadow .15s ease;
}
.plate:hover:not(:disabled) { transform: translateY(-2px); }
.plate:active:not(:disabled) { transform: scale(.97); }
.plate .big { font-family: var(--f-display); font-weight: 900; font-size: 44px; line-height: .9; text-transform: uppercase; letter-spacing: .01em; }
.plate .small { font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.plate.done { --c: var(--hit); --c-deep: var(--hit-deep); }
.plate.off { --c: var(--plate-black); --c-deep: #1b1f25; }
.plate:disabled { cursor: default; }
.plate.stamp { animation: stamp .45s ease; }
@keyframes stamp { 0% { transform: scale(1); } 35% { transform: scale(.9); } 70% { transform: scale(1.04); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .plate, .plate.stamp { transition: none; animation: none; } }

.joinbox { width: 100%; display: grid; gap: 10px; text-align: left; }
.joinbox .claims { display: flex; flex-wrap: wrap; gap: 8px; }
.joinrow { display: flex; gap: 8px; }
.joinrow input { flex: 1; min-width: 0; }
input[type="text"], input[type="number"], input[type="date"] {
  border: 1px solid var(--line); background: var(--surface-2); border-radius: 8px; padding: 8px 10px; min-width: 0;
}

.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-content: start; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: grid; gap: 2px; }
.kpi .k { font-family: var(--f-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.kpi .v { font-family: var(--f-display); font-weight: 800; font-size: 40px; line-height: 1; }
.kpi .s { font-size: 13px; color: var(--muted); }
.kpi.pozo { grid-column: 1 / -1; background: var(--ink); color: var(--bg); border-color: var(--ink); }
.kpi.pozo .k, .kpi.pozo .s { color: color-mix(in srgb, var(--bg) 70%, var(--ink)); }
.kpi.pozo .v { font-size: 52px; }
.kpi.pozo .bar { height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--bg) 22%, var(--ink)); overflow: hidden; margin-top: 8px; }
.kpi.pozo .bar i { display: block; height: 100%; background: var(--warn); }

/* Secciones */
.sec { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; min-width: 0; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.sec-h h2 { margin: 0; font-family: var(--f-display); font-weight: 800; font-size: 24px; text-transform: uppercase; letter-spacing: .02em; text-wrap: balance; }
.sec-h .hint { font-size: 13px; color: var(--muted); }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
@media (max-width: 820px) { .two { grid-template-columns: minmax(0, 1fr); } }
.empty { color: var(--muted); font-size: 14px; padding: 8px 0; }

/* Tabla del reto */
.rank { list-style: none; margin: 0; padding: 0; display: grid; }
.rank li {
  display: grid; grid-template-columns: 34px 38px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 10px 0; border-top: 1px solid var(--line);
}
.rank li:first-child { border-top: 0; }
.rank .pos { font-family: var(--f-display); font-weight: 900; font-size: 26px; text-align: center; color: var(--muted); }
.rank li.lead .pos { color: var(--warn); }
.rank .name { font-weight: 700; font-size: 16px; overflow-wrap: anywhere; }
.rank .name .me { font-family: var(--f-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-left: 6px; }
.rank .sub { font-size: 13px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.rank .sub b { color: var(--ink); font-weight: 600; }
.rank .right { display: grid; justify-items: end; gap: 4px; }
.rank .fine { font-weight: 700; }
.rank .fine.zero { color: var(--muted); font-weight: 500; }
.strip { display: flex; gap: 2px; flex-wrap: wrap; margin-top: 6px; }
.strip i { width: 7px; height: 7px; border-radius: 2px; background: var(--line); }
.strip i.s-done, .strip i.s-extra { background: var(--hit); }
.strip i.s-miss { background: var(--miss); }
.strip i.s-excused { background: var(--muted); }
.strip i.s-pending { background: var(--warn); }
.strip i.s-off { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.strip i.s-future { background: transparent; }

.av {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--f-display); font-weight: 800; font-size: 16px; color: #fff; flex: none;
  box-shadow: inset 0 0 0 3px rgba(0,0,0,.18);
}
.av.c0 { background: #1F55C6; } .av.c1 { background: #C92536; } .av.c2 { background: #D79C00; color: #1A1400; }
.av.c3 { background: #1B8549; } .av.c4 { background: #2C313A; } .av.c5 { background: #6A47B8; }
.av.sm { width: 26px; height: 26px; font-size: 12px; box-shadow: inset 0 0 0 2px rgba(0,0,0,.18); }

.pill {
  display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 2px 9px;
  font-size: 12px; font-weight: 700; white-space: nowrap; border: 1px solid transparent;
}
.pill.ok { background: color-mix(in srgb, var(--hit) 16%, transparent); color: var(--hit); }
.pill.bad { background: color-mix(in srgb, var(--miss) 14%, transparent); color: var(--miss); }
.pill.paid { border-color: var(--line); color: var(--muted); }
.pill.warn { background: color-mix(in srgb, var(--warn) 22%, transparent); color: var(--ink); }

/* Faltazos: barras horizontales a escala */
.bars { display: grid; gap: 10px; }
.barrow { display: grid; grid-template-columns: minmax(70px, 30%) minmax(0, 1fr); gap: 10px; align-items: center; }
.barrow .n { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barrow .track { position: relative; height: 26px; border-radius: 6px; background: var(--surface-2); }
.barrow .fill { height: 100%; border-radius: 6px; background: var(--miss); min-width: 4px; }
.barrow .val { position: absolute; inset: 0 8px 0 auto; display: flex; align-items: center; font-size: 13px; font-weight: 700; color: var(--ink); }

.inv { display: flex; flex-wrap: wrap; gap: 8px; }
.inv .chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px 4px 4px; font-weight: 600; }
.streak-best { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.streak-best .k { font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.streak-best .v { font-family: var(--f-display); font-weight: 800; font-size: 28px; text-transform: uppercase; line-height: 1.05; }
.streak-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.streak-list li { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.streak-list li span:last-child { color: var(--muted); }

/* Calendario del mes */
.matrix-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-inline: -4px; padding-inline: 4px; }
.matrix { border-collapse: separate; border-spacing: 3px; font-size: 12px; }
.matrix th { font-weight: 600; color: var(--muted); text-align: center; padding: 0; }
.matrix th.nm {
  position: sticky; left: 0; z-index: 1; background: var(--surface); text-align: left; padding-right: 8px;
  color: var(--ink); font-size: 13px; white-space: nowrap; max-width: 120px; overflow: hidden; text-overflow: ellipsis;
}
.matrix thead th { line-height: 1.1; }
.matrix thead th .wd { display: block; font-family: var(--f-mono); font-size: 9px; }
.matrix thead th.off { opacity: .45; }
.matrix thead th.is-today { color: var(--accent); }
.cell {
  width: 26px; height: 26px; border-radius: 5px; border: 0; padding: 0;
  display: grid; place-items: center; font-size: 13px; font-weight: 700; line-height: 1;
  background: var(--surface-2); color: transparent;
}
.cell:disabled { cursor: default; }
.cell.s-done { background: var(--hit); color: #fff; }
.cell.s-extra { background: transparent; box-shadow: inset 0 0 0 2px var(--hit); color: var(--hit); }
.cell.s-miss { background: var(--miss); color: #fff; }
.cell.s-excused { background: repeating-linear-gradient(135deg, var(--surface-2) 0 4px, var(--line) 4px 8px); color: var(--muted); }
.cell.s-pending { background: transparent; box-shadow: inset 0 0 0 2px var(--warn); }
.cell.s-off { background: transparent; box-shadow: inset 0 0 0 1px var(--line); opacity: .55; }
.cell.s-future { background: transparent; box-shadow: inset 0 0 0 1px var(--line); opacity: .3; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .cell { width: 16px; height: 16px; font-size: 10px; border-radius: 4px; }

/* Multas */
.fines { width: 100%; border-collapse: collapse; font-size: 14px; }
.fines th { text-align: left; font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 500; padding: 0 8px 8px 0; }
.fines td { border-top: 1px solid var(--line); padding: 10px 8px 10px 0; vertical-align: middle; }
.fines td.r, .fines th.r { text-align: right; }
.fines tfoot td { font-weight: 700; }
.tbl-wrap { overflow-x: auto; }

/* Diálogos */
dialog {
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink);
  padding: 0; width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); box-shadow: var(--shadow);
}
dialog::backdrop { background: rgba(10, 12, 16, .5); }
.dlg { padding: 18px; display: grid; gap: 14px; }
.dlg h3 { margin: 0; font-family: var(--f-display); font-weight: 800; font-size: 24px; text-transform: uppercase; }
.dlg .sub { color: var(--muted); font-size: 14px; margin-top: -8px; }
.dlg .acts { display: flex; flex-wrap: wrap; gap: 8px; }
.dlg .foot { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--muted); }
.wdays { display: flex; gap: 6px; flex-wrap: wrap; }
.wdays label {
  display: inline-grid; place-items: center; width: 40px; height: 36px; border: 1px solid var(--line); border-radius: 8px;
  font-weight: 700; cursor: pointer; user-select: none;
}
.wdays input { position: absolute; opacity: 0; pointer-events: none; }
.wdays label:has(input:checked) { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.wdays label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.hols { display: flex; flex-wrap: wrap; gap: 6px; }
.hols .pill { border-color: var(--line); color: var(--ink); font-weight: 600; }
.hols .pill button { border: 0; background: none; padding: 0 0 0 2px; color: var(--muted); font-size: 14px; }
.mlist { display: grid; gap: 8px; }
.mrow { display: grid; grid-template-columns: minmax(0, 1fr) 150px auto; gap: 8px; align-items: center; }
.mrow .inactive { opacity: .55; }
@media (max-width: 520px) { .mrow { grid-template-columns: minmax(0, 1fr) auto; } .mrow input[type="date"] { grid-column: 1 / -1; grid-row: 2; } }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 4px 0; width: 100%; }

.toast {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 14px; font-weight: 500;
  max-width: calc(100vw - 32px); box-shadow: var(--shadow); z-index: 20;
}
.foot-note { color: var(--muted); font-size: 12px; text-align: center; }
.skeleton { color: var(--muted); padding: 40px 0; text-align: center; }

/* ---------- Base (antes la ponía claude.ai; ahora va acá) ---------- */
html { -webkit-text-size-adjust: 100%; }
:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
body { margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }

/* ---------- Ingreso ---------- */
.login {
  min-height: 100dvh; display: grid; place-items: center; padding-block: 32px;
}
.login-card {
  width: min(400px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); padding: 28px 22px; display: grid; gap: 16px;
}
.login-card .mark {
  width: 84px; height: 84px; border-radius: 50%; justify-self: center;
  background:
    radial-gradient(circle, var(--surface) 0 16%, var(--accent-deep) 16.5% 22%, transparent 22.5%),
    radial-gradient(circle, transparent 0 85%, var(--accent-deep) 85.5% 100%),
    var(--accent);
}
.login-card h1 {
  margin: 0; text-align: center; font-family: var(--f-display); font-weight: 900; font-size: 40px;
  line-height: .95; text-transform: uppercase;
}
.login-card p { margin: 0; text-align: center; color: var(--muted); font-size: 14px; }
.login-card form { display: grid; gap: 12px; }
.login-card input { width: 100%; padding: 11px 12px; font-size: 16px; }
.login-card .btn { padding: 12px; font-size: 16px; }
.login-err { color: var(--miss); font-size: 14px; text-align: center; min-height: 1.2em; }

.acct { display: flex; align-items: center; gap: 8px; }
.cred {
  border: 1px dashed var(--accent); border-radius: 10px; padding: 12px; background: var(--surface-2);
  font-family: var(--f-mono); font-size: 14px; display: grid; gap: 4px; overflow-wrap: anywhere;
}
.gps-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 96px; gap: 8px; }
@media (max-width: 520px) { .gps-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .gps-row .rad { grid-column: 1 / -1; } }
.field small { color: var(--muted); font-size: 12px; }
.plate .spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid rgba(255,255,255,.35); border-top-color: #fff; justify-self: center; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .plate .spin { animation: none; } }

/* ---------- Ajustes tras la revisión de interfaz ---------- */
/* Rellenos con texto blanco: iguales en claro y oscuro para que el contraste no baje de 4,5:1. */
:root {
  --fill-blue: #1F55C6; --fill-blue-deep: #163F95;
  --fill-green: #1B7F45; --fill-green-deep: #12592F;
  --fill-red: #C21F31;
  --pozo-bg: #15181D; --pozo-fg: #ECEEF1;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --pozo-bg: #232A34; --pozo-fg: #E8EBEF; } }
:root[data-theme="dark"] { --pozo-bg: #232A34; --pozo-fg: #E8EBEF; }

.plate { --c: var(--fill-blue); --c-deep: var(--fill-blue-deep); }
.plate.done { --c: var(--fill-green); --c-deep: var(--fill-green-deep); }
.plate .small { opacity: 1; }
.cell.s-done { background: var(--fill-green); }
.cell.s-miss { background: var(--fill-red); font-size: 17px; }
.legend .cell.s-miss { font-size: 13px; }
.cell.s-excused { background: repeating-linear-gradient(135deg, var(--surface-2) 0 4px, var(--muted) 4px 6px); color: var(--ink); }

.kpi.pozo { background: var(--pozo-bg); color: var(--pozo-fg); border-color: var(--pozo-bg); }
.kpi.pozo .k, .kpi.pozo .s { color: color-mix(in srgb, var(--pozo-fg) 72%, var(--pozo-bg)); }
.kpi.pozo .bar { background: color-mix(in srgb, var(--pozo-fg) 18%, var(--pozo-bg)); }
.kpi small.of { font-size: 22px; color: var(--muted); }

/* Faltazos: el número va afuera de la barra, siempre sobre el fondo. */
.barrow { grid-template-columns: minmax(64px, 28%) minmax(0, 1fr) auto; }
.barrow .fill { background: var(--fill-red); }
.barrow .val { position: static; inset: auto; white-space: nowrap; }

/* Multas: montos sin cortar; estado y botón se acomodan juntos. */
.fines th { padding-right: 12px; }
.fines .amt { white-space: nowrap; }
.who-cell { display: inline-flex; align-items: center; gap: 8px; }
.who-cell small { display: block; color: var(--muted); font-size: 12px; }
.state-cell { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* En el celular el header no queda fijo: ocupaba un octavo de la pantalla. */
@media (max-width: 820px) {
  .top { position: static; }
  .brand h1 { font-size: 24px; }
  .brand .tag { display: none; }
  .monthnav .lbl { font-size: 18px; }
}

/* Participantes en Ajustes */
.mrow { grid-template-columns: minmax(0, 1fr) 160px; padding-block: 10px; border-top: 1px solid var(--line); }
.mrow .acts { grid-column: 1 / -1; }
.mrow .field small { font-weight: 600; }
@media (max-width: 520px) { .mrow { grid-template-columns: minmax(0, 1fr); } .mrow input[type="date"] { grid-column: auto; grid-row: auto; } }
.mrow input[type="text"], .mrow input[type="date"] { width: 100%; }
#addForm input { width: 100%; }
dialog h3:focus { outline: none; }

/* Contraseñas con el mismo estilo que el resto de los campos */
input[type="password"] {
  border: 1px solid var(--line); background: var(--surface-2); border-radius: 8px; padding: 8px 10px; min-width: 0;
}
.gps-row input { width: 100%; }
.gps-row .field { gap: 4px; }
/* La pista de deslizar sólo hace falta donde el mes no entra entero */
@media (min-width: 1000px) { .sec-h .hint.swipe { display: none; } }

/* Marcas a revisar (hechas lejos de donde marca el grupo) */
.cell.flag { background: var(--warn); color: var(--warn-ink); font-size: 15px; }
.legend .cell.flag { font-size: 11px; }
.note.warn-note, .sub.warn-note { color: var(--ink); background: color-mix(in srgb, var(--warn) 18%, transparent); border-radius: 8px; padding: 6px 10px; }
.rank .right { justify-items: end; }
.rank .right .pill + .pill { margin-top: 2px; }

/* "!" = marcó pero no fue en el gym: cuenta como falta */
.cell.out { background: var(--fill-red); color: #fff; font-size: 15px; box-shadow: inset 0 0 0 2px var(--warn); }
.legend .cell.out { font-size: 11px; }
