/* =====================================================================
   Mi Ruta Financiera 2027 · Grupo Azka — Hoja de estilos
   Mobile-first. Paleta: azul corporativo, turquesa, arena y blanco.
   ===================================================================== */
:root {
  --azul: #024176;
  --azul-900: #01294b;
  --azul-700: #0a538f;
  --azul-100: #e4eef7;
  --turquesa: #12a5a0;
  --turquesa-600: #0c8783;
  --turquesa-100: #dcf3f1;
  --arena: #e9dcc3;
  --arena-50: #f8f3ea;
  --arena-200: #efe5d3;
  --tinta: #10233a;
  --gris: #5b6b7d;
  --gris-300: #c9d1da;
  --blanco: #ffffff;
  --rojo: #c2410c;
  --rojo-100: #fdeee6;
  --ambar: #b7791f;
  --ambar-100: #fdf3dd;
  --radio: 16px;
  --radio-sm: 10px;
  --sombra: 0 1px 2px rgba(1, 41, 75, .06), 0 8px 24px rgba(1, 41, 75, .08);
  --sombra-lg: 0 12px 40px rgba(1, 41, 75, .16);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--tinta); background: var(--arena-50);
  font-size: 16px; line-height: 1.5; min-height: 100vh; -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.015em; color: var(--azul-900); }
h1 { font-size: clamp(1.7rem, 5vw, 2.5rem); font-weight: 800; }
h2 { font-size: 1.35rem; font-weight: 750; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--azul-700); }
img, svg { display: block; }
.muted { color: var(--gris); }
.small { font-size: .875rem; }
.center { text-align: center; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Estructura ---------- */
.page { width: 100%; max-width: 1080px; margin: 0 auto; padding: 20px 16px 96px; }
.narrow { max-width: 480px; }
.center-page { min-height: 70vh; display: grid; place-items: center; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--arena-200);
}
.topbar .spacer { flex: 1; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--azul-900); }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--azul); display: grid; place-items: center; color: #fff; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text b { font-size: .95rem; font-weight: 800; letter-spacing: -.01em; }
.brand-text span { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gris); }

/* ---------- Componentes ---------- */
.card { background: var(--blanco); border-radius: var(--radio); box-shadow: var(--sombra); padding: 22px; }
.card + .card { margin-top: 16px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px;
  padding: 0 20px; border-radius: 999px; border: 0; font: inherit; font-weight: 650; font-size: 1rem;
  text-decoration: none; cursor: pointer; transition: transform .12s, background .2s, box-shadow .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--azul); color: #fff; box-shadow: 0 6px 16px rgba(2, 65, 118, .25); }
.btn-primary:hover:not(:disabled) { background: var(--azul-700); }
.btn-accent { background: var(--turquesa); color: #fff; box-shadow: 0 6px 16px rgba(18, 165, 160, .28); }
.btn-accent:hover:not(:disabled) { background: var(--turquesa-600); }
.btn-ghost { background: transparent; color: var(--azul); border: 1.5px solid var(--gris-300); }
.btn-ghost:hover:not(:disabled) { border-color: var(--azul); }
.btn-danger { background: var(--rojo-100); color: var(--rojo); }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: .9rem; }
.btn-block { width: 100%; }
.icon-btn { background: none; border: 0; padding: 8px; border-radius: 10px; color: var(--azul); cursor: pointer; display: inline-flex; }
.icon-btn:hover { background: var(--azul-100); }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 650; white-space: nowrap; }
.chip-ok { background: var(--turquesa-100); color: var(--turquesa-600); }
.chip-info { background: var(--azul-100); color: var(--azul); }
.chip-warn { background: var(--ambar-100); color: var(--ambar); }
.chip-off { background: #eef0f3; color: var(--gris); }
.chip-err { background: var(--rojo-100); color: var(--rojo); }

/* ---------- Formularios ---------- */
.field { display: block; margin-bottom: 18px; }
.field > label, .field > .label { display: block; font-weight: 650; margin-bottom: 6px; font-size: .95rem; }
.field .help { display: block; color: var(--gris); font-size: .85rem; margin: -2px 0 8px; }
.req { color: var(--turquesa-600); }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=url],
input[type=date], input[type=month], input[type=datetime-local], select, textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; border: 1.5px solid var(--gris-300); border-radius: var(--radio-sm);
  font: inherit; font-size: 16px; /* evita el zoom en iOS */ color: var(--tinta); background: #fff; transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--azul); box-shadow: 0 0 0 4px var(--azul-100); }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--rojo); }
.field .error-text { color: var(--rojo); font-size: .85rem; margin-top: 6px; display: none; }
.field.invalid .error-text { display: block; }
.input-prefix { position: relative; }
.input-prefix > span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--gris); font-weight: 600; }
.input-prefix > input { padding-left: 34px; }
.input-suffix { position: relative; }
.input-suffix > span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--gris); font-weight: 600; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--azul); flex: none; }
.options { display: grid; gap: 10px; }
.option {
  display: flex; align-items: center; gap: 12px; padding: 14px; border: 1.5px solid var(--gris-300);
  border-radius: var(--radio-sm); cursor: pointer; background: #fff; transition: border-color .15s, background .15s;
}
.option input { width: 20px; height: 20px; accent-color: var(--azul); flex: none; margin: 0; }
.option:has(input:checked) { border-color: var(--azul); background: var(--azul-100); }
.scale { display: grid; grid-template-columns: repeat(auto-fit, minmax(44px, 1fr)); gap: 8px; }
.scale label { position: relative; }
.scale input { position: absolute; opacity: 0; }
.scale span {
  display: grid; place-items: center; height: 48px; border-radius: var(--radio-sm); border: 1.5px solid var(--gris-300);
  font-weight: 700; cursor: pointer; background: #fff;
}
.scale input:checked + span { background: var(--azul); color: #fff; border-color: var(--azul); }
.scale input:focus-visible + span { box-shadow: 0 0 0 4px var(--azul-100); }
.scale-labels { display: flex; justify-content: space-between; font-size: .8rem; color: var(--gris); margin-top: 6px; }
.repeater-item { border: 1.5px dashed var(--gris-300); border-radius: var(--radio-sm); padding: 14px; margin-bottom: 12px; background: var(--arena-50); }
.repeater-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-weight: 700; color: var(--azul); }
.info-block { background: var(--azul-100); border-radius: var(--radio-sm); padding: 14px; margin-bottom: 18px; color: var(--azul-900); }
.form-msg { padding: 12px 14px; border-radius: var(--radio-sm); margin-bottom: 16px; font-size: .92rem; }
.form-msg.error { background: var(--rojo-100); color: var(--rojo); }
.form-msg.ok { background: var(--turquesa-100); color: var(--turquesa-600); }

/* ---------- Avisos ---------- */
.config-warning { background: var(--ambar); color: #fff; padding: 10px 16px; font-size: .9rem; text-align: center; }
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radio-sm); margin-bottom: 16px; font-size: .93rem; }
.banner-warn { background: var(--ambar-100); color: #6b4a12; }
.banner-info { background: var(--azul-100); color: var(--azul-900); }
#toasts { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; width: min(92vw, 420px); }
.toast { padding: 12px 16px; border-radius: 12px; background: var(--azul-900); color: #fff; box-shadow: var(--sombra-lg); font-size: .93rem; animation: up .25s ease; }
.toast-error { background: var(--rojo); }
.toast-ok { background: var(--turquesa-600); }
.toast.out { opacity: 0; transform: translateY(8px); transition: .3s; }
@keyframes up { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Inicio ---------- */
.hero { background: var(--azul); color: #fff; position: relative; overflow: hidden; }
.hero-inner { max-width: 1080px; margin: 0 auto; padding: 36px 20px 56px; position: relative; z-index: 1; display: grid; gap: 28px; }
.hero h1 { color: #fff; font-size: clamp(2rem, 8vw, 3.4rem); }
.hero h1 em { font-style: normal; color: #7fe0da; }
.hero p.lead { font-size: 1.1rem; color: #d6e6f4; max-width: 34em; }
.eyebrow { display: inline-block; font-size: .75rem; letter-spacing: .18em; text-transform: uppercase; font-weight: 700; color: var(--arena); margin-bottom: 14px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.hero .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .45); }
.hero-art { position: absolute; inset: 0; opacity: .5; pointer-events: none; }
.hero-art path { fill: none; stroke: #7fe0da; stroke-width: 2.5; stroke-dasharray: 2 12; stroke-linecap: round; }
.steps-strip { display: grid; gap: 12px; margin-top: -28px; position: relative; z-index: 2; }
.step-pill { display: flex; align-items: center; gap: 14px; background: #fff; border-radius: var(--radio); padding: 14px 16px; box-shadow: var(--sombra); }
.step-pill .num { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--azul-100); color: var(--azul); flex: none; }
.step-pill b { display: block; color: var(--azul-900); }
.step-pill span { font-size: .87rem; color: var(--gris); }
.join-card { border: 2px solid var(--turquesa); }
@media (min-width: 860px) {
  .hero-inner { grid-template-columns: 1.2fr .8fr; align-items: center; padding: 64px 20px 88px; }
  .steps-strip { grid-template-columns: repeat(3, 1fr); }
  .step-pill { flex-direction: column; align-items: flex-start; }
}

/* ---------- Autenticación ---------- */
.auth-wrap { min-height: calc(100vh - 56px); display: grid; place-items: start center; padding: 28px 16px 60px; }
.auth-card { width: 100%; max-width: 440px; }
.auth-card h1 { font-size: 1.7rem; }
.auth-switch { text-align: center; margin-top: 18px; font-size: .95rem; }
.session-badge { display: flex; gap: 12px; align-items: center; background: var(--turquesa-100); color: var(--turquesa-600); border-radius: var(--radio-sm); padding: 12px 14px; margin-bottom: 18px; font-size: .92rem; }

/* ---------- Mapa ---------- */
.journey-head { display: grid; gap: 14px; margin-bottom: 8px; }
.journey-head h1 { font-size: 1.6rem; margin: 0; }
.progress { height: 10px; background: var(--arena-200); border-radius: 999px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--turquesa), #3cc7c1); border-radius: inherit; transition: width .6s ease; }
.progress-label { display: flex; justify-content: space-between; font-size: .87rem; color: var(--gris); margin-bottom: 6px; }
.map-host { margin-top: 16px; }
.rmap {
  position: relative; width: 100%; border-radius: 28px; overflow: hidden;
  background:
    radial-gradient(ellipse at 15% 20%, rgba(255,255,255,.55), transparent 45%),
    radial-gradient(ellipse at 85% 75%, rgba(255,255,255,.45), transparent 40%),
    linear-gradient(160deg, #efe3c8, #e3d2ae);
  box-shadow: inset 0 0 0 2px rgba(120, 90, 40, .12), inset 0 0 60px rgba(120, 90, 40, .18);
}
.rmap::before { content: ""; position: absolute; inset: 10px; border: 2px dashed rgba(120, 90, 40, .22); border-radius: 22px; pointer-events: none; }
.rmap-svg { position: absolute; inset: 0; }
.terrain .contour { fill: none; stroke: rgba(120, 90, 40, .16); stroke-width: 1.4; }
.terrain .lake { fill: #bfe3e0; stroke: #9fd0cc; stroke-width: 2; }
.terrain .mount { fill: #cdb68b; stroke: #b39a6b; stroke-width: 1.5; }
.terrain .snow { fill: #fffaf0; }
.terrain .tree { fill: #8db89a; stroke: #6f9d7e; stroke-width: 1.5; }
.terrain .trunk { fill: #9a7b52; }
.road-edge { fill: none; stroke: rgba(90, 60, 20, .16); stroke-width: 26; stroke-linecap: round; }
.road-base { fill: none; stroke: #fbf6ec; stroke-width: 20; stroke-linecap: round; }
.road-dash { fill: none; stroke: #c9b48a; stroke-width: 3; stroke-dasharray: 3 12; stroke-linecap: round; }
.road-done { fill: none; stroke: var(--turquesa); stroke-width: 8; stroke-linecap: round; }
.rmap-compass { position: absolute; right: 22px; top: 22px; color: rgba(90, 60, 20, .4); }
.rmap.tall .rmap-compass { right: 18px; top: 18px; }

.rm-station { position: absolute; width: 2px; height: 2px; margin: -1px 0 0 -1px; text-decoration: none; color: inherit; z-index: 2; }
.rm-marker {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -50%);
  width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; color: var(--gris); border: 4px solid #fff; box-shadow: 0 4px 14px rgba(60, 40, 10, .22);
}
.rm-badge { position: absolute; top: -7px; right: -7px; width: 24px; height: 24px; border-radius: 50%; font-size: .75rem; font-weight: 800; display: grid; place-items: center; background: var(--gris-300); color: #fff; border: 2px solid #fff; }
.rm-label {
  position: absolute; display: flex; flex-direction: column; gap: 1px; width: max-content; max-width: 210px;
  background: rgba(255, 255, 255, .95); border-radius: 14px; padding: 9px 12px; box-shadow: 0 4px 14px rgba(60, 40, 10, .14);
}
.rm-label b { font-size: .98rem; line-height: 1.2; color: var(--azul-900); }
.rm-kicker { font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--turquesa-600); }
.rm-state { font-size: .78rem; color: var(--gris); }
.rm-state.st-done { color: var(--turquesa-600); font-weight: 700; }
.rm-state.st-available, .rm-state.st-progress { color: var(--azul); font-weight: 700; }
.rm-stat { margin-top: 4px; font-size: .9rem; font-weight: 800; color: var(--azul); }
.side-right .rm-label { left: 42px; top: 0; transform: translateY(-50%); }
.side-left .rm-label { right: 42px; top: 0; transform: translateY(-50%); text-align: right; align-items: flex-end; }
.side-below .rm-label { left: 0; top: 44px; transform: translateX(-50%); text-align: center; align-items: center; }
.side-above .rm-label { left: 0; bottom: 44px; transform: translateX(-50%); text-align: center; align-items: center; }

/* Estados */
.rm-station.locked .rm-marker { background: #f1ece2; }
.rm-station.locked .rm-label { opacity: .82; }
.rm-station.available .rm-marker, .rm-station.progress .rm-marker { background: var(--azul); color: #fff; animation: pulse 2s infinite; }
.rm-station.available .rm-badge, .rm-station.progress .rm-badge { background: var(--turquesa); }
.rm-station.done .rm-marker { background: var(--turquesa); color: #fff; }
.rm-station.done .rm-badge { background: var(--azul); }
.rm-station:not(.locked) { cursor: pointer; }
.rm-station:focus-visible .rm-marker { outline: 3px solid var(--azul); outline-offset: 4px; }

/* Punto de partida: Usted está aquí */
.k-start .rm-marker { width: 74px; height: 74px; border-radius: 50% 50% 50% 6px; transform: translate(-50%, -85%) rotate(-45deg); }
.k-start .rm-marker svg { transform: rotate(45deg); }
.k-start.locked .rm-marker { background: #fff; color: var(--azul); }
.rm-here {
  position: absolute; left: 0; top: -104px; transform: translateX(-50%); white-space: nowrap;
  background: #c2410c; color: #fff; font-size: .74rem; font-weight: 800; letter-spacing: .08em;
  padding: 5px 11px; border-radius: 999px; box-shadow: 0 4px 12px rgba(194, 65, 12, .35);
}
.rm-here::after { content: ""; position: absolute; left: 50%; bottom: -5px; transform: translateX(-50%); border: 6px solid transparent; border-bottom: 0; border-top-color: #c2410c; }
.k-start.side-right .rm-label, .k-start.side-left .rm-label { top: -26px; }
.k-start.side-below .rm-label { top: 18px; }

/* Destino: la meta */
.k-destination .rm-marker { width: 84px; height: 84px; background: var(--arena-50); color: var(--azul); border: 5px solid var(--azul); }
.k-destination.done .rm-marker { background: var(--azul); color: #fff; }
.k-destination.available .rm-marker, .k-destination.progress .rm-marker { background: var(--azul); color: #fff; }
.rm-goal {
  position: absolute; left: 0; top: -70px; transform: translateX(-50%); white-space: nowrap;
  background: var(--azul); color: #fff; font-size: .8rem; font-weight: 800; letter-spacing: .16em; padding: 4px 14px; border-radius: 6px;
}
.k-destination.side-below .rm-label { top: 54px; }
.k-destination .rm-label { border: 2px solid var(--azul); }
.rmap.wide .k-destination.side-below .rm-label { top: 52px; }

@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(2, 65, 118, .45); } 70% { box-shadow: 0 0 0 16px rgba(2, 65, 118, 0); } 100% { box-shadow: 0 0 0 0 rgba(2, 65, 118, 0); } }
.k-start.available .rm-marker, .k-start.progress .rm-marker { animation: none; box-shadow: 0 6px 18px rgba(2, 65, 118, .4); }
.map-legend { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--turquesa); margin-right: 6px; animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.arrived { margin-top: 18px; text-align: center; background: var(--azul); color: #fff; }
.arrived h2 { color: #fff; }

/* Vista para proyectar */
.proj-body { background: #0f2a44; color: #fff; min-height: 100vh; }
.proj { padding: 22px 28px 28px; display: grid; gap: 18px; }
.proj-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.proj-head h1 { color: #fff; margin: 0; font-size: clamp(1.4rem, 2.6vw, 2.2rem); }
.proj-join { display: flex; align-items: center; gap: 18px; background: rgba(255,255,255,.08); border-radius: 16px; padding: 10px 18px; }
.proj-join code { font-size: clamp(1.6rem, 3vw, 2.6rem); font-weight: 800; letter-spacing: .2em; color: #7fe0da; }
.proj-join span { font-size: .95rem; color: #cfe0ee; }
.proj-grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 1100px) { .proj-grid { grid-template-columns: 1fr 360px; } }
.proj-side { display: grid; gap: 14px; align-content: start; }
.proj-card { background: rgba(255,255,255,.08); border-radius: 16px; padding: 16px 18px; }
.proj-card h2 { color: #fff; font-size: 1.05rem; margin-bottom: 10px; }
.proj-kpi { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 0; color: #cfe0ee; }
.proj-kpi b { font-size: 1.8rem; color: #fff; font-variant-numeric: tabular-nums; }
.poll-row { margin-bottom: 10px; }
.poll-row .t { display: flex; justify-content: space-between; font-size: .92rem; color: #e5eef6; margin-bottom: 4px; gap: 10px; }
.poll-bar { height: 12px; border-radius: 999px; background: rgba(255,255,255,.12); overflow: hidden; }
.poll-bar i { display: block; height: 100%; background: #7fe0da; border-radius: inherit; transition: width .6s; }
.poll-q { font-weight: 700; color: #fff; margin: 12px 0 8px; }
.proj-toolbar { display: flex; gap: 8px; }
.proj-body .btn-ghost { color: #fff; border-color: rgba(255,255,255,.35); }

/* ---------- Estación ---------- */
.station-hero { background: var(--azul); color: #fff; border-radius: 0 0 28px 28px; padding: 18px 18px 26px; margin: -20px -16px 18px; }
.station-hero h1 { color: #fff; font-size: 1.6rem; margin: 6px 0 4px; }
.station-hero p { color: #d6e6f4; margin: 0; }
.station-hero .kicker { display: flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #7fe0da; }
.section-steps { display: flex; gap: 6px; margin: 4px 0 16px; }
.section-steps i { flex: 1; height: 6px; border-radius: 999px; background: var(--arena-200); }
.section-steps i.on { background: var(--turquesa); }
.section-steps i.cur { background: var(--azul); }
.save-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px);
  border-top: 1px solid var(--arena-200); padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
}
.save-bar-inner { max-width: 720px; margin: 0 auto; display: flex; align-items: center; gap: 10px; }
.save-state { font-size: .82rem; color: var(--gris); display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1; }
.save-state .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gris-300); flex: none; }
.save-state.saved .dot { background: var(--turquesa); }
.save-state.saving .dot { background: var(--ambar); animation: blink 1s infinite; }
.save-state.error .dot { background: var(--rojo); }
.empty-state { text-align: center; padding: 36px 20px; }
.empty-state .art { width: 84px; height: 84px; border-radius: 24px; display: grid; place-items: center; margin: 0 auto 16px; background: var(--azul-100); color: var(--azul); }
.station-body { max-width: 720px; margin: 0 auto; }
.overlay { position: fixed; inset: 0; background: rgba(1, 41, 75, .55); display: grid; place-items: center; z-index: 60; padding: 16px; }

/* ---------- Administración ---------- */
.admin-body { background: #f3f5f8; }
.admin-grid { display: grid; gap: 16px; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.kpi { background: #fff; border-radius: var(--radio); padding: 16px; box-shadow: var(--sombra); }
.kpi small { display: block; color: var(--gris); font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.kpi b { font-size: 1.9rem; color: var(--azul-900); font-variant-numeric: tabular-nums; }
.kpi span { color: var(--gris); font-size: .9rem; }
@media (min-width: 860px) { .kpis { grid-template-columns: repeat(4, 1fr); } .admin-cols { display: grid; grid-template-columns: 1.15fr .85fr; gap: 16px; align-items: start; } }
.session-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; justify-content: space-between; }
.session-head h1 { margin: 0; font-size: 1.5rem; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.code-box { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--azul-100); border-radius: var(--radio-sm); padding: 10px 14px; }
.code-box code { font-size: 1.35rem; font-weight: 800; letter-spacing: .18em; color: var(--azul); }
.st-row { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid #edf0f4; }
.st-row:last-child { border-bottom: 0; }
.st-num { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; background: #eef0f3; color: var(--gris); }
.st-row.on .st-num { background: var(--turquesa); color: #fff; }
.bar2 { height: 8px; border-radius: 999px; background: #edf0f4; overflow: hidden; display: flex; margin-top: 6px; }
.bar2 i { display: block; height: 100%; }
.bar2 .c { background: var(--turquesa); }
.bar2 .p { background: #8fd3cf; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: .85rem; font-weight: 650; }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 50px; height: 30px; border-radius: 999px; background: var(--gris-300); position: relative; transition: background .2s; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.switch input:checked + .track { background: var(--turquesa); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 4px var(--azul-100); }
.switch input:disabled + .track { opacity: .5; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--gris); font-weight: 700; padding: 10px 8px; border-bottom: 2px solid #edf0f4; white-space: nowrap; }
table.data td { padding: 10px 8px; border-bottom: 1px solid #edf0f4; vertical-align: middle; }
table.data tr:hover td { background: #fafbfc; }
.dots { display: flex; gap: 4px; }
.dots i { width: 14px; height: 14px; border-radius: 4px; background: #e6e9ee; }
.dots i.c { background: var(--turquesa); }
.dots i.p { background: #8fd3cf; }
.session-list { display: grid; gap: 12px; }
.session-item { display: grid; gap: 6px; text-decoration: none; color: inherit; background: #fff; border-radius: var(--radio); padding: 16px 18px; box-shadow: var(--sombra); border-left: 5px solid var(--gris-300); }
.session-item.active { border-left-color: var(--turquesa); }
.session-item.paused { border-left-color: var(--ambar); }
.session-item.scheduled { border-left-color: var(--azul); }
.session-item:hover { box-shadow: var(--sombra-lg); }
.session-item .row { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.log { list-style: none; margin: 0; padding: 0; font-size: .86rem; }
.log li { padding: 8px 0; border-bottom: 1px solid #edf0f4; display: flex; justify-content: space-between; gap: 10px; }
dialog { border: 0; border-radius: var(--radio); padding: 0; width: min(94vw, 560px); box-shadow: var(--sombra-lg); }
dialog::backdrop { background: rgba(1, 41, 75, .5); }
dialog .dlg-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px 0; }
dialog .dlg-body { padding: 16px 20px 20px; max-height: 70vh; overflow: auto; }
dialog .dlg-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 0 20px 20px; }
.grid-2 { display: grid; gap: 0 14px; }
@media (min-width: 560px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.answers dt { font-weight: 650; color: var(--azul-900); margin-top: 10px; font-size: .9rem; }
.answers dd { margin: 2px 0 0; color: var(--tinta); white-space: pre-wrap; }

/* Pie */
.foot { text-align: center; font-size: .8rem; color: var(--gris); padding: 24px 16px 40px; }
.foot a { color: inherit; }

/* Página de política */
.doc h2 { margin-top: 1.6em; }
.doc li { margin-bottom: .4em; }
.draft-note { background: var(--ambar-100); color: #6b4a12; border-radius: var(--radio-sm); padding: 12px 14px; font-size: .9rem; margin-bottom: 18px; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- Cálculos, semáforo, test y recursos ---------- */
.calc-box { display: grid; gap: 2px; background: var(--azul-100); border-radius: var(--radio-sm); padding: 14px 16px; margin-bottom: 18px; border-left: 5px solid var(--azul); }
.calc-label { font-size: .85rem; font-weight: 700; color: var(--azul); }
.calc-value { font-size: 1.7rem; color: var(--azul-900); font-variant-numeric: tabular-nums; }
.calc-help { font-size: .82rem; color: var(--gris); }
.calc-box.neg { background: var(--rojo-100); border-left-color: var(--rojo); }
.calc-box.neg .calc-value { color: var(--rojo); }
.zone-card { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; border: 2px solid var(--arena-200); border-radius: var(--radio); padding: 16px; margin-bottom: 18px; background: #fff; }
.zone-card > div { flex: 1; min-width: 180px; }
.zone-card .zone-dot { width: 46px; height: 46px; box-shadow: inset 0 -4px 0 rgba(0,0,0,.12); }
.zone-card b { display: block; font-size: 1.25rem; color: var(--azul-900); }
.zone-kicker { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--gris); }
.zone-msg { margin: 4px 0 0; }
.zone-note { flex-basis: 100%; margin: 0; font-size: .82rem; color: var(--gris); }
.zone-card.empty b { color: var(--gris); font-size: 1rem; }
.zone-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; flex: none; background: var(--gris-300); }
.zone-chip { display: inline-flex; align-items: center; gap: 8px; background: #fff; border-radius: 999px; padding: 5px 12px 5px 8px; box-shadow: var(--sombra); font-size: .9rem; width: fit-content; }
.zone-bars { display: flex; flex-wrap: wrap; gap: 10px; }
.quiz-feedback { margin-top: 10px; border-radius: var(--radio-sm); padding: 0; }
.quiz-feedback.ok, .quiz-feedback.no { padding: 12px 14px; }
.quiz-feedback.ok { background: var(--turquesa-100); color: var(--turquesa-600); }
.quiz-feedback.no { background: var(--ambar-100); color: #6b4a12; }
.quiz-feedback p { margin: 4px 0 0; color: var(--tinta); }
.option.is-correct { border-color: var(--turquesa); background: var(--turquesa-100); }
.option.is-wrong { border-color: var(--ambar); background: var(--ambar-100); }
.resource-card { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; border: 1.5px solid var(--gris-300); border-radius: var(--radio); padding: 16px; margin-bottom: 18px; background: #fff; }
.resource-qr { display: grid; justify-items: center; gap: 4px; color: var(--gris); }
.proj-qr svg { border-radius: 8px; }

/* ---------- Editor de estaciones ---------- */
.ed-grid { display: grid; gap: 16px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 1100px) { .ed-grid { grid-template-columns: 300px minmax(0, 1fr) 400px; } .ed-preview-col { position: sticky; top: 70px; } }
.ed-col h2 { font-size: 1.1rem; }
.ed-tree { display: grid; gap: 6px; }
.ed-item { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; text-align: left; background: #f6f8fa; border: 1.5px solid transparent; border-radius: 10px; padding: 9px 11px; font: inherit; cursor: pointer; color: var(--tinta); }
.ed-item span:first-child { display: grid; min-width: 0; }
.ed-item b { font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-item small { color: var(--gris); font-size: .76rem; }
.ed-item:hover { border-color: var(--gris-300); }
.ed-item.sel { border-color: var(--azul); background: var(--azul-100); }
.ed-fields { display: grid; gap: 5px; margin-left: 14px; padding-left: 10px; border-left: 2px solid #e6e9ee; }
.ed-fields .ed-item { background: #fff; border-color: #edf0f4; }
.ed-fields .ed-item.sel { border-color: var(--azul); background: var(--azul-100); }
.ed-add { min-height: 40px; font-size: .88rem; padding: 6px 10px; color: var(--azul); border-style: dashed; }
.ed-tag { display: inline-block; font-size: .68rem; font-weight: 700; background: var(--turquesa-100); color: var(--turquesa-600); border-radius: 999px; padding: 1px 7px; margin-left: 3px; white-space: nowrap; }
.ed-opt { display: grid; grid-template-columns: auto 1fr auto auto; gap: 6px; align-items: center; margin-bottom: 4px; }
.ed-opt input[type=radio] { width: 20px; height: 20px; accent-color: var(--turquesa); }
.ed-opt:not(:has(input[type=radio])) { grid-template-columns: 1fr auto auto; }
.ed-options > div { margin-bottom: 10px; }
.ed-term { display: grid; grid-template-columns: auto 1fr auto; gap: 6px; align-items: center; margin-bottom: 10px; }
.ed-formula { border: 1.5px solid #edf0f4; border-radius: var(--radio); padding: 14px; margin-bottom: 14px; }
.ed-adv summary { cursor: pointer; color: var(--gris); font-size: .9rem; margin-bottom: 10px; }
.ed-phone { border: 10px solid #1b2733; border-radius: 34px; background: var(--arena-50); height: 720px; overflow-y: auto; box-shadow: var(--sombra-lg); }
.ed-phone-screen { padding: 0 12px 16px; }
.ed-phone-head { background: var(--azul); color: #fff; margin: 0 -12px 12px; padding: 18px 16px 18px; border-radius: 0 0 20px 20px; display: grid; gap: 2px; }
.ed-phone-head small { color: #7fe0da; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; font-size: .7rem; }
.ed-phone-head b { font-size: 1.25rem; }
.ed-phone-head span { color: #d6e6f4; font-size: .88rem; }
.ed-phone .card { padding: 16px; }
