/* =====================================================================
   NAVIHACK · ESTILOS (sigue la maqueta "Sala de control de Santa")
   ===================================================================== */
:root {
  --bg: #050b18;
  --bg-2: #0a1428;
  --panel: rgba(12, 24, 46, .82);
  --panel-solid: #0c182e;
  --line: rgba(34, 211, 238, .28);
  --cyan: #22d3ee;
  --cyan-soft: rgba(34, 211, 238, .12);
  --red: #ff2a4d;
  --red-soft: rgba(255, 42, 77, .14);
  --green: #22e08a;
  --green-soft: rgba(34, 224, 138, .14);
  --gold: #ffc65c;
  --text: #e8f1ff;
  --muted: #8aa0c2;
  --brand: #E5172F;      /* color principal de la entidad (se sobreescribe) */
  --brand-2: #00E5A0;
  --radius: 14px;
  --cut: 14px;           /* esquina biselada */
  --f-display: 'Orbitron', 'Exo 2', system-ui, sans-serif;
  --f-body: 'Exo 2', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--f-body); color: var(--text); background: var(--bg);
  min-height: 100vh; line-height: 1.45; -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(1200px 600px at 15% -10%, rgba(34, 211, 238, .10), transparent 60%),
    radial-gradient(900px 500px at 95% 0%, rgba(255, 42, 77, .10), transparent 60%),
    linear-gradient(rgba(34, 211, 238, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, .045) 1px, transparent 1px);
  background-size: auto, auto, 38px 38px, 38px 38px;
  background-attachment: fixed;
}
a { color: var(--cyan); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- luces navideñas ---------- */
.lights { position: relative; height: 26px; overflow: hidden; pointer-events: none; }
.lights::before {
  content: ''; position: absolute; left: -10px; right: -10px; top: 4px; height: 14px;
  border-bottom: 2px solid #1f3b2a; border-radius: 0 0 50% 50% / 0 0 100% 100%;
}
.lights span {
  position: absolute; top: 12px; width: 9px; height: 13px; border-radius: 50% 50% 45% 45%;
  animation: twinkle 2.4s infinite ease-in-out;
}
.lights span:nth-child(4n+1) { background: var(--red); box-shadow: 0 0 10px var(--red); }
.lights span:nth-child(4n+2) { background: var(--green); box-shadow: 0 0 10px var(--green); animation-delay: .6s; }
.lights span:nth-child(4n+3) { background: var(--gold); box-shadow: 0 0 10px var(--gold); animation-delay: 1.2s; }
.lights span:nth-child(4n)   { background: var(--cyan); box-shadow: 0 0 10px var(--cyan); animation-delay: 1.8s; }
@keyframes twinkle { 0%,100% { opacity: 1 } 50% { opacity: .35 } }

/* ---------- barra superior ---------- */
.topbar {
  display: flex; align-items: center; gap: 14px; padding: 12px 22px;
  border-bottom: 1px solid var(--line); background: rgba(5, 11, 24, .7); backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 30;
}
.topbar .brand-band { width: 4px; align-self: stretch; background: var(--brand); border-radius: 2px; box-shadow: 0 0 12px var(--brand); }
.topbar .ent-logo { height: 34px; width: auto; max-width: 140px; object-fit: contain; }
.topbar .ent-name { font-family: var(--f-display); font-size: 13px; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.topbar .spacer { flex: 1; }
.topbar .sponsor { height: 22px; width: auto; opacity: .95; }
.topbar .who { font-size: 13px; color: var(--muted); text-align: right; line-height: 1.2; }
.topbar .who b { color: var(--text); display: block; font-weight: 600; }

/* ---------- títulos neón ---------- */
.neon-title {
  font-family: var(--f-display); font-weight: 900; text-transform: uppercase; line-height: .95; margin: 0;
  letter-spacing: .02em; color: #fff;
}
.neon-title .r { color: #ffd6dc; text-shadow: 0 0 6px var(--red), 0 0 18px var(--red), 0 0 38px rgba(255, 42, 77, .7); -webkit-text-stroke: 1px var(--red); }
.neon-title .w { color: #fff; text-shadow: 0 0 6px rgba(255, 255, 255, .7), 0 0 20px rgba(34, 211, 238, .5); -webkit-text-stroke: 1px rgba(255,255,255,.85); }
.neon-sub { font-family: var(--f-display); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #ffe1e6; text-shadow: 0 0 10px var(--red), 0 0 24px rgba(255, 42, 77, .6); margin: 0; }
.section-title { font-family: var(--f-display); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; text-align: center; margin: 6px 0 18px; font-size: clamp(16px, 2.2vw, 22px); }
.kicker { font-family: var(--f-display); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--cyan); }

/* ---------- paneles ---------- */
.panel {
  position: relative; background: var(--panel); border: 1px solid var(--line);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  padding: 18px; box-shadow: inset 0 0 40px rgba(34, 211, 238, .05);
}
.panel::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(135deg, var(--cyan) 0 2px, transparent 2px) top left / 22px 22px no-repeat,
              linear-gradient(315deg, var(--cyan) 0 2px, transparent 2px) bottom right / 22px 22px no-repeat;
  opacity: .8;
}
.panel h3 { font-family: var(--f-display); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 12px; color: #dff7ff; text-align: center; }
.panel.glow { border-color: var(--cyan); box-shadow: 0 0 0 1px rgba(34, 211, 238, .35), 0 0 30px rgba(34, 211, 238, .25), inset 0 0 40px rgba(34, 211, 238, .08); }

/* ---------- botones ---------- */
.btn {
  --c: var(--cyan);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--f-display); font-weight: 700; font-size: 14px; letter-spacing: .12em; text-transform: uppercase;
  padding: 12px 22px; border: 1.5px solid var(--c); color: #eaffff; background: color-mix(in srgb, var(--c) 14%, transparent);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  cursor: pointer; text-decoration: none; transition: background .15s, box-shadow .15s, transform .05s;
  box-shadow: 0 0 16px color-mix(in srgb, var(--c) 30%, transparent);
}
.btn:hover { background: color-mix(in srgb, var(--c) 26%, transparent); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.red { --c: var(--red); }
.btn.green { --c: var(--green); }
.btn.big { font-size: 20px; padding: 14px 40px; }
.btn.sm { font-size: 11px; padding: 8px 12px; letter-spacing: .08em; }
.btn.ghost { background: transparent; box-shadow: none; }
.link-btn { background: none; border: 0; color: var(--cyan); font-family: var(--f-display); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; padding: 4px; }
.link-btn:hover { color: #fff; }

/* ---------- formularios ---------- */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-family: var(--f-display); }
.input, select.input, textarea.input {
  width: 100%; padding: 12px 14px; background: rgba(3, 8, 18, .8); border: 1px solid var(--line); border-radius: 8px; outline: none;
}
.input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 211, 238, .18); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: #cfe0f7; }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--cyan); }
.msg { font-size: 14px; padding: 10px 12px; border-radius: 8px; margin: 10px 0; }
.msg.err { background: var(--red-soft); border: 1px solid rgba(255, 42, 77, .4); color: #ffd3da; }
.msg.ok { background: var(--green-soft); border: 1px solid rgba(34, 224, 138, .4); color: #d4ffe9; }
.msg.warn { background: rgba(255, 198, 92, .12); border: 1px solid rgba(255, 198, 92, .45); color: #ffeac2; }

/* ---------- layout ---------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grid { display: grid; gap: 16px; }

/* ---------- login ---------- */
.auth-screen { min-height: calc(100vh - 60px); display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 30px; padding: 30px 0; }
.auth-art { position: relative; }
.auth-art img { width: 100%; max-width: 560px; border-radius: 18px; mask-image: radial-gradient(ellipse 80% 80% at 50% 45%, #000 60%, transparent 100%); -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 45%, #000 60%, transparent 100%); }
.auth-card { max-width: 420px; width: 100%; justify-self: center; }
.auth-card .neon-title { font-size: clamp(30px, 4vw, 44px); text-align: center; margin-bottom: 8px; }
.auth-card .neon-sub { text-align: center; font-size: 15px; margin-bottom: 22px; }
.auth-ent { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 14px; min-height: 40px; }
.auth-ent img { height: 40px; width: auto; }

/* ---------- hero sala de control ---------- */
.hero { display: grid; grid-template-columns: minmax(260px, 1fr) 1.25fr; gap: 20px; align-items: center; padding: 18px 0 6px; }
.hero-art { position: relative; }
.hero-art img { width: 100%; border-radius: 16px; mask-image: linear-gradient(90deg, #000 70%, transparent), linear-gradient(#000 80%, transparent); -webkit-mask-image: linear-gradient(to right, #000 75%, transparent 100%); }
.hero-art .elf { position: absolute; right: -6%; bottom: -4%; width: 46%; border-radius: 12px; -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 55%, transparent 100%); mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 55%, transparent 100%); }
.hero-copy { text-align: center; }
.hero-copy .neon-title { font-size: clamp(34px, 5.4vw, 70px); }
.hero-copy .neon-sub { font-size: clamp(18px, 2.4vw, 30px); margin: 18px 0 14px; }
.hero-meta { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; font-family: var(--f-display); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: #cfe0f7; }
.hero-links { margin-top: 12px; display: flex; justify-content: center; gap: 6px; align-items: center; }
.score-chip { display: inline-grid; text-align: center; padding: 6px 14px; border: 1px solid var(--line); background: var(--cyan-soft); border-radius: 10px; }
.score-chip b { font-family: var(--f-display); font-size: 22px; color: #fff; text-shadow: 0 0 10px var(--cyan); }
.score-chip small { font-size: 10px; letter-spacing: .16em; color: var(--muted); }

/* banda inferior con luces */
.band { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 10px; position: relative; }
.band::before, .band::after { content: ''; position: absolute; top: -2px; width: 120px; height: 3px; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.band::before { left: 0; } .band::after { right: 0; }

/* ---------- tarjetas de retos ---------- */
.challenges { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; padding-bottom: 40px; }
.ch-card { position: relative; display: flex; flex-direction: column; min-height: 210px; padding: 0; overflow: hidden; }
.ch-card .art { position: relative; aspect-ratio: 4 / 3; background: linear-gradient(135deg, #0f2c4a, #08172c); overflow: hidden; }
.ch-card .art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ch-card .art .elf-glyph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 54px; filter: drop-shadow(0 0 12px rgba(34, 211, 238, .6)); }
.ch-card .day { position: absolute; left: 10px; top: 8px; font-family: var(--f-display); font-weight: 900; font-size: 15px; letter-spacing: .06em; color: #fff; text-shadow: 0 0 8px rgba(0,0,0,.9); }
.ch-card .body { padding: 10px 12px 12px; display: grid; gap: 6px; flex: 1; align-content: start; }
.ch-card .elf-name { font-family: var(--f-display); font-size: 10px; letter-spacing: .16em; color: var(--cyan); text-transform: uppercase; }
.ch-card .title { font-weight: 700; font-size: 15px; line-height: 1.2; }
.ch-card .meta { font-size: 12px; color: var(--muted); }
.ch-card .foot { margin-top: auto; display: grid; gap: 8px; }
.ch-card .foot .btn, .ch-card .foot .badge { width: 100%; text-align: center; justify-content: center; white-space: nowrap; }
.ch-card .foot .badge { padding: 6px 8px; }
.ch-card .pts { font-family: var(--f-display); font-size: 12px; }
.ch-card .pts b { color: var(--red); }
.ch-card.state-completed .pts b { color: var(--green); }
.ch-card .lock { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(5, 11, 24, .55); backdrop-filter: grayscale(.7) blur(1.5px); }
.ch-card .lock svg { width: 46px; height: 46px; color: var(--red); filter: drop-shadow(0 0 10px var(--red)); }
.ch-card.state-open, .ch-card.state-in_progress { border-color: var(--cyan); box-shadow: 0 0 22px rgba(34, 211, 238, .28); }
.ch-card.state-completed { border-color: rgba(34, 224, 138, .55); }
.ch-card.locked { opacity: .9; }
.ch-card.locked .title, .ch-card.locked .art img { filter: grayscale(.5) brightness(.75); }
.badge { display: inline-block; font-family: var(--f-display); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; border: 1px solid currentColor; }
.badge.green { color: var(--green); } .badge.red { color: var(--red); } .badge.cyan { color: var(--cyan); } .badge.gold { color: var(--gold); } .badge.muted { color: var(--muted); }

/* ---------- interna del reto ---------- */
.stage { max-width: 900px; margin: 22px auto 60px; }
.stage-head { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; margin-bottom: 14px; }
.stage-head .elf-avatar { width: 64px; height: 64px; border-radius: 12px; border: 1px solid var(--cyan); display: grid; place-items: center; font-size: 34px; background: var(--cyan-soft); overflow: hidden; }
.stage-head .elf-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; transform: scale(1.35); transform-origin: 50% 25%; }
.stage-head h2 { margin: 2px 0 0; font-family: var(--f-display); font-size: clamp(18px, 2.6vw, 26px); }
.steps { display: flex; gap: 6px; margin: 4px 0 14px; }
.steps i { flex: 1; height: 4px; border-radius: 2px; background: rgba(138, 160, 194, .25); }
.steps i.on { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.video-box { position: relative; aspect-ratio: 16 / 9; background: #000; border: 1px solid var(--line); overflow: hidden; }
.video-box video, .video-box iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-ph { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px;
  background: radial-gradient(circle at 50% 40%, rgba(34, 211, 238, .14), transparent 60%), repeating-linear-gradient(0deg, rgba(34,211,238,.05) 0 2px, transparent 2px 4px); }
.video-ph .big { font-size: 48px; }
.q-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.q-prompt { font-size: clamp(17px, 2.2vw, 21px); font-weight: 600; margin: 4px 0 16px; }
.q-media { margin-bottom: 14px; }
.timer { position: relative; width: 64px; height: 64px; flex: none; }
.timer svg { transform: rotate(-90deg); width: 64px; height: 64px; }
.timer circle { fill: none; stroke-width: 6; }
.timer .bg { stroke: rgba(138, 160, 194, .2); }
.timer .fg { stroke: var(--cyan); stroke-linecap: round; transition: stroke-dashoffset .25s linear, stroke .3s; filter: drop-shadow(0 0 4px var(--cyan)); }
.timer.warn .fg { stroke: var(--gold); } .timer.crit .fg { stroke: var(--red); }
.timer span { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--f-display); font-weight: 700; font-size: 18px; }
.options { display: grid; gap: 10px; }
.opt { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); background: rgba(3, 8, 18, .65); cursor: pointer; border-radius: 10px; text-align: left; width: 100%; transition: border-color .12s, background .12s; }
.opt:hover { border-color: var(--cyan); }
.opt .mark { width: 26px; height: 26px; flex: none; border: 1.5px solid var(--cyan); border-radius: 50%; display: grid; place-items: center; font-family: var(--f-display); font-size: 12px; }
.opt.multi .mark { border-radius: 6px; }
.opt.sel { border-color: var(--cyan); background: var(--cyan-soft); }
.opt.sel .mark { background: var(--cyan); color: #001018; }
.opt.right { border-color: var(--green); background: var(--green-soft); }
.opt.right .mark { background: var(--green); border-color: var(--green); color: #00140a; }
.opt.wrong { border-color: var(--red); background: var(--red-soft); }
.opt.wrong .mark { background: var(--red); border-color: var(--red); color: #fff; }
.opt[disabled] { cursor: default; }
.opt .media { width: 100%; margin-top: 8px; }
.feedback { margin-top: 14px; padding: 14px 16px; border-radius: 10px; border: 1px solid; }
.feedback.good { border-color: var(--green); background: var(--green-soft); }
.feedback.bad { border-color: var(--red); background: var(--red-soft); }
.feedback b { font-family: var(--f-display); letter-spacing: .06em; }
.result-score { font-family: var(--f-display); font-size: clamp(44px, 8vw, 76px); font-weight: 900; text-align: center; color: #fff; text-shadow: 0 0 14px var(--cyan), 0 0 40px rgba(34, 211, 238, .5); margin: 4px 0; }
.tips { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
.tips ul { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.tips h4 { margin: 0 0 8px; font-family: var(--f-display); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }

/* ---------- modales ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(2, 6, 14, .78); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px; z-index: 60; }
.modal { width: min(560px, 100%); max-height: 88vh; overflow: auto; }
.modal .x { position: absolute; right: 10px; top: 8px; background: none; border: 0; color: var(--muted); font-size: 24px; cursor: pointer; z-index: 2; }

/* ranking */
.rank-list { display: grid; gap: 6px; }
.rank-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; background: rgba(3, 8, 18, .6); border: 1px solid rgba(34, 211, 238, .12); border-radius: 8px; }
.rank-row.me { border-color: var(--cyan); background: var(--cyan-soft); }
.rank-row .pos { font-family: var(--f-display); font-weight: 900; text-align: center; }
.rank-row:nth-child(1) .pos { color: var(--gold); } .rank-row:nth-child(2) .pos { color: #cbd5e1; } .rank-row:nth-child(3) .pos { color: #e8a26a; }
.rank-row .bar { height: 5px; border-radius: 3px; background: rgba(138,160,194,.2); margin-top: 4px; overflow: hidden; }
.rank-row .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--cyan)); }
.rank-row .pts { font-family: var(--f-display); font-size: 14px; }

/* ---------- dashboards ---------- */
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 20px 0 14px; }
.dash-head .neon-title { font-size: clamp(22px, 3.2vw, 34px); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tab { padding: 9px 16px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-family: var(--f-display); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; border-radius: 8px; }
.tab.on { color: #fff; border-color: var(--cyan); background: var(--cyan-soft); box-shadow: 0 0 14px rgba(34, 211, 238, .25); }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { padding: 14px 16px; }
.kpi .v { font-family: var(--f-display); font-size: 28px; font-weight: 800; color: #fff; text-shadow: 0 0 10px rgba(34, 211, 238, .6); line-height: 1.1; }
.kpi .l { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-family: var(--f-display); margin-top: 4px; }
.kpi .s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.kpi.red .v { text-shadow: 0 0 10px var(--red); } .kpi.green .v { text-shadow: 0 0 10px var(--green); }
.dash-grid { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 14px; }
.dash-grid .span2 { grid-column: span 2; } .dash-grid .span3 { grid-column: 1 / -1; }
.donut { display: grid; place-items: center; position: relative; }
.donut svg { width: 170px; height: 170px; transform: rotate(-90deg); }
.donut .lbl { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.donut .lbl b { font-family: var(--f-display); font-size: 30px; }
.donut .lbl small { color: var(--muted); font-size: 12px; }
.bars { display: grid; grid-template-columns: repeat(9, 1fr); gap: 8px; align-items: end; height: 170px; padding-top: 10px; }
.bars .b { display: grid; grid-template-rows: auto 1fr auto; height: 100%; text-align: center; gap: 4px; }
.bars .b .col { align-self: end; border-radius: 4px 4px 0 0; min-height: 3px; background: linear-gradient(180deg, var(--green), rgba(34, 224, 138, .35)); box-shadow: 0 0 12px rgba(34, 224, 138, .35); }
.bars .b.future .col { background: repeating-linear-gradient(45deg, rgba(138,160,194,.25) 0 4px, transparent 4px 8px); box-shadow: none; }
.bars .b small { font-size: 10px; color: var(--muted); }
.bars .b .n { font-family: var(--f-display); font-size: 11px; }
.funnel { display: grid; gap: 8px; }
.funnel .f { display: grid; grid-template-columns: 120px 1fr 60px; gap: 10px; align-items: center; font-size: 13px; }
.funnel .track { height: 14px; background: rgba(138, 160, 194, .15); border-radius: 7px; overflow: hidden; }
.funnel .track i { display: block; height: 100%; border-radius: 7px; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 10px; max-height: 70vh; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th { position: sticky; top: 0; background: var(--panel-solid); text-align: left; font-family: var(--f-display); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 10px; border-bottom: 1px solid var(--line); white-space: nowrap; z-index: 1; }
table.t td { padding: 9px 10px; border-bottom: 1px solid rgba(34, 211, 238, .08); vertical-align: middle; }
table.t tr:hover td { background: rgba(34, 211, 238, .04); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--muted); }
.dot.on { background: var(--green); box-shadow: 0 0 8px var(--green); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.toolbar .input { max-width: 260px; }
.demo-bar { background: linear-gradient(90deg, rgba(255, 198, 92, .16), rgba(255, 198, 92, .05)); border-bottom: 1px solid rgba(255, 198, 92, .4); color: #ffeac2; font-size: 13px; padding: 7px 16px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: center; }
.demo-bar select { background: #1a1408; border: 1px solid rgba(255, 198, 92, .5); border-radius: 6px; padding: 3px 6px; color: #ffeac2; }
.demo-bar button { background: none; border: 1px solid rgba(255, 198, 92, .5); color: #ffeac2; border-radius: 6px; padding: 3px 8px; cursor: pointer; font-size: 12px; }

/* toasts */
#nh-toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 90; width: min(460px, 92vw); }
.nh-toast { padding: 12px 16px; border-radius: 10px; background: #0c182e; border: 1px solid var(--cyan); box-shadow: 0 10px 30px rgba(0,0,0,.5); font-size: 14px; transition: opacity .35s, transform .35s; }
.nh-toast.err { border-color: var(--red); } .nh-toast.ok { border-color: var(--green); }
.nh-toast.out { opacity: 0; transform: translateY(8px); }
.spinner { width: 34px; height: 34px; border: 3px solid rgba(34,211,238,.2); border-top-color: var(--cyan); border-radius: 50%; animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg) } }
footer.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 20px; border-top: 1px solid rgba(34,211,238,.1); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .auth-screen { grid-template-columns: 1fr; padding-top: 10px; }
  .auth-art { max-width: 340px; justify-self: center; order: -1; }
  .hero { grid-template-columns: 1fr; }
  .hero-art { max-width: 380px; justify-self: center; }
  .dash-grid { grid-template-columns: 1fr; }
  .dash-grid .span2 { grid-column: auto; }
  .tips { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 14px; }
  .topbar { padding: 10px 14px; gap: 10px; }
  .topbar .sponsor { display: none; }
  .topbar .ent-name { font-size: 11px; max-width: 30vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .challenges { grid-template-columns: 1fr 1fr; gap: 10px; }
  .ch-card { min-height: 190px; }
  .ch-card .title { font-size: 13px; }
  .bars { gap: 4px; }
  .funnel .f { grid-template-columns: 90px 1fr 46px; }
  .btn.big { font-size: 17px; padding: 12px 28px; }
}
@media (prefers-reduced-motion: reduce) { .lights span, .spinner { animation: none; } }
