/* GASCA · Gestión comercial › Contratos y servicios (INC-00731, gasca_contratos.js). Usa la base .ra- de gasca_rrhh_apps.css */
/* INC-00780 (Hugo, 05/11/2026): «botones con fondo transparente que no se ven» (p. ej. «Activar»): las piezas .ra- (ra-prim…) usan
   las variables --ra-* y esta vista no las tenía (solo se definen en las vistas de RRHH, PCC…). Las mismas de gasca_rrhh_apps.css. */
#ctr-view {
    --ra-red: #b4000c; --ra-ink: #0f172a; --ra-ink2: #334155; --ra-muted: #64748b; --ra-line: #e2e8f0; --ra-card: #fff; --ra-bg: #f8fafc;
    --ra-blue: #2a78d6; --ra-green: #0f7b48; --ra-warn: #a15c00;
    --ra-radius: 16px; --ra-shadow: 0 1px 2px rgba(15,23,42,.04), 0 10px 30px -14px rgba(15,23,42,.16);
}
.ctr { padding: 4px 2px 24px; }
.ctr-h h2 { margin: 0 0 4px; font-size: 1.35rem; }
.ctr-h p { margin: 0 0 12px; color: #64748b; font-size: .86rem; max-width: 980px; }
.ctr-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; border-bottom: 1px solid #e2e8f0; }
.ctr-tabs button { border: 0; background: transparent; padding: 9px 12px; font-weight: 700; color: #475569; cursor: pointer; border-bottom: 3px solid transparent; }
.ctr-tabs button.on { color: #0f766e; border-bottom-color: #0f766e; }
.ctr-tabs-sub { margin-top: 4px; }
.ctr-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0 0 12px; }
.ctr-bar .ra-in { min-width: 220px; }
.ctr-bar input.ra-in[data-ctr-q], .ctr-bar input.ra-in[data-ctr-cq] { flex: 1; }
.ctr-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.ctr-kpis > div { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 10px 14px; }
.ctr-kpis b { display: block; font-size: 1.4rem; color: #0f766e; }
.ctr-kpis span { font-size: .78rem; color: #64748b; }
.ctr-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; }
.ctr-card-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.ctr-card-h h3 { margin: 0; font-size: 1.02rem; }
.ctr-card h4 { margin: 14px 0 6px; font-size: .9rem; }
.ctr-kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px 16px; }
.ctr-kv span { display: block; font-size: .72rem; color: #64748b; text-transform: uppercase; letter-spacing: .03em; }
.ctr-obs { white-space: pre-wrap; background: #f8fafc; border-radius: 8px; padding: 8px 10px; margin: 10px 0 0; }
.ctr-chip { display: inline-block; font-size: .72rem; font-weight: 700; border-radius: 999px; padding: 1px 8px; vertical-align: middle; }
.ctr-ok { background: #dcfce7; color: #166534; } .ctr-reg { background: #fef3c7; color: #92400e; } .ctr-mal { background: #fee2e2; color: #991b1b; } .ctr-na { background: #e2e8f0; color: #334155; }
.ctr-parte { display: inline-block; background: #f1f5f9; border-radius: 8px; padding: 2px 8px; margin: 2px 2px 2px 0; font-size: .84rem; }
.ctr-parte small { color: #64748b; }
.ctr-mut { color: #64748b; }
.ctr-serv { border: 1px solid #e2e8f0; border-left: 4px solid #0f766e; border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.ctr-serv-h { display: flex; justify-content: space-between; gap: 10px; }
.ctr-serv-emp { display: flex; gap: 14px; flex-wrap: wrap; margin: 6px 0; font-size: .86rem; }
.ctr-just { color: #92400e; }
.ctr-alc { font-size: .86rem; }
.ctr-x { border: 0; background: transparent; color: #b91c1c; font-weight: 800; cursor: pointer; padding: 0 4px; }
.ctr-docs { margin: 0; padding-left: 18px; } .ctr-docs li { margin: 4px 0; }
.ctr-vers li { margin: 3px 0; }
.ctr-aviso { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; border-radius: 10px; padding: 8px 12px; margin: 0 0 10px; font-size: .86rem; }
.ctr-res { max-height: 220px; overflow: auto; display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.ctr-res button { text-align: left; border: 1px solid #e2e8f0; background: #fff; border-radius: 8px; padding: 6px 10px; cursor: pointer; }
.ctr-res button.on, .ctr-res button:hover { border-color: #0f766e; background: #f0fdfa; }
.ctr-res small { color: #64748b; }
.ctr-baja { opacity: .6; }
.ctr-chk { display: inline-flex; align-items: center; gap: 6px; font-size: .86rem; }
.ra-btn.ra-peq { padding: 4px 9px; font-size: .8rem; }
@media (max-width: 760px) { .ctr-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ctr-serv-h { flex-direction: column; } }
/* INC-00731 fase 2: personal del servicio */
.ctr-serv-b { border-left-color: #f59e0b; }
.ctr-canon { font-size: 1.05rem; color: #0f766e; }
.ctr-reglas summary { cursor: pointer; font-weight: 700; color: #475569; margin-top: 8px; }
/* INC-00731 fase 3: ausencias y coberturas */
.ctr-cob-kpi { display: flex; gap: 16px; flex-wrap: wrap; margin: 6px 0; font-size: .88rem; }
.ctr-rojo { color: #b91c1c; } .ctr-verde { color: #15803d; }
.ctr-nec-cubierta { border-left-color: #16a34a; } .ctr-nec-parcial { border-left-color: #f59e0b; } .ctr-nec-pendiente { border-left-color: #dc2626; } .ctr-nec-anulada { opacity: .6; border-left-color: #94a3b8; }
