/* =============================================================
   LA MURALLA · DESIGN SYSTEM
   Portal del Empleado · Gestión Documental · Control Horario
   ============================================================= */

:root {
  /* Brand · LA MURALLA rojo vino */
  --brand: #972A30;
  --brand-600: #7E2228;
  --brand-700: #5E1A1F;
  --brand-50: #FBEEEE;
  --brand-100: #F6DCDD;
  --brand-200: #EBBDBF;

  /* Accent · oro corporativo */
  --accent: #C9A227;
  --accent-50: #FBF6E6;
  --accent-100: #F5EBC4;
  --accent-warm: #B8860B;

  --info: #2D7DA8;
  --info-50: #F0F7FB;
  --info-100: #DDECF5;

  --success: #5C8C5A;
  --success-50: #F1F6F0;
  --success-100: #DCEBD9;

  --danger: #C8503E;
  --danger-50: #FBF1EF;
  --danger-100: #F5D8D2;

  --warning: #D4A056;
  --warning-50: #FCF7EF;
  --warning-100: #F7E9CE;

  /* Neutrals · warm cream/walnut */
  --ink: #2C1F12;
  --ink-2: #4A3826;
  --ink-3: #6B5841;
  --muted: #8B7860;
  --muted-2: #B0A088;
  --line: #EAE0CF;
  --line-2: #D4C5A8;
  --soft: #F5EEDF;
  --soft-2: #FAF5E9;
  --bg: #FBF8F2;
  --card: #FFFFFF;

  /* Typography */
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Layout */
  --sidebar-w: 260px;
  --header-h: 80px;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.08), 0 2px 4px -1px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px -4px rgba(15, 23, 42, 0.10), 0 4px 8px -2px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 20px 40px -8px rgba(15, 23, 42, 0.12), 0 8px 16px -4px rgba(15, 23, 42, 0.06);
  --shadow-glow: 0 0 0 4px rgba(151, 42, 48, 0.12);

  /* Transitions */
  --t-fast: 120ms cubic-bezier(0.4, 0, 0.2, 1);
  --t: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-slow: 320ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: inherit; }
img { display: block; max-width: 100%; }
::selection { background: var(--brand-100); color: var(--brand-700); }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--line-2); }

/* =============================================================
   LOGO · LA MURALLA
   ============================================================= */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.logo-img {
  height: 62px;
  width: auto;
  display: block;
  margin: 0 auto;
}

/* =============================================================
   APP SHELL
   ============================================================= */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--card);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
.sidebar-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 80px;
}
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px;
}
.nav-group { margin-bottom: 18px; }
.nav-group-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted-2);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0 12px 6px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--ink-3);
  font-weight: 500;
  position: relative;
  transition: var(--t-fast);
  margin-bottom: 1px;
}
.nav-item i { width: 16px; font-size: 14px; color: var(--muted); transition: var(--t-fast); }
.nav-item:hover { background: var(--soft); color: var(--ink); }
.nav-item:hover i { color: var(--ink-3); }
.nav-item.active {
  background: var(--brand-50);
  color: var(--brand-600);
  font-weight: 600;
}
.nav-item.active i { color: var(--brand); }
.nav-item.active::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background: var(--brand);
  border-radius: 0 3px 3px 0;
}
.nav-item .pill {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
}
.nav-item .pill.brand { background: var(--brand-100); color: var(--brand-600); }
.nav-item .pill.warn { background: var(--warning-100); color: #B45309; }
.nav-item .pill.danger { background: var(--danger-100); color: #B91C1C; }

.sidebar-foot {
  padding: 12px;
  border-top: 1px solid var(--line);
}
.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--soft-2);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: var(--t-fast);
}
.user-card:hover { background: var(--soft); }
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}
.user-meta { flex: 1; min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; color: var(--ink); }
.user-role { font-size: 11px; color: var(--muted); }

/* =============================================================
   MAIN
   ============================================================= */
.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  height: var(--header-h);
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.crumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
.crumbs i { font-size: 9px; color: var(--muted-2); }
.crumbs strong { color: var(--ink); font-weight: 600; }
.topbar-logo { display: none; height: 38px; width: auto; margin-right: 4px; }

.topbar-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}
.search {
  width: 320px;
  height: 36px;
  background: var(--soft-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  transition: var(--t-fast);
}
.search:focus-within {
  background: #fff;
  border-color: var(--brand-200);
  box-shadow: var(--shadow-glow);
}
.search i { color: var(--muted-2); font-size: 13px; }
.search input { flex: 1; border: none; background: transparent; outline: none; font-size: 13px; color: var(--ink); }
.search input::placeholder { color: var(--muted-2); }
.search kbd {
  font-family: var(--font);
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: 4px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: var(--t-fast);
  position: relative;
  border: 1px solid transparent;
}
.icon-btn:hover { background: var(--soft); color: var(--ink); border-color: var(--line); }
.icon-btn .dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--danger);
  border: 2px solid #fff;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  transition: var(--t-fast);
  white-space: nowrap;
}
.btn-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow-xs);
}
.btn-primary:hover { background: var(--ink-2); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-brand {
  background: var(--brand);
  color: #fff;
}
.btn-brand:hover { background: var(--brand-600); }
.btn-ghost {
  background: var(--card);
  color: var(--ink-3);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: var(--soft); border-color: var(--line-2); color: var(--ink); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.btn-xs { height: 24px; padding: 0 8px; font-size: 11px; border-radius: 6px; gap: 5px; }

/* =============================================================
   PAGE CONTENT
   ============================================================= */
.page {
  padding: 24px 28px 40px;
  max-width: 1600px;
  width: 100%;
}
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.page-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 4px;
}
.page-sub {
  font-size: 13px;
  color: var(--muted);
}
.page-actions { display: flex; align-items: center; gap: 8px; }

/* =============================================================
   CARDS
   ============================================================= */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  transition: var(--t);
}
.card:hover { box-shadow: var(--shadow-sm); }
.card-head {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}
.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}
.card-title .dot-ring {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.18);
  animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(16,185,129,0.18); }
  50% { box-shadow: 0 0 0 6px rgba(16,185,129,0.05); }
}
.card-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.card-body { padding: 18px; }
.card-body.flush { padding: 0; overflow-x: auto; }
.card-foot {
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  background: var(--soft-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}

/* =============================================================
   KPI CARDS
   ============================================================= */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
.kpi {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px;
  position: relative;
  overflow: hidden;
  transition: var(--t);
}
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-2); }
.kpi-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}
.kpi-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 15px;
}
.kpi-icon.brand { background: var(--brand-50); color: var(--brand); }
.kpi-icon.success { background: var(--success-50); color: var(--success); }
.kpi-icon.warning { background: var(--warning-50); color: #D97706; }
.kpi-icon.info { background: var(--info-50); color: var(--info); }
.kpi-icon.danger { background: var(--danger-50); color: var(--danger); }

.kpi-trend {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--success-50);
  color: var(--success);
}
.kpi-trend.down { background: var(--danger-50); color: var(--danger); }
.kpi-trend.flat { background: var(--soft); color: var(--muted); }

.kpi-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 3px;
}
.kpi-value {
  font-size: 26px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.025em;
  line-height: 1.1;
}
.kpi-value small {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-left: 4px;
}
.kpi-foot {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 11.5px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kpi-spark {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 80px;
  height: 38px;
  opacity: 0.85;
  pointer-events: none;
}

/* =============================================================
   GRID LAYOUTS
   ============================================================= */
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}
.col-3  { grid-column: span 3; }
.col-4  { grid-column: span 4; }
.col-5  { grid-column: span 5; }
.col-6  { grid-column: span 6; }
.col-7  { grid-column: span 7; }
.col-8  { grid-column: span 8; }
.col-9  { grid-column: span 9; }
.col-12 { grid-column: span 12; }

/* =============================================================
   TABLES
   ============================================================= */
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.tbl thead th {
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 10px 16px;
  background: var(--soft-2);
  border-bottom: 1px solid var(--line);
}
.tbl tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-3);
  vertical-align: middle;
}
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl tbody tr { transition: var(--t-fast); }
.tbl tbody tr:hover { background: var(--soft-2); }

.cell-emp {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cell-emp .avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--brand));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 11px;
  flex-shrink: 0;
}
.cell-emp .avatar.amber { background: linear-gradient(135deg, #FBBF24, #F59E0B); }
.cell-emp .avatar.cyan { background: linear-gradient(135deg, #22D3EE, #0891B2); }
.cell-emp .avatar.rose { background: linear-gradient(135deg, #FB7185, #E11D48); }
.cell-emp .avatar.emerald { background: linear-gradient(135deg, #34D399, #059669); }
.cell-emp .avatar.violet { background: linear-gradient(135deg, #C084FC, #7C3AED); }
.cell-emp .avatar.slate { background: linear-gradient(135deg, #94A3B8, #475569); }
.cell-emp .name { font-weight: 600; color: var(--ink); font-size: 13px; }
.cell-emp .sub { font-size: 11.5px; color: var(--muted); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: var(--soft);
  color: var(--ink-3);
  border: 1px solid var(--line);
}
.tag.success { background: var(--success-50); color: #047857; border-color: #A7F3D0; }
.tag.warning { background: var(--warning-50); color: #B45309; border-color: #FDE68A; }
.tag.danger { background: var(--danger-50); color: #B91C1C; border-color: #FECACA; }
.tag.info { background: var(--info-50); color: #0369A1; border-color: #BAE6FD; }
.tag.brand { background: var(--brand-50); color: var(--brand-700); border-color: var(--brand-200); }
.tag.ghost { background: transparent; }
.tag .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* =============================================================
   FICHAJES (real-time)
   ============================================================= */
.access-feed {
  display: flex;
  flex-direction: column;
}
.access-row {
  display: grid;
  grid-template-columns: 36px 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  transition: var(--t-fast);
}
.access-row:last-child { border-bottom: none; }
.access-row:hover { background: var(--soft-2); }
.access-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 13px;
}
.access-icon.in { background: var(--success-50); color: var(--success); }
.access-icon.out { background: var(--warning-50); color: #D97706; }
.access-info .name { font-weight: 600; color: var(--ink); font-size: 13px; }
.access-info .sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.access-loc {
  font-size: 11.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.access-time {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  text-align: right;
}
.access-time small { display: block; font-size: 10px; color: var(--muted); font-weight: 500; }

.access-source {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--brand-50);
  color: var(--brand-700);
  font-size: 10.5px;
  font-weight: 600;
  border: 1px solid var(--brand-200);
}
.access-source.api .dot { background: var(--brand); animation: pulseDot 1.6s infinite; }
.access-source.api .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

/* =============================================================
   DOC PIPELINE (firmas)
   ============================================================= */
.docline {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  transition: var(--t-fast);
}
.docline:last-child { border-bottom: none; }
.docline:hover { background: var(--soft-2); }
.doc-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--brand-50);
  color: var(--brand);
  display: grid;
  place-items: center;
  font-size: 14px;
  flex-shrink: 0;
}
.doc-icon.amber { background: var(--warning-50); color: #D97706; }
.doc-icon.rose { background: var(--danger-50); color: var(--danger); }
.doc-icon.cyan { background: var(--info-50); color: var(--info); }
.doc-info { flex: 1; min-width: 0; }
.doc-info .name { font-weight: 600; color: var(--ink); font-size: 13px; }
.doc-info .sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

.progress {
  width: 110px;
  height: 6px;
  background: var(--soft);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 6px;
}
.progress-bar {
  height: 100%;
  background: var(--brand);
  border-radius: 999px;
  transition: width var(--t-slow);
}
.progress-bar.success { background: var(--success); }
.progress-bar.warning { background: var(--warning); }

.doc-meta {
  text-align: right;
  font-size: 11.5px;
  color: var(--muted);
}
.doc-meta strong { display: block; color: var(--ink); font-weight: 600; }

/* =============================================================
   HOURS / SCHEDULE
   ============================================================= */
.hours-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}
.hours-cell {
  padding: 12px;
  border-radius: 10px;
  background: var(--soft-2);
  border: 1px solid var(--line);
}
.hours-cell .label { font-size: 11px; color: var(--muted); font-weight: 500; }
.hours-cell .value {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-top: 4px;
}
.hours-cell .ctx { font-size: 11px; color: var(--muted); margin-top: 2px; }
.hours-cell.brand { background: var(--brand-50); border-color: var(--brand-200); }
.hours-cell.brand .value { color: var(--brand-700); }

/* Schedule */
.schedule {
  padding: 18px;
}
.schedule-grid {
  display: grid;
  grid-template-columns: 80px repeat(7, 1fr);
  gap: 4px;
  font-size: 11.5px;
}
.sched-h {
  padding: 6px 4px;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.sched-h .day {
  display: block;
  font-size: 16px;
  color: var(--ink);
  font-weight: 700;
  margin-top: 2px;
}
.sched-h.today { color: var(--brand); }
.sched-h.today .day { color: var(--brand); }

.sched-time {
  font-size: 10.5px;
  color: var(--muted);
  font-weight: 500;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  padding-right: 8px;
  text-align: right;
}
.sched-time strong { color: var(--ink); font-size: 11.5px; font-weight: 600; }

.sched-cell {
  background: var(--soft-2);
  border-radius: 8px;
  min-height: 56px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.sched-cell.today { background: var(--brand-50); }

.shift {
  font-size: 10.5px;
  padding: 4px 6px;
  border-radius: 5px;
  background: var(--card);
  border-left: 3px solid var(--brand);
  color: var(--ink);
  font-weight: 600;
  display: flex;
  justify-content: space-between;
}
.shift.amber { border-color: var(--accent); }
.shift.cyan { border-color: var(--info); }
.shift.rose { border-color: var(--danger); }
.shift.emerald { border-color: var(--success); }
.shift.violet { border-color: #8B5CF6; }
.shift small { color: var(--muted); font-weight: 500; }
.shift.warn-overlap { background: var(--warning-50); border-color: var(--warning); }

/* =============================================================
   FUNNEL & LISTS
   ============================================================= */
.funnel { display: flex; flex-direction: column; gap: 10px; }
.funnel-step {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}
.funnel-bar {
  height: 28px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--brand-100), var(--brand-50));
  display: flex;
  align-items: center;
  padding-left: 10px;
  position: relative;
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-700);
}
.funnel-bar.s2 { background: linear-gradient(90deg, var(--brand-200), var(--brand-100)); color: var(--brand-700); }
.funnel-bar.s3 { background: linear-gradient(90deg, var(--brand), var(--brand-200)); color: #fff; }
.funnel-bar.s4 { background: linear-gradient(90deg, var(--brand-700), var(--brand)); color: #fff; }
.funnel-count { font-weight: 700; color: var(--ink); font-size: 14px; min-width: 30px; text-align: right; }
.funnel-label {
  font-size: 12px;
  color: var(--muted);
  margin-top: -4px;
  margin-left: 2px;
}

/* =============================================================
   ALERT BANNER
   ============================================================= */
.alert-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.06), rgba(245, 158, 11, 0));
  border: 1px solid var(--warning-100);
  margin-bottom: 16px;
}
.alert-banner.brand {
  background: linear-gradient(90deg, rgba(151, 42, 48, 0.06), rgba(151, 42, 48, 0));
  border-color: var(--brand-200);
}
.alert-banner.danger {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.06), rgba(239, 68, 68, 0));
  border-color: var(--danger-100);
}
.alert-banner i {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--warning-50);
  color: #D97706;
  font-size: 13px;
  flex-shrink: 0;
}
.alert-banner.brand i { background: var(--brand-50); color: var(--brand); }
.alert-banner.danger i { background: var(--danger-50); color: var(--danger); }
.alert-banner .ab-text { flex: 1; }
.alert-banner .ab-title { font-weight: 600; font-size: 13px; color: var(--ink); }
.alert-banner .ab-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* =============================================================
   MACHINES / DEPARTMENTS
   ============================================================= */
.machines {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 18px;
}
.machine {
  padding: 12px;
  border-radius: 10px;
  background: var(--soft-2);
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  transition: var(--t-fast);
}
.machine:hover { background: var(--card); border-color: var(--line-2); }
.machine .mch-name { font-weight: 600; font-size: 12.5px; color: var(--ink); display: flex; align-items: center; gap: 7px; }
.machine .mch-op { font-size: 11px; color: var(--muted); margin-top: 2px; }
.machine .mch-eff { text-align: right; }
.machine .mch-eff strong { font-size: 14px; color: var(--ink); font-weight: 700; }
.machine .mch-eff small { font-size: 10px; color: var(--muted); }
.dot-status {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.18);
}
.dot-status.warn { background: var(--warning); box-shadow: 0 0 0 3px rgba(245,158,11,0.18); }
.dot-status.stop { background: var(--danger); box-shadow: 0 0 0 3px rgba(239,68,68,0.18); }

/* =============================================================
   TABS
   ============================================================= */
.tabs {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: var(--soft);
  border-radius: 9px;
  border: 1px solid var(--line);
}
.tab {
  padding: 6px 12px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  transition: var(--t-fast);
  cursor: pointer;
}
.tab:hover { color: var(--ink); }
.tab.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-xs); }

/* =============================================================
   ACTIVITY / TIMELINE
   ============================================================= */
.timeline { position: relative; padding-left: 22px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--line);
}
.tl-item { position: relative; padding-bottom: 16px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -22px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--brand);
}
.tl-item.success::before { border-color: var(--success); }
.tl-item.warning::before { border-color: var(--warning); }
.tl-item.danger::before { border-color: var(--danger); }
.tl-time { font-size: 11px; color: var(--muted); font-weight: 500; margin-bottom: 2px; }
.tl-text { font-size: 13px; color: var(--ink); }
.tl-text strong { font-weight: 600; }

/* =============================================================
   DEPARTMENT DOTS (mini)
   ============================================================= */
.dept-list {
  padding: 18px;
}
.dept-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 12px;
  align-items: center;
}
.dept-row:last-child { margin-bottom: 0; }
.dept-name { color: var(--ink-3); font-weight: 500; display: flex; align-items: center; gap: 8px; }
.dept-name .swatch { width: 10px; height: 10px; border-radius: 3px; }
.dept-bar {
  grid-column: 1 / -1;
  height: 6px;
  background: var(--soft);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 2px;
}
.dept-fill { height: 100%; border-radius: 999px; transition: width var(--t-slow); }
.dept-count { font-weight: 700; color: var(--ink); }

/* =============================================================
   OVERLAP MAP
   ============================================================= */
.overlap-grid {
  display: grid;
  grid-template-columns: 90px repeat(24, 1fr);
  gap: 1px;
  padding: 14px;
  font-size: 9.5px;
  color: var(--muted);
}
.overlap-grid .ohead {
  text-align: center;
  font-weight: 600;
  padding: 4px 0;
}
.overlap-grid .olabel {
  font-weight: 600;
  color: var(--ink);
  font-size: 11px;
  display: flex;
  align-items: center;
  padding-right: 6px;
}
.overlap-grid .ocell {
  height: 22px;
  background: var(--soft);
  border-radius: 2px;
}
.overlap-grid .ocell.l1 { background: var(--brand-50); }
.overlap-grid .ocell.l2 { background: var(--brand-100); }
.overlap-grid .ocell.l3 { background: var(--brand-200); }
.overlap-grid .ocell.l4 { background: var(--brand); }
.overlap-grid .ocell.warn { background: var(--warning-100); border: 1px solid var(--warning); }

/* =============================================================
   DROPDOWN / MENU (light)
   ============================================================= */
.menu {
  position: absolute;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 6px;
  min-width: 200px;
  z-index: 100;
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 13px;
  color: var(--ink-3);
  cursor: pointer;
}
.menu-item:hover { background: var(--soft); color: var(--ink); }
.menu-item i { width: 14px; color: var(--muted); }

/* =============================================================
   UTILITY
   ============================================================= */
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; }
.muted { color: var(--muted); }
.ink { color: var(--ink); font-weight: 600; }
.text-xs { font-size: 11px; }
.text-sm { font-size: 12px; }
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; }
.flex-1 { flex: 1; }

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 1280px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9 { grid-column: span 12; }
  .col-md-6 { grid-column: span 6; }
}
@media (max-width: 920px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .search { width: 200px; }
  .topbar-logo { display: block; }
  .crumbs > .fa-house, .crumbs > span:first-of-type, .crumbs > .fa-chevron-right { display: none; }
}
@media (max-width: 640px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .col-md-6 { grid-column: span 12; }
  .topbar { padding: 0 16px; }
  .page { padding: 16px; }
  .search { display: none; }
}

/* =============================================================
   PAGE: NOMINAS
   ============================================================= */
.badge-count {
  display: inline-block;
  background: rgba(255,255,255,0.18);
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  margin-left: 2px;
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 22px;
  padding: 18px;
  align-items: stretch;
}
.pl-step {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  background: var(--soft-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  position: relative;
}
.pl-icon {
  width: 40px; height: 40px;
  border-radius: 11px;
  display: grid; place-items: center;
  font-size: 15px;
  flex-shrink: 0;
}
.pl-info { display: flex; flex-direction: column; line-height: 1.1; }
.pl-count { font-size: 22px; font-weight: 800; letter-spacing: -0.025em; color: var(--ink); }
.pl-label { font-size: 11.5px; color: var(--muted); margin-top: 3px; font-weight: 500; }
.pl-arrow {
  position: absolute; right: -18px; top: 50%; transform: translateY(-50%);
  color: var(--muted-2); font-size: 11px; z-index: 1;
}
.pl-ghost .pl-icon { background: var(--soft); color: var(--muted); }
.pl-warning .pl-icon { background: var(--warning-50); color: #B45309; }
.pl-info .pl-icon { background: var(--info-50); color: #0369A1; }
.pl-success { background: var(--success-50); border-color: #C9E0C7; }
.pl-success .pl-icon { background: var(--success); color: #fff; }
.pl-success .pl-count { color: var(--success); }
.pl-danger .pl-icon { background: var(--danger-50); color: var(--danger); }
@media (max-width: 1280px) { .pipeline { grid-template-columns: repeat(3, 1fr); gap: 14px; } .pl-arrow { display: none; } }
@media (max-width: 720px) { .pipeline { grid-template-columns: 1fr; } }

.tbl-nominas td { padding: 14px 14px; }
.tbl-horas td { padding: 12px 8px; }
.tbl-horas { width: 100%; }
.tbl-horas .num { padding-right: 12px; white-space: nowrap; }
.tbl-horas td:first-child { padding-left: 18px; }
.tbl-horas td:last-child { padding-right: 18px; }
.tbl-horas .cell-emp .name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}
.tbl-horas .cell-emp .sub {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tbl thead th.num, .tbl tbody td.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl thead th { white-space: nowrap; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 11.5px; color: var(--ink-2); }
.pos { color: var(--success); font-weight: 600; }
.neg { color: var(--danger); }
.dim { color: var(--muted-2); }
.info-color { color: var(--info); font-weight: 600; }
.brand-color { color: var(--brand); }
.tbl tbody tr[data-drawer] { cursor: pointer; }
.tbl tbody tr[data-drawer]:hover { background: var(--brand-50); }

.icon-btn-mini {
  width: 28px; height: 28px;
  border-radius: 6px;
  color: var(--muted);
  display: grid; place-items: center;
  transition: 150ms;
  background: transparent; border: none; cursor: pointer;
}
.icon-btn-mini:hover { background: var(--soft); color: var(--ink); }

.select-sm {
  height: 30px;
  padding: 0 26px 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 12px;
  color: var(--ink-3);
  background: var(--card);
  appearance: none;
  outline: none;
  cursor: pointer;
}
.select-sm:focus { border-color: var(--brand); }

.cell-emp .avatar.sm { width: 26px; height: 26px; font-size: 10px; }
.cell-emp .avatar.xs { width: 20px; height: 20px; font-size: 9px; }
.cell-emp .avatar.lg { width: 48px; height: 48px; font-size: 16px; border-radius: 12px; }
.cell-emp .name.lg { font-size: 16px; }

.sum-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 0;
  font-size: 13px;
  color: var(--ink-3);
}
.sum-row strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.sum-row.total {
  border-top: 1px dashed var(--line);
  margin-top: 6px;
  padding-top: 12px;
  font-weight: 600;
  font-size: 14px;
}
.sum-row.total strong { font-size: 15px; }
.hint-row {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  background: var(--brand-50);
  border-radius: 8px;
  margin-top: 12px;
  font-size: 11.5px;
  color: var(--brand-700);
}

.ring-stat { width: 130px; height: 130px; position: relative; margin: 0 auto 14px; }
.ring-stat svg { width: 100%; height: 100%; }
.ring-label {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  text-align: center;
}
.ring-label strong { display: block; font-size: 24px; font-weight: 700; color: var(--ink); letter-spacing: -0.02em; line-height: 1; }
.ring-label span { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; }

.firma-stats {
  display: flex; flex-direction: column; gap: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}
.firma-stats > div {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px;
  color: var(--ink-3);
}
.firma-stats .dot { width: 8px; height: 8px; border-radius: 50%; }
.firma-stats strong { margin-left: auto; color: var(--ink); font-weight: 600; }

.quick-action {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card);
  text-align: left;
  cursor: pointer;
  transition: 150ms;
}
.quick-action:hover { background: var(--soft-2); border-color: var(--line-2); }
.quick-action > i:first-child {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--brand-50); color: var(--brand);
  display: grid; place-items: center;
  font-size: 13px;
}
.quick-action .t { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.quick-action .d { font-size: 11px; color: var(--muted); margin-top: 1px; }
.quick-action .chev { color: var(--muted-2); font-size: 11px; }

.drawer-overlay {
  position: fixed; inset: 0;
  z-index: 200;
  display: none;
}
.drawer-overlay.open { display: block; }
.drawer-bg {
  position: absolute; inset: 0;
  background: rgba(44, 31, 18, 0.36);
  backdrop-filter: blur(4px);
  animation: fadeIn 200ms;
}
.drawer {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 540px;
  max-width: 92vw;
  background: #fff;
  border-left: 1px solid var(--line);
  box-shadow: -20px 0 50px -8px rgba(44,31,18,0.18);
  display: flex; flex-direction: column;
  animation: slideInRight 260ms cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideInRight { from { transform: translateX(40px); opacity: 0;} to { transform: translateX(0); opacity: 1; } }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--soft-2);
}
.drawer-title { font-size: 15px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
.drawer-body { flex: 1; overflow-y: auto; padding: 22px 24px; }

.dn-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.dn-ref { text-align: right; }
.dn-ref strong { display: block; margin-top: 2px; font-size: 13px; color: var(--ink); }
.dn-meta {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin-bottom: 24px;
}
.dn-meta > div { display: flex; flex-direction: column; gap: 3px; }
.dn-meta strong { font-size: 13px; color: var(--ink); }
.dn-h {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 18px 0 8px;
}
.tbl-dn { width: 100%; }
.tbl-dn td {
  padding: 9px 0;
  font-size: 13px;
  border-bottom: 1px dashed var(--line);
}
.tbl-dn td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.tbl-dn tr.subtotal td { border-bottom: none; padding-top: 12px; color: var(--ink); }
.dn-total {
  margin-top: 18px;
  padding: 18px 20px;
  background: linear-gradient(135deg, var(--brand-50), var(--accent-50));
  border: 1px solid var(--brand-200);
  border-radius: 14px;
  display: flex; justify-content: space-between; align-items: center;
}
.dn-total span { font-size: 12px; color: var(--brand-700); font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; }
.dn-total strong { font-size: 26px; color: var(--ink); font-weight: 800; letter-spacing: -0.025em; }

.empty-state { text-align: center; padding: 80px 40px; }
.empty-ico {
  width: 84px; height: 84px;
  border-radius: 22px;
  background: var(--brand-50);
  color: var(--brand);
  font-size: 30px;
  display: grid; place-items: center;
  margin: 0 auto 20px;
}
.empty-state h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 8px; }
.empty-state p { color: var(--muted); font-size: 14px; margin-bottom: 24px; }

/* =============================================================
   PAGE: HORAS
   ============================================================= */
.tbl-horas .th-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  margin-left: 4px;
  background: var(--soft);
  color: var(--muted);
}
.tbl-horas .th-tag.warning { background: var(--warning-100); color: #B45309; }
.tbl-horas .th-tag.info { background: var(--info-100); color: #0369A1; }
.tbl-horas .th-tag.success { background: var(--success-100); color: #047857; }

.coverage-bar {
  display: flex; align-items: center; gap: 8px;
  width: 110px;
}
.coverage-track {
  flex: 1;
  height: 5px;
  background: var(--soft);
  border-radius: 999px;
  position: relative;
  min-width: 50px;
}
.coverage-fill {
  height: 100%;
  background: var(--brand);
  border-radius: 999px;
  transition: width 320ms;
}
.coverage-fill.over { background: var(--warning); }
.coverage-fill.under { background: var(--danger); }
.coverage-mark {
  position: absolute;
  left: 80%;
  top: -3px; bottom: -3px;
  width: 2px;
  background: var(--ink-3);
  opacity: 0.25;
}
.coverage-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.rule-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}
.rule-row:last-child { border-bottom: none; }
.rule-ico {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--soft);
  color: var(--ink-3);
  display: grid; place-items: center;
  font-size: 13px;
}
.rule-name { font-weight: 600; font-size: 13px; color: var(--ink); }
.rule-desc { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

.heatmap-wrap { padding: 14px 18px 18px; overflow-x: auto; }
.heatmap {
  display: grid; gap: 4px;
  min-width: 900px;
}
.hm-row {
  display: grid;
  grid-template-columns: 180px repeat(31, 1fr);
  gap: 3px;
  align-items: center;
}
.hm-name {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 500; color: var(--ink-3);
  padding-right: 8px;
}
.hm-cell {
  height: 22px;
  border-radius: 3px;
  background: var(--soft);
  transition: 120ms;
  cursor: pointer;
}
.hm-cell:hover { transform: scale(1.3); z-index: 2; box-shadow: 0 0 0 2px var(--brand); }
.hm-cell.l0 { background: var(--soft); }
.hm-cell.l1 { background: var(--brand-100); }
.hm-cell.l2 { background: var(--brand-200); }
.hm-cell.l3 { background: var(--brand); opacity: 0.7; }
.hm-cell.l4 { background: var(--brand); }
.hm-cell.extra { background: var(--warning); box-shadow: inset 0 0 0 1px rgba(180, 83, 9, 0.4); }
.hm-cell.hm-d {
  background: transparent;
  height: auto;
  font-size: 10px;
  color: var(--muted);
  text-align: center;
  font-weight: 600;
  padding: 4px 0;
  cursor: default;
}
.hm-cell.hm-d:hover { transform: none; box-shadow: none; }
.hm-cell.hm-d.today {
  background: var(--brand-50);
  color: var(--brand-700);
  border-radius: 4px;
}

.heat-legend { display: flex; gap: 3px; }
.heat-legend .hl {
  width: 14px; height: 14px; border-radius: 3px;
  background: var(--soft);
}
.heat-legend .hl.l1 { background: var(--brand-100); }
.heat-legend .hl.l2 { background: var(--brand-200); }
.heat-legend .hl.l3 { background: var(--brand); opacity: 0.7; }
.heat-legend .hl.l4 { background: var(--brand); }

.alert-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid transparent;
}
.alert-row:last-child { border-bottom: none; }
.alert-row.sev-warning { border-left-color: var(--warning); background: var(--warning-50); }
.alert-row.sev-info    { border-left-color: var(--info); }
.alert-row.sev-danger  { border-left-color: var(--danger); background: var(--danger-50); }
.alert-metric {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  padding: 6px 12px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--line);
}

/* =============================================================
   PAGE: HORARIOS / BOARD (list-per-day layout)
   ============================================================= */
.board { padding: 12px 14px 16px; }
.board-head, .board-row {
  display: grid;
  grid-template-columns: 120px repeat(7, 1fr);
  gap: 6px;
}
.board-head { margin-bottom: 8px; }
.bh-corner {
  display: flex; align-items: center;
  padding: 0 8px;
  font-size: 10.5px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.bh-day {
  display: flex; flex-direction: row; align-items: baseline; justify-content: center;
  gap: 6px;
  padding: 8px 4px 6px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}
.bh-day-l { font-size: 10px; color: var(--muted); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.bh-day-d { font-size: 14px; color: var(--ink); font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
.bh-day.today { border-bottom-color: var(--brand); }
.bh-day.today .bh-day-l, .bh-day.today .bh-day-d { color: var(--brand); }
.bh-day.we { opacity: 0.5; }

.board-row { margin-bottom: 6px; align-items: stretch; }
.br-name {
  background: transparent;
  border: none;
  border-right: 1px solid var(--line);
  border-radius: 0;
  padding: 12px 12px 12px 4px;
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
}
.br-name i { color: var(--muted-2); width: 14px; font-size: 12px; }
.br-day {
  position: relative;
  background: transparent;
  border: 1px dashed transparent;
  border-radius: 8px;
  min-height: 56px;
  padding: 8px 6px;
  display: flex; flex-direction: column; gap: 4px;
  transition: 120ms;
}
.br-day:hover { background: var(--soft-2); border-color: var(--line); }
.br-day.today { background: var(--brand-50); }
.br-day.we { opacity: 0.55; }
.br-day .day-empty {
  color: var(--muted-2);
  font-size: 13px;
  text-align: center;
  align-self: center;
  margin: auto;
  opacity: 0.5;
}

.shift-chip {
  display: grid;
  grid-template-columns: 6px 1fr auto;
  align-items: center;
  gap: 6px;
  padding: 5px 7px 5px 6px;
  border-radius: 6px;
  background: var(--brand-50);
  cursor: pointer;
  transition: 100ms;
  border: 1px solid transparent;
}
.shift-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(0,0,0,0.06);
  box-shadow: 0 2px 4px -1px rgba(0,0,0,0.06);
}
.shift-chip .sc-dot {
  width: 3px;
  height: 18px;
  background: var(--brand);
  border-radius: 999px;
}
.shift-chip .sc-time {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.shift-chip .sc-count {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  padding: 1px 6px;
  background: rgba(0,0,0,0.06);
  border-radius: 999px;
  min-width: 22px;
  text-align: center;
}
.shift-chip .sc-warn {
  font-size: 11px;
  color: var(--danger);
}

.shift-chip.brand   { background: #F5E7D8; }
.shift-chip.brand .sc-dot { background: var(--brand); }
.shift-chip.amber   { background: #FBEBD3; }
.shift-chip.amber .sc-dot { background: var(--warning); }
.shift-chip.violet  { background: #EFE6F5; }
.shift-chip.violet .sc-dot { background: #8B5CF6; }
.shift-chip.cyan    { background: #E0F2FE; }
.shift-chip.cyan .sc-dot { background: var(--info); }
.shift-chip.emerald { background: #D1FAE5; }
.shift-chip.emerald .sc-dot { background: var(--success); }
.shift-chip.rose, .shift-chip.danger {
  background: #FEE2E2;
}
.shift-chip.rose .sc-dot, .shift-chip.danger .sc-dot { background: var(--danger); }

.shift-chip.overlap {
  border-color: var(--danger);
  background: repeating-linear-gradient(135deg, #FEE2E2, #FEE2E2 6px, #FECACA 6px, #FECACA 12px);
}
.shift-chip.empty {
  background: repeating-linear-gradient(135deg, #FEF2F2, #FEF2F2 4px, transparent 4px, transparent 8px);
  border: 1px dashed var(--danger);
  color: var(--danger);
}
.shift-chip.empty .sc-dot { background: var(--danger); }
.shift-chip.empty .sc-time { color: var(--danger); font-weight: 700; }

.legend-dot {
  width: 10px; height: 10px;
  border-radius: 3px;
  background: var(--brand);
  display: inline-block;
}
.legend-dot.amber { background: var(--warning); }
.legend-dot.violet { background: #8B5CF6; }
.legend-dot.cyan { background: var(--info); }
.legend-dot.emerald { background: var(--success); }
.legend-dot.rose { background: var(--danger); }

.unassigned-list { padding: 6px; }
.unassigned-item {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border-radius: 9px;
  margin-bottom: 4px;
  transition: 120ms;
  cursor: grab;
}
.unassigned-item:hover { background: var(--soft-2); }
.unassigned-item:active { cursor: grabbing; }
.unassigned-item .drag-handle { margin-top: 8px; }
.unassigned-item .cell-emp { min-width: 0; }
.unassigned-item .cell-emp .name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
}
.unassigned-item .cell-emp .sub {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11.5px;
}
.drag-handle { color: var(--muted-2); font-size: 11px; }
.avail-tag {
  display: inline-block;
  margin-top: 6px;
  margin-left: 36px;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  padding: 0;
  border-radius: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 36px);
}
.avail-tag::before {
  content: '•';
  margin-right: 6px;
  color: var(--success);
}

.conflict-row {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid transparent;
}
.conflict-row:last-child { border-bottom: none; }
.conflict-row.sev-danger { border-left-color: var(--danger); background: var(--danger-50); }
.conflict-row.sev-warning { border-left-color: var(--warning); background: var(--warning-50); }
.conflict-when { display: flex; flex-direction: column; gap: 2px; }
.conflict-when strong { font-size: 12px; color: var(--ink); }
.conflict-who { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.conflict-detail { font-size: 12px; color: var(--muted); margin-top: 3px; }
.conflict-sol {
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: 6px;
  padding: 6px 10px;
  background: rgba(255,255,255,0.6);
  border-radius: 6px;
  display: inline-block;
}
.conflict-sol i { color: var(--accent); margin-right: 4px; }
.conflict-actions { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }

.mch-cov-row {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 12px;
  align-items: center;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}
.mch-cov-row:last-child { border-bottom: none; }
.mch-cov-bar { display: flex; align-items: center; gap: 10px; }
.mch-cov-track {
  flex: 1;
  height: 8px;
  background: var(--soft);
  border-radius: 999px;
  overflow: hidden;
}
.mch-cov-fill {
  height: 100%;
  background: var(--brand);
  border-radius: 999px;
  transition: width 320ms;
}
.mch-cov-fill.warn { background: var(--warning); }
.mch-cov-fill.stop { background: var(--danger); }
.mch-cov-bar strong { font-size: 13px; color: var(--ink); min-width: 38px; text-align: right; font-variant-numeric: tabular-nums; }

/* =============================================================
   PAGE: NOMINAS · refined / flat
   ============================================================= */
.card-flat {
  box-shadow: none;
  border: 1px solid var(--line);
}
.card-head-slim {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.card-foot-slim {
  padding: 8px 14px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Segmented control */
.seg {
  display: inline-flex;
  background: var(--soft-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 2px;
}
.seg-btn {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  border-radius: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: 120ms;
}
.seg-btn:hover { color: var(--ink); }
.seg-btn.active {
  background: var(--card);
  color: var(--ink);
  font-weight: 600;
  box-shadow: var(--shadow-xs);
}

/* Status bar (substitute for pipeline) */
.status-bar {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
}
.sb-progress {
  display: flex;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--soft);
  margin-bottom: 14px;
  gap: 2px;
}
.sb-seg { height: 100%; transition: 200ms; }
.sb-seg:hover { opacity: 0.85; }
.sb-success { background: var(--success); }
.sb-info    { background: var(--info); }
.sb-warning { background: var(--warning); }
.sb-neutral { background: var(--muted-2); }
.sb-danger  { background: var(--danger); }

.sb-legend {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}
.sb-stat {
  display: flex;
  align-items: center;
  gap: 7px;
}
.sb-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
}
.sb-count {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.sb-label {
  font-size: 12px;
  color: var(--muted);
}
.sb-meta {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--muted-2);
}

/* Slim tabs */
.tabs-slim {
  background: transparent;
  border: none;
  padding: 0;
  gap: 2px;
}
.tabs-slim .tab {
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: none;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tabs-slim .tab:hover { color: var(--ink); background: var(--soft-2); }
.tabs-slim .tab.active {
  color: var(--ink);
  background: var(--soft);
  font-weight: 600;
}
.tab-count {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
  background: rgba(0,0,0,0.04);
  padding: 1px 6px;
  border-radius: 4px;
  font-variant-numeric: tabular-nums;
}
.tabs-slim .tab.active .tab-count { background: var(--card); color: var(--ink-3); }
.tab-count.danger { background: var(--danger-50); color: var(--danger); }

/* Mini search */
.search-mini {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--soft-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 5px 10px;
  width: 200px;
  transition: 150ms;
}
.search-mini:focus-within { border-color: var(--brand); background: var(--card); }
.search-mini i { color: var(--muted); font-size: 11px; }
.search-mini input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 12.5px;
  color: var(--ink);
}
.search-mini input::placeholder { color: var(--muted-2); }

/* Clean table */
.tbl-clean { width: 100%; border-collapse: collapse; }
.tbl-clean thead th {
  text-align: left;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--soft-2);
}
.tbl-clean tbody td {
  padding: 14px 18px;
  font-size: 13px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.tbl-clean tbody tr:last-child td { border-bottom: none; }
.tbl-clean tbody tr[data-drawer] { cursor: pointer; transition: 100ms; }
.tbl-clean tbody tr[data-drawer]:hover { background: var(--soft-2); }
.tbl-clean .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl-clean .w-32 { width: 32px; }

.tbl-clean .amt {
  color: var(--ink);
  font-weight: 500;
}
.tbl-clean .num strong.amt { font-weight: 600; }
.tbl-clean .cur {
  color: var(--muted-2);
  font-size: 11px;
  margin-left: 3px;
  font-weight: 400;
}

/* Monochrome avatar */
.avatar-mono {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--ink-3);
  display: grid;
  place-items: center;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.cell-emp { display: flex; align-items: center; gap: 10px; }
.cell-emp .name { font-size: 13px; font-weight: 500; color: var(--ink); line-height: 1.3; }
.cell-emp .sub { font-size: 11.5px; color: var(--muted); margin-top: 1px; }

/* Pill status (flat, no icons) */
.pill-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 999px;
  letter-spacing: 0.01em;
}
.pill-status::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}
.pill-status.p-signed   { color: #2F6B30; background: var(--success-50); }
.pill-status.p-signed::before { background: var(--success); }
.pill-status.p-sent     { color: #1A5A7D; background: var(--info-50); }
.pill-status.p-sent::before { background: var(--info); }
.pill-status.p-pending  { color: #8B6A2B; background: var(--warning-50); }
.pill-status.p-pending::before { background: var(--warning); }
.pill-status.p-draft    { color: var(--muted); background: var(--soft); }
.pill-status.p-draft::before { background: var(--muted-2); }
.pill-status.p-rejected { color: #8A3023; background: var(--danger-50); }
.pill-status.p-rejected::before { background: var(--danger); }

/* Pager */
.pager {
  display: flex;
  align-items: center;
  gap: 4px;
}
.pager-btn {
  width: 26px; height: 26px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 10px;
  transition: 100ms;
  border: none;
}
.pager-btn:hover { background: var(--soft); color: var(--ink); }
.pager-num {
  font-size: 11.5px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  padding: 0 8px;
}

/* Summary block (sidebar) */
.summary-block { padding: 20px; }
.sm-label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.sm-big {
  font-size: 30px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.sm-cur {
  font-size: 16px;
  font-weight: 500;
  color: var(--muted);
  margin-left: 4px;
}
.sm-delta {
  font-size: 11.5px;
  color: var(--success);
  font-weight: 500;
  margin-top: 6px;
}
.sm-delta i { font-size: 9px; margin-right: 2px; }
.sm-divider {
  height: 1px;
  background: var(--line);
  margin: 16px 0;
}
.summary-block .sum-row {
  font-size: 12.5px;
  color: var(--ink-3);
  padding: 4px 0;
}
.summary-block .sum-row strong {
  font-weight: 500;
  color: var(--ink);
}
.summary-block .muted-row { color: var(--muted); }
.summary-block .muted-row strong { color: var(--ink-2); }

/* Sign stat row with ring mini */
.sign-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.sign-pct {
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.025em;
  line-height: 1;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.sign-pct span {
  font-size: 16px;
  color: var(--muted);
  font-weight: 500;
  margin-left: 2px;
}
.ring-mini {
  width: 60px;
  height: 60px;
}

/* Action row */
.action-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink);
  background: transparent;
  border: none;
  border-radius: 7px;
  text-align: left;
  cursor: pointer;
  transition: 100ms;
}
.action-row:hover { background: var(--soft-2); }
.action-row i {
  color: var(--muted-2);
  font-size: 11px;
  transition: 100ms;
}
.action-row:hover i { color: var(--brand); transform: translateX(2px); }

/* =============================================================
   NOMINA · FORM (create / edit)
   ============================================================= */
.nf { padding: 4px 0; }
.nf-section {
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.nf-section:last-of-type { border-bottom: none; padding-bottom: 4px; }
.nf-section-h {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.nf-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}
.nf-col-2 { grid-column: 1 / -1; }
.nf-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.nf-field > span {
  font-size: 11.5px;
  color: var(--ink-3);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nf-hint {
  font-style: normal;
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--brand-50);
  color: var(--brand);
}
.nf-input {
  height: 34px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--card);
  font-size: 13px;
  color: var(--ink);
  outline: none;
  transition: 120ms;
  width: 100%;
  appearance: none;
}
.nf-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(151, 42, 48, 0.10); }
.nf-input:disabled, .nf-input[readonly] { background: var(--soft-2); color: var(--ink-3); }
select.nf-input {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 30px;
}
.nf-money {
  position: relative;
}
.nf-money i {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
  pointer-events: none;
}
.nf-money .nf-input { padding-right: 28px; font-variant-numeric: tabular-nums; text-align: right; }

.nf-totals {
  margin-top: 6px;
  background: linear-gradient(135deg, var(--brand-50), var(--accent-50));
  border: 1px solid var(--brand-200);
  border-radius: 12px;
  padding: 14px 18px;
}
.nft-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px;
  color: var(--ink-3);
  padding: 4px 0;
}
.nft-row strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.nft-final {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px dashed var(--brand-200);
}
.nft-final span { font-weight: 600; color: var(--brand-700); }
.nft-final strong { font-size: 18px; color: var(--brand); letter-spacing: -0.02em; }

.nf-flags {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nf-flags label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink-3);
  cursor: pointer;
}
.nf-flags input { accent-color: var(--brand); }

.btn-danger {
  color: var(--danger) !important;
  border-color: var(--danger-100) !important;
}
.btn-danger:hover { background: var(--danger-50) !important; }

/* =============================================================
   PDF MODAL (fullscreen)
   ============================================================= */
.pdf-overlay {
  position: fixed; inset: 0;
  z-index: 300;
  display: none;
}
.pdf-overlay.open { display: block; }
.pdf-bg {
  position: absolute; inset: 0;
  background: rgba(40, 30, 18, 0.65);
  backdrop-filter: blur(6px);
}
.pdf-modal {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
}
.pdf-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 22px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  z-index: 2;
}
.pdf-scroll {
  flex: 1;
  overflow: auto;
  padding: 30px 20px;
}
.pdf-page {
  max-width: 820px;
  margin: 0 auto;
  background: #fdfcf8;
  padding: 34px 40px;
  box-shadow: 0 20px 50px -10px rgba(0,0,0,0.25), 0 8px 24px -8px rgba(0,0,0,0.18);
  font-family: "Courier New", "Courier", "Liberation Mono", monospace;
  color: #1a1a1a;
  background-image:
    linear-gradient(rgba(0,0,0,0.012) 1px, transparent 1px);
  background-size: 100% 22px;
}

/* Official nomina document · typewriter style */
.nomina-doc {
  font-family: "Courier New", "Courier", "Liberation Mono", monospace;
  font-size: 11px;
  line-height: 1.55;
  color: #1a1a1a;
  letter-spacing: 0.02em;
}
.nomina-doc .nd-v {
  color: #00248a;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.nd-lbl {
  color: #1a1a1a;
  font-family: "Courier New", "Courier", "Liberation Mono", monospace;
}

.nd-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1.5px solid #1a1a1a;
  border-bottom: none;
}
.nd-header .nd-col {
  padding: 6px 10px;
  border-right: 1.5px solid #1a1a1a;
}
.nd-header .nd-col:last-child { border-right: none; }
.nd-row {
  padding: 1px 0;
  font-size: 10.5px;
}

.nd-periodo {
  padding: 7px 10px;
  border: 1.5px solid #1a1a1a;
  font-size: 11px;
  text-align: center;
}

.nd-section-title {
  border: 1.5px solid #1a1a1a;
  border-top: none;
  padding: 4px 10px;
  font-weight: 700;
  font-size: 11px;
}

.nd-devengos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1.5px solid #1a1a1a;
  border-top: none;
  min-height: 240px;
}
.nd-dev-col {
  padding: 5px 10px;
  border-right: 1.5px solid #1a1a1a;
  display: flex;
  flex-direction: column;
}
.nd-dev-col:last-child { border-right: none; }
.nd-dev-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 10.5px;
  padding: 1.5px 0;
  min-height: 15px;
  border-bottom: 1px dotted transparent;
}
.nd-dev-row.nd-spacer { min-height: 12px; border-bottom: 1px dotted #ccc; }
.nd-dev-h { font-weight: 700; }
.nd-amt {
  text-align: right;
  font-variant-numeric: tabular-nums;
  min-width: 70px;
}
.nd-totales {
  min-width: 70px;
  margin-left: 12px;
  font-weight: 700;
}
.nd-indent { padding-left: 12px; }
.nd-tag {
  font-weight: 700;
  margin-left: 6px;
}
.nd-final {
  margin-top: auto;
  padding-top: 8px;
  font-weight: 700;
  border-top: 1px solid transparent;
}
.nd-total-lbl { font-weight: 700; }
.nd-big { font-size: 14px; }
.nd-totaport {
  text-align: center;
  font-weight: 700;
  margin-top: 6px;
  border-top: 1px solid #000;
  padding-top: 4px;
}

.nd-dev-row.nd-3col {
  display: grid;
  grid-template-columns: 1.6fr 0.9fr 0.7fr 0.9fr;
  gap: 4px;
  font-size: 10px;
}
.nd-dev-row.nd-3col > * { text-align: right; }
.nd-dev-row.nd-3col > *:first-child { text-align: left; }

/* Bases cotización */
.nd-bases {
  border: 1.5px solid #1a1a1a;
  border-top: none;
}
.nd-bases-h {
  padding: 5px 10px;
  font-size: 10px;
  font-weight: 700;
  border-bottom: 1.5px solid #1a1a1a;
}
.nd-b-row {
  display: grid;
  grid-template-columns: 1.4fr 1.4fr 0.8fr 0.6fr 0.8fr;
  border-bottom: 1px dotted #888;
  font-size: 10.5px;
}
.nd-b-row > div { padding: 4px 8px; border-right: 1px dotted #888; }
.nd-b-row > div:last-child { border-right: none; }
.nd-b-head {
  font-weight: 700;
  border-bottom: 1.5px solid #1a1a1a;
}
.nd-b-head .nd-b-c1, .nd-b-head .nd-b-c2, .nd-b-head .nd-b-c3 {
  text-align: center;
}
.nd-b-c1, .nd-b-c2, .nd-b-c3 {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.nd-b-c1 > div, .nd-b-c2 > div, .nd-b-c3 > div { padding: 1px 0; }
.nd-b-detail { font-size: 10px; }
.nd-b-detail > div { padding: 1px 0; }
.nd-b-total { background: #FAFAFA; font-weight: 700; border-bottom: none; }

.nd-direccion {
  margin-top: 26px;
  margin-left: 280px;
  font-size: 11px;
  line-height: 1.5;
}

body.pdf-open { overflow: hidden; }

/* =============================================================
   EDITOR MODAL (fullscreen · new + edit nómina)
   ============================================================= */
.editor-overlay .pdf-modal { background: var(--bg); }
.editor-body {
  flex: 1;
  overflow: auto;
  padding: 0;
}
.editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 28px 60px;
  gap: 32px;
  align-items: start;
}
.editor-form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 26px 28px;
  box-shadow: var(--shadow-sm);
}
.editor-preview {
  position: sticky;
  top: 20px;
}
.ep-sticky {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ep-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: var(--shadow-xs);
}
.ep-card-h {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ep-card-h i { color: var(--brand); font-size: 12px; }

.ep-emp {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 22px;
}
.ep-emp-empty { color: var(--muted); }
.ep-emp .avatar-mono.lg { width: 52px; height: 52px; font-size: 16px; border-radius: 14px; }
.ep-emp .name.lg { font-size: 17px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.ep-emp .sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.ep-emp-meta { text-align: right; }
.ep-emp-meta strong { display: block; margin-top: 3px; font-size: 13px; color: var(--ink); }

.editor-form .nf-grid {
  grid-template-columns: 1fr 1fr 1fr;
}
.editor-form .nf-col-2 { grid-column: span 3; }
.editor-form .nf-totals { display: none; }
.editor-form .nf-flags { margin-top: 22px; }

.ep-totals {
  display: flex; flex-direction: column; gap: 2px;
}
.ep-trow {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--ink-3);
  padding: 5px 0;
}
.ep-trow strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}
.ep-trow.pos strong { color: var(--success); }
.ep-trow.neg strong { color: var(--danger); }
.ep-trow.dim strong { color: var(--muted-2); font-weight: 400; }
.ep-trow.ep-sub {
  border-top: 1px dashed var(--line);
  margin-top: 6px;
  padding-top: 10px;
  font-weight: 600;
  color: var(--ink);
}
.ep-trow.ep-sub strong { font-weight: 700; }
.ep-final {
  margin-top: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--brand-50), var(--accent-50));
  border: 1px solid var(--brand-200);
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.ep-final span {
  font-size: 11px;
  font-weight: 600;
  color: var(--brand-700);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.ep-final strong {
  font-size: 24px;
  color: var(--brand);
  font-weight: 800;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}
.ep-final strong small {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-left: 3px;
}

.ep-tips ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ep-tips li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-3);
}
.ep-tips li i {
  width: 14px;
  color: var(--success);
  font-size: 10px;
  text-align: center;
  flex-shrink: 0;
}
.ep-tips li.ep-warn { color: #8B6A2B; }
.ep-tips li.ep-warn i { color: var(--warning); }

@media (max-width: 1100px) {
  .editor-grid { grid-template-columns: 1fr; padding: 18px; gap: 18px; }
  .editor-preview { position: static; }
  .editor-form .nf-grid { grid-template-columns: 1fr 1fr; }
  .editor-form .nf-col-2 { grid-column: span 2; }
}
@media (max-width: 640px) {
  .editor-form .nf-grid { grid-template-columns: 1fr; }
  .editor-form .nf-col-2 { grid-column: span 1; }
}

/* =============================================================
   OPTIMIZACIÓN DE HORAS · sober list
   ============================================================= */
.optim-card .card-head-slim {
  padding: 14px 18px;
}
.opt-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.opt-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}
.opt-sub strong {
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.opt-list {
  display: flex;
  flex-direction: column;
}
.opt-row {
  display: grid;
  grid-template-columns: 36px 1fr 110px 14px;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  cursor: pointer;
  transition: 120ms;
  opacity: 0.65;
}
.opt-row:hover { background: var(--soft-2); }
.opt-row.is-on { opacity: 1; }

.opt-body { min-width: 0; }
.opt-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  line-height: 1.3;
}
.opt-badge {
  font-size: 9.5px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--success-50);
  color: var(--success);
  letter-spacing: 0.02em;
}
.opt-desc {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.45;
}
.opt-meta {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.opt-legal {
  font-size: 10.5px;
  color: var(--muted-2);
  background: var(--soft);
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 500;
}

.opt-impact {
  text-align: right;
}
.opt-eur {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.opt-row.is-on .opt-eur { color: var(--brand); }
.opt-h {
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 1px;
}

.opt-chev {
  color: var(--muted-2);
  font-size: 10px;
  transition: 120ms;
}
.opt-row:hover .opt-chev { color: var(--brand); transform: translateX(2px); }

/* Optimization teaser banner (on horas page) */
.optim-teaser {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink);
  transition: 150ms;
}
.optim-teaser:hover {
  background: var(--soft-2);
  border-color: var(--line-2);
}
.optim-teaser .ot-eyebrow {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.optim-teaser .ot-title {
  font-size: 13.5px;
  color: var(--ink);
  font-weight: 500;
}
.optim-teaser .ot-title strong {
  color: var(--brand);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.optim-teaser .ot-r {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--brand);
  font-weight: 600;
}
.optim-teaser:hover .ot-r i { transform: translateX(2px); }
.optim-teaser .ot-r i { transition: 150ms; font-size: 11px; }

/* Reglas page sidebar */
.card-title-mini {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.trend-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.trend-row {
  display: grid;
  grid-template-columns: 60px 1fr 70px;
  gap: 12px;
  align-items: center;
  font-size: 12px;
  color: var(--ink-3);
}
.trend-row strong {
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
  font-size: 12.5px;
}
.trend-row.active strong { color: var(--brand); }
.trend-row.dim { color: var(--muted-2); }
.trend-row.dim strong { color: var(--muted); font-weight: 500; }
.trend-bar {
  height: 6px;
  background: var(--soft);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.trend-bar > div {
  height: 100%;
  background: var(--line-2);
  border-radius: 999px;
  transition: width 320ms;
}
.trend-row.active .trend-bar > div { background: var(--brand); }
.trend-row.dim .trend-bar > div {
  background: var(--line-2);
  background-image: repeating-linear-gradient(45deg, transparent 0, transparent 3px, rgba(255,255,255,0.6) 3px, rgba(255,255,255,0.6) 6px);
}

.conv-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 18px;
  border-top: 1px solid var(--line);
}
.conv-row:first-child { border-top: none; }
.conv-row .avatar-mono { width: 28px; height: 28px; font-size: 10px; }
.conv-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
}
.conv-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
}
.conv-eur {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--success);
  font-variant-numeric: tabular-nums;
}

/* iOS-style switch */
.switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}
.switch input { display: none; }
.switch .slider {
  position: absolute; inset: 0;
  background: var(--line-2);
  border-radius: 999px;
  cursor: pointer;
  transition: 200ms;
}
.switch .slider::before {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  left: 2px; top: 2px;
  background: #fff;
  border-radius: 50%;
  transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.switch input:checked + .slider { background: var(--brand); }
.switch input:checked + .slider::before { transform: translateX(16px); }

/* Rule editor specifics */
.rule-overlay .editor-form .nf-textarea {
  min-height: 70px;
  padding: 10px 12px;
  resize: vertical;
  line-height: 1.4;
}
.trigger-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}
.trigger-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--soft-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.trigger-label {
  flex: 1;
  font-size: 13px;
  color: var(--ink);
}

.scope-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.scope-chip {
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink-3);
  cursor: pointer;
  border: 1px solid transparent;
  transition: 120ms;
}
.scope-chip:hover { background: var(--soft-2); }
.scope-chip.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.scope-chip-l {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-right: 4px;
}

.affected-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.aff-row {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 10px;
  align-items: center;
  font-size: 12.5px;
}
.aff-row .avatar-mono {
  width: 24px; height: 24px;
  font-size: 9px;
}
.aff-name { color: var(--ink); }
.aff-h {
  font-size: 11px;
  color: var(--warning);
  font-weight: 600;
  background: var(--warning-50);
  padding: 2px 7px;
  border-radius: 4px;
}
.aff-more {
  font-size: 11.5px;
  color: var(--muted);
  text-align: center;
  padding-top: 6px;
  border-top: 1px dashed var(--line);
  margin-top: 4px;
}

@media (max-width: 940px) {
  .optim-hero { grid-template-columns: 1fr; }
  .optim-stats { gap: 20px; flex-wrap: wrap; }
}

/* =============================================================
   EMPLEADOS PAGE
   ============================================================= */
.emp-kpi-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-top: 14px;
}
.emp-kpi {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  transition: 120ms;
}
.emp-kpi:hover { border-color: var(--line-2); box-shadow: 0 2px 6px -2px rgba(0,0,0,0.05); }
.ek-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--brand-50);
  color: var(--brand);
  display: grid; place-items: center;
  font-size: 14px;
  flex-shrink: 0;
}
.ek-icon.success { background: var(--success-50); color: var(--success); }
.ek-icon.info    { background: var(--info-50);    color: var(--info); }
.ek-icon.amber   { background: var(--warning-50); color: #D97706; }
.ek-icon.rose    { background: var(--danger-50);  color: var(--danger); }
.ek-body { min-width: 0; }
.ek-label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ek-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-top: 2px;
  line-height: 1.1;
}
.ek-value small {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  margin-left: 4px;
}
.ek-sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 3px;
}

/* Filter dropdowns (pill style) */
.filter-pill {
  height: 32px;
  padding: 0 30px 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  font-size: 12.5px;
  color: var(--ink);
  font-weight: 500;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
  transition: 120ms;
}
.filter-pill:hover { border-color: var(--line-2); }
.filter-pill:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(151, 42, 48,0.10); }

/* Empleados table */
.tbl-empleados td:first-child { padding-left: 18px; }
.tbl-empleados td:last-child { padding-right: 18px; }
.tbl-empleados tr { cursor: pointer; }
.tbl-empleados tr:hover { background: var(--soft-2); }
.mono-id {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0;
  white-space: nowrap;
}
.tbl-empleados td .cell-emp .name {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}
.tbl-empleados td .cell-emp .sub {
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}
.tag-contract {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  font-size: 10.5px;
  font-weight: 600;
  border-radius: 5px;
  letter-spacing: 0.01em;
}
.tag-contract.tag-success { background: var(--success-50); color: #2F6B30; }
.tag-contract.tag-warn    { background: var(--warning-50); color: #8B6A2B; }
.tag-contract.tag-info    { background: var(--info-50); color: #1A5A7D; }
.tag-contract.tag-violet  { background: #EFE6F5; color: #6D28D9; }

.icon-btn-mini {
  width: 26px; height: 26px;
  border: none;
  background: transparent;
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  transition: 100ms;
}
.icon-btn-mini:hover { background: var(--soft); color: var(--ink); }

/* Sidebar departments */
.dept-list { margin-top: 12px; display: block; }
.dept-row { display: block; margin-bottom: 12px; }
.dept-row:last-child { margin-bottom: 0; }
.dept-info {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12.5px;
  gap: 8px;
  width: 100%;
  margin-bottom: 6px;
}
.dept-name { color: var(--ink); font-weight: 500; }
.dept-count { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.dept-bar { display: block; width: 100%; height: 5px; background: var(--soft); border-radius: 999px; overflow: hidden; }
.dept-fill { display: block; height: 100%; background: var(--brand); border-radius: 999px; }

.recent-list { margin-top: 10px; display: flex; flex-direction: column; gap: 2px; }
.recent-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 6px;
  border-radius: 8px;
  cursor: pointer;
  transition: 100ms;
}
.recent-row:hover { background: var(--soft-2); }
.rr-info { flex: 1; min-width: 0; }
.rr-name { font-size: 12.5px; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rr-sub { font-size: 10.5px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rr-chev { color: var(--muted-2); font-size: 10px; }

.qa-list { margin-top: 8px; display: flex; flex-direction: column; gap: 2px; }
.qa-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: 100ms;
  width: 100%;
}
.qa-row:hover { background: var(--soft-2); }
.qa-row i { color: var(--brand); width: 16px; font-size: 12px; }

/* Empleado drawer */
.avatar-mono.xl {
  width: 64px; height: 64px;
  font-size: 18px;
  border-radius: 18px;
}
.emp-hero {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, var(--soft-2), transparent);
}
.emp-hero-name { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.emp-hero-role { font-size: 13px; color: var(--muted); margin-top: 3px; }

.emp-section {
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
}
.emp-section:last-child { border-bottom: none; }
.es-h {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.es-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 18px;
}
.es-grid > div { display: flex; flex-direction: column; gap: 2px; }
.es-k { font-size: 10.5px; color: var(--muted-2); font-weight: 500; }
.es-v { font-size: 13px; color: var(--ink); font-weight: 500; }
.eval-stars { font-size: 16px; color: var(--warning); letter-spacing: 0.04em; }
.eval-stars .muted { color: var(--soft); }
.eval-stars strong { color: var(--ink); margin-left: 6px; font-size: 13px; }

.doc-mini-list { display: flex; flex-direction: column; gap: 6px; }
.doc-mini {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  background: var(--soft-2);
  border-radius: 8px;
  font-size: 12.5px;
}
.doc-mini i { color: var(--brand); font-size: 12px; }
.doc-mini span:last-child { margin-left: auto; }

/* Empleado editor (fullscreen) */
.emp-editor .editor-grid { grid-template-columns: 1.6fr 1fr; }
.ef-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--soft-2);
  border-radius: 10px;
  margin-bottom: 22px;
  overflow-x: auto;
}
.ef-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  background: transparent;
  border: none;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: 120ms;
  white-space: nowrap;
}
.ef-tab:hover { color: var(--ink); }
.ef-tab.active {
  background: var(--card);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.ef-tab i { font-size: 11px; opacity: 0.8; }

.ef-section { display: none; }
.ef-section.active { display: block; }
.emp-editor-grid .ef-section .nf-grid { grid-template-columns: 1fr 1fr 1fr; }
.emp-editor-grid .ef-section .nf-col-2 { grid-column: span 3; }
@media (max-width: 1100px) {
  .emp-editor-grid .ef-section .nf-grid { grid-template-columns: 1fr 1fr; }
  .emp-editor-grid .ef-section .nf-col-2 { grid-column: span 2; }
}
@media (max-width: 700px) {
  .emp-editor-grid .ef-section .nf-grid { grid-template-columns: 1fr; }
  .emp-editor-grid .ef-section .nf-col-2 { grid-column: span 1; }
}

.upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.upload-tile {
  border: 1.5px dashed var(--line-2);
  border-radius: 10px;
  padding: 18px 12px 12px;
  text-align: center;
  background: var(--soft-2);
  transition: 120ms;
}
.upload-tile:hover { border-color: var(--brand); background: var(--brand-50); }
.upload-tile i {
  color: var(--brand);
  font-size: 20px;
  margin-bottom: 8px;
  display: block;
}
.ut-name {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 500;
  margin-bottom: 10px;
}

.emp-preview-card .emp-prev {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 6px 6px;
  text-align: center;
}
.emp-preview-card .emp-prev .avatar-mono.xl {
  width: 72px; height: 72px;
  font-size: 22px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--brand-100), var(--accent-100));
  color: var(--brand-700);
  border: 1px solid var(--brand-200);
}
.emp-prev-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.emp-prev-role { font-size: 12px; color: var(--muted); }

/* Empleado drawer extends drawer-overlay/panel patterns */
.emp-drawer .drawer-panel { width: 560px; max-width: 100vw; }

/* =============================================================
   NÓMINAS · ENVÍO GESTORÍA + REMESA SEPA (sidebar cards)
   ============================================================= */
.envio-card .summary-block, .sepa-card .summary-block { padding: 16px 18px; }

.env-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}
.env-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--brand-50);
  color: var(--brand);
  display: grid; place-items: center;
  font-size: 14px;
  flex-shrink: 0;
  border: 1px solid var(--brand-100);
}
.env-icon.sepa {
  background: linear-gradient(135deg, #972A30, #5E1A1F);
  color: #fff;
  border-color: transparent;
}
.env-h {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.env-sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.env-rows {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.env-row {
  display: grid;
  grid-template-columns: 16px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  font-size: 12.5px;
  border-bottom: 1px dashed var(--line);
}
.env-row:last-child { border-bottom: none; }
.env-row > i {
  color: var(--muted-2);
  font-size: 11px;
  text-align: center;
}
.env-row > span {
  color: var(--ink-3);
  font-weight: 500;
}
.env-row > strong {
  font-weight: 600;
  color: var(--ink);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.env-foot {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 10.5px;
  color: var(--muted);
  text-align: center;
  letter-spacing: 0.01em;
}

.btn-dark {
  background: linear-gradient(135deg, #972A30, #5E1A1F);
  color: #fff;
  border: 1px solid transparent;
}
.btn-dark:hover { background: linear-gradient(135deg, #2A1F18, #4A3826); }

/* =============================================================
   MODAL: Gestoría + SEPA (fullscreen)
   ============================================================= */
.gestoria-overlay .pdf-modal { background: var(--bg); }

.gest-grid {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 28px;
  padding: 28px 32px;
  max-width: 1500px;
  margin: 0 auto;
  align-items: start;
}
@media (max-width: 1100px) {
  .gest-grid { grid-template-columns: 1fr; padding: 22px; gap: 22px; }
}

.gest-main { display: flex; flex-direction: column; gap: 24px; }

/* ---- Gestoría hero ---- */
.gest-hero {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 24px;
  background: linear-gradient(135deg, var(--card) 0%, var(--brand-50) 100%);
  border: 1px solid var(--brand-100);
  border-radius: 18px;
  padding: 26px 28px;
  position: relative;
  overflow: hidden;
}
.gest-hero::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 180px; height: 180px;
  background: radial-gradient(circle, rgba(212, 145, 86, 0.12), transparent 60%);
  pointer-events: none;
}
.gh-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--brand-100);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--brand);
  backdrop-filter: blur(8px);
}
.gh-h {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 12px 0 4px;
}
.gh-sub {
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.55;
  margin: 0;
}
.gh-meta {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 18px;
}
.gh-meta > div { display: flex; flex-direction: column; gap: 2px; }
.gh-k {
  font-size: 10.5px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.gh-meta strong {
  font-size: 13px;
  color: var(--ink);
  font-weight: 600;
}
.gest-hero-r {
  text-align: right;
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
  justify-content: flex-end;
}
.gh-status {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(111, 167, 99, 0.12);
  color: #4F7944;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.gh-pulse {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #6FA763;
  box-shadow: 0 0 0 3px rgba(111, 167, 99, 0.25);
  animation: ghPulse 1.5s ease-in-out infinite;
}
@keyframes ghPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(111, 167, 99, 0.25); }
  50% { box-shadow: 0 0 0 6px rgba(111, 167, 99, 0.05); }
}
.gh-amount {
  font-size: 32px;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: -0.025em;
  line-height: 1;
}
.gh-amount small {
  font-size: 14px;
  font-weight: 500;
  margin-left: 4px;
  opacity: 0.6;
}
.gh-amount-l {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---- Gestoría sections ---- */
.gest-section {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 24px;
}
.gs-h {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.gs-count {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--muted);
  background: var(--soft);
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  text-transform: none;
}

/* Doc pack */
.doc-pack { display: flex; flex-direction: column; gap: 6px; }
.doc-pack-item {
  display: grid;
  grid-template-columns: 18px 36px 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  background: var(--soft-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  transition: 120ms;
}
.doc-pack-item:hover { border-color: var(--brand-200); background: var(--brand-50); }
.doc-pack-item input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--brand);
  cursor: pointer;
}
.dpi-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--brand);
  display: grid; place-items: center;
  font-size: 13px;
}
.dpi-info { min-width: 0; }
.dpi-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dpi-sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dpi-fmt {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 7px;
  background: var(--ink);
  color: #fff;
  border-radius: 5px;
  letter-spacing: 0.05em;
}

/* Liquidación */
.gest-liq {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--soft-2);
  border-radius: 12px;
  padding: 18px 22px;
}
.gl-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 13px;
  color: var(--ink-3);
}
.gl-row strong {
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.gl-row.gl-total {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink);
  font-weight: 600;
}
.gl-row.gl-total strong {
  color: var(--brand);
  font-size: 18px;
  letter-spacing: -0.02em;
}
.gl-divider {
  height: 1px;
  background: var(--line);
  margin: 8px 0;
}
.gl-row.gl-extra {
  font-size: 12px;
  color: var(--muted);
}
.gl-row.gl-extra strong { color: var(--ink-3); font-weight: 500; }
.gl-row.gl-coste {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
}
.gl-row.gl-coste strong { font-size: 15px; color: var(--ink); }

/* ---- Side cards ---- */
.gest-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 80px; }
.gs-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
}
.gs-card-h {
  font-size: 10.5px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.gest-recipient {
  display: flex;
  align-items: center;
  gap: 12px;
}
.gr-avatar {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-700));
  color: #fff;
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.gr-name { font-size: 14px; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
.gr-mail { font-size: 12px; color: var(--muted); margin-top: 2px; }
.gr-mail.mono-id { font-family: var(--font-mono); font-size: 11.5px; }
.gr-cc { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.gr-cc label { font-size: 10.5px; color: var(--muted); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }

.gs-textarea {
  height: auto;
  padding: 12px 14px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.5;
  font-size: 12.5px;
}

.gs-checks ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.gs-checks li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.4;
}
.gs-checks li i {
  color: #6FA763;
  font-size: 11px;
  margin-top: 3px;
  flex-shrink: 0;
}
.gs-checks li.gs-warn { color: #8B6A2B; }
.gs-checks li.gs-warn i { color: var(--warning); }

.gs-history .gh-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.gs-history .gh-row:last-child { border-bottom: none; }
.gs-history .gh-when {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}
.gs-history .gh-what { color: var(--ink); font-weight: 500; }

/* =============================================================
   SEPA · Documento de remesa (estilo orden bancaria real)
   ============================================================= */
.sepa-doc {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 32px 36px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 0 var(--line), 0 2px 4px rgba(40, 30, 18, 0.03);
}
.sd-watermark {
  position: absolute;
  top: 50%; right: -40px;
  transform: translateY(-50%) rotate(-15deg);
  font-size: 180px;
  font-weight: 900;
  letter-spacing: -0.05em;
  color: rgba(20, 14, 8, 0.025);
  pointer-events: none;
  line-height: 1;
  font-family: var(--font-display, inherit);
}

.sd-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  padding-bottom: 22px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--ink);
  position: relative;
}
.sd-issuer-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.sd-logo {
  width: 46px; height: 46px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.sd-issuer {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.sd-issuer-sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 3px;
  letter-spacing: 0.01em;
}
.sd-head-r {
  text-align: right;
  position: relative;
  z-index: 1;
}
.sd-doc-tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--brand-700);
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.sd-doc-ref {
  font-size: 13px;
  color: var(--ink-3);
  margin-bottom: 2px;
}
.sd-doc-ref strong {
  font-family: var(--font-mono);
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.sd-doc-date {
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.sd-stamp-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}
.sd-stamp {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--soft-2);
  border: 1px dashed var(--line-2);
  border-radius: 10px;
}
.sd-stamp i {
  font-size: 18px;
  color: var(--ink-3);
}
.sd-stamp.green {
  background: rgba(111, 167, 99, 0.06);
  border-color: rgba(111, 167, 99, 0.25);
}
.sd-stamp.green i { color: #6FA763; }
.sd-stamp-h {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
}
.sd-stamp-s {
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
}

.sd-section {
  margin-bottom: 26px;
  position: relative;
}
.sd-section-h {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.sd-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 28px;
}
.sd-f {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 10px;
  border-bottom: 1px dotted var(--line);
}
.sd-f.sd-f-full { grid-column: 1 / -1; }
.sd-f > span {
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}
.sd-f > strong {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.sd-f > strong.mono-id {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.05em;
}

.sd-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.sd-sum-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.sd-sum-cell:nth-child(3n) { border-right: none; }
.sd-sum-cell:nth-last-child(-n+3) { border-bottom: none; }
.sd-sum-cell > span {
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}
.sd-sum-cell > strong {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.sd-sum-cell strong.sd-amount {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--brand-700);
}

/* =============================================================
   SEPA · Hero & Bank Card (legacy, kept for compat)
   ============================================================= */
.sepa-hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 28px;
  background: linear-gradient(135deg, #FAF7F1 0%, #F6DCDD 100%);
  border: 1px solid var(--brand-100);
  border-radius: 18px;
  padding: 26px 28px;
  align-items: center;
}
.sh-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: #fff;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.sh-h {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 12px 0 4px;
}
.sh-sub {
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.55;
  margin: 0 0 18px;
  max-width: 380px;
}
.sh-amount {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 0;
  border-top: 1px solid rgba(0,0,0,0.06);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  margin-bottom: 14px;
}
.sh-a-l {
  font-size: 10.5px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.sh-a-v {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--brand-700);
  line-height: 1;
}
.sh-a-v small {
  font-size: 16px;
  font-weight: 500;
  margin-left: 4px;
  opacity: 0.5;
}
.sh-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 18px;
}
.sh-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sh-k {
  font-size: 10.5px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.sh-cell strong {
  font-size: 13px;
  color: var(--ink);
  font-weight: 600;
}

/* Bank card visual */
.bank-card {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1.586 / 1;
  background:
    radial-gradient(800px 200px at 0% 0%, rgba(255,255,255,0.12), transparent 60%),
    linear-gradient(135deg, #003D8F 0%, #0067B1 60%, #0083C9 100%);
  border-radius: 18px;
  padding: 22px;
  color: #fff;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow:
    0 20px 40px -10px rgba(0, 61, 143, 0.35),
    0 8px 20px -5px rgba(0, 61, 143, 0.25);
  margin: 0 auto;
}
.bank-card::before {
  content: '';
  position: absolute;
  top: -60px; right: -80px;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(255,255,255,0.15), transparent 60%);
  pointer-events: none;
}
.bc-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 1;
}
.bc-bank {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.bc-chip {
  width: 36px; height: 28px;
  border-radius: 6px;
  background: linear-gradient(135deg, #D4AC4D 0%, #B89030 100%);
  position: relative;
}
.bc-chip::after {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(0,0,0,0.2);
  border-radius: 4px;
  background:
    linear-gradient(0deg, transparent 33%, rgba(0,0,0,0.15) 33%, rgba(0,0,0,0.15) 66%, transparent 66%);
}
.bc-iban {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.06em;
  font-weight: 600;
  position: relative;
  z-index: 1;
}
.bc-name {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.95;
  margin-top: 2px;
  position: relative;
  z-index: 1;
}
.bc-foot {
  display: flex;
  justify-content: space-between;
  font-size: 9.5px;
  letter-spacing: 0.04em;
  opacity: 0.7;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
  margin-top: 6px;
}

/* SEPA table */
.tbl-sepa td { padding: 12px 14px !important; }
.tbl-sepa td:first-child { padding-left: 20px !important; }
.tbl-sepa td:last-child { padding-right: 20px !important; }
.tbl-sepa input[type="checkbox"] { accent-color: var(--brand); cursor: pointer; }
.sepa-table-foot {
  padding: 12px 20px;
  font-size: 11.5px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  text-align: center;
}
.sepa-table-foot a { color: var(--brand); font-weight: 600; text-decoration: none; }

/* SEPA XML preview */
.sepa-xml {
  background: #1A1410;
  color: #E8DCC8;
  padding: 18px 22px;
  border-radius: 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.7;
  overflow-x: auto;
  margin: 0;
  white-space: pre;
}
.sepa-xml .x-tag { color: #D4AC4D; }
.sepa-xml .x-comment { color: #7A6F5A; font-style: italic; }

/* Print styles */
@media print {
  body * { visibility: hidden; }
  .pdf-overlay, .pdf-overlay * { visibility: visible; }
  .pdf-overlay { position: absolute; inset: 0; }
  .pdf-toolbar { display: none; }
  .pdf-bg { display: none; }
  .pdf-scroll { padding: 0; overflow: visible; }
  .pdf-page { box-shadow: none; max-width: none; }
}
