:root {
  --y: #fdb924; --k: #111; --g: #f2f2f0; --line: #e3e3e0; --muted: #6b6b6b;
  --ok: #1c6b2e; --ok-bg: #dff5e3; --no: #a12622; --no-bg: #fde2e1;
  --pend: #8a5a00; --pend-bg: #fff1cc; --conf: #2346a0; --conf-bg: #e3ecff;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  font-family: -apple-system, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;
  background: var(--g); color: var(--k); min-height: 100dvh;
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; cursor: pointer; }

.top { background: var(--k); color: #fff; padding: calc(14px + env(safe-area-inset-top)) 18px 16px; }
.top-in { display: flex; justify-content: space-between; align-items: center; max-width: 560px; margin: 0 auto; }
.logo { height: 28px; }
.sede { background: var(--y); color: var(--k); font-weight: 800; font-size: 12px; padding: 5px 11px; border-radius: 20px; }
.top h1 { font-size: 24px; margin: 14px auto 0; max-width: 560px; }
.sub { color: #bbb; font-size: 13px; margin: 4px auto 0; max-width: 560px; }
.sub:empty { display: none; }
main { max-width: 560px; margin: 0 auto; padding: 14px; }

.chips { display: flex; gap: 8px; margin-top: 12px; max-width: 560px; margin-inline: auto; }
.chip { border: 0; padding: 9px 16px; border-radius: 20px; font-size: 14px; font-weight: 700; background: #2a2a2a; color: #bbb; }
.chip.on { background: var(--y); color: var(--k); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 10px; }
.stat { background: #fff; border-radius: 12px; padding: 9px 4px; text-align: center; }
.stat b { display: block; font-size: 22px; }
.stat span { font-size: 11px; color: var(--muted); font-weight: 600; }

.card { background: #fff; border-radius: 16px; padding: 14px; margin-bottom: 10px; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.card-h { display: flex; justify-content: space-between; align-items: center; }
.hora { font-weight: 800; font-size: 16px; }
.nombre { font-size: 18px; font-weight: 700; margin-top: 3px; }
.meta { font-size: 13px; color: var(--muted); margin-top: 2px; }
.meta a { color: inherit; }
.aviso { margin-top: 8px; background: var(--pend-bg); color: var(--pend); border-radius: 10px; padding: 7px 10px; font-size: 12.5px; font-weight: 700; }
.badge { font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 12px; white-space: nowrap; }
.b-new { background: var(--pend-bg); color: var(--pend); }
.b-confirmed { background: var(--conf-bg); color: var(--conf); }
.b-showed { background: var(--ok-bg); color: var(--ok); }
.b-noshow { background: var(--no-bg); color: var(--no); }
.acts { display: flex; gap: 8px; margin-top: 12px; }
.btn { flex: 1; min-height: 50px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; font-weight: 800; font-size: 15px; }
.btn.y { background: var(--y); border-color: var(--y); }
.btn.k { background: var(--k); border-color: var(--k); color: #fff; }
.btn.chico { flex: 0 0 auto; min-height: 50px; padding: 0 14px; font-size: 13px; color: var(--muted); }
.btn:disabled { opacity: .5; }
.listo { margin-top: 12px; text-align: center; font-weight: 800; color: var(--ok); font-size: 14px; }
.vacio { text-align: center; color: var(--muted); padding: 40px 10px; font-size: 15px; }

label { display: block; font-size: 13px; font-weight: 800; color: #444; margin: 16px 0 6px; }
input { width: 100%; font: inherit; font-size: 17px; padding: 14px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; }
input:focus { outline: 2px solid var(--y); border-color: var(--y); }
.seg { display: flex; gap: 6px; }
.seg button { flex: 1; min-height: 48px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; font-weight: 700; font-size: 14px; }
.seg button.on { background: var(--k); color: #fff; border-color: var(--k); }
.big { width: 100%; margin-top: 22px; min-height: 56px; border: 0; border-radius: 14px; background: var(--y); font-weight: 900; font-size: 18px; }
.big:disabled { opacity: .5; }
.nota { margin-top: 12px; background: #fff; border-left: 4px solid var(--y); border-radius: 12px; padding: 12px; font-size: 13px; color: #555; }
.error { color: var(--no); font-weight: 700; font-size: 14px; margin-top: 10px; }
.pin { font-size: 32px; letter-spacing: 10px; text-align: center; }
.pie { text-align: center; color: #aaa; font-size: 11px; margin-top: 24px; }
.salir { background: none; border: 0; color: var(--muted); text-decoration: underline; font-size: 13px; }

.tabs { position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--line);
  display: flex; padding: 6px 0 calc(8px + env(safe-area-inset-bottom)); }
.tabs button { flex: 1; border: 0; background: none; font-size: 12px; font-weight: 700; color: #999; padding: 4px 0; }
.tabs button span { display: block; font-size: 22px; margin-bottom: 1px; }
.tabs button.on { color: var(--k); }
.tabs[hidden] { display: none; }

.toast { position: fixed; left: 14px; right: 14px; bottom: calc(86px + env(safe-area-inset-bottom)); max-width: 532px; margin: 0 auto;
  background: var(--k); color: #fff; border-radius: 12px; padding: 14px; font-size: 14px; font-weight: 600; text-align: center; }
.toast.mal { background: var(--no); }
.toast[hidden] { display: none; }
.pregunta { margin-top: 12px; font-size: 13px; font-weight: 800; color: #444; }
.tipo { margin-left: 8px; font-size: 11px; font-weight: 800; background: var(--g); color: #444; padding: 3px 8px; border-radius: 10px; vertical-align: middle; }
label.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; font-size: 13px; color: #333; margin-top: 18px; }
label.check input { width: 24px; height: 24px; flex: 0 0 24px; margin: 0; accent-color: var(--k); }
