/* =====================================================================
   BURJ · Challenge — hoja de estilos (rediseño 7 nov 2026, tarea 48)
   Minimalista, gama alta, «Dubái»: negro cálido, superficies de muy poco
   contraste, un solo acento champán mate. Verde y rojo apagados solo para
   PnL y estados. Tokens y componentes documentados en DISENO.md.
   ===================================================================== */

:root {
  /* Superficies (negro cálido, escalones de ~3 % de luz) */
  --fondo: #0c0b0a;
  --lateral: #0f0e0c;
  --sup-1: #131210;      /* tarjetas */
  --sup-2: #1a1816;      /* paneles internos, hover */
  --sup-3: #23201d;      /* chips neutros, pistas */
  --campo: #0f0e0d;      /* fondo de inputs */
  --linea: #24211d;      /* bordes finos */
  --linea-2: #34302a;    /* bordes de controles */

  /* Texto (marfil cálido) */
  --texto: #ece6dc;
  --texto-2: #a8a092;    /* secundario · 7,6:1 sobre el fondo */
  --texto-3: #8b8478;    /* terciario  · 5,3:1 sobre el fondo */

  /* Acento único: champán mate */
  --champan: #c8b48c;
  --champan-2: #dccaa6;
  --champan-osc: #7d6d52;
  --champan-tinte: rgba(200, 180, 140, .08);
  --champan-tinte-2: rgba(200, 180, 140, .14);
  --sobre-champan: #15120d;

  /* Estados (apagados) */
  --verde: #86b996;
  --verde-tinte: rgba(134, 185, 150, .10);
  --verde-borde: rgba(134, 185, 150, .32);
  --rojo: #e08a80;
  --rojo-solido: #a9483f;
  --rojo-tinte: rgba(224, 138, 128, .10);
  --rojo-borde: rgba(224, 138, 128, .34);
  --ambar: #d9a46a;
  --ambar-tinte: rgba(217, 164, 106, .11);
  --ambar-borde: rgba(217, 164, 106, .34);
  --azul: #9fb4cf;
  --azul-tinte: rgba(159, 180, 207, .09);
  --azul-borde: rgba(159, 180, 207, .30);

  /* Tipografía */
  --f-display: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --f-texto: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --f-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Forma y ritmo */
  --r-1: 6px;            /* botones, inputs */
  --r-2: 10px;           /* tarjetas */
  --r-3: 14px;           /* modales */
  --t: 170ms cubic-bezier(.2, .6, .2, 1);
  --foco: 2px solid var(--champan);

  color-scheme: dark;
  font-family: var(--f-texto);
  font-feature-settings: "tnum" 1, "cv11" 1;
  font-variant-numeric: tabular-nums;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--fondo); color: var(--texto); }
body { font-size: 14px; line-height: 1.5; min-height: 100vh; overflow-x: hidden; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
#app { display: flex; min-height: 100vh; }
::selection { background: var(--champan-tinte-2); color: var(--texto); }
a { color: var(--champan); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--champan-2); }
h1, h2, h3 { margin: 0; line-height: 1.2; font-weight: 600; }
h1 { font-family: var(--f-display); font-size: 36px; font-weight: 500; letter-spacing: .005em; }
h2 { font-size: 15px; letter-spacing: -.005em; }
h3 { font-size: 10.5px; text-transform: uppercase; letter-spacing: .16em; color: var(--texto-3); font-weight: 600; }
p { margin: 6px 0; }
.mono { font-family: var(--f-texto); font-weight: 500; font-feature-settings: "tnum" 1; }
code, textarea.mono { font-family: var(--f-mono); font-size: 12.5px; }
.muted, .sub, .ayuda { color: var(--texto-2); }
.sub { font-size: 13px; }
.ayuda { font-size: 12.5px; }
.pos { color: var(--verde); }
.neg { color: var(--rojo); }
.neutro { color: var(--texto-3); }
.req { color: var(--champan); }
.error { color: var(--rojo); min-height: 1.2em; font-size: 13px; }
.vacio { color: var(--texto-3); text-align: center; padding: 22px 16px; }
.cargando { color: var(--texto-3); padding: 48px; letter-spacing: .04em; }

/* Foco visible en todo lo interactivo */
:focus { outline: none; }
:focus-visible { outline: var(--foco); outline-offset: 2px; }
.saltar { position: absolute; left: -999px; top: 10px; background: var(--champan); color: var(--sobre-champan); padding: 8px 14px; border-radius: var(--r-1); z-index: 100; font-weight: 600; }
.saltar:focus { left: 10px; }

/* ---------- Iconos lineales (SVG en línea vía máscara; color = currentColor) ---------- */
.menu-icono, .btn-menu::before {
  display: inline-block; width: 18px; height: 18px; flex: 0 0 18px; font-size: 0; color: inherit;
  background-color: currentColor; -webkit-mask: var(--ico) center / 18px 18px no-repeat; mask: var(--ico) center / 18px 18px no-repeat;
}
.menu-item[data-vista="operaciones"] .menu-icono { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3 12.5 7 12.5 10 5.5 14 18.5 17 12.5 21 12.5'/%3E%3C/svg%3E"); }
.menu-item[data-vista="grupos"] .menu-icono { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.3' stroke-linejoin='round'%3E%3Crect x='3.5' y='3.5' width='7' height='7' rx='1'/%3E%3Crect x='13.5' y='3.5' width='7' height='7' rx='1'/%3E%3Crect x='3.5' y='13.5' width='7' height='7' rx='1'/%3E%3Crect x='13.5' y='13.5' width='7' height='7' rx='1'/%3E%3C/svg%3E"); }
.menu-item[data-vista="flota"] .menu-icono { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 21V3.5'/%3E%3Cpath d='M5.5 4.5h12l-2.5 4 2.5 4h-12'/%3E%3C/svg%3E"); }
.menu-item[data-vista="conexiones"] .menu-icono { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8.5h15.5M16 5l3.5 3.5L16 12'/%3E%3Cpath d='M20 15.5H4.5M8 12l-3.5 3.5L8 19'/%3E%3C/svg%3E"); }
.menu-item[data-vista="cuentas"] .menu-icono { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5.5' width='18' height='13' rx='1.5'/%3E%3Cpath d='M3 10h18M7 14.5h4'/%3E%3C/svg%3E"); }
.menu-item[data-vista="estrategias"] .menu-icono { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.3' stroke-linejoin='round'%3E%3Cpath d='M12 3l9 9-9 9-9-9z'/%3E%3Cpath d='M12 8.5l3.5 3.5-3.5 3.5L8.5 12z'/%3E%3C/svg%3E"); }
.menu-item[data-vista="resumen"] .menu-icono { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.3' stroke-linecap='round'%3E%3Cpath d='M3.5 20.5h17M7 17v-5M12 17V6.5M17 17v-8'/%3E%3C/svg%3E"); }
.menu-item[data-vista="calendario"] .menu-icono { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='5' width='17' height='15.5' rx='1.5'/%3E%3Cpath d='M3.5 10h17M8 3v4M16 3v4'/%3E%3C/svg%3E"); }

/* ---------- Marca BURJ: aguja fina + logotipo tipográfico ---------- */
.marca { display: flex; align-items: center; gap: 12px; padding: 28px 24px 22px; }
.marca-logo {
  width: 14px; height: 30px; flex: 0 0 14px; font-size: 0; color: transparent;
  background: linear-gradient(180deg, var(--champan-2), var(--champan-osc));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 30'%3E%3Cpath d='M7 0l.9 9.5 1.6.9.6 8.6 1.4.8L12 30H2l.5-10.2 1.4-.8.6-8.6 1.6-.9z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 30'%3E%3Cpath d='M7 0l.9 9.5 1.6.9.6 8.6 1.4.8L12 30H2l.5-10.2 1.4-.8.6-8.6 1.6-.9z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.marca-txt { display: flex; flex-direction: column; line-height: 1; font-family: var(--f-display); font-weight: 600; font-size: 23px; letter-spacing: .34em; text-transform: uppercase; color: var(--texto); }
.marca-txt strong { font-family: var(--f-texto); font-size: 9px; font-weight: 500; letter-spacing: .42em; color: var(--champan); margin-top: 6px; }
.marca-grande { flex-direction: column; justify-content: center; gap: 16px; padding: 0 0 30px; text-align: center; }
.marca-grande .marca-logo { width: 20px; height: 44px; flex-basis: auto; }
/* text-indent = letter-spacing: compensa el espacio tras la última letra y centra de verdad */
.marca-grande .marca-txt { font-size: 34px; align-items: center; text-indent: .34em; }
.marca-grande .marca-txt strong { font-size: 10px; margin-top: 10px; text-indent: .42em; }

/* ---------- Lateral ---------- */
.lateral { width: 236px; flex: 0 0 236px; background: var(--lateral); border-right: 1px solid var(--linea); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.menu { flex: 1; padding: 0 12px 16px; }
.menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.menu-seccion { font-size: 10px; text-transform: uppercase; letter-spacing: .2em; color: var(--texto-3); margin: 22px 12px 8px; font-weight: 500; }
.menu-item { position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: var(--r-1); color: var(--texto-2); font-size: 13.5px; font-weight: 450; transition: color var(--t), background-color var(--t); }
.menu-item:hover { color: var(--texto); background: var(--sup-1); }
.menu-item[aria-current="page"] { color: var(--champan-2); background: var(--champan-tinte); }
.menu-item[aria-current="page"]::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 1px; background: var(--champan); }
.menu-item .menu-icono { opacity: .85; }
.usuario { border-top: 1px solid var(--linea); padding: 16px 20px 20px; display: grid; grid-template-columns: auto 1fr; gap: 10px 12px; align-items: center; }
.avatar { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--champan-osc); display: grid; place-items: center; font-family: var(--f-display); font-weight: 600; font-size: 15px; color: var(--champan); }
.usuario-email { font-size: 12px; color: var(--texto-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usuario-btns { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- Columna principal ---------- */
.columna { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.barra { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 10px 40px; background: rgba(12, 11, 10, .86); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--linea); }
.reloj { font-size: 12px; letter-spacing: .03em; color: var(--texto-2); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-menu { display: none; align-items: center; justify-content: center; background: transparent; color: var(--texto); border: 1px solid var(--linea-2); border-radius: var(--r-1); width: 38px; height: 38px; font-size: 0; cursor: pointer; flex: 0 0 auto; transition: border-color var(--t), background-color var(--t); }
.btn-menu::before { content: ""; --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.4' stroke-linecap='round'%3E%3Cpath d='M4 7h16M4 12h16M4 17h10'/%3E%3C/svg%3E"); }
.btn-menu:hover { border-color: var(--champan-osc); background: var(--sup-1); }
.principal { padding: 40px 40px 80px; max-width: 1480px; width: 100%; min-width: 0; }
.principal:focus { outline: none; }
.banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 40px; font-weight: 500; font-size: 13px; }
.banner-mal { background: #2a1512; color: #f1cbc5; border-bottom: 1px solid var(--rojo-borde); }
.banner .btn-icono { border-color: var(--rojo-borde); color: #f1cbc5; }
.cab { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px 24px; flex-wrap: wrap; margin-bottom: 18px; padding-bottom: 22px; border-bottom: 1px solid var(--linea); }
.cab .sub { margin-top: 8px; color: var(--texto-2); }
.cab-acciones { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.nota { position: relative; background: var(--sup-1); border: 1px solid var(--linea); border-left: 2px solid var(--champan-osc); color: var(--texto-2); border-radius: var(--r-1); padding: 10px 14px; font-size: 12.5px; margin: 14px 0 22px; }
.nota strong { color: var(--champan); font-weight: 600; }

/* ---------- Botones ---------- */
.btn {
  appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--linea-2); background: transparent; color: var(--texto); border-radius: var(--r-1);
  padding: 7px 15px; min-height: 36px; font: inherit; font-size: 13px; font-weight: 500; letter-spacing: .01em;
  cursor: pointer; white-space: nowrap; transition: border-color var(--t), background-color var(--t), color var(--t), opacity var(--t);
}
.btn:hover:not(:disabled) { border-color: var(--champan-osc); background: var(--sup-2); }
.btn:active:not(:disabled) { background: var(--sup-3); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-primario { background: var(--champan); color: var(--sobre-champan); border-color: var(--champan); font-weight: 600; }
.btn-primario:hover:not(:disabled) { background: var(--champan-2); border-color: var(--champan-2); }
.btn-primario:active:not(:disabled) { background: var(--champan); }
.btn-peligro { background: var(--rojo-solido); color: #fff; border-color: var(--rojo-solido); font-weight: 600; }
.btn-peligro:hover:not(:disabled) { background: #b9554b; border-color: #b9554b; }
.btn-peligro-borde { border-color: var(--rojo-borde); color: var(--rojo); }
.btn-peligro-borde:hover:not(:disabled) { border-color: var(--rojo); background: var(--rojo-tinte); }
.btn-aviso { background: transparent; color: var(--ambar); border-color: var(--ambar-borde); font-weight: 600; }
.btn-aviso:hover:not(:disabled) { border-color: var(--ambar); background: var(--ambar-tinte); }
.btn-grande { padding: 10px 20px; min-height: 42px; font-size: 12.5px; letter-spacing: .12em; }
.btn-chico { padding: 4px 11px; min-height: 30px; font-size: 12px; }
.btn-ancho { width: 100%; margin-top: 12px; min-height: 42px; }
.btn-icono { display: inline-grid; place-items: center; background: transparent; border: 1px solid var(--linea-2); color: var(--texto-2); border-radius: var(--r-1); width: 32px; height: 32px; cursor: pointer; font-size: 15px; line-height: 1; flex: 0 0 auto; transition: border-color var(--t), color var(--t), background-color var(--t); }
.btn-icono:hover:not(:disabled) { color: var(--texto); border-color: var(--champan-osc); background: var(--sup-2); }
.btn-icono:disabled { opacity: .3; cursor: not-allowed; }

/* ---------- Interruptor ---------- */
.interruptor { width: 38px; height: 22px; border-radius: 11px; background: var(--sup-3); border: 1px solid var(--linea-2); position: relative; cursor: pointer; padding: 0; flex: 0 0 auto; transition: background-color var(--t), border-color var(--t); }
.interruptor:hover:not(:disabled) { border-color: var(--champan-osc); }
.interruptor[aria-checked="true"] { background: var(--champan); border-color: var(--champan); }
.interruptor:disabled { opacity: .4; cursor: not-allowed; }
.interruptor-bola { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--texto-2); transition: left var(--t), background-color var(--t); }
.interruptor[aria-checked="true"] .interruptor-bola { left: 18px; background: var(--sobre-champan); }
.switch-et { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; color: var(--texto-2); }

/* ---------- Formularios ---------- */
input, select, textarea {
  font: inherit; color: var(--texto); background: var(--campo); border: 1px solid var(--linea-2); border-radius: var(--r-1);
  padding: 9px 12px; width: 100%; min-height: 40px; transition: border-color var(--t), background-color var(--t);
}
input::placeholder, textarea::placeholder { color: var(--texto-3); }
input:hover:not(:disabled), select:hover:not(:disabled), textarea:hover { border-color: #4a443b; }
input:focus, select:focus, textarea:focus { border-color: var(--champan); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 1px solid var(--champan); outline-offset: 0; }
input:disabled, select:disabled { opacity: .45; }
select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a8a092' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }
.etq { display: block; font-size: 10.5px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--texto-2); margin: 16px 0 7px; }
.etq-linea { font-size: 12.5px; color: var(--texto-2); }
.campo { display: flex; flex-direction: column; min-width: 130px; }
.campo .etq { margin-top: 0; }
.fila-campos { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.chk { display: flex; align-items: center; gap: 9px; font-weight: 500; cursor: pointer; color: var(--texto); }
.chk input { width: 16px; height: 16px; min-height: 0; padding: 0; accent-color: var(--champan); }
.celda-num { width: 68px; -moz-appearance: textfield; min-height: 30px; padding: 4px 9px; text-align: right; font-feature-settings: "tnum" 1; background: transparent; border-color: var(--linea); }
.celda-num:hover:not(:disabled) { background: var(--campo); }
.celda-num:focus { background: var(--campo); }
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { opacity: .35; }
.celda-num::-webkit-inner-spin-button, .celda-num::-webkit-outer-spin-button, .mini input::-webkit-inner-spin-button, .mini input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.mini input { -moz-appearance: textfield; }

/* ---------- Tarjetas, rejillas y KPIs ---------- */
.tarjeta { background: var(--sup-1); border: 1px solid var(--linea); border-radius: var(--r-2); padding: 22px 24px; margin-bottom: 18px; }
.tarjeta > h2 { margin-bottom: 14px; font-size: 11px; text-transform: uppercase; letter-spacing: .16em; color: var(--texto-2); font-weight: 500; }
.rejilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.rejilla .tarjeta { margin-bottom: 0; }
.dos-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1px; margin-bottom: 18px; background: var(--linea); border: 1px solid var(--linea); border-radius: var(--r-2); overflow: hidden; }
.kpi { background: var(--sup-1); padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.kpi-t { font-size: 10.5px; text-transform: uppercase; letter-spacing: .16em; color: var(--texto-2); }
.kpi-v { font-size: 24px; font-weight: 500; letter-spacing: -.01em; font-feature-settings: "tnum" 1; }
.lista-simple { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; }
.lista-simple > li { padding: 9px 0; border-bottom: 1px solid var(--linea); }
.lista-simple > li:last-child { border-bottom: 0; }
.acciones { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--linea); }
.insignias { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- Tablas: densas, cifras a la derecha, desplazamiento dentro del contenedor ---------- */
.tabla-env { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; border-radius: var(--r-1); }
.tabla-env:focus-visible { outline-offset: 0; }
.tabla { width: 100%; border-collapse: collapse; font-feature-settings: "tnum" 1; font-size: 13px; }
.tabla th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .14em; color: var(--texto-3); font-weight: 500; padding: 10px 10px; border-bottom: 1px solid var(--linea-2); white-space: nowrap; }
.tabla td { padding: 8px 10px; height: 46px; border-bottom: 1px solid var(--linea); white-space: nowrap; vertical-align: middle; }
.tabla tbody tr { transition: background-color var(--t); }
.tabla tbody tr:hover { background: rgba(200, 180, 140, .03); }
.tabla tr:last-child td { border-bottom: 0; }
.tabla .num, .tabla th.num { text-align: right; }
.tabla td.num { font-weight: 500; }
.tabla td .insignia { margin-left: 6px; vertical-align: 1px; }

/* ---------- Chips de tipo y de estado ---------- */
.insignia, .estado {
  display: inline-flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px; border: 1px solid var(--linea-2); color: var(--texto-2); background: transparent; line-height: 1.3; white-space: nowrap;
}
.insignia-evaluacion { color: var(--champan); border-color: rgba(200, 180, 140, .34); background: var(--champan-tinte); }
.insignia-fondeada { color: var(--verde); border-color: var(--verde-borde); background: var(--verde-tinte); }
.insignia-demo { color: var(--azul); border-color: var(--azul-borde); background: var(--azul-tinte); }
.insignia-quemada { color: var(--rojo); border-color: var(--rojo-borde); background: var(--rojo-tinte); }
.insignia-pausada { color: var(--ambar); border-color: var(--ambar-borde); background: var(--ambar-tinte); }
.estado { background: var(--sup-2); border-color: var(--linea); color: var(--texto-2); }
.estado::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .9; }
.estado-activo, .estado-operando, .estado-fila-pos, .estado-cmd-hecho { background: var(--verde-tinte); border-color: var(--verde-borde); color: var(--verde); }
.estado-activando, .estado-deteniendo, .estado-fila-pausada, .estado-cmd-pendiente { background: var(--ambar-tinte); border-color: var(--ambar-borde); color: var(--ambar); }
.estado-error, .estado-fila-quemada, .estado-cmd-rechazado { background: var(--rojo-tinte); border-color: var(--rojo-borde); color: var(--rojo); }
.estado-punto { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; font-size: 12.5px; }
.punto { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: 0 0 auto; }
.punto-ok { background: var(--verde); box-shadow: 0 0 0 3px var(--verde-tinte); }
.punto-mal { background: var(--rojo); box-shadow: 0 0 0 3px var(--rojo-tinte); }

/* ---------- Grupos ---------- */
.grupo { padding: 26px 28px 18px; }
.grupo-cab { display: flex; flex-direction: column; gap: 10px; }
.grupo-cab h2, .conexion .con-cab h2 { font-family: var(--f-display); font-size: 26px; font-weight: 500; letter-spacing: .005em; }
.grupo-meta { display: flex; flex-wrap: wrap; gap: 6px 0; align-items: center; font-size: 12.5px; color: var(--texto-2); margin: 0; }
.grupo-meta > span:not(.estado) { padding: 0 14px; border-left: 1px solid var(--linea-2); line-height: 1.1; }
.grupo-meta > .estado { margin-right: 14px; }
.grupo-meta > .estado + span { border-left: 0; padding-left: 0; }
.grupo-acciones { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--linea); margin-bottom: 4px; }
.grupo-acciones .switch-et { margin: 0 8px; }

/* ---------- Conexiones y cuentas ---------- */
.con-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px 14px; flex-wrap: wrap; }
.con-cab .sub { margin-top: 6px; }
.cuenta .con-cab h2 { font-size: 15px; letter-spacing: .02em; }
.datos-con, .cifras { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 16px 14px; margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--linea); }
.datos-con dt, .cifras dt { font-size: 10px; text-transform: uppercase; letter-spacing: .14em; color: var(--texto-3); }
.datos-con dd, .cifras dd { margin: 5px 0 0; font-weight: 500; font-feature-settings: "tnum" 1; overflow-wrap: anywhere; }
.cifras dd { font-size: 15px; }
.cuenta-ctl { display: flex; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.cuenta-ctl .etq-linea { flex: 1 1 120px; }
.cuenta-ctl .celda-num { background: var(--campo); border-color: var(--linea-2); min-height: 32px; }
.cuenta-quemada { opacity: .55; }
.flota-estado { font-size: 13.5px; color: var(--texto-2); margin-bottom: 14px; }

/* ---------- Registro en vivo ---------- */
.registro { list-style: none; margin: 0; padding: 0; max-height: 460px; overflow-y: auto; font-size: 12.5px; }
.reg { display: grid; grid-template-columns: 96px 78px 1fr auto; gap: 10px; padding: 7px 2px; border-bottom: 1px solid var(--linea); align-items: baseline; }
.reg:last-child { border-bottom: 0; }
.reg time { color: var(--texto-3); font-feature-settings: "tnum" 1; }
.reg-nivel { font-size: 9.5px; font-weight: 600; letter-spacing: .14em; color: var(--texto-3); }
.reg-msg { color: var(--texto); }
.reg-error .reg-nivel, .reg-error .reg-msg { color: var(--rojo); }
.reg-aviso .reg-nivel { color: var(--ambar); }
.reg-operacion .reg-nivel { color: var(--champan); }
.reg-pnl { font-weight: 500; font-feature-settings: "tnum" 1; text-align: right; }

/* ---------- Gráfico ---------- */
.grafico { width: 100%; height: auto; max-height: 260px; display: block; }
.grafico .eje { stroke: var(--linea-2); stroke-width: 1; }
.grafico .barra-pos { fill: var(--verde); opacity: .85; }
.grafico .barra-neg { fill: var(--rojo); opacity: .85; }

/* ---------- Calendario ---------- */
.cal-titulo { font-family: var(--f-display); font-size: 24px; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--texto); margin-bottom: 18px; }
.tarjeta > h2.cal-titulo { font-size: 24px; text-transform: none; letter-spacing: 0; color: var(--texto); }
.cal-total { font-family: var(--f-texto); text-transform: none; font-size: 13px; font-weight: 500; letter-spacing: 0; }
.cal { display: flex; flex-direction: column; gap: 6px; }
.cal-fila { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-cab .cal-celda { min-height: 0; background: none; border: 0; text-align: center; color: var(--texto-3); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.cal-celda { min-height: 84px; background: var(--sup-1); border: 1px solid var(--linea); border-radius: var(--r-1); padding: 8px 10px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-vacia { background: transparent; border-color: transparent; }
.cal-dia { font-size: 11.5px; color: var(--texto-3); }
.cal-pnl { font-weight: 500; font-size: 13px; font-feature-settings: "tnum" 1; overflow: hidden; text-overflow: ellipsis; }
.cal-ops { font-size: 11px; color: var(--texto-3); }
.cal-pos { background: var(--verde-tinte); border-color: var(--verde-borde); }
.cal-pos .cal-pnl { color: var(--verde); }
.cal-neg { background: var(--rojo-tinte); border-color: var(--rojo-borde); }
.cal-neg .cal-pnl { color: var(--rojo); }
.cal-hoy { border-color: var(--champan); }
.cal-hoy .cal-dia { color: var(--champan); }

/* ---------- Modales ---------- */
.modal-fondo { position: fixed; inset: 0; background: rgba(8, 7, 6, .74); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; z-index: 50; overflow-y: auto; animation: aparecer var(--t) both; }
.modal { background: var(--sup-1); border: 1px solid var(--linea-2); border-radius: var(--r-3); width: 100%; box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .7); display: flex; flex-direction: column; max-width: 860px; animation: subir 200ms cubic-bezier(.2, .6, .2, 1) both; }
.modal-sm { max-width: 460px; }
.modal-md { max-width: 640px; }
.modal-lg { max-width: 920px; }
.modal-cab { display: flex; justify-content: space-between; align-items: center; padding: 22px 28px 18px; border-bottom: 1px solid var(--linea); gap: 12px; }
.modal-cab h2 { font-family: var(--f-display); font-size: 26px; font-weight: 500; letter-spacing: .005em; }
.modal-cuerpo { padding: 22px 28px; }
.modal-cuerpo > div > .etq:first-child { margin-top: 0; }
.modal-pie { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 28px 20px; border-top: 1px solid var(--linea); flex-wrap: wrap; }
.modal-pie .btn { min-width: 104px; min-height: 40px; }
.modal-pie .btn-primario { min-width: 140px; }
.qr { background: #fff; border-radius: var(--r-1); padding: 8px; display: block; margin: 12px auto; }
.pasos-txt { padding-left: 20px; color: var(--texto-2); }
.pasos-txt li { margin: 6px 0; }
@keyframes aparecer { from { opacity: 0; } to { opacity: 1; } }
@keyframes subir { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Asistente de 6 pasos ---------- */
.asistente { display: flex; flex-direction: column; gap: 20px; }
.pasos { list-style: none; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 0; padding: 0; counter-reset: paso; }
.pasos > li { position: relative; display: flex; justify-content: center; }
.pasos > li:not(:last-child)::after { content: ""; position: absolute; top: 15px; left: calc(50% + 21px); right: calc(-50% + 21px); height: 1px; background: var(--linea-2); }
.pasos > li:has(.paso-hecho):not(:last-child)::after { background: var(--champan-osc); }
.paso { display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 0 4px; border: 0; background: none; color: var(--texto-3); font: inherit; font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; transition: color var(--t); border-radius: var(--r-1); }
.paso:hover:not(:disabled) { color: var(--texto); }
.paso:disabled { cursor: default; opacity: .55; }
.paso-num { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--linea-2); background: var(--sup-1); color: var(--texto-2); font-size: 12px; font-weight: 500; letter-spacing: 0; transition: border-color var(--t), background-color var(--t), color var(--t); }
.paso-hecho { color: var(--texto-2); }
.paso-hecho .paso-num { border-color: var(--champan-osc); color: var(--champan); background: var(--champan-tinte); }
.paso-actual { color: var(--champan-2); }
.paso-actual .paso-num { border-color: var(--champan); background: var(--champan); color: var(--sobre-champan); box-shadow: 0 0 0 4px var(--champan-tinte); }
.panel-paso { background: transparent; border: 1px solid var(--linea); border-radius: var(--r-2); padding: 22px 24px; }
.panel-paso > .etq:first-child { margin-top: 0; }
.opciones { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.opcion { display: flex; align-items: center; gap: 14px; text-align: left; width: 100%; padding: 15px 18px; border-radius: var(--r-2); border: 1px solid var(--linea-2); background: var(--campo); color: var(--texto); font: inherit; cursor: pointer; transition: border-color var(--t), background-color var(--t); }
.opcion:hover { border-color: var(--champan-osc); background: var(--sup-2); }
.opcion-sel, .opcion-sel:hover { border-color: var(--champan); background: var(--champan-tinte); }
.opcion-txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.opcion-txt strong { font-size: 15px; font-weight: 500; }
.opcion-sel .opcion-txt strong { color: var(--champan-2); }
.opcion-sub { color: var(--texto-2); font-size: 12.5px; }
.segmentos { border: 0; padding: 0; margin: 0 0 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.segmentos legend { padding: 0; margin-bottom: 8px; }
.seg { min-width: 68px; padding: 9px 14px; border-radius: var(--r-1); border: 1px solid var(--linea-2); background: var(--campo); color: var(--texto); font: inherit; font-weight: 500; cursor: pointer; transition: border-color var(--t), background-color var(--t), color var(--t); }
.seg:hover:not(:disabled) { border-color: var(--champan-osc); }
.seg:disabled { opacity: .35; cursor: not-allowed; }
.seg-sel, .seg-sel:hover:not(:disabled) { border-color: var(--champan); color: var(--champan-2); background: var(--champan-tinte); }
.gestion { margin-top: 18px; border: 1px solid var(--linea); border-radius: var(--r-2); padding: 16px 18px; }
.gestion .nota { margin: 8px 0 14px; }
.gestion-cajas { display: flex; gap: 12px; flex-wrap: wrap; }
.caja { border: 1px solid var(--linea); border-radius: var(--r-1); padding: 14px; flex: 1 1 220px; background: var(--campo); }
.caja .campo { margin-top: 4px; }
.subpanel { border: 1px solid var(--linea); border-radius: var(--r-2); padding: 16px 18px; margin-top: 14px; }
.subpanel > h3 + .ayuda { margin-top: 4px; }
.lista-cuentas { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 6px; }
.cuenta-disp { width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 12px 14px; border-radius: var(--r-1); border: 1px dashed var(--linea-2); background: transparent; color: var(--texto); font: inherit; font-size: 13px; cursor: pointer; text-align: left; transition: border-color var(--t), background-color var(--t); }
.cuenta-disp:hover { border-color: var(--champan); border-style: solid; background: var(--champan-tinte); }
.ciclo { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 6px; }
.ciclo-fila { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 12px 10px 14px; border: 1px solid var(--linea-2); border-left: 2px solid var(--champan); border-radius: var(--r-1); background: var(--campo); font-size: 13px; }
.ciclo-n { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--champan-osc); color: var(--champan); display: grid; place-items: center; font-size: 11.5px; }
.ciclo-ctl { display: flex; gap: 6px; align-items: center; margin-left: auto; flex-wrap: wrap; }
.mini { display: inline-flex; align-items: center; gap: 2px; background: var(--sup-1); border: 1px solid var(--linea-2); border-radius: var(--r-1); padding: 0 0 0 9px; transition: border-color var(--t); }
.mini:focus-within { border-color: var(--champan); }
.mini span { font-size: 10px; font-weight: 600; letter-spacing: .1em; color: var(--texto-3); }
.mini-tp span { color: var(--verde); }
.mini-sl span { color: var(--rojo); }
.mini input { width: 70px; border: 0; background: transparent; min-height: 32px; padding: 4px 8px; text-align: right; }
.mini input:focus-visible { outline: none; }
.resumen { margin: 6px 0 0; }
.resumen-fila { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--linea); }
.resumen-fila:last-child { border-bottom: 0; }
.resumen dt { font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em; color: var(--texto-3); padding-top: 2px; }
.resumen dd { margin: 0; font-weight: 500; }

/* ---------- Login y 2FA ---------- */
.login {
  flex: 1; display: grid; place-items: center; padding: 32px 16px; min-height: 100vh;
  background:
    radial-gradient(ellipse 60% 45% at 50% 0%, rgba(200, 180, 140, .07), transparent 70%),
    linear-gradient(90deg, transparent calc(50% - .5px), rgba(200, 180, 140, .07) calc(50% - .5px), rgba(200, 180, 140, .07) calc(50% + .5px), transparent calc(50% + .5px)) center top / 100% 22vh no-repeat,
    var(--fondo);
}
.login-caja { width: 100%; max-width: 400px; background: var(--sup-1); border: 1px solid var(--linea); border-radius: var(--r-3); padding: 40px 36px 32px; animation: subir 220ms cubic-bezier(.2, .6, .2, 1) both; }
.login-caja h1 { font-family: var(--f-texto); font-size: 11px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--texto-2); text-align: center; margin-bottom: 8px; padding-top: 24px; border-top: 1px solid var(--linea); }
.login-caja .ayuda { text-align: center; margin-top: 18px; color: var(--texto-3); }
.login-caja #l-codigo { text-align: center; font-size: 22px; letter-spacing: .5em; padding-left: calc(12px + .5em); font-feature-settings: "tnum" 1; }
.login-caja .btn-ancho + .btn-ancho { margin-top: 8px; }

/* ---------- Avisos (toasts) ---------- */
#avisos { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 80; max-width: min(420px, calc(100vw - 32px)); }
.aviso { padding: 12px 16px; border-radius: var(--r-1); background: var(--sup-2); border: 1px solid var(--linea-2); border-left: 2px solid var(--champan); box-shadow: 0 12px 32px -12px rgba(0, 0, 0, .6); font-size: 13px; font-weight: 500; animation: subir 180ms cubic-bezier(.2, .6, .2, 1) both; }
.aviso-ok { border-left-color: var(--verde); }
.aviso-error { border-left-color: var(--rojo); color: #f3cfca; }

/* ---------- Adaptable ---------- */
@media (max-width: 1100px) {
  .dos-col { grid-template-columns: 1fr; }
  .barra, .banner { padding-left: 28px; padding-right: 28px; }
  .principal { padding: 32px 28px 72px; }
}
@media (max-width: 860px) {
  .lateral { position: fixed; left: 0; top: 0; bottom: 0; z-index: 40; transform: translateX(-100%); transition: transform 200ms cubic-bezier(.2, .6, .2, 1), visibility 200ms; visibility: hidden; border-right-color: var(--linea-2); }
  body.menu-abierto .lateral { transform: none; visibility: visible; }
  body.menu-abierto::after { content: ""; position: fixed; inset: 0; background: rgba(8, 7, 6, .6); z-index: 30; }
  .btn-menu { display: inline-flex; }
  .barra { padding: 8px 16px; gap: 12px; }
  .principal { padding: 24px 16px 64px; }
  .banner { padding: 10px 16px; }
  h1 { font-size: 30px; }
  .cab { padding-bottom: 18px; }
  .cab-acciones { width: 100%; }
  .cab-acciones .btn-grande { flex: 1; }
  .tarjeta { padding: 18px 16px; }
  .grupo { padding: 20px 16px 12px; }
  .grupo-cab h2, .conexion .con-cab h2 { font-size: 23px; }
  .grupo-meta { gap: 6px 14px; }
  .grupo-meta > span:not(.estado) { padding: 0; border-left: 0; }
  .grupo-meta > .estado { margin-right: 0; flex-basis: auto; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { padding: 14px 16px; }
  .kpi-v { font-size: 20px; }
  .reg { grid-template-columns: 78px 1fr auto; }
  .reg-nivel { display: none; }
  .cal-celda { min-height: 54px; padding: 4px 5px; }
  .cal-pnl { font-size: 10.5px; }
  .cal-ops { display: none; }
  .ciclo-ctl { margin-left: 0; width: 100%; }
  .modal-fondo { padding: 10px 8px; }
  .modal-cab { padding: 16px 16px 14px; }
  .modal-cab h2 { font-size: 22px; }
  .modal-cuerpo { padding: 16px; }
  .modal-pie { padding: 14px 16px 16px; }
  .modal-pie .btn { flex: 1 1 0; min-width: 0; }
  .panel-paso { padding: 16px; }
  .subpanel, .gestion { padding: 14px; }
  /* Pasos en móvil: solo el número; la etiqueta del paso actual se ve en el título del modal */
  .paso { font-size: 0; gap: 0; }
  .pasos > li:not(:last-child)::after { left: calc(50% + 17px); right: calc(-50% + 17px); }
  .resumen-fila { grid-template-columns: 1fr; gap: 4px; }
  .login-caja { padding: 32px 22px 26px; }
  #avisos { right: 16px; bottom: 16px; }
}

/* Movimiento reducido: sin transiciones ni animaciones */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
