:root {
  --fondo: #f4f5f7; --papel: #fff; --texto: #1f2933; --suave: #616e7c; --borde: #d9dee4;
  --primario: #1d4e89; --primario-2: #163d6b; --festivo: #fff4e5; --descanso: #eef2f6;
  --ok: #1e7b4f; --aviso: #b54708; --error: #b42318;
  font-family: "Segoe UI", system-ui, sans-serif; font-size: 14px; color: var(--texto);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--fondo); }
[hidden] { display: none !important; }

.barra { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; background: var(--primario);
  color: #fff; padding: .6rem 1.2rem; position: sticky; top: 0; z-index: 10; }
.marca { font-weight: 600; font-size: 1.05rem; display: flex; align-items: center; gap: .8rem; }
.marca span { font-weight: 400; opacity: .75; margin-left: .3rem; }
/* El logo tiene letras oscuras: va sobre un fondo blanco para leerse sobre la barra azul */
.logo-barra { height: 40px; width: auto; background: #fff; border-radius: 6px; padding: 2px 6px; display: block; }
.logo-acceso { width: 230px; max-width: 100%; height: auto; align-self: center; margin-bottom: .3rem; }
nav { display: flex; gap: .25rem; flex-wrap: wrap; }
nav button { background: transparent; color: #dce6f2; border: 0; padding: .45rem .8rem; border-radius: 4px; cursor: pointer; font: inherit; }
nav button:hover { background: rgba(255,255,255,.1); }
nav button.activo { background: #fff; color: var(--primario); font-weight: 600; }
.sesion { margin-left: auto; font-size: .9rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
button.enlace { background: none; border: 0; color: #dce6f2; text-decoration: underline; padding: .2rem; }
button.enlace:hover { background: none; color: #fff; }
.rol { padding: .1rem .5rem; border-radius: 999px; font-size: .75rem; background: #e8f1fb; color: var(--primario); }
.rol.aprobador { background: #e7f6ee; color: var(--ok); }
/* Lo que solo ve la Coordinadora de Gestión Humana, y lo que no ve un coordinador operativo
   (el servidor también lo bloquea: esto solo ordena la pantalla) */
body.no-admin .solo-admin { display: none !important; }
body.es-coordinador .solo-gh { display: none !important; }

/* Acceso y diálogos */
.acceso, .fondo-dialogo { position: fixed; inset: 0; display: grid; place-items: center; padding: 1rem;
  background: linear-gradient(160deg, #1d4e89, #0f2d52); z-index: 40; }
.fondo-dialogo { background: rgba(15, 45, 82, .55); }
.tarjeta-acceso { background: var(--papel); width: min(380px, 100%); padding: 1.8rem; border-radius: 10px;
  display: flex; flex-direction: column; gap: .8rem; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.tarjeta-acceso h1 { margin: 0; font-size: 1.3rem; color: var(--primario); }
.tarjeta-acceso h2 { margin: 0; }
.tarjeta-acceso .nota { margin: -.4rem 0 .2rem; }
.tarjeta-acceso label { display: flex; flex-direction: column; gap: .25rem; font-size: .85rem; color: var(--suave); }
.tarjeta-acceso input { padding: .55rem .6rem; }
.tarjeta-acceso button[type=submit] { padding: .6rem; }

/* Panel de quincena */
.resumen { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: .8rem; }
.chip { background: var(--papel); color: var(--texto); border: 1px solid var(--borde); border-radius: 999px; padding: .35rem .9rem; }
.chip:hover { background: #eef3f9; }
.chip b { margin-left: .3rem; }
.chip.activo { border-color: var(--primario); box-shadow: inset 0 0 0 1px var(--primario); background: #eef3f9; color: var(--primario); }
.chip.CON_ALERTAS b { color: var(--aviso); }
.chip.AUTORIZADA b { color: var(--ok); }
.cuenta-alertas { background: #fff4e5; color: var(--aviso); font-weight: 700; padding: .05rem .5rem; border-radius: 999px; }
.acciones-fila { white-space: nowrap; display: flex; gap: .3rem; }
label.crece { flex: 1; min-width: 14rem; }
.vacio-grande { background: var(--papel); border: 1px dashed var(--borde); border-radius: 6px; padding: 3rem; text-align: center; color: var(--suave); }

/* Digitación */
.recepcion { display: flex; gap: 1rem; flex-wrap: wrap; align-items: end; background: var(--papel);
  border: 1px solid var(--borde); border-left: 4px solid var(--primario); border-radius: 6px; padding: .8rem 1rem; margin-bottom: 1rem; }
.recepcion label, .adjunto > span { display: flex; flex-direction: column; gap: .2rem; font-size: .8rem; color: var(--suave); }
.adjunto { display: flex; flex-direction: column; gap: .2rem; }
.adjunto > div { display: flex; gap: .6rem; align-items: center; min-height: 2rem; }
.boton.pequeno { padding: .25rem .6rem; font-size: .85rem; }
.atajos { font-size: .8rem; color: var(--suave); line-height: 1.9; }
kbd { display: inline-block; min-width: 1.4rem; text-align: center; padding: 0 .3rem; border: 1px solid var(--borde);
  border-bottom-width: 2px; border-radius: 4px; background: #fff; font: 600 .78rem/1.4 Consolas, monospace; color: var(--texto); }
details.panel summary { cursor: pointer; list-style: none; }
details.panel summary h3 { display: inline; margin: 0; }
details.panel summary::before { content: "▸ "; color: var(--primario); }
details.panel[open] summary::before { content: "▾ "; }
details.panel[open] summary { margin-bottom: .6rem; }

main { padding: 1.2rem; max-width: 1500px; margin: 0 auto; }
.btn-volver { margin-bottom: .8rem; }
.con-boton { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.con-boton select { flex: 1 1 100%; min-width: 0; }
h2 { margin: 0 0 .2rem; font-size: 1.2rem; }
h3 { font-size: .95rem; margin: 1rem 0 .5rem; color: var(--primario); }
h3:first-child { margin-top: 0; }

button, .boton { background: var(--primario); color: #fff; border: 1px solid var(--primario); padding: .45rem .9rem;
  border-radius: 4px; cursor: pointer; font: inherit; text-decoration: none; display: inline-block; white-space: nowrap; }
button:hover, .boton:hover { background: var(--primario-2); }
button.secundario, .boton.secundario { background: #fff; color: var(--primario); }
button.secundario:hover, .boton.secundario:hover { background: #eef3f9; }
button.peligro { background: var(--error); border-color: var(--error); }
button.pequeno { padding: .2rem .55rem; font-size: .85rem; }
button:disabled { opacity: .5; cursor: default; }

input, select { font: inherit; padding: .35rem .45rem; border: 1px solid var(--borde); border-radius: 4px; background: #fff; }
input:disabled, select:disabled { background: #f1f3f5; color: var(--suave); }
input.corto { width: 6rem; }

.filtros, .herramientas { display: flex; gap: .8rem; align-items: end; flex-wrap: wrap; margin-bottom: 1rem;
  background: var(--papel); padding: .8rem 1rem; border: 1px solid var(--borde); border-radius: 6px; }
.filtros label, .formulario label, .herramientas label { display: flex; flex-direction: column; gap: .2rem; font-size: .8rem; color: var(--suave); }
label.check { flex-direction: row !important; align-items: center; gap: .4rem; color: var(--texto) !important; font-size: .9rem !important; }
.espacio { flex: 1; }
.sucio { color: var(--aviso); font-weight: 600; align-self: center; }

.formulario { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .8rem; align-items: end;
  background: var(--papel); padding: 1rem; border: 1px solid var(--borde); border-radius: 6px; margin-bottom: 1rem; }
.formulario .acciones { display: flex; gap: .5rem; }
.nota { color: var(--suave); font-size: .85rem; margin: -.4rem 0 1rem; }

.contenedor-tabla { overflow-x: auto; }
.tabla { width: 100%; border-collapse: collapse; background: var(--papel); border: 1px solid var(--borde); }
.tabla th, .tabla td { padding: .45rem .6rem; border-bottom: 1px solid var(--borde); text-align: left; vertical-align: middle; }
.tabla th { background: #eef1f5; font-size: .8rem; text-transform: uppercase; letter-spacing: .02em; color: var(--suave); }
.tabla .n { text-align: right; font-variant-numeric: tabular-nums; }
.tabla tbody tr:hover { background: #f8fafc; }
.tabla tfoot td { font-weight: 700; background: #eef1f5; }
.vacio { text-align: center; color: var(--suave); padding: 1.5rem !important; }

.planilla td { padding: .25rem .35rem; }
.planilla input, .planilla select { padding: .2rem .3rem; font-size: .85rem; }
.planilla input.cod { width: 2.4rem; text-align: center; font-weight: 700; text-transform: uppercase; font-size: .95rem; }
.planilla input.cod:focus, .planilla input.hora:focus, .planilla input.obs:focus { outline: 2px solid var(--primario); background: #eef5ff; }
.planilla input.hora { width: 4.6rem; text-align: center; font-variant-numeric: tabular-nums; }
.planilla input.tramos { width: 11rem; font-variant-numeric: tabular-nums; }
.planilla input.tramos:focus { outline: 2px solid var(--primario); background: #eef5ff; }
.planilla input.invalido { outline: 2px solid var(--error); background: #fdecea; }
.planilla td.desc { min-width: 8.5rem; color: var(--suave); font-size: .85rem; }
.planilla tr.vacia td.dia b { color: var(--aviso); }
.planilla input.obs { width: 100%; min-width: 9rem; }
.planilla tr.festivo td:first-child { background: var(--festivo); }
.planilla tr.no-trabajado { background: var(--descanso); }
.planilla tr.con-error { outline: 2px solid var(--error); outline-offset: -2px; }
.planilla .dia { white-space: nowrap; }
.planilla .dia b { display: inline-block; width: 1.6rem; }
.planilla .dia small { color: var(--suave); }
.planilla .etq-festivo { color: var(--aviso); font-size: .7rem; display: block; }
.planilla .cero { color: #c3c9d0; }
.planilla .noche { font-size: .7rem; color: var(--primario); }

.encabezado-planilla { display: flex; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.datos { color: var(--suave); font-size: .9rem; }
.estado { margin-left: auto; padding: .35rem .8rem; border-radius: 999px; font-weight: 600; font-size: .85rem; background: #eef1f5; }
.estado.EN_DIGITACION { background: #fff4e5; color: var(--aviso); }
.estado.DIGITADA { background: #e8f1fb; color: var(--primario); }
.estado.AUTORIZADA { background: #e7f6ee; color: var(--ok); }

.paneles { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
.panel { background: var(--papel); border: 1px solid var(--borde); border-radius: 6px; padding: 1rem; }
.panel.ancho { grid-column: 1 / -1; }
@media (max-width: 900px) { .paneles { grid-template-columns: 1fr; } }

.alertas, .historial, .festivos { list-style: none; margin: 0; padding: 0; }
.alertas li { padding: .4rem .6rem; border-left: 3px solid var(--aviso); background: #fffaf2; margin-bottom: .3rem; font-size: .9rem; }
.alertas li.ok { border-color: var(--ok); background: #f0faf4; }
.historial li { padding: .45rem 0; border-bottom: 1px solid var(--borde); font-size: .85rem; }
.historial li b { color: var(--primario); }
.historial pre { margin: .2rem 0 0; white-space: pre-wrap; font-family: inherit; color: var(--suave); }
.festivos { columns: 3; font-size: .9rem; }
.festivos li { padding: .15rem 0; }

.firmas { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-bottom: .8rem; }
.firma { border: 1px solid var(--borde); border-radius: 4px; padding: .5rem; font-size: .85rem; }
.firma span { display: block; color: var(--suave); font-size: .75rem; text-transform: uppercase; }
.acciones { display: flex; gap: .5rem; flex-wrap: wrap; }
.motivo { display: flex; gap: .5rem; margin-top: .6rem; }
.motivo input { flex: 1; }
.totales-mes { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: .4rem; }
.totales-mes div { border: 1px solid var(--borde); border-radius: 4px; padding: .35rem .5rem; font-size: .8rem; color: var(--suave); }
.totales-mes b { display: block; color: var(--texto); font-size: 1rem; }
.vigentes { display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-size: .85rem; }
.vigentes b { color: var(--primario); }

.etiqueta { padding: .15rem .5rem; border-radius: 999px; font-size: .78rem; background: #eef1f5; }
.etiqueta.PENDIENTE { background: #f1f3f5; color: var(--suave); }
.etiqueta.DIGITADA { background: #e8f1fb; color: var(--primario); }
.etiqueta.CON_ALERTAS { background: #fff4e5; color: var(--aviso); }
.etiqueta.AUTORIZADA { background: #e7f6ee; color: var(--ok); }
.etiqueta.inactivo { background: #fde8e8; color: var(--error); }

.aviso { position: fixed; bottom: 1.2rem; right: 1.2rem; max-width: 30rem; padding: .8rem 1rem; border-radius: 6px;
  background: var(--texto); color: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.2); z-index: 50; white-space: pre-line; }
.aviso.error { background: var(--error); }
.aviso.ok { background: var(--ok); }

@media print { .barra, .herramientas, .acciones, #btn-volver { display: none; } }

/* ---------------------------------------------------------------- utilidades nuevas */
.texto-error { color: var(--error); }
.texto-ok { color: var(--ok); }
.texto-extra { color: var(--aviso); }
.etiqueta.devuelta { background: #fde8e8; color: var(--error); margin-left: .3rem; }
.etiqueta.corregida { background: #ede9fe; color: #5b21b6; margin-left: .3rem; }
.etiqueta.reemplazo { background: #e0f2fe; color: #075985; margin-left: .3rem; }
.planilla input.reemp { width: 9rem; }
.planilla input.reemp:focus { outline: 2px solid var(--primario); background: #eef5ff; }
.tabla tfoot tr.sub td { font-weight: 400; color: var(--suave); background: #f8fafc; }
.tabla tfoot tr.fila-ajustes td { font-weight: 600; font-style: italic; color: #5b21b6; background: #f5f3ff; }
.form-ajuste { display: flex; gap: .6rem; flex-wrap: wrap; align-items: end; margin-top: .7rem; }
.form-ajuste label { display: flex; flex-direction: column; gap: .2rem; font-size: .8rem; color: var(--suave); }
.form-ajuste input[name=horas] { width: 7rem; }
.pedir-texto { width: 100%; margin-top: .4rem; padding: .55rem; }
.t-cambios { background: #f5f3ff; border-left: 4px solid #7c3aed; border-radius: 6px; padding: .7rem .85rem;
  margin-bottom: .8rem; font-size: .88rem; }
.t-cambios ul { margin: .4rem 0 0; padding-left: 1.1rem; }
.t-cambios li { margin-bottom: .35rem; white-space: pre-line; }
.t-reemplazo { width: 100%; font-size: .9rem; }
.aviso-fila { color: var(--aviso); display: block; }
code { font-family: Consolas, monospace; background: #f1f3f5; padding: .05rem .35rem; border-radius: 3px; }
code.clave { font-size: 1.05rem; letter-spacing: .05em; color: var(--primario); font-weight: 700; }
.fondo-dialogo { z-index: 60; }
.fondo-dialogo .tarjeta-acceso { width: min(560px, 100%); max-height: 90vh; overflow: auto; }
.credenciales { max-height: 50vh; }
.vista-previa { max-height: 45vh; overflow: auto; margin: .6rem 0; }
.panel.importar { margin-bottom: 1rem; }
.panel.importar[open] summary { margin-bottom: .4rem; }

/* Horas extras */
.resumen-extras { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.resumen-extras div, .t-totales div { background: var(--papel); border: 1px solid var(--borde); border-radius: 6px; padding: .55rem .7rem; }
.resumen-extras small, .t-totales small { display: block; color: var(--suave); font-size: .75rem; }
.resumen-extras b, .t-totales b { font-size: 1.25rem; }
.resumen-extras .destacado, .t-totales .destacado { border-color: var(--primario); background: #eef3f9; }
.t-totales .extra { border-color: var(--aviso); background: #fffaf2; }
.fila-expandible { cursor: pointer; }
.fila-expandible td:first-child b::before { content: "▸ "; color: var(--primario); }
.fila-expandible.abierta td:first-child b::before { content: "▾ "; }
.detalle-extras > td { background: #f8fafc; padding: .5rem 1rem 1rem !important; }
.tabla.interna { font-size: .85rem; }

/* ---------------------------------------------------------------- pantallas pequeñas (Gestión Humana) */
@media (max-width: 760px) {
  main { padding: .8rem; }
  .barra { padding: .5rem .8rem; gap: .5rem; }
  .marca > div { display: none; }
  .logo-barra { height: 34px; }
  .sesion { font-size: .8rem; }
  nav#menu { order: 3; width: 100%; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: .2rem; }
  nav#menu button { white-space: nowrap; }
  .filtros, .herramientas, .recepcion { padding: .7rem; gap: .6rem; }
  .filtros label, .herramientas label { flex: 1 1 42%; }
  label.crece { min-width: 100%; }
  .filtros input, .filtros select { width: 100%; }
  .tabla { display: block; overflow-x: auto; white-space: nowrap; }
  .tabla .tabla.interna { white-space: normal; }
  .firmas { grid-template-columns: 1fr; }
  .encabezado-planilla { flex-wrap: wrap; }
  .formulario { grid-template-columns: 1fr; }
  .festivos { columns: 1; }
  .aviso { left: .8rem; right: .8rem; bottom: .8rem; max-width: none; }
}

/* ---------------------------------------------------------------- Mi planilla (trabajador, celular primero) */
#app-trabajador { min-height: 100vh; padding-bottom: 5.5rem; }
.t-barra { display: flex; align-items: center; gap: .7rem; background: var(--primario); color: #fff;
  padding: .55rem .9rem; position: sticky; top: 0; z-index: 10; }
.t-quien { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; flex: 1; }
.t-quien b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-quien small { opacity: .8; font-size: .78rem; }
.t-menu { position: relative; }
.t-menu summary { list-style: none; cursor: pointer; font-size: 1.5rem; padding: 0 .3rem; }
.t-menu summary::-webkit-details-marker { display: none; }
.t-menu > div { position: absolute; right: 0; top: 2.3rem; background: var(--papel); border-radius: 8px; padding: .4rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.2); display: flex; flex-direction: column; min-width: 12rem; }
.t-menu > div button.enlace { color: var(--primario); text-align: left; padding: .6rem .7rem; text-decoration: none; }
.t-menu > div button.enlace:hover { background: #eef3f9; color: var(--primario); }

.t-main { max-width: 720px; margin: 0 auto; padding: .8rem; }
.t-periodo { display: flex; gap: .6rem; align-items: end; margin-bottom: .7rem; }
.t-periodo label { flex: 1; display: flex; flex-direction: column; gap: .25rem; font-size: .8rem; color: var(--suave); }
.t-periodo select { font-size: 1rem; padding: .55rem; width: 100%; }
.t-periodo .estado { margin: 0 0 .3rem; }
.t-aviso { background: #eef3f9; border-left: 4px solid var(--primario); border-radius: 6px; padding: .7rem .85rem;
  margin-bottom: .8rem; font-size: .9rem; line-height: 1.45; }
.t-aviso.error { background: #fdecea; border-color: var(--error); }
.t-aviso.ok { background: #e7f6ee; border-color: var(--ok); }
/* Lista de registros del mes (sin cálculos) */
.t-lista-cab { display: flex; justify-content: space-between; align-items: center; gap: .6rem; margin: .2rem 0 .6rem; }
.t-lista-cab h3 { margin: 0; font-size: 1.05rem; }
.t-lista-cab small { color: var(--suave); font-size: .8rem; }
.t-lista-cab button { padding: .6rem .9rem; font-size: .95rem; white-space: nowrap; }
.t-registros { display: flex; flex-direction: column; gap: .55rem; }
.t-reg { background: var(--papel); border: 1px solid var(--borde); border-left: 4px solid var(--primario);
  border-radius: 8px; padding: .6rem .75rem; display: flex; flex-direction: column; gap: .3rem; }
.t-reg.no-trabajo { border-left-color: #9aa5b1; background: #f8fafc; }
.t-reg.festivo .t-reg-cab b { color: var(--aviso); }
.t-reg-cab { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.t-reg-cab b { font-size: 1rem; }
.t-reg-cab .etq-festivo { font-size: .75rem; color: var(--aviso); }
.t-reg-linea { font-size: .95rem; }
.t-mas1 { color: var(--suave); margin-left: .3rem; }
.t-etq { display: inline-block; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .02em;
  background: #eef3f9; color: var(--primario); border-radius: 4px; padding: .05rem .4rem; margin-right: .3rem; }
.t-etq.no { background: #eceff3; color: #52606d; }
.t-reg-obs { font-size: .85rem; color: var(--suave); font-style: italic; white-space: pre-line; }
.t-reg-botones { display: flex; gap: .5rem; margin-top: .2rem; }
.t-reg-botones button { padding: .4rem .9rem; font-size: .9rem; }
.t-reg-botones .peligro { background: #fff; color: var(--error); border-color: #f1c4c0; }
.t-reg-botones .peligro:hover { background: #fdecea; }
.t-reg .nota { margin: .2rem 0 0; }
.t-vacio { background: var(--papel); border: 1px dashed var(--borde); border-radius: 8px; padding: 1.2rem;
  text-align: center; color: var(--suave); }
.t-pendientes { color: var(--aviso); font-size: .85rem; margin: .7rem 0 0; }

/* Formulario de un día */
.t-form { gap: .75rem; }
.t-form textarea { width: 100%; padding: .5rem; font: inherit; resize: vertical; }
.t-form select, .t-form input[type=date] { font-size: 1rem; padding: .5rem; }
.t-form .nota { margin: -.3rem 0 0; }
.t-horas { display: grid; grid-template-columns: 1fr; gap: .6rem; }
.t-campo-hora { display: flex; flex-direction: column; gap: .25rem; }
.t-campo-hora > span { font-size: .85rem; color: var(--suave); }
/* Hora · minutos · a. m./p. m. (listas: evitan que "1 0 0" se tome como 10:00) */
.t-hora { display: grid; grid-template-columns: 1fr auto 1fr 1.4fr; gap: .35rem; align-items: center; }
.t-hora select { font-size: 1.05rem; padding: .5rem .35rem; width: 100%; min-width: 0; }
.t-hora .h-sep { font-weight: 700; }
.t-form-trabajo { display: flex; flex-direction: column; gap: .75rem; }
.t-form-trabajo[hidden] { display: none; }
.t-sino { border: 0; padding: 0; margin: 0; display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; }
.t-sino legend { font-size: .85rem; color: var(--suave); padding: 0; margin-bottom: .3rem; width: 100%; }
.tarjeta-acceso .t-sino label { flex-direction: row; align-items: center; gap: .35rem; font-size: 1rem; color: var(--texto); }
.t-sino input { width: 1.15rem; height: 1.15rem; }
.t-turno2 { border-left: 3px solid var(--primario); padding-left: .6rem; display: flex; flex-direction: column; gap: .4rem; }
.t-turno2 b { font-size: .85rem; color: var(--primario); }
.t-errores { background: #fdecea; border-left: 4px solid var(--error); border-radius: 6px; padding: .6rem .8rem;
  color: #7a1a12; font-size: .9rem; }
.t-errores ul { margin: .3rem 0 0; padding-left: 1.1rem; }

/* Verificación antes del envío */
.fondo-dialogo .tarjeta-acceso.t-revision { width: min(980px, 100%); }
.t-revision h2 { font-size: 1.1rem; color: var(--primario); }
.t-rev-enc { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .4rem .8rem;
  background: #f8fafc; border: 1px solid var(--borde); border-radius: 6px; padding: .6rem .8rem; }
.t-rev-enc small { display: block; color: var(--suave); font-size: .72rem; }
.t-rev-tabla { overflow: auto; max-height: 50vh; border: 1px solid var(--borde); border-radius: 6px; }
.t-rev-tabla .tabla { margin: 0; font-size: .85rem; }
.t-rev-tabla th { position: sticky; top: 0; }
.t-rev-tabla tr.sin-registro td { color: #9aa3ad; font-style: italic; }
.t-rev-tabla tr.no-trabajo td { background: #f8fafc; }
.t-revision .acciones { flex-wrap: wrap; }
.t-revision .nota { margin: 0; }

.t-pie { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--papel);
  border-top: 1px solid var(--borde); box-shadow: 0 -4px 16px rgba(0,0,0,.08);
  display: flex; align-items: center; justify-content: flex-end; gap: .5rem;
  padding: .6rem .9rem calc(.6rem + env(safe-area-inset-bottom)); }
.t-pie button, .t-pie .boton { padding: .65rem 1rem; font-size: 1rem; }
@media (min-width: 720px) {
  .t-pie { justify-content: center; }
}
/* El aviso flotante no debe tapar los botones del pie */
#app-trabajador:not([hidden]) ~ .aviso { bottom: calc(5.2rem + env(safe-area-inset-bottom)); }

/* Autoría del sistema (pie de página) */
.derechos { text-align: center; color: var(--suave); font-size: .78rem; margin: 1.5rem 0 .8rem; }
.derechos-acceso { position: absolute; left: 0; right: 0; bottom: .6rem; margin: 0; }
.acceso .derechos-acceso { color: rgba(255, 255, 255, .85); }

/* ---------------------------------------------------------------- aprobación de registros */
.contador { background: #fdecea; color: var(--error); border-radius: 999px; padding: 0 .45rem; font-size: .75rem; margin-left: .25rem; }
nav#menu button.activo .contador { background: var(--error); color: #fff; }
.reg-estado { display: inline-block; border-radius: 999px; padding: .05rem .55rem; font-size: .75rem; font-weight: 600; white-space: nowrap; }
.reg-estado.PENDIENTE { background: #fff4e5; color: #b54708; }
.reg-estado.APROBADO { background: #e7f6ee; color: var(--ok); }
.reg-estado.RECHAZADO { background: #fdecea; color: var(--error); }
#tabla-aprobacion td { vertical-align: top; }
#tabla-aprobacion .acciones-fila { white-space: nowrap; }
#tabla-aprobacion tr.seleccionada td { background: #eef5ff; }
.revision { display: block; color: var(--suave); font-size: .78rem; margin-top: .15rem; }
.motivo-rechazo { display: block; color: var(--error); font-size: .8rem; margin-top: .15rem; white-space: pre-line; }
.avisos-panel { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .7rem; }
.avisos-panel > * { background: #fff4e5; border-left: 4px solid var(--aviso); border-radius: 6px; padding: .45rem .7rem; font-size: .88rem; }
.avisos-panel button.enlace { color: var(--primario); }
.u-grupos { border: 1px solid var(--borde); border-radius: 6px; padding: .4rem .7rem; }
.u-grupos legend { font-size: .8rem; color: var(--suave); padding: 0 .3rem; }
.u-grupos label { display: inline-flex; flex-direction: row; align-items: center; gap: .3rem; margin-right: 1rem; color: var(--texto); }
.acciones-grupo { display: inline-flex; gap: .5rem; align-items: end; }
.acciones-grupo label { display: flex; flex-direction: column; gap: .2rem; font-size: .8rem; color: var(--suave); }
.etiqueta.sin-grupo { background: #fff4e5; color: #b54708; }
#p-explicacion { margin: 0; max-width: 46rem; }

/* Trabajador: estado de cada registro */
.t-reg.APROBADO { border-left-color: var(--ok); }
.t-reg.RECHAZADO { border-left-color: var(--error); background: #fffafa; }
.t-reg-cab .reg-estado { margin-left: auto; }
.t-rechazo { background: #fdecea; border-radius: 6px; padding: .4rem .6rem; font-size: .88rem; color: #7a1a12; white-space: pre-line; }
.t-revisado { font-size: .78rem; color: var(--suave); }
.t-estados { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .3rem; }
.pestanas { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .8rem; }
.pestanas .chip { cursor: pointer; }
/* Ingreso: «¿Olvidó su contraseña?» */
.tarjeta-acceso .enlace-olvide { color: var(--primario); align-self: center; font-size: .88rem; padding: .2rem; }
.u-envio { display: block; font-size: .78rem; color: var(--suave); }
.u-envio.error { color: var(--error); }
.u-envio.usado { color: var(--ok); }
