/**
 * Atenea chrome — estilo UX «Atenea steel» compartido.
 * Cáscara steel + box interno cian. Módulos solo layout (tamaño, z-index).
 */
html { color-scheme: dark; }

:root {
  scrollbar-width: thin;
  scrollbar-color: #3d4a5e transparent;

  /* Steel shell */
  --steel-accent: #6d7d8d;
  --steel-text: #a8b4c4;
  --steel-hover: #8898a8;
  --steel-text-hover: #c5cdd8;
  --steel-icon: #9aa8b8;
  --steel-border: #3d4a5c;
  --steel-border-soft: rgba(136, 152, 168, 0.45);
  --steel-fill-soft: rgba(96, 125, 139, 0.12);
  --steel-fill-mid: rgba(96, 125, 139, 0.18);
  --steel-fill-hover: rgba(96, 125, 139, 0.22);
  --steel-bg: linear-gradient(168deg, #1e2533 0%, #141a24 55%, #10151d 100%);
  --steel-bg-solid: #141a24;
  --steel-title: #c8d0dc;
  --steel-sub: #8b97a8;

  --atenea-box-border: rgba(79, 195, 247, 0.45);
  --atenea-box-bg: linear-gradient(180deg, rgba(79, 195, 247, 0.08) 0%, #0f1117 100%);
  --atenea-box-radius: 10px;

  --atenea-overlay-scrim: rgba(8, 12, 20, 0.32);
  --atenea-overlay-blur: 3px;

  --atenea-modal-bg: var(--steel-bg);
  --atenea-modal-border: var(--steel-border);
  --atenea-modal-radius: 12px;
  --atenea-modal-shadow: 0 18px 42px rgba(6, 10, 18, 0.72);
  --atenea-modal-color: var(--steel-title);

  /* Botones steel — compactos */
  --atenea-btn-pad-y: 3px;
  --atenea-btn-pad-y-sm: 3px;
  --atenea-btn-pad-x: 10px;
  --atenea-btn-font: 11px;
  --atenea-btn-line: 1.2;
}

button,
input[type="button"],
input[type="submit"] {
  font-family: inherit;
  line-height: var(--atenea-btn-line);
}

/* Botones en modales — outline steel */
.btn-modal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-sizing: border-box;
  padding: var(--atenea-btn-pad-y-sm) var(--atenea-btn-pad-x);
  min-height: 0;
  height: auto;
  border-radius: 6px;
  font-size: var(--atenea-btn-font);
  font-weight: 600;
  font-family: inherit;
  line-height: var(--atenea-btn-line);
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn-modal-primary,
.btn-modal:not(.btn-modal-muted) {
  color: var(--steel-text);
  border-color: var(--steel-border-soft);
  background: var(--steel-fill-soft);
}
.btn-modal-primary:hover,
.btn-modal:not(.btn-modal-muted):hover {
  border-color: var(--steel-hover);
  color: var(--steel-text-hover);
  background: var(--steel-fill-hover);
}
.btn-modal-primary:disabled,
.btn-modal:not(.btn-modal-muted):disabled {
  opacity: 0.55;
  cursor: wait;
}
.btn-modal-muted {
  color: #8b97a8;
  border-color: var(--steel-border);
  background: transparent;
}
.btn-modal-muted:hover {
  color: #a8b4c4;
  border-color: #5a6a7d;
}

/* Opciones Exportar — steel base; activo cian */
.exp-opt {
  box-sizing: border-box;
  background: rgba(16, 21, 29, 0.55);
  border: 1px solid var(--steel-border);
  color: #7a8799;
  padding: 5px 8px;
  border-radius: 8px;
  font-size: 11px;
  line-height: var(--atenea-btn-line);
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
  width: 100%;
  min-height: 0;
  height: auto;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.exp-opt:hover {
  border-color: #5a6a7d;
  color: #a8b4c4;
  background: rgba(22, 28, 38, 0.85);
}
.exp-opt.exp-activo,
.exp-opt.exp-activo-verde {
  background: rgba(79, 195, 247, 0.1) !important;
  border-color: rgba(79, 195, 247, 0.45) !important;
  color: #4fc3f7 !important;
  font-weight: 600;
}
.exp-opt .ico-cyan,
.exp-opt .fa-solid { color: var(--steel-icon); font-size: 11px; }
.exp-opt.exp-activo .ico-cyan,
.exp-opt.exp-activo .fa-solid,
.exp-opt.exp-activo-verde .ico-cyan,
.exp-opt.exp-activo-verde .fa-solid { color: #4fc3f7; }

::-webkit-scrollbar { width: 3px; height: 3px; }
::-webkit-scrollbar-thumb {
  background: rgba(58, 69, 93, 0.72);
  border-radius: 3px;
}

::selection {
  background: rgba(79, 195, 247, 0.28);
  color: inherit;
}

/* Sin recuadro blanco nativo al recuperar foco (p. ej. Escape cierra modal).
   Teclado: anillo cian suave vía :focus-visible. */
:where(button, [role="button"], a, summary, .badge-estado, .info-conductor-hint, .info-destino-hint, .info-s7-hint):focus {
  outline: none;
}
:where(button, [role="button"], a, summary, .badge-estado, .info-conductor-hint, .info-destino-hint, .info-s7-hint):focus-visible {
  outline: 2px solid rgba(79, 195, 247, 0.5);
  outline-offset: 2px;
}

/* Overlay: scrim + blur (una sola definición) */
.overlay,
.overlay-parametros,
.overlay-exportar,
.overlay-hg,
.overlay-hg-formato,
.overlay-notas-scrim,
.overlay-catalogo-destinos,
.overlay-ex,
.overlay-atenea-dialogo,
.overlay-finalizar-sistema,
.overlay-justificacion-jornada {
  background: var(--atenea-overlay-scrim);
  -webkit-backdrop-filter: blur(var(--atenea-overlay-blur));
  backdrop-filter: blur(var(--atenea-overlay-blur));
}

/* Cáscara steel — todos los modales Hub */
.parametros-modal,
.exp-modal,
.hg-modal,
.hg-formato-modal,
.catalogo-modal,
.ex-modal,
.atenea-dialogo-modal,
.finalizar-sistema-modal,
.just-jornada-modal,
#overlay-editor-fila .modal.modal-editor-fila {
  box-sizing: border-box;
  overflow: visible;
  background: var(--atenea-modal-bg);
  border: 1px solid var(--atenea-modal-border);
  border-radius: var(--atenea-modal-radius);
  box-shadow: var(--atenea-modal-shadow);
  color: var(--atenea-modal-color);
  font-family: 'Segoe UI', system-ui, sans-serif;
}

/* Cerrar ✕ — quieto steel (no rojo) */
.parametros-cerrar,
.exp-cerrar,
.catalogo-cerrar,
.ex-cerrar,
.hg-cerrar,
.finalizar-sistema-cerrar,
.just-jornada-cerrar,
#overlay-editor-fila .modal-cerrar {
  color: #7a8799;
}
.parametros-cerrar:hover,
.exp-cerrar:hover,
.catalogo-cerrar:hover,
.ex-cerrar:hover,
.hg-cerrar:hover,
.finalizar-sistema-cerrar:hover,
.just-jornada-cerrar:hover,
#overlay-editor-fila .modal-cerrar:hover {
  color: #c5cdd8;
  background: rgba(255, 255, 255, 0.04);
}

/* Título modal steel (cian solo en box / brand) */
.parametros-modal > h2,
.exp-modal > h2,
.catalogo-modal > h2,
.hg-header h2,
.finalizar-sistema-modal h2,
#overlay-editor-fila .modal.modal-editor-fila h2 {
  color: var(--steel-title);
}

/* Firma Cinzel compartida */
.parametros-firma .mf-atenea,
.exp-firma .mf-atenea,
.hg-firma .mf-atenea,
.ex-firma .mf-atenea,
.finalizar-sistema-firma .mf-atenea,
#overlay-editor-fila .modal-firma .mf-atenea {
  font-family: 'Cinzel', 'Times New Roman', serif;
  letter-spacing: 4px;
  font-size: 9px;
  color: #4fc3f7;
  opacity: 0.5;
  font-weight: 600;
}
.parametros-firma .mf-by,
.exp-firma .mf-by,
.hg-firma .mf-by,
.ex-firma .mf-by,
.finalizar-sistema-firma .mf-by,
#overlay-editor-fila .modal-firma .mf-by {
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 9px;
  color: #a8b8c8;
  font-style: italic;
  opacity: 0.3;
  letter-spacing: 0.5px;
}

/* Box interno: borde cian + degradado */
.atenea-box,
.param-section,
.catalogo-section,
.nota-item,
.panel-estado-card {
  box-sizing: border-box;
  border: 1px solid var(--atenea-box-border);
  border-radius: var(--atenea-box-radius);
  background: var(--atenea-box-bg);
  padding: 12px;
}

/* Dropdown Atenea — nunca <select> nativo de Windows */
.atenea-dd {
  position: relative;
  width: 100%;
  min-width: 0;
}
.atenea-dd-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  min-height: 22px;
  height: 22px;
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid #2a2d3a;
  background: #0f1117;
  color: #a8b8c8;
  font-size: 11px;
  font-family: inherit;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  text-align: left;
}
.atenea-dd-btn:hover {
  border-color: rgba(79, 195, 247, 0.45);
  color: #c5d0e0;
}
.atenea-dd-btn[aria-expanded="true"] {
  border-color: rgba(79, 195, 247, 0.55);
  box-shadow: 0 0 0 1px rgba(79, 195, 247, 0.12);
}
.atenea-dd-btn .fa-chevron-down {
  font-size: 9px;
  color: #8ea1b5;
  flex-shrink: 0;
}
.atenea-dd-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.atenea-dd-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 1500;
  max-height: 220px;
  overflow-y: auto;
  padding: 4px;
  border-radius: 8px;
  border: 1px solid rgba(79, 195, 247, 0.45);
  background: #12151e;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  scrollbar-width: thin;
  scrollbar-color: #2a3d52 transparent;
}
.atenea-dd-menu.hidden,
.atenea-dd-menu[hidden] {
  display: none !important;
}
.atenea-dd-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: #c5d0e0;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 11px;
  font-family: inherit;
  line-height: 1.3;
}
.atenea-dd-item:hover {
  background: rgba(79, 195, 247, 0.1);
  color: #4fc3f7;
}
.atenea-dd-item--on {
  background: rgba(79, 195, 247, 0.14);
  color: #4fc3f7;
  font-weight: 600;
}
