/* =====================================================================
   AHORA — cabecera, alertas y modo prueba. Las ventanas de cada sector
   están en ahora-ventanas.css (rediseño del 05/10/2026).
   Paleta del diseño que pasó el dueño ("Centro de control unificado").
   OJO, CHROME VIEJO: sin gap en flex (márgenes); en grid se usa grid-gap.
   ===================================================================== */
.en-ahora #contenido { max-width: none; padding: 0; }
.ah { --ah-fondo: #030c17; --ah-panel: #051424; --ah-borde: #17304f; --ah-borde2: #122439; --ah-tarjeta: #091b2e;
  --ah-rojo: #f43f5e; --ah-ambar: #f59e0b; --ah-cy: #22d3ee; --ah-verde: #34d399; --ah-txt: #e2e8f0; --ah-gris: #94a3b8;
  display: flex; flex-direction: column; height: calc(100vh - 53px); background: var(--ah-fondo); color: var(--ah-txt);
  font-family: 'Space Grotesk', 'Segoe UI', Arial, sans-serif; overflow: hidden; }
.ah .mono, .ah .hora-pre { font-family: 'JetBrains Mono', Consolas, monospace; }

/* ---------- Cabecera ---------- */
.ah-cab { display: flex; align-items: center; padding: 6px 14px; background: var(--ah-panel); border-bottom: 1px solid var(--ah-borde);
  font-size: 12px; flex-shrink: 0; }
.ah-cab > * { margin-right: 10px; }
.ah-titulo { font-weight: 700; letter-spacing: 3px; font-size: 14px; color: var(--ah-cy); }
.ah-titulo small { display: block; font-size: 10px; letter-spacing: 0; color: var(--ah-gris); font-weight: 400; }
.ah-reloj { font-size: 17px; font-weight: 700; color: var(--ah-cy); background: #020b14; border: 1px solid var(--ah-borde);
  border-radius: 4px; padding: 2px 10px; letter-spacing: 1px; }
.ah-cuenta { font-weight: 700; padding: 3px 9px; border-radius: 4px; white-space: nowrap; }
.ah-cuenta.rojo { color: #fda4af; background: rgba(136, 19, 55, .45); border: 1px solid rgba(244, 63, 94, .7); }
.ah-cuenta.ambar { color: #fcd34d; background: rgba(120, 53, 15, .45); border: 1px solid rgba(245, 158, 11, .7); }
.ah-chip { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; white-space: nowrap; border: 1px solid var(--ah-borde); }
.ah-chip.mal { color: #fda4af; border-color: rgba(244, 63, 94, .6); }
.ah-chip.gris { color: var(--ah-gris); }
.ah-chip.ambar { color: #fcd34d; border-color: rgba(245, 158, 11, .6); }
.ah-chip.info { color: var(--ah-cy); border-color: rgba(34, 211, 238, .45); background: rgba(8, 51, 68, .5); cursor: pointer; text-decoration: none; }
.ah-chip.cy { color: var(--ah-cy); border-color: rgba(34, 211, 238, .45); }
.ah-espacio { flex: 1; }
.ah-link { font-size: 11px; color: var(--ah-cy); cursor: pointer; white-space: nowrap; }
.ah-tilde { font-size: 11px; color: var(--ah-gris); cursor: pointer; white-space: nowrap; }
.ah-tilde input { vertical-align: middle; margin-right: 4px; }

.ah-cuadro { background: var(--ah-panel); border: 1px solid var(--ah-borde); border-radius: 8px; padding: 8px 10px;
  display: flex; flex-direction: column; min-height: 0; overflow: hidden; box-shadow: 0 6px 20px rgba(0, 0, 0, .4); }
.ah-decision { grid-column: 1; grid-row: 1 / 3; }
.ah-cuadro-cab { display: flex; align-items: center; padding-bottom: 6px; border-bottom: 1px solid var(--ah-borde2); flex-shrink: 0; }
.ah-cuadro-cab > * { margin-right: 10px; }
.ah-cuadro-cab h2 { margin: 0; font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--ah-txt); white-space: nowrap; }
.ah-cuadro-cab .ah-link { margin-left: auto; margin-right: 0; }
.barrita { display: inline-block; width: 5px; height: 13px; border-radius: 2px; margin-right: 7px; vertical-align: -1px; }
.barrita.rojo { background: var(--ah-rojo); }
.barrita.cy { background: var(--ah-cy); }


/* ---------- Alertas ---------- */
.ah-lista { flex: 1; min-height: 0; overflow: hidden; padding-top: 6px; }
.ah-alerta { background: var(--ah-tarjeta); border: 1px solid #1a385a; border-left: 4px solid var(--ah-ambar); border-radius: 6px;
  padding: 6px 10px; margin-bottom: 6px; }
.ah-alerta.rojo { border-left-color: var(--ah-rojo); border-color: rgba(136, 19, 55, .8); border-left-color: var(--ah-rojo); }
.ah-alerta.tomada { opacity: .55; border-left-color: var(--ah-verde); }
.ah-a1 { display: flex; align-items: center; cursor: pointer; font-size: 13.5px; }
.ah-a1 .hora-pre { flex-shrink: 0; font-size: 12px; padding: 0 5px; margin-right: 8px; }
.ah-tit { font-weight: 700; color: #fde68a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ah-alerta.rojo .ah-tit { color: #fecdd3; }
.ah-a1 .parte { flex-shrink: 0; }
.ah-hace { margin-left: auto; padding-left: 8px; font-size: 10.5px; color: var(--ah-gris); white-space: nowrap; flex-shrink: 0; }
.ah-cuerpo .porque { font-size: 12px; margin-top: 2px; }
.ah-cuerpo .en-marcha { font-size: 13px; margin-top: 2px; }
.ah-cuerpo .llamado { font-size: 11.5px; margin-top: 2px; }
.ah-a3 { display: flex; align-items: center; margin-top: 4px; padding-top: 4px; border-top: 1px solid #122b46; }
.ah-izq { flex: 1; min-width: 0; font-size: 12px; }
.ah-llamar { color: var(--ah-gris); margin-right: 6px; }
.ah-izq .sugerido { padding: 1px 8px; margin: 1px 4px 1px 0; font-size: 12px; background: #0f2d4d; border-color: rgba(34, 211, 238, .5); color: #a5f3fc; }
.ah-a3 .tomar { margin: 0 0 0 8px; flex-shrink: 0; font-weight: 700; }
.ah-a3 .tomar.rojo { background: #e11d48; border-color: #e11d48; color: #fff; }
.ah-a3 .tomar.amarillo { background: #d97706; border-color: #d97706; color: #111; }
/* En un renglón (cuando no entran todas): solo hora, título y "hace". */
.ah-alerta.fila { padding: 3px 10px; margin-bottom: 4px; }
.ah-alerta.fila .ah-cuerpo { display: none; }
.ah-alerta.fila .ah-a1 { font-size: 12.5px; }
.ah-mas { font-size: 12px; color: var(--ah-gris); padding: 4px 2px; }



/* ---------- Modo prueba: ventana flotante (el cuadrante libre queda libre) ---------- */
.ah-prueba { position: fixed; right: 24px; bottom: 44px; width: 440px; max-height: 70vh; overflow: auto; z-index: 40;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .7); border-radius: 8px; }
.ah-prueba .panel { margin: 0; }

/* ---------- Mensajes (05/10/2026) ---------- */
/* NUEVA: se mueve durante 1 minuto (la que hizo sonar el timbre está arriba). */
.ah-nueva { flex-shrink: 0; font-size: 10px; font-weight: 700; letter-spacing: 1px; color: #111; background: #fde047;
  border-radius: 3px; padding: 1px 6px; margin-right: 8px; animation: ahParpadeo .8s steps(2) infinite; }
.ah-alerta.nueva { animation: ahNuevaBorde 1s ease-in-out infinite; }
.ah-alerta.nueva.rojo { box-shadow: 0 0 0 2px rgba(244, 63, 94, .9), 0 0 24px rgba(244, 63, 94, .55); }
@keyframes ahParpadeo { 50% { opacity: .25; } }
@keyframes ahNuevaBorde { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
/* Resuelta: 3 minutos en verde, un renglón. */
.ah-alerta.resuelta-ok { border-left-color: var(--ah-verde); border-color: rgba(52, 211, 153, .45); border-left-color: var(--ah-verde);
  background: rgba(6, 60, 40, .35); padding: 3px 10px; margin-bottom: 4px; }
.ah-alerta.resuelta-ok .ah-tit { color: #a7f3d0; font-weight: 600; }
.ah-ok { flex-shrink: 0; font-size: 10px; font-weight: 700; letter-spacing: 1px; color: #04130d; background: var(--ah-verde);
  border-radius: 3px; padding: 1px 6px; margin-right: 8px; }
/* Tendencia: empeorar se nota; mejorar no llama la atención. */
.tend { flex-shrink: 0; margin-left: 8px; font-size: 11px; white-space: nowrap; }
.tend.sube { color: #fda4af; font-weight: 700; }
.tend.baja { color: #64748b; }

/* Por qué sonó el timbre (10 min a la vista). */
.ah-chip.sono { color: #111; background: #fde047; border-color: #fde047; font-weight: 700; max-width: 420px; overflow: hidden; text-overflow: ellipsis; }

.ah-chip.verde { color: var(--ah-verde); border-color: rgba(52, 211, 153, .5); background: rgba(6, 60, 40, .35); }
.verde-txt { color: var(--ah-verde); }
