:root {
  --bg: #f6f5f1; --surface: #fff; --text: #1c1d1a; --muted: #5f625b; --line: #e2e0d8;
  --accent: #0f6b4f; --accent-soft: #e3f1ea; --warn: #c4553b; --warn-soft: #fbeae5;
  --radius: 14px; color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #121412; --surface: #1b1e1b; --text: #ecebe6; --muted: #a3a69e; --line: #2d312d;
    --accent: #4cc493; --accent-soft: #1d3329; --warn: #e07a60; --warn-soft: #3a211b; color-scheme: dark; }
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
h1, h2, h3, p { margin: 0; }
a { color: var(--accent); }
input, select, button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }

.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); font-weight: 600; font-size: 18px; }
.logo svg { color: var(--accent); }
.logo b { color: var(--accent); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.pila { display: grid; gap: 16px; margin: 20px 0 40px; }
.grid-2 { display: grid; gap: 16px; }
@media (min-width: 760px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

.campo { display: grid; gap: 4px; }
.campo label { font-weight: 600; font-size: 14px; }
.campo small, .muted { color: var(--muted); font-size: 13px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], select {
  width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg);
}
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.form { display: grid; gap: 12px; }
.fila { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border: 0; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 600; cursor: pointer; text-decoration: none; }
@media (prefers-color-scheme: dark) { .btn { color: #0c1a14; } }
.btn.sec { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.btn.peque { min-height: 34px; padding: 0 12px; font-size: 14px; }
.btn.grande { min-height: 64px; font-size: 20px; width: 100%; }
.btn[disabled] { opacity: .6; cursor: wait; }

.msg { padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.msg.error { background: var(--warn-soft); color: var(--warn); }
.msg.ok { background: var(--accent-soft); color: var(--accent); }

.tabs { display: flex; gap: 4px; overflow-x: auto; }
.tabs button { border: 0; background: transparent; padding: 8px 12px; border-radius: 8px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tabs button[aria-selected=true] { background: var(--accent-soft); color: var(--accent); }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 13px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tabla-scroll { overflow-x: auto; }
.chip { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--accent-soft); color: var(--accent); }
.chip.no { background: var(--line); color: var(--muted); }
.chip.alerta { background: var(--warn-soft); color: var(--warn); }

.qr { display: grid; gap: 12px; justify-items: center; text-align: center; }
.qr img { width: 220px; height: 220px; image-rendering: pixelated; background: #fff; padding: 8px; border-radius: 8px; }
.grande-num { font-size: 32px; font-weight: 700; color: var(--accent); }

.checar { max-width: 440px; margin: 0 auto; padding: 24px 16px 48px; display: grid; gap: 16px; }
.checar h1 { font-size: 24px; text-align: center; }
.reloj { text-align: center; font-size: 44px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lista-nombres { display: grid; gap: 8px; }
.lista-nombres button { min-height: 52px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 17px; text-align: left; padding: 0 16px; cursor: pointer; }
.lista-nombres button:hover { border-color: var(--accent); }
.pin { font-size: 28px; letter-spacing: 12px; text-align: center; }
.exito { text-align: center; display: grid; gap: 8px; padding: 24px; }
.exito .tipo { font-size: 28px; font-weight: 700; color: var(--accent); }

@media print {
  .top, .no-imprimir { display: none !important; }
  body { background: #fff; }
  .card { border: 0; }
}
