/* Panel · Asistente de Gestión Humana — Prebel
   Estilo "Liquid Glass": superficies de vidrio flotando sobre una malla de color. */

/* ---------- Tokens ---------- */
:root {
  color-scheme: light dark;

  /* color */
  --texto: #1d1d1f;
  --texto-2: #50505a;
  --vidrio: rgba(255, 255, 255, 0.62);
  --vidrio-fuerte: rgba(255, 255, 255, 0.78);
  --borde-vidrio: rgba(255, 255, 255, 0.7);
  --brillo: rgba(255, 255, 255, 0.85);
  --sombra: 0 10px 40px rgba(40, 50, 110, 0.14), 0 2px 8px rgba(40, 50, 110, 0.06);
  --linea: rgba(60, 60, 67, 0.14);
  --fondo-base: #eaeefb;

  --acento: #0a84ff;
  --acento-fuerte: #0066d6;
  --acento-anillo: #6cb4ff;
  --ok: #30d158;
  --alerta: #ff9f0a;
  --error: #ff453a;

  --ok-texto: #0b7a30;
  --alerta-texto: #8f5400;
  --error-texto: #c1261c;
  --neutro-texto: #4a4a52;

  --campo: rgba(255, 255, 255, 0.7);
  --segmentado-pista: rgba(120, 120, 128, 0.16);
  --segmentado-pildora: rgba(255, 255, 255, 0.96);

  /* malla */
  --m-azul: rgba(10, 132, 255, 0.55);
  --m-violeta: rgba(150, 90, 255, 0.5);
  --m-turquesa: rgba(40, 210, 200, 0.5);
  --m-coral: rgba(255, 120, 110, 0.42);

  /* espacio (escala 4/8) */
  --e1: 4px;
  --e2: 8px;
  --e3: 12px;
  --e4: 16px;
  --e5: 24px;
  --e6: 32px;
  --e7: 48px;

  /* radios */
  --r-tarjeta: 24px;
  --r-control: 14px;
  --r-pildora: 999px;

  /* movimiento */
  --t: 220ms ease;

  --fuente: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --texto: #f5f5f7;
    --texto-2: #b6b6c0;
    --vidrio: rgba(30, 30, 34, 0.6);
    --vidrio-fuerte: rgba(40, 40, 46, 0.8);
    --borde-vidrio: rgba(255, 255, 255, 0.14);
    --brillo: rgba(255, 255, 255, 0.16);
    --sombra: 0 12px 44px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.3);
    --linea: rgba(255, 255, 255, 0.12);
    --fondo-base: #0a0a12;

    --acento-fuerte: #0b6fe0;
    --acento-anillo: #7dbdff;

    --ok-texto: #5fe08a;
    --alerta-texto: #ffb340;
    --error-texto: #ff7a70;
    --neutro-texto: #c4c4cc;

    --campo: rgba(255, 255, 255, 0.07);
    --segmentado-pista: rgba(255, 255, 255, 0.1);
    --segmentado-pildora: rgba(110, 110, 120, 0.75);

    --m-azul: rgba(10, 100, 255, 0.5);
    --m-violeta: rgba(120, 60, 230, 0.5);
    --m-turquesa: rgba(20, 160, 160, 0.38);
    --m-coral: rgba(230, 80, 90, 0.32);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--fuente);
  font-size: 15px;
  line-height: 1.45;
  color: var(--texto);
  background: var(--fondo-base);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }

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

.solo-lectores {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.salto {
  position: absolute;
  left: var(--e4);
  top: -60px;
  z-index: 100;
  padding: var(--e2) var(--e4);
  border-radius: var(--r-control);
  background: var(--vidrio-fuerte);
  color: var(--texto);
  text-decoration: none;
}
.salto:focus-visible { top: var(--e3); }

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

/* ---------- Malla de color ---------- */
.malla {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--fondo-base);
}
.mancha {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  will-change: auto;
}
.mancha-azul {
  width: 62vmax; height: 62vmax;
  left: -18vmax; top: -22vmax;
  background: radial-gradient(circle at 50% 50%, var(--m-azul), transparent 68%);
}
.mancha-violeta {
  width: 56vmax; height: 56vmax;
  right: -16vmax; top: -10vmax;
  background: radial-gradient(circle at 50% 50%, var(--m-violeta), transparent 68%);
}
.mancha-turquesa {
  width: 60vmax; height: 60vmax;
  left: -12vmax; bottom: -30vmax;
  background: radial-gradient(circle at 50% 50%, var(--m-turquesa), transparent 68%);
}
.mancha-coral {
  width: 44vmax; height: 44vmax;
  right: -8vmax; bottom: -16vmax;
  background: radial-gradient(circle at 50% 50%, var(--m-coral), transparent 68%);
}

/* ---------- Superficie de vidrio ---------- */
.vidrio {
  position: relative;
  background: var(--vidrio);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--borde-vidrio);
  box-shadow: inset 0 1px 0 var(--brillo), var(--sombra);
  border-radius: var(--r-tarjeta);
}
.vidrio::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0) 38%);
}
@media (prefers-color-scheme: dark) {
  .vidrio::before {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0) 38%);
  }
}
.vidrio > * { position: relative; z-index: 1; }

/* ---------- Controles ---------- */
.boton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--e2);
  min-height: 40px;
  padding: 0 var(--e5);
  border: 1px solid transparent;
  border-radius: var(--r-control);
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background var(--t), transform var(--t), box-shadow var(--t), opacity var(--t);
}
.boton:disabled { opacity: 0.55; cursor: not-allowed; }
.boton-ancho { width: 100%; }

.boton-primario {
  background: var(--acento-fuerte);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 4px 14px rgba(10, 100, 220, 0.3);
}
.boton-primario:hover:not(:disabled) { background: var(--acento); transform: translateY(-1px); }
.boton-primario:active:not(:disabled) { transform: translateY(0); }

.boton-suave {
  background: var(--campo);
  border-color: var(--borde-vidrio);
  color: var(--texto);
  box-shadow: inset 0 1px 0 var(--brillo);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.boton-suave:hover:not(:disabled) { background: var(--vidrio-fuerte); transform: translateY(-1px); }

.campo-etiqueta {
  display: block;
  margin-bottom: var(--e2);
  font-size: 13px;
  color: var(--texto-2);
}
.campo {
  width: 100%;
  padding: var(--e3) var(--e4);
  border: 1px solid var(--borde-vidrio);
  border-radius: var(--r-control);
  background: var(--campo);
  color: var(--texto);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
  transition: border-color var(--t), background var(--t);
}
.campo::placeholder { color: var(--texto-2); opacity: 0.85; }
.campo:focus-visible { border-color: var(--acento-anillo); }
.campo-grande {
  min-height: 96px;
  resize: vertical;
  font-size: 17px;
  line-height: 1.4;
}

/* ---------- Login ---------- */
.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--e5) var(--e4);
}
.login-tarjeta {
  width: 100%;
  max-width: 400px;
  padding: var(--e6) var(--e5);
  animation: aparece 450ms ease both;
}
.login-titulo {
  font-size: 24px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.login-sub { margin: var(--e2) 0 var(--e5); color: var(--texto-2); font-size: 13px; }
.login-error {
  margin: var(--e3) 0 0;
  padding: var(--e2) var(--e3);
  border-radius: var(--r-control);
  background: rgba(255, 69, 58, 0.14);
  color: var(--error-texto);
  font-size: 13px;
  font-weight: 500;
}
.login-tarjeta .boton { margin-top: var(--e4); }

/* ---------- Barra superior ---------- */
.app { padding: var(--e3) var(--e4) var(--e7); }

.barra {
  position: relative;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "marca salir"
    "modo  modo";
  gap: var(--e3) var(--e4);
  align-items: center;
  max-width: 1200px;
  margin: 0 auto var(--e5);
  padding: var(--e3) var(--e4);
  border-radius: 28px;
}
.barra-marca { grid-area: marca; min-width: 0; }
.barra-modo { grid-area: modo; }
.barra-salir { grid-area: salir; min-height: 36px; padding: 0 var(--e4); }

.barra-titulo {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.barra-meta { font-size: 12px; color: var(--texto-2); line-height: 1.35; }
.barra-modelos { margin-top: var(--e2); overflow-wrap: anywhere; }

.segmentado {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 3px;
  border-radius: var(--r-pildora);
  background: var(--segmentado-pista);
  width: 100%;
  max-width: 260px;
}
.segmentado-pildora {
  position: absolute;
  top: 3px; bottom: 3px; left: 3px;
  width: calc(50% - 3px);
  border-radius: var(--r-pildora);
  background: var(--segmentado-pildora);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transform: translateX(0);
  transition: transform var(--t);
}
.segmentado[data-activo="pago"] .segmentado-pildora { transform: translateX(100%); }
.segmentado-op {
  position: relative;
  z-index: 1;
  min-height: 34px;
  padding: 0 var(--e4);
  border: 0;
  border-radius: var(--r-pildora);
  background: transparent;
  font-weight: 600;
  font-size: 14px;
  color: var(--texto-2);
  cursor: pointer;
  transition: color var(--t);
}
.segmentado-op[aria-checked="true"] { color: var(--texto); }
.segmentado-op:hover:not([aria-checked="true"]) { color: var(--texto); }
.segmentado.ocupado { opacity: 0.7; pointer-events: none; }

/* ---------- Contenido y rejilla ---------- */
.contenido {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--e4);
  outline: none;
}
.contenido > * { grid-column: 1 / -1; min-width: 0; }

.rejilla { display: contents; }
.rejilla > .kpi { grid-column: span 12; }

.columna { display: flex; flex-direction: column; gap: var(--e4); }

.tarjeta {
  padding: var(--e5);
  animation: aparece 520ms ease both;
  animation-delay: calc(var(--i, 0) * 60ms);
}
.tarjeta-cab {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--e4);
  margin-bottom: var(--e4);
}
.tarjeta-titulo {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.tarjeta-sub { margin-top: var(--e1); font-size: 13px; color: var(--texto-2); }

@keyframes aparece {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* ---------- KPIs ---------- */
.kpi { display: flex; flex-direction: column; gap: var(--e2); padding: var(--e5); }
.etiqueta { font-size: 13px; color: var(--texto-2); font-weight: 500; }
.kpi-num {
  font-size: 38px;
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
  margin-top: var(--e1);
}
.kpi-num-costo { font-size: 30px; }
.kpi-unidad {
  margin-left: 3px;
  font-size: 20px;
  font-weight: 600;
  color: var(--texto-2);
  letter-spacing: -0.01em;
}
.kpi-sub { font-size: 12.5px; color: var(--texto-2); font-variant-numeric: tabular-nums; }
.kpi-canales { display: flex; flex-wrap: wrap; gap: var(--e1) var(--e3); }
.kpi-canales li::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  margin-right: 6px;
  vertical-align: 1px;
  border-radius: 50%;
  background: var(--acento);
  opacity: 0.8;
}

.progreso {
  height: 6px;
  margin-top: auto;
  border-radius: var(--r-pildora);
  background: var(--segmentado-pista);
  overflow: hidden;
}
.progreso-relleno {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--acento), var(--ok));
  transition: width 600ms ease;
}

/* ---------- Gráfica ---------- */
.leyenda { display: flex; gap: var(--e4); font-size: 12.5px; color: var(--texto-2); }
.leyenda li { display: inline-flex; align-items: center; gap: 6px; }
.leyenda-punto { width: 10px; height: 10px; border-radius: 4px; display: inline-block; }
.leyenda-total { background: rgba(10, 132, 255, 0.3); border: 1px solid rgba(10, 132, 255, 0.5); }
.leyenda-resueltas { background: var(--acento); }

.grafica-caja { width: 100%; min-height: 220px; }
.grafica-caja svg { display: block; width: 100%; height: auto; overflow: visible; }
.g-linea { stroke: var(--linea); stroke-width: 1; }
.g-texto { fill: var(--texto-2); font-size: 11.5px; font-family: var(--fuente); font-variant-numeric: tabular-nums; }
.g-texto-hoy { fill: var(--texto); font-weight: 600; }
.g-valor { fill: var(--texto-2); font-size: 11px; font-family: var(--fuente); font-variant-numeric: tabular-nums; }
.g-total { fill: rgba(10, 132, 255, 0.26); stroke: rgba(10, 132, 255, 0.45); stroke-width: 1; }
.g-resueltas { fill: var(--acento); }
.g-vacio { fill: var(--texto-2); font-size: 13px; font-family: var(--fuente); }
.g-grupo:hover .g-total { fill: rgba(10, 132, 255, 0.36); }
.g-total, .g-resueltas { transition: fill var(--t); }

/* ---------- Comparar ---------- */
.comparar { padding: var(--e5); }
.comparar-form { display: flex; flex-direction: column; gap: var(--e3); }
.comparar-pie { display: flex; align-items: center; justify-content: space-between; gap: var(--e4); }
.comparar-salida { margin-top: var(--e5); }
.comparar-salida:empty { margin-top: 0; }

.duo { display: grid; grid-template-columns: 1fr; gap: var(--e4); }

.resp {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--e3);
  padding: var(--e5);
  border-radius: var(--r-tarjeta);
  background: var(--vidrio-fuerte);
  border: 1px solid var(--borde-vidrio);
  box-shadow: inset 0 1px 0 var(--brillo), 0 6px 24px rgba(40, 50, 110, 0.1);
  animation: aparece 420ms ease both;
}
.resp:nth-child(2) { animation-delay: 90ms; }
.resp-gana { border-color: rgba(48, 209, 88, 0.55); }
.resp-cab { display: flex; align-items: center; justify-content: space-between; gap: var(--e3); flex-wrap: wrap; }
.resp-modo {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.resp-texto {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.5;
  min-height: 3em;
}
.resp-datos {
  display: flex;
  flex-wrap: wrap;
  gap: var(--e1) var(--e4);
  padding-top: var(--e3);
  border-top: 1px solid var(--linea);
  font-size: 12.5px;
  color: var(--texto-2);
  font-variant-numeric: tabular-nums;
}
.resp-datos b { color: var(--texto); font-weight: 600; }
.resp-modelo { flex-basis: 100%; overflow-wrap: anywhere; }

.fantasma {
  min-height: 200px;
  gap: var(--e3);
}
.sombra-linea {
  height: 14px;
  border-radius: var(--r-pildora);
  background: linear-gradient(100deg, var(--segmentado-pista) 30%, rgba(255, 255, 255, 0.55) 50%, var(--segmentado-pista) 70%);
  background-size: 220% 100%;
  animation: brillo 1.4s linear infinite;
}
@media (prefers-color-scheme: dark) {
  .sombra-linea {
    background: linear-gradient(100deg, var(--segmentado-pista) 30%, rgba(255, 255, 255, 0.2) 50%, var(--segmentado-pista) 70%);
    background-size: 220% 100%;
  }
}
.sombra-linea:nth-child(2) { width: 92%; }
.sombra-linea:nth-child(3) { width: 78%; }
.sombra-linea:nth-child(4) { width: 55%; }
.sombra-titulo { width: 30%; height: 18px; }
@keyframes brillo {
  from { background-position: 120% 0; }
  to { background-position: -120% 0; }
}

.aviso-vacio {
  padding: var(--e5) var(--e4);
  text-align: center;
  color: var(--texto-2);
  font-size: 14px;
}
.aviso-vacio strong { display: block; margin-bottom: var(--e1); color: var(--texto); font-size: 15px; letter-spacing: -0.01em; }

/* ---------- Píldoras ---------- */
.pildora {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: var(--r-pildora);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  background: var(--segmentado-pista);
  color: var(--neutro-texto);
}
.pildora-ok { background: rgba(48, 209, 88, 0.2); color: var(--ok-texto); }
.pildora-alerta { background: rgba(255, 159, 10, 0.2); color: var(--alerta-texto); }
.pildora-error { background: rgba(255, 69, 58, 0.18); color: var(--error-texto); }
.pildora-canal { font-weight: 500; text-transform: lowercase; }
.pildora-rapida { background: rgba(10, 132, 255, 0.18); color: var(--acento-fuerte); }
@media (prefers-color-scheme: dark) {
  .pildora-rapida { color: #7dbdff; }
}
.pildora-conteo { min-width: 28px; justify-content: center; font-variant-numeric: tabular-nums; }

/* ---------- Mensajes recientes ---------- */
.lista-recientes { margin: 0 calc(var(--e2) * -1); padding: 0 var(--e2); }
.fila {
  display: grid;
  grid-template-columns: auto auto auto auto minmax(0, 1fr);
  min-width: 0;
  grid-template-areas:
    "q q q q q"
    "h c m s f";
  gap: var(--e2) var(--e3);
  align-items: center;
  padding: var(--e3) var(--e2);
  border-top: 1px solid var(--linea);
  border-radius: var(--r-control);
  transition: background var(--t);
}
.fila:first-child { border-top: 0; }
.fila:hover { background: var(--campo); }
.fila-hora { grid-area: h; font-size: 12.5px; color: var(--texto-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fila-canal { grid-area: c; }
.fila-pregunta { grid-area: q; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; }
.fila-motivo { grid-area: m; }
.fila-seg { grid-area: s; font-size: 12.5px; color: var(--texto-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fila-fb { grid-area: f; justify-self: end; font-size: 15px; line-height: 1; min-width: 20px; text-align: center; }

/* ---------- Sin respuesta ---------- */
.lista-sinresp li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--e3);
  padding: var(--e3) 0;
  border-top: 1px solid var(--linea);
}
.lista-sinresp li:first-child { border-top: 0; }
.sinresp-texto { min-width: 0; overflow-wrap: anywhere; font-size: 14.5px; }

/* ---------- Estado ---------- */
.estado-lista { display: grid; grid-template-columns: 1fr; gap: 0; }
.estado-fila {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--e4);
  padding: var(--e3) 0;
  border-top: 1px solid var(--linea);
  font-size: 14px;
}
.estado-fila:first-child { border-top: 0; }
.estado-fila dt { color: var(--texto-2); }
.estado-fila dd { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.estado-acciones { margin-top: var(--e4); }

.punto {
  display: inline-block;
  width: 8px; height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--texto-2);
  vertical-align: 0;
}
.punto-ok { background: var(--ok); box-shadow: 0 0 0 3px rgba(48, 209, 88, 0.2); }
.punto-error { background: var(--error); box-shadow: 0 0 0 3px rgba(255, 69, 58, 0.2); }

.probar-resultados { margin-top: var(--e3); display: flex; flex-direction: column; gap: var(--e2); }
.probar-resultados li {
  padding: var(--e3);
  border-radius: var(--r-control);
  background: var(--campo);
  font-size: 13px;
  animation: aparece 300ms ease both;
}
.probar-linea { display: flex; align-items: baseline; justify-content: space-between; gap: var(--e3); }
.probar-modelo { overflow-wrap: anywhere; font-weight: 600; }
.probar-seg { color: var(--texto-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.probar-error { margin-top: var(--e1); color: var(--error-texto); }

/* ---------- Toasts ---------- */
.toasts {
  position: fixed;
  left: 50%;
  bottom: var(--e5);
  z-index: 60;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: var(--e2);
  align-items: center;
  width: calc(100% - var(--e6));
  max-width: 420px;
  pointer-events: none;
}
.toast {
  padding: var(--e3) var(--e4);
  border-radius: var(--r-control);
  background: var(--vidrio-fuerte);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--borde-vidrio);
  box-shadow: inset 0 1px 0 var(--brillo), var(--sombra);
  font-size: 13.5px;
  font-weight: 500;
  animation: aparece 250ms ease both;
  transition: opacity var(--t), transform var(--t);
}
.toast.saliendo { opacity: 0; transform: translateY(8px); }

/* ---------- Escritorio ---------- */
@media (min-width: 640px) {
  .barra { position: sticky; top: var(--e3); }
  .kpi { min-height: 148px; }
  .rejilla > .kpi { grid-column: span 6; }
  .duo { grid-template-columns: 1fr 1fr; }
  .app { padding: var(--e4) var(--e5) var(--e7); }
  .tarjeta { padding: var(--e6); }
}

@media (min-width: 900px) {
  .barra {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas: "marca modo salir";
    padding: var(--e3) var(--e5);
  }
  .barra-modo { justify-self: center; text-align: center; }
  .barra-modo .segmentado { margin: 0 auto; }
}

@media (min-width: 1024px) {
  .rejilla > .kpi { grid-column: span 3; }
  .recientes { grid-column: span 7; }
  .lista-recientes { max-height: 640px; overflow-y: auto; }
  .columna { grid-column: span 5; }
  .fila {
    grid-template-columns: 54px auto minmax(0, 1fr) auto 44px 24px;
    grid-template-areas: "h c q m s f";
  }
}

/* ---------- Accesibilidad: menos transparencia ---------- */
@media (prefers-reduced-transparency: reduce) {
  :root {
    --vidrio: #f6f7fb;
    --vidrio-fuerte: #ffffff;
    --campo: #eceef6;
  }
  .vidrio, .toast, .boton-suave {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .vidrio::before { display: none; }
  .mancha { filter: blur(90px); opacity: 0.6; }
}
@media (prefers-reduced-transparency: reduce) and (prefers-color-scheme: dark) {
  :root {
    --vidrio: #1d1d22;
    --vidrio-fuerte: #26262c;
    --campo: #2c2c33;
  }
}

/* ---------- Accesibilidad: menos movimiento ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
