/* =====================================================================
   OPEXIA RRHH · Estilos
   Mobile-first. Colores corporativos de Opexia.
   ===================================================================== */
:root {
  --navy: #003968;
  --navy-2: #0B4A80;
  --ink: #102A43;
  --teal: #5EAEAF;
  --teal-d: #3E8C8D;
  --teal-l: #8FD3D3;
  --lav: #6480B0;
  --lav-l: #8FA6D4;
  --bg: #F7FAFC;
  --card: #FFFFFF;
  --line: #E3E9F0;
  --line-2: #EEF2F6;
  --muted: #627D98;
  --soft: #F0F5F9;
  --ok: #2BA36B;
  --ok-bg: #E6F6EE;
  --warn: #D98A1F;
  --warn-bg: #FFF4E2;
  --err: #D14343;
  --err-bg: #FDECEC;
  --info-bg: #EAF1FB;
  --brand: var(--navy);                /* color de la empresa cliente */
  --radius: 14px;
  --radius-s: 10px;
  --shadow: 0 1px 2px rgba(16, 42, 67, .06), 0 4px 16px rgba(16, 42, 67, .06);
  --shadow-l: 0 10px 40px rgba(16, 42, 67, .18);
  --tab-h: 64px;
  --top-h: 56px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px; line-height: 1.45; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--lav); }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 22px; } h2 { font-size: 18px; } h3 { font-size: 16px; } h4 { font-size: 14px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 11.5px; }
.num { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
svg.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2;
        stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
svg.i.s { width: 16px; height: 16px; }
svg.i.l { width: 26px; height: 26px; }

/* ---------- Estructura ---------- */
#app { min-height: 100vh; }
.shell { display: flex; min-height: 100vh; }
.sidebar { display: none; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; background: var(--navy); color: #fff;
  padding: var(--safe-t) 12px 0; min-height: calc(var(--top-h) + var(--safe-t));
  display: flex; align-items: center; gap: 10px;
}
.topbar .logo { height: 30px; }
.topbar .spacer { flex: 1; }
.icon-btn {
  position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px;
  border-radius: 12px; border: 0; background: transparent; color: inherit; cursor: pointer;
}
.icon-btn:hover { background: rgba(255,255,255,.08); }
.badge-dot {
  position: absolute; top: 6px; right: 6px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: var(--err); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center;
}
.content { padding: 16px 14px calc(var(--tab-h) + var(--safe-b) + 24px); width: 100%; max-width: 1280px; margin: 0 auto; }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 16px; }
.page-head h1 { flex: 1 0 auto; min-width: 0; max-width: 100%; }   /* v7.9.10 · el título no se encoge: si no caben los botones, bajan a otra línea */
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Barra inferior (móvil) */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: #fff; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr); padding-bottom: var(--safe-b); height: calc(var(--tab-h) + var(--safe-b));
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 600; position: relative;
}
.tabbar a.on { color: var(--navy); }
.tabbar a.on::before { content: ""; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--teal); }
.tabbar a.fab svg { width: 28px; height: 28px; }
.tabbar a .fab-c {
  width: 52px; height: 52px; margin-top: -20px; border-radius: 50%; display: grid; place-items: center;
  background: var(--teal); color: #fff; box-shadow: 0 6px 18px rgba(62, 140, 141, .45); border: 4px solid #fff;
}
.tabbar a.fab.working .fab-c { background: var(--ok); }
.tabbar a.fab.break .fab-c { background: var(--warn); }

/* Widget de fichaje en la cabecera (escritorio) */
.clockbar { display: none; }

/* ---------- Escritorio ---------- */
@media (min-width: 960px) {
  .sidebar {
    display: flex; flex-direction: column; width: 248px; flex: none; background: var(--navy); color: #DCE7F2;
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
  }
  .sidebar .brand { padding: 18px 14px 14px 18px; display: flex; align-items: center; gap: 8px; }
  .sidebar .brand img.full { height: 40px; }
  .sidebar .brand img.iso { height: 34px; display: none; }
  .sidebar .collapse { margin-left: auto; width: 30px; height: 30px; border-radius: 8px; border: 0; background: rgba(255,255,255,.08); color: #DCE7F2; cursor: pointer; display: grid; place-items: center; }
  .sidebar .collapse:hover { background: rgba(255,255,255,.16); }
  .sidebar { transition: width .18s ease; }
  .shell.mini .sidebar { width: 72px; }
  .shell.mini .sidebar .brand { flex-direction: column; padding: 16px 0 10px; }
  .shell.mini .sidebar .brand img.full, .shell.mini .company, .shell.mini .nav-sec, .shell.mini .foot, .shell.mini .nav a span { display: none; }
  .shell.mini .sidebar .brand img.iso { display: block; }
  .shell.mini .sidebar .collapse { margin: 8px 0 0; }
  .shell.mini .nav a { justify-content: center; margin: 2px 10px; padding: 11px 0; position: relative; }
  .shell.mini .nav a .count { display: block; position: absolute; top: 4px; right: 6px; padding: 0 5px; font-size: 10px; }
  .shell.mini .nav a .count.hidden { display: none; }
  .shell.mini .nav { padding-top: 6px; }
  .sidebar .company { margin: 0 14px 10px; padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,.06); font-size: 13px; }
  .sidebar .company b { color: #fff; display: block; }
  .nav-sec { padding: 14px 18px 4px; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--lav-l); font-weight: 700; }
  .nav a {
    display: flex; align-items: center; gap: 11px; margin: 1px 10px; padding: 9px 10px; border-radius: 9px;
    color: #DCE7F2; text-decoration: none; font-size: 14px; font-weight: 500;
  }
  .nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
  .nav a.on { background: rgba(94,174,175,.22); color: #fff; }
  .nav a.on svg { color: var(--teal-l); }
  .nav a .count { margin-left: auto; background: var(--err); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 9px; }
  .sidebar .foot { margin-top: auto; padding: 14px 18px; font-size: 11.5px; color: var(--lav-l); }
  .topbar { background: #fff; color: var(--ink); border-bottom: 1px solid var(--line); padding: 0 24px; }
  .topbar .logo, .topbar .m-only { display: none; }
  .icon-btn:hover { background: var(--soft); }
  .tabbar { display: none; }
  .content { padding: 24px 28px 48px; }
  .clockbar {
    display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 999px;
    padding: 4px 4px 4px 14px; background: #fff;
  }
  .clockbar .t { font-weight: 700; font-size: 14px; }
  .clockbar .e { color: var(--muted); font-size: 13px; }
  .clockbar span.warn { color: var(--warn); font-size: 12.5px; font-weight: 600; display: flex; gap: 4px; align-items: center; }
}

/* ---------- Tarjetas y rejillas ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.card + .card { margin-top: 14px; }
.card h3 { margin-bottom: 10px; }
.card .card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.card .card-head h3 { margin: 0; flex: 1; }
.grid { display: grid; gap: 14px; }
.grid > .card + .card { margin-top: 0; }
.grid > * { min-width: 0; }
@media (min-width: 720px) { .grid.c2 { grid-template-columns: 1fr 1fr; } .grid.c3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .grid.c3w { grid-template-columns: 1.1fr 1fr 1fr; } }
/* v8.0.1 · Inicio: las tarjetas no se estiran hasta el fondo; en ordenador el reloj de fichar va arriba de la tercera columna */
.grid.c3w { align-items: start; }
@media (min-width: 1100px) { .grid.c3w > .stack { display: flex; flex-direction: column; gap: 10px; } .grid.c3w > .stack > * { margin-top: 0 !important; } .grid.c3w > .stack > #hero { order: -1; } .grid.c3w > .stack > #hero:empty { display: none; } }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 10px; }
.sep { height: 1px; background: var(--line); margin: 12px 0; }
.empty { text-align: center; color: var(--muted); padding: 28px 12px; }
.empty svg { width: 40px; height: 40px; color: var(--lav-l); margin-bottom: 6px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent;
  border-radius: 11px; padding: 10px 16px; min-height: 44px; font-weight: 600; font-size: 14.5px; cursor: pointer;
  background: var(--navy); color: #fff; text-decoration: none; white-space: nowrap; transition: transform .08s, background .15s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.teal { background: var(--teal); }
.btn.teal:hover { background: var(--teal-d); }
.btn.ok { background: var(--ok); }
.btn.warn { background: var(--warn); }
.btn.err { background: var(--err); }
.btn.ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--soft); }
.btn.link { background: transparent; color: var(--lav); padding: 6px 8px; min-height: 0; }
.btn.sm { min-height: 34px; padding: 6px 12px; font-size: 13px; border-radius: 9px; }
.btn.block { width: 100%; }
.btn.lg { min-height: 56px; font-size: 17px; border-radius: 14px; }

/* ---------- Formularios ---------- */
label.f, div.f { display: block; }
label.f > span, div.f > span:first-child { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 5px; }
.inp, select.inp, textarea.inp {
  width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 10px 12px; min-height: 44px; outline: none;
}
.inp:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(94,174,175,.2); }
textarea.inp { min-height: 80px; resize: vertical; }
.form-grid { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .form-grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .form-grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.form-grid .full { grid-column: 1 / -1; }
.switch { position: relative; display: inline-block; width: 44px; height: 26px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch input:disabled { cursor: not-allowed; }
.switch input:focus-visible + i { outline: 2px solid var(--teal); outline-offset: 2px; }
.switch i { position: absolute; inset: 0; border-radius: 26px; background: #CBD5E1; transition: .2s; cursor: pointer; }
.switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + i { background: var(--teal); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:disabled + i { opacity: .5; }
.opt { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.opt:last-child { border-bottom: 0; }
.opt .tx { flex: 1; min-width: 0; }
.opt .tx b { display: block; font-size: 14px; }
.opt .tx small { color: var(--muted); display: block; font-size: 12.5px; }
.opt .inh { font-size: 11px; color: var(--lav); font-weight: 600; }
.opt .ctl { flex: none; display: flex; align-items: center; gap: 6px; }
.opt .ctl .inp { width: 110px; min-height: 36px; padding: 6px 8px; }
.opt .ctl select.inp, .opt .ctl textarea.inp, .opt .ctl .ty-box { max-width: 100%; }
/* v8.0.1 · en móvil el control baja debajo del texto (antes el texto quedaba en una columna de una palabra) */
@media (max-width: 600px) {
  .opt { flex-wrap: wrap; row-gap: 8px; }
  .opt .tx { flex: 1 1 100%; }
  .opt .ctl { flex: 1 1 100%; min-width: 0; flex-wrap: wrap; }
  .opt .ctl select.inp, .opt .ctl textarea.inp, .opt .ctl input.inp:not([type=number]):not([type=time]) { width: 100% !important; }
  .opt .ctl:has(> .switch) { flex: none; margin-left: auto; }
  .opt:has(.ctl > .switch) { flex-wrap: nowrap; }
  .opt:has(.ctl > .switch) .tx { flex: 1; }
}

/* ---------- Segmentos / pestañas ---------- */
.seg { display: inline-flex; background: var(--soft); border-radius: 11px; padding: 3px; gap: 2px; flex-wrap: wrap; }
/* v10.14.3 · nunca más ancho que su sitio (en el móvil se cortaba «Firmará desde su móvil»); .full: dos mitades iguales */
.seg { max-width: 100%; } .seg button { white-space: normal; min-width: 0; }
.seg.full { display: flex; width: 100%; flex-wrap: nowrap; } .seg.full button { flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-align: center; line-height: 1.25; }
.seg button { border: 0; background: transparent; padding: 7px 12px; border-radius: 8px; font-weight: 600; font-size: 13.5px; color: var(--muted); cursor: pointer; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(16,42,67,.12); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a, .tabs button {
  border: 0; background: none; padding: 10px 12px; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer;
  border-bottom: 2px solid transparent; white-space: nowrap; text-decoration: none;
}
.tabs .on { color: var(--navy); border-bottom-color: var(--teal); }

/* ---------- Chips y estados ---------- */
.chip { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; background: var(--soft); color: var(--muted); white-space: nowrap; }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.err { background: var(--err-bg); color: var(--err); }
.chip.info { background: var(--info-bg); color: var(--lav); }
.chip.teal { background: #E4F4F4; color: var(--teal-d); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: #CBD5E1; flex: none; }
.dot.working { background: var(--ok); } .dot.break { background: var(--warn); } .dot.remote { background: var(--lav); }
.dot.done { background: var(--lav-l); } .dot.absent { background: #C2793C; } .dot.not_started { background: #CBD5E1; }
.days { display: inline-flex; gap: 3px; }
.days span { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font-size: 10.5px; font-weight: 700; background: var(--soft); color: #9FB3C8; }
.days span.on { background: var(--lav); color: #fff; }

/* ---------- Avatares ---------- */
.av { width: 38px; height: 38px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 13.5px; color: #fff; overflow: hidden; background: var(--lav); }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.s { width: 28px; height: 28px; font-size: 11px; }
.av.l { width: 64px; height: 64px; font-size: 22px; }
.av-stack { display: flex; }
.av-stack .av { border: 2px solid #fff; margin-left: -8px; }
.av-stack .av:first-child { margin-left: 0; }
.av-stack .more { margin-left: -8px; border: 2px solid #fff; background: var(--soft); color: var(--muted); }

/* ---------- Listas y tablas ---------- */
.list > .li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.list > .li:last-child { border-bottom: 0; }
.li .grow { flex: 1; min-width: 0; }
.li .grow b, .li .grow .t { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.li { text-decoration: none; color: inherit; }
.tbl-wrap { overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: #FAFCFE; }

/* ---------- Pantalla de fichaje ---------- */
.clock-hero {
  background: linear-gradient(160deg, var(--navy) 0%, #0B4A80 100%); color: #fff; border-radius: 22px; padding: 22px 18px 20px;
  text-align: center; position: relative; overflow: hidden; box-shadow: var(--shadow);
}
.clock-hero::after { content: ""; position: absolute; width: 320px; height: 320px; right: -120px; top: -140px; border-radius: 50%; background: radial-gradient(circle, rgba(94,174,175,.35), transparent 70%); pointer-events: none; }
.clock-hero .state { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; background: rgba(255,255,255,.1); padding: 5px 12px; border-radius: 999px; }
.clock-hero .timer { font-size: 54px; font-weight: 800; letter-spacing: -.02em; margin: 12px 0 2px; font-variant-numeric: tabular-nums; line-height: 1.05; }
.clock-hero .sub { color: #BFD3E6; font-size: 14px; }
.clock-hero .bar { height: 8px; border-radius: 8px; background: rgba(255,255,255,.15); margin: 14px auto 0; max-width: 360px; overflow: hidden; }
.clock-hero .bar i { display: block; height: 100%; background: var(--teal-l); border-radius: 8px; transition: width .4s; }
.clock-actions { display: grid; gap: 10px; margin-top: 18px; position: relative; z-index: 1; }
.clock-actions.two { grid-template-columns: 1fr 1fr; }
.big-clock {
  width: 100%; min-height: 72px; border-radius: 18px; border: 0; font-size: 20px; font-weight: 800; color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px; box-shadow: 0 8px 22px rgba(0,0,0,.18);
}
.big-clock svg { width: 26px; height: 26px; }
.big-clock.in { background: var(--teal); }
.big-clock.out { background: var(--err); }
.big-clock.pause { background: var(--warn); }
.big-clock.resume { background: var(--ok); }
.big-clock:disabled { opacity: .6; }
.clock-meta { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 14px; position: relative; z-index: 1; }
.clock-meta .chip { background: rgba(255,255,255,.12); color: #E3EEF8; }
.clock-meta .chip.err { background: rgba(209,67,67,.25); color: #FFD6D6; }
.type-pick { display: flex; gap: 8px; overflow-x: auto; justify-content: center; margin-top: 14px; position: relative; z-index: 1; }
.type-pick button { border: 1px solid rgba(255,255,255,.25); background: transparent; color: #fff; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.type-pick button.on { background: #fff; color: var(--navy); }
.offline-banner { background: var(--warn-bg); color: #8A5A10; border-radius: 12px; padding: 10px 12px; font-size: 13.5px; display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }

/* ---------- Línea de tiempo (Gantt) ---------- */
.gantt { position: relative; }
.g-head, .g-row { display: grid; grid-template-columns: 270px 1fr; align-items: center; }
.g-head { position: sticky; top: 0; background: #fff; z-index: 2; border-bottom: 1px solid var(--line); }
.g-hours { position: relative; height: 30px; }
.g-hours span { position: absolute; top: 8px; font-size: 11px; color: var(--muted); transform: translateX(-50%); }
.g-row { border-bottom: 1px solid var(--line-2); min-height: 56px; cursor: pointer; }
.g-row:hover { background: #FAFCFE; }
.g-who { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 0; min-width: 0; }
.g-who .grow { min-width: 0; flex: 1; overflow: hidden; }
.g-who small { overflow: hidden; text-overflow: ellipsis; }
.g-who b { font-size: 13.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-who small { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.g-track { position: relative; height: 56px; }
.g-grid { position: absolute; inset: 0; pointer-events: none; }
.g-grid i { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line-2); }
.g-sched { position: absolute; top: 33px; height: 6px; border-radius: 4px; background: #D9E2EC; }
.g-bar { position: absolute; top: 16px; height: 14px; border-radius: 5px; background: #5BC593; }
.g-bar.open { background: repeating-linear-gradient(45deg, #5BC593, #5BC593 6px, #7CD3AA 6px, #7CD3AA 12px); }
.g-bar.auto { background: var(--err); }
.g-bar.carry { opacity: .5; }   /* v10.16.0 · resto de un turno de noche del día anterior */
.g-brk { position: absolute; top: 16px; height: 14px; background: #F3B860; border-radius: 3px; }
.g-tip { position: fixed; z-index: 3000; pointer-events: none; background: var(--navy, #0E2A47); color: #fff; border-radius: 10px; padding: 10px 12px; font-size: 12.5px; line-height: 1.45; box-shadow: 0 8px 24px rgba(14,42,71,.28); max-width: 300px; }
.g-tip > b { display: block; font-size: 13px; margin-bottom: 4px; }
.g-tip-e, .g-tip-b { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.g-tip-b { padding-left: 14px; color: #FCE3BB; }
.g-tip small { color: #B9CCE0; } .g-tip .g-tip-w { color: #FFB3B3; }
.g-tip-dot { width: 8px; height: 8px; border-radius: 3px; background: #5BC593; flex: none; } .g-tip-dot.auto { background: var(--err); } .g-tip-dot.brk { background: #F3B860; }
.g-tip-f { margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(255,255,255,.18); color: #D6E3F0; }
.g-tip .muted { color: #B9CCE0; }
.g-now { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px dashed var(--teal); z-index: 1; pointer-events: none; }
@media (max-width: 720px) {
  .g-head, .g-row { grid-template-columns: 1fr; }
  .g-head .g-who { display: none; }
  .g-row { padding: 6px 0; }
  .g-who { padding: 4px 0; }
  .g-track { height: 36px; }
  .g-bar, .g-brk { top: 6px; }
  .g-sched { top: 23px; }
}

/* Barra mini de un día (mis fichajes) */
.mini-track { position: relative; height: 12px; border-radius: 6px; background: var(--soft); overflow: hidden; }
.mini-track .g-bar, .mini-track .g-brk { top: 0; height: 12px; border-radius: 0; }
.mini-track .g-sched { top: 0; height: 12px; border-radius: 0; background: #E4EAF1; }
.day-row { padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.day-row .top { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.day-row .d { width: 64px; flex: none; }
.day-row .d b { display: block; font-size: 14px; }
.day-row .d small { color: var(--muted); font-size: 12px; text-transform: capitalize; }
.day-row .h { width: 108px; flex: none; text-align: right; font-size: 13px; }
.day-row.weekend .d b { color: #9FB3C8; }
.day-row.today { background: linear-gradient(90deg, rgba(94,174,175,.08), transparent); border-radius: 10px; }
.day-row.focus { background: #fff8ec; box-shadow: inset 3px 0 0 var(--warn, #e0a100); border-radius: 10px; padding-left: 14px; padding-right: 10px; margin: 0 -10px 0 -14px; }   /* v10.9.1 · el día no queda pegado a la raya y las columnas siguen alineadas */
.day-row .detail { margin: 10px 0 2px 74px; }
.seg-line { display: flex; align-items: center; gap: 8px; padding: 7px 0; font-size: 13.5px; flex-wrap: wrap; }
@media (max-width: 520px) { .day-row .detail { margin-left: 0; } .day-row .h { width: 92px; } }

/* ---------- Modal y avisos ---------- */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(16,42,67,.45); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.modal { background: #fff; width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; border-radius: 20px 20px 0 0; padding: 20px 18px calc(18px + var(--safe-b)); box-shadow: var(--shadow-l); animation: up .2s ease-out; }
.modal.wide { max-width: 860px; }
.modal .m-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.modal .m-head h2 { flex: 1; }
.modal .m-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
@media (min-width: 640px) { .overlay { align-items: center; padding: 20px; } .modal { border-radius: 20px; } }
@keyframes up { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
#toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tab-h) + var(--safe-b) + 14px); z-index: 200; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
@media (min-width: 960px) { #toasts { bottom: 24px; } }
.toast { background: var(--ink); color: #fff; padding: 12px 14px; border-radius: 12px; box-shadow: var(--shadow-l); font-size: 14px; display: flex; gap: 10px; align-items: center; animation: up .2s; pointer-events: auto; }
.toast.ok { background: #1F7A51; } .toast.err { background: #B53434; } .toast.warn { background: #9A6213; }
.loader { display: grid; place-items: center; padding: 40px; }
.spin { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--teal); border-radius: 50%; animation: rot .8s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }
.drawer-list .li { cursor: default; }

/* ---------- Login / bienvenida ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(circle at 80% 0%, #0B4A80, var(--navy) 55%); }
.auth .box { width: 100%; max-width: 400px; background: #fff; border-radius: 22px; padding: 26px 22px; box-shadow: var(--shadow-l); }
.auth .logo-top { display: block; height: 64px; margin: 0 auto 26px; }
.auth h1 { text-align: center; margin-bottom: 4px; }
.auth p.c { text-align: center; color: var(--muted); margin: 0 0 18px; }
.auth .links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px; margin-top: 14px; }
.auth .links .btn.link { white-space: normal; padding: 6px 2px; font-size: 14px; }
.steps { display: flex; gap: 6px; justify-content: center; margin-bottom: 18px; }
.steps i { width: 26px; height: 5px; border-radius: 4px; background: var(--line); }
.steps i.on { background: var(--teal); }
.install-step { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; }
.install-step .n { width: 26px; height: 26px; border-radius: 50%; background: var(--teal); color: #fff; font-weight: 700; font-size: 13px; display: grid; place-items: center; flex: none; }

/* ---------- KPIs ---------- */
.kpis3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 520px) { .kpis3 .kpi b { font-size: 16px; white-space: nowrap; letter-spacing: -.2px; } .kpis3 .kpi span { font-size: 11px; } }
.kpi { display: flex; flex-direction: column; gap: 2px; }
.kpi b { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.kpi span { color: var(--muted); font-size: 12.5px; }
.who-grid { display: grid; gap: 8px; }
.who-line { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.who-line:last-child { border-bottom: 0; }
.who-line .grow b { display: block; font-size: 14px; }
.who-line .grow small { color: var(--muted); font-size: 12px; }

/* ---------- Impresión (registro de jornada) ---------- */
.print-only { display: none; }
@media print {
  body { background: #fff; }
  .sidebar, .topbar, .tabbar, #toasts, .no-print, .overlay { display: none !important; }
  .content { padding: 0; max-width: none; }
  .print-only { display: block; }
  .card { box-shadow: none; border: 1px solid #ccc; }
}

/* =====================================================================
   FASE 2 · Calendarios, ausencias y turnos
   ===================================================================== */
.cal-head, .cal-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-head span { text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); padding: 4px 0; }
.cal-week + .cal-week { margin-top: 3px; }
/* Mes pequeño (calendario anual) */
.mini-months { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.mini-month h4 { font-size: 13px; margin-bottom: 4px; }
.mini-month .d { aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-variant-numeric: tabular-nums; position: relative; }
.mini-month .d.out { visibility: hidden; }
.mini-month .d.we { color: #9FB3C8; }
.mini-month .d.hol { background: var(--err, #d64545); color: #fff; font-weight: 700; }
.mini-month .d.abs { color: #fff; font-weight: 700; }
.mini-month .d.pend { box-shadow: inset 0 0 0 2px var(--c); color: var(--ink); background: transparent !important; }
.mini-month .d.today { outline: 2px solid var(--ink); outline-offset: -1px; }
/* Mes grande (admin) */
.big-cal .cell { min-height: 92px; border: 1px solid var(--line-2); border-radius: 10px; padding: 5px 6px; background: #fff; cursor: pointer; overflow: hidden; display: flex; flex-direction: column; gap: 3px; }
.big-cal .cell.out { background: var(--soft); opacity: .55; }
.big-cal .cell.we { background: #FAFBFD; }
.big-cal .cell.today { border-color: var(--teal); box-shadow: inset 0 0 0 1px var(--teal); }
.big-cal .cell .n { font-size: 12px; font-weight: 700; color: var(--muted); display: flex; justify-content: space-between; gap: 4px; }
.big-cal .cell .hol { font-size: 10.5px; color: var(--err); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.big-cal .chips { display: flex; flex-wrap: wrap; gap: 3px; }
.big-cal .tchip { font-size: 10.5px; font-weight: 700; border-radius: 6px; padding: 1px 5px; color: #fff; }
.big-cal .tchip.p { background: transparent !important; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--c); }
/* v7.9.14 · cierres de empresa en gris y domingos en un gris más oscuro */
.big-cal .cell.cz { background: #EDF0F4; }
.big-cal .cell.sun { background: #E2E7EE; }
.big-cal .cell.cz .n, .big-cal .cell.sun .n { color: #5b6b80; }
.big-cal .av-more { font-size: 10px; font-weight: 700; color: var(--muted); align-self: center; margin-left: 2px; }
.cal-key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; border: 1px solid var(--line-2); }
.cal-key.cz { background: #EDF0F4; } .cal-key.sun { background: #E2E7EE; }
/* móvil: sin fotos (no caben y se cortaban); se ve el número de personas por tipo con su color. Al pulsar el día, la lista */
@media (max-width: 720px) {
  .big-cal .cell { min-height: 58px; padding: 4px 3px; align-items: stretch; }
  .big-cal .cell .av-stack { display: none; }
  .big-cal .cell .hol { display: none; }
  .big-cal .chips { justify-content: center; margin-top: auto; }
  .big-cal .tchip { font-size: 11px; padding: 1px 5px; min-width: 18px; text-align: center; }
}
.type-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.type-list button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; text-align: left; padding: 9px 10px; border-radius: 10px; cursor: pointer; font-size: 14px; }
.type-list button.on { background: var(--soft); font-weight: 700; }
.bal3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.bal3 .kpi b { font-size: 24px; }
@media (max-width: 520px) { .bal3 .kpi b { font-size: 18px; } }
.split { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.split > * { min-width: 0; }
@media (min-width: 960px) { .split { grid-template-columns: 280px minmax(0, 1fr); align-items: start; } }
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-chips label { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; cursor: pointer; background: #fff; }
.filter-chips input { accent-color: var(--teal); }

/* Cuadrante de turnos */
.shift-grid { width: 100%; border-collapse: separate; border-spacing: 3px; }
.shift-grid th { font-size: 12px; color: var(--muted); font-weight: 600; text-align: center; padding: 4px; white-space: nowrap; }
.shift-grid th.who, .shift-grid td.who { text-align: left; min-width: 180px; position: sticky; left: 0; background: var(--card); z-index: 1; }
.shift-grid th.hol { color: var(--err); }
.shift-grid td.c { min-width: 92px; height: 52px; border-radius: 9px; background: var(--soft); text-align: center; cursor: pointer; font-size: 12px; line-height: 1.25; position: relative; padding: 4px; }
.shift-grid td.c:hover { outline: 2px solid var(--teal); outline-offset: -2px; }
.shift-grid td.c b { display: block; font-size: 14px; }
.shift-grid td.c.sh { color: #fff; }
.shift-grid td.c.off { background: #E9EEF4; color: var(--muted); }
.shift-grid td.c.hol { background: repeating-linear-gradient(45deg, #FDECEC, #FDECEC 6px, #fff 6px, #fff 12px); color: var(--err); }
.shift-grid td.c.abs { background: var(--warn-bg); color: #8A5A10; cursor: not-allowed; }
.shift-grid td.c.other { background: #EEF2F6; color: #9FB3C8; cursor: not-allowed; }
.shift-grid td.c.dirty::after { content: ""; position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 2px #fff; }
.shift-grid td.c.del { opacity: .45; text-decoration: line-through; }
.palette { display: flex; flex-wrap: wrap; gap: 8px; }
.palette button { border: 2px solid transparent; border-radius: 10px; padding: 6px 10px; font-weight: 700; font-size: 13px; cursor: pointer; color: #fff; display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.palette button small { font-weight: 500; font-size: 11px; opacity: .9; }
.palette button.on { border-color: var(--ink); box-shadow: 0 0 0 2px #fff inset; }
.palette button.plain { background: var(--soft); color: var(--ink); }
.week-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.week-row .d { width: 66px; flex: none; }
.week-row .d b { display: block; }
.week-row .d small { color: var(--muted); font-size: 12px; }
.week-row.today { background: linear-gradient(90deg, rgba(94,174,175,.1), transparent); border-radius: 10px; }
.bank-bar { height: 8px; border-radius: 6px; background: var(--soft); position: relative; overflow: hidden; min-width: 120px; }
.bank-bar i { position: absolute; top: 0; bottom: 0; border-radius: 6px; }

/* Superadmin viendo una empresa cliente */
.sidebar .company.switch { display: block; box-sizing: border-box; width: calc(100% - 28px); height: auto; line-height: 1.4; white-space: normal; text-align: left; border: 1px solid rgba(255,255,255,.18); color: rgba(255,255,255,.75); cursor: pointer; font: inherit; font-size: 12px; background: rgba(94,174,175,.18); }
.sidebar .company.switch:hover { background: rgba(94,174,175,.3); }
.sidebar .company.switch svg { width: 12px; height: 12px; vertical-align: -2px; }
.viewing-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 40vw; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--teal, #2F8F90); background: rgba(47,143,144,.12); color: inherit; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.viewing-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .btn.sm { white-space: nowrap; }
@media (max-width: 520px) { .viewing-chip { max-width: 44vw; } }
@media (max-width: 899px) { .topbar .viewing-chip { border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.1); color: #fff; } }

/* ===================== Fase 3 ===================== */
.kpis { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.kpis .kpi b { font-size: 22px; }
.note { display: flex; gap: 8px; align-items: flex-start; background: var(--soft); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; color: var(--ink); }
.note svg { flex: 0 0 auto; margin-top: 2px; }
.inp.sm { padding: 6px 10px; font-size: 13px; min-height: 34px; }
.ell { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spin.s { display: inline-block; width: 14px; height: 14px; border-width: 2px; vertical-align: -2px; }
.fchip { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.fchip.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.doc-ic { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 9px; background: var(--soft); color: var(--navy); display: grid; place-items: center; }
.doc-row { flex-wrap: wrap; }
.doc-row.pend .doc-ic { background: rgba(232, 160, 60, .15); color: #B26A00; }
.pend-card { border: 1px solid rgba(232, 160, 60, .45); }
.warn-row td { background: rgba(232, 160, 60, .08); }
.aud-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 12px; padding: 6px 0 10px; max-height: 220px; overflow: auto; }
.aud details { border-top: 1px solid var(--line-2); padding: 6px 0; }
.aud summary { cursor: pointer; }
/* Comunicados */
.ann { position: relative; }
.ann.unread { border-left: 4px solid var(--teal); }
.ann.pinned { background: linear-gradient(0deg, #fff, #fff), var(--soft); }
.ann-ic { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 10px; background: rgba(94, 174, 175, .15); color: var(--teal-d); display: grid; place-items: center; }
.ann-body { margin: 10px 0 6px; line-height: 1.6; overflow-wrap: anywhere; }
.ann-body p { margin: 0 0 10px; }
.ann-stats { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: var(--soft); border-radius: 10px; padding: 10px 12px; margin-top: 10px; cursor: pointer; font: inherit; color: var(--ink); text-align: left; }
.ann-stats .bar { flex: 1; }
.bar { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; min-width: 60px; }
.bar i { display: block; height: 100%; background: var(--teal); border-radius: 99px; }
/* Firma */
.sign-pad { width: 100%; height: 170px; border: 2px dashed var(--line); border-radius: 12px; background: #fff; touch-action: none; cursor: crosshair; display: block; }
/* Encuestas */
.sq { padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.sq-t { font-weight: 600; margin-bottom: 8px; display: flex; gap: 8px; align-items: baseline; }
.sq-n { flex: 0 0 22px; height: 22px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 12px; display: inline-grid; place-items: center; }
.scale-btns { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0; }
.scale-btns button { flex: 1 1 36px; min-width: 36px; height: 40px; border: 1px solid var(--line); background: #fff; border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer; color: var(--ink); }
.scale-btns.wide button { flex: 0 1 120px; }
.scale-btns button.on { background: var(--teal); border-color: var(--teal); color: #fff; }
.sq .opt { padding: 4px 0; }
.qb { border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-bottom: 10px; background: var(--soft); }
.rbar { display: grid; grid-template-columns: minmax(40px, 160px) 1fr 40px; gap: 10px; align-items: center; margin: 4px 0; }
.rbar .num { text-align: right; }
/* Canal de denuncias */
.wmsgs { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.wmsg { max-width: 86%; background: var(--soft); border-radius: 12px 12px 12px 4px; padding: 10px 12px; }
.wmsg.me { align-self: flex-end; background: rgba(94, 174, 175, .16); border-radius: 12px 12px 4px 12px; }
.done-card { text-align: center; box-shadow: none; }
.big-ok svg { width: 54px; height: 54px; color: var(--teal-d); }
.codes { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 14px 0; }
.codes > div { background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px; display: flex; flex-direction: column; min-width: 150px; }
.codes b { font-size: 20px; letter-spacing: 1px; }
@media (max-width: 520px) { .rbar { grid-template-columns: 70px 1fr 32px; } .doc-row > .row { width: 100%; justify-content: flex-start !important; } }
.scale-btns.n11 { gap: 4px; flex-wrap: nowrap; }
.scale-btns.n11 button { flex: 1 1 0; min-width: 0; padding: 0; }

/* Empresa en el menú lateral (logo + nombre) y menú plegado */
.sidebar .company { display: flex !important; align-items: center; gap: 10px; }
.sidebar .company .co-logo { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 9px; background: #fff; display: grid; place-items: center; overflow: hidden; color: var(--navy); }
.sidebar .company .co-logo img { max-width: 34px; max-height: 34px; object-fit: contain; }
.sidebar .company .co-txt { min-width: 0; display: block; overflow-wrap: anywhere; }
.sidebar .company.switch { width: calc(100% - 28px); }
.shell.mini .sidebar .company { display: flex !important; justify-content: center; margin: 0 8px 10px; padding: 6px; width: auto; background: transparent; border: 0; }
.shell.mini .sidebar .company .co-txt { display: none; }
.logo-prev { min-height: 70px; border: 1px dashed var(--line); border-radius: 10px; display: grid; place-items: center; padding: 10px; background: repeating-conic-gradient(#f3f6f9 0 25%, #fff 0 50%) 0 0 / 16px 16px; }
.logo-prev img { max-height: 70px; max-width: 240px; object-fit: contain; }
/* Pestañas con flechas para desplazarse */
.tabs-wrap { position: relative; display: flex; align-items: stretch; gap: 4px; margin-bottom: 16px; }
.tabs-wrap .tabs { flex: 1; margin-bottom: 0; scroll-behavior: smooth; }
.tabs-arrow { flex: 0 0 34px; border: 1px solid var(--line); background: #fff; border-radius: 9px; cursor: pointer; color: var(--ink); display: grid; place-items: center; }
.tabs-arrow:disabled { opacity: .3; cursor: default; }
.tabs-wrap:not(.over) .tabs-arrow { display: none; }
.tabs { scrollbar-width: thin; }
.tabs::-webkit-scrollbar { height: 6px; }
.tabs::-webkit-scrollbar-thumb { background: var(--line); border-radius: 9px; }
.tabs-wrap .tabs { position: relative; }

/* ===================== Fase 4 · Talento y gastos ===================== */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.kpis .kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); }
.kpis .kpi b { font-size: 22px; }
.kpi.warn b { color: var(--warn); }
.warn-card { background: var(--warn-bg); border-color: #F3D9AE; color: #7A4B0B; }
.card.soft { background: var(--soft); box-shadow: none; }
.bar { height: 8px; border-radius: 8px; background: var(--line-2); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--teal); border-radius: 8px; transition: width .4s; }

/* Matrices (formación y polivalencia) */
.tbl.mtx { border-collapse: separate; border-spacing: 0; width: auto; min-width: max-content; }
.tbl.mtx th, .tbl.mtx td { padding: 6px 8px; border-bottom: 1px solid var(--line-2); }
.tbl.mtx th:first-child, .tbl.mtx td:first-child { position: sticky; left: 0; background: var(--card); z-index: 1; min-width: 160px; box-shadow: 1px 0 0 var(--line); }
.tbl.mtx th.rot { height: 130px; vertical-align: bottom; white-space: nowrap; width: 40px; padding: 4px; }
.tbl.mtx th.rot span, .tbl.mtx th.rot small { display: block; writing-mode: vertical-rl; transform: rotate(180deg); margin: 0 auto; }
.tbl.mtx th.rot span { font-weight: 700; font-size: 12.5px; max-height: 120px; overflow: hidden; text-overflow: ellipsis; }
.tbl.mtx th.rot small { font-weight: 400; color: var(--muted); font-size: 10.5px; }
.mcell { text-align: center; width: 40px; }
.mcell[data-act] { cursor: pointer; }
.mcell[data-act]:hover { outline: 2px solid var(--teal); outline-offset: -3px; border-radius: 6px; }
.mcell.ok { color: var(--ok); background: var(--ok-bg); }
.mcell.expiring { color: var(--warn); background: var(--warn-bg); }
.mcell.expired, .mcell.missing { color: var(--err); background: var(--err-bg); }
.mcell.planned { color: var(--lav); background: var(--info-bg); }
.mcell.na { color: var(--line); }
.mcell.mini { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; }
.mcell.gap { background: var(--warn-bg); }
.iluo-c { color: var(--navy); }
.iluo { display: block; margin: 0 auto; }
.iluo.l0 { color: #B7C4D3; } .iluo.l1 { color: var(--lav); } .iluo.l2 { color: var(--teal-d); } .iluo.l3 { color: var(--navy); } .iluo.l4 { color: var(--ok); }
.tbl.mtx tr.cover td { background: var(--soft); font-weight: 700; font-size: 12.5px; }
.tbl.mtx td.bad { color: var(--err); } .tbl.mtx td.good { color: var(--ok); }
.iluo-pick { display: grid; gap: 6px; }
.iluo-pick button { display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; text-align: left;
  border: 1.5px solid var(--line); background: var(--card); border-radius: 12px; padding: 8px 12px; cursor: pointer; font: inherit; }
.iluo-pick button svg { grid-row: span 2; }
.iluo-pick button small { color: var(--muted); font-size: 12px; }
.iluo-pick button.on { border-color: var(--teal); background: #EEF8F8; }

/* Evaluaciones */
.crit-list { display: grid; gap: 2px; margin: 8px 0 12px; }
.crit { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.crit b { display: block; font-size: 14px; } .crit small { display: block; font-size: 12px; }
.crit-v { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; min-width: 128px; }
.stars { display: inline-flex; gap: 2px; }
.stars button { border: 0; background: none; font-size: 22px; line-height: 1; color: #D5DEE8; padding: 0 1px; cursor: default; }
.stars.edit button { cursor: pointer; font-size: 26px; }
.stars button.on { color: #F2B01E; }
.rv-sum { display: flex; gap: 22px; margin: 6px 0 4px; }
.rv-sum div { display: flex; flex-direction: column; } .rv-sum b { font-size: 26px; color: var(--navy); }
.rv-txt { margin: 10px 0; } .rv-txt p { margin: 4px 0 0; white-space: pre-wrap; }

/* Acogida */
.ob-task { cursor: pointer; }
.ob-task input { width: 20px; height: 20px; accent-color: var(--teal); flex: none; }
.ob-task.done b { text-decoration: line-through; color: var(--muted); }
.ob-task.late:not(.done) small { color: var(--err); }
.ob-row { display: grid; grid-template-columns: 1fr 140px 70px 36px; gap: 6px; margin-bottom: 6px; align-items: center; }
.ob-row.head { margin-bottom: 2px; }
@media (max-width: 560px) { .ob-row { grid-template-columns: 1fr 100px 56px 32px; } }

/* Asistente */
.as-fab { position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer;
  background: linear-gradient(135deg, var(--teal), var(--lav)); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0,57,104,.3); transition: transform .15s; }
.as-fab { transition: transform .15s, opacity .2s; } .as-fab.away { opacity: 0; transform: translateX(70px); pointer-events: none; }
.as-fab:hover { transform: scale(1.06); } .as-fab.on { transform: rotate(-8deg) scale(.96); }
.as-fab svg { width: 24px; height: 24px; }
.as-panel { position: fixed; right: 20px; bottom: 84px; z-index: 61; width: min(380px, calc(100vw - 24px)); height: min(560px, calc(100vh - 120px));
  background: var(--card); border-radius: 18px; box-shadow: var(--shadow-l); display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); }
.as-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; background: var(--navy); color: #fff; }
.as-head b { display: block; } .as-head small { opacity: .75; font-size: 12px; }
.as-head .icon-btn { color: #fff; }
.as-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); }
.as-m { max-width: 88%; padding: 10px 12px; border-radius: 14px; font-size: 14px; line-height: 1.45; }
.as-m p { margin: 0 0 6px; } .as-m p:last-child { margin: 0; } .as-m ul, .as-m ol { margin: 4px 0 6px; padding-left: 18px; }
.as-m .btn { margin-top: 6px; }
.as-m.bot { background: var(--card); border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 4px; }
.as-m.me { background: var(--teal); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.as-m.sys { align-self: center; background: var(--warn-bg); color: #7A4B0B; font-size: 12.5px; }
.as-sec + .as-sec { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-2); }
.as-sugg { display: flex; flex-wrap: wrap; gap: 6px; }
.as-sugg button { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 11px; font: inherit; font-size: 13px; cursor: pointer; color: var(--navy); }
.as-sugg button:hover { border-color: var(--teal); }
.as-in { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.as-in .inp { flex: 1; }
.as-foot { padding: 0 12px 8px; text-align: center; }
.as-dots { display: inline-flex; gap: 4px; } .as-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: asd 1s infinite; }
.as-dots i:nth-child(2) { animation-delay: .15s; } .as-dots i:nth-child(3) { animation-delay: .3s; }
.as-wait { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
/* v9.3 · Claude gestionado por Opexia */
.ai-kpis .card { padding: 12px 14px; } .ai-big { font-size: 22px; font-weight: 700; margin-top: 2px; } .ai-big small { font-size: 12px; font-weight: 500; color: var(--muted); }
.ai-days { display: flex; align-items: flex-end; gap: 3px; height: 66px; margin-top: 12px; padding: 0 2px; border-bottom: 1px solid var(--line, #e5e7eb); }
.ai-days i { flex: 1; min-width: 4px; max-width: 18px; background: var(--teal, #14b8a6); border-radius: 3px 3px 0 0; opacity: .85; }
.co-sw .btn.link.sm { padding: 0 4px; }
@keyframes asd { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@media (max-width: 959px) {
  .as-fab { bottom: calc(var(--tab-h) + var(--safe-b) + 12px); right: 10px; width: 42px; height: 42px; opacity: .92; }
  .as-fab svg { width: 21px; height: 21px; }
  .as-panel { right: 8px; left: 8px; width: auto; bottom: calc(var(--tab-h) + var(--safe-b) + 66px); height: min(520px, calc(100vh - var(--tab-h) - 140px)); }
}
@media print { .as-fab, .as-panel { display: none !important; } }

/* Ayuda */
.help-toc { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.help-sec h3 { margin: 0 0 6px; } .help-sec ul, .help-sec ol { padding-left: 20px; } .help-sec li { margin: 3px 0; }
.help-sec { scroll-margin-top: 80px; }

/* Buscador de personas (cabecera) */
.psearch { position: relative; flex: 0 1 360px; display: none; align-items: center; }
.psearch .ps-in { width: 100%; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--soft); padding: 0 34px 0 36px; font: inherit; font-size: 14px; color: var(--ink); outline: none; }
.psearch .ps-in:focus { background: #fff; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(94,174,175,.18); }
.psearch .ps-ic { position: absolute; left: 11px; color: var(--muted); display: grid; pointer-events: none; }
.psearch .ps-k { position: absolute; right: 10px; font: 11px/1 inherit; border: 1px solid var(--line); border-radius: 5px; padding: 3px 6px; color: var(--muted); background: #fff; }
.psearch .ps-in:focus ~ .ps-k { display: none; }
.ps-res { position: absolute; top: 46px; left: 0; right: 0; min-width: 320px; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-l); padding: 6px; z-index: 80; max-height: 70vh; overflow: auto; }
.ps-it { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: none; padding: 8px; border-radius: 10px; cursor: pointer; font: inherit; color: inherit; }
.ps-it b { display: block; font-size: 14px; } .ps-it small { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 230px; }
.ps-it.on, .ps-it:hover { background: var(--soft); }
.ps-empty { padding: 12px; }
.ps-sec { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 10px 8px 4px; }
.ps-sec:not(:first-child) { border-top: 1px solid var(--line); margin-top: 4px; }
.ps-ico { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 9px; background: var(--soft); display: grid; place-items: center; color: var(--teal, #0f766e); }
.ps-btn { display: inline-grid; }
@media (min-width: 960px) { .psearch { display: flex; } .ps-btn { display: none; } }
@media (max-width: 959px) {
  .psearch.open { display: flex; position: absolute; left: 8px; right: 8px; top: calc(var(--safe-t) + 8px); z-index: 90; }
  .psearch.open .ps-in { background: #fff; height: 42px; }
  .psearch .ps-k { display: none; }
  .ps-res { min-width: 0; }
}

/* Ficha 360º: calendario del mes */
.p360-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.p360-cal .wd { text-align: center; font-size: 11.5px; color: var(--muted); font-weight: 700; padding: 2px 0; }
.p360-d { min-width: 0; overflow: hidden; min-height: 86px; border: 1px solid var(--line-2); border-radius: 10px; padding: 5px 6px; display: flex; flex-direction: column; gap: 2px; font-size: 11.5px; background: #fff; cursor: pointer; text-align: left; font-family: inherit; color: inherit; }
.p360-d:hover { border-color: var(--teal); }
.p360-d.out { visibility: hidden; }
.p360-d.we { background: var(--bg); }
.p360-d.hol { background: #FFF7F0; }
.p360-d.today { box-shadow: inset 0 0 0 2px var(--teal); }
.p360-d .n { font-weight: 800; font-size: 13px; display: flex; justify-content: space-between; }
.p360-d .sh { border-radius: 5px; padding: 1px 5px; color: #fff; font-weight: 700; font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p360-d .sh .ts { display: none; }
.p360-d .ab { border-radius: 5px; padding: 1px 5px; font-weight: 700; font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p360-d .ab.pend { opacity: .6; border: 1px dashed currentColor; }
.p360-d .wk { margin-top: auto; font-variant-numeric: tabular-nums; font-weight: 700; }
.p360-d .wk.ok { color: var(--ok); } .p360-d .wk.lo { color: var(--err); } .p360-d .wk.hi { color: var(--warn); }
.p360-d .hl { color: #B5651D; font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p360-leg { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.p360-leg i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
@media (max-width: 640px) {
  .p360-cal { gap: 2px; }
  .p360-d { min-height: 62px; padding: 3px; font-size: 10px; border-radius: 7px; }
  .p360-d .sh, .p360-d .ab { font-size: 9px; padding: 0 3px; }
  .p360-d .hl { display: none; }
  .p360-d .wk { font-size: 9.5px; }
  .p360-d .sh .t { display: none; } .p360-d .sh .ts { display: inline; margin-left: 2px; } .p360-d .sh b + .ts { margin-left: 2px; }
  #mx { font-size: 0; padding: 8px; } #mx svg { margin: 0; }
  /* v8.0.1 · en el móvil el turno y la ausencia son una franja de color; el detalle sale al pulsar el día */
  .p360-d { min-height: 54px; gap: 3px; }
  .p360-d .n { font-size: 12.5px; }
  .p360-d .sh, .p360-d .ab { font-size: 0 !important; height: 5px; padding: 0 !important; border-radius: 3px; }
  .p360-d .ab { background: currentColor !important; opacity: .8; }
  .p360-d .wk { font-size: 10px; } .p360-d .wk .wx { display: none; }
}
@media (max-width: 560px) {
  .list > .li.exp-li { flex-wrap: wrap; row-gap: 6px; }
  .li.exp-li .grow { flex: 1 1 calc(100% - 60px); }
  .li.exp-li .grow b { white-space: normal; }
  .li.exp-li > .num { margin-left: auto; }
}

/* ---------- Selección y edición masiva ---------- */
.tbl th.ckc, .tbl td.ckc { width: 34px; padding-right: 0; cursor: pointer; }
.ck { display: inline-block; width: 18px; height: 18px; border: 1.5px solid var(--line); border-radius: 5px; background: var(--card); vertical-align: middle; position: relative; transition: background .12s, border-color .12s; }
.ck.on { background: var(--teal); border-color: var(--teal); }
.ck.on::after { content: ''; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.ckc:hover .ck { border-color: var(--teal); }
.bulkbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; margin-bottom: 10px; border-radius: 12px; background: var(--soft); border: 1px solid var(--line); position: sticky; top: 64px; z-index: 3; }

/* ---------- Editor de texto con formato ---------- */
.rt { border: 1px solid var(--line); border-radius: 12px; background: var(--card); overflow: visible; }
.rt:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(14,147,132,.12); }
.rt-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line-2); background: var(--soft); border-radius: 12px 12px 0 0; }
.rt-b { min-width: 32px; height: 32px; padding: 0 7px; border: 0; border-radius: 8px; background: none; color: var(--ink); font: 600 14px/1 inherit; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 2px; }
.rt-b:hover { background: rgba(0,57,107,.07); }
.rt-b.on { background: rgba(14,147,132,.14); color: var(--teal); }
.rt-sel { height: 32px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); font-size: 13px; padding: 0 6px; color: var(--ink); }
.rt-sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.rt-color { position: relative; }
.rt-a { font-weight: 800; }
.rt-sw { display: block; width: 14px; height: 3px; border-radius: 2px; position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); }
.rt-color .rt-b { position: relative; }
.rt-pal { position: absolute; top: 36px; left: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, 26px); gap: 6px; padding: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow, 0 8px 24px rgba(16,42,67,.15)); }
.rt-pal[hidden] { display: none; }
.rt-pal button { width: 26px; height: 26px; border-radius: 7px; border: 1px solid rgba(0,0,0,.08); cursor: pointer; padding: 0; }
.rt-pal .rt-mk { background: #FEF08A; display: inline-flex; align-items: center; justify-content: center; color: #713F12; }
.rt-ed.inp { border: 0; border-radius: 0 0 12px 12px; box-shadow: none !important; padding: 12px 14px; outline: none; overflow-y: auto; max-height: 50vh; line-height: 1.55; white-space: normal; }
.rt-ed:empty::before { content: attr(data-ph); color: var(--muted); pointer-events: none; }
.rt-ed p, .ann-body p { margin: 0 0 .7em; }
.rt-ed h3, .ann-body h3 { font-size: 18px; margin: .6em 0 .4em; color: var(--navy, #00396B); }
.rt-ed h4, .ann-body h4 { font-size: 15px; margin: .6em 0 .3em; }
.rt-ed blockquote, .ann-body blockquote { margin: .6em 0; padding: 6px 12px; border-left: 3px solid var(--teal); background: var(--soft); border-radius: 0 8px 8px 0; }
.rt-ed ul, .rt-ed ol, .ann-body ul, .ann-body ol { margin: .3em 0 .7em; padding-left: 1.4em; }
.rt-ed a, .ann-body a { color: var(--teal); text-decoration: underline; }
.rt-ed hr, .ann-body hr { border: 0; border-top: 1px solid var(--line); margin: 1em 0; }
@media (max-width: 640px) { .rt-b { min-width: 36px; height: 36px; } .rt-sep { display: none; } }

/* ---------- Campos de firma: diseñador y firma ---------- */
.modal.xl { width: min(1180px, calc(100vw - 24px)); max-width: none; }
.modal.xl .m-body { max-height: calc(100vh - 230px); max-height: calc(100dvh - 230px); overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; overscroll-behavior: contain; }
/* v9.8.5 · El cuerpo de las ventanas grandes hace scroll (antes se cortaba: Contrato y plantilla, Cierres, Sin descanso…).
   Solo el diseñador y la firma de documentos llevan sus propios scrolls dentro. */
.modal.xl .m-body:has(.sf, .sfs) { overflow: hidden; }
.modal.xl .m-body > * { flex-shrink: 0; }
.modal.xl .m-body > .sf, .modal.xl .m-body > .sfs { flex-shrink: 1; }
.sf, .sfs { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 14px; min-height: 0; flex: 1; height: calc(100vh - 260px); }
.sfs { grid-template-columns: minmax(0, 1fr) 320px; }
.sf-tools, .sfs-side { overflow-y: auto; padding-right: 4px; display: flex; flex-direction: column; gap: 10px; }
.sf-tl { display: flex; flex-direction: column; gap: 4px; }
.sf-t { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--card); font: 500 13px/1.2 inherit; color: var(--ink); cursor: pointer; text-align: left; }
.sf-t:hover { border-color: var(--teal); }
.sf-t.on { background: var(--teal); border-color: var(--teal); color: #fff; }
.sf-t.signature { font-weight: 700; border-color: #F59E0B; background: #FFFBEB; }
.sf-t.signature.on { background: #F59E0B; color: #fff; }
.sf-dot { width: 8px; height: 8px; border-radius: 50%; background: #3B82F6; flex: none; }
.sf-props { border-bottom: 1px solid var(--line-2); padding-bottom: 10px; display: flex; flex-direction: column; gap: 8px; }
.sf-doc, .sfs-doc { overflow: auto; background: #E6EBF1; border-radius: 12px; padding: 12px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.sf-doc.placing .sf-page { cursor: crosshair; }
.sf-page { container-type: inline-size; position: relative; width: 100%; max-width: 820px; background: #fff; box-shadow: 0 2px 10px rgba(16,42,67,.15); flex: none; user-select: none; touch-action: pan-y; }
.sf-page canvas { width: 100%; height: 100%; display: block; }
.sf-layer { position: absolute; inset: 0; }
.sf-pn { position: absolute; top: 6px; right: 8px; font-size: 10px; color: var(--muted); background: rgba(255,255,255,.85); padding: 1px 6px; border-radius: 6px; pointer-events: none; }
.sf-box { position: absolute; border: 1.5px dashed #3B82F6; background: rgba(59,130,246,.12); border-radius: 4px; display: flex; align-items: center; overflow: visible; cursor: move; touch-action: none; }
.sf-box.signature { border-color: #F59E0B; background: rgba(245,158,11,.15); justify-content: center; }
.sf-box.input { border-color: #8B5CF6; background: rgba(139,92,246,.12); }
.sf-box.check { border-color: #8B5CF6; background: rgba(139,92,246,.12); justify-content: center; }
.sf-box.sel { border-style: solid; box-shadow: 0 0 0 2px rgba(14,147,132,.35); }
.sf-lbl { padding: 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #1E3A8A; font-weight: 600; pointer-events: none; display: inline-flex; align-items: center; gap: 4px; }
.sf-box.signature .sf-lbl { color: #92400E; }
.sf-del { position: absolute; top: -9px; right: -9px; width: 18px; height: 18px; border-radius: 50%; border: 0; background: var(--err); color: #fff; font: 700 12px/18px inherit; padding: 0; cursor: pointer; display: none; }
.sf-box.sel .sf-del, .sf-box:hover .sf-del { display: block; }
.sf-rs { position: absolute; right: -5px; bottom: -5px; width: 10px; height: 10px; background: var(--teal); border-radius: 2px; cursor: nwse-resize; display: none; }
.sf-box.sel .sf-rs { display: block; }
/* Firma (empleado) */
.sf-box.filled { border: 0; background: rgba(14,147,132,.08); cursor: default; }
.sf-box.filled.empty { background: rgba(217,119,6,.12); }
.sf-val, .sf-in { font-size: calc(var(--fs, 10) / var(--pw, 595) * 100cqw); }
.sf-val { color: #0B1A33; padding-left: 1px; white-space: nowrap; overflow: hidden; font-family: Helvetica, Arial, sans-serif; }
.sf-box.filled.empty .sf-val { color: #B45309; font-size: 10px !important; font-style: italic; }
.sf-box.tosign { cursor: pointer; animation: sfPulse 1.6s ease-in-out infinite; font: inherit; }
.sf-box.tosign.done { animation: none; border-style: solid; background: rgba(255,255,255,.4); }
.sf-box.tosign img { max-width: 100%; max-height: 100%; object-fit: contain; }
@keyframes sfPulse { 50% { background: rgba(245,158,11,.32); } }
.sf-in { position: absolute; border: 1.5px solid #8B5CF6; background: rgba(245,243,255,.92); border-radius: 3px; padding: 0 3px; font-family: Helvetica, Arial, sans-serif; color: #0B1A33; outline: none; }
.sf-in:focus { box-shadow: 0 0 0 2px rgba(139,92,246,.35); }
.sf-ck { position: absolute; display: flex; align-items: center; justify-content: center; border: 1.5px solid #8B5CF6; background: rgba(245,243,255,.9); border-radius: 3px; cursor: pointer; }
.sf-ck input { width: 90%; height: 90%; margin: 0; accent-color: #0E9384; cursor: pointer; }
@media (max-width: 900px) {
  .modal.xl .m-body { overflow: visible; display: block; max-height: none; }   /* v7.9.12 · un solo scroll (el del modal), sin scroll dentro del scroll */
  .sf, .sfs { grid-template-columns: 1fr; height: auto; }
  .sf-tools { max-height: 34vh; }
  .sf-tl { flex-direction: row; flex-wrap: wrap; }
  .sf-t { padding: 6px 8px; font-size: 12px; }
  .sf-doc, .sfs-doc { max-height: 60vh; padding: 8px; }
  .sfs-side { order: 2; }
}
@media (max-width: 640px) { .modal.xl { width: 100%; } }
.sfs-fill { display: flex; flex-direction: column; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); }

/* ---------- Informes (Fase 5) ---------- */
.rp-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.rp-kpis.sm { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.rp-kpis.sm .kpi { border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.rp-kpis.sm .kpi b { font-size: 18px; }
.rp-kpi { display: flex; flex-direction: column; gap: 2px; }
.rp-kpi b { font-size: 28px; line-height: 1.1; }
.rp-kpi.warn b { color: var(--warn); } .rp-kpi.bad b { color: var(--err); }
.rp-bars { display: flex; flex-direction: column; gap: 8px; }
.rp-bar { display: grid; grid-template-columns: minmax(90px, 34%) 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.rp-bl { color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-bt { height: 14px; background: var(--soft); border-radius: 4px; overflow: hidden; }
.rp-bt i { display: block; height: 100%; background: var(--teal); border-radius: 0 4px 4px 0; }
.rp-bar:hover .rp-bt i { filter: brightness(1.1); }
.rp-bar b { font-variant-numeric: tabular-nums; min-width: 40px; text-align: right; }
.rp-cols { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; align-items: end; height: 190px; padding-top: 18px; border-bottom: 1px solid var(--line); }
.rp-col { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.rp-col i { display: block; width: 72%; max-width: 34px; background: var(--teal); border-radius: 4px 4px 0 0; transition: filter .12s; }
.rp-col:hover i { filter: brightness(1.15); }
.rp-cv { font-size: 10px; color: var(--muted); margin-bottom: 2px; font-variant-numeric: tabular-nums; }
.rp-cx { position: absolute; bottom: -18px; font-size: 10px; color: var(--muted); white-space: nowrap; }
.rp-cols + * { margin-top: 24px; }
.rp-tbl td.num, .rp-tbl th { text-align: right; } .rp-tbl td:first-child, .rp-tbl th:first-child { text-align: left; }
.rp-tbl td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.rp-tbl .pos { color: var(--ok); font-weight: 600; } .rp-tbl .neg { color: var(--err); font-weight: 600; }
.rp-tbl tfoot td { border-top: 2px solid var(--line); background: var(--soft); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.rp-tbl tfoot td:first-child { text-align: left; }
.rp-tbl tr.rp-sun td { background: #FAFBFD; }
.rp-tbl td:last-child { text-align: left; }
@media (max-width: 900px) { .rp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rp-kpis.sm { grid-template-columns: repeat(3, minmax(0, 1fr)); } .rp-kpi b { font-size: 22px; } }
.rp-kpis > .card, .rp-kpis > .kpi { margin: 0 !important; }
@media (max-width: 700px) { .rp-tbl td:first-child, .rp-tbl th:first-child { position: sticky; left: 0; background: var(--card); z-index: 1; box-shadow: 1px 0 0 var(--line); max-width: 130px; } }
.sf-sec { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 8px 2px 2px; }
.sf-t.company { border-color: #C7D2FE; background: #EEF2FF; }
.sf-t.company_signature { font-weight: 700; border-color: #6366F1; background: #EEF2FF; }
.sf-t.company.on, .sf-t.company_signature.on { background: #4F46E5; border-color: #4F46E5; color: #fff; }
.sf-box.company { border-color: #6366F1; background: rgba(99,102,241,.13); }
.sf-box.company .sf-lbl { color: #3730A3; }
.sf-box.company_signature { justify-content: center; }
.rep-cur img { max-height: 70px; margin-bottom: 6px; border: 1px dashed var(--line); border-radius: 8px; padding: 4px; background: #fff; }
.rp-tbl tr.rp-wk td { border-top: 2px solid var(--line); } .rp-tbl sup { font-size: 9px; color: var(--muted); }

/* ---------- Importar ---------- */
.imp-drop svg { width: 34px; height: 34px; color: var(--teal); flex: none; }
.imp-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.imp-kpis .kpi { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.imp-kpis .kpi b { font-size: 22px; }
.imp-ul { margin: 6px 0 0; padding-left: 18px; line-height: 1.6; }
.imp-warn { display: flex; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: #FFFBEB; border: 1px solid #FDE68A; color: #78350F; }
.imp-warn summary { cursor: pointer; }
.imp-warn > div { display: flex; flex-direction: column; gap: 6px; }
.imp-prog { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line-2); padding-top: 12px; }
.imp-prog > div[data-s] { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.imp-prog > div.on { color: var(--ink); font-weight: 600; } .imp-prog > div.ok { color: var(--ink); }
.imp-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); flex: none; }
.imp-prog > div.on .imp-dot { background: var(--warn); animation: sfPulse 1s infinite; } .imp-prog > div.ok .imp-dot { background: var(--ok); }
.imp-bar { height: 8px; background: var(--soft); border-radius: 6px; overflow: hidden; margin-top: 6px; }
.imp-bar i { display: block; height: 100%; background: var(--teal); transition: width .3s; }
.imp-done { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 12px; border-radius: 12px; background: rgba(22,163,74,.08); }
.xcols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-height: 42vh; overflow: auto; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.xg { display: flex; flex-direction: column; gap: 3px; }
.xc { font-size: 13px; display: flex; gap: 6px; align-items: center; cursor: pointer; }
@media (max-width: 900px) { .imp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .xcols { grid-template-columns: 1fr; } }

/* ---------- Alta de empresa (v5.2) ---------- */
.ne-choose { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.ne-choose .card + .card { margin-top: 0; }
.ne-opt { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; border: 1px solid var(--line); }
.ne-opt h3 { margin: 0; }
.ne-opt p { margin: 0; flex: 1; }
.ne-ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: #E4F4F4; color: var(--teal-d); }
.ne-ico svg { width: 26px; height: 26px; }
.ne-mini { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ne-mini .card + .card { margin-top: 0; }
.ne-opt.sm { padding: 12px; gap: 4px; text-decoration: none; color: var(--ink); cursor: pointer; font: inherit; text-align: left; background: var(--card); }
.ne-opt.sm:hover { border-color: var(--teal); }
.ne-opt.sm svg { color: var(--teal-d); }
.wz { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 16px; align-items: start; }
.wz .card + .card { margin-top: 0; }
.wz-nav { display: flex; flex-direction: column; gap: 2px; padding: 10px; position: sticky; top: 12px; }
.wz-nav button { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 8px 10px; border-radius: 10px; font: inherit; font-size: 13.5px; color: var(--muted); cursor: pointer; text-align: left; }
.wz-nav button:hover { background: var(--soft); }
.wz-nav button.on { background: var(--soft); color: var(--ink); font-weight: 700; }
.wz-nav button small { font-size: 11px; color: var(--warn); }
.wz-n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--line-2); color: var(--muted); flex: none; }
.wz-nav button.on .wz-n { background: var(--navy); color: #fff; }
.wz-nav button.done .wz-n { background: var(--ok); color: #fff; }
.wz-nav button.later .wz-n { background: var(--warn-bg); color: var(--warn); }
.wz-body { min-height: 420px; display: flex; flex-direction: column; }
.wz-prog { height: 5px; background: var(--soft); border-radius: 4px; overflow: hidden; margin: -4px 0 14px; }
.wz-prog i { display: block; height: 100%; background: var(--teal); transition: width .3s; }
.wz-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.wz-head > svg { width: 30px; height: 30px; color: var(--teal-d); }
.wz-head h2 { margin: 0; font-size: 20px; }
#wz-step { flex: 1; }
.wz-foot { display: flex; gap: 8px; align-items: center; border-top: 1px solid var(--line-2); padding-top: 14px; margin-top: 18px; }
.wz-tbl td { padding: 4px 4px; vertical-align: middle; }
.wz-tbl .inp { padding: 7px 8px; font-size: 13.5px; }
.wz-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; }
.wz-check { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; cursor: pointer; }
.wz-check.ex { background: var(--soft); }
.wz-check small { display: block; }
.wz-list { display: flex; flex-direction: column; gap: 6px; }
.wz-list .li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 10px; }
.wz-sched { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.wz-sched b, .wz-sched small { display: block; }
.wz-sum { background: none; font: inherit; text-align: left; cursor: pointer; width: 100%; color: var(--ink); }
.wz-sum:hover { border-color: var(--teal); }
.wz-mods { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.wz-mod { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.wz-mod b, .wz-mod small { display: block; }
.wz-admin { margin-top: 12px; padding: 12px; border-radius: 12px; background: var(--soft); }
.chip.setup { background: #E4F4F4; color: var(--teal-d); }
@media (max-width: 900px) {
  .ne-choose, .ne-mini { grid-template-columns: 1fr; }
  .wz { grid-template-columns: minmax(0, 1fr); }
  .wz-nav { position: static; flex-direction: row; overflow-x: auto; padding: 6px; }
  .wz-nav button { flex: none; }
  .wz-nav button .grow, .wz-nav button small { display: none; }
  .wz-nav button.on .grow { display: inline; }
}
.wz-tbl input[data-f=name], .wz-tbl input[data-f=first_name], .wz-tbl input[data-f=last_name], .wz-tbl input[data-f=job_title], .wz-tbl input[data-f=address] { min-width: 170px; }
.wz-tbl input[data-f=id_number] { min-width: 110px; }
.wz-tbl select.inp { min-width: 112px; width: auto; }
.wz-tbl input[type=time] { min-width: 108px; }
.wz-tbl input[type=date] { min-width: 140px; }
.wz-tbl input[type=number] { width: 84px; }

/* ---------- Informes a medida (v5.3) ---------- */
.im { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; align-items: start; }
.im .card + .card { margin-top: 0; }
.im-side { position: sticky; top: 12px; }
.im-list { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.im-list button { display: flex; gap: 8px; align-items: center; border: 0; background: none; padding: 8px 10px; border-radius: 10px; font: inherit; font-size: 13.5px; color: var(--ink); cursor: pointer; text-align: left; }
.im-list button:hover { background: var(--soft); }
.im-list button.on { background: var(--soft); font-weight: 700; }
.im-list button svg { color: var(--teal-d); flex: none; }
.im-period { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 12px 0 4px; padding: 8px 12px; border-radius: 10px; background: #E4F4F4; }
.im-opts { margin-top: 10px; border: 1px solid var(--line-2); border-radius: 12px; padding: 8px 12px; }
.im-opts summary { cursor: pointer; }
.im-cols { display: flex; flex-direction: column; gap: 6px; }
.im-col { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.im-col .inp { max-width: 230px; padding: 7px 9px; min-height: 0; }
.im-col .small svg { width: 14px; height: 14px; vertical-align: -2px; }
.im-n { width: 22px; height: 22px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; }
.im-tbl th, .im-tbl td { white-space: nowrap; }
.im-tbl thead th { position: sticky; top: 0; background: var(--card); z-index: 1; }
@media (max-width: 900px) {
  .im { grid-template-columns: minmax(0, 1fr); }
  .im-side { position: static; }
  .im-col { flex-wrap: wrap; }
  .im-col .inp { max-width: none; flex: 1 1 60%; }
}
.im-col > .grow { flex: 1 1 auto; min-width: 0; }
/* Filtros de informes (v5.5) */
.im-flts { display: flex; flex-direction: column; gap: 6px; }
.im-flt { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.im-flt > b { min-width: 120px; }
.im-flt select.inp { width: auto; max-width: 200px; padding: 7px 9px; min-height: 0; }
.im-flt .inp { padding: 7px 9px; min-height: 0; }
.im-flt > .grow { flex: 1 1 200px; min-width: 0; }
.im-dd { position: relative; }
.im-dd > summary { list-style: none; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 28px; position: relative; }
.im-dd > summary::-webkit-details-marker { display: none; }
.im-dd > summary::after { content: '▾'; position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.im-dd-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); max-height: 260px; overflow: auto; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,30,60,.15); padding: 8px; display: flex; flex-direction: column; gap: 4px; min-width: 220px; }
.im-dd-list label { gap: 6px; padding: 3px 4px; border-radius: 6px; }
.im-dd-list label:hover { background: var(--soft); }
/* Ajustes de cálculo (informes) */
details.aj > summary { list-style: none; cursor: pointer; position: relative; padding-right: 28px; }
details.aj > summary::-webkit-details-marker { display: none; }
details.aj > summary::after { content: '▾'; position: absolute; right: 4px; top: 2px; color: var(--muted, #5b728a); transition: transform .2s; }
details.aj:not([open]) > summary::after { transform: rotate(-90deg); }
details.aj > summary h3 { margin: 0 0 2px; }
.aj-prices { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 6px; }
.aj-eur { display: flex; align-items: center; gap: 6px; }
.aj-eur .inp { flex: 1; min-width: 0; }
/* Eliminar empresa */
.btn.danger-txt { color: var(--err); }
.btn.danger-txt:hover { background: color-mix(in srgb, var(--err) 10%, transparent); }
.wipe-alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 10px; border: 2px solid var(--err);
  background: color-mix(in srgb, var(--err) 9%, transparent); color: var(--ink, inherit); }
.wipe-alert > svg { width: 30px; height: 30px; color: var(--err); flex: none; }
.wipe-alert p { margin: 6px 0 0; font-size: 13.5px; line-height: 1.5; }
.wipe-code { font-size: 26px; letter-spacing: 10px; text-align: center; font-weight: 700; max-width: 240px; }
/* Arrastrar archivos */
body.drag-files .drop-target { outline: 2px dashed var(--teal); outline-offset: 3px; border-radius: 10px; }
.drop-target.drop-over { outline: 2px solid var(--teal) !important; background: color-mix(in srgb, var(--teal) 10%, transparent); }
.drop-hint { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
/* Importar: separar las importaciones anteriores */
.imp-hist { margin-top: 28px; }
.imp-hist .card-head { border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 8px; }
div#prev:not(:empty) { margin-top: 16px; }   /* solo la vista previa de Importar (no las flechas «anterior») */
/* Informes › Nómina */
.nm-steps button { display: inline-flex; align-items: center; gap: 6px; }
.nm-kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.nm-kind { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; border: 1px solid var(--line); border-left: 4px solid var(--muted); background: var(--card, #fff); border-radius: 10px; padding: 8px 10px; cursor: pointer; font: inherit; color: inherit; }
.nm-kind b { font-size: 20px; line-height: 1.1; } .nm-kind span { font-size: 12.5px; font-weight: 600; } .nm-kind small { font-size: 11px; color: var(--muted); }
.nm-kind.err { border-left-color: var(--err); } .nm-kind.warn { border-left-color: #E0A100; } .nm-kind.info { border-left-color: var(--teal); }
.nm-kind.on { background: var(--soft); box-shadow: 0 0 0 2px var(--teal) inset; }
.nm-adj td { vertical-align: top; }
.nm-in { width: 74px; min-height: 30px; padding: 4px 6px; text-align: right; font-size: 13px; }
.nm-in.adj { border-color: var(--teal); background: color-mix(in srgb, var(--teal) 10%, transparent); font-weight: 700; }
.nm-adj td small { display: block; font-size: 11px; }
.im-adj { background: color-mix(in srgb, var(--teal) 12%, transparent); font-weight: 700; }
.banner { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 10px; font-size: 13.5px; margin: 10px 0; border: 1px solid var(--line); background: var(--soft); }
.banner.ok { border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: color-mix(in srgb, var(--ok) 8%, transparent); }
.banner.warn { border-color: #E0A10066; background: #E0A10012; }
.banner.err { border-color: color-mix(in srgb, var(--err) 40%, transparent); background: color-mix(in srgb, var(--err) 8%, transparent); }
.nowrap { white-space: nowrap; }
/* Cuño de la empresa */
.stamp-box { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 8px; border: 1px dashed var(--line); border-radius: 10px; }
.stamp-prev { width: 110px; height: 110px; display: grid; place-items: center; background: repeating-conic-gradient(#f1f4f7 0 25%, #fff 0 50%) 0 0 / 14px 14px; border-radius: 8px; flex: none; }
.stamp-prev img { max-width: 100%; max-height: 100%; }
.stamp-box > label { flex: 1; min-width: 200px; }
/* Editar fichaje: descansos */
.br-list { display: flex; flex-direction: column; gap: 6px; }
.br-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.br-row .inp[type=time] { width: 132px; }
.br-row select.inp { flex: 1; min-width: 140px; }
/* Asistente de fichajes */
.as-list { display: flex; flex-direction: column; }
.as-it { display: grid; grid-template-columns: minmax(200px, 1.1fr) 2fr auto; gap: 12px; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.as-it.done { opacity: .65; }
.as-it .chip { margin-top: 4px; }
.as-fix { margin-top: 4px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.as-end { width: 105px; min-height: 30px; padding: 2px 6px; }
.as-act { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
@media (max-width: 860px) { .as-it { grid-template-columns: 1fr; } .as-act { flex-direction: row; align-items: center; } }

/* ===================== v6.0 ===================== */
/* Bloqueo de la app */
.lock-ov { position: fixed; inset: 0; z-index: 9999; background: linear-gradient(160deg, var(--navy), #062947); display: flex; align-items: center; justify-content: center; padding: 16px; outline: none; }
.lock-box { background: var(--card); border-radius: 20px; padding: 26px 22px; width: 100%; max-width: 340px; text-align: center; box-shadow: var(--shadow-l); }
.lock-box h2 { margin: 6px 0 4px; }
.lock-logo { height: 34px; }
.lock-dots { display: flex; gap: 12px; justify-content: center; margin: 18px 0 6px; }
.lock-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--navy); }
.lock-dots i.on { background: var(--navy); }
.lock-err { color: var(--err); min-height: 1.3em; margin: 4px 0; }
.lock-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 10px 0; }
.lock-pad button { height: 58px; border-radius: 16px; border: 1px solid var(--line); background: var(--soft); font-size: 22px; font-weight: 600; color: var(--ink); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.lock-pad button:active { background: var(--line); }
.lock-pad .ico { width: 26px; height: 26px; }
.shake { animation: opxShake .35s; }
@keyframes opxShake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }

/* Mis horas */
.mh-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.mh-k { background: var(--soft); border-radius: var(--radius-s); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.mh-k span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.mh-k b { font-size: 22px; color: var(--ink); }
.mh-k small { font-size: 12px; color: var(--muted); }
.mh-k.ok b { color: var(--ok); } .mh-k.warn b { color: var(--warn); }
.mh-reply { background: var(--info-bg); border-radius: 8px; padding: 6px 10px; margin: 6px 0 2px; }
.mh-we td { background: #FAFBFD; }

/* Planificador por equipos */
.te-teams { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-bottom: 14px; }
.te-team { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border-top: 5px solid var(--tc, var(--teal)); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.te-free { background: var(--soft); box-shadow: none; border: 1px dashed var(--line); border-top: 5px solid #8A9BB0; }
.te-h { display: flex; align-items: center; gap: 8px; }
.te-h .tiny { background: var(--soft); border-radius: 20px; padding: 1px 8px; }
.te-seq { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; min-height: 34px; }
.te-code { --c: var(--teal); display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 8px; background: var(--c); color: #fff; font-weight: 800; font-size: 14px; cursor: pointer; }
.te-grid .te-code { min-width: 22px; height: 22px; font-size: 11.5px; border-radius: 6px; cursor: default; }
.te-arrow { color: var(--muted); font-weight: 700; }
.te-pal { display: flex; flex-wrap: wrap; gap: 4px; }
.te-add { --c: var(--teal); border: 1.5px dashed var(--c); color: var(--c); background: transparent; border-radius: 8px; padding: 3px 8px; font-weight: 700; cursor: pointer; font-size: 12.5px; }
.te-wd { display: flex; gap: 3px; align-items: center; flex-wrap: wrap; }
.te-wd button { width: 30px; height: 28px; border-radius: 7px; border: 1px solid var(--line); background: #fff; font-weight: 700; color: var(--muted); cursor: pointer; }
.te-wd button.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.te-mem { display: flex; flex-wrap: wrap; gap: 6px; min-height: 54px; padding: 8px; border-radius: 10px; background: var(--soft); border: 2px dashed transparent; transition: border-color .15s; }
.te-mem.over { border-color: var(--teal); background: #E4F4F4; }
.te-p { display: inline-flex; align-items: center; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 4px 10px 4px 4px; font-size: 13px; cursor: grab; user-select: none; }
.te-p.sel { border-color: var(--teal); background: #E4F4F4; box-shadow: 0 0 0 2px rgba(94,174,175,.35); }
.te-star { border: 0; background: none; color: #C9D3DD; font-size: 15px; cursor: pointer; padding: 0 2px; line-height: 1; }
.te-star.on { color: #E8A33D; }
.te-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-right: 6px; }
.te-grid th, .te-grid td { padding: 4px 3px; text-align: center; font-size: 12px; }
.te-grid td:first-child, .te-grid th:first-child { text-align: left; white-space: nowrap; padding-right: 10px; }
.te-grid .wk { border-left: 2px solid var(--line); }
.inp.sm { min-height: 32px; padding: 4px 8px; font-size: 13px; }
.seg.sm button { padding: 4px 9px; font-size: 12.5px; }

/* Elección de vacaciones */
.ev-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.ev-card.on { box-shadow: 0 0 0 2px var(--teal); }
.ev-today td { background: var(--warn-bg); }
.ev-turn { display: flex; gap: 12px; align-items: center; background: var(--info-bg); border-radius: 12px; padding: 12px 14px; margin: 12px 0; }
.ev-turn.go { background: var(--ok-bg); }
.ev-turn .ico { width: 28px; height: 28px; flex: none; }
.ev-legend { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); margin-bottom: 8px; }
.ev-legend .lg { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.lg.mine, .ev-d.mine { background: var(--teal) !important; color: #fff !important; }
.lg.busy1, .ev-d.busy1 { background: #FFF1D6; }
.lg.busy2, .ev-d.busy2 { background: #FFD9A8; }
.lg.clo, .ev-d.clo { background: repeating-linear-gradient(45deg, #EEF2F6, #EEF2F6 4px, #DCE4EC 4px, #DCE4EC 8px); }
.ev-cal { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.ev-m > b { display: block; margin-bottom: 6px; }
.ev-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.ev-g .h { font-size: 11px; color: var(--muted); text-align: center; font-weight: 700; }
.ev-d { position: relative; aspect-ratio: 1; border: 1px solid var(--line); background: #fff; border-radius: 7px; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer; padding: 0; }
.ev-d small { position: absolute; top: 1px; right: 3px; font-size: 9px; color: var(--warn); font-weight: 800; }
.ev-d.we { color: var(--muted); }
.ev-d.out { visibility: hidden; }
.ev-d.sel { outline: 2px solid var(--navy); outline-offset: -2px; background: #DCE8F6; }
.ev-pick { border-radius: 12px; padding: 12px 14px; margin: 12px 0; background: var(--soft); }
.ev-pick.ok { background: var(--ok-bg); } .ev-pick.warn { background: var(--warn-bg); } .ev-pick.err { background: var(--err-bg); }
.ev-pick ul { margin: 4px 0; padding-left: 18px; }
.ev-rules { display: flex; gap: 8px; align-items: flex-start; background: var(--soft); border-radius: 10px; padding: 8px 12px; margin: 8px 0 0; }
.ev-rules .ico { flex: none; margin-top: 2px; }
.ev-pk { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; margin: 2px 4px 2px 0; }
.ev-acts { display: inline-flex; gap: 2px; }
.ev-acts .icon-btn, .ev-rk .icon-btn { width: 30px; height: 30px; min-width: 30px; padding: 0; }
.ev-rk { display: inline-flex; align-items: center; gap: 2px; }
.ev-rk .icon-btn[disabled] { opacity: .25; cursor: default; }
.ev-prop { background: var(--info-bg); border-radius: 10px; padding: 10px 12px; margin: 6px 0; }
.ev-banner { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-bottom: 12px; }
.ev-banner span { flex: 1; }
.vac-banner { display: flex !important; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-bottom: 12px; }
.vac-banner > span { flex: 1; min-width: 0; }
.vac-banner > svg { flex: none; }

/* Asistente con IA */
.btn.as-ai { background: linear-gradient(135deg, #6E5BD8, #3D8FE8); color: #fff; border: 0; }
.as-ainote { margin: 6px 0; padding: 6px 10px; border-radius: 8px; background: #EFEBFC; color: #3A2E80; }
.as-ainote.ok { background: var(--ok-bg); color: #1B6B47; }
.as-ainote.cambiar { background: var(--warn-bg); color: #7A4A0A; }

/* Árabe: de derecha a izquierda */
[dir="rtl"] body { font-family: "Segoe UI", Tahoma, "Noto Sans Arabic", Arial, sans-serif; }
[dir="rtl"] .num, [dir="rtl"] input[type="time"], [dir="rtl"] input[type="date"], [dir="rtl"] .lock-dots { direction: ltr; }
[dir="rtl"] .side { left: auto; right: 0; }

/* ===================== v6.1 ===================== */
/* Aire entre bloques en todas las pantallas: tarjetas, avisos y contenedores apilados */
.content > :is(div, section, form, details, table, a.banner, ul) + :is(div, section, form, details, table, a.banner, ul):not(.page-head),
.content div:not([class]) > :is(div, section, form, details, table, a.banner, ul) + :is(div, section, form, details, table, a.banner, ul) { margin-top: 16px; }
.content > .page-head + * { margin-top: 0; }
.card + .card { margin-top: 16px; }
.banner + .card, .card + .banner, .tabs + *:not(.tabs-arrow) { margin-top: 14px; }

/* Departamentos en «Nuevo cuadrante» */
.btn.dep-chip.on { background: var(--teal); border-color: var(--teal); color: #fff; }

/* Cuadrante: rellenar columnas y filas */
.shift-grid th.col-h { cursor: pointer; border-radius: 8px; }
.shift-grid th.col-h:hover { background: #E4F4F4; color: var(--teal-d, #2E7F80); }
.shift-grid tr.row-sel td.who { background: #E4F4F4; border-radius: 10px; }
.shift-grid td.who input[type=checkbox] { width: 17px; height: 17px; flex: none; }
.bulk-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 12px; padding: 10px 14px; border-radius: 12px; background: #E4F4F4; border: 1px solid #BFE3E3; }

/* Equipos: fines de semana y horas propias */
.te-we { display: flex; flex-direction: column; gap: 10px; }
.te-we-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.te-we-row > b { width: 76px; }
.te-we-row select { max-width: 330px; }
.te-add.on { background: var(--c); color: #fff; border-style: solid; }
.te-clock { border: 0; background: none; color: #C9D3DD; cursor: pointer; padding: 0 0 0 4px; display: inline-flex; }
.te-clock.on { color: var(--teal); }
.te-times { color: var(--teal); background: #E4F4F4; border-radius: 8px; padding: 4px 8px; }

/* Asistente: selección en bloque y explicación de la confianza */
.as-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.as-ck { width: 17px; height: 17px; margin: 0 8px 0 0; vertical-align: -3px; }
.as-it.sel { box-shadow: inset 0 0 0 2px var(--teal); background: #F2FAFA; border-radius: 10px; padding-left: 10px; padding-right: 10px; }
.as-conf { margin-top: 10px; }
.as-conf summary { cursor: pointer; color: var(--teal-d, #2E7F80); font-weight: 600; }
.as-conf ul { margin: 8px 0; padding-left: 18px; }
.as-conf li { margin-bottom: 4px; }

/* ===== v6.2 · Soporte ===== */
.chip.lav { background: #EEF1F8; color: var(--lav); }
.sp-list { display: flex; flex-direction: column; gap: 8px; }
.sp-row { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-s); color: inherit; text-decoration: none; background: var(--card); }
.sp-row:hover { border-color: var(--teal-l); box-shadow: var(--shadow); }
.sp-row.unread { border-left: 4px solid var(--teal); }
.sp-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--soft); color: var(--navy); }
.sp-ic.err { background: var(--err-bg); color: var(--err); } .sp-ic.info { background: var(--info-bg); color: var(--navy-2); } .sp-ic.lav { background: #EEF1F8; color: var(--lav); }
.sp-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sp-title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-last { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); margin-right: 6px; vertical-align: middle; }
.sp-code { font-variant-numeric: tabular-nums; color: var(--navy); }
.sp-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.sp-kinds { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.sp-kind input { position: absolute; opacity: 0; pointer-events: none; }
.sp-kind span { display: flex; flex-direction: column; gap: 2px; padding: 12px; border: 1.5px solid var(--line); border-radius: var(--radius-s); cursor: pointer; height: 100%; }
.sp-kind span svg { color: var(--teal-d); }
.sp-kind small { color: var(--muted); font-size: 12px; line-height: 1.3; }
.sp-kind input:checked + span { border-color: var(--teal); background: #F1FAFA; box-shadow: 0 0 0 3px rgba(94, 174, 175, .18); }
.sp-att { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px; border: 1.5px dashed var(--line); border-radius: var(--radius-s); }
.sp-files { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.sp-files:empty { display: none; }
.sp-x { border: 0; background: none; cursor: pointer; font-size: 16px; line-height: 1; color: var(--muted); padding: 0 0 0 4px; }
.sp-head h1 { font-size: 22px; }
.sp-thread { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.sp-msg { max-width: 82%; padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); }
.sp-msg.cli { align-self: flex-end; background: #F1FAFA; border-color: #CFE9E9; border-bottom-right-radius: 4px; }
.sp-msg.opx { align-self: flex-start; border-bottom-left-radius: 4px; }
.sp-msg.int { background: var(--warn-bg); border-color: #F3D9A8; }
.sp-mh { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 4px; }
.sp-mh .tiny:last-child { margin-left: auto; }
.sp-mb { line-height: 1.5; overflow-wrap: anywhere; }
.sp-mf { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sp-mf .chip { cursor: pointer; border: 1px solid var(--line); }
.sp-sys { align-self: center; font-size: 12px; color: var(--muted); background: var(--soft); border-radius: 999px; padding: 4px 12px; display: flex; gap: 6px; align-items: center; }
.sp-reply textarea { width: 100%; }
.sp-reply #sp-ratt { margin-top: 8px; }
.sp-stars { display: flex; gap: 4px; }
.sp-stars button { border: 0; background: none; font-size: 30px; cursor: pointer; color: #C9D3DD; line-height: 1; }
.sp-stars button.on, .sp-stars button:hover { color: #F2B33D; }
@media (max-width: 640px) {
  .sp-row { grid-template-columns: 34px 1fr; }
  .sp-ic { width: 34px; height: 34px; }
  .sp-side { grid-column: 2; flex-direction: row; align-items: center; flex-wrap: wrap; justify-content: flex-start; }
  .sp-kinds { grid-template-columns: 1fr 1fr; }
  .sp-msg { max-width: 94%; }
}

/* =====================================================================
   v6.3 · Manual de instrucciones a pantalla completa
   ===================================================================== */
body.mv-open { overflow: hidden; }
.mv { position: fixed; inset: 0; z-index: 300; overflow-x: hidden; background: var(--bg); display: flex; flex-direction: column; animation: mvIn .16s ease; }
@keyframes mvIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.mv-top { display: flex; align-items: center; gap: 14px; background: linear-gradient(100deg, #002B4F 0%, var(--navy) 55%, var(--navy-2) 100%); color: #fff;
  padding: 12px 22px; padding-top: calc(12px + var(--safe-t)); box-shadow: 0 2px 12px rgba(0, 30, 60, .25); flex: none; }
.mv-top .spacer { flex: 1; }
.mv-logo { height: 30px; }
.mv-tit { display: flex; flex-direction: column; line-height: 1.2; padding-left: 14px; border-left: 1px solid rgba(255, 255, 255, .25); }
.mv-tit b { font-size: 16px; } .mv-tit span { font-size: 12px; color: var(--teal-l); }
.mv-seg { display: flex; background: rgba(255, 255, 255, .12); border-radius: 999px; padding: 3px; }
.mv-seg button, .mv-seg-m button { border: 0; background: none; color: #D9E7F2; font-size: 13px; font-weight: 600; padding: 6px 13px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.mv-seg button.on { background: #fff; color: var(--navy); }
.mv-seg-m { display: none; }
.mv-btn { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 10px; background: var(--teal); color: #fff; font-weight: 600; font-size: 14px; padding: 9px 16px; cursor: pointer; }
.mv-btn:hover { background: var(--teal-d); } .mv-btn:disabled { opacity: .7; cursor: progress; }
.mv-x { border: 0; background: rgba(255, 255, 255, .14); color: #fff; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; cursor: pointer; flex: none; }
.mv-x:hover { background: rgba(255, 255, 255, .24); }
.mv-body { flex: 1; display: flex; min-height: 0; }
.mv-ind { width: 290px; flex: none; overflow: auto; background: #fff; border-right: 1px solid var(--line); padding: 14px 10px 30px; }
.mv-ind-c { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 16px 10px 6px; }
.mv-ind-c:first-child { padding-top: 4px; }
.mv-ind a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px; color: #334E68; text-decoration: none; font-size: 13.5px; line-height: 1.25; }
.mv-ind a .n { font-size: 11px; font-weight: 700; color: var(--teal-d); min-width: 18px; font-variant-numeric: tabular-nums; }
.mv-ind a .t { flex: 1; min-width: 0; }
.mv-ind a:hover { background: var(--soft); } .mv-ind a.on { background: #E6F4F4; color: var(--navy); font-weight: 600; }
.mv-tag { font-style: normal; font-size: 10px; font-weight: 700; border-radius: 999px; padding: 2px 7px; }
.mv-tag.opx { color: #5E4690; background: #F1ECF8; }
.mv-ind-m { display: none; }
.mv-cont { flex: 1; overflow: auto; padding: 28px clamp(16px, 4vw, 56px) 60px; }
.mv-portada { max-width: 1000px; margin: 0 auto 26px; border-radius: 22px; overflow: hidden; color: #fff; box-shadow: 0 18px 40px rgba(0, 57, 104, .22);
  background: radial-gradient(circle at 88% 18%, rgba(94, 174, 175, .38), transparent 45%), radial-gradient(circle at 10% 110%, rgba(100, 128, 176, .35), transparent 40%), linear-gradient(120deg, #002B4F, var(--navy) 60%, var(--navy-2)); }
.mv-portada-in { padding: 40px 44px 30px; }
.mv-portada-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mv-kicker { font-size: 12px; font-weight: 700; letter-spacing: .22em; color: var(--teal-l); }
.mv-co { background: #fff; border-radius: 12px; padding: 6px 10px; display: inline-flex; }
.mv-co img { height: 34px; max-width: 150px; object-fit: contain; }
.mv-portada h1 { color: #fff; font-size: clamp(30px, 4.4vw, 46px); margin: 14px 0 6px; line-height: 1.05; letter-spacing: -.02em; }
.mv-ver { display: inline-block; font-size: 14px; font-weight: 700; color: var(--navy); background: var(--teal-l); border-radius: 999px; padding: 4px 12px; margin-bottom: 14px; }
.mv-portada p { max-width: 640px; color: #D9E7F2; font-size: 16px; line-height: 1.5; margin: 0; }
.mv-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.mv-meta span { display: inline-flex; align-items: center; gap: 7px; background: rgba(255, 255, 255, .12); border-radius: 999px; padding: 6px 12px; font-size: 13px; }
.mv-pilares { display: grid; grid-template-columns: repeat(3, 1fr); background: rgba(0, 0, 0, .18); }
.mv-pilares div { padding: 14px 20px; border-left: 1px solid rgba(255, 255, 255, .1); display: flex; flex-direction: column; }
.mv-pilares div:first-child { border-left: 0; }
.mv-pilares b { font-size: 14px; } .mv-pilares span { font-size: 12px; color: var(--teal-l); }
.mv-toc { max-width: 1000px; margin: 0 auto 30px; }
.mv-toc h2 { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.mv-toc-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.mv-toc-c { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
.mv-toc-c:hover { border-color: var(--teal); transform: translateY(-1px); }
.mv-toc-n { width: 34px; height: 34px; border-radius: 10px; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.mv-toc-c b { display: block; font-size: 15px; color: var(--navy); }
.mv-toc-c small { display: block; color: var(--muted); font-size: 13px; line-height: 1.4; margin-top: 2px; }
.mv-toc-c em { display: block; font-style: normal; font-size: 12px; color: var(--teal-d); font-weight: 600; margin-top: 6px; }
.mv-cap { max-width: 1000px; margin: 40px auto 18px; padding: 0 4px; }
.mv-cap-n { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--teal-d); }
.mv-cap h2 { display: flex; align-items: center; gap: 10px; font-size: 28px; color: var(--navy); margin: 4px 0 4px; letter-spacing: -.02em; }
.mv-cap h2 svg { width: 26px; height: 26px; color: var(--teal-d); }
.mv-cap p { margin: 0; color: var(--muted); font-size: 15px; }
.mv-sec { max-width: 1000px; margin: 0 auto 20px; background: #fff; border: 1px solid #E4EBF2; border-radius: 18px; padding: 26px 32px; box-shadow: 0 4px 16px rgba(16, 42, 67, .05); scroll-margin-top: 12px; transition: box-shadow .4s; }
.mv-sec.mv-mark { box-shadow: 0 0 0 3px var(--teal), 0 4px 16px rgba(16, 42, 67, .08); }
.mv-sec-h { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line-2); margin-bottom: 14px; }
.mv-num { font-weight: 800; font-size: 14px; color: var(--teal-d); font-variant-numeric: tabular-nums; }
.mv-ic { width: 40px; height: 40px; border-radius: 12px; background: #E6F4F4; color: var(--navy); display: grid; place-items: center; flex: none; }
.mv-sec-h h3 { font-size: 22px; color: var(--navy); margin: 0; letter-spacing: -.015em; }
.mv-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.mv-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; background: var(--soft); color: #334E68; border-radius: 10px; padding: 5px 10px; line-height: 1.35; }
.mv-chip b { white-space: nowrap; }
.mv-chip.mod { background: #E6F4F4; color: #1E6B6C; font-weight: 600; } .mv-chip.opx { background: #F1ECF8; color: #5E4690; font-weight: 600; }
.mv-txt p, .mv-txt li { font-size: 15px; line-height: 1.6; color: #243B53; }
.mv-txt ul, .mv-txt ol { padding-left: 22px; } .mv-txt li { margin: 4px 0; } .mv-txt li::marker { color: var(--teal-d); font-weight: 700; }
.mv-txt h4.md-h { font-size: 16.5px; color: var(--navy); margin: 22px 0 6px; display: flex; align-items: center; gap: 8px; border-radius: 8px; transition: background .4s, box-shadow .4s; }
.mv-txt h4.md-h::before { content: ''; width: 4px; height: 16px; border-radius: 2px; background: var(--teal); flex: none; }
.mv-txt h4.md-h.mv-mark { background: #E3F4F4; box-shadow: 0 0 0 6px #E3F4F4; }
.mv-figs { display: grid; gap: 18px; margin: 18px 0 4px; }
.mv-figs.m { grid-template-columns: repeat(auto-fill, minmax(200px, 240px)); }
.mv-fig { margin: 0; }
.mv-fig img { width: 100%; height: auto; display: block; border-radius: 12px; border: 1px solid #DCE4EC; box-shadow: 0 8px 22px rgba(16, 42, 67, .10); cursor: zoom-in; background: #fff; }
.mv-fig.m img { border-radius: 22px; border: 6px solid #102A43; }
.mv-fig figcaption { font-size: 12.5px; color: var(--muted); margin-top: 8px; display: flex; align-items: center; gap: 6px; }
.mv-fig figcaption::before { content: ''; width: 14px; height: 2px; background: var(--teal); flex: none; }
.mv-pie { max-width: 1000px; margin: 30px auto 0; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; font-size: 13px; color: var(--muted); }
.mv-pie img { height: 26px; }
.mv-zoom { position: fixed; inset: 0; z-index: 330; background: rgba(0, 20, 40, .85); display: grid; place-items: center; padding: 24px; cursor: zoom-out; }
.mv-zoom img { max-width: 100%; max-height: 100%; border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, .4); }
.mv-zoom button { position: absolute; top: 16px; right: 16px; border: 0; background: rgba(255, 255, 255, .15); color: #fff; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; cursor: pointer; }
body.mv-open .as-fab { z-index: 310; } body.mv-open .as-panel { z-index: 320; }

/* tablas, notas y apartados del Markdown (manual, Ayuda y asistente) */
.md-tw { overflow-x: auto; margin: 12px 0; }
.md-tb { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; border: 1px solid #E4EBF2; border-radius: 12px; overflow: hidden; }
.md-tb th { background: var(--navy); color: #fff; text-align: left; padding: 10px 12px; font-weight: 600; }
.md-tb td { padding: 10px 12px; border-top: 1px solid var(--line-2); vertical-align: top; line-height: 1.5; color: #243B53; }
.md-tb tr:nth-child(even) td { background: #F9FBFD; }
.md-tb td:first-child { color: var(--navy); }
.md-note { display: flex; gap: 10px; background: #FFF7E6; border-left: 4px solid #F2B134; border-radius: 10px; padding: 11px 14px; margin: 12px 0; font-size: 14px; color: #7A4E00; line-height: 1.5; }
.md-note::before { content: 'i'; flex: none; width: 18px; height: 18px; border-radius: 50%; background: #F2B134; color: #fff; font-weight: 800; font-size: 12px; display: grid; place-items: center; margin-top: 1px; font-style: italic; font-family: Georgia, serif; }
.help-sec h4.md-h, .as-m h4.md-h { font-size: 14.5px; color: var(--navy); margin: 12px 0 4px; }

@media (max-width: 760px) {
  .mv-ind { display: none; }
  .mv-ind-m { display: block; margin: 10px 16px 0; width: calc(100% - 32px); }
  .mv-body { flex-direction: column; }
  .mv-top { gap: 8px; padding: calc(10px + var(--safe-t)) 12px 10px; }
  .mv-logo { height: 24px; } .mv-tit, .mv-seg { display: none; }
  .mv-seg-m { display: flex; gap: 6px; overflow-x: auto; padding: 8px 16px 0; scrollbar-width: none; flex: none; }
  .mv-seg-m button { background: #fff; border: 1px solid var(--line); color: var(--muted); }
  .mv-seg-m button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
  .mv-btn span { display: none; } .mv-btn { padding: 9px; }
  .mv-cont { padding: 16px 16px 50px; }
  .mv-portada-in { padding: 26px 22px 22px; } .mv-pilares { grid-template-columns: 1fr; }
  .mv-pilares div { border-left: 0; border-top: 1px solid rgba(255, 255, 255, .1); }
  .mv-sec { padding: 18px 16px; border-radius: 14px; } .mv-sec-h h3 { font-size: 18px; }
  .mv-cap h2 { font-size: 23px; }
  .mv-figs.m { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .mv-fig.m img { border-width: 4px; border-radius: 16px; }
  .md-tb thead { display: none; } .md-tb, .md-tb tbody, .md-tb tr, .md-tb td { display: block; width: 100%; }
  .md-tb tr { border-top: 1px solid var(--line); padding: 8px 0; } .md-tb tr:first-child { border-top: 0; }
  .md-tb td { border: 0; padding: 3px 12px; background: none !important; }
  .md-tb td::before { content: attr(data-l); display: block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
}

/* PDF (impresión): solo el manual, portada a página completa, apartados sin cortar las capturas */
@media print {
  body.mv-printing > *:not(#manual) { display: none !important; }
  body.mv-printing { background: #fff; overflow: visible; }
  body.mv-printing .mv { position: static; display: block; background: #fff; animation: none; }
  body.mv-printing .mv-top, body.mv-printing .mv-ind, body.mv-printing .mv-ind-m, body.mv-printing .mv-seg-m, body.mv-printing .mv-toc-c em { display: none !important; }
  body.mv-printing .mv-body { display: block; } body.mv-printing .mv-cont { overflow: visible; padding: 0; }
  body.mv-printing .mv-portada { box-shadow: none; border-radius: 0; margin: 0; min-height: 96vh; display: flex; flex-direction: column; justify-content: space-between; break-after: page;
    -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.mv-printing .mv-portada-in { padding: 60px 50px 40px; } body.mv-printing .mv-portada h1 { font-size: 52px; margin-top: 200px; }
  body.mv-printing .mv-toc { break-after: page; padding-top: 10px; }
  body.mv-printing .mv-cap { break-before: page; margin-top: 0; }
  body.mv-printing .mv-sec { box-shadow: none; border-color: #DCE4EC; break-inside: auto; padding: 18px 22px; }
  body.mv-printing .mv-sec-h, body.mv-printing .mv-fig, body.mv-printing .md-tb tr { break-inside: avoid; }
  body.mv-printing .mv-fig img { box-shadow: none; max-height: 120mm; width: auto; max-width: 100%; }
  body.mv-printing .mv-figs.m { grid-template-columns: repeat(3, 52mm); }
  body.mv-printing * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  @page { margin: 14mm 12mm; }
}

/* Ayuda: acceso al manual */
.hp-hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; align-items: center; border-radius: 18px; padding: 24px 26px; margin-bottom: 14px; color: #fff;
  background: radial-gradient(circle at 90% 10%, rgba(94, 174, 175, .4), transparent 45%), linear-gradient(120deg, #002B4F, var(--navy) 60%, var(--navy-2)); box-shadow: 0 10px 30px rgba(0, 57, 104, .18); }
.hp-k { font-size: 11.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--teal-l); }
.hp-hero h2 { color: #fff; font-size: 21px; line-height: 1.2; margin: 6px 0 8px; }
.hp-hero p { margin: 0; color: #D9E7F2; font-size: 14px; }
.hp-vers { display: flex; flex-direction: column; gap: 8px; }
.hp-v { display: flex; align-items: center; gap: 12px; text-align: left; border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .08); color: #fff; border-radius: 12px; padding: 10px 12px; cursor: pointer; }
.hp-v:hover { background: rgba(255, 255, 255, .16); }
.hp-v.main { background: #fff; color: var(--navy); border-color: #fff; }
.hp-v span { flex: 1; min-width: 0; } .hp-v b { display: block; font-size: 14.5px; } .hp-v small { display: block; font-size: 12px; opacity: .8; }
@media (max-width: 700px) { .hp-hero { grid-template-columns: 1fr; padding: 20px 18px; } }

/* v6.3 · Asistente: botones de acción, manual y valoración */
.as-head { gap: 10px; }
.as-av { width: 32px; height: 32px; border-radius: 10px; background: rgba(255, 255, 255, .14); display: grid; place-items: center; flex: none; }
.as-av svg { width: 18px; height: 18px; color: var(--teal-l); }
.as-ht { flex: 1; min-width: 0; }
.as-bts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.as-bts button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--soft); color: var(--navy); border-radius: 10px; padding: 6px 10px; font-size: 13px; font-weight: 600; cursor: pointer; }
.as-bts button:hover { border-color: var(--teal); background: #E6F4F4; }
.as-man-t { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--teal-d); margin-bottom: 6px; }
.as-mark { display: flex; align-items: center; gap: 6px; background: #E6F4F4; color: #1E6B6C; border-radius: 8px; padding: 5px 8px; font-size: 12.5px; font-weight: 600; margin-bottom: 8px; }
.as-more { color: var(--muted); }
.as-m .md-tb { font-size: 12.5px; } .as-m .md-tb th, .as-m .md-tb td { padding: 6px 8px; }
.as-m .md-note { font-size: 12.5px; padding: 8px 10px; }
.as-val { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 12.5px; color: var(--muted); }
.as-val button[data-u] { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 2px 8px; font-size: 14px; cursor: pointer; line-height: 1.4; }
.as-val button[data-u]:hover { border-color: var(--teal); background: #E6F4F4; }
.as-val-f { display: flex; gap: 6px; width: 100%; } .as-val-f .inp { flex: 1; height: 32px; font-size: 13px; padding: 4px 8px; }
.as-val-t { border: 0; background: none; color: var(--lav); font-size: 12.5px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; padding: 0; }
.as-m .as-sugg { margin-top: 10px; }

/* Registro del asistente (Opexia) */
.ar-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 12px; }
.ar-kpis .card { margin: 0; padding: 12px 14px; } .ar-kpis b { display: block; font-size: 24px; color: var(--navy); } .ar-kpis span { font-size: 12.5px; color: var(--muted); }
.ar-kpis .ok b { color: var(--ok); } .ar-kpis .err b { color: var(--err); } .ar-kpis .warn b { color: var(--warn); }
.ar-txt { max-width: 420px; } .ar-txt small { display: block; color: var(--muted); }
tr.ar-done td { opacity: .55; }
@media (max-width: 959px) {
  .as-panel { top: calc(var(--top-h) + var(--safe-t) + 8px); height: auto; }
  body.mv-open .as-panel { top: calc(var(--safe-t) + 60px); bottom: calc(var(--safe-b) + 74px); }
  body.mv-open .as-fab { bottom: calc(var(--safe-b) + 14px); }
}

/* Manual: imagotipo de Opexia con «Módulo RRHH» */
.mv-brand { display: flex; flex-direction: column; align-items: center; gap: 1px; line-height: 1; }
.mv-brand .mv-logo { height: 34px; width: auto; }
.mv-brand span { font-size: 9.5px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--teal-l); }
.mv-portada-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.mv-portada-brand img { height: 64px; width: auto; margin-left: -4px; }
.mv-portada-brand .mv-kicker { padding-left: 2px; }
@media (max-width: 760px) { .mv-brand .mv-logo { height: 28px; } .mv-brand span { font-size: 8.5px; } .mv-portada-brand img { height: 50px; } }
body.mv-printing .mv-portada-brand img { height: 90px; }
.mv-portada-brand .mv-kicker { text-transform: uppercase; }

/* ---------- Vídeo de presentación (primera vez que se entra) ---------- */
html.iv-lock, html.iv-lock body { overflow: hidden; }
.iv-ov { position: fixed; inset: 0; z-index: 900; background: radial-gradient(120% 90% at 50% 0%, #0b4a7d 0%, #04213b 70%); display: flex; flex-direction: column; color: #fff;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px calc(env(safe-area-inset-bottom, 0px) + 14px); animation: ivIn .25s ease; }
.iv-ov.out { opacity: 0; transition: opacity .2s; }
@keyframes ivIn { from { opacity: 0; } to { opacity: 1; } }
.iv-top { display: flex; align-items: center; gap: 12px; max-width: 1280px; width: 100%; margin: 0 auto 12px; }
.iv-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.iv-t b { font-size: 17px; font-weight: 700; }
.iv-t small { font-size: 13px; opacity: .75; }
.iv-x { flex: none; display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.3); border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.iv-x:hover { background: rgba(255,255,255,.2); }
.iv-box { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; container-type: size; }
.iv-play[hidden], .iv-end[hidden] { display: none !important; }
.iv-box video { display: block; max-width: 100%; max-height: 100%; border-radius: 16px; background: #000; box-shadow: 0 24px 60px rgba(0,0,0,.45); }
.iv-h .iv-box video { width: min(1280px, 100cqw, 100cqh * 16 / 9); height: auto; aspect-ratio: 16 / 9; }
.iv-v .iv-box video { width: min(100cqw, 100cqh * 9 / 16); height: auto; aspect-ratio: 9 / 16; }
.iv-play { position: absolute; inset: 0; margin: auto; width: max-content; height: max-content; display: flex; flex-direction: column; align-items: center; gap: 10px; background: none; border: 0; color: #fff; font: inherit; font-weight: 700; font-size: 16px; cursor: pointer; }
.iv-play .ic, .iv-play svg { width: 34px; height: 34px; padding: 22px; box-sizing: content-box; border-radius: 50%; background: #5EAEAF; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.iv-end { position: absolute; left: 0; right: 0; bottom: 18%; display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.iv-end .btn { box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.iv-err { max-width: 420px; text-align: center; opacity: .85; } .iv-err p { margin: 0 0 14px; } .iv-err .btn { display: inline-flex; gap: 6px; }
@media (max-width: 640px) { .iv-ov { padding-left: 10px; padding-right: 10px; } .iv-t small { display: none; } .iv-box video { border-radius: 12px; } }
.iv-again { background: #fff; color: var(--navy); }
.iv-again:hover { background: #eef4f8; }
.hp-video { width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; margin-bottom: 14px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; font: inherit; }
.hp-video:hover { border-color: var(--teal); }
.hp-video > svg:first-child, .hp-video > .ic:first-child { width: 20px; height: 20px; padding: 11px; box-sizing: content-box; border-radius: 50%; background: var(--teal); color: #fff; fill: currentColor; flex: none; }
.hp-video span { flex: 1; min-width: 0; } .hp-video b { display: block; font-size: 15px; color: var(--navy); } .hp-video small { display: block; font-size: 12.5px; color: var(--muted); }

/* Pantallas de acceso en ordenador: panel de marca a la izquierda y formulario a la derecha (como OPEXIA Portal) */
.auth-brand { display: none; }
@media (min-width: 960px) {
  .auth { display: grid; grid-template-columns: 1.1fr 1fr; place-items: stretch; padding: 0; background: #fff; }
  .auth-brand { display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding: 48px 56px; color: #fff; position: relative; overflow: hidden;
    background: linear-gradient(150deg, var(--navy) 0%, #163F73 60%, #163F59 100%); }
  .auth-brand::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%; border: 60px solid rgba(94,174,175,.12); }
  .auth-brand img { height: 52px; align-self: flex-start; }
  .auth-brand h1 { color: #fff; font-size: 34px; line-height: 1.15; max-width: 460px; margin: 0; text-align: left; }
  .auth-brand p { color: rgba(255,255,255,.78); max-width: 440px; line-height: 1.6; font-size: 15px; margin: 14px 0 0; }
  .auth-brand .foot { font-size: 12px; color: rgba(255,255,255,.55); position: relative; z-index: 1; }
  .auth > .box { align-self: center; justify-self: center; width: min(400px, calc(100% - 48px)); max-width: 400px; margin: 40px 24px; padding: 0; border-radius: 0; box-shadow: none; background: transparent; }
  .auth > .box .logo-top { display: none; }
  .auth > .box h1 { text-align: left; font-size: 24px; }
  .auth > .box p.c { text-align: left; }
}
/* Barra inferior: sin rayita sobre el botón central y burbuja de pendientes */
.tabbar a.fab.on::before { display: none; }
.tabbar a.fab.on > span:last-child { color: var(--navy); }
.tabbar .tb-ic { position: relative; display: inline-flex; }
.tabbar .tb-badge { position: absolute; top: -7px; left: 13px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--err); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 13px; text-align: center; border: 2px solid #fff; box-sizing: border-box; }
.tabbar .tb-badge.hidden { display: none; }

/* Fechas y horas en iPhone: Safari las pinta centradas, sin altura si están vacías y más anchas que el campo */
input.inp[type="date"], input.inp[type="time"], input.inp[type="datetime-local"], input.inp[type="month"], input.inp[type="week"] {
  -webkit-appearance: none; appearance: none; display: block; box-sizing: border-box; width: 100%; min-width: 0; max-width: 100%;
  height: 44px; line-height: 22px; text-align: left; background-color: #fff; color: var(--ink); }
input.inp.sm[type="date"], input.inp.sm[type="time"], input.inp.sm[type="datetime-local"], input.inp.sm[type="month"] { height: 34px; line-height: 20px; }
input.inp[type="date"]::-webkit-date-and-time-value, input.inp[type="time"]::-webkit-date-and-time-value,
input.inp[type="datetime-local"]::-webkit-date-and-time-value, input.inp[type="month"]::-webkit-date-and-time-value { text-align: left; margin: 0; min-height: 1.2em; }
input.inp[type="date"]::-webkit-datetime-edit, input.inp[type="time"]::-webkit-datetime-edit, input.inp[type="datetime-local"]::-webkit-datetime-edit { padding: 0; }
.f, .form-grid > *, label.f { min-width: 0; }
[dir="rtl"] input.inp[type="date"], [dir="rtl"] input.inp[type="time"] { text-align: right; }
.iv-thumb { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0; border-radius: 14px; overflow: hidden; cursor: pointer;
  background: radial-gradient(120% 90% at 50% 0%, #0b4a7d 0%, #04213b 70%); }
.iv-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .85; }
.iv-thumb > span { position: absolute; inset: 0; display: grid; place-items: center; }
.iv-thumb > span svg { width: 26px; height: 26px; padding: 16px; box-sizing: content-box; border-radius: 50%; background: #5EAEAF; color: #fff; fill: currentColor; box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.av svg { width: 100%; height: 100%; display: block; }
.av.xl { width: 96px; height: 96px; font-size: 34px; }
.av.xs { width: 30px; height: 30px; font-size: 11.5px; }
/* Mi perfil arriba a la derecha (como OPEXIA Portal) */
.me-btn { border: 2px solid rgba(255,255,255,.45); border-radius: 50%; padding: 0; background: none; cursor: pointer; display: grid; place-items: center; flex: none; text-decoration: none; }
@media (min-width: 960px) { .me-btn { border-color: var(--line); } }
.me-btn .av { width: 34px; height: 34px; font-size: 12.5px; }
/* Selector de foto / avatar */
.avp-prev { display: flex; justify-content: center; margin: 0 0 12px; }
.avp-ilus { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; max-height: 300px; overflow: auto; padding: 2px; }
.avp-ilus button { border: 2px solid transparent; background: #fff; border-radius: 12px; padding: 6px 4px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); font: inherit; font-size: 11px; }
.avp-ilus button svg { width: 58px; height: 58px; border-radius: 50%; }
.avp-ilus button.on { border-color: var(--navy); color: var(--ink); font-weight: 600; }
.avp-col { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 12px; }
.avp-col button { width: 30px; height: 30px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.avp-col button.on { box-shadow: 0 0 0 2px var(--navy); }
.avp-crop { position: relative; width: 260px; height: 260px; margin: 0 auto; border-radius: 12px; overflow: hidden; touch-action: none; background: #eef2f5; }
.avp-crop canvas { width: 260px; height: 260px; display: block; cursor: grab; }
.avp-crop .mask { position: absolute; inset: 0; pointer-events: none; border-radius: 50%; box-shadow: 0 0 0 200px rgba(16,42,67,.45); }
.me-menu { position: fixed; z-index: 260; width: 280px; max-width: calc(100vw - 16px); background: #fff; border-radius: 14px; box-shadow: 0 16px 40px rgba(16,42,67,.22); border: 1px solid var(--line); padding: 8px; display: flex; flex-direction: column; }
.me-menu .me-h { display: flex; gap: 12px; align-items: center; padding: 8px 8px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.me-menu .me-h div { min-width: 0; display: flex; flex-direction: column; }
.me-menu .me-h b { font-size: 14.5px; } .me-menu .me-h small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-menu button, .me-menu a { display: flex; align-items: center; gap: 10px; padding: 10px; border: 0; background: none; border-radius: 9px; font: inherit; font-size: 14px; color: var(--ink); text-decoration: none; cursor: pointer; text-align: left; }
.me-menu button:hover, .me-menu a:hover { background: var(--soft); }
.me-edit { position: relative; border: 0; padding: 0; background: none; cursor: pointer; border-radius: 50%; flex: none; }
.me-edit > span:last-child { position: absolute; right: -2px; bottom: -2px; width: 24px; height: 24px; border-radius: 50%; background: var(--teal); color: #fff; display: grid; place-items: center; border: 2px solid #fff; }
.me-edit > span:last-child svg { width: 13px; height: 13px; }

/* Filtros de Empleados */
.pf-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.pf-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1.2fr) 34px; gap: 6px; align-items: center; }
@media (max-width: 640px) { .pf-row { grid-template-columns: 1fr 1fr 34px; } .pf-row > :nth-child(3) { grid-column: 1 / 3; } }
.chip-x { border: 0; background: none; padding: 0 0 0 2px; cursor: pointer; color: inherit; display: inline-flex; vertical-align: middle; }
.chip-x svg { width: 12px; height: 12px; }
.banner.info { background: #EAF2FA; border-color: #CFE0F2; }
.banner .grow { flex: 1 1 220px; min-width: 0; }
.avp-rules { display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: #FFF7E8; border: 1px solid #F5DDB0; font-size: 12px; line-height: 1.45; color: #5B4520; }
.avp-rules svg { flex: none; width: 15px; height: 15px; margin-top: 1px; }
.avp-crop[hidden], #avZoomRow[hidden] { display: none !important; }

/* v6.4.2 · Cabecera en móvil: que nunca desborde la pantalla */
@media (max-width: 600px) {
  .topbar { gap: 6px; padding-left: 10px; padding-right: 10px; }
  .topbar > * { flex-shrink: 0; }
  .topbar .spacer { flex: 1 1 0; min-width: 0; }
  .topbar .logo { height: 26px; }
  .topbar #coExit { display: none; }
  .topbar .viewing-chip { flex-shrink: 1; min-width: 0; max-width: 34vw; padding: 6px 10px; }
  .topbar .icon-btn { width: 38px; height: 38px; }
}
@media (max-width: 380px) { .topbar .viewing-chip span { display: none; } }
html, body { overflow-x: clip; }
/* La burbuja del asistente no tapa los últimos botones de cada pantalla */
.content::after { content: ''; display: block; height: 72px; }
/* v6.5 · pequeños ajustes */
.g-who small.g-st { white-space: normal; line-height: 1.3; }
.as-end { display: inline-block; width: 112px; min-height: 32px; padding: 2px 8px; vertical-align: middle; }
.inp.inp-err { border-color: var(--err) !important; box-shadow: 0 0 0 3px rgba(224, 96, 90, .18); }
input[type=file].inp { padding: 8px; cursor: pointer; }
input[type=file]::file-selector-button { border: 1px solid var(--line); background: var(--soft, #EEF4F7); border-radius: 8px; padding: 8px 14px; margin-right: 10px; font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; }
input[type=file]::file-selector-button:hover { border-color: var(--teal, #2F8F90); }

/* v6.5 · cuadrante en móvil y pestañas de Configuración */
.shift-grid .nm-ini { display: none; }
@media (max-width: 600px) {
  .shift-grid .nm-full { display: none; }
  .shift-grid .nm-ini { display: inline; }
  .shift-grid td.who .av { display: none; }
  .shift-grid th.who, .shift-grid td.who { min-width: 0; max-width: 74px; padding-left: 4px; padding-right: 4px; }
  .shift-grid th.who label { font-size: 0; } .shift-grid th.who input { font-size: 14px; }
  .shift-grid td.c { min-width: 62px; }
  /* v9.1.4 · en el móvil, los apartados de Configuración en un desplegable */
  .cfg-tabs, .tabs-wrap:has(.cfg-tabs) { display: none !important; }
  .cfg-sel { display: block !important; margin: 0 0 14px; }
}
.cfg-sel { display: none; }
/* v9.1.4 · pestañas con texto corto en el móvil */
.t-s { display: none; }
@media (max-width: 600px) { .t-l { display: none; } .t-s { display: inline; } }
.cfg-sel select { width: 100%; font-weight: 600; }
.wk-nav #wk { min-width: 190px; }
@media (max-width: 600px) { .wk-nav { gap: 4px; } .wk-nav #wk { min-width: 0; font-size: 14px; } .wk-nav #tw { padding: 6px 8px; } }

/* v6.5 · iPhone: nada más ancho que la pantalla (las rejillas no crecen con fechas/horas) */
.modal { min-width: 0; }
.modal .m-body, .modal form, .card, .content { min-width: 0; max-width: 100%; }
.modal { overflow-x: hidden; }
.modal label.f, .modal .f { max-width: 100%; }
@supports (-webkit-touch-callout: none) {
  input.inp[type="date"], input.inp[type="time"], input.inp[type="datetime-local"], input.inp[type="month"] { width: 100% !important; min-width: 0 !important; max-width: 100% !important; }
}
/* iPhone: con letra < 16 px Safari amplía la página al tocar un campo y se queda más ancha que la pantalla */
@supports (-webkit-touch-callout: none) {
  input, select, textarea, .inp, .inp.sm { font-size: 16px !important; }
}
input.inp, select.inp, textarea.inp { box-sizing: border-box; max-width: 100%; }
/* v6.6 · Eventos */
.ev-banner { display: block; text-decoration: none; color: inherit; margin-bottom: 14px; background: linear-gradient(90deg, #fff7ec, #f2fbfa); border: 1px solid #f1e3cc; }
.ev-banner .ev-b-main { font-size: 15px; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
.ev-me { margin-bottom: 14px; }
.ev-day { margin-bottom: 12px; }
.ev-day.ev-today { border-color: var(--teal); background: #f2fbfa; }
.ev-dh { font-size: 12.5px; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.ev-dh::first-letter { text-transform: uppercase; }
.ev-it { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.ev-it + .ev-it { border-top: 1px solid var(--line); }
.ev-ic { width: 32px; height: 32px; border-radius: 50%; background: #eefaf8; color: var(--teal); display: grid; place-items: center; flex: none; }
.ev-ic svg { width: 17px; height: 17px; }
.inp.inp-ok { border-color: var(--teal); background: #f2fbfa; }
/* v6.8 · Calendario de Eventos */
.ev-chip { display: block; font-size: 11.5px; line-height: 1.3; padding: 2px 6px; border-radius: 6px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-chip.e { background: #e6f5f3; color: #0f5e57; cursor: pointer; }
.ev-chip.b { background: #fff1e0; color: #8a4b0b; }
.ev-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.ev-week .ev-wd { padding: 10px; min-height: 140px; margin: 0; }
.ev-month { padding: 10px; }
.ev-mh, .ev-mg { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.ev-mh span { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); padding: 4px 0; }
.ev-mc { min-height: 92px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 5px; cursor: pointer; min-width: 0; }
.ev-mc b { font-size: 12.5px; }
.ev-mc.out { opacity: .45; }
.ev-mc.ev-today, .ev-wd.ev-today { border-color: var(--teal); background: #f2fbfa; }
.ev-year { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 8px; }
.ev-ym { padding: 10px; margin: 0; }
.ev-yg { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; text-align: center; font-size: 11.5px; }
.ev-yg i { font-style: normal; color: var(--muted); font-weight: 700; font-size: 10.5px; }
.ev-yg span { padding: 3px 0; border-radius: 50%; }
.ev-yg span[data-day] { cursor: pointer; font-weight: 700; }
.ev-yg .he, .ev-dot.he { background: #cdeee9; color: #0f5e57; }
.ev-yg .hb, .ev-dot.hb { background: #ffe2bf; color: #8a4b0b; }
.ev-yg .he.hb { background: linear-gradient(135deg, #cdeee9 50%, #ffe2bf 50%); }
.ev-yg .td { outline: 2px solid var(--teal); }
.ev-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; }
@media (max-width: 900px) { .ev-year { grid-template-columns: repeat(3, minmax(0, 1fr)); } .ev-week { grid-template-columns: 1fr; } .ev-week .ev-wd { min-height: 0; } }
@media (max-width: 600px) {
  .ev-year { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ev-mc { min-height: 56px; padding: 3px; } .ev-mc .ev-chip { font-size: 0; padding: 0; height: 6px; margin-top: 2px; }
  .ev-nav { margin-left: 0 !important; width: 100%; justify-content: space-between; } #per { min-width: 0 !important; }
}

/* ---------- v6.9 · Visitas ---------- */
.plant-now { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; border-left: 5px solid #C0392B; }
.plant-now .pn-n { text-align: center; min-width: 92px; }
.plant-now .pn-n b { display: block; font-size: 34px; line-height: 1; color: var(--navy); }
.plant-now .pn-n span { font-size: 12px; color: var(--muted); }
.plant-now .pn-d { flex: 1; min-width: 180px; display: grid; gap: 3px; }
.plant-now .pn-d svg { width: 15px; height: 15px; vertical-align: -2px; }
.plant-now .pn-a { display: flex; gap: 8px; flex-wrap: wrap; }
details.mlx { margin-top: 4px; }
details.mlx summary { cursor: pointer; }
.k-visit { position: fixed; top: max(26px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 20; display: flex; align-items: stretch; gap: 8px; transition: opacity .22s; }
.k-visit.fade .kv-t b, .k-visit.fade [data-kv] { opacity: 0; }
.k-visit .kv-main { display: flex; align-items: center; gap: 12px; background: #fff; color: #003968; border-radius: 18px; padding: 10px 18px 10px 12px; min-width: 250px; text-decoration: none; box-shadow: 0 14px 34px rgba(0,0,0,.3); }
.k-visit .kv-main > svg { width: 34px; height: 34px; flex: none; padding: 7px; border-radius: 12px; background: #E6EEF7; box-sizing: content-box; }
.k-visit .kv-t { display: flex; flex-direction: column; min-width: 0; }
.k-visit .kv-t b { font-size: 17px; line-height: 1.2; transition: opacity .22s; }
.k-visit .kv-t small { font-size: 11px; color: #6B7A90; letter-spacing: .06em; margin-top: 3px; }
.k-visit .kv-out { display: flex; align-items: center; justify-content: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 700; font-size: 14px; padding: 10px 16px; border-radius: 18px; white-space: nowrap; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.28); }
.k-visit .kv-out svg { width: 18px; height: 18px; }
.k-visit [data-kv] { transition: opacity .22s; }
@media (max-width: 1020px) { .k-visit { top: auto; bottom: max(44px, env(safe-area-inset-bottom)); left: 16px; right: 16px; transform: none; } .k-visit .kv-main { flex: 1; min-width: 0; } }
/* Tablet en vertical: el recuadro de visitas arriba a la derecha (la hora va en su propia fila) */
@media (orientation: portrait) and (min-width: 700px) { .k-visit { top: max(18px, env(safe-area-inset-top)); bottom: auto; left: auto; right: 18px; transform: none; } .k-visit .kv-main { flex: none; min-width: 0; } }

/* Recortar foto (tickets de gastos) */
.crp-stage { position: relative; margin: 0 auto; touch-action: none; user-select: none; }
.crp-cv { display: block; border-radius: 6px; }
.crp-svg { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.crp-poly { fill: rgba(43, 179, 163, .14); stroke: var(--teal, #2BB3A3); stroke-width: 2; stroke-linejoin: round; }
.crp-h { position: absolute; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; background: #fff; border: 3px solid var(--teal, #2BB3A3); box-shadow: 0 2px 8px rgba(0,0,0,.35); cursor: grab; touch-action: none; }
.crp-h::after { content: ''; position: absolute; inset: -12px; }
.crp-h.on { transform: scale(1.25); cursor: grabbing; background: var(--teal, #2BB3A3); }
.g-prev { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.g-prev img { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line, #E3E9F0); }

/* Modo guiado */
.tg-ov { position: fixed; inset: 0; z-index: 3000; animation: tgIn .2s ease; }
.tg-ov.out { opacity: 0; transition: opacity .2s; }
.tg-shade { position: absolute; inset: 0; background: rgba(10, 30, 50, .42); }
.tg-ov.has-spot .tg-shade { background: transparent; }
.tg-spot { position: fixed; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(10, 30, 50, .34), 0 0 0 3px #5EAEAF, 0 0 22px 4px rgba(94,174,175,.7); transition: all .35s cubic-bezier(.3,.9,.3,1); pointer-events: none; animation: tgPulse 1.6s ease-in-out infinite; }
.tg-spot.hidden { display: none; }
@keyframes tgPulse { 50% { box-shadow: 0 0 0 9999px rgba(10, 30, 50, .34), 0 0 0 3px #5EAEAF, 0 0 30px 10px rgba(94,174,175,.45); } }
@keyframes tgIn { from { opacity: 0; } }
.tg-bub { position: fixed; width: min(380px, calc(100vw - 32px)); background: #fff; color: #102A43; border-radius: 16px; box-shadow: 0 18px 50px rgba(0,0,0,.28); padding: 14px 16px 12px; transition: top .35s, left .35s, bottom .35s; }
.tg-bub.mid { left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(440px, calc(100vw - 32px)); }
.tg-bub.mob { left: 16px; right: 16px; width: auto; }
.tg-bub.side::before { content: ''; position: absolute; left: -8px; top: 82px; border: 8px solid transparent; border-left: 0; border-right-color: #fff; }
.tg-hd { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #486581; margin-bottom: 8px; }
.tg-hd b { color: #003968; }
.tg-av { width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, #003968, #2BB3A3); color: #fff; display: inline-grid; place-items: center; flex: none; }
.tg-av svg { width: 14px; height: 14px; }
.tg-n { margin-left: auto; font-variant-numeric: tabular-nums; }
.tg-x { border: 0; background: none; color: #829AB1; cursor: pointer; padding: 4px; border-radius: 6px; display: inline-flex; }
.tg-x:hover { background: #F0F4F8; }
.tg-t { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 17px; color: #003968; margin-bottom: 4px; }
.tg-t svg { color: #2BB3A3; }
.tg-m { font-size: 14.5px; line-height: 1.5; min-height: 66px; cursor: pointer; }
.tg-m p { margin: 0 0 8px; }
.tg-m b { color: #003968; }
.tg-more { font-size: 12.5px; color: #1E7B74; background: #E6F4F4; border-radius: 8px; padding: 6px 10px; margin: 2px 0 6px; }
.tg-more.hidden { display: none; }
.tg-bar { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.tg-dots { flex: 1; height: 4px; border-radius: 4px; background: #E3E9F0; position: relative; overflow: hidden; }
.tg-dots::after { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--p, 0%); background: #2BB3A3; transition: width .3s; }
.tg-offer { position: fixed; right: 20px; bottom: 90px; z-index: 2500; display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 14px; box-shadow: 0 12px 36px rgba(0,0,0,.22); padding: 12px 14px; max-width: min(460px, calc(100vw - 32px)); animation: tgUp .3s ease; }
.tg-offer > div { flex: 1; min-width: 0; } .tg-offer b { display: block; color: #003968; } .tg-offer small { color: #486581; font-size: 12.5px; }
.tg-offer.out { opacity: 0; transform: translateY(10px); transition: all .2s; }
@keyframes tgUp { from { opacity: 0; transform: translateY(14px); } }
@media (max-width: 899px) { .tg-offer { left: 16px; right: 16px; bottom: calc(76px + env(safe-area-inset-bottom)); flex-wrap: wrap; } .tg-offer > div { flex-basis: calc(100% - 40px); } .tg-offer .btn { flex: 1; } }
.as-m .tg-sum-g { font-weight: 700; color: #003968; margin: 10px 0 4px; font-size: 13px; }
.as-m .tg-sum { margin: 0; padding-left: 18px; font-size: 13px; } .as-m .tg-sum li { margin-bottom: 4px; } .as-m .tg-sum a { font-weight: 600; }
.tg-bub.side-l::after { content: ''; position: absolute; right: -8px; bottom: 26px; border: 8px solid transparent; border-right: 0; border-left-color: #fff; }
.tg-bub.side.low::before { top: auto; bottom: 22px; }

.tg-bub.corner { right: 24px; bottom: 24px; }
.tg-deep { display: flex; align-items: center; gap: 10px; margin: 4px 0 8px; font-size: 12.5px; color: #486581; }
.tg-deep.hidden { display: none; }
.tg-dbtn { background: #E6F4F4; color: #1E7B74; border: 1px solid #A9DADA; font-weight: 700; animation: tgGlow 1.8s ease-in-out infinite; }
.tg-dbtn:hover { background: #D3EEEE; }
@keyframes tgGlow { 50% { box-shadow: 0 0 0 4px rgba(94,174,175,.25); } }
.tg-later { display: flex; align-items: center; gap: 6px; margin: 10px auto 0; border: 0; background: none; color: #486581; font: 600 12.5px inherit; cursor: pointer; padding: 4px 8px; border-radius: 6px; }
.tg-later:hover { background: #F0F4F8; color: #003968; }
.tg-later.hidden { display: none; }
.tg-later svg { width: 14px; height: 14px; }
body.tg-on .as-panel { z-index: 2990; } body.tg-on .as-fab { z-index: 2989; }
@media (max-width: 899px) { body.tg-on .as-panel:not(.hidden) { top: 64px !important; bottom: auto !important; height: 46vh !important; max-height: 46vh !important; } }

/* Visor de PDF e imágenes dentro de la app */
html.fv-lock, html.fv-lock body { overflow: hidden; }
.fv-ov { position: fixed; inset: 0; z-index: 4000; background: #1f2a37; display: flex; flex-direction: column; animation: fade .15s; }
.fv-ov.out { opacity: 0; transition: opacity .15s; }
.fv-top { display: flex; align-items: center; gap: 10px; padding: 8px 12px; padding-top: calc(8px + env(safe-area-inset-top)); background: #003968; color: #fff; flex: none; }
.fv-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.fv-t b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 15px; }
.fv-t small { color: #A9C7E0; font-size: 12px; }
.fv-tools { display: flex; align-items: center; gap: 4px; flex: none; }
.fv-b { display: inline-flex; align-items: center; gap: 6px; min-width: 38px; height: 38px; justify-content: center; padding: 0 10px; border: 0; border-radius: 10px; background: rgba(255,255,255,.1); color: #fff; font: 600 14px inherit; cursor: pointer; }
.fv-b:hover { background: rgba(255,255,255,.2); }
.fv-b svg { width: 18px; height: 18px; }
.fv-z { min-width: 62px; font-variant-numeric: tabular-nums; font-size: 13px; }
.fv-x { background: none; }
.fv-body { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; padding: 12px; padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
.fv-pages { display: flex; flex-direction: column; align-items: center; gap: 12px; min-width: min-content; }
.fv-page { background: #fff; box-shadow: 0 4px 18px rgba(0,0,0,.35); flex: none; }
.fv-page canvas { display: block; }
.fv-img { display: block; max-width: none; box-shadow: 0 4px 18px rgba(0,0,0,.35); background: #fff; }
.fv-load, .fv-err { color: #D9E2EC; padding: 60px 20px; text-align: center; font-size: 15px; }
.fv-err .btn { margin-top: 14px; }
@media (max-width: 640px) { .fv-b span, .fv-hide-m { display: none; } .fv-tools { gap: 2px; } .fv-b { min-width: 34px; padding: 0 8px; } .fv-z { min-width: 54px; } }
.tg-min { display: none; border: 0; background: none; color: #829AB1; cursor: pointer; padding: 4px; border-radius: 6px; }
.tg-rm { display: inline; border: 0; background: none; padding: 0 0 0 4px; color: #1E7B74; font: 700 13px inherit; cursor: pointer; text-decoration: underline; }
.tg-more svg { width: 13px; height: 13px; vertical-align: -2px; margin-right: 2px; }
/* Modo guiado en el móvil: la pantalla se ve entera; solo un borde en lo señalado y una ficha corta abajo */
@media (max-width: 899px) {
  .tg-shade { background: rgba(10, 30, 50, .18); }
  .tg-ov.has-spot .tg-shade { background: transparent; }
  .tg-spot { box-shadow: 0 0 0 3px #2BB3A3, 0 0 16px 2px rgba(43,179,163,.75); animation: tgPulseM 1.6s ease-in-out infinite; border-radius: 14px; }
  @keyframes tgPulseM { 50% { box-shadow: 0 0 0 3px #2BB3A3, 0 0 26px 8px rgba(43,179,163,.4); } }
  .tg-bub.mob, .tg-bub.mid.mob { left: 10px; right: 10px; top: auto; width: auto; transform: none; bottom: calc(76px + env(safe-area-inset-bottom)); padding: 10px 12px 8px; border-radius: 16px; box-shadow: 0 -2px 24px rgba(0,0,0,.22); max-height: 46vh; overflow: auto; }
  .tg-bub.mob::before, .tg-bub.mob::after { display: none; }
  .tg-hd { margin-bottom: 4px; font-size: 11px; } .tg-av { width: 22px; height: 22px; }
  .tg-min { display: inline-flex; margin-left: 4px; }
  .tg-t { font-size: 15.5px; margin-bottom: 2px; }
  .tg-m { font-size: 13.5px; line-height: 1.42; min-height: 0; }
  .tg-m p { margin: 0 0 4px; }
  .tg-more { font-size: 12px; padding: 4px 8px; margin: 2px 0 4px; }
  .tg-deep { margin: 2px 0 6px; } .tg-deep span { display: none; }
  .tg-dbtn { padding: 5px 10px; font-size: 12.5px; }
  .tg-bar { margin-top: 4px; gap: 6px; } .tg-bar .btn { padding: 6px 10px; font-size: 13px; }
  .tg-later { margin-top: 4px; font-size: 12px; padding: 2px 6px; }
  .tg-bub.min .tg-m, .tg-bub.min .tg-more, .tg-bub.min .tg-deep, .tg-bub.min .tg-later { display: none; }
  .tg-bub.min .tg-t { margin-bottom: 0; font-size: 14px; }
  .tg-offer { bottom: calc(76px + env(safe-area-inset-bottom)); }
}

/* v7.0 · campos secretos (clave de Claude, clave de denuncia): texto oculto sin ser type=password, para que el navegador no meta la contraseña guardada */
.inp.secret { -webkit-text-security: disc; text-security: disc; font-family: ui-monospace, monospace; letter-spacing: .5px; }
.as-two + .as-two { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.btn.teal.soft { opacity: .78; }
/* v7.0 · Inicio del empleado: dos columnas independientes, sin huecos */
.home2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.home2 .h-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.home2 .h-col > * { margin: 0; }
@media (max-width: 719px) {
  .home2 { display: flex; flex-direction: column; gap: 14px; align-items: stretch; }
  .home2 > *, .home2 .h-col > * { width: 100%; max-width: none; align-self: stretch; }
  .home2 .h-col { display: contents; }
  .ho-1 { order: 1; } .ho-2 { order: 2; } .ho-3 { order: 3; } .ho-4 { order: 4; } .ho-5 { order: 5; } .ho-6 { order: 6; } .ho-7 { order: 7; } .ho-8 { order: 8; }
}
/* v7.0 · Evaluaciones: estrellas en columna y la valoración al lado (sin que la fila crezca al pulsar) */
.crit > :first-child { flex: 1; min-width: 0; }
.crit-v { flex-direction: row; align-items: center; gap: 10px; min-width: 0; }
.crit-v .st-l { display: inline-block; min-width: 74px; text-align: left; line-height: 1; }
@media (max-width: 520px) { .crit { flex-wrap: wrap; gap: 4px; } .crit-v { width: 100%; justify-content: space-between; } }
/* v7.0 · Cumpleaños: el texto y el nombre en la misma línea (antes, en el móvil, salían en dos columnas) */
.ev-banner .ev-b-main { display: block; line-height: 1.35; }
/* v7.0 · Matriz de formación con pocos cursos: a todo el ancho, con el nombre del curso entero en horizontal */
.tbl.mtx.flat { width: 100%; min-width: 0; }
.tbl.mtx.flat th:not(:first-child) { white-space: normal; text-align: center; font-size: 12.5px; min-width: 110px; vertical-align: bottom; }
.tbl.mtx.flat .mcell { width: auto; }
.tbl.mtx th.rot span { max-height: 150px; } .tbl.mtx th.rot { height: 160px; }
.sol-when { display: inline-block; }
.push-ok { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin: -4px 2px 10px; }
.push-ok svg { color: var(--ok); } .push-ok .btn.link { padding: 0 4px; min-height: 0; font-size: 12.5px; }
/* v7.0 · Comunicados: texto largo recortado con «Leer completo» y adjunto como tarjeta */
.ann-body.clamp { max-height: 9.6em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.ann-more { margin: -2px 0 8px; padding-left: 0; }
.ann-att { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 460px; text-align: left; border: 1px solid var(--line); background: var(--soft); border-radius: 12px; padding: 10px 12px; cursor: pointer; color: var(--ink); margin: 6px 0 2px; font: inherit; }
.ann-att:hover { border-color: var(--teal); }
.ann-att b { display: block; font-size: 13.5px; overflow-wrap: anywhere; } .ann-att small { display: block; font-size: 12px; }
.ann-att-ic { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; background: #E8F2F2; color: var(--teal); flex: none; font-weight: 800; font-size: 11px; }
.ann-att-ic.pdf { background: #FDECEC; color: #C0392B; }
/* v7.0 · la página no «salta» unos píxeles cuando aparece o desaparece la barra de desplazamiento */
html { scrollbar-gutter: stable; }
/* v7.0 · que la burbuja del asistente no tape el último botón (p. ej. «Guardar» en Configuración) */
#content { padding-bottom: max(88px, env(safe-area-inset-bottom)); }
/* v7.0 · pestañas: sin barra de desplazamiento visible (se deslizan con las flechas o el dedo) */
.tabs { scrollbar-width: none; } .tabs::-webkit-scrollbar { display: none; }
.ob-done summary { cursor: pointer; list-style: none; } .ob-done summary::-webkit-details-marker { display: none; }
.clockbar .cb-break { color: var(--warn); font-weight: 600; }
.mini-month.past { opacity: .6; }
/* v7.1 · Visitas previstas */
.vx-time { flex: none; min-width: 52px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--navy, #00396B); }
.vx-time small { display: block; font-weight: 500; color: var(--muted); font-size: 11px; }
.kpair { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; }
.kpair-qr { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 6px; line-height: 0; }
@media (max-width: 560px) { .kpair { grid-template-columns: 1fr; justify-items: center; } }
.ev-chip.h { background: #e7f5f2; color: #1d6b5c; }

/* v7.2 · Asistente en el móvil: ocupa toda la parte visible (encima del teclado) con su cabecera */
@media (max-width: 959px) {
  .as-panel:not(.hidden) { top: var(--as-top, 0px) !important; left: 0 !important; right: 0 !important; bottom: auto !important; width: auto !important;
    height: var(--as-h, 100dvh) !important; max-height: none !important; border-radius: 0; border: 0; z-index: 3000; }
  .as-panel:not(.hidden) .as-head { padding-top: calc(12px + var(--safe-t, 0px)); }
  body.as-open .as-fab { display: none; }
  body.as-open { overflow: hidden; }
  .as-panel .as-in { padding-bottom: calc(10px + var(--as-kb, var(--safe-b, 0px))); }
}
/* v7.2 · Bloque «Mis ausencias» del inicio y solicitudes del tipo elegido */
.abs-home .bal-mini { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 2px 0 10px; }
.abs-home .bal-mini b { font-size: 26px; color: var(--teal-d); }
.abs-req-t { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.abs-req-t h4 { margin: 0 0 6px; font-size: 13.5px; color: var(--muted); font-weight: 600; }
/* v7.2 · Configuración de la pantalla de inicio */
.hl-list { display: flex; flex-direction: column; gap: 6px; }
.hl-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.hl-row.off { opacity: .55; }
.hl-row .grow { min-width: 0; } .hl-row small { display: block; color: var(--muted); }
.hl-row .icon-btn { color: var(--ink); }
.hl-row .grow { flex: 1; }
.hl-tabs { display: flex; flex-direction: column; gap: 8px; }
.hl-tab { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 10px; }
.hl-tab > span { font-size: 13px; color: var(--muted); font-weight: 600; }
.hl-tab .fixed { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 10px; font-size: 14px; color: var(--muted); }
.hl-tab .fixed svg { width: 16px; height: 16px; }
/* v7.2 · Acceso discreto al kiosko desde el inicio de sesión */
.kiosk-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 12.5px; color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); }
.kiosk-link:hover { color: var(--navy); border-color: var(--teal); }
.kiosk-link svg { width: 14px; height: 14px; }
/* v7.2 · Opexia: módulos y submódulos por empresa */
details.mods { margin-top: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; background: var(--soft, rgba(0,0,0,.03)); }
details.mods summary { cursor: pointer; font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 6px; list-style: none; }
details.mods summary::-webkit-details-marker { display: none; }
.mods-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-top: 10px; }
.mod-b { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 10px; background: var(--card); border: 1px solid var(--line-2, var(--line)); }
.mod-b.off { opacity: .6; }
.mod-b .mod-s { padding-left: 10px; color: var(--muted); }
.switch.sm { transform: scale(.85); transform-origin: left center; }
/* v7.2 · Fichajes sin descanso (pausa en bloque) */
.form-grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 760px) { .form-grid.c4 { grid-template-columns: 1fr 1fr; } }
.bb-t { max-height: 46vh; overflow-y: auto; }
.bb-t td.nowrap, .bb-t .nowrap { white-space: nowrap; }
.bb-a { margin: 12px 0 0; background: var(--bg); }
/* v7.2 · Permisos de administración por áreas */
.perm-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin: 10px 0 0; padding-left: 24px; }
.perm-g.off { opacity: .5; }
.perm-i { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.perm-i input { margin-top: 3px; }
.perm-i b { display: block; font-size: 13.5px; } .perm-i small { display: block; color: var(--muted); font-size: 12px; line-height: 1.3; }
/* v7.2 · Lista de emergencia y «Pasar lista» */
.btn.em-go { background: #C0392B; border-color: #C0392B; color: #fff; }
.btn.em-go:hover { background: #A93226; }
.em-ov .modal { max-width: 760px; }
.em-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.em-k { border-radius: 14px; padding: 12px 14px; background: color-mix(in srgb, #C0392B 8%, var(--card)); border: 1px solid color-mix(in srgb, #C0392B 22%, transparent); }
.em-k b { display: block; font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; color: #C0392B; }
.em-k span { font-weight: 600; font-size: 13px; } .em-k small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.em-k.ok { background: color-mix(in srgb, var(--ok, #1e8e5a) 10%, var(--card)); border-color: color-mix(in srgb, var(--ok, #1e8e5a) 30%, transparent); } .em-k.ok b { color: var(--ok, #1e8e5a); }
.em-k.bad b { color: #C0392B; }
.em-prog { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; margin: 10px 0 0; }
.em-prog i { display: block; height: 100%; background: var(--ok, #1e8e5a); border-radius: 99px; transition: width .25s; }
.em-note { font-size: 12.5px; color: var(--muted); margin: 10px 0; }
.em-bar { position: sticky; top: -1px; z-index: 2; background: var(--card); padding: 8px 0; display: flex; flex-direction: column; gap: 8px; }
.em-search { display: flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); border-radius: 12px; padding: 0 12px; background: var(--bg); }
.em-search:focus-within { border-color: var(--teal); }
.em-search input { flex: 1; border: 0; outline: 0; background: none; font-size: 16px; padding: 12px 0; color: var(--ink); min-width: 0; }
.em-seg { display: flex; } .em-seg button { flex: 1; }
.em-g h4 { display: flex; align-items: center; gap: 6px; margin: 14px 0 6px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.em-g h4 span { margin-left: auto; background: var(--line); color: var(--ink); border-radius: 99px; padding: 1px 9px; font-size: 12px; }
.em-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 6px; background: var(--card); }
.em-list.roll .em-row { cursor: pointer; min-height: 58px; user-select: none; -webkit-tap-highlight-color: transparent; transition: background .15s, border-color .15s; }
.em-list.roll .em-row:active { transform: scale(.99); }
.em-chk { flex: 0 0 26px; height: 26px; border-radius: 8px; border: 2px solid var(--line-2, #c5ccd6); display: grid; place-items: center; color: #fff; }
.em-list:not(.roll) .em-chk { border-radius: 6px; width: 20px; height: 20px; flex-basis: 20px; }
.em-row.on { background: color-mix(in srgb, var(--ok, #1e8e5a) 9%, var(--card)); border-color: color-mix(in srgb, var(--ok, #1e8e5a) 40%, transparent); }
.em-row.on .em-chk { background: var(--ok, #1e8e5a); border-color: var(--ok, #1e8e5a); }
.em-row.on .em-who b { color: var(--ok, #1e8e5a); }
.em-who { flex: 1; min-width: 0; } .em-who b { display: block; font-size: 15px; } .em-who small { display: block; color: var(--muted); font-size: 12.5px; }
.em-meta { text-align: right; font-size: 12.5px; color: var(--muted); display: flex; flex-direction: column; gap: 3px; align-items: flex-end; }
.em-safe { color: var(--ok, #1e8e5a); font-weight: 600; }
.em-tel { display: inline-flex; align-items: center; gap: 4px; color: var(--teal-d, var(--teal)); text-decoration: none; font-weight: 600; white-space: nowrap; }
.em-tel svg { width: 13px; height: 13px; }
@media (max-width: 640px) {
  .em-ov { padding: 0 !important; align-items: stretch !important; }
  .em-ov .modal { max-width: none; width: 100%; height: 100%; max-height: none; border-radius: 0; display: flex; flex-direction: column; }
  .em-ov .m-head { padding-top: calc(12px + var(--safe-t, 0px)); }
  .em-ov .m-body { flex: 1; overflow: auto; }
  .em-ov .m-foot { flex-wrap: wrap; padding-bottom: calc(10px + var(--safe-b, 0px)); }
  .em-ov .m-foot .btn { flex: 1 1 40%; }
  .em-k b { font-size: 26px; }
}
.em-tools { gap: 6px; justify-content: flex-end; } .em-tools .btn { min-height: 34px; }
/* v7.2 · Cambios de fichaje que la persona tiene que aceptar */
.pp-card { border-color: color-mix(in srgb, var(--warn, #d68910) 45%, var(--line)); background: color-mix(in srgb, var(--warn, #d68910) 5%, var(--card)); }
.pp-item { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-top: 10px; background: var(--card); }
.pp-h { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.pp-r { display: grid; grid-template-columns: 80px auto 16px auto; align-items: center; gap: 8px; font-size: 14px; padding: 3px 0; justify-content: start; }
.pp-r > span { color: var(--muted); font-size: 12.5px; } .pp-r s { color: var(--muted); } .pp-r b.err { color: var(--err); }
.pp-r svg { width: 14px; height: 14px; color: var(--muted); }
.pp-n { font-size: 13px; margin: 8px 0 0; display: flex; gap: 6px; align-items: flex-start; } .pp-n.err { color: var(--err); }
.pp-n svg { width: 14px; height: 14px; flex: 0 0 14px; margin-top: 2px; }
/* v7.2 · Subir justificante después */
.jf-btns { display: flex; gap: 8px; flex-wrap: wrap; } .jf-btns .btn { flex: 1 1 160px; justify-content: center; }
.jf-prev { margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 8px; background: var(--bg); text-align: center; }
.jf-prev img { max-width: 100%; max-height: 46vh; border-radius: 8px; }
.jf-pdf { display: flex; gap: 8px; align-items: center; justify-content: center; padding: 14px; font-weight: 600; }
/* v7.2 · Dispositivo y lugar del fichaje */
.dev-line { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: -2px 0 6px 2px; }
.dev-line .dv { display: inline-flex; align-items: center; gap: 4px; } .dev-line svg { width: 12px; height: 12px; }
.dev-line a { color: inherit; text-decoration: underline dotted; }
.imp-rl { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--teal) 8%, var(--card)); border: 1px solid color-mix(in srgb, var(--teal) 30%, transparent); margin-bottom: 12px; } .imp-rl svg { flex: 0 0 16px; margin-top: 2px; }
/* v7.2 · aviso DNI/NIE/CIF */
.inp.inp-warn { border-color: #e0a100; background: #fffaf0; }
.docid-hint { display: block; font-size: 12px; margin-top: 3px; line-height: 1.35; }
.docid-hint:empty { display: none; }
.docid-hint.ok { color: var(--teal); }
.docid-hint.err { color: #a15c00; }
.docid-hint .linkish { background: none; border: 0; padding: 0; color: var(--teal); text-decoration: underline; font: inherit; font-weight: 600; cursor: pointer; margin-left: 4px; }
td .docid-hint { max-width: 180px; }
/* v7.2 · Gastos: filtros y tabla */
.exp-f { padding: 12px 14px; margin-bottom: 10px; }
.exp-fg { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 8px 10px; }
.exp-fg .exp-q { grid-column: span 2; }
.exp-tot { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; font-size: 13px; margin: 0 2px 10px; }
.exp-body { padding: 6px 8px; }
.exp-tw { max-height: 68vh; overflow: auto; }
.exp-t thead th { position: sticky; top: 0; background: var(--card, #fff); z-index: 1; }
.exp-t td { padding: 8px 10px; }
.exp-t .exp-act { text-align: right; }
.exp-t .exp-act .btn { margin-left: 4px; }
.tbl th.sortable { cursor: pointer; user-select: none; }
.tbl th.sortable:hover { color: var(--ink, #1d2a3a); }
.tbl th.sortable.asc::after { content: ' ▲'; font-size: 9px; }
.tbl th.sortable.desc::after { content: ' ▼'; font-size: 9px; }
@media (max-width: 700px) { .exp-fg .exp-q { grid-column: 1 / -1; } .exp-fg { grid-template-columns: 1fr 1fr; } }
/* v7.2 · menú lateral por grupos */
.nav.grouped .nav-top { padding-bottom: 6px; margin-bottom: 4px; border-bottom: 1px solid rgba(255,255,255,.07); }
.nav-grp { margin-top: 2px; }
.nav-grp-h { display: flex; align-items: center; gap: 6px; width: calc(100% - 20px); margin: 6px 10px 1px; padding: 6px 8px 6px 10px; border: 0; border-radius: 8px; background: none; cursor: pointer;
  font: inherit; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--lav-l); font-weight: 700; text-align: left; }
.nav-grp-h:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav-grp-h > span:first-child { flex: 1; }
.nav-grp-h svg { width: 14px; height: 14px; transition: transform .15s ease; opacity: .8; }
.nav-grp.closed .nav-grp-h svg { transform: rotate(-90deg); }
.nav-grp.closed .nav-grp-b { display: none; }
.nav-grp-h .count { background: var(--err); color: #fff; font-size: 10.5px; letter-spacing: 0; padding: 1px 7px; border-radius: 9px; }
.nav-grp-h .count.hidden { display: none; }
.nav-style { display: block; margin: 8px 18px 2px; padding: 0; border: 0; background: none; color: var(--lav-l); font: inherit; font-size: 11.5px; text-decoration: underline; cursor: pointer; text-align: left; opacity: .85; }
.nav-style:hover { color: #fff; opacity: 1; }
.shell.mini .nav-grp-h { height: 1px; padding: 0; margin: 8px 18px; background: rgba(255,255,255,.12); pointer-events: none; }
.shell.mini .nav-grp-h > * { display: none; }
.shell.mini .nav-grp.closed .nav-grp-b { display: block; }
.shell.mini .nav-style { display: none; }
/* v7.2 · «Más» con los mismos grupos plegables */
.mas-grp { padding-top: 6px; padding-bottom: 6px; }
.mas-grp-h { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; padding: 8px 2px; cursor: pointer; font: inherit; color: inherit; text-align: left; }
.mas-grp-h h3 { margin: 0; flex: 1; }
.mas-grp-h svg { transition: transform .15s ease; color: var(--muted); }
.mas-grp.closed .mas-grp-h svg { transform: rotate(-90deg); }
.mas-grp.closed .mas-grp-b { display: none; }
.mas-grp:not(.closed) .mas-grp-c { display: none; }
/* v7.2 · Instalar desde Google Play (Android) */
.play-btn { display: inline-flex; align-items: center; gap: 10px; background: #000; color: #fff; border-radius: 10px; padding: 8px 16px 8px 12px; text-decoration: none; border: 1px solid #444; min-height: 48px; }
.play-btn:hover { background: #1a1a1a; color: #fff; }
.play-btn span { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.play-btn small { font-size: 10px; letter-spacing: .03em; text-transform: uppercase; opacity: .85; }
.play-btn b { font-size: 17px; font-weight: 600; }
.play-btn.block { display: flex; justify-content: center; width: 100%; }
.play-login { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line, #e5e9ef); font-size: 13px; color: var(--muted); }
.play-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 16px; background: #e8f6f4; border-bottom: 1px solid #cdebe6; font-size: 13px; }
.play-bar .grow { flex: 1; }
/* v7.3 · Configuración: página índice */
.cfg-sec { margin-bottom: 18px; }
.cfg-h { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 8px 2px; font-weight: 700; }
.cfg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 10px; }
.cfg-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin: 0; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.cfg-card:hover { border-color: var(--teal); transform: translateY(-1px); }
.cfg-card .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cfg-card small { font-size: 12.5px; line-height: 1.35; }
.cfg-ic { width: 38px; height: 38px; border-radius: 10px; background: rgba(0,57,104,.07); color: var(--navy, #003968); display: grid; place-items: center; flex: none; }
.cfg-back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; margin-bottom: 2px; }
.cfg-back:hover { color: var(--teal); }
/* v7.3 · Cuadrante en el móvil: un día cada vez */
.sm-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.sm-days button { border: 1px solid var(--line, #e3e8ef); background: #fff; border-radius: 10px; padding: 6px 0; display: flex; flex-direction: column; align-items: center; gap: 1px; font: inherit; cursor: pointer; color: inherit; }
.sm-days button small { font-size: 10.5px; text-transform: uppercase; color: var(--muted); }
.sm-days button b { font-size: 16px; }
.sm-days button.on { background: var(--navy, #003968); border-color: var(--navy, #003968); color: #fff; }
.sm-days button.on small { color: rgba(255,255,255,.75); }
.sm-days button.hol:not(.on) { background: repeating-linear-gradient(45deg, #fff, #fff 4px, #f3f4f6 4px, #f3f4f6 8px); }
.sm-list { display: flex; flex-direction: column; gap: 6px; }
.sm-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 1px solid var(--line, #e3e8ef); border-radius: 12px; background: #fff; font: inherit; color: inherit; text-align: left; cursor: pointer; min-height: 52px; }
.sm-row:disabled { opacity: .65; cursor: default; }
.sm-row .grow { font-weight: 600; font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-sh { color: #fff; border-radius: 8px; padding: 5px 9px; font-size: 12.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sm-sh.off { background: #eef1f5; color: var(--ink, #1d2a3a); }
.sm-sh.dirty { box-shadow: 0 0 0 2px #f59e0b; }
@media (max-width: 760px) {
  .palette { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 6px; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .palette button { flex: none; }
}
.cfg-grid { align-items: stretch; }
.cfg-grid > .cfg-card { height: 100%; box-sizing: border-box; margin: 0 !important; }
#gm .row.between { flex-wrap: wrap; gap: 6px; }
#gm #mfill { max-width: 100%; white-space: normal; text-align: left; }
/* v7.3 · Firma mensual del registro */
.rs-card { border-left: 4px solid var(--teal); }
.rs-card > .row > svg { color: var(--teal); width: 26px; height: 26px; }
.rs-seg { display: flex; } .rs-seg button { flex: 1; justify-content: center; }
/* v7.3 · Absentismo y Gestoría */
.ab-bars { display: flex; flex-direction: column; gap: 8px; }
.ab-row { display: grid; grid-template-columns: minmax(90px, 34%) 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.ab-row .ab-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ab-row .bar { height: 10px; }
.ab-cols { display: flex; align-items: flex-end; gap: 6px; height: 190px; padding-top: 16px; }
.ab-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; min-width: 0; }
.ab-col i { display: block; width: 100%; max-width: 38px; background: var(--teal); border-radius: 6px 6px 0 0; min-height: 2px; }
.ab-col small { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.ab-col span { font-size: 10.5px; color: var(--muted); text-transform: capitalize; white-space: nowrap; }
/* v8.0.1 · en el móvil las columnas tienen ancho fijo y se desliza en horizontal (antes se montaban las etiquetas) */
@media (max-width: 600px) { .ab-cols { overflow-x: auto; overflow-y: hidden; padding-bottom: 4px; } .ab-col { flex: 0 0 38px; } .ab-col small, .ab-col span { font-size: 9.5px; } }
.gs-codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 14px; }
.gs-c { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; padding: 4px 0; border-bottom: 1px dashed var(--line, #e3e8ef); }
.gs-c .inp { width: 90px; flex: none; }
/* v7.3 · Soporte para la plantilla y respuestas frecuentes */
.sp-emp { margin-bottom: 12px; border-left: 4px solid var(--lav, #8b7ff0); }
.faq-list { display: flex; flex-direction: column; gap: 6px; max-height: 60vh; overflow: auto; }
.faq { border: 1px solid var(--line, #e3e8ef); border-radius: 10px; padding: 10px 12px; background: #fff; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.faq-a { margin-top: 8px; font-size: 13.5px; line-height: 1.5; }
.banner .faq { margin-top: 6px; }
.mv-trnote { display: flex; gap: 8px; align-items: center; margin: 0 0 12px; padding: 10px 14px; background: #eef6ff; border: 1px solid #cfe3fb; border-radius: 10px; font-size: 13px; color: #1d3b5c; }

/* v7.3.1 · Filtros por columna tipo Google Sheets */
.cf-th { cursor: pointer; user-select: none; white-space: nowrap; }
.cf-th > span { vertical-align: middle; }
.cf-th .cf-b { border: 0; background: transparent; padding: 2px; margin-left: 4px; border-radius: 6px; color: var(--muted, #6b7c93); opacity: .55; vertical-align: middle; line-height: 0; cursor: pointer; }
.cf-th:hover .cf-b { opacity: 1; background: rgba(16, 42, 67, .06); }
.cf-th.cf-on .cf-b { opacity: 1; color: #fff; background: var(--teal, #2a9d8f); }
.cf-th.cf-on { color: var(--ink, #1d2a3a); }
.cf-dir { font-size: 9px; margin-left: 3px; }
.cf-menu { position: fixed; z-index: 3000; background: var(--card, #fff); border: 1px solid var(--line, #e3e8ef); border-radius: 12px; box-shadow: 0 12px 34px rgba(16, 42, 67, .18); padding: 8px; font-size: 14px; }
.cf-h { font-weight: 700; padding: 4px 8px 6px; }
.cf-it { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: transparent; text-align: left; padding: 7px 8px; border-radius: 8px; cursor: pointer; color: inherit; font: inherit; }
.cf-it:hover { background: rgba(16, 42, 67, .06); }
.cf-sep { height: 1px; background: var(--line, #e3e8ef); margin: 6px 0; }
.cf-sub { font-size: 12px; font-weight: 600; color: var(--muted, #6b7c93); padding: 2px 8px 4px; }
.cf-menu .row { padding: 0 8px; }
.cf-menu input[type=search] { width: 100%; margin-bottom: 6px; }
.cf-list { max-height: 240px; overflow: auto; border: 1px solid var(--line, #e3e8ef); border-radius: 8px; padding: 4px; }
.cf-v { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 6px; cursor: pointer; }
.cf-v:hover { background: rgba(16, 42, 67, .05); }
.cf-v input { width: 16px; height: 16px; flex: none; }
.cf-ft { justify-content: flex-end; gap: 8px; margin-top: 8px; }
.cf-chips { gap: 6px; align-items: center; width: 100%; margin-top: 2px; }
.cf-chip { display: inline-flex; align-items: center; gap: 4px; }
.cf-chip button { border: 0; background: transparent; padding: 0 0 0 2px; cursor: pointer; color: inherit; line-height: 0; }

/* v7.3.1 · Gastos › vista Tickets */
.exp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.exp-card { border: 1px solid var(--line, #e3e8ef); border-radius: 14px; overflow: hidden; background: var(--card, #fff); display: flex; flex-direction: column; }
.exp-card.st-rejected { opacity: .72; }
.exp-ph { position: relative; height: 150px; background: #eef2f6; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.exp-ph.has { cursor: zoom-in; }
.exp-ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.exp-ph.img .exp-ph-ic { display: none; }
.exp-ph-ic { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--muted, #6b7c93); }
.exp-ph-ic svg { width: 34px; height: 34px; }
.exp-st { position: absolute; right: 8px; top: 8px; box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
.exp-ck { position: absolute; left: 8px; top: 8px; background: #fff; border-radius: 6px; padding: 3px; line-height: 0; box-shadow: 0 1px 4px rgba(0, 0, 0, .15); }
.exp-ck input { width: 18px; height: 18px; }
.exp-cb { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.exp-amt { font-size: 18px; }
.exp-who { font-weight: 600; }
.exp-desc { font-size: 14px; }
.exp-note { font-style: italic; }
.exp-ca { justify-content: flex-end; gap: 6px; margin-top: auto; padding-top: 8px; }
@media (max-width: 520px) { .exp-grid { grid-template-columns: 1fr 1fr; gap: 8px; } .exp-ph { height: 110px; } .exp-amt { font-size: 16px; } }

/* v7.3.1 · Eventos: personas del día pulsables (abren su ficha) */
.ev-p { width: 100%; border: 0; background: transparent; text-align: left; font: inherit; color: inherit; cursor: pointer; border-radius: 10px; align-items: center; }
.ev-p:hover { background: rgba(42, 157, 143, .08); }
.ev-p > svg { color: var(--muted, #6b7c93); flex: none; }

/* v7.4 · Cierres de empresa */
.cz-scope { display: flex; gap: 28px; flex-wrap: wrap; background: rgba(16, 42, 67, .03); border-radius: 10px; padding: 10px 14px; margin-top: 4px; }
.cz-scope > div { display: flex; flex-direction: column; gap: 4px; min-width: 180px; }
.cz-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 14px; }
.cz-sum > div { background: rgba(42, 157, 143, .08); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; }
.cz-sum b { font-size: 22px; }
.cz-sum small { color: var(--muted, #6b7c93); }
.cz-sum .bad { background: rgba(214, 69, 65, .1); color: var(--err, #c0392b); }
.cz-t tr.off td { opacity: .6; }
.cz-t tr.off td:first-child { opacity: 1; }
.cz-t .chip { margin: 1px 4px 1px 0; }
.cz-scroll { max-height: 44vh; }
.cz-m { display: none; }
/* v7.9.12 · móvil: sin scroll dentro del scroll (la lista se desliza con el modal) y el departamento bajo el nombre */
@media (max-width: 700px) {
  .cz-scroll { max-height: none; }
  .cz-t th:nth-child(3), .cz-t td:nth-child(3) { display: none; }
  .cz-m { display: block; font-size: 12px; font-weight: 400; }
  .cz-sum b { font-size: 18px; }
  .cz-t td:nth-child(2) .av { display: none; }
}
.cz-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
.cz-day { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line, #e3e8ef); border-radius: 8px; cursor: pointer; }
.cz-day small { color: var(--muted, #6b7c93); margin-left: auto; font-size: 11px; }
.cz-day.nw { opacity: .55; }
.cz-day.cf { background: rgba(243, 156, 18, .08); }
.big-cal .cz-cal { background: rgba(100, 128, 176, .14); color: #3d5a8a; }

/* v7.5 · Barra «Sin conexión» */
#offline-bar { position: fixed; left: 50%; transform: translateX(-50%); top: calc(env(safe-area-inset-top, 0px) + 64px); z-index: 1500; white-space: nowrap;
  background: #3d2c00; color: #ffe2a3; border-radius: 999px; padding: 8px 10px 8px 14px; font-size: 13px; display: flex; align-items: center; gap: 6px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .25); max-width: calc(100vw - 24px); }
#offline-bar svg { flex: none; }
#offline-bar button { margin-left: 6px; border: 0; border-radius: 999px; padding: 4px 10px; background: rgba(255, 255, 255, .16); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
@media (min-width: 900px) { #offline-bar { top: 76px; } }

/* v7.5.2 · Nada cortado en el móvil: las cabeceras, filas y pies con botones bajan de línea en vez de salirse */
.card .card-head { flex-wrap: wrap; row-gap: 8px; }
.card .card-head h3 { min-width: min(180px, 100%); }
/* v7.9.10 · título + un solo enlace («Ver», «Ver todas»): el enlace siempre a la derecha, el título parte en dos líneas si hace falta */
.card .card-head:has(> h3:first-child + .btn.link:last-child) { flex-wrap: nowrap; }
.card .card-head:has(> h3:first-child + .btn.link:last-child) > h3 { min-width: 0; }
.card .card-head > .btn.link:last-child { flex: none; white-space: nowrap; }
.wz-foot { flex-wrap: wrap; row-gap: 8px; }
.btn { max-width: 100%; }
.chip { max-width: 100%; }
a.chip { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) {
  .li { flex-wrap: wrap; row-gap: 8px; }
  .li > .grow { min-width: min(150px, 100%); }
  .li > .row:last-child { margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
  a.chip { white-space: normal; }
  .wz-foot > .grow { display: none; }
  .wz-foot > .btn { flex: 1 1 auto; }
  .btn { white-space: normal; text-align: center; line-height: 1.2; }
}
/* v7.5.2 · Superadmin: buscador de empresas, botones que bajan de línea y módulos plegados */
.sa-find { position: relative; display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.sa-find .inp { flex: 1; padding-left: 38px; min-height: 44px; }
.sa-find-i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); display: flex; pointer-events: none; }
.sa-find > .small { flex: none; white-space: nowrap; }
.sa-co .card-head { margin-bottom: 8px; }
.sa-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
details.mods summary::after { content: ''; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; }
details.mods[open] summary::after { transform: rotate(-135deg); }
@media (max-width: 640px) { .sa-acts .btn { flex: 1 1 calc(50% - 4px); } }
/* v7.5.2 · Asistente de alta en el móvil: cada fila de tabla es una ficha, sin desplazar a los lados */
@media (max-width: 640px) {
  .tbl-wrap:has(> .wz-tbl) { overflow: visible; }
  .wz-tbl, .wz-tbl tbody { display: block; width: 100%; }
  .wz-tbl thead { display: none; }
  .wz-tbl tr { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; background: #fff; }
  .wz-tbl td { display: block; padding: 0 !important; border: 0 !important; flex: 1 1 calc(50% - 8px); min-width: 0; }
  .wz-tbl td[data-l]::before { content: attr(data-l); display: block; font-size: 11.5px; font-weight: 600; color: var(--muted); margin-bottom: 3px; }
  .wz-tbl td.wz-x { flex: 0 0 auto; align-self: center; }
  .wz-tbl td[data-l="Nombre"], .wz-tbl td[data-l="Dirección"] { flex-basis: 100%; }
  .wz-tbl .inp { width: 100%; max-width: none !important; }
  .wz-tbl td > *, .wz-tbl select.inp { max-width: 100% !important; min-width: 0 !important; box-sizing: border-box; }
}
/* v7.5.3 · Elementos inactivos o archivados, más clarito; selector de iconos con dibujos */
.is-off { opacity: .5; transition: opacity .15s; }
.is-off:hover, .is-off:focus-within { opacity: .8; }
.ic-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 8px; margin-top: 4px; }
.ic-opt { position: relative; display: flex; align-items: center; justify-content: center; height: 48px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; color: var(--ink); background: var(--card); transition: .12s; }
.ic-opt:hover { border-color: var(--teal); }
.ic-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ic-opt:has(input:checked) { border-color: var(--teal); background: rgba(94,174,175,.14); color: var(--teal-d, #2f7f80); box-shadow: 0 0 0 2px rgba(94,174,175,.35); }
.ic-opt:has(input:focus-visible) { outline: 2px solid var(--teal); outline-offset: 2px; }
.ic-opt svg { width: 22px; height: 22px; }

/* v7.6 · Barra superior a todo lo ancho en el ordenador: la franja de la barra de desplazamiento
   que queda junto a ella se pinta de blanco, y las barras de desplazamiento son finas y discretas */
@media (min-width: 960px) {
  html { background: linear-gradient(#fff 0, #fff var(--tb-real, 77px), var(--bg) var(--tb-real, 77px)) fixed; scrollbar-width: thin; scrollbar-color: #C3CEDA transparent; }
  html::-webkit-scrollbar { width: 10px; }
  html::-webkit-scrollbar-track { background: transparent; }
  html::-webkit-scrollbar-thumb { background: #C3CEDA; border-radius: 9px; border: 2px solid transparent; background-clip: padding-box; }
  .sidebar { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.22) transparent; }
  .sidebar::-webkit-scrollbar { width: 6px; }
  .sidebar::-webkit-scrollbar-track { background: transparent; }
  .sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.22); border-radius: 9px; }
}
/* v7.6 · Buscador en lugar de desplegables largos */
.ss { position: relative; width: 100%; }
.ss .ss-native { position: absolute !important; opacity: 0; pointer-events: none; width: 1px !important; height: 1px !important; inset: auto; overflow: hidden; }
.ss .ss-in { width: 100%; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2364748B' stroke-width='2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.ss-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 80; max-height: 320px; overflow-y: auto; background: var(--card, #fff); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 30px rgba(15,23,42,.14); padding: 4px; }
.ss-opt { padding: 9px 12px; border-radius: 8px; cursor: pointer; }
.ss-opt b { display: block; font-weight: 600; font-size: 14px; } .ss-opt small { display: block; color: var(--muted); font-size: 12px; }
.ss-opt:hover, .ss-opt.hi { background: var(--soft, #EEF4F8); } .ss-opt.on b { color: var(--teal-d, #2f7f80); }
.ss-none { padding: 10px 12px; color: var(--muted); font-size: 13px; }
.modal .ss-list, .ov .ss-list { max-height: 240px; }
/* v7.6 · Vista previa de impresión dentro de la app */
html.pv-lock, html.pv-lock body { overflow: hidden; }
.pv-ov { position: fixed; inset: 0; z-index: 200; background: rgba(15,23,42,.55); display: flex; align-items: stretch; justify-content: center; padding: 18px; }
.pv { background: var(--card, #fff); border-radius: 16px; width: min(1100px, 100%); display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,.25); }
.pv-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px 12px 18px; border-bottom: 1px solid var(--line); }
.pv-t { flex: 1 1 200px; min-width: 0; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pv-b { flex: 1; min-height: 0; background: #E9EEF3; position: relative; }
.pv-f { width: 100%; height: 100%; border: 0; background: #fff; display: block; }
.pv-load { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--muted); }
@media (max-width: 640px) { .pv-ov { padding: 0; } .pv { border-radius: 0; } .pv-acts { width: 100%; } .pv-acts .btn { flex: 1 1 auto; } }
/* v7.6 · Código de kiosko */
.kc-hint { display: block; margin-top: 4px; font-size: 12px; } .kc-hint.err { color: var(--err); } .kc-hint .btn.link { padding: 0 4px; min-height: 0; font-size: 12px; }
/* v7.6 · Editor de horarios: columnas ajustadas, sin huecos */
.sch-tools { gap: 10px; margin: 12px 0 6px; align-items: center; }
.sch-tbl { width: auto; min-width: 100%; }
.sch-tbl th { white-space: nowrap; vertical-align: bottom; } .sch-tbl th small { display: block; font-weight: 500; font-size: 10.5px; color: var(--muted); text-transform: none; letter-spacing: 0; }
.sch-tbl td, .sch-tbl th { padding: 6px 6px; }
.sch-tbl .inp { min-height: 36px; padding: 6px 8px; }
.sch-tbl .inp[type=time] { width: 112px; } .sch-tbl .inp[type=number] { width: 72px; }
.sch-p2 { padding: 10px 12px; border: 1px dashed var(--line); border-radius: 12px; }
/* v7.6 · Editor del día */
.dayed-seg { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; background: var(--card, #fff); }
.dayed-seg.del { opacity: .6; background: #FDF2F2; }
.dayed-h { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.dayed-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.dayed-row .f { margin: 0; }
.dayed-brs { display: grid; gap: 6px; margin-top: 8px; }
.dayed-br { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; } .dayed-br > svg { color: var(--muted); flex: none; }
.dayed-br .inp[type=time] { width: 112px; min-height: 36px; } .dayed-br select.inp { flex: 1 1 160px; min-height: 36px; }
.dayed-tot { margin-top: 10px; padding: 10px 12px; background: var(--soft, #EEF4F8); border-radius: 10px; font-size: 14px; }
/* v7.6 · Empleados: columnas a elegir y filtros en la cabecera */
th.th-f { cursor: pointer; user-select: none; white-space: nowrap; }
th.th-f:hover { background: var(--soft, #EEF4F8); }
.th-m { display: inline-flex; align-items: center; gap: 2px; margin-left: 4px; opacity: .45; vertical-align: middle; font-size: 11px; }
.th-m svg { width: 12px; height: 12px; } .th-m.on, th.th-f:hover .th-m { opacity: 1; color: var(--teal-d, #2f7f80); }
.cols-dlg { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .cols-dlg { grid-template-columns: 1fr; } }
.cols-on { display: grid; gap: 4px; margin-top: 6px; }
.cols-it { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--card, #fff); cursor: grab; }
.cols-it .grip { color: var(--muted); letter-spacing: -2px; }
.cols-all { max-height: 360px; overflow-y: auto; margin-top: 8px; padding-right: 4px; }
.cols-g { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 10px 0 4px; }
.cols-ck { gap: 8px; padding: 3px 0; }

/* v7.6 · Importar empleados */
.impx-step{display:flex;gap:12px;align-items:flex-start;padding:12px 0;border-bottom:1px solid var(--line)}
.impx-step:last-child{border-bottom:0}
.impx-n{flex:none;width:28px;height:28px;border-radius:50%;background:var(--teal,#2a9d8f);color:#fff;font-weight:700;display:grid;place-items:center;font-size:14px}
.impx-step .grow{min-width:0}
.impx-t td{vertical-align:top}
.impx-ch{margin:6px 0 0;padding-left:18px;font-size:13px}
.impx-ch.err{color:var(--err)}
.impx-ch.warn{color:var(--warn,#b7791f)}
.impx-error td{background:color-mix(in srgb,var(--err) 5%,transparent)}
.impx-same{opacity:.7}
@media (max-width:640px){.impx-t th:nth-child(2),.impx-t td:nth-child(2){display:none}.impx-n{width:24px;height:24px;font-size:12px}}
.impx .tbl-wrap,.impx-t{width:100%}

/* v7.6 · Ajustes de fichaje en bloque */
.bk-row{display:flex;align-items:center;gap:10px;padding:9px 0;border-bottom:1px solid var(--line);flex-wrap:wrap}
.bk-row.col{flex-direction:column;align-items:stretch}
.bk-row .seg.sm button{padding:5px 10px;font-size:12.5px}
.bk-types{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:6px;padding:8px 2px 2px}
@media (max-width:640px){.bk-row .seg{width:100%;display:flex}.bk-row .seg button{flex:1}}

/* v7.7 · Avisos por correo */
.mn-k{border:1px solid var(--line);border-radius:12px;padding:12px 14px;margin-top:10px;transition:background .15s}
.mn-k:not(.on){background:var(--soft)}
.mn-k:not(.on) b{color:var(--muted)}
.mn-ed{margin-top:10px;display:grid;gap:8px}
@media (max-width:640px){.mn-k>.row{flex-wrap:wrap}.mn-k [data-ed],.mn-k [data-test]{padding-left:0}}
.rm-list{max-height:45vh;overflow:auto;border:1px solid var(--line);border-radius:10px;padding:6px 10px}
.bk-row>.grow{flex:1 1 220px}
.mn-k .grow{flex:1;min-width:0}

/* v7.8.2 · Los estilos del Perfil de la ficha están en js/core/ficha-perfil.js */
/* v7.8.2 · Los estilos de Ausencias de la ficha están en js/core/ficha-ausencias.js */
/* v7.9.11 · Prenómina › Revisión: propuesta del asistente y botones alineados */
.nm-adv { display: flex; gap: 6px; align-items: flex-start; margin-top: 6px; padding: 6px 8px; border-radius: 8px; background: #f3f0ff; color: #4b3f8f; font-size: 12.5px; line-height: 1.35; }
.nm-adv svg { flex: none; margin-top: 2px; color: #6d5bd0; }
.nm-acts { display: flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: nowrap; }
.nm-acts .btn { margin: 0; }
.nm-rev td { vertical-align: middle; }
.nm-rev td:first-child { min-width: 150px; }
.nm-rev td:nth-child(4) { min-width: 220px; }

/* v7.9.12 · móvil: el modal usa la altura visible real (iOS) y los botones de abajo quedan siempre a la vista */
@media (max-width: 640px) {
  .modal { max-height: 92vh; max-height: 92dvh; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  .modal .m-foot { position: sticky; bottom: calc(-18px - var(--safe-b, 0px)); background: #fff; margin: 14px -18px calc(-18px - var(--safe-b, 0px)); padding: 12px 18px calc(12px + var(--safe-b, 0px)); border-top: 1px solid var(--line, #e3e9ef); z-index: 2; }
}
.big-cal .cell .hol.cz-cal { color: #4a5d78; background: transparent; padding: 0; }
/* v7.9.16 · Mis ausencias: tipos y leyenda recogidos en el móvil; días con color se pueden pulsar; cierres en gris */
.ma-types-t { display: none; }
.ma-legend summary { cursor: pointer; margin-top: 12px; list-style: none; }
.ma-legend summary::-webkit-details-marker { display: none; }
.ma-legend summary::before { content: '▸ '; } .ma-legend[open] summary::before { content: '▾ '; }
.mini-month .d.tap { cursor: pointer; }
.mini-month .d.czd { background: #9aa7b8 !important; color: #fff; }
@media (max-width: 899px) {
  .ma-types-t { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; padding: 2px 0; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
  .ma-types-t svg { transition: transform .15s; }
  .ma-types.open .ma-types-t svg { transform: rotate(180deg); }
  .ma-types:not(.open) #types { display: none; }
  .ma-types.open #types { margin-top: 10px; }
}
/* v7.9.17 · Comunicados: imagen o 1.ª página del PDF en grande dentro de la tarjeta */
.ann-prev { position: relative; display: block; width: 100%; max-width: 640px; padding: 0; margin: 10px 0 4px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--soft); cursor: zoom-in; }
.ann-prev-in { display: grid; place-items: center; min-height: 160px; }
.ann-prev-in img, .ann-prev-in canvas { display: block; width: 100%; height: auto; max-height: 75vh; object-fit: contain; background: #fff; }
.ann-prev-tag { position: absolute; right: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 5px; background: rgba(16,42,67,.78); color: #fff; font-size: 12px; font-weight: 600; padding: 5px 9px; border-radius: 999px; }
.fp-pages { position: absolute; left: 8px; bottom: 8px; background: rgba(255,255,255,.9); color: var(--ink); font-size: 11.5px; font-weight: 600; padding: 3px 8px; border-radius: 999px; }
/* v7.9.17 · Mis ausencias: filtro de meses (Actual · T1–T4 · Todos) y meses con cabecera de color */
.ma-seg { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 14px; background: #fff; margin-bottom: 14px; overflow-x: auto; }
.ma-seg button { flex: 1 0 auto; border: 0; background: none; font: inherit; font-weight: 600; color: var(--muted); padding: 8px 12px; border-radius: 10px; cursor: pointer; white-space: nowrap; }
.ma-seg button.on { background: #17375f; color: #fff; }
.ma-seg button:disabled { opacity: .4; cursor: default; }
#cal .mini-month, #fa-cal .mini-month { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; padding: 0 8px 8px; background: #fff; }
#cal .mini-month h4, #fa-cal .mini-month h4 { margin: 0 -8px 8px; padding: 10px; text-align: center; text-transform: uppercase; letter-spacing: .14em; font-size: 13px; font-weight: 700; color: #fff; background: linear-gradient(120deg, #2f5ea8, #1d3a6b); }
#cal .mini-month.past, #fa-cal .mini-month.past { opacity: .75; }
#cal .mini-month.cur h4, #fa-cal .mini-month.cur h4 { background: linear-gradient(120deg, #2a9d8f, #1d6f78); }
/* v7.9.20 · Ficha › Ausencias: cualquier día se puede pulsar (ver, cambiar, anular o asignar) */
#fa-cal .mini-month .d:not(.out) { cursor: pointer; }
#fa-cal .mini-month .d:not(.out):not(.abs):not(.czd):hover { background: var(--soft); }
.fa-month .c:not(.out) { cursor: pointer; }
.fa-month .c:not(.out):hover { border-color: var(--teal); }
.fa-day-acts { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }

/* v7.9.28 · Ficha › Datos laborales: histórico de cargos como tarjetas */
.fp-jobs { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin: 4px 0 8px; }
.fp-job { position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 12px 40px 12px 12px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--card); }
.fp-job.now { border-color: var(--teal); box-shadow: inset 3px 0 0 var(--teal); }
.fp-job-ic { width: 32px; height: 32px; flex: none; border-radius: 9px; display: grid; place-items: center; background: var(--soft); color: var(--teal); }
.fp-job-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; align-items: flex-start; }
.fp-job-t b { line-height: 1.25; }
.fp-job-x { position: absolute; top: 8px; right: 8px; opacity: .55; }
.fp-job:hover .fp-job-x, .fp-job-x:focus-visible { opacity: 1; }
/* v7.9.28 · barra de formato para textos con **negrita** (asistente) */
.md-bar { display: flex; gap: 2px; padding: 4px; border: 1px solid var(--line-2); border-bottom: 0; border-radius: 12px 12px 0 0; background: var(--soft); }
.md-bar + textarea.inp { border-top-left-radius: 0; border-top-right-radius: 0; }

/* v7.9.31 · Configuración › Módulos: submódulos con su propio interruptor */
.li.mod-sub { margin-left: 22px; padding-top: 8px; padding-bottom: 8px; padding-left: 14px; border-left: 3px solid var(--line-2); border-bottom: 0; }
.li.mod-sub b { font-weight: 600; font-size: .95em; }
.mod-sub-sp { visibility: hidden; }
/* v8.0.1 · frase con casillas numéricas dentro (fluye como texto y no se parte en columnas) */
.inl { display: block; line-height: 2.5; }
.inl > input[type=checkbox] { vertical-align: middle; margin: 0 6px 0 0; }
.inl > .inp { display: inline-block; vertical-align: middle; margin: 0 4px; line-height: normal; }
/* v8.0.1 · tablas que en el móvil se ven como fichas (una por fila, cada dato con su título) */
@media (max-width: 600px) {
  table.mcards, table.mcards tbody, table.mcards tfoot { display: block; width: 100%; }
  table.mcards thead { display: block; }
  table.mcards thead tr { display: flex; }
  table.mcards thead th { display: none; }
  table.mcards thead th:has(input[type=checkbox]) { display: flex; align-items: center; gap: 8px; width: auto !important; border: 0; padding: 4px 2px; }
  table.mcards thead th:has(input[type=checkbox])::after { content: "Seleccionar todas"; font-weight: 600; }
  table.mcards tr { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px 14px; padding: 11px 2px; border-bottom: 1px solid var(--line-2); }
  table.mcards td { display: block; flex: 1 1 40%; min-width: 0; padding: 0; border: 0; text-align: left !important; white-space: normal; }
  table.mcards td[data-l]:not([data-l=""])::before { content: attr(data-l); display: block; font-size: 11px; font-weight: 600; color: var(--muted); margin-bottom: 1px; }
  table.mcards td.mc-main { flex: 1 1 calc(100% - 44px); font-size: 15px; }
  table.mcards td.mc-main::before { display: none !important; }
  table.mcards td.mc-chk { flex: 0 0 auto; padding-top: 2px; }
  table.mcards td.mc-chk::before, table.mcards td.mc-empty { display: none !important; }
  table.mcards td[colspan] { flex: 1 1 100%; }
  table.mcards tfoot tr { font-weight: 700; }
}
/* v8.0.1 · Bolsa de horas en el móvil: la barra ocupa toda la fila y las cifras no se parten */
.bh-bar b.num { white-space: nowrap; }
@media (max-width: 600px) { .bh-bar { flex: 1 1 100% !important; } .bh-act { margin-left: auto; } }
/* v8.0.1 · zonas de pulsación más cómodas en el móvil */
@media (max-width: 600px) {
  .stars.edit button { min-width: 38px; min-height: 38px; font-size: 28px; }
  .docid-hint .linkish { display: inline-block; padding: 8px 2px; margin-left: 2px; }
  .tpl-sent .chip { min-height: 34px; padding: 6px 12px; }
  .ma-types-t { padding: 10px 0; min-height: 40px; }
}
/* v8.3.0 · Plan y consumo (plantilla contratada frente a plantilla media) */
.pc-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 12px; }
.pc-kpis .kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 12px 14px; }
.pc-kpis .kpi b { font-size: 22px; }
.pc-price { display: flex; flex-wrap: wrap; gap: 6px 18px; background: var(--soft); border-radius: var(--radius-s); padding: 10px 14px; margin-bottom: 12px; }
.pc-note { border-left: 4px solid var(--teal); }
.pc-chart { width: 100%; height: auto; display: block; }
.pc-chart .pc-grid { stroke: var(--line); stroke-width: 1; }
.pc-chart .pc-ax { fill: var(--muted); font-size: 11px; }
.pc-chart .pc-bar { fill: var(--teal); }
.pc-chart .pc-bar.over { fill: var(--warn); }
.pc-chart .pc-line { stroke: var(--navy); stroke-width: 2; stroke-dasharray: 6 4; }
.pc-chart .pc-line2 { stroke: var(--warn); stroke-width: 1; stroke-dasharray: 2 4; }
.pc-chart .pc-lbl { fill: var(--navy); font-size: 11px; font-weight: 700; }
.sa-alerts { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.pc-price .pc-total { flex-basis: 100%; font-size: 14px; }

/* v8.6.0 · Filtros de las matrices (EPIs, Formación) y cabeceras legibles y pulsables */
.mf-bar { padding: 10px 12px; margin-bottom: 12px; }
.mf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; }
.mf-bar [hidden] { display: none !important; }
.mf-q { position: relative; display: block; }
.mf-q svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.mf-q .inp { padding-left: 32px; width: 100%; }
@media (max-width: 640px) { .mf-grid { grid-template-columns: 1fr 1fr; } .mf-q { grid-column: 1 / -1; } }
.mtx-wrap { padding: 0; overflow: auto; max-height: 72vh; }
.tbl.mtx thead th { position: sticky; top: 0; background: var(--card); z-index: 2; box-shadow: 0 1px 0 var(--line); }
.tbl.mtx thead th:first-child { z-index: 3; }
.tbl.mtx th.mtx-h { vertical-align: bottom; padding: 6px 4px; width: 104px; min-width: 104px; max-width: 104px; white-space: normal; }
.mtx-hb { all: unset; box-sizing: border-box; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; width: 100%;
  text-align: center; white-space: normal; font-size: 12px; font-weight: 700; line-height: 1.25; cursor: pointer; padding: 4px 6px; border-radius: 8px; color: var(--ink); hyphens: auto; word-break: break-word; }
.mtx-hb:hover, .mtx-hb:focus-visible { background: var(--teal-050, rgba(42,161,152,.12)); color: var(--teal); outline: none; }
.tbl.mtx td.mcell { width: auto; }
/* v8.7.0 · Grupos de empresas */
.gr-blocks { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 18px; }
.gr-b { align-items: flex-start; } .gr-b input { margin-top: 3px; }
.gr-cos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 14px; max-height: 260px; overflow: auto; padding: 4px 0; }
.chip.grp { background: #EEE8FB; color: #4B3A8F; }
/* v8.7.1 · App «OPEXIA Chats» (whatsapp.html): solo la bandeja, a pantalla completa */
body.wa-app .sidebar, body.wa-app .tabbar, body.wa-app .topbar, body.wa-app .as-fab, body.wa-app .as-panel, body.wa-app #playbar { display: none !important; }
body.wa-app .content { padding: calc(10px + env(safe-area-inset-top, 0px)) 12px calc(14px + env(safe-area-inset-bottom, 0px)); max-width: 1400px; }
body.wa-app .page-head { margin-bottom: 8px; }
body.wa-app .page-head h1 { font-size: 20px; }
body.wa-app .page-head p { display: none; }
body.wa-app .wa-wrap { min-height: calc(100dvh - 150px); }
body.wa-app .wa-items { max-height: calc(100dvh - 250px); }
body.wa-app .wa-msgs { max-height: calc(100dvh - 330px); }
@media (max-width: 900px) { body.wa-app .wa-msgs { max-height: calc(100dvh - 300px); } body.wa-app #wa-quota { display: none; } }
body.wa-app .page-head { flex-direction: row; align-items: center; flex-wrap: nowrap; }
body.wa-app .page-head .actions { flex-wrap: nowrap; gap: 6px; margin-left: auto; }
@media (max-width: 900px) {
  /* Conversación abierta: ocupa toda la pantalla, con los mensajes lo más grandes posible */
  body.wa-app .content:has(.wa-wrap.thread) .page-head, body.wa-app .content:has(.wa-wrap.thread) #wa-warn, body.wa-app .content:has(.wa-wrap.thread) #wa-quota { display: none; }
  body.wa-app .wa-wrap.thread { min-height: 0; }
  body.wa-app .wa-wrap.thread .wa-th { height: calc(100dvh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); padding: 8px !important; }
  body.wa-app .wa-wrap.thread .wa-msgs { flex: 1; max-height: none; min-height: 0; }
  body.wa-app .wa-th .chip { font-size: 11.5px; padding: 2px 8px; min-height: 0; }
  body.wa-app .wa-th .btn.sm { min-height: 34px; padding: 4px 10px; }
}
@media (max-width: 900px) { body.wa-app .wa-comp textarea { min-height: 52px; } body.wa-app .wa-win { font-size: 11px; } }
/* v8.7.2 · Plantilla propia / ETT */
.chip.ett { background: #FDEBD3; color: #8A4B08; font-weight: 700; }
.chip.own { background: #E3F1EE; color: #1F6B5C; font-weight: 600; }
.chip.lg { font-size: 12.5px; padding: 3px 10px; vertical-align: middle; margin-left: 6px; }

/* ---------- v9.1 · Productividad ---------- */
.pv-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 14px; }
.pv-kpis > div { background: var(--card, #fff); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.pv-kpis b { display: block; font-size: 26px; color: var(--navy); font-variant-numeric: tabular-nums; }
.pv-kpis span { color: var(--muted); font-size: 13px; }
.pv-board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: flex-start; margin-bottom: 14px; }
.pv-col { flex: 0 0 260px; background: var(--card, #fff); border: 1px solid var(--line); border-top: 5px solid var(--c); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.pv-col.ro { opacity: .75; }
.pv-col header { display: flex; align-items: center; gap: 8px; } .pv-col header b { flex: 1; color: var(--navy); } .pv-col header small { color: var(--muted); font-size: 11px; }
.pv-col footer { font-size: 12px; color: var(--muted); }
.pv-drop { min-height: 44px; border-radius: 10px; padding: 6px; background: color-mix(in srgb, var(--c) 7%, transparent); display: flex; flex-direction: column; gap: 5px; transition: background .15s; }
.pv-drop.over { background: color-mix(in srgb, var(--c) 25%, transparent); outline: 2px dashed var(--c); }
.pv-drop h4 { margin: 0 0 2px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); display: flex; justify-content: space-between; }
.pv-empty { margin: 4px; font-size: 12px; color: var(--muted); }
.pv-ch { display: flex; align-items: center; gap: 7px; background: var(--card, #fff); border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px 3px 3px; cursor: grab; font-size: 13px; user-select: none; }
.pv-ch span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-ch small { color: var(--muted); font-size: 11px; } .pv-ch em { color: var(--warn); display: inline-flex; }
.pv-ch .av { width: 24px; height: 24px; font-size: 10px; flex: none; }
.pv-ch.sel { background: var(--teal); color: #fff; border-color: var(--teal); } .pv-ch.sel small { color: #E4F4F4; }
.pv-ch.brk { border-style: dashed; }
.pv-act { position: sticky; bottom: 12px; display: none; gap: 10px; align-items: center; background: var(--navy); color: #fff; border-radius: 14px; padding: 10px 14px; box-shadow: 0 10px 30px rgba(0,0,0,.2); z-index: 5; }
.pv-act.on { display: flex; } .pv-act span { flex: 1; }
.pv-zp { display: flex; flex-direction: column; gap: 10px; }
.pv-zs { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; border-radius: 12px; border-left: 5px solid var(--c); background: color-mix(in srgb, var(--c) 8%, transparent); }
.pv-zb { border: 1px solid var(--line); background: var(--card, #fff); border-radius: 10px; padding: 8px 12px; cursor: pointer; font: inherit; text-align: left; }
.pv-zb b { display: block; } .pv-zb small { color: var(--muted); font-size: 12px; } .pv-zb:hover { border-color: var(--c); }
.pv-zb.ln { align-self: center; }
.pv-hours { display: flex; gap: 6px; align-items: flex-end; height: 150px; }
.pv-hours div { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 3px; min-width: 22px; }
.pv-hours i { display: block; width: 100%; background: var(--teal); border-radius: 6px 6px 2px 2px; min-height: 2px; }
.pv-hours b { font-size: 11px; } .pv-hours span { font-size: 11px; color: var(--muted); }
.pv-plist { max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; display: flex; flex-direction: column; gap: 4px; }
.pv-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.pv-cat { margin-bottom: 10px; } .pv-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.pv-tag { border: 1px solid var(--line); background: var(--card, #fff); border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.pv-tag small { color: var(--muted); } .pv-tag.off { opacity: .5; text-decoration: line-through; }
.pv-kind { display: flex; flex-direction: column; gap: 4px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; } .pv-kind svg { color: var(--teal); }

/* v9.2 · Productividad: dispositivos en 4 bloques, análisis de una persona, enlaces a personas */
.pv-kinds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1100px) { .pv-kinds { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .pv-kinds { grid-template-columns: minmax(0, 1fr); } }
.pv-who { padding: 0; min-height: 0; text-align: left; font-weight: 600; }
.pv-kpis > div.ok { border-color: color-mix(in srgb, var(--ok, #2f9e44) 45%, var(--line)); } .pv-kpis > div.ok b { color: var(--ok, #2f9e44); }
.pv-kpis > div.warn { border-color: color-mix(in srgb, var(--warn, #d9822b) 45%, var(--line)); } .pv-kpis > div.warn b { color: var(--warn, #b7791f); }
.pv-kpis > div.err { border-color: color-mix(in srgb, var(--err, #d64545) 45%, var(--line)); } .pv-kpis > div.err b { color: var(--err, #d64545); }
.pv-kpis span { font-size: 13px; color: var(--muted); }
.ok-t { color: var(--ok, #2f9e44); } .warn-t { color: var(--warn, #b7791f); } .err-t { color: var(--err, #d64545); }
.pp-chart { width: 100%; height: auto; display: block; }
.pp-leg { gap: 6px 16px; margin-top: 6px; color: var(--muted); } .pp-leg i { display: inline-block; width: 14px; height: 8px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }
.pp-leg i.d { height: 0; border-top: 2.5px dashed; border-radius: 0; background: none; }
.pp-bar { height: 8px; border-radius: 4px; background: var(--soft, #f0f4f8); overflow: hidden; margin-bottom: 2px; } .pp-bar i { display: block; height: 100%; background: var(--teal, #2a9d8f); }
.pp-tabs { margin-bottom: 12px; }
.pv-ex { width: auto; margin: 0 0 4px; } .pv-ex th, .pv-ex td { padding: 4px 10px; }
.cfg-ret { margin-left: 12px; font-weight: 600; }
.kt-t td { vertical-align: middle; }
/* v9.4.0 · Permisos y roles */
.perm-roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 10px; margin-top: 12px; }
.perm-roles > .perm-role { margin: 0 !important; }
.perm-role { padding: 12px 14px; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.perm-role small { display: block; margin-top: 2px; }
.perm-new { align-items: center; justify-content: center; text-align: center; border: 1.5px dashed var(--line, #d6dde6); background: transparent; cursor: pointer; font: inherit; color: inherit; min-height: 118px; }
.perm-new:hover { border-color: var(--teal, #14b8a6); }
.perm-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--teal, #14b8a6) 10%, #fff); position: sticky; top: 0; z-index: 3; }
.perm-bulk .inp.sm, .perm-tbl .inp.sm { min-height: 32px; padding: 4px 8px; font-size: 13px; width: auto; max-width: 190px; }
.perm-wrap { margin-top: 10px; max-height: 70vh; overflow: auto; }
.perm-tbl { border-collapse: separate; border-spacing: 0; }
.perm-tbl thead th { position: sticky; top: 0; z-index: 2; background: var(--card, #fff); vertical-align: bottom; }
.perm-tbl .pm-name { position: sticky; left: 0; z-index: 1; background: var(--card, #fff); min-width: 170px; text-align: left; font-weight: 400; }
.perm-tbl thead .pm-name { z-index: 3; }
.perm-tbl .pm-name b, .perm-tbl .pm-name small { display: block; }
.perm-tbl .pm-sel { width: 30px; }
.perm-tbl .pm-c { text-align: center; padding-left: 4px; padding-right: 4px; }
.perm-tbl th.pm-v { height: 96px; white-space: nowrap; }
.perm-tbl th.pm-v span { display: inline-block; writing-mode: vertical-rl; transform: rotate(180deg); font-size: 12px; }
.perm-tbl .pm-full { border-left: 2px solid var(--line, #e5e7eb); }
.perm-tbl .pm-fl { background: color-mix(in srgb, var(--teal, #14b8a6) 5%, transparent); }
.perm-tbl td.pm-fl:first-of-type, .perm-tbl th.pm-fl:first-of-type { border-left: 2px solid var(--line, #e5e7eb); }
.perm-tbl tr.sel td, .perm-tbl tr.sel th { background: color-mix(in srgb, var(--teal, #14b8a6) 9%, #fff); }
.perm-tbl .pm-na { color: #c3ccd6; }
.perm-tbl input[type=checkbox] { width: 18px; height: 18px; cursor: pointer; }
.perm-tbl input[type=checkbox]:disabled { cursor: not-allowed; opacity: .55; }
.perm-tbl .pm-other { min-width: 120px; }
.perm-areas { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 4px 12px; }
.perm-filters .inp { width: auto; max-width: 220px; flex: 0 1 auto; min-height: 38px; }
.perm-tbl td .inp.sm { max-width: 150px; }
.perm-tbl td:nth-child(4) .inp.sm { max-width: 125px; }
@media (max-width: 640px) { .perm-filters .inp { flex: 1 1 140px; max-width: none; } .perm-tbl .pm-name { min-width: 130px; } .perm-bulk .inp.sm { flex: 1 1 140px; max-width: none; } }
/* v9.5.0 · Currículums */
.cv-filters .inp { width: auto; max-width: 240px; flex: 0 1 auto; min-height: 38px; }
.cv-filters input[type=search] { flex: 1 1 220px; max-width: 320px; }
@media (max-width: 640px) { .cv-filters .inp { flex: 1 1 140px; max-width: none; } }
.cv-star { color: #D5DEE9; font-size: 15px; letter-spacing: -1px; } .cv-star.on { color: #F2A33A; }
.cv-stars { white-space: nowrap; }
.cv-tbl td { vertical-align: middle; } .cv-tbl tr.sel td { background: color-mix(in srgb, var(--teal, #14b8a6) 9%, #fff); }
.cv-dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: 14px; }
.cv-dl dt { color: var(--muted, #6B7A90); font-weight: 600; } .cv-dl dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) { .cv-dl { grid-template-columns: 1fr; gap: 0; } .cv-dl dd { margin-bottom: 8px; } }
.cv-rate { display: flex; gap: 2px; } .cv-rate button { border: 0; background: none; font-size: 26px; line-height: 1; color: #D5DEE9; cursor: pointer; padding: 2px; }
.cv-rate button.on { color: #F2A33A; }
.cv-qs td { vertical-align: middle; } .cv-qa { white-space: nowrap; text-align: end; }
.cv-cfg .card h3 { margin-top: 0; }
/* v9.5.1 · Ojo para ver la contraseña */
.pw-wrap { position: relative; display: block; }
.pw-wrap > .inp { padding-right: 44px; width: 100%; box-sizing: border-box; }
[dir=rtl] .pw-wrap > .inp { padding-right: 12px; padding-left: 44px; }
.pw-eye { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); width: 34px; height: 34px; display: grid; place-items: center; border: 0; background: transparent; color: var(--muted, #6B7A90); border-radius: 8px; cursor: pointer; padding: 0; }
[dir=rtl] .pw-eye { right: auto; left: 6px; }
.pw-eye:hover, .pw-eye:focus-visible { color: var(--ink, #102A43); background: rgba(0,0,0,.05); }
.pw-eye .i { width: 19px; height: 19px; }
.inp.secret.shown { -webkit-text-security: none; text-security: none; }
input[type=password]::-ms-reveal { display: none; }

/* v9.5.2 · Festivos como las ausencias: círculo rojo con el número en blanco */
.big-cal .cell.hd .n > span:first-child { background: var(--err, #d64545); color: #fff; border-radius: 50%; min-width: 22px; height: 22px; display: inline-grid; place-items: center; padding: 0 3px; box-sizing: border-box; }
.cal-key.hd { background: var(--err, #d64545); border-radius: 50%; }
/* v9.6.0 · Añadir a mi calendario */
@media (max-width: 560px) { .hide-xs { display: none; } }
.cf-btns { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 8px; }
.cf-btns .btn { justify-content: flex-start; min-height: 46px; }
.cf-g, .cf-o { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; color: #fff; font-size: 13px; font-weight: 800; }
.cf-g { background: #4285F4; } .cf-o { background: #0F6CBD; }

/* ===== v9.7.0 · Puestos de trabajo (DPT) ===== */
.dpt-pdf .dpt-pdf-frame:empty { display: none; }
.dpt-pdf .dpt-pdf-frame { margin-top: 12px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; height: 70vh; min-height: 420px; }
.dpt-pdf iframe { width: 100%; height: 100%; border: 0; display: block; }
.dpt-hint { display: flex; align-items: center; gap: 12px; border-left: 4px solid var(--teal); }
.dpt-hint > svg { flex: none; color: var(--teal); }
.dpt-hint { flex-wrap: wrap; } .dpt-hint > div { flex: 1 1 220px; min-width: 0; } .dpt-hint > .btn { white-space: nowrap; margin-left: auto; }
.dpt-hint.warn { border-left-color: var(--warn); } .dpt-hint.warn > svg { color: var(--warn); }
.dpt-hint.ok { border-left-color: var(--ok); } .dpt-hint.ok > svg { color: var(--ok); }
.dpt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.dpt-grid > .card.dpt-card { margin: 0; }
.dpt-card { display: flex; flex-direction: column; gap: 8px; color: inherit; text-decoration: none; margin: 0; transition: box-shadow .15s, transform .15s; min-height: 170px; position: relative; overflow: hidden; }
.dpt-card:hover { box-shadow: var(--shadow-l); transform: translateY(-1px); }
.dpt-ic { flex: none; width: 38px; height: 38px; border-radius: 11px; background: var(--info-bg); color: var(--brand, var(--navy)); display: grid; place-items: center; }
.dpt-n { font-size: 15px; line-height: 1.25; }
.dpt-mis { margin: 0; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.dpt-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--soft); }
.dpt-prog i { display: block; height: 100%; background: var(--teal); }
.dpt-map { overflow-x: auto; padding: 4px 0 10px; }
.dpt-tree, .dpt-tree ul { display: flex; justify-content: center; list-style: none; margin: 0; padding: 16px 0 0; position: relative; }
.dpt-tree { padding-top: 0; min-width: max-content; }
.dpt-tree li { display: flex; flex-direction: column; align-items: center; padding: 16px 5px 0; position: relative; }
.dpt-tree > li { padding-top: 0; }
.dpt-tree li::before, .dpt-tree li::after { content: ''; position: absolute; top: 0; width: 50%; height: 16px; border-top: 1.5px solid var(--line-2); }
.dpt-tree li::before { right: 50%; } .dpt-tree li::after { left: 50%; border-left: 1.5px solid var(--line-2); }
.dpt-tree li:only-child::before, .dpt-tree li:only-child::after, .dpt-tree > li::before, .dpt-tree > li::after { display: none; }
.dpt-tree li:only-child { padding-top: 0; } .dpt-tree li:first-child::before, .dpt-tree li:last-child::after { border: 0; }
.dpt-tree li:last-child::before { border-right: 1.5px solid var(--line-2); }
.dpt-tree ul::before { content: ''; position: absolute; top: 0; left: 50%; border-left: 1.5px solid var(--line-2); height: 16px; }
.dpt-node { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 150px; padding: 9px 8px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); color: inherit; text-decoration: none; text-align: center; }
.dpt-node:hover { border-color: var(--teal); }
.dpt-node b { font-size: 12.5px; line-height: 1.25; } .dpt-node small { font-size: 11px; color: var(--muted); }
.dpt-node span { font-size: 11px; color: var(--muted); display: inline-flex; gap: 3px; align-items: center; }
.dpt-node.draft { border-style: dashed; }
.dpt-bar { height: 8px; border-radius: 4px; background: var(--soft); overflow: hidden; } .dpt-bar i { display: block; height: 100%; background: var(--teal); border-radius: 4px; }
.dpt-dots { display: inline-flex; gap: 3px; } .dpt-dots i { width: 14px; height: 7px; border-radius: 3px; background: var(--line); } .dpt-dots i.on { background: var(--teal); }
.dpt-sec h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.dpt-sec h4 { font-size: 13px; margin: 14px 0 6px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.dpt-num { width: 26px; height: 26px; border-radius: 8px; background: var(--brand, var(--navy)); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 800; flex: none; }
.dpt-kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 18px; }
.dpt-kv span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 600; }
.dpt-kv b { font-weight: 600; white-space: pre-line; }
.dpt-mission { border-left: 5px solid var(--brand, var(--navy)); background: var(--info-bg); }
.dpt-mission span { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; font-weight: 800; color: var(--brand, var(--navy)); }
.dpt-mission p { margin: 6px 0 0; font-size: 16px; line-height: 1.5; font-weight: 500; }
.dpt-ul { margin: 0; padding-left: 20px; } .dpt-ul li { margin: 3px 0; }
.dpt-fn > div { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--line); }
.dpt-fn p { margin: 1px 0 0; flex: 1; } .dpt-fn .secundaria p { color: var(--muted); }
.dpt-fi { flex: none; width: 22px; height: 22px; border-radius: 7px; background: var(--info-bg); color: var(--brand, var(--navy)); display: grid; place-items: center; font-size: 11px; font-weight: 800; }
.dpt-2c { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dpt-comp > div { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.dpt-comp small { width: 76px; text-align: right; color: var(--muted); }
.dpt-org { display: flex; flex-direction: column; align-items: center; margin-bottom: 12px; }
.dpt-ob { border: 1.5px solid var(--line-2); border-radius: 10px; padding: 7px 12px; font-weight: 600; font-size: 13px; background: var(--card); text-align: center; }
.dpt-ob.me { background: var(--brand, var(--navy)); border-color: var(--brand, var(--navy)); color: #fff; }
.dpt-ol { width: 1.5px; height: 14px; background: var(--line-2); }
.dpt-och { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.dpt-tpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.dpt-tpl { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--card); cursor: pointer; text-align: left; font: inherit; color: inherit; }
.dpt-tpl:hover, .dpt-tpl:focus-visible { border-color: var(--teal); }
.dpt-tpl small { color: var(--muted); }
.dpt-menu .li { width: 100%; border: 0; background: none; font: inherit; cursor: pointer; text-align: left; color: inherit; }
.dpt-pick { max-height: 46vh; overflow: auto; }
.dpt-pick .li { cursor: pointer; }
/* editor */
.dpt-ed { display: grid; grid-template-columns: 190px 1fr; gap: 16px; align-items: start; padding-bottom: 12px; }
.dpt-nav { position: sticky; top: calc(var(--top-h, 60px) + 12px); display: flex; flex-direction: column; gap: 2px; }
.dpt-nav a { padding: 7px 10px; border-radius: 9px; color: var(--muted); text-decoration: none; font-size: 13.5px; font-weight: 600; }
.dpt-nav a:hover { background: var(--soft); color: var(--ink); }
.dpt-form { min-width: 0; }
.dpt-es { scroll-margin-top: calc(var(--top-h, 60px) + 12px); }
.dpt-es h3 { margin-top: 0; } .dpt-es h4 { font-size: 13px; margin: 14px 0 6px; }
.dpt-list, .dpt-rows { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.dpt-list > .btn, .dpt-rows > .btn { align-self: flex-start; }
.dl-row { display: flex; gap: 6px; align-items: center; } .dl-row .inp { flex: 1; }
.dr-row { display: grid; gap: 6px; align-items: center; }
.dpt-fnr { grid-template-columns: 20px 1fr 120px 136px auto; align-items: start; padding: 8px; border: 1px solid var(--line); border-radius: 12px; }
.dpt-fnr .dpt-drag { color: var(--muted); padding-top: 10px; }
.dpt-mv { display: flex; gap: 2px; }
.dpt-2r { grid-template-columns: 1fr 1fr auto; }
.dpt-3r { grid-template-columns: 1fr 110px auto auto; }
.dpt-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.dpt-quick .chip { cursor: pointer; border: 0; font: inherit; font-size: 12px; font-weight: 600; }
.dpt-quick .chip:hover { background: var(--info-bg); color: var(--ink); }
.dpt-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 14px; }
.dpt-checks label { gap: 8px; align-items: center; } .dpt-checks .tiny { margin-left: auto; }
.dpt-sk .inp.sm { width: 64px; padding: 4px 6px; min-height: 0; }
.dpt-val .li { gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.dpt-seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; flex: none; }
.dpt-seg button { width: 36px; height: 34px; border: 0; background: var(--card); font: inherit; font-weight: 700; cursor: pointer; color: var(--muted); }
.dpt-seg button + button { border-left: 1px solid var(--line); }
.dpt-seg button.on { background: var(--brand, var(--navy)); color: #fff; }
.dpt-vt { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--info-bg); font-size: 15px; }
.dpt-save { position: sticky; bottom: 0; z-index: 30; display: flex; gap: 10px; align-items: center; padding: 10px 14px; margin: 0 -2px; background: var(--card); border: 1px solid var(--line); border-radius: 14px 14px 0 0; box-shadow: 0 -6px 20px rgba(0, 0, 0, .07); }
@media (max-width: 860px) {
  .dpt-ed { grid-template-columns: 1fr; }
  .dpt-nav { position: sticky; top: var(--top-h, 56px); z-index: 5; flex-direction: row; overflow-x: auto; background: var(--bg); padding: 6px 0; margin: 0 -4px; }
  .dpt-nav a { white-space: nowrap; background: var(--card); border: 1px solid var(--line); }
  .dpt-fnr { grid-template-columns: 1fr 1fr; } .dpt-fnr .dpt-drag { display: none; } .dpt-fnr textarea { grid-column: 1 / -1; } .dpt-fnr .dpt-mv { grid-column: 1 / -1; justify-content: flex-end; }
  .dpt-2c { grid-template-columns: 1fr; }
  .dpt-3r { grid-template-columns: 1fr 90px auto; } .dpt-3r label { grid-column: 1 / 3; }
}
@media (max-width: 959px) { .dpt-save { bottom: calc(var(--tab-h) + var(--safe-b, 0px)); } }
@media (min-width: 960px) { .dpt-save { padding-right: 76px; } }

/* v9.8.1 · Navegador de fecha: ‹ fecha › Hoy en una sola línea (también en el móvil) */
.date-nav { display: flex; flex-wrap: nowrap; align-items: center; gap: 4px; min-width: 0; }
.date-nav .inp { flex: 0 1 165px; width: 165px; min-width: 0; min-height: 38px; text-align: center; -webkit-appearance: none; appearance: none; }
.date-nav .inp::-webkit-date-and-time-value { text-align: center; }
.date-nav .icon-btn { flex: none; color: var(--ink); }
.date-nav .btn { flex: none; margin-left: 4px; }
@media (max-width: 600px) { .date-nav { width: 100%; } .date-nav .inp { flex: 1 1 auto; width: auto; } }

/* v9.8.6 · Cabecera de la ficha en el móvil: foto y nombre en una fila, botones debajo a todo el ancho
   (con un solo botón —p. ej. persona desactivada— el nombre quedaba aplastado en una columna estrecha) */
@media (max-width: 640px) {
  .page-head.ef-head { flex-wrap: wrap; align-items: center; row-gap: 10px; }
  .page-head.ef-head h1 { font-size: 22px; line-height: 1.2; }
  .page-head.ef-head .ef-acts { flex: 1 0 100%; justify-content: flex-start; }
  .page-head.ef-head .ef-acts:empty { display: none; }
}
/* v9.8.6 · Tarjetas de cifras en fila (Empleados, Mis fichajes…): sin el margen de «.card + .card»,
   que bajaba la 2.ª y la 3.ª tarjeta y las dejaba descuadradas */
.kpis3 > .card + .card, .kpis > .card + .card, .grid > .card + .card { margin-top: 0; }
.kpis3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpis3 > * { min-width: 0; }
/* v9.9.1 · el texto en una línea solo en las tarjetas con marco (en «Mis fichajes» los textos son largos y se parten) */
@media (max-width: 520px) { .kpis3 { gap: 8px; } .kpis3 > .card.kpi { padding: 10px 12px; } .kpis3 > .card.kpi span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } }

/* v9.8.7 · Vista previa de impresión en el móvil: respeta la barra de estado (iPhone), título y X en una fila
   y los tres botones en otra, sin que «Compartir» quede solo debajo */
.pv-x { flex: none; }
@media (max-width: 640px) {
  .pv-h { padding: calc(10px + env(safe-area-inset-top, 0px)) 10px 10px 14px; gap: 8px; }
  .pv-t { flex: 1 1 0; order: 0; }
  .pv-x { order: 1; }
  .pv-acts { order: 2; width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .pv-acts .btn { width: 100%; justify-content: center; padding-left: 6px; padding-right: 6px; white-space: nowrap; }
  .pv-dl { display: none; }
  .pv-b { padding-bottom: env(safe-area-inset-bottom, 0px); }
}
/* v9.9.1 · En el móvil, la burbuja del asistente no tapa los botones de las barras fijas de abajo (Guardar del editor de puestos, acciones de Productividad) */
@media (max-width: 959px) { .dpt-save, .pv-act { padding-right: 60px; } }
/* v9.9.1 · Avisos por correo en el móvil: el título y la explicación ocupan la fila y «Texto» / «Enviarme una prueba» bajan debajo (antes quedaba una palabra por línea) */
@media (max-width: 640px) { .mn-k > .row > .grow { flex: 1 1 calc(100% - 64px); } .mn-k > .row > [data-ed] { margin-left: 54px; } }
/* v9.9.2 · Móviles pequeños (320–380 px): Mis ausencias sin cortes (saldo en tres columnas que caben, selector de tipo y cabecera que bajan de línea) */
.bal3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bal3 .kpi span { overflow-wrap: anywhere; }
#bal .card-head { flex-wrap: wrap; row-gap: 4px; }
@media (max-width: 380px) {
  .bal3 { gap: 6px; } .bal3 .kpi b { font-size: 16px; } .bal3 .kpi span { font-size: 11px; }
  .ma-types-t { flex-wrap: wrap; row-gap: 2px; }
}
/* v9.9.2 · Asistente de fichajes en móviles pequeños: las propuestas no se salen (la columna puede encogerse) */
@media (max-width: 860px) { .as-it { grid-template-columns: minmax(0, 1fr); } .as-it > * { min-width: 0; } .as-fix .inp { max-width: 100%; } .as-act { flex-wrap: wrap; } }
/* v9.9.2 · Móvil en horizontal (poca altura): barra de abajo compacta, solo iconos, para dejar más sitio a la pantalla */
@media (max-width: 959px) and (max-height: 500px) and (orientation: landscape) {
  :root { --tab-h: 46px; }
  .tabbar a { font-size: 0; gap: 0; }
  .tabbar .tb-badge { font-size: 10px; }
  .tabbar a .fab-c { width: 42px; height: 42px; margin-top: -8px; }
}
/* v9.9.2 · Selectores en pastilla (.seg) en el móvil: en una línea, desplazables si no caben (antes «Accesos» bajaba a otra línea dentro de la pastilla) */
@media (max-width: 640px) { .seg { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; } .seg::-webkit-scrollbar { display: none; } .seg > button { flex: 0 0 auto; white-space: nowrap; } }
/* v9.9.2 · En árabe (de derecha a izquierda), las flechas de anterior / siguiente y volver apuntan hacia el lado correcto */
html[dir="rtl"] svg[data-i="left"], html[dir="rtl"] svg[data-i="right"] { transform: scaleX(-1); }

/* v10.0 · Productividad: informes, dimensionar y ajustes */
.pv-bar-in { height: 4px; background: var(--soft); border-radius: 3px; margin-top: 4px; min-width: 80px; max-width: 220px; overflow: hidden; }
.pv-bar-in i { display: block; height: 100%; background: var(--teal, #2BB3A3); border-radius: 3px; }
.pv-step { display: inline-flex; align-items: center; gap: 4px; }
.pv-step button { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-weight: 800; font-size: 16px; cursor: pointer; color: var(--ink); }
.pv-step input { text-align: center; }
.pv-sim { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.pv-sim > div { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; text-align: center; background: #fff; }
.pv-sim > div.on { border-color: var(--teal, #2BB3A3); box-shadow: 0 0 0 2px rgba(43,179,163,.25); }
.pv-sim b { display: block; font-size: 22px; } .pv-sim span { font-size: 12px; color: var(--muted); display: block; }
.pv-sim em { display: block; font-style: normal; font-weight: 700; margin-top: 4px; } .pv-sim small { color: var(--muted); }
.pv-dow { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.pv-dow input { position: absolute; opacity: 0; pointer-events: none; }
.pv-dow span { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); font-weight: 700; font-size: 13px; }
.pv-dow input:checked + span { background: var(--teal, #2BB3A3); color: #fff; border-color: transparent; }
.pv-dim input.num, .tbl input.num { text-align: right; }
@media (max-width: 640px) { .pv-dim td, .pv-dim th { padding-left: 6px; padding-right: 6px; } }
/* v10.0 · Dimensionar en el móvil: cada sección en una tarjeta */
@media (max-width: 700px) {
  .pv-dimw { overflow: visible; }
  .pv-dim thead { display: none; }
  .pv-dim, .pv-dim tbody, .pv-dim tfoot { display: block; }
  .pv-dim tr { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .pv-dim td, .pv-dim th { display: flex; flex-direction: column; align-items: flex-start; padding: 0 !important; border: 0 !important; text-align: left !important; }
  .pv-dim td.dz { grid-column: 1 / -1; }
  .pv-dim td[data-l]::before { content: attr(data-l); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; margin-bottom: 3px; }
  .pv-dim td.res { font-size: 16px; }
  .pv-dim tfoot tr { grid-template-columns: 1fr; } .pv-dim tfoot th:empty { display: none; }
}

/* v10.1 · Vídeo de bienvenida de la empresa */
.iv-thumbs { display: grid; gap: 10px; } .iv-thumbs:has(> :nth-child(2)) { grid-template-columns: 1fr 1fr; }
.iv-cimg { position: absolute; inset: 0; background: linear-gradient(135deg, #0b4a7d, #04213b); }
.iv-cimg img { width: 100%; height: 100%; object-fit: cover; opacity: .85; display: block; }
.iv-thumb > .iv-lbl { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 8px; font-style: normal; font-weight: 700; font-size: 13px; color: #fff; text-align: center;
  background: linear-gradient(transparent, rgba(0,0,0,.65)); }
.iv-c .iv-box video { width: auto; height: auto; max-width: min(1280px, 100cqw); max-height: 100cqh; object-fit: contain; }
.wv-modes { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.wv-mode { display: flex; gap: 8px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; }
.wv-mode:has(input:checked) { border-color: var(--teal); background: rgba(94,174,175,.08); }
.wv-mode input { margin-top: 3px; } .wv-mode small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.wv-prev { aspect-ratio: 16 / 9; border-radius: 12px; background: var(--soft); display: grid; place-items: center; overflow: hidden; }
.wv-prev img, .wv-prev video { width: 100%; height: 100%; object-fit: contain; background: #000; }
@media (max-width: 480px) { .iv-thumbs:has(> :nth-child(2)) { grid-template-columns: 1fr; } }

/* v10.3 · fotos de las inspecciones de calidad */
.qph { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.qph-t, .qph-add { width: 84px; height: 84px; border-radius: 12px; position: relative; overflow: hidden; flex: none; }
.qph-t { background: var(--bg2, #eef2f6); cursor: zoom-in; display: grid; place-items: center; }
.qph-t img { width: 100%; height: 100%; object-fit: cover; display: block; }
.qph-x { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }
.qph-x svg { width: 14px; height: 14px; }
.qph-add { border: 2px dashed var(--line); background: transparent; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; font: inherit; }
.qph-add svg { width: 24px; height: 24px; }
.qph-view { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.qph-view img { width: 100%; border-radius: 12px; display: block; }

/* v10.7.0 · selector de archivo en español */
.file-fx { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 40px; }
.file-fx .fx-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.fx-hidden { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; opacity: 0 !important; pointer-events: none; overflow: hidden; clip-path: inset(50%); }
/* v10.7.0 · casillas de las tablas más fáciles de pulsar */
.tbl td > input[type="checkbox"], .tbl th > input[type="checkbox"] { width: 20px; height: 20px; }


/* v10.10.0 · Crear empleado desde el contrato */
.cx-box { border: 1.5px dashed var(--line); border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; background: var(--soft, #f6f9fb); }
.cx-ic { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; display: grid; place-items: center; background: #fff; color: var(--teal, #0f766e); border: 1px solid var(--line); }
.inp.cx-filled { background: #effaf5; border-color: #8fd3b5; }
.ok-txt { color: #1f6f50; } .warn-txt { color: #8a5a00; } .err-txt { color: #b42318; }
.ok-txt svg, .warn-txt svg, .err-txt svg { vertical-align: -2px; }

/* v10.11.0 · Firma manual + código por correo */
.otp-box { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--soft, #f6f9fb); }
.otp-in { width: 130px; letter-spacing: .35em; font-size: 18px; font-weight: 700; text-align: center; }
.imp-cp { padding: 0 4px !important; min-height: 0 !important; font-size: 12px; vertical-align: baseline; }

/* v10.12.0 · Ajustar la importación */
.imp-map { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-top: 10px; }
.imp-map summary { cursor: pointer; }
.imp-map-rows { display: grid; gap: 6px; max-height: 46vh; overflow: auto; padding-right: 4px; }
.imp-map-row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: center; }
.imp-map-row .inp { min-height: 36px; }
@media (max-width: 640px) { .imp-map-row { grid-template-columns: 1fr; } .imp-map-row > .muted { display: none; } }
/* v10.14.3 · .seg.full: en el móvil, dos mitades que bajan de línea en vez de desplazarse (se cortaba «Firmará desde su móvil») */
.seg.full, .seg.full > button { overflow: visible; }
.seg.full > button { flex: 1 1 0; white-space: normal; min-width: 0; }
/* v10.16.1 · encabezados para ordenar la revisión de la Prenómina */
.nm-sort { background: none; border: 0; padding: 2px 4px; margin: -2px 2px -2px -4px; font: inherit; color: inherit; cursor: pointer; border-radius: 6px; white-space: nowrap; }
.nm-sort:hover { background: var(--bg-2, rgba(0,0,0,.05)); }
.nm-sort .ar { font-size: .8em; opacity: .35; }
.nm-sort.on { color: var(--teal, #2b8f8a); }
.nm-sort.on .ar, .nm-sort:hover .ar { opacity: 1; }
.nm-sort.sub { font-weight: 500; font-size: .92em; }
.nm-sort .cfi { opacity: .45; line-height: 0; vertical-align: middle; }
.nm-sort:hover .cfi, .nm-sort.on .cfi { opacity: 1; }
/* v10.17.0 · CAE (app y portal de la contrata) */
.cae-ks { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.cae-k { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; cursor: pointer; font: inherit; color: inherit; padding: 14px 16px; margin: 0; border: 1px solid var(--line, #E3E8EF); border-left: 4px solid var(--line, #E3E8EF); }
.cae-k b { font-size: 26px; line-height: 1.1; } .cae-k span { font-size: 13px; color: var(--muted, #6B7A90); }
.cae-k.warn { border-left-color: #D98200; } .cae-k.err { border-left-color: #C0392B; } .cae-k.info { border-left-color: #2F80ED; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } @media (max-width: 820px) { .grid2 { grid-template-columns: 1fr; } }
.list .list-item, .list-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 11px 4px; border: 0; border-bottom: 1px solid var(--line-2, #EEF2F6); background: none; font: inherit; color: inherit; border-radius: 0; }
.list .list-item:last-child { border-bottom: 0; }
.list-item.click { cursor: pointer; } .list-item.click:hover { background: rgba(16, 42, 67, .03); }
.list-item .grow { min-width: 0; }
.tag { display: inline-block; font-size: 11px; padding: 0 7px; border-radius: 99px; background: #EEF2F6; color: #486581; font-weight: 600; vertical-align: middle; }
.cae-req { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--line-2, #EEF2F6); }
.cae-req:last-child { border-bottom: 0; } .cae-req .grow { min-width: 220px; }
.cae-w { border: 1px solid var(--line, #E3E8EF); border-radius: 12px; padding: 2px 14px; margin-bottom: 8px; }
.cae-w > summary { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; cursor: pointer; padding: 10px 0; list-style: none; }
.cae-w > summary::-webkit-details-marker { display: none; }
.cae-doc { border: 1px solid var(--line, #E3E8EF); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; } .cae-doc.focus { border-color: var(--teal, #2a9d8f); box-shadow: 0 0 0 3px rgba(42, 157, 143, .15); }
.cae-cks { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px 14px; }
.cae-frame { width: 100%; height: 66vh; border: 1px solid var(--line, #E3E8EF); border-radius: 12px; background: #EEF2F7; }
.cae-set h3 { margin: 22px 0 10px; padding-top: 14px; border-top: 1px solid var(--line-2, #EEF2F6); } .cae-set h3:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.cae-reqt .inp { min-height: 34px; padding: 6px 8px; font-size: 13.5px; }
.cae-tbl td { vertical-align: middle; }
/* v10.18.0 · CAE: idiomas del documento */
.cae-trs { display: grid; gap: 12px; }
.cae-tr { border: 1px solid var(--line, #D9E2EC); border-radius: 12px; padding: 10px 12px; background: #fff; }
.cae-tr-es { background: #F5F8FB; border-radius: 8px; padding: 6px 8px; margin: 4px 0 8px; color: #486581; max-height: 140px; overflow: auto; }
.inp.sm { padding: 4px 8px; font-size: 13px; min-height: 0; }
/* v10.19.0 · desplegable con buscador */
.ss { position: relative; }
.ss-btn { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; cursor: pointer; background: #fff; }
.ss-btn .ss-val { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss-btn:disabled { opacity: .7; cursor: default; }
.ss-car { color: #829AB1; font-size: 12px; }
.ss-pop { position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid var(--line, #D9E2EC); border-radius: 12px; box-shadow: 0 12px 30px rgba(16, 42, 67, .16); padding: 8px; }
.ss-q { width: 100%; margin-bottom: 6px; }
.ss-list { max-height: 260px; overflow: auto; }
.ss-opt { padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.ss-opt.hi { background: #EEF4FA; }
.ss-opt.on { font-weight: 700; }
.ss-more { padding: 6px 10px; color: #829AB1; font-size: 13px; }
