:root {
  color-scheme: only light;
  --ink: #142033;
  --navy: #10243f;
  --paper: #f6f1e7;
  --card: #fffdf8;
  --line: #e3d7c4;
  --copper: #c4512c;
  --muted: #3d4654;
  --ok: #145c38;
  --danger: #9f1239;
  --shadow: 0 8px 24px rgba(16, 36, 63, 0.06);
}

/* ---- Siempre modo claro (aunque el teléfono o el navegador estén en modo oscuro) ---- */
html {
  color-scheme: only light;
  background-color: #cbc3b4;
  color: #142033;
}
body { background-color: #d5cec0; color: #142033; }
:where(input, select, textarea) { background-color: #fffdf8; color: #142033; color-scheme: only light; }
:where(button) { background-color: transparent; color: #142033; color-scheme: only light; }
:where(table) { background-color: #fffdf8; color: #142033; }
:where(td, th) { background-color: transparent; color: inherit; }
:where(option) { background-color: #fffdf8; color: #142033; }

* { box-sizing: border-box; }

[hidden] { display: none !important; }


html, body { height: 100%; }

body {
  margin: 0;
  color: var(--ink);
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.35;
  background: radial-gradient(circle at 15% 0%, #e8e0d2 0, #d5cec0 42%, #cbc3b4 100%);
}

button, a, label, input, textarea, summary { touch-action: manipulation; }

button, input, textarea { font: inherit; color: inherit; }

.phone {
  max-width: 480px;
  height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, rgba(196, 81, 44, 0.09), transparent 140px),
    var(--paper);
  box-shadow: 0 0 0 1px rgba(16, 36, 63, 0.08);
}

header {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: calc(12px + env(safe-area-inset-top)) 16px 14px;
  background: var(--navy);
  color: #f6f1e7;
  box-shadow: inset 0 -4px 0 var(--copper);
  flex: none;
}

.brand { min-width: 0; flex: 1; }

.eyebrow {
  margin: 0 0 2px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f0c2b0;
}

h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}

.back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex: none;
  border-radius: 14px;
  border: 1.5px solid rgba(246, 241, 231, 0.35);
  color: #fffdf8;
  text-decoration: none;
  font-size: 24px;
  line-height: 1;
}

.back[hidden] { display: none !important; }

main {
  flex: 1;
  overflow: auto;
  padding: 16px 16px 20px;
}

.view[hidden] { display: none !important; }

.lede { margin: 0 0 8px; font-size: 16px; }

.hint, .note {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.note {
  margin-top: 14px;
  padding: 12px;
  background: #fff8ec;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.flash {
  margin: 0 0 12px;
  padding: 12px;
  border-radius: 14px;
  background: #e7f5ee;
  color: var(--ok);
  font-weight: 700;
}

.flash[hidden] { display: none !important; }

.bands {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin: 14px 0;
}

.band {
  min-height: 78px;
  padding: 8px 2px;
  border: 0;
  border-radius: 14px;
  background: #efe8da;
  color: var(--ink);
  cursor: pointer;
}

.band .n {
  display: block;
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.band .r, .band .l {
  display: block;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
}

.band[data-band="p90"] { background: #e5f4ec; color: #145c38; }
.band[data-band="p80"] { background: #e3f3f5; color: #0f5c66; }
.band[data-band="p60"] { background: #f8f0dc; color: #8a5a08; }
.band[data-band="p45"] { background: #fde8dc; color: #9a3b12; }
.band[data-band="p0"] { background: #f8e4ea; color: #8d1233; }

.band[aria-pressed="true"] { box-shadow: inset 0 0 0 3px var(--navy); }

.list-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 4px 0 10px;
}

.card {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 76px;
  margin-bottom: 8px;
  padding: 12px;
  text-decoration: none;
  color: inherit;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.scorebox, .b-p90, .b-p80, .b-p60, .b-p45, .b-p0 {
  font-variant-numeric: tabular-nums;
}

.scorebox {
  width: 58px;
  height: 58px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-size: 22px;
  font-weight: 800;
}

.card-body { min-width: 0; }

.card-title {
  display: block;
  font-weight: 800;
  font-size: 16.5px;
}

.card-meta {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 14px;
}

.chip {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #efe4cf;
  color: #6a5430;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: 1px;
}

.empty {
  padding: 18px 4px;
  color: var(--muted);
}

.field { margin: 0 0 14px; }

.field label, .field legend, .lbl, .w-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 800;
  font-size: 15px;
}

fieldset.field {
  border: 0;
  padding: 0;
  min-inline-size: 0;
}

.seg, .days {
  display: grid;
  gap: 6px;
}

.seg { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.days { grid-template-columns: repeat(7, minmax(0, 1fr)); }

.seg-opt, .day {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 6px 2px;
  border-radius: 12px;
  border: 1.5px solid #d3c6b0;
  background: var(--card);
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

.day { font-size: 13px; min-height: 48px; }

.seg-opt input, .day input, .file input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.seg-opt:has(input:checked),
.day:has(input:checked) {
  background: var(--navy);
  color: #fffdf8;
  border-color: var(--navy);
}

input[type="text"],
input[type="number"],
textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px solid #d3c6b0;
  background: var(--card);
}

textarea { min-height: 110px; resize: vertical; }

.file { display: block; }

.file-btn { width: 100%; }

.preview {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 180px;
  overflow: auto;
  margin: 8px 0 0;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 13px;
}

.preview[hidden] { display: none !important; }

.w-row { margin-bottom: 12px; }

.stepper {
  display: flex;
  gap: 8px;
  align-items: center;
}

.stepper input {
  text-align: center;
  font-size: 22px;
  font-weight: 800;
}

.stepper button {
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 12px;
  border: 1.5px solid var(--navy);
  background: var(--card);
  font-size: 26px;
  line-height: 1;
  font-weight: 700;
}

.rules {
  margin: 8px 0 12px;
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.rules summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  font-weight: 800;
  cursor: pointer;
}

.rules ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.rules li { margin: 0 0 8px; }

.hero {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
}

.hero-score {
  width: 92px;
  height: 92px;
  flex: none;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.hero-score strong { font-size: 36px; font-weight: 800; }

.hero-score span { margin-top: 4px; font-size: 12px; font-weight: 800; }

.person { margin: 0 0 4px; font-size: 26px; line-height: 1.15; font-weight: 800; }

.motivo {
  margin: 0 0 14px;
  padding: 12px 14px;
  background: #fff8ec;
  border-left: 4px solid var(--copper);
  border-radius: 12px;
}

.part { margin: 0 0 12px; }

.part-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-weight: 800;
  margin-bottom: 4px;
}

.bar {
  height: 10px;
  border-radius: 99px;
  background: #efe6d6;
  overflow: hidden;
}

.bar > span {
  display: block;
  height: 100%;
  background: var(--navy);
  border-radius: 99px;
}

.part p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }

.file-name { overflow-wrap: anywhere; font-weight: 800; }

footer {
  flex: none;
  background: var(--card);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 20px rgba(16, 36, 63, 0.05);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
}

.dock-panel[hidden] { display: none !important; }

.dock-panel { display: block; }

#dock-home, .dock-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: center;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  padding: 12px 14px;
  border: 2px solid var(--navy);
  border-radius: 14px;
  background: var(--navy);
  color: #fffdf8;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.btn.secondary {
  background: transparent;
  color: var(--navy);
}

.btn.ghost {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger);
}

.btn.danger {
  background: var(--danger);
  border-color: var(--danger);
  color: white;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn.secondary.file-btn { min-height: 52px; }

#install { margin-top: 10px; }

.textbtn {
  border: 0;
  background: transparent;
  color: var(--navy);
  font-weight: 800;
  min-height: 48px;
  padding: 8px 2px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.textbtn.block { display: block; width: 100%; text-align: left; }

.live-score { min-width: 96px; }

.live-score strong {
  display: block;
  font-size: 34px;
  line-height: 0.95;
  font-weight: 800;
}

.live-score #live-band {
  display: block;
  font-size: 13px;
  font-weight: 800;
}

.error {
  margin: 0 0 8px;
  color: var(--danger);
  font-weight: 800;
}

.error[hidden], #del-confirm[hidden], #archivo-clear[hidden], #clear-filter[hidden], #install[hidden] {
  display: none !important;
}

.sum-ok { color: var(--ok); font-weight: 800; margin: 0 0 8px; }
.sum-bad { color: var(--danger); font-weight: 800; margin: 0 0 8px; }

.confirm-q { margin: 0 0 8px; font-weight: 800; }

.ejemplo-note {
  margin: 0 0 12px;
  color: #6a5430;
  font-weight: 700;
}

:focus-visible { outline: 3px solid var(--copper); outline-offset: 2px; }

.day input:focus, .seg-opt input:focus, .file input:focus { outline: none; }

.day:has(input:focus-visible),
.seg-opt:has(input:focus-visible) {
  outline: 3px solid var(--copper);
  outline-offset: 2px;
}

@media (max-width: 360px) {
  .band .l { font-size: 9px; }
  .day { font-size: 12px; padding: 4px 0; }
}

.scorebox.b-p90, .hero-score.b-p90 { background: #e5f4ec; color: #145c38; }
.scorebox.b-p80, .hero-score.b-p80 { background: #e3f3f5; color: #0f5c66; }
.scorebox.b-p60, .hero-score.b-p60 { background: #f8f0dc; color: #8a5a08; }
.scorebox.b-p45, .hero-score.b-p45 { background: #fde8dc; color: #9a3b12; }
.scorebox.b-p0, .hero-score.b-p0 { background: #f8e4ea; color: #8d1233; }
#live-score.b-p90 { color: #145c38; }
#live-score.b-p80 { color: #0f5c66; }
#live-score.b-p60 { color: #8a5a08; }
#live-score.b-p45 { color: #9a3b12; }
#live-score.b-p0 { color: #8d1233; }

.home-grid { display: block; }

.dropzone {
  margin: 12px 0;
  padding: 14px;
  border: 2px dashed var(--copper);
  border-radius: 16px;
  background: #fff8f3;
}

.dropzone.over { background: #ffe4d6; }

.dropzone strong { display: block; font-size: 18px; margin-bottom: 4px; }

.dropzone p { margin: 0 0 8px; }

.drop-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 8px 0;
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.status {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #e7eef8;
  color: #10243f;
  font-weight: 800;
}

.one-line {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.table-wrap { display: block; min-width: 0; }

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 14px;
}

.fact {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
}

.fact dt {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.fact dd {
  margin: 4px 0 0;
  font-weight: 800;
  font-size: 16px;
  overflow-wrap: anywhere;
}

.band-line { margin: 0; font-weight: 800; }

.scorebox.leyendo,
.hero-score.leyendo,
.score-pill.leyendo {
  background: #e7eef8;
  color: #10243f;
}

.board { min-width: 0; }

#dock-home { grid-template-columns: 1fr 1fr; }

#dock-home .btn-pesos { grid-column: 1 / -1; }

@media (min-width: 960px) {
  body {
    background: #e4ddd0;
  }

  .phone {
    max-width: 1480px;
    height: calc(100dvh - 28px);
    margin: 14px auto;
    border-radius: 18px;
    overflow: hidden;
  }

  h1 { font-size: 26px; }

  .home-grid {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
  }

  .bands { grid-template-columns: 1fr 1fr; }

  .table-wrap { display: block; }

  table.cvs {
    width: 100%;
    border-collapse: collapse;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
  }

  table.cvs th,
  table.cvs td {
    text-align: left;
    padding: 10px 8px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
    font-size: 14px;
  }

  table.cvs th {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    background: #fbf7f0;
  }

  table.cvs tbody tr { cursor: pointer; }

  table.cvs tbody tr:hover { background: #fff6ea; }

  .score-pill {
    display: inline-flex;
    min-width: 42px;
    justify-content: center;
    padding: 6px 8px;
    border-radius: 10px;
    font-weight: 800;
  }

  td.motivo-cell {
    max-width: 260px;
    color: var(--muted);
  }

  .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }

  #weight-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 28px;
  }

  #dock-home {
    grid-template-columns: 1.3fr 1.3fr 0.8fr;
  }

  #dock-home .btn-pesos { grid-column: auto; }

  .hero-score { width: 110px; height: 110px; }

  .person { font-size: 32px; }
}

@media (max-width: 420px) {
  .drop-actions { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
}

.vacante-bar {
  flex: none;
  padding: 10px 16px 12px;
  background: #fffdf8;
  border-bottom: 1px solid var(--line);
}

.vacante-label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.vacante-bar select {
  width: 100%;
  min-height: 48px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1.5px solid #d3c6b0;
  background: var(--card);
  font-weight: 800;
}

.vacante-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.btn.mini {
  min-height: 44px;
  padding: 8px 8px;
  font-size: 14px;
}

.dict-block {
  margin: 0 0 14px;
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.dict-block h2 { margin-bottom: 6px; }

.dict-block p { margin: 0 0 8px; }

@media (min-width: 960px) {
  .vacante-actions { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  #v-weights {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 28px;
  }
}

/* Archivo con varios CV */
.lote-big { font-size: 1.35rem; font-weight: 700; margin: 4px 0 8px; color: var(--navy); }
.lote-bands { margin: 12px 0 16px; }
.lote-bands .band { cursor: default; }
@media (min-width: 960px) {
  .lote-bands { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* Tabla única de candidatos (v1.3): scroll propio, encabezado y nombre fijos */
.grid-hint { margin: 4px 0 8px; }
.grid-scroll {
  position: relative;
  overflow: auto;
  max-height: 72vh;
  max-height: 72dvh;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: auto;
  scrollbar-color: #9aa6b8 #f1ebe0;
}
.grid-scroll::-webkit-scrollbar { width: 12px; height: 12px; }
.grid-scroll::-webkit-scrollbar-track { background: #f1ebe0; }
.grid-scroll::-webkit-scrollbar-thumb { background: #9aa6b8; border-radius: 8px; border: 2px solid #f1ebe0; }
table.cvs.grid {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 0;
  border-radius: 0;
  overflow: visible;
  font-size: 13px;
  background: var(--card);
}
table.cvs.grid th,
table.cvs.grid td {
  text-align: left;
  vertical-align: top;
  padding: 8px 8px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid #efe6d8;
  font-size: 13px;
  line-height: 1.35;
  background: var(--card);
}
table.cvs.grid thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #10243f;
  color: #fff;
  font-size: 11.5px;
  font-weight: 800;
  text-transform: none;
  letter-spacing: 0.01em;
  white-space: nowrap;
  user-select: none;
}
table.cvs.grid thead th.sortable { cursor: pointer; }
table.cvs.grid thead th.sorted { background: #1d3a63; }
table.cvs.grid .stick1 { position: sticky; left: 0; z-index: 2; width: 34px; min-width: 34px; max-width: 34px; text-align: center; color: var(--muted); }
table.cvs.grid .stick2 { position: sticky; left: 34px; z-index: 2; min-width: 130px; max-width: 170px; box-shadow: 3px 0 4px -2px rgba(16, 36, 63, 0.18); }
table.cvs.grid thead .stick1, table.cvs.grid thead .stick2 { z-index: 4; background: #10243f; color: #fff; }
table.cvs.grid tbody tr:nth-child(even) td { background: #fbf7f0; }
table.cvs.grid tbody tr:hover td { background: #fff1de; }
table.cvs.grid td.c-nombre { font-weight: 800; overflow-wrap: anywhere; }
table.cvs.grid .name-link { color: var(--navy); text-decoration: none; }
table.cvs.grid .name-link:hover { text-decoration: underline; }
table.cvs.grid td.c-total { min-width: 92px; }
table.cvs.grid .score-pill {
  display: inline-flex; min-width: 40px; justify-content: center; padding: 4px 8px;
  border-radius: 9px; font-weight: 900; font-size: 15px;
}
table.cvs.grid .suma { display: block; margin-top: 4px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.band-tag { display: inline-block; padding: 3px 7px; border-radius: 8px; font-weight: 800; font-size: 12px; white-space: nowrap; }
.band-tag[data-band="p90"] { background: #e5f4ec; color: #145c38; }
.band-tag[data-band="p80"] { background: #e3f3f5; color: #0f5c66; }
.band-tag[data-band="p60"] { background: #f8f0dc; color: #8a5a08; }
.band-tag[data-band="p45"] { background: #fde8dc; color: #9a3b12; }
.band-tag[data-band="p0"] { background: #f8e4ea; color: #8d1233; }
table.cvs.grid td.c-dato { min-width: 90px; max-width: 180px; overflow-wrap: anywhere; }
table.cvs.grid td.nowrap { white-space: nowrap; }
table.cvs.grid td.c-num { white-space: nowrap; }
table.cvs.grid td.c-crit { min-width: 150px; max-width: 190px; }
table.cvs.grid .pts {
  display: inline-block; padding: 2px 7px; border-radius: 7px; font-weight: 900; font-size: 13px; margin-bottom: 3px;
}
table.cvs.grid .pts.alto { background: #e5f4ec; color: #145c38; }
table.cvs.grid .pts.medio { background: #f8f0dc; color: #8a5a08; }
table.cvs.grid .pts.bajo { background: #f8e4ea; color: #8d1233; }
table.cvs.grid .pts.n0 { background: #eceff3; color: #3d4654; }
table.cvs.grid .why { display: block; font-size: 12px; color: #2e3846; white-space: normal; overflow-wrap: anywhere; }
table.cvs.grid td.c-acc { white-space: nowrap; }
.btn.tiny { min-height: 32px; padding: 4px 10px; font-size: 12.5px; display: inline-flex; align-items: center; }
.suma-detalle { font-weight: 800; color: var(--navy); margin: 6px 0 10px; }
.why-strong { font-weight: 700; color: var(--ink) !important; }
@media (max-width: 600px) {
  .grid-scroll { max-height: 78vh; max-height: 78dvh; }
  table.cvs.grid .stick2 { min-width: 100px; max-width: 112px; }
  table.cvs.grid td.c-crit { min-width: 140px; max-width: 165px; }
}
table.cvs.grid td.c-banda { white-space: nowrap; }
@media (max-width: 600px) {
  table.cvs.grid td.c-total { min-width: 0; }
  table.cvs.grid .suma { white-space: normal; max-width: 96px; }
}

/* Criterios por vacante (v1.4) */
.suma-box { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); }
.suma-box.ok { border-left: 5px solid var(--ok); }
.suma-box.bad { border-left: 5px solid var(--danger); }
.suma-box strong { display: block; color: var(--navy); }
.suma-box p { margin: 4px 0 0; font-size: 14px; }
.suma-box .muted { color: var(--muted); }
.fx-row { margin: 0 0 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); box-shadow: var(--shadow); }
.fx-row.off { background: #eef0f3; border-style: dashed; box-shadow: none; }
.fx-row.off .fx-name, .fx-row.off .fx-mid, .fx-row.off .fx-config, .fx-row.off .fx-tipo { opacity: 0.5; }
.fx-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fx-name { flex: 1 1 160px; min-width: 0; min-height: 40px; padding: 6px 10px; border: 1.5px solid #d3c6b0; border-radius: 10px; font-weight: 800; font-size: 15px; background: #fff; }
.fx-tipo { font-size: 11px; }
.fx-mid { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.fx-lab { font-weight: 800; font-size: 13px; color: var(--muted); }
.fx-mid .stepper { flex: none; gap: 6px; }
.fx-mid .stepper button { width: 42px; height: 42px; font-size: 22px; }
.fx-mid .stepper input { width: 72px; min-width: 72px; height: 42px; padding: 0 4px; font-size: 20px; border: 1.5px solid #d3c6b0; border-radius: 10px; background: #fff; }
.fx-eff { font-weight: 800; color: var(--navy); }
.fx-row.off .fx-eff { color: var(--muted); }
.fx-config { margin-top: 8px; }
.fx-config label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.fx-config textarea, .fx-config select, .fx-config input { width: 100%; padding: 6px 8px; border: 1.5px solid #d3c6b0; border-radius: 10px; font: inherit; background: #fff; }
.fx-range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.fx-range label { font-weight: 700; }
.fx-del { margin-top: 6px; text-align: right; }
.fx-del-confirm { text-align: left; }
.danger-text { color: var(--danger) !important; }
.switch { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 800; font-size: 13px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-ui { width: 44px; height: 26px; border-radius: 13px; background: #b8c0cc; position: relative; transition: background .15s; flex: none; }
.switch-ui::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.switch input:checked + .switch-ui { background: var(--ok); }
.switch input:checked + .switch-ui::after { left: 21px; }
.switch input:focus-visible + .switch-ui { outline: 3px solid var(--copper); outline-offset: 2px; }
.switch-txt { min-width: 62px; }
.fx-add { margin: 14px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fffdf8; }
.fx-add h2 { margin: 0 0 4px; }
.fx-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.fx-presets .btn { width: auto; }
.tpl-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0; }
.tpl-row input, .tpl-row select { flex: 1 1 200px; min-height: 44px; padding: 6px 10px; border: 1.5px solid #d3c6b0; border-radius: 10px; font: inherit; background: #fff; }
.tpl-row .btn { width: auto; }
@media (min-width: 960px) {
  .fx-custom { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr 0.5fr auto; gap: 10px; align-items: end; }
  .fx-custom .field { margin: 0; }
}
.fx-custom select, .fx-custom input { width: 100%; min-height: 44px; padding: 6px 10px; border: 1.5px solid #d3c6b0; border-radius: 10px; font: inherit; background: #fff; max-width: 100%; }


/* ---- Barra de marca (arriba de la vacante), estilo tablero ---- */
.topbrand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background-color: #10243f;
  background-image: linear-gradient(90deg, #0c1c33 0%, #10243f 55%, #132b4b 100%);
  color: #fffdf8;
  border-bottom: 1px solid rgba(246, 241, 231, 0.14);
  flex: none;
}
.topbrand-logo { width: 36px; height: 36px; flex: none; display: block; }
.topbrand-text { min-width: 0; flex: 1; }
.topbrand-title {
  margin: 0;
  font-size: 17px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #fffdf8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbrand-sub {
  margin: 3px 0 0;
  font-size: 12.5px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #cdbfa8;
}
.topbrand-tag {
  display: none;
  margin: 0;
  padding: 6px 12px;
  border: 1px solid rgba(246, 241, 231, 0.22);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e9dcc6;
  background-color: rgba(255, 255, 255, 0.04);
  white-space: nowrap;
  flex: none;
}
.topbrand + header { padding-top: 12px; }
@media (min-width: 600px) {
  .topbrand-tag { display: block; }
}
@media (min-width: 960px) {
  .topbrand { padding: 13px 24px; gap: 14px; }
  .topbrand-logo { width: 42px; height: 42px; }
  .topbrand-title { font-size: 21px; letter-spacing: 0.1em; }
  .topbrand-sub { font-size: 13px; }
}

/* ---- Si el sistema pide modo oscuro, se repiten los colores claros ---- */
@media (prefers-color-scheme: dark) {
  :root, html { color-scheme: only light; background-color: #cbc3b4; color: #142033; }
  body { background-color: #d5cec0; color: #142033; }
  .phone { background-color: #f6f1e7; color: #142033; }
  :where(input, select, textarea, option) { background-color: #fffdf8; color: #142033; }
  :where(button) { color: #142033; }
  :where(table) { background-color: #fffdf8; color: #142033; }
  :where(td, th) { color: inherit; }
  .topbrand, header { background-color: #10243f; color: #fffdf8; }
  .topbrand-title { color: #fffdf8; }
  .topbrand-sub { color: #cdbfa8; }
}
