/* RFET Jornada
   Concepto: barra lateral granate con líneas de pista; el reloj de fichaje
   es un marcador de partido (panel oscuro, dígitos amarillo pelota). */
:root {
  --rfet: #C1022D;          /* rojo del logotipo RFET */
  --rfet-hondo: #8A0020;
  --marca-bg: #C1022D;      /* fondo de marca (igual en claro y oscuro) */
  --fuera: #1F7FB5;         /* teletrabajo */
  --viaje: #7A4FC2;         /* viaje laboral */
  --anterior: #E39A3B;      /* vacaciones del año anterior */
  --anterior-claro: #F8E3C6; --anterior-txt: #9A5508;
  /* tipos de día no laborable (mismos colores que el calendario oficial en PDF) */
  --f-festivo: #8DB255; --f-local: #F08BDF; --f-puente: #29A9DC; --f-empresa: #F2994A; --f-vacaciones: #E5262B;
  --int: #FFF4CC;
  --pelota: #FFC300;        /* amarillo RFET */
  --marcador: #1C1517;      /* panel del reloj */
  --bg: #F5F3F2;
  --surface: #FFFFFF;
  --surface-2: #EFEBEA;
  --ink: #18120F;
  --ink-2: #5E5552;
  --line: #E2DCDA;
  --ok: #1F7A4A;  --ok-bg: #E2F3E9;
  --warn: #8A5A00; --warn-bg: #FFF1C2;
  --bad: #A12C33; --bad-bg: #F8E1E2;
  --mute-bg: #ECE8E7;
  --focus: #2F6FDB;
  --display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", system-ui, sans-serif;
  --body: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --r: 10px;
  --side: 248px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --rfet: #F0566E; --rfet-hondo: #6E0019; --marcador: #0E0A0B; --fuera: #5DB3E8; --int: #3A3214; --viaje: #A98BEA; --anterior: #EFA54A; --anterior-claro: #4A3418; --anterior-txt: #F5B565;
    --bg: #141011; --surface: #1D1819; --surface-2: #272022; --ink: #F3EEEC; --ink-2: #B3A8A5; --line: #342C2E;
    --ok: #6FD39C; --ok-bg: #173226; --warn: #FFD460; --warn-bg: #3A2F0F; --bad: #FF8A90; --bad-bg: #3D1A1D; --mute-bg: #2A2325;
    --focus: #7AA7FF; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --rfet: #F0566E; --rfet-hondo: #6E0019; --marcador: #0E0A0B; --fuera: #5DB3E8; --int: #3A3214; --viaje: #A98BEA; --anterior: #EFA54A; --anterior-claro: #4A3418; --anterior-txt: #F5B565;
  --bg: #141011; --surface: #1D1819; --surface-2: #272022; --ink: #F3EEEC; --ink-2: #B3A8A5; --line: #342C2E;
  --ok: #6FD39C; --ok-bg: #173226; --warn: #FFD460; --warn-bg: #3A2F0F; --bad: #FF8A90; --bad-bg: #3D1A1D; --mute-bg: #2A2325;
  --focus: #7AA7FF; color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.1; margin: 0; text-wrap: balance; letter-spacing: .01em; }
h1 { font-size: 2rem; } h2 { font-size: 1.45rem; } h3 { font-size: 1.15rem; }
p { margin: 0; }
a { color: var(--rfet); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.small { font-size: .85rem; }
.eyebrow { font-size: .72rem; text-transform: uppercase; letter-spacing: .09em; font-weight: 700; color: var(--ink-2); }

/* ---------- arranque ---------- */
.arranque { min-height: 100%; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--ink-2); }
.pelota { width: 34px; height: 34px; border-radius: 50%; background: var(--pelota); position: relative; overflow: hidden; animation: bote 0.9s ease-in-out infinite alternate; }
.pelota::before, .pelota::after { content: ""; position: absolute; width: 34px; height: 34px; border: 2.5px solid #fff; border-radius: 50%; top: 0; }
.pelota::before { left: -22px; } .pelota::after { right: -22px; }
@keyframes bote { from { transform: translateY(0); } to { transform: translateY(-14px); } }

/* ---------- layout ---------- */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.side {
  position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; gap: 6px; overflow: hidden;
  padding: calc(18px + env(safe-area-inset-top, 0px)) 14px 14px max(14px, env(safe-area-inset-left, 0px));
  color: #fff; background-color: var(--marca-bg);
  background-image: linear-gradient(90deg, transparent 0 22px, rgba(255,255,255,.10) 22px 24px, transparent 24px);
}
.marca { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.marca-pelota { width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--pelota); position: relative; overflow: hidden; }
.marca-pelota::before, .marca-pelota::after { content: ""; position: absolute; inset: 0; border: 2px solid #fff; border-radius: 50%; }
.marca-pelota::before { left: -20px; right: auto; width: 30px; } .marca-pelota::after { right: -20px; left: auto; width: 30px; }
.marca { flex-direction: column; align-items: flex-start; gap: 4px; padding: 0 8px 14px 16px; flex: none; }
.logo-rfet { display: block; width: 150px; height: auto; }
.side .logo-rfet { width: 128px; }
.marca-app { font-family: var(--display); font-size: 1.05rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--pelota); padding-left: 2px; }
.marca-acceso { padding: 0; }
.marca-acceso .logo-rfet { width: min(240px, 60vw); }
.marca-acceso .marca-app { font-size: 1.3rem; }
/* El menú se desplaza por dentro si no cabe; el nombre y «Salir» quedan siempre abajo */
.nav { display: flex; flex-direction: column; gap: 1px; flex: 1 1 auto; min-height: 0; overflow-y: auto; margin: 0 -6px; padding: 0 6px 8px;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.35) transparent; }
.nav::-webkit-scrollbar { width: 6px; } .nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.3); border-radius: 3px; }
.nav-grupo { font-size: .66rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.62); padding: 12px 12px 4px; }
.nav-grupo:first-child { padding-top: 0; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 7px 12px; border-radius: 8px; font-size: .93rem; line-height: 1.25;
  color: rgba(255,255,255,.9); text-decoration: none; font-weight: 500; flex: none;
}
.nav a:hover { background: rgba(255,255,255,.09); color: #fff; }
.nav a[aria-current="page"] { background: rgba(0,0,0,.22); color: #fff; box-shadow: inset 3px 0 0 var(--pelota); }
.nav svg { width: 20px; height: 20px; flex: none; }
.badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--pelota); color: #2a1d00; font-size: .75rem; font-weight: 700; display: inline-grid; place-items: center; }
.side-pie { margin-top: auto; flex: none; padding: 12px 8px 0; border-top: 1px solid rgba(255,255,255,.18); display: flex; align-items: center; gap: 10px; font-size: .85rem; }
.side-pie .quien { min-width: 0; flex: 1; } .side-pie .quien b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-pie .quien span { opacity: .75; }
.avatar { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; font-size: .8rem; color: #fff; background: var(--rfet-hondo); }

.main { min-width: 0; padding-block: 28px 48px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.contenido { max-width: 1080px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.cabecera { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; }
.cabecera .sub { color: var(--ink-2); margin-top: 4px; }

.topbar, .tabbar { display: none; }
.demo-aviso { background: var(--warn-bg); color: var(--warn); font-size: .85rem; padding: 8px 14px; border-radius: 8px; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }

/* ---------- piezas ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; min-width: 0; }
.card > h3 + * { margin-top: 12px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fila { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.fila.entre { justify-content: space-between; }
.pila { display: flex; flex-direction: column; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 8px 16px; border-radius: 8px; border: 1px solid transparent;
  font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap;
  background: var(--rfet); color: #fff;
}
.btn:hover { filter: brightness(1.07); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn.sec { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.sec:hover { background: var(--surface-2); filter: none; }
.btn.ok { background: var(--ok); color: #fff; }
.btn.peligro { background: transparent; color: var(--bad); border-color: currentColor; }
.btn.mini { min-height: 32px; padding: 4px 12px; font-size: .85rem; }
.btn.link { background: none; border: none; color: var(--rfet); padding: 0; min-height: 0; font-weight: 500; text-decoration: underline; }
:root[data-theme="dark"] .btn.ok, .btn.ok { color: #fff; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip.pendiente { background: var(--warn-bg); color: var(--warn); }
.chip.aprobada, .chip.activo { background: var(--ok-bg); color: var(--ok); }
.chip.rechazada, .chip.baja { background: var(--bad-bg); color: var(--bad); }
.chip.cancelada { background: var(--mute-bg); color: var(--ink-2); }
.chip.neutro { background: var(--surface-2); color: var(--ink-2); }
.chip.neutro::before { display: none; }

label.campo { display: flex; flex-direction: column; gap: 6px; font-size: .85rem; font-weight: 500; color: var(--ink-2); min-width: 0; }
input:not([type="checkbox"]), select, textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
}
textarea { min-height: 76px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: transparent; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; }
.check input { width: 18px; height: 18px; accent-color: var(--rfet); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.form-grid .ancho { grid-column: 1 / -1; }
.error { color: var(--bad); background: var(--bad-bg); padding: 8px 12px; border-radius: 8px; font-size: .9rem; }
.nota { background: var(--surface-2); padding: 10px 12px; border-radius: 8px; font-size: .9rem; color: var(--ink-2); }

.tabla-wrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
td.num, th.num { text-align: right; }

.lista { display: flex; flex-direction: column; }
.item { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.item:last-child { border-bottom: none; }
.item .cuerpo { flex: 1 1 220px; min-width: 0; }
.item .cuerpo b { display: block; }
.vacio { padding: 26px 8px; text-align: center; color: var(--ink-2); }

/* ---------- marcador (fichaje) ---------- */
.marcador {
  background: var(--marcador); color: #fff; border-radius: 14px; padding: 22px; display: grid;
  grid-template-columns: minmax(0, 1fr) auto; gap: 18px 24px; align-items: center; position: relative; overflow: hidden;
}
.marcador::after { content: ""; position: absolute; inset: auto 0 0 0; height: 4px; background: linear-gradient(90deg, var(--rfet) 0 50%, var(--pelota) 50%); }
.marcador .estado { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: rgba(255,255,255,.75); }
.marcador .luz { width: 10px; height: 10px; border-radius: 50%; background: #6b6264; }
.marcador[data-estado="trabajando"] .luz { background: #4ADE80; box-shadow: 0 0 0 4px rgba(74,222,128,.18); }
.marcador[data-estado="pausa"] .luz { background: var(--pelota); box-shadow: 0 0 0 4px rgba(255,195,0,.18); }
.reloj { font-family: var(--display); font-weight: 600; font-size: clamp(3.4rem, 9vw, 5.6rem); line-height: .95; color: var(--pelota); font-variant-numeric: tabular-nums; letter-spacing: .02em; margin-top: 6px; }
.marcador .bajo { display: flex; flex-wrap: wrap; gap: 6px 20px; color: rgba(255,255,255,.7); font-size: .9rem; margin-top: 8px; }
.marcador .bajo b { color: #fff; font-weight: 500; }
.acciones-fichaje { display: flex; flex-direction: column; gap: 10px; min-width: 200px; }
.btn-fichar { min-height: 56px; font-size: 1.05rem; border-radius: 10px; }
.btn-fichar.entrar { background: var(--pelota); color: #231800; }
.btn-fichar.pausa { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.btn-fichar.salir { background: var(--rfet); color: #fff; }
.hora-actual { font-family: var(--display); font-size: 1.1rem; color: rgba(255,255,255,.6); text-align: right; }

/* semana */
.semana { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; align-items: end; height: 150px; }
.dia-col { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; min-width: 0; }
.barra { width: 100%; max-width: 38px; border-radius: 6px 6px 2px 2px; background: var(--rfet); min-height: 2px; position: relative; }
.barra.hoy { background: var(--pelota); }
.barra.vacia { background: var(--surface-2); }
.dia-col .h { font-size: .75rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.dia-col .d { font-size: .75rem; font-weight: 700; text-transform: uppercase; color: var(--ink-2); }
.objetivo-linea { font-size: .8rem; color: var(--ink-2); }

.dato { display: flex; flex-direction: column; gap: 2px; }
.dato .v { font-family: var(--display); font-size: 2rem; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.dato .v small { font-size: 1rem; color: var(--ink-2); font-weight: 500; }
.datos { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 16px; }

/* saldo vacaciones: pista */
.pista { height: 14px; border-radius: 7px; background: var(--surface-2); overflow: hidden; display: flex; }
.pista span { height: 100%; }
.pista .usado { background: var(--rfet); } .pista .pend { background: var(--pelota); }
/* Dos bolsas de vacaciones: año anterior (ámbar) y año actual (rojo RFET). Rayado = pendiente */
.pista .seg.ant { background: var(--anterior); } .pista .seg.ant.libre { background: var(--anterior-claro); }
.pista .seg.act { background: var(--rfet); }
.pista .seg.pend { background: repeating-linear-gradient(135deg, var(--c) 0 4px, transparent 4px 8px); }
.pista .seg.ant.pend { --c: var(--anterior); } .pista .seg.act.pend { --c: var(--rfet); }
.bolsas { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; }
.bolsa { display: flex; align-items: baseline; gap: 8px; }
.bolsa i { width: 10px; height: 10px; border-radius: 3px; flex: none; transform: translateY(1px); }
.bolsa.ant i { background: var(--anterior); } .bolsa.act i { background: var(--rfet); }
.tag-ant { color: var(--anterior-txt); font-weight: 700; white-space: nowrap; }
.tag-act { color: var(--rfet); font-weight: 700; white-space: nowrap; }
.in-num { width: 84px; text-align: right; }
.tabla-wrap input[type="date"] { min-width: 140px; }
.cambiado { outline: 2px solid var(--pelota); outline-offset: 1px; }
/* frase del día */
.frase-dia { margin-top: -10px; font-size: 1.02rem; color: var(--ink-2); display: flex; gap: 10px; align-items: baseline; }
.frase-dia::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--pelota); flex: none; transform: translateY(1px); box-shadow: inset -3px 0 0 rgba(255,255,255,.55); }

/* informe presidente */
.informe { display: flex; flex-direction: column; gap: 16px; }
.inf-cab { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; background: var(--marca-bg); color: #fff; border-radius: var(--r); padding: 20px 24px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.inf-cab .logo-rfet { width: 130px; }
.inf-cab .eyebrow { color: var(--pelota); }
.inf-cab h2 { font-size: 1.8rem; margin: 2px 0 4px; }
.inf-cab p { opacity: .9; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kpis > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.kpis b { font-family: var(--display); font-size: 1.7rem; font-weight: 600; line-height: 1.1; }
.registro-detalle h4 { font-family: var(--display); font-size: 1.05rem; margin: 18px 0 4px; }
.inf-pie { text-align: right; }
.informe td.num { white-space: nowrap; }
@media print {
  @page { margin: 14mm; }
  body { background: #fff !important; color: #000; font-size: 11px; }
  .side, .topbar, .tabbar, .demo-aviso, .no-print, #toast { display: none !important; }
  .shell { display: block; } .main { padding: 0 !important; } .contenido { max-width: none; padding: 0 !important; }
  .card, .kpis > div { border: 1px solid #ccc; box-shadow: none; break-inside: avoid; background: #fff; }
  .tabla-wrap { overflow: visible; }
  table { font-size: 10px; }
  tr { break-inside: avoid; }
}
.cal .pers.viaje { background: var(--viaje); }
.cal .pers.viaje.pendiente { background: transparent; border-color: var(--viaje); }
.marca-dia.viaje { background: var(--viaje); }
.paso { width: 28px; height: 28px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; background: var(--surface-2); color: var(--rfet); }
.aviso.nuevo { background: var(--warn-bg); border-radius: 8px; }
.aviso svg { flex: none; color: var(--rfet); }
.topbar .campana { margin-left: auto; color: #fff; position: relative; display: grid; place-items: center; width: 34px; height: 34px; }
.topbar .campana svg { width: 24px; height: 24px; }
.topbar .campana .badge { position: absolute; top: -2px; right: -4px; margin: 0; min-width: 18px; height: 18px; font-size: .68rem; }
.topbar .campana + .avatar { margin-left: 6px; }
.cal .pers.vacaciones.anterior { background: var(--anterior); color: #1A1213; }
.cal .pers.vacaciones.anterior.pendiente { background: transparent; color: var(--ink); border-color: var(--anterior); }
.leyenda { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .82rem; color: var(--ink-2); }
.leyenda i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* fichajes por día */
.dia-reg { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.dia-reg:last-child { border-bottom: none; }
.dia-reg .fecha b { display: block; text-transform: capitalize; }
.marcas { display: flex; flex-wrap: wrap; gap: 6px; }
.marca-t { font-size: .8rem; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.marca-t.entrada { box-shadow: inset 3px 0 0 var(--ok); } .marca-t.salida { box-shadow: inset 3px 0 0 var(--rfet); }
.marca-t.pausa_inicio, .marca-t.pausa_fin { box-shadow: inset 3px 0 0 var(--pelota); }
.marca-t.corr { outline: 1px dashed var(--ink-2); }
.marca-t.auto { background: transparent; outline: 1px dotted var(--pelota); }
.total-dia { font-family: var(--display); font-size: 1.3rem; font-weight: 600; font-variant-numeric: tabular-nums; }

/* calendario */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal .cab { font-size: .72rem; font-weight: 700; text-transform: uppercase; color: var(--ink-2); text-align: center; padding: 4px 0; }
.cal .celda { min-height: 92px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); padding: 6px; display: flex; flex-direction: column; gap: 3px; min-width: 0; cursor: pointer; text-align: left; }
.cal .celda.fuera { opacity: .4; }
.cal .celda.finde { background: var(--surface-2); }
.cal .celda.festivo { background: var(--warn-bg); }
.cal .celda.hoy { border-color: var(--rfet); box-shadow: inset 0 0 0 1px var(--rfet); }
.cal .celda.sel { outline: 2px solid var(--focus); }
.cal .n { font-size: .82rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.cal .pers { font-size: .72rem; padding: 1px 6px; border-radius: 4px; background: var(--rfet); color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal .pers.ausencia { background: var(--ink-2); }
.cal .pers.teletrabajo { background: var(--fuera); }
.cal .pers.pendiente { background: transparent; color: var(--ink); border: 1px dashed var(--ink-2); }
.cal .mas { font-size: .72rem; color: var(--ink-2); }
.cal .fest-n { font-size: .68rem; color: var(--warn); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* acceso */
.acceso { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.acceso-arte {
  background-color: var(--marca-bg); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; position: relative; overflow: hidden;
  background-image:
    linear-gradient(90deg, transparent 0 12%, rgba(255,255,255,.14) 12% calc(12% + 3px), transparent calc(12% + 3px) 88%, rgba(255,255,255,.14) 88% calc(88% + 3px), transparent calc(88% + 3px)),
    linear-gradient(0deg, transparent 0 30%, rgba(255,255,255,.14) 30% calc(30% + 3px), transparent calc(30% + 3px));
}
.acceso-arte h1 { font-size: clamp(2.6rem, 5vw, 4.2rem); max-width: 12ch; }
.acceso-arte p { max-width: 38ch; opacity: .88; font-size: 1.05rem; margin-top: 14px; }
.acceso-arte .pie { font-size: .8rem; opacity: .75; text-transform: uppercase; letter-spacing: .1em; }
.acceso-form { display: grid; place-items: center; padding-block: 40px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.acceso-form .caja { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 16px; }
.pestanas { display: flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 10px; }
.pestanas button { flex: 1; border: 0; background: transparent; padding: 8px; border-radius: 7px; font-weight: 600; cursor: pointer; color: var(--ink-2); }
.pestanas button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.demo-users { display: grid; gap: 8px; }

/* calendarios laborales */
.cal-tabs { max-width: 520px; }
.anio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px 22px; }
.mini-mes b { display: block; font-family: var(--display); font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.mini-dias { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; font-size: .78rem; text-align: center; font-variant-numeric: tabular-nums; }
.mini-dias em { font-style: normal; font-size: .66rem; font-weight: 700; color: var(--ink-2); }
.mini-dias span { padding: 3px 0; border-radius: 4px; }
.mini-dias span.fs { font-weight: 700; color: var(--ink-2); }
.mini-dias span.int { background: var(--int); }
.mini-dias span[class*="f-"] { color: #1A1213; font-weight: 700; }
.f-festivo { background: var(--f-festivo) !important; } .f-local { background: var(--f-local) !important; } .f-puente { background: var(--f-puente) !important; }
.f-empresa { background: var(--f-empresa) !important; } .f-vacaciones { background: var(--f-vacaciones) !important; color: #fff !important; }
.leyenda i.int { background: var(--int); border: 1px solid var(--line); }
.marca-dia { width: 12px; height: 36px; border-radius: 4px; flex: none; }
.chip-persona { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; background: var(--surface-2); }
.chip-persona .avatar { width: 28px; height: 28px; font-size: .7rem; }
td select { min-width: 180px; }
.error-txt { color: var(--bad); font-weight: 500; }
.peligro-txt { color: var(--bad) !important; }
.rell-lista { max-height: 260px; overflow: auto; }
.demo-users button { text-align: left; }

/* modal */
.velo { position: fixed; inset: 0; background: rgba(15,10,11,.55); display: grid; place-items: center; padding: 16px; z-index: 50; }
.modal { background: var(--surface); color: var(--ink); border-radius: 14px; width: 100%; max-width: 520px; max-height: calc(100% - 32px); overflow: auto; padding: 22px; display: flex; flex-direction: column; gap: 16px; }

#toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(24px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 10px; font-weight: 500; z-index: 60; max-width: calc(100% - 32px); box-shadow: 0 8px 24px rgba(0,0,0,.25); }
#toast.mal { background: var(--bad); color: #fff; }

/* ---------- móvil ---------- */
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .topbar {
    display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 20;
    background: var(--marca-bg); color: #fff;
    padding: calc(10px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px));
  }
  .topbar b { font-family: var(--display); font-size: 1.3rem; letter-spacing: .04em; }
  .topbar .logo-rfet { width: 64px; }
  .topbar b { color: var(--pelota); text-transform: uppercase; letter-spacing: .16em; font-size: 1.05rem; }
  .topbar .avatar { margin-left: auto; width: 30px; height: 30px; text-decoration: none; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: var(--surface); border-top: 1px solid var(--line);
    padding: 6px max(6px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-left, 0px));
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; color: var(--ink-2); text-decoration: none; font-size: .7rem; font-weight: 600; position: relative; border-radius: 8px; }
  .tabbar a[aria-current="page"] { color: var(--rfet); }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar .badge { position: absolute; top: 0; right: 18%; margin: 0; min-width: 18px; height: 18px; font-size: .68rem; }
  .main { padding-block: 18px calc(96px + env(safe-area-inset-bottom, 0px)); }
  .g2, .g3 { grid-template-columns: minmax(0, 1fr); }
  .marcador { grid-template-columns: minmax(0, 1fr); padding: 18px; }
  .acciones-fichaje { min-width: 0; flex-direction: row; flex-wrap: wrap; }
  .acciones-fichaje .btn-fichar { flex: 1 1 140px; }
  .hora-actual { display: none; }
  .acceso { grid-template-columns: minmax(0, 1fr); }
  .acceso-arte { padding: calc(32px + env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) 32px max(20px, env(safe-area-inset-left, 0px)); }
  .acceso-arte p { display: none; }
  .dia-reg { grid-template-columns: minmax(0, 1fr) auto; }
  .dia-reg .marcas { grid-column: 1 / -1; grid-row: 2; }
  .cal .celda { min-height: 54px; padding: 4px; }
  .cal .pers, .cal .fest-n { display: none; }
  .cal .puntos { display: flex; gap: 3px; flex-wrap: wrap; }
  .cal .punto { width: 7px; height: 7px; border-radius: 50%; background: var(--rfet); }
  .cal .punto.ausencia { background: var(--ink-2); } .cal .punto.teletrabajo { background: var(--fuera); } .cal .punto.vacaciones.anterior { background: var(--anterior); } .cal .punto.viaje { background: var(--viaje); } .cal .punto.pendiente { background: transparent; border: 1px solid var(--ink-2); }
  h1 { font-size: 1.7rem; }
}
@media (min-width: 861px) { .cal .puntos, .solo-movil { display: none; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- RFET Fichaje: selector de idioma en la pantalla de acceso ---------- */
.selector-idioma { display: flex; gap: 6px; justify-content: flex-end; }
.selector-idioma .btn[aria-pressed="true"] { background: var(--rfet); border-color: var(--rfet); color: #fff; }
