/* Bloques propios de cada vista. Mismos tokens que estilo.css. */

/* ===================================================== 01 Resumen ========= */
.rejilla-resumen {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.col-izq { display: grid; gap: 16px; align-content: start; min-width: 0; }
.col-izq > .panel { margin-bottom: 0; }
.col-der { min-width: 0; }

.rotulo-aviso { font: 600 12.5px var(--cuerpo); flex: none; }
.cuenta-cab { margin-left: 4px; font: 400 12px var(--cuerpo); color: var(--texto-3); }

/* ficheros por buque */
.buque-grupo { border-bottom: 1px solid var(--divisor); }
.buque-grupo:last-child { border-bottom: 0; }
.buque-fila {
  display: flex;
  align-items: baseline;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  background: none;
  border: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
  color: var(--texto);
}
.buque-fila:hover { background: var(--fila-suave); }
.buque-fila .caret { color: var(--texto-3); font-size: 9px; width: 8px; flex: none; }
.buque-fila .casco { font: 500 12px var(--mono); color: var(--texto-2); }
.buque-fila .nom { font: 600 13px var(--titulo); letter-spacing: -.005em; }
.buque-fila .n { margin-left: auto; font: 400 12px var(--cuerpo); color: var(--texto-3); }

.fichero-cab, .fichero-fila {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px 104px auto;
  align-items: baseline;
  gap: 10px;
  padding: 5px 16px 5px 34px;
}
.fichero-cab {
  font: 500 11.5px var(--cuerpo);
  color: var(--texto-3);
  border-top: 1px solid var(--divisor);
  border-bottom: 1px solid var(--divisor);
  background: var(--fila-suave);
}
.fichero-fila { border-bottom: 1px solid var(--divisor); }
.fichero-fila:last-child { border-bottom: 0; }
.fichero-fila:hover { background: var(--fila-suave); }
.fichero-fila .nombre {
  font: 400 12px var(--mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fichero-fila .nombre .desc {
  color: var(--texto-3);
  font-family: var(--cuerpo);
  font-size: 12px;
}
.fichero-fila .mod { font: 400 11.5px var(--mono); color: var(--texto-3); white-space: nowrap; }
.fichero-fila .est { font: 400 12px var(--cuerpo); color: var(--texto-3); }

/* buques y sistemas */
.bs-buque { border-bottom: 1px solid var(--divisor); }
.bs-buque:last-child { border-bottom: 0; }
.bs-cab {
  display: grid;
  grid-template-columns: 8px 72px minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 10px;
  width: 100%;
  padding: 11px 16px;
  background: none;
  border: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
  color: var(--texto);
}
.bs-cab:hover { background: var(--fila-suave); }
.bs-cab .caret { color: var(--texto-3); font-size: 9px; }
.bs-cab .casco { font: 500 12px var(--mono); color: var(--texto-2); }
.bs-cab .nom { font: 600 13px var(--titulo); letter-spacing: -.005em; }
.bs-cab .cifras { display: block; font: 400 11.5px var(--mono); color: var(--texto-3); margin-top: 2px; }
.bs-cab .est { font: 400 12px var(--cuerpo); color: var(--texto-3); }
.bs-sistemas { padding: 2px 16px 12px 34px; }
.bs-sis {
  display: grid;
  /* cuadro · ref · código · nombre · párr. · apart. · % · estado */
  grid-template-columns: 10px 30px 40px minmax(0, 1fr) 66px 72px 50px 64px;
  align-items: baseline;
  gap: 9px;
  padding: 4px 0;
  border-bottom: 1px solid var(--divisor);
}
.bs-sis:last-child { border-bottom: 0; }
.bs-sis .ref { font: 400 11.5px var(--mono); color: var(--texto-3); }
.bs-sis .cod { font: 500 11.5px var(--mono); }
.bs-sis .nom {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--texto-2);
  font-size: 12.5px;
}
.bs-sis .cifra { font: 400 11.5px var(--mono); color: var(--texto-3); text-align: right; white-space: nowrap; }
.bs-sis .est { font: 500 11.5px var(--cuerpo); color: var(--texto-3); text-align: right; white-space: nowrap; }
.bs-sis .est.pedida { color: var(--verde-txt); }

/* ============================================ 02 segmentación manual ====== */
.barra-sesion {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 16px;
  background: var(--panel);
  border: 1px solid var(--divisor);
  border-radius: var(--r);
  box-shadow: var(--sombra-panel);
  margin-bottom: 16px;
  font-size: 12.5px;
}
.barra-sesion .sep { color: var(--pista); }
.barra-sesion b { font-weight: 500; font-family: var(--mono); font-size: 12px; color: var(--texto); }
.progreso { display: flex; align-items: center; gap: 8px; }
.cifra-sesion { font: 600 15px var(--cuerpo); font-variant-numeric: tabular-nums; }
.pista-progreso {
  display: inline-block;
  width: 140px;
  height: 4px;
  background: var(--pista);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.pista-progreso > i { position: absolute; inset: 0 auto 0 0; background: var(--acento); width: 0; border-radius: 2px; }

.segmentador {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 380px;
  gap: 16px;
  /* sin align-items:start: los paneles se estiran a la altura de la fila. Con
     "start" el alto de la fila lo marca el contenido, "height:100%" queda
     circular y cae a auto: el panel crecia a 14.000 px con sus 325 apartados y
     la barra de corte se iba fuera de la pantalla. */
  height: calc(100vh - 198px);
  min-height: 0;
}
.segmentador > .panel {
  display: flex;
  flex-direction: column;
  margin: 0;
  min-width: 0;
  min-height: 0;   /* para que el hijo con overflow pueda encoger y hacer scroll */
  overflow: hidden;
}
#indice-apartados, #cortes { overflow-y: auto; flex: 1; min-height: 0; }
#indice-apartados { padding: 4px; }

.ap-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 7px;
  width: 100%;
  padding: 5px 8px;
  background: none;
  border: 0;
  border-radius: var(--r-xs);
  font: 400 12px var(--cuerpo);
  text-align: left;
  cursor: pointer;
  color: var(--texto-2);
}
.ap-item:hover { background: var(--cabecera-tabla); }
.ap-item.actual {
  background: var(--acento-100);
  box-shadow: inset 2px 0 0 var(--acento);
  color: var(--acento-900);
}
.ap-item.revisado .ref { color: var(--texto-3); }
.ap-item .ref { font: 500 11.5px var(--mono); }
.ap-item .tit { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-item .franjas, .ap-cap-cab .franjas { display: flex; align-items: center; gap: 2px; flex: none; }
.ap-item .franja, .ap-cap-cab .franja {
  width: 4px;
  height: 11px;
  border-radius: 1px;
  background: var(--contorno);
}

.visor-spec { min-width: 0; }
.papel {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: var(--panel);
  padding: 18px 22px;
}
.par {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  padding: 4px 8px 4px 0;
  cursor: pointer;
  border-radius: var(--r-xs);
  margin-bottom: 2px;
}
.par:hover { background: var(--fila-suave); }
.par .n { font: 400 11px var(--mono); color: var(--texto-3); padding-top: 2px; text-align: right; }
.par .txt { font-size: 13px; line-height: 1.6; color: var(--texto); }
.par.cortado { background: var(--relleno); box-shadow: inset 3px 0 0 var(--contorno); }
.par.sel { background: var(--acento-100); box-shadow: inset 3px 0 0 var(--acento); }
.par .marcas { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.par .marca {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font: 500 10.5px var(--mono);
  padding: 0 6px;
  border-radius: 999px;
  border: 1px solid var(--contorno);
  background: var(--panel);
  color: var(--tinta);
}

.barra-corte {
  flex: none;
  border-top: 1px solid var(--divisor);
  padding: 10px 14px;
  background: var(--fila-suave);
  display: grid;
  gap: 8px;
}
.cita-viva { display: flex; align-items: baseline; gap: 10px; font: 400 12px var(--mono); }
.rotulo-cita { font: 500 11.5px var(--cuerpo); color: var(--texto-3); flex: none; }
.cita-viva.invalida { color: var(--rojo-txt); }
.controles-corte { display: flex; align-items: center; gap: 8px; }
.controles-corte label.en-linea {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
}
.controles-corte select { margin: 0; }

.corte-grupo { border-bottom: 1px solid var(--divisor); }
.corte-grupo:last-child { border-bottom: 0; }
.corte-grupo-cab {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 14px;
  background: var(--fila-suave);
  border-bottom: 1px solid var(--divisor);
}
.corte-grupo-cab .cod { font: 500 12px var(--mono); }
.corte-grupo-cab .nom {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 500 12.5px var(--cuerpo);
  color: var(--texto);
}
.corte-grupo-cab .n { font: 400 11px var(--mono); color: var(--texto-3); }
.corte-fila {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 6px 14px;
  border-bottom: 1px solid var(--divisor);
}
.corte-fila:last-child { border-bottom: 0; }
.corte-fila:hover { background: var(--fila-suave); }
.corte-fila .cita {
  flex: 1;
  min-width: 0;
  font: 400 11.5px var(--mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.corte-fila .np { font: 400 11px var(--mono); color: var(--texto-3); white-space: nowrap; }

/* ============================================ vista previa del correo ===== */
#previa-correo { width: min(860px, 92vw); height: 88vh; }
.previa-cabeceras {
  flex: none;
  padding: 12px 16px;
  border-bottom: 1px solid var(--divisor);
  background: var(--fila-suave);
  display: grid;
  gap: 5px;
}
.previa-fila {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
}
.previa-fila dt { font: 500 11.5px var(--cuerpo); color: var(--texto-3); }
.previa-fila dd { margin: 0; font: 400 12px var(--mono); overflow-wrap: anywhere; }
.previa-fila.asunto dd { font: 600 13px var(--cuerpo); letter-spacing: -.005em; }
.adjunto-ficha {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  border: 1px solid var(--divisor);
  border-radius: var(--r-sm);
  background: var(--panel);
  padding: 1px 8px;
  margin-right: 5px;
  font: 400 11.5px var(--mono);
}
.adjunto-ficha .peso { color: var(--texto-3); font-size: 11px; }
#previa-cuerpo { flex: 1; width: 100%; border: 0; background: #fff; }
.previa-pie {
  flex: none;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  border-top: 1px solid var(--divisor);
  background: var(--fila-suave);
}
.previa-pie .casilla { margin: 0; }

/* ======================================================= BD › Buques ====== */
.split-inv { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
input.mono { font-family: var(--mono); font-size: 12px; }
tr.fila-activa td { background: var(--acento-100); }
tr.fila-activa td:first-child { box-shadow: inset 2px 0 0 var(--acento); font-weight: 500; }
#form-buque .grupo-btn { margin-top: 4px; }

/* ======================================================= BD › Varios ====== */
input.plantilla { margin-top: 0; font-size: 14px; padding: 8px 11px; letter-spacing: .01em; }
.fichas-campo { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 14px; }
.ficha-campo {
  font: 500 11.5px var(--mono);
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px dashed var(--borde-control);
  background: var(--fila-suave);
  color: var(--texto-2);
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.ficha-campo:hover { border-style: solid; border-color: var(--acento-300); background: var(--acento-100); color: var(--acento-800); }
.previa-asunto {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--divisor);
  border-radius: var(--r-sm);
  background: var(--fila-suave);
}
.previa-asunto .mono { font: 500 14px var(--mono); color: var(--texto); }
#asunto-nota { margin: 10px 0 14px; }
.malo.nota, .previa-asunto .malo { color: var(--rojo-txt); }

.almacen-fila {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--divisor);
}
.segmentado.compacto { margin-top: 0; width: 200px; }

.conexion { border-bottom: 1px solid var(--divisor); }
.conexion:last-child { border-bottom: 0; }
.conexion.abierta { background: var(--fila-suave); }
.conexion-cab {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
}
.punto { width: 8px; height: 8px; border-radius: 50%; background: var(--borde-control); }
.punto.verde { background: #34a36b; box-shadow: 0 0 0 3px rgba(52, 163, 107, .15); }
.punto.ambar { background: #e0a23a; box-shadow: 0 0 0 3px rgba(224, 162, 58, .16); }
.punto.rojo { background: #d4493f; box-shadow: 0 0 0 3px rgba(212, 73, 63, .14); }
.conexion-txt { display: grid; min-width: 0; }
.conexion-txt .nom { font: 500 13px var(--cuerpo); }
.conexion-txt .det {
  font: 400 11.5px var(--mono);
  color: var(--texto-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.conexion-cab .est { font: 500 11.5px var(--cuerpo); color: var(--texto-3); white-space: nowrap; }
.conexion-cab .est.verde { color: var(--verde-txt); }
.conexion-cab .est.ambar { color: var(--ambar-txt); }
.conexion-cab .est.rojo { color: var(--rojo-txt); }
.conexion-campos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
  padding: 2px 16px 14px 36px;
}
.conexion-campos .grupo-btn { grid-column: 1 / -1; flex-wrap: wrap; }
.resultado-prueba { margin-left: 4px; }
.resultado-prueba.ok { color: var(--verde-txt); }

/* diálogo de usuario */
dialog.dialogo-corto { width: min(460px, 92vw); height: fit-content; }
dialog.dialogo-corto form { display: flex; flex-direction: column; }

/* el segmento pulsado, del mismo cristal que los botones */
.segmentado button[aria-pressed="true"] {
  background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(255, 255, 255, .78));
  box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgba(18, 20, 24, .10), 0 3px 8px -4px rgba(18, 20, 24, .22),
              0 0 0 1px rgba(18, 20, 24, .05);
  transition: box-shadow .2s;
}
.segmentado, .segmentado button { border-radius: 999px; }
#tabla-buques td:first-child { white-space: nowrap; }
dialog .cuerpo { padding: 14px 16px 4px; }

/* paso − n + : cápsula con los extremos del mismo pizarra claro que los botones */
.paso { border-radius: 999px; box-shadow: inset 0 0 0 1px var(--borde-control); width: max-content; }
.paso button {
  width: 32px;
  border: 0;
  background: linear-gradient(180deg, var(--secundario-luz), var(--secundario) 60%);
  color: var(--secundario-texto);
  font-weight: 500;
  transition: background .2s;
}
.paso button:hover { background: linear-gradient(180deg, var(--secundario), var(--secundario-hover) 60%); }
.paso button:active { transform: scale(.94); }
.paso button:first-child { border-radius: 999px 0 0 999px; }
.paso button:last-child { border-radius: 0 999px 999px 0; }
.paso input { border: 0; border-top: 1px solid var(--borde-control); border-bottom: 1px solid var(--borde-control); }
.almacen-fila .rotulo { white-space: nowrap; }

/* corte por frase: cada frase es seleccionable; la cubierta por un sistema se
   tiñe de su familia y la seleccionada de cobalto */
.par.cortado { background: none; box-shadow: inset 3px 0 0 var(--contorno); }
.par.sel { background: none; box-shadow: inset 3px 0 0 var(--acento); }
.par .n { cursor: pointer; border-radius: var(--r-xs); }
.par .n:hover { color: var(--acento-700); background: var(--acento-100); }
.frase { border-radius: 3px; padding: 1px 0; transition: background-color .12s; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.frase:hover { background: var(--cabecera-tabla); }
.frase.cubierta { background: var(--relleno); }
.frase.cubierta:hover { background: color-mix(in oklch, var(--relleno), var(--contorno) 18%); }
.frase.sel, .frase.sel:hover { background: var(--acento-200); box-shadow: 0 0 0 1px var(--acento-300); }
.papel ::selection { background: var(--acento-200); }

/* índice de apartados en árbol: capítulo > 1.1 > 1.1.1, plegable */
.ap-cap { border-bottom: 1px solid var(--divisor); }
.ap-cap:last-child { border-bottom: 0; }
.ap-cap-cab {
  display: grid;
  grid-template-columns: 12px 18px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 8px 8px;
  background: none;
  border: 0;
  border-radius: var(--r-xs);
  font: 600 12.5px var(--cuerpo);
  color: var(--texto);
  text-align: left;
  cursor: pointer;
}
.ap-cap-cab:hover { background: var(--cabecera-tabla); }
.ap-cap-cab .num { font: 500 11.5px var(--mono); color: var(--texto-3); }
.ap-cap-cab .tit { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-cap-cab .avance { font: 400 10.5px var(--mono); color: var(--texto-3); }
.ap-cap-cab.contiene .num { color: var(--acento); }
.ap-cap.abierto > .ap-cap-cab { color: var(--texto); }
.caret-arbol { font-size: 9px; color: var(--texto-3); text-align: center; }

.ap-hijos { margin: 0 0 6px 13px; padding-left: 4px; border-left: 1px solid var(--divisor); }
.ap-item { grid-template-columns: 12px 38px minmax(0, 1fr) auto; }
.ap-item.nivel-3 { padding-left: 22px; grid-template-columns: 0 42px minmax(0, 1fr) auto; }
.ap-item.nivel-3 .ref { color: var(--texto-3); }
.ap-item.nivel-3.actual .ref { color: inherit; }
.ap-item.sin-texto { cursor: default; color: var(--texto-3); }
.franjas .mas { font: 500 9.5px var(--mono); color: var(--texto-3); margin-left: 2px; line-height: 11px; }

/* puntos de estado de Conexiones: laten según su estado */
.punto { position: relative; }
.punto::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: inherit;
  opacity: 0;
}
.punto.verde { animation: respira 2.8s ease-in-out infinite; }
.punto.verde::after { animation: onda 2.8s ease-out infinite; }
.punto.ambar::after { animation: onda 2.2s ease-out infinite; }
.punto.rojo { animation: alerta 1.4s ease-in-out infinite; }
.punto.rojo::after { animation: onda 1.4s ease-out infinite; }
@keyframes onda {
  0% { transform: scale(1); opacity: .55; }
  80%, 100% { transform: scale(3.2); opacity: 0; }
}
@keyframes respira { 0%, 100% { opacity: 1; } 50% { opacity: .7; } }
@keyframes alerta { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.25); } }
@media (prefers-reduced-motion: reduce) {
  .punto, .punto::after { animation: none !important; }
}

/* ================================================= BD › Proveedores ====== */
.barra-padron .entrada-busqueda { width: 280px; margin: 0; }
.barra-padron select { width: 230px; margin: 0; }
.split-inv.padron { grid-template-columns: minmax(0, 1fr) 310px; }
.enlace-web { color: var(--acento-700); text-decoration: none; font: 400 12px var(--mono); }
.enlace-web:hover { text-decoration: underline; text-underline-offset: 2px; }
.enlace-web::after { content: " ↗"; font-family: var(--cuerpo); font-size: 10px; color: var(--texto-3); }
.fichas-equipo { display: inline-flex; flex-wrap: wrap; gap: 3px; align-items: center; }
.ficha-equipo {
  font: 500 10.5px var(--mono);
  padding: 0 6px;
  border-radius: 999px;
  background: var(--cabecera-tabla);
  border: 1px solid var(--divisor);
  color: var(--texto-2);
}
.ficha-equipo.marcada { background: var(--acento-100); border-color: var(--acento-300); color: var(--acento-800); }
#tabla-proveedores tbody tr { cursor: pointer; }
.panel-proveedor { position: sticky; top: 0; }
.panel-proveedor .lista-datos .dato dd { font-family: var(--cuerpo); font-size: 12.5px; }
.lista-equipos { display: grid; gap: 2px; max-height: calc(100vh - 470px); overflow-y: auto; }
.familia-equipos { font: 500 11.5px var(--cuerpo); color: var(--texto-3); margin: 8px 0 2px; }
.familia-equipos:first-child { margin-top: 0; }
.casilla.equipo { align-items: center; padding: 3px 6px; border-radius: var(--r-xs); cursor: pointer; }
.casilla.equipo:hover { background: var(--fila-suave); }
.casilla.equipo .cod { font: 500 11.5px var(--mono); width: 36px; flex: none; }

/* ventana de importación */
#dlg-importar { width: min(760px, 92vw); height: min(80vh, 720px); }
.imp-cuerpo { flex: 1; overflow-y: auto; padding: 16px; display: grid; gap: 10px; align-content: start; }
.imp-resumen { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.imp-cifra { border: 1px solid var(--divisor); border-radius: var(--r); padding: 10px 12px; display: grid; }
.imp-cifra b { font: 600 20px var(--cuerpo); font-variant-numeric: tabular-nums; }
.imp-cifra span { font: 500 11.5px var(--cuerpo); color: var(--texto-3); }
.imp-cifra.nuevos b { color: var(--verde-txt); }
.imp-cifra.cambian b { color: var(--acento-700); }
.imp-cifra.avisos b { color: var(--ambar-txt); }
.imp-cuerpo h4 { margin: 8px 0 0; }
.imp-cuerpo table td { padding: 5px 10px; }
.imp-cambio { border: 1px solid var(--divisor); border-radius: var(--r); padding: 8px 12px; }
.imp-cambio .nom { font: 600 12.5px var(--cuerpo); margin-bottom: 4px; }
.imp-campo { display: grid; grid-template-columns: 120px minmax(0, 1fr) 16px minmax(0, 1fr); gap: 8px; font-size: 12px; padding: 2px 0; }
.imp-campo .etq { color: var(--texto-3); }
.imp-campo .antes { color: var(--texto-3); text-decoration: line-through; overflow-wrap: anywhere; }
.imp-campo .despues { color: var(--texto); font-weight: 500; overflow-wrap: anywhere; }
.imp-campo .flecha { color: var(--texto-3); }
.imp-aviso { font-size: 12px; color: var(--ambar-txt); background: var(--ambar-fondo); border: 1px solid var(--ambar-borde); border-radius: var(--r-sm); padding: 5px 10px; }

#tabla-proveedores td.corta { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#tabla-proveedores td:nth-child(4) { white-space: nowrap; }
#tabla-proveedores th, #tabla-proveedores td { padding-left: 9px; padding-right: 9px; }
#tabla-proveedores td:nth-child(6) { min-width: 110px; }
.prov-nombre { font-weight: 500; }
.prov-razon { font-size: 11.5px; color: var(--texto-3); margin-top: 1px; }

.campo-clave { display: flex; gap: 6px; align-items: center; margin-top: 5px; }
.campo-clave input { margin: 0; flex: 1; font-size: 13.5px; letter-spacing: .04em; }
#usr-l-clave > .nota { display: block; margin-top: 5px; font-weight: 400; }

/* vista previa de importación: tabla fija, textos largos (varios emails) recortados */
.tabla-previa { table-layout: fixed; }
.tabla-previa td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabla-previa td:nth-child(1), .tabla-previa td:nth-child(2) { width: 30%; }
.tabla-previa td:nth-child(4) { width: 90px; }
#tabla-proveedores .fila-mas td { padding: 12px; }
#tabla-proveedores .fila-mas:hover { background: none; }

/* ===================================================== visor de oferta ===== */
#visor-oferta { width: min(1320px, 95vw); height: 92vh; }
.vo-adjuntos { flex: none; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 9px 16px; border-bottom: 1px solid var(--divisor); }
.vo-adjuntos .rotulo { margin-right: 6px; }
.vo-ficha { cursor: pointer; font-family: var(--mono); transition: border-color .15s, background .15s; }
.vo-ficha:hover { border-color: var(--acento-300); }
.vo-ficha.activa { border-color: var(--acento); background: var(--acento-100); color: var(--acento-800); }
.vo-ficha:disabled { opacity: .5; cursor: not-allowed; }
.vo-cuerpo { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(260px, 32%) minmax(0, 1fr); }
.vo-texto { min-height: 0; overflow: auto; padding: 14px 16px; border-right: 1px solid var(--divisor); background: var(--fila-suave); }
.vo-texto pre { margin: 8px 0 0; white-space: pre-wrap; font: 400 12.5px/1.6 var(--cuerpo); color: var(--texto); }
.vo-documento { min-height: 0; display: flex; flex-direction: column; background: #525659; }
.vo-doc-cab { flex: none; display: flex; align-items: center; gap: 10px; padding: 7px 12px; background: var(--panel); border-bottom: 1px solid var(--divisor); }
.vo-doc-cab .nom { flex: 1; font: 500 12px var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vo-pdf { flex: 1; width: 100%; border: 0; }
.vo-documento .vacio { margin: auto; color: #e8e8e8; }
/* visor de adjuntos (Ofertas y Correo): imagen, texto, avisos */
#visor-adjunto { width: min(1100px, 95vw); height: 88vh; }
#visor-adjunto .vo-documento { flex: 1; }
.adjunto-imagen { flex: 1; min-height: 0; overflow: auto; display: flex; align-items: center; justify-content: center; padding: 16px; }
.adjunto-imagen img { max-width: 100%; max-height: 100%; object-fit: contain; background: #fff; }
.adjunto-texto { flex: 1; min-height: 0; overflow: auto; margin: 0; padding: 14px 16px; background: var(--panel);
  white-space: pre-wrap; font: 400 12.5px/1.55 var(--mono); color: var(--texto); }
.adjunto-bloqueado { margin: auto; max-width: 460px; padding: 16px 18px; border: 1px solid var(--rojo-borde); border-radius: var(--r);
  background: var(--rojo-fondo); color: var(--rojo-txt); font-size: 13px; }
.adjunto-bloqueado p { margin: 6px 0 0; }
.aviso-adjunto { flex: none; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 11px/1.5 var(--cuerpo);
  padding: 0 8px; border-radius: 999px; color: var(--ambar-txt); border: 1px solid var(--ambar-borde); background: var(--ambar-fondo); }
.aviso-adjunto.peligro { color: var(--rojo-txt); border-color: var(--rojo-borde); background: var(--rojo-fondo); }
.vo-ficha.peligro { border-color: var(--rojo-borde); color: var(--rojo-txt); background: var(--rojo-fondo); }
.vo-ficha.dudoso { border-color: var(--ambar-borde); }

/* modo Editar/Guardar: cabecera de sección con sus botones */
.cab-seccion { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cab-seccion .rotulo { margin: 0 !important; }
.cab-seccion { margin: 16px 0 8px; }
.casilla.equipo:has(input:disabled) { cursor: default; }
.casilla.equipo input:disabled { opacity: .55; }
#prov-detalle.editando .lista-equipos { outline: 1px dashed var(--acento-300); outline-offset: 4px; border-radius: var(--r-sm); }
.imputa-cab input:disabled { background: transparent; border-color: transparent; box-shadow: none; color: var(--texto); }

/* tipos de cambio */
.caja-tipos { display: flex; flex-direction: column; gap: 6px; }
.tipos-lista { display: grid; gap: 2px; }
.tipo-fila { display: flex; justify-content: space-between; gap: 10px; font: 500 12.5px var(--mono); }
.tipo-fila .cod { color: var(--texto-3); }
.tipo-fila.falta .val { color: var(--ambar-txt); font-family: var(--cuerpo); font-weight: 400; }
.caja-tipos .btn { align-self: flex-start; margin-top: 2px; }
.aviso-tipo { color: var(--ambar-txt) !important; }
#dlg-tipos { width: min(720px, 92vw); height: min(80vh, 680px); }
#tabla-tipos tr.principal td:first-child { font-weight: 600; }
#tabla-tipos td.falta { color: var(--ambar-txt); font-family: var(--cuerpo); }
.campo-tipo { width: 130px; margin: 0; text-align: right; }
.tipos-anadir { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.tipos-anadir select { width: 320px; margin: 0; }
.tipos-anadir label { margin: 0; display: flex; align-items: center; gap: 8px; }

/* ============================================= Mailing y Peticiones ======= */
.grupo-sistema { display: grid; gap: 8px; margin-bottom: 14px; }
.grupo-sistema:last-child { margin-bottom: 0; }
.grupo-sistema-cab { display: flex; align-items: center; gap: 8px; padding: 2px 2px 0; }
.grupo-sistema-cab .cod { font: 600 12.5px var(--mono); }
.grupo-sistema-cab .nom { font: 600 13px var(--cuerpo); flex: 1; }
.envio .para { color: var(--texto-3); font-size: 11.5px; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.envio .est.malo { color: var(--rojo-txt); }
.etiqueta.error { color: var(--rojo-txt); border-color: var(--rojo-borde); background: var(--rojo-fondo); }

/* ================================================ plantillas de correo ===== */
.panel-plantillas .panel-cabecera .segmentado.compacto { width: 290px; }
.plantillas-cuerpo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.plantillas-editor { padding: 14px 16px; border-right: 1px solid var(--divisor); }
.plantillas-editor textarea, .firma-bloque textarea {
  width: 100%; margin-top: 5px; resize: vertical;
  font: 400 12.5px/1.55 var(--cuerpo); color: var(--texto);
  padding: 9px 11px; border: 1px solid var(--borde-control); border-radius: var(--r-sm); background: var(--panel);
}
.plantillas-editor textarea:focus, .firma-bloque textarea:focus { outline: 0; border-color: var(--acento); box-shadow: var(--anillo); }
.plantillas-editor .fichas-campo { margin: 6px 0 10px; }
.plantillas-editor .ficha-campo:disabled { opacity: .45; cursor: default; }
.plantillas-editor input[readonly], .plantillas-editor textarea[readonly], .firma-bloque textarea[readonly] {
  background: var(--fila-suave); color: var(--texto-2);
}
.panel-plantillas.editando .plantillas-editor { background: linear-gradient(var(--acento-100), transparent 60px); }
.plantillas-previa { display: flex; flex-direction: column; min-height: 520px; padding: 14px 16px; gap: 10px; background: var(--fila-suave); }
.plantillas-previa iframe { flex: 1; width: 100%; border: 1px solid var(--divisor); border-radius: var(--r); background: #fff; }
.firma-bloque { padding: 0; }
.firma-bloque textarea.prestada { color: var(--texto-3); font-style: italic; }
.firma-bloque .cab-seccion { margin: 0 0 4px; }

.selector-plantilla { width: 300px; margin: 0; }

/* ============================================ Pendientes › Revisar correo === */
.ficha-idioma { font: 600 10.5px var(--mono); padding: 1px 7px; border-radius: 999px; background: var(--cabecera-tabla); border: 1px solid var(--divisor); color: var(--texto-2); white-space: nowrap; }
#dlg-envio { width: min(1320px, 95vw); height: 92vh; }
.env-barra { flex: none; display: flex; align-items: center; gap: 16px; padding: 9px 16px; border-bottom: 1px solid var(--divisor); }
.env-barra label { margin: 0; display: flex; align-items: center; gap: 8px; }
.env-barra select { width: auto; min-width: 180px; margin: 0; }
.env-cuerpo { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.env-editor { min-height: 0; display: flex; flex-direction: column; padding: 14px 16px; border-right: 1px solid var(--divisor); }
.env-l-texto { flex: 1; min-height: 0; display: flex; flex-direction: column; }
#env-texto { flex: 1; width: 100%; margin-top: 5px; resize: none; font: 400 12.5px/1.55 var(--cuerpo); padding: 10px 12px;
  border: 1px solid var(--borde-control); border-radius: var(--r-sm); background: var(--panel); color: var(--texto); }
#env-texto:focus { outline: 0; border-color: var(--acento); box-shadow: var(--anillo); }
#env-texto[readonly], #env-asunto[readonly] { background: var(--fila-suave); color: var(--texto-2); }
#dlg-envio.editando .env-editor { background: linear-gradient(var(--acento-100), transparent 70px); }
.env-previa { min-height: 0; display: flex; flex-direction: column; background: var(--fila-suave); }
.env-previa iframe { flex: 1; width: 100%; border: 0; background: #fff; }

/* Padrón: varios emails / teléfonos / contactos, uno por línea */
td.varios, dd.varios { white-space: normal; }
.varios-linea { line-height: 1.45; }
dd.varios .varios-linea { overflow-wrap: anywhere; }
td.varios.mono .varios-linea, dd.varios.mono .varios-linea { font-size: 11.5px; }

/* Pendientes: idioma de toda la petición (Según país por defecto) */
.rfq-idioma { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.rfq-idioma .rotulo-idioma { font: 500 11px var(--cuerpo); color: var(--texto-3); }
.rfq-idioma .segmentado { margin-top: 0; width: 330px; }
.segmentado button { white-space: nowrap; }
.rfq-idioma:not(.editando) .segmentado button:disabled { cursor: default; }
.rfq-idioma:not(.editando) .segmentado button:disabled:not([aria-pressed="true"]) { opacity: .55; }
.ficha-idioma.elegido { border-color: var(--texto-3); color: var(--texto); }

/* ================================================================ 2026-09-26 */

/* Varios en subpestañas */
.pestanas { display: flex; gap: 2px; margin-bottom: 16px; border-bottom: 1px solid var(--divisor); }
.pestanas [role="tab"] {
  padding: 8px 14px 9px; background: none; border: 0; border-bottom: 2px solid transparent;
  margin-bottom: -1px; font: 500 12.5px var(--cuerpo); color: var(--texto-3); cursor: pointer;
}
.pestanas [role="tab"]:hover { color: var(--texto); }
.pestanas [role="tab"][aria-selected="true"] { color: var(--texto); border-bottom-color: var(--tinta-ui); }
#v-bd-varios .pestana { display: none; }
#v-bd-varios .pestana.activa { display: block; }

/* Mi firma: vista normal y HTML lado a lado */
.firma-herramientas { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 8px 16px; border-bottom: 1px solid var(--divisor); }
.firma-herramientas button:not(.btn) {
  min-width: 30px; padding: 4px 9px; background: var(--panel); border: 1px solid var(--borde-control);
  border-radius: var(--r-xs); font: 500 12px var(--cuerpo); color: var(--texto-2); cursor: pointer;
}
.firma-herramientas button:not(.btn):hover:not(:disabled) { background: var(--cabecera-tabla); color: var(--texto); }
.firma-herramientas button:disabled { opacity: .45; cursor: default; }
.firma-dos { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; padding: 14px 16px 6px; }
.firma-panel { display: flex; flex-direction: column; gap: 6px; min-height: 300px; }
.firma-panel iframe, .firma-panel textarea {
  flex: 1; width: 100%; min-height: 300px; border: 1px solid var(--borde-control); border-radius: var(--r-sm); background: #fff;
}
.firma-panel textarea { font: 400 11.5px/1.5 var(--mono); padding: 10px 12px; resize: vertical; }
.firma-bloque > .nota { padding: 0 16px; margin: 6px 0 10px; }
.firma-bloque.editando .firma-panel iframe { border-color: var(--acento-300); box-shadow: var(--anillo); }

/* Sistemas › cargos del libro */
.sistemas-cargos { grid-template-columns: minmax(0, 1fr) 380px; }
#tabla-sistemas tbody tr { cursor: pointer; }
.lista-cargos-sistema { display: grid; gap: 6px; margin-bottom: 10px; }
.cargo-sistema { display: grid; grid-template-columns: 74px minmax(0, 1fr) 62px 14px auto; align-items: center; gap: 6px; }
.cargo-sistema input { margin: 0; padding: 5px 7px; }
.cargo-sistema input.pct { text-align: right; }
.cargo-sistema .nom { font-size: 12px; color: var(--texto-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cargo-sistema .nom.malo { color: var(--rojo-txt); }
.cargo-sistema input:disabled { background: transparent; border-color: transparent; color: var(--texto); padding-left: 0; }
.total-reparto { margin: 10px 0 6px; font: 500 12px var(--mono); color: var(--texto-2); }
.total-reparto.malo { color: var(--rojo-txt); }
.panel-cargos-sistema.editando { border-color: var(--acento-300); }

/* Mailing › Correo: carpetas | lista | lectura */
.correo { display: grid; grid-template-columns: 210px minmax(280px, 380px) minmax(0, 1fr); gap: 12px;
          height: calc(100vh - 150px); min-height: 480px; }
.correo[hidden] { display: none; }
.correo > .panel { margin: 0; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.correo-nuevo { padding: 12px; border-bottom: 1px solid var(--divisor); }
#correo-lista-carpetas { flex: 1; overflow-y: auto; padding: 6px; }
.carpeta-correo {
  display: flex; width: 100%; align-items: center; gap: 6px; padding: 7px 10px; border: 0; background: none;
  border-radius: var(--r-sm); font: 400 12.5px var(--cuerpo); color: var(--texto-2); cursor: pointer; text-align: left;
}
.carpeta-correo.hija { padding-left: 24px; }
.carpeta-correo:hover { background: var(--cabecera-tabla); color: var(--texto); }
.carpeta-correo.activa { background: var(--acento-100); color: var(--acento-800); font-weight: 500; }
.carpeta-correo .nom { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.carpeta-correo .n { font: 500 11px var(--mono); color: var(--texto-3); }
.carpeta-correo .n.fuerte { color: var(--acento-700); font-weight: 600; }
.correo-cuenta { padding: 10px 12px; border-top: 1px solid var(--divisor); font-size: 11px; overflow-wrap: anywhere; }
.correo-barra { display: flex; gap: 6px; padding: 10px; border-bottom: 1px solid var(--divisor); }
.correo-barra input { margin: 0; flex: 1; }
.correo-cab-lista { display: flex; align-items: baseline; justify-content: space-between; padding: 8px 12px 6px; }
.correo-cab-lista h2 { margin: 0; font: 600 13px var(--titulo); }
.correo-cab-lista .nota { font-size: 10.5px; }
.correo-lista { flex: 1; overflow-y: auto; }
.msg {
  display: block; width: 100%; text-align: left; padding: 9px 12px 10px; background: none; border: 0;
  border-top: 1px solid var(--divisor); cursor: pointer; font-family: var(--cuerpo); color: var(--texto-2);
}
.msg:hover { background: var(--fila-suave); }
.msg.activo { background: var(--acento-100); box-shadow: inset 2px 0 0 var(--acento); }
.msg.no-leido { box-shadow: inset 3px 0 0 var(--tinta-ui); }
.msg.no-leido.activo { box-shadow: inset 3px 0 0 var(--acento); }
.msg-l1, .msg-l2 { display: flex; align-items: baseline; gap: 6px; }
.msg-l1 .quien { flex: 1; font-size: 12.5px; color: var(--texto); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg.no-leido .msg-l1 .quien, .msg.no-leido .asunto { font-weight: 600; }
.msg-l1 .cuando { font: 400 10.5px var(--mono); color: var(--texto-3); white-space: nowrap; }
.msg-l2 .asunto { flex: 1; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg.no-leido .msg-l2 .asunto { color: var(--acento-800); }
.msg-l2 .clip { font-size: 11px; }
.msg-l2 .importante { color: var(--rojo-txt); font-weight: 700; }
.msg-l3 { margin-top: 2px; font-size: 11.5px; color: var(--texto-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-mas { margin: 10px auto; display: block; }
.correo-lectura > .vacio { margin: auto; }
.lectura-cab { padding: 14px 16px 10px; border-bottom: 1px solid var(--divisor); }
.lectura-asunto { margin: 0 0 8px; font: 600 16px var(--titulo); letter-spacing: -.01em; }
.lectura-cab .previa-cabeceras { margin: 0 0 10px; padding: 0; border: 0; }
.lectura-acciones { flex-wrap: wrap; }
.lectura-adjuntos { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 16px; border-bottom: 1px solid var(--divisor); background: var(--fila-suave); }
.lectura-adjuntos .adjunto-ficha { gap: 8px; }
.lectura-cuerpo { flex: 1; width: 100%; border: 0; background: #fff; }
.correo-sin-conexion { max-width: 620px; margin: 40px auto; padding: 28px 32px; background: var(--panel);
  border: 1px solid var(--divisor); border-radius: var(--r); box-shadow: var(--sombra-panel); }
.correo-sin-conexion[hidden] { display: none; }
.correo-sin-conexion h2 { margin: 0 0 6px; font: 600 17px var(--titulo); }
.pasos-conexion { margin: 16px 0 20px; padding-left: 20px; color: var(--texto-2); font-size: 13px; line-height: 1.7; }
.nota.malo { color: var(--rojo-txt); }

/* Redactar */
dialog.redactar { width: min(980px, 94vw); height: 90vh; }
.red-campos { padding: 6px 16px 2px; border-bottom: 1px solid var(--divisor); }
.red-fila { display: flex; align-items: center; gap: 10px; margin: 0; padding: 4px 0; border-bottom: 1px solid var(--divisor); }
.red-fila[hidden] { display: none; }
.red-fila:last-child { border-bottom: 0; }
.red-fila > span { width: 52px; flex: none; font: 500 12px var(--cuerpo); color: var(--texto-3); }
/* el borde se ve siempre: que se sepa dónde hacer clic sin probar */
.red-fila input { margin: 0; border-color: #b4b8c0; box-shadow: none; padding-left: 7px; }
.red-fila input:hover:not([readonly]) { border-color: var(--texto-3); }
.red-fila input:focus:not([readonly]) { border-color: var(--acento); box-shadow: var(--anillo); }
.red-importante { margin-left: auto; font-size: 12px; }
.red-adjuntos { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 16px; border-bottom: 1px solid var(--divisor); background: var(--fila-suave); }
.red-adjuntos[hidden] { display: none; }
.adjunto-ficha.subido { opacity: .7; }
#red-editor { flex: 1; width: 100%; border: 0; background: #fff; }

/* Partidas con varias ofertas: solo cuenta la elegida */
.ofertas-partida { display: grid; gap: 4px; margin: 8px 0; }
.oferta-partida {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "sum imp" "det acc";
  gap: 2px 8px; padding: 6px 8px; border: 1px solid var(--divisor); border-radius: var(--r-xs); background: var(--panel);
}
.oferta-partida .sum { grid-area: sum; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oferta-partida .imp { grid-area: imp; font: 500 12px var(--mono); text-align: right; }
.oferta-partida .det { grid-area: det; font: 400 10.5px var(--mono); color: var(--texto-3); }
.oferta-partida > .grupo-btn, .oferta-partida > .btn { grid-area: acc; justify-self: end; }
.oferta-partida.elegida { border-color: var(--verde-borde); background: var(--verde-fondo); }
.oferta-partida.elegida .sum { font-weight: 600; }
.oferta-partida.recibida { margin-bottom: 4px; }
.form-oferta { margin: 4px 0 6px; }
.partida-caja .grupo-btn .btn, .oferta-partida .btn { white-space: nowrap; }
.oferta-partida .det { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.correo-barra input[type="search"] { margin-top: 0; }

/* Padrón a tabla completa: datos y equipos se abren en un desplegable bajo la fila */
#tabla-proveedores tr.abierta td { background: var(--acento-100); border-bottom-color: transparent; }
#tabla-proveedores tr.abierta td:first-child { box-shadow: inset 2px 0 0 var(--acento); }
#tabla-proveedores td.acciones-prov { white-space: nowrap; width: 1%; }
#tabla-proveedores tr.fila-desplegable > td { padding: 0 !important; background: var(--fila-suave); }
.prov-desplegable {
  display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 24px;
  padding: 16px 18px 18px; border-left: 2px solid var(--acento);
  box-shadow: inset 0 8px 12px -12px rgba(18, 20, 24, .18);
  animation: desplegar .22s cubic-bezier(.2, .7, .3, 1);
}
@keyframes desplegar { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.prov-desplegable > .vacio { grid-column: 1 / -1; padding: 10px; }
.prov-desplegable .prov-cab { margin-bottom: 10px; }
.prov-desplegable .prov-cab .prov-nombre { font: 600 14px var(--titulo); }
.prov-desplegable .lista-datos { gap: 6px; }
.prov-desplegable .lista-equipos { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
                                   gap: 4px 20px; max-height: none; overflow: visible; }
.prov-desplegable .familia-bloque { break-inside: avoid; }
.prov-desplegable.editando { background: var(--panel); }
td.varios .varios-linea { max-width: 300px; }
@media (prefers-reduced-motion: reduce) { .prov-desplegable { animation: none; } }
.prov-desplegable .lista-datos .dato dd { font-family: var(--cuerpo); font-size: 12.5px; }

/* ================================================================ 2026-09-28 */

/* Banners oscuros (Alex, 2026-09-28): TODAS las cabeceras de panel y de
   diálogo en negro con letra blanca; sus botones, claros en vez de pizarra. */
.panel-cabecera, .visor-cabecera, .correo-cab-lista {
  background: var(--marco); border-bottom-color: var(--marco-borde); color: #fff;
}
.panel-cabecera { border-radius: calc(var(--r) - 1px) calc(var(--r) - 1px) 0 0; }
.correo-cab-lista { padding: 9px 12px; align-items: center; }
.panel-cabecera h2, .visor-cabecera h3, .correo-cab-lista h2 { color: #fff; }
.panel-cabecera .cuenta-cab, .panel-cabecera .nota, .visor-cabecera .nota,
.correo-cab-lista .nota, .panel-cabecera label, .visor-cabecera label { color: var(--marco-texto); }
.panel-cabecera .btn.primario, .visor-cabecera .btn.primario {
  --anillo-punto: rgb(255 255 255 / .7); --anillo-base: rgb(255 255 255 / .2);
  color: var(--tinta-ui); text-shadow: none;
  background: linear-gradient(180deg, #ffffff, #e4e8ee 60%);
  box-shadow: inset 0 -.125em .125em rgb(0 0 0 / .08), 0 .25em .5em -.3em rgb(0 0 0 / .5);
}
.panel-cabecera .btn.primario:hover:not(:disabled), .visor-cabecera .btn.primario:hover:not(:disabled) {
  background: linear-gradient(180deg, #f3f5f8, #d7dce5 60%);
}
.panel-cabecera .btn:disabled, .visor-cabecera .btn:disabled {
  color: var(--marco-texto-3); background: var(--marco-activo); box-shadow: inset 0 0 0 1px var(--marco-borde);
}

/* Familia de cargo: banda con el color de su capítulo */
.familia-banda {
  display: flex; align-items: baseline; gap: 8px; margin: 18px 0 8px; padding: 0 0 5px;
  border-bottom: 2px solid var(--contorno); font: 600 11px var(--cuerpo);
  letter-spacing: .04em; text-transform: uppercase; color: var(--tinta);
}
.familia-banda:first-child { margin-top: 0; }
.familia-banda .cap { font: 600 11px var(--mono); padding: 0 6px; border-radius: var(--r-xs); background: var(--contorno); color: #fff; }
.familia-banda.lista { margin: 10px 6px 4px; font-size: 10.5px; }
.familia-banda.lista:first-child { margin-top: 2px; }

/* Pendientes: cabecera de sistema en oscuro, con el color de su familia a la izquierda */
.grupo-sistema { gap: 0; margin-bottom: 12px; }
.grupo-sistema-cab {
  background: var(--marco); color: #fff; padding: 9px 14px;
  border-radius: var(--r) var(--r) 0 0; box-shadow: inset 4px 0 0 var(--contorno);
}
.grupo-sistema-cab .cod { color: #fff; }
.grupo-sistema-cab .nom { color: #fff; }
.grupo-sistema-cab .nota { color: var(--marco-texto); }
.grupo-sistema > .rfq-item { border-radius: 0; border-top: 0; }
.grupo-sistema > .rfq-item:last-child { border-radius: 0 0 var(--r) var(--r); }

/* resumen de idiomas de una petición */
.idiomas-resumen { display: inline-flex; gap: 6px; margin-left: auto; }
.ficha-idioma.cuenta { cursor: help; }

/* Sistemas por familia de cargo */
#tabla-sistemas tr.fila-familia td {
  background: var(--marco); color: #fff; padding: 7px 12px; box-shadow: inset 4px 0 0 var(--contorno);
  font: 600 12px var(--cuerpo);
}
#tabla-sistemas tr.fila-familia:hover td { background: var(--marco); }
#tabla-sistemas tr.fila-familia .cap { font: 600 11.5px var(--mono); margin-right: 10px; color: var(--contorno); }
#tabla-sistemas tr.fila-familia .n { float: right; font-weight: 400; color: var(--marco-texto); }
.familia-equipos { display: flex; align-items: center; gap: 6px; }

/* Contenido de la petición y remarks del buque */
dialog.dlg-texto { width: min(1240px, 95vw); height: 90vh; }
.dlg-texto .segmentado.compacto { width: 220px; }
.texto-cuerpo { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.texto-editor { min-height: 0; overflow: auto; padding: 14px 16px; border-right: 1px solid var(--divisor); }
.dlg-texto.editando .texto-editor { background: linear-gradient(var(--acento-100), transparent 70px); }
.texto-editor textarea, .texto-editor input[type="text"] {
  width: 100%; margin-top: 5px; resize: vertical; font: 400 12.5px/1.55 var(--cuerpo); color: var(--texto);
  padding: 9px 11px; border: 1px solid var(--borde-control); border-radius: var(--r-sm); background: var(--panel);
}
.texto-editor textarea:focus, .texto-editor input:focus { outline: 0; border-color: var(--acento); box-shadow: var(--anillo); }
.texto-editor textarea[readonly], .texto-editor input[readonly] { background: var(--fila-suave); color: var(--texto-2); }
.texto-editor .campo { margin-bottom: 12px; color: var(--texto-2); font: 500 12px var(--cuerpo); }
.rotulo-accion { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.texto-buscar { min-height: 0; overflow: auto; padding: 14px 16px; background: var(--fila-suave); display: flex; flex-direction: column; gap: 8px; }
.buscar-barra { display: flex; gap: 8px; }
.buscar-barra input { flex: 1; margin: 0; }
.buscar-res { display: grid; gap: 8px; }
.buscar-item { background: var(--panel); border: 1px solid var(--divisor); border-radius: var(--r-sm); padding: 8px 10px; display: grid; gap: 5px; }
.buscar-item .ref { font: 600 11.5px var(--mono); color: var(--texto-2); }
.buscar-item .txt { font-size: 12px; line-height: 1.5; color: var(--texto); }
.buscar-item .grupo-btn { justify-content: flex-end; }

/* Peticiones: Enviado y, debajo, Respondido (abre la respuesta) o No respondido */
.estado-envio { white-space: nowrap; }
.estado-envio .env-l1 { display: flex; align-items: baseline; gap: 8px; margin-bottom: 3px; }
.estado-envio .env-enviado { font-size: 12px; color: var(--texto-2); }
button.env-respondido { cursor: pointer; }
button.env-respondido:hover:not(:disabled) { border-color: var(--verde-txt); }
button.env-respondido:disabled { cursor: default; }
.estado-envio .env-simular { margin-left: 4px; font-size: 11px; }
/* Ofertas › cargo al que va (el reparto de su sistema) */
.cargo-oferta { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.cargo-oferta .mono { font-family: var(--mono); font-size: 11.5px; }
.cargo-oferta.pulsable { cursor: pointer; }
.cargo-oferta.pulsable:hover { color: var(--acento); }
/* Ofertas › Repartir: cargo + % por fila */
.reparto-filas { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.reparto-fila { display: flex; align-items: center; gap: 6px; }
.aviso-cuerpo .reparto-fila input { margin: 0; }
.aviso-cuerpo .reparto-fila .reparto-cod { flex: 1; min-width: 0; }
.aviso-cuerpo .reparto-fila .reparto-pct { width: 72px; flex: none; text-align: right; }
.reparto-total { margin: 10px 0 4px; font-size: 12.5px; font-weight: 600; }
.reparto-total.malo { color: var(--rojo-txt); }
dialog.dialogo-aviso.dialogo-reparto { width: min(560px, 92vw); }
