/* HCM Atica — Design System */
@import url('https://fonts.googleapis.com/css2?family=Mulish:wght@400;500;600;700;800&family=Poppins:wght@500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* ─── Atica · Brand (manual de marca) ───
     Paleta que va de "berenjena" (aubergine) a "cielo" (sky/menta),
     con AMARILLO como color de Call-to-Action. Estrategia sobria:
     berenjena para superficies oscuras y titulares, teal para
     acción/enlaces (accesible sobre blanco), cielo para highlights
     y el amarillo reservado al CTA destacado.
     Los tokens --navy-*/--blue-* mantienen su nombre histórico pero
     ahora apuntan al sistema Atica. */

  /* Brand · Berenjena (aubergine) — sidebar, titulares, superficies oscuras */
  --aubergine-900: #1B1030;    /* más oscuro · gradientes / hover oscuro */
  --aubergine-800: #2E1A46;    /* Atica Aubergine · primary oscuro */
  --aubergine-600: #4A2E68;    /* derivado medio */
  --aubergine-200: #BEB7C4;    /* neutro morado suave */

  /* Brand · Teal (acción/enlaces · accesible sobre blanco) */
  --teal-800: #0E5964;         /* deep teal · botón primario / enlaces */
  --teal-500: #289FB0;         /* mid teal · acentos, hovers, íconos */
  --teal-200: #8ABDCA;

  /* Brand · Cielo/Menta (highlights, superficies suaves) */
  --sky-500:  #98E7D9;         /* Atica Sky · highlights, gradiente */
  --sky-300:  #A0D8D1;
  --sky-100:  #C5E7E1;         /* soft · badges/fondos */
  --sky-50:   #E9F5F2;         /* lightest · hover surfaces */

  /* CTA · Amarillo (solo acción destacada / highlights) */
  --cta-600:  #E4C93A;
  --cta-500:  #FFE342;         /* Atica CTA yellow · texto berenjena encima */
  --cta-100:  #FFED96;

  /* ── Aliases históricos (repuntados a Atica · no romper consumidores) ── */
  --navy-900: #1B1030;        /* Ink berenjena · texto principal y oscuros */
  --navy-800: #2E1A46;        /* = Aubergine · sidebar · headlines */
  --navy-700: #0E5964;        /* = Teal deep · CTAs · enlaces · acentos */
  --navy-100: #C5E7E1;        /* = Sky soft · fondos suaves */
  --navy-50:  #E9F5F2;        /* superficies hover */
  --blue-dark:  #2E1A46;      /* = Aubergine */
  --blue-main:  #0E5964;      /* = Teal deep */
  --blue-light: #98E7D9;      /* = Sky */
  --blue-soft:  #C5E7E1;      /* = Sky soft */
  --ink:        #1B1030;
  --mist:       #F8FAFC;

  /* Rojo crítico Atica (repurpose del antiguo co-brand · estados negativos) */
  --aguila-700: #C72F48;
  --aguila-600: #EF435C;
  --aguila-100: #FCD7D3;
  --aguila-50:  #FEF1F3;

  /* Neutrals · con leve tinte berenjena */
  --white: #FFFFFF;
  --surface: #F8FAFC;          /* Mist */
  --surface-2: #F2F1F5;
  --border: #E7E4EC;           /* Line */
  --border-strong: #CFC9D6;
  --text: #1B1030;             /* Ink berenjena (lee negro) */
  --text-muted: #5B5468;       /* Muted */
  --text-subtle: #837C90;

  /* Semantic · estados UI (paleta Atica) */
  --green-600: #2AB36E;        /* éxito (F2) */
  --green-100: #D7EBDB;        /* (F4) */
  --amber-600: #B5730A;        /* warning · naranja oscuro legible */
  --amber-100: #FDE7D5;
  --red-error: #EF435C;        /* error (C2) */
  --rose-600: #EF435C;         /* alias mantenido para compatibilidad */
  --rose-100: #FCD7D3;
  --blue-600: #0E5964;         /* alias = Teal deep */
  --blue-100: #C5E7E1;         /* alias = Sky soft */

  /* Tipografía */
  --font-display: 'Poppins', 'Mulish', system-ui, sans-serif;  /* ≈ Circular (primaria) */
  --font-body: 'Mulish', system-ui, sans-serif;                /* = Muli (secundaria) */
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  /* Spacing & radius */
  --r-sm: 6px;
  --r: 8px;
  --r-lg: 12px;
  --r-xl: 16px;

  /* Sombras basadas en berenjena */
  --shadow-1: 0 1px 2px rgba(27, 16, 48, 0.06), 0 1px 1px rgba(27, 16, 48, 0.04);
  --shadow-2: 0 4px 12px rgba(27, 16, 48, 0.08), 0 2px 4px rgba(27, 16, 48, 0.04);
  --shadow-pop: 0 12px 32px rgba(27, 16, 48, 0.16), 0 4px 8px rgba(27, 16, 48, 0.06);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.005em;
}
button { font-family: inherit; cursor: pointer; }
.mono { font-family: var(--mono); }
/* Titulares en la fuente display (≈ Circular) */
h1, h2, h3, .headline, .page-title, .card-title, .stat-num, .kpi-num, .brand-word {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}

/* Layout */
.app {
  display: grid;
  grid-template-columns: var(--side-w, 240px) minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns 0.2s ease;
}
/* second grid column wrapper · permite que tablas/kanbans anchos no rompan el grid */
.app > div:not(.sidebar):not(.mob-drawer-backdrop) {
  min-width: 0;
}

/* Sidebar */
.sidebar {
  background: var(--navy-800);
  color: rgba(255,255,255,0.85);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  min-height: 64px;
}
.brand-mark {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--aguila-600), #F5717F);
  display: grid;
  place-items: center;
  color: white;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.04em;
  flex-shrink: 0;
}
.brand-name {
  font-weight: 700;
  font-size: 15px;
  color: white;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand-name small {
  display: block;
  font-weight: 500;
  color: rgba(255,255,255,0.55);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 1px;
}
.collapse-btn {
  margin-left: auto;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.55);
  padding: 6px;
  border-radius: 6px;
  display: grid; place-items: center;
}
.collapse-btn:hover { background: rgba(255,255,255,0.08); color: white; }

.nav {
  flex: 1;
  padding: 10px 8px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.nav::-webkit-scrollbar { width: 4px; }
.nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--r);
  color: rgba(255,255,255,0.72);
  font-weight: 500;
  font-size: 13px;
  line-height: 1.25;
  cursor: pointer;
  position: relative;
  transition: background 0.12s, color 0.12s;
}
.nav-item > svg { flex-shrink: 0; }
.nav-item > span:first-of-type {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-item:hover { background: rgba(255,255,255,0.06); color: white; }
.nav-item.active {
  background: rgba(200, 16, 46, 0.08);
  color: white;
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 8px; bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--aguila-600);
}
.nav-item .badge {
  margin-left: auto;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.85);
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}
.nav-item.active .badge { background: var(--aguila-600); color: white; }

.nav-section {
  padding: 18px 14px 6px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}
.nav-divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 12px 8px;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  margin: 8px;
  border-radius: var(--r);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
}
.user-card:hover { background: rgba(255,255,255,0.07); }
.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F5717F, #EF435C);
  display: grid; place-items: center;
  color: white;
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
}
.user-meta { min-width: 0; flex: 1; }
.user-meta .name { color: white; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta .role { color: rgba(255,255,255,0.55); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Collapsed state */
.app.collapsed { grid-template-columns: 64px 1fr; }
.app.collapsed .brand-name,
.app.collapsed .nav-item span:not(.badge),
.app.collapsed .nav-item .badge,
.app.collapsed .nav-section,
.app.collapsed .user-meta,
.app.collapsed .collapse-btn { display: none; }
.app.collapsed .nav-item { justify-content: center; padding: 10px; }
.app.collapsed .brand { justify-content: center; padding: 18px 12px 14px; }
.app.collapsed .user-card { justify-content: center; padding: 10px; }

/* Topbar */
.topbar {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.crumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}
.crumbs .sep { color: var(--text-subtle); }
.crumbs .current { color: var(--text); font-weight: 600; }

.search {
  flex: 1;
  max-width: 460px;
  margin-left: 24px;
  position: relative;
}
.search input {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--r);
  padding: 9px 12px 9px 38px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--text);
  outline: none;
  transition: border-color 0.12s, background 0.12s;
}
.search input:focus { border-color: var(--navy-800); background: white; }
.search .icon {
  position: absolute;
  left: 11px; top: 50%; transform: translateY(-50%);
  color: var(--text-subtle);
}
.search .kbd {
  position: absolute;
  right: 8px; top: 50%; transform: translateY(-50%);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-subtle);
  background: white;
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.icon-btn {
  position: relative;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: var(--r);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
}
.icon-btn:hover { background: var(--surface); color: var(--text); }
.icon-btn .bell-badge {
  position: absolute;
  top: 6px; right: 6px;
  background: var(--aguila-600);
  color: white;
  font-size: 10px;
  font-weight: 700;
  border-radius: 10px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  display: grid; place-items: center;
  border: 2px solid white;
}
.portal-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: white;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
}
.portal-btn:hover { border-color: var(--navy-800); color: var(--navy-800); }

.user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 4px 4px;
  border-radius: 30px;
  border: 1px solid var(--border);
  background: white;
}
.user-pill:hover { border-color: var(--border-strong); }
.user-pill .avatar { width: 28px; height: 28px; font-size: 11px; }
.user-pill .name { font-size: 13px; font-weight: 600; }

/* Main content */
.main {
  padding: 28px 32px 60px;
  width: 100%;
}
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 24px;
}
.page-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
  color: var(--text);
}
.page-subtitle {
  color: var(--text-muted);
  font-size: 14px;
}
.page-subtitle b { color: var(--text); font-weight: 600; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: var(--r);
  border: 1px solid var(--border);
  background: white;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.12s;
}
.btn:hover { border-color: var(--border-strong); }
.btn.primary {
  background: var(--navy-800);
  border-color: var(--navy-800);
  color: white;
}
.btn.primary:hover { background: var(--navy-900); border-color: var(--navy-900); }
.btn.danger {
  background: white;
  border-color: var(--rose-100);
  color: var(--rose-600);
}
.btn.danger:hover { background: var(--rose-100); border-color: var(--rose-600); }
.btn.danger.solid {
  background: var(--rose-600);
  border-color: var(--rose-600);
  color: white;
}
.btn.danger.solid:hover { background: var(--aguila-700); border-color: var(--aguila-700); }

/* Card */
.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
.card-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.card-head .sub {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}
.card-body { padding: 18px; }

/* Grid */
.grid { display: grid; gap: 20px; }
.row-kpi { grid-template-columns: repeat(4, 1fr); }
.row-2-1 { grid-template-columns: 2fr 1fr; }
.row-1-1 { grid-template-columns: 1fr 1fr; }
.row-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1240px) {
  .row-kpi { grid-template-columns: repeat(2, 1fr); }
  .row-2-1, .row-1-1, .row-3 { grid-template-columns: 1fr; }
}

/* KPI tile */
.kpi {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 18px 16px;
  position: relative;
  overflow: hidden;
}
.kpi .label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.kpi .value {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 6px;
  color: var(--text);
  line-height: 1.05;
  font-feature-settings: 'tnum';
}
.kpi .delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  margin-top: 8px;
  padding: 2px 8px;
  border-radius: 20px;
}
.kpi .delta.up { color: var(--green-600); background: var(--green-100); }
.kpi .delta.down { color: var(--rose-600); background: var(--rose-100); }
.kpi .delta.flat { color: var(--text-muted); background: var(--surface); }
.kpi .ftn {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}

.spark {
  position: absolute;
  bottom: 0; right: 0;
  width: 64px; height: 32px;
  opacity: 0.55;
}

/* Section breaks */
.section-title {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 32px 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.pill.green { background: var(--green-100); color: var(--green-600); border-color: transparent; }
.pill.amber { background: var(--amber-100); color: var(--amber-600); border-color: transparent; }
.pill.rose  { background: var(--rose-100);  color: var(--rose-600);  border-color: transparent; }
.pill.blue  { background: var(--blue-100);  color: var(--blue-600);  border-color: transparent; }
.pill.navy  { background: var(--navy-50);   color: var(--navy-800);  border-color: transparent; }

/* Automation engine — feature card */
.engine {
  background:
    radial-gradient(1100px 280px at 100% 0%, rgba(200, 16, 46, 0.12), transparent 60%),
    linear-gradient(180deg, var(--navy-800), var(--navy-900));
  color: white;
  border-radius: var(--r-lg);
  padding: 22px 22px 20px;
  position: relative;
  overflow: hidden;
}
.engine::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  mask-image: linear-gradient(180deg, black, transparent 80%);
}
.engine-head {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}
.engine-badge {
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.16);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.engine-badge .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #4ADE80;
  box-shadow: 0 0 8px #4ADE80;
}
.engine h2 {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 12px 0 4px;
  position: relative;
}
.engine .lede {
  color: rgba(255,255,255,0.7);
  font-size: 13.5px;
  max-width: 540px;
  position: relative;
}

.flow {
  display: grid;
  grid-template-columns: 220px 60px 1fr;
  gap: 0;
  margin-top: 20px;
  position: relative;
  align-items: stretch;
}
.flow-out {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
@media (max-width: 1180px) {
  .flow { grid-template-columns: 1fr; gap: 12px; }
  .flow-arrow { display: none; }
  .flow-out { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
}
.flow-trigger {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--r);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
}
.flow-trigger .who {
  display: flex;
  align-items: center;
  gap: 10px;
}
.flow-trigger .ava {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F59290, #EF435C);
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700; color: white;
}
.flow-trigger .who .nm { font-weight: 600; font-size: 13px; line-height: 1.2; }
.flow-trigger .who .rl { font-size: 11.5px; color: rgba(255,255,255,0.6); }
.flow-trigger .step-label {
  font-size: 10.5px;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.flow-arrow {
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.flow-arrow svg { color: rgba(255,255,255,0.4); }
.flow-arrow::before {
  content: ''; position: absolute; left: 0; right: 0;
  top: 50%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
}

.flow-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--r);
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  transition: background 0.12s, transform 0.12s;
  cursor: pointer;
}
.flow-card:hover {
  background: rgba(255,255,255,0.1);
  transform: translateY(-1px);
}
.flow-card.done { background: rgba(74, 222, 128, 0.08); border-color: rgba(74, 222, 128, 0.25); }
.flow-card.run { background: rgba(255, 209, 102, 0.08); border-color: rgba(255, 209, 102, 0.3); }
.flow-card .ico {
  width: 28px; height: 28px;
  border-radius: 6px;
  background: rgba(255,255,255,0.08);
  display: grid; place-items: center;
  color: rgba(255,255,255,0.85);
}
.flow-card .ttl { font-size: 12px; font-weight: 600; color: white; line-height: 1.2; }
.flow-card .meta {
  font-size: 11px; color: rgba(255,255,255,0.6);
  display: flex; align-items: center; gap: 4px;
}
.flow-card .status {
  position: absolute; top: 8px; right: 8px;
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.3);
}
.flow-card.done .status { background: #4ADE80; box-shadow: 0 0 6px rgba(74, 222, 128, 0.6); }
.flow-card.run .status { background: #FFD166; box-shadow: 0 0 6px rgba(255, 209, 102, 0.6); animation: pulse 1.4s infinite; }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.engine-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.1);
  position: relative;
  font-size: 12.5px;
  color: rgba(255,255,255,0.65);
}
.engine-foot a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: white;
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
}
.engine-foot a:hover { color: var(--aguila-600); }

/* Lists */
.list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.list-row:last-child { border-bottom: none; }
.list-row .ttl { font-weight: 500; font-size: 13.5px; color: var(--text); }
.list-row .sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.list-row .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.task-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.task-icon.navy { background: var(--navy-50); color: var(--navy-800); }
.task-icon.rose { background: var(--rose-100); color: var(--rose-600); }
.task-icon.amber { background: var(--amber-100); color: var(--amber-600); }
.task-icon.green { background: var(--green-100); color: var(--green-600); }
.task-icon.blue { background: var(--blue-100); color: var(--blue-600); }

/* Donut */
.donut-wrap { display: flex; gap: 18px; align-items: center; }
.donut { position: relative; }
.donut .center {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  text-align: center;
}
.donut .center .v { font-size: 22px; font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
.donut .center .l { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.legend { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
}
.legend-item .sw { width: 9px; height: 9px; border-radius: 2px; }
.legend-item .nm { color: var(--text); flex: 1; }
.legend-item .vl { font-weight: 600; color: var(--text); font-feature-settings: 'tnum'; }

/* Progress */
.bar {
  height: 6px;
  background: var(--surface-2);
  border-radius: 6px;
  overflow: hidden;
}
.bar > span {
  display: block; height: 100%;
  background: var(--navy-800);
  border-radius: 6px;
}
.bar.alt > span { background: var(--aguila-600); }

/* Calendar / events */
.event {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.event:last-child { border: none; }
.event .date {
  text-align: center;
  background: var(--surface);
  border-radius: 8px;
  padding: 5px 4px;
}
.event .date .d { font-size: 16px; font-weight: 700; line-height: 1; color: var(--navy-800); }
.event .date .m { font-size: 10px; font-weight: 600; text-transform: uppercase; color: var(--text-muted); margin-top: 2px; }
.event .ttl { font-size: 13.5px; font-weight: 500; }
.event .sub { font-size: 12px; color: var(--text-muted); }

/* Activity feed */
.feed-row {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.feed-row:last-child { border: none; }
.feed-row .ava {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--navy-50);
  color: var(--navy-800);
  display: grid; place-items: center;
  font-weight: 600;
  font-size: 11px;
  flex-shrink: 0;
}
.feed-row .body { flex: 1; min-width: 0; }
.feed-row .body .txt { font-size: 13px; color: var(--text); }
.feed-row .body .txt b { font-weight: 600; }
.feed-row .body .time { font-size: 11.5px; color: var(--text-subtle); margin-top: 2px; }

/* Headcount chart */
.hc-chart {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: end;
  gap: 8px;
  height: 160px;
  padding: 0 4px;
}
.hc-bar {
  background: var(--navy-50);
  border-radius: 4px 4px 0 0;
  position: relative;
  transition: background 0.12s;
  cursor: pointer;
  min-height: 4px;
}
.hc-bar:hover { background: var(--navy-100); }
.hc-bar > span {
  position: absolute;
  inset: 0;
  border-radius: 4px 4px 0 0;
  background: var(--navy-800);
}
.hc-bar.current > span { background: var(--aguila-600); }
.hc-labels {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 8px;
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
}

/* Chips */
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  padding: 4px 9px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text);
}
.chip.active { background: var(--navy-800); color: white; border-color: var(--navy-800); }

/* Tabs */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.tab {
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  border: none;
  background: transparent;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab.active { color: var(--navy-800); border-bottom-color: var(--aguila-600); font-weight: 600; }
.tab:hover:not(.active) { color: var(--text); }

/* Alerts */
.alerts-tabs {
  display: flex;
  gap: 4px;
  padding: 10px 14px 0;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.alerts-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  margin-bottom: -1px;
  transition: color 0.12s, border-color 0.12s;
}
.alerts-tab:hover { color: var(--text); }
.alerts-tab.active { color: var(--navy-800); border-bottom-color: var(--aguila-600); font-weight: 600; }
.alerts-tab .tab-dot { width: 8px; height: 8px; border-radius: 50%; }
.alerts-tab .tab-count {
  background: var(--surface);
  color: var(--text-muted);
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  font-feature-settings: 'tnum';
}
.alerts-tab.active .tab-count { background: var(--navy-50); color: var(--navy-800); }

.alerts-body {
  padding: 4px 6px;
  max-height: 540px;
  overflow-y: auto;
}
.alert-row {
  display: grid;
  grid-template-columns: 4px 36px 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 12px 12px 8px;
  border-radius: 8px;
  position: relative;
  transition: background 0.12s;
}
.alert-row + .alert-row { margin-top: 2px; }
.alert-row:hover { background: var(--surface); }
.alert-stripe {
  width: 3px;
  height: 36px;
  border-radius: 3px;
  align-self: center;
}
.alert-stripe.sev-critico { background: #EF435C; }
.alert-stripe.sev-urgente { background: #D97706; }
.alert-stripe.sev-proximo { background: #EAB308; }
.alert-stripe.sev-info    { background: #0E5964; }
.alert-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.alert-row.sev-critico .alert-icon { background: var(--rose-100); color: var(--rose-600); }
.alert-row.sev-urgente .alert-icon { background: var(--amber-100); color: var(--amber-600); }
.alert-row.sev-proximo .alert-icon { background: #FEF9C3; color: #854D0E; }
.alert-row.sev-info    .alert-icon { background: var(--blue-100); color: var(--blue-600); }
.alert-body { min-width: 0; }
.alert-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}
.alert-title {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
}
.alert-employee {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.005em;
}
.alert-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.alert-meta .dotsep { color: var(--text-subtle); }
.alert-days {
  text-align: right;
  min-width: 70px;
  padding: 0 4px;
}
.days-num {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--text);
  font-feature-settings: 'tnum';
}
.days-num.overdue { color: var(--aguila-600); }
.days-label {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}

.pill.amber-soft { background: #FEF9C3; color: #854D0E; border-color: transparent; }

/* Headcount horizontal bars */
.hc-row {
  display: grid;
  grid-template-columns: 200px 1fr 56px 44px;
  align-items: center;
  gap: 12px;
}
.hc-row-label {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hc-row-track {
  height: 14px;
  background: var(--surface-2);
  border-radius: 4px;
  overflow: hidden;
}
.hc-row-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}
.hc-row-num {
  font-size: 13.5px;
  font-weight: 700;
  text-align: right;
  font-feature-settings: 'tnum';
  letter-spacing: -0.01em;
}
.hc-row-change {
  font-size: 12px;
  font-weight: 600;
  text-align: right;
  font-feature-settings: 'tnum';
}
.hc-row-change.up { color: var(--green-600); }
.hc-row-change.down { color: var(--aguila-600); }
.hc-row-change.flat { color: var(--text-subtle); }

/* Onboardings list */
.onb-header {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) 60px minmax(0, 1.4fr) 50px;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.onb-row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) 60px minmax(0, 1.4fr) 50px;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.onb-row:last-child { border-bottom: none; }
.onb-person {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.onb-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.onb-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.onb-days { text-align: right; }
.onb-days-num {
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
  font-feature-settings: 'tnum';
}
.onb-days-lbl {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.onb-bar-wrap { min-width: 0; }
.onb-bar {
  height: 6px;
  background: var(--surface-2);
  border-radius: 6px;
  overflow: hidden;
}
.onb-bar > span {
  display: block;
  height: 100%;
  border-radius: 6px;
}
.onb-pct {
  font-size: 13.5px;
  font-weight: 700;
  text-align: right;
  color: var(--text);
  font-feature-settings: 'tnum';
}

/* Misc */
.muted { color: var(--text-muted); }
.right { margin-left: auto; }
.flex { display: flex; align-items: center; gap: 8px; }

/* Filters bar */
.filters-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.filter-select {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 30px 7px 12px;
  font-size: 12.5px;
  cursor: pointer;
  transition: border-color 0.12s;
}
.filter-select:hover { border-color: var(--border-strong); }
.filter-select .filter-label {
  color: var(--text-muted);
  font-weight: 500;
}
.filter-select select {
  border: none;
  background: transparent;
  font: inherit;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  outline: none;
  padding: 0;
  appearance: none;
}
.filter-select svg {
  position: absolute;
  right: 10px;
  pointer-events: none;
  color: var(--text-muted);
}

.view-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.view-toggle button {
  border: none;
  background: white;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  color: var(--text-muted);
  cursor: pointer;
}
.view-toggle button.active { background: var(--navy-800); color: white; }

/* Employee table */
.emp-table {
  width: 100%;
}
.emp-table-head, .emp-table-row {
  display: grid;
  grid-template-columns: 2.4fr 1.6fr 1.2fr 1fr 1fr 1.1fr 0.9fr 1fr;
  gap: 14px;
  padding: 12px 18px;
  align-items: center;
}
.emp-table-head {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.emp-table-row {
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s;
}
.emp-table-row:hover { background: var(--surface); }
.emp-table-row:last-child { border-bottom: none; }
.emp-cell-name {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.emp-nm {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.emp-doc {
  font-size: 11.5px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
}
.emp-cell {
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.emp-actions {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
  align-items: center;
}
.alert-dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--rose-100);
  color: var(--rose-600);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.avatar.rose { background: linear-gradient(135deg, #F59290, #EF435C); }

/* Card view */
.emp-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  padding: 18px;
}
.emp-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.emp-card:hover { border-color: var(--navy-800); box-shadow: var(--shadow-2); }
.emp-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
}
.emp-card-grid .lbl { display: block; font-size: 10.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 500; }
.emp-card-grid .val { display: block; font-size: 12.5px; color: var(--text); font-weight: 500; }

/* Pagination */
.emp-pagination {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  gap: 16px;
}
.btn[disabled] { opacity: 0.4; cursor: not-allowed; }

/* ── Responsive: empleados (tablet) ───────────────────────────────────── */
@media (max-width: 1100px) {
  .emp-table-head, .emp-table-row {
    grid-template-columns: 2fr 1.4fr 1.1fr 1fr 1.1fr 1fr;
    gap: 10px;
    padding: 10px 14px;
  }
  /* Hide Área and Contrato columns at tablet to make room */
  .emp-table-head > div:nth-child(3),
  .emp-table-head > div:nth-child(5),
  .emp-table-row > .emp-cell:nth-of-type(2),
  .emp-table-row > .emp-cell:nth-of-type(4) {
    display: none;
  }
}

/* ── Responsive: empleados (móvil) → cards apiladas ───────────────────── */
@media (max-width: 760px) {
  .emp-table-head { display: none; }
  .emp-table-row {
    display: block !important;
    border: 1px solid var(--border) !important;
    border-radius: 12px;
    padding: 12px 14px !important;
    margin: 10px 12px;
    background: white;
    box-shadow: 0 1px 0 rgba(15, 30, 64, 0.02);
  }
  .emp-table-row:hover { background: white; box-shadow: 0 4px 14px rgba(15,30,64,0.06); }

  /* Avatar + name row at top */
  .emp-table-row .emp-cell-name {
    width: 100%;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--border);
  }
  .emp-nm {
    white-space: normal;
    font-size: 14.5px;
    line-height: 1.3;
  }
  .emp-doc { font-size: 11.5px; }

  /* Detail cells become 2-column label/value mini-grid */
  .emp-table-row .emp-cell {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 10px;
    align-items: center;
    padding: 4px 0;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    font-size: 13px;
  }
  .emp-table-row .emp-cell::before {
    content: attr(data-label);
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-subtle, var(--text-muted));
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }
  .emp-table-row .emp-cell-status {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 10px;
    align-items: center;
    padding: 4px 0;
  }
  .emp-table-row .emp-cell-status::before {
    content: attr(data-label);
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-subtle, var(--text-muted));
    letter-spacing: 0.05em;
    text-transform: uppercase;
  }

  /* Actions footer */
  .emp-table-row .emp-actions {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
    justify-content: flex-end;
    gap: 6px;
  }
  .emp-table-row .emp-actions .btn {
    flex: 1;
    justify-content: center;
    min-height: 38px;
    font-size: 13px !important;
    padding: 8px 14px !important;
  }
  .emp-table-row .emp-actions .icon-btn {
    flex: 0 0 38px;
    height: 38px;
  }

  /* Pagination → wrap */
  .emp-pagination {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 14px;
  }
  .emp-pagination > div { justify-content: center; }
  .emp-pagination .filter-select { width: 100%; }

  /* Filter selects above the list → 1 col */
  .filters-bar {
    flex-wrap: wrap;
    gap: 8px;
  }
  .filters-bar .filter-select { flex: 1 1 calc(50% - 4px); min-width: 140px; }
  .filters-bar .search { width: 100% !important; }

  /* View toggle (tabla / tarjetas) hidden — el listado ya está optimizado */
  .filters-bar .view-toggle { display: none; }
}

/* ── Empleado · ficha (perfil) responsive ─────────────────────────────── */

/* Profile head */
.emp-profile-head {
  display: flex;
  gap: 20px;
  align-items: center;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-1);
}
.emp-headline {
  display: flex;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
  flex-wrap: wrap;
  align-items: center;
}
.emp-headline b { color: var(--text); font-weight: 600; }
.dotsep { color: var(--text-subtle); }
.stat-inline {
  display: flex;
  gap: 6px;
  align-items: baseline;
  font-size: 13px;
  padding-right: 18px;
  border-right: 1px solid var(--border);
}
.stat-inline:last-child { border-right: none; }
.stat-inline b { font-weight: 700; color: var(--text); }

/* Tabs */
.emp-tabs-row {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.emp-tab {
  padding: 11px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  cursor: pointer;
}
.emp-tab.active { color: var(--navy-800); border-bottom-color: var(--aguila-600); font-weight: 600; }
.emp-tab:hover:not(.active) { color: var(--text); }

/* Detail layout */
.emp-detail-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 18px;
  align-items: flex-start;
}
@media (max-width: 1200px) {
  .emp-detail-layout { grid-template-columns: 1fr; }
}

/* Side panel */
.emp-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 76px;
}
.emp-side-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: var(--shadow-1);
}
.emp-side-title {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.kv-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.kv {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  gap: 10px;
}
.kv > span:last-child { font-weight: 500; color: var(--text); text-align: right; }

.oblig-list { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.oblig {
  display: flex;
  align-items: center;
  gap: 10px;
}
.oblig-date {
  background: var(--surface);
  border-radius: 6px;
  padding: 4px 6px;
  text-align: center;
  min-width: 36px;
}
.oblig-date .d { font-size: 14px; font-weight: 700; color: var(--navy-800); line-height: 1; }
.oblig-date .m { font-size: 9.5px; font-weight: 600; text-transform: uppercase; color: var(--text-muted); }
.oblig-ttl { font-size: 12.5px; font-weight: 600; }

/* Fields */
.field-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 24px;
}
.field { display: flex; flex-direction: column; gap: 3px; }
.field-lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.field-val {
  font-size: 13.5px;
  color: var(--text);
  font-weight: 500;
}

.emp-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.emp-section-title h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.doc-list { display: flex; flex-direction: column; gap: 4px; }
.doc-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: var(--surface);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}
.doc-mini:hover { background: var(--surface-2); }

/* Contract card */
.contract-card {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.contract-stat {
  padding: 14px 18px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.contract-stat:nth-child(3n) { border-right: none; }
.contract-stat:nth-last-child(-n+3) { border-bottom: none; }
.contract-stat-lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.contract-stat-val {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  margin-top: 4px;
}

/* Timeline */
.timeline { position: relative; padding-left: 18px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 5px; top: 4px; bottom: 4px;
  width: 1.5px;
  background: var(--border);
}
.tl-item { position: relative; padding-bottom: 16px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute;
  left: -18px;
  top: 5px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--navy-800);
}
.tl-dot.start { background: var(--navy-800); }
.tl-date { font-size: 11.5px; color: var(--text-muted); font-weight: 500; }
.tl-title { font-size: 13.5px; font-weight: 600; color: var(--text); margin-top: 2px; }
.tl-sub { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }

/* Timeline "Historial de novedades" (ficha del empleado) · clases propias
   para no colisionar con el timeline enriquecido (.tl-rail/.tl-head, ~2344). */
.ed-timeline { position: relative; padding-left: 18px; }
.ed-timeline::before {
  content: '';
  position: absolute;
  left: 5px; top: 4px; bottom: 4px;
  width: 1.5px;
  background: var(--border);
}
.ed-tl-item { position: relative; padding-bottom: 16px; }
.ed-tl-item:last-child { padding-bottom: 0; }
.ed-tl-dot {
  position: absolute;
  left: -18px;
  top: 5px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--navy-800);
}
.ed-tl-dot.start { background: var(--navy-800); }
.ed-tl-date { font-size: 11.5px; color: var(--text-muted); font-weight: 500; }
.ed-tl-title { font-size: 13.5px; font-weight: 600; color: var(--text); margin-top: 2px; }
.ed-tl-sub { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }

/* Stat tiles */
.stat-tile {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}
.stat-num {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  font-feature-settings: 'tnum';
}
.stat-lbl {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 2px;
}

/* Data table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.data-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover { background: var(--surface); }

/* Empty state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 28px;
  background: var(--surface);
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 13px;
}

/* Onboarding checklist */
.onb-progress-card {
  display: flex;
  align-items: center;
  gap: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 22px;
}
.checklist { display: flex; flex-direction: column; gap: 4px; }
.check-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 6px;
}
.check-row.done { background: var(--surface); }
.check-row.current { background: var(--amber-100); }
.check-mark {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  display: grid; place-items: center;
  background: white;
  flex-shrink: 0;
  color: white;
}
.check-row.done .check-mark { background: var(--green-600); border-color: var(--green-600); }
.check-row.current .check-mark { background: white; border-color: var(--amber-600); }
.check-title { font-size: 13.5px; font-weight: 500; color: var(--text); }
.check-row.done .check-title { color: var(--text-muted); text-decoration: line-through; text-decoration-color: var(--text-subtle); }
.pulse-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--amber-600);
  animation: pulse 1.4s infinite;
}
.col { display: flex; flex-direction: column; gap: 4px; }

/* ───────────────────────── Modal shell ───────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 32px 24px;
  animation: fadeIn 0.15s ease-out;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: white;
  border-radius: 14px;
  width: 100%;
  max-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
  overflow: hidden;
  animation: modalIn 0.18s cubic-bezier(.2,.8,.2,1);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(8px) scale(0.985); } to { opacity: 1; transform: none; } }
.modal-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 18px; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
.modal-sub { font-size: 13px; color: var(--text-muted); margin-top: 4px; max-width: 540px; line-height: 1.45; }
.modal-body { padding: 22px 24px; overflow: auto; flex: 1; }
.modal-foot {
  display: flex; align-items: center; gap: 10px; justify-content: flex-end;
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.link-btn {
  background: none; border: none; padding: 0;
  color: var(--navy-800); font-size: 12px; font-weight: 600; cursor: pointer;
  margin-left: auto;
}
.link-btn:hover { color: var(--aguila-600); }

/* ───────────────────────── Stepper ───────────────────────── */
.stepper {
  display: flex; align-items: center; gap: 4px;
  margin-bottom: 22px;
  padding: 4px 0 18px;
  border-bottom: 1px dashed var(--border);
}
.step {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--text-muted);
  flex: 1;
}
.step .step-num {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: grid; place-items: center;
  font-size: 11.5px; font-weight: 700;
  flex-shrink: 0;
}
.step.active { color: var(--text); font-weight: 600; }
.step.active .step-num { background: var(--navy-800); color: white; border-color: var(--navy-800); }
.step.done .step-num { background: var(--green-600); color: white; border-color: var(--green-600); }
.step.done { color: var(--text); }
.step-line {
  flex: 1; height: 1px; background: var(--border); margin: 0 4px;
}
.step.done .step-line { background: var(--green-600); }

/* ───────────────────────── Export modal ───────────────────────── */
.export-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.export-section-title {
  display: flex; align-items: center;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.format-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.format-tile {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 14px 10px 12px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  cursor: pointer;
  text-align: left;
  transition: all 0.12s;
}
.format-tile:hover { border-color: var(--border-strong); }
.format-tile.active {
  border-color: var(--navy-800);
  background: var(--navy-50);
  box-shadow: 0 0 0 3px rgba(27, 47, 94, 0.08);
}
.format-emoji { font-size: 20px; line-height: 1; }
.range-list { display: flex; flex-direction: column; gap: 6px; }
.range-row {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.12s;
}
.range-row:hover { border-color: var(--border-strong); }
.range-row.active { border-color: var(--navy-800); background: var(--navy-50); }
.range-row input { margin-top: 2px; accent-color: var(--navy-800); }
.col-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
  max-height: 240px;
  overflow: auto;
  padding-right: 4px;
}
.col-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0;
  font-size: 13px;
  cursor: pointer;
}
.col-row input { accent-color: var(--navy-800); }

/* Export running / done */
.export-running {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; padding: 48px 24px;
  text-align: center;
}
.export-spinner {
  width: 48px; height: 48px; border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--navy-800);
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.export-done {
  display: flex; flex-direction: column; align-items: center;
  gap: 14px; padding: 16px 8px 8px;
}
.success-ring {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--green-100); color: var(--green-600);
  display: grid; place-items: center;
  margin-bottom: 4px;
}
.success-ring.small { width: 48px; height: 48px; }
.export-file {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 100%;
  background: var(--surface);
}
.export-file-icon {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--navy-50); color: var(--navy-800);
  display: grid; place-items: center;
  flex-shrink: 0;
}

/* ───────────────────────── Import modal ───────────────────────── */
.import-step { display: flex; flex-direction: column; gap: 14px; }
.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 36px 20px;
  border: 2px dashed var(--border-strong);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  transition: all 0.12s;
  text-align: center;
}
.dropzone:hover { border-color: var(--navy-800); background: var(--navy-50); }
.dropzone-icon {
  width: 52px; height: 52px; border-radius: 50%;
  background: white; color: var(--navy-800);
  display: grid; place-items: center;
  border: 1px solid var(--border);
}
.file-preview {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: var(--green-100);
  border: 1px solid color-mix(in oklab, var(--green-600) 20%, transparent);
  border-radius: 10px;
}
.info-panel {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: var(--navy-50);
  border-left: 3px solid var(--navy-800);
  border-radius: 6px;
}
.info-panel-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: white; color: var(--navy-800);
  display: grid; place-items: center;
  flex-shrink: 0;
}

.map-table {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.map-head, .map-row {
  display: grid;
  grid-template-columns: 1.4fr 1.4fr 1.6fr 90px;
  gap: 12px;
  padding: 10px 14px;
  align-items: center;
  font-size: 12.5px;
}
.map-head {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-muted);
}
.map-row { border-bottom: 1px solid var(--border); }
.map-row:last-child { border-bottom: 0; }
.map-row:hover { background: var(--surface); }
.map-select {
  display: flex; align-items: center; justify-content: space-between;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12.5px;
  background: white;
  cursor: pointer;
  font-weight: 500;
  color: var(--text);
}
.map-select.unmapped {
  border-color: var(--rose-600);
  color: var(--rose-600);
  background: var(--rose-100);
}
.map-select.manual { border-color: var(--amber-600); color: var(--amber-600); background: var(--amber-100); }

.validation-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.val-tile {
  background: var(--surface);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 2px;
}
.val-num { font-size: 28px; font-weight: 800; color: var(--green-600); letter-spacing: -0.02em; }
.val-lbl { font-size: 13px; font-weight: 600; color: var(--text); }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.data-table th, .data-table td {
  padding: 9px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.data-table th {
  font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-muted);
  background: var(--surface);
}

.confirm-card {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 28px 20px;
  background: var(--surface);
  border-radius: 12px;
  text-align: center;
}
.confirm-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 12px;
  width: 100%;
  max-width: 480px;
}
.confirm-grid > div { text-align: center; }

/* ───────────────────────── New Employee form ───────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px 16px;
}
.form-field { display: flex; flex-direction: column; gap: 5px; }
.form-field label {
  font-size: 11.5px; font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.form-input {
  font: inherit;
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 13.5px;
  background: white;
  color: var(--text);
  transition: border-color 0.12s, box-shadow 0.12s;
}
.form-input:hover { border-color: var(--border-strong); }
.form-input:focus {
  outline: none;
  border-color: var(--navy-800);
  box-shadow: 0 0 0 3px rgba(27, 47, 94, 0.1);
}

.engine-preview {
  margin-top: 18px;
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-800) 100%);
  border-radius: 12px;
  color: white;
  overflow: hidden;
}
.engine-preview-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.engine-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: white;
}
.engine-badge .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--aguila-600);
  box-shadow: 0 0 0 4px rgba(200, 16, 46, 0.25);
  animation: pulse 1.6s infinite;
}
.engine-preview-body {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
}
.ep-stat {
  padding: 14px 16px;
  display: flex; align-items: center; gap: 10px;
  border-right: 1px solid rgba(255,255,255,0.06);
}
.ep-stat:last-child { border-right: 0; }
.ep-num { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.ep-lbl { font-size: 11px; color: rgba(255,255,255,0.6); margin-top: 3px; }
.engine-list {
  list-style: none;
  margin: 0; padding: 14px 18px 16px;
  display: flex; flex-direction: column; gap: 8px;
}
.engine-list li {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px;
  color: rgba(255,255,255,0.92);
}
.engine-list li svg { color: var(--aguila-600); flex-shrink: 0; }

/* Review */
.review-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 18px 20px;
}
.review-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px 24px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.review-grid .lbl { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 3px; }
.review-grid .val { font-size: 13.5px; color: var(--text); font-weight: 500; }

@media (max-width: 760px) {
  .export-grid { grid-template-columns: 1fr; }
  .engine-preview-body { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: repeat(3, 1fr); }
  .form-field { grid-column: span 3 !important; }
}

/* ───────────────────────── Motor de Automatización ───────────────────────── */
.auto-mark {
  display: grid; place-items: center;
  width: 32px; height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-900));
  color: white;
  box-shadow: 0 4px 14px rgba(27,47,94,0.25);
}
.status-dot-live {
  display: inline-grid; place-items: center;
  width: 14px; height: 14px;
  margin-left: 4px;
}
.status-dot-live > span {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--green-600);
  box-shadow: 0 0 0 4px rgba(14, 138, 87, 0.18);
  animation: pulse 1.6s infinite;
}

.auto-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 18px;
}
.auto-kpi {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  display: flex; align-items: flex-start; gap: 14px;
}
.auto-kpi.alert { border-color: var(--rose-600); background: linear-gradient(180deg, var(--rose-100), white 60%); }
.auto-kpi-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.auto-kpi-icon.navy { background: var(--navy-50); color: var(--navy-800); }
.auto-kpi-icon.green { background: var(--green-100); color: var(--green-600); }
.auto-kpi-icon.blue { background: var(--blue-100); color: var(--blue-600); }
.auto-kpi-icon.rose { background: var(--rose-100); color: var(--rose-600); }
.auto-kpi-num { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.auto-kpi-lbl { font-size: 12.5px; color: var(--text-muted); margin-top: 5px; font-weight: 500; }
.auto-kpi-foot { font-size: 11.5px; margin-top: 6px; }
.auto-kpi-foot.up { color: var(--green-600); font-weight: 600; }
.auto-kpi-foot.down { color: var(--rose-600); font-weight: 600; }

/* Tabs */
.auto-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
  gap: 0;
}
.auto-tab {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 11px 16px;
  display: inline-flex; align-items: center; gap: 8px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.12s;
}
.auto-tab:hover { color: var(--text); }
.auto-tab.active { color: var(--navy-800); border-bottom-color: var(--aguila-600); font-weight: 600; }
.auto-tab-count {
  background: var(--surface);
  color: var(--text-muted);
  font-size: 11px; font-weight: 700;
  padding: 2px 7px; border-radius: 10px;
  font-feature-settings: 'tnum';
}
.auto-tab.active .auto-tab-count { background: var(--navy-50); color: var(--navy-800); }

/* Layout */
.auto-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 16px;
}

/* Timeline */
.timeline-card { padding: 0; overflow: hidden; }
.timeline-toolbar {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.chip-tab {
  background: white;
  border: 1px solid var(--border);
  font: inherit;
  font-size: 12px;
  padding: 5px 11px;
  border-radius: 16px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.12s;
}
.chip-tab:hover { border-color: var(--border-strong); color: var(--text); }
.chip-tab.active {
  background: var(--navy-800); border-color: var(--navy-800); color: white;
  font-weight: 600;
}

.timeline {
  padding: 18px 22px;
  display: flex; flex-direction: column;
}
.tl-item {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
}
.tl-rail {
  display: flex; flex-direction: column; align-items: center;
  position: relative;
}
.tl-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--navy-50);
  color: var(--navy-800);
  display: grid; place-items: center;
  border: 2px solid white;
  box-shadow: 0 0 0 1px var(--border);
  flex-shrink: 0;
}
.tl-item.error .tl-dot { background: var(--rose-100); color: var(--rose-600); box-shadow: 0 0 0 1px var(--rose-600); }
.tl-item.expiry .tl-dot { background: var(--amber-100); color: var(--amber-600); }
.tl-item.change .tl-dot { background: var(--blue-100); color: var(--blue-600); }
.tl-line {
  width: 2px; flex: 1;
  background: var(--border);
  margin-top: 4px;
  margin-bottom: -8px;
}
.tl-body {
  padding-bottom: 20px;
  min-width: 0;
}
.tl-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}
.tl-title { font-size: 13.5px; color: var(--text); }
.tl-detail { font-size: 12.5px; margin-top: 3px; line-height: 1.5; }
.tl-rule {
  display: flex; align-items: center; gap: 8px;
  margin-top: 8px;
  font-size: 12px;
  flex-wrap: wrap;
}
.rule-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px;
  background: var(--navy-50);
  color: var(--navy-800);
  border-radius: 12px;
  font-size: 11.5px;
  font-weight: 600;
  font-family: var(--mono, monospace);
}
.tl-toggle {
  margin-left: auto;
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
  font-size: 12px; font-weight: 600;
  color: var(--navy-800);
  padding: 5px 10px;
  display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer;
}
.tl-toggle:hover { border-color: var(--navy-800); }

.tl-actions {
  margin-top: 12px;
  background: var(--surface);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 14px;
}
.tl-action {
  display: flex; gap: 12px; align-items: flex-start;
}
.tl-action-icon {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.tl-action-icon.navy { background: var(--navy-50); color: var(--navy-800); }
.tl-action-icon.amber { background: var(--amber-100); color: var(--amber-600); }
.tl-action-icon.blue { background: var(--blue-100); color: var(--blue-600); }
.tl-action-icon.rose { background: var(--rose-100); color: var(--rose-600); }
.tl-action-icon.green { background: var(--green-100); color: var(--green-600); }
.tl-action-head {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 5px;
}
.check-tick {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--green-600); color: white;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.tl-action-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 3px;
}
.tl-action-list li {
  font-size: 12.5px;
  color: var(--text-muted);
  padding-left: 12px;
  position: relative;
}
.tl-action-list li::before {
  content: ''; position: absolute; left: 2px; top: 8px;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--text-subtle);
}
.tl-action.err .tl-action-list li {
  color: var(--rose-600);
  font-weight: 500;
}
.timeline-foot {
  padding: 10px 22px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

/* Side panel — bars */
.auto-bars { display: flex; flex-direction: column; gap: 10px; }
.auto-bar-row {
  display: grid;
  grid-template-columns: 90px 1fr 36px;
  gap: 10px;
  align-items: center;
  font-size: 12.5px;
}
.auto-bar-lbl { color: var(--text-muted); }
.auto-bar-track {
  background: var(--surface-2);
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
}
.auto-bar-fill { height: 100%; border-radius: 4px; }
.auto-bar-fill.navy { background: var(--navy-800); }
.auto-bar-fill.amber { background: var(--amber-600); }
.auto-bar-fill.rose { background: var(--rose-600); }
.auto-bar-fill.green { background: var(--green-600); }
.auto-bar-fill.blue { background: var(--blue-600); }
.auto-bar-num { text-align: right; font-weight: 600; color: var(--text); font-size: 12.5px; }

/* Status list */
.status-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.status-list li { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--text); }
.status-pin {
  width: 8px; height: 8px; border-radius: 50%;
  flex-shrink: 0;
}
.status-pin.ok { background: var(--green-600); box-shadow: 0 0 0 3px var(--green-100); }
.status-pin.warn { background: var(--amber-600); box-shadow: 0 0 0 3px var(--amber-100); }
.status-pin.err { background: var(--rose-600); box-shadow: 0 0 0 3px var(--rose-100); }

.auto-tip {
  display: flex; gap: 12px; padding: 16px 18px;
  background: linear-gradient(135deg, var(--navy-50), white);
  border: 1px solid var(--navy-100);
}
.auto-tip-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--navy-800); color: var(--aguila-600);
  display: grid; place-items: center;
  flex-shrink: 0;
}

/* Rules */
.rules-toolbar {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.rules-list {
  display: flex; flex-direction: column;
}
.rule-row {
  border-bottom: 1px solid var(--border);
  padding: 16px 22px;
  transition: background 0.12s;
}
.rule-row:last-child { border-bottom: 0; }
.rule-row:hover { background: var(--surface); }
.rule-row.disabled { opacity: 0.6; }
.rule-head {
  display: flex; align-items: center; gap: 12px;
}
.rule-id {
  font-size: 11px; font-weight: 700;
  background: var(--navy-50); color: var(--navy-800);
  padding: 3px 8px; border-radius: 6px;
}
.rule-name { font-size: 14.5px; font-weight: 600; flex: 1; display: flex; align-items: center; }
.rule-toggle { background: none; border: 0; padding: 0; cursor: pointer; }
.toggle {
  display: inline-block;
  width: 36px; height: 20px;
  background: var(--border-strong);
  border-radius: 12px;
  position: relative;
  transition: background 0.18s;
}
.toggle.on { background: var(--green-600); }
.toggle .knob {
  position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: white;
  border-radius: 50%;
  transition: transform 0.18s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.18);
}
.toggle.on .knob { transform: translateX(16px); }

.rule-body {
  margin-top: 12px;
  display: flex; flex-direction: column; gap: 10px;
  padding-left: 2px;
}
.rule-prop {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 14px;
  align-items: center;
  font-size: 13px;
}
.rule-prop-lbl { color: var(--text-muted); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.trigger-chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--navy-50); color: var(--navy-800);
  padding: 4px 10px; border-radius: 14px;
  font-size: 12px; font-weight: 600;
}
.action-chip {
  background: white;
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: 14px;
  font-size: 12px;
  color: var(--text);
}

/* Matrices */
.matrices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.matrix-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 12px;
  background: white;
  transition: all 0.12s;
}
.matrix-card:hover { border-color: var(--border-strong); }
.matrix-card.empty { border-color: var(--rose-600); background: var(--rose-100); }
.matrix-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.matrix-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 8px;
  background: var(--surface);
  border-radius: 8px;
}
.matrix-stats > div {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  font-size: 12px;
  color: var(--text);
  font-weight: 600;
}
.matrix-stats svg { color: var(--text-muted); }

/* Logs */
.logs-head {
  display: flex; align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.logs-list {
  font-size: 12px;
  font-feature-settings: 'tnum';
  background: #0f1324;
  color: #c9d1e8;
  max-height: 580px;
  overflow: auto;
}
.log-row {
  display: grid;
  grid-template-columns: 110px 60px 110px 1fr;
  gap: 12px;
  padding: 8px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  align-items: center;
}
.log-row:hover { background: rgba(255,255,255,0.03); }
.log-time { color: rgba(255,255,255,0.45); font-size: 11.5px; }
.log-level { font-weight: 700; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.04em; }
.log-level.info { color: #6cb9ff; }
.log-level.warn { color: #f5b34a; }
.log-level.error { color: #ff7691; }
.log-event { color: #94a3c8; }
.log-msg { color: rgba(255,255,255,0.86); }
.log-row.err { background: rgba(200,16,46,0.08); }
.log-row.warn { background: rgba(181,118,9,0.08); }

/* New Rule modal */
.rule-section-title {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.trigger-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.trigger-tile {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  font: inherit;
  transition: all 0.12s;
}
.trigger-tile:hover { border-color: var(--border-strong); }
.trigger-tile.active {
  border-color: var(--navy-800);
  background: var(--navy-50);
}
.trigger-tile-icon {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: var(--navy-50); color: var(--navy-800);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.trigger-tile.active .trigger-tile-icon { background: var(--navy-800); color: white; }

.cond-builder {
  display: flex; flex-direction: column; gap: 10px;
}
.cond-row {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
}
.cond-and {
  font-size: 11px; font-weight: 700;
  color: var(--text-muted);
  background: var(--surface);
  padding: 3px 8px; border-radius: 4px;
  letter-spacing: 0.06em;
}
.cond-select, .cond-op, .cond-value {
  font: inherit;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: white;
  font-size: 13px;
  color: var(--text);
}
.cond-select { min-width: 140px; }
.cond-op { min-width: 100px; }
.cond-value { flex: 1; min-width: 160px; }

.action-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.action-tile {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.12s;
}
.action-tile:hover { border-color: var(--border-strong); }
.action-tile.active { border-color: var(--navy-800); background: var(--navy-50); }
.action-tile input { accent-color: var(--navy-800); }

@media (max-width: 1180px) {
  .auto-grid { grid-template-columns: 1fr; }
  .auto-kpis { grid-template-columns: repeat(2, 1fr); }
  .trigger-grid, .action-grid { grid-template-columns: 1fr; }
}

/* ───────────────────────── Onboarding ───────────────────────── */
.muted-xs {
  font-size: 10.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

/* List toolbar */
.ob-toolbar {
  display: flex; align-items: center; gap: 10px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 10px 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.ob-search {
  display: flex; align-items: center; gap: 8px;
  flex: 1; min-width: 220px;
  background: var(--surface);
  border-radius: 7px;
  padding: 7px 10px;
  color: var(--text-muted);
}
.ob-search input {
  border: 0; background: transparent;
  flex: 1;
  font: inherit;
  font-size: 13px;
  outline: none;
  color: var(--text);
}
.ob-toolbar select {
  font: inherit;
  font-size: 12.5px;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 7px 11px;
  background: white;
  color: var(--text);
  cursor: pointer;
}
.ob-toolbar select:hover { border-color: var(--border-strong); }

/* Card grid */
.ob-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

.ob-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 18px 18px 14px;
  display: flex; flex-direction: column;
  gap: 14px;
  cursor: pointer;
  transition: border-color 0.12s, box-shadow 0.12s, transform 0.12s;
}
.ob-card:hover {
  border-color: var(--navy-800);
  box-shadow: var(--shadow-2);
  transform: translateY(-1px);
}

.ob-card-head {
  display: flex; align-items: flex-start; gap: 12px;
}

.ob-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy-700), var(--navy-900));
  color: white;
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.ob-avatar.lg { width: 64px; height: 64px; font-size: 19px; }
.ob-avatar.sm { width: 32px; height: 32px; font-size: 11px; }

.ob-card-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ob-card-role {
  font-size: 12.5px;
  color: var(--text);
  margin-top: 2px;
}
.ob-card-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.ob-card-dates {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.ob-card-stat {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-top: 4px;
  font-feature-settings: 'tnum';
}

.ob-card-urgent {
  display: flex; flex-direction: column;
  gap: 6px;
}
.ob-card-urgent-h {
  margin-bottom: 2px;
}
.ob-card-urgent ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; flex-direction: column;
  gap: 5px;
}
.ob-card-urgent li {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px;
  color: var(--text);
  line-height: 1.35;
}
.ob-card-urgent li svg {
  color: var(--text-muted);
  flex-shrink: 0;
}
.ob-card-urgent li.urg-alert { color: var(--rose-600); }
.ob-card-urgent li.urg-alert svg { color: var(--rose-600); }

.ob-card-cta {
  margin-top: auto;
  background: transparent;
  border: 0;
  color: var(--navy-800);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 0 0;
  align-self: flex-end;
}
.ob-card-cta:hover { color: var(--navy-900); }

/* ─── Detail view ─── */
.ob-detail-head {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.ob-detail-id {
  display: flex; align-items: center; gap: 18px;
  flex: 1; min-width: 280px;
}
.ob-detail-name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.ob-detail-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}
.ob-detail-dates {
  display: flex; gap: 14px;
  margin-top: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.ob-detail-dates > span:not(.pill) {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px;
  color: var(--text);
}
.ob-detail-dates svg { color: var(--text-muted); }

.ob-detail-progress {
  text-align: right;
}
.ob-detail-progress-num {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--navy-800);
  line-height: 1;
  font-feature-settings: 'tnum';
}
.ob-detail-progress-num small {
  font-size: 22px;
  color: var(--text-muted);
  font-weight: 600;
  margin-left: 2px;
}
.ob-detail-progress-lbl {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

/* Detail grid */
.ob-detail-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 18px;
}
@media (max-width: 1100px) {
  .ob-detail-grid { grid-template-columns: 1fr; }
}

/* Sections */
.ob-sections {
  display: flex; flex-direction: column;
  gap: 12px;
}
.ob-section {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.ob-section-head {
  width: 100%;
  background: white;
  border: 0;
  padding: 14px 18px;
  display: flex; align-items: center; gap: 14px;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.ob-section-head:hover { background: var(--surface); }
.ob-section.open .ob-section-head { border-bottom: 1px solid var(--border); }

.ob-section-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--navy-50);
  color: var(--navy-800);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.ob-section-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}
.ob-section-count {
  font-size: 12.5px;
  color: var(--text-muted);
  font-feature-settings: 'tnum';
}
.ob-section-count strong {
  font-weight: 700;
  color: var(--text);
  font-size: 15px;
}
.ob-section-chev {
  color: var(--text-muted);
  transition: transform 0.18s;
  flex-shrink: 0;
}
.ob-section.open .ob-section-chev { transform: rotate(180deg); }

.ob-section-body {
  display: flex; flex-direction: column;
}

.ob-item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
}
.ob-item:last-child { border-bottom: 0; }

.ob-item-state {
  width: 24px; height: 24px;
  border-radius: 50%;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.ob-item.st-done .ob-item-state    { background: var(--green-100); color: var(--green-600); }
.ob-item.st-pending .ob-item-state { background: var(--amber-100); color: var(--amber-600); }
.ob-item.st-scheduled .ob-item-state { background: var(--blue-100); color: var(--blue-600); }
.ob-item.st-alert .ob-item-state   { background: var(--rose-100); color: var(--rose-600); }
.ob-item.st-blocked .ob-item-state { background: var(--surface-2); color: var(--text-muted); }

.ob-item-name {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
}
.ob-item.st-done .ob-item-name {
  color: var(--text-muted);
}
.ob-item-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
  line-height: 1.45;
}
.ob-item.st-alert .ob-item-meta { color: var(--rose-600); }

.ob-item-right {
  display: flex; align-items: center; gap: 8px;
  flex-shrink: 0;
}
.ob-item-action {
  font-size: 11.5px;
  padding: 5px 10px;
}

/* Timeline (sidebar) */
.ob-side {
  display: flex; flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 88px;
  align-self: flex-start;
}
.ob-timeline-card {
  padding: 0;
}
.ob-timeline-card .card-head {
  padding: 14px 18px;
}
.ob-timeline {
  padding: 14px 22px 18px;
  display: flex; flex-direction: column;
}
.ob-tl-item {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
}
.ob-tl-rail {
  display: flex; flex-direction: column; align-items: center;
}
.ob-tl-dot {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--surface);
  display: grid; place-items: center;
  border: 2px solid white;
  box-shadow: 0 0 0 1.5px var(--border);
  color: var(--text-muted);
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.ob-tl-done .ob-tl-dot {
  background: var(--green-600);
  color: white;
  box-shadow: 0 0 0 1.5px var(--green-600);
}
.ob-tl-now .ob-tl-dot {
  background: white;
  box-shadow: 0 0 0 2px var(--aguila-600);
}
.ob-tl-now .now-pulse {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--aguila-600);
  animation: pulse 1.4s infinite;
}
.ob-tl-milestone .ob-tl-dot {
  background: var(--navy-800);
  color: white;
  box-shadow: 0 0 0 1.5px var(--navy-800);
}
.ob-tl-line {
  width: 2px;
  flex: 1;
  background: var(--border);
  margin-top: 2px;
  margin-bottom: -6px;
  min-height: 18px;
}
.ob-tl-done + .ob-tl-line, .ob-tl-item.ob-tl-done .ob-tl-line {
  background: var(--green-600);
}
.ob-tl-body {
  padding-bottom: 16px;
  min-width: 0;
}
.ob-tl-date {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}
.ob-tl-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-top: 2px;
}
.ob-tl-now .ob-tl-label { color: var(--aguila-600); }
.ob-tl-detail {
  font-size: 12px;
  margin-top: 2px;
}

/* Team panel */
.ob-team {
  display: flex; flex-direction: column;
  padding: 6px 0;
}
.ob-team-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 18px;
}
.ob-team-row:hover { background: var(--surface); }
.ob-team-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.ob-team-role {
  font-size: 11.5px;
  margin-top: 2px;
}

/* Floating action */
.ob-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: var(--aguila-600);
  color: white;
  border: 0;
  border-radius: 999px;
  padding: 12px 20px 12px 16px;
  display: inline-flex; align-items: center; gap: 10px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(200, 16, 46, 0.32);
  transition: transform 0.12s, box-shadow 0.12s;
  z-index: 100;
}
.ob-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(200, 16, 46, 0.4);
  background: var(--aguila-700);
}

@media (max-width: 760px) {
  .ob-detail-head { flex-direction: column; align-items: flex-start; }
  .ob-detail-progress { text-align: left; }
  .ob-fab span { display: none; }
  .ob-fab { padding: 14px; border-radius: 50%; }
}

/* ─────────────────────────────────────────────────────────────
   Documents module
   ───────────────────────────────────────────────────────────── */

.doc-tabs {
  display: flex; gap: 2px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 18px;
  overflow-x: auto;
}
.doc-tab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px;
  background: none; border: none; cursor: pointer;
  font: inherit; color: var(--text); font-weight: 600; font-size: 14px;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s;
  white-space: nowrap;
  border-radius: 8px 8px 0 0;
}
.doc-tab:hover {
  background: var(--surface);
  color: var(--navy-800);
}
.doc-tab.active {
  color: var(--navy-800);
  border-bottom-color: var(--navy-800);
  font-weight: 700;
  background: var(--surface);
}
.doc-tab svg { opacity: 0.7; }
.doc-tab.active svg { opacity: 1; }

.doc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 16px;
  align-items: start;
}
@media (max-width: 1280px) {
  .doc-grid { grid-template-columns: 1fr; }
}

.doc-list-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.doc-table thead th {
  text-align: left;
  font-size: 11px; font-weight: 600;
  color: var(--text-subtle);
  letter-spacing: 0.04em; text-transform: uppercase;
  padding: 10px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.doc-table tbody tr {
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s;
}
.doc-table tbody tr:hover { background: var(--surface); }
.doc-table tbody tr.selected { background: var(--navy-50); }
.doc-table tbody tr.selected td:first-child { box-shadow: inset 3px 0 0 var(--navy-800); }
.doc-table tbody tr:last-child { border-bottom: none; }
.doc-table td { padding: 12px 14px; vertical-align: middle; }

.doc-cell-type { display: flex; align-items: center; gap: 10px; min-width: 0; }
.doc-type-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--navy-50); color: var(--navy-800);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.doc-type-icon.lg { width: 40px; height: 40px; border-radius: 10px; }
.doc-name { font-weight: 600; color: var(--text); font-size: 13px; }

.doc-cell-emp { display: flex; align-items: center; gap: 9px; min-width: 0; }
.doc-avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--surface-2); color: var(--text);
  display: grid; place-items: center;
  font-size: 10.5px; font-weight: 600;
  flex-shrink: 0;
}

.signer-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.signer-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11.5px;
  white-space: nowrap;
}
.signer-chip.signed {
  background: var(--green-100);
  color: var(--green-600);
  border-color: transparent;
  font-weight: 600;
}

.status-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  margin-right: 4px;
}

.pill.amber-soft {
  background: #FEF3C7; color: #854D0E; border-color: transparent;
}

.doc-actions { display: flex; gap: 2px; }
.icon-action {
  width: 28px; height: 28px;
  border-radius: 6px;
  background: none; border: none;
  color: var(--text-muted);
  display: grid; place-items: center;
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
}
.icon-action:hover { background: var(--surface-2); color: var(--text); }
.icon-action.danger:hover { background: var(--rose-100); color: var(--rose-600); }

.doc-table-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.pager { display: flex; align-items: center; gap: 4px; }

.doc-side {
  position: sticky;
  top: 16px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  padding: 16px;
  display: flex; flex-direction: column; gap: 16px;
  max-height: calc(100vh - 100px);
  overflow: auto;
}
.doc-side.empty {
  text-align: center;
  padding: 60px 20px;
}
.doc-side-head {
  display: flex; gap: 12px; align-items: flex-start;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.doc-side-name { font-weight: 700; font-size: 14.5px; color: var(--text); }

.doc-side-section {
  display: flex; flex-direction: column; gap: 6px;
}

.doc-preview { display: flex; flex-direction: column; }
.doc-preview-pages {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.doc-page-thumb {
  position: relative;
  aspect-ratio: 0.77;
  background: white;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 8px 6px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 30, 64, 0.04);
}
.doc-page-lines { display: flex; flex-direction: column; gap: 2.5px; }
.doc-page-lines span {
  display: block;
  height: 2px;
  background: var(--surface-2);
  border-radius: 1px;
}
.doc-page-num {
  position: absolute;
  bottom: 3px; right: 5px;
  font-size: 8px;
  color: var(--text-subtle);
  font-family: 'JetBrains Mono', monospace;
}

.hash-box {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.hash-box .mono { font-size: 11.5px; color: var(--text); }
.hash-copy {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 11px; font-weight: 600;
  color: var(--navy-800);
  cursor: pointer;
}
.hash-copy:hover { background: var(--navy-50); border-color: var(--navy-100); }

.doc-timeline { display: flex; flex-direction: column; }
.doc-tl-row { display: flex; gap: 10px; padding-bottom: 12px; }
.doc-tl-row:last-child { padding-bottom: 0; }
.doc-tl-rail {
  display: flex; flex-direction: column; align-items: center;
  flex-shrink: 0;
}
.doc-tl-dot {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.doc-tl-line { flex: 1; width: 1px; background: var(--border); margin-top: 2px; min-height: 12px; }
.doc-tl-body { flex: 1; padding-top: 1px; min-width: 0; }
.doc-tl-label { font-size: 12.5px; font-weight: 600; color: var(--text); }
.doc-tl-detail { font-size: 11.5px; margin-top: 2px; line-height: 1.45; }
.doc-tl-row.doc-tl-signed .doc-tl-dot    { background: var(--green-100); color: var(--green-600); border-color: transparent; }
.doc-tl-row.doc-tl-generated .doc-tl-dot { background: var(--navy-50); color: var(--navy-800); border-color: transparent; }
.doc-tl-row.doc-tl-viewed .doc-tl-dot    { background: var(--blue-100); color: var(--blue-600); border-color: transparent; }
.doc-tl-row.doc-tl-pending .doc-tl-dot   { background: var(--amber-100); color: var(--amber-600); border-color: transparent; }
.doc-tl-row.doc-tl-mailed .doc-tl-dot    { background: var(--surface-2); color: var(--text); border-color: transparent; }
.doc-tl-row.doc-tl-sent .doc-tl-dot      { background: var(--blue-100); color: var(--blue-600); border-color: transparent; }

.muted-xs {
  font-size: 11px; font-weight: 600;
  color: var(--text-subtle);
  letter-spacing: 0.03em; text-transform: uppercase;
}

.empty-state {
  text-align: center;
  padding: 80px 20px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  color: var(--text-muted);
}
.empty-state svg { margin: 0 auto 12px; color: var(--text-subtle); display: block; }
.empty-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.empty-sub { font-size: 13px; max-width: 420px; margin: 0 auto; line-height: 1.5; }

/* ─────────────────────────────────────────────────────────────
   Templates subtab
   ───────────────────────────────────────────────────────────── */

.tpl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}
.tpl-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.tpl-card:hover { border-color: var(--navy-100); box-shadow: var(--shadow-2); }
.tpl-card-head { display: flex; gap: 10px; align-items: center; }
.tpl-icon {
  width: 38px; height: 38px; border-radius: 9px;
  background: var(--navy-50); color: var(--navy-800);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.tpl-name { font-weight: 600; font-size: 13.5px; color: var(--text); line-height: 1.3; }
.tpl-meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  padding: 10px 12px;
  background: var(--surface);
  border-radius: 8px;
}
.tpl-meta-val { font-size: 12.5px; font-weight: 600; color: var(--text); margin-top: 2px; }
.tpl-vars { display: flex; flex-direction: column; gap: 6px; }
.tpl-var-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.var-chip {
  padding: 2px 7px;
  background: var(--navy-50);
  color: var(--navy-800);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}
.tpl-card-foot { display: flex; gap: 8px; }
.tpl-new {
  border: 2px dashed var(--border-strong);
  background: var(--surface);
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  color: var(--text-muted);
  min-height: 220px;
}
.tpl-new:hover { border-color: var(--navy-800); color: var(--navy-800); background: var(--navy-50); }
.tpl-new svg { color: var(--text-subtle); }
.tpl-new:hover svg { color: var(--navy-800); }
.tpl-new-label { font-weight: 600; color: var(--text); margin-top: 4px; font-size: 14px; }

.tpl-editor-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.tpl-editor-title { font-size: 18px; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }

.tpl-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 280px;
  gap: 14px;
  height: calc(100vh - 280px);
  min-height: 540px;
}
@media (max-width: 1280px) {
  .tpl-editor-grid { grid-template-columns: 1fr 1fr; height: auto; }
  .tpl-side-pane { grid-column: 1 / -1; height: 380px; }
}

.tpl-pane, .tpl-side-pane {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  display: flex; flex-direction: column;
  overflow: hidden;
  min-height: 0;
}
.tpl-pane-head {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 14px;
  font-size: 11px; font-weight: 600;
  color: var(--text-subtle);
  letter-spacing: 0.04em; text-transform: uppercase;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.tpl-pane-head svg { color: var(--text-muted); }
.tpl-pane-foot {
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.tpl-source {
  flex: 1;
  padding: 16px 18px;
  overflow: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--text);
  outline: none;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.tpl-source:focus { background: #FAFBFC; }
.ed-var {
  background: var(--navy-50);
  color: var(--navy-800);
  font-weight: 600;
  padding: 1px 4px;
  border-radius: 3px;
}
.ed-cond {
  background: var(--amber-100);
  color: var(--amber-600);
  font-weight: 600;
  padding: 1px 4px;
  border-radius: 3px;
}

.tpl-preview {
  flex: 1;
  padding: 24px 28px;
  overflow: auto;
  font-size: 13px;
  line-height: 1.65;
  color: var(--text);
  background: white;
}
.tpl-preview h1 { font-size: 16px; font-weight: 700; margin: 0 0 14px; letter-spacing: -0.01em; text-align: center; }
.tpl-preview h2 { font-size: 13.5px; font-weight: 700; margin: 18px 0 8px; color: var(--navy-800); }
.tpl-preview p { margin: 0 0 10px; text-align: justify; }
.prv-var {
  background: var(--green-100);
  color: var(--green-600);
  padding: 0 4px;
  border-radius: 3px;
  font-weight: 600;
}

.tpl-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer;
  user-select: none;
}
.tpl-toggle input { margin: 0; }

.tpl-vars-list {
  flex: 1;
  overflow: auto;
  min-height: 0;
}
.tpl-var-row {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%;
  padding: 8px 12px;
  background: none; border: none; border-bottom: 1px solid var(--border);
  cursor: pointer;
  text-align: left;
  transition: background 0.1s;
}
.tpl-var-row:last-child { border-bottom: none; }
.tpl-var-row:hover { background: var(--navy-50); }
.tpl-var-row svg { color: var(--text-subtle); }
.tpl-var-row:hover svg { color: var(--navy-800); }

.tpl-versions {
  flex-shrink: 0;
  max-height: 200px;
  overflow: auto;
}
.tpl-version {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.tpl-version:last-child { border-bottom: none; }
.tpl-version.current { background: var(--navy-50); }

/* ─────────────────────────────────────────────────────────────
   Signature flow modal
   ───────────────────────────────────────────────────────────── */

.sig-modal { max-width: 640px; }
.sig-modal-wide { max-width: 1100px; }
.sig-head { padding: 18px 22px 14px; }

.sig-stepper {
  display: flex; align-items: center;
  padding: 14px 24px;
  gap: 10px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.sig-step {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
}
.sig-step-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: white;
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700;
  flex-shrink: 0;
}
.sig-step.active { color: var(--text); font-weight: 600; }
.sig-step.active .sig-step-num { background: var(--navy-800); color: white; border-color: var(--navy-800); }
.sig-step.done .sig-step-num { background: var(--green-600); color: white; border-color: var(--green-600); }
.sig-step.done { color: var(--text); }
.sig-step-line { flex: 1; height: 1px; background: var(--border); }
.sig-step-line.done { background: var(--green-600); }

.sig-notice {
  display: flex; gap: 14px;
  padding: 14px 16px;
  background: var(--amber-100);
  border-radius: 10px;
  margin-bottom: 18px;
}
.sig-notice-icon {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: white;
  color: var(--amber-600);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.sig-notice-title { font-weight: 700; font-size: 14.5px; color: var(--text); margin-bottom: 4px; }
.sig-notice-sub { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

.sig-summary {
  display: flex; flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 14px;
}
.sig-summary-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.sig-summary-row:last-child { border-bottom: none; }

.sig-warn {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  background: var(--navy-50);
  border-radius: 8px;
  color: var(--navy-800);
  font-size: 12px;
  line-height: 1.45;
}
.sig-warn svg { color: var(--navy-800); flex-shrink: 0; }

.sig-reader-bar {
  padding: 10px 24px;
  background: white;
  border-bottom: 1px solid var(--border);
}
.sig-reader-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.sig-progress {
  width: 100%;
  height: 4px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
}
.sig-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--navy-800), var(--green-600));
  transition: width 0.18s ease;
  border-radius: 999px;
}
.sig-reader {
  flex: 1;
  overflow: auto;
  background: var(--surface);
  padding: 24px;
  min-height: 0;
}
.sig-pdf-page {
  background: white;
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 60px;
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 6px 24px rgba(15, 30, 64, 0.08);
}
.sig-pdf-head {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 16px; margin-bottom: 24px;
  border-bottom: 2px solid var(--navy-800);
}
.sig-pdf-brand { display: flex; align-items: center; gap: 10px; }
.sig-brand-mark {
  width: 32px; height: 32px;
  border-radius: 6px;
  background: var(--aguila-600);
  color: white;
  display: grid; place-items: center;
  font-weight: 700; font-size: 18px;
}
.sig-pdf-h1 {
  font-size: 17px; font-weight: 700;
  text-align: center;
  margin: 4px 0 24px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.sig-pdf-h2 {
  font-size: 13.5px; font-weight: 700;
  margin: 22px 0 8px;
  color: var(--navy-800);
}
.sig-pdf-p {
  font-size: 12.5px; line-height: 1.7;
  text-align: justify;
  margin: 0 0 12px;
  color: var(--text);
}
.sig-pdf-sig-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-top: 60px;
  padding-top: 24px;
}
.sig-pdf-sig-col { text-align: center; }
.sig-pdf-sig-line {
  height: 50px;
  border-bottom: 1px solid var(--text-subtle);
  margin-bottom: 8px;
  position: relative;
}
.sig-pdf-sig-line.signed {
  border-bottom-color: var(--green-600);
}
.sig-pdf-sig-line.signed::after {
  content: 'C. Gómez';
  position: absolute;
  bottom: 8px; left: 50%;
  transform: translateX(-50%) rotate(-6deg);
  color: var(--green-600);
  font-size: 22px;
  font-family: 'Brush Script MT', cursive;
  font-style: italic;
  font-weight: 600;
  white-space: nowrap;
}
.sig-pdf-foot {
  display: flex; justify-content: space-between;
  margin-top: 40px; padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 10px;
  color: var(--text-subtle);
}
.sig-pdf-foot .mono { font-size: 9.5px; }

.sig-foot { gap: 10px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.sig-confirm-head {
  display: flex; gap: 14px;
  padding: 14px 16px;
  background: var(--navy-50);
  border-radius: 10px;
  margin-bottom: 18px;
}
.sig-confirm-icon {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: white;
  color: var(--navy-800);
  display: grid; place-items: center;
  flex-shrink: 0;
}

.sig-accept {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 14px;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.sig-accept:hover { border-color: var(--navy-100); background: var(--navy-50); }
.sig-accept input[type=checkbox] {
  margin: 3px 0 0;
  width: 16px; height: 16px;
  accent-color: var(--navy-800);
  flex-shrink: 0;
}
.sig-accept span { font-size: 13px; line-height: 1.55; color: var(--text); }

.sig-evidence-pre { margin-top: 8px; }
.sig-evidence {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 14px;
}
.sig-evidence-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
}
.sig-evidence-row:last-child { border-bottom: none; }

.sig-spinner {
  display: inline-block;
  width: 13px; height: 13px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: sigSpin 0.7s linear infinite;
  margin-right: 4px;
  vertical-align: middle;
}
@keyframes sigSpin { to { transform: rotate(360deg); } }

.sig-success {
  padding: 36px 28px 24px;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  gap: 14px;
}
.sig-success-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--green-100);
  color: var(--green-600);
  display: grid; place-items: center;
  animation: sigPop 0.32s cubic-bezier(.2,.8,.2,1);
}
@keyframes sigPop { from { transform: scale(0.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.sig-success-title { font-size: 20px; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
.sig-success-sub { font-size: 13.5px; color: var(--text-muted); line-height: 1.55; max-width: 440px; }
.sig-success .sig-evidence { width: 100%; margin-top: 4px; }

/* ─────────────────────────────────────────────────────────────
   Training module
   ───────────────────────────────────────────────────────────── */

.tr-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
.tr-kpi {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  display: flex; align-items: flex-start; gap: 14px;
}
.tr-kpi-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.tr-kpi-icon.navy  { background: var(--navy-50);   color: var(--navy-800); }
.tr-kpi-icon.blue  { background: var(--blue-100);  color: var(--blue-600); }
.tr-kpi-icon.green { background: var(--green-100); color: var(--green-600); }
.tr-kpi-icon.amber { background: var(--amber-100); color: var(--amber-600); }
.tr-kpi-num {
  font-size: 26px; font-weight: 800;
  letter-spacing: -0.02em; line-height: 1;
  color: var(--text);
  font-feature-settings: 'tnum';
}
.tr-kpi-num small {
  font-size: 16px; font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0;
}
.tr-kpi-lbl {
  font-size: 12.5px; color: var(--text-muted);
  margin-top: 6px; font-weight: 500;
}
.tr-kpi-foot { font-size: 11.5px; margin-top: 4px; }
.tr-kpi-foot.up    { color: var(--green-600); font-weight: 600; }
.tr-kpi-foot.muted { color: var(--text-muted); }
@media (max-width: 1100px) {
  .tr-kpis { grid-template-columns: repeat(2, 1fr); }
}

/* Plans table */
.tr-plan-table tbody td { padding: 14px; }
.tr-plan-stats { display: flex; gap: 6px; }
.tr-plan-stat {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11.5px; font-weight: 600;
}
.tr-plan-stat.green { background: var(--green-100); color: var(--green-600); }
.tr-plan-stat.blue  { background: var(--blue-100);  color: var(--blue-600); }
.tr-plan-stat.muted { background: var(--surface);   color: var(--text-muted); border: 1px solid var(--border); }

.tr-prog-cell { display: flex; align-items: center; gap: 10px; min-width: 160px; }
.tr-prog-track {
  flex: 1;
  height: 6px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
}
.tr-prog-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.2s ease;
}
.tr-prog-fill.green { background: var(--green-600); }
.tr-prog-fill.amber { background: var(--amber-600); }
.tr-prog-fill.rose  { background: var(--rose-600); }
.tr-prog-pct {
  font-size: 12px; font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  min-width: 40px; text-align: right;
}
.tr-prog-pct.green { color: var(--green-600); }
.tr-prog-pct.amber { color: var(--amber-600); }
.tr-prog-pct.rose  { color: var(--rose-600); }

.tr-due {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px;
  margin-top: 3px;
  font-family: 'JetBrains Mono', monospace;
}
.tr-due.urgent { color: var(--rose-600); font-weight: 700; }
.tr-due.muted  { color: var(--text-muted); }

/* Catalog cards */
.tr-catalog {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}
.tr-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.tr-card:hover {
  border-color: var(--navy-100);
  box-shadow: var(--shadow-2);
  transform: translateY(-1px);
}
.tr-card-head {
  display: flex; justify-content: space-between; align-items: center;
}
.tr-cat-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.tr-cat-badge.rose  { background: var(--rose-100);   color: var(--rose-600); }
.tr-cat-badge.blue  { background: var(--blue-100);   color: var(--blue-600); }
.tr-cat-badge.navy  { background: var(--navy-50);    color: var(--navy-800); }
.tr-cat-badge.amber { background: var(--amber-100);  color: var(--amber-600); }

.tr-mode {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 500;
}

.tr-card-name {
  font-size: 15px; font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.tr-card-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface);
  border-radius: 8px;
}
.tr-card-val { font-size: 12.5px; font-weight: 600; color: var(--text); margin-top: 2px; }

.tr-card-progress { display: flex; flex-direction: column; gap: 5px; }
.tr-card-prog-meta {
  display: flex; justify-content: space-between;
  font-size: 11.5px;
  color: var(--text);
}

.tr-card-roles { display: flex; flex-direction: column; gap: 6px; }
.tr-role-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.tr-role-chip {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11.5px;
}
.tr-role-chip.mand {
  background: var(--rose-100);
  color: var(--rose-600);
  border-color: transparent;
  font-weight: 600;
}

/* Course detail side panel */
.tr-side-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(2px);
  z-index: 200;
  display: flex; justify-content: flex-end;
  animation: fadeIn 0.15s ease-out;
}
.tr-side-panel {
  background: white;
  width: 640px; max-width: 100vw;
  height: 100%;
  display: flex; flex-direction: column;
  box-shadow: -12px 0 32px rgba(15, 30, 64, 0.18);
  animation: slideInRight 0.22s cubic-bezier(.2,.8,.2,1);
}
@keyframes slideInRight {
  from { transform: translateX(40px); opacity: 0.4; }
  to { transform: none; opacity: 1; }
}
.tr-side-head {
  display: flex; justify-content: space-between; gap: 14px;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border);
}
.tr-side-title {
  font-size: 16px; font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.tr-side-body {
  flex: 1; overflow: auto;
  padding: 18px 22px;
  display: flex; flex-direction: column; gap: 22px;
}
.tr-side-section { display: flex; flex-direction: column; }
.tr-side-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 12px 14px;
  background: var(--surface);
  border-radius: 10px;
}
.tr-side-val { font-size: 13px; font-weight: 600; color: var(--text); margin-top: 3px; }

.tr-syllabus {
  list-style: none;
  margin: 8px 0 0; padding: 0;
  display: flex; flex-direction: column; gap: 6px;
}
.tr-syllabus li {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  background: var(--surface);
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--text);
}
.tr-syllabus-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: white;
  color: var(--navy-800);
  border: 1px solid var(--navy-100);
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700;
  flex-shrink: 0;
}

.tr-mini-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 12px;
}
.tr-mini-table thead th {
  text-align: left;
  font-size: 10.5px; font-weight: 600;
  color: var(--text-subtle);
  letter-spacing: 0.04em; text-transform: uppercase;
  padding: 7px 10px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.tr-mini-table tbody td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
}
.tr-mini-table tbody tr:last-child td { border-bottom: none; }

.tr-upcoming {
  margin-top: 8px;
  display: flex; flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.tr-upcoming-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.tr-upcoming-row:last-child { border-bottom: none; }

.tr-side-foot {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

/* ─────────────────────────────────────────────────────────────
   Certificate modal
   ───────────────────────────────────────────────────────────── */

.cert-modal { max-width: 980px; }
.cert-stage {
  background: linear-gradient(180deg, #EFF1F8 0%, #E1E5F0 100%);
  padding: 30px 32px;
  display: grid;
  place-items: center;
  flex: 1;
  overflow: auto;
}
.cert-sheet {
  position: relative;
  width: 100%;
  max-width: 820px;
  aspect-ratio: 1.414;
  background: #FBF9F4;
  border: 1px solid #E0DCC9;
  box-shadow: 0 18px 48px rgba(15, 30, 64, 0.18), 0 4px 10px rgba(15, 30, 64, 0.08);
  padding: 36px 44px 28px;
  display: flex; flex-direction: column;
  font-family: var(--font-body);
  overflow: hidden;
}
.cert-sheet::before {
  content: '';
  position: absolute; inset: 14px;
  border: 1px solid var(--navy-100);
  pointer-events: none;
}
.cert-sheet::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--navy-800) 0%, var(--navy-800) 70%, var(--aguila-600) 70%, var(--aguila-600) 100%);
}

.cert-watermark {
  position: absolute;
  inset: 0;
  display: grid; place-items: center;
  font-family: var(--font-body);
  font-size: 380px;
  font-weight: 900;
  color: var(--navy-800);
  opacity: 0.035;
  letter-spacing: -0.04em;
  pointer-events: none;
  user-select: none;
}

.cert-head {
  display: flex; align-items: center; gap: 18px;
  padding-bottom: 14px;
  margin-bottom: 6px;
  border-bottom: 1px dashed var(--navy-100);
  position: relative;
  z-index: 2;
}
.cert-logo {
  display: flex; align-items: center; gap: 10px;
  flex: 1;
}
.cert-logo-client { justify-content: flex-end; text-align: right; }
.cert-logo-mark {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--navy-800);
  color: white;
  display: grid; place-items: center;
  font-weight: 800; font-size: 20px;
  flex-shrink: 0;
}
.cert-logo-mark.client { background: var(--aguila-600); }
.cert-logo-sub {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 1px;
}
.cert-divider {
  width: 1px;
  height: 28px;
  background: var(--border);
}

.cert-body {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 18px 20px 0;
  position: relative;
  z-index: 2;
}
.cert-eyebrow {
  font-size: 10.5px; font-weight: 700;
  color: var(--navy-800);
  letter-spacing: 0.32em; text-transform: uppercase;
  margin-bottom: 16px;
}
.cert-pre {
  font-size: 12.5px;
  color: var(--text-muted);
  font-style: italic;
}
.cert-name {
  font-family: 'JetBrains Mono', serif;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--navy-900);
  margin: 6px 0 4px;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.cert-doc {
  font-size: 11.5px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 18px;
}
.cert-course {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 19px;
  font-weight: 600;
  color: var(--text);
  font-style: italic;
  margin: 4px 24px 18px;
  line-height: 1.35;
  letter-spacing: -0.005em;
}
.cert-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  width: 100%;
  max-width: 540px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--navy-100);
  border-radius: 8px;
  margin-bottom: 18px;
}
.cert-meta-lbl {
  font-size: 9.5px; font-weight: 700;
  color: var(--text-subtle);
  letter-spacing: 0.08em; text-transform: uppercase;
}
.cert-meta-val { font-size: 12.5px; font-weight: 700; color: var(--text); margin-top: 3px; }

.cert-foot {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 18px;
  width: 100%;
  margin-top: auto;
  align-items: end;
}
.cert-sign { text-align: center; }
.cert-sign-line {
  border-bottom: 1px solid var(--navy-800);
  height: 38px;
  display: grid;
  place-items: end center;
  position: relative;
}
.cert-sign-mark {
  font-family: 'Brush Script MT', cursive;
  font-style: italic;
  font-size: 22px;
  color: var(--navy-800);
  transform: rotate(-3deg) translateY(2px);
}
.cert-sign-name { font-size: 11.5px; font-weight: 700; color: var(--text); margin-top: 4px; }
.cert-sign-role { font-size: 10px; color: var(--text-muted); line-height: 1.3; margin-top: 1px; }

.cert-meta-side { text-align: center; }
.cert-date { font-size: 11.5px; color: var(--text); margin-bottom: 6px; }
.cert-code { font-size: 10.5px; font-weight: 700; color: var(--navy-800); }
.cert-hash { font-size: 9.5px; color: var(--text-subtle); margin-top: 3px; word-break: break-all; }

.cert-qr-wrap {
  display: flex; flex-direction: column;
  align-items: center;
  gap: 4px;
}
.cert-qr {
  display: grid;
  background: white;
  padding: 4px;
  border: 1px solid var(--text);
}
.cert-qr span {
  background: white;
}
.cert-qr span.on {
  background: #0A1020;
}
.cert-qr-cap {
  font-size: 9px;
  color: var(--text-subtle);
}

@media (max-width: 880px) {
  .cert-foot { grid-template-columns: 1fr; gap: 14px; }
  .cert-meta { grid-template-columns: repeat(2, 1fr); }
  .cert-name { font-size: 24px; }
}

/* ─────────────────────────────────────────────────────────────
   SST module
   ───────────────────────────────────────────────────────────── */

.tr-kpi-icon.rose { background: var(--rose-100); color: var(--rose-600); }
.tr-kpi-foot.down { color: var(--rose-600); font-weight: 600; }

/* Quick filter row (chips + actions) */
.sst-quickfilter {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.sst-quickfilter select {
  font: inherit;
  font-size: 13px;
  padding: 7px 12px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
}

.sst-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 999px;
  font: inherit; font-size: 13px; font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.12s, color 0.12s, background 0.12s;
}
.sst-chip:hover { border-color: var(--border-strong); color: var(--text); }
.sst-chip.active { background: var(--text); color: white; border-color: var(--text); }
.sst-chip.green.active { background: var(--green-600); border-color: var(--green-600); }
.sst-chip.amber.active { background: var(--amber-600); border-color: var(--amber-600); }
.sst-chip.rose.active  { background: var(--rose-600);  border-color: var(--rose-600); }
.sst-chip-count {
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 11px; font-weight: 700;
  padding: 1px 7px; border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
}
.sst-chip.active .sst-chip-count {
  background: rgba(255, 255, 255, 0.22);
  color: white;
}

.sst-due-vencido   { color: var(--rose-600); font-weight: 700; }
.sst-due-porvencer { color: var(--amber-600); font-weight: 600; }

.sst-restr {
  display: flex; align-items: flex-start; gap: 6px;
  font-size: 11.5px;
  color: var(--amber-600);
  background: var(--amber-100);
  padding: 4px 8px;
  border-radius: 6px;
  max-width: 240px;
  line-height: 1.35;
}
.sst-restr svg { flex-shrink: 0; margin-top: 2px; }

/* Incidents list */
.sst-incident-list {
  display: flex; flex-direction: column;
}
.sst-incident {
  display: flex; gap: 14px;
  padding-bottom: 4px;
  position: relative;
}
.sst-incident-rail {
  display: flex; flex-direction: column; align-items: center;
  flex-shrink: 0;
  padding-top: 16px;
}
.sst-inc-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid; place-items: center;
  flex-shrink: 0;
  z-index: 1;
}
.sst-inc-dot.rose  { background: var(--rose-100);   color: var(--rose-600); }
.sst-inc-dot.amber { background: var(--amber-100);  color: var(--amber-600); }
.sst-inc-dot.navy  { background: var(--navy-50);    color: var(--navy-800); }
.sst-inc-line {
  flex: 1;
  width: 1px;
  background: var(--border);
  margin-top: 4px;
  min-height: 24px;
}
.sst-incident:last-child .sst-inc-line { display: none; }

.sst-incident-body {
  flex: 1;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  margin-bottom: 12px;
}
.sst-incident-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 14px;
  margin-bottom: 10px;
}
.sst-incident-id {
  font-size: 11px; font-weight: 700;
  color: var(--text-subtle);
  letter-spacing: 0.04em;
}
.sst-incident-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  margin-top: 2px;
}
.sst-incident-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 10px 12px;
  background: var(--surface);
  border-radius: 8px;
  margin-bottom: 10px;
}
.sst-incident-val {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  margin-top: 3px;
  display: flex; align-items: center; gap: 4px;
}
.sst-incident-desc {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
  margin-bottom: 10px;
}
.sst-incident-foot {
  display: flex; align-items: center; gap: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  line-height: 1.45;
}

/* Risk matrix */
.sst-factor {
  display: flex; flex-direction: column; gap: 4px;
  align-items: flex-start;
}
.sst-controls {
  display: flex; flex-direction: column; gap: 4px;
  max-width: 320px;
}
.sst-control {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px;
  color: var(--text);
  line-height: 1.4;
}
.sst-control svg { color: var(--green-600); flex-shrink: 0; }

/* COPASST */
.sst-copasst-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 1100px) {
  .sst-copasst-grid { grid-template-columns: 1fr; }
}

.sst-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.sst-card-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.sst-card-title { font-size: 14.5px; font-weight: 700; color: var(--text); }

.sst-members { display: flex; flex-direction: column; }
.sst-member {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.sst-member:last-child { border-bottom: none; }
.sst-member .doc-avatar { background: var(--navy-50); color: var(--navy-800); }

.sst-meetings { display: flex; flex-direction: column; }
.sst-meeting {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.sst-meeting:last-child { border-bottom: none; }
.sst-meeting.past { opacity: 0.7; }
.sst-meeting.past .sst-meeting-body > div:first-child { text-decoration: line-through; text-decoration-color: var(--text-subtle); }
.sst-meeting-date {
  display: flex; align-items: center; gap: 6px;
  flex-shrink: 0;
  width: 160px;
  color: var(--navy-800);
}
.sst-meeting-body { flex: 1; min-width: 0; }

/* ─────────────────────────────────────────────────────────────
   FURAT modal
   ───────────────────────────────────────────────────────────── */

.furat-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 22px;
}
@media (max-width: 880px) {
  .furat-grid { grid-template-columns: 1fr; }
}
.furat-col { display: flex; flex-direction: column; gap: 14px; }
.furat-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.furat-row { display: flex; flex-direction: column; gap: 6px; }
.furat-label {
  font-size: 11px; font-weight: 700;
  color: var(--text-subtle);
  letter-spacing: 0.04em; text-transform: uppercase;
}
.furat-row input,
.furat-row textarea,
.furat-row select {
  font: inherit; font-size: 13px;
  padding: 9px 12px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  resize: vertical;
  outline: none;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.furat-row input:focus,
.furat-row textarea:focus,
.furat-row select:focus {
  border-color: var(--navy-800);
  box-shadow: 0 0 0 3px var(--navy-50);
}
.furat-row input:disabled { background: var(--surface); color: var(--text-subtle); cursor: not-allowed; }

.furat-segment {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  overflow: hidden;
  align-self: flex-start;
}
.furat-segment.compact { font-size: 12.5px; }
.furat-seg {
  background: white;
  border: none;
  padding: 9px 14px;
  font: inherit; font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  border-right: 1px solid var(--border);
  font-weight: 500;
}
.furat-seg:last-child { border-right: none; }
.furat-seg:hover { background: var(--surface); color: var(--text); }
.furat-seg.active { color: white; font-weight: 600; }
.furat-seg.active.rose  { background: var(--rose-600); }
.furat-seg.active.amber { background: var(--amber-600); }
.furat-seg.active.navy  { background: var(--navy-800); }
.furat-seg.active.green { background: var(--green-600); }
.furat-seg.active:not(.rose):not(.amber):not(.navy):not(.green) { background: var(--text); }

/* Body diagram */
.furat-body-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  display: flex; flex-direction: column;
  align-items: stretch;
}
.sst-body-svg {
  width: 100%;
  max-width: 280px;
  margin: 8px auto 12px;
  display: block;
  height: auto;
  aspect-ratio: 100 / 110;
}
.sst-body-base {
  fill: white;
  stroke: var(--border-strong);
  stroke-width: 0.5;
}
.sst-body-zone {
  fill: var(--navy-800);
  fill-opacity: 0;
  stroke: var(--navy-800);
  stroke-width: 0.6;
  stroke-opacity: 0.18;
  cursor: pointer;
  transition: fill-opacity 0.14s, stroke-opacity 0.14s, stroke-width 0.14s;
}
.sst-body-zone:hover {
  fill-opacity: 0.12;
  stroke-opacity: 0.55;
}
.sst-body-zone.on {
  fill: var(--rose-600);
  fill-opacity: 0.55;
  stroke: var(--rose-600);
  stroke-opacity: 1;
  stroke-width: 1;
}

.furat-body-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  min-height: 36px;
  align-items: flex-start;
}
.furat-body-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 4px 3px 10px;
  background: var(--rose-100);
  color: var(--rose-600);
  border-radius: 999px;
  font-size: 11.5px; font-weight: 600;
}
.furat-body-tag button {
  background: none; border: none;
  color: var(--rose-600);
  cursor: pointer;
  font-size: 16px; line-height: 1;
  padding: 0 5px;
  border-radius: 50%;
}
.furat-body-tag button:hover { background: var(--rose-600); color: white; }

/* ─────────────────────────────────────────────────────────────
   EPP & Dotación module
   ───────────────────────────────────────────────────────────── */

.epp-tab-pill {
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 10.5px; font-weight: 700;
  padding: 1px 7px; border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  margin-left: 4px;
}
.epp-tab-pill.rose {
  background: var(--rose-100);
  color: var(--rose-600);
}
.doc-tab.active .epp-tab-pill {
  background: var(--navy-50);
  color: var(--navy-800);
}

/* Pending deliveries table */
.epp-deliv-table tbody td { padding: 14px; vertical-align: top; }
.epp-item-chips {
  display: flex; flex-wrap: wrap; gap: 4px;
  max-width: 360px;
}
.epp-item-chip {
  display: inline-flex; align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.epp-item-chip.dotacion {
  background: var(--green-100);
  color: var(--green-600);
}
.epp-item-chip.epp {
  background: var(--navy-50);
  color: var(--navy-800);
}

.epp-block-note {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 6px;
  padding: 3px 8px;
  background: var(--amber-100);
  color: var(--amber-600);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
}

.epp-days {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px; font-weight: 700;
  color: var(--text);
}
.epp-days.urgent { color: var(--rose-600); }

/* Stock bar in inventory */
.epp-stock-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px; font-weight: 700;
  color: var(--text);
}
.epp-stock-num.green { color: var(--green-600); }
.epp-stock-num.amber { color: var(--amber-600); }
.epp-stock-num.rose  { color: var(--rose-600); }

.epp-stock-bar {
  margin-top: 4px;
  width: 64px;
  height: 4px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
  margin-left: auto;
}
.epp-stock-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.2s ease;
}
.epp-stock-fill.green { background: var(--green-600); }
.epp-stock-fill.amber { background: var(--amber-600); }
.epp-stock-fill.rose  { background: var(--rose-600); }

/* Low stock banner */
.epp-banner {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  background: linear-gradient(180deg, var(--amber-100), white 90%);
  border: 1px solid var(--amber-600);
  border-radius: var(--r-lg);
  margin-bottom: 14px;
}
.epp-banner-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: white;
  color: var(--amber-600);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.epp-banner-title {
  font-size: 14px; font-weight: 700;
  color: var(--text);
}
.epp-banner-sub {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.45;
}
.epp-banner-list {
  display: flex; flex-wrap: wrap; gap: 4px;
  max-width: 320px;
  justify-content: flex-end;
}
@media (max-width: 980px) {
  .epp-banner-list { display: none; }
}

/* Matrix grid (tab 3) */
.epp-matrix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
}
.epp-matrix-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.epp-matrix-card:hover {
  border-color: var(--navy-100);
  box-shadow: var(--shadow-2);
  transform: translateY(-1px);
}
.epp-matrix-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px;
}
.epp-matrix-name {
  font-size: 14.5px; font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.epp-matrix-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--navy-50);
  color: var(--navy-800);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.epp-matrix-preview {
  display: flex; flex-direction: column; gap: 4px;
  padding: 10px 12px;
  background: var(--surface);
  border-radius: 8px;
}
.epp-matrix-prev-row {
  display: flex; align-items: center; gap: 8px;
  padding: 3px 0;
}
.epp-matrix-cat-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.epp-matrix-cat-dot.epp      { background: var(--navy-800); }
.epp-matrix-cat-dot.dotacion { background: var(--green-600); }

/* ─── Delivery modal ─── */

.epp-deliv-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 12px 14px;
  background: var(--surface);
  border-radius: 10px;
  margin-bottom: 16px;
}
.epp-deliv-summary-val {
  font-size: 18px; font-weight: 800;
  color: var(--text);
  margin-top: 3px;
  letter-spacing: -0.01em;
  font-feature-settings: 'tnum';
}
.epp-deliv-summary-val.green { color: var(--green-600); }

.epp-deliv-toolbar {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px;
}

.epp-deliv-rows {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 16px;
}
.epp-deliv-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1.6fr) 90px 110px 130px;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: background 0.12s, border-color 0.12s;
}
.epp-deliv-row.on {
  background: var(--green-100);
  border-color: var(--green-600);
}
.epp-deliv-row.blocked {
  background: var(--rose-100);
  border-color: var(--rose-600);
  opacity: 0.85;
}
.epp-deliv-check {
  display: grid; place-items: center;
}
.epp-deliv-check input[type=checkbox] {
  width: 18px; height: 18px;
  accent-color: var(--green-600);
  cursor: pointer;
}
.epp-deliv-row.on .epp-deliv-check input { accent-color: var(--green-600); }

.epp-deliv-name { min-width: 0; }
.epp-deliv-qty input,
.epp-deliv-size select {
  font: inherit; font-size: 13px;
  width: 100%;
  padding: 6px 9px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  margin-top: 3px;
  outline: none;
}
.epp-deliv-qty input:focus,
.epp-deliv-size select:focus {
  border-color: var(--navy-800);
}

.epp-deliv-stock { min-width: 0; }
.epp-deliv-stock-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px; font-weight: 700;
  margin-top: 3px;
  display: flex; align-items: center; gap: 6px;
}
.epp-deliv-stock-val.green { color: var(--green-600); }
.epp-deliv-stock-val.amber { color: var(--amber-600); }
.epp-deliv-stock-val.rose  { color: var(--rose-600); }
.epp-deliv-stock-warn {
  font-family: var(--font-body);
  font-size: 10.5px; font-weight: 700;
  background: var(--rose-100);
  color: var(--rose-600);
  padding: 2px 7px;
  border-radius: 999px;
  display: inline-flex; align-items: center; gap: 3px;
}
.epp-deliv-stock-warn.amber {
  background: var(--amber-100);
  color: var(--amber-600);
}

.epp-deliv-noact {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px;
  background: var(--amber-100);
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
  margin-top: 6px;
}
.epp-deliv-noact input { margin: 3px 0 0; accent-color: var(--amber-600); }

.epp-deliv-reason {
  margin-top: 8px;
  width: 100%;
  font: inherit;
  font-size: 13px;
  padding: 9px 12px;
  background: white;
  border: 1px solid var(--amber-600);
  border-radius: 8px;
  color: var(--text);
  resize: vertical;
  outline: none;
}
.epp-deliv-reason:focus { box-shadow: 0 0 0 3px var(--amber-100); }

/* ─── Matrix editor modal ─── */

.epp-edit-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 12px 14px;
  background: var(--surface);
  border-radius: 10px;
  margin-bottom: 16px;
}
.epp-edit-meta-val {
  font-size: 18px; font-weight: 800;
  color: var(--text);
  margin-top: 3px;
  letter-spacing: -0.01em;
}
.epp-edit-meta-val.rose { color: var(--rose-600); }

.epp-edit-table tbody td { padding: 12px 14px; vertical-align: middle; }

/* Toggle (used for "obligatorio") */
.epp-toggle {
  display: inline-block;
  position: relative;
  width: 36px; height: 20px;
  cursor: pointer;
}
.epp-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.epp-toggle-track {
  display: block;
  width: 36px; height: 20px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  transition: background 0.15s, border-color 0.15s;
  position: relative;
}
.epp-toggle-track::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 2px rgba(0,0,0,0.18);
  transition: transform 0.16s ease;
}
.epp-toggle input:checked + .epp-toggle-track {
  background: var(--rose-600);
  border-color: var(--rose-600);
}
.epp-toggle input:checked + .epp-toggle-track::after {
  transform: translateX(16px);
}

/* Segmented control for "Momento" */
.epp-seg {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  overflow: hidden;
}
.epp-seg-btn {
  background: transparent;
  border: none;
  padding: 6px 11px;
  font: inherit; font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  font-weight: 500;
  border-right: 1px solid var(--border);
  white-space: nowrap;
}
.epp-seg-btn:last-child { border-right: none; }
.epp-seg-btn:hover { background: white; color: var(--text); }
.epp-seg-btn.active {
  background: var(--navy-800);
  color: white;
  font-weight: 600;
}

.epp-edit-select {
  font: inherit; font-size: 13px;
  padding: 7px 10px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text);
  cursor: pointer;
  outline: none;
}
.epp-edit-select:focus { border-color: var(--navy-800); }

.epp-edit-warn {
  display: flex; align-items: flex-start; gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--amber-100);
  border-radius: 10px;
  font-size: 12.5px;
  color: var(--text);
  line-height: 1.5;
}
.epp-edit-warn svg { color: var(--amber-600); flex-shrink: 0; margin-top: 2px; }

/* Item picker (autocomplete from catalog) */
.epp-picker {
  width: 480px;
  max-width: 100%;
  background: white;
  border: 1px solid var(--navy-100);
  border-radius: 10px;
  box-shadow: var(--shadow-2);
  overflow: hidden;
}
.epp-picker-search {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.epp-picker-search input {
  flex: 1;
  font: inherit; font-size: 13px;
  background: transparent;
  border: none;
  outline: none;
}
.epp-picker-list {
  max-height: 280px;
  overflow: auto;
  display: flex; flex-direction: column;
}
.epp-picker-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: white;
  border: none;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  text-align: left;
  width: 100%;
}
.epp-picker-row:last-child { border-bottom: none; }
.epp-picker-row:hover { background: var(--navy-50); }
.epp-picker-row svg { color: var(--text-subtle); }
.epp-picker-row:hover svg { color: var(--navy-800); }

/* ─────────────────────────────────────────────────────────────
   ATS — Reclutamiento module
   ───────────────────────────────────────────────────────────── */

/* KPIs (compact 4-up) */
.ats-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}
@media (max-width: 1100px) { .ats-kpis { grid-template-columns: repeat(2, 1fr); } }
.ats-kpi {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 12px 14px;
  display: flex; align-items: center; gap: 12px;
}
.ats-kpi-icon {
  width: 32px; height: 32px;
  border-radius: 9px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.ats-kpi-icon.navy  { background: var(--navy-50);   color: var(--navy-800); }
.ats-kpi-icon.blue  { background: var(--blue-100);  color: var(--blue-600); }
.ats-kpi-icon.amber { background: var(--amber-100); color: var(--amber-600); }
.ats-kpi-icon.green { background: var(--green-100); color: var(--green-600); }
.ats-kpi-num {
  font-size: 22px; font-weight: 800;
  letter-spacing: -0.02em; line-height: 1;
  color: var(--text);
  font-feature-settings: 'tnum';
}
.ats-kpi-lbl {
  font-size: 11.5px; color: var(--text-muted);
  margin-top: 4px; font-weight: 500;
}

/* Vacancy selector bar */
.ats-vac-bar {
  display: grid;
  grid-template-columns: 1fr 1.6fr auto;
  gap: 18px;
  align-items: end;
  padding: 14px 16px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  margin-bottom: 14px;
}
.ats-vac-select select {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  width: 100%;
  padding: 9px 14px;
  background: white;
  border: 1px solid var(--navy-100);
  border-radius: 8px;
  color: var(--navy-800);
  cursor: pointer;
}
.ats-vac-select select:focus { outline: none; border-color: var(--navy-800); }
.ats-vac-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.ats-vac-val {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  margin-top: 2px;
}
@media (max-width: 1100px) {
  .ats-vac-bar { grid-template-columns: 1fr; }
  .ats-vac-meta { grid-template-columns: repeat(2, 1fr); }
}

/* ─── Kanban board ─── */

.ats-board {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 4px 18px;
  scroll-snap-type: x proximity;
}
.ats-col {
  flex: 0 0 280px;
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  scroll-snap-align: start;
  min-height: 420px;
}
.ats-col-final { background: linear-gradient(180deg, var(--green-100) 0%, white 12%, var(--rose-100) 100%); }

.ats-col-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: white;
  border-top-left-radius: var(--r-lg);
  border-top-right-radius: var(--r-lg);
}
.ats-col-title {
  font-size: 12.5px; font-weight: 700;
  color: var(--text);
  letter-spacing: -0.005em;
}
.ats-col-hint {
  font-size: 11px;
  color: var(--text-subtle);
  margin-top: 1px;
}
.ats-col-count {
  background: var(--navy-50);
  color: var(--navy-800);
  font-size: 11px; font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  flex-shrink: 0;
}
.ats-col-body {
  flex: 1;
  padding: 8px;
  display: flex; flex-direction: column; gap: 8px;
  overflow-y: auto;
}
.ats-col-empty {
  color: var(--text-subtle);
  font-size: 11.5px;
  text-align: center;
  padding: 30px 10px;
  font-style: italic;
}

/* Candidate card */
.ats-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 11px;
  cursor: pointer;
  display: flex; flex-direction: column; gap: 9px;
  transition: border-color 0.12s, box-shadow 0.12s, transform 0.12s;
}
.ats-card:hover {
  border-color: var(--navy-100);
  box-shadow: 0 4px 12px rgba(15, 30, 64, 0.08);
  transform: translateY(-1px);
}
.ats-card.final-contratado {
  border-color: var(--green-600);
  background: linear-gradient(180deg, var(--green-100), white 60%);
}
.ats-card.final-descartado {
  border-color: var(--rose-600);
  background: linear-gradient(180deg, var(--rose-100), white 60%);
  opacity: 0.85;
}
.ats-card.final-descartado .ats-card-name {
  text-decoration: line-through;
  text-decoration-color: var(--rose-600);
}

.ats-card-head { display: flex; align-items: center; gap: 9px; }
.ats-card-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--navy-50);
  color: var(--navy-800);
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700;
  flex-shrink: 0;
}
.ats-card-avatar.sm { width: 24px; height: 24px; font-size: 10px; }
.ats-card-avatar.lg { width: 56px; height: 56px; font-size: 18px; border-radius: 14px; }

.ats-card-name {
  font-size: 13px; font-weight: 600;
  color: var(--text);
  line-height: 1.25;
  letter-spacing: -0.005em;
}
.ats-card-role {
  font-size: 11px;
  margin-top: 2px;
}

.ats-final-tag {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: grid; place-items: center;
  flex-shrink: 0;
  font-size: 14px; font-weight: 800;
  line-height: 1;
}
.ats-final-tag.green { background: var(--green-600); color: white; }
.ats-final-tag.rose  { background: var(--rose-600);  color: white; }

.ats-card-meta {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
}

/* Source pill */
.ats-source-pill {
  display: inline-flex; align-items: center;
  font-size: 10.5px; font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.02em;
}
.ats-source-pill.blue  { background: var(--blue-100);  color: var(--blue-600); }
.ats-source-pill.green { background: var(--green-100); color: var(--green-600); }
.ats-source-pill.navy  { background: var(--navy-50);   color: var(--navy-800); }
.ats-source-pill.amber { background: var(--amber-100); color: var(--amber-600); }

/* Stars */
.ats-rating { display: inline-flex; gap: 1px; }
.ats-rating svg {
  fill: var(--surface-2);
  stroke: var(--surface-2);
  stroke-width: 0.5;
}
.ats-rating svg.on {
  fill: #F4B61A;
  stroke: #C68F0E;
}

.ats-card-foot {
  display: flex; align-items: center; gap: 6px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}
.ats-card-action {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ats-card-days {
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  background: var(--surface-2);
  padding: 2px 7px;
  border-radius: 5px;
}

/* ─── Vacancy detail view ─── */

.ats-vac-detail {
  display: flex; flex-direction: column; gap: 14px;
}
.ats-vac-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 20px;
}
.ats-vac-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 18px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.ats-vac-id {
  font-size: 11px; font-weight: 700;
  color: var(--text-subtle);
  letter-spacing: 0.05em;
}
.ats-vac-title {
  font-size: 22px; font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text);
  margin: 4px 0 0;
}
.ats-vac-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 14px 16px;
  background: var(--surface);
  border-radius: 10px;
  margin-bottom: 16px;
}
@media (max-width: 880px) {
  .ats-vac-grid { grid-template-columns: repeat(2, 1fr); }
}
.ats-vac-section { padding-top: 14px; border-top: 1px dashed var(--border); margin-top: 14px; }
.ats-vac-section:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.ats-vac-section-title {
  font-size: 13px; font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}
.ats-vac-req {
  list-style: none;
  margin: 6px 0 0; padding: 0;
  display: flex; flex-direction: column; gap: 6px;
}
.ats-vac-req li {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 12px;
  background: var(--surface);
  border-radius: 8px;
  font-size: 12.5px;
}
.ats-vac-req svg { color: var(--green-600); flex-shrink: 0; }

/* Mini pipeline strip in vacancy detail */
.ats-mini-pipe {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}
@media (max-width: 1100px) {
  .ats-mini-pipe {
    grid-template-columns: repeat(7, minmax(180px, 1fr));
    overflow-x: auto;
  }
}
.ats-mini-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex; flex-direction: column;
  min-height: 140px;
}
.ats-mini-col-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  background: white;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}
.ats-mini-title {
  font-size: 11.5px; font-weight: 700; color: var(--text);
}
.ats-mini-hint { font-size: 10px; }
.ats-mini-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 700;
  background: var(--navy-50); color: var(--navy-800);
  padding: 2px 8px; border-radius: 999px;
}
.ats-mini-body {
  padding: 6px;
  display: flex; flex-direction: column; gap: 4px;
  flex: 1;
}
.ats-mini-empty { font-size: 11px; color: var(--text-subtle); text-align: center; padding: 14px 0; }
.ats-mini-card {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.12s;
  width: 100%;
}
.ats-mini-card:hover { border-color: var(--navy-100); background: var(--navy-50); }
.ats-mini-card.final-contratado { border-color: var(--green-600); }
.ats-mini-card.final-descartado { border-color: var(--rose-600); opacity: 0.8; }
.ats-mini-name {
  display: block;
  font-size: 11.5px; font-weight: 600;
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ats-mini-meta {
  display: block;
  font-size: 10px;
  margin-top: 1px;
}

/* Activity timeline */
.ats-activity {
  display: flex; flex-direction: column;
  gap: 10px;
}
.ats-activity-row {
  display: flex; align-items: flex-start; gap: 10px;
}
.ats-activity-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--navy-800);
  margin-top: 6px;
  flex-shrink: 0;
}

/* ─── Candidate side panel ─── */

.ats-cand-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 8px;
  padding: 12px 14px;
  background: var(--surface);
  border-radius: 10px;
}
.ats-cand-val { font-size: 13px; font-weight: 600; color: var(--text); margin-top: 3px; }

.ats-cv-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 14px;
  margin-top: 8px;
}
.ats-cv-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.ats-cv-meta {
  background: var(--surface);
  border-radius: 10px;
  padding: 12px;
  display: flex; flex-direction: column;
}

.ats-note {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-top: 8px;
}
.ats-note-head {
  display: flex; align-items: center; gap: 10px;
}
.ats-note-head .doc-avatar { background: var(--navy-50); color: var(--navy-800); }

.ats-danger {
  color: var(--rose-600);
  border-color: var(--rose-100);
}
.ats-danger:hover { background: var(--rose-100); }

/* ─── Offer modal ─── */

.ats-offer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}
@media (max-width: 880px) {
  .ats-offer-grid { grid-template-columns: 1fr; }
}
.ats-offer-col {
  display: flex; flex-direction: column; gap: 10px;
}
.ats-offer-summary {
  display: flex; flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.ats-offer-summary-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 10px;
  align-items: center;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
}
.ats-offer-summary-row:last-child { border-bottom: none; }

.ats-offer-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}
.ats-offer-fields label { display: block; margin-bottom: 4px; }
.ats-offer-fields input,
.ats-offer-fields select {
  font: inherit; font-size: 13px;
  width: 100%;
  padding: 8px 11px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  outline: none;
}
.ats-offer-fields input:focus,
.ats-offer-fields select:focus { border-color: var(--navy-800); }
.ats-offer-fields input:disabled { background: var(--surface); color: var(--text-subtle); }

.ats-offer-template {
  margin-top: 10px;
}
.ats-offer-template-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-top: 6px;
}
.ats-offer-template-row svg { color: var(--navy-800); flex-shrink: 0; }

/* Letter preview */
.ats-offer-letter {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 22px 26px;
  font-size: 12px;
  color: var(--text);
  box-shadow: 0 4px 14px rgba(15, 30, 64, 0.06);
  max-height: 460px;
  overflow: auto;
}
.ats-offer-letter-head {
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--navy-800);
}

/* Sent / accepted states */
.ats-offer-state {
  padding: 36px 28px 24px;
  display: flex; flex-direction: column;
  align-items: center;
  text-align: center;
}
.ats-offer-spinner {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 3px solid var(--surface-2);
  border-top-color: var(--navy-800);
  animation: sigSpin 0.8s linear infinite;
}
.ats-offer-evidence {
  display: flex; flex-direction: column;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 14px;
}
.ats-offer-ev-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 10px;
  align-items: center;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
}
.ats-offer-ev-row:last-child { border-bottom: none; }

/* ─────────────────────────────────────────────────────────────
   Performance module
   ───────────────────────────────────────────────────────────── */

/* ─── Cycles section ─── */

.pf-cycles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 14px;
}
.pf-cycle-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  display: flex; flex-direction: column; gap: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.pf-cycle-card:hover { border-color: var(--navy-100); box-shadow: var(--shadow-2); }

.pf-cycle-head {
  display: flex; gap: 14px; align-items: flex-start;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--border);
}
.pf-cycle-name {
  font-size: 16px; font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 4px 0 0;
  line-height: 1.3;
}

.pf-model-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px; font-weight: 800;
  padding: 3px 10px;
  border-radius: 6px;
  letter-spacing: 0.02em;
}
.pf-model-badge.navy  { background: var(--navy-50);   color: var(--navy-800); }
.pf-model-badge.blue  { background: var(--blue-100);  color: var(--blue-600); }
.pf-model-badge.amber { background: var(--amber-100); color: var(--amber-600); }

.pf-cycle-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 12px 14px;
  background: var(--surface);
  border-radius: 10px;
}
.pf-cycle-stat {
  font-size: 18px; font-weight: 800;
  color: var(--text);
  margin-top: 3px;
  letter-spacing: -0.01em;
  font-feature-settings: 'tnum';
}
.pf-cycle-stat-soft {
  font-size: 11.5px;
  color: var(--text);
  margin-top: 3px;
  font-weight: 600;
}
.pf-cycle-prog { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.pf-cycle-pct {
  font-size: 12.5px; font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text);
}
.pf-cycle-foot { display: flex; gap: 8px; }

/* ─── Evaluation form ─── */

.pf-eval-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 14px;
  align-items: start;
}
@media (max-width: 1280px) {
  .pf-eval-grid { grid-template-columns: 1fr; }
}
.pf-eval-form {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  display: flex; flex-direction: column; gap: 18px;
}

.pf-subject {
  display: flex; align-items: center; gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.pf-subject-name {
  font-size: 18px; font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text);
}
.pf-subject-period {
  text-align: right;
  flex-shrink: 0;
}
.pf-subject-period-val {
  font-weight: 700;
  font-size: 13px;
  color: var(--navy-800);
  margin-top: 2px;
}

.pf-running-score {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 14px 16px;
  background: var(--navy-50);
  border-radius: 10px;
  border: 1px solid var(--navy-100);
}
.pf-running-val {
  font-size: 22px; font-weight: 800;
  color: var(--text);
  margin-top: 3px;
  letter-spacing: -0.02em;
  font-feature-settings: 'tnum';
}
.pf-running-val small {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}
.pf-running-val.highlight {
  color: var(--navy-800);
  font-size: 26px;
}

.pf-eval-tabs {
  display: flex; gap: 6px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
  margin-bottom: 4px;
}
.pf-eval-tab {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none;
  padding: 9px 14px;
  font: inherit; font-size: 13px; font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s;
}
.pf-eval-tab:hover { color: var(--text); }
.pf-eval-tab.active {
  color: var(--navy-800);
  border-bottom-color: var(--navy-800);
  font-weight: 600;
}
.pf-eval-tab-pill {
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 10.5px; font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
}
.pf-eval-tab.active .pf-eval-tab-pill { background: var(--navy-50); color: var(--navy-800); }

.pf-section { display: flex; flex-direction: column; gap: 14px; }

/* Scale legend (1-5) */
.pf-scale-legend {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  padding: 10px;
  background: var(--surface);
  border-radius: 10px;
}
.pf-scale-pill {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  background: white;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.pf-scale-num {
  width: 26px; height: 26px;
  border-radius: 7px;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 800;
  flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace;
  color: white;
}
.pf-scale-1 .pf-scale-num { background: #EF435C; }
.pf-scale-2 .pf-scale-num { background: #E26B26; }
.pf-scale-3 .pf-scale-num { background: #B57609; }
.pf-scale-4 .pf-scale-num { background: #2D7BF8; }
.pf-scale-5 .pf-scale-num { background: var(--green-600); }
.pf-scale-label { font-size: 12px; font-weight: 700; color: var(--text); display: block; }

/* Competency rows */
.pf-comp-list {
  display: flex; flex-direction: column; gap: 10px;
}
.pf-comp-row {
  display: flex; gap: 14px;
  padding: 14px 16px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.pf-comp-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--navy-50);
  color: var(--navy-800);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 800;
  flex-shrink: 0;
}
.pf-comp-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.pf-comp-head {
  display: flex; justify-content: space-between; gap: 18px;
  align-items: flex-start;
}
.pf-comp-name {
  font-size: 14px; font-weight: 700;
  color: var(--text);
  letter-spacing: -0.005em;
}
.pf-comp-score { text-align: right; flex-shrink: 0; }
.pf-comp-score-val {
  display: inline-grid;
  place-items: center;
  width: 48px; height: 48px;
  border-radius: 12px;
  font-size: 22px; font-weight: 800;
  color: white;
  margin-top: 4px;
  font-family: 'JetBrains Mono', monospace;
}

/* Slider 1-5 */
.pf-slider {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  padding: 4px;
  background: var(--surface);
  border-radius: 10px;
}
.pf-slider-step {
  position: relative;
  background: white;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 10px 0;
  cursor: pointer;
  font: inherit;
  display: flex; flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--text-muted);
  transition: border-color 0.12s, transform 0.12s;
}
.pf-slider-step:hover { border-color: var(--navy-100); transform: translateY(-1px); }
.pf-slider-num { font-size: 16px; font-weight: 800; }
.pf-slider-tip { font-size: 10.5px; font-weight: 600; }
.pf-slider-step.active.pf-scale-1 { background: #EF435C; color: white; border-color: #EF435C; }
.pf-slider-step.active.pf-scale-2 { background: #E26B26; color: white; border-color: #E26B26; }
.pf-slider-step.active.pf-scale-3 { background: #B57609; color: white; border-color: #B57609; }
.pf-slider-step.active.pf-scale-4 { background: #2D7BF8; color: white; border-color: #2D7BF8; }
.pf-slider-step.active.pf-scale-5 { background: var(--green-600); color: white; border-color: var(--green-600); }
.pf-slider-step.past { background: var(--surface); color: var(--text-muted); border-color: var(--border); }

.pf-comp-comment {
  font: inherit; font-size: 13px;
  width: 100%;
  padding: 9px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  resize: vertical;
  outline: none;
}
.pf-comp-comment:focus {
  background: white;
  border-color: var(--navy-800);
  box-shadow: 0 0 0 3px var(--navy-50);
}

/* Objectives */
.pf-objs-list {
  display: flex; flex-direction: column; gap: 12px;
}
.pf-obj-row {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.pf-obj-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px;
}
.pf-obj-name {
  font-size: 14px; font-weight: 700;
  color: var(--text);
  letter-spacing: -0.005em;
  margin-top: 2px;
}
.pf-obj-pct {
  font-family: 'JetBrains Mono', monospace;
  font-size: 26px; font-weight: 800;
  letter-spacing: -0.02em;
  flex-shrink: 0;
  font-feature-settings: 'tnum';
}
.pf-obj-pct small { font-size: 14px; font-weight: 700; color: var(--text-muted); }
.pf-obj-pct.green { color: var(--green-600); }
.pf-obj-pct.amber { color: var(--amber-600); }
.pf-obj-pct.rose  { color: var(--rose-600); }

.pf-obj-prog-row { display: flex; align-items: center; gap: 12px; }
.pf-obj-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--rose-600) 0%, var(--amber-600) 50%, var(--green-600) 100%);
  outline: none;
}
.pf-obj-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--navy-800);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(15, 30, 64, 0.18);
}
.pf-obj-slider::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--navy-800);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(15, 30, 64, 0.18);
}
.pf-obj-input {
  font: inherit;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  width: 70px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: white;
  color: var(--text);
  outline: none;
  text-align: right;
}
.pf-obj-input:focus { border-color: var(--navy-800); }

.pf-obj-foot {
  display: flex; align-items: center; gap: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}
.pf-obj-ev-tag {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--green-100);
  color: var(--green-600);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11.5px; font-weight: 600;
}

/* Comments tab */
.pf-comments {
  display: flex; flex-direction: column; gap: 14px;
}
.pf-comments label { display: block; margin-bottom: 6px; }
.pf-comments textarea {
  font: inherit; font-size: 13px;
  width: 100%;
  padding: 11px 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  resize: vertical;
  outline: none;
  line-height: 1.5;
}
.pf-comments textarea:focus {
  background: white;
  border-color: var(--navy-800);
  box-shadow: 0 0 0 3px var(--navy-50);
}

.pf-eval-foot {
  display: flex; align-items: center; gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* Sidebar pending */
.pf-pending {
  position: sticky;
  top: 16px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  display: flex; flex-direction: column;
  max-height: calc(100vh - 100px);
  overflow: hidden;
}
.pf-pending-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.pf-pending-count {
  font-size: 14px; font-weight: 700;
  color: var(--text);
  margin-top: 2px;
}
.pf-pending-list {
  flex: 1;
  overflow: auto;
  display: flex; flex-direction: column;
}
.pf-pending-row {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 11px 14px;
  background: white;
  border: none;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  text-align: left;
  font: inherit;
  transition: background 0.1s;
}
.pf-pending-row:hover { background: var(--surface); }
.pf-pending-row.active {
  background: var(--navy-50);
  box-shadow: inset 3px 0 0 var(--navy-800);
}
.pf-pending-row:last-child { border-bottom: none; }
.pf-pending-name { font-size: 12.5px; font-weight: 600; color: var(--text); }
.pf-pending-due {
  display: flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
}
.pf-due-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
}
.pf-due-dot.urgent { background: var(--rose-600); box-shadow: 0 0 0 3px var(--rose-100); }
.pf-due-dot.normal { background: var(--green-600); box-shadow: 0 0 0 3px var(--green-100); }

.pf-pending-foot {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.pf-calibration {
  display: flex; gap: 2px;
  margin-top: 8px;
  height: 24px;
}
.pf-cal-bar {
  display: grid; place-items: center;
  font-size: 10.5px; font-weight: 700;
  color: white;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
}
.pf-cal-bar.pf-cal-low  { background: #EF435C; }
.pf-cal-bar.pf-cal-mid  { background: #E26B26; }
.pf-cal-bar.pf-cal-ok   { background: #B57609; }
.pf-cal-bar.pf-cal-good { background: #2D7BF8; }
.pf-cal-bar.pf-cal-top  { background: var(--green-600); }

/* ─── Nine Box ─── */

.pf-ninebox-wrap {
  display: grid;
  grid-template-columns: 60px 1fr;
  grid-template-rows: 1fr auto;
  gap: 12px;
  margin-top: 14px;
}
.pf-ninebox-yaxis {
  position: relative;
  display: flex; flex-direction: column;
  align-items: center;
  justify-content: center;
}
.pf-ninebox-axis-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-subtle);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pf-ninebox-yaxis .pf-ninebox-axis-title {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  position: absolute;
  left: 0;
}
.pf-ninebox-yaxis .pf-ninebox-axis-labels {
  display: flex; flex-direction: column;
  justify-content: space-around;
  height: 100%;
  font-size: 11.5px; font-weight: 600;
  color: var(--text);
  padding: 10px 0;
}

.pf-ninebox-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, minmax(160px, 1fr));
  gap: 8px;
}
.pf-cell {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 12px 14px;
  display: flex; flex-direction: column;
  position: relative;
  overflow: hidden;
}
.pf-cell::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
}
.pf-cell-rose::before  { background: var(--rose-600); }
.pf-cell-amber::before { background: var(--amber-600); }
.pf-cell-navy::before  { background: var(--navy-800); }
.pf-cell-blue::before  { background: var(--blue-600); }
.pf-cell-green::before { background: var(--green-600); }
.pf-cell-rose  { background: linear-gradient(180deg, var(--rose-100), white 50%); }
.pf-cell-amber { background: linear-gradient(180deg, var(--amber-100), white 50%); }
.pf-cell-blue  { background: linear-gradient(180deg, var(--blue-100), white 50%); }
.pf-cell-green { background: linear-gradient(180deg, var(--green-100), white 50%); }

.pf-cell-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 4px;
  margin-bottom: 10px;
}
.pf-cell-name {
  font-size: 12px; font-weight: 800;
  letter-spacing: -0.005em;
  color: var(--text);
}
.pf-cell-rose  .pf-cell-name { color: var(--rose-600); }
.pf-cell-amber .pf-cell-name { color: var(--amber-600); }
.pf-cell-blue  .pf-cell-name { color: var(--blue-600); }
.pf-cell-green .pf-cell-name { color: var(--green-600); }
.pf-cell-navy  .pf-cell-name { color: var(--navy-800); }

.pf-cell-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 800;
  background: white;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 2px 8px;
  border-radius: 999px;
}
.pf-cell-avatars {
  display: flex; flex-wrap: wrap; gap: 4px;
}
.pf-cell-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: white;
  color: var(--text);
  display: grid; place-items: center;
  font-size: 10.5px; font-weight: 700;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
}
.pf-cell-avatar:hover {
  transform: scale(1.18);
  border-color: var(--navy-800);
  box-shadow: 0 4px 10px rgba(15, 30, 64, 0.18);
  z-index: 5;
  position: relative;
}
.pf-cell-avatar.more {
  background: var(--surface-2);
  color: var(--text-muted);
  cursor: default;
}
.pf-cell-avatar.more:hover { transform: none; box-shadow: none; border-color: var(--border); }

.pf-ninebox-spacer { grid-column: 1; }
.pf-ninebox-xaxis {
  grid-column: 2;
  display: flex; flex-direction: column;
  align-items: center; gap: 2px;
}
.pf-ninebox-xaxis .pf-ninebox-axis-labels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  text-align: center;
  font-size: 11.5px; font-weight: 600;
  color: var(--text);
}

.pf-ninebox-tooltip {
  display: flex; align-items: center; gap: 12px;
  margin-top: 14px;
  padding: 12px 16px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  min-height: 60px;
}
.pf-tooltip-stats {
  display: flex; gap: 18px;
}
.pf-tooltip-stat {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px; font-weight: 800;
  color: var(--text);
  margin-top: 2px;
}
.pf-tooltip-stat small { font-size: 11px; color: var(--text-muted); font-weight: 600; }
.pf-tooltip-stat.highlight { color: var(--navy-800); font-size: 18px; }

/* ─────────────────────────────────────────────────────────────
   Time-off module (Vacaciones y Ausencias)
   ───────────────────────────────────────────────────────────── */

.to-view-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  overflow: hidden;
}
.to-view-toggle button {
  display: inline-flex; align-items: center; gap: 6px;
  background: white;
  border: none;
  padding: 8px 14px;
  font: inherit; font-size: 12.5px; font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-right: 1px solid var(--border);
}
.to-view-toggle button:last-child { border-right: none; }
.to-view-toggle button:hover { background: var(--surface); color: var(--text); }
.to-view-toggle button.active {
  background: var(--navy-800);
  color: white;
  font-weight: 600;
}

/* Type badge (used in lists, calendar, history) */
.to-type-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* ─── Requests list ─── */

.to-req-list {
  display: flex; flex-direction: column; gap: 12px;
}
.to-req-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.to-req-card.approved { border-left: 4px solid var(--green-600); }
.to-req-card.rejected { border-left: 4px solid var(--rose-600); }

.to-req-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.to-req-head .doc-cell-emp { gap: 12px; }

.to-req-body {
  padding: 16px 18px;
  display: flex; flex-direction: column; gap: 14px;
}
.to-req-fields {
  display: grid;
  grid-template-columns: 1.4fr 80px 1fr 1.2fr;
  gap: 14px;
  padding: 12px 14px;
  background: var(--surface);
  border-radius: 10px;
}
.to-req-val { font-size: 13px; font-weight: 600; color: var(--text); margin-top: 3px; }
.to-req-days {
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px; font-weight: 800;
  color: var(--text);
  margin-top: 1px;
  letter-spacing: -0.02em;
}
.to-req-motive {
  padding: 12px 14px;
  background: var(--surface);
  border-left: 3px solid var(--navy-100);
  border-radius: 0 8px 8px 0;
  line-height: 1.55;
}

/* Workflow stepper */
.to-flow {
  display: flex; align-items: center;
  padding: 6px 0;
}
.to-flow-step {
  display: inline-flex; align-items: center; gap: 8px;
  flex-shrink: 0;
}
.to-flow-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700;
  flex-shrink: 0;
}
.to-flow-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}
.to-flow-step.done .to-flow-num { background: var(--green-600); border-color: var(--green-600); color: white; }
.to-flow-step.done .to-flow-label { color: var(--text); }
.to-flow-step.current .to-flow-num {
  background: var(--amber-600);
  border-color: var(--amber-600);
  color: white;
  box-shadow: 0 0 0 4px var(--amber-100);
}
.to-flow-step.current .to-flow-label { color: var(--amber-600); font-weight: 700; }
.to-flow-step.rejected .to-flow-num {
  background: var(--rose-600);
  border-color: var(--rose-600);
  color: white;
  font-size: 14px;
}
.to-flow-step.rejected .to-flow-label { color: var(--rose-600); }
.to-flow-line {
  flex: 1;
  height: 1px;
  background: var(--border);
  margin: 0 6px;
}
.to-flow-line.done { background: var(--green-600); }

.to-req-reject {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 10px 12px;
  background: var(--rose-100);
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--text);
  line-height: 1.5;
}
.to-req-reject svg { color: var(--rose-600); flex-shrink: 0; margin-top: 2px; }

.to-req-meta {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}
.to-req-meta svg { color: var(--green-600); }

.to-req-foot {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

/* ─── Calendar tab ─── */

.to-cal-view-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  overflow: hidden;
}
.to-cal-view-toggle button {
  background: transparent;
  border: none;
  padding: 6px 14px;
  font: inherit; font-size: 12.5px; font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-right: 1px solid var(--border);
}
.to-cal-view-toggle button:last-child { border-right: none; }
.to-cal-view-toggle button:hover { background: white; color: var(--text); }
.to-cal-view-toggle button.active {
  background: var(--navy-800);
  color: white;
  font-weight: 600;
}

.to-cal-legend {
  display: flex; gap: 12px;
}
.to-cal-legend-item {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px;
  color: var(--text-muted);
}
.to-cal-legend-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
}

.to-cal-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.to-cal-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}
.to-cal-title {
  font-size: 18px; font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text);
  margin: 2px 0 0;
}

.to-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.to-cal-weekdays > div {
  padding: 8px 10px;
  font-size: 11px; font-weight: 700;
  color: var(--text-subtle);
  letter-spacing: 0.06em; text-transform: uppercase;
}

.to-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}
.to-cal-day {
  min-height: 110px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 6px 7px;
  display: flex; flex-direction: column;
  background: white;
}
.to-cal-day.empty { background: var(--surface); }
.to-cal-day.weekend { background: var(--surface); }
.to-cal-day.holiday { background: var(--rose-100); }
.to-cal-day.today {
  background: var(--navy-50);
  box-shadow: inset 0 2px 0 var(--navy-800);
}
.to-cal-day:nth-child(7n) { border-right: none; }

.to-cal-day-head {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 4px;
}
.to-cal-day-num {
  font-size: 12px; font-weight: 700;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
}
.to-cal-day.today .to-cal-day-num {
  background: var(--navy-800);
  color: white;
  width: 22px; height: 22px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 11.5px;
}
.to-cal-day.weekend .to-cal-day-num,
.to-cal-day.holiday .to-cal-day-num { color: var(--text-muted); }

.to-cal-count {
  margin-left: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; font-weight: 700;
  background: var(--text);
  color: white;
  padding: 1px 6px;
  border-radius: 999px;
}

.to-cal-holiday-tag {
  font-size: 9.5px;
  font-weight: 700;
  color: var(--rose-600);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.to-cal-events {
  display: flex; flex-direction: column;
  gap: 2px;
  flex: 1;
  overflow: hidden;
}
.to-cal-event {
  display: flex; align-items: center; gap: 4px;
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 10.5px;
  cursor: pointer;
  transition: transform 0.12s;
  font-weight: 600;
  min-width: 0;
}
.to-cal-event:hover { transform: translateX(1px); }
.to-cal-event-avatar {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: white;
  display: grid; place-items: center;
  font-size: 8.5px; font-weight: 800;
  flex-shrink: 0;
  color: inherit;
}
.to-cal-event-avatar.lg {
  width: 32px; height: 32px;
  font-size: 11px;
  background: var(--navy-50);
  color: var(--navy-800);
}
.to-cal-event-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.to-cal-event-more {
  font-size: 10px; font-weight: 700;
  color: var(--text-muted);
  padding: 1px 5px;
}

.to-cal-week {
  padding: 0;
}
.to-week-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-top: 1px solid var(--border);
}
.to-week-day {
  border-right: 1px solid var(--border);
  min-height: 220px;
  display: flex; flex-direction: column;
}
.to-week-day:last-child { border-right: none; }
.to-week-day.today { background: var(--navy-50); box-shadow: inset 0 2px 0 var(--navy-800); }
.to-week-day-head {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  display: flex; flex-direction: column;
}
.to-week-day.today .to-week-day-head { background: white; }
.to-week-day-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px; font-weight: 700;
  color: var(--text);
  margin-top: 2px;
}

.to-cal-list {
  display: flex; flex-direction: column;
}
.to-list-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
}
.to-list-row:last-child { border-bottom: none; }
.to-list-dates {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text);
  font-weight: 600;
}

.to-cal-tooltip {
  display: flex; align-items: center; gap: 14px;
  margin-top: 14px;
  padding: 12px 16px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  min-height: 60px;
}

/* ─── Balances ─── */

.to-bal-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px; font-weight: 700;
  color: var(--text);
}
.to-bal-num.muted { color: var(--text-muted); font-weight: 500; }

.to-pendientes {
  display: flex; flex-direction: column;
  gap: 4px;
}
.to-pend-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px; font-weight: 800;
  letter-spacing: -0.02em;
}
.to-pend-num.green { color: var(--green-600); }
.to-pend-num.amber { color: var(--amber-600); }
.to-pend-num.rose  { color: var(--rose-600); }
.to-pend-alert {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 7px;
  background: var(--rose-100);
  color: var(--rose-600);
  border-radius: 6px;
  font-size: 11px; font-weight: 600;
  white-space: nowrap;
  width: fit-content;
}

/* ─── Colaborador portal ─── */

.to-portal {
  display: flex; flex-direction: column; gap: 14px;
}
.to-portal-head {
  display: flex; align-items: center; gap: 18px;
  padding: 18px 22px;
  background: linear-gradient(135deg, var(--navy-800) 0%, var(--navy-900) 100%);
  border-radius: var(--r-lg);
  color: white;
}
.to-portal-head .ats-card-avatar {
  background: rgba(255, 255, 255, 0.18);
  color: white;
  width: 56px; height: 56px;
  font-size: 18px; border-radius: 14px;
}
.to-portal-head > div:nth-child(2) > div:first-child { color: white; }
.to-portal-head .muted { color: rgba(255, 255, 255, 0.65); }
.to-portal-head .muted b { color: white; }
.to-portal-balance {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  padding: 14px 22px;
  text-align: right;
  min-width: 220px;
}
.to-portal-balance .muted-xs { color: rgba(255, 255, 255, 0.7); }
.to-portal-balance-num {
  font-size: 56px; font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  margin: 6px 0 4px;
  font-feature-settings: 'tnum';
  color: white;
}
.to-portal-balance-mini {
  display: flex; gap: 12px;
  justify-content: flex-end;
  margin-top: 8px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.85);
}
.to-portal-balance-mini b { color: white; font-weight: 700; }

.to-portal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 14px;
}
@media (max-width: 1100px) {
  .to-portal-grid { grid-template-columns: 1fr; }
}
.to-portal-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.to-portal-card-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.to-portal-card-title { font-size: 14.5px; font-weight: 700; color: var(--text); }

.to-portal-form {
  padding: 16px 18px;
  display: flex; flex-direction: column; gap: 14px;
}
.to-portal-form label { display: block; margin-bottom: 6px; }
.to-portal-form input,
.to-portal-form textarea {
  font: inherit; font-size: 13px;
  width: 100%;
  padding: 9px 12px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  outline: none;
  resize: vertical;
}
.to-portal-form input:focus,
.to-portal-form textarea:focus {
  border-color: var(--navy-800);
  box-shadow: 0 0 0 3px var(--navy-50);
}
.to-portal-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.to-type-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.to-type-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 12px 10px;
  cursor: pointer;
  font: inherit;
  text-align: center;
  transition: border-color 0.12s, transform 0.12s;
}
.to-type-card:hover { border-color: var(--navy-100); transform: translateY(-1px); }
.to-type-card-name { font-size: 12.5px; font-weight: 700; color: var(--text); }
.to-type-card.active { font-weight: 700; }

.to-days-summary {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1fr);
  gap: 14px;
  padding: 14px 16px;
  background: var(--navy-50);
  border: 1px solid var(--navy-100);
  border-radius: 10px;
}
.to-days-num {
  font-size: 38px; font-weight: 800;
  color: var(--navy-800);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-top: 4px;
  font-feature-settings: 'tnum';
}
.to-days-detail {
  display: flex; flex-direction: column;
  gap: 4px;
  border-left: 1px dashed var(--navy-100);
  padding-left: 14px;
}
.to-days-row {
  display: flex; justify-content: space-between;
  font-size: 12px;
}
.to-days-row.total {
  border-top: 1px solid var(--navy-100);
  padding-top: 6px; margin-top: 4px;
  font-weight: 700;
  color: var(--navy-800);
}

.to-upload {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color 0.12s, background 0.12s;
}
.to-upload:hover { border-color: var(--navy-800); background: var(--navy-50); }
.to-upload.on {
  background: var(--green-100);
  border-style: solid;
  border-color: var(--green-600);
}
.to-upload svg { color: var(--text-muted); flex-shrink: 0; }
.to-upload.on svg { color: var(--green-600); }

.to-portal-foot {
  display: flex; align-items: center; gap: 8px;
  padding-top: 8px;
  justify-content: flex-end;
}

/* Mini calendar */
.to-mini-cal {
  padding: 14px 18px;
}
.to-mini-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 4px;
}
.to-mini-weekdays > div {
  text-align: center;
  font-size: 10.5px; font-weight: 700;
  color: var(--text-subtle);
  letter-spacing: 0.04em;
  padding: 4px 0;
}
.to-mini-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.to-mini-day {
  aspect-ratio: 1;
  display: grid; place-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; font-weight: 600;
  color: var(--text);
  border-radius: 6px;
  background: var(--surface);
}
.to-mini-day.empty { background: transparent; }
.to-mini-day.weekend { color: var(--text-muted); background: var(--surface-2); }
.to-mini-day.holiday { background: var(--rose-100); color: var(--rose-600); }
.to-mini-day.today {
  background: var(--navy-800);
  color: white;
  font-weight: 800;
}
.to-mini-day.event-incapacidad { background: var(--rose-600); color: white; }
.to-mini-day.event-vacaciones  { background: var(--blue-600);  color: white; }
.to-mini-day.event-permiso     { background: #B57609;          color: white; }
.to-mini-day.event-licencia    { background: #E26B26;          color: white; }

.to-mini-legend {
  display: flex; flex-wrap: wrap; gap: 14px;
  padding: 10px 18px 14px;
  font-size: 11.5px;
  color: var(--text-muted);
  border-top: 1px dashed var(--border);
}
.to-mini-dot {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: middle;
}

/* History */
.to-history { display: flex; flex-direction: column; }
.to-history-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
}
.to-history-row:last-child { border-bottom: none; }

/* ─────────────────────────────────────────────────────────────
   Comms module (Comunicaciones y Reconocimiento)
   ───────────────────────────────────────────────────────────── */

/* Layout: left sidebar + content */
.co-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
@media (max-width: 1100px) {
  .co-layout { grid-template-columns: 1fr; }
}
.co-sidebar {
  position: sticky;
  top: 16px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px 12px;
  display: flex; flex-direction: column; gap: 4px;
}
.co-side-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 9px 12px;
  background: none;
  border: none;
  border-radius: 8px;
  font: inherit; font-size: 13px; font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  text-align: left;
  transition: background 0.12s, color 0.12s;
}
.co-side-item:hover { background: var(--surface); color: var(--text); }
.co-side-item.active {
  background: var(--navy-800);
  color: white;
  font-weight: 600;
}
.co-side-item.active svg { color: white; }
.co-side-count {
  background: var(--surface-2);
  color: var(--text-muted);
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
}
.co-side-item.active .co-side-count {
  background: rgba(255, 255, 255, 0.18);
  color: white;
}

.co-side-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}

.co-side-stats {
  margin-top: 10px;
  padding: 12px;
  background: var(--surface);
  border-radius: 10px;
  display: flex; flex-direction: column; gap: 6px;
}
.co-side-stat-row {
  display: flex; justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}
.co-side-stat-row b { color: var(--text); font-size: 12px; }

.co-content { min-width: 0; }

/* ─── Comunicados ─── */

.co-comms-list {
  display: flex; flex-direction: column;
  gap: 10px;
}
.co-comm-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px 18px;
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.co-comm-card:hover { border-color: var(--navy-100); box-shadow: var(--shadow-2); }
.co-comm-card.borrador { background: var(--surface); }

.co-comm-head {
  display: flex; align-items: center; gap: 12px;
}
.co-comm-title {
  font-size: 15px; font-weight: 700;
  color: var(--text);
  letter-spacing: -0.005em;
  line-height: 1.3;
}
.co-comm-summary {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.co-comm-foot {
  display: flex; align-items: center; gap: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  flex-wrap: wrap;
}

.co-aud-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 11px; font-weight: 600;
  white-space: nowrap;
}
.co-aud-tag.navy  { background: var(--navy-50);   color: var(--navy-800); }
.co-aud-tag.blue  { background: var(--blue-100);  color: var(--blue-600); }
.co-aud-tag.amber { background: var(--amber-100); color: var(--amber-600); }
.co-aud-tag.green { background: var(--green-100); color: var(--green-600); }

.co-comm-metrics {
  display: flex; align-items: center; gap: 8px;
  flex: 1;
  min-width: 200px;
  max-width: 400px;
}
.co-comm-metric-bar {
  flex: 1;
  height: 5px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
}
.co-comm-metric-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--navy-800), var(--green-600));
  border-radius: 999px;
}
.co-comm-metric-val {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
}
.co-comm-metric-val svg { color: var(--green-600); }
.co-comm-metric-val b { color: var(--text); font-weight: 700; }

/* ─── Reconocimientos ─── */

.co-recog-feed {
  display: flex; flex-direction: column;
  gap: 12px;
}
.co-recog-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  display: flex; flex-direction: column; gap: 12px;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.co-recog-card:hover { border-color: var(--navy-100); box-shadow: var(--shadow-2); }

.co-recog-head {
  display: flex; align-items: center; gap: 14px;
}
.co-recog-from-to {
  display: flex; align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.co-recog-avatar {
  position: relative;
  width: 40px; height: 40px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700;
  color: white;
  flex-shrink: 0;
}
.co-recog-avatar.from { background: var(--navy-700); }
.co-recog-avatar.to   { background: var(--aguila-600); }
.co-recog-avatar.sm   { width: 30px; height: 30px; font-size: 11px; }
.co-recog-avatar-tag {
  position: absolute;
  bottom: -8px; left: 50%;
  transform: translateX(-50%);
  background: white;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1px 6px;
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.co-recog-arrow {
  font-size: 18px;
  color: var(--text-subtle);
  font-weight: 800;
  margin: 0 2px;
  align-self: center;
}
.co-recog-arrow.sm { font-size: 14px; }

.co-recog-line {
  display: flex; align-items: center; gap: 6px;
  font-size: 13.5px;
  flex-wrap: wrap;
}

.co-value-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 11px;
  border-radius: 6px;
  font-size: 11.5px; font-weight: 700;
  white-space: nowrap;
}
.co-value-badge.blue  { background: var(--blue-100);   color: var(--blue-600); }
.co-value-badge.amber { background: var(--amber-100);  color: var(--amber-600); }
.co-value-badge.green { background: var(--green-100);  color: var(--green-600); }
.co-value-badge.navy  { background: var(--navy-50);    color: var(--navy-800); }
.co-value-badge.rose  { background: var(--rose-100);   color: var(--rose-600); }

.co-recog-msg {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text);
  padding: 10px 14px;
  background: var(--surface);
  border-left: 3px solid var(--navy-100);
  border-radius: 0 8px 8px 0;
}

.co-recog-foot {
  display: flex; align-items: center; gap: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

.co-clap {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 13px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  color: var(--text);
  transition: background 0.12s, border-color 0.12s, transform 0.12s;
}
.co-clap:hover { background: var(--amber-100); border-color: var(--amber-600); }
.co-clap.on {
  background: var(--amber-100);
  border-color: var(--amber-600);
  color: var(--amber-600);
  font-weight: 700;
}
.co-clap-emoji { font-size: 16px; line-height: 1; }
.co-clap.on:hover { transform: scale(1.02); }

.co-vis-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px;
  color: var(--text-muted);
}

/* ─── Encuestas ─── */

.co-survey-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}
.co-survey-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.co-survey-title {
  font-size: 15px; font-weight: 700;
  color: var(--text);
  letter-spacing: -0.005em;
  margin-top: 4px;
}
.co-survey-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface);
  border-radius: 8px;
}
.co-survey-val {
  font-size: 12.5px; font-weight: 600;
  color: var(--text);
  margin-top: 3px;
}
.co-survey-prog-row {
  display: flex; justify-content: space-between;
  margin-bottom: 5px;
  align-items: center;
}

/* ─── Editor de comunicado ─── */

.co-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
}
@media (max-width: 980px) { .co-editor-grid { grid-template-columns: 1fr; } }

.co-editor-main { display: flex; flex-direction: column; gap: 10px; }
.co-editor-title {
  font: inherit; font-size: 22px; font-weight: 700;
  letter-spacing: -0.01em;
  width: 100%;
  padding: 12px 14px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  outline: none;
}
.co-editor-title:focus { border-color: var(--navy-800); box-shadow: 0 0 0 3px var(--navy-50); }

.co-editor-toolbar {
  display: flex; gap: 4px; align-items: center;
  padding: 6px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}
.co-tb-btn {
  background: none;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 5px 9px;
  font: inherit;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 28px;
  height: 28px;
}
.co-tb-btn:hover { background: white; border-color: var(--border); color: var(--text); }
.co-tb-sep {
  width: 1px;
  height: 18px;
  background: var(--border);
  margin: 0 4px;
}

.co-editor-body {
  font: inherit; font-size: 14px;
  line-height: 1.6;
  width: 100%;
  padding: 14px 16px;
  background: white;
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  color: var(--text);
  outline: none;
  resize: vertical;
  min-height: 280px;
  font-family: var(--font-body);
}
.co-editor-body:focus { border-color: var(--navy-800); }

.co-editor-side {
  display: flex; flex-direction: column; gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
}
.co-editor-side select,
.co-editor-side input[type="text"],
.co-editor-side input[type="search"],
.co-editor-side input[type="datetime-local"],
.co-editor-side input:not([type]) {
  font: inherit; font-size: 13px;
  width: 100%;
  padding: 8px 11px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text);
  outline: none;
}
.co-editor-side select:focus,
.co-editor-side input[type="text"]:focus,
.co-editor-side input[type="search"]:focus,
.co-editor-side input[type="datetime-local"]:focus,
.co-editor-side input:not([type]):focus { border-color: var(--navy-800); }
.co-editor-side input[type="radio"] { width: auto; flex-shrink: 0; }

.co-aud-options {
  display: flex; flex-direction: column;
  gap: 6px;
}
.co-aud-option {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 8px 10px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.co-aud-option:hover { border-color: var(--navy-100); }
.co-aud-option.active {
  background: var(--navy-50);
  border-color: var(--navy-800);
}
.co-aud-option input { margin: 3px 0 0; accent-color: var(--navy-800); flex-shrink: 0; }
.co-aud-option > div { flex: 1; min-width: 0; }
.co-aud-label { font-size: 12.5px; font-weight: 700; color: var(--text); line-height: 1.35; }
.co-aud-option .muted { line-height: 1.3; margin-top: 2px; }

.co-aud-resolved {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  background: var(--navy-800);
  color: white;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 600;
  margin-top: 4px;
}

.co-sched { display: flex; flex-direction: column; gap: 6px; }

/* ─── People picker (Por colaborador) ─── */
.co-people-picker {
  display: flex; flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.co-people-search {
  position: relative;
  display: flex; align-items: center;
}
.co-people-search .icon {
  position: absolute;
  left: 10px;
  display: grid; place-items: center;
  color: var(--text-muted);
  pointer-events: none;
}
.co-people-search input {
  width: 100%;
  padding: 8px 10px 8px 30px !important;
  font-size: 12.5px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 7px;
  outline: none;
}
.co-people-search input:focus { border-color: var(--navy-800); box-shadow: 0 0 0 3px var(--navy-50); }

.co-people-chips {
  display: flex; flex-wrap: wrap;
  gap: 5px;
  padding: 6px 8px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  align-items: center;
}
.co-people-chip {
  display: inline-flex; align-items: center;
  gap: 5px;
  padding: 3px 5px 3px 3px;
  background: var(--navy-50);
  border: 1px solid var(--navy-100);
  border-radius: 14px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--navy-800);
}
.co-people-chip button {
  display: grid; place-items: center;
  width: 14px; height: 14px;
  border: none;
  background: rgba(27, 47, 94, 0.12);
  border-radius: 50%;
  color: var(--navy-800);
  cursor: pointer;
  padding: 0;
}
.co-people-chip button:hover { background: var(--navy-800); color: white; }
.co-chip-avatar {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy-800), #142447);
  color: white;
  display: grid; place-items: center;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.co-chip-avatar.rose { background: linear-gradient(135deg, #F59290, var(--aguila-600)); }
.co-chip-name { white-space: nowrap; }
.co-people-clear {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--aguila-600);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 4px;
}
.co-people-clear:hover { text-decoration: underline; }

.co-people-list {
  max-height: 220px;
  overflow-y: auto;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex; flex-direction: column;
}
.co-people-row {
  display: flex; align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.1s;
}
.co-people-row:last-child { border-bottom: none; }
.co-people-row:hover { background: var(--surface); }
.co-people-row.active { background: var(--navy-50); }
.co-people-row input[type="checkbox"] {
  width: 14px; height: 14px;
  accent-color: var(--navy-800);
  flex-shrink: 0;
  margin: 0;
}
.co-people-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy-800), #142447);
  color: white;
  display: grid; place-items: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.co-people-avatar.rose { background: linear-gradient(135deg, #F59290, var(--aguila-600)); }
.co-people-info {
  display: flex; flex-direction: column;
  min-width: 0;
  flex: 1;
}
.co-people-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.co-people-meta {
  font-size: 10.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.co-people-empty {
  padding: 18px 10px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

/* ─── Schedule picker (Programar envío · calendario + hora) ─── */
.co-sched-picker {
  display: flex; flex-direction: column;
  gap: 10px;
  margin-top: 4px;
  padding: 12px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
}

/* Quick presets */
.co-sched-presets {
  display: flex; flex-wrap: wrap;
  gap: 5px;
}
.co-sched-preset {
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.12s;
}
.co-sched-preset:hover {
  background: var(--navy-50);
  border-color: var(--navy-100);
  color: var(--navy-800);
}

/* Calendar */
.co-cal {
  display: flex; flex-direction: column;
  gap: 6px;
}
.co-cal-head {
  display: flex; align-items: center;
  gap: 4px;
}
.co-cal-month {
  flex: 1;
  text-align: center;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  text-transform: capitalize;
}
.co-cal-nav {
  display: grid; place-items: center;
  width: 26px; height: 26px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.1s;
  padding: 0;
}
.co-cal-nav:hover {
  background: var(--navy-50);
  border-color: var(--navy-100);
  color: var(--navy-800);
}

.co-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.co-cal-weekdays span {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 0;
}

.co-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.co-cal-day {
  position: relative;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0;
  height: 28px;
  cursor: pointer;
  display: grid; place-items: center;
  transition: all 0.1s;
}
.co-cal-day:not(.empty):not(.past):not(.selected):hover {
  background: var(--navy-50);
  color: var(--navy-800);
}
.co-cal-day.empty {
  cursor: default;
  pointer-events: none;
}
.co-cal-day.past {
  color: var(--text-subtle, #B8BBC9);
  cursor: not-allowed;
  opacity: 0.45;
}
.co-cal-day.today:not(.selected) {
  border-color: var(--navy-100);
  font-weight: 700;
  color: var(--navy-800);
}
.co-cal-day.today:not(.selected)::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--aguila-600);
}
.co-cal-day.selected {
  background: var(--navy-800);
  color: white;
  font-weight: 700;
  border-color: var(--navy-800);
  box-shadow: 0 2px 8px rgba(27, 47, 94, 0.25);
}

/* Time picker */
.co-sched-time {
  display: flex; flex-direction: column;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}
.co-time-label {
  display: flex; align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.co-time-input {
  display: flex; align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  width: fit-content;
}
.co-time-input input {
  font: inherit;
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  font-weight: 700;
  width: 32px !important;
  padding: 2px 0 !important;
  text-align: center;
  background: transparent !important;
  border: none !important;
  color: var(--text);
  outline: none;
  -moz-appearance: textfield;
}
.co-time-input input::-webkit-outer-spin-button,
.co-time-input input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.co-time-input input:focus {
  background: white !important;
  box-shadow: 0 0 0 2px var(--navy-50) !important;
  border-radius: 4px;
}
.co-time-sep {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-muted);
}

.co-time-quick {
  display: flex; flex-wrap: wrap;
  gap: 4px;
}
.co-time-chip {
  font: inherit;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.1s;
}
.co-time-chip:hover {
  border-color: var(--navy-100);
  color: var(--navy-800);
}
.co-time-chip.active {
  background: var(--navy-800);
  border-color: var(--navy-800);
  color: white;
}

/* Resolved summary */
.co-sched-summary {
  display: flex; align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: linear-gradient(135deg, var(--navy-50), white 80%);
  border: 1px solid var(--navy-100);
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--navy-800);
  font-family: var(--font-body);
  text-transform: capitalize;
  letter-spacing: 0.01em;
}

/* Preview state */
.co-preview {
  padding: 18px;
  background: var(--surface);
  border-radius: 10px;
  display: grid;
  place-items: start center;
}
.co-preview-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 26px;
  width: 100%;
  max-width: 640px;
  box-shadow: var(--shadow-2);
}
.co-preview-head {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.co-preview-title {
  font-size: 22px; font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text);
  margin: 0 0 14px;
  line-height: 1.25;
}
.co-preview-body {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text);
}
.co-preview-body p { margin: 0 0 10px; }
.co-preview-body p:last-child { margin-bottom: 0; }

/* ─── Reconocimiento modal ─── */

.co-recog-form {
  display: flex; flex-direction: column;
  gap: 18px;
}
.co-recog-form label { display: block; margin-bottom: 6px; }

.co-recog-picked {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: var(--navy-50);
  border: 1px solid var(--navy-100);
  border-radius: 10px;
}

.co-recog-options {
  display: flex; flex-direction: column;
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.co-recog-opt {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 9px 12px;
  background: white;
  border: none;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.co-recog-opt:last-child { border-bottom: none; }
.co-recog-opt:hover { background: var(--navy-50); }
.co-recog-opt svg { color: var(--text-subtle); }
.co-recog-opt:hover svg { color: var(--navy-800); }

.co-value-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 6px;
}
.co-value-pick {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font: inherit;
  font-size: 12.5px; font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s, transform 0.12s;
}
.co-value-pick:hover { border-color: var(--navy-100); transform: translateY(-1px); }
.co-value-pick.active.blue  { background: var(--blue-100);   color: var(--blue-600);  border-color: var(--blue-600); }
.co-value-pick.active.amber { background: var(--amber-100);  color: var(--amber-600); border-color: var(--amber-600); }
.co-value-pick.active.green { background: var(--green-100);  color: var(--green-600); border-color: var(--green-600); }
.co-value-pick.active.navy  { background: var(--navy-50);    color: var(--navy-800);  border-color: var(--navy-800); }
.co-value-pick.active.rose  { background: var(--rose-100);   color: var(--rose-600);  border-color: var(--rose-600); }

.co-recog-msg-input {
  font: inherit;
  font-size: 13.5px;
  line-height: 1.55;
  width: 100%;
  padding: 12px 14px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  resize: vertical;
  outline: none;
}
.co-recog-msg-input:focus {
  border-color: var(--navy-800);
  box-shadow: 0 0 0 3px var(--navy-50);
}

/* ─── Colaborador feed ─── */

.co-collab {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}
@media (max-width: 1100px) { .co-collab { grid-template-columns: 1fr; } }

.co-collab-feed { display: flex; flex-direction: column; gap: 14px; }
.co-collab-feed-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  padding: 18px 22px;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-900));
  border-radius: var(--r-lg);
  color: white;
}
.co-collab-feed-head .muted { color: rgba(255, 255, 255, 0.7); }

.co-feed-item {
  display: flex; gap: 14px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px 16px;
}
.co-feed-recog { /* uses base .co-feed-item — modifier hook for future tuning */ }
.co-feed-comm.unread {
  border-left: 3px solid var(--aguila-600);
  background: linear-gradient(90deg, var(--aguila-50) 0%, white 8%);
}
.co-feed-marker {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: var(--navy-50);
  color: var(--navy-800);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.co-feed-marker.amber { background: var(--amber-100); color: var(--amber-600); }

.co-feed-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 8px;
}

.co-unread-tag {
  background: var(--aguila-600);
  color: white;
  font-size: 10px; font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-left: auto;
}

.co-feed-comm-title {
  font-size: 15px; font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: -0.005em;
}
.co-feed-comm-summary {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 10px;
}

.co-feed-recog-msg {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
  padding: 8px 12px;
  background: var(--surface);
  border-left: 3px solid var(--amber-600);
  border-radius: 0 8px 8px 0;
  margin-bottom: 10px;
}

/* Sidebar of collaborator view */
.co-collab-side {
  display: flex; flex-direction: column;
  gap: 14px;
}
.co-collab-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px 16px;
}
.co-collab-stat {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 8px;
}
.co-collab-stat-num {
  font-size: 26px; font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 4px;
  font-feature-settings: 'tnum';
}

.co-collab-survey {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.co-collab-survey:last-child { border-bottom: none; }

.co-top-value {
  margin-bottom: 8px;
}
.co-top-value:last-child { margin-bottom: 0; }
.co-top-value-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px;
  color: var(--text);
}
.co-value-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
}
.co-value-dot.blue  { background: var(--blue-600); }
.co-value-dot.amber { background: var(--amber-600); }
.co-value-dot.green { background: var(--green-600); }
.co-value-dot.navy  { background: var(--navy-800); }
.co-value-dot.rose  { background: var(--rose-600); }

/* ─────────────────────────────────────────────────────────────
   Portal del Colaborador — device showcase
   ───────────────────────────────────────────────────────────── */

.po-controls {
  display: flex; flex-direction: column; align-items: flex-end;
  gap: 8px;
}
.po-screen-tabs, .po-device-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  overflow: hidden;
}
.po-screen-tabs button, .po-device-toggle button {
  background: white;
  border: none;
  padding: 7px 13px;
  font: inherit; font-size: 12px; font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-right: 1px solid var(--border);
}
.po-screen-tabs button:last-child, .po-device-toggle button:last-child { border-right: none; }
.po-screen-tabs button:hover, .po-device-toggle button:hover { background: var(--surface); color: var(--text); }
.po-screen-tabs button.active {
  background: var(--navy-800);
  color: white;
  font-weight: 600;
}
.po-device-toggle button.active {
  background: var(--text);
  color: white;
  font-weight: 600;
}

/* Stage */
.po-stage {
  display: flex;
  gap: 32px;
  justify-content: center;
  align-items: flex-start;
  padding: 20px 0;
  background: linear-gradient(180deg, #ECEEF5 0%, #E1E5F0 100%);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  min-height: 800px;
  overflow: auto;
}
.po-stage.device-mobile  { padding: 30px 0; }
.po-stage.device-desktop { padding: 30px 20px; }

.po-mobile-wrap, .po-desktop-wrap {
  display: flex; flex-direction: column;
  align-items: center;
  gap: 10px;
}
.po-device-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-subtle);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ─── Phone frame ─── */

.po-phone {
  position: relative;
  width: 375px;
  height: 760px;
  background: #0A0F1C;
  border-radius: 48px;
  padding: 9px;
  box-shadow:
    0 0 0 2px #2a3344,
    0 0 0 4px #0A0F1C,
    0 30px 60px rgba(15, 30, 64, 0.4),
    0 6px 14px rgba(0, 0, 0, 0.18);
}
.po-phone-side {
  position: absolute;
  width: 3px;
  background: #2a3344;
  border-radius: 2px;
}
.po-phone-side-l { left: -2px; top: 110px; height: 30px; }
.po-phone-side-r { right: -2px; top: 130px; height: 60px; }

.po-phone-screen {
  position: relative;
  width: 100%; height: 100%;
  background: var(--surface);
  border-radius: 40px;
  overflow: hidden;
  display: flex; flex-direction: column;
}

.po-status {
  position: relative;
  height: 38px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 28px 4px;
  font-family: var(--font-body);
  z-index: 5;
  background: white;
}
.po-status-time {
  font-size: 14px; font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}
.po-notch {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px; height: 28px;
  background: #0A0F1C;
  border-radius: 999px;
}
.po-status-icons {
  display: flex; align-items: center; gap: 5px;
  color: var(--text);
}
.po-battery {
  width: 22px; height: 10px;
  border: 1px solid var(--text);
  border-radius: 3px;
  position: relative;
  padding: 1px;
}
.po-battery::after {
  content: '';
  position: absolute;
  right: -3px; top: 3px;
  width: 1.5px; height: 4px;
  background: var(--text);
  border-radius: 0 1px 1px 0;
}
.po-battery-fill {
  width: 80%; height: 100%;
  background: var(--text);
  border-radius: 1px;
}

.po-phone-body {
  flex: 1;
  overflow-y: auto;
  background: var(--surface);
  padding: 12px 14px 80px;
  display: flex; flex-direction: column;
  gap: 12px;
}

/* Bottom nav */
.po-bottom-nav {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: white;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 6px 4px 18px;
  z-index: 10;
}
.po-bottom-nav button {
  background: none; border: none;
  padding: 6px 4px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  cursor: pointer;
  font: inherit; font-size: 9.5px; font-weight: 500;
  color: var(--text-muted);
}
.po-bottom-nav button svg { color: var(--text-subtle); }
.po-bottom-nav button.active {
  color: var(--navy-800);
  font-weight: 700;
}
.po-bottom-nav button.active svg { color: var(--navy-800); }
.po-home-bar {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 130px; height: 4px;
  background: var(--text);
  border-radius: 999px;
  z-index: 11;
}

/* ─── Desktop frame ─── */

.po-desktop {
  width: 1100px;
  max-width: 100%;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(15, 30, 64, 0.18), 0 4px 14px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--border);
}
.po-browser {
  display: flex; align-items: center; gap: 14px;
  height: 40px;
  background: #E8EBF1;
  border-bottom: 1px solid var(--border);
  padding: 0 14px;
}
.po-browser-dots, .po-browser-actions {
  display: flex; gap: 6px; align-items: center;
}
.po-browser-dots span {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--border-strong);
}
.po-browser-dots span:nth-child(1) { background: #FF5F57; }
.po-browser-dots span:nth-child(2) { background: #FEBC2E; }
.po-browser-dots span:nth-child(3) { background: #28C840; }
.po-browser-actions span {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--text-muted);
}
.po-url-bar {
  flex: 1;
  display: flex; align-items: center; gap: 6px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 12px;
  font: inherit; font-size: 11.5px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}
.po-url-bar svg { color: var(--green-600); }

.po-desktop-body {
  display: grid;
  grid-template-columns: 220px 1fr;
  height: 720px;
}

.po-desk-sidebar {
  background: #1B2F5E;
  background: linear-gradient(180deg, var(--navy-800) 0%, var(--navy-900) 100%);
  display: flex; flex-direction: column;
  padding: 18px 14px 14px;
  gap: 4px;
}
.po-desk-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 0 4px 14px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.po-desk-brand .brand-mark {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--aguila-600) !important;
  color: white;
  display: grid; place-items: center;
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
}

.po-desk-nav {
  display: flex; flex-direction: column; gap: 2px;
  flex: 1;
  margin-top: 8px;
}
.po-desk-nav button {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 9px 12px;
  background: transparent;
  border: none;
  border-radius: 8px;
  font: inherit; font-size: 12.5px; font-weight: 500;
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  text-align: left;
  transition: background 0.12s, color 0.12s;
}
.po-desk-nav button:hover { background: rgba(255, 255, 255, 0.08); color: white; }
.po-desk-nav button.active {
  background: var(--teal-800);
  color: white;
  font-weight: 700;
}
.po-desk-nav button.active svg { color: white; }
.po-desk-nav button svg { color: rgba(255, 255, 255, 0.7); }

.po-desk-user {
  display: flex; align-items: center; gap: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  margin-top: auto;
}

.po-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--aguila-600);
  color: white;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700;
  flex-shrink: 0;
}
.po-avatar.lg { width: 56px; height: 56px; font-size: 18px; border-radius: 14px; }

.po-desk-main {
  background: var(--surface);
  overflow-y: auto;
  padding: 24px 30px;
  display: flex; flex-direction: column;
  gap: 16px;
}

/* ─── Common screen styles ─── */

.po-screen { display: flex; flex-direction: column; gap: 12px; }
.po-screen.desktop { gap: 18px; }

.po-screen-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 14px;
}
.po-screen-head h2 {
  font-size: 17px; font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--text);
  margin: 0;
}
.po-screen.desktop .po-screen-head h2 { font-size: 22px; }

.po-section { display: flex; flex-direction: column; gap: 8px; }
.po-section-head {
  display: flex; justify-content: space-between; align-items: center;
}
.po-section-head h3 {
  font-size: 13px; font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--text);
  margin: 0;
}

/* ─── Home screen ─── */

.po-greeting {
  display: flex; justify-content: space-between; align-items: center;
}
.po-greet-name {
  font-size: 19px; font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 2px 0 0;
}
.po-screen.desktop .po-greet-name { font-size: 24px; }

.po-bell {
  position: relative;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: white;
  border: 1px solid var(--border);
  display: grid; place-items: center;
  color: var(--text);
}
.po-bell.mobile { width: 36px; height: 36px; }
.po-bell-dot {
  position: absolute;
  top: -3px; right: -3px;
  background: var(--aguila-600);
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  border: 2px solid white;
}

/* Quick action grid 2x2 */
.po-quick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.po-screen.desktop .po-quick { grid-template-columns: repeat(4, 1fr); gap: 12px; }

.po-quick-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 14px 12px;
  display: flex; flex-direction: column;
  gap: 6px;
  cursor: pointer;
  font: inherit;
  text-align: left;
  position: relative;
  transition: border-color 0.12s, box-shadow 0.12s, transform 0.12s;
  overflow: hidden;
}
.po-quick-card:hover {
  border-color: var(--navy-100);
  box-shadow: var(--shadow-2);
  transform: translateY(-1px);
}
.po-quick-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 4px;
}
.po-quick-card.rose::before  { background: var(--rose-600); }
.po-quick-card.blue::before  { background: var(--blue-600); }
.po-quick-card.green::before { background: var(--green-600); }
.po-quick-card.amber::before { background: var(--amber-600); }

.po-quick-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  display: grid; place-items: center;
  margin-bottom: 4px;
}
.po-quick-card.rose  .po-quick-icon { background: var(--rose-100);   color: var(--rose-600); }
.po-quick-card.blue  .po-quick-icon { background: var(--blue-100);   color: var(--blue-600); }
.po-quick-card.green .po-quick-icon { background: var(--green-100);  color: var(--green-600); }
.po-quick-card.amber .po-quick-icon { background: var(--amber-100);  color: var(--amber-600); }

.po-quick-label {
  font-size: 13px; font-weight: 700;
  color: var(--text);
  letter-spacing: -0.005em;
  line-height: 1.25;
}
.po-quick-sub {
  font-size: 10.5px;
  color: var(--text-muted);
}
.po-quick-badge {
  font-size: 10px; font-weight: 700;
  background: var(--rose-600);
  color: white;
  padding: 2px 8px;
  border-radius: 999px;
  align-self: flex-start;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

/* Onboarding hero */
.po-onboard {
  background: linear-gradient(135deg, var(--navy-800), var(--navy-900));
  border-radius: 14px;
  padding: 14px 16px;
  color: white;
  display: flex; flex-direction: column; gap: 10px;
}
.po-onboard-head {
  display: flex; justify-content: space-between; align-items: flex-start;
}
.po-onboard-title {
  font-size: 14px; font-weight: 700;
  margin-top: 4px;
  letter-spacing: -0.01em;
}
.po-onboard-pct {
  font-size: 28px; font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  font-feature-settings: 'tnum';
}
.po-onboard-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  overflow: hidden;
}
.po-onboard-fill {
  height: 100%;
  background: linear-gradient(90deg, white, var(--green-600));
  border-radius: 999px;
}
.po-onboard-next {
  display: flex; align-items: center; gap: 10px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.85);
}
.po-onboard-next b { color: white; font-weight: 700; }
.po-onboard-cta {
  background: white;
  color: var(--navy-800);
  border: none;
  border-radius: 999px;
  padding: 5px 12px;
  font: inherit; font-size: 11px; font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}

/* Urgent list */
.po-urgent-list {
  display: flex; flex-direction: column; gap: 6px;
}
.po-urgent {
  display: flex; align-items: center; gap: 10px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}
.po-urgent-rose { border-left: 3px solid var(--rose-600); }
.po-urgent-amber { border-left: 3px solid var(--amber-600); }

.po-urgent-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.po-urgent-icon-rose  { background: var(--rose-100);   color: var(--rose-600); }
.po-urgent-icon-amber { background: var(--amber-100);  color: var(--amber-600); }

.po-urgent-text {
  font-size: 12px; font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}
.po-urgent-due {
  font-size: 10.5px;
  margin-top: 2px;
  font-family: 'JetBrains Mono', monospace;
}
.po-urgent-due-rose  { color: var(--rose-600); font-weight: 700; }
.po-urgent-due-amber { color: var(--amber-600); font-weight: 600; }

.po-urgent-btn {
  background: var(--navy-800);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 6px 11px;
  font: inherit; font-size: 11px; font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}

/* Day stats (desktop only on home) */
.po-day-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.po-day-stat {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}
.po-day-stat-num {
  font-size: 19px; font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--text);
  margin-bottom: 4px;
  font-feature-settings: 'tnum';
}

/* ─── Docs screen ─── */

.po-doc-list {
  display: flex; flex-direction: column;
  gap: 6px;
}
.po-doc-row {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  font: inherit;
  transition: border-color 0.12s, background 0.12s;
}
.po-doc-row:hover { border-color: var(--navy-100); }
.po-doc-row.pendiente {
  background: linear-gradient(90deg, var(--amber-100), white 35%);
  border-color: var(--amber-600);
}
.po-doc-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--navy-50);
  color: var(--navy-800);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.po-doc-name {
  font-size: 12.5px; font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

/* ─── Sign flow ─── */

.po-sign-back {
  background: none;
  border: none;
  padding: 4px 0;
  font: inherit; font-size: 12px; font-weight: 600;
  color: var(--navy-800);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px;
  align-self: flex-start;
}
.po-sign-back:hover { color: var(--aguila-600); }

.po-sign-progress-bar {
  display: flex; align-items: center; gap: 6px;
  margin: 4px 0 14px;
}
.po-sign-step {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-muted);
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  flex-shrink: 0;
  position: relative;
}
.po-sign-step.on { background: var(--green-600); color: white; }
.po-sign-step.current {
  background: var(--navy-800);
  color: white;
  box-shadow: 0 0 0 4px var(--navy-50);
}
.po-sign-step:not(:last-child)::after {
  content: '';
  position: relative;
  left: 22px;
  display: block;
  width: calc(100% / 4);
  height: 1px;
  background: var(--border);
}

.po-sign-doc-head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.po-sign-scroll-meta {
  display: flex; align-items: center; gap: 8px;
  margin: 8px 0 6px;
}
.po-sign-scroll-bar {
  flex: 1;
  height: 4px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
}
.po-sign-scroll-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--navy-800), var(--green-600));
  border-radius: 999px;
  transition: width 0.18s ease;
}

.po-sign-pdf {
  height: 320px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow-y: auto;
  padding: 16px;
}
.po-sign-pdf-page {
  background: white;
  padding: 18px 22px;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(15, 30, 64, 0.06);
}

.po-sign-cta {
  background: var(--navy-800);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 12px 16px;
  font: inherit; font-size: 13px; font-weight: 700;
  cursor: pointer;
  width: 100%;
  margin-top: 4px;
}
.po-sign-cta:hover { background: var(--navy-900); }
.po-sign-cta:disabled {
  background: var(--surface-2);
  color: var(--text-muted);
  cursor: not-allowed;
}
.po-sign-alt {
  background: none;
  border: none;
  padding: 8px;
  font: inherit; font-size: 12px; font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  width: 100%;
}
.po-sign-alt:hover { color: var(--navy-800); }

.po-sign-confirm,
.po-sign-bio,
.po-sign-success {
  display: flex; flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 14px 14px 6px;
  gap: 10px;
}
.po-sign-confirm-icon,
.po-sign-success-circle {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--navy-50);
  color: var(--navy-800);
  display: grid; place-items: center;
}
.po-sign-success-circle {
  background: var(--green-100);
  color: var(--green-600);
  animation: sigPop 0.32s cubic-bezier(.2,.8,.2,1);
}
.po-sign-confirm-title {
  font-size: 16px; font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 8px 0 0;
}
.po-sign-confirm-sub {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 340px;
  margin: 0;
}

.po-sign-accept {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  width: 100%;
}
.po-sign-accept input {
  margin: 2px 0 0;
  width: 16px; height: 16px;
  accent-color: var(--navy-800);
  flex-shrink: 0;
}
.po-sign-accept span { font-size: 12px; line-height: 1.5; color: var(--text); }

.po-bio-glow {
  width: 120px; height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(27, 47, 94, 0.12), transparent 70%);
  display: grid; place-items: center;
  animation: bio-pulse 1.6s ease-in-out infinite;
}
@keyframes bio-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
.po-bio-icon {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--navy-800);
  color: var(--navy-800);
  display: grid; place-items: center;
}

.po-sign-evidence {
  display: flex; flex-direction: column;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 4px;
}
.po-sign-ev-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.po-sign-ev-row:last-child { border-bottom: none; }

/* ─── Vacation flow ─── */

.po-big-cta {
  display: flex; align-items: center; gap: 14px;
  width: 100%;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-900));
  color: white;
  border: none;
  border-radius: 14px;
  padding: 16px 18px;
  font: inherit;
  cursor: pointer;
  text-align: left;
  transition: transform 0.15s;
}
.po-big-cta:hover { transform: translateY(-1px); }
.po-big-cta svg { color: white; flex-shrink: 0; }

.po-history-empty {
  background: white;
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  padding: 28px 16px;
  text-align: center;
  color: var(--text-muted);
}
.po-history-empty svg { color: var(--text-subtle); margin: 0 auto; display: block; }

.po-vac-types {
  display: flex; flex-direction: column;
  gap: 8px;
}
.po-vac-type {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  text-align: left;
  width: 100%;
  transition: border-color 0.12s, background 0.12s;
}
.po-vac-type:hover { border-color: var(--navy-100); }
.po-vac-type-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-muted);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.po-vac-type-name { font-size: 13px; font-weight: 700; color: var(--text); }
.po-vac-type-hint { font-size: 11px; color: var(--text-muted); margin-top: 2px; line-height: 1.35; }

.po-vac-type.active.vacaciones  { border-color: var(--blue-600);  background: var(--blue-100); }
.po-vac-type.active.vacaciones .po-vac-type-icon { background: var(--blue-600); color: white; }
.po-vac-type.active.permiso     { border-color: var(--amber-600); background: var(--amber-100); }
.po-vac-type.active.permiso .po-vac-type-icon { background: var(--amber-600); color: white; }
.po-vac-type.active.licencia    { border-color: #E26B26;          background: #FCE7D8; }
.po-vac-type.active.licencia .po-vac-type-icon { background: #E26B26; color: white; }
.po-vac-type.active.incapacidad { border-color: var(--rose-600);  background: var(--rose-100); }
.po-vac-type.active.incapacidad .po-vac-type-icon { background: var(--rose-600); color: white; }

/* Mini calendar inside flow */
.po-cal {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
}
.po-cal-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.po-cal-nav {
  background: none; border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 6px;
  cursor: pointer;
  display: grid; place-items: center;
}
.po-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 4px;
}
.po-cal-weekdays span {
  text-align: center;
  font-size: 10.5px; font-weight: 700;
  color: var(--text-subtle);
  padding: 4px 0;
}
.po-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.po-cal-day {
  aspect-ratio: 1;
  display: grid; place-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px; font-weight: 600;
  color: var(--text);
  border: none;
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
}
.po-cal-day.empty { background: transparent; }
.po-cal-day.weekend { color: var(--text-muted); background: var(--surface-2); cursor: not-allowed; }
.po-cal-day.holiday { background: var(--rose-100); color: var(--rose-600); cursor: not-allowed; }
.po-cal-day:disabled { cursor: not-allowed; }
.po-cal-day:not(:disabled):hover { background: var(--navy-50); color: var(--navy-800); }
.po-cal-day.pick-from, .po-cal-day.pick-to {
  background: var(--navy-800) !important;
  color: white !important;
  font-weight: 800;
}
.po-cal-day.in-range {
  background: var(--navy-50);
  color: var(--navy-800);
  font-weight: 700;
}

.po-vac-day-pill {
  background: white;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  text-align: center;
  font-weight: 600;
  color: var(--text);
}
.po-vac-day-num {
  font-size: 16px; font-weight: 800;
  color: var(--navy-800);
  margin-right: 4px;
}

.po-vac-summary {
  display: flex; flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.po-vac-sum-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
}
.po-vac-sum-row:last-child { border-bottom: none; }
.po-vac-sum-row.big {
  background: var(--navy-50);
}
.po-vac-sum-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px; font-weight: 800;
  color: var(--navy-800);
  letter-spacing: -0.02em;
}

.po-vac-motive {
  font: inherit; font-size: 12.5px;
  width: 100%;
  padding: 9px 12px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  resize: vertical;
  outline: none;
  margin-top: 4px;
}
.po-vac-motive:focus { border-color: var(--navy-800); }

/* Vacation tracking */
.po-vac-tracking {
  display: flex; align-items: center;
  width: 100%;
  margin-top: 10px;
}
.po-track-step {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-muted);
  display: grid; place-items: center;
  font-size: 11px; font-weight: 800;
  flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace;
}
.po-track-step.done   { background: var(--green-600); color: white; }
.po-track-step.active { background: var(--amber-600); color: white; box-shadow: 0 0 0 4px var(--amber-100); }
.po-track-line {
  flex: 1;
  height: 2px;
  background: var(--border);
}
.po-track-line.done { background: var(--green-600); }
.po-vac-tracking-labels {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: 100%;
  margin-top: 6px;
  font-size: 10px;
  text-align: center;
  color: var(--text-muted);
}

/* ─── Courses screen ─── */

.po-course-summary {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}

.po-course-list {
  display: flex; flex-direction: column;
  gap: 8px;
}
.po-screen.desktop .po-course-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.po-course-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex; flex-direction: column;
  gap: 6px;
}
.po-course-green { border-left: 3px solid var(--green-600); }
.po-course-amber { border-left: 3px solid var(--amber-600); }
.po-course-rose  { border-left: 3px solid var(--rose-600); }

.po-course-head {
  display: flex; justify-content: space-between; align-items: center;
}
.po-course-cat {
  font-size: 9.5px; font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.po-course-cat.rose { background: var(--rose-100);   color: var(--rose-600); }
.po-course-cat.navy { background: var(--navy-50);    color: var(--navy-800); }

.po-course-name {
  font-size: 13px; font-weight: 700;
  color: var(--text);
  letter-spacing: -0.005em;
  line-height: 1.3;
  margin-top: 2px;
}

.po-course-foot {
  display: flex; align-items: center; gap: 6px;
  margin-top: 6px;
  font-size: 11px;
}
.po-course-cta {
  background: var(--navy-800);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 4px 12px;
  font: inherit; font-size: 11px; font-weight: 700;
  cursor: pointer;
}
.po-course-cta.light {
  background: white;
  color: var(--green-600);
  border: 1px solid var(--green-600);
}

/* ─── Profile screen ─── */

.po-profile-hero {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  /* Gradiente oficial · Blue Dark → Blue Main → Blue Light */
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-main) 65%, var(--blue-light) 100%);
  color: white;
  border-radius: 14px;
}

.po-profile-section {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex; flex-direction: column;
  gap: 10px;
}

.po-profile-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface);
  border-radius: 8px;
}
.po-profile-val {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  margin-top: 2px;
}

.po-profile-update {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 12px;
  background: white;
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  font: inherit; font-size: 12px; font-weight: 600;
  color: var(--navy-800);
  cursor: pointer;
}
.po-profile-update:hover { background: var(--navy-50); border-color: var(--navy-800); }

.po-gear-list, .po-mini-courses {
  display: flex; flex-direction: column;
}
.po-gear-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.po-gear-row:last-child { border-bottom: none; }
.po-gear-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--navy-50);
  color: var(--navy-800);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.po-gear-name {
  font-size: 12.5px; font-weight: 600;
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.po-mini-course {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--border);
}
.po-mini-course:last-child { border-bottom: none; }
.po-mini-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.po-mini-dot.green { background: var(--green-600); }
.po-mini-dot.amber { background: var(--amber-600); }
.po-mini-dot.rose  { background: var(--rose-600); }

@media (max-width: 1280px) {
  .po-stage.device-both { flex-direction: column; align-items: center; }
}

/* ─────────────────────────────────────────────────────────────
   Reports module
   ───────────────────────────────────────────────────────────── */

.rp-period {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  overflow: hidden;
}
.rp-period button {
  background: white;
  border: none;
  padding: 7px 13px;
  font: inherit; font-size: 12.5px; font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-right: 1px solid var(--border);
}
.rp-period button:last-child { border-right: none; }
.rp-period button:hover { background: var(--surface); color: var(--text); }
.rp-period button.active {
  background: var(--navy-800);
  color: white;
  font-weight: 600;
}

/* KPI row */
.rp-kpi-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}
@media (max-width: 1280px) { .rp-kpi-row { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px)  { .rp-kpi-row { grid-template-columns: repeat(2, 1fr); } }

.rp-kpi {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 12px 14px 10px;
  display: flex; flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.rp-kpi-top {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 6px;
}
.rp-kpi-top .muted-xs {
  font-size: 10.5px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rp-kpi-delta {
  font-size: 10.5px; font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  white-space: nowrap;
  font-feature-settings: 'tnum';
}
.rp-kpi-delta.up   { background: var(--green-100); color: var(--green-600); }
.rp-kpi-delta.down { background: var(--green-100); color: var(--green-600); }
/* For ausentismo where +up is bad we keep up=green by default; tone is data-driven via spark color, not delta. Override via inline if needed. */

.rp-kpi-val {
  font-size: 22px; font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-top: 2px;
  color: var(--text);
  font-feature-settings: 'tnum';
}

.rp-kpi-bottom {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-top: 6px;
  gap: 6px;
}
.rp-kpi-foot {
  font-size: 10.5px;
  color: var(--text-muted);
  line-height: 1.3;
  flex: 1;
}
.rp-spark {
  flex-shrink: 0;
  width: 80px; height: 28px;
}

/* Chart cards */
.rp-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.rp-row-3 {
  display: grid;
  grid-template-columns: 0.85fr 1.05fr 1.1fr;
  gap: 14px;
  margin-bottom: 18px;
}
@media (max-width: 1100px) {
  .rp-row-2, .rp-row-3 { grid-template-columns: 1fr; }
}

.rp-chart-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  display: flex; flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.rp-chart-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.rp-chart-title {
  font-size: 14.5px; font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--text);
  margin: 3px 0 0;
}

.rp-chart-legend {
  display: flex; gap: 12px;
  flex-wrap: wrap;
}
.rp-legend-item {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px;
  color: var(--text-muted);
}
.rp-legend-dot {
  width: 9px; height: 9px;
  border-radius: 2px;
  display: inline-block;
}

.rp-chart {
  width: 100%;
  height: auto;
  display: block;
}

.rp-chart-foot {
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

/* Donut */
.rp-donut {
  width: 200px;
  height: 200px;
  margin: 0 auto;
  display: block;
}
.rp-donut-legend {
  display: flex; flex-direction: column;
  gap: 5px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}
.rp-donut-row {
  display: flex; align-items: center; gap: 8px;
}

.rp-hbar { width: 100%; height: auto; display: block; }
.rp-vbar { width: 100%; height: auto; display: block; }

/* Sections */
.rp-section {
  margin-top: 18px;
}
.rp-section-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 10px;
}
.rp-section-title {
  font-size: 17px; font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text);
  margin: 0;
}

.rp-export-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit; font-size: 11.5px; font-weight: 700;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.rp-export-btn.xlsx { color: var(--green-600); }
.rp-export-btn.xlsx:hover { background: var(--green-100); border-color: var(--green-600); }
.rp-export-btn.pdf  { color: var(--rose-600); }
.rp-export-btn.pdf:hover  { background: var(--rose-100); border-color: var(--rose-600); }

/* Compliance */
.rp-traffic { font-size: 14px; line-height: 1; }
.rp-traffic.ok   { color: var(--green-600); }
.rp-traffic.warn { color: var(--amber-600); }
.rp-traffic.crit { color: var(--rose-600); }

.rp-compliance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
}
.rp-cmp-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 10px;
  position: relative;
  overflow: hidden;
}
.rp-cmp-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 4px;
}
.rp-cmp-card.green::before { background: var(--green-600); }
.rp-cmp-card.amber::before { background: var(--amber-600); }
.rp-cmp-card.rose::before  { background: var(--rose-600); }

.rp-cmp-head {
  display: flex; align-items: center; gap: 10px;
}
.rp-cmp-light {
  width: 32px; height: 32px;
  border-radius: 9px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.rp-cmp-light.green { background: var(--green-100); color: var(--green-600); }
.rp-cmp-light.amber { background: var(--amber-100); color: var(--amber-600); }
.rp-cmp-light.rose  { background: var(--rose-100);  color: var(--rose-600); }

.rp-cmp-name {
  font-size: 13.5px; font-weight: 700;
  color: var(--text);
  letter-spacing: -0.005em;
}
.rp-cmp-status {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; font-weight: 700;
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.rp-cmp-status.green { color: var(--green-600); }
.rp-cmp-status.amber { color: var(--amber-600); }
.rp-cmp-status.rose  { color: var(--rose-600); }

.rp-cmp-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

.rp-cmp-cta {
  display: inline-flex; align-items: center; gap: 5px;
  align-self: flex-start;
  padding: 6px 11px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 7px;
  font: inherit; font-size: 11.5px; font-weight: 700;
  color: var(--text);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.rp-cmp-cta:hover { background: white; border-color: var(--navy-100); color: var(--navy-800); }

/* ─────────────────────────────────────────────────────────────
   Settings module
   ───────────────────────────────────────────────────────────── */

.cf-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
@media (max-width: 1100px) { .cf-layout { grid-template-columns: 1fr; } }

.cf-sidebar {
  position: sticky;
  top: 16px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 12px 10px;
  display: flex; flex-direction: column;
  gap: 2px;
}
.cf-nav-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 9px 12px;
  background: none;
  border: none;
  border-radius: 7px;
  font: inherit; font-size: 12.5px; font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  text-align: left;
  transition: background 0.12s, color 0.12s;
}
.cf-nav-item:hover { background: var(--surface); color: var(--text); }
.cf-nav-item.active {
  background: var(--navy-800);
  color: white;
  font-weight: 600;
}
.cf-nav-item.active svg { color: white; }
.cf-nav-item svg { color: var(--text-subtle); }

.cf-content { min-width: 0; }

.cf-section-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 18px;
  margin-bottom: 14px;
}
.cf-section-title {
  font-size: 18px; font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text);
  margin: 0;
}
.cf-section-sub {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  max-width: 720px;
  margin: 4px 0 0;
}

/* Composition stats (matrices list) */
.cf-comp-stats {
  display: flex; flex-wrap: wrap;
  gap: 10px;
  font-size: 11.5px;
  color: var(--text-muted);
}
.cf-comp-stats span {
  display: inline-flex; align-items: center; gap: 4px;
}
.cf-comp-stats svg { color: var(--text-subtle); }
.cf-comp-stats b { color: var(--text); font-weight: 700; }

/* Matrix editor modal */
.cf-mx-modal {
  display: flex; flex-direction: column;
}
.cf-mx-head { padding-bottom: 0; }

.cf-mx-tabs {
  display: flex; gap: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 22px;
  flex-shrink: 0;
}
.cf-mx-tab {
  display: inline-flex; align-items: center; gap: 7px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 11px 14px;
  font: inherit; font-size: 12.5px; font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.12s, border-color 0.12s;
}
.cf-mx-tab:hover { color: var(--text); }
.cf-mx-tab.active {
  color: var(--navy-800);
  border-bottom-color: var(--navy-800);
  font-weight: 700;
}
.cf-mx-tab-count {
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
}
.cf-mx-tab.active .cf-mx-tab-count { background: var(--navy-50); color: var(--navy-800); }

.cf-mx-body {
  display: flex; flex-direction: column;
  gap: 14px;
  padding: 18px 22px;
}

.cf-mx-warning {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 12px;
  align-items: flex-start;
  padding: 14px 16px;
  background: var(--amber-100);
  border-radius: 10px;
  font-size: 12.5px;
  color: var(--text);
  line-height: 1.55;
}
.cf-mx-warning svg { color: var(--amber-600); margin-top: 2px; }
.cf-mx-recalc {
  grid-column: 1 / -1;
  display: flex; gap: 8px; align-items: flex-start;
  margin-top: 4px;
  padding: 10px 12px;
  background: white;
  border: 1px solid var(--amber-600);
  border-radius: 8px;
  cursor: pointer;
}
.cf-mx-recalc input { margin: 2px 0 0; accent-color: var(--amber-600); }
.cf-mx-recalc span { font-size: 12.5px; }

/* Add row button (in tables inside matrix editor) */
.cf-add-row {
  display: flex; align-items: center; gap: 6px;
  width: 100%;
  padding: 11px 14px;
  background: var(--surface);
  border: none;
  border-top: 1px dashed var(--border);
  font: inherit; font-size: 12.5px; font-weight: 600;
  color: var(--navy-800);
  cursor: pointer;
  text-align: left;
  justify-content: center;
}
.cf-add-row:hover { background: var(--navy-50); }
.cf-add-row svg { color: var(--navy-800); }

.cf-num-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px; font-weight: 700;
  background: var(--navy-50);
  color: var(--navy-800);
  padding: 2px 9px;
  border-radius: 6px;
}
.cf-order-num {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--navy-50);
  color: var(--navy-800);
  display: inline-grid; place-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px; font-weight: 800;
}

/* ─── Flujos de aprobación ─── */

.cf-flows-list {
  display: flex; flex-direction: column;
  gap: 12px;
}
.cf-flow-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  display: flex; flex-direction: column;
  gap: 14px;
}
.cf-flow-card.inactive { opacity: 0.7; background: var(--surface); }

.cf-flow-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 18px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border);
}
.cf-flow-title {
  font-size: 16px; font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 4px 0 0;
}

/* Flow pipe (chips in sequence) */
.cf-flow-pipe {
  display: flex; align-items: stretch;
  gap: 6px;
  flex-wrap: wrap;
}
.cf-flow-step {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  flex: 1; min-width: 200px;
}
.cf-flow-step.start { background: var(--navy-50); border-color: var(--navy-100); flex: 0 0 auto; min-width: 120px; }
.cf-flow-step.end   { background: var(--green-100); border-color: var(--green-600); flex: 0 0 auto; min-width: 120px; }
.cf-flow-step-icon {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: white;
  color: var(--navy-800);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.cf-flow-step.end .cf-flow-step-icon { color: var(--green-600); }
.cf-flow-step-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--navy-800);
  color: white;
  display: grid; place-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 800;
  flex-shrink: 0;
}
.cf-flow-step-name {
  font-size: 13px; font-weight: 700;
  color: var(--text);
}
.cf-flow-sla {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px;
  color: var(--amber-600);
  font-weight: 600;
  margin-top: 2px;
}
.cf-flow-esc {
  font-size: 10.5px;
  margin-top: 2px;
  color: var(--text-muted);
}
.cf-flow-esc b { color: var(--rose-600); font-weight: 600; }
.cf-flow-arrow {
  display: grid; place-items: center;
  font-size: 18px;
  color: var(--text-subtle);
  font-weight: 800;
  align-self: center;
  flex-shrink: 0;
}

.cf-flow-foot {
  display: flex; align-items: center; gap: 10px;
}

/* Flow editor canvas */
.cf-fe-canvas {
  display: flex; flex-direction: column;
  gap: 10px;
}
.cf-fe-step {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.cf-fe-step.start { background: var(--navy-50); border-color: var(--navy-100); }
.cf-fe-step.end   { background: var(--green-100); border-color: var(--green-600); }

.cf-fe-step-grip {
  display: flex; flex-direction: column; align-items: center;
  gap: 2px;
}
.cf-fe-step-grip .cf-flow-step-num { margin: 4px 0; }
.cf-fe-step-grip .icon-action { padding: 0; width: 22px; height: 22px; }

.cf-fe-step-fields {
  display: grid;
  grid-template-columns: 1.4fr 0.5fr 1.2fr;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.cf-fe-step-fields label { display: block; margin-bottom: 4px; }
.cf-fe-step-fields select,
.cf-fe-step-fields input {
  font: inherit; font-size: 12.5px;
  width: 100%;
  padding: 7px 10px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text);
  outline: none;
}
.cf-fe-step-fields select:focus,
.cf-fe-step-fields input:focus { border-color: var(--navy-800); }

.cf-fe-add {
  display: flex; align-items: center; justify-content: center;
  gap: 6px;
  padding: 12px;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
  font: inherit; font-size: 12.5px; font-weight: 600;
  color: var(--navy-800);
  cursor: pointer;
}
.cf-fe-add:hover { border-color: var(--navy-800); background: var(--navy-50); }

/* ─── Usuarios y roles ─── */

.cf-role-badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11.5px; font-weight: 700;
  letter-spacing: 0.02em;
}
.cf-role-badge.rose  { background: var(--rose-100);   color: var(--rose-600); }
.cf-role-badge.navy  { background: var(--navy-50);    color: var(--navy-800); }
.cf-role-badge.amber { background: var(--amber-100);  color: var(--amber-600); }
.cf-role-badge.blue  { background: var(--blue-100);   color: var(--blue-600); }
.cf-role-badge.green { background: var(--green-100);  color: var(--green-600); }

.cf-perm-matrix {
  display: flex; flex-direction: column;
  gap: 14px;
}

.cf-perm-roles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}
.cf-perm-role {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color 0.12s, transform 0.12s;
}
.cf-perm-role:hover { border-color: var(--navy-100); transform: translateY(-1px); }
.cf-perm-role.active.rose  { border-color: var(--rose-600);  background: var(--rose-100); }
.cf-perm-role.active.navy  { border-color: var(--navy-800);  background: var(--navy-50); }
.cf-perm-role.active.amber { border-color: var(--amber-600); background: var(--amber-100); }
.cf-perm-role.active.blue  { border-color: var(--blue-600);  background: var(--blue-100); }
.cf-perm-role.active.green { border-color: var(--green-600); background: var(--green-100); }

.cf-perm-role-tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 5px;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.02em;
}
.cf-perm-role-tag.rose  { background: var(--rose-600);  color: white; }
.cf-perm-role-tag.navy  { background: var(--navy-800);  color: white; }
.cf-perm-role-tag.amber { background: var(--amber-600); color: white; }
.cf-perm-role-tag.blue  { background: var(--blue-600);  color: white; }
.cf-perm-role-tag.green { background: var(--green-600); color: white; }

.cf-perm-grid-wrap {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.cf-perm-grid-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.cf-perm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.cf-perm-table thead th {
  text-align: left;
  font-size: 11px; font-weight: 700;
  color: var(--text-subtle);
  letter-spacing: 0.04em; text-transform: uppercase;
  padding: 10px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.cf-perm-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.cf-perm-table tbody tr:last-child td { border-bottom: none; }
.cf-perm-table tbody tr:hover { background: var(--surface); }

.cf-perm-cell {
  display: inline-block;
  cursor: pointer;
  margin: 0 auto;
}
.cf-perm-cell input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.cf-perm-mark {
  display: grid; place-items: center;
  width: 22px; height: 22px;
  border: 1.5px solid var(--border-strong);
  border-radius: 6px;
  background: white;
  color: white;
  transition: background 0.12s, border-color 0.12s;
}
.cf-perm-mark.on {
  background: var(--green-600);
  border-color: var(--green-600);
}

/* ─── Tipos de contrato ─── */

.cf-contracts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.cf-contract-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
  display: flex; flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
}
.cf-contract-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 4px;
}
.cf-contract-card.navy::before  { background: var(--navy-800); }
.cf-contract-card.blue::before  { background: var(--blue-600); }
.cf-contract-card.amber::before { background: var(--amber-600); }
.cf-contract-card.rose::before  { background: var(--rose-600); }

.cf-contract-head {
  display: flex; justify-content: space-between; align-items: flex-start;
}
.cf-contract-name {
  font-size: 15px; font-weight: 700;
  letter-spacing: -0.005em;
  margin: 4px 0 0;
}
.cf-contract-uses { text-align: right; flex-shrink: 0; }

.cf-contract-rows {
  display: flex; flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.cf-contract-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.cf-contract-row:last-child { border-bottom: none; }

/* ─────────────────────────────────────────────────────────────
   Polish · Empty states (canonical)
   ───────────────────────────────────────────────────────────── */

.es {
  display: flex; flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 56px 32px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  gap: 14px;
  max-width: 560px;
  margin: 0 auto;
}
.es-art {
  width: 96px; height: 96px;
  border-radius: 50%;
  display: grid; place-items: center;
  position: relative;
  flex-shrink: 0;
}
.es-art.green { background: var(--green-100); color: var(--green-600); }
.es-art.amber { background: var(--amber-100); color: var(--amber-600); }
.es-art.navy  { background: var(--navy-50);   color: var(--navy-800); }
.es-art.blue  { background: var(--blue-100);  color: var(--blue-600); }

.es-art::before, .es-art::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.06;
  pointer-events: none;
}
.es-art::before { inset: -16px; }
.es-art::after  { inset: -32px; opacity: 0.03; }

.es-title {
  font-size: 18px; font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0;
}
.es-sub {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.55;
  max-width: 420px;
  margin: 0;
}
.es-actions {
  display: flex; gap: 8px;
  margin-top: 6px;
}
.es-meta {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 14px;
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--text-muted);
}
.es-meta b { color: var(--text); font-weight: 600; }

/* ─────────────────────────────────────────────────────────────
   Polish · Micro-interactions
   ───────────────────────────────────────────────────────────── */

/* Confetti — used on approve solicitud */
.mi-confetti {
  position: relative;
  display: inline-block;
}
.mi-confetti::after {
  content: '';
  position: absolute;
  inset: -28px;
  pointer-events: none;
  background-image:
    radial-gradient(circle 3px at 12% 20%, var(--green-600) 100%, transparent),
    radial-gradient(circle 3px at 28% 70%, var(--amber-600) 100%, transparent),
    radial-gradient(circle 3px at 50% 10%, var(--blue-600) 100%, transparent),
    radial-gradient(circle 3px at 70% 60%, var(--rose-600) 100%, transparent),
    radial-gradient(circle 3px at 88% 30%, var(--navy-800) 100%, transparent),
    radial-gradient(circle 2px at 38% 38%, var(--green-600) 100%, transparent),
    radial-gradient(circle 2px at 80% 78%, var(--amber-600) 100%, transparent),
    radial-gradient(circle 2px at 18% 52%, var(--blue-600) 100%, transparent);
  animation: mi-burst 0.9s ease-out forwards;
}
@keyframes mi-burst {
  0%   { transform: scale(0.4); opacity: 0; }
  20%  { opacity: 1; }
  100% { transform: scale(1.4); opacity: 0; }
}

.mi-success-pop {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px;
  background: var(--green-100);
  color: var(--green-600);
  border-radius: 999px;
  font-size: 12px; font-weight: 700;
  animation: mi-pop 0.35s cubic-bezier(.2,.8,.2,1);
}
@keyframes mi-pop {
  0%   { transform: scale(0.6); opacity: 0; }
  60%  { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* Sello de firma — rubber stamp */
.mi-stamp {
  position: relative;
  width: 120px; height: 120px;
  display: grid; place-items: center;
  margin: 6px auto;
}
.mi-stamp-mark {
  border: 3px solid var(--green-600);
  color: var(--green-600);
  border-radius: 50%;
  width: 110px; height: 110px;
  display: grid; place-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px; font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
  line-height: 1.2;
  transform: rotate(-12deg) scale(0.4);
  opacity: 0;
  animation: mi-stamp-drop 0.65s cubic-bezier(.2,.9,.3,1.1) forwards;
}
.mi-stamp-mark span { display: block; font-size: 9px; margin-top: 3px; }
@keyframes mi-stamp-drop {
  0%   { transform: rotate(-22deg) scale(2.4); opacity: 0; }
  60%  { transform: rotate(-12deg) scale(0.96); opacity: 1; }
  100% { transform: rotate(-12deg) scale(1); opacity: 1; }
}
.mi-stamp-ink {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, transparent 60%, rgba(40, 167, 69, 0.08) 70%, transparent 80%);
  pointer-events: none;
}

/* Onboarding celebration */
.mi-celebrate {
  position: relative;
  height: 12px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: visible;
}
.mi-celebrate-fill {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--navy-800), var(--green-600));
  border-radius: 999px;
  width: 0%;
  animation: mi-fill-grow 1.4s cubic-bezier(.2,.8,.2,1) forwards;
}
@keyframes mi-fill-grow { to { width: 100%; } }
.mi-celebrate::after {
  content: '';
  position: absolute;
  top: -28px; left: 0; right: 0; bottom: -28px;
  pointer-events: none;
  background-image:
    radial-gradient(circle 4px at 20% 30%, var(--green-600) 100%, transparent),
    radial-gradient(circle 4px at 45% 90%, var(--amber-600) 100%, transparent),
    radial-gradient(circle 4px at 70% 20%, var(--blue-600) 100%, transparent),
    radial-gradient(circle 3px at 90% 70%, var(--rose-600) 100%, transparent),
    radial-gradient(circle 3px at 30% 70%, var(--navy-800) 100%, transparent),
    radial-gradient(circle 3px at 60% 40%, var(--green-600) 100%, transparent);
  animation: mi-celebrate-rise 1.6s ease-out 0.6s forwards;
  opacity: 0;
}
@keyframes mi-celebrate-rise {
  0%   { opacity: 0; transform: translateY(20px); }
  20%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(-30px); }
}

/* Motor spinner — automation engine running */
.mi-motor {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  background: var(--navy-50);
  border: 1px solid var(--navy-100);
  border-radius: 10px;
  color: var(--navy-800);
  font-weight: 600;
  font-size: 13px;
}
.mi-motor-spinner {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2.5px solid var(--navy-100);
  border-top-color: var(--navy-800);
  animation: mi-spin 0.8s linear infinite;
  flex-shrink: 0;
}
@keyframes mi-spin { to { transform: rotate(360deg); } }
.mi-motor-text::after {
  content: '';
  animation: mi-dots 1.4s steps(4) infinite;
}
@keyframes mi-dots {
  0%   { content: ''; }
  25%  { content: '.'; }
  50%  { content: '..'; }
  75%  { content: '...'; }
}

/* ─────────────────────────────────────────────────────────────
   Polish · Mobile responsive (admin shell)
   ───────────────────────────────────────────────────────────── */

/* Hamburger button (hidden on desktop) */
.tb-burger {
  display: none;
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  color: var(--text);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-right: 4px;
}
.tb-burger:hover { background: var(--surface); }

/* Mobile bottom-tab (hidden on desktop) */
.mob-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: white;
  border-top: 1px solid var(--border);
  padding: 6px 4px 10px;
  z-index: 95;
  grid-template-columns: repeat(5, 1fr);
}
.mob-bottom-nav button {
  background: none; border: none;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 2px;
  cursor: pointer;
  font: inherit; font-size: 10px; font-weight: 500;
  color: var(--text-muted);
}
.mob-bottom-nav button.active { color: var(--navy-800); font-weight: 700; }
.mob-bottom-nav button.active svg { color: var(--navy-800); }
.mob-bottom-nav button svg { color: var(--text-subtle); }

/* Drawer backdrop */
.mob-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  z-index: 99;
  animation: fadeIn 0.15s ease-out;
}

@media (max-width: 760px) {
  .app {
    grid-template-columns: 1fr !important;
  }
  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 280px;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.22s cubic-bezier(.2,.8,.2,1);
    box-shadow: 4px 0 24px rgba(15, 30, 64, 0.18);
  }
  .app.mob-drawer-open .sidebar { transform: translateX(0); }
  .app.mob-drawer-open .mob-drawer-backdrop { display: block; }

  .topbar {
    padding: 0 14px !important;
    gap: 8px !important;
  }
  .tb-burger { display: inline-flex; }
  .crumbs { font-size: 12px; }
  .search { display: none; }
  .top-actions { gap: 4px; }
  .portal-btn { display: none; }

  .main {
    padding: 16px 14px 96px !important;
  }

  .mob-bottom-nav { display: grid; }

  /* Tables → cards stacking */
  .doc-table {
    display: block;
  }
  .doc-table thead { display: none; }
  .doc-table tbody, .doc-table tr {
    display: block;
  }
  .doc-table tbody tr {
    background: white;
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 8px;
    padding: 10px 12px;
  }
  .doc-table tbody tr.selected {
    border-color: var(--navy-800);
    box-shadow: inset 3px 0 0 var(--navy-800);
  }
  .doc-table td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0 !important;
    border: none !important;
    text-align: right;
  }
  .doc-table td::before {
    content: attr(data-label);
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-subtle);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: left;
    flex-shrink: 0;
  }
  .doc-table td:first-child { padding-bottom: 8px !important; border-bottom: 1px dashed var(--border) !important; margin-bottom: 4px; }
  .doc-table td:first-child::before { display: none; }

  /* Generic responsive tightening */
  .row-kpi, .auto-kpis, .tr-kpis, .ats-kpis, .rp-kpi-row {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .doc-grid, .pf-eval-grid, .co-layout, .cf-layout, .to-portal-grid, .ats-vac-bar {
    grid-template-columns: 1fr !important;
  }
  .ats-board { padding-bottom: 8px; }
  .ats-col { flex: 0 0 88%; }

  .modal {
    max-width: 100% !important;
    border-radius: 0 !important;
    height: 100vh;
    max-height: 100vh !important;
  }

  .pf-cycles, .tr-catalog, .epp-matrix-grid, .co-survey-grid, .rp-compliance-grid, .cf-contracts-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Visually disable bottom nav padding when not mobile */
@media (min-width: 761px) {
  .mob-bottom-nav { display: none !important; }
  .mob-drawer-backdrop { display: none !important; }
  .tb-burger { display: none; }
}

/* ─────────────────────────────────────────────────────────────
   Polish · Design system showcase page (ds-*)
   ───────────────────────────────────────────────────────────── */

.ds-grid {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
@media (max-width: 1100px) { .ds-grid { grid-template-columns: 1fr; } }

.ds-panel {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 22px;
  margin-bottom: 16px;
}
.ds-panel-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.ds-panel-title {
  font-size: 16px; font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--text);
  margin: 0;
}
.ds-panel-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 700;
  color: var(--text-subtle);
  background: var(--surface);
  padding: 2px 8px;
  border-radius: 6px;
}

.ds-token-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.ds-token {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: var(--surface);
  border-radius: 8px;
}
.ds-token-swatch {
  width: 36px; height: 36px;
  border-radius: 8px;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.ds-token-name { font-size: 12.5px; font-weight: 700; color: var(--text); }
.ds-token-hex { font-size: 11px; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; margin-top: 2px; }
.ds-token-role { font-size: 10.5px; color: var(--text-subtle); margin-top: 2px; }

.ds-type-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
  align-items: baseline;
}
.ds-type-row:last-child { border-bottom: none; }
.ds-type-meta {
  font-size: 11px;
  color: var(--text-subtle);
  font-family: 'JetBrains Mono', monospace;
}
.ds-type-sample-20 { font-size: 20px; font-weight: 700; letter-spacing: -0.015em; color: var(--text); }
.ds-type-sample-16 { font-size: 16px; font-weight: 700; letter-spacing: -0.005em; color: var(--text); }
.ds-type-sample-14 { font-size: 14px; color: var(--text); }
.ds-type-sample-12 {
  font-size: 12px; color: var(--text-subtle);
  letter-spacing: 0.04em; font-weight: 600;
  text-transform: uppercase;
}

.ds-component-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.ds-component {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  display: flex; flex-direction: column;
  gap: 10px;
}
.ds-component-title {
  font-size: 11px;
  color: var(--text-subtle);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0;
}
.ds-component-row {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
}

.ds-mi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  display: flex; flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
}
.ds-mi-stage {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  display: grid; place-items: center;
  min-height: 140px;
  position: relative;
}
.ds-mi-meta {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

.ds-mi-replay {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 999px;
  font: inherit; font-size: 11px; font-weight: 700;
  color: var(--navy-800);
  cursor: pointer;
  align-self: flex-start;
}
.ds-mi-replay:hover { background: var(--navy-50); border-color: var(--navy-100); }

.ds-mob-frame {
  width: 360px;
  max-width: 100%;
  border: 8px solid var(--text);
  border-radius: 28px;
  overflow: hidden;
  background: var(--surface);
  margin: 0 auto;
  box-shadow: 0 18px 40px rgba(15, 30, 64, 0.18);
}
.ds-mob-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 16px;
  background: white;
  font-size: 12px; font-weight: 700;
  color: var(--text);
}
.ds-mob-content {
  padding: 14px;
  background: var(--surface);
  display: flex; flex-direction: column;
  gap: 10px;
  min-height: 280px;
}
.ds-mob-hint {
  font-size: 11.5px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
}

/* ─────────────────────────────────────────────────────────────
   Payroll module
   ───────────────────────────────────────────────────────────── */

/* Period bar */
.py-period-bar {
  display: flex; align-items: center; gap: 10px;
}
.py-period-select {
  font: inherit;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px; font-weight: 600;
  padding: 8px 12px;
  background: white;
  border: 1px solid var(--navy-100);
  border-radius: 8px;
  color: var(--navy-800);
  cursor: pointer;
  outline: none;
  min-width: 280px;
}
.py-period-select:focus { border-color: var(--navy-800); }

/* Critical alert banner */
.py-alert {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  background: linear-gradient(180deg, var(--rose-100), white 95%);
  border: 1px solid var(--rose-600);
  border-left: 4px solid var(--rose-600);
  border-radius: var(--r-lg);
  margin-bottom: 14px;
  cursor: pointer;
}
.py-alert-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: white;
  color: var(--rose-600);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.py-alert-title {
  font-size: 14px; font-weight: 800;
  color: var(--rose-600);
  letter-spacing: -0.005em;
}
.py-alert-sub {
  font-size: 12.5px;
  color: var(--text);
  margin-top: 3px;
  line-height: 1.5;
}

/* KPIs · 5-up */
.py-kpis {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}
@media (max-width: 1280px) { .py-kpis { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px)  { .py-kpis { grid-template-columns: repeat(2, 1fr); } }

.py-kpi {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  display: flex; flex-direction: column;
  gap: 4px;
}
.py-kpi.highlight {
  background: linear-gradient(135deg, var(--navy-800), var(--navy-900));
  color: white;
  border-color: var(--navy-900);
}
.py-kpi-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px; font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin-top: 6px;
  color: var(--text);
  font-feature-settings: 'tnum';
}
.py-kpi.highlight .py-kpi-num { color: white; }
.py-kpi-num.pos { color: var(--green-600); }
.py-kpi-num.neg { color: var(--rose-600); }
.py-kpi.highlight .py-kpi-num.pos { color: white; }
.py-kpi-foot {
  font-size: 11.5px;
  margin-top: 4px;
}
.py-kpi-foot.up { color: var(--green-600); font-weight: 600; }

.py-tabs { margin-top: 4px; flex-wrap: wrap; }

/* Panel section · cards */
.py-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 22px;
  margin-bottom: 14px;
}
.py-card-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 18px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.py-card-title {
  font-size: 16px; font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 4px 0 0;
}

/* Progress bar with steps */
.py-progress-bar {
  height: 6px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 18px;
}
.py-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--navy-800), var(--green-600));
  border-radius: 999px;
  transition: width 0.4s ease;
}

/* 8 steps */
.py-steps {
  display: flex; flex-direction: column;
}
.py-step {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.py-step:last-child { border-bottom: none; }

.py-step-num {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: grid; place-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px; font-weight: 800;
  flex-shrink: 0;
}
.py-step-done .py-step-num   { background: var(--green-600); border-color: var(--green-600); color: white; }
.py-step-current .py-step-num { background: var(--navy-800); border-color: var(--navy-800); color: white; box-shadow: 0 0 0 4px var(--navy-50); }
.py-step-pending .py-step-num { background: var(--surface);  color: var(--text-subtle); }

.py-step-spin {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white;
  animation: mi-spin 0.8s linear infinite;
}

.py-step-body { flex: 1; min-width: 0; }
.py-step-label {
  font-size: 13.5px; font-weight: 700;
  color: var(--text);
  letter-spacing: -0.005em;
}
.py-step-meta {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 600;
  color: var(--green-600);
  margin-top: 4px;
  font-family: 'JetBrains Mono', monospace;
}
.py-step-pending .py-step-label { color: var(--text-muted); }
.py-step-pending .py-step-meta  { color: var(--text-subtle); font-weight: 500; }
.py-step-current .py-step-meta  { color: var(--navy-800); }

.py-panel-actions {
  display: flex; align-items: center; gap: 10px;
  padding-top: 16px; margin-top: 16px;
  border-top: 1px dashed var(--border);
}

/* Validations checklist */
.py-checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
@media (max-width: 760px) { .py-checks { grid-template-columns: 1fr; } }
.py-check {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px;
  background: var(--surface);
  border-radius: 8px;
}
.py-check-dot {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--green-100);
  color: var(--green-600);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.py-check-dot.warn { background: var(--amber-100); color: var(--amber-600); }
.py-check.warn { background: linear-gradient(90deg, var(--amber-100), white 50%); }

/* Liquidation table */
.py-liq-table tbody td { padding: 12px 14px; }
.py-liq-row { cursor: pointer; }
.py-liq-row.py-liq-error    { background: linear-gradient(90deg, var(--rose-100), white 25%); border-left: 3px solid var(--rose-600); }
.py-liq-row.py-liq-error:hover { background: linear-gradient(90deg, var(--rose-100), white 30%); }
.py-liq-row.py-liq-warn     { background: linear-gradient(90deg, var(--amber-100), white 30%); border-left: 3px solid var(--amber-600); }
.py-liq-row.py-liq-warn:hover { background: linear-gradient(90deg, var(--amber-100), white 35%); }
.py-liq-row.py-liq-suspended { opacity: 0.6; }
.py-liq-row.py-liq-suspended .doc-cell-emp .doc-avatar { background: var(--surface-2); color: var(--text-muted); }

.py-days-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px; font-weight: 800;
  color: var(--text);
}
.py-amount-neg { color: var(--rose-600); }
.py-net {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px; font-weight: 800;
  color: var(--green-600);
  letter-spacing: -0.01em;
}
.py-error-tooltip {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 4px;
  padding: 2px 7px;
  background: var(--rose-100);
  color: var(--rose-600);
  border-radius: 5px;
  font-size: 10.5px;
  font-weight: 600;
  max-width: 240px;
  line-height: 1.4;
}
.py-warn-tooltip {
  margin-top: 4px;
  font-size: 10.5px;
  color: var(--amber-600);
  font-weight: 500;
  max-width: 240px;
  line-height: 1.4;
}

/* Drawer net banner */
.py-drawer-net {
  margin: 0 22px 0;
  padding: 16px 18px;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-900));
  color: white;
  border-radius: 0 0 12px 12px;
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 18px;
}
.py-drawer-net-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 28px; font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1;
  margin-top: 4px;
  color: white;
}
.py-drawer-net-side {
  display: flex; gap: 18px;
  text-align: right;
}

.py-drawer-tabs {
  display: flex;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 22px;
}
.py-drawer-tab {
  background: none; border: none;
  padding: 11px 14px;
  font: inherit; font-size: 12.5px; font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
}
.py-drawer-tab:hover { color: var(--text); }
.py-drawer-tab.active {
  color: var(--navy-800);
  border-bottom-color: var(--navy-800);
  font-weight: 700;
}

.py-detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.py-detail-table th {
  text-align: left;
  font-size: 10.5px; font-weight: 700;
  color: var(--text-subtle);
  letter-spacing: 0.04em; text-transform: uppercase;
  padding: 10px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.py-detail-table tbody td {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
}
.py-detail-table tbody tr.py-detail-subtotal td {
  background: var(--surface);
  border-top: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-strong);
  padding: 10px 14px;
}
.py-detail-table tbody tr.py-detail-total td {
  background: var(--navy-50);
  border: 1px solid var(--navy-100);
  font-size: 13.5px;
  padding: 12px 14px;
}
.py-detail-table tbody tr.py-detail-net td {
  background: var(--green-100);
  border: 1px solid var(--green-600);
  font-size: 14.5px;
  padding: 14px;
  color: var(--green-600);
}
.py-detail-table tbody tr.py-detail-net td .mono { color: var(--green-600); }

/* IBC card */
.py-ibc-card {
  padding: 14px 18px;
  background: var(--navy-50);
  border: 1px solid var(--navy-100);
  border-radius: 12px;
}
.py-ibc-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 26px; font-weight: 800;
  color: var(--navy-800);
  margin-top: 4px;
}
.py-ibc-list {
  list-style: none;
  margin: 8px 0 0; padding: 0;
  display: flex; flex-direction: column; gap: 4px;
}
.py-ibc-list li {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  background: var(--surface);
  border-radius: 7px;
  font-size: 12.5px;
  color: var(--text);
}
.py-ibc-list li svg { color: var(--green-600); flex-shrink: 0; }
.py-ibc-list.muted-list li {
  color: var(--text-muted);
  background: white;
  border: 1px solid var(--border);
}

.py-ibc-banner {
  display: flex; align-items: flex-start; gap: 10px;
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  line-height: 1.5;
}
.py-ibc-banner.ok { background: var(--green-100); }
.py-ibc-banner.ok svg { color: var(--green-600); margin-top: 2px; flex-shrink: 0; }
.py-ibc-banner.warn { background: var(--amber-100); }
.py-ibc-banner.warn svg { color: var(--amber-600); margin-top: 2px; flex-shrink: 0; }

/* Prestaciones · deadlines */
.py-deadlines {
  display: flex; flex-direction: column;
  gap: 10px;
}
.py-deadline {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px;
  background: var(--surface);
  border-radius: 10px;
  border-left: 3px solid var(--rose-600);
}
.py-deadline.past { opacity: 0.6; border-left-color: var(--green-600); }
.py-deadline-date {
  font-size: 14px; font-weight: 800;
  color: var(--rose-600);
  width: 100px;
  flex-shrink: 0;
}
.py-deadline.past .py-deadline-date { color: var(--green-600); }
.py-deadline-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: white;
  color: var(--rose-600);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.py-deadline.past .py-deadline-icon { color: var(--green-600); }
.py-deadline-label { font-size: 13px; font-weight: 700; color: var(--text); }

/* DIAN */
.py-dian-steps {
  display: flex; flex-direction: column;
  gap: 10px;
}
.py-dian-step {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border-radius: 10px;
  border-left: 3px solid var(--green-600);
}
.py-dian-step-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--green-600);
  color: white;
  display: grid; place-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px; font-weight: 800;
  flex-shrink: 0;
}
.py-dian-step-label { font-size: 13px; font-weight: 700; color: var(--text); }

.py-cufe-box {
  display: flex; align-items: center; gap: 12px;
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--green-100);
  border: 1px solid var(--green-600);
  border-radius: 10px;
}
.py-cufe {
  font-size: 11px;
  color: var(--green-600);
  font-weight: 700;
  word-break: break-all;
  margin-top: 2px;
}

/* Bank section */
.py-bank-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 14px 16px;
  background: var(--surface);
  border-radius: 10px;
}
@media (max-width: 760px) { .py-bank-summary { grid-template-columns: repeat(2, 1fr); } }
.py-bank-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 20px; font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-top: 4px;
}
.py-bank-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
}
.py-bank-row:last-child { border-bottom: none; }

/* History · immutable note */
.py-immutable {
  display: flex; align-items: center; gap: 10px;
  margin-top: 14px;
  padding: 12px 16px;
  background: var(--navy-50);
  border: 1px dashed var(--navy-100);
  border-radius: 10px;
  font-size: 12.5px;
  color: var(--text);
  line-height: 1.5;
}
.py-immutable svg { color: var(--navy-800); flex-shrink: 0; }

/* Comprobante PDF */
.py-paystub {
  background: white;
  width: 100%;
  max-width: 720px;
  padding: 30px 36px;
  border: 1px solid var(--border);
  box-shadow: 0 18px 48px rgba(15, 30, 64, 0.18), 0 4px 10px rgba(15, 30, 64, 0.08);
  font-family: var(--font-body);
  display: flex; flex-direction: column; gap: 18px;
}
.py-stub-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--navy-800);
}
.py-stub-brand { display: flex; align-items: center; gap: 12px; }
.py-stub-title {
  font-size: 16px; font-weight: 800;
  color: var(--navy-800);
  text-align: center;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0;
}
.py-stub-period {
  text-align: center;
  font-size: 12.5px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  margin-top: -8px;
}
.py-stub-emp {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border-radius: 8px;
}
.py-stub-val { font-size: 12.5px; font-weight: 700; color: var(--text); margin-top: 3px; }

.py-stub-section {
  display: flex; flex-direction: column;
  gap: 8px;
}
.py-stub-h3 {
  font-size: 11px; font-weight: 800;
  color: var(--navy-800);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--navy-100);
}
.py-stub-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.py-stub-table tbody td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--border);
}
.py-stub-table tbody tr.py-stub-subtotal td {
  background: var(--navy-50);
  border-top: 1px solid var(--navy-800);
  font-size: 13px;
  padding: 10px;
  font-weight: 700;
}
.py-stub-table-alt th { background: var(--navy-50); color: var(--navy-800); }
.py-stub-table th {
  text-align: left;
  font-size: 9.5px; font-weight: 800;
  color: var(--text-subtle);
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 6px 10px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.py-stub-net {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}
.py-stub-net-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.4fr;
  gap: 12px;
}
.py-stub-net-grid > div {
  padding: 10px 14px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.py-stub-net-grid > div.highlight {
  background: linear-gradient(135deg, var(--navy-800), var(--navy-900));
  color: white;
  border-color: var(--navy-900);
}
.py-stub-net-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px; font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: 3px;
  color: var(--text);
}
.py-stub-net-num.neg { color: var(--rose-600); }
.py-stub-net-num.pos { color: white; font-size: 22px; }

.py-stub-foot {
  padding-top: 12px;
  margin-top: 4px;
  border-top: 1px dashed var(--border);
  display: flex; gap: 14px;
  align-items: center;
}

/* Close period modal */
.py-close-checks {
  display: flex; flex-direction: column; gap: 6px;
}
.py-close-check {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: var(--surface);
  border-radius: 8px;
}
.py-close-check.done { background: var(--green-100); }
.py-close-check.pending { background: var(--rose-100); }
.py-close-check-mark {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: grid; place-items: center;
  flex-shrink: 0;
  background: white;
  border: 1.5px solid var(--border-strong);
  color: white;
}
.py-close-check.done .py-close-check-mark {
  background: var(--green-600); border-color: var(--green-600);
}
.py-close-check.pending .py-close-check-mark {
  border-color: var(--rose-600);
}

.py-close-warn {
  display: flex; align-items: flex-start; gap: 10px;
  margin-top: 18px;
  padding: 12px 14px;
  background: var(--rose-100);
  border-radius: 10px;
}
.py-close-warn svg { color: var(--rose-600); margin-top: 2px; flex-shrink: 0; }

/* Sidebar v2 badge */
.nav-badge-v2 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px; font-weight: 800;
  background: var(--aguila-600);
  color: white;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 6px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ─────────────────────────────────────────────────────────────
   ICONTEC compliance · Competencias y Formación (ic-*)
   ───────────────────────────────────────────────────────────── */

/* ─── Banner de catálogo competencias ─── */

.ic-cmp-banner {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--navy-50) 0%, white 100%);
  border: 1px solid var(--navy-100);
  border-left: 4px solid var(--navy-800);
  border-radius: var(--r-lg);
  margin-bottom: 14px;
}
.ic-cmp-banner-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--navy-800);
  color: white;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.ic-cmp-banner-title { font-size: 15px; font-weight: 800; color: var(--text); letter-spacing: -0.01em; }
.ic-cmp-banner-sub   { font-size: 12.5px; color: var(--text-muted); margin-top: 4px; line-height: 1.5; }
.ic-cmp-banner-stat {
  text-align: right;
  padding: 0 14px;
  border-left: 1px dashed var(--navy-100);
}
.ic-cmp-banner-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 28px; font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--navy-800);
}

/* ─── Competencias grid ─── */

.ic-cmp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 12px;
}
.ic-cmp-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px;
  display: flex; flex-direction: column; gap: 8px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.12s, box-shadow 0.15s, transform 0.12s;
}
.ic-cmp-card:hover {
  border-color: var(--navy-100);
  box-shadow: var(--shadow-2);
  transform: translateY(-1px);
}
.ic-cmp-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 4px;
}
.ic-cmp-card.crit-alta::before  { background: var(--rose-600); }
.ic-cmp-card.crit-media::before { background: var(--amber-600); }
.ic-cmp-card.crit-baja::before  { background: var(--text-muted); }

.ic-cmp-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 8px;
}
.ic-cmp-id {
  font-size: 10.5px;
  color: var(--text-subtle);
  font-weight: 700;
}
.ic-cmp-name {
  font-size: 14px; font-weight: 700;
  color: var(--text);
  letter-spacing: -0.005em;
  line-height: 1.3;
  margin-top: 2px;
}
.ic-cmp-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 4px 0 6px;
}
.ic-cmp-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface);
  border-radius: 8px;
}
.ic-cmp-meta-val {
  font-size: 12.5px; font-weight: 700;
  color: var(--text);
  margin-top: 2px;
}
.ic-cmp-norma {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 8px;
  background: var(--navy-50);
  color: var(--navy-800);
  border-radius: 5px;
  font-size: 10.5px;
  font-weight: 600;
  align-self: flex-start;
}

/* ─── Sesiones list ─── */

.ic-ses-list {
  display: flex; flex-direction: column;
  gap: 10px;
}
.ic-ses-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.ic-ses-card.ic-ses-programada { border-left: 4px solid var(--amber-600); }
.ic-ses-card.ic-ses-cerrada    { border-left: 4px solid var(--green-600); }
.ic-ses-card.ic-ses-anulada    { border-left: 4px solid var(--rose-600); opacity: 0.65; }

.ic-ses-head {
  display: flex; gap: 16px;
  padding: 16px 18px;
}

.ic-ses-rail { flex-shrink: 0; }
.ic-ses-date {
  width: 56px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
  background: white;
}
.ic-ses-date.cerrada    { border-color: var(--green-600); }
.ic-ses-date.programada { border-color: var(--amber-600); }
.ic-ses-date-d {
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px; font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  padding: 6px 0 0;
}
.ic-ses-date-m {
  font-size: 10px; font-weight: 700;
  color: var(--rose-600);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0 0 2px;
}
.ic-ses-date-y {
  font-size: 9px;
  color: var(--text-muted);
  background: var(--surface);
  padding: 3px 0;
  border-top: 1px solid var(--border);
}

.ic-ses-meta-top {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 6px;
}
.ic-ses-title {
  font-size: 16px; font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin-bottom: 10px;
}
.ic-ses-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 10px 12px;
  background: var(--surface);
  border-radius: 8px;
}
@media (max-width: 1100px) { .ic-ses-grid { grid-template-columns: repeat(2, 1fr); } }
.ic-ses-val {
  font-size: 12.5px; font-weight: 600;
  color: var(--text);
  margin-top: 3px;
}

.ic-ses-side {
  display: flex; flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
  text-align: right;
}
.ic-ses-passed {
  font-size: 14px;
  color: var(--text-muted);
}
.ic-ses-passed b {
  font-size: 18px;
  color: var(--green-600);
  font-weight: 800;
}

.ic-ses-foot {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.ic-ses-foot-closed {
  background: linear-gradient(90deg, var(--green-100), var(--surface) 50%);
}

.ic-ses-attendees {
  display: flex; gap: 0;
}
.ic-ses-att {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--navy-50);
  color: var(--navy-800);
  border: 2px solid white;
  display: grid; place-items: center;
  font-size: 10.5px; font-weight: 700;
  margin-left: -6px;
  font-family: var(--font-body);
}
.ic-ses-att:first-child { margin-left: 0; }
.ic-ses-att.more { background: var(--surface-2); color: var(--text-muted); }

.ic-ses-evidence-strip {
  display: flex; flex-wrap: wrap; gap: 4px;
}
.ic-ses-evidence-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px;
  background: white;
  border: 1px solid var(--green-600);
  color: var(--green-600);
  border-radius: 999px;
  font-size: 11px; font-weight: 700;
}
.ic-ses-evidence-tag svg { color: var(--green-600); }

/* ─── Bitácora ─── */

.ic-aud-banner {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--navy-50) 0%, white 100%);
  border: 1px solid var(--navy-100);
  border-left: 4px solid var(--navy-800);
  border-radius: var(--r-lg);
  margin-bottom: 14px;
}
.ic-aud-banner-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--navy-800);
  color: white;
  display: grid; place-items: center;
  flex-shrink: 0;
}

.ic-aud-table {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.ic-aud-row {
  display: grid;
  grid-template-columns: 70px 90px 180px 150px minmax(0, 1fr) 180px;
  gap: 12px;
  align-items: center;
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  position: relative;
}
.ic-aud-row::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
}
.ic-aud-row.ic-aud-green::before { background: var(--green-600); }
.ic-aud-row.ic-aud-amber::before { background: var(--amber-600); }
.ic-aud-row.ic-aud-rose::before  { background: var(--rose-600); }
.ic-aud-row.ic-aud-navy::before  { background: var(--navy-800); }
.ic-aud-row:last-child { border-bottom: none; }
.ic-aud-row:hover { background: var(--surface); }

.ic-aud-time { display: flex; flex-direction: column; }
.ic-aud-id { font-size: 10.5px; color: var(--text-subtle); font-weight: 700; }
.ic-aud-action { font-size: 12px; font-weight: 700; color: var(--text); text-transform: capitalize; }
.ic-aud-entity { font-size: 11px; color: var(--navy-800); font-weight: 700; }
.ic-aud-detail { font-size: 11.5px; line-height: 1.4; }
.ic-aud-who { text-align: right; }

@media (max-width: 1100px) {
  .ic-aud-row { grid-template-columns: 1fr 1fr; }
}

/* ─── Captura de sesión modal ─── */

.ic-cap-modal { display: flex; flex-direction: column; }
.ic-cap-head { padding-bottom: 14px; }

.ic-cap-stepper {
  display: flex; align-items: center;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 14px 22px;
  gap: 4px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.ic-cap-step {
  display: inline-flex; align-items: center; gap: 8px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 7px 11px;
  font: inherit; font-size: 12.5px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.12s;
}
.ic-cap-step:disabled { cursor: not-allowed; opacity: 0.6; }
.ic-cap-step-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-muted);
  display: grid; place-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 800;
}
.ic-cap-step-label { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; }
.ic-cap-step.done {
  background: var(--green-100);
  border-color: var(--green-600);
  color: var(--green-600);
}
.ic-cap-step.done .ic-cap-step-num { background: var(--green-600); color: white; }
.ic-cap-step.current {
  background: var(--navy-800);
  border-color: var(--navy-800);
  color: white;
  box-shadow: 0 0 0 4px var(--navy-50);
}
.ic-cap-step.current .ic-cap-step-num { background: white; color: var(--navy-800); }
.ic-cap-step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  min-width: 12px;
  max-width: 36px;
}
.ic-cap-step-line.done { background: var(--green-600); }

.ic-cap-body {
  flex: 1;
  overflow-y: auto;
  padding: 22px 26px;
  background: var(--surface);
}
.ic-cap-section {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px 24px;
}
.ic-cap-h3 {
  font-size: 17px; font-weight: 800;
  color: var(--text);
  letter-spacing: -0.015em;
  margin: 0 0 4px;
}

/* Step 1 setup */
.ic-cap-setup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}
@media (max-width: 760px) { .ic-cap-setup-grid { grid-template-columns: 1fr; } }
.ic-cap-field {
  padding: 12px 14px;
  background: var(--surface);
  border-radius: 10px;
}
.ic-cap-field-val {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  margin-top: 3px;
}
.ic-cap-version {
  font: inherit; font-size: 13px;
  width: 100%;
  padding: 9px 12px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  margin-top: 4px;
  outline: none;
}
.ic-cap-version:focus { border-color: var(--navy-800); }

/* Step 2 attendance */
.ic-cap-att-bar {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px;
  background: var(--surface);
  border-radius: 10px;
  margin: 14px 0;
}
.ic-cap-att-stat {
  font-size: 13px;
}
.ic-cap-att-stat b {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  color: var(--text);
  margin-right: 4px;
}

.ic-cap-att-list {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.ic-cap-att-head, .ic-cap-att-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1.4fr) minmax(0, 1fr) 110px 80px minmax(0, 1.2fr);
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
}
.ic-cap-att-head {
  background: var(--surface);
  font-size: 10.5px; font-weight: 700;
  color: var(--text-subtle);
  letter-spacing: 0.04em; text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
.ic-cap-att-row {
  border-bottom: 1px solid var(--border);
}
.ic-cap-att-row:last-child { border-bottom: none; }
.ic-cap-att-row.present { background: linear-gradient(90deg, var(--blue-100), white 30%); }
.ic-cap-att-row.signed  { background: linear-gradient(90deg, var(--green-100), white 30%); }

.ic-cap-att-check input { width: 16px; height: 16px; accent-color: var(--green-600); }

.ic-cap-channel {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: white;
  overflow: hidden;
}
.ic-cap-channel button {
  background: white;
  border: none;
  padding: 4px 10px;
  font: inherit; font-size: 11px; font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-right: 1px solid var(--border);
}
.ic-cap-channel button:last-child { border-right: none; }
.ic-cap-channel button.active { background: var(--navy-800); color: white; }
.ic-cap-channel button:disabled { opacity: 0.4; cursor: not-allowed; }

.ic-cap-signed-tag {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--green-100);
  color: var(--green-600);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.ic-cap-info {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px;
  background: var(--navy-50);
  border-radius: 10px;
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--text);
  line-height: 1.5;
}
.ic-cap-info svg { color: var(--navy-800); margin-top: 2px; flex-shrink: 0; }

/* Step 3 evaluation */
.ic-cap-eval-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 14px;
}
@media (max-width: 980px) { .ic-cap-eval-grid { grid-template-columns: 1fr; } }

.ic-cap-eval-questions {
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px;
  background: var(--surface);
  border-radius: 10px;
  max-height: 540px;
  overflow-y: auto;
}
.ic-cap-q {
  display: flex; gap: 12px;
  padding: 12px 14px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.ic-cap-q-num {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--navy-50);
  color: var(--navy-800);
  display: grid; place-items: center;
  font-size: 11.5px; font-weight: 800;
  flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace;
}
.ic-cap-q-text { font-size: 12.5px; font-weight: 600; color: var(--text); line-height: 1.45; }
.ic-cap-q-opts {
  list-style: lower-alpha;
  padding-left: 22px;
  margin: 8px 0 0;
  display: flex; flex-direction: column; gap: 3px;
  font-size: 11.5px;
  color: var(--text-muted);
}
.ic-cap-q-opts li.correct {
  color: var(--green-600);
  font-weight: 700;
}
.ic-cap-q-opts li.correct::after { content: ' ✓'; }

.ic-cap-eval-side {
  display: flex; flex-direction: column; gap: 8px;
  max-height: 540px;
  overflow-y: auto;
}
.ic-cap-eval-att {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}
.ic-cap-eval-mini {
  display: flex; flex-direction: column; gap: 4px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}
.ic-cap-eval-q-mini {
  display: flex; align-items: center; gap: 6px;
}
.ic-cap-eval-mini-opts {
  display: flex; gap: 3px;
  flex: 1;
  justify-content: flex-end;
}
.ic-cap-eval-mini-opts button {
  width: 20px; height: 20px;
  border-radius: 4px;
  background: white;
  border: 1px solid var(--border);
  font: inherit; font-size: 10px; font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
}
.ic-cap-eval-mini-opts button:hover { background: var(--navy-50); border-color: var(--navy-800); color: var(--navy-800); }
.ic-cap-eval-mini-opts button.picked.correct { background: var(--green-600); border-color: var(--green-600); color: white; }
.ic-cap-eval-mini-opts button.picked.wrong   { background: var(--rose-600);  border-color: var(--rose-600);  color: white; }
.ic-cap-eval-mini-opts button.picked:not(.correct):not(.wrong) { background: var(--navy-800); color: white; border-color: var(--navy-800); }
.ic-cap-eval-score {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px; font-weight: 800;
  padding: 3px 9px;
  border-radius: 6px;
}
.ic-cap-eval-score.pass { background: var(--green-100); color: var(--green-600); }
.ic-cap-eval-score.fail { background: var(--rose-100);  color: var(--rose-600); }

/* Step 4 evidences */
.ic-cap-ev-required {
  display: flex; gap: 10px;
  margin: 14px 0;
}
.ic-cap-ev-req {
  flex: 1;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: var(--rose-100);
  color: var(--rose-600);
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 700;
}
.ic-cap-ev-req.ok {
  background: var(--green-100);
  color: var(--green-600);
}

.ic-cap-ev-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}
.ic-cap-ev {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.ic-cap-ev.ic-cap-ev-acta {
  background: linear-gradient(90deg, var(--green-100), white 50%);
  border-color: var(--green-600);
}
.ic-cap-ev-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: var(--navy-50);
  color: var(--navy-800);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.ic-cap-ev-acta .ic-cap-ev-icon { background: var(--green-600); color: white; }
.ic-cap-ev-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
}
.ic-cap-ev-add {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px;
  padding: 14px;
  background: var(--surface);
  border: 1.5px dashed var(--border-strong);
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  text-align: center;
  transition: border-color 0.12s, background 0.12s;
}
.ic-cap-ev-add:hover { border-color: var(--navy-800); background: var(--navy-50); }
.ic-cap-ev-add svg { color: var(--text-subtle); }
.ic-cap-ev-add:hover svg { color: var(--navy-800); }

/* Step 5 results */
.ic-cap-res-summary {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  padding: 14px;
  background: var(--surface);
  border-radius: 10px;
  margin: 14px 0;
}
@media (max-width: 760px) { .ic-cap-res-summary { grid-template-columns: repeat(2, 1fr); } }
.ic-cap-res-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px; font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-top: 2px;
}
.ic-cap-res-num.pos { color: var(--green-600); }
.ic-cap-res-num.neg { color: var(--rose-600); }

.ic-cap-res-list {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.ic-cap-res-head, .ic-cap-res-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 130px 80px 130px minmax(0, 1.2fr) 140px;
  gap: 12px;
  align-items: center;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
}
.ic-cap-res-head {
  background: var(--surface);
  font-size: 10.5px; font-weight: 700;
  color: var(--text-subtle);
  letter-spacing: 0.04em; text-transform: uppercase;
}
.ic-cap-res-row { font-size: 12.5px; }
.ic-cap-res-row.pass   { background: linear-gradient(90deg, var(--green-100), white 25%); }
.ic-cap-res-row.fail   { background: linear-gradient(90deg, var(--rose-100), white 25%); }
.ic-cap-res-row.absent { opacity: 0.55; }
.ic-cap-res-row:last-child { border-bottom: none; }

.ic-cap-res-comment {
  font: inherit; font-size: 11.5px;
  width: 100%;
  padding: 6px 9px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  outline: none;
}
.ic-cap-res-comment:focus { border-color: var(--navy-800); }

/* Step 6 close */
.ic-cap-close-summary {
  margin-top: 14px;
}
.ic-cap-close-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (max-width: 760px) { .ic-cap-close-grid { grid-template-columns: 1fr; } }
.ic-cap-close-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: var(--green-100);
  color: var(--green-600);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
}
.ic-cap-close-item .muted { color: rgba(40, 167, 69, 0.65); margin-left: auto; }

.ic-cap-close-warn {
  display: flex; align-items: flex-start; gap: 12px;
  margin-top: 14px;
  padding: 14px 16px;
  background: var(--rose-100);
  border-radius: 10px;
  border-left: 3px solid var(--rose-600);
}
.ic-cap-close-warn svg { color: var(--rose-600); margin-top: 2px; flex-shrink: 0; }

.ic-cap-closed {
  padding: 24px 20px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
  gap: 14px;
}
.ic-cap-closed-evidence {
  display: flex; flex-direction: column;
  width: 100%;
  max-width: 520px;
  margin: 8px auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.ic-cap-closed-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 10px;
  align-items: center;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.ic-cap-closed-row:last-child { border-bottom: none; }

/* Capture footer · validation */
.ic-cap-foot { gap: 10px; }
.ic-cap-validation {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
}
.ic-cap-validation.ok   { background: var(--green-100); color: var(--green-600); }
.ic-cap-validation.warn { background: var(--amber-100); color: var(--amber-600); }

/* ─── Profile · Competencias y Formación ─── */

.ic-prof {
  display: flex; flex-direction: column;
  gap: 22px;
}

.ic-prof-hero {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  padding: 18px 22px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  color: var(--text);
}
@media (max-width: 980px) { .ic-prof-hero { grid-template-columns: 1fr; text-align: center; gap: 16px; } }

.ic-prof-donut { display: grid; place-items: center; }
.ic-prof-donut-svg { width: 120px; height: 120px; }

.ic-prof-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
@media (max-width: 760px) { .ic-prof-stats { grid-template-columns: repeat(2, 1fr); } }

.ic-prof-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  position: relative;
  overflow: hidden;
}
.ic-prof-stat::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--text-muted);
  opacity: 0.35;
}
.ic-prof-stat.green::before { background: var(--green-600); opacity: 1; }
.ic-prof-stat.amber::before { background: var(--amber-600); opacity: 1; }
.ic-prof-stat.rose::before  { background: var(--rose-600);  opacity: 1; }

.ic-prof-stat-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 24px; font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1;
}
.ic-prof-stat.green .ic-prof-stat-num { color: var(--green-600); }
.ic-prof-stat.amber .ic-prof-stat-num { color: var(--amber-600); }
.ic-prof-stat.rose  .ic-prof-stat-num { color: var(--rose-600); }

.ic-prof-stat-lbl {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.35;
  font-weight: 500;
}

.ic-prof-actions {
  display: flex; flex-direction: column; gap: 6px;
}

.ic-prof-section {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 22px;
}
.ic-prof-section-head {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.ic-prof-section-head h3 {
  font-size: 15px; font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
  margin: 0;
}

.ic-prof-immut {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px;
  background: var(--navy-50);
  color: var(--navy-800);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

/* Competencia chips */
.ic-prof-cmp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}
.ic-prof-cmp {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex; flex-direction: column;
  gap: 4px;
  position: relative;
  overflow: hidden;
}
.ic-prof-cmp::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.ic-prof-cmp-vigente::before    { background: var(--green-600); }
.ic-prof-cmp-curso::before      { background: var(--amber-600); }
.ic-prof-cmp-vencida::before    { background: var(--rose-600); }
.ic-prof-cmp-pendiente::before  { background: var(--text-muted); }

.ic-prof-cmp-status {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 0;
}
.ic-prof-cmp-vigente .ic-prof-cmp-status   { color: var(--green-600); }
.ic-prof-cmp-curso .ic-prof-cmp-status     { color: var(--amber-600); }
.ic-prof-cmp-vencida .ic-prof-cmp-status   { color: var(--rose-600); }
.ic-prof-cmp-pendiente .ic-prof-cmp-status { color: var(--text-muted); }

.ic-prof-cmp-name {
  font-size: 13px; font-weight: 700;
  color: var(--text);
  letter-spacing: -0.005em;
  line-height: 1.3;
  margin: 4px 0;
}
.ic-prof-cmp-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--border);
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--text);
}

.ic-prof-score-top { color: var(--green-600); }
.ic-prof-score-ok  { color: var(--text); }

.ic-prof-evidence-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px;
  background: var(--green-100);
  color: var(--green-600);
  border-radius: 6px;
  font-size: 11px; font-weight: 700;
}

/* Inmutable timeline */
.ic-prof-timeline {
  display: flex; flex-direction: column;
}
.ic-prof-tl {
  display: flex; gap: 14px;
  padding-bottom: 12px;
}
.ic-prof-tl-rail {
  display: flex; flex-direction: column; align-items: center;
  flex-shrink: 0;
}
.ic-prof-tl-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.ic-prof-tl-completed .ic-prof-tl-dot   { background: var(--green-100); color: var(--green-600); }
.ic-prof-tl-expired   .ic-prof-tl-dot   { background: var(--rose-100);  color: var(--rose-600); }
.ic-prof-tl-inProgress .ic-prof-tl-dot  { background: var(--amber-100); color: var(--amber-600); }
.ic-prof-tl-line {
  flex: 1;
  width: 1px;
  background: var(--border);
  margin-top: 4px;
  min-height: 16px;
}
.ic-prof-tl-body {
  flex: 1;
  background: var(--surface);
  border-radius: 10px;
  padding: 12px 14px;
  border-left: 3px solid var(--border);
}
.ic-prof-tl-completed .ic-prof-tl-body  { border-left-color: var(--green-600); }
.ic-prof-tl-expired   .ic-prof-tl-body  { border-left-color: var(--rose-600); }
.ic-prof-tl-inProgress .ic-prof-tl-body { border-left-color: var(--amber-600); }
.ic-prof-tl-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 14px;
}
.ic-prof-tl-label {
  font-size: 13px; font-weight: 700;
  color: var(--text);
  line-height: 1.35;
}

/* ─────────────────────────────────────────────────────────────
   Sprint 2 · Editor de competencias (cf-vers-*, cf-cmp-*)
   ───────────────────────────────────────────────────────────── */

.cf-cmp-edit-head {
  display: flex; align-items: flex-start; gap: 18px;
  padding: 18px 22px;
  background: linear-gradient(135deg, var(--navy-50) 0%, white 100%);
  border: 1px solid var(--navy-100);
  border-left: 4px solid var(--navy-800);
  border-radius: var(--r-lg);
}
.cf-cmp-edit-name {
  font-size: 22px; font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--text);
  margin: 6px 0 0;
}
.cf-cmp-edit-norma {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 12px;
  padding: 5px 11px;
  background: white;
  color: var(--navy-800);
  border-radius: 6px;
  font-size: 12px; font-weight: 600;
  border: 1px solid var(--navy-100);
}

.cf-vers-banner {
  display: flex; align-items: center; gap: 18px;
  padding: 14px 18px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  margin: 18px 0 14px;
}
.cf-vers-current {
  padding-right: 18px;
  border-right: 1px dashed var(--border);
}
.cf-vers-current-num {
  font-size: 24px; font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--navy-800);
  margin: 4px 0 2px;
}

.cf-vers-new {
  display: flex; flex-direction: column;
  gap: 6px;
  flex: 1;
  max-width: 480px;
}
.cf-vers-new-input {
  font: inherit; font-size: 12.5px;
  width: 100%;
  padding: 9px 12px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  resize: vertical;
  outline: none;
  line-height: 1.5;
}
.cf-vers-new-input:focus { border-color: var(--navy-800); box-shadow: 0 0 0 3px var(--navy-50); }

.cf-vers-list {
  display: flex; flex-direction: column;
}
.cf-vers-card {
  display: flex; gap: 14px;
  padding-bottom: 12px;
}
.cf-vers-rail {
  display: flex; flex-direction: column; align-items: center;
  flex-shrink: 0;
}
.cf-vers-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-muted);
  display: grid; place-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; font-weight: 800;
  flex-shrink: 0;
}
.cf-vers-card.current .cf-vers-dot { background: var(--green-600); color: white; }
.cf-vers-line {
  flex: 1;
  width: 2px;
  background: var(--border);
  margin-top: 4px;
  min-height: 18px;
}
.cf-vers-card.current .cf-vers-line { background: var(--green-600); }
.cf-vers-body {
  flex: 1;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px 18px;
}
.cf-vers-card.current .cf-vers-body {
  border-color: var(--green-600);
  background: linear-gradient(135deg, var(--green-100) 0%, white 30%);
}
.cf-vers-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 18px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border);
}
.cf-vers-num {
  font-size: 22px; font-weight: 800;
  color: var(--navy-800);
  letter-spacing: -0.01em;
}
.cf-vers-stats {
  display: flex; gap: 14px;
  text-align: right;
}
.cf-vers-stat-val {
  font-size: 18px; font-weight: 800;
  color: var(--text);
  margin-top: 2px;
  letter-spacing: -0.01em;
}
.cf-vers-changes { padding-top: 4px; }
.cf-vers-changelog {
  list-style: none;
  margin: 0; padding: 0;
  display: flex; flex-direction: column;
  gap: 5px;
}
.cf-vers-changelog li {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  background: var(--surface);
  border-radius: 7px;
  font-size: 12.5px;
  color: var(--text);
}
.cf-vers-changelog li svg { color: var(--green-600); flex-shrink: 0; }

.cf-vers-immut {
  display: flex; align-items: flex-start; gap: 10px;
  margin-top: 14px;
  padding: 12px 16px;
  background: var(--navy-50);
  border: 1px dashed var(--navy-100);
  border-radius: 10px;
}
.cf-vers-immut svg { color: var(--navy-800); flex-shrink: 0; margin-top: 2px; }

.cf-cmp-fields {
  display: flex; flex-direction: column;
  gap: 14px;
}

/* ─────────────────────────────────────────────────────────────
   Sprint 2 · Verificador público (cv-*)
   ───────────────────────────────────────────────────────────── */

.cv-shell {
  min-height: 100vh;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #ECEEF5 0%, #E1E5F0 50%, #ECEEF5 100%);
}

.cv-topbar {
  background: white;
  border-bottom: 1px solid var(--border);
}
.cv-topbar-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex; justify-content: space-between; align-items: center;
}
.cv-brand {
  display: flex; align-items: center; gap: 12px;
}
.cv-brand-mark {
  width: 38px; height: 38px;
  border-radius: 9px;
  display: grid; place-items: center;
  font-weight: 800; font-size: 20px;
  color: white;
  flex-shrink: 0;
}
.cv-brand-mark.plataforma { background: var(--navy-800); }
.cv-brand-mark.client  { background: var(--teal-800); }
.cv-brand-name {
  font-size: 15px; font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
}
.cv-brand-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 1px;
}
.cv-topbar-right { display: flex; align-items: center; gap: 10px; }
.cv-secure-tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px;
  background: var(--green-100);
  color: var(--green-600);
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
}

.cv-main {
  flex: 1;
  max-width: 880px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 24px 60px;
  display: flex; flex-direction: column;
  gap: 16px;
}

/* Status banner */
.cv-status {
  display: flex; align-items: center; gap: 18px;
  padding: 22px 26px;
  border-radius: var(--r-lg);
  position: relative;
  overflow: hidden;
}
.cv-status-green { background: linear-gradient(135deg, var(--green-100) 0%, white 80%); border: 2px solid var(--green-600); }
.cv-status-amber { background: linear-gradient(135deg, var(--amber-100) 0%, white 80%); border: 2px solid var(--amber-600); }
.cv-status-rose  { background: linear-gradient(135deg, var(--rose-100) 0%, white 80%);  border: 2px solid var(--rose-600); }

.cv-status-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  display: grid; place-items: center;
  flex-shrink: 0;
  background: white;
}
.cv-status-icon.green { color: var(--green-600); }
.cv-status-icon.amber { color: var(--amber-600); }
.cv-status-icon.rose  { color: var(--rose-600); }

.cv-status-label {
  font-size: 22px; font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--text);
}
.cv-status-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-top: 4px;
}
.cv-status-code {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--navy-800);
  background: white;
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-block;
  margin-top: 10px;
}

.cv-status-vigencia {
  text-align: right;
  flex-shrink: 0;
  padding-left: 18px;
  border-left: 1px dashed rgba(0, 0, 0, 0.1);
}
.cv-status-vig-num {
  font-size: 32px; font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1;
  color: var(--text);
  margin: 6px 0 4px;
}
.cv-status-vig-num small { font-size: 13px; font-weight: 600; color: var(--text-muted); }

/* Card común */
.cv-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px 30px;
  box-shadow: 0 4px 12px rgba(15, 30, 64, 0.06);
}

.cv-card-head {
  display: flex; align-items: center; gap: 18px;
  padding-bottom: 18px;
  margin-bottom: 24px;
  border-bottom: 1px dashed var(--navy-100);
}
.cv-card-divider {
  width: 1px;
  height: 32px;
  background: var(--border);
}
.cv-card-brand { display: flex; align-items: center; gap: 12px; flex: 1; }
.cv-card-org-name {
  font-size: 12.5px; font-weight: 800;
  color: var(--text);
  letter-spacing: 0.02em;
}

.cv-card-body {
  text-align: center;
  display: flex; flex-direction: column;
  align-items: center;
}

.cv-eyebrow {
  font-size: 11px; font-weight: 800;
  color: var(--navy-800);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.cv-pre {
  font-size: 12.5px;
  color: var(--text-muted);
  font-style: italic;
  margin: 6px 0;
}
.cv-name {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 36px; font-weight: 700;
  color: var(--navy-900);
  margin: 4px 0;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.cv-doc {
  font-size: 12.5px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 14px;
}
.cv-course {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 22px;
  font-style: italic;
  font-weight: 600;
  color: var(--text);
  margin: 6px 30px 22px;
  line-height: 1.35;
}

.cv-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  width: 100%;
  max-width: 600px;
  padding: 14px 18px;
  background: var(--surface);
  border-radius: 10px;
  margin-bottom: 12px;
}
.cv-meta-val {
  font-size: 13.5px; font-weight: 700;
  color: var(--text);
  margin-top: 4px;
}
.cv-meta-val.pos { color: var(--green-600); font-size: 18px; }
@media (max-width: 760px) { .cv-meta { grid-template-columns: repeat(2, 1fr); } }

/* Cadena de evidencia */
.cv-evidence {
  background: linear-gradient(180deg, white 0%, var(--surface) 100%);
}
.cv-evidence-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 18px;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.cv-evidence-title {
  font-size: 18px; font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--text);
  margin: 0;
}
.cv-evidence-sub {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 6px 0 0;
  max-width: 560px;
}
.cv-evidence-shield {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--navy-50);
  color: var(--navy-800);
  display: grid; place-items: center;
  flex-shrink: 0;
}

.cv-evidence-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (max-width: 760px) { .cv-evidence-grid { grid-template-columns: 1fr; } }
.cv-ev {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.cv-ev.ok { border-color: var(--green-600); background: linear-gradient(90deg, var(--green-100), white 50%); }
.cv-ev-icon {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--green-600);
  color: white;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.cv-ev-label {
  font-size: 12.5px; font-weight: 700;
  color: var(--text);
}
.cv-ev-detail {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.45;
}

/* Hash + QR tail */
.cv-tail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1px auto;
  gap: 24px;
  align-items: center;
}
@media (max-width: 760px) { .cv-tail { grid-template-columns: 1fr; } .cv-tail-divider { display: none; } }
.cv-tail-left {
  display: flex; flex-direction: column;
  gap: 8px;
}
.cv-hash {
  font-size: 11px;
  color: var(--text);
  background: var(--surface);
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  word-break: break-all;
  line-height: 1.6;
  font-weight: 600;
}
.cv-tail-explain {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 4px;
}
.cv-tail-divider {
  background: var(--border);
  height: 100%;
  min-height: 100px;
}
.cv-tail-right {
  display: flex; flex-direction: column;
  align-items: center;
}
.cv-qr {
  display: grid;
  grid-template-columns: repeat(21, 1fr);
  grid-template-rows: repeat(21, 1fr);
  background: white;
  padding: 6px;
  border: 1px solid var(--text);
  border-radius: 6px;
}
.cv-qr span {
  background: white;
}
.cv-qr span.on {
  background: #0A1020;
}

/* Bitácora pública */
.cv-bitacora {
  display: flex; flex-direction: column;
}
.cv-bit {
  display: grid;
  grid-template-columns: 12px 140px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.cv-bit:last-child { border-bottom: none; }
.cv-bit-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  margin: 0 auto;
}
.cv-bit-green .cv-bit-dot { background: var(--green-600); box-shadow: 0 0 0 3px var(--green-100); }
.cv-bit-navy  .cv-bit-dot { background: var(--navy-800); box-shadow: 0 0 0 3px var(--navy-50); }
.cv-bit-time {
  font-size: 11px;
  color: var(--text-muted);
}
.cv-bit-text {
  font-size: 12.5px;
  color: var(--text);
  font-weight: 600;
}

/* Legal footer */
.cv-legal {
  background: var(--navy-50);
  border-radius: var(--r-lg);
  padding: 18px 22px;
}
.cv-legal-block {
  display: flex; align-items: flex-start; gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px dashed var(--navy-100);
}
.cv-legal-block svg { color: var(--navy-800); margin-top: 2px; flex-shrink: 0; }
.cv-legal-meta {
  display: flex; gap: 12px;
  flex-wrap: wrap;
}

.cv-footer {
  background: white;
  border-top: 1px solid var(--border);
  padding: 18px 24px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  display: flex; flex-direction: column;
  gap: 4px;
  align-items: center;
}

/* ─────────────────────────────────────────────────────────────
   Sprint 2 · Reportes ICONTEC (ic-rp-*)
   ───────────────────────────────────────────────────────────── */

.ic-rp { display: flex; flex-direction: column; gap: 14px; }

.ic-rp-subnav {
  display: flex; gap: 4px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  flex-wrap: wrap;
}
.ic-rp-tab {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent;
  border: none;
  padding: 8px 14px;
  font: inherit; font-size: 12.5px; font-weight: 600;
  color: var(--text-muted);
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.ic-rp-tab:hover { background: white; color: var(--text); }
.ic-rp-tab.active {
  background: var(--navy-800);
  color: white;
  box-shadow: 0 2px 6px rgba(15, 30, 64, 0.18);
}
.ic-rp-tab.active svg { color: white; }

.ic-rp-banner {
  display: flex; align-items: center; gap: 18px;
  padding: 16px 20px;
  border-radius: var(--r-lg);
  border-left: 4px solid;
}
.ic-rp-banner.green { background: linear-gradient(135deg, var(--green-100), white 80%); border-left-color: var(--green-600); }
.ic-rp-banner.amber { background: linear-gradient(135deg, var(--amber-100), white 80%); border-left-color: var(--amber-600); }
.ic-rp-banner.rose  { background: linear-gradient(135deg, var(--rose-100), white 80%);  border-left-color: var(--rose-600); }

.ic-rp-banner-shield {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: white;
  color: var(--navy-800);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.ic-rp-banner.amber .ic-rp-banner-shield { color: var(--amber-600); }
.ic-rp-banner.rose .ic-rp-banner-shield { color: var(--rose-600); }
.ic-rp-banner.green .ic-rp-banner-shield { color: var(--green-600); }
.ic-rp-banner-title {
  font-size: 16px; font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
}
.ic-rp-banner-sub {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.5;
}

.ic-rp-traffic-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 1100px) { .ic-rp-traffic-grid { grid-template-columns: repeat(2, 1fr); } }

.ic-rp-traffic {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
}
.ic-rp-traffic::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
}
.ic-rp-traffic.green::before { background: var(--green-600); }
.ic-rp-traffic.amber::before { background: var(--amber-600); }
.ic-rp-traffic.rose::before  { background: var(--rose-600); }

.ic-rp-traffic-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: grid; place-items: center;
  margin-bottom: 8px;
}
.ic-rp-traffic.green .ic-rp-traffic-icon { background: var(--green-100); color: var(--green-600); }
.ic-rp-traffic.amber .ic-rp-traffic-icon { background: var(--amber-100); color: var(--amber-600); }
.ic-rp-traffic.rose  .ic-rp-traffic-icon { background: var(--rose-100);  color: var(--rose-600); }

.ic-rp-traffic-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 30px; font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1;
  color: var(--text);
  margin: 4px 0 6px;
}
.ic-rp-traffic-num small { font-size: 16px; color: var(--text-muted); font-weight: 700; }
.ic-rp-traffic-lbl {
  font-size: 12.5px; font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}

/* 2-col grid */
.ic-rp-2col {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 14px;
}
@media (max-width: 1100px) { .ic-rp-2col { grid-template-columns: 1fr; } }

.ic-rp-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 22px;
}
.ic-rp-card-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 18px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.ic-rp-card-head h3 {
  font-size: 15px; font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0;
}

/* Top problemas */
.ic-rp-top-list {
  display: flex; flex-direction: column;
  gap: 12px;
}
.ic-rp-top-row {
  display: flex; align-items: center; gap: 14px;
}
.ic-rp-top-rank {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--navy-50);
  color: var(--navy-800);
  display: grid; place-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; font-weight: 800;
  flex-shrink: 0;
}

/* Checklist */
.ic-rp-checklist {
  display: flex; flex-direction: column;
  gap: 6px;
}
.ic-rp-check {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 12px;
  background: var(--surface);
  border-radius: 8px;
}
.ic-rp-check.pending { background: linear-gradient(90deg, var(--rose-100), white 50%); }
.ic-rp-check-mark {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: grid; place-items: center;
  flex-shrink: 0;
  border: 1.5px solid var(--border-strong);
  background: white;
  color: white;
  margin-top: 1px;
}
.ic-rp-check-mark.ok { background: var(--green-600); border-color: var(--green-600); }
.ic-rp-check-mark.pending { border-color: var(--rose-600); }

/* Quick reports cards */
.ic-rp-quick {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 22px;
}
.ic-rp-quick h3 {
  font-size: 15px; font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0 0 12px;
}
.ic-rp-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}
.ic-rp-quick-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color 0.12s, transform 0.12s, box-shadow 0.12s;
}
.ic-rp-quick-card:hover {
  border-color: var(--navy-100);
  transform: translateY(-1px);
  box-shadow: var(--shadow-2);
}
.ic-rp-quick-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.ic-rp-quick-card.navy  .ic-rp-quick-icon { background: var(--navy-50);   color: var(--navy-800); }
.ic-rp-quick-card.blue  .ic-rp-quick-icon { background: var(--blue-100);  color: var(--blue-600); }
.ic-rp-quick-card.green .ic-rp-quick-icon { background: var(--green-100); color: var(--green-600); }
.ic-rp-quick-card.amber .ic-rp-quick-icon { background: var(--amber-100); color: var(--amber-600); }
.ic-rp-quick-card.rose  .ic-rp-quick-icon { background: var(--rose-100);  color: var(--rose-600); }

/* Heatmap */
.ic-rp-heatmap-wrap { overflow-x: auto; }
.ic-rp-heatmap {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.ic-rp-heatmap thead th {
  padding: 10px 6px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-size: 10.5px; font-weight: 800;
  color: var(--text-subtle);
  letter-spacing: 0.04em;
  text-align: center;
  min-width: 70px;
}
.ic-rp-heatmap tbody th {
  padding: 10px 14px;
  text-align: left;
  font-size: 12.5px; font-weight: 700;
  color: var(--text);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.ic-rp-heatmap tbody td {
  padding: 8px 4px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
}
.ic-rp-cell {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
}
.ic-rp-cell-top  { background: var(--green-100); color: var(--green-600); }
.ic-rp-cell-good { background: #FEF3C7; color: #854D0E; }
.ic-rp-cell-warn { background: var(--amber-100); color: var(--amber-600); }
.ic-rp-cell-crit { background: var(--rose-100);  color: var(--rose-600); }
.ic-rp-cell-na   { background: var(--surface-2); color: var(--text-subtle); }

.ic-rp-heatmap-legend {
  display: flex; gap: 14px;
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px dashed var(--border);
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--text-muted);
}
.ic-rp-cell-swatch {
  display: inline-block;
  width: 14px; height: 14px;
  border-radius: 3px;
  margin-right: 5px;
  vertical-align: middle;
}
.ic-rp-cell-swatch.top  { background: var(--green-100); border: 1px solid var(--green-600); }
.ic-rp-cell-swatch.good { background: #FEF3C7; border: 1px solid #854D0E; }
.ic-rp-cell-swatch.warn { background: var(--amber-100); border: 1px solid var(--amber-600); }
.ic-rp-cell-swatch.crit { background: var(--rose-100);  border: 1px solid var(--rose-600); }
.ic-rp-cell-swatch.na   { background: var(--surface-2); border: 1px solid var(--border); }

/* Individual report */
.ic-rp-search-bar {
  display: flex; gap: 12px;
  margin: 14px 0;
  align-items: center;
}

.ic-rp-individual-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 18px 22px;
}
.ic-rp-individual-head {
  display: flex; align-items: center; gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--border);
}
.ic-rp-individual-stats {
  display: flex; gap: 18px;
  text-align: right;
}

.ic-rp-individual-explain {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px;
  background: var(--navy-50);
  border-radius: 10px;
  margin: 16px 0;
  font-size: 12.5px;
  color: var(--text);
  line-height: 1.5;
}
.ic-rp-individual-explain svg { color: var(--navy-800); margin-top: 2px; flex-shrink: 0; }

.ic-rp-individual-preview {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 18px;
}
.ic-rp-doc-pages {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
@media (max-width: 760px) { .ic-rp-doc-pages { grid-template-columns: repeat(2, 1fr); } }
.ic-rp-doc-page {
  aspect-ratio: 0.77;
  background: white;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 8px;
  display: flex; flex-direction: column; gap: 6px;
  box-shadow: 0 1px 2px rgba(15, 30, 64, 0.04);
}
.ic-rp-doc-page-head {
  display: flex; justify-content: space-between; align-items: center;
}
.ic-rp-doc-page-lines {
  display: flex; flex-direction: column; gap: 2px;
}
.ic-rp-doc-page-lines span {
  display: block;
  height: 2px;
  background: var(--surface-2);
  border-radius: 1px;
}

/* Eval stats */
.ic-rp-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 760px) { .ic-rp-stats-row { grid-template-columns: repeat(2, 1fr); } }
.ic-rp-stat-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px 16px;
}
.ic-rp-stat-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 26px; font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1;
  color: var(--text);
  margin: 4px 0 6px;
}
.ic-rp-stat-num small { font-size: 14px; font-weight: 700; color: var(--text-muted); }
.ic-rp-stat-num.pos { color: var(--green-600); }
.ic-rp-stat-num.neg { color: var(--rose-600); }

.ic-rp-evals-list {
  display: flex; flex-direction: column;
  gap: 8px;
}
.ic-rp-eval-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.6fr) 100px 130px;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  background: var(--surface);
  border-radius: 10px;
}
@media (max-width: 1100px) { .ic-rp-eval-row { grid-template-columns: 1fr; } }

.ic-rp-eval-bars {
  display: flex; align-items: flex-end;
  gap: 6px;
  height: 60px;
  padding-bottom: 14px;
  position: relative;
}
.ic-rp-eval-bar-col {
  display: flex; flex-direction: column;
  align-items: center;
  gap: 3px;
  position: relative;
}
.ic-rp-eval-bar {
  width: 18px;
  border-radius: 3px 3px 0 0;
  background: var(--navy-800);
}
.ic-rp-eval-bar.green { background: var(--green-600); }
.ic-rp-eval-bar.amber { background: var(--amber-600); }
.ic-rp-eval-bar.rose  { background: var(--rose-600); }
.ic-rp-eval-bar-num {
  font-size: 9.5px;
  color: var(--text-muted);
  position: absolute;
  bottom: -14px;
  font-weight: 700;
}

.ic-rp-eval-avg, .ic-rp-eval-nc {
  text-align: right;
}
.ic-rp-eval-avg .pos { color: var(--green-600); }
.ic-rp-eval-avg .neg { color: var(--rose-600); }

/* ─────────────────────────────────────────────────────────────
   Sprint 3 · ICONTEC extras
   ───────────────────────────────────────────────────────────── */

/* ─── 1) Hash migration ─── */

.ic-mig-banner {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--amber-100) 0%, white 70%);
  border: 1px solid var(--amber-600);
  border-left: 4px solid var(--amber-600);
  border-radius: var(--r-lg);
  margin-bottom: 14px;
}
.ic-mig-banner-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: white;
  color: var(--amber-600);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.ic-mig-banner-title { font-size: 14px; font-weight: 800; color: var(--text); letter-spacing: -0.01em; }
.ic-mig-banner-sub   { font-size: 12.5px; color: var(--text-muted); margin-top: 4px; line-height: 1.5; }

.ic-mig-stepper {
  display: flex; align-items: center;
  padding: 14px 24px;
  gap: 8px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.ic-mig-step {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 600;
  color: var(--text-muted);
}
.ic-mig-step span:first-child {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-muted);
  display: grid; place-items: center;
  font-size: 11px; font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  flex-shrink: 0;
}
.ic-mig-step.on { color: var(--text); font-weight: 700; }
.ic-mig-step.on span:first-child { background: var(--navy-800); color: white; box-shadow: 0 0 0 4px var(--navy-50); }
.ic-mig-step.done span:first-child { background: var(--green-600); color: white; box-shadow: none; }
.ic-mig-step-line { flex: 1; height: 2px; background: var(--border); }
.ic-mig-step-line.done { background: var(--green-600); }

.ic-mig-info {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 14px 16px;
  background: var(--navy-50);
  border-radius: 10px;
}
.ic-mig-info svg { color: var(--navy-800); flex-shrink: 0; margin-top: 2px; }

.ic-mig-list {
  display: flex; flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.ic-mig-row {
  display: grid;
  grid-template-columns: 200px minmax(0, 1.4fr) minmax(0, 1.5fr) 90px 70px 110px;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.ic-mig-row:last-child { border-bottom: none; }
.ic-mig-row:hover { background: var(--surface); }
.ic-mig-status {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
}
.ic-mig-status.pending { background: var(--amber-100); color: var(--amber-600); }

.ic-mig-running {
  padding: 0;
  display: flex; flex-direction: column;
  height: 100%;
}
.ic-mig-running-head {
  display: flex; align-items: center; gap: 18px;
  padding: 22px 24px;
  background: var(--navy-50);
  border-bottom: 1px solid var(--navy-100);
}
.ic-mig-running-pct { text-align: right; flex-shrink: 0; }

.ic-mig-progress {
  height: 4px;
  background: var(--surface-2);
  overflow: hidden;
}
.ic-mig-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--navy-800), var(--green-600));
  transition: width 0.4s ease;
}

.ic-mig-livelog {
  flex: 1;
  overflow-y: auto;
  padding: 8px 22px 22px;
  display: flex; flex-direction: column;
  gap: 8px;
}
.ic-mig-loglet {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px;
  background: var(--surface);
  border-radius: 8px;
  border-left: 3px solid var(--green-600);
  animation: mig-slide-in 0.32s cubic-bezier(.2,.8,.2,1);
}
@keyframes mig-slide-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}
.ic-mig-loglet.fresh { background: var(--green-100); }
.ic-mig-loglet-icon {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--green-600);
  color: white;
  display: grid; place-items: center;
  flex-shrink: 0;
}

.ic-mig-done {
  padding: 36px 24px;
  display: flex; flex-direction: column;
  align-items: center;
  text-align: center;
}
.ic-mig-summary {
  display: flex; flex-direction: column;
  width: 100%;
  max-width: 540px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 6px;
}
.ic-mig-sum-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 10px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  align-items: center;
}
.ic-mig-sum-row:last-child { border-bottom: none; }

/* ─── 2) Reassignment engine ─── */

.ic-ra { display: flex; flex-direction: column; gap: 14px; padding-top: 14px; }

.ic-ra-banner {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 22px;
  background: linear-gradient(135deg, var(--navy-800), var(--navy-900));
  border-radius: var(--r-lg);
  color: white;
}
.ic-ra-banner .muted { color: rgba(255, 255, 255, 0.72); }
.ic-ra-banner-engine {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  color: white;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.ic-ra-banner .pill {
  background: rgba(40, 167, 69, 0.22);
  color: white;
  border-color: rgba(40, 167, 69, 0.4);
}

.ic-ra-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 1100px) { .ic-ra-stats { grid-template-columns: repeat(2, 1fr); } }
.ic-ra-stat {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.ic-ra-stat-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.ic-ra-stat-icon.navy  { background: var(--navy-50); color: var(--navy-800); }
.ic-ra-stat-icon.green { background: var(--green-100); color: var(--green-600); }
.ic-ra-stat-icon.amber { background: var(--amber-100); color: var(--amber-600); }
.ic-ra-stat-icon.blue  { background: var(--blue-100); color: var(--blue-600); }

.ic-ra-stat-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px; font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1;
}
.ic-ra-stat-num.pos { color: var(--green-600); }
.ic-ra-stat-lbl {
  font-size: 11.5px; font-weight: 600;
  color: var(--text-muted);
  margin-top: 4px;
}

.ic-ra-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 22px;
}
.ic-ra-card-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 18px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.ic-ra-card-head h3 {
  font-size: 14.5px; font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
  margin: 0;
}

/* Rules */
.ic-ra-rules {
  display: flex; flex-direction: column;
  gap: 8px;
}
.ic-ra-rule {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px;
  background: var(--surface);
  border-radius: 10px;
}
.ic-ra-rule-icon {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: var(--navy-50);
  color: var(--navy-800);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.ic-ra-rule-name {
  font-size: 13px; font-weight: 700;
  color: var(--text);
}
.ic-ra-rule-val {
  font-size: 13px; font-weight: 800;
  color: var(--navy-800);
  background: white;
  padding: 4px 11px;
  border-radius: 6px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

/* Upcoming */
.ic-ra-upcoming {
  display: flex; flex-direction: column;
  gap: 8px;
}
.ic-ra-up-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px;
  background: var(--surface);
  border-radius: 10px;
}
.ic-ra-up-days {
  text-align: center;
  width: 56px;
  flex-shrink: 0;
  background: white;
  border-radius: 8px;
  padding: 6px 0;
  border: 1px solid var(--border);
}
.ic-ra-up-action {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px;
  background: var(--navy-800);
  color: white;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  flex-shrink: 0;
}

/* Recent runs */
.ic-ra-runs {
  display: flex; flex-direction: column;
}
.ic-ra-run {
  display: flex; gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  align-items: flex-start;
}
.ic-ra-run.completed { background: linear-gradient(90deg, var(--green-100), white 30%); }
.ic-ra-run.partial   { background: linear-gradient(90deg, var(--amber-100), white 30%); }
.ic-ra-run-status {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.ic-ra-run.completed .ic-ra-run-status { background: var(--green-600); color: white; }
.ic-ra-run.partial   .ic-ra-run-status { background: var(--amber-600); color: white; }

.ic-ra-run-meta {
  display: flex; gap: 14px;
  margin-top: 6px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--text-muted);
}
.ic-ra-run-meta span {
  display: inline-flex; align-items: center; gap: 4px;
}

.ic-ra-run-issue {
  display: inline-flex; align-items: flex-start; gap: 5px;
  margin-top: 6px;
  padding: 5px 9px;
  background: var(--amber-100);
  color: var(--amber-600);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

/* ─── 3) Role switcher ─── */

.ic-role-wrap {
  position: relative;
}
.ic-role-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 10px 5px 6px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  color: var(--text);
  transition: border-color 0.12s, background 0.12s;
}
.ic-role-btn:hover { border-color: var(--navy-100); background: var(--navy-50); }

.ic-role-pip {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 800;
  color: white;
  flex-shrink: 0;
}
.ic-role-pip.rose  { background: var(--rose-600); }
.ic-role-pip.navy  { background: var(--navy-800); }
.ic-role-pip.blue  { background: var(--blue-600); }
.ic-role-pip.green { background: var(--green-600); }

.ic-role-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 320px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-pop);
  z-index: 250;
  overflow: hidden;
  display: flex; flex-direction: column;
  padding: 6px;
  animation: roleMenu 0.15s cubic-bezier(.2,.8,.2,1);
}
@keyframes roleMenu {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}
.ic-role-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 10px 12px;
  background: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: background 0.1s;
}
.ic-role-item:hover  { background: var(--surface); }
.ic-role-item.active { background: var(--navy-50); }

.ic-role-foot {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  margin-top: 4px;
  background: var(--surface);
  border-radius: 8px;
  font-size: 10.5px;
  color: var(--text-muted);
  font-style: italic;
}

/* Restricted gate */
.ic-role-blocked {
  display: flex; flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 60px 24px;
  background: white;
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-lg);
  gap: 10px;
}
.ic-role-blocked-icon {
  width: 76px; height: 76px;
  border-radius: 50%;
  background: var(--rose-100);
  color: var(--rose-600);
  display: grid; place-items: center;
  margin-bottom: 6px;
}
.ic-role-blocked-title {
  font-size: 18px; font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--text);
  margin: 0;
}
.ic-role-blocked-sub {
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.55;
  max-width: 460px;
  margin: 0;
}
.ic-role-blocked-meta {
  font-size: 10.5px;
  color: var(--text-subtle);
  background: var(--surface);
  padding: 6px 14px;
  border-radius: 999px;
  margin-top: 10px;
}

/* ─── 4) Expediente PDF modal ─── */

.ic-exp-doc {
  background: white;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 0;
  border: 1px solid var(--border);
  box-shadow: 0 18px 48px rgba(15, 30, 64, 0.18), 0 4px 10px rgba(15, 30, 64, 0.08);
  display: flex; flex-direction: column;
}

/* Cover */
.ic-exp-cover {
  position: relative;
  background: linear-gradient(180deg, var(--navy-50) 0%, white 100%);
  padding: 30px 38px 26px;
  border-bottom: 2px dashed var(--navy-100);
}
.ic-exp-cover-band {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--navy-800) 0%, var(--navy-800) 70%, var(--aguila-600) 70%, var(--aguila-600) 100%);
}
.ic-exp-cover-divider {
  width: 1px;
  height: 28px;
  background: var(--border);
}
.ic-exp-cover-eyebrow {
  font-size: 10px; font-weight: 800;
  color: var(--navy-800);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  margin: 22px 0 8px;
}
.ic-exp-cover-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 32px; font-weight: 700;
  color: var(--navy-900);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.ic-exp-cover-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.ic-exp-cover-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  padding: 14px 18px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.ic-exp-meta-val {
  font-size: 14px; font-weight: 800;
  color: var(--text);
  margin-top: 3px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -0.01em;
}
.ic-exp-meta-val.pos { color: var(--green-600); }
.ic-exp-cover-emit {
  display: flex; justify-content: space-between;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}

/* Sections */
.ic-exp-section {
  padding: 22px 38px;
  border-bottom: 1px solid var(--border);
}
.ic-exp-section-final { border-bottom: none; background: var(--navy-50); }
.ic-exp-section-h {
  font-size: 11px; font-weight: 800;
  color: var(--navy-800);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--navy-100);
}

.ic-exp-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.ic-exp-stat {
  padding: 10px 14px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  border-left-width: 3px;
}
.ic-exp-stat.green { border-left-color: var(--green-600); }
.ic-exp-stat.amber { border-left-color: var(--amber-600); }
.ic-exp-stat.rose  { border-left-color: var(--rose-600); }
.ic-exp-stat.navy  { border-left-color: var(--navy-800); }
.ic-exp-stat-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 24px; font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text);
  line-height: 1;
}
.ic-exp-stat.green .ic-exp-stat-num { color: var(--green-600); }
.ic-exp-stat.rose .ic-exp-stat-num  { color: var(--rose-600); }
.ic-exp-stat.amber .ic-exp-stat-num { color: var(--amber-600); }
.ic-exp-stat-lbl {
  font-size: 10.5px; font-weight: 700;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Timeline */
.ic-exp-timeline {
  display: flex; flex-direction: column;
}
.ic-exp-tl {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) 130px;
  gap: 12px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px dashed var(--border);
}
.ic-exp-tl:last-child { border-bottom: none; }
.ic-exp-tl-date {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--text);
  border-left: 3px solid var(--navy-800);
  padding-left: 8px;
}
.ic-exp-tl-green .ic-exp-tl-date { border-left-color: var(--green-600); }
.ic-exp-tl-rose  .ic-exp-tl-date { border-left-color: var(--rose-600); }
.ic-exp-tl-label {
  font-size: 12.5px;
  color: var(--text);
}
.ic-exp-tl-hash {
  font-size: 10px;
  color: var(--text-muted);
  text-align: right;
}

/* Certs grid */
.ic-exp-certs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.ic-exp-cert {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}
.ic-exp-cert-head { padding-bottom: 4px; border-bottom: 1px dashed var(--border); }
.ic-exp-cert-name {
  font-size: 12.5px; font-weight: 700;
  color: var(--text);
  margin: 4px 0 8px;
}
.ic-exp-cert-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 8px 10px;
  background: var(--surface);
  border-radius: 6px;
}
.ic-exp-cert-meta .pos { color: var(--green-600); }

/* Evidence chain */
.ic-exp-evidence {
  display: flex; flex-direction: column;
}
.ic-exp-ev-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1.2fr) minmax(0, 2fr);
  gap: 12px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px dashed var(--border);
}
.ic-exp-ev-row:last-child { border-bottom: none; }
.ic-exp-ev-icon {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--green-600);
  color: white;
  display: grid; place-items: center;
}
.ic-exp-ev-lbl {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
}
.ic-exp-ev-val {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* Hash + signature block */
.ic-exp-hash-block {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 200px;
  gap: 24px;
  padding: 16px 18px;
  background: white;
  border: 1px solid var(--navy-100);
  border-radius: 10px;
  align-items: center;
}
.ic-exp-hash {
  font-size: 11.5px;
  color: var(--navy-800);
  background: var(--navy-50);
  padding: 12px 14px;
  border-radius: 6px;
  word-break: break-all;
  margin-top: 4px;
  font-weight: 700;
}
.ic-exp-sign {
  display: flex; flex-direction: column;
  align-items: center;
  text-align: center;
  padding-left: 24px;
  border-left: 1px dashed var(--navy-100);
  height: 100%;
  justify-content: center;
}
.ic-exp-sign-line {
  width: 100%; height: 50px;
  border-bottom: 1px solid var(--text-subtle);
  margin-bottom: 6px;
}
.ic-exp-sign-name {
  font-size: 12px; font-weight: 800;
  color: var(--text);
}

/* ─────────────────────────────────────────────────────────────
   Portal · Mi nómina + secciones nuevas (po-pay-*, po-recog-*, po-month-*, po-sst-*, po-benef-*, po-doc-stat-*, po-comp-*)
   ───────────────────────────────────────────────────────────── */

/* ─── Mi Nómina · pantalla completa ─── */

.po-pay { padding-bottom: 8px; }

/* Hero del último pago */
.po-pay-hero {
  background: linear-gradient(135deg, #28A745 0%, #1B7C34 100%);
  border-radius: 14px;
  padding: 18px 20px 16px;
  color: white;
  display: flex; flex-direction: column; gap: 8px;
  position: relative;
  overflow: hidden;
}
.po-pay-hero::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  pointer-events: none;
}
.po-pay-hero-eyebrow {
  font-size: 10.5px; font-weight: 700;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.po-pay-hero-amount {
  font-family: 'JetBrains Mono', monospace;
  font-size: 36px; font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1;
  margin: 4px 0 4px;
  font-feature-settings: 'tnum';
  position: relative;
}
.po-screen.desktop .po-pay-hero-amount { font-size: 44px; }
.po-pay-hero-meta {
  font-size: 11.5px;
  color: rgba(255,255,255,0.95);
  display: flex; align-items: center; gap: 4px;
}
.po-pay-hero-account {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px;
  color: rgba(255,255,255,0.85);
  font-family: 'JetBrains Mono', monospace;
  background: rgba(255,255,255,0.12);
  padding: 3px 8px;
  border-radius: 6px;
  align-self: flex-start;
  margin-top: 2px;
}
.po-pay-hero-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px dashed rgba(255,255,255,0.2);
}
.po-pay-hero-cta {
  display: flex; align-items: center; justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px;
  margin-top: 4px;
  background: white;
  color: var(--green-600);
  border: none;
  border-radius: 10px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.po-pay-hero-cta:hover { transform: translateY(-1px); }

/* Sections inside payroll */
.po-pay-section {
  display: flex; flex-direction: column; gap: 8px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px 16px;
}
.po-screen.desktop .po-pay-section { padding: 16px 18px; }

/* YTD grid */
.po-pay-ytd {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.po-screen.desktop .po-pay-ytd { grid-template-columns: repeat(4, 1fr); }
.po-pay-ytd-cell {
  padding: 10px 12px;
  background: var(--surface);
  border-radius: 8px;
}
.po-pay-ytd-cell.hi {
  background: var(--green-100);
  border: 1px solid var(--green-600);
}
.po-pay-ytd-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px; font-weight: 800;
  color: var(--text);
  margin-top: 3px;
  letter-spacing: -0.01em;
}
.po-pay-ytd-num.pos { color: var(--green-600); }
.po-pay-ytd-num.neg { color: var(--rose-600); }

.po-pay-info {
  display: flex; align-items: center; gap: 6px;
  margin-top: 6px;
  padding: 8px 10px;
  background: var(--navy-50);
  border-radius: 7px;
  font-size: 10.5px;
  color: var(--text);
  line-height: 1.45;
}
.po-pay-info svg { color: var(--navy-800); flex-shrink: 0; }

/* Histórico */
.po-pay-hist {
  display: flex; flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.po-pay-hist-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.po-pay-hist-row:last-child { border-bottom: none; }
.po-pay-hist-row:hover { background: var(--surface); }
.po-pay-hist-net {
  font-size: 14px; font-weight: 800;
  color: var(--green-600);
  letter-spacing: -0.01em;
}
.po-pay-hist-btn {
  width: 30px; height: 30px;
  border-radius: 7px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--navy-800);
  display: grid; place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}
.po-pay-hist-btn:hover { background: var(--navy-50); border-color: var(--navy-100); }

/* Prestaciones */
.po-pay-prest {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}
.po-screen.desktop .po-pay-prest { grid-template-columns: 1fr 1fr; }
.po-pay-prest-card {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: var(--surface);
  border-radius: 9px;
}
.po-pay-prest-icon {
  width: 32px; height: 32px;
  border-radius: 9px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.po-pay-prest-icon.green { background: var(--green-100); color: var(--green-600); }
.po-pay-prest-icon.amber { background: var(--amber-100); color: var(--amber-600); }
.po-pay-prest-icon.blue  { background: var(--blue-100);  color: var(--blue-600); }
.po-pay-prest-val {
  font-size: 14px; font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
}

/* Afiliaciones */
.po-pay-afi {
  display: flex; flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.po-pay-afi-row {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
}
.po-pay-afi-row:last-child { border-bottom: none; }

/* Certificaciones */
.po-pay-certs {
  display: flex; flex-direction: column;
  gap: 6px;
}
.po-pay-cert {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.12s;
}
.po-pay-cert:hover:not(.disabled) { border-color: var(--navy-100); }
.po-pay-cert.disabled { opacity: 0.55; }
.po-pay-cert-icon {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: var(--navy-50);
  color: var(--navy-800);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.po-pay-cert-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
}
.po-pay-cert-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 10px;
  background: var(--navy-800);
  color: white;
  border: none;
  border-radius: 7px;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}
.po-pay-cert-btn:hover { background: var(--navy-900); }
.po-pay-cert-btn.disabled, .po-pay-cert-btn:disabled {
  background: var(--surface-2);
  color: var(--text-muted);
  cursor: not-allowed;
}

.po-pay-help {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px;
  background: var(--navy-50);
  border: 1px dashed var(--navy-100);
  border-radius: 12px;
}
.po-pay-help svg { color: var(--navy-800); flex-shrink: 0; margin-top: 2px; }
.po-pay-help .btn { flex-shrink: 0; }

/* ─── Reconocimientos en Inicio + Perfil ─── */

.po-recog-list {
  display: flex; flex-direction: column;
  gap: 8px;
}
.po-recog {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  border-left: 3px solid var(--amber-600);
}
.po-recog-from {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 8px;
}
.po-recog-from-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--navy-700);
  color: white;
  display: grid; place-items: center;
  font-size: 10.5px; font-weight: 700;
  flex-shrink: 0;
}
.po-recog-value-pill {
  display: inline-flex; align-items: center;
  font-size: 10px; font-weight: 800;
  padding: 3px 8px;
  border-radius: 5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.po-recog-value-pill.rose  { background: var(--rose-100);  color: var(--rose-600); }
.po-recog-value-pill.blue  { background: var(--blue-100);  color: var(--blue-600); }
.po-recog-value-pill.green { background: var(--green-100); color: var(--green-600); }
.po-recog-value-pill.navy  { background: var(--navy-50);   color: var(--navy-800); }
.po-recog-value-pill.amber { background: var(--amber-100); color: var(--amber-600); }

.po-recog-msg {
  font-size: 12px;
  color: var(--text);
  line-height: 1.55;
  font-style: italic;
  padding: 8px 10px;
  background: var(--surface);
  border-radius: 7px;
}
.po-recog-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 8px;
  gap: 8px;
}
.po-recog-applauds {
  font-size: 11px;
  font-weight: 700;
  color: var(--amber-600);
  background: var(--amber-100);
  padding: 2px 8px;
  border-radius: 999px;
}

/* ─── Tu mes en Águila Roja ─── */

.po-month-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.po-screen.desktop .po-month-grid { grid-template-columns: repeat(4, 1fr); }
.po-month-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  position: relative;
  overflow: hidden;
}
.po-month-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 3px;
}
.po-month-card.green::before { background: var(--green-600); }
.po-month-card.amber::before { background: var(--amber-600); }
.po-month-card.rose::before  { background: var(--rose-600); }
.po-month-card.blue::before  { background: var(--blue-600); }

.po-month-icon {
  width: 28px; height: 28px;
  border-radius: 7px;
  display: grid; place-items: center;
  margin-bottom: 6px;
}
.po-month-card.green .po-month-icon { background: var(--green-100); color: var(--green-600); }
.po-month-card.amber .po-month-icon { background: var(--amber-100); color: var(--amber-600); }
.po-month-card.rose  .po-month-icon { background: var(--rose-100);  color: var(--rose-600); }
.po-month-card.blue  .po-month-icon { background: var(--blue-100);  color: var(--blue-600); }
.po-month-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px; font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1;
}
.po-month-lbl {
  font-size: 11.5px; font-weight: 700;
  color: var(--text);
  margin: 4px 0 2px;
}

/* ─── Mis solicitudes en Profile ─── */

.po-req-list {
  display: flex; flex-direction: column;
  gap: 6px;
}
.po-req-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 9px;
}
.po-req-type {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
}

/* ─── Mi SST en Profile ─── */

.po-sst-urgent {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: linear-gradient(90deg, var(--rose-100), white 70%);
  border: 1px solid var(--rose-600);
  border-left: 3px solid var(--rose-600);
  border-radius: 10px;
  margin-bottom: 10px;
}
.po-sst-urgent-icon {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--rose-600);
  color: white;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.po-sst-urgent-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--rose-600);
}

.po-sst-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.po-sst-card {
  padding: 10px 12px;
  background: var(--surface);
  border-radius: 9px;
}
.po-sst-val {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
  margin-top: 3px;
  margin-bottom: 3px;
}

.po-sst-risks {
  display: flex; flex-direction: column;
  gap: 6px;
}
.po-sst-risk {
  padding: 10px 12px;
  background: var(--surface);
  border-radius: 9px;
}
.po-sst-risk-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px;
}
.po-sst-risk-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}
.po-sst-mitigations {
  display: flex; flex-wrap: wrap;
  gap: 4px;
  margin-top: 8px;
}
.po-sst-mit {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px;
  background: var(--green-100);
  color: var(--green-600);
  border-radius: 5px;
  font-size: 10.5px;
  font-weight: 600;
}

/* ─── Beneficios ─── */

.po-benef-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.po-screen.desktop .po-benef-grid { grid-template-columns: 1fr 1fr; }
.po-benef {
  position: relative;
  padding: 12px 14px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.po-benef::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 3px;
}
.po-benef-green::before { background: var(--green-600); }
.po-benef-navy::before  { background: var(--navy-800); }
.po-benef-blue::before  { background: var(--blue-600); }
.po-benef-amber::before { background: var(--amber-600); }

.po-benef-tag {
  display: inline-block;
  font-size: 9px; font-weight: 800;
  padding: 2px 7px;
  background: var(--green-100);
  color: var(--green-600);
  border-radius: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.po-benef-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
}

/* ─── Mini stats en Documentos ─── */

.po-doc-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 4px;
}
.po-doc-stat {
  padding: 8px 10px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-align: center;
  border-top: 3px solid;
}
.po-doc-stat.rose  { border-top-color: var(--rose-600); }
.po-doc-stat.green { border-top-color: var(--green-600); }
.po-doc-stat.navy  { border-top-color: var(--navy-800); }
.po-doc-stat-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px; font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}
.po-doc-stat.rose .po-doc-stat-num  { color: var(--rose-600); }
.po-doc-stat.green .po-doc-stat-num { color: var(--green-600); }
.po-doc-stat.navy .po-doc-stat-num  { color: var(--navy-800); }
.po-doc-stat-lbl {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ─── Banner ICONTEC en Cursos ─── */

.po-comp-banner {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: linear-gradient(135deg, var(--navy-50) 0%, white 80%);
  border: 1px solid var(--navy-100);
  border-left: 3px solid var(--navy-800);
  border-radius: 10px;
}
.po-comp-banner-icon {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: var(--navy-800);
  color: white;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.po-comp-banner-title {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text);
}
.po-comp-banner-pct {
  text-align: right;
  flex-shrink: 0;
}

/* ─────────────────────────────────────────────────────────────
   Login standalone (lg-*)
   ───────────────────────────────────────────────────────────── */

.lg-page {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  min-height: 100vh;
}
@media (max-width: 920px) {
  .lg-page { grid-template-columns: 1fr; }
  .lg-brand { display: none; }
}

/* ─── Brand panel · izquierda · cálido café ─── */

.lg-brand {
  position: relative;
  background: linear-gradient(150deg, #1B1030 0%, #2E1A46 46%, #0E5964 100%);
  color: white;
  padding: 36px 48px;
  display: flex; flex-direction: column;
  overflow: hidden;
  isolation: isolate;
}
.lg-brand-bg {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 25% 30%, rgba(255, 255, 255, 0.08) 0%, transparent 35%),
    radial-gradient(circle at 78% 72%, rgba(152, 231, 217, 0.20) 0%, transparent 46%),
    radial-gradient(circle at 90% 15%, rgba(40, 159, 176, 0.14) 0%, transparent 42%);
  pointer-events: none;
  z-index: -1;
}
.lg-brand::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent 0,
    transparent 60px,
    rgba(255, 255, 255, 0.018) 60px,
    rgba(255, 255, 255, 0.018) 61px
  );
  pointer-events: none;
  z-index: -1;
}

.lg-brand-top {
  display: flex; justify-content: flex-start;
}
.lg-brand-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  font-family: 'JetBrains Mono', monospace;
}
.lg-brand-tag svg { color: var(--sky-500); }

.lg-brand-center {
  flex: 1;
  display: flex; flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 32px;
  padding: 40px 0;
}

.lg-atica-logo {
  display: inline-flex; align-items: baseline; gap: 2px;
  filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.35));
  animation: lg-fade-up 0.5s cubic-bezier(.2,.8,.2,1) both;
}
.lg-atica-word {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 68px;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #FFFFFF;
}
@keyframes lg-fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

.lg-brand-tagline {
  animation: lg-fade-up 0.6s cubic-bezier(.2,.8,.2,1) 0.12s both;
}
.lg-brand-h1 {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.15;
  color: white;
  margin: 0 0 14px;
  max-width: 420px;
}
.lg-brand-sub {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
  max-width: 440px;
  margin: 0;
}
.lg-brand-sub b { color: white; font-weight: 700; }

.lg-brand-stats {
  display: flex; gap: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 8px;
  animation: lg-fade-up 0.6s cubic-bezier(.2,.8,.2,1) 0.24s both;
}
.lg-brand-stat-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: white;
}
.lg-brand-stat-lbl {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 3px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
}

.lg-brand-foot {
  display: flex; justify-content: space-between; align-items: center;
}
.lg-brand-powered {
  display: flex; align-items: center; gap: 10px;
}
.lg-brand-mark-i {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: white;
  color: var(--navy-800);
  display: grid; place-items: center;
  font-weight: 800;
  font-size: 18px;
  font-family: var(--font-body);
  flex-shrink: 0;
}

/* ─── Form panel · derecha ─── */

.lg-form {
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 28px;
  overflow-y: auto;
}

.lg-form-inner {
  width: 100%;
  max-width: 420px;
  display: flex; flex-direction: column;
  gap: 22px;
  animation: lg-fade-up 0.5s cubic-bezier(.2,.8,.2,1) 0.1s both;
}

.lg-form-head { display: flex; flex-direction: column; gap: 10px; }
.lg-pill-version {
  display: inline-flex; align-items: center;
  align-self: flex-start;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px; font-weight: 700;
  padding: 3px 10px;
  background: var(--green-100);
  color: var(--green-600);
  border-radius: 999px;
  letter-spacing: 0.04em;
}
.lg-form-h2 {
  font-size: 28px; font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--text);
  margin: 4px 0 0;
}
.lg-form-sub {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}

.lg-form-body {
  display: flex; flex-direction: column;
  gap: 14px;
}

/* Fields */
.lg-field {
  display: flex; flex-direction: column;
  gap: 6px;
}
.lg-field-label {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
}

.lg-input-wrap {
  display: flex; align-items: center;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 10px;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.lg-input-wrap:focus-within {
  border-color: var(--navy-800);
  box-shadow: 0 0 0 4px var(--navy-50);
}
.lg-input-wrap.has-value { background: white; }
.lg-input-icon {
  display: grid; place-items: center;
  width: 28px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.lg-input-wrap input {
  flex: 1;
  padding: 11px 6px;
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 14px;
  color: var(--text);
}
.lg-input-wrap input:disabled { color: var(--text-muted); }
.lg-input-wrap input::placeholder { color: var(--text-subtle); }

.lg-input-check {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--green-600);
  color: white;
  display: grid; place-items: center;
  flex-shrink: 0;
}

.lg-input-eye {
  background: none;
  border: none;
  padding: 6px;
  color: var(--text-muted);
  cursor: pointer;
  display: grid; place-items: center;
  border-radius: 6px;
}
.lg-input-eye:hover { color: var(--text); background: var(--surface); }

.lg-link {
  font-size: 11px;
  font-weight: 600;
  color: var(--navy-800);
  text-decoration: none;
}
.lg-link:hover { color: var(--aguila-600); text-decoration: underline; }

.lg-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 4px;
}
.lg-check {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer;
  font-size: 12px;
  color: var(--text);
  user-select: none;
}
.lg-check input {
  width: 16px; height: 16px;
  accent-color: var(--navy-800);
  cursor: pointer;
}

/* Submit */
.lg-submit {
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 18px;
  margin-top: 4px;
  background: var(--navy-800);
  color: white;
  border: none;
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.12s, transform 0.12s;
}
.lg-submit:hover:not(:disabled) {
  background: var(--navy-900);
  transform: translateY(-1px);
}
.lg-submit:active:not(:disabled) { transform: translateY(0); }
.lg-submit.busy {
  background: var(--navy-900);
  cursor: progress;
}
.lg-submit-arrow {
  font-size: 16px;
  font-weight: 800;
  transition: transform 0.18s;
  display: inline-block;
}
.lg-submit:hover:not(:disabled) .lg-submit-arrow { transform: translateX(4px); }
.lg-submit:disabled:not(.busy) {
  background: var(--surface-2);
  color: var(--text-muted);
  cursor: not-allowed;
}

.lg-spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: lg-spin 0.65s linear infinite;
}
@keyframes lg-spin { to { transform: rotate(360deg); } }

/* SSO */
.lg-divider {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  margin: 6px 0 4px;
}
.lg-divider::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 1px;
  background: var(--border);
}
.lg-divider span {
  position: relative;
  background: white;
  padding: 0 14px;
  font-size: 11px;
  color: var(--text-subtle);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.lg-sso {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.lg-sso-btn {
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 9px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.lg-sso-btn:hover:not(:disabled) {
  border-color: var(--text-muted);
  background: var(--surface);
}
.lg-sso-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Demo hint */
.lg-demo-hint {
  margin-top: 6px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: 10px;
}
.lg-demo-list {
  display: flex; flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}
.lg-demo-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color 0.12s, background 0.12s;
}
.lg-demo-row:hover:not(:disabled) {
  border-color: var(--navy-100);
  background: var(--navy-50);
}
.lg-demo-row:disabled { opacity: 0.5; cursor: not-allowed; }
.lg-demo-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--navy-50);
  color: var(--navy-800);
  display: grid; place-items: center;
  font-size: 10.5px;
  font-weight: 800;
  flex-shrink: 0;
}
.lg-demo-use {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--navy-800);
  flex-shrink: 0;
}

.lg-foot {
  font-size: 11.5px;
  color: var(--text-muted);
  text-align: center;
  padding-top: 4px;
}

/* ─────────────────────────────────────────────────────────────
   Evaluación 360° (e360-*)
   ───────────────────────────────────────────────────────────── */

/* Subtle indicator on 360 cycle card */
.pf-cycle-card.is-360 {
  background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(245, 230, 220, 0.45) 100%);
  border-color: var(--amber-100);
}
.pf-cycle-card.is-360 .pf-model-badge { box-shadow: 0 0 0 3px var(--amber-100); }

/* Eval side stack · 360 sidebar + 180 sidebar apilados */
.pf-eval-side-stack {
  display: flex; flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}
.pf-eval-side-stack .pf-pending { position: static; max-height: none; }

/* ─── 1) MatrixModal · diseño matriz de evaluadores ─── */

.e360-mx-side {
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  display: flex; flex-direction: column;
}
.e360-mx-evaluado {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 10px 14px;
  background: white;
  border: none;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: background 0.12s, box-shadow 0.12s;
}
.e360-mx-evaluado:hover { background: var(--surface); }
.e360-mx-evaluado.active {
  background: var(--navy-50);
  box-shadow: inset 3px 0 0 var(--navy-800);
}

.e360-mx-detail {
  display: flex; flex-direction: column;
  overflow-y: auto;
  background: white;
}
.e360-mx-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 18px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, var(--navy-50) 0%, white 80%);
  flex-shrink: 0;
}
.e360-mx-summary {
  display: flex; gap: 18px;
  text-align: right;
}
.e360-mx-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px; font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-top: 3px;
}
.e360-mx-num.pos { color: var(--green-600); }

.e360-mx-body {
  padding: 18px 22px;
  display: flex; flex-direction: column;
  gap: 16px;
}

/* Cada perspectiva · card */
.e360-mx-pers {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  border-left: 3px solid var(--navy-800);
  overflow: hidden;
}
.e360-mx-pers.e360-pers-blue   { border-left-color: var(--blue-600); }
.e360-mx-pers.e360-pers-amber  { border-left-color: var(--amber-600); }
.e360-mx-pers.e360-pers-green  { border-left-color: var(--green-600); }
.e360-mx-pers.e360-pers-rose   { border-left-color: var(--rose-600); }
.e360-mx-pers.e360-pers-navy   { border-left-color: var(--navy-800); }

.e360-mx-pers-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.e360-mx-pers-name {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 800;
  color: var(--text);
}
.e360-mx-pers-icon {
  width: 24px; height: 24px;
  border-radius: 7px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.e360-mx-pers-icon.navy  { background: var(--navy-50);   color: var(--navy-800); }
.e360-mx-pers-icon.blue  { background: var(--blue-100);  color: var(--blue-600); }
.e360-mx-pers-icon.amber { background: var(--amber-100); color: var(--amber-600); }
.e360-mx-pers-icon.green { background: var(--green-100); color: var(--green-600); }
.e360-mx-pers-icon.rose  { background: var(--rose-100);  color: var(--rose-600); }

.e360-mx-anon {
  display: inline-flex; align-items: center;
  padding: 1px 7px;
  background: var(--rose-100);
  color: var(--rose-600);
  border-radius: 4px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.e360-mx-pers-list {
  padding: 8px;
  display: flex; flex-direction: column;
  gap: 4px;
}
.e360-mx-empty {
  padding: 12px;
  font-size: 11.5px;
  color: var(--text-muted);
  text-align: center;
  font-style: italic;
}

.e360-mx-ev {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.e360-mx-ev.completed { background: linear-gradient(90deg, var(--green-100), white 60%); border-color: var(--green-600); }
.e360-mx-ev.pending   { background: linear-gradient(90deg, var(--amber-100), white 60%); border-color: var(--amber-600); }

.e360-mx-state-tag {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.e360-mx-state-tag.green { background: var(--green-600); color: white; }
.e360-mx-state-tag.amber { background: var(--amber-600); color: white; }

.e360-mx-add {
  display: flex; align-items: center; justify-content: center;
  gap: 6px;
  padding: 9px 12px;
  margin-top: 4px;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--navy-800);
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.e360-mx-add:hover { border-color: var(--navy-800); background: var(--navy-50); }

/* ─── 2) Pending360Sidebar ─── */

.e360-pending {
  background: linear-gradient(180deg, white 0%, var(--surface) 100%);
  border: 1px solid var(--border);
  border-top: 3px solid var(--amber-600);
  flex-shrink: 0;
}
.e360-pending-head {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
.e360-pending-tag {
  display: inline-flex; align-items: center;
  padding: 4px 9px;
  background: var(--amber-600);
  color: white;
  border-radius: 5px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}
.e360-pending-cycle {
  font-size: 12px; font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.e360-pending-summary {
  padding: 12px 14px;
  background: white;
  border-bottom: 1px solid var(--border);
}
.e360-pending-summary-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 26px; font-weight: 800;
  color: var(--amber-600);
  letter-spacing: -0.025em;
  margin-top: 4px;
}
.e360-pending-summary-num small {
  font-size: 14px; color: var(--text-muted); font-weight: 700;
}

.e360-pending-groups {
  display: flex; flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
}

.e360-pending-group {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  border-left: 3px solid var(--navy-800);
  padding: 8px 10px;
  display: flex; flex-direction: column;
  gap: 4px;
}
.e360-pending-group.blue   { border-left-color: var(--blue-600); }
.e360-pending-group.amber  { border-left-color: var(--amber-600); }
.e360-pending-group.green  { border-left-color: var(--green-600); }
.e360-pending-group.rose   { border-left-color: var(--rose-600); }
.e360-pending-group.navy   { border-left-color: var(--navy-800); }

.e360-pending-group-head {
  display: flex; align-items: center; gap: 6px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--border);
}
.e360-pending-group-icon {
  width: 22px; height: 22px;
  border-radius: 6px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.e360-pending-group-icon.navy  { background: var(--navy-50);   color: var(--navy-800); }
.e360-pending-group-icon.blue  { background: var(--blue-100);  color: var(--blue-600); }
.e360-pending-group-icon.amber { background: var(--amber-100); color: var(--amber-600); }
.e360-pending-group-icon.green { background: var(--green-100); color: var(--green-600); }
.e360-pending-group-icon.rose  { background: var(--rose-100);  color: var(--rose-600); }

.e360-pending-group-name {
  display: flex; align-items: center; gap: 6px;
  flex: 1;
  font-size: 11.5px; font-weight: 800;
  color: var(--text);
}
.e360-anon-mini {
  font-size: 9px; font-weight: 700;
  background: var(--rose-100);
  color: var(--rose-600);
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.e360-pending-group-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 800;
  background: var(--surface);
  color: var(--text);
  padding: 1px 7px;
  border-radius: 999px;
}

.e360-pending-task {
  display: flex; align-items: center; gap: 8px;
  width: 100%;
  padding: 6px 8px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 7px;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color 0.12s, background 0.12s;
}
.e360-pending-task:hover:not(:disabled) {
  border-color: var(--navy-100);
  background: var(--navy-50);
}
.e360-pending-task.done {
  opacity: 0.5;
  background: var(--green-100);
  border-color: var(--green-600);
}
.e360-pending-task:disabled { cursor: default; }

.e360-due-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--amber-600);
  box-shadow: 0 0 0 3px var(--amber-100);
  flex-shrink: 0;
}

.e360-pending-foot {
  background: white;
  border-top: 1px solid var(--border);
}
.e360-pending-bar {
  position: relative;
  height: 8px;
  background: var(--surface-2);
  border-radius: 999px;
  margin-top: 6px;
  overflow: visible;
}
.e360-pending-bar-fill {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--amber-600), var(--green-600));
  border-radius: 999px;
}
.e360-pending-bar span {
  position: absolute;
  top: 100%;
  left: 0;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ─── 3) PerspectiveBanner ─── */

.e360-banner {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 16px;
  border-radius: var(--r-lg);
  margin-bottom: 4px;
  border-left: 3px solid;
}
.e360-banner-navy   { background: linear-gradient(135deg, var(--navy-50) 0%, white 70%);    border-left-color: var(--navy-800); }
.e360-banner-blue   { background: linear-gradient(135deg, var(--blue-100) 0%, white 70%);   border-left-color: var(--blue-600); }
.e360-banner-amber  { background: linear-gradient(135deg, var(--amber-100) 0%, white 70%);  border-left-color: var(--amber-600); }
.e360-banner-green  { background: linear-gradient(135deg, var(--green-100) 0%, white 70%);  border-left-color: var(--green-600); }
.e360-banner-rose   { background: linear-gradient(135deg, var(--rose-100) 0%, white 70%);   border-left-color: var(--rose-600); }

.e360-banner-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: grid; place-items: center;
  flex-shrink: 0;
  color: white;
}
.e360-banner-icon.navy  { background: var(--navy-800); }
.e360-banner-icon.blue  { background: var(--blue-600); }
.e360-banner-icon.amber { background: var(--amber-600); }
.e360-banner-icon.green { background: var(--green-600); }
.e360-banner-icon.rose  { background: var(--rose-600); }

.e360-banner-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 700;
  color: var(--text);
  letter-spacing: -0.005em;
  flex-wrap: wrap;
}
.e360-banner-anon {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  background: var(--rose-600);
  color: white;
  border-radius: 4px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.e360-banner-evaluated {
  font-size: 13px;
  color: var(--text);
  margin-top: 4px;
}
.e360-banner-tip {
  display: flex; align-items: flex-start; gap: 6px;
  margin-top: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 7px;
  font-size: 11.5px;
  color: var(--text);
  line-height: 1.5;
}
.e360-banner-tip svg { flex-shrink: 0; margin-top: 2px; color: var(--text-muted); }

/* ─── 4) Results360Section ─── */

.e360-results {
  display: flex; flex-direction: column;
  gap: 14px;
}

.e360-results-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 18px;
  flex-wrap: wrap;
}
.e360-results-select {
  font: inherit;
  font-size: 13px;
  padding: 8px 12px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-weight: 600;
  min-width: 280px;
  cursor: pointer;
}
.e360-results-select:focus { outline: none; border-color: var(--navy-800); }

/* Hero · evaluado */
.e360-hero {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 22px;
  background: linear-gradient(135deg, var(--navy-800) 0%, var(--navy-900) 100%);
  color: white;
  border-radius: var(--r-lg);
}
.e360-hero .doc-avatar {
  background: rgba(255, 255, 255, 0.18);
  color: white;
}
.e360-hero-name {
  font-size: 20px; font-weight: 800;
  letter-spacing: -0.015em;
}
.e360-hero .muted { color: rgba(255, 255, 255, 0.7); }

.e360-hero-meta {
  display: flex; gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.e360-hero-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
}

.e360-hero-score {
  text-align: right;
  flex-shrink: 0;
  padding-left: 18px;
  border-left: 1px dashed rgba(255, 255, 255, 0.2);
}
.e360-hero-score .muted-xs { color: rgba(255, 255, 255, 0.7); }
.e360-hero-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 36px; font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1;
  margin: 6px 0 4px;
  color: white;
}
.e360-hero-num small {
  font-size: 16px; font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
}

/* Card común */
.e360-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 22px;
}
.e360-card-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 18px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.e360-card-head h3 {
  font-size: 14.5px; font-weight: 800;
  color: var(--text);
  letter-spacing: -0.005em;
  margin: 0;
}

/* Grid · radar + gap */
.e360-grid-main {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 14px;
}
@media (max-width: 1100px) { .e360-grid-main { grid-template-columns: 1fr; } }

.e360-radar-wrap {
  display: grid; place-items: center;
  padding: 8px 0;
}
.e360-radar { width: 360px; max-width: 100%; height: auto; }

.e360-radar-legend {
  display: flex; flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}
.e360-legend-item {
  display: flex; align-items: center; gap: 6px;
}
.e360-legend-dot {
  width: 12px; height: 12px;
  border-radius: 3px;
}

/* Gap analysis table */
.e360-gap-table {
  display: flex; flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.e360-gap-head, .e360-gap-row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) 60px 70px 90px;
  gap: 10px;
  padding: 9px 14px;
  align-items: center;
}
.e360-gap-head {
  background: var(--surface);
  font-size: 10.5px; font-weight: 800;
  color: var(--text-subtle);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
.e360-gap-row {
  border-bottom: 1px solid var(--border);
}
.e360-gap-row:last-child { border-bottom: none; }
.e360-gap-row.gap-up   { background: linear-gradient(90deg, var(--green-100), white 50%); }
.e360-gap-row.gap-down { background: linear-gradient(90deg, var(--rose-100), white 50%); }
.e360-gap-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
}
.e360-gap-val {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  font-weight: 800;
  text-align: center;
  justify-content: center;
}
.e360-gap-val.up   { color: var(--green-600); }
.e360-gap-val.down { color: var(--rose-600); }
.e360-gap-val.flat { color: var(--text-muted); }

.e360-gap-legend {
  display: flex; flex-direction: column;
  gap: 6px;
  margin-top: 12px;
  font-size: 11.5px;
  color: var(--text-muted);
}
.e360-gap-dot {
  display: inline-block;
  width: 12px; height: 12px;
  border-radius: 3px;
  margin-right: 5px;
  vertical-align: middle;
}
.e360-gap-dot.up   { background: var(--green-600); }
.e360-gap-dot.down { background: var(--rose-600); }

/* Strengths + Development */
.e360-grid-strengths {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 980px) { .e360-grid-strengths { grid-template-columns: 1fr; } }

.e360-list { display: flex; flex-direction: column; gap: 8px; }
.e360-rank-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  background: var(--surface);
  border-radius: 10px;
  border-left: 3px solid var(--green-600);
}
.e360-rank-row.amber { border-left-color: var(--amber-600); }

.e360-rank {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--green-600);
  color: white;
  display: grid; place-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; font-weight: 800;
  flex-shrink: 0;
}
.e360-rank-row.amber .e360-rank { background: var(--amber-600); }
.e360-rank-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}
.e360-rank-num {
  font-size: 18px;
  font-weight: 800;
}
.e360-rank-num.pos { color: var(--green-600); }
.e360-rank-num.neg { color: var(--amber-600); }

/* Blind spots */
.e360-blindspots { background: linear-gradient(135deg, var(--surface) 0%, white 80%); }
.e360-blind-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 760px) { .e360-blind-grid { grid-template-columns: 1fr; } }

.e360-blind-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 5px;
}
.e360-blind-row.up   { border-left: 3px solid var(--green-600); }
.e360-blind-row.down { border-left: 3px solid var(--rose-600); }
.e360-blind-arrow {
  font-size: 12px;
  font-weight: 800;
}
.e360-blind-row.up .e360-blind-arrow   { color: var(--green-600); }
.e360-blind-row.down .e360-blind-arrow { color: var(--rose-600); }

.e360-blind-tip {
  display: flex; align-items: flex-start; gap: 10px;
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--navy-50);
  border-radius: 10px;
  font-size: 12px;
  color: var(--text);
  line-height: 1.55;
}
.e360-blind-tip svg { color: var(--navy-800); flex-shrink: 0; margin-top: 2px; }

/* Quotes */
.e360-quotes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
@media (max-width: 980px) { .e360-quotes-grid { grid-template-columns: 1fr; } }

.e360-quote-col { display: flex; flex-direction: column; gap: 8px; }
.e360-quote-h {
  font-size: 11.5px; font-weight: 800;
  padding: 8px 12px;
  border-radius: 8px;
  letter-spacing: 0.02em;
}
.e360-quote-h.green { background: var(--green-100); color: var(--green-600); }
.e360-quote-h.rose  { background: var(--rose-100);  color: var(--rose-600); }
.e360-quote-h.amber { background: var(--amber-100); color: var(--amber-600); }

.e360-quote {
  background: var(--surface);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex; flex-direction: column;
  gap: 10px;
}
.e360-quote-text {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text);
  font-style: italic;
}
.e360-quote-from {
  display: flex; align-items: center; gap: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  color: var(--text-muted);
}
.e360-pers-tag {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.e360-pers-tag.navy  { background: var(--navy-50);   color: var(--navy-800); }
.e360-pers-tag.blue  { background: var(--blue-100);  color: var(--blue-600); }
.e360-pers-tag.amber { background: var(--amber-100); color: var(--amber-600); }
.e360-pers-tag.green { background: var(--green-100); color: var(--green-600); }
.e360-pers-tag.rose  { background: var(--rose-100);  color: var(--rose-600); }

/* Plan footer */
.e360-plan {
  background: linear-gradient(135deg, var(--navy-50) 0%, white 70%);
  border-color: var(--navy-100);
}
.e360-plan-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

/* ═════════════════════════════════════════════════════════════════════════
   RESPONSIVE OPTIMIZATION · Comprehensive pass
   Breakpoints: 1280 (laptop) · 1100 (tablet landscape) · 880 (tablet portrait)
                760 (mobile) · 480 (small mobile)
   ═════════════════════════════════════════════════════════════════════════ */

/* ── 1280px · laptop / large tablet ───────────────────────────────────── */
@media (max-width: 1280px) {
  .main { padding: 24px 24px 60px; }
  .page-title { font-size: 24px; }

  /* Heavy 4-col KPI grids → 4 cols still OK; tighten gaps */
  .row-kpi, .auto-kpis, .tr-kpis, .pf-cycle-stats,
  .ats-kpis, .ic-ses-grid, .ic-prof-stats,
  .cv-meta, .ic-rp-traffic-grid, .ic-rp-doc-pages, .ic-rp-stats-row,
  .ic-ra-stats, .ic-exp-cover-meta, .ic-exp-grid,
  .py-bank-summary, .py-stub-emp,
  .epp-deliv-summary, .epp-edit-meta,
  .ats-vac-meta, .to-type-grid, .po-day-stats,
  .po-vac-tracking-labels, .confirm-grid,
  .cert-meta {
    gap: 12px;
  }

  /* Heavier 5-6-7 col rows → drop to 4 */
  .matrix-stats, .ic-cap-res-summary, .py-kpis, .rp-kpi-row {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
  .ats-mini-pipe { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ── 1100px · tablet landscape ────────────────────────────────────────── */
@media (max-width: 1100px) {
  .main { padding: 22px 20px 80px; }
  .page-head { gap: 16px; }
  .page-title { font-size: 22px; }

  /* All 4+ col KPI/stat grids → 2 cols */
  .row-kpi, .auto-kpis, .tr-kpis, .pf-cycle-stats,
  .ats-kpis, .ic-ses-grid, .ic-prof-stats,
  .cv-meta, .ic-rp-traffic-grid, .ic-rp-doc-pages, .ic-rp-stats-row,
  .ic-ra-stats, .ic-exp-cover-meta, .ic-exp-grid,
  .py-bank-summary, .py-stub-emp,
  .epp-deliv-summary, .epp-edit-meta,
  .ats-vac-meta, .to-type-grid, .po-day-stats,
  .po-vac-tracking-labels, .confirm-grid,
  .cert-meta, .matrix-stats, .ic-cap-res-summary,
  .py-kpis, .rp-kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .ats-mini-pipe { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* 2-col layouts with sidebar → 1 col */
  .auto-grid, .doc-grid, .pf-eval-grid, .co-layout, .cf-layout,
  .ds-grid, .e360-grid-main, .to-portal-grid, .ats-vac-bar {
    grid-template-columns: 1fr !important;
  }

  /* Sidebars within modules → top-anchored, scroll tabs */
  .cf-sidebar, .co-sidebar {
    position: static !important;
    border-right: none !important;
    border-bottom: 1px solid var(--border);
    max-height: none !important;
  }

  /* Performance side stack 360 → static */
  .pf-eval-side-stack {
    position: static !important;
    max-height: none !important;
    overflow: visible !important;
  }

  /* Form grids with many fields */
  .form-grid { grid-template-columns: repeat(2, 1fr); }

  /* Reports & engine 2-col chart areas */
  .engine-preview-body { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ── 880px · tablet portrait ──────────────────────────────────────────── */
@media (max-width: 880px) {
  .main { padding: 20px 18px 90px; }

  /* Performance Nine Box: keep grid but scale labels */
  .pf-ninebox-axis-title { font-size: 11px; }
  .pf-ninebox-axis-labels { font-size: 10.5px; }

  /* SST body diagram: contain */
  .sst-body-svg { max-width: 100%; height: auto; }

  /* Heatmaps & wide tables → enable horizontal scroll wrappers */
  .ic-rp-traffic-grid, .epp-matrix-grid, .pf-ninebox-grid {
    overflow-x: auto;
  }

  /* ATS kanban: tighter columns */
  .ats-col { flex: 0 0 75% !important; }

  /* Modals: tighter padding */
  .modal { width: 95vw; }
}

/* ── 760px · mobile ───────────────────────────────────────────────────── */
@media (max-width: 760px) {
  /* Page head stacks vertical */
  .page-head {
    flex-direction: column;
    align-items: stretch !important;
    gap: 12px !important;
    margin-bottom: 18px;
  }
  .page-head > div:last-child,
  .page-head .btn-group,
  .page-head .head-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .page-title { font-size: 20px; }
  .page-subtitle { font-size: 13px; }

  /* All multi-col grids → 1 col */
  .row-kpi, .auto-kpis, .tr-kpis, .pf-cycle-stats,
  .ats-kpis, .ic-ses-grid, .ic-prof-stats,
  .cv-meta, .ic-rp-traffic-grid, .ic-rp-doc-pages, .ic-rp-stats-row,
  .ic-ra-stats, .ic-exp-cover-meta, .ic-exp-grid,
  .py-bank-summary, .py-stub-emp,
  .epp-deliv-summary, .epp-edit-meta,
  .ats-vac-meta, .to-type-grid, .po-day-stats,
  .po-vac-tracking-labels, .confirm-grid,
  .cert-meta, .matrix-stats, .ic-cap-res-summary,
  .py-kpis, .rp-kpi-row, .ats-mini-pipe,
  .form-grid, .engine-preview-body,
  .form-field {
    grid-template-columns: 1fr !important;
  }
  .form-field { grid-column: span 1 !important; }

  /* Calendar grids stay 7-col but font shrinks */
  .to-cal-weekdays, .to-cal-grid, .to-week-strip,
  .to-mini-weekdays, .to-mini-grid,
  .po-cal-weekdays, .po-cal-grid {
    font-size: 11px;
  }
  .to-cal-grid > *, .po-cal-grid > * {
    min-height: 36px;
    padding: 4px !important;
  }

  /* Tabs → horizontal scroll */
  .auto-tabs, .doc-tabs, .pf-tabs, .tr-tabs, .sst-tabs,
  .epp-tabs, .ats-tabs, .to-tabs, .co-tabs, .py-tabs,
  .rp-tabs, .cf-tabs, .ic-tabs, .e360-tabs, .ds-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    flex-wrap: nowrap !important;
  }
  .auto-tab, .doc-tab, .pf-tab, .tr-tab, .sst-tab,
  .epp-tab, .ats-tab, .to-tab, .co-tab, .py-tab,
  .rp-tab, .cf-tab, .ic-tab, .e360-tab, .ds-tab {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 13px;
    padding: 10px 12px;
  }

  /* Modals fullscreen with safe area */
  .modal {
    border-radius: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .modal-body { max-height: calc(100vh - 120px); overflow-y: auto; }
  .modal-foot, .modal-footer {
    flex-direction: column-reverse;
    gap: 8px;
  }
  .modal-foot .btn, .modal-footer .btn { width: 100%; justify-content: center; }

  /* Internal sidebars (settings, comms, performance, e360 matrix, ds) →
     top-anchored horizontal scroll bar */
  .cf-sidebar, .co-sidebar, .ds-sidenav, .e360-mx-side {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    border-right: none !important;
    border-bottom: 1px solid var(--border);
    padding: 6px 8px !important;
    gap: 6px;
    -webkit-overflow-scrolling: touch;
  }
  .cf-sidebar > *, .co-sidebar > *, .ds-sidenav > *, .e360-mx-side > * {
    flex-shrink: 0;
    white-space: nowrap;
  }
  .e360-mx-evaluado { border-bottom: none !important; border-right: 1px solid var(--border); }

  /* ATS Kanban: even narrower */
  .ats-col { flex: 0 0 84% !important; min-width: 260px; }
  .ats-board { gap: 10px; padding: 12px 12px 16px; }

  /* Performance Nine Box → horizontal scroll */
  .pf-ninebox-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .pf-ninebox-grid { min-width: 540px; }

  /* SST body diagram contain */
  .sst-body-svg { max-width: 100% !important; }

  /* Onboarding step bar wraps */
  .ob-stepper, .onb-stepper { flex-wrap: wrap; gap: 8px !important; }

  /* Buttons: ensure visible on small screens, prevent overflow */
  .btn { font-size: 13px; padding: 10px 14px; }
  .btn-sm { padding: 7px 10px; font-size: 12px; }

  /* Card paddings tighter */
  .card { padding: 14px !important; }

  /* Search inside topbar replaced — burger menu opens search */
  .crumbs { font-size: 12px; max-width: calc(100vw - 140px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  /* Hide non-essential filter strips on mobile */
  .toolbar-secondary, .filter-strip-secondary { display: none; }

  /* Tweaks panel: bottom sheet */
  .tweaks-panel {
    position: fixed !important;
    left: 0 !important; right: 0 !important; bottom: 0 !important;
    top: auto !important;
    width: 100vw !important;
    max-height: 70vh;
    border-radius: 16px 16px 0 0 !important;
    box-shadow: 0 -8px 32px rgba(15,30,64,0.18);
  }

  /* Login (split layout) → single column */
  .lg-split { grid-template-columns: 1fr !important; }
  .lg-hero { display: none !important; }

  /* Portal device toggle: hide (auto adapts) */
  .po-device-toggle { display: none !important; }
}

/* ── 480px · small mobile (iPhone SE / Android compact) ───────────────── */
@media (max-width: 480px) {
  .main { padding: 14px 12px 100px !important; }
  .page-title { font-size: 18px; }
  .page-subtitle { font-size: 12.5px; }

  /* Touch targets */
  .btn, .btn-primary, .btn-ghost, .btn-danger {
    min-height: 44px;
    padding: 11px 14px;
  }
  .nav-item { min-height: 44px; }
  .mob-bottom-nav button { min-height: 56px; }

  /* Card paddings even tighter */
  .card { padding: 12px !important; border-radius: 10px; }

  /* KPI numbers shrink */
  .auto-kpi-num, .tr-kpi-num, .ats-kpi-num, .py-kpi-num,
  .rp-kpi-num, .ic-ses-num, .ic-prof-num, .e360-pers-score,
  .row-kpi .kpi-num {
    font-size: 22px !important;
  }

  /* Topbar tighter */
  .topbar { padding: 0 10px !important; }
  .crumbs { max-width: calc(100vw - 120px); font-size: 11.5px; }

  /* Tabs more compact */
  .auto-tab, .doc-tab, .pf-tab, .tr-tab, .sst-tab,
  .epp-tab, .ats-tab, .to-tab, .co-tab, .py-tab,
  .rp-tab, .cf-tab, .ic-tab, .e360-tab, .ds-tab {
    font-size: 12.5px;
    padding: 9px 10px;
  }

  /* Modal close pad */
  .modal-head, .modal-header { padding: 12px 14px; }
  .modal-body { padding: 14px; }

  /* Form inputs full-width comfortable */
  input, select, textarea { font-size: 16px; } /* prevents iOS zoom */

  /* Calendar cells smaller */
  .to-cal-grid > *, .po-cal-grid > * { min-height: 32px; font-size: 10.5px; }

  /* ATS columns narrower */
  .ats-col { flex: 0 0 90% !important; min-width: 240px; }

  /* Sidebar drawer width: a bit narrower */
  .sidebar { width: 260px !important; }
}

/* ── Touch-only refinements (no hover) ────────────────────────────────── */
@media (hover: none) and (pointer: coarse) {
  /* Disable subtle hover transitions that feel laggy on touch */
  .auto-tab:hover, .nav-item:hover, .doc-table tbody tr:hover { transition: none; }
  /* Force scrollbars visible for horizontal scroll containers */
  .ats-board, .auto-tabs, .doc-tabs { scrollbar-width: thin; }
}

/* ─────────────────────── New Employee Modal v2 ─────────────────────── */
.modal-body.noPad { padding: 0; }

.ne-split {
  display: grid;
  grid-template-columns: 232px 1fr;
  min-height: 520px;
}
.ne-rail {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 22px 18px 18px;
  display: flex; flex-direction: column;
  gap: 4px;
}
.ne-rail-eyebrow {
  font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-subtle);
  margin-bottom: 12px;
}
.ne-vstep {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: 9px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.12s, border-color 0.12s;
  background: transparent;
  text-align: left;
}
.ne-vstep:hover { background: rgba(255,255,255,0.6); }
.ne-vstep.active {
  background: white;
  border-color: var(--border);
  box-shadow: 0 1px 0 rgba(15,30,64,0.04);
}
.ne-vstep-num {
  width: 26px; height: 26px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 50%;
  background: white;
  border: 1px solid var(--border);
  font-size: 12px; font-weight: 700;
  color: var(--text-subtle);
}
.ne-vstep.active .ne-vstep-num {
  background: var(--navy-800); color: white; border-color: var(--navy-800);
}
.ne-vstep.done .ne-vstep-num {
  background: var(--green-600); color: white; border-color: var(--green-600);
}
.ne-vstep-lbl { font-size: 13px; font-weight: 500; color: var(--text); line-height: 1.2; }
.ne-vstep-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 1px; }
.ne-vstep.done .ne-vstep-lbl { color: var(--text-muted); }

.ne-rail-engine {
  margin-top: auto;
  padding: 14px;
  background: linear-gradient(135deg, var(--navy-900), var(--navy-800));
  color: white;
  border-radius: 10px;
}
.ne-rail-engine-ttl {
  display: flex; align-items: center; gap: 6px;
  font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: rgba(255,255,255,0.85);
}
.ne-rail-engine-ttl .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--aguila-600);
  box-shadow: 0 0 0 3px rgba(200,16,46,0.3);
  animation: pulse 1.6s infinite;
}
.ne-rail-engine-sub {
  font-size: 11.5px; color: rgba(255,255,255,0.65);
  margin-top: 6px; line-height: 1.4;
}
.ne-rail-engine-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 5px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 12px;
}
.ne-rail-engine-row:first-of-type { margin-top: 10px; border-top: 0; }
.ne-rail-engine-row span:first-child { color: rgba(255,255,255,0.7); display: flex; align-items: center; gap: 8px; }
.ne-rail-engine-row b { font-weight: 700; font-variant-numeric: tabular-nums; }

.ne-content {
  padding: 24px 28px 26px;
  overflow: auto;
  display: flex; flex-direction: column; gap: 22px;
}
.ne-step-head { display: flex; flex-direction: column; gap: 2px; }
.ne-step-title { font-size: 17px; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
.ne-step-sub   { font-size: 12.5px; color: var(--text-muted); }

.ne-section {
  display: flex; flex-direction: column; gap: 12px;
}
.ne-section-ttl {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--text-subtle);
}
.ne-section-ttl::before {
  content: "";
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--text-subtle);
}

.ne-callout {
  display: flex; gap: 12px;
  padding: 12px 14px;
  background: var(--blue-100);
  border-radius: 10px;
  font-size: 12.5px;
  color: var(--text);
  line-height: 1.45;
}
.ne-callout svg { color: var(--blue-600); flex-shrink: 0; margin-top: 1px; }
.ne-callout b { color: var(--navy-800); }

.ne-role-summary {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.ne-role-summary > div {
  padding: 12px 14px;
  border-right: 1px solid var(--border);
}
.ne-role-summary > div:last-child { border-right: 0; }
.ne-role-summary .lbl { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-subtle); }
.ne-role-summary .val { font-size: 13.5px; font-weight: 600; color: var(--text); margin-top: 4px; display: flex; align-items: center; gap: 6px; }
.ne-role-summary .val .pill { font-size: 10.5px; padding: 2px 7px; }

.ne-review-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.ne-review-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
}
.ne-review-card-ttl {
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-subtle);
  margin-bottom: 12px;
}
.ne-review-card-ttl svg { color: var(--navy-800); }
.ne-review-rows { display: flex; flex-direction: column; gap: 8px; }
.ne-review-row {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 13px;
  gap: 12px;
}
.ne-review-row .k { color: var(--text-muted); }
.ne-review-row .v { color: var(--text); font-weight: 500; text-align: right; }

.ne-engine-tasks {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 12px;
}
.ne-engine-task {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.06);
  border-radius: 8px;
  font-size: 12.5px;
  color: rgba(255,255,255,0.92);
}
.ne-engine-task .icon-wrap {
  width: 28px; height: 28px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 7px;
  background: rgba(255,255,255,0.08);
}
.ne-engine-task b { color: white; font-weight: 700; }
.ne-engine-task small { display: block; color: rgba(255,255,255,0.6); font-size: 11px; margin-top: 1px; }

@media (max-width: 860px) {
  .ne-split { grid-template-columns: 1fr; }
  .ne-rail { border-right: 0; border-bottom: 1px solid var(--border); flex-direction: row; flex-wrap: wrap; gap: 6px; padding: 14px; }
  .ne-rail-eyebrow, .ne-rail-engine { display: none; }
  .ne-vstep { flex: 1; min-width: 140px; padding: 8px 10px; }
  .ne-review-grid, .ne-engine-tasks, .ne-role-summary { grid-template-columns: 1fr; }
}

/* ─────────────────────── Employee Detail v2 ─────────────────────── */
.emp-tab .tab-badge {
  display: inline-grid; place-items: center;
  min-width: 18px; height: 18px;
  margin-left: 7px;
  padding: 0 5px;
  border-radius: 9px;
  font-size: 10.5px; font-weight: 700;
  background: var(--surface-2);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
}
.emp-tab .tab-badge.amber { background: var(--amber-100); color: var(--amber-600); }
.emp-tab .tab-badge.rose  { background: var(--rose-100);  color: var(--rose-600);  }
.emp-tab .tab-badge.green { background: var(--green-100); color: var(--green-600); }
.emp-tab .tab-badge.navy  { background: var(--navy-50);   color: var(--navy-800);  }
.emp-tab.active .tab-badge { background: var(--navy-50); color: var(--navy-800); }

.emp-quick-actions {
  display: flex; gap: 8px;
  align-self: flex-start;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.emp-side-card .quick-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12.5px;
  padding: 6px 0;
  border-top: 1px solid var(--border);
}
.emp-side-card .quick-row:first-of-type { border-top: 0; }
.emp-side-card .quick-row span:first-child { color: var(--text-muted); }
.emp-side-card .quick-row b { color: var(--text); font-weight: 600; }

/* Tab: Vacaciones */
.vac-overview {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 18px;
}
.vac-overview > div { padding: 16px 18px; border-right: 1px solid var(--border); }
.vac-overview > div:last-child { border-right: 0; }
.vac-overview .vac-num {
  font-size: 28px; font-weight: 700; letter-spacing: -0.02em;
  color: var(--navy-800);
  font-variant-numeric: tabular-nums;
}
.vac-overview .vac-lbl {
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-subtle);
}
.vac-overview .vac-sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.vac-overview .vac-bar {
  height: 6px; background: var(--surface-2);
  border-radius: 3px; overflow: hidden;
  margin-top: 10px;
}
.vac-overview .vac-bar > span {
  display: block; height: 100%;
  background: linear-gradient(90deg, var(--green-600), var(--navy-800));
  border-radius: 3px;
}

/* Tab: Nómina */
.pay-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}
.pay-summary-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}
.pay-summary-card .lbl {
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-subtle);
}
.pay-summary-card .val {
  font-size: 18px; font-weight: 700;
  letter-spacing: -0.01em;
  margin-top: 4px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.pay-summary-card .sub { font-size: 11.5px; color: var(--text-muted); margin-top: 3px; }

.accruals-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 8px;
}
.accrual {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px;
  background: var(--surface);
  border-radius: 8px;
  font-size: 12.5px;
}
.accrual .k { color: var(--text-muted); }
.accrual .v { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); }

/* Tab: Comunicaciones */
.comm-row {
  display: grid;
  grid-template-columns: 36px 1fr 130px 100px;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
}
.comm-icon {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: var(--navy-50);
  color: var(--navy-800);
}
.comm-row.kind-survey  .comm-icon { background: var(--blue-100); color: var(--blue-600); }
.comm-row.kind-event   .comm-icon { background: var(--amber-100); color: var(--amber-600); }
.comm-row.kind-launch  .comm-icon { background: var(--green-100); color: var(--green-600); }
.comm-ttl { font-size: 13.5px; font-weight: 600; color: var(--text); }
.comm-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.comm-channel {
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-muted);
  display: flex; align-items: center; gap: 6px;
}
.comm-state { text-align: right; }

/* ── Fase B · Proveedores e Instructores ──────────────────────────────── */

.pill.navy-soft {
  background: #E5EBF7; color: var(--navy-800);
  border-color: transparent;
}

.ic-cmp-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.ic-cmp-kpi {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
}
.ic-cmp-kpi-num {
  font-size: 28px; font-weight: 700;
  color: var(--text);
  line-height: 1.1;
  font-feature-settings: "tnum";
  margin: 4px 0;
}

.ic-prov-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 4px;
}
.ic-prov-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  text-align: left;
  cursor: pointer;
  transition: all 0.18s;
  display: flex; flex-direction: column; gap: 10px;
}
.ic-prov-card:hover {
  border-color: var(--navy-800);
  box-shadow: 0 6px 20px rgba(15, 30, 64, 0.08);
  transform: translateY(-1px);
}
.ic-prov-card-head {
  display: flex; justify-content: space-between; align-items: center;
}
.ic-prov-card-name {
  font-size: 14px; font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.ic-prov-card-meta {
  padding: 8px 10px;
  background: var(--surface);
  border-radius: 8px;
}
.ic-prov-card-foot {
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid var(--border);
  padding-top: 10px;
  margin-top: 2px;
}

.ic-prov-section {
  display: flex; flex-direction: column;
  gap: 10px;
  padding-bottom: 6px;
}
.ic-prov-section + .ic-prov-section {
  border-top: 1px solid var(--border);
  padding-top: 18px;
}
.ic-prov-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.ic-prov-info > div {
  padding: 10px 12px;
  background: var(--surface);
  border-radius: 8px;
}

.ic-prov-soportes {
  display: flex; flex-direction: column;
  gap: 8px;
}
.ic-prov-soporte {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.ic-prov-soporte.vencida {
  background: #FEF2F2;
  border-color: var(--rose-600);
}
.ic-prov-soporte.por-vencer {
  background: #FEF9C3;
  border-color: #B57609;
}
.ic-prov-soporte-icon {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: white;
  border-radius: 8px;
  color: var(--navy-800);
  flex-shrink: 0;
}

.ic-prov-insts {
  display: flex; flex-direction: column;
  gap: 10px;
}
.ic-prov-inst {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}
.ic-prov-inst.vencida {
  background: #FEF2F2;
  border-color: var(--rose-600);
}
.ic-prov-inst.por-vencer {
  background: #FEF9C3;
  border-color: #B57609;
}
.ic-prov-inst-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}
.ic-prov-inst-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.ic-prov-inst-meta > div {
  display: flex; flex-direction: column; gap: 2px;
}

/* ── Fase B · SessionCapture · variantes interno/externo ──────────────── */

.ic-cap-origen {
  margin-top: 14px;
  margin-bottom: 18px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.ic-cap-origen-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}
.ic-cap-origen-tab {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s;
}
.ic-cap-origen-tab svg { flex-shrink: 0; margin-top: 2px; color: var(--text-muted); }
.ic-cap-origen-tab:hover { border-color: var(--navy-800); }
.ic-cap-origen-tab.active {
  background: var(--navy-800);
  border-color: var(--navy-800);
  color: white;
}
.ic-cap-origen-tab.active svg { color: white; }
.ic-cap-origen-tab.active .muted { color: rgba(255,255,255,0.78); }

.ic-cap-licencia {
  padding: 10px 12px;
  background: white;
  border: 1px solid var(--border);
  border-left: 3px solid var(--green-600);
  border-radius: 8px;
  margin-top: 4px;
}
.ic-cap-licencia-vigente { border-left-color: var(--green-600); }
.ic-cap-licencia-por-vencer { border-left-color: #B57609; background: #FEF9C3; }
.ic-cap-licencia-vencida { border-left-color: var(--rose-600); background: #FEF2F2; }
.ic-cap-licencia-sin-vencimiento { border-left-color: var(--navy-800); }
.ic-cap-licencia-warn {
  display: flex; align-items: center; gap: 6px;
  margin-top: 8px;
  padding: 6px 10px;
  background: var(--rose-600);
  color: white;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
}

.ic-cap-ext-skip {
  margin-top: 18px;
  padding: 28px 24px;
  display: flex; align-items: center; gap: 18px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 12px;
  color: var(--text-muted);
}
.ic-cap-ext-skip svg { flex-shrink: 0; opacity: 0.5; }

.ic-cap-ext-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 10px;
}

.ic-cap-ext-summary {
  margin-top: 10px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.ic-cap-ext-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.ic-cap-ext-summary-grid > div {
  padding: 10px 12px;
  background: white;
  border-radius: 8px;
}

/* DatePickerCO · trigger + popover (reusa clases co-cal* / co-time*) */
.dp-wrap {
  position: relative;
  display: block;
  width: 100%;
}
.dp-wrap > .dp-trigger {
  display: flex; align-items: center;
  gap: 8px;
  width: 100%;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 12px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: all 0.12s;
  margin-top: 4px;
}
.dp-wrap > .dp-trigger:hover:not(:disabled) {
  border-color: var(--navy-100);
  background: var(--navy-50);
}
.dp-wrap > .dp-trigger.has-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  text-transform: capitalize;
}
.dp-trigger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.dp-trigger > svg:first-child { color: var(--text-muted); flex-shrink: 0; }
.dp-trigger > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dp-trigger > span.muted { color: var(--text-muted); font-weight: 500; font-family: inherit; text-transform: none; }
.dp-trigger.has-value > svg:first-child { color: var(--navy-800); }

.dp-popover {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 1000; /* sobre modal-overlay (z-index ~ 100) */
  min-width: 300px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  display: flex; flex-direction: column;
  gap: 10px;
  box-shadow: 0 12px 32px rgba(15, 30, 64, 0.18), 0 2px 4px rgba(15, 30, 64, 0.06);
  animation: dpFadeIn 0.14s ease-out;
}
/* Si el datepicker está cerca del borde derecho del modal, alineo a la derecha */
.dp-wrap:has(+ .dp-wrap) .dp-popover { right: auto; left: 0; }
@keyframes dpFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}
@media (max-width: 480px) {
  .dp-popover {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100vw - 32px);
    max-width: 360px;
  }
}

/* TimeRangeChipsCO */
.tr-time-range {
  display: flex; flex-direction: column;
  gap: 6px;
}
.tr-time-range-row {
  display: flex; align-items: flex-end;
  gap: 10px;
}
.tr-time-range-block { display: flex; flex-direction: column; gap: 3px; }
.tr-time-range-arrow {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* MaterialEditor · chips de tipo + entrada según tipo */
.mat-editor {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex; flex-direction: column;
  gap: 8px;
}
.mat-editor-head {
  display: flex; align-items: center;
  gap: 8px;
}
.mat-tipo-chips {
  display: flex; flex-wrap: wrap;
  gap: 4px;
  flex: 1;
}
.mat-tipo-chip {
  display: inline-flex; align-items: center;
  gap: 5px;
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.12s;
}
.mat-tipo-chip:hover {
  background: var(--navy-50);
  color: var(--navy-800);
  border-color: var(--navy-100);
}
.mat-tipo-chip.active {
  background: var(--navy-800);
  border-color: var(--navy-800);
  color: white;
}
.mat-tipo-chip.active svg { color: white; }

/* RichTextEditor · WYSIWYG simple basado en contentEditable */
.rt-editor {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.15s;
}
.rt-editor.focused { border-color: var(--navy-800); }
.rt-toolbar {
  display: flex; align-items: center;
  gap: 2px;
  padding: 5px 8px;
  background: white;
  border-bottom: 1px solid var(--border);
}
.rt-tool {
  display: inline-grid; place-items: center;
  width: 28px; height: 26px;
  font: inherit;
  font-size: 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.1s;
  padding: 0;
}
.rt-tool:hover {
  background: var(--surface);
  border-color: var(--border);
  color: var(--navy-800);
}
.rt-tool:active {
  background: var(--navy-50);
}
.rt-content {
  min-height: 100px;
  max-height: 280px;
  overflow: auto;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
  outline: none;
  background: white;
}
.rt-content:empty::before {
  content: attr(data-placeholder);
  color: var(--text-muted);
  pointer-events: none;
}
.rt-content p { margin: 0 0 6px; }
.rt-content ul, .rt-content ol { margin: 4px 0 8px; padding-left: 22px; }
.rt-content li { margin: 2px 0; }
.rt-content a { color: var(--navy-800); text-decoration: underline; }
.rt-content b, .rt-content strong { font-weight: 700; }

/* Banco de preguntas · cards */
.bp-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  transition: all 0.12s;
}
.bp-card:hover {
  border-color: var(--navy-100);
  box-shadow: 0 2px 6px rgba(15, 30, 64, 0.04);
}
.bp-card.rejected {
  background: var(--surface);
  border-style: dashed;
}

/* ── Fase C · Matriz Cargo × Competencia ──────────────────────────────── */

.ic-mtx-wrap {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: auto;
  max-width: 100%;
}
.ic-mtx-table {
  border-collapse: separate;
  border-spacing: 0;
  width: max-content;
  min-width: 100%;
}
.ic-mtx-table th, .ic-mtx-table td {
  border-bottom: 1px solid var(--border);
}
.ic-mtx-corner {
  position: sticky; left: 0; top: 0; z-index: 3;
  background: var(--surface);
  padding: 12px 14px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: left;
  border-right: 1px solid var(--border);
  min-width: 220px;
}
.ic-mtx-cmp-head {
  position: sticky; top: 0; z-index: 2;
  background: var(--surface);
  padding: 10px 8px;
  text-align: center;
  min-width: 90px;
  border-right: 1px solid var(--border);
}
.ic-mtx-cargo {
  position: sticky; left: 0; z-index: 1;
  background: white;
  padding: 12px 14px;
  border-right: 1px solid var(--border);
  min-width: 220px;
}
.ic-mtx-cell {
  padding: 6px 8px;
  text-align: center;
  border-right: 1px solid var(--border);
  vertical-align: middle;
}
.ic-mtx-obligatoria { background: #FEF2F2; }
.ic-mtx-opcional    { background: #FEFCE8; }
.ic-mtx-no_aplica   { background: white; }
.ic-mtx-symbol {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.ic-mtx-obligatoria .ic-mtx-symbol { color: var(--rose-600); border-color: var(--rose-600); }
.ic-mtx-opcional .ic-mtx-symbol    { color: #854D0E; border-color: #854D0E; }
.ic-mtx-no_aplica .ic-mtx-symbol   { color: var(--text-muted); }
.ic-mtx-symbol:hover { transform: scale(1.08); }
.ic-mtx-plazo {
  display: block;
  width: 56px; margin: 4px auto 0;
  padding: 2px 4px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 10.5px;
  font-family: var(--font-mono);
  text-align: center;
}

/* ── Fase D · Verificador público con búsqueda ────────────────────────── */

.cv-search {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 16px;
}
.cv-search-row {
  display: flex; gap: 8px;
  margin-top: 8px;
}
.cv-search-row input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-family: var(--font-mono);
}
.cv-search-row input:focus {
  outline: none;
  border-color: var(--navy-800);
}
.cv-search-hints {
  display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
  margin-top: 10px;
}
.cv-search-hint {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 10.5px;
  cursor: pointer;
  transition: all 0.15s;
}
.cv-search-hint:hover {
  border-color: var(--navy-800);
  background: white;
}

/* ── Fase D · Modo Auditoría ─────────────────────────────────────────── */

.tr-audit-modal-body {
  display: flex; flex-direction: column;
  gap: 14px;
}
.tr-audit-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.tr-audit-filters label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tr-audit-filters select,
.tr-audit-filters input {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12.5px;
  font-family: inherit;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text);
  font-weight: 500;
  background: white;
}

.tr-audit-row {
  display: grid;
  grid-template-columns: 90px 2.4fr 1.4fr 1fr 90px 90px;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}
.tr-audit-row:hover {
  border-color: var(--navy-800);
  box-shadow: 0 2px 8px rgba(15, 30, 64, 0.06);
}
.tr-audit-row.expanded {
  grid-template-columns: 1fr;
  background: var(--surface);
}
.tr-audit-detail {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  font-size: 12px;
}
.tr-audit-evidence-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px;
  background: white;
  border-radius: 6px;
  font-size: 11.5px;
}
.tr-audit-evidence-row.ok { color: var(--green-600); }
.tr-audit-evidence-row.miss { color: var(--rose-600); }

/* ── Print: light cleanup ─────────────────────────────────────────────── */
@media print {
  .sidebar, .topbar, .mob-bottom-nav, .tweaks-panel,
  .modal-backdrop, .filter-strip, .toolbar { display: none !important; }
  .app { grid-template-columns: 1fr !important; }
  .main { padding: 0 !important; }
  .card { box-shadow: none !important; border: 1px solid #ddd !important; break-inside: avoid; }
}

/* ─── Performance · Fase B/C/D · cycles · stepper · meto chips · anonimato ─── */

.pc-meto-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: -0.01em;
  border: 1px solid;
}
.pc-meto-chip.sm { font-size: 10px; padding: 1px 6px; }
.pc-meto-navy  { background: var(--navy-50, #EEF1F8);  color: var(--navy-800);   border-color: rgba(27,47,94,0.18); }
.pc-meto-blue  { background: #EFF5FB;                  color: #1F4FA0;            border-color: rgba(31,79,160,0.18); }
.pc-meto-amber { background: #FBF6E9;                  color: #854D0E;            border-color: rgba(133,77,14,0.20); }
.pc-meto-rose  { background: #FAEFEF;                  color: var(--aguila-600); border-color: rgba(200,16,46,0.20); }

.pf-cycle-meto-row { display: flex; gap: 4px; flex-wrap: wrap; padding: 0 16px; margin-top: -4px; margin-bottom: 8px; }

.pc-anon-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 6px; border-radius: 6px; font-size: 10px; font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
}
.pc-anon-badge.ok { background: rgba(14,138,87,0.10); color: var(--green-600); }
.pc-anon-badge.warn { background: rgba(200,16,46,0.10); color: var(--aguila-600); }

/* Stepper */
.pc-stepper {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 24px; background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.pc-step { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-muted); font-weight: 600; }
.pc-step.active { color: var(--navy-800); }
.pc-step.done   { color: var(--green-600); }
.pc-step-num {
  width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 800; background: var(--surface-2); color: var(--text-muted); border: 1.5px solid var(--border);
}
.pc-step.active .pc-step-num { background: var(--navy-800); color: white; border-color: var(--navy-800); }
.pc-step.done .pc-step-num   { background: var(--green-600); color: white; border-color: var(--green-600); }

.pc-step-body { padding: 0; }

.pc-meto-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.pc-meto-card {
  text-align: left; padding: 12px 14px; border-radius: 10px;
  background: var(--surface); border: 1.5px solid var(--border); cursor: pointer;
  transition: all 0.12s;
}
.pc-meto-card:hover { border-color: var(--navy-800); }
.pc-meto-card.active { border-color: var(--navy-800); background: white; box-shadow: 0 0 0 3px rgba(27,47,94,0.08); }
.pc-meto-card-head { display: flex; align-items: center; gap: 8px; }
.pc-meto-card-icon {
  width: 24px; height: 24px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-2); color: var(--text);
}
.pc-meto-card-icon.navy  { background: var(--navy-50, #EEF1F8); color: var(--navy-800); }
.pc-meto-card-icon.blue  { background: #EFF5FB; color: #1F4FA0; }
.pc-meto-card-icon.amber { background: #FBF6E9; color: #854D0E; }
.pc-meto-card-icon.rose  { background: #FAEFEF; color: var(--aguila-600); }
.pc-meto-card-name { font-size: 13px; font-weight: 700; flex: 1; }
.pc-meto-card-tick { color: var(--green-600); font-weight: 800; font-size: 14px; }
.pc-meto-card-desc { font-size: 11.5px; color: var(--text-muted); margin-top: 6px; line-height: 1.45; }

.pc-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.pc-form-row .form-field { margin: 0; }

.pc-info-banner {
  display: flex; gap: 10px; padding: 10px 12px; background: rgba(31,79,160,0.06);
  border: 1px solid rgba(31,79,160,0.20); border-radius: 8px;
  font-size: 12px; line-height: 1.5; color: var(--text);
}

.pc-mini-pill {
  display: inline-block; padding: 6px 10px; background: var(--surface-2); border-radius: 6px;
  font-size: 12px; color: var(--text-muted); margin-top: 4px;
}

.pc-audiencia-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pc-aud-card {
  text-align: left; padding: 12px 14px; border-radius: 8px;
  background: var(--surface); border: 1.5px solid var(--border); cursor: pointer;
}
.pc-aud-card.active { border-color: var(--navy-800); background: white; }
.pc-aud-name { font-size: 13px; font-weight: 700; }

.pc-cargos-pick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.pc-cargo-pill {
  padding: 4px 10px; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--border); cursor: pointer; font-size: 12px;
}
.pc-cargo-pill.active { background: var(--navy-800); color: white; border-color: var(--navy-800); }

.pc-aud-summary {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  padding: 14px; background: var(--surface); border-radius: 10px; border: 1px solid var(--border);
  margin-top: 16px;
}
.pc-aud-num { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin-top: 2px; }

.pc-matriz-list { display: flex; flex-direction: column; gap: 4px; max-height: 320px; overflow: auto; }
.pc-matriz-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
}
.pc-matriz-row.degrad { background: rgba(200,16,46,0.04); border-color: rgba(200,16,46,0.18); }

.pc-firma-box {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 14px; margin-top: 14px; display: flex; flex-direction: column; gap: 12px;
}
.pc-check-line {
  display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px;
  border-radius: 6px; cursor: pointer; transition: background 0.1s;
}
.pc-check-line:hover { background: var(--surface-2); }
.pc-check-line input[type="checkbox"] { margin-top: 2px; flex-shrink: 0; }

.pc-summary-card {
  margin-top: 16px; padding: 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
}
.pc-summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ─── Incidentes ─── */
.ic-list { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.ic-row {
  display: flex; align-items: stretch; gap: 12px; padding: 12px;
  background: white; border: 1px solid var(--border); border-radius: 10px;
  text-align: left; cursor: pointer; transition: all 0.1s;
}
.ic-row:hover { border-color: var(--navy-800); transform: translateY(-1px); }
.ic-positivo { border-left: 3px solid var(--green-600); }
.ic-negativo { border-left: 3px solid var(--aguila-600); }
.ic-row-icon {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800; flex-shrink: 0;
}
.ic-row-icon.positivo { background: rgba(14,138,87,0.10); color: var(--green-600); }
.ic-row-icon.negativo { background: rgba(200,16,46,0.10); color: var(--aguila-600); }
.ic-row-body { flex: 1; min-width: 0; }
.ic-row-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.ic-row-name { font-weight: 700; font-size: 13.5px; }
.ic-row-desc { font-size: 12.5px; color: var(--text); line-height: 1.5; }
.ic-row-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.ic-row-tag {
  padding: 2px 6px; border-radius: 4px; font-size: 10.5px; font-weight: 600;
  background: var(--surface-2); color: var(--text-muted);
}
.ic-row-tag.green { background: rgba(14,138,87,0.10); color: var(--green-600); }
.ic-row-tag.amber { background: rgba(181,118,9,0.10); color: var(--amber-600); }

.ic-tipo-pills { display: flex; gap: 4px; }
.ic-tipo-pill {
  flex: 1; padding: 8px; border-radius: 8px; cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--border);
  font-size: 12.5px; font-weight: 700;
}
.ic-tipo-pill.positivo.active { border-color: var(--green-600); background: rgba(14,138,87,0.06); color: var(--green-600); }
.ic-tipo-pill.negativo.active { border-color: var(--aguila-600); background: rgba(200,16,46,0.06); color: var(--aguila-600); }

.ic-warn-box {
  display: flex; gap: 10px; padding: 10px 12px; background: rgba(200,16,46,0.05);
  border: 1px solid rgba(200,16,46,0.20); border-radius: 8px; margin-top: 12px;
  font-size: 12px; line-height: 1.5;
}

.ic-detail-head { display: flex; align-items: center; gap: 12px; }

/* ─── 1-on-1 ─── */
.o1-list { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.o1-row {
  display: flex; gap: 12px; padding: 10px 14px;
  background: white; border: 1px solid var(--border); border-radius: 10px;
  text-align: left; cursor: pointer; transition: all 0.1s;
}
.o1-row:hover { border-color: var(--navy-800); }
.o1-realizado { border-left: 3px solid var(--green-600); }
.o1-programado { border-left: 3px solid var(--navy-800); }
.o1-date {
  width: 50px; text-align: center; padding-top: 4px;
}
.o1-date-day { font-size: 22px; font-weight: 800; line-height: 1; letter-spacing: -0.02em; }
.o1-date-mes { font-size: 10px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.o1-row-body { flex: 1; min-width: 0; }
.o1-row-head { display: flex; align-items: center; gap: 8px; }
.o1-row-name { font-weight: 700; font-size: 13.5px; }
.o1-row-agenda { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.o1-agenda-pill {
  font-size: 10.5px; padding: 2px 7px; border-radius: 4px;
  background: var(--surface-2); color: var(--text-muted);
}
.o1-row-acuerdos { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.o1-firmado { font-size: 10.5px; color: var(--green-600); font-weight: 700; }

.o1-agenda-pick { display: flex; gap: 4px; flex-wrap: wrap; }
.o1-agenda-chip {
  padding: 4px 10px; border-radius: 999px; background: var(--surface);
  border: 1px solid var(--border); cursor: pointer; font-size: 11.5px;
}
.o1-agenda-chip.active { background: var(--navy-800); color: white; border-color: var(--navy-800); }

.o1-acuerdo {
  display: flex; align-items: center; gap: 8px; padding: 6px 10px;
  background: var(--surface); border-radius: 6px; font-size: 12.5px; margin-bottom: 4px;
}

/* ─── Kudos ─── */
.ku-grid { display: grid; grid-template-columns: 1fr 280px; gap: 16px; margin-top: 16px; }
@media (max-width: 900px) { .ku-grid { grid-template-columns: 1fr; } }
.ku-list { display: flex; flex-direction: column; gap: 10px; }
.ku-card {
  padding: 12px 14px; background: white; border: 1px solid var(--border); border-radius: 10px;
  border-left: 3px solid var(--green-600);
}
.ku-card-head { display: flex; align-items: center; gap: 10px; }
.ku-card-flow { display: flex; align-items: center; gap: 6px; }
.ku-arrow { color: var(--text-subtle); font-size: 18px; }
.ku-card-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.ku-card-tag {
  font-size: 10.5px; padding: 2px 6px; border-radius: 4px;
  background: rgba(14,138,87,0.10); color: var(--green-600); font-weight: 700;
}
.ku-side-card {
  background: white; border: 1px solid var(--border); border-radius: 10px; padding: 14px;
}
.ku-top-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.ku-top-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.ku-top-rank { font-weight: 800; color: var(--text-muted); width: 16px; font-size: 12.5px; }
.ku-top-count {
  background: rgba(14,138,87,0.10); color: var(--green-600);
  padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
}

/* ─── Portal · Mi desempeño ─── */
.po-pdesem { display: flex; flex-direction: column; gap: 12px; }
.po-pdesem.mobile { padding-bottom: 16px; }

.pd-habeas-banner {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: rgba(27,47,94,0.04); border: 1px solid rgba(27,47,94,0.18);
  border-radius: 10px; cursor: pointer; color: var(--text);
}
.pd-habeas-banner:hover { background: rgba(27,47,94,0.07); }

.pd-card {
  background: white; border: 1px solid var(--border); border-radius: 12px;
  padding: 14px;
}
.pd-card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px;
}
.pd-card-head h3 { margin: 0; font-size: 14px; font-weight: 800; letter-spacing: -0.01em; }

.pd-pending-list { display: flex; flex-direction: column; gap: 6px; }
.pd-pending-row {
  display: flex; align-items: center; gap: 10px; padding: 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  cursor: pointer; transition: all 0.1s;
}
.pd-pending-row:hover { border-color: var(--navy-800); background: white; }
.pd-pending-icon {
  width: 30px; height: 30px; border-radius: 8px; background: var(--navy-50, #EEF1F8);
  color: var(--navy-800); display: flex; align-items: center; justify-content: center;
}
.pd-pending-cta { font-size: 12px; font-weight: 700; color: var(--navy-800); }

.pd-anon-banner {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  background: rgba(27,47,94,0.05); border-radius: 6px; color: var(--text);
}
.pd-results-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.pd-result-num { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin-top: 2px; }
.pd-result-num.pos { color: var(--green-600); }

.pd-objs { display: flex; flex-direction: column; gap: 10px; }
.pd-obj-row { padding: 12px; background: var(--surface); border-radius: 8px; }
.pd-obj-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.pd-obj-pct {
  font-size: 22px; font-weight: 800; letter-spacing: -0.02em; min-width: 60px; text-align: right;
}
.pd-obj-pct.green { color: var(--green-600); }
.pd-obj-pct.amber { color: var(--amber-600); }
.pd-obj-pct.rose  { color: var(--aguila-600); }
.pd-obj-bar { height: 6px; background: white; border-radius: 999px; overflow: hidden; border: 1px solid var(--border); }
.pd-obj-bar-fill { height: 100%; transition: width 0.3s; }
.pd-obj-bar-fill.green { background: var(--green-600); }
.pd-obj-bar-fill.amber { background: var(--amber-600); }
.pd-obj-bar-fill.rose  { background: var(--aguila-600); }
.pd-obj-foot { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }

.pd-extras { display: flex; flex-direction: column; gap: 12px; }
.pd-pip { background: rgba(14,138,87,0.04); border-color: rgba(14,138,87,0.30); }
.pd-pip-objeto, .pd-pip-curso {
  display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 12.5px;
  border-bottom: 1px dashed var(--border);
}
.pd-pip-objeto:last-child, .pd-pip-curso:last-child { border-bottom: none; }
.pd-1o1-agenda { display: flex; gap: 4px; flex-wrap: wrap; }

.pd-empty-results {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px; background: var(--surface); border-radius: 8px;
}

.pd-inc-list, .pd-kudos-list { display: flex; flex-direction: column; gap: 6px; }
.pd-inc-row {
  display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px;
  background: var(--surface); border-radius: 6px;
}
.pd-inc-row.positivo { border-left: 3px solid var(--green-600); }
.pd-inc-row.negativo { border-left: 3px solid var(--aguila-600); }
.pd-inc-icon {
  width: 22px; height: 22px; border-radius: 6px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px;
}
.pd-inc-icon.positivo { background: rgba(14,138,87,0.12); color: var(--green-600); }
.pd-inc-icon.negativo { background: rgba(200,16,46,0.12); color: var(--aguila-600); }

.pd-kudo-row {
  display: flex; gap: 10px; padding: 8px 10px;
  background: var(--surface); border-radius: 6px;
}

.pd-eval-comp {
  background: var(--surface); padding: 12px; border-radius: 8px; margin-bottom: 10px;
}
.pd-eval-scale { display: flex; gap: 4px; }
.pd-eval-step {
  flex: 1; padding: 10px; border-radius: 6px; cursor: pointer;
  background: white; border: 1.5px solid var(--border);
  font-size: 14px; font-weight: 700; transition: all 0.1s;
}
.pd-eval-step:hover { border-color: var(--navy-800); }
.pd-eval-step.active { background: var(--navy-800); color: white; border-color: var(--navy-800); }

.pd-habeas-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

/* ─── Tab Desempeño en ficha del empleado ─── */
.td-habeas {
  display: flex; gap: 10px; padding: 10px 12px;
  background: rgba(27,47,94,0.04); border: 1px solid rgba(27,47,94,0.18);
  border-radius: 8px; margin-bottom: 16px; font-size: 12px;
}
.td-ciclos, .td-objs, .td-comps, .td-inc-list { display: flex; flex-direction: column; gap: 8px; }
.td-ciclo-row, .td-obj-row, .td-comp-row {
  display: flex; align-items: center; gap: 12px; padding: 12px;
  background: white; border: 1px solid var(--border); border-radius: 8px;
}
.td-nivel-badge {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px;
}
.td-nivel-badge.n-3 { background: rgba(14,138,87,0.10); color: var(--green-600); }
.td-nivel-badge.n-4 { background: rgba(31,79,160,0.10); color: #1F4FA0; }
.td-nivel-badge.n-5 { background: rgba(200,16,46,0.10); color: var(--aguila-600); }
.td-nivel-badge.n-2 { background: rgba(181,118,9,0.10); color: var(--amber-600); }

.td-pip {
  padding: 12px; background: rgba(14,138,87,0.04);
  border: 1px solid rgba(14,138,87,0.25); border-radius: 8px; margin-bottom: 16px;
}
.td-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
@media (max-width: 720px) { .td-2col { grid-template-columns: 1fr; } }
.td-1o1, .td-kudo {
  padding: 10px 12px; background: white; border: 1px solid var(--border); border-radius: 8px;
}
.td-kudo + .td-kudo { margin-top: 6px; }

/* ─── Detalle del ciclo (Fase B+) ─── */

.cd-back {
  background: none; border: none; color: var(--text-muted);
  font-size: 12px; font-weight: 600; cursor: pointer; padding: 0;
}
.cd-back:hover { color: var(--navy-800); }

.pf-cycle-clickable { cursor: pointer; transition: all 0.12s; }
.pf-cycle-clickable:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.06); border-color: var(--navy-800); }

.cd-fases {
  display: flex; align-items: center; gap: 0; padding: 14px 0;
  margin-bottom: 12px; overflow-x: auto;
}
.cd-fase {
  display: flex; align-items: center; gap: 10px; flex: 1;
  position: relative; min-width: 110px;
}
.cd-fase-bullet {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--surface-2); color: var(--text-muted);
  border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 11.5px; flex-shrink: 0;
}
.cd-fase.active .cd-fase-bullet {
  background: var(--navy-800); color: white; border-color: var(--navy-800);
  box-shadow: 0 0 0 4px rgba(27,47,94,0.12);
}
.cd-fase.done .cd-fase-bullet { background: var(--green-600); color: white; border-color: var(--green-600); }
.cd-fase-text { min-width: 0; }
.cd-fase-label { font-size: 11.5px; font-weight: 700; line-height: 1.2; }
.cd-fase-desc  { font-size: 10.5px; color: var(--text-muted); margin-top: 1px; }
.cd-fase.active .cd-fase-label { color: var(--navy-800); }
.cd-fase.done .cd-fase-label   { color: var(--green-600); }
.cd-fase-line {
  position: absolute; top: 13px; right: -50%; left: 50%;
  height: 2px; background: var(--border); z-index: -1;
}
.cd-fase.done .cd-fase-line { background: var(--green-600); }

.cd-resumen { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 16px; }
@media (max-width: 1024px) { .cd-resumen { grid-template-columns: repeat(2, 1fr); } }
.cd-resumen-card {
  background: white; border: 1px solid var(--border); border-radius: 8px; padding: 12px;
}
.cd-resumen-num {
  font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin-top: 4px;
}
.cd-resumen-pond { display: flex; gap: 10px; margin-top: 6px; font-size: 12px; flex-wrap: wrap; }

.cd-subtab { padding: 4px 0; }

.cd-config-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 800px) { .cd-config-grid { grid-template-columns: 1fr; } }

.cd-kv > div {
  display: flex; align-items: center; padding: 6px 0;
  border-bottom: 1px dashed var(--border); font-size: 12.5px; gap: 10px;
}
.cd-kv > div:last-child { border-bottom: none; }
.cd-kv > div > span:first-child { color: var(--text-muted); min-width: 130px; font-size: 11.5px; }

.cd-comp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 1024px) { .cd-comp-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .cd-comp-grid { grid-template-columns: 1fr; } }
.cd-comp-mini {
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px;
}
.cd-comp-mini-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.cd-comp-mini-id { font-size: 10.5px; color: var(--text-muted); }
.cd-comp-mini-name { font-size: 13px; font-weight: 700; line-height: 1.4; }
.cd-fam {
  font-size: 9.5px; padding: 2px 6px; border-radius: 4px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.cd-fam.fam-cardinal  { background: rgba(27,47,94,0.10);   color: var(--navy-800); }
.cd-fam.fam-funcional { background: rgba(31,79,160,0.10);  color: #1F4FA0; }
.cd-fam.fam-de-nivel  { background: rgba(133,77,14,0.10);  color: #854D0E; }

.cd-factors { display: flex; flex-wrap: wrap; gap: 6px; }
.cd-factor {
  padding: 4px 10px; background: var(--surface-2); border-radius: 999px;
  font-size: 11.5px; color: var(--text);
}
.cd-factor-row {
  display: flex; gap: 12px; padding: 6px 0;
  border-bottom: 1px dashed var(--border);
}
.cd-factor-name { font-weight: 700; min-width: 200px; font-size: 12.5px; }

.cd-normas { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (max-width: 800px) { .cd-normas { grid-template-columns: 1fr; } }
.cd-norma { background: var(--surface); padding: 8px 10px; border-radius: 6px; border-left: 3px solid var(--navy-800); }

.cd-matriz-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 10px 0; }
.cd-matriz-table {
  width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 12px;
}
.cd-matriz-table th {
  text-align: left; padding: 8px 10px; background: var(--surface);
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--text-muted); border-bottom: 1px solid var(--border);
}
.cd-matriz-table td {
  padding: 8px 10px; border-bottom: 1px solid var(--border);
}
.cd-matriz-table tr:hover td { background: var(--surface); }
.cd-matriz-table tr.degrad td { background: rgba(200,16,46,0.04); }
.cd-cell-num {
  display: inline-block; padding: 2px 8px; border-radius: 999px; font-weight: 700;
  font-family: 'JetBrains Mono', monospace; font-size: 11.5px;
}
.cd-cell-num.ok { background: rgba(14,138,87,0.10); color: var(--green-600); }
.cd-cell-num.warn { background: rgba(200,16,46,0.10); color: var(--aguila-600); }

.cd-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) { .cd-grid-2 { grid-template-columns: 1fr; } }

.cd-dist { display: flex; flex-direction: column; gap: 6px; padding: 4px 0; }
.cd-dist-row { display: flex; align-items: center; gap: 12px; }
.cd-dist-lbl { width: 130px; font-size: 12px; font-weight: 600; }
.cd-dist-bar { flex: 1; height: 16px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.cd-dist-fill { height: 100%; }
.cd-dist-1 { background: var(--aguila-600); }
.cd-dist-2 { background: #d97706; }
.cd-dist-3 { background: var(--amber-600); }
.cd-dist-4 { background: #1F4FA0; }
.cd-dist-5 { background: var(--green-600); }
.cd-dist-count { width: 100px; text-align: right; font-size: 12px; }

.cd-rank { display: flex; flex-direction: column; gap: 6px; }
.cd-rank-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; background: var(--surface); border-radius: 6px;
}
.cd-rank-row.green { border-left: 3px solid var(--green-600); }
.cd-rank-row.amber { border-left: 3px solid var(--amber-600); }
.cd-rank-num {
  width: 22px; height: 22px; border-radius: 50%;
  background: white; color: var(--text); border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 11.5px;
}
.cd-rank-row.green .cd-rank-num { border-color: var(--green-600); color: var(--green-600); }
.cd-rank-row.amber .cd-rank-num { border-color: var(--amber-600); color: var(--amber-600); }

.cd-anon-summary { display: flex; gap: 12px; flex-wrap: wrap; }

.cd-cal-info {
  display: flex; gap: 10px; padding: 10px 12px; background: var(--surface-2);
  border-radius: 8px; margin-bottom: 8px; align-items: flex-start;
}

.cd-ajuste {
  display: flex; align-items: center; padding: 6px 0;
  border-bottom: 1px dashed var(--border); font-size: 12px;
}
.cd-ajuste:last-child { border-bottom: none; }

.cd-checklist { display: flex; flex-direction: column; gap: 8px; }
.cd-check {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  background: var(--surface); border-radius: 6px;
}
.cd-check.ok { border-left: 3px solid var(--green-600); }
.cd-check.no { border-left: 3px solid var(--amber-600); }
.cd-check-bullet {
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: white; color: var(--text-muted); border: 1.5px solid var(--border);
}
.cd-check.ok .cd-check-bullet { background: var(--green-600); color: white; border-color: var(--green-600); }

.cd-pub-impacts { padding-left: 18px; font-size: 12.5px; line-height: 1.7; }
.cd-pub-impacts li { margin-bottom: 4px; }

.cd-pub-ready, .cd-pub-done {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 8px; margin-top: 16px; font-size: 13px;
}
.cd-pub-ready { background: rgba(14,138,87,0.08); border: 1px solid rgba(14,138,87,0.30); color: var(--green-600); }
.cd-pub-done  { background: rgba(31,79,160,0.06);  border: 1px solid rgba(31,79,160,0.25); color: #1F4FA0; }

.cd-spark { width: 100%; max-width: 80px; height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.cd-spark-bar { height: 100%; }
.cd-spark-bar.pos { background: var(--green-600); }
.cd-spark-bar.neg { background: var(--aguila-600); }

/* ─── Formularios alineados con look canónico (.ic-cap-version) ─── */

.form-field {
  display: flex; flex-direction: column;
  margin-bottom: 12px;
}
.form-field > label {
  font-size: 11px; font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.05em;
  margin-bottom: 4px;
  display: flex; align-items: center; gap: 6px;
}
.form-field > label .muted {
  font-weight: 400; text-transform: none; letter-spacing: 0;
  color: var(--text-subtle); font-size: 11px;
}
.form-field input[type="text"],
.form-field input[type="number"],
.form-field input[type="email"],
.form-field input[type="url"],
.form-field input[type="date"],
.form-field input[type="time"],
.form-field input:not([type]),
.form-field select,
.form-field textarea {
  font: inherit; font-size: 13px;
  width: 100%;
  padding: 9px 12px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  outline: none;
  font-family: inherit;
  box-sizing: border-box;
}
.form-field select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none' stroke='%231A1F36' stroke-width='1.5'><path d='M1 1l4 4 4-4'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}
.form-field textarea { resize: vertical; min-height: 60px; line-height: 1.55; }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus { border-color: var(--navy-800); box-shadow: 0 0 0 3px rgba(27,47,94,0.08); }

/* También aplica a inputs/selects/textareas sueltos dentro de modales (sin .form-field wrapper)
   pero respetando overrides existentes del proyecto. */
.modal-body input[type="text"]:not(.ic-cap-version):not(.co-editor-title):not(.co-time-input input):not(.pf-obj-input),
.modal-body input[type="number"]:not(.ic-cap-version):not(.co-time-input input):not(.pf-obj-input):not(.pf-obj-slider),
.modal-body input[type="email"]:not(.ic-cap-version),
.modal-body input[type="url"]:not(.ic-cap-version),
.modal-body select:not(.ic-cap-version),
.modal-body textarea:not(.ic-cap-version):not(.co-editor-body):not(.pf-comp-comment) {
  font: inherit; font-size: 13px;
  padding: 9px 12px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  outline: none;
  font-family: inherit;
  box-sizing: border-box;
}
.modal-body select:not(.ic-cap-version) {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none' stroke='%231A1F36' stroke-width='1.5'><path d='M1 1l4 4 4-4'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}
.modal-body select:focus, .modal-body input:focus, .modal-body textarea:focus { border-color: var(--navy-800); }

/* Asterisco rojo para campos obligatorios dentro de label */
.form-field > label::after {
  content: '';
}

/* sst-quickfilter selects · alinear con look canónico */
.sst-quickfilter select {
  font: inherit; font-size: 13px;
  padding: 8px 32px 8px 12px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  outline: none;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none' stroke='%231A1F36' stroke-width='1.5'><path d='M1 1l4 4 4-4'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}
.sst-quickfilter select:focus { border-color: var(--navy-800); }

/* Espaciado consistente entre filas dentro de modales */
.modal-body .form-field + .form-field { margin-top: 0; }
.modal-body .pc-form-row + .form-field,
.modal-body .form-field + .pc-form-row { margin-top: 4px; }

/* ─── Individual picker (selección de colaboradores en NewCycleModal) ─── */

.pc-individual-picker {
  margin-top: 16px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.pc-ind-head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.pc-ind-search {
  flex: 1; display: flex; align-items: center; gap: 8px;
  background: white; border: 1px solid var(--border); border-radius: 8px;
  padding: 6px 10px; color: var(--text-muted);
}
.pc-ind-search input {
  flex: 1; border: none; outline: none; background: transparent;
  font: inherit; font-size: 13px; color: var(--text);
}
.pc-ind-count {
  display: flex; gap: 6px; align-items: center;
  padding: 8px 14px; font-size: 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.pc-ind-list {
  max-height: 260px; overflow-y: auto;
  padding: 6px;
}
.pc-ind-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.1s;
}
.pc-ind-row:hover { background: var(--surface); }
.pc-ind-row.active { background: rgba(27,47,94,0.06); }
.pc-ind-row input[type="checkbox"] { margin: 0; flex-shrink: 0; }
.pc-ind-name { font-weight: 600; font-size: 13px; }

/* ─── Reconocimientos · impacto badges ─── */

.ku-impacto-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 999px;
  font-size: 10px; font-weight: 700; letter-spacing: -0.01em;
  text-transform: uppercase; letter-spacing: 0.04em;
  border: 1px solid;
}
.ku-impacto-badge.ku-impacto-bajo {
  background: var(--surface-2); color: var(--text-muted);
  border-color: var(--border);
}
.ku-impacto-badge.ku-impacto-medio {
  background: rgba(31,79,160,0.10); color: #1F4FA0;
  border-color: rgba(31,79,160,0.25);
}
.ku-impacto-badge.ku-impacto-alto {
  background: rgba(14,138,87,0.12); color: var(--green-600);
  border-color: rgba(14,138,87,0.30);
}

.ku-card.ku-impacto-alto  { border-left-width: 4px; }
.ku-card.ku-impacto-medio { border-left-color: #1F4FA0; }
.ku-card.ku-impacto-bajo  { border-left-color: var(--border); }

.ku-impacto-pills { display: flex; gap: 4px; }
.ku-impacto-pill {
  flex: 1; padding: 8px 6px; border-radius: 8px; cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--border);
  font-size: 12px; font-weight: 700;
  text-transform: capitalize; transition: all 0.1s;
}
.ku-impacto-pill:hover { border-color: var(--navy-800); }
.ku-impacto-pill.bajo.active  { border-color: var(--text-muted); background: var(--surface-2); }
.ku-impacto-pill.medio.active { border-color: #1F4FA0; background: rgba(31,79,160,0.08); color: #1F4FA0; }
.ku-impacto-pill.alto.active  { border-color: var(--green-600); background: rgba(14,138,87,0.08); color: var(--green-600); }

.ku-warn-box {
  display: flex; gap: 10px; padding: 10px 12px;
  background: rgba(14,138,87,0.05);
  border: 1px solid rgba(14,138,87,0.25);
  border-radius: 8px; margin-top: 12px; font-size: 12px; line-height: 1.5;
  color: var(--text);
}

/* Marcar la card del portal con borde por impacto */
.pd-kudo-row.ku-impacto-alto  { border-left: 3px solid var(--green-600); }
.pd-kudo-row.ku-impacto-medio { border-left: 3px solid #1F4FA0; }

/* ─── Nine Box interactivo (panel + acciones masivas) ─── */

.pf-ninebox-meta {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px;
  margin: 8px 0 14px 0; font-size: 12px;
}

.pf-ninebox-layout {
  display: grid; grid-template-columns: 1fr;
  gap: 16px;
  transition: grid-template-columns 0.2s;
}
.pf-ninebox-layout.with-panel { grid-template-columns: minmax(0, 1fr) 360px; }
@media (max-width: 1100px) {
  .pf-ninebox-layout.with-panel { grid-template-columns: 1fr; }
}

.pf-ninebox-main { min-width: 0; }

/* Avatar clickable + estado active + cargo crítico (vista sucesión) */
.pf-cell-avatar {
  cursor: pointer; border: none; transition: transform 0.1s, box-shadow 0.1s;
}
.pf-cell-avatar:hover { transform: translateY(-1px); }
.pf-cell-avatar.active { box-shadow: 0 0 0 3px var(--navy-800); }
.pf-cell-avatar.critico { box-shadow: 0 0 0 2.5px gold; }
.pf-cell-avatar.critico.active { box-shadow: 0 0 0 2.5px gold, 0 0 0 5px var(--navy-800); }

/* Cell head con menú "..." */
.pf-cell-head { position: relative; display: flex; align-items: center; gap: 8px; }
.pf-cell-menu-btn {
  background: transparent; border: none; cursor: pointer;
  font-size: 16px; font-weight: 800; color: var(--text-muted);
  width: 22px; height: 22px; border-radius: 4px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  margin-left: auto;
}
.pf-cell-menu-btn:hover { background: rgba(0,0,0,0.05); color: var(--text); }

.pf-cell-menu {
  position: absolute; top: 100%; right: 0; z-index: 10;
  background: white; border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  min-width: 220px; padding: 4px; margin-top: 4px;
}
.pf-cell-menu-head {
  padding: 8px 10px; border-bottom: 1px solid var(--border);
  font-size: 12px; margin-bottom: 4px;
}
.pf-cell-menu-item {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 8px 10px; border-radius: 6px;
  background: transparent; border: none; cursor: pointer;
  font-size: 12.5px; color: var(--text); text-align: left;
}
.pf-cell-menu-item:hover { background: var(--surface); }
.pf-cell-menu-empty {
  padding: 12px; font-size: 12px; color: var(--text-muted); text-align: center;
}
.pf-cell-menu-toast {
  display: flex; align-items: center; gap: 6px;
  padding: 12px; font-size: 12px; color: var(--green-600); font-weight: 600;
}

/* Panel lateral · detalle de la persona */
.pf-nb-panel {
  background: white; border: 1px solid var(--border); border-radius: 12px;
  padding: 16px; align-self: flex-start;
  position: sticky; top: 16px;
  max-height: calc(100vh - 32px); overflow-y: auto;
}
.pf-nb-panel-head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
}
.pf-nb-panel-head .icon-btn { margin-left: auto; order: 99; }

.pf-nb-scores {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  padding: 12px; background: var(--surface); border-radius: 10px; margin-bottom: 12px;
}
.pf-nb-score-num { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; margin-top: 2px; }

.pf-nb-quad {
  padding: 10px 12px; border-radius: 8px; margin-bottom: 12px; border: 1px solid;
}
.pf-nb-quad-green { background: rgba(14,138,87,0.06); border-color: rgba(14,138,87,0.30); }
.pf-nb-quad-blue  { background: rgba(31,79,160,0.06);  border-color: rgba(31,79,160,0.25); }
.pf-nb-quad-amber { background: rgba(181,118,9,0.06);  border-color: rgba(181,118,9,0.25); }
.pf-nb-quad-rose  { background: rgba(200,16,46,0.05);  border-color: rgba(200,16,46,0.25); }
.pf-nb-quad-navy  { background: rgba(27,47,94,0.05);   border-color: rgba(27,47,94,0.20); }
.pf-nb-quad-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 4px; }
.pf-nb-quad-name { font-size: 14px; font-weight: 800; letter-spacing: -0.01em; }
.pf-nb-quad-coords { font-size: 11px; color: var(--text-muted); }
.pf-nb-quad-accion { display: flex; gap: 6px; align-items: flex-start; font-size: 11.5px; line-height: 1.45; margin-top: 8px; padding-top: 8px; border-top: 1px dashed currentColor; opacity: 0.95; }

.pf-nb-block { margin-bottom: 12px; }
.pf-nb-1o1 { padding: 8px 10px; background: var(--surface); border-radius: 6px; margin-top: 4px; }

.pf-nb-stats-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  padding: 10px; background: var(--surface); border-radius: 10px; margin-bottom: 14px;
}

.pf-nb-actions { display: flex; flex-direction: column; gap: 6px; }
.pf-nb-actions .btn { width: 100%; justify-content: center; }

.pf-nb-toast {
  position: fixed; bottom: 20px; right: 20px;
  background: var(--green-600); color: white;
  padding: 10px 16px; border-radius: 8px;
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600;
  box-shadow: 0 6px 20px rgba(0,0,0,0.18);
  z-index: 100;
  animation: pf-nb-toast-in 0.2s;
}
@keyframes pf-nb-toast-in {
  from { transform: translateY(8px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.pf-ninebox-legend {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px; font-size: 11.5px; color: var(--text-muted); margin-top: 6px;
}
.pf-suc-marker {
  display: inline-block; width: 12px; height: 12px; border-radius: 50%;
  background: white; box-shadow: 0 0 0 2.5px gold;
}

/* Export modal */
.pf-nb-export-list { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.pf-nb-export-list > div { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.pf-nb-export-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.pf-nb-export-cell {
  padding: 8px 10px; background: var(--surface); border-radius: 6px;
  text-align: center;
}
/* ════════════════════════════════════════════════════════════════════ */
/* ── BENEFICIOS · módulo de beneficios corporativos ───────────────── */
/* Prefijo .bn- · reutiliza al máximo .doc-tabs / .modal / .pill / .btn */
/* ════════════════════════════════════════════════════════════════════ */

.bn-section-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 12px;
}
.bn-section-toolbar h3.bn-section-title {
  font-size: 16px; font-weight: 600; margin: 0;
  color: var(--text);
}
@media (max-width: 600px) {
  .bn-section-toolbar { flex-direction: column; align-items: flex-start; }
  .bn-section-toolbar .btn { width: 100%; justify-content: center; }
}

.bn-filters {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px 16px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; margin-bottom: 14px;
}
.bn-filters .bn-search {
  flex: 1; min-width: 200px;
  display: flex; align-items: center; gap: 6px;
  padding: 6px 10px; background: white; border: 1px solid var(--border);
  border-radius: 8px; font-size: 13px;
}
.bn-filters .bn-search input { border: 0; outline: 0; flex: 1; font-size: 13px; background: transparent; }
.bn-chip {
  padding: 5px 10px; border-radius: 999px;
  background: white; border: 1px solid var(--border);
  font-size: 12px; cursor: pointer; transition: all 0.15s;
  display: inline-flex; align-items: center; gap: 4px;
}
.bn-chip:hover { border-color: var(--navy-400, #5b6f9c); }
.bn-chip.active {
  background: var(--navy-800); color: white; border-color: var(--navy-800);
  font-weight: 600;
}

.bn-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
}
.bn-card {
  background: white; border: 1px solid var(--border); border-radius: 12px;
  padding: 16px; cursor: pointer; transition: all 0.15s;
  display: flex; flex-direction: column; gap: 8px;
  position: relative;
}
.bn-card:hover { border-color: var(--navy-800); box-shadow: 0 4px 16px rgba(27,47,94,0.08); transform: translateY(-1px); }
.bn-card.destacado {
  background: linear-gradient(135deg, white 0%, #FFF7E6 100%);
  border-color: var(--amber-600);
}
.bn-card-head {
  display: flex; align-items: flex-start; gap: 10px;
}
.bn-card-emoji {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--navy-50, #EEF1F8);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.bn-card-emoji.rose    { background: #FCD7D3; }
.bn-card-emoji.amber   { background: #FFF1D6; }
.bn-card-emoji.green   { background: #E5F4EC; }
.bn-card-emoji.blue    { background: #E9F5F2; }
.bn-card-emoji.navy    { background: #EEF1F8; }
.bn-card-name {
  font-weight: 600; font-size: 14px; line-height: 1.3; color: var(--text);
}
.bn-card-cat {
  font-size: 11px; color: var(--muted, #6E7891); margin-top: 2px;
}
.bn-card-desc {
  font-size: 12.5px; color: #4a5570; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.bn-card-meta {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 8px; margin-top: auto; border-top: 1px solid var(--border);
  font-size: 11.5px; color: var(--muted, #6E7891);
}
.bn-card-meta .bn-puntos {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 999px;
  background: #FFF1D6; color: var(--amber-600);
  font-weight: 700; font-size: 11.5px;
}
.bn-card-flags {
  position: absolute; top: 12px; right: 12px;
  display: flex; gap: 4px; align-items: center;
}
.bn-card-edit {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 8px; border-radius: 999px;
  background: white; border: 1px solid var(--border);
  color: var(--muted, #6E7891); font-size: 11px; font-weight: 500;
  cursor: pointer; transition: all 0.15s;
}
.bn-card-edit:hover {
  background: var(--navy-800); color: white; border-color: var(--navy-800);
}

/* ─── Editor de beneficio · grid del formulario ─── */
.bn-editor-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.bn-editor-grid .full { grid-column: 1 / -1; }
.bn-editor-grid label {
  display: block; font-size: 12px; font-weight: 600;
  margin-bottom: 6px; color: var(--text);
}
.bn-editor-grid input[type="text"],
.bn-editor-grid input[type="number"],
.bn-editor-grid select,
.bn-editor-grid textarea {
  width: 100%; padding: 8px 10px; font-size: 13px; font-family: inherit;
  border: 1px solid var(--border); border-radius: 6px;
  background: white;
}
.bn-editor-grid textarea { resize: vertical; min-height: 70px; }
.bn-editor-grid .hint { font-size: 11px; color: var(--muted); margin-top: 4px; }
.bn-editor-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px; background: var(--surface); border-radius: 6px;
  font-size: 12.5px; cursor: pointer;
}
.bn-editor-toggle input { margin: 0; }
.bn-editor-emoji {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.bn-editor-emoji button {
  width: 36px; height: 36px; border: 1px solid var(--border);
  background: white; border-radius: 6px; font-size: 18px; cursor: pointer;
}
.bn-editor-emoji button.active {
  background: var(--navy-800); border-color: var(--navy-800);
  transform: scale(1.05);
}
@media (max-width: 600px) { .bn-editor-grid { grid-template-columns: 1fr; } }

/* Grid de KPIs · estilo training */
.bn-kpis {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin-bottom: 16px;
}
.bn-kpi {
  background: white; border: 1px solid var(--border); border-radius: 10px;
  padding: 14px; display: flex; gap: 12px; align-items: center;
}
.bn-kpi-icon {
  width: 40px; height: 40px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.bn-kpi-icon.navy  { background: #EEF1F8; color: var(--navy-800); }
.bn-kpi-icon.green { background: #E5F4EC; color: var(--green-600); }
.bn-kpi-icon.amber { background: #FFF1D6; color: var(--amber-600); }
.bn-kpi-icon.rose  { background: #FCD7D3; color: var(--rose-600, #EF435C); }
.bn-kpi-icon.blue  { background: #E9F5F2; color: var(--blue-600, #0E5964); }
.bn-kpi-num { font-size: 22px; font-weight: 700; color: var(--text); line-height: 1.1; }
.bn-kpi-num small { font-size: 14px; color: var(--muted); margin-left: 2px; }
.bn-kpi-lbl { font-size: 12.5px; color: var(--text); font-weight: 500; }
.bn-kpi-foot { font-size: 11px; margin-top: 2px; }
@media (max-width: 1100px) { .bn-kpis { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .bn-kpis { grid-template-columns: 1fr; } }

/* Vista colaborador · hero con wallet + próximos eventos */
.bn-hero {
  background: linear-gradient(135deg, var(--navy-800) 0%, #2A4980 100%);
  color: white; border-radius: 14px; padding: 22px 24px;
  margin-bottom: 16px;
  display: grid; grid-template-columns: 1fr 1.4fr; gap: 24px; align-items: center;
}
.bn-hero h2 { font-size: 22px; margin: 0 0 4px; font-weight: 600; }
.bn-hero .bn-hero-sub { opacity: 0.85; font-size: 13.5px; margin-bottom: 12px; }
.bn-hero-wallet {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.12); padding: 12px 18px; border-radius: 12px;
  margin-top: 4px;
}
.bn-hero-wallet .bn-wallet-num { font-size: 28px; font-weight: 700; }
.bn-hero-wallet .bn-wallet-lbl { font-size: 12.5px; opacity: 0.85; }
.bn-hero-events {
  display: flex; flex-direction: column; gap: 8px;
}
.bn-hero-event {
  background: rgba(255,255,255,0.10); border-radius: 10px;
  padding: 10px 14px; display: flex; align-items: center; gap: 12px;
}
.bn-hero-event-emoji { font-size: 22px; }
.bn-hero-event-text { font-size: 13.5px; line-height: 1.3; flex: 1; }
.bn-hero-event-text .b { font-weight: 600; }
.bn-hero-event-when { font-size: 12px; opacity: 0.8; font-weight: 500; }
@media (max-width: 880px) { .bn-hero { grid-template-columns: 1fr; } }

/* Sidebar lateral del colaborador (reusa .co-sidebar) — chip de wallet */
.bn-side-wallet {
  margin-top: 12px; padding: 12px;
  background: linear-gradient(135deg, #FFF7E6 0%, #FFFBF2 100%);
  border: 1px solid var(--amber-600); border-radius: 10px;
  display: flex; flex-direction: column; gap: 4px;
}
.bn-side-wallet .lbl { font-size: 11px; color: var(--amber-600); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.bn-side-wallet .num { font-size: 22px; font-weight: 700; color: var(--text); }
.bn-side-wallet .sub { font-size: 11.5px; color: var(--muted); }

/* Matriz cargo × beneficio (reusa epp-matrix patterns) */
.bn-matrix-wrap { background: white; border: 1px solid var(--border); border-radius: 10px; overflow: auto; }
.bn-matrix { width: 100%; border-collapse: collapse; font-size: 12px; min-width: 900px; }
.bn-matrix thead th {
  background: var(--surface); padding: 10px 8px; text-align: center;
  border-bottom: 1px solid var(--border); font-weight: 600; font-size: 11px;
  position: sticky; top: 0; z-index: 1;
}
.bn-matrix thead th.bn-matrix-rowhead { text-align: left; min-width: 220px; }
.bn-matrix tbody td {
  padding: 6px 8px; text-align: center; border-bottom: 1px solid var(--border);
}
.bn-matrix tbody td.bn-matrix-rowhead {
  text-align: left; font-weight: 500; background: var(--surface);
  position: sticky; left: 0; z-index: 1;
}
.bn-matrix-cell {
  width: 28px; height: 28px; border-radius: 6px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 11px; transition: transform 0.1s;
  border: none;
}
.bn-matrix-cell:hover { transform: scale(1.12); }
.bn-matrix-cell.obligatorio { background: var(--green-600); color: white; }
.bn-matrix-cell.opcional    { background: #FFF1D6; color: var(--amber-600); }
.bn-matrix-cell.no_aplica   { background: #F1F1F4; color: var(--muted); }
.bn-matrix-legend {
  display: flex; gap: 14px; padding: 12px 16px; font-size: 12px;
  border-top: 1px solid var(--border); background: var(--surface);
}
.bn-matrix-legend .item { display: inline-flex; align-items: center; gap: 6px; }
.bn-matrix-legend .swatch {
  width: 14px; height: 14px; border-radius: 3px;
}

/* Bandeja de solicitudes (reusa .doc-table) — barras de SLA */
.bn-sla-bar {
  display: inline-flex; align-items: center; gap: 6px;
}
.bn-sla-track {
  width: 80px; height: 6px; background: var(--surface);
  border-radius: 3px; overflow: hidden;
}
.bn-sla-fill {
  height: 100%; transition: width 0.3s;
}
.bn-sla-fill.green { background: var(--green-600); }
.bn-sla-fill.amber { background: var(--amber-600); }
.bn-sla-fill.rose  { background: var(--rose-600, #EF435C); }
.bn-sla-text { font-size: 11.5px; font-weight: 500; }

/* Campañas */
.bn-camp-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
}
.bn-camp-card {
  background: white; border: 1px solid var(--border); border-radius: 12px;
  padding: 16px; display: flex; flex-direction: column; gap: 10px;
}
.bn-camp-card.activa { border-left: 3px solid var(--green-600); }
.bn-camp-card.finalizada { opacity: 0.78; }
.bn-camp-card.planificada { border-left: 3px solid var(--blue-600, #0E5964); }
.bn-camp-head { display: flex; align-items: center; gap: 10px; }
.bn-camp-emoji { font-size: 28px; }
.bn-camp-title { font-weight: 600; font-size: 15px; }
.bn-camp-when  { font-size: 12px; color: var(--muted); margin-top: 2px; }
.bn-camp-desc  { font-size: 12.5px; color: #4a5570; line-height: 1.45; }
.bn-camp-stats {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px;
  padding-top: 10px; border-top: 1px solid var(--border);
}
.bn-camp-stat .num { font-size: 18px; font-weight: 700; color: var(--text); }
.bn-camp-stat .lbl { font-size: 11px; color: var(--muted); }

/* Reconocimientos */
.bn-recog-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}
.bn-recog-card {
  background: white; border: 1px solid var(--border); border-radius: 12px;
  padding: 14px; display: flex; flex-direction: column; gap: 8px;
}
.bn-recog-line {
  display: flex; align-items: center; gap: 8px; font-size: 12.5px;
}
.bn-recog-arrow { color: var(--muted); }
.bn-recog-msg {
  font-size: 13px; color: var(--text); padding: 8px 10px;
  background: var(--surface); border-radius: 8px;
  border-left: 3px solid var(--navy-800);
}
.bn-recog-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 6px; font-size: 11.5px; color: var(--muted);
}
.bn-valor-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 999px; font-weight: 600; font-size: 11px;
}
.bn-valor-pill.amber { background: #FFF1D6; color: var(--amber-600); }
.bn-valor-pill.navy  { background: #EEF1F8; color: var(--navy-800); }
.bn-valor-pill.blue  { background: #E9F5F2; color: var(--blue-600, #0E5964); }
.bn-valor-pill.green { background: #E5F4EC; color: var(--green-600); }
.bn-valor-pill.rose  { background: #FCD7D3; color: var(--rose-600, #EF435C); }

/* Badges (gamificación) */
.bn-badges-row {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.bn-badge-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; background: white; border: 1px solid var(--border);
  border-radius: 999px; font-size: 12px;
}
.bn-badge-chip .emoji { font-size: 16px; }
.bn-badge-chip.lvl-leyenda { background: linear-gradient(135deg, #FFF7E6, #FFE7B0); border-color: var(--amber-600); }
.bn-badge-chip.lvl-oro     { background: #FFF7E6; }
.bn-badge-chip.lvl-plata   { background: #F2F2F5; }

/* Marketplace card */
.bn-mkt-card {
  background: white; border: 1px solid var(--border); border-radius: 12px;
  padding: 14px; display: flex; flex-direction: column; gap: 8px;
  transition: all 0.15s;
}
.bn-mkt-card:hover { border-color: var(--amber-600); box-shadow: 0 4px 16px rgba(181,118,9,0.12); }
.bn-mkt-emoji { font-size: 36px; }
.bn-mkt-name  { font-weight: 600; font-size: 14px; }
.bn-mkt-desc  { font-size: 12.5px; color: var(--muted); flex: 1; }
.bn-mkt-foot  {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 8px; border-top: 1px solid var(--border);
}
.bn-mkt-puntos {
  display: inline-flex; align-items: center; gap: 4px;
  font-weight: 700; color: var(--amber-600);
}

/* Analítica · barras horizontales y donut */
.bn-an-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  margin-bottom: 14px;
}
.bn-an-card {
  background: white; border: 1px solid var(--border); border-radius: 12px;
  padding: 16px;
}
.bn-an-card h3 { font-size: 14px; margin: 0 0 12px; font-weight: 600; }
.bn-bar-row {
  display: grid; grid-template-columns: 180px 1fr 50px; gap: 10px;
  align-items: center; font-size: 12.5px; margin-bottom: 8px;
}
.bn-bar-track { background: var(--surface); height: 18px; border-radius: 4px; overflow: hidden; }
.bn-bar-fill { height: 100%; background: var(--navy-800); transition: width 0.3s; }
.bn-bar-fill.amber { background: var(--amber-600); }
.bn-bar-fill.green { background: var(--green-600); }
.bn-heat-grid {
  display: grid; gap: 4px;
  font-size: 11px;
}
.bn-heat-cell {
  padding: 8px; border-radius: 4px; text-align: center;
  color: white; font-weight: 600;
}
@media (max-width: 880px) { .bn-an-row { grid-template-columns: 1fr; } }

/* Histórico timeline */
.bn-history { display: flex; flex-direction: column; gap: 10px; }
.bn-history-item {
  display: grid; grid-template-columns: 90px 1fr auto; gap: 12px; align-items: center;
  background: white; border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 14px; font-size: 12.5px;
}
.bn-history-when { font-size: 11.5px; color: var(--muted); font-family: var(--font-mono, 'JetBrains Mono', monospace); }
.bn-history-text .lbl { font-weight: 600; }
.bn-history-text .desc { font-size: 11.5px; color: var(--muted); }

/* Detalle modal · benefit */
.bn-detail-grid {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px;
}
.bn-detail-meta {
  background: var(--surface); border-radius: 10px; padding: 14px;
  font-size: 12.5px;
}
.bn-detail-meta .row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--border); }
.bn-detail-meta .row:last-child { border-bottom: 0; }
.bn-detail-meta .row .lbl { color: var(--muted); }
.bn-detail-meta .row .val { font-weight: 600; }
@media (max-width: 720px) { .bn-detail-grid { grid-template-columns: 1fr; } }

/* Persona toggle (reusa .to-view-toggle) — sin overrides necesarios */

/* ─── Portal · Carnet digital ───────────────────────────── */

/* Acceso rápido tipo wallet en el home */
.po-carnet-strip {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  /* Gradiente oficial · Blue Dark → Blue Main → Blue Light */
  background: linear-gradient(118deg, var(--blue-dark) 0%, var(--blue-main) 60%, var(--blue-light) 100%);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  font: inherit;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  text-align: left;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 14px rgba(11, 18, 32, 0.18);
}
.po-carnet-strip::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 85% 30%, rgba(255, 255, 255, 0.18) 0%, transparent 55%);
  pointer-events: none;
}
.po-carnet-strip:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(11, 18, 32, 0.25); }

.po-carnet-strip-thumb {
  position: relative;
  width: 42px; height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255,255,255,0.16), rgba(255,255,255,0.02));
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.po-carnet-strip-avatar {
  font-size: 13px; font-weight: 800; letter-spacing: 0.02em;
  color: white;
}
.po-carnet-strip-shine {
  position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 35%, rgba(255,255,255,0.22) 50%, transparent 65%);
}

.po-carnet-strip-eyebrow {
  font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
  font-weight: 700;
}
.po-carnet-strip-name {
  font-size: 13.5px; font-weight: 700; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.po-carnet-strip-meta {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 2px;
}
.po-carnet-strip-cta {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  flex-shrink: 0;
}

/* Botón "Mi carnet" en el hero del perfil */
.po-profile-carnet-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.12);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  font: inherit;
  font-size: 10.5px; font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease;
}
.po-profile-carnet-btn:hover { background: rgba(255, 255, 255, 0.2); }
.po-profile-carnet-icon {
  width: 26px; height: 26px;
  border-radius: 7px;
  background: var(--aguila-600);
  color: white;
  display: flex; align-items: center; justify-content: center;
}

/* Pantalla del carnet · stage */
.po-carnet-stage {
  gap: 14px;
}
.po-carnet-stage.desktop { gap: 18px; }

.po-carnet-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}

/* Tarjeta con flip 3D */
.po-carnet {
  perspective: 1400px;
  width: 100%;
  max-width: 380px;
  margin: 4px auto 0;
  cursor: pointer;
}
.po-carnet-stage.desktop .po-carnet { max-width: 460px; }

.po-carnet-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 1.586 / 1; /* proporción ISO de tarjeta de identidad */
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.4, 0.1, 0.2, 1);
}
.po-carnet.flipped .po-carnet-inner {
  transform: rotateY(180deg);
}

.po-carnet-face {
  position: absolute; inset: 0;
  border-radius: 16px;
  overflow: hidden;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 18px 38px rgba(15, 25, 60, 0.28), 0 2px 6px rgba(15, 25, 60, 0.16);
  color: white;
}

.po-carnet-front {
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-main) 60%, var(--blue-light) 100%);
  padding: 14px 16px 12px;
  gap: 10px;
}
.po-carnet-back-face {
  background: linear-gradient(135deg, #1A2752 0%, var(--navy-800) 50%, #243769 100%);
  padding: 12px 14px;
  gap: 8px;
  transform: rotateY(180deg);
}

.po-carnet-bg-pattern {
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 88% 18%, rgba(200, 16, 46, 0.32) 0%, transparent 38%),
    radial-gradient(circle at 12% 92%, rgba(255, 255, 255, 0.08) 0%, transparent 45%);
}
.po-carnet-bg-pattern.back {
  background:
    radial-gradient(circle at 18% 22%, rgba(200, 16, 46, 0.18) 0%, transparent 42%),
    radial-gradient(circle at 90% 86%, rgba(255, 255, 255, 0.06) 0%, transparent 40%);
}

.po-carnet-top {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  position: relative; z-index: 1;
}
.po-carnet-brand {
  display: flex; align-items: center; gap: 8px;
}
.po-carnet-logo {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: white;
  color: var(--navy-800);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800;
}
.po-carnet-co {
  font-size: 12.5px; font-weight: 700; letter-spacing: -0.005em;
  line-height: 1.2;
}
.po-carnet-platform {
  font-size: 9.5px; letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.62);
  margin-top: 1px;
}
.po-carnet-id {
  font-size: 10px; font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--aguila-600);
  color: white;
  letter-spacing: 0.04em;
}

.po-carnet-body {
  display: flex; gap: 12px;
  position: relative; z-index: 1;
  flex: 1;
  min-height: 0;
}
.po-carnet-photo {
  width: 78px; flex-shrink: 0;
  border-radius: 10px;
  background: linear-gradient(150deg, rgba(255,255,255,0.18), rgba(255,255,255,0.04));
  border: 1px solid rgba(255, 255, 255, 0.22);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px;
  position: relative;
  overflow: hidden;
}
.po-carnet-stage.desktop .po-carnet-photo { width: 96px; }
.po-carnet-photo-initials {
  font-size: 30px; font-weight: 800; letter-spacing: -0.02em;
  color: white;
}
.po-carnet-stage.desktop .po-carnet-photo-initials { font-size: 38px; }
.po-carnet-photo-tag {
  position: absolute; bottom: 4px;
  font-size: 8px; letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.5);
}

.po-carnet-info {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
  gap: 4px;
}
.po-carnet-name {
  font-size: 14.5px; font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.po-carnet-stage.desktop .po-carnet-name { font-size: 17px; }
.po-carnet-role {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 500;
  margin-bottom: 4px;
}
.po-carnet-stage.desktop .po-carnet-role { font-size: 12.5px; }
.po-carnet-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
  margin-top: 2px;
}
.po-carnet-lbl {
  font-size: 8.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 700;
}
.po-carnet-stage.desktop .po-carnet-lbl { font-size: 9.5px; }
.po-carnet-val {
  font-size: 10.5px; font-weight: 600;
  color: white;
  margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.po-carnet-stage.desktop .po-carnet-val { font-size: 12px; }

.po-carnet-footer {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 10px;
  position: relative; z-index: 1;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.po-carnet-flip-hint {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 9.5px; font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
}

/* Cara reversa */
.po-carnet-back-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  position: relative; z-index: 1;
}
.po-carnet-back-body {
  display: flex; gap: 12px;
  position: relative; z-index: 1;
  flex: 1;
  min-height: 0;
}
.po-carnet-back-info {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
  justify-content: space-between;
}
.po-carnet-back-row {
  display: flex; flex-direction: column;
  gap: 1px;
  padding: 3px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}
.po-carnet-back-row:last-child { border-bottom: none; }

.po-carnet-qr-box {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: white;
  border-radius: 10px;
  padding: 8px;
  cursor: default;
  flex-shrink: 0;
}
.po-carnet-qr {
  display: grid;
  grid-template-columns: repeat(21, 1fr);
  grid-template-rows: repeat(21, 1fr);
  background: white;
}
.po-carnet-qr span { background: white; }
.po-carnet-qr span.on { background: #0A1020; }
.po-carnet-qr-code {
  font-size: 8.5px; font-weight: 700;
  color: var(--navy-800);
  letter-spacing: 0.04em;
}
.po-carnet-qr-hint {
  font-size: 8.5px;
  color: var(--muted);
}

.po-carnet-back-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 9px;
  color: rgba(255, 255, 255, 0.55);
  position: relative; z-index: 1;
}
.po-carnet-hash, .po-carnet-emitted {
  letter-spacing: 0.04em;
}

/* Acciones bajo el carnet */
.po-carnet-actions {
  display: flex; gap: 8px; flex-wrap: wrap;
  justify-content: center;
}
.po-carnet-action {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 9px;
  font: inherit; font-size: 12px; font-weight: 600;
  color: var(--navy-800);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.po-carnet-action:hover { background: var(--surface); border-color: var(--navy-800); }

.po-carnet-note {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text);
}
.po-carnet-note-icon {
  width: 24px; height: 24px;
  border-radius: 7px;
  background: var(--navy-50);
  color: var(--navy-800);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.po-carnet-action.primary {
  background: var(--navy-800);
  color: white;
  border-color: var(--navy-800);
}
.po-carnet-action.primary:hover { background: var(--navy-900); border-color: var(--navy-900); }

/* ─── Carnet · flujo de compartir ──────────────────────── */

.po-carnet-share { gap: 14px; }
.po-carnet-share.desktop { gap: 16px; }

.po-share-section {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex; flex-direction: column; gap: 10px;
}

.po-share-section-title {
  font-size: 12px; font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--text);
}

/* Presets */
.po-share-presets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.po-carnet-share.desktop .po-share-presets {
  grid-template-columns: repeat(4, 1fr);
}
.po-share-preset {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
  font: inherit;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.po-share-preset:hover { background: white; border-color: var(--navy-800); transform: translateY(-1px); }
.po-share-preset-name {
  font-size: 12.5px; font-weight: 700;
  color: var(--navy-800);
}
.po-share-preset-desc {
  font-size: 10.5px;
  color: var(--text-muted);
  line-height: 1.35;
}

/* Grupos de toggles */
.po-share-group {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.po-share-group-head {
  padding: 8px 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.po-share-group-label {
  font-size: 11.5px; font-weight: 700;
  color: var(--text);
}
.po-share-group-hint {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 1px;
}

.po-share-toggles {
  display: flex; flex-direction: column;
}
.po-share-toggle {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  position: relative;
  transition: background 0.12s ease;
}
.po-share-toggle:last-child { border-bottom: none; }
.po-share-toggle:hover:not(.locked) { background: var(--surface); }
.po-share-toggle.locked { cursor: default; opacity: 0.85; }
.po-share-toggle input { position: absolute; opacity: 0; pointer-events: none; }

.po-share-toggle-body {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 1px;
}
.po-share-toggle-name {
  font-size: 12px; font-weight: 600;
  color: var(--text);
  display: inline-flex; align-items: center; gap: 6px;
  flex-wrap: wrap;
}
.po-share-toggle-desc {
  font-size: 10.5px;
  color: var(--text-muted);
  line-height: 1.4;
}
.po-share-locked {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 9px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 2px 6px;
  background: var(--navy-50);
  color: var(--navy-800);
  border-radius: 4px;
}

/* iOS-style switch */
.po-share-switch {
  width: 36px; height: 20px;
  border-radius: 999px;
  background: var(--border-strong);
  position: relative;
  flex-shrink: 0;
  transition: background 0.18s ease;
  margin-top: 2px;
}
.po-share-switch span {
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  transition: left 0.18s ease;
}
.po-share-toggle.on .po-share-switch { background: var(--green-600); }
.po-share-toggle.on .po-share-switch span { left: 18px; }
.po-share-toggle.locked .po-share-switch { background: var(--navy-800); }

/* TTL pills */
.po-share-ttl {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.po-share-ttl-pill {
  padding: 7px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font: inherit; font-size: 11.5px; font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.po-share-ttl-pill:hover { background: white; border-color: var(--navy-800); }
.po-share-ttl-pill.on {
  background: var(--navy-800);
  color: white;
  border-color: var(--navy-800);
}

/* Link rows */
.po-share-link-row {
  display: flex; align-items: stretch; gap: 6px;
}
.po-share-link-input {
  flex: 1; min-width: 0;
  padding: 9px 11px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 11.5px;
  color: var(--text);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
}
.po-share-link-input:focus { outline: 2px solid var(--navy-800); outline-offset: -2px; }

.po-share-short {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.po-share-short-url {
  font-size: 12.5px; font-weight: 700;
  color: var(--navy-800);
  margin-top: 1px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.po-share-preview-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 14px;
  background: white;
  border: 1px dashed var(--border-strong);
  border-radius: 9px;
  font: inherit; font-size: 12px; font-weight: 600;
  color: var(--navy-800);
  cursor: pointer;
  align-self: flex-start;
  margin-top: 2px;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.po-share-preview-btn:hover { background: var(--navy-50); border-color: var(--navy-800); border-style: solid; }

/* ─── Carnet público (carnet-public.jsx) ──────────────── */

.cp-shell {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 16px 40px;
  color: var(--text);
}

.cp-topbar {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  margin-bottom: 24px;
  position: sticky; top: 0; z-index: 10;
}
.cp-topbar-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.cp-brand {
  display: flex; align-items: center; gap: 10px;
}
.cp-brand-mark {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: var(--navy-800);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 800;
}
.cp-brand-name { font-size: 14px; font-weight: 700; letter-spacing: -0.005em; }
.cp-brand-sub { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

.cp-secure-tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px;
  background: rgba(14, 138, 87, 0.1);
  color: var(--green-600);
  border-radius: 999px;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.02em;
}

.cp-main {
  display: flex; flex-direction: column; gap: 18px;
}

/* Status */
.cp-status {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid;
}
.cp-status-green {
  background: rgba(14, 138, 87, 0.06);
  border-color: rgba(14, 138, 87, 0.3);
}
.cp-status-amber {
  background: rgba(181, 118, 9, 0.06);
  border-color: rgba(181, 118, 9, 0.3);
}
.cp-status-rose {
  background: rgba(200, 16, 46, 0.06);
  border-color: rgba(200, 16, 46, 0.3);
}
.cp-status-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: white;
}
.cp-status-green .cp-status-icon  { background: var(--green-600); }
.cp-status-amber .cp-status-icon  { background: var(--amber-600); }
.cp-status-rose  .cp-status-icon  { background: var(--aguila-600); }
.cp-status-title { font-size: 15px; font-weight: 700; letter-spacing: -0.005em; }
.cp-status-desc  { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.cp-status-code  {
  font-size: 11px; font-weight: 700;
  padding: 6px 10px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
}

/* Carnet público (la tarjeta) */
.cp-carnet {
  position: relative;
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-main) 60%, var(--blue-light) 100%);
  color: white;
  border-radius: 18px;
  padding: 22px 24px;
  display: flex; flex-direction: column; gap: 18px;
  box-shadow: 0 18px 38px rgba(15, 25, 60, 0.28), 0 2px 6px rgba(15, 25, 60, 0.16);
  overflow: hidden;
}
.cp-carnet-bg {
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 88% 18%, rgba(200, 16, 46, 0.32) 0%, transparent 38%),
    radial-gradient(circle at 12% 92%, rgba(255, 255, 255, 0.08) 0%, transparent 45%);
}
.cp-carnet-top, .cp-carnet-body, .cp-carnet-footer { position: relative; z-index: 1; }
.cp-carnet-top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.cp-carnet-brand {
  display: flex; align-items: center; gap: 10px;
}
.cp-carnet-logo {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: white;
  color: var(--navy-800);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800;
}
.cp-carnet-co {
  font-size: 14px; font-weight: 700;
  letter-spacing: -0.005em;
}
.cp-carnet-platform {
  font-size: 10.5px; letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.62);
  margin-top: 1px;
}
.cp-carnet-id {
  font-size: 12px; font-weight: 700;
  padding: 5px 10px;
  border-radius: 7px;
  background: var(--aguila-600);
  letter-spacing: 0.04em;
}

.cp-carnet-body {
  display: flex; gap: 16px;
}
.cp-carnet-photo {
  width: 110px; flex-shrink: 0;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  background: linear-gradient(150deg, rgba(255,255,255,0.18), rgba(255,255,255,0.04));
  border: 1px solid rgba(255, 255, 255, 0.22);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  position: relative;
}
.cp-carnet-photo-initials { font-size: 44px; font-weight: 800; letter-spacing: -0.02em; }
.cp-carnet-photo-tag {
  position: absolute; bottom: 6px;
  font-size: 8.5px; letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.5);
}

.cp-carnet-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.cp-carnet-name { font-size: 22px; font-weight: 800; letter-spacing: -0.012em; }
.cp-carnet-role { font-size: 13px; color: rgba(255, 255, 255, 0.78); margin-bottom: 6px; }
.cp-carnet-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
}
.cp-span-2 { grid-column: span 2; }
.cp-carnet-lbl {
  font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 700;
}
.cp-carnet-val {
  font-size: 12.5px; font-weight: 600;
  margin-top: 2px;
}
.cp-carnet-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 10.5px;
}
.cp-carnet-foot-tag {
  letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
  font-weight: 700;
}

/* Verify block */
.cp-verify {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 18px;
}
@media (max-width: 640px) {
  .cp-verify { grid-template-columns: 1fr; }
}
.cp-verify-title { font-size: 16px; font-weight: 700; margin-top: 6px; letter-spacing: -0.005em; }
.cp-verify-desc  { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; margin-top: 4px; margin-bottom: 12px; }
.cp-verify-rows  { display: flex; flex-direction: column; }
.cp-verify-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.cp-verify-row:last-child { border-bottom: none; }
.cp-hash-btn {
  background: none; border: none;
  font: inherit; font-size: 11.5px; font-weight: 600;
  color: var(--navy-800);
  cursor: pointer;
  padding: 0;
}
.cp-hash-btn:hover { text-decoration: underline; }
.cp-verify-right {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding-top: 6px;
}

/* Public QR */
.cp-qr {
  display: grid;
  grid-template-columns: repeat(21, 1fr);
  grid-template-rows: repeat(21, 1fr);
  background: white;
  padding: 6px;
  border: 1px solid var(--text);
  border-radius: 8px;
}
.cp-qr span      { background: white; }
.cp-qr span.on   { background: #0A1020; }

/* Fields list */
.cp-fields {
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
}
.cp-fields-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 4px;
}
.cp-fields-head h3 { font-size: 14px; font-weight: 700; letter-spacing: -0.005em; margin: 0; }
.cp-fields-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 4px 0 12px;
}
.cp-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
}
@media (max-width: 540px) {
  .cp-fields-grid { grid-template-columns: 1fr; }
}
.cp-field {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 12px;
  border: 1px solid var(--border);
}
.cp-field.on {
  background: rgba(14, 138, 87, 0.06);
  border-color: rgba(14, 138, 87, 0.25);
  color: var(--text);
}
.cp-field.off {
  background: var(--surface);
  color: var(--text-muted);
  text-decoration: line-through;
}
.cp-field-icon {
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: white;
}
.cp-field.on  .cp-field-icon { background: var(--green-600); }
.cp-field.off .cp-field-icon { background: var(--text-muted); }

/* Footer */
.cp-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--text-muted);
}

/* ─── Portal · Celebraciones (cumpleaños y aniversarios) ─ */

/* Hero del cumpleañero del día */
.po-celeb-hero {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: linear-gradient(120deg, #FFE4EC 0%, #FFF1F4 60%, #FFEAE0 100%);
  border: 1px solid rgba(200, 16, 46, 0.18);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 8px;
}
.po-celeb-hero-pattern {
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 90% 20%, rgba(200, 16, 46, 0.18) 0%, transparent 36%),
    radial-gradient(circle at 12% 88%, rgba(255, 200, 50, 0.18) 0%, transparent 38%);
}
.po-celeb-hero-icon {
  width: 42px; height: 42px;
  border-radius: 11px;
  background: var(--aguila-600);
  color: white;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  position: relative; z-index: 1;
  box-shadow: 0 4px 10px rgba(200, 16, 46, 0.28);
}
.po-celeb-hero-eyebrow {
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  font-weight: 700;
  color: var(--aguila-600);
  position: relative; z-index: 1;
}
.po-celeb-hero-name {
  font-size: 14.5px; font-weight: 800;
  letter-spacing: -0.005em;
  color: var(--text);
  margin-top: 1px;
  position: relative; z-index: 1;
}
.po-celeb-hero-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
  position: relative; z-index: 1;
}

/* Grid de columnas (cumpleaños / aniversarios) */
.po-celeb-grid {
  display: grid;
  gap: 10px;
}
.po-celeb-grid.mobile   { grid-template-columns: 1fr; }
.po-celeb-grid.desktop  { grid-template-columns: 1fr 1fr; }

.po-celeb-col {
  display: flex; flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: white;
  overflow: hidden;
}
.po-celeb-col-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.po-celeb-col-title {
  font-size: 11.5px; font-weight: 700;
  letter-spacing: -0.005em;
  color: var(--text);
}

.po-celeb-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s ease;
}
.po-celeb-row:last-child { border-bottom: none; }
.po-celeb-row:hover { background: var(--surface); }
.po-celeb-row.milestone { background: linear-gradient(90deg, rgba(200, 16, 46, 0.04), transparent 70%); }

.po-celeb-avatar {
  position: relative;
  width: 34px; height: 34px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; letter-spacing: 0.02em;
  color: white;
  flex-shrink: 0;
}
.po-celeb-avatar-rose  { background: linear-gradient(135deg, #E11D48, #BE123C); }
.po-celeb-avatar-amber { background: linear-gradient(135deg, #D97706, #B45309); }
.po-celeb-avatar-blue  { background: linear-gradient(135deg, #0E5964, #0E5964); }
.po-celeb-avatar-green { background: linear-gradient(135deg, #059669, #047857); }
.po-celeb-avatar-navy  { background: linear-gradient(135deg, var(--navy-800), var(--navy-900)); }
.po-celeb-milestone-dot {
  position: absolute;
  top: -3px; right: -3px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--aguila-600);
  border: 2px solid white;
}

.po-celeb-name {
  font-size: 12.5px; font-weight: 700;
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.po-celeb-meta {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-top: 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.po-celeb-when {
  text-align: right;
  flex-shrink: 0;
}
.po-celeb-date {
  font-size: 11px; font-weight: 700;
  color: var(--text);
}
.po-celeb-years {
  font-size: 16px; font-weight: 800;
  color: var(--navy-800);
  letter-spacing: -0.02em;
  line-height: 1;
}
.po-celeb-years.milestone { color: var(--aguila-600); }
.po-celeb-years span {
  display: block;
  font-size: 9px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 2px;
}
.po-celeb-when-pill {
  font-size: 9.5px; font-weight: 600;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Botón felicitar */
.po-celeb-greet {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 12px;
  background: var(--navy-800);
  color: white;
  border: 1px solid var(--navy-800);
  border-radius: 8px;
  font: inherit; font-size: 11.5px; font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  flex-shrink: 0;
}
.po-celeb-greet:hover { background: var(--navy-900); border-color: var(--navy-900); }
.po-celeb-greet.done {
  background: rgba(14, 138, 87, 0.1);
  color: var(--green-600);
  border-color: rgba(14, 138, 87, 0.35);
  cursor: default;
}
.po-celeb-greet.sm {
  padding: 0;
  width: 28px; height: 28px;
  justify-content: center;
  background: white;
  color: var(--navy-800);
  border-color: var(--border);
}
.po-celeb-greet.sm:hover { background: var(--navy-800); color: white; border-color: var(--navy-800); }
.po-celeb-greet.sm.done {
  background: rgba(14, 138, 87, 0.1);
  color: var(--green-600);
  border-color: rgba(14, 138, 87, 0.35);
}

/* ─── Portal · Comunicaciones (home feed) ─── */

.po-comm-list {
  display: flex; flex-direction: column;
  gap: 8px;
}
.po-comm-card {
  display: flex; gap: 12px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  border-left: 3px solid var(--blue-main);
  text-align: left;
  cursor: pointer;
  transition: all .15s ease;
  font-family: inherit;
  width: 100%;
}
.po-comm-card:hover {
  border-color: var(--blue-main);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.08);
}
.po-comm-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--navy-700);
  color: white;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700;
  flex-shrink: 0;
}
.po-comm-meta {
  display: flex; gap: 6px; align-items: center;
  margin-bottom: 4px;
  font-size: 11px;
}
.po-comm-author {
  font-weight: 700;
  color: var(--text);
}
.po-comm-dot { color: var(--text-muted); }
.po-comm-when {
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
}
.po-comm-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 4px;
}
.po-comm-summary {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.po-comm-foot {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 8px;
  gap: 8px;
}
.po-comm-aud {
  display: inline-flex; align-items: center;
  font-size: 10px; font-weight: 700;
  padding: 3px 8px;
  border-radius: 5px;
  letter-spacing: 0.02em;
}
.po-comm-aud.navy  { background: var(--navy-50);   color: var(--navy-800); }
.po-comm-aud.blue  { background: var(--blue-100);  color: var(--blue-600); }
.po-comm-aud.amber { background: var(--amber-100); color: var(--amber-600); }
.po-comm-aud.green { background: var(--green-100); color: var(--green-600); }
.po-comm-aud.rose  { background: var(--rose-100);  color: var(--rose-600); }
.po-comm-read {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 600;
  color: var(--blue-main);
}

/* ─── Portal · Histórico de pagos · year tabs + click rows ─── */

.po-pay-hist-tabs {
  display: flex; align-items: center;
  gap: 6px;
  padding: 8px 0 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.po-pay-hist-tab {
  font-family: inherit;
  font-size: 11.5px; font-weight: 600;
  padding: 5px 11px;
  border-radius: 7px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
}
.po-pay-hist-tab:hover { background: var(--surface); color: var(--text); }
.po-pay-hist-tab.active {
  background: var(--navy-50);
  color: var(--navy-800);
  border-color: var(--navy-100);
}
.po-pay-hist-bulk {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: inherit;
  font-size: 11px; font-weight: 600;
  padding: 5px 10px;
  border-radius: 7px;
  background: white;
  border: 1px solid var(--border);
  color: var(--navy-800);
  cursor: pointer;
}
.po-pay-hist-bulk:hover { background: var(--navy-50); border-color: var(--navy-100); }

.po-pay-hist-row.clickable {
  width: 100%;
  font-family: inherit;
  background: white;
  cursor: pointer;
  text-align: left;
  align-items: center;
}
.po-pay-hist-mark {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--green-100);
  color: var(--green-600);
  display: grid; place-items: center;
  flex-shrink: 0;
  margin-right: 4px;
}
.po-pay-hist-chev {
  color: var(--text-muted);
  display: inline-flex; align-items: center;
  margin-left: 6px;
}
.po-pay-hist-row.clickable:hover .po-pay-hist-chev { color: var(--navy-800); }
.po-pay-hist-note {
  font-size: 10.5px;
  color: var(--amber-600);
  font-weight: 600;
  margin-top: 3px;
}

/* ─── Portal · Modal desprendible ─── */

.po-pay-mod-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}
.po-pay-mod-eye {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.po-pay-mod-eye.light { color: rgba(255,255,255,0.7); }
.po-pay-mod-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 5px 0;
  font-size: 12.5px;
  color: var(--text);
}
.po-pay-mod-row .neg { color: var(--rose-600); }
.po-pay-mod-row.total {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  font-weight: 700;
  font-size: 13px;
}
.po-pay-mod-net {
  background: linear-gradient(135deg, var(--navy-800) 0%, var(--blue-main) 60%, var(--blue-light) 100%);
  border-radius: 12px;
  padding: 14px 16px;
  color: white;
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px;
}
.po-pay-mod-net-amount {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: 2px;
}
.po-pay-mod-net-account {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,0.15);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.po-pay-mod-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-top: 4px;
}
.po-pay-mod-meta > div {
  display: flex; flex-direction: column;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
}
.po-pay-mod-meta .mono { font-size: 11.5px; font-weight: 700; color: var(--text); }

@media (max-width: 600px) {
  .po-pay-mod-meta { grid-template-columns: 1fr; }
  .po-pay-mod-net { flex-direction: column; align-items: flex-start; }
}
