/* PROYECTOERP | Prestaciones > Empleados | R3 - barra encima de tabla - 2026-10-25
   Cambios exclusivamente visuales. No altera controles ni información de RH. */
:root { --erp-emp-scale: 1.13; }
body.erp-emp-a11y .erp-emp-title {
  font-size: calc(36px * var(--erp-emp-scale)) !important;
  line-height: 1.15 !important; letter-spacing: -.035em !important;
  font-weight: 750 !important; color: #112643 !important;
}
body.erp-emp-a11y .erp-emp-filters,
body.erp-emp-a11y .erp-emp-table-card {
  border-radius: 18px !important;
  border: 1px solid #cbd8e8 !important;
  box-shadow: 0 5px 18px rgba(16, 40, 74, .07) !important;
}
body.erp-emp-a11y .erp-emp-filters { padding: clamp(18px, 2vw, 28px) !important; }
body.erp-emp-a11y .erp-emp-filters label {
  font-size: calc(15px * var(--erp-emp-scale)) !important;
  font-weight: 720 !important; line-height: 1.4 !important; color: #163452 !important;
}
body.erp-emp-a11y .erp-emp-filters :is(input,select,textarea),
body.erp-emp-a11y .erp-emp-filters button {
  font-size: calc(15px * var(--erp-emp-scale)) !important;
  min-height: calc(48px * var(--erp-emp-scale)) !important;
  border-radius: 10px !important; border-color: #b6c9df !important;
}
body.erp-emp-a11y .erp-emp-filters :is(input,select,textarea):focus-visible,
body.erp-emp-a11y .erp-emp-filters button:focus-visible {
  outline: 3px solid #2563eb !important; outline-offset: 2px !important;
}
body.erp-emp-a11y .erp-emp-filters :is(input,select,textarea)::placeholder {
  opacity: 1 !important; color: #60738c !important;
}
body.erp-emp-a11y .erp-emp-table-card { position: relative; }
body.erp-emp-a11y .erp-emp-scrollview {
  overflow: auto !important; overscroll-behavior: contain;
  scrollbar-color: #8299b8 #e5edf8; scrollbar-width: auto;
}
body.erp-emp-a11y .erp-emp-scrollview::-webkit-scrollbar { width: 16px; height: 17px; }
body.erp-emp-a11y .erp-emp-scrollview::-webkit-scrollbar-thumb {
  background: #849fbe; border-radius: 9px; border: 3px solid #e5edf8;
}
body.erp-emp-a11y .erp-emp-scrollview::-webkit-scrollbar-track { background: #e5edf8; }
body.erp-emp-a11y table.erp-emp-table {
  border-collapse: separate !important; border-spacing: 0 !important;
  min-width: max(1480px, 100%) !important;
  font-variant-numeric: tabular-nums !important;
}
body.erp-emp-a11y table.erp-emp-table :is(th,td) {
  font-size: calc(15px * var(--erp-emp-scale)) !important;
  line-height: 1.5 !important;
  padding: calc(12px * var(--erp-emp-scale)) 13px !important;
  vertical-align: middle !important; white-space: normal !important;
  overflow-wrap: normal !important; word-break: normal !important;
  border-bottom: 1px solid #d9e2ef !important;
}
body.erp-emp-a11y table.erp-emp-table thead th {
  position: sticky !important; top: 0 !important; z-index: 4 !important;
  background: #1764be !important; color: #fff !important;
  font-weight: 770 !important; text-align: left !important;
  border-color: #2e76c6 !important;
}
body.erp-emp-a11y table.erp-emp-table tbody tr:nth-child(even) td {
  background: #f1f6fd !important;
}
body.erp-emp-a11y table.erp-emp-table tbody tr:nth-child(odd) td {
  background: #fff !important;
}
body.erp-emp-a11y table.erp-emp-table tbody tr:hover td,
body.erp-emp-a11y table.erp-emp-table tbody tr:focus-within td {
  background: #dceafb !important;
}
body.erp-emp-a11y table.erp-emp-table tbody td:nth-child(4) {
  font-weight: 760 !important; color: #112a4f !important;
  min-width: 235px !important;
}
body.erp-emp-a11y table.erp-emp-table :is(th,td):first-child {
  position: sticky !important; left: 0 !important; z-index: 3 !important;
  box-shadow: 3px 0 6px rgba(21,56,96,.13) !important;
  min-width: 195px !important; max-width: 280px !important;
}
body.erp-emp-a11y table.erp-emp-table thead th:first-child { z-index: 6 !important; }
body.erp-emp-a11y .erp-emp-table-card button,
body.erp-emp-a11y .erp-emp-table-card select {
  min-height: 40px; font-size: calc(14px * var(--erp-emp-scale));
}
/* Barra de herramientas externa al árbol React, evitando romper reconciliación. */
.erp-emp-toolbar {
  position: fixed; left: 0; top: 0; right: auto; bottom: auto; z-index: 1050;
  display: none; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 7px;
  max-width: min(96vw, 820px); padding: 11px 13px;
  color: #122e55; background: #fff; border: 2px solid #bfd3ec;
  border-radius: 15px; box-shadow: 0 6px 25px rgba(18,45,83,.22);
  font: 650 15px/1.3 system-ui, -apple-system, Segoe UI, sans-serif;
}
/* Solo visible cuando la tabla y su contenedor estén localizados. */
body.erp-emp-a11y.erp-emp-has-toolbar .erp-emp-toolbar { display: flex; }
/* El espacio reservado está DENTRO de la tarjeta, entre título y tabla,
   evitando superponer la barra a empleados, columnas y paginación. */
body.erp-emp-a11y .erp-emp-table-card .erp-emp-scrollview {
  margin-top: var(--erp-emp-toolbar-space, 78px) !important;
}
.erp-emp-toolbar { box-sizing: border-box; width: max-content; max-width: calc(100vw - 16px); }
.erp-emp-toolbar button:disabled { opacity: .48; cursor: not-allowed; }

.erp-emp-toolbar__label { font-weight: 760; padding: 0 5px; }
.erp-emp-toolbar button {
  appearance: none; cursor: pointer; font: inherit;
  background: #f0f6fe; color: #103e79; border: 1px solid #a8c4e9;
  padding: 10px 13px; min-height: 46px; min-width: 48px; border-radius: 10px;
}
.erp-emp-toolbar button:hover { background: #e0edfe; }
.erp-emp-toolbar button:focus-visible { outline: 3px solid #1265d4; outline-offset: 2px; }
.erp-emp-toolbar button[aria-pressed='true'] { color: #fff; background: #145eb3; }
.erp-emp-toolbar__sep { height: 28px; width: 1px; background: #c7d9ee; margin: 0 2px; }
body.erp-emp-a11y.erp-emp-modal-open .erp-emp-toolbar { display: none; }
body.erp-emp-a11y .erp-emp-table-card.erp-emp-expanded {
  position: fixed !important; inset: 14px !important; z-index: 1040 !important;
  display: flex !important; flex-direction: column !important;
  background: #fff !important; border: 3px solid #286cc1 !important;
  padding: 16px !important; margin: 0 !important; max-width: unset !important;
  height: calc(100dvh - 28px) !important; width: calc(100vw - 28px) !important;
}
body.erp-emp-a11y .erp-emp-table-card.erp-emp-expanded .erp-emp-scrollview {
  flex: 1 1 auto !important; max-height: none !important;
  min-height: 0 !important;
}
body.erp-emp-a11y.erp-emp-expanded-body { overflow: hidden !important; }
@media (max-width: 780px) {
  .erp-emp-toolbar { justify-content: center; max-width: calc(100vw - 16px); }
  .erp-emp-toolbar__label { display: none; }
  body.erp-emp-a11y .erp-emp-filters { padding: 14px !important; }
  body.erp-emp-a11y table.erp-emp-table { min-width: 1300px !important; }
}
@media (prefers-reduced-motion: reduce) {
  .erp-emp-toolbar *, body.erp-emp-a11y .erp-emp-table-card * { transition: none !important; }
}

/* Si se maximiza la tabla, conservar el control sobre su encabezado. */
body.erp-emp-a11y .erp-emp-table-card.erp-emp-expanded .erp-emp-scrollview {
  margin-top: var(--erp-emp-toolbar-space, 78px) !important;
}

/* R3: Exportación junto a herramientas, nunca flotando sobre las filas. */
.erp-emp-toolbar .erp-emp-export-button {color: #fff; background:#1764be; border-color:#1354a2; font-weight:760;}
.erp-emp-toolbar .erp-emp-export-button:hover {background:#104e97;}
