/* ===== Reloj de Actividades (barra superior de todas las paginas) =====
   Prefijo actr- para no chocar con los estilos de cada pagina. Colores del
   Control Operativo: azul industrial #0D2C54 y azul electrico #0056B3. */
.actr { position: relative; display: inline-flex; align-items: center; font-family: Arial, sans-serif; font-size: 10pt; line-height: 1.3; color: #212529; }
.actr[hidden] { display: none !important; }
.actr-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; min-height: 0; padding: 0; border-radius: 50%; border: 1px solid #ccd6e3; background: #fff; color: #0D2C54; cursor: pointer; transition: background 0.15s; }
.actr-btn:hover { background: #eef3fa; }
.actr-btn svg { width: 22px; height: 22px; }
.actr.oscuro .actr-btn { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.45); color: #fff; }
.actr.oscuro .actr-btn:hover { background: rgba(255,255,255,0.25); }
.actr-badge { position: absolute; top: -5px; right: -5px; min-width: 20px; height: 20px; padding: 0 5px; box-sizing: border-box; border-radius: 10px; background: #c0392b; color: #fff; font-size: 8.5pt; font-weight: bold; line-height: 20px; text-align: center; box-shadow: 0 0 0 2px #fff; }
.actr-badge[hidden] { display: none; }
.actr-flotante { position: fixed; top: 10px; right: 12px; z-index: 2300; }

.actr-panel { position: absolute; top: calc(100% + 8px); right: 0; z-index: 4400; width: 400px; max-width: calc(100vw - 20px); max-height: min(75vh, 640px); display: flex; flex-direction: column; background: #fff; border: 1px solid #ccd6e3; border-radius: 10px; box-shadow: 0 10px 30px rgba(13,44,84,0.25); text-align: left; overflow: hidden; }
.actr-panel[hidden] { display: none; }
.actr-cab { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; background: #0D2C54; color: #fff; font-weight: bold; }
.actr-cab small { font-weight: normal; opacity: 0.8; }
.actr-cuerpo { overflow-y: auto; flex: 1; }
.actr-grupo { border-bottom: 1px solid #eef1f5; }
.actr-grupo > button { display: flex; width: 100%; align-items: center; gap: 8px; padding: 10px 14px; min-height: 0; border: none; border-radius: 0; background: #f7f9fc; color: #0D2C54; font: bold 10pt Arial, sans-serif; cursor: pointer; text-align: left; }
.actr-grupo > button .flecha { margin-left: auto; font-size: 8pt; color: #888; transition: transform 0.15s; }
.actr-grupo.cerrado > button .flecha { transform: rotate(-90deg); }
.actr-grupo.cerrado .actr-filas { display: none; }
.actr-punto { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.actr-cuenta { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 10px; background: #e2e8f0; color: #33475e; font-size: 8.5pt; text-align: center; }
.actr-vacio { padding: 8px 14px 12px 32px; color: #888; font-size: 9pt; }
.actr-fila { padding: 9px 14px 10px 32px; border-top: 1px solid #f0f2f5; }
.actr-fila .tit { font-weight: bold; color: #212529; word-break: break-word; }
.actr-fila .meta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 3px; font-size: 8.5pt; color: #666; }
.actr-fila .acc { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.actr-fila .acc button { padding: 4px 9px; min-height: 0; border-radius: 5px; border: 1px solid #ccd6e3; background: #fff; color: #0D2C54; font: bold 8.5pt Arial, sans-serif; cursor: pointer; }
.actr-fila .acc button:hover { background: #eef3fa; }
.actr-fila .acc button.listo { border-color: #9fd3ae; color: #1e7e34; }
.actr-pie { display: block; padding: 11px 14px; border-top: 1px solid #e2e8f0; background: #f7f9fc; color: #0056B3; font-weight: bold; text-decoration: none; text-align: right; }
.actr-pie:hover { text-decoration: underline; }

/* Texto de vencimiento: rojo / naranja / verde */
.act-venc { font-weight: bold; white-space: nowrap; }
.act-venc.vencida { color: #c0392b; }
.act-venc.hoy { color: #c76a00; }
.act-venc.proxima { color: #1e7e34; }
.act-punto-vencida { background: #c0392b; }
.act-punto-hoy { background: #e67e22; }
.act-punto-proxima { background: #28a745; }

/* ===== Modales compartidos (Listo y Reagendar) ===== */
.actm-fondo { position: fixed; inset: 0; z-index: 4900; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0,0,0,0.55); font-family: Arial, sans-serif; font-size: 10pt; color: #212529; line-height: 1.3; }
.actm-caja { width: 100%; max-width: 480px; max-height: 92vh; overflow-y: auto; box-sizing: border-box; background: #fff; border-radius: 10px; padding: 20px; box-shadow: 0 8px 32px rgba(0,0,0,0.3); text-align: left; }
.actm-caja h3 { margin: 0 0 4px; color: #0D2C54; font-size: 13pt; }
.actm-sub { color: #555; font-size: 9.5pt; margin-bottom: 14px; word-break: break-word; }
.actm-campo { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.actm-campo > label, .actm-etq { font-weight: bold; color: #0D2C54; font-size: 9.5pt; }
.actm-campo input[type="date"], .actm-campo select, .actm-campo textarea, .actm-campo input[type="text"] { padding: 8px; border: 1px solid #ccc; border-radius: 4px; font: 10pt Arial, sans-serif; box-sizing: border-box; width: 100%; }
.actm-campo textarea { min-height: 70px; resize: vertical; }
.actm-atajos { display: flex; flex-wrap: wrap; gap: 6px; }
.actm-atajos button { padding: 6px 11px; min-height: 0; border-radius: 14px; border: 1px solid #ccd6e3; background: #fff; color: #0D2C54; font: 9pt Arial, sans-serif; cursor: pointer; }
.actm-atajos button.activo { background: #0056B3; border-color: #0056B3; color: #fff; font-weight: bold; }
.actm-nota { font-size: 8.5pt; color: #666; }
.actm-aviso { background: #fff8e1; border-left: 4px solid #f0ad4e; padding: 8px 11px; border-radius: 4px; color: #7a5c00; font-size: 9pt; margin-bottom: 12px; }
.actm-error { display: none; background: #fdecea; color: #a71d2a; border-radius: 4px; padding: 8px 11px; font-size: 9.5pt; font-weight: bold; margin-bottom: 12px; }
.actm-ev-archivo, .actm-ev-reporte { display: flex; flex-direction: column; gap: 4px; }
.actm-opciones { display: flex; gap: 14px; flex-wrap: wrap; }
.actm-opciones label { font-weight: normal; color: #212529; display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.actm-botones { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.actm-botones button { padding: 9px 18px; border-radius: 4px; border: 1px solid transparent; font: bold 10pt Arial, sans-serif; cursor: pointer; }
.actm-ok { background: #0056B3; color: #fff; }
.actm-ok:hover { background: #0D2C54; }
.actm-ok:disabled { background: #a0aec0; cursor: wait; }
.actm-cancelar { background: #F4F6F9; color: #0D2C54; border-color: #ccc !important; }

/* ===== Resumen diario ===== */
.actr-cab small a { color: #fff; text-decoration: underline; }
.actm-caja.actres { max-width: 620px; }
.actres-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; border-bottom: 3px solid #0D2C54; padding-bottom: 10px; margin-bottom: 4px; }
.actres-cab .actm-cancelar { padding: 7px 14px; border-radius: 4px; border: 1px solid #ccc; font: bold 9.5pt Arial, sans-serif; cursor: pointer; }
.actres-sec { font-weight: bold; color: #0056B3; font-size: 10.5pt; margin: 14px 0 8px; }
.actres-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.actres-kpi { background: #F4F6F9; border-left: 5px solid #a0aec0; border-radius: 6px; padding: 8px 10px; }
.actres-kpi .n { font-size: 18pt; font-weight: bold; color: #0D2C54; line-height: 1.1; }
.actres-kpi .t { font-size: 8.5pt; color: #555; text-transform: uppercase; font-weight: bold; }
.actres-kpi.vencida { border-left-color: #c0392b; } .actres-kpi.vencida .n { color: #a71d2a; }
.actres-kpi.hoy { border-left-color: #e67e22; }
.actres-kpi.proxima { border-left-color: #28a745; }
.actres-lista { border: 1px solid #e2e8f0; border-radius: 8px; margin-top: 8px; overflow: hidden; }
.actres-lista .actr-fila { padding-left: 14px; }
.actres-lista .actr-fila:first-child { border-top: none; }
.actres-ok { margin-top: 8px; background: #eaf7ee; border-left: 4px solid #28a745; border-radius: 4px; padding: 9px 12px; color: #1e7e34; font-size: 9.5pt; }
.actres-tabla { width: 100%; border-collapse: collapse; margin-top: 8px; font: 9pt Arial, sans-serif; }
.actres-tabla th { background: #0D2C54; color: #fff; text-align: left; padding: 6px 8px; }
.actres-tabla td { border-bottom: 1px solid #eef1f5; padding: 6px 8px; }
.actres-tabla .num { text-align: center; }
.actres-tabla .rojo { color: #a71d2a; font-weight: bold; }

@media screen and (max-width: 640px) {
    .actr-panel { position: fixed; top: 64px; left: 8px; right: 8px; width: auto; max-width: none; max-height: calc(100vh - 80px); }
    .actm-caja { padding: 14px; }
}
@media screen and (pointer: coarse) {
    .actr-fila .acc button { padding: 8px 12px; font-size: 9.5pt; }
    .actm-campo input, .actm-campo select, .actm-campo textarea { font-size: 16px !important; }
}
@media print { .actr, .actm-fondo { display: none !important; } }
