/* Excesos Hub — shell Atenea steel; acento salmón de dominio (cero cian en UI excesos).
   Splash #F3722C solo en títulos; UI usa peach #ff8a65 / #ffb08a + fills ≤14%. */
.overlay-ex,
#panel-excesos,
#panel-excesos-viajes-ant,
#overlay-excesos-intervencion {
  --excesos-orange: var(--atenea-orange, #F3722C);
  --excesos-peach: #ff8a65;
  --excesos-peach-soft: #ffb08a;
  --excesos-orange-dim: rgba(243, 114, 44, 0.32);
  --excesos-orange-border: rgba(243, 114, 44, 0.38);
  --excesos-orange-fill: rgba(243, 114, 44, 0.08);
  --excesos-orange-fill-active: rgba(243, 114, 44, 0.12);
  --excesos-steel: #a8b8c8;
  --excesos-steel-mid: #94a3b8;
  --excesos-steel-border: #3d4a5c;
  --excesos-box-border: rgba(61, 77, 96, 0.7);
  --excesos-box-bg: linear-gradient(180deg, #121820 0%, #0f1117 100%);
}

.overlay-ex {
  position: fixed;
  inset: 0;
  z-index: 1350;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.overlay-ex.visible { display: flex; }

.ex-modal {
  position: relative;
  width: min(1180px, 96vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  padding: 20px 20px 0;
  scrollbar-width: thin;
  scrollbar-color: #2a3d52 transparent;
}

.ex-cerrar {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 4px;
  background: transparent;
  font-size: 14px;
  cursor: pointer;
  line-height: 1;
  font-family: inherit;
}

.ex-header h2 {
  margin: 0 0 4px;
  padding-right: 28px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--excesos-orange);
  display: flex;
  gap: 8px;
  align-items: center;
}
.ex-header h2 i { color: inherit; opacity: 1; }
.ex-sub {
  margin: 0 0 10px;
  font-size: 11px;
  line-height: 1.35;
  color: var(--excesos-steel);
}
.ex-franja-vista {
  margin: 6px 2px 0;
  padding: 0;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--excesos-peach-soft);
  font-variant-numeric: tabular-nums;
  align-self: flex-start;
  letter-spacing: 0.01em;
}
.ex-franja-vista:empty {
  display: none;
}

.ex-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
  margin-bottom: 8px;
}
.ex-toolbar--2 { align-items: center; }
.ex-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 10px;
  color: #7a8a9a;
}
.ex-field input,
.ex-select {
  background: #12181f;
  border: 1px solid #334455;
  color: var(--excesos-steel);
  border-radius: 4px;
  padding: 4px 6px;
  font-size: 12px;
  color-scheme: dark;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.ex-field input:focus,
.ex-field input:focus-visible,
.ex-select:focus,
.ex-select:focus-visible,
.ex-search:focus,
.ex-search:focus-visible,
.overlay-ex textarea:focus,
.overlay-ex textarea:focus-visible {
  outline: none;
  border-color: var(--excesos-orange-border);
  box-shadow: 0 0 0 1px var(--excesos-orange-dim);
  background: #12161c;
}
.ex-field input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  opacity: 0.55;
  cursor: pointer;
}
.ex-select {
  min-width: 140px;
  max-width: 220px;
}
.ex-select option {
  background: #1a222c;
  color: var(--excesos-steel);
}

/* Sede: menú propio (el <select> nativo de Windows no se tematiza) */
.ex-field--sede { position: relative; }
.ex-sede-wrap {
  position: relative;
  min-width: 160px;
  max-width: 240px;
}
.ex-sede-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 26px;
  padding: 4px 8px;
  background: #12181f;
  border: 1px solid #334455;
  border-radius: 4px;
  color: var(--excesos-steel);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}
.ex-sede-btn:hover {
  border-color: var(--excesos-orange-border);
}
.ex-sede-btn[aria-expanded="true"] {
  border-color: var(--excesos-orange-border);
  box-shadow: 0 0 0 1px var(--excesos-orange-dim);
}
.ex-sede-caret {
  flex-shrink: 0;
  font-size: 9px;
  color: #7a8a9a;
  opacity: 0.9;
}
#ex-sede-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ex-sede-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 40;
  max-height: 220px;
  overflow: auto;
  padding: 4px;
  background: #151920;
  border: 1px solid rgba(243, 114, 44, 0.28);
  border-radius: 6px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  scrollbar-width: thin;
  scrollbar-color: #3a2a22 transparent;
}
.ex-sede-menu.hidden,
.ex-sede-menu[hidden] {
  display: none !important;
}
.ex-sede-opt {
  display: block;
  width: 100%;
  border: none;
  background: transparent;
  color: var(--excesos-steel);
  text-align: left;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
}
.ex-sede-opt:hover {
  background: rgba(243, 114, 44, 0.1);
  color: var(--excesos-peach-soft);
}
.ex-sede-opt--on {
  background: rgba(243, 114, 44, 0.14);
  color: var(--excesos-peach-soft);
  font-weight: 600;
}
.ex-search {
  flex: 1;
  min-width: 180px;
  background: #12181f;
  border: 1px solid #334455;
  color: var(--excesos-steel);
  border-radius: 4px;
  padding: 6px 8px;
  font-size: 12px;
}
.ex-search::placeholder { color: #7a8a9a; }
.ex-filtros { display: flex; gap: 4px; flex-wrap: wrap; }
.ex-filtro {
  border: 1px solid #334455;
  background: #1e2832;
  color: var(--excesos-steel);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  cursor: pointer;
}
.ex-filtro.activo {
  background: var(--excesos-orange-fill-active);
  border-color: var(--excesos-orange-border);
  color: var(--excesos-peach-soft);
}
.ex-filtro:focus-visible {
  outline: 2px solid var(--excesos-orange-dim);
  outline-offset: 2px;
}

/* Override chrome cian → salmón apagado en excesos */
.overlay-ex .btn-modal:not(.btn-modal-muted),
.overlay-ex .btn-modal-primary,
#panel-excesos .btn-modal:not(.btn-modal-muted),
#overlay-excesos-intervencion .btn-modal:not(.btn-modal-muted) {
  color: var(--excesos-peach);
  border-color: var(--excesos-orange-border);
  font-weight: 600;
}
.overlay-ex .btn-modal:not(.btn-modal-muted):hover,
.overlay-ex .btn-modal-primary:hover,
#panel-excesos .btn-modal:not(.btn-modal-muted):hover,
#overlay-excesos-intervencion .btn-modal:not(.btn-modal-muted):hover {
  background: var(--excesos-orange-fill-active);
  border-color: rgba(243, 114, 44, 0.5);
  color: var(--excesos-peach-soft);
}
.overlay-ex .atenea-box,
.overlay-ex .ex-table-wrap.atenea-box {
  border-color: var(--excesos-box-border);
  background: var(--excesos-box-bg);
}

.ex-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ex-hint {
  font-size: 11px;
  color: var(--excesos-steel);
  margin-bottom: 6px;
  opacity: 0.85;
}
.ex-table-wrap {
  flex: 1;
  overflow: auto;
  max-height: 52vh;
  scrollbar-width: thin;
  scrollbar-color: #3a2a22 transparent;
  padding: 0;
}
.ex-table-wrap.atenea-box {
  padding: 0;
  overflow: auto;
  display: block;
}
.ex-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  color: var(--excesos-steel);
}
.ex-table th {
  position: sticky;
  top: 0;
  background: #1a222c;
  text-align: left;
  padding: 6px 8px;
  color: var(--excesos-steel-mid);
  font-weight: 600;
  border-bottom: 1px solid var(--excesos-steel-border);
}
.ex-table td {
  padding: 5px 8px;
  border-bottom: 1px solid #243040;
  vertical-align: top;
  color: var(--excesos-steel);
}
.ex-table th.ex-col-fh,
.ex-table td.ex-col-fh {
  white-space: nowrap;
  min-width: 11.5rem;
  width: 11.5rem;
  font-variant-numeric: tabular-nums;
}
.ex-ubic { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-nota-cell {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}
.ex-row--pendiente { cursor: pointer; }
.ex-row--pendiente:hover { background: rgba(243, 114, 44, 0.04); }
.ex-row--ok { opacity: 0.95; }
.ex-row--gestionado td { opacity: 0.88; }

.ex-metodo {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  background: #2a3540;
}
.ex-metodo--none,
.ex-metodo--noIdentificado { background: #5a3030; color: #ffc9c9; }
.ex-metodo--asignado { background: #1e4a3a; color: #a8e6cf; }
.ex-metodo--manual { background: #4a3a1e; color: #f0d8a8; }
.ex-sev {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
}
.ex-sev--leve { color: #92d698; background: #4caf5018; border: 1px solid #4caf5035; }
.ex-sev--medio { color: #e8c878; background: #f59e0b18; border: 1px solid #f59e0b35; }
.ex-sev--grave { color: #ff9a93; background: #f4433618; border: 1px solid #f4433635; }

.ex-tip {
  position: absolute;
  z-index: 5;
  max-width: 260px;
  padding: 6px 9px;
  background: #12181f;
  border: 1px solid var(--excesos-orange-border);
  border-radius: 6px;
  color: var(--excesos-steel);
  font-size: 11px;
  line-height: 1.35;
  pointer-events: none;
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
}
.ex-tip.hidden { display: none; }

.ex-dialog {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 6;
  width: min(420px, 92%);
  box-sizing: border-box;
  background: var(--atenea-modal-bg, #1a1d27);
  border: 1px solid var(--excesos-box-border);
  border-radius: var(--atenea-modal-radius, 12px);
  box-shadow: var(--atenea-modal-shadow);
  padding: 16px 18px 10px;
}
.ex-dialog.hidden { display: none; }
.ex-dialog h3 {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--excesos-peach-soft);
  font-weight: 600;
}
.ex-dialog-body {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--excesos-steel);
  line-height: 1.45;
  white-space: pre-wrap;
}
.ex-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.ex-firma--dialog { margin-top: 8px; padding-bottom: 2px; }

.ex-vacio, .ex-error {
  margin: 10px 0;
  font-size: 13px;
  color: var(--excesos-steel);
}
.ex-error { color: #ef9a9a; }
.ex-vacio.hidden, .ex-error.hidden { display: none; }

.ex-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 0 8px;
}
.ex-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); no peach */

/* —— Asignar viaje: tarjeta compacta (buscador + desplegable Atenea) —— */
.ex-asignar {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  width: min(360px, calc(100% - 40px));
  box-sizing: border-box;
  background: var(--atenea-modal-bg, #1a1d27);
  border: 1px solid var(--excesos-box-border);
  border-radius: 10px;
  box-shadow: var(--atenea-modal-shadow);
  padding: 12px 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ex-asignar.hidden { display: none; }
.ex-asignar h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--excesos-peach-soft);
  line-height: 1.25;
}
.ex-asignar-meta {
  margin: 0 0 2px;
  font-size: 11px;
  color: var(--excesos-steel);
  line-height: 1.3;
  opacity: 0.92;
}
.ex-asignar-lab {
  margin: 4px 0 0;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #6a7a8a;
  line-height: 1.2;
}
.ex-asignar-q {
  width: 100%;
  box-sizing: border-box;
  height: 26px;
  background: #0f1117;
  border: 1px solid #2a2d3a;
  color: var(--excesos-steel);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 11px;
  font-family: inherit;
  line-height: 1.2;
  outline: none;
}
.ex-asignar-q:focus {
  border-color: rgba(243, 114, 44, 0.55);
}
.ex-asignar-q::placeholder { color: #6a7a8a; }
.ex-asignar-dd-host {
  width: 100%;
  min-width: 0;
}
.ex-asignar-dd-host[hidden],
.ex-asignar-dd-host--idle {
  display: none !important;
}
.ex-asignar-dd-host .atenea-dd-btn {
  min-height: 26px;
  height: 26px;
  padding: 2px 8px;
  font-size: 11px;
  border-color: #2a2d3a;
  background: #0f1117;
  border-radius: 4px;
}
.ex-asignar-dd-host .atenea-dd-btn .fa-chevron-down {
  font-size: 8px;
}
.ex-asignar-dd-host .atenea-dd-btn[aria-expanded="true"] {
  border-color: rgba(243, 114, 44, 0.55);
  box-shadow: 0 0 0 1px rgba(243, 114, 44, 0.1);
}
.ex-asignar-dd-host .atenea-dd-menu {
  max-height: 168px;
  padding: 3px;
  border-radius: 6px;
  border-color: rgba(243, 114, 44, 0.35);
  z-index: 1600;
}
.ex-asignar-dd-host .atenea-dd-item {
  font-size: 11px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  padding: 5px 7px;
  border-radius: 4px;
}
.ex-asignar-dd-host .atenea-dd-item:hover,
.ex-asignar-dd-host .atenea-dd-item--on {
  background: rgba(243, 114, 44, 0.12);
  color: var(--excesos-peach-soft);
}
.ex-asignar-hint {
  margin: 0;
  font-size: 11px;
  color: #6a7a8a;
}
.ex-asignar-actions {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
  padding-top: 2px;
}
.ex-asignar-actions .btn-modal {
  min-height: 26px;
  padding: 3px 12px;
  font-size: 11px;
}

/* —— Pastilla matriz —— */
.th-excesos .th-main {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #8898a8;
  font-size: 12px;
}
.td-excesos-matriz {
  text-align: center;
  white-space: nowrap;
  width: 1%;
  padding-left: 4px;
  padding-right: 4px;
}
.excesos-pill-fila {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid #2a2d3a;
  color: #8898a8;
  font-size: 10px;
  line-height: 1.4;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.excesos-pill-fila[data-severity="leve"]  { color: #4caf50; border-color: #4caf5044; }
.excesos-pill-fila[data-severity="medio"] { color: #f59e0b; border-color: #f59e0b44; }
.excesos-pill-fila[data-severity="grave"] { color: #f44336; border-color: #f4433644; }
.excesos-pill-fila--cero {
  opacity: 0.48;
  color: #69778a !important;
  border-color: #353b4d !important;
  background: #141720;
}
.excesos-pill-fila:hover:not(.excesos-pill-fila--cero) { background: #1f2230; }
.excesos-pill-fila--cero:hover { opacity: 0.62; }
.excesos-pill-fila:focus-visible {
  outline: 2px solid var(--excesos-orange-dim);
  outline-offset: 2px;
}
.excesos-pill-count { font-weight: 600; }
.excesos-pill-fila-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translateX(-50%);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 3px;
  padding: 5px 7px;
  border-radius: 6px;
  background: #0d0f14;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  z-index: 80;
  pointer-events: none;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.1s ease 0s, visibility 0s linear 0.1s;
}
.excesos-pill-fila:hover .excesos-pill-fila-tip,
.excesos-pill-fila:focus-within .excesos-pill-fila-tip {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.14s ease 0.35s, visibility 0s linear 0.35s;
}
.excesos-pill-fila.excesos-pill-fila--panel-abierto .excesos-pill-fila-tip {
  opacity: 0 !important;
  visibility: hidden !important;
  transition: none !important;
}
.excesos-pill-sev-chip {
  box-sizing: border-box;
  min-width: 19px;
  height: 19px;
  padding: 0 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  border: 1px solid #3a3f4d;
  color: #4f5869;
  background: transparent;
}
.excesos-pill-sev-chip[data-sev="leve"].excesos-pill-sev-chip--on {
  border-color: #92d698;
  color: #92d698;
}
.excesos-pill-sev-chip[data-sev="medio"].excesos-pill-sev-chip--on {
  border-color: #e8c878;
  color: #e8c878;
}
.excesos-pill-sev-chip[data-sev="grave"].excesos-pill-sev-chip--on {
  border-color: #ff9a93;
  color: #ff9a93;
}
.btn-excesos-header .ex-badge-sin {
  margin-left: 4px;
  background: #4a2e2e;
  color: #e8b4b4;
  border-radius: 999px;
  padding: 0 6px;
  font-size: 10px;
  font-weight: 700;
}
.btn-excesos-header:hover,
.btn-excesos-header:focus-visible {
  border-color: var(--excesos-orange-border) !important;
  color: var(--excesos-peach) !important;
  background: var(--excesos-orange-fill) !important;
}

/* —— Panel lateral (paridad #panel-excesos desktop) —— */
.panel-ex-scrim {
  position: fixed;
  inset: 0;
  top: 38px;
  z-index: 1185;
  background: rgba(8, 12, 20, 0.16);
  -webkit-backdrop-filter: blur(2.5px);
  backdrop-filter: blur(2.5px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0s linear 0.28s;
  pointer-events: none;
}
.panel-ex-scrim.visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.28s ease, visibility 0s linear 0s;
}

#panel-excesos {
  position: fixed;
  left: 0;
  top: 38px;
  bottom: 0;
  width: 480px;
  max-width: 96vw;
  background: linear-gradient(180deg, #1a2230 0%, #141a24 55%, #10151d 100%);
  border-right: 1px solid var(--steel-border, #3d4a5c);
  display: flex;
  flex-direction: column;
  z-index: 1200;
  transform: translateX(-100%);
  transition: transform 0.28s ease;
  box-shadow: 4px 0 28px rgba(6, 10, 18, 0.55);
}
#panel-excesos.visible { transform: translateX(0); }

#panel-excesos-viajes-ant {
  position: fixed;
  left: 0;
  top: 38px;
  bottom: 0;
  width: 420px;
  max-width: 92vw;
  background: #16131a;
  border-right: 1px solid rgba(243, 114, 44, 0.22);
  display: flex;
  flex-direction: column;
  z-index: 1195;
  transform: translateX(-100%);
  transition: transform 0.28s ease, left 0.28s ease;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.28);
}
#panel-excesos.visible + #panel-excesos-viajes-ant.visible,
#panel-excesos-viajes-ant.visible.panel-ex-ant--docked {
  left: min(480px, 96vw);
  transform: translateX(0);
}

.panel-ex-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px 8px;
  border-bottom: 1px solid #2a2d3a;
  flex-shrink: 0;
}
.panel-ex-head h3 {
  margin: 0;
  font-size: 14px;
  color: var(--excesos-orange);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.panel-ex-head h3 i { color: inherit; opacity: 1; }
.panel-ex-cerrar {
  border: none;
  background: none;
  color: #667;
  font-size: 16px;
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 4px;
}
.panel-ex-cerrar:hover { color: #f44336; }
.panel-ex-meta {
  padding: 6px 14px 8px;
  font-size: 11px;
  color: #8898a8;
  border-bottom: 1px solid #2a2d3a;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.panel-ex-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  min-width: 0;
}
.panel-ex-meta-dot {
  flex-shrink: 0;
  opacity: 0.52;
  user-select: none;
}
.panel-ex-meta-item { flex-shrink: 0; white-space: nowrap; }
.panel-ex-meta-item--grow {
  flex: 1 1 140px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.panel-ex-meta strong { color: var(--excesos-steel); font-weight: 600; }
.panel-ex-strip-wrap {
  border-bottom: 1px solid #2a2d3a;
  flex-shrink: 0;
}
.panel-ex-strip-label {
  padding: 6px 14px 0;
  font-size: 10px;
  color: #7a8a9a;
  letter-spacing: 0.02em;
}
.panel-ex-hint {
  margin: 0 10px 8px;
  padding: 7px 10px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--excesos-peach-soft);
  background: var(--excesos-orange-fill);
  border: 1px solid var(--excesos-orange-border);
  border-radius: 6px;
  flex-shrink: 0;
}
.panel-ex-hint.hidden { display: none; }
.panel-ex-hint-link {
  border: none;
  background: none;
  padding: 0;
  color: var(--excesos-peach);
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}
.panel-ex-mini-head {
  padding: 6px 8px 4px;
  font-size: 10px;
  color: #8ea3b9;
  border-bottom: 1px solid #222633;
}
.panel-ex-mini-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.55fr 0.85fr 1fr;
  gap: 0;
  font-size: 10px;
}
.panel-ex-mini-colh {
  padding: 4px 6px;
  color: #7a8a9a;
  font-weight: 600;
  border-bottom: 1px solid #222633;
  position: sticky;
  top: 0;
  background: #0e1016;
}
.panel-ex-mini-cell {
  padding: 3px 6px;
  border-bottom: 1px solid #1a1d27;
  color: var(--excesos-steel);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.panel-ex-mini-vel { color: var(--excesos-peach); font-weight: 600; }
.panel-ex-mini-empty {
  padding: 10px 8px;
  font-size: 11px;
  color: #7a8a9a;
}
.panel-ex-reinc {
  margin: 8px 14px 0;
  padding: 6px 10px;
  font-size: 11px;
  color: #e8b878;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 6px;
  flex-shrink: 0;
}
.panel-ex-reinc.hidden { display: none; }

.panel-ex-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 6px 14px 8px;
  flex-shrink: 0;
}
.panel-ex-strip-btn {
  border: 1px solid #334455;
  background: #1a1d27;
  color: var(--excesos-steel);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 72px;
}
.panel-ex-strip-btn strong {
  color: var(--excesos-peach);
  font-size: 13px;
  font-weight: 600;
}
.panel-ex-strip-btn.activo {
  border-color: var(--excesos-orange-border);
  background: var(--excesos-orange-fill-active);
}
.panel-ex-mini {
  margin: 0 14px 8px;
  max-height: 120px;
  overflow: auto;
  border: 1px solid #2a303d;
  border-radius: 6px;
  background: #0e1016;
  font-size: 11px;
  color: var(--excesos-steel);
  flex-shrink: 0;
}
.panel-ex-mini.hidden { display: none; }
.panel-ex-mini-row {
  padding: 4px 8px;
  border-bottom: 1px solid #222;
}

.panel-ex-chips {
  display: flex;
  gap: 6px;
  padding: 8px 14px;
  flex-shrink: 0;
}
.panel-ex-chip {
  border: 1px solid #334455;
  background: #1a1d27;
  color: var(--excesos-steel);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 11px;
  cursor: pointer;
}
.panel-ex-chip--activo {
  border-color: var(--excesos-orange-border);
  color: var(--excesos-peach-soft);
  background: var(--excesos-orange-fill-active);
}

.panel-ex-cluster-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 0 14px 8px;
  font-size: 11px;
  color: #8ea3b9;
  flex-shrink: 0;
}
.panel-ex-cluster-pill {
  border: 1px solid #334455;
  background: #151820;
  color: var(--excesos-steel);
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 10px;
  cursor: pointer;
}
.panel-ex-cluster-pill--on {
  border-color: var(--excesos-orange-border);
  color: var(--excesos-peach);
  background: var(--excesos-orange-fill);
}

.panel-ex-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  scrollbar-width: thin;
  scrollbar-color: #3a2a22 transparent;
}
.panel-ex-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.panel-ex-cluster {
  margin-bottom: 0;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid rgba(61, 77, 96, 0.65);
  background: rgba(18, 21, 31, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.panel-ex-cluster-head {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  flex-wrap: nowrap;
  padding-bottom: 0;
  font-size: 11px;
  color: var(--excesos-steel);
}
.panel-ex-cluster:not(.panel-ex-cluster--folded) .panel-ex-cluster-head {
  margin-bottom: 8px;
  padding-bottom: 7px;
  border-bottom: 1px dashed rgba(61, 77, 96, 0.55);
}
.panel-ex-cluster-fold {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: #8da0b3;
  cursor: pointer;
  font-size: 9px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}
.panel-ex-cluster-fold:hover {
  background: rgba(243, 114, 44, 0.1);
  color: var(--excesos-peach);
}
.panel-ex-cluster-sellab {
  display: inline-flex;
  align-items: flex-start;
  gap: 7px;
  cursor: pointer;
  flex: 1;
  min-width: 0;
  font-size: 11px;
  font-weight: 500;
  color: var(--excesos-steel);
}
.panel-ex-cluster-sellab input {
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--excesos-peach);
}
.panel-ex-cluster-titlewrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 6px;
  flex-wrap: nowrap;
}
.panel-ex-cluster-title {
  font-weight: 600;
  line-height: 1.35;
  color: #c5d0dc;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}
.panel-ex-cluster-meta {
  font-size: 11px;
  color: #8ea3b9;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.panel-ex-cluster-nums {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-top: 1px;
}
.panel-ex-cluster-npill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  box-sizing: border-box;
  border-radius: 3px;
  font-size: 8px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  background: transparent;
  border: 1px solid rgba(80, 92, 108, 0.45);
  color: rgba(93, 108, 128, 0.88);
}
.panel-ex-cluster-npill--leve:not(.panel-ex-cluster-npill--empty) {
  border-color: rgba(120, 200, 130, 0.55);
  color: #92d698;
}
.panel-ex-cluster-npill--medio:not(.panel-ex-cluster-npill--empty) {
  border-color: rgba(255, 192, 100, 0.55);
  color: #e8c878;
}
.panel-ex-cluster-npill--grave:not(.panel-ex-cluster-npill--empty) {
  border-color: rgba(255, 130, 120, 0.7);
  color: #ff9a93;
}
.panel-ex-cluster-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.panel-ex-cluster-body.collapsed,
.panel-ex-cluster-body[hidden] {
  display: none !important;
}

.panel-ex-ev {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  column-gap: 9px;
  align-items: start;
  padding: 8px 10px;
  border: 1px solid rgba(61, 77, 96, 0.55);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(22, 26, 36, 0.95) 0%, #12151f 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02);
  font-size: 11px;
  color: var(--excesos-steel);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.panel-ex-ev:hover {
  border-color: rgba(243, 114, 44, 0.28);
  background: linear-gradient(180deg, rgba(28, 24, 28, 0.96) 0%, #14171f 100%);
}
.panel-ex-ev-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-top: 1px;
  flex-shrink: 0;
  cursor: pointer;
}
.panel-ex-ev-check input {
  margin: 0;
  accent-color: var(--excesos-peach);
}
.panel-ex-ev--gest {
  border-style: dashed;
  border-color: rgba(243, 114, 44, 0.28);
  opacity: 0.9;
}
.panel-ex-ev-main { min-width: 0; }
.panel-ex-ev-top {
  display: grid;
  grid-template-columns: 4.6ch 7.2ch minmax(0, 1fr);
  column-gap: 10px;
  align-items: center;
}
.panel-ex-ev-hora {
  font-variant-numeric: tabular-nums;
  color: #94a3b8;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.panel-ex-ev-vel {
  font-weight: 600;
  color: var(--excesos-peach);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.panel-ex-ev-top .ex-sev {
  justify-self: end;
  white-space: nowrap;
}
.panel-ex-ev-ubic {
  margin-top: 3px;
  color: #7a8a9a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10.5px;
}
.panel-ex-ev-nota {
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px solid rgba(61, 77, 96, 0.35);
  font-size: 10px;
  color: #b8a898;
  line-height: 1.35;
}

.panel-ex-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid #2a2d3a;
  flex-shrink: 0;
  background: #101218;
}
.panel-ex-foot .btn-modal:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.panel-ex-ant-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px 6px;
  border-bottom: 1px solid rgba(243, 114, 44, 0.18);
}
.panel-ex-ant-head h3 {
  margin: 0;
  font-size: 13px;
  color: var(--excesos-peach-soft);
}
.panel-ex-ant-sub {
  font-size: 10px;
  color: #8ea3b9;
  padding: 4px 14px 8px;
  line-height: 1.35;
}
.panel-ex-ant-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(243, 114, 44, 0.12);
  max-height: 108px;
  overflow: auto;
}
.panel-ex-ant-tab {
  border: 1px solid rgba(243, 114, 44, 0.18);
  background: #1a1520;
  color: var(--excesos-steel);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.panel-ex-ant-tab--activo {
  border-color: var(--excesos-orange-border);
  background: var(--excesos-orange-fill-active);
}
.panel-ex-ant-tab strong { color: #c4a89a; font-size: 11px; }
.panel-ex-ant-tab--activo strong { color: #ffab91; }
.panel-ex-ant-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 8px 10px;
}
.panel-ex-ant-foot {
  padding: 10px;
  border-top: 1px solid rgba(243, 114, 44, 0.14);
  display: flex;
  gap: 8px;
}

/* Modal intervención */
#overlay-excesos-intervencion {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
#overlay-excesos-intervencion.visible { display: flex; }
.modal-excesos-intervencion {
  width: min(440px, 92vw);
  background: #1a1d27;
  border: 1px solid var(--excesos-box-border);
  border-radius: 12px;
  padding: 18px 20px 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  position: relative;
}
.modal-excesos-intervencion h2 {
  margin: 8px 0 6px;
  text-align: center;
  font-size: 15px;
  color: var(--excesos-orange);
  font-weight: 600;
}
.modal-excesos-intervencion textarea:focus,
.modal-excesos-intervencion textarea:focus-visible {
  outline: none;
  border-color: var(--excesos-orange-border);
  box-shadow: 0 0 0 1px var(--excesos-orange-dim);
  background: #12161c;
}
.modal-excesos-intervencion .ex-int-sub {
  text-align: center;
  font-size: 11px;
  color: #8ea3b9;
  margin: 0 0 12px;
}
.modal-excesos-intervencion textarea {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  box-sizing: border-box;
  background: #12181f;
  border: 1px solid #334455;
  color: var(--excesos-steel);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 13px;
  font-family: inherit;
}
.modal-excesos-intervencion .ex-int-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}
.modal-excesos-intervencion .ex-firma { margin-top: 10px; }

/* Chrome atenuado salmón mientras overlay Excesos está abierto */
body.modo-excesos .tab:hover {
  border-color: var(--excesos-orange-border, rgba(243, 114, 44, 0.38));
  color: var(--excesos-peach, #ff8a65);
}
body.modo-excesos .tab.active {
  background: rgba(243, 114, 44, 0.1);
  color: var(--excesos-peach-soft, #ffb08a);
  border-color: rgba(243, 114, 44, 0.45);
  box-shadow: 0 0 8px rgba(243, 114, 44, 0.12);
}
body.modo-excesos .btn-header:hover,
body.modo-excesos .btn-header:focus-visible {
  border-color: rgba(243, 114, 44, 0.45);
  color: var(--excesos-peach, #ff8a65);
  background: rgba(243, 114, 44, 0.08);
}
body.modo-excesos .btn-excesos-header {
  border-color: rgba(243, 114, 44, 0.4);
  color: var(--excesos-peach, #ff8a65);
  background: rgba(243, 114, 44, 0.08);
}
