/* OPERIUM People · fundamentos visuales (docs/08-fundamentos-visuales.md).
   Estructura neutra (blanco / gris / negro). El acento de la paleta (OPERIUM #691FB7 por defecto) aparece SOLO en banners,
   ilustraciones, avance (barras y anillos) y el botón principal. Selección, navegación y foco usan tokens neutros (--sel*).
   Estados ok / warn / bad: sobrios y iguales en todas las paletas; siempre tinte + borde completo + pill con ícono. */
:root {
  /* Superficies y texto */
  --bg: #fff; --surface: #fafafa; --surface-2: #f4f4f5; --surface-3: #ececef;
  --text: #0a0a0a; --text-2: #52525b; --text-3: #71717a; /* --text-3: 4.8:1 sobre blanco (AA) */
  --border: #e4e4e7; --border-strong: #d4d4d8;
  /* Acento de la paleta (por defecto OPERIUM). */
  --accent: #691fb7; --accent-soft: #f3ecfb; --accent-ink: #561896; --on-accent: #fff;
  /* Selección, navegación y foco: neutros en todas las paletas. */
  --sel: #18181b; --sel-soft: #f4f4f5; --sel-ink: #18181b; --on-sel: #fff; --focus: #18181b;
  /* Estados (iguales en todas las paletas) */
  --ok: #2f6b45; --ok-soft: #eef5f0; --ok-line: #bfd9c8;
  --warn: #8a5a14; --warn-soft: #fbf4e8; --warn-line: #ecd3a6;
  --bad: #a23b3b; --bad-soft: #fbeeee; --bad-line: #eec3c3;
  /* Tipografía (Geist; Gotham solo en .brand-display si hay licencia web cargada en Marca) */
  --font: Geist, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: Gotham, Geist, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --fs-display: 32px; --fs-h1: 26px; --fs-h2: 18px; --fs-h3: 15px; --fs-body: 14px; --fs-sm: 13px; --fs-xs: 12px;
  --fs-kpi: 28px; --fs-kpi-hero: 40px; --lh-tight: 1.2; --lh-body: 1.5;
  /* Espaciado (base 4) */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px; --sp-6: 24px; --sp-8: 32px; --sp-10: 40px; --sp-12: 48px;
  /* Radios: 8 control · 12 bloque · 16 tarjeta · 24 banner */
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 24px; --r-pill: 999px;
  --radius-sm: var(--r-sm); --radius-md: var(--r-md); --radius-lg: var(--r-lg); --radius-xl: var(--r-xl); --radius-pill: var(--r-pill);
  --radius: 12px; /* compatibilidad: bloques existentes */
  /* Sombras (casi planas: el borde hace el trabajo) */
  --shadow-1: 0 1px 2px rgba(10,10,10,.04); --shadow-2: 0 4px 16px rgba(10,10,10,.06); --shadow-3: 0 16px 40px rgba(10,10,10,.10);
  /* Tamaños: controles 32 · 40 · 48; avatares 26 · 32 · 40 · 56 · 96 */
  --control-sm: 32px; --control: 40px; --control-lg: 48px;
  --av-xs: 26px; --av-sm: 32px; --av-md: 40px; --av-lg: 56px; --av-xl: 96px;
  --icon: 18px; --icon-lg: 22px;
  /* Movimiento: 120 toque · 200 aparece · 320 se mueve */
  --ease: cubic-bezier(.2,.8,.2,1); --ease-out: var(--ease); --d1: 120ms; --d2: 200ms; --d3: 320ms; --dur-1: var(--d1); --dur-2: var(--d2); --dur-3: var(--d3);
  /* Ilustraciones */
  --il-ink: var(--text); --il-soft: var(--surface-2); --il-accent: var(--accent); --il-accent-soft: var(--accent-soft); --il-bg: var(--bg);
  --side: 232px;
  color-scheme: light;
  font-family: var(--font);
}
/* ===== Color por empresa y acentos de momento (propuesta aprobada 2026-09-25): color donde está la gente, neutro donde están los números. =====
   Cada empresa tiene fondo, tinte y tinta; el amarillo es para celebrar y la lavanda para dar la bienvenida. core.js asigna la clase co-* por empresa. */
:root { --co-ope: #691fb7; --co-ope-soft: #f3ecfb; --co-ope-ink: #3b1466; --co-cia: #f0603f; --co-cia-soft: #fdece7; --co-cia-ink: #7a2a17;
  --co-zev: #3d2fbf; --co-zev-soft: #e9e6fb; --co-zev-ink: #2b2186; --co-seg: #2bb39a; --co-seg-soft: #e3f5f0; --co-seg-ink: #155e4e;
  --vivid-sun: #f7c948; --vivid-sun-soft: #fdf3d3; --vivid-sun-ink: #6b4d05; --vivid-lav: #b9a6f5; --vivid-lav-soft: #efeafd; --vivid-lav-ink: #3b2a7a; }
/* Paletas: solo cambia el acento. */
:root[data-palette="neutra"]  { --accent: #18181b; --accent-soft: #f4f4f5; --accent-ink: #18181b; --on-accent: #fff; }
:root[data-palette="calida"]  { --accent: #c2410c; --accent-soft: #fff1e8; --accent-ink: #9a3412; --on-accent: #fff; }
:root[data-palette="fresca"]  { --accent: #1f7a63; --accent-soft: #e7f4ef; --accent-ink: #17614e; --on-accent: #fff; }
:root[data-palette="serena"]  { --accent: #2f63c9; --accent-soft: #eaf0fc; --accent-ink: #244fa3; --on-accent: #fff; }
:root[data-palette="operium"] { --accent: #691fb7; --accent-soft: #f3ecfb; --accent-ink: #561896; --on-accent: #fff; }

/* Modo oscuro: automático (preferencia del sistema) salvo que la persona elija "Claro" u "Oscuro" en Apariencia. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --co-ope: #9b6ad6; --co-ope-soft: #2a1d3d; --co-ope-ink: #d9c6f5; --co-cia: #f0836a; --co-cia-soft: #3a1f18; --co-cia-ink: #f8c2b3;
    --co-zev: #7b6fe0; --co-zev-soft: #1f1b45; --co-zev-ink: #c9c2f5; --co-seg: #4cc7ae; --co-seg-soft: #0f2e27; --co-seg-ink: #a8e5d6;
    --vivid-sun: #e6b93e; --vivid-sun-soft: #332a10; --vivid-sun-ink: #f3dc99; --vivid-lav: #a48ff0; --vivid-lav-soft: #241d3a; --vivid-lav-ink: #d6cdf8;
    --bg: #0c0c0e; --surface: #131316; --surface-2: #1b1b1f; --surface-3: #242429;
    --text: #f4f4f5; --text-2: #b4b4bd; --text-3: #8e8e98; --border: #26262b; --border-strong: #3a3a41;
    --accent: #b793f0; --accent-soft: #221733; --accent-ink: #d6c0f7; --on-accent: #16092a;
    --sel: #f4f4f5; --sel-soft: #232327; --sel-ink: #f4f4f5; --on-sel: #0a0a0a; --focus: #f4f4f5;
    --ok: #7cc59a; --ok-soft: #14261b; --ok-line: #28503a; --warn: #e3b56b; --warn-soft: #2a2112; --warn-line: #5a4520; --bad: #f0948f; --bad-soft: #2c1716; --bad-line: #5e2d2b;
    --shadow-1: none; --shadow-2: 0 4px 16px rgba(0,0,0,.4); --shadow-3: 0 16px 40px rgba(0,0,0,.5);
    color-scheme: dark;
  }
  :root:not([data-theme="light"])[data-palette="neutra"]  { --accent: #f4f4f5; --accent-soft: #232327; --accent-ink: #f4f4f5; --on-accent: #0a0a0a; }
  :root:not([data-theme="light"])[data-palette="calida"]  { --accent: #fb8a5c; --accent-soft: #2d1a12; --accent-ink: #fdba98; --on-accent: #1a0c05; }
  :root:not([data-theme="light"])[data-palette="fresca"]  { --accent: #5cc7a6; --accent-soft: #11261f; --accent-ink: #9ee0cb; --on-accent: #04140f; }
  :root:not([data-theme="light"])[data-palette="serena"]  { --accent: #86aaf3; --accent-soft: #141d33; --accent-ink: #b7cdf8; --on-accent: #07102a; }
  :root:not([data-theme="light"])[data-palette="operium"] { --accent: #b793f0; --accent-soft: #221733; --accent-ink: #d6c0f7; --on-accent: #16092a; }
}
:root[data-theme="dark"] {
  --co-ope: #9b6ad6; --co-ope-soft: #2a1d3d; --co-ope-ink: #d9c6f5; --co-cia: #f0836a; --co-cia-soft: #3a1f18; --co-cia-ink: #f8c2b3;
  --co-zev: #7b6fe0; --co-zev-soft: #1f1b45; --co-zev-ink: #c9c2f5; --co-seg: #4cc7ae; --co-seg-soft: #0f2e27; --co-seg-ink: #a8e5d6;
  --vivid-sun: #e6b93e; --vivid-sun-soft: #332a10; --vivid-sun-ink: #f3dc99; --vivid-lav: #a48ff0; --vivid-lav-soft: #241d3a; --vivid-lav-ink: #d6cdf8;
  --bg: #0c0c0e; --surface: #131316; --surface-2: #1b1b1f; --surface-3: #242429;
  --text: #f4f4f5; --text-2: #b4b4bd; --text-3: #8e8e98; --border: #26262b; --border-strong: #3a3a41;
  --accent: #b793f0; --accent-soft: #221733; --accent-ink: #d6c0f7; --on-accent: #16092a;
  --sel: #f4f4f5; --sel-soft: #232327; --sel-ink: #f4f4f5; --on-sel: #0a0a0a; --focus: #f4f4f5;
  --ok: #7cc59a; --ok-soft: #14261b; --ok-line: #28503a; --warn: #e3b56b; --warn-soft: #2a2112; --warn-line: #5a4520; --bad: #f0948f; --bad-soft: #2c1716; --bad-line: #5e2d2b;
  --shadow-1: none; --shadow-2: 0 4px 16px rgba(0,0,0,.4); --shadow-3: 0 16px 40px rgba(0,0,0,.5);
  color-scheme: dark;
}
:root[data-theme="dark"][data-palette="neutra"]  { --accent: #f4f4f5; --accent-soft: #232327; --accent-ink: #f4f4f5; --on-accent: #0a0a0a; }
:root[data-theme="dark"][data-palette="calida"]  { --accent: #fb8a5c; --accent-soft: #2d1a12; --accent-ink: #fdba98; --on-accent: #1a0c05; }
:root[data-theme="dark"][data-palette="fresca"]  { --accent: #5cc7a6; --accent-soft: #11261f; --accent-ink: #9ee0cb; --on-accent: #04140f; }
:root[data-theme="dark"][data-palette="serena"]  { --accent: #86aaf3; --accent-soft: #141d33; --accent-ink: #b7cdf8; --on-accent: #07102a; }
:root[data-theme="dark"][data-palette="operium"] { --accent: #b793f0; --accent-soft: #221733; --accent-ink: #d6c0f7; --on-accent: #16092a; }

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: var(--fs-body); line-height: var(--lh-body); -webkit-font-smoothing: antialiased; }
/* H1 26 px (escala nueva) con la misma altura de renglón que antes (33 px): los encabezados no empujan el contenido. */
h1 { font-size: var(--fs-h1); line-height: 33px; font-weight: 650; letter-spacing: -.03em; margin: 0 0 4px; text-wrap: balance; }
h2 { font-size: var(--fs-h3); font-weight: 600; margin: 0 0 12px; }
.t-display { font-size: var(--fs-display); line-height: 1.1; font-weight: 650; letter-spacing: -.035em; }
.t-h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); font-weight: 650; letter-spacing: -.03em; }
.t-h2 { font-size: var(--fs-h2); line-height: 1.3; font-weight: 600; letter-spacing: -.01em; }
.t-h3 { font-size: var(--fs-h3); font-weight: 600; }
.t-sm { font-size: var(--fs-sm); } .t-xs { font-size: var(--fs-xs); }
/* Gotham (licencia web del holding): solo saludo del banner y título del inicio de sesión. */
.brand-display { font-family: var(--font-display); }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
p { margin: 0; } a { color: inherit; }
.muted { color: var(--text-2); } .small { font-size: 12.5px; } .faint { color: var(--text-3); }
small { font-size: var(--fs-xs); } /* piso tipográfico de 12 px también en <small> sin clase */
button, input, select, textarea { font: inherit; color: inherit; }

/* Shell */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100dvh; }
.side { border-right: 1px solid var(--border); padding: 20px 12px; position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 2px; background: var(--surface); }
.brand { font-weight: 700; letter-spacing: -.02em; font-size: 15px; padding: 4px 10px 18px; display: flex; align-items: center; gap: 8px; min-width: 0; }
a.brand { color: inherit; text-decoration: none; border-radius: 8px; cursor: pointer; }
a.brand:hover { opacity: .85; }
a.brand:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.brand span { color: var(--text-3); font-weight: 500; }
.brand-logo { display: block; height: 24px; width: auto; max-width: 132px; object-fit: contain; object-position: left center; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--text-2); font-weight: 500; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a.on { background: var(--sel-soft); color: var(--sel-ink); }
.nav .sep { margin: 14px 10px 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); }
.side .me { margin-top: auto; border-top: 1px solid var(--border); padding-top: 12px; display: flex; gap: 10px; align-items: center; }
.main { min-width: 0; padding: 28px clamp(16px, 3vw, 48px) 96px; width: 100%; }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }

/* Piezas */
.card { border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px; background: var(--bg); min-width: 0; }
/* Sin tarjetas dentro de tarjetas: una tarjeta anidada se vuelve sub-bloque (sin borde, fondo suave, radio 12). */
.card .card { border-color: transparent; background: var(--surface); border-radius: var(--r-md); box-shadow: none; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card-h h2, .card-h h3 { margin: 0; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.stack { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); } /* minmax(0): un hijo con texto sin cortes no ensancha la página */
.row { display: flex; align-items: center; gap: 12px; }
.between { justify-content: space-between; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; font-weight: 600; font-size: 12.5px; color: var(--text-2); flex: none; }
.avatar.xs { width: var(--av-xs); height: var(--av-xs); font-size: 12px; }
.avatar.sm { width: var(--av-sm); height: var(--av-sm); font-size: 12px; }
.avatar.md { width: var(--av-md); height: var(--av-md); font-size: 13.5px; }
.avatar.lg { width: var(--av-lg); height: var(--av-lg); font-size: 19px; }
/* Pills: tinte + borde del mismo tono + ícono opcional de 12 px. */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 500; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); white-space: nowrap; }
.pill:has(> svg:first-child) { padding-left: 7px; }
.pill > svg { width: 12px; height: 12px; flex: none; }
.pill.ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line); }
.pill.warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.pill.bad { background: var(--bad-soft); color: var(--bad); border-color: var(--bad-line); }
.pill.acc { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
/* Chip y avatar (sin foto) con el color de la empresa */
.pill.co-ope { background: var(--co-ope-soft); color: var(--co-ope-ink); border-color: transparent; }
.pill.co-cia { background: var(--co-cia-soft); color: var(--co-cia-ink); border-color: transparent; }
.pill.co-zev { background: var(--co-zev-soft); color: var(--co-zev-ink); border-color: transparent; }
.pill.co-seg { background: var(--co-seg-soft); color: var(--co-seg-ink); border-color: transparent; }
.avatar.co-ope { background: var(--vh-ope, var(--co-ope)); color: #fff; border-color: transparent; }
.avatar.co-cia { background: var(--vh-cia, var(--co-cia)); color: #fff; border-color: transparent; }
.avatar.co-zev { background: var(--vh-zev, var(--co-zev)); color: #fff; border-color: transparent; }
.avatar.co-seg { background: var(--vh-seg, var(--co-seg)); color: #fff; border-color: transparent; }
.co-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; background: var(--border-strong); }
.co-dot.co-ope { background: var(--co-ope); } .co-dot.co-cia { background: var(--co-cia); } .co-dot.co-zev { background: var(--co-zev); } .co-dot.co-seg { background: var(--co-seg); }
/* Botones: 40 normal · 32 compacto (tablas) · 48 principal/móvil. */
.btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--border-strong); background: var(--bg); color: var(--text); padding: 8px 14px; border-radius: 8px; font-weight: 500; cursor: pointer; min-height: var(--control); transition: background var(--d1), transform var(--d1); }
.btn:hover { background: var(--surface-2); }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent); filter: brightness(1.08); }
.btn.sm { padding: 4px 10px; min-height: var(--control-sm); font-size: 13px; border-radius: 8px; }
.btn.lg { min-height: var(--control-lg); padding: 10px 20px; font-size: 15px; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn:disabled { opacity: .5; cursor: default; }
.field { display: grid; gap: 5px; } .field label { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.input { border: 1px solid var(--border-strong); border-radius: 8px; padding: 9px 11px; background: var(--bg); color: var(--text); width: 100%; min-height: 40px; }
.input::placeholder { color: var(--text-3); }
/* Controles de la misma altura en todo el sistema (--control = 40 px): campos de texto, fechas, números y selectores.
   El <select> deja de usar el aspecto nativo de macOS (más bajo y sin relleno) y lleva su propio chevrón; así una fila
   «Fecha · Código · Tipo de contrato · Jornada» queda pareja. El textarea conserva su altura libre. */
.input:not(textarea) { height: var(--control); box-sizing: border-box; padding-top: 0; padding-bottom: 0; line-height: calc(var(--control) - 2px); }
select.input { appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer; background-repeat: no-repeat; background-position: right 12px center; background-size: 12px 12px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%2352525b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><path d='M2.5 4.5 6 8l3.5-3.5'/></svg>"); }
select.input[multiple], select.input[size] { height: auto; padding: 6px 11px; line-height: 1.4; background-image: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) select.input { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23b4b4bd' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><path d='M2.5 4.5 6 8l3.5-3.5'/></svg>"); } }
:root[data-theme="dark"] select.input { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23b4b4bd' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><path d='M2.5 4.5 6 8l3.5-3.5'/></svg>"); }
input.input[type="date"], input.input[type="time"], input.input[type="month"] { -webkit-appearance: none; appearance: none; }
.input:focus, .btn:focus-visible, a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.form { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); align-items: start; } /* start: una celda alta no estira a su vecina */
dl.kv { display: grid; grid-template-columns: minmax(110px, 40%) 1fr; gap: 8px 12px; margin: 0; }
dl.kv dt { color: var(--text-2); } dl.kv dd { margin: 0; font-weight: 500; word-break: break-word; }
table { width: 100%; border-collapse: collapse; } th { text-align: left; font-size: 12px; color: var(--text-2); font-weight: 500; padding: 8px 10px; border-bottom: 1px solid var(--border); }
td { padding: 11px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; } tr:last-child td { border-bottom: 0; }
/* Pestañas */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 12px; cursor: pointer; color: var(--text-2); font-weight: 500; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button:hover { color: var(--text); }
.tabs button.on { color: var(--text); border-bottom-color: var(--sel); }
.stat { font-size: var(--fs-kpi); font-weight: 600; letter-spacing: -.03em; }
.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 12px; z-index: 80; max-width: calc(100vw - 32px); box-shadow: var(--shadow-3); animation: toast-in var(--d3) var(--ease) both; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 12px); } }
.person-link { text-decoration: none; display: flex; gap: 12px; align-items: center; min-width: 0; }
.person-link:hover .n { text-decoration: underline; }
.n { font-weight: 500; } .trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Componentes compartidos (fundamentos) ---------- */
/* Barra de avance única: 8 px, radio completo, acento de la paleta. Valor por style="width:…" o --v. */
.bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; min-width: 40px; }
.bar > span { display: block; height: 100%; border-radius: 99px; background: var(--accent); width: var(--v, 0%); min-width: 2px; transform-origin: left; animation: bar-grow 900ms var(--ease) both; }
.bar.muted-bar > span, .bar.is-guide > span { background: var(--text-3); }
.bar.ok > span { background: var(--ok); } .bar.warn > span { background: var(--warn); } .bar.bad > span { background: var(--bad); }
@keyframes bar-grow { from { transform: scaleX(0); } }
/* Anillo de avance (ring()): valor 0–1 en --v, tamaño en --size. */
.ring { --v: 0; --size: 84px; width: var(--size); height: var(--size); position: relative; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); display: block; }
.ring circle { fill: none; stroke-width: 3.4; }
.ring .ring-bg { stroke: var(--surface-2); }
.ring .ring-fg { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 100 100; stroke-dashoffset: calc(100 - var(--v) * 100); transition: stroke-dashoffset 1.1s var(--ease); }
.ring .ring-lbl { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; line-height: 1.05; }
.ring .ring-lbl b { font-size: calc(var(--size) * .24); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.ring .ring-lbl small { font-size: 12px; color: var(--text-2); display: block; margin-top: 2px; }
/* Aviso único: neutro, ok, warn, bad o acento. Tinte + borde completo; nunca rayas laterales.
   .note-box queda como alias del aviso neutro (compatibilidad). */
.notice, .note-box { padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 13.5px; min-width: 0; overflow-wrap: anywhere; }
.notice.ok { background: var(--ok-soft); border-color: var(--ok-line); }
.notice.warn { background: var(--warn-soft); border-color: var(--warn-line); }
.notice.bad { background: var(--bad-soft); border-color: var(--bad-line); }
.notice.acc, .note-box.accent { background: var(--accent-soft); border-color: transparent; }
.notice:has(> .notice-ic) { display: flex; gap: 12px; align-items: flex-start; }
.notice-ic { flex: none; display: grid; place-items: center; width: 20px; height: 20px; margin-top: 1px; color: var(--text-2); }
.notice.ok .notice-ic { color: var(--ok); } .notice.warn .notice-ic { color: var(--warn); } .notice.bad .notice-ic { color: var(--bad); } .notice.acc .notice-ic { color: var(--accent-ink); }
.notice-ic svg { width: 18px; height: 18px; }
/* Flujo normal, NO grid: con grid cada hijo (un <strong>, un enlace, hasta el punto final) caía en su propia
   línea y el texto se leía desarmado. La separación se aplica solo entre hijos de bloque. */
.notice-body { min-width: 0; flex: 1; }
.notice-body > p, .notice-body > div, .notice-body > ul, .notice-body > ol, .notice-body > table { margin: 0; }
.notice-body > p + *, .notice-body > div + *, .notice-body > ul + *, .notice-body > ol + * { margin-top: 6px; }
.notice h2, .notice h3 { margin: 0; }
.notice + .notice { margin-top: 10px; }
.notice[hidden] { display: none; }
/* Estado vacío: ilustración + frase humana + siguiente acción. */
.empty { text-align: center; display: grid; justify-items: center; gap: 8px; padding: 24px 18px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--bg); color: var(--text-2); }
.card .empty { border-color: transparent; background: none; padding: 16px 8px; }
.empty .il { width: 100%; max-width: 150px; height: auto; display: block; }
.empty h3 { font-size: 16px; letter-spacing: -.01em; margin: 4px 0 0; color: var(--text); font-weight: 600; text-wrap: balance; }
.empty p { color: var(--text-2); font-size: 13.5px; max-width: 420px; text-wrap: pretty; }
.empty .empty-act { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 6px; }
.empty.sm { padding: 12px; gap: 6px; }
.empty.sm .il { max-width: 96px; }
.empty.sm h3 { font-size: 14.5px; }
.il { display: block; width: 100%; height: auto; }
/* Chips de ícono tintado (piezas de Inicio en fase 2) */
/* Inicio › Requiere tu atención: la foto de la persona del pendiente, con el tipo de pendiente como insignia (como SuccessFactors). */
.hm-av { position: relative; flex: none; width: 40px; height: 40px; }
.hm-av .avatar.md { width: 40px; height: 40px; font-size: 13.5px; }
.hm-av-k { position: absolute; right: -5px; bottom: -5px; width: 20px; height: 20px; border-radius: 50%; background: var(--bg); border: 1px solid var(--border); display: grid; place-items: center; color: var(--text-2); }
.hm-av-k svg { width: 11px; height: 11px; }
.hm-av-k.warn { color: var(--warn); border-color: var(--warn-line); }
.tile-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); flex: none; }
.tile-ic.acc { background: var(--accent-soft); color: var(--accent-ink); } .tile-ic.ok { background: var(--ok-soft); color: var(--ok); } .tile-ic.warn { background: var(--warn-soft); color: var(--warn); } .tile-ic.bad { background: var(--bad-soft); color: var(--bad); }
/* Lista con separadores finos */
.list { display: grid; }
.list > * { padding: 12px 0; border-bottom: 1px solid var(--border); }
.list > *:last-child { border-bottom: 0; padding-bottom: 0; }
.list > *:first-child { padding-top: 0; }

/* Organigrama */
.org ul { list-style: none; margin: 0; padding-left: 22px; border-left: 1px solid var(--border); }
.org > ul { padding-left: 0; border-left: 0; }
.org li { padding: 5px 0; }
.node { display: inline-flex; gap: 10px; align-items: center; border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px; background: var(--bg); text-decoration: none; max-width: 100%; }
.node.vacant { border-style: dashed; color: var(--text-2); background: var(--surface); }


/* Móvil: barra inferior */
.bottom { display: none; }
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; } .side { display: none; }
  .bottom { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; inset: auto 0 0 0; background: var(--bg); border-top: 1px solid var(--border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); z-index: 40; }
  .bottom a { text-align: center; text-decoration: none; color: var(--text-2); font-size: 12px; font-weight: 500; padding: 6px 2px; border-radius: 8px; }
  .bottom a.on { color: var(--sel-ink); background: var(--sel-soft); }
  .bottom svg { display: block; margin: 0 auto 2px; }
  table.resp thead { display: none; } table.resp tr { display: grid; gap: 4px; padding: 12px 0; border-bottom: 1px solid var(--border); } table.resp td { border: 0; padding: 0; }
}

/* Diálogos */
.dialog { border: 1px solid var(--border); border-radius: var(--r-lg); padding: 22px; width: min(560px, calc(100vw - 32px)); color: var(--text); background: var(--bg); box-shadow: var(--shadow-3); }
.dialog::backdrop { background: rgba(10, 10, 10, .45); }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Núcleo: encabezado, buscador y notificaciones ---------- */
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.brand-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 10px; }
.brand-row .brand { padding-bottom: 0; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 8px; border: 1px solid transparent; background: none; cursor: pointer; color: var(--text-2); }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn:focus-visible, .search-btn:focus-visible, .chip:focus-visible, .search-item:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.badge { position: absolute; top: 3px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--sel); color: var(--on-sel); font-size: 12px; font-weight: 600; display: grid; place-items: center; line-height: 1; }
.badge[hidden] { display: none; }
.search-btn { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 38px; padding: 6px 10px; margin-bottom: 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text-3); cursor: pointer; text-align: left; }
.search-btn span { flex: 1; }
.search-btn:hover { border-color: var(--border-strong); color: var(--text-2); }
kbd { font: inherit; font-size: 12px; color: var(--text-3); border: 1px solid var(--border); border-radius: 4px; padding: 0 5px; background: var(--surface); }
.me-link { text-decoration: none; min-width: 0; flex: 1; border-radius: 8px; }
.me-link:hover .n { text-decoration: underline; }
.topbar { display: none; }
.dialog.search-dlg { margin-top: 10vh; width: min(620px, calc(100vw - 24px)); padding: 14px; }
.search-field { gap: 8px; border: 1px solid var(--border-strong); border-radius: 12px; padding: 0 10px; }
.search-field .input, .search-field .input:focus { border: 0; padding-left: 0; outline: none; }
.search-field:focus-within { outline: 2px solid var(--focus); outline-offset: 1px; }
.search-list { display: grid; gap: 2px; max-height: min(420px, 55vh); overflow-y: auto; }
.search-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; text-decoration: none; min-width: 0; border: 1px solid transparent; }
.search-item.on, .search-item:hover { background: var(--sel-soft); border-color: var(--border); }
.dialog.notif-dlg { margin: 16px auto auto calc(var(--side) + 8px); width: min(420px, calc(100vw - 24px)); padding: 16px; }
.notif-list { display: grid; gap: 4px; max-height: min(480px, 65vh); overflow-y: auto; }
.notif { display: flex; gap: 10px; padding: 10px; border-radius: 12px; text-decoration: none; border: 1px solid transparent; }
.notif:hover { background: var(--surface-2); }
.notif.unread { background: var(--sel-soft); border-color: var(--border); }
.notif .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex: none; background: transparent; }
.notif.unread .dot { background: var(--sel); }

/* Chips de filtro y acciones rápidas */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { text-decoration: none; display: inline-flex; align-items: center; border: 1px solid var(--border-strong); background: var(--bg); border-radius: 99px; padding: 5px 12px; min-height: 34px; cursor: pointer; font-weight: 500; color: var(--text-2); }
.chip[aria-pressed="true"] { background: var(--sel-soft); color: var(--sel-ink); border-color: var(--sel); }
.chip b { font-variant-numeric: tabular-nums; font-weight: 600; opacity: .75; }
.quick { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.quick a { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; font-weight: 500; min-height: 48px; background: var(--bg); }
.quick a:hover { border-color: var(--border-strong); background: var(--surface); }
.quick a svg { color: var(--sel-ink); flex: none; }

/* Perfil: "a partir de fecha" y listas editables */
.asof { display: flex; align-items: end; gap: 8px; flex-wrap: wrap; }
.asof .field { min-width: 170px; }
.item-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.item-row:last-child { border-bottom: 0; }
.item-row .actions { display: flex; gap: 6px; flex: none; }
.section-title { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin: 14px 0 4px; font-weight: 600; }
.section-title:first-child { margin-top: 0; }

/* Calendario del equipo */
.cal { display: grid; grid-template-columns: 46px repeat(7, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
/* Número de semana ISO al inicio de cada fila (pedido 2026-09-26) */
.cal .wk { display: grid; place-items: start center; padding: 8px 4px; background: var(--surface); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); font-size: 12px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.cal .dow.wk { place-items: center; }
.cal .dow { font-size: 12px; color: var(--text-2); font-weight: 600; padding: 8px; background: var(--surface); border-bottom: 1px solid var(--border); }
.cal .day { min-height: 104px; padding: 6px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal > :nth-child(8n) { border-right: 0; } /* 8 columnas: semana + 7 días */
.cal .day.out { background: var(--surface); color: var(--text-3); }
.cal .day.weekend { background: var(--surface); }
.cal .day.today .num-day { background: var(--sel); color: var(--on-sel); }
.cal .num-day { font-size: 12px; font-weight: 600; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; }
.cal .ev { font-size: 12px; padding: 2px 6px; border-radius: 8px; border: 1px solid var(--ok-line); background: var(--ok-soft); color: var(--ok); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal .ev.pend { background: var(--warn-soft); color: var(--warn); border-style: dashed; border-color: var(--warn-line); font-style: italic; }
.cal .ev.hol { background: var(--surface-2); color: var(--text-2); border-color: var(--border); }
.cal-list { display: none; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 4px; border: 1px solid var(--border); display: inline-block; }

/* Organigrama: búsqueda y vista por persona */
.node.hit { outline: 2px solid var(--accent); outline-offset: 2px; background: var(--accent-soft); }
.node.focus { border-color: var(--accent); background: var(--accent-soft); }
.chain { display: grid; gap: 8px; justify-items: start; }
.chain .link { width: 1px; height: 14px; background: var(--border-strong); margin-left: 30px; }
.org-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
.org-tools .field { flex: 1 1 220px; }

/* Administración */
.table-scroll { overflow-x: auto; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
.inline-form .field { flex: 1 1 160px; }
.check { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; }
.check input { width: 18px; height: 18px; }
code.secret { font-size: 15px; padding: 3px 8px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--bg); user-select: all; word-break: break-all; }

@media (max-width: 820px) {
  .shell { align-content: start; }
  .topbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--border); padding: 6px 12px 6px 16px; }
  .topbar .brand { padding: 0; }
  .main { padding-top: 18px; }
  .dialog.notif-dlg { margin: 56px auto auto; }
  .cal { display: none; } .cal-list { display: block; }
  .item-row { flex-wrap: wrap; }
}
.grid.wide { grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr)); }

/* Impresión (recibos, declaraciones, constancias, evaluaciones): solo el contenido, sin la barra superior móvil ni la navegación. */
@media print {
  .topbar, .side, .bottom, .toast, .search-dlg, .notif-dlg { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; max-width: none; }
}

/* Campo con dato faltante o inválido (tinte + borde completo, sin rayas laterales) */
.input.is-invalid, select.is-invalid, textarea.is-invalid { border-color: var(--bad); background: var(--bad-soft); }
.btn.primary.danger { background: var(--bad); border-color: var(--bad); }

/* Foto de perfil dentro del avatar: la imagen cubre las iniciales; si falla, quedan las iniciales. */
.avatar { position: relative; overflow: hidden; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar.xl { width: 96px; height: 96px; font-size: 28px; }
.photo-edit { display: grid; justify-items: center; gap: 6px; }
.photo-edit .btn { font-size: 12.5px; }

/* ---------- Organigrama visual (modelo SuccessFactors) ---------- */
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.oc-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.oc-search { position: relative; flex: 1 1 260px; min-width: 0; }
.oc-results { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; right: 0; background: var(--bg); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.08); padding: 6px; max-height: 360px; overflow: auto; }
.oc-res { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; border: 0; background: none; padding: 8px; border-radius: 8px; cursor: pointer; }
.oc-res:hover, .oc-res.on { background: var(--surface-2); }
.oc-check { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--text-2); }
.oc-zoom { display: inline-flex; gap: 6px; align-items: center; font-variant-numeric: tabular-nums; font-size: 13px; color: var(--text-2); }
.oc-view { margin-top: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: auto; height: calc(100dvh - 250px); min-height: 420px; cursor: grab; }
.oc-view.dragging { cursor: grabbing; user-select: none; }
.oc-view:fullscreen { height: 100dvh; border-radius: 0; background: var(--surface); }
.oc-canvas { min-width: max-content; padding: 28px 32px 48px; display: flex; flex-direction: column; align-items: center; }
.oc-up-wrap { display: flex; justify-content: center; }
.oc-up { background: var(--text); color: var(--bg); border-color: var(--text); border-radius: 99px; }
.oc-chain { display: flex; flex-direction: column; align-items: center; }
.oc-up-wrap::after, .oc-chain::after { content: ''; width: 1px; height: 22px; background: var(--border-strong); }
.oc-none { text-align: center; margin-top: 10px; }

/* Tarjeta */
.oc-card { width: 250px; height: 200px; position: relative; background: var(--bg); border: 1px solid var(--border); border-radius: 12px; text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s; display: flex; flex-direction: column; }
.oc-card:hover { border-color: var(--border-strong); box-shadow: 0 6px 18px rgba(0,0,0,.06); }
.oc-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.oc-card.focus { border: 2px solid var(--accent); box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.oc-card.vacant { border-style: dashed; background: var(--surface); }
.oc-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px 0; font-size: 12px; font-weight: 600; color: var(--text-2); }
.oc-profile { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: var(--text-2); flex: none; }
.oc-profile:hover { background: var(--surface-2); color: var(--text); }
.oc-card-body { display: flex; gap: 10px; align-items: center; padding: 8px 12px 12px; min-width: 0; }
.oc-card-body .avatar.lg { width: 48px; height: 48px; font-size: 15px; flex: none; }
.oc-vac-av { color: var(--text-3); border-style: dashed; }
.oc-who { min-width: 0; flex: 1; display: grid; gap: 2px; justify-items: start; }
/* Texto dentro de la tarjeta: nombre y empresa · área bajan de línea (máx. 2) en vez de salirse; la estructura del organigrama no cambia. */
.oc-who > .oc-name, .oc-who > .trunc { max-width: 100%; overflow-wrap: anywhere; }
.oc-who > .trunc { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.oc-card-top { min-height: 38px; }
.oc-card-top > :first-child { min-width: 0; overflow-wrap: anywhere; }
.oc-name { line-height: 1.25; }
.oc-code { font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.oc-key { font-size: 12px; padding: 0 7px; }
.oc-card-foot { display: flex; flex-wrap: nowrap; white-space: nowrap; overflow: hidden; gap: 4px 12px; align-items: center; padding: 8px 12px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-2); background: var(--surface); border-radius: 0 0 12px 12px; margin-top: auto; }
.oc-card-body { flex: 1; min-height: 0; overflow: hidden; }
.oc-card-foot b { color: var(--text); font-variant-numeric: tabular-nums; }
/* Bloque compacto de directos no desplegados (desglose tipo SuccessFactors): rejilla de tarjetas sin líneas entre sí,
   colgada del jefe por el conector de su <li>. Los desplegados van aparte, cada uno en su columna. */
.oc-grid { display: grid; gap: 20px 10px; justify-content: center; }
.oc-grid > .oc-card { width: 250px; }
@media (max-width: 820px) { .oc-grid { grid-template-columns: 1fr !important; } .oc-grid > .oc-card { width: 100%; } }
/* Botón desplegar/plegar equipo (▾ N) al final del pie de la tarjeta; el clic no enfoca la tarjeta. */
.oc-tg { position: absolute; left: 50%; bottom: -11px; transform: translateX(-50%); z-index: 2; border: 1px solid var(--border-strong); background: var(--bg); color: var(--text-2); border-radius: 99px; padding: 1px 9px; font: inherit; font-size: 12px; line-height: 18px; cursor: pointer; font-variant-numeric: tabular-nums; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.oc-tg:hover { border-color: var(--border-strong); color: var(--text); }
.oc-tg[aria-expanded="true"] { background: var(--surface-2); color: var(--text); }
.oc-tg:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* Árbol con conectores */
.oc-tree ul { display: flex; justify-content: center; padding: 22px 0 0; margin: 0; position: relative; }
.oc-tree > ul { padding-top: 0; }
.oc-tree li { list-style: none; position: relative; padding: 22px 8px 0; display: flex; flex-direction: column; align-items: center; }
.oc-tree li::before, .oc-tree li::after { content: ''; position: absolute; top: 0; right: 50%; width: 50%; height: 22px; border-top: 1px solid var(--border-strong); }
.oc-tree li::after { right: auto; left: 50%; border-left: 1px solid var(--border-strong); }
.oc-tree li:only-child::before, .oc-tree li:only-child::after { display: none; }
.oc-tree li:only-child { padding-top: 0; }
.oc-tree ul ul > li:only-child { padding-top: 22px; }
.oc-tree ul ul > li:only-child::after { display: block; border-top: 0; width: 0; }
.oc-tree li:first-child::before, .oc-tree li:last-child::after { border: 0 none; }
.oc-tree li:last-child::before { border-right: 1px solid var(--border-strong); border-radius: 0 8px 0 0; }
.oc-tree li:first-child::after { border-radius: 8px 0 0 0; }
.oc-tree ul ul::before { content: ''; position: absolute; top: 0; left: 50%; width: 0; height: 22px; border-left: 1px solid var(--border-strong); }
.oc-tree > ul > li { padding-top: 0; }
.oc-tree > ul > li::before, .oc-tree > ul > li::after { display: none; }

/* Móvil: el equipo se apila en columna con una guía a la izquierda (sin desplazamiento horizontal). */
@media (max-width: 820px) {
  .oc-view { height: auto; min-height: 0; cursor: default; }
  .oc-canvas { min-width: 0; padding: 16px 12px 24px; align-items: stretch; zoom: 1 !important; }
  .oc-zoom, #ofull { display: none; }
  .oc-card { width: 100%; height: auto; min-height: 0; }
  .oc-chain, .oc-up-wrap { align-items: stretch; }
  .oc-up-wrap::after, .oc-chain::after { align-self: center; }
  .oc-tree ul { flex-direction: column; align-items: stretch; padding: 12px 0 0 16px; margin-left: 12px; border-left: 1px solid var(--border-strong); }
  .oc-tree > ul { padding: 0; margin: 0; border: 0; }
  .oc-tree li { padding: 6px 0 0; align-items: stretch; }
  .oc-tree li::before, .oc-tree li::after, .oc-tree ul ul::before { display: none !important; }
}
/* Equipo sin subordinados apilado en columna, con guía a la izquierda */
.oc-tree ul.oc-stack { flex-direction: column; align-items: stretch; gap: 20px; padding: 22px 0 0; }
.oc-tree ul.oc-stack::after { content: ''; position: absolute; top: 22px; left: 10px; width: calc(50% - 10px); border-top: 1px solid var(--border-strong); }
.oc-tree ul.oc-stack > li { padding: 0 0 0 24px; align-items: stretch; }
.oc-tree ul.oc-stack > li:only-child { padding-top: 0; }
.oc-tree ul.oc-stack > li::before { display: block; content: ''; position: absolute; top: 0; left: 10px; right: auto; width: 14px; height: 46px; border: 0; border-left: 1px solid var(--border-strong); border-bottom: 1px solid var(--border-strong); border-radius: 0 0 0 6px; }
.oc-tree ul.oc-stack > li::after { display: block; content: ''; position: absolute; top: 46px; left: 10px; bottom: -20px; width: 0; height: auto; border: 0; border-left: 1px solid var(--border-strong); border-radius: 0; }
.oc-tree ul.oc-stack > li:last-child::after, .oc-tree ul.oc-stack > li:only-child::after { display: none; }

/* ---------- niveles jerárquicos ---------- */
.oc-grade { padding: 2px 12px 0; font-size: 12px; color: var(--text-2); }
.grade-warn { grid-column: 1 / -1; margin: 0; font-size: 13px; } /* visual: .notice.warn */
.grade-warn[hidden] { display: none; }
.grade-list { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); }
.grade-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.grade-row .input { flex: 1; min-width: 0; }
.grade-n { flex: 0 0 32px; width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 50%; font-weight: 600; font-variant-numeric: tabular-nums; }
.grade-count { flex: 0 0 auto; }

/* ---------- Estructura y compensación: el camino de 4 pasos (#/admin/estructura) ---------- */
/* Cada paso es una sección plegable numerada; el número es la única pista de orden (sin rayas laterales de color). */
.paso > .fold-sum .paso-n { flex: none; width: 28px; height: 28px; margin-right: 10px; display: inline-grid; place-items: center; border-radius: 99px;
  background: var(--surface-2); border: 1px solid var(--border); font-size: var(--fs-xs); font-weight: 700; font-variant-numeric: tabular-nums; }
.paso > .fold-sum h2 { display: flex; align-items: center; }
.paso-sub { margin-top: var(--sp-2); }
.paso-next { margin: 0; padding-top: var(--sp-3); border-top: 1px solid var(--border); display: flex; justify-content: flex-end; }
/* Paso 2: nombre y banda de cada nivel en una sola tabla; los montos se leen en columna. */
.gr-table .gr-num { max-width: 140px; margin-left: auto; text-align: right; }
.gr-table .gr-mid { font-variant-numeric: tabular-nums; color: var(--text-2); }
.gr-table td .grade-n { margin: 0; }
@media (max-width: 860px) { .gr-table .gr-num { max-width: none; } }

/* ---------- Ajustes visuales básicos (auditoría 07, 2026-09-18) ---------- */
/* Menú lateral: con muchos módulos (RRHH/Dirección ~24 entradas) el final quedaba fuera de la pantalla y no se podía alcanzar. */
.side { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.side .me .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Foco visible también en pestañas, selectores, textos largos y desplegables (antes solo .btn y enlaces). */
.tabs button:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, button:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
/* Avatares sin foto: tinte neutro de selección (el acento se reserva para banners, ilustraciones, avance y acción principal). */
.avatar { background: var(--sel-soft); color: var(--sel-ink); }
/* Inicio: la fecha de un pendiente no se parte en dos líneas. */
#att td.muted.small { white-space: nowrap; }
/* Números grandes: cifras tabulares para que no "bailen". */
.stat, .num, .nm-big, .cl-avg { font-variant-numeric: tabular-nums; }
/* Movimiento reducido: sin transiciones ni animaciones. */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media (max-width: 820px) {
  /* Acciones rápidas: 2 columnas con ícono arriba (fila de accesos como en el portal de referencia), no 4 renglones a lo ancho. */
  .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .quick a { flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px; min-height: 72px; line-height: 1.25; }
  /* Tablas convertidas en tarjetas: cada dato lleva su etiqueta (antes se veían montos sueltos sin saber qué eran). */
  table.resp td[data-label]::before { content: attr(data-label) ': '; color: var(--text-2); font-size: 12.5px; font-weight: 400; }
  table.resp td.num, table.resp td[style*="text-align:right"] { text-align: left !important; }
  /* Pestañas largas: se desplazan dentro de su franja sin barra visible. */
  .tabs { scrollbar-width: none; } .tabs::-webkit-scrollbar { display: none; }
}

/* ---------- Fundamentos visuales (fase 1, 2026-09-19) ---------- */
/* Organigrama congelado: su estructura no cambia con la escala nueva de botones (32 px) ni con el acento de la paleta.
   Solo se fijan tokens y la altura de los botones compactos de ESA pantalla; las reglas .oc-* no se tocan. */
#main:has(#oview) .btn.sm { min-height: 30px; }
#oview { --accent: var(--sel); --accent-soft: var(--sel-soft); }

/* Inicio de sesión y "Crea tu contraseña": pantalla dividida (ilustración + frase + logos | formulario). */
.login { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); background: var(--bg); }
.login-art { position: relative; overflow: hidden; background: linear-gradient(160deg, var(--accent-soft), var(--surface) 80%); padding: 28px clamp(20px, 4vw, 48px);
  display: grid; align-content: space-between; gap: 20px; border-bottom: 1px solid var(--border); }
.login-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.02em; font-size: 16px; min-height: 32px; }
.login-brand span { color: var(--text-2); font-weight: 500; }
.login-brand img { height: 32px; width: auto; max-width: 200px; object-fit: contain; }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-size: 14px; font-weight: 700; flex: none; }
.login-il { width: 100%; max-width: 420px; margin: 0 auto; }
.login-quote { display: grid; gap: 14px; }
.login-quote blockquote { margin: 0; font-size: clamp(20px, 2.4vw, 28px); letter-spacing: -.03em; line-height: 1.15; font-weight: 600; max-width: 460px; text-wrap: balance; }
.logos { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.logos span { border: 1px dashed var(--border-strong); border-radius: 8px; padding: 6px 10px; font-size: 12px; font-weight: 600; color: var(--text-2); background: color-mix(in srgb, var(--bg) 70%, transparent); }
.logos img { height: 28px; width: auto; max-width: 140px; object-fit: contain; }
.login-main { display: grid; place-items: center; padding: 32px 20px 40px; }
.login-form { width: min(400px, 100%); display: grid; gap: 14px; }
.login-form h1 { font-size: var(--fs-h1); line-height: 1.15; margin: 0; }
.login-form .btn.primary { min-height: var(--control-lg); font-size: 15px; }
.login-help { justify-self: center; font-size: 13px; color: var(--text-2); text-align: center; }
.login-err:empty { display: none; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 84px; }
.pw-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); min-height: 32px; padding: 0 10px; border: 0; background: none; border-radius: 8px; color: var(--text-2); font-size: 13px; font-weight: 500; cursor: pointer; }
.pw-toggle:hover { background: var(--surface-2); color: var(--text); }
@media (min-width: 900px) {
  .login { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
  .login-art { border-bottom: 0; border-right: 1px solid var(--border); padding: 36px clamp(28px, 4vw, 56px); min-height: 100dvh; }
}
@media (max-width: 899px) {
  .login-art { padding: 18px 20px 20px; gap: 12px; }
  .login-il { max-width: 200px; }
  .login-quote blockquote { font-size: 19px; }
  .login-art .logos { display: none; }
  .login-main { place-items: start center; padding-top: 24px; }
}

/* Apariencia: paletas y modo */
.pal-list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(190px, 100%), 1fr)); }
.pal { border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; text-align: left; background: var(--bg); padding: 0; cursor: pointer; display: grid; grid-template-rows: 1fr auto; color: var(--text); }
.pal:hover { border-color: var(--border-strong); }
.pal[aria-pressed="true"] { outline: 2px solid var(--sel); outline-offset: 2px; }
.pal-chips { display: flex; height: 44px; }
.pal-chips i { flex: 1; }
.pal-meta { padding: 9px 12px; display: grid; gap: 1px; }
.pal-meta small { color: var(--text-2); font-size: 12px; }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--surface-2); gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 0 14px; border-radius: 8px; font-weight: 500; color: var(--text-2); height: 34px; line-height: 34px; cursor: pointer; } /* 34 + 3 + 3 = --control (40 px) */
.seg button[aria-pressed="true"] { background: var(--bg); color: var(--text); box-shadow: var(--shadow-1), 0 0 0 1px var(--border); }

/* Marca */
.brand-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); align-items: start; }
.brand-slot { display: grid; gap: 10px; align-content: start; }
.brand-prev { height: 96px; border: 1px dashed var(--border-strong); border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; padding: 12px; overflow: hidden; text-align: center;
  background-color: var(--bg); background-image: linear-gradient(45deg, var(--surface-2) 25%, transparent 25%), linear-gradient(-45deg, var(--surface-2) 25%, transparent 25%),
  linear-gradient(45deg, transparent 75%, var(--surface-2) 75%), linear-gradient(-45deg, transparent 75%, var(--surface-2) 75%);
  background-size: 16px 16px; background-position: 0 0, 0 8px, 8px -8px, -8px 0; }
.brand-prev.sq { width: 96px; }
.brand-prev.doc { background: #fff; }
.brand-prev img { width: 100%; height: 100%; object-fit: contain; }
.brand-prev .muted { background: var(--bg); padding: 2px 8px; border-radius: 8px; }
.brand-spec { display: grid; gap: 2px; font-size: 12.5px; color: var(--text-2); }
.brand-spec b { color: var(--text); font-weight: 600; }
.brand-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.brand-acts label.btn { cursor: pointer; }
.brand-co:not(.fold) { display: grid; gap: 14px; }
.brand-co-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.brand-row3 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); align-items: start; }
.font-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--border); }
.font-row:last-child { border-bottom: 0; }
.font-sample { font-family: var(--font-display); font-size: 20px; letter-spacing: -.02em; }
.season-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; align-items: end; }
@media (max-width: 620px) { .season-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .season-row .field:first-child { grid-column: 1 / -1; } }
.checks { display: flex; flex-wrap: wrap; gap: 4px 18px; }

/* Movimiento reducido */
@media (prefers-reduced-motion: reduce) { .bar > span { animation: none; } .ring .ring-fg { transition: none; } }
/* Modo oscuro: los logos (hechos para fondo claro) se muestran sobre una placa blanca para que no desaparezcan.
   La vista previa de Marca siempre es clara: así se revisa el logo como se verá en la mayoría de los usos. */
:root[data-theme="dark"] :is(.brand-logo, .login-brand img, .logos img) { background: #fff; padding: 3px 6px; border-radius: 8px; box-sizing: content-box; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) :is(.brand-logo, .login-brand img, .logos img) { background: #fff; padding: 3px 6px; border-radius: 8px; box-sizing: content-box; } }
.brand-prev { --bg: #fff; --surface-2: #f1f1f3; --text-2: #52525b; color: #52525b; }
/* Casillas y opciones: color neutro de selección (no el acento). */
input[type="checkbox"], input[type="radio"] { accent-color: var(--sel); }

/* Logo real del holding en el menú: a lo ancho para que se lea "HeadOffice"; "People" debajo. En la barra móvil, compacto. */
.brand.has-logo { flex-direction: column; align-items: flex-start; gap: 6px; }
.side .brand.has-logo .brand-logo { height: auto; width: 100%; max-width: 168px; max-height: 56px; }
.brand.has-logo .brand-app { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); padding-left: 2px; }
.side .brand-row:has(.has-logo) { align-items: flex-start; }
.topbar .brand.has-logo { flex-direction: row; align-items: center; gap: 8px; }
.topbar .brand.has-logo .brand-logo { height: 28px; max-width: 120px; }
.topbar .brand.has-logo .brand-app { letter-spacing: .08em; }
/* Inicio de sesión: el logo real del holding a tamaño de portada, "People" debajo */
.login-brand:has(img) { flex-direction: column; align-items: flex-start; gap: 8px; }
.login-brand img { height: 64px; max-width: 280px; }
.login-brand:has(img) span { font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); padding-left: 2px; }
/* "PEOPLE" centrado debajo del logo (menú e inicio de sesión) */
.side .brand.has-logo { align-items: center; width: max-content; max-width: 100%; }
.side .brand.has-logo .brand-app { padding-left: 0; letter-spacing: .22em; margin-right: -.22em; }
.login-brand:has(img) { align-items: center; width: max-content; }
.login-brand:has(img) span { padding-left: 0; letter-spacing: .22em; margin-right: -.22em; }

/* Balance de la cuenta de tiempo (Tiempo del expediente y Mi tiempo): 4 indicadores, uso y tabla por año laboral. */
.bl-tiles.sm .kpi { padding: 10px 12px; } .bl-tiles.sm .kpi-v { font-size: 19px; } /* la fila es kpis(); en el expediente va compacta */
.bl-use { display: grid; gap: 6px; margin-top: 14px; }
.bl-h3 { font-size: var(--fs-h3); margin: 18px 0 6px; }
.bl-table td .n { font-variant-numeric: tabular-nums; }
.bl-table tr.bl-cur > td { background: var(--surface-2); }
.bl-table tr.bl-total > td { border-top: 1px solid var(--border-strong); font-weight: 600; }
.bl-table tr.bl-open > td { color: var(--text-2); }
.bl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 2px; }
.bl-foot { margin-top: 8px; }
.bl-more { margin-top: 12px; }
.bl-more > summary { cursor: pointer; font-size: var(--fs-sm); font-weight: 500; color: var(--text-2); min-height: 32px; display: flex; align-items: center; }
.bl-more[open] > summary { margin-bottom: 6px; }
@media (max-width: 820px) {
  .bl-table tr { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; }
  .bl-table tr > td:first-child { grid-column: 1 / -1; }
  .bl-table tr.bl-cur { background: var(--surface-2); border-radius: var(--r-sm); padding: 12px; border-bottom: 0; margin-bottom: 4px; }
  .bl-table tr.bl-cur > td { background: none; }
  .bl-table tr.bl-total > td { border-top: 0; }
}
/* Menú lateral: solo el logo (sin "People") y la campana centrada verticalmente con el logo. */
.side .brand.has-logo .brand-app { display: none; }
.side .brand-row:has(.has-logo) { align-items: center; }
.side .brand.has-logo { gap: 0; padding-top: 0; }
/* "← Volver a …" arriba del contenido cuando se llegó desde otra pantalla */
.back-link { display: inline-flex; align-items: center; gap: 4px; margin: -4px 0 12px -4px; padding: 4px 10px 4px 6px; border-radius: 99px; font-size: 13px; font-weight: 500; color: var(--text-2); text-decoration: none; }
.back-link:hover { background: var(--surface-2); color: var(--text); }
.back-link svg { width: 16px; height: 16px; }

/* Personas: barra de filtros (reutiliza .form + .rp-filters) y tabla ordenable (encabezados .rp-sort de Reportes). */
.pp-filters { grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }
.pp-filters .pp-q { grid-column: span 2; }
.pp-meta { margin: 0 0 8px; }
.pp-table th { padding: 0; white-space: nowrap; }
.pp-table .pp-mail { overflow-wrap: anywhere; }
.pp-filters .pp-ord { display: none; }
@media (max-width: 820px) {
  /* Móvil: filtros en dos columnas; la búsqueda, el orden y "Limpiar" a lo ancho. Sin encabezados de tabla, el orden va en su lista. */
  .pp-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pp-filters .pp-q, .pp-filters .pp-ord, .pp-filters .pp-clear { grid-column: 1 / -1; }
  .pp-filters .pp-ord { display: grid; }
}

/* =====================================================================================================================
   Patrones estándar (auditoría 2026-09 §2): P3 .fold · P5 .menu · P2 .filterbar · P4 .th-sort.
   Estado = tinte + borde completo + pill. Nunca rayas laterales de color.
   ===================================================================================================================== */
.fold { padding: 0; }
.fold-sum { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px; padding: 16px 20px; flex-wrap: wrap; min-height: var(--control-lg); }
.fold-sum::-webkit-details-marker { display: none; }
.fold-sum:hover { background: var(--surface); border-radius: inherit; }
.fold-sum:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; border-radius: inherit; }
.fold-chev { width: 10px; height: 10px; border-right: 2px solid var(--text-2); border-bottom: 2px solid var(--text-2); transform: rotate(-45deg); transition: transform var(--d1) var(--ease); flex: none; margin-right: 2px; }
.fold[open] .fold-chev { transform: rotate(45deg); }
.fold-t { display: grid; gap: 2px; flex: 1 1 320px; min-width: 0; }
.fold-t h2 { margin: 0; }
.fold-t .small { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.fold-body { padding: 0 20px 20px; display: grid; gap: var(--sp-4); }
.fold-all { justify-content: flex-end; gap: 8px; flex-wrap: wrap; }

.menu { position: relative; display: inline-block; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary.menu-b { min-width: var(--control-sm); padding-inline: 10px; font-size: 16px; line-height: 1; }
.menu[open] > summary { background: var(--sel-soft); border-color: var(--sel); }
.menu-pop { position: absolute; z-index: 40; top: calc(100% + 6px); right: 0; min-width: 200px; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r-md); box-shadow: var(--shadow-2); padding: 6px; display: grid; gap: 2px; }
.menu-item { border: 0; background: none; text-align: left; padding: 9px 10px; border-radius: 8px; cursor: pointer; font: inherit; font-weight: 500; color: var(--text); min-height: 38px; white-space: nowrap; }
.menu-item:hover, .menu-item:focus-visible { background: var(--surface-2); outline: none; }
.menu-item:focus-visible { box-shadow: inset 0 0 0 2px var(--focus); }
.menu-item.danger { color: var(--bad); }
@media (max-width: 860px) { .menu-pop { right: auto; left: 0; } }

.filterbar { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 12px; align-items: end; margin-bottom: 10px; }
.filterbar .fb-q { grid-column: span 2; }
.filterbar .fb-clear { display: flex; justify-content: flex-end; align-items: end; }
.fb-meta { margin: 0 0 10px; }
@media (max-width: 820px) {
  .filterbar { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .filterbar .fb-q, .filterbar .fb-clear { grid-column: 1 / -1; }
  .filterbar .fb-clear { justify-content: stretch; }
  .filterbar .fb-clear .btn { width: 100%; }
}
.th-cell { padding: 0; white-space: nowrap; }
.th-sort { display: flex; width: 100%; align-items: center; gap: 4px; border: 0; background: none; padding: 8px 10px; min-height: 38px;
  font: inherit; font-size: 12px; font-weight: 500; color: var(--text-2); cursor: pointer; text-align: left; }
th.num .th-sort { justify-content: flex-end; }
.th-sort:hover { color: var(--text); }
.th-sort:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; border-radius: 8px; }
.sort-arrow { font-size: 12px; }

/* ---------------------------------------------------------------------------------------------------------------------
   Administración · centro guiado: accesos rápidos, puesta en marcha y tarjetas por propósito.
   --------------------------------------------------------------------------------------------------------------------- */
.ad-quick { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 1180px) { .ad-quick { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 620px) { .ad-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ad-quick a { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--bg); text-decoration: none; color: var(--text); font-weight: 500; font-size: var(--fs-sm); min-height: var(--control-lg); }
.ad-quick a:hover { background: var(--surface-2); border-color: var(--border-strong); }
.ad-quick a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.ad-quick .ic { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--surface-2); color: var(--text-2); flex: none; }
.ad-quick a svg { width: 16px; height: 16px; }

.ad-setup .fold-body { gap: 0; }
.ad-steps { display: grid; }
.ad-step { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.ad-step:first-child { border-top: 0; }
.ad-step .ad-n { flex: none; width: 24px; height: 24px; border-radius: 99px; display: grid; place-items: center; font-size: var(--fs-xs); font-weight: 600;
  background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
.ad-step.done .ad-n { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line); }
.ad-step .ad-t { flex: 1 1 260px; min-width: 0; display: grid; gap: 2px; }
.ad-step .ad-t a { font-weight: 600; color: var(--text); text-decoration: none; }
.ad-step .ad-t a:hover { text-decoration: underline; }
.ad-step.done .ad-t a { color: var(--text-2); font-weight: 500; }
.ad-progress { display: grid; gap: 6px; margin-bottom: 4px; }

.ad-groups { display: grid; gap: var(--sp-5); }
.ad-group > h2 { margin: 0 0 4px; font-size: var(--fs-h2); }
.ad-group > p { margin: 0 0 12px; }
.ad-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 12px; align-items: stretch; }
.ad-card { display: grid; grid-template-rows: auto auto 1fr auto; gap: 8px; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--bg); }
.ad-card h3 { margin: 0; font-size: var(--fs-h3); }
.ad-card .ad-what { margin: 0; color: var(--text-2); font-size: var(--fs-sm); }
.ad-card .ad-detail { margin: 0; color: var(--text-2); font-size: var(--fs-xs); }
.ad-card .ad-act { display: flex; justify-content: flex-start; padding-top: 4px; }
.ad-card.warn { background: var(--warn-soft); border-color: var(--warn-line); }
.ad-card.bad { background: var(--bad-soft); border-color: var(--bad-line); }
.ad-crumb { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 4px; font-size: var(--fs-sm); color: var(--text-2); }
.ad-crumb a { color: var(--text-2); }

/* Barra lateral: cada sección se puede contraer (RRHH y Dirección tienen 26 entradas). */
.nav details > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 6px;
  margin: 14px 10px 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); }
.nav details > summary::-webkit-details-marker { display: none; }
.nav details > summary:hover { color: var(--text-2); }
.nav details > summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
.nav details > summary .nav-chev { width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform var(--d1) var(--ease); }
.nav details[open] > summary .nav-chev { transform: rotate(45deg); }
.nav details > summary .nav-n { font-size: 12px; letter-spacing: 0; color: var(--text-3); }
.nav details[open] > summary .nav-n { visibility: hidden; }
/* El select "Ordenar" solo aparece en móvil: ahí la tabla es de tarjetas y no hay encabezados que pulsar. */
.filterbar .fb-ord { display: none; }
@media (max-width: 820px) { .filterbar .fb-ord { display: grid; grid-column: 1 / -1; } }
/* Patrón único de fila de indicadores (core.js `kpis`): una sola familia para todo el sistema.
   Tanda 2 (2026-09-25): ya no quedan familias locales (.px-kpis, .cq-kpis, .nm-stats, .cl-kpis, .pf-stats, .tl-stats, .in-kpis, .ch-kpis); Tableros usa esta misma fila. */
.kpis { display: grid; gap: 1px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  background: var(--border); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.kpi { display: grid; align-content: start; gap: 4px; padding: 14px 16px; background: var(--bg); min-width: 0; text-decoration: none; color: inherit; }
a.kpi:hover { background: var(--surface); }
.kpi-l { font-size: 12px; color: var(--text-2); }
.kpi-v { font-size: 22px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; overflow-wrap: anywhere; }
.kpi-v small { font-size: 12px; font-weight: 500; color: var(--text-2); margin-left: 4px; }
.kpi-s { font-size: 12px; color: var(--text-3); }
.kpi.ok { background: var(--ok-soft); } .kpi.warn { background: var(--warn-soft); } .kpi.bad { background: var(--bad-soft); }
@media (max-width: 720px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpi-v { font-size: 19px; } }
.ad-done > summary { cursor: pointer; font-size: 12.5px; color: var(--text-2); padding: 8px 0 4px; list-style: none; }
.ad-done > summary::-webkit-details-marker { display: none; }
.ad-done > summary::before { content: '▸ '; }
.ad-done[open] > summary::before { content: '▾ '; }
.pf-check > summary { cursor: pointer; list-style: none; } .pf-check > summary::-webkit-details-marker { display: none; }
/* Encabezados ordenables automáticos (core.js `sortableTables`) */
th > .th-sort { display: inline-flex; align-items: center; gap: 2px; border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: inherit; }
th > .th-sort:hover { color: var(--text); text-decoration: underline; }
th > .th-sort:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.th-arrow { font-size: 12px; color: var(--text-3); }

/* Botón que se lee como enlace: para la salida discreta de un automatismo (ej. escribir un código a mano). */
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.linkish:hover { color: var(--text); }
.pos-code-old { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }

/* Diálogo por grupos: el formulario se lee en el orden en que se piensa, no como una lista de campos sueltos. */
.dlg-g { border: 1px solid var(--border); border-radius: var(--r-md, 10px); padding: 14px; }
.dlg-g + .dlg-g { margin-top: 10px; }
.dlg-g-h { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 14px; }
.dlg-g-n { flex: none; width: 24px; height: 24px; display: inline-grid; place-items: center; border-radius: 99px;
  background: var(--surface-2); border: 1px solid var(--border); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.dlg-g-s { margin: 6px 0 0; }
.dlg-g .form { margin-top: 12px; }
/* El código es el resultado del grupo 2 y el 3, no un dato que alguien escriba. */
.dlg-code { display: grid; gap: 10px; border: 1px solid var(--border); border-radius: var(--r-md, 10px); padding: 14px; background: var(--surface-2); margin-top: 10px; }
.dlg-code-v { margin: 2px 0 4px; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .02em; color: var(--text-3); }
.dlg-code-v.is-set { color: var(--text); }

/* Enfocado: los reportes directos se acomodan en columnas (como SuccessFactors) en lugar de una sola fila larga.
   Sin corchetes por tarjeta: una sola línea vertical baja del jefe al bloque, que es como se lee un equipo. */
.oc-tree ul.oc-fan { display: grid; grid-template-columns: repeat(auto-fit, 250px); justify-content: center;
  gap: 10px; padding: 22px 0 0; max-width: calc(250px * 3 + 10px * 2); margin: 0 auto; }
.oc-tree ul.oc-fan > li { padding: 0; align-items: stretch; }
.oc-tree ul.oc-fan > li::before, .oc-tree ul.oc-fan > li::after { display: none; }

/* Móvil: el bloque de reportes directos se apila en una sola columna. Va después de la regla base para ganarle por orden. */
@media (max-width: 820px) {
  .oc-tree ul.oc-fan { grid-template-columns: 1fr; max-width: none; margin: 0; padding: 12px 0 0 16px; }
}

/* Vista previa del nombre en el alta: se ve el desglose antes de guardar, sin adivinar por espacios. */
.nombre-preview { margin: 0; padding: 9px 11px; border: 1px dashed var(--border-strong); border-radius: var(--r-md); background: var(--surface-2); min-height: 40px; }

/* Desglose del salario al asignarlo: se ve cómo queda repartido antes de guardar. */
table.desglose { margin-top: 8px; max-width: 760px; }
table.desglose th.num, table.desglose td.num { white-space: nowrap; }
.dg-si { color: var(--ok); font-weight: 700; }
table.desglose tfoot th { border-top: 1px solid var(--border-strong); padding-top: 8px; font-size: 13px; color: var(--text); }

/* Costo para la empresa en el alta: plegado, porque no todos lo necesitan en cada captura. */
.costo-box { margin-top: 12px; border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px 12px; background: var(--surface); max-width: 760px; }
.costo-box > summary { cursor: pointer; font-size: 13.5px; }
.costo-box[open] > summary { margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }

/* Alta en pasos: la tira de contexto recuerda contra qué puesto se está capturando, y los pasos ya recorridos
   quedan marcados en la barra para poder volver sin perder lo escrito. */
.alta-ctx { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; padding: 10px 12px; margin-bottom: 14px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--bg-2); font-size: 13px; }
.alta-ctx span { color: var(--text-2); }
.alta-nav { align-items: center; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.alta-nav .grow { flex: 1; }
.tabs button.hecho { color: var(--text); }
.tabs button.hecho::before { content: '✓ '; color: var(--ok); }
.tabs button:disabled { opacity: .45; cursor: default; }
.estr-panel[hidden] { display: none; }
.estr-panel > .card-h { margin-bottom: 4px; }
/* Requisición: la banda del puesto se muestra, no se escribe; proponer otro rango es la excepción justificada. */
.tl-band { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-2); }
.tl-band .n { font-size: 16px; }
/* Metodología no disponible en esta empresa (sin dictamen legal): se ve condicionada, sigue pulsable y explica por qué. */
.chip.chip-bloq { border-style: dashed; color: var(--text-2); }

/* ===== Personas: galería (bloque del color de la empresa, foto encima, banda con nombre y puesto); la lista sigue disponible ===== */
.pp-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.pp-card { display: flex; flex-direction: column; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--border); text-decoration: none; color: inherit; background: var(--bg); min-width: 0; transition: transform var(--d2) var(--ease), border-color var(--d1); }
.pp-card:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.pp-card:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.pp-top { height: 132px; display: flex; align-items: flex-end; justify-content: center; position: relative; background: var(--surface-2); }
.pp-top .avatar { width: 88px; height: 88px; font-size: 24px; border: 0; margin-bottom: -14px; box-shadow: 0 6px 16px rgba(0,0,0,.18); background: var(--bg); color: var(--text); }
.pp-top .pill { position: absolute; right: 8px; top: 8px; background: color-mix(in srgb, var(--bg) 90%, transparent); color: var(--text); border-color: transparent; }
.pp-band { padding: 20px 12px 12px; display: grid; gap: 2px; background: var(--surface); }
.pp-band b { font-size: 13.5px; overflow-wrap: anywhere; } .pp-band span { font-size: 12px; opacity: .85; overflow-wrap: anywhere; }
.pp-card.co-ope .pp-top { background: var(--co-ope); } .pp-card.co-ope .pp-band { background: var(--co-ope-soft); color: var(--co-ope-ink); }
.pp-card.co-cia .pp-top { background: var(--co-cia); } .pp-card.co-cia .pp-band { background: var(--co-cia-soft); color: var(--co-cia-ink); }
.pp-card.co-zev .pp-top { background: var(--co-zev); } .pp-card.co-zev .pp-band { background: var(--co-zev-soft); color: var(--co-zev-ink); }
.pp-card.co-seg .pp-top { background: var(--co-seg); } .pp-card.co-seg .pp-band { background: var(--co-seg-soft); color: var(--co-seg-ink); }
.pp-view { margin-left: auto; }
@media (max-width: 720px) { .pp-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .pp-top { height: 110px; } }

/* ===== Mi equipo: mosaico de tarjetas de color, una por persona (color por posición en la fila) ===== */
/* Mi equipo · tarjeta de persona (opción C, 2026-09-27): misma pieza que Vacantes — el color es el de SU empresa (con su nombre), foto, puesto y estado de hoy. */
.tm-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); gap: 12px; }
.tm-pcard { border: 1px solid var(--border); border-radius: 18px; overflow: hidden; background: var(--bg); text-decoration: none; color: inherit; display: flex; flex-direction: column; min-width: 0;
  transition: border-color var(--d1), transform var(--d2) var(--ease); }
.tm-pcard:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.tm-pcard:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.tm-ptop { height: 132px; flex: none; position: relative; overflow: hidden; border-radius: 0 0 0 52px; display: flex; justify-content: center; align-items: center; padding-top: 14px; background: var(--vh-ope); }
.tm-ptop::before { content: ""; position: absolute; width: 96px; height: 96px; right: -30px; top: -40px; border-radius: 50%; background: var(--vh-blob); }
.tm-pcard.co-ope .tm-ptop { background: var(--vh-ope); } .tm-pcard.co-cia .tm-ptop { background: var(--vh-cia); } .tm-pcard.co-zev .tm-ptop { background: var(--vh-zev); } .tm-pcard.co-seg .tm-ptop { background: var(--vh-seg); }
.tm-pco { position: absolute; top: 10px; right: 10px; max-width: calc(100% - 20px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: rgba(255, 255, 255, .92); color: #18181b; border-color: transparent; font-size: 11px; }
.tm-ptop .avatar { width: 88px; height: 88px; font-size: 26px; margin: 0; flex: none; position: relative; box-shadow: 0 0 0 4px rgba(255, 255, 255, .9); background: var(--bg); color: var(--text); border: 0; }
.tm-pbody { padding: 14px 14px 18px; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; min-width: 0; }
.tm-pbody { flex: 1; } .tm-pbody b { font-size: 15px; overflow-wrap: anywhere; } .tm-pbody > .pill { margin-top: auto; } .tm-pbody > .muted { margin-bottom: 8px; } /* el estado siempre al pie, alineado entre tarjetas */
@media (prefers-reduced-motion: reduce) { .tm-pcard { transition: none; } .tm-pcard:hover { transform: none; } }
@media (max-width: 520px) { .tm-people { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tm-ptop { height: 108px; } .tm-ptop { padding-top: 22px; } .tm-ptop .avatar { width: 68px; height: 68px; font-size: 20px; } .tm-pco { font-size: 10px; top: 8px; right: 8px; } } /* la empresa sigue visible: el color nunca va sin su nombre */

/* ===== Ingreso al sistema: mosaico del holding en la portada (como la referencia: pétalos y círculos translúcidos) ===== */
.login-art.has-mosaic { background: var(--bg); }
.login-mosaic { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 6px; width: 100%; max-width: 420px; margin: 0 auto; }
.login-mosaic > div, .hm-mosaic > div { position: relative; overflow: hidden; min-height: 88px; display: flex; align-items: center; justify-content: center; background: var(--surface-2); }
.login-mosaic > div.p-a, .hm-mosaic > div.p-a { border-radius: 64px 12px 64px 12px; }
.login-mosaic > div.p-b, .hm-mosaic > div.p-b { border-radius: 12px 64px 12px 64px; }
.login-mosaic > div::before, .hm-mosaic > div::before { content: ''; position: absolute; width: 120px; height: 120px; border-radius: 50%; background: rgba(255,255,255,.28); right: -44px; top: -44px; }
.login-mosaic > div.c-sun::after, .hm-mosaic > div.c-sun::after { content: ''; position: absolute; width: 110px; height: 110px; border-radius: 50%; background: rgba(247,201,72,.6); left: -40px; bottom: -40px; }
.login-mosaic > div.c-cia::after, .hm-mosaic > div.c-cia::after { content: ''; position: absolute; width: 110px; height: 110px; border-radius: 50%; background: rgba(240,96,63,.55); left: -40px; bottom: -40px; }
.login-mosaic > div.c-lav::after, .hm-mosaic > div.c-lav::after { content: ''; position: absolute; width: 110px; height: 110px; border-radius: 50%; background: rgba(185,166,245,.6); left: -40px; bottom: -40px; }
/* Colores de casilla: más específicos que la regla general de la casilla para que el color gane al fondo gris */
.login-mosaic > .m-ope, .hm-mosaic > .m-ope { background: var(--co-ope); } .login-mosaic > .m-cia, .hm-mosaic > .m-cia { background: var(--co-cia); }
.login-mosaic > .m-zev, .hm-mosaic > .m-zev { background: var(--co-zev); } .login-mosaic > .m-seg, .hm-mosaic > .m-seg { background: var(--co-seg); }
.login-mosaic > .m-sun, .hm-mosaic > .m-sun { background: var(--vivid-sun); } .login-mosaic > .m-lav, .hm-mosaic > .m-lav { background: var(--vivid-lav); }

/* ---------- Datos maestros (2026-09-26): matriz de corrección con motivo y bitácora ---------- */
.mx-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; justify-content: space-between; margin-bottom: 8px; }
.mx-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.mx-filters .field { margin: 0; min-width: 160px; }
.mx-filters .field:first-child { min-width: 260px; }
.mx-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-md); }
.mx-table, .mx-logt { width: 100%; border-collapse: collapse; }
.mx-table th, .mx-table td { padding: 6px 8px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.mx-table thead th { font-size: var(--fs-xs); color: var(--text-2); font-weight: 600; background: var(--surface); white-space: nowrap; }
.mx-table td { min-width: 170px; }
.mx-table td:has(input[type="email"]) { min-width: 260px; }
.mx-table .mx-in { height: 34px; min-height: 34px; font-size: 13px; padding: 0 8px; width: 100%; }
.mx-sticky { position: sticky; left: 0; z-index: 1; background: var(--bg); min-width: 230px; max-width: 260px; border-right: 1px solid var(--border); }
.mx-table thead .mx-sticky { background: var(--surface); z-index: 2; }
.mx-name { display: block; font-weight: 600; font-size: 13.5px; }
.mx-table td.mx-dirty { background: var(--warn-soft); }
.mx-table td.mx-dirty .mx-in { border-color: var(--warn); }
.mx-warn { font-weight: 500; color: var(--warn); white-space: normal; }
.mx-diff { display: grid; gap: 10px; max-height: 320px; overflow: auto; }
.mx-diff ul { margin: 4px 0 0; padding-left: 18px; font-size: 13px; }
.mx-old { color: var(--text-3); text-decoration: line-through; }
.mx-wl { margin: 0; padding-left: 18px; }
.mx-logt th, .mx-logt td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; font-size: 13px; vertical-align: top; }
.mx-logt thead th { font-size: var(--fs-xs); color: var(--text-2); background: var(--surface); }
.mx-logt td.nowrap { white-space: nowrap; }
.mx-dialog { max-width: 640px; }
.mx-savebar { position: sticky; bottom: 0; z-index: 3; margin: 12px -20px -20px; padding: 12px 20px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--bg); border-top: 1px solid var(--border); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.mx-savebar.on { background: var(--warn-soft); border-top-color: var(--warn-line); }
@media (max-width: 820px) { .mx-savebar { bottom: 64px; } }

/* ======================= Capa de vida (2026-09-27): portada, bento, burbujas, pila de avatares, racimo, sello =======================
   Un solo bloque de color protagonista por pantalla. Texto blanco solo sobre fondos con contraste AA (verde y coral en su versión profunda). */
:root {
  --vh-sun: #f7c948; --vh-sun-ink: #3d2f05; --vh-lav: #e9e2fd; --vh-lav-ink: #2a1d4d; --vh-seg: #17735f; --vh-cia: #c2401f;
  --vh-zev: #3d2fbf; --vh-ope: #691fb7; --vh-ink: #18181b; --vh-blob: rgba(255, 255, 255, .26);
}
:root[data-theme="dark"] { --vh-lav: #2a2146; --vh-lav-ink: #e6ddff; --vh-ink: #0c0c0e; --vh-blob: rgba(255, 255, 255, .12); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --vh-lav: #2a2146; --vh-lav-ink: #e6ddff; --vh-ink: #0c0c0e; --vh-blob: rgba(255, 255, 255, .12); } }

.vh { position: relative; overflow: hidden; border-radius: 26px; padding: 26px 30px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; isolation: isolate; }
.vh.vh-tr { border-top-right-radius: 96px; } .vh.vh-tl { border-top-left-radius: 96px; } .vh.vh-br { border-bottom-right-radius: 96px; } .vh.vh-bl { border-bottom-left-radius: 96px; }
.vh-sun { background: var(--vh-sun); color: var(--vh-sun-ink); }
.vh-lav { background: var(--vh-lav); color: var(--vh-lav-ink); }
.vh-seg { background: var(--vh-seg); color: #fff; } .vh-cia { background: var(--vh-cia); color: #fff; } .vh-zev { background: var(--vh-zev); color: #fff; }
.vh-ope { background: var(--vh-ope); color: #fff; } .vh-ink { background: var(--vh-ink); color: #fff; border: 1px solid var(--border); }
.vh-blob { position: absolute; border-radius: 50%; background: var(--vh-blob); pointer-events: none; z-index: -1; }
.vh-blob.a { width: 200px; height: 200px; right: -60px; top: -80px; } .vh-blob.b { width: 110px; height: 110px; right: 200px; bottom: -64px; }
.vh-ink .vh-blob.a { background: var(--vivid-sun); opacity: .95; } .vh-ink .vh-blob.b { background: var(--co-cia); opacity: .9; }
.vh-main { display: grid; gap: 8px; min-width: 0; }
.vh-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.vh-title { margin: 0; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.1; letter-spacing: -.03em; font-weight: 700; text-wrap: balance; color: inherit; }
.vh-text { margin: 0; font-size: 13.5px; opacity: .9; max-width: 60ch; }
.vh-big { font-size: clamp(34px, 4vw, 46px); font-weight: 800; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.vh-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.vh .btn.vh-btn { background: #fff; color: #18181b; border-color: #fff; border-radius: 999px; }
.vh .btn.vh-btn:hover { background: #f4f4f5; }
.vh .btn.vh-ghost { background: transparent; color: inherit; border-color: currentColor; border-radius: 999px; opacity: .92; }
.vh-side { display: flex; align-items: center; gap: 16px; }
.vh-ring .ring-bg { stroke: var(--vh-blob); stroke: color-mix(in srgb, currentColor 22%, transparent); }
.vh-ring .ring-fg { stroke: currentColor; }
.vh-ring .ring-lbl, .vh-ring .ring-lbl b, .vh-ring .ring-lbl small { color: inherit; }
.vh .bb-l { color: inherit; opacity: .9; }
.vh a:not(.btn) { color: inherit; }
@media (max-width: 720px) { .vh { grid-template-columns: minmax(0, 1fr); padding: 22px; } .vh.vh-tr, .vh.vh-tl, .vh.vh-br, .vh.vh-bl { border-radius: 22px 22px 22px 22px; } .vh-side { justify-content: flex-start; flex-wrap: wrap; } }

/* Bento: tarjetas separadas; una sola «hot» */
.bento { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.bento.bento-1 { grid-template-columns: minmax(0, 1fr); } .bento.bento-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bento.bento-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bt { position: relative; overflow: hidden; background: var(--bg); border: 1px solid var(--border); border-radius: 20px; padding: 16px 18px; display: grid; gap: 4px; align-content: start; color: var(--text); text-decoration: none; min-width: 0; }
a.bt:hover { border-color: var(--border-strong); }
.bt-l { font-size: 12.5px; color: var(--text-2); }
.bt-v { font-size: 24px; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; overflow-wrap: anywhere; }
.bt-v small { font-size: 13px; font-weight: 500; margin-left: 4px; color: var(--text-2); letter-spacing: 0; }
.bt-s { font-size: 12px; color: var(--text-3); }
.bt.hot { border: 0; color: #fff; } .bt.hot .bt-l, .bt.hot .bt-s, .bt.hot .bt-v small { color: rgba(255, 255, 255, .86); }
.bt.hot.t-sun { color: var(--vh-sun-ink); } .bt.hot.t-sun .bt-l, .bt.hot.t-sun .bt-s, .bt.hot.t-sun .bt-v small { color: var(--vh-sun-ink); }
.bt.hot.t-lav { color: var(--vh-lav-ink); } .bt.hot.t-lav .bt-l, .bt.hot.t-lav .bt-s, .bt.hot.t-lav .bt-v small { color: var(--vh-lav-ink); }
.bt.hot.t-sun { background: var(--vh-sun); } .bt.hot.t-lav { background: var(--vh-lav); } .bt.hot.t-seg { background: var(--vh-seg); } .bt.hot.t-cia { background: var(--vh-cia); }
.bt.hot.t-zev { background: var(--vh-zev); } .bt.hot.t-ope { background: var(--vh-ope); } .bt.hot.t-ink { background: var(--vh-ink); border: 1px solid var(--border); }
.bt-blob { position: absolute; width: 90px; height: 90px; right: -28px; top: -28px; border-radius: 50%; background: var(--vh-blob); pointer-events: none; }
.bt.soft { border-color: transparent; }
.bt.soft.t-sun { background: var(--vivid-sun-soft); } .bt.soft.t-lav { background: var(--vivid-lav-soft); } .bt.soft.t-seg { background: var(--co-seg-soft); }
.bt.soft.t-cia { background: var(--co-cia-soft); } .bt.soft.t-zev { background: var(--co-zev-soft); } .bt.soft.t-ope { background: var(--co-ope-soft); } .bt.soft.t-ink { background: var(--surface-2); }
.bt.k-warn { background: var(--warn-soft); border-color: var(--warn-line); } .bt.k-bad { background: var(--bad-soft); border-color: var(--bad-line); }
@media (max-width: 720px) { .bento.bento-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .bento, .bento.bento-2, .bento.bento-4 { grid-template-columns: minmax(0, 1fr); } }

/* Burbujas de dato */
.bb-row { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.bb { display: grid; justify-items: center; gap: 6px; }
.bb-c { width: var(--d); height: var(--d); border-radius: 50%; display: grid; place-items: center; font-weight: 700; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.bb-l { font-size: 12px; font-weight: 600; color: var(--text-2); text-align: center; max-width: 11ch; line-height: 1.2; }
.bb-c.t-sun { background: var(--vivid-sun); color: var(--vh-sun-ink); } .bb-c.t-lav { background: var(--vivid-lav); color: #2a1d4d; } .bb-c.t-seg { background: var(--vh-seg); color: #fff; }
.bb-c.t-cia { background: var(--vh-cia); color: #fff; } .bb-c.t-zev { background: var(--vh-zev); color: #fff; } .bb-c.t-ope { background: var(--vh-ope); color: #fff; }
.bb-c.t-ink { background: #fff; color: #18181b; box-shadow: 0 0 0 1px var(--border); }

/* Pila de avatares y racimo */
.av-stack { display: inline-flex; align-items: center; }
.av-stack .avatar { box-shadow: 0 0 0 2px var(--bg); margin-left: -9px; }
.av-stack .avatar:first-child { margin-left: 0; }
.av-stack .av-more { background: var(--text); color: var(--bg); border-color: transparent; font-weight: 700; }
.vh .av-stack .avatar { box-shadow: 0 0 0 2px currentColor; }
.vh-cluster { position: relative; width: 300px; height: 170px; }
.vh-cl { position: absolute; }
.vh-cl .avatar { width: calc(76px * var(--k)); height: calc(76px * var(--k)); font-size: calc(20px * var(--k)); box-shadow: 0 0 0 3px #fff, 0 8px 20px rgba(0, 0, 0, .14); }
@media (prefers-reduced-motion: no-preference) { .vh-cl { animation: vh-float 7s ease-in-out infinite; } .vh-cl:nth-child(2n) { animation-delay: -3.5s; } }
@keyframes vh-float { 50% { transform: translateY(-5px); } }
@media (max-width: 720px) { .vh-cluster { width: 100%; max-width: 300px; } }

/* Sello redondo */
.stamp { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; text-align: center; font-size: 10.5px; font-weight: 700; line-height: 1.05; letter-spacing: .02em; flex: none; }
.stamp.t-sun { background: var(--vivid-sun-soft); color: var(--vivid-sun-ink); } .stamp.t-lav { background: var(--vivid-lav-soft); color: var(--vivid-lav-ink); }
.stamp.t-seg { background: var(--co-seg-soft); color: var(--co-seg-ink); } .stamp.t-cia { background: var(--co-cia-soft); color: var(--co-cia-ink); }
.stamp.t-zev { background: var(--co-zev-soft); color: var(--co-zev-ink); } .stamp.t-ope { background: var(--co-ope-soft); color: var(--co-ope-ink); } .stamp.t-ink { background: var(--surface-2); color: var(--text-2); }
/* Correcciones de la auditoría 1 (capa de vida): cifras del bento alineadas con su etiqueta; en la portada de tinta
   las formas sólidas (sol y coral) nunca pasan detrás de texto. */
.bt-v { text-align: left; }
.vh-ink .vh-blob.a { width: 180px; height: 180px; right: -90px; top: -110px; }
.vh-ink .vh-blob.b { width: 110px; height: 110px; left: 44%; right: auto; bottom: -78px; }
@media (max-width: 720px) {
  .vh-ink .vh-blob.a { width: 120px; height: 120px; right: -70px; top: -80px; }
  .vh-ink .vh-blob.b { display: none; }
  .bento.bento-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bt-v { font-size: 20px; }
}
@media (max-width: 420px) { .bento.bento-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bt { padding: 14px; } .bt-v { font-size: 17px; } }
/* Tono «paper»: portada blanca cuyo color lo ponen las personas (racimo) — para la comunidad (Vacantes). */
.vh-paper { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.vh-paper .vh-blob.a { background: var(--vivid-lav-soft); } .vh-paper .vh-blob.b { background: var(--vivid-sun-soft); }
.vh-paper .vh-eyebrow { color: var(--text-2); opacity: 1; }
/* Burbuja que actúa (p. ej. filtra una tabla): se ve igual, con foco y cursor de botón. */
.bb-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; display: grid; justify-items: center; gap: 6px; }
.bb-btn:hover .bb-c { transform: translateY(-2px); } .bb-btn .bb-c { transition: transform var(--d1, .15s); }
.bb-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 12px; }

/* Capa de vida · Administración (2026-09-27): accesos con su color, puesta en marcha como portada y punto de color por grupo. */
.ad-quick a:nth-child(1) .ic { background: var(--co-seg-soft); color: var(--co-seg-ink); }
.ad-quick a:nth-child(2) .ic { background: var(--bad-soft); color: var(--bad); }
.ad-quick a:nth-child(3) .ic { background: var(--vivid-sun-soft); color: var(--vivid-sun-ink); }
.ad-quick a:nth-child(4) .ic { background: var(--co-zev-soft); color: var(--co-zev-ink); }
.ad-quick a:nth-child(5) .ic { background: var(--co-cia-soft); color: var(--co-cia-ink); }
.ad-quick a:nth-child(6) .ic { background: var(--vivid-lav-soft); color: var(--vivid-lav-ink); }
.ad-gdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 10px; vertical-align: 2px; background: var(--vivid-lav); }
.ad-group[data-tone="zev"] .ad-gdot { background: var(--vh-zev); } .ad-group[data-tone="seg"] .ad-gdot { background: var(--vh-seg); }
.ad-group[data-tone="sun"] .ad-gdot { background: var(--vivid-sun); } .ad-group[data-tone="cia"] .ad-gdot { background: var(--vh-cia); }
.ad-group[data-tone="lav"] .ad-gdot { background: var(--vivid-lav); }

/* Inicio · Personas por empresa (2026-10-06): burbujas superpuestas por empresa (estilo «Convertion») + leyenda con número y %. */
.hm-bubbles { display: block; width: min(100%, 240px); height: auto; margin: 4px auto 0; }
.hm-bub-guide { fill: none; stroke: var(--border); stroke-width: 1; stroke-dasharray: 3 4; }
.hm-bub { fill-opacity: .96; stroke: rgba(255, 255, 255, .55); stroke-width: 1.5; } /* el fill lo pone el SVG (degradado por empresa) */
/* El color de cada burbuja es un degradado vivo definido en el SVG (coBubbleChart); aquí no se pisa. */
.hm-bubbles text { fill: #fff; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; pointer-events: none; paint-order: stroke; stroke: rgba(20, 12, 40, .28); stroke-width: 2.5px; stroke-linejoin: round; } /* contorno sutil: el número se lee sobre el color vivo */
.hm-hc-legend { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
.hm-hc-legend li { display: flex; align-items: baseline; gap: 6px; min-width: 0; font-size: 12.5px; color: var(--text-2); }
.hm-hc-legend li .trunc { flex: 1 1 auto; min-width: 0; }
.hm-hc-legend b { color: var(--text); font-size: 14px; } .hm-hc-legend small { color: var(--text-3); font-size: 11.5px; }
.hm-hc-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; align-self: center; background: var(--border-strong); }
.hm-hc-dot.co-ope { background: var(--vh-ope); } .hm-hc-dot.co-cia { background: var(--vh-cia); } .hm-hc-dot.co-zev { background: var(--vh-zev); } .hm-hc-dot.co-seg { background: var(--vh-seg); }

/* Mi equipo · Calendario (capa de vida 2026-10-06): resumen del mes en bento (un solo bloque en color: «Fuera hoy»), mes en grande,
   ausencias como fichas con la foto de la persona y el tono de su tipo (el mismo de Mi tiempo), pendientes punteadas, festivo con bandera. */
.cal-sum .bento { margin: 0; }
.cal-title { margin: 0; font-size: 22px; letter-spacing: -.02em; font-weight: 700; } .cal-title span { text-transform: capitalize; }
.cal-card .cal { border-radius: 14px; }
.cal .day { transition: background var(--d1); }
.cal .day.today { background: color-mix(in srgb, var(--vivid-lav-soft) 70%, var(--bg)); }
.cal .day.weekend:not(.today) { background: var(--surface); }
.cal .ev { display: flex; align-items: center; gap: 5px; min-width: 0; font-size: 11.5px; font-weight: 500; padding: 2px 7px 2px 2px; border-radius: 999px; border: 1px solid transparent; }
.cal .ev .avatar.xs { width: 18px; height: 18px; font-size: 8.5px; border: 0; flex: none; }
.cal .ev .trunc { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal .ev.t-sun { background: var(--vivid-sun-soft); color: var(--vivid-sun-ink); } .cal .ev.t-lav { background: var(--vivid-lav-soft); color: var(--vivid-lav-ink); }
.cal .ev.t-seg { background: var(--co-seg-soft); color: var(--co-seg-ink); } .cal .ev.t-x { background: var(--surface-2); color: var(--text-2); }
.cal .ev.pend { background: var(--bg); border: 1px dashed currentColor; font-style: normal; }
.cal .ev.hol { padding: 3px 8px; gap: 5px; background: var(--co-ope-soft); color: var(--co-ope-ink); border-color: transparent; }
.cal-legend i { border: 0; border-radius: 999px; width: 14px; height: 10px; }
.cal-legend i.t-sun { background: var(--vivid-sun-soft); box-shadow: inset 0 0 0 1px var(--vivid-sun); } .cal-legend i.t-lav { background: var(--vivid-lav-soft); box-shadow: inset 0 0 0 1px var(--vivid-lav); }
.cal-legend i.t-seg { background: var(--co-seg-soft); box-shadow: inset 0 0 0 1px var(--co-seg); } .cal-legend i.t-x { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border-strong); }
.cal-legend i.pend { background: transparent; border: 1px dashed var(--text-3); } .cal-legend i.hol { background: var(--co-ope-soft); box-shadow: inset 0 0 0 1px var(--co-ope); }
.cal-row { display: flex; align-items: center; gap: 10px; } .cal-row > div { flex: 1; min-width: 0; }
/* Leyenda con el isotipo de cada empresa (aro de su color); sin logo cargado queda el punto de color. */
.hm-hc-legend li { align-items: center; }
.hm-hc-logo { width: 26px; height: 26px; flex: none; border-radius: 50%; display: grid; place-items: center; background: #fff; /* los logos están hechos para fondo claro */ box-shadow: 0 0 0 2px var(--border-strong); overflow: hidden; }
.hm-hc-logo img { width: 72%; height: 72%; object-fit: contain; }
.hm-hc-logo.co-ope { box-shadow: 0 0 0 2px #8a3cf0; } .hm-hc-logo.co-cia { box-shadow: 0 0 0 2px #f8653f; } .hm-hc-logo.co-zev { box-shadow: 0 0 0 2px #4a62f0; } .hm-hc-logo.co-seg { box-shadow: 0 0 0 2px #22c592; }
.hm-hc-logo.nologo.co-ope { background: var(--vh-ope); } .hm-hc-logo.nologo.co-cia { background: var(--vh-cia); } .hm-hc-logo.nologo.co-zev { background: var(--vh-zev); } .hm-hc-logo.nologo.co-seg { background: var(--vh-seg); }
.hm-hc-legend b { margin-left: auto; }
/* Burbujas con efecto flotante (2026-10-06): suben y bajan unos píxeles, cada una a su ritmo; al pasar el cursor se iluminan. */
@keyframes hm-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(var(--fy, -5px)); } }
.hm-bub-g { animation: hm-float var(--ft, 5s) ease-in-out var(--fd, 0s) infinite; transform-box: fill-box; transform-origin: center; }
.hm-bub-g circle { transition: filter .25s ease; }
.hm-bub-g:hover circle { filter: url(#hmb-shadow) brightness(1.08) saturate(1.1); }
@media (prefers-reduced-motion: reduce) { .hm-bub-g { animation: none; } }

/* Firma dibujada (2026-10-06): ventana para dibujar (referencia «Sign the contract»), vista previa en Mi cuenta. El área de dibujo es
   blanca siempre (la firma es tinta sobre papel, también en modo oscuro). */
.sig-dlg { width: min(560px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 22px; background: var(--bg); color: var(--text); box-shadow: 0 24px 60px rgba(0, 0, 0, .22); }
.sig-dlg::backdrop { background: rgba(15, 15, 25, .38); }
.sig-form { display: grid; gap: 12px; padding: 18px 18px 16px; }
.sig-head { display: flex; align-items: center; justify-content: space-between; }
.sig-head h2 { margin: 0; font-size: 17px; }
.sig-x { border: 0; background: none; color: var(--text-2); width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; cursor: pointer; }
.sig-x:hover { background: var(--surface-2); }
.sig-pad-wrap { position: relative; border-radius: 16px; background: #fafafa; border: 1px solid var(--border); overflow: hidden; }
.sig-pad { display: block; width: 100%; height: 210px; cursor: crosshair; }
.sig-hint { position: absolute; inset: 0 0 46px; display: grid; place-items: center; color: #a1a1aa; font-size: 15px; pointer-events: none; }
.sig-base { position: absolute; left: 24px; right: 24px; bottom: 58px; border-top: 1px dashed #d4d4d8; pointer-events: none; }
.sig-tools { position: absolute; left: 10px; bottom: 8px; display: flex; align-items: center; gap: 4px; }
.sig-tool { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: #52525b; font-size: 13px; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.sig-tool:hover { background: #ececef; }
.sig-sep { width: 1px; height: 14px; background: #d4d4d8; }
.sig-note { margin: 0; font-size: 12.5px; color: var(--text-2); }
.sig-consent { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.sig-switch { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; font-size: 13px; cursor: pointer; }
.sig-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sig-track { flex: none; width: 34px; height: 20px; border-radius: 999px; background: var(--border-strong); position: relative; transition: background .2s; margin-top: 1px; }
.sig-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .2s; }
.sig-switch input:checked + .sig-track { background: var(--ok); }
.sig-switch input:checked + .sig-track::after { transform: translateX(14px); }
.sig-switch input:focus-visible + .sig-track { outline: 2px solid var(--focus); outline-offset: 2px; }
.sig-err { margin: 0; padding: 10px 14px; background: var(--bad-soft); color: var(--bad); font-size: 13px; border-top: 1px solid var(--bad-line); }
.sig-foot { display: flex; justify-content: flex-end; gap: 8px; }
.sig-save { background: #18181b; color: #fff; border-color: #18181b; }
.sig-save:hover { background: #27272a; }
.sig-preview { border: 1px solid var(--border); border-radius: 14px; background: #fafafa; padding: 14px; display: grid; gap: 6px; justify-items: center; }
.sig-preview img { max-width: 100%; max-height: 90px; mix-blend-mode: multiply; }
.sig-preview.empty { justify-items: start; background: var(--surface); }
@media (prefers-reduced-motion: reduce) { .sig-track, .sig-track::after { transition: none; } }
