/* GASCA · RRHH — Sustituciones (vista 'rrhh-sust-view'). Usa las piezas del cuadro de mando de RRHH (gasca_rrhh.css: rh-*) */
#rrhh-sust-view {
    --rh-red: #b4000c; --rh-ink: #0f172a; --rh-ink2: #334155; --rh-muted: #64748b; --rh-line: #e2e8f0; --rh-card: #fff; --rh-bg: #f8fafc;
    --rh-s1: #2a78d6; --rh-s2: #eb6834; --rh-s3: #1baf7a; --rh-s4: #eda100; --rh-s5: #e87ba4; --rh-s6: #008300; --rh-s7: #4a3aa7; --rh-s8: #e34948;
    --rh-good: #0f7b48; --rh-bad: #c0262d; --rh-warn: #a15c00;
    --rh-radius: 16px; --rh-shadow: 0 1px 2px rgba(15,23,42,.04), 0 10px 30px -14px rgba(15,23,42,.16);
    font-family: 'Inter', sans-serif; color: var(--rh-ink); font-size: 14px; line-height: 1.45;
}
#rrhh-sust-view.active { container-type: inline-size; container-name: rh; }
#rrhh-sust-view :is(h2, h3, h4, p) { margin: 0; padding: 0; font-family: inherit; }
#rrhh-sust-view :is(h2, h3, h4) { color: var(--rh-ink); }
#rrhh-sust-view :is(button, select, input) { font-family: inherit; }

/* cabecera del mes */
.su-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 20px 22px; border-radius: 18px; color: #fff;
  background: linear-gradient(135deg, #0b4f4a 0%, #0f766e 50%, #1baf7a 100%); box-shadow: 0 18px 40px -22px rgba(15,118,110,.7); }
.su-hero-t span { font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
#rrhh-sust-view .su-hero-t h3 { margin: 4px 0 6px; font-size: 1.45rem; font-weight: 800; color: #fff; }
#rrhh-sust-view .su-hero-t p { margin: 0; font-size: .86rem; opacity: .92; color: #fff; }
.su-hero-k { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.su-ring { --c: #fff; width: 104px; height: 104px; border-radius: 50%; display: grid; place-content: center; text-align: center;
  background: radial-gradient(closest-side, #0f766e 78%, transparent 79% 100%), conic-gradient(var(--c) calc(var(--p) * 1%), rgba(255,255,255,.22) 0); }
.su-ring b { font-size: 1.45rem; font-weight: 800; line-height: 1; }
.su-ring small { font-size: .66rem; opacity: .9; }
.su-ring-ok { --c: #86efac; } .su-ring-aviso { --c: #fde047; } .su-ring-mal { --c: #fca5a5; }
.su-hero-m { display: grid; gap: 6px; }
.su-hero-m div { display: flex; gap: 8px; align-items: baseline; background: rgba(255,255,255,.12); border-radius: 10px; padding: 6px 12px; }
.su-hero-m b { font-size: 1.15rem; font-weight: 800; min-width: 38px; text-align: right; }
.su-hero-m span { font-size: .76rem; opacity: .92; }
@container rh (max-width: 760px) { .su-hero { grid-template-columns: 1fr; } }

/* KPIs con semáforo */
.su-k-ok { border-left: 4px solid #16a34a; } .su-k-aviso { border-left: 4px solid #eab308; } .su-k-mal { border-left: 4px solid #dc2626; }
.su-badge { background: #dc2626; color: #fff; border-radius: 999px; padding: 0 7px; font-weight: 800; font-size: .68rem; margin-left: 4px; }

/* filtros */
.su-f-q input { width: 100%; height: 34px; border: 1px solid var(--rh-line); border-radius: 10px; padding: 0 10px; font: inherit; font-size: .82rem; box-sizing: border-box; }
.su-fs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }

/* estados y cobertura */
.su-est { display: inline-block; border-radius: 999px; padding: 2px 9px; font-size: .7rem; font-weight: 800; white-space: nowrap; background: #eef2f6; color: #334155; }
.su-est-abierta { background: #fef3c7; color: #92400e; }
.su-est-en-curso { background: #dbeafe; color: #1e40af; }
.su-est-cerrada { background: #e2e8f0; color: #334155; }
.su-est-pte-de-registrar { background: #fee2e2; color: #b91c1c; }
.su-cub { display: inline-flex; gap: 4px; align-items: center; border-radius: 999px; padding: 2px 9px; font-size: .7rem; font-weight: 800; white-space: nowrap; }
.su-cub.su-si { background: #dcfce7; color: #15803d; } .su-cub.su-no { background: #fee2e2; color: #b91c1c; }

/* tabla de incidencias (hoja del Excel) */
.su-tabla td.su-cat { font-weight: 800; background: #f8fafc; vertical-align: top; min-width: 170px; }
.su-tabla td.su-tot { font-weight: 800; background: #f8fafc; vertical-align: middle; }
.su-tabla tr.su-cero td:not(.su-cat):not(.su-tot) { color: #94a3b8; }
.su-tabla tfoot td, .su-anual tfoot td { font-weight: 800; background: #f1f5f9; border-top: 2px solid #cbd5e1; }
.su-tabla tr.su-otras td, .su-anual tr.su-otras td { font-weight: 700; background: #fff; color: #475569; border-top: 1px solid #e2e8f0; }
.su-sub { color: var(--rh-muted); font-size: .68rem; }
.su-aviso { background: #fffbeb; border-color: #fde68a; color: #92400e; }

/* absentismo anual */
.su-anual th { white-space: normal; min-width: 72px; line-height: 1.2; }
.su-anual td.su-tot { font-weight: 800; background: #f8fafc; }
.su-anual td.su-pct { font-weight: 800; color: #0f766e; }
.su-anual tr.su-cero td { color: #cbd5e1; }
.su-inp { width: 78px; text-align: right; border: 1px dashed #cbd5e1; border-radius: 8px; padding: 4px 6px; font: inherit; font-size: .8rem; background: #fff; }
.su-inp::placeholder { color: #94a3b8; }
.su-inp.su-man { border: 1.5px solid #0f766e; background: #ecfdf5; font-weight: 800; color: #065f46; }
.su-inp:focus { outline: 2px solid rgba(15,118,110,.3); }
.su-defs { margin-top: 10px; font-size: .74rem; color: var(--rh-muted); display: grid; gap: 4px; }
.su-defs p { margin: 0; }

/* detalle */
.su-modal { width: min(1080px, 100%); }
.su-det { display: grid; gap: 14px; }
.su-marcas { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.su-pormes { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; font-size: .85rem; }
.su-pormes span { color: var(--rh-muted, #64748b); width: 100%; }
.su-pormes b { background: #eef2ff; color: #3730a3; border-radius: 999px; padding: 2px 10px; font-weight: 600; }
.su-marca { display: inline-flex; gap: 5px; align-items: center; border-radius: 999px; padding: 3px 10px; font-size: .72rem; font-weight: 700; background: #f1f5f9; color: #94a3b8; }
.su-marca.su-si { background: #e0f2fe; color: #075985; }
.su-obs { margin: 10px 0 0 !important; padding: 8px 12px; border-radius: 10px; background: #f8fafc; border: 1px solid var(--rh-line); font-size: .8rem; color: #334155 !important; white-space: pre-wrap; }
.su-sus { display: grid; gap: 8px; }
.su-s { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) minmax(0, 1fr); gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--rh-line); border-left: 4px solid #1baf7a; border-radius: 12px; font-size: .82rem; }
.su-s .su-obs { grid-column: 1 / -1; margin-top: 0 !important; }
.su-s small { color: var(--rh-muted); }
.su-otras-l { display: grid; gap: 6px; }
.su-otras-l button { display: grid; grid-template-columns: 90px 90px minmax(0, 1fr) 60px auto; gap: 10px; align-items: center; text-align: left; border: 1px solid var(--rh-line); background: #fff; border-radius: 10px; padding: 7px 10px; font: inherit; font-size: .78rem; cursor: pointer; }
.su-otras-l button:hover { background: #f8fafc; }
@media (max-width: 700px) { .su-s { grid-template-columns: 1fr; } .su-otras-l button { grid-template-columns: 1fr 1fr; } }

.su-tabla code, .rh-t code { white-space: nowrap; }

/* aire: separación entre la cabecera del mes, las tarjetas y los bloques; más relleno dentro del bloque verde */
#rrhh-sust-view [data-cuerpo] { display: flex; flex-direction: column; gap: 22px; }
#rrhh-sust-view .su-hero { padding: 28px 30px; gap: 28px; border-radius: 20px; }
#rrhh-sust-view .su-hero-t h3 { margin: 8px 0 10px; }
#rrhh-sust-view .su-hero-t p { line-height: 1.55; }
#rrhh-sust-view .su-hero-k { gap: 26px; }
#rrhh-sust-view .su-hero-m { gap: 10px; }
#rrhh-sust-view .su-hero-m div { padding: 9px 16px; }
@container rh (max-width: 760px) { #rrhh-sust-view .su-hero { padding: 22px; gap: 20px; } }

/* meses cerrados */
.su-anual tr.su-cerrado td { background: #f8fafc; }
.su-lock { color: #0f766e; font-size: .75rem; }
.su-cambio { color: #ca8a04; }
.su-btn-cerrar { white-space: nowrap; }
.su-cierre { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: 14px; background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; font-size: .84rem; }
.su-cierre > i { font-size: 1.1rem; margin-top: 2px; }
.su-cierre span { display: block; margin-top: 2px; }

/* correcciones a mano en meses cerrados y notas */
.su-inp.su-celda { width: 64px; border-style: solid; border-color: transparent; background: transparent; }
.su-inp.su-celda:hover, .su-inp.su-celda:focus { border-color: #94a3b8; background: #fff; }
.su-inp.su-celda.su-man { border-color: #0f766e; background: #ecfdf5; }
.su-nota-c { max-width: 220px; }
.su-con-nota { background: #fef9c3 !important; border-color: #fde047 !important; color: #713f12 !important; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 210px; }
.su-btn-cubrir { background: #dc2626 !important; color: #fff !important; border-color: #dc2626 !important; }
.su-btn-nueva { background: #0f766e !important; color: #fff !important; border-color: #0f766e !important; }
.su-cerca { font-weight: 700; } .su-cerca-0 { color: #15803d; } .su-cerca-1 { color: #2a78d6; } .su-cerca-2 { color: #a16207; } .su-cerca-3 { color: #94a3b8; }
.su-obs-c { display: inline-block; max-width: 280px; white-space: normal; font-size: .76rem; color: #475569; }
.su-jacc { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.su-j-ok { color: #15803d !important; } .su-j-no { color: #b91c1c !important; }
.su-correo-txt { white-space: pre-wrap; font: inherit; font-size: .86rem; line-height: 1.5; background: #f8fafc; border-radius: 10px; padding: 12px; max-height: 60vh; overflow: auto; }
.su-cls { font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #f1f5f9; color: #334155; white-space: nowrap; }
.su-cls-falta { background: #fee2e2; color: #991b1b; } .su-cls-baja { background: #ffedd5; color: #9a3412; } .su-cls-nómina { background: #dbeafe; color: #1e40af; }
.su-cls-currículum { background: #ede9fe; color: #5b21b6; } .su-cls-datos { background: #dcfce7; color: #166534; }
.su-wa { display: flex; flex-direction: column; gap: 8px; max-height: 55vh; overflow: auto; padding: 10px; background: #efeae2; border-radius: 12px; }
.su-wa-m { max-width: 78%; padding: 8px 10px; border-radius: 10px; font-size: .86rem; white-space: pre-wrap; box-shadow: 0 1px 1px rgba(0,0,0,.08); }
.su-wa-m small { display: block; margin-top: 4px; font-size: .68rem; color: #64748b; }
.su-wa-in { align-self: flex-start; background: #fff; } .su-wa-out { align-self: flex-end; background: #d9fdd3; }
.su-wa-resp { display: flex; gap: 8px; margin-top: 10px; align-items: flex-end; } .su-wa-resp textarea { flex: 1; border: 1px solid #e2e8f0; border-radius: 10px; padding: 8px; font: inherit; }
.su-pend { color: #b91c1c; font-weight: 700; }

/* INC-00110: leyendas plegadas para quien no es administrador */
.rh-notas-det { border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; padding: 8px 12px; }
.rh-notas-det > summary { cursor: pointer; font-weight: 700; font-size: .82rem; color: #334155; display: flex; gap: 8px; align-items: center; }
.rh-notas-det[open] > summary { margin-bottom: 8px; }
