/* Juego Limpio — estilos comunes (juego, taller, panel y certificado) */
:root {
  --bg: #f4f2ed; --surface: #ffffff; --surface-2: #faf9f6; --ink: #0f1e26; --ink-2: #2b3a42; --muted: #64727a; --line: #e4e0d7; --line-2: #d4cfc3;
  --brand: #0c4a57; --brand-2: #127a88; --brand-soft: #e3eff0; --gold: #b98a2e; --gold-soft: #f6eedb;
  --ok: #18865a; --ok-soft: #e2f3ea; --bad: #c3392e; --bad-soft: #fbe7e4; --warn: #c97c12; --warn-soft: #fbf0dc;
  --hcp: #0e8a78; --anti: #c0502a; --promo: #2c5ad0; --transp: #7a4ecd;
  --r: 16px; --r-sm: 10px; --shadow: 0 1px 2px rgba(15,30,38,.05), 0 8px 28px rgba(15,30,38,.07);
  --display: 'Jost', 'Inter', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--ink); font: 400 15px/1.5 Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand-2); }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 500; letter-spacing: -.01em; margin: 0; line-height: 1.15; }
.ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.kicker { font: 600 11.5px Inter, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.hidden { display: none !important; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.stack { display: grid; gap: 12px; }

/* botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border-radius: 999px; border: 1px solid transparent;
  background: var(--brand); color: #fff; font-weight: 600; font-size: 15px; text-decoration: none; transition: transform .12s, background .15s, box-shadow .15s; white-space: nowrap; }
.btn:hover { background: #0a3f4a; box-shadow: 0 6px 18px rgba(12,74,87,.22); }
.btn:active { transform: scale(.98); }
.btn.alt { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn.alt:hover { background: var(--surface-2); box-shadow: none; border-color: var(--muted); }
.btn.gold { background: var(--gold); } .btn.gold:hover { background: #a37824; }
.btn.ghost { background: transparent; color: var(--ink-2); border-color: transparent; }
.btn.ghost:hover { background: rgba(15,30,38,.05); box-shadow: none; }
.btn.danger { background: var(--surface); color: var(--bad); border-color: #efc4be; }
.btn.sm { min-height: 34px; padding: 6px 14px; font-size: 13.5px; }
.btn.lg { min-height: 54px; padding: 14px 28px; font-size: 16.5px; }
.btn[disabled] { opacity: .4; pointer-events: none; }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 50%; border: 0; background: transparent; color: var(--ink-2); }
.icon-btn:hover { background: rgba(15,30,38,.06); }

/* formularios */
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.input, select.input, textarea.input { width: 100%; min-height: 44px; padding: 10px 14px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface); outline: none; transition: border .15s, box-shadow .15s; }
.input:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(18,122,136,.15); }
.input.code { letter-spacing: .4em; font-weight: 600; font-size: 20px; text-align: center; }
.err { color: var(--bad); font-size: 13.5px; min-height: 1.2em; }

/* tarjetas y chips */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.pad { padding: 22px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.chip.cat { color: #fff; border: 0; }
.chip.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.chip.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.chip.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.chip.info { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }

/* marca */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand svg { width: 34px; height: 34px; }
.brand b { font: 500 20px var(--display); letter-spacing: -.01em; }
.brand small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 500; letter-spacing: .02em; margin-top: -2px; }

/* barra superior */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 10px 20px; background: rgba(244,242,237,.86); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.topbar .who { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 14px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-weight: 600; font-size: 13px; flex: none; }

/* tablas */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 11px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; position: sticky; top: 0; }
table.t td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr.click { cursor: pointer; } table.t tr.click:hover td { background: var(--surface-2); }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 12.5px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* modal y aviso */
.modal-bg { position: fixed; inset: 0; z-index: 60; background: rgba(15,30,38,.42); display: grid; place-items: center; padding: 16px; animation: fade .15s ease; }
.modal { width: min(760px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border-radius: 20px; box-shadow: 0 30px 80px rgba(0,0,0,.25); }
.modal.wide { width: min(1080px, 100%); }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.modal-head h3 { font-size: 20px; }
.modal-body { padding: 22px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 80; background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.25); animation: up .2s ease; max-width: calc(100vw - 32px); }
.toast.bad { background: var(--bad); }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { opacity: 0; transform: translate(-50%, 10px); } }
.screen { animation: screen .35s ease both; }
@keyframes screen { from { opacity: 0; transform: translateY(6px); } }

.demo-banner { background: var(--gold-soft); color: #6d5016; font-size: 13px; text-align: center; padding: 7px 16px; border-bottom: 1px solid #ecdcb7; }
@media (max-width: 640px) { .pad { padding: 18px; } .topbar { padding: 10px 16px; } .hide-sm { display: none; } }
