/* inoutin · sistema de diseño del panel (AppShell)
   Misma familia visual que incementerio/incolonias (lateral oscuro, barra blanca, tarjetas, tablas
   con cabecera en versalitas), con el color de marca de inoutin (índigo, del degradado del logo).
   Sin dependencias externas: fuente Inter e iconos (máscaras SVG) alojados en el propio dominio.
   Contraste AA en textos. Las clases antiguas (.btn-secondary, .alert-*, .form-group, .table-wrapper…)
   están cubiertas al final para que todas las vistas hereden la estética. */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/inter-var-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("../fonts/inter-var-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  /* Superficies y tinta */
  --fondo: #f5f6f9;           /* kit de marca: --io-fondo */
  --superficie: #ffffff;
  --superficie-2: #f7f8fb;
  --superficie-3: #eef0f6;
  --tinta: #151d33;           /* --io-tinta */
  --tinta-2: #4b5468;         /* --io-tinta-2 */
  --tinta-3: #5a6078;
  --borde: #dfe2ea;           /* --io-borde */
  --borde-2: #c7ccdb;
  /* Marca: colores del kit de marca (inoutin/marca/MARCA.md, propuesta A «Esfera») */
  --marca: #4b4fd6;           /* --io-marca (6,2:1 sobre blanco) */
  --marca-2: #4448c4;
  --marca-osc: #3a3db0;
  --marca-claro: #ecedfd;     /* --io-marca-claro */
  --acento: #0e7490;          /* cian del logo, oscurecido para AA */
  --acento-claro: #e0f5fa;
  --lateral-fondo: #0f1628;   /* --io-noche */
  --lateral-tinta: #d5d7f0;
  --lateral-tenue: #9aa3c4;
  /* Estados */
  --ok: #1e7a4c;      --ok-fondo: #e3f4ea;      --ok-borde: #b6dfc6;      --ok-tinta: #11502f;
  --error: #b42318;   --error-fondo: #fdecea;   --error-borde: #f2c1bb;   --error-tinta: #7a1a12;
  --info: #1d5f8a;    --info-fondo: #e6f1f8;    --info-borde: #bcd8ea;    --info-tinta: #12425f;
  --aviso: #8a5a00;   --aviso-fondo: #fff4dc;   --aviso-borde: #f0d79a;   --aviso-tinta: #5e3e00;
  /* Estado de fichaje */
  --trabajando: #17784a; --pausa: #b36b00; --fuera: #6b7088;
  /* Tipografía */
  --fuente: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --t-xs: .75rem; --t-sm: .85rem; --t-base: .9375rem; --t-lg: 1.1rem; --t-xl: 1.35rem; --t-2xl: 1.6rem;
  /* Espacios */
  --e-1: 4px; --e-2: 8px; --e-3: 12px; --e-4: 16px; --e-5: 20px; --e-6: 24px; --e-8: 32px;
  /* Radios y sombras */
  --radio-s: 6px; --radio: 10px; --radio-l: 14px; --radio-pill: 999px;
  --sombra: 0 1px 2px rgba(20, 22, 58, .06), 0 2px 8px rgba(20, 22, 58, .05);
  --sombra-2: 0 10px 30px rgba(20, 22, 58, .18);
  --foco: #1d6fd6;
  --lateral: 252px;
  --barra-alto: 60px;
}

/* ── Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fondo); color: var(--tinta); font: var(--t-base)/1.5 var(--fuente); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
a { color: var(--marca-2); text-underline-offset: 2px; }
a:hover { color: var(--marca); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; color: var(--tinta); }
h1 { font-size: var(--t-2xl); font-weight: 680; letter-spacing: -.015em; }
h2 { font-size: 1.15rem; font-weight: 650; }
h3 { font-size: 1rem; font-weight: 650; }
p { margin: 0 0 .8em; }
hr { border: 0; border-top: 1px solid var(--borde); margin: 1.2rem 0; }
code, .mono, pre { font-family: var(--mono); font-size: .88em; }
pre { white-space: pre-wrap; word-break: break-word; }
small { font-size: var(--t-sm); }
:focus-visible { outline: 3px solid var(--foco); outline-offset: 2px; border-radius: 3px; }
[hidden] { display: none !important; }
.sr, .sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.saltar { position: absolute; left: -9999px; top: 8px; background: var(--marca); color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 1000; }
.saltar:focus { left: 8px; color: #fff; }

/* ── AppShell ─────────────────────────────────────────────────────── */
.marco { display: flex; min-height: 100vh; }
.lateral { width: var(--lateral); flex: 0 0 var(--lateral); background: var(--lateral-fondo); color: var(--lateral-tinta); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 100; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
.lateral .marca { padding: 16px 16px 12px; border-bottom: 1px solid rgba(255,255,255,.08); }
.logo { display: inline-flex; align-items: center; gap: 9px; color: #fff; text-decoration: none; font-size: 1.2rem; letter-spacing: -.01em; font-weight: 500; }
.logo b { font-weight: 750; }
.logo:hover { color: #fff; }
.logo img { display: block; height: 32px; width: auto; max-width: 200px; object-fit: contain; }
.logo.logo-chip { background: #fff; border-radius: 10px; padding: 5px 10px; }
.logo.logo-chip img { height: 34px; }
.logo-texto .punto { color: #67e8f9; }
.entidad { margin-top: 10px; font-size: .82rem; color: var(--lateral-tenue); line-height: 1.3; }
.entidad strong { display: block; color: #fff; font-weight: 600; font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gestoria-ctx { margin: 10px 0 0; padding: 10px; border-radius: 8px; background: rgba(103, 232, 249, .1); border: 1px solid rgba(103, 232, 249, .25); font-size: .8rem; color: #cdf5fb; }
.gestoria-ctx strong { display: block; color: #fff; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gestoria-ctx a { color: #a5f3fc; font-weight: 600; }
.gestoria-ctx .acciones-ctx { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.lateral nav { padding: 8px 10px 16px; flex: 1; display: flex; flex-direction: column; }
.lateral ul { list-style: none; margin: 0; padding: 0; }
.lateral .grupo { margin: 16px 10px 4px; font-size: .68rem; letter-spacing: .09em; text-transform: uppercase; color: var(--lateral-tenue); font-weight: 650; }
.lateral nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 7px; color: var(--lateral-tinta); text-decoration: none; font-size: .9rem; line-height: 1.3; }
.lateral nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.lateral nav a.activo { background: rgba(138, 144, 255, .2); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 #8a90ff; }
.lateral nav a .ico { opacity: .9; }
.lateral .pie-nav { margin-top: auto; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.08); }
.cuerpo { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.barra { display: flex; align-items: center; gap: 12px; min-height: var(--barra-alto); padding: 8px 24px; background: var(--superficie); border-bottom: 1px solid var(--borde); position: sticky; top: 0; z-index: 50; }
.btn-menu { display: none; background: none; border: 1px solid var(--borde); border-radius: 8px; padding: 8px; cursor: pointer; color: var(--tinta); min-width: 40px; min-height: 40px; align-items: center; justify-content: center; }
.migas { font-size: .85rem; color: var(--tinta-3); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.migas a { color: var(--tinta-2); text-decoration: none; }
.migas a:hover { text-decoration: underline; }
.migas .sep { margin: 0 6px; color: var(--borde-2); }
.migas [aria-current] { color: var(--tinta); font-weight: 600; }
.barra-der { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.menu-usuario { position: relative; }
.menu-usuario summary { list-style: none; display: flex; align-items: center; gap: 9px; cursor: pointer; padding: 4px 8px 4px 4px; border-radius: 10px; min-height: 44px; }
.menu-usuario summary::-webkit-details-marker { display: none; }
.menu-usuario summary:hover { background: var(--superficie-2); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--marca); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; overflow: hidden; flex: 0 0 auto; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.usuario-info { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.nombre-usuario { font-size: .9rem; font-weight: 600; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rol-usuario { font-size: .75rem; color: var(--tinta-3); }
.desplegable { position: absolute; right: 0; top: calc(100% + 6px); background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--radio); box-shadow: var(--sombra-2); min-width: 250px; padding: 8px; z-index: 60; }
.desplegable a, .desplegable button { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 9px 10px; border-radius: 6px; color: var(--tinta); text-decoration: none; font: inherit; background: none; border: 0; cursor: pointer; min-height: 40px; }
.desplegable a:hover, .desplegable button:hover { background: var(--superficie-2); color: var(--tinta); }
.desplegable .meta-usuario { padding: 6px 10px 10px; border-bottom: 1px solid var(--borde); margin-bottom: 6px; font-size: .82rem; color: var(--tinta-3); }
.desplegable .meta-usuario strong { display: block; color: var(--tinta); font-size: .92rem; }
.desplegable form { margin: 0; }
.desplegable hr { margin: 6px 0; }
main.contenido { padding: 24px; flex: 1; outline: none; width: 100%; max-width: 1360px; }
.pie { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 24px; color: var(--tinta-3); font-size: .8rem; border-top: 1px solid var(--borde); }
.pie a { color: var(--tinta-2); }
.velo { display: none; }

/* Cabecera de sección con pestañas (pantallas agrupadas) */
.seccion-cab { margin: -4px 0 18px; }
.seccion-nombre { font-size: .72rem; letter-spacing: .09em; text-transform: uppercase; color: var(--tinta-3); font-weight: 650; margin: 0 0 4px; }

/* Barra inferior del empleado en móvil */
.barra-inferior { display: none; }

/* Invitado (login, registro, planes) */
body.invitado { background: var(--fondo); }
.cab-invitado { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 24px; background: var(--lateral-fondo); }
.cab-invitado nav { display: flex; gap: 14px; align-items: center; }
.cab-invitado nav a { color: var(--lateral-tinta); text-decoration: none; font-size: .9rem; }
.cab-invitado nav a:hover { color: #fff; }
.cab-invitado .btn { color: #fff; }
main.contenido-invitado { max-width: 1100px; margin: 0 auto; padding: 32px 16px 48px; }
.caja-simple { background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--radio-l); box-shadow: var(--sombra-2); width: 100%; max-width: 440px; margin: 24px auto; padding: 30px 30px 26px; }
.caja-simple h1 { font-size: 1.35rem; }
.caja-simple .btn[type=submit] { width: 100%; padding: 11px; }
.caja-simple.ancha { max-width: 560px; }

/* ── Iconos (máscaras SVG, color = currentColor) ──────────────────── */
.ico { width: 18px; height: 18px; flex: 0 0 18px; display: inline-block; background: currentColor; -webkit-mask: var(--i) no-repeat center / contain; mask: var(--i) no-repeat center / contain; vertical-align: -3px; }
.ico-inicio { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M3 11 12 3l9 8v10h-6v-6H9v6H3z'/%3E%3C/svg%3E"); }
.ico-reloj { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); }
.ico-lista { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M9 6h11M9 12h11M9 18h11'/%3E%3Ccircle cx='4.5' cy='6' r='1' fill='black'/%3E%3Ccircle cx='4.5' cy='12' r='1' fill='black'/%3E%3Ccircle cx='4.5' cy='18' r='1' fill='black'/%3E%3C/svg%3E"); }
.ico-sol { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3Ccircle cx='12' cy='15.5' r='2'/%3E%3C/svg%3E"); }
.ico-calendario { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E"); }
.ico-chat { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M4 5h16v11H9l-5 4z'/%3E%3C/svg%3E"); }
.ico-doc { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M6 3h8l5 5v13H6z'/%3E%3Cpath d='M14 3v5h5M9 13h6M9 17h6'/%3E%3C/svg%3E"); }
.ico-persona { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c1-4 4-6 8-6s7 2 8 6'/%3E%3C/svg%3E"); }
.ico-usuarios { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='9' cy='8' r='3.5'/%3E%3Cpath d='M2 20c.8-3.5 3.5-5 7-5s6.2 1.5 7 5'/%3E%3Cpath d='M16 4.5a3.5 3.5 0 0 1 0 7M18 15c2 .6 3.4 2.2 4 5'/%3E%3C/svg%3E"); }
.ico-edificio { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M4 21V4h11v17M15 9h5v12M2 21h20'/%3E%3Cpath d='M8 8h3M8 12h3M8 16h3'/%3E%3C/svg%3E"); }
.ico-maletin { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3' y='7' width='18' height='13' rx='2'/%3E%3Cpath d='M9 7V4h6v3M3 13h18'/%3E%3C/svg%3E"); }
.ico-euro { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M17 6a7 7 0 1 0 0 12M4 10h9M4 14h9'/%3E%3C/svg%3E"); }
.ico-ajustes { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M12 2v3M12 19v3M2 12h3M19 12h3M4.9 4.9 7 7M17 17l2.1 2.1M4.9 19.1 7 17M17 7l2.1-2.1'/%3E%3C/svg%3E"); }
.ico-enlace { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M10 14a5 5 0 0 0 7 0l3-3a5 5 0 0 0-7-7l-1 1'/%3E%3Cpath d='M14 10a5 5 0 0 0-7 0l-3 3a5 5 0 0 0 7 7l1-1'/%3E%3C/svg%3E"); }
.ico-grafico { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 20V4M4 20h16'/%3E%3Cpath d='M8 16v-4M12 16V8M16 16v-6'/%3E%3C/svg%3E"); }
.ico-escudo { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M12 3 4 6v6c0 5 3.5 8 8 9 4.5-1 8-4 8-9V6z'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E"); }
.ico-servidor { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3' y='4' width='18' height='7' rx='2'/%3E%3Crect x='3' y='13' width='18' height='7' rx='2'/%3E%3Cpath d='M7 7.5h.01M7 16.5h.01'/%3E%3C/svg%3E"); }
.ico-ayuda { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M9.5 9.5a2.5 2.5 0 1 1 3.5 2.3c-.7.3-1 1-1 1.7V14'/%3E%3Ccircle cx='12' cy='17' r='1' fill='black'/%3E%3C/svg%3E"); }
.ico-libro { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M4 4h11a3 3 0 0 1 3 3v13H7a3 3 0 0 1-3-3z'/%3E%3Cpath d='M8 8h6M8 12h6'/%3E%3C/svg%3E"); }
.ico-bombilla { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M9 18h6M10 21h4'/%3E%3Cpath d='M12 3a6 6 0 0 0-3.5 10.9c.6.5 1 1.2 1 2.1h5c0-.9.4-1.6 1-2.1A6 6 0 0 0 12 3z'/%3E%3C/svg%3E"); }
.ico-estrella { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='m12 3 2.8 5.7 6.2.9-4.5 4.4 1 6.2-5.5-2.9-5.5 2.9 1-6.2L3 9.6l6.2-.9z'/%3E%3C/svg%3E"); }
.ico-soporte { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M4 14v-2a8 8 0 0 1 16 0v2'/%3E%3Crect x='3' y='13' width='4' height='6' rx='1'/%3E%3Crect x='17' y='13' width='4' height='6' rx='1'/%3E%3C/svg%3E"); }
.ico-correo { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E"); }
.ico-renovar { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M20 12a8 8 0 0 1-14 5.3M4 12a8 8 0 0 1 14-5.3'/%3E%3Cpath d='M18 3v4h-4M6 21v-4h4'/%3E%3C/svg%3E"); }
.ico-capas { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='m12 3 9 5-9 5-9-5z'/%3E%3Cpath d='m3 13 9 5 9-5'/%3E%3C/svg%3E"); }
.ico-web { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c2.5 3 2.5 15 0 18M12 3c-2.5 3-2.5 15 0 18'/%3E%3C/svg%3E"); }
.ico-imagen { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Ccircle cx='9' cy='10' r='2'/%3E%3Cpath d='m21 16-5-5-9 9'/%3E%3C/svg%3E"); }
.ico-chispa { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M12 3c.6 4.3 2.7 6.4 7 7-4.3.6-6.4 2.7-7 7-.6-4.3-2.7-6.4-7-7 4.3-.6 6.4-2.7 7-7z'/%3E%3Cpath d='M19 16c.3 1.6 1 2.3 2.5 2.5-1.5.3-2.2 1-2.5 2.5-.3-1.5-1-2.2-2.5-2.5 1.5-.2 2.2-.9 2.5-2.5z'/%3E%3C/svg%3E"); }
.ico-llave { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='8' cy='15' r='4'/%3E%3Cpath d='m11 12 9-9M17 6l3 3M15 8l2 2'/%3E%3C/svg%3E"); }
.ico-movil { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='6' y='2.5' width='12' height='19' rx='2.5'/%3E%3Cpath d='M11 18h2'/%3E%3C/svg%3E"); }
.ico-datos { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cellipse cx='12' cy='6' rx='8' ry='3'/%3E%3Cpath d='M4 6v12c0 1.7 3.6 3 8 3s8-1.3 8-3V6M4 12c0 1.7 3.6 3 8 3s8-1.3 8-3'/%3E%3C/svg%3E"); }
.ico-salir { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M15 4h4v16h-4M10 8l-4 4 4 4M6 12h10'/%3E%3C/svg%3E"); }
.ico-menu { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 6h16M4 12h16M4 18h16'/%3E%3C/svg%3E"); }
.ico-flecha { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E"); }
.ico-volver { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M19 12H5M11 6l-6 6 6 6'/%3E%3C/svg%3E"); }
.ico-mas { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E"); }
.ico-descarga { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 3v12m0 0-4-4m4 4 4-4M4 17v3h16v-3'/%3E%3C/svg%3E"); }
.ico-ubicacion { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M12 21s-7-6.2-7-11.5a7 7 0 0 1 14 0C19 14.8 12 21 12 21z'/%3E%3Ccircle cx='12' cy='9.5' r='2.5'/%3E%3C/svg%3E"); }
.ico-cerrar { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E"); }
.ico-check { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E"); }
.ico-lg { width: 22px; height: 22px; flex-basis: 22px; }

/* ── Cabecera de página ───────────────────────────────────────────── */
.cabecera, .page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.cabecera h1, .page-header h1 { margin: 0; }
.cabecera .sub, .page-header .sub, .subtitulo { color: var(--tinta-2); margin: 4px 0 0; }
.acciones { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.acciones form { display: inline-flex; margin: 0; }

/* ── Tarjetas, rejillas, KPI ──────────────────────────────────────── */
.tarjeta, .card { background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--radio); box-shadow: var(--sombra); padding: 18px 20px; margin-bottom: 18px; }
.tarjeta > h2:first-child, .tarjeta > h3:first-child, .card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.tarjeta-cab { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.tarjeta-cab h2, .tarjeta-cab h3 { margin: 0; }
.tarjeta-plana { box-shadow: none; }
.tarjeta-marca { background: linear-gradient(45deg, #12b5d8 -40%, #5b63f0 45%, #8b5cf6 140%); color: #fff; border: 0; }
.tarjeta-marca h1, .tarjeta-marca h2, .tarjeta-marca h3, .tarjeta-marca a { color: #fff; }
.rejilla { display: grid; gap: 18px; }
.rejilla-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rejilla-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rejilla-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rejilla-auto { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--radio); padding: 14px 16px; box-shadow: var(--sombra); text-decoration: none; color: inherit; display: block; }
a.kpi:hover { border-color: var(--marca-2); color: inherit; }
.kpi .valor { font-size: 1.7rem; font-weight: 720; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kpi .etiqueta-kpi { color: var(--tinta-2); font-size: .85rem; }
.kpi .detalle { font-size: .78rem; color: var(--tinta-3); margin-top: 4px; }
.kpi.kpi-aviso { border-color: var(--aviso-borde); background: var(--aviso-fondo); }
.accesos { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.acceso { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--borde); border-radius: var(--radio); background: var(--superficie); color: var(--tinta); text-decoration: none; font-weight: 600; font-size: .92rem; line-height: 1.3; }
.acceso:hover { border-color: var(--marca-2); background: var(--marca-claro); color: var(--marca); }
.acceso .ico { color: var(--marca-2); }
.acceso small { display: block; font-weight: 400; color: var(--tinta-3); font-size: .78rem; }
.acceso.destacado { border-color: var(--aviso-borde); background: var(--aviso-fondo); }
.meta, .text-muted, .muted { color: var(--tinta-3); font-size: .85rem; }
.vacio, .empty-state { color: var(--tinta-3); text-align: center; padding: 28px 12px; border: 1px dashed var(--borde-2); border-radius: var(--radio); background: var(--superficie-2); }
.vacio .ico { width: 28px; height: 28px; display: block; margin: 0 auto 8px; color: var(--borde-2); }
dl.datos { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
dl.datos dt { color: var(--tinta-3); font-size: .86rem; }
dl.datos dd { margin: 0; font-weight: 500; }

/* ── Botones ──────────────────────────────────────────────────────── */
.btn, .btn-primary, .btn-secondary, .btn-danger, .btn-success { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; min-height: 38px; border-radius: 8px; border: 1px solid var(--marca); background: var(--marca); color: #fff; font: inherit; font-weight: 600; font-size: .9rem; text-decoration: none; cursor: pointer; line-height: 1.2; white-space: nowrap; transition: background-color .12s, border-color .12s; }
.btn:hover, .btn-primary:hover { background: var(--marca-osc); border-color: var(--marca-osc); color: #fff; }
.btn-2, .btn-secondary, .btn.btn-secondary, .btn-outline, .btn--ghost { background: var(--superficie); color: var(--marca); border: 1px solid var(--borde-2); }
.btn-2:hover, .btn-secondary:hover, .btn.btn-secondary:hover, .btn-outline:hover, .btn--ghost:hover { background: var(--marca-claro); color: var(--marca); border-color: var(--borde-2); }
.btn-peligro, .btn-danger, .btn.btn-danger, .btn-reject { background: var(--superficie); color: var(--error); border: 1px solid #e8b4ae; }
.btn-peligro:hover, .btn-danger:hover, .btn.btn-danger:hover, .btn-reject:hover { background: var(--error-fondo); color: var(--error); border-color: #e8b4ae; }
.btn-ok, .btn-success, .btn-approve, .btn-accept { background: var(--ok); border: 1px solid var(--ok); color: #fff; }
.btn-ok:hover, .btn-success:hover, .btn-approve:hover, .btn-accept:hover { background: #0f5e39; border-color: #0f5e39; color: #fff; }
.btn-fantasma, .btn-link { background: none; border-color: transparent; color: var(--marca-2); }
.btn-fantasma:hover, .btn-link:hover { background: var(--marca-claro); color: var(--marca); border-color: transparent; }
.btn-sm { padding: 5px 10px; min-height: 30px; font-size: .82rem; border-radius: 7px; }
.btn-lg { padding: 12px 20px; min-height: 48px; font-size: 1rem; border-radius: 10px; }
.btn-bloque { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"], button[disabled] { opacity: .55; cursor: not-allowed; }
.enlace { background: none; border: 0; padding: 0; color: var(--marca-2); text-decoration: underline; cursor: pointer; font: inherit; }

/* ── Avisos ───────────────────────────────────────────────────────── */
.aviso, .alert { border-radius: var(--radio); padding: 11px 14px; margin-bottom: 16px; border: 1px solid var(--borde); background: var(--superficie-2); }
.aviso-ok, .alert-success { background: var(--ok-fondo); border-color: var(--ok-borde); color: var(--ok-tinta); }
.aviso-error, .alert-error, .alert-danger { background: var(--error-fondo); border-color: var(--error-borde); color: var(--error-tinta); }
.aviso-info, .alert-info { background: var(--info-fondo); border-color: var(--info-borde); color: var(--info-tinta); }
.aviso-amarillo, .aviso-atencion, .alert-warning { background: var(--aviso-fondo); border-color: var(--aviso-borde); color: var(--aviso-tinta); }
.aviso > :last-child, .alert > :last-child { margin-bottom: 0; }

/* ── Formularios ──────────────────────────────────────────────────── */
.form { display: grid; gap: 14px; }
.campos { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.campo, .form-group { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.form-group { margin-bottom: 14px; }
.campos .form-group, .campos .campo { margin-bottom: 0; }
.campo-ancho { grid-column: 1 / -1; }
label, .etiqueta { display: block; font-weight: 600; font-size: .86rem; color: var(--tinta); }
.ayuda, .form-hint, .help-text { font-size: .8rem; color: var(--tinta-3); font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=datetime-local], input[type=month], input[type=search], input[type=tel], input[type=url], input:not([type]), select, textarea, .form-control {
  width: 100%; max-width: 100%; padding: 8px 10px; border: 1px solid var(--borde-2); border-radius: 7px; background: #fff; font: inherit; font-size: .92rem; color: var(--tinta); min-height: 40px;
}
input[type=color] { padding: 3px; width: 70px; height: 40px; border: 1px solid var(--borde-2); border-radius: 7px; background: #fff; }
input[type=file] { font: inherit; font-size: .88rem; max-width: 100%; }
textarea { min-height: 90px; resize: vertical; }
select { padding-right: 30px; }
input:focus, select:focus, textarea:focus { border-color: var(--marca-2); outline: 2px solid rgba(74, 68, 212, .22); outline-offset: 0; }
input[aria-invalid=true], select[aria-invalid=true] { border-color: var(--error); }
input[type=checkbox], input[type=radio] { width: 17px; height: 17px; accent-color: var(--marca); vertical-align: -3px; margin: 0 6px 0 0; }
.check, .checkbox-line, .label-checkbox { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; }
.check input, .checkbox-line input, .label-checkbox input { margin-top: 2px; flex: 0 0 17px; }
fieldset { border: 1px solid var(--borde); border-radius: var(--radio); padding: 12px 14px 14px; margin: 0 0 14px; }
legend { font-weight: 650; padding: 0 6px; }
.req::after { content: " *"; color: var(--error); }
.filtros { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; padding: 12px 14px; background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--radio); }
.filtros .campo, .filtros .form-group { min-width: 150px; margin-bottom: 0; }
.filtros .campo-q { flex: 1; min-width: 220px; }
.en-linea { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ── Tablas ───────────────────────────────────────────────────────── */
.tabla-env, .table-wrapper, .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--borde); border-radius: var(--radio); background: var(--superficie); margin-bottom: 18px; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; background: var(--superficie); }
main table:not(.tabla-sin) { border: 1px solid var(--borde); border-radius: var(--radio); border-collapse: separate; border-spacing: 0; overflow: hidden; }
.tabla-env > table, .table-wrapper > table, .table-responsive > table { border: 0 !important; border-radius: 0; margin: 0; }
th { text-align: left; font-weight: 650; color: var(--tinta-2); background: var(--superficie-2); font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; }
th, td { padding: 9px 12px; border-bottom: 1px solid var(--borde); vertical-align: top; text-align: left; }
tbody tr:hover > td { background: #fafbfe; }
tr:last-child > td { border-bottom: 0; }
td.num, th.num, .num { text-align: right; font-variant-numeric: tabular-nums; }
.tabla a.fila-enlace { color: inherit; text-decoration: none; font-weight: 600; }

/* ── Badges de estado ─────────────────────────────────────────────── */
.badge, .chip, .estado { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: var(--radio-pill); font-size: .76rem; font-weight: 650; border: 1px solid transparent; white-space: nowrap; background: var(--superficie-3); color: var(--tinta-2); line-height: 1.5; }
.badge.punto::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge-ok, .badge-aprobada, .badge-activo, .badge-pagado, .badge-trabajando { background: var(--ok-fondo); color: var(--ok-tinta); }
.badge-pendiente, .badge-aviso, .badge-pausa { background: var(--aviso-fondo); color: var(--aviso-tinta); }
.badge-error, .badge-rechazada, .badge-inactivo { background: var(--error-fondo); color: var(--error-tinta); }
.badge-info { background: var(--info-fondo); color: var(--info-tinta); }
.badge-marca { background: var(--marca-claro); color: var(--marca); }
.badge-neutro, .badge-fuera { background: var(--superficie-3); color: var(--tinta-2); }

/* ── Pestañas ─────────────────────────────────────────────────────── */
.pestanas { display: flex; gap: 2px; border-bottom: 1px solid var(--borde); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.pestanas::-webkit-scrollbar { display: none; }
.pestanas a, .pestanas button { padding: 9px 14px; border: 0; background: none; color: var(--tinta-2); text-decoration: none; font: inherit; font-weight: 600; font-size: .9rem; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; }
.pestanas a:hover, .pestanas button:hover { color: var(--marca); }
.pestanas [aria-selected=true], .pestanas a.activo, .pestanas [aria-current=page] { color: var(--marca); border-bottom-color: var(--marca); }

/* ── Modales (dialog nativo o capa con [role=dialog]) ─────────────── */
dialog { border: 0; border-radius: var(--radio-l); padding: 0; box-shadow: var(--sombra-2); max-width: min(620px, calc(100vw - 32px)); width: 100%; color: var(--tinta); }
dialog::backdrop { background: rgba(14, 16, 40, .5); }
.dialogo-cab { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--borde); }
.dialogo-cab h2 { margin: 0; font-size: 1.1rem; }
.dialogo-cuerpo { padding: 18px 20px; }
.dialogo-pie { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--borde); background: var(--superficie-2); border-radius: 0 0 var(--radio-l) var(--radio-l); }
.cerrar { background: none; border: 0; font-size: 1.4rem; cursor: pointer; color: var(--tinta-3); line-height: 1; padding: 4px 8px; border-radius: 6px; }
.cerrar:hover { background: var(--superficie-2); }
.modal-capa { position: fixed; inset: 0; background: rgba(14, 16, 40, .5); z-index: 900; display: none; align-items: center; justify-content: center; padding: 16px; }
.modal-capa.abierto { display: flex; }
.modal-caja { background: var(--superficie); border-radius: var(--radio-l); box-shadow: var(--sombra-2); width: 100%; max-width: 620px; max-height: calc(100vh - 32px); overflow: auto; }

/* ── Paginación, línea de tiempo, utilidades ──────────────────────── */
.paginacion, .pagination { display: flex; gap: 6px; align-items: center; justify-content: space-between; margin-top: 12px; flex-wrap: wrap; font-size: .88rem; }
.paginacion a, .pagination a { padding: 5px 10px; border: 1px solid var(--borde-2); border-radius: 7px; text-decoration: none; background: var(--superficie); }
.linea { list-style: none; margin: 0; padding: 0 0 0 16px; border-left: 2px solid var(--borde); }
.linea li { position: relative; padding: 0 0 14px 12px; }
.linea li::before { content: ""; position: absolute; left: -22px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--superficie); border: 2px solid var(--marca-2); }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--tinta); color: #fff; padding: 10px 18px; border-radius: 8px; opacity: 0; pointer-events: none; transition: .2s; z-index: 1200; max-width: calc(100vw - 32px); }
.toast.ver { opacity: 1; transform: translateX(-50%) translateY(0); }
.flex { display: flex; } .flex-wrap { flex-wrap: wrap; } .gap-2 { gap: var(--e-2); } .gap-3 { gap: var(--e-3); } .gap-4 { gap: var(--e-4); }
.items-center { align-items: center; } .justify-between { justify-content: space-between; }
.mt-0 { margin-top: 0 !important; } .mb-0 { margin-bottom: 0 !important; } .mt-2 { margin-top: var(--e-2); } .mt-4 { margin-top: var(--e-4); } .mb-2 { margin-bottom: var(--e-2); } .mb-4 { margin-bottom: var(--e-4); }
.texto-ok { color: var(--ok); } .texto-error { color: var(--error); } .texto-aviso { color: var(--aviso); } .texto-tenue { color: var(--tinta-3); }
.text-center { text-align: center; } .text-right { text-align: right; }
.ancho-max { max-width: 760px; }
.qr-img { display: block; width: 180px; height: 180px; background: #fff; border: 8px solid #fff; box-shadow: 0 0 0 1px var(--borde); border-radius: 6px; }

/* ── Fichaje (empleado) ───────────────────────────────────────────── */
.estado-fichaje { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; }
.estado-fichaje::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.estado-trabajando { color: var(--trabajando); } .estado-pausa { color: var(--pausa); } .estado-fuera { color: var(--fuera); }

/* ── Ayuda online (modal incluido por el layout) ──────────────────── */

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .rejilla-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rejilla-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .lateral { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--sombra-2); }
  .lateral.abierto { transform: none; }
  .velo.ver { display: block; position: fixed; inset: 0; background: rgba(14, 16, 40, .45); z-index: 90; }
  .btn-menu { display: inline-flex; }
  .rejilla-2, .rejilla-3 { grid-template-columns: 1fr; }
  main.contenido { padding: 16px; }
  .barra { padding: 8px 12px; gap: 8px; }
  .usuario-info { display: none; }
  .menu-usuario summary { padding: 3px; }
  .pie { padding: 12px 16px; }
  /* Empleado: barra inferior fija con las 5 pantallas */
  body.con-barra-inferior { padding-bottom: 72px; }
  body.con-barra-inferior .barra-inferior { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; background: var(--superficie); border-top: 1px solid var(--borde); box-shadow: 0 -4px 16px rgba(20, 22, 58, .08); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); }
  .barra-inferior a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; color: var(--tinta-3); text-decoration: none; font-size: .7rem; font-weight: 600; border-radius: 8px; min-height: 52px; justify-content: center; }
  .barra-inferior a .ico { width: 22px; height: 22px; flex-basis: 22px; }
  .barra-inferior a.activo { color: var(--marca); background: var(--marca-claro); }
}
@media (max-width: 560px) {
  h1 { font-size: 1.35rem; }
  .rejilla-4 { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi .valor { font-size: 1.35rem; }
  dl.datos { grid-template-columns: 1fr; gap: 2px; }
  dl.datos dd { margin-bottom: 8px; }
  th, td { padding: 8px 10px; }
  .tarjeta, .card { padding: 14px 14px; }
  .caja-simple { padding: 22px 18px; border-radius: var(--radio); }
  .cab-invitado { padding: 10px 16px; }
  .cab-invitado nav a:not(.btn) { display: none; }
  /* Tablas apiladas en móvil: añadir .tabla-movil y data-label en cada celda */
  table.tabla-movil thead { display: none; }
  table.tabla-movil, table.tabla-movil tbody, table.tabla-movil tr, table.tabla-movil td { display: block; width: 100%; }
  table.tabla-movil tr { border-bottom: 1px solid var(--borde); padding: 8px 0; }
  table.tabla-movil td { border: 0; padding: 3px 12px; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  table.tabla-movil td::before { content: attr(data-label); font-weight: 600; color: var(--tinta-3); font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; text-align: left; }
}
@media print {
  .lateral, .barra, .pie, .barra-inferior, .acciones, .filtros, #ayuda-fab, .seccion-cab { display: none !important; }
  main.contenido { padding: 0; max-width: none; }
  .tarjeta, .card { box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
