.estado { text-align: center; padding: 22px 16px 18px; }
.estado .etiqueta-estado { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.estado .reloj { font-size: 3.2rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; margin: 6px 0 2px; }
.estado .desde { color: var(--suave); margin-bottom: 18px; }
.estado.fuera .etiqueta-estado { color: var(--suave); }
.estado.dentro .etiqueta-estado { color: var(--entrada); }
.estado.pausa .etiqueta-estado { color: var(--pausa); }

.boton-fichar { width: 100%; min-height: 84px; font-size: 1.3rem; border-radius: 18px; border: 0; color: #fff; box-shadow: 0 6px 16px rgba(0,0,0,.15); }
.boton-fichar.entrada { background: var(--entrada); }
.boton-fichar.salida { background: var(--salida); }
.boton-fichar.pausa_fin { background: var(--pausa); }
.boton-fichar svg { width: 30px; height: 30px; }
.secundario { width: 100%; margin-top: 10px; min-height: 52px; }

.resumen { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.resumen div { background: var(--fondo); border-radius: 12px; padding: 10px 12px; }
.resumen b { display: block; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.resumen span { font-size: .8rem; color: var(--suave); }

.ev { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--linea); }
.ev:last-child { border-bottom: 0; }
.ev .h { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 52px; }
.ev .t { flex: 1; }

.dia { cursor: pointer; }
.dia .cab { display: flex; justify-content: space-between; gap: 8px; }
.dia .horas { font-variant-numeric: tabular-nums; font-weight: 700; }
.dia .detalle { font-size: .88rem; color: var(--suave); margin-top: 2px; }
.dia .inc { color: var(--salida); font-size: .82rem; margin-top: 3px; }

.selector-mes { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.selector-mes button { min-width: 44px; }
.texto-legal { font-size: .88rem; max-height: 46vh; overflow: auto; background: var(--fondo); border-radius: 12px; padding: 12px 14px; }
.texto-legal h3 { font-size: .92rem; margin-top: 10px; }
.texto-legal ul { padding-left: 18px; margin: 4px 0 8px; }
.texto-legal li { margin-bottom: 4px; }
.aviso-normas { border: 2px solid var(--salida); border-radius: 10px; padding: 8px 10px; }
.secundario svg, button svg { width: 20px; height: 20px; flex-shrink: 0; }
.boton-fichar svg { width: 30px; height: 30px; }
.pestanas button svg { width: 22px; height: 22px; }
.franja-vista { background: #fff4d6; border-bottom: 1px solid var(--aviso-borde); padding: 10px 16px; display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; font-size: .9rem; position: sticky; top: 0; z-index: 35; }
.franja-vista button { min-height: 34px; padding: 4px 12px; }

/* ---------- v1.12: calendario (trabajador y responsable). Colores de significado de los calendarios ---------- */
.cal-leyenda { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 6px 0 4px; }
.cal-chip { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; background: var(--fondo); padding: 4px 10px; border-radius: 99px; }
.cal-chip i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; border: 1px solid rgba(0,0,0,.08); }
.cal-meses { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.cal-mes h3 { font-size: .95rem; margin: 0 0 6px; text-transform: capitalize; }
.cal-mes table { table-layout: fixed; font-size: .8rem; width: 100%; }
.cal-mes th { text-align: center; padding: 2px 0; font-size: .7rem; }
.cal-mes td { text-align: center; padding: 1px; border: 0; }
.cal-dia { width: 100%; min-height: 30px; padding: 0; border-radius: 6px; border: 1px solid transparent; background: #fff; color: var(--texto); font-weight: 500; font-size: .8rem; box-shadow: none; }
.cal-dia:hover { border-color: var(--marca); }
.cal-dia.hoy { outline: 2px dashed #111111; outline-offset: -2px; }
.cal-dia.sel { outline: 3px solid #111111; outline-offset: -1px; position: relative; z-index: 1; }
.cal-grande .cal-dia { min-height: 44px; font-size: .95rem; }
.c-vac { background: #e53935 !important; color: #fff !important; }
.c-pend { background: repeating-linear-gradient(135deg, #e53935 0 4px, #fff 4px 9px) !important; color: #7f0000 !important; border-color: #e53935 !important; font-weight: 700 !important; }
.c-fest { background: #43a047 !important; color: #fff !important; }
.c-baja { background: #fdd835 !important; color: #3d3200 !important; }
.c-finde { background: #d0d0d0 !important; color: #555 !important; }
.c-perm { background: #1e88e5 !important; color: #fff !important; }
.c-media { background: linear-gradient(135deg, #f08a24 50%, #fff 50%) !important; color: #5a2d00 !important; border-color: #f08a24 !important; }
.c-horas { background: repeating-linear-gradient(135deg, #90caf9 0 4px, #fff 4px 9px) !important; color: #0d3c6e !important; border-color: #1e88e5 !important; }
.barra-sel { position: sticky; bottom: calc(70px + env(safe-area-inset-bottom)); z-index: 30; background: #111111; color: #fff; border-radius: 14px; padding: 10px 12px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: space-between; box-shadow: 0 6px 18px rgba(0,0,0,.25); margin-top: 10px; }
.barra-sel span { font-size: .9rem; }
.barra-sel button { min-height: 38px; padding: 6px 14px; }
.tipos-elegir { display: grid; gap: 8px; }
.tipos-elegir label { display: flex; align-items: center; gap: 10px; color: var(--texto); margin: 0; padding: 10px 12px; border: 1px solid var(--linea); border-radius: 10px; cursor: pointer; }
.tipos-elegir input { width: auto; min-height: 0; }
.tipos-elegir i { width: 16px; height: 16px; border-radius: 4px; display: inline-block; flex-shrink: 0; }
.saldo-vac { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0; }
.saldo-vac div { background: var(--fondo); border-radius: 10px; padding: 6px 12px; font-size: .85rem; }
.saldo-vac b { font-size: 1.1rem; }
input[type=radio] { width: 20px; height: 20px; min-height: 0; flex-shrink: 0; padding: 0; }
/* v1.17: día laborable pasado sin fichajes ni motivo; ficha del día; justificantes; conmutador; tabla de horas */
.c-sinfichar { background: #fff !important; color: #b3261e !important; border: 2px dashed #b3261e !important; font-weight: 700 !important; }
.ficha-bloque { border-top: 1px solid var(--linea); padding: 12px 0; }
.ficha-bloque:first-of-type { border-top: 0; }
.ficha-bloque > div { margin-top: 4px; }
.ficha-nota { background: var(--fondo); border-left: 3px solid var(--marca); border-radius: 6px; padding: 6px 10px; margin: 8px 0 4px; font-style: italic; }
.ficha-just { margin-top: 8px; padding: 8px 10px; border: 1px solid var(--linea); border-radius: 10px; }
.ficha-just > button { min-height: 38px; padding: 6px 12px; margin-top: 6px; }
.just-estado { margin: 0 0 4px; font-size: .9rem; font-weight: 600; }
.just-estado.ok { color: var(--entrada); }
.just-estado.aviso { color: var(--pausa); }
.just-estado.error { color: var(--salida); }
.conmutador { display: inline-flex; border: 1px solid var(--linea); border-radius: 10px; overflow: hidden; }
.conmutador button { border: 0; border-radius: 0; min-height: 40px; padding: 6px 14px; }
.conmutador button.activo { background: var(--marca); color: #fff; }
.horas-tabla { font-size: .85rem; }
.horas-tabla th, .horas-tabla td { padding: 4px 3px; white-space: nowrap; }
.horas-tabla td.dia { font-weight: 600; white-space: normal; min-width: 64px; max-width: 96px; }
.horas-tabla td.dia small { font-size: .68rem; font-weight: 400; display: block; line-height: 1.2; }
.horas-tabla tr.nolab td { background: #f1efeb; color: var(--suave); }
.horas-tabla tr.semana td { background: #e8eef5; font-weight: 700; }
.horas-tabla tr.total td { font-weight: 700; border-top: 2px solid var(--texto); }
.horas-tabla button.celda { min-height: 30px; padding: 2px 4px; border: 0; background: none; font-weight: 600; font-variant-numeric: tabular-nums; width: 100%; flex-direction: column; align-items: flex-end; justify-content: center; gap: 2px; white-space: normal; }
.horas-tabla .marcas { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 2px; }
.horas-tabla .marca { display: inline-block; font-size: .62rem; font-weight: 700; padding: 1px 4px; border-radius: 6px; background: #dde6f2; color: var(--marca); white-space: nowrap; }
.horas-tabla .marca.vac { background: #fde0df; color: #b71c1c; } .horas-tabla .marca.baja { background: #fff7c2; color: #5d4a00; }
.horas-tabla .marca.sin { background: #fff; color: var(--salida); border: 1px dashed var(--salida); }
.horas-tabla .menos { color: var(--salida); } .horas-tabla .mas { color: var(--entrada); }
/* v1.19: noticias en la pantalla de fichar */
.noticias { border-left: 4px solid #111111; }
.noticia { padding: 10px 0; border-top: 1px solid var(--linea); }
.noticias h2 + .noticia { border-top: 0; padding-top: 0; }
.noticia p { margin: 4px 0 0; white-space: normal; }
.noticia img { display: block; max-width: 100%; max-height: 360px; border-radius: 10px; margin-top: 8px; }
.noticia-adm { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; }
/* v1.18: documentos (app y panel) y nóminas */
.doc-lista > li { padding: 0; }
.doc-fila { width: 100%; display: flex; align-items: center; gap: 12px; background: none; border: 0; border-radius: 0; padding: 10px 2px; text-align: left; justify-content: flex-start; min-height: 56px; font-weight: 400; }
.doc-icono { font-size: 1.5rem; line-height: 1; flex-shrink: 0; }
.doc-texto { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.doc-texto b { overflow-wrap: anywhere; }
.doc-texto .etiqueta { align-self: flex-start; }
.nom-pag { border: 1px solid var(--linea); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; }
.nom-pag.ok { border-left: 4px solid var(--entrada); }
.nom-pag.duda { border-left: 4px solid var(--pausa); background: #fffaf0; }
.nom-pag select { margin-top: 6px; }
.nom-motivo { font-size: .88rem; margin-top: 2px; }
.c-media-m { background: linear-gradient(180deg, #f08a24 50%, #fff 50%) !important; color: #5a2d00 !important; border-color: #f08a24 !important; }
.c-media-t { background: linear-gradient(180deg, #fff 50%, #f08a24 50%) !important; color: #5a2d00 !important; border-color: #f08a24 !important; }
