/* =========================================================
   VALANTI · Sistema de diseño (hereda tema WordPress "coasing")
   Plan §10. No usar colores fuera de estos tokens.
   ========================================================= */
:root {
  --ink: #0e1116; --ink-2: #1a1f27;
  --text: #454c59; --muted: #5f6875;
  --red: #e2231a; --red-dark: #bb1810;
  --orange: #f58220; --yellow: #ffc400;
  --paper: #ffffff; --bg: #f5f6f8; --line: #e7e9ee;
  --radius: 16px; --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(14,17,22,.06), 0 2px 8px rgba(14,17,22,.05);
  --shadow-md: 0 2px 6px rgba(14,17,22,.07), 0 14px 38px rgba(14,17,22,.13);
  --shadow-red: 0 8px 22px rgba(226,35,26,.32);
  --font: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --ease: cubic-bezier(.2,.7,.2,1);

  /* Valores VALANTI (solo en resultados, nunca en el examen) */
  --v-verdad: #1a1f27; --v-rectitud: #e2231a;
  --v-paz: #ffc400; --v-paz-text: #a07800;
  --v-amor: #f58220; --v-no_violencia: #0f8b8d;

  /* Estados: el error NO usa el rojo de marca */
  --danger: #c0262d; --success: #1f8a4c; --warning: #b35a00;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: var(--font); font-size: 16px; color: var(--text); background: var(--bg); }
h1, h2, h3 { color: var(--ink); margin: 0; }
a { color: var(--red); }
button { font-family: inherit; cursor: pointer; }

/* Firma visual: franja de 4 colores */
.stripe { display: grid; grid-template-columns: repeat(4, 1fr); height: 6px; position: sticky; top: 0; z-index: 20; }
.stripe i:nth-child(1) { background: var(--ink-2); } .stripe i:nth-child(2) { background: var(--red); }
.stripe i:nth-child(3) { background: var(--orange); } .stripe i:nth-child(4) { background: var(--yellow); }

/* Botones y tarjetas */
.btn { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: var(--radius-sm); padding: 12px 20px;
  font-weight: 700; font-size: 15px; text-decoration: none; transition: .2s var(--ease); }
.btn-primary { background: var(--red); color: #fff; box-shadow: var(--shadow-red); }
.btn-primary:hover { background: var(--red-dark); }
.btn-ghost { background: var(--paper); color: var(--ink); border: 1px solid var(--line); }
.btn-block { width: 100%; justify-content: center; }
/* Fila de acciones de un formulario: el botón principal (Guardar) siempre a la derecha. */
.acciones { display: flex; justify-content: flex-end; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.acciones.entre { justify-content: space-between; }
.card { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 24px; }

/* Formularios */
label { display: block; font-weight: 600; color: var(--ink); font-size: 14px; margin: 14px 0 6px; }
input, select, textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); font: inherit; background: #fbfbfc; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--orange); border-color: transparent; }

/* Alertas */
.alert { padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 14px; }
.alert-error { background: #fdecec; color: var(--danger); }
.alert-ok { background: #e6f4ec; color: var(--success); }

/* ===== Layout auth (login / recuperar) ===== */
.auth { background: var(--ink); min-height: calc(100vh - 6px); position: relative; overflow: hidden; display: grid; place-items: center; padding: 40px 16px; }
.auth .blob { position: absolute; border-radius: 50%; filter: blur(10px); opacity: .35; }
.auth .blob.a { width: 420px; height: 420px; background: var(--orange); top: -120px; right: -100px; }
.auth .blob.b { width: 360px; height: 360px; background: var(--red); bottom: -140px; left: -120px; }
.auth-card { position: relative; width: 100%; max-width: 420px; background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow-md); padding: 36px 32px; }
.auth-card .logo { height: 64px; display: block; margin: 0 auto 8px; }
.auth-card .kicker { text-align: center; color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.auth-card h1 { text-align: center; font-size: 24px; margin: 6px 0 20px; }
.auth-foot { text-align: center; margin-top: 18px; font-size: 14px; }

/* ===== Layout app (dashboards) ===== */
.app { display: grid; grid-template-columns: 250px 1fr; min-height: calc(100vh - 6px); }
.side { background: var(--ink-2); color: #b9c0cb; padding: 22px 16px; display: flex; flex-direction: column; gap: 6px; }
.brand { display: flex; align-items: center; gap: 12px; padding: 8px; margin-bottom: 18px; background: rgba(255,255,255,.04); border-radius: var(--radius-sm); }
.brand b { color: #fff; display: block; font-size: 15px; } .brand small { font-size: 12px; }
.logo-emp { width: 44px; height: 44px; border-radius: 10px; flex: none; object-fit: contain; background: #fff; }
.logo-emp.ini { display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--red), var(--orange)); }
.side a { color: #b9c0cb; text-decoration: none; padding: 10px 12px; border-radius: var(--radius-sm); font-weight: 600; font-size: 14px; }
.side a.on, .side a:hover { background: rgba(255,255,255,.07); color: #fff; }
.side a.on { box-shadow: inset 3px 0 0 var(--red); }
.form-salir { margin: 0; display: inline; }
.side-salir { width: 100%; text-align: left; background: none; border: 0; color: #b9c0cb; padding: 10px 12px; border-radius: var(--radius-sm); font-weight: 600; font-size: 14px; }
.side-salir:hover { background: rgba(255,255,255,.07); color: #fff; }
.link-btn { background: none; border: 0; color: var(--red); font-weight: 600; font-size: 14px; text-decoration: underline; padding: 0; }
.side .powered { margin-top: auto; display: flex; align-items: center; gap: 8px; font-size: 12px; color: #8b93a1; padding: 8px; }
.side .powered img { width: 28px; height: 28px; background: #fff; border-radius: 6px; }
.main { padding: 28px 32px 48px; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.top h1 { font-size: 26px; } .top p { margin: 4px 0 0; color: var(--muted); }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.kpi { border-top: 5px solid var(--c); }
.kpi small { color: var(--muted); font-weight: 600; display: block; }
.kpi strong { display: block; font-size: 32px; color: var(--ink); margin: 6px 0 2px; }
.card h3 { font-size: 17px; margin-bottom: 14px; }
@media (max-width: 900px) { .kpis { grid-template-columns: repeat(2, 1fr); } }

/* Rejillas, tablas y piezas comunes */
.grid2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.inline-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.inline-form > div { flex: 1; min-width: 120px; } .inline-form label { margin-top: 0; }
.toolbar { display: flex; gap: 8px; margin-bottom: 16px; } .toolbar input { max-width: 360px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 600; padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 8px; border-bottom: 1px solid var(--line); color: var(--ink); vertical-align: middle; }
.row-link { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; text-decoration: none; }
.row-link .logo-emp { width: 34px; height: 34px; font-size: 13px; }
.row-link:hover span { color: var(--red); }
.pill { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pill.ok { background: #e6f4ec; color: var(--success); } .pill.run { background: #fff1e3; color: var(--warning); }
.pill.pen { background: var(--bg); color: var(--muted); } .pill.bad { background: #fdecec; color: var(--danger); }
.bar { height: 8px; background: var(--line); border-radius: 9px; overflow: hidden; margin: 6px 0 4px; }
.bar i { display: block; height: 100%; background: var(--c, var(--red)); }
.hint { color: var(--muted); display: block; margin-top: 6px; font-size: 13px; }
.empty { color: var(--muted); text-align: center; padding: 20px 0; margin: 0; }
.btn-sm { padding: 8px 12px; font-size: 13px; }
.title-logo { display: flex; align-items: center; gap: 14px; } .title-logo .logo-emp { width: 56px; height: 56px; font-size: 20px; }
.logo-preview { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--bg); border-radius: var(--radius-sm); }
.logo-preview .logo-emp { width: 72px; height: 72px; font-size: 24px; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.check input { width: auto; }
.switch { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); margin: 0 0 8px; cursor: pointer; }
.switch input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--red); flex: none; }
.switch small, .seg-choice small { display: block; color: var(--muted); font-weight: 400; font-size: 13px; }
.seg-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg-choice label { margin: 0; display: flex; gap: 8px; padding: 12px; border: 2px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; }
.seg-choice input { width: auto; accent-color: var(--red); }
.seg-choice label:has(input:checked) { border-color: var(--red); background: #fef4f3; }
.seb { border: 1px dashed var(--line); border-radius: var(--radius-sm); margin-top: 14px; padding: 4px 14px 14px; }
.seb legend { font-weight: 700; color: var(--ink); padding: 0 6px; }
.guia { background: var(--bg); border-radius: var(--radius-sm); padding: 10px 14px; margin: 6px 0 4px; font-size: 13px; }
.guia summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.guia ol { padding-left: 18px; line-height: 1.7; margin: 8px 0 0; }
code { background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: 12px; word-break: break-all; }
.person { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.person:last-child { border: 0; } .person b { color: var(--ink); } .person small { display: block; color: var(--muted); }
.pagination { display: flex; gap: 4px; list-style: none; padding: 0; margin: 16px 0 0; }
.pagination a { display: block; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.pagination .active a { background: var(--red); color: #fff; border-color: var(--red); }
.bars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; height: 180px; align-items: end; }
.bars-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; }
.bars-col i { width: 70%; max-width: 48px; background: var(--red); border-radius: 6px 6px 0 0; }
.bars-col small { color: var(--muted); font-weight: 600; } .bars-n { font-weight: 800; color: var(--ink); font-size: 13px; }
.lock { display: flex; gap: 12px; align-items: flex-start; background: #fff8e1; border: 1px solid #ffe08a; border-radius: var(--radius-sm); padding: 14px; font-size: 14px; }
.lock b { color: var(--ink); }
.link-sm { color: var(--red); font-weight: 700; font-size: 13px; text-decoration: none; }
tr.muted td { opacity: .55; }
tr.row-err td { background: #fff7f7; }
.bulk { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 10px; background: var(--ink-2); color: #fff; border-radius: var(--radius-sm); flex-wrap: wrap; }
.bulk span { margin-right: auto; }
.drop { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 36px 16px;
  border: 2px dashed var(--line); border-radius: var(--radius); background: #fbfbfc; cursor: pointer; margin: 0; font-weight: 400; transition: .2s var(--ease); }
.drop.over, .drop:hover { border-color: var(--orange); background: #fff8f1; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop small { color: var(--muted); } .drop-ico { font-size: 30px; color: var(--orange); } .drop-file { font-weight: 700; color: var(--ink); }
.slider-row { display: grid; grid-template-columns: 140px 1fr 130px; align-items: center; gap: 14px; margin-top: 14px; }
.slider-row label { margin: 0; } .slider-row input { padding: 0; }
.slider-row output small { color: var(--muted); }
.pick-list { max-height: 480px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.pick { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin: 0; border-bottom: 1px solid var(--line); cursor: pointer; font-weight: 400; }
.pick:last-child { border: 0; } .pick:hover { background: var(--bg); }
.pick input { width: auto; accent-color: var(--red); } .pick span:first-of-type { flex: 1; }
.pick b { color: var(--ink); display: block; } .pick small { color: var(--muted); }
.pick.busy { opacity: .6; cursor: not-allowed; }
.sum { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); margin-top: 6px; }
.sum b { font-size: 20px; color: var(--ink); }
.vtag { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px; white-space: nowrap; }
.vtag::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
@media (max-width: 900px) { .grid2, .form-grid, .seg-choice { grid-template-columns: 1fr; } }

/* ===== Layout examen ===== */
.exam-page { background: var(--paper); min-height: 100vh; }
.exam-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 32px; border-bottom: 1px solid var(--line); gap: 16px; }
.exam-foot { position: fixed; bottom: 0; left: 0; right: 0; display: flex; justify-content: center; align-items: center; gap: 8px; padding: 10px;
  font-size: 12px; color: var(--muted); background: var(--paper); border-top: 1px solid var(--line); }
.exam-foot img { height: 22px; }

/* ===== Resultados (Fase 6) ===== */
.filtros { flex-wrap: wrap; align-items: center; } .filtros input, .filtros select { max-width: 200px; }
.date-f { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; color: var(--muted); }
.date-f input { width: auto; padding: 9px 10px; }
th.num, td.num { text-align: center; }
.tval { display: inline-block; min-width: 34px; padding: 3px 6px; border-radius: 6px; font-weight: 800; background: var(--bg); color: var(--ink); }
.tval.alto { background: #e6f4ec; color: var(--success); } .tval.bajo { background: #fdecec; color: var(--danger); }
.ficha-head { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.ficha-head h1 { font-size: 28px; } .ficha-head p { margin: 6px 0 0; color: var(--muted); }
.ficha-meta { display: grid; grid-template-columns: repeat(4, auto); gap: 6px 22px; align-content: start; }
.ficha-meta small { display: block; color: var(--muted); font-size: 12px; } .ficha-meta b { color: var(--ink); }
.hl { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hl-card { border-left: 6px solid var(--c); padding: 16px 20px; }
.hl-card small { color: var(--muted); font-weight: 700; text-transform: uppercase; font-size: 12px; letter-spacing: .05em; }
.hl-card p { margin: 4px 0 0; color: var(--ink); font-weight: 800; font-size: 20px; }
.frase { color: var(--ink); background: var(--paper); border-radius: var(--radius-sm); padding: 12px 16px; margin: 14px 0 16px; box-shadow: var(--shadow-sm); }
.ficha-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 16px; margin-bottom: 16px; }
.radar { display: flex; justify-content: center; } .radar svg { max-width: 100%; height: auto; }
.legend { display: flex; gap: 16px; justify-content: center; font-size: 13px; color: var(--muted); margin-top: 8px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.legend i.dash { background: none; border-top: 2px dashed var(--muted); height: 0; width: 18px; vertical-align: 3px; }
.legend i.ref { background: none; border: 1.5px solid #9aa1ad; }
.val { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.val:last-child { border: 0; }
.val .name { font-weight: 800; color: var(--ink); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.val .name i { width: 12px; height: 12px; border-radius: 3px; background: var(--c); }
.val .t { font-weight: 800; color: var(--ink); font-size: 22px; text-align: right; }
.val .seg { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.val .seg i { height: 8px; border-radius: 2px; background: var(--line); } .val .seg i.f { background: var(--c); }
.val .lvl { font-size: 13px; color: var(--muted); font-weight: 600; grid-column: 1 / -1; }
.val p { grid-column: 1 / -1; margin: 0; font-size: 14px; line-height: 1.5; }
.dist { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--bg); color: var(--muted); }
.dist.lejos { background: #fff1e3; color: var(--warning); }
.nota { font-size: 12px; text-align: center; max-width: 760px; margin: 8px auto 0; }
.dist-row { display: grid; grid-template-columns: 140px 1fr; gap: 12px; align-items: center; margin-bottom: 10px; }
.stack { display: flex; height: 26px; border-radius: 6px; overflow: hidden; background: var(--bg); }
.stack i { display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--ink); font-style: normal; min-width: 0; overflow: hidden; }
.congl-row { display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.congl-row:last-child { border: 0; } .congl-row b { color: var(--ink); } .congl-row small { display: block; color: var(--muted); }
.congl-bar { height: 10px; background: var(--bg); border-radius: 9px; overflow: hidden; } .congl-bar i { display: block; height: 100%; background: var(--red); }
@media (max-width: 900px) { .ficha-grid, .hl { grid-template-columns: 1fr; } .ficha-meta { grid-template-columns: repeat(2, auto); } .congl-row { grid-template-columns: 1fr; } }
@media print { .side, .top .btn, .stripe { display: none !important; } .app { display: block; } .card { box-shadow: none; border: 1px solid var(--line); } }

/* ===== Examen (Fase 5a) ===== */
.exam-wrap { max-width: 960px; margin: 0 auto; padding: 32px 24px 110px; }
.exam-lock { user-select: none; -webkit-user-select: none; }
.steps { padding-left: 20px; line-height: 1.7; } .steps li { margin-bottom: 4px; }
.demo-choices { display: flex; gap: 8px; margin: 10px 0 14px; }
.demo-choices span { border: 2px solid var(--line); border-radius: var(--radius-sm); padding: 8px 14px; font-weight: 800; color: var(--ink); }
.timer { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 22px; color: var(--ink); background: var(--bg); padding: 8px 16px; border-radius: var(--radius-sm); }
.timer.warn { color: var(--warning); background: #fff1e3; } .timer.crit { color: var(--danger); background: #fdecec; }
.save-state { font-size: 13px; color: var(--muted); font-weight: 600; } .save-state.err { color: var(--danger); }
.progress { display: flex; justify-content: space-between; font-weight: 600; color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.progress-bar { height: 6px; background: var(--line); border-radius: 9px; overflow: hidden; margin-bottom: 28px; }
.progress-bar i { display: block; height: 100%; width: 0; background: var(--ink-2); transition: width .4s var(--ease); }
.instr { text-align: center; color: var(--muted); margin: 0 0 24px; font-size: 15px; } .instr b { color: var(--ink); }
.pair { display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; align-items: stretch; }
.phrase { border: 2px solid var(--line); border-radius: var(--radius); padding: 30px 24px; font-size: 21px; font-weight: 700; color: var(--ink);
  display: flex; align-items: center; justify-content: center; text-align: center; min-height: 170px; position: relative; transition: .25s var(--ease); }
.phrase .pts { position: absolute; top: 12px; right: 14px; font-size: 13px; font-weight: 800; color: var(--muted); }
.phrase.w1 { border-color: #c6ccd5; background: #fafbfc; } .phrase.w2 { border-color: var(--ink-2); background: #f3f4f6; }
.phrase.w3 { border-color: var(--ink); background: var(--ink); color: #fff; } .phrase.w3 .pts { color: #c6ccd5; }
.choices { display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.choice { border: 2px solid var(--line); background: var(--paper); border-radius: var(--radius-sm); padding: 12px 18px; font-size: 17px; font-weight: 800; color: var(--ink); min-width: 96px; }
.choice:hover { border-color: var(--ink-2); } .choice.on { background: var(--red); border-color: var(--red); color: #fff; box-shadow: var(--shadow-red); }
.choice:focus-visible, .mapa-b:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.exam-nav { display: flex; justify-content: space-between; margin-top: 32px; }
.exam-nav .btn:disabled { opacity: .4; cursor: not-allowed; }
.mapa { display: grid; grid-template-columns: repeat(15, 1fr); gap: 6px; margin-top: 36px; }
.mapa-b { border: 1px solid var(--line); background: var(--paper); border-radius: 6px; padding: 6px 0; font-size: 12px; font-weight: 700; color: var(--muted); }
.mapa-b.ok { background: var(--ink-2); color: #fff; border-color: var(--ink-2); } .mapa-b.act { outline: 2px solid var(--red); outline-offset: 1px; }
.trans { max-width: 620px; margin: 30px auto; text-align: center; }
.trans .badge { display: inline-block; background: #fff1e3; color: var(--warning); font-weight: 800; padding: 6px 14px; border-radius: 999px; font-size: 13px; margin-bottom: 16px; }
.trans h2 { font-size: 30px; margin-bottom: 12px; } .trans p { font-size: 17px; line-height: 1.6; } .trans .btn { margin-top: 20px; }
.gate { position: fixed; inset: 0; background: rgba(14,17,22,.92); z-index: 60; display: grid; place-items: center; padding: 16px; }
.gate[hidden] { display: none; }
.gate-card { background: var(--paper); border-radius: var(--radius); padding: 32px; max-width: 460px; text-align: center; box-shadow: var(--shadow-md); }
.gate-card h2 { font-size: 22px; margin-bottom: 8px; }
.fin-ico { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 30px; font-weight: 800; margin: 0 auto 14px; }
.fin-ico.ok { background: #e6f4ec; color: var(--success); } .fin-ico.warn { background: #fff1e3; color: var(--warning); }
.toast { position: fixed; top: 20px; left: 50%; transform: translate(-50%, -20px); background: var(--ink); color: #fff; padding: 12px 18px;
  border-radius: var(--radius-sm); box-shadow: var(--shadow-md); font-size: 14px; z-index: 70; opacity: 0; pointer-events: none; transition: .25s var(--ease); max-width: calc(100% - 32px); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 760px) {
  .pair { grid-template-columns: 1fr; } .choices { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .phrase { min-height: 110px; font-size: 18px; } .mapa { grid-template-columns: repeat(10, 1fr); }
}

/* Las columnas de grid no deben estirarse más que la pantalla por su contenido
   (por defecto min-width: auto impide que se encojan). */
.app > *, .grid2 > *, .form-grid > *, .ficha-grid > *, .hl > *, .kpis > *, .res-grid > * { min-width: 0; }
select { max-width: 100%; text-overflow: ellipsis; }
@media (max-width: 900px) { .pill { white-space: normal; } }

/* Barra superior en pantallas angostas: el menú lateral se abre como panel */
.movil { display: none; }
@media (max-width: 900px) {
  .movil { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--ink-2); color: #fff; position: sticky; top: 6px; z-index: 30; }
  .movil .logo-emp { width: 34px; height: 34px; font-size: 13px; }
  .movil b { flex: 1; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .side.abierto { display: flex; position: fixed; inset: 0 auto 0 0; width: min(280px, 85vw); z-index: 40; overflow-y: auto; box-shadow: var(--shadow-md); }
}

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; } .side { display: none; }
  .main { padding: 20px 16px 48px; } .exam-head { padding: 12px 16px; }
}
