/* Historial de gestión — Atenea steel */
.overlay-hg {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.overlay-hg.visible { display: flex; }

.hg-modal {
  position: relative;
  width: min(560px, 94vw);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  padding: 20px 20px 0;
}
.hg-cerrar {
  position: absolute;
  top: 10px;
  right: 12px;
  border: none;
  background: transparent;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  line-height: 1;
}

.hg-header h2 {
  margin: 0 0 4px;
  padding-right: 28px;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hg-header h2 i { color: var(--steel-icon, #9aa8b8); font-size: 13px; }
.hg-sub {
  margin: 0;
  font-size: 11px;
  color: var(--steel-sub, #8b97a8);
  line-height: 1.35;
}
.hg-vista-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}
.hg-vista-tab {
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--steel-border, #3d4a5c);
  background: rgba(16, 21, 29, 0.65);
  color: #7a8799;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.hg-vista-tab:hover {
  border-color: #5a6a7d;
  color: #a8b4c4;
  background: rgba(22, 28, 38, 0.85);
}
.hg-vista-tab.activo {
  border-color: var(--steel-hover, #8898a8);
  color: var(--steel-text-hover, #c5cdd8);
  background: var(--steel-fill-mid, rgba(96, 125, 139, 0.18));
}

#hg-wrap-crono.atenea-box {
  margin-top: 8px;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.hg-formato-box {
  margin: 0 0 4px;
  padding: 10px;
}
.hg-filtros {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 0;
}
.hg-filtro-btn {
  flex: 1 1 64px;
  min-width: 56px;
  padding: 4px 0;
  border-radius: 10px;
  border: 1px solid #2a2d3a;
  background: transparent;
  color: #6a7a8a;
  font-size: 10px;
  cursor: pointer;
  font-family: inherit;
  text-align: center;
}
.hg-filtro-btn:hover { color: #a8b4c4; border-color: #5a6a7d; }
.hg-filtro-btn.activo {
  border-color: var(--steel-border-soft, rgba(136, 152, 168, 0.45));
  background: var(--steel-fill-soft, rgba(96, 125, 139, 0.12));
  color: var(--steel-text-hover, #c5cdd8);
}

.hg-orden-bar {
  display: flex;
  justify-content: flex-end;
  margin: 8px 0 0;
}
.hg-orden-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #3d4a5c;
  background: rgba(16, 21, 29, 0.55);
  color: #8b97a8;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.hg-orden-btn:hover { color: #a8b4c4; border-color: #5a6a7d; }

.hg-body {
  flex: 1;
  overflow-y: auto;
  margin-top: 10px;
  border-top: 1px solid #1e2130;
  padding-top: 4px;
  max-height: min(48vh, 420px);
}
.hg-evento {
  display: flex;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid #1a1d27;
  align-items: flex-start;
}
.hg-evento:last-child { border-bottom: none; }
.hg-icono { font-size: 12px; flex-shrink: 0; margin-top: 1px; width: 18px; text-align: center; }
.hg-linea { flex: 1; min-width: 0; }
.hg-ts { font-size: 10px; color: #3d4155; margin-bottom: 2px; }
.hg-titulo { font-size: 12px; font-weight: 500; }
.hg-det { font-size: 11px; color: #6a7a8a; margin-top: 2px; }
.hg-dur { font-size: 10px; color: #4fc3f7; margin-top: 2px; font-weight: 600; }
.hg-vacio { text-align: center; color: #3d4155; font-size: 12px; padding: 24px 0; }

.hg-footer {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #1e2130;
}
.hg-modal .btn-modal-muted:hover { color: #8a9aaa; border-color: #3d4155; }
/* .btn-modal base → atenea-chrome */
.hg-firma {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 18px;
  padding: 6px 0 10px;
  pointer-events: none;
  user-select: none;
}
/* Firma: hereda Atenea steel (atenea-chrome) */

.btn-historial-viaje {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  padding: 0;
  margin: 0;
  opacity: 0.45;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  flex-shrink: 0;
  transition: opacity 0.15s;
}
.btn-historial-viaje:hover { opacity: 1; }
.btn-historial-viaje--has { opacity: 0.85; }

.overlay-hg-formato {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: none;
  align-items: center;
  justify-content: center;
}
.overlay-hg-formato.visible { display: flex; }

.hg-formato-modal {
  width: min(280px, 92vw);
  border-radius: 10px;
  padding: 14px 14px 10px;
}
.hg-formato-modal h3 {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--steel-title, #c8d0dc);
}
.hg-formato-hint {
  margin: 0 0 8px;
  font-size: 11px;
  color: var(--steel-sub, #8b97a8);
}
.hg-formato-opts {
  display: flex;
  gap: 6px;
}
.hg-formato-opt {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid var(--steel-border, #3d4a5c);
  background: rgba(16, 21, 29, 0.55);
  color: #8a9aaa;
  font-size: 11px;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.2;
}
.hg-formato-opt i {
  font-size: 11px;
  opacity: 0.85;
}
.hg-formato-opt:hover {
  border-color: #5a6a7d;
  background: var(--steel-fill-soft, rgba(96, 125, 139, 0.12));
  color: #c5cdd8;
}
.hg-formato-opt[data-hg-fmt="xlsx"]:hover {
  border-color: #4caf5055;
  background: #4caf5011;
  color: #81c784;
}
.hg-formato-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #1e2130;
}
/* .btn-modal → atenea-chrome */
