:root {
  /* ONEST Brand */
  --onest-blue-900: #003e75;
  --onest-blue-700: #00549e;
  --onest-blue-500: #1677bd;
  --onest-blue-100: #eaf3fa;

  --onest-green-700: #2b9138;
  --onest-green-500: #39b54a;
  --onest-green-100: #eaf7ec;

  /* Neutral */
  --gray-950: #20252b;
  --gray-700: #475467;
  --gray-500: #667085;
  --gray-300: #d0d5dd;
  --gray-200: #e1e6eb;
  --gray-100: #f2f4f7;
  --gray-50: #f8fafc;
  --white: #ffffff;

  /* Semantic */
  --success: #22a447;
  --success-bg: #eaf7ec;
  --warning: #f59e0b;
  --warning-bg: #fef6e7;
  --danger: #d92d20;
  --danger-bg: #fceae9;
  --info: #1677bd;
  --info-bg: #eaf3fa;
  --neutral: #667085;
  --neutral-bg: #f2f4f7;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;

  /* App aliases */
  --ink: var(--gray-950);
  --muted: var(--gray-500);
  --paper: #f5f7f9;
  --surface: var(--white);
  --surface-2: var(--gray-100);
  --border: var(--onest-border, #e1e6eb);
  --accent: var(--onest-blue-700);
  --accent-dark: var(--onest-blue-900);
  --accent-ink: #ffffff;
  --focus: 0 0 0 3px rgba(0, 84, 158, 0.12);
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", "Arial", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
.display {
  font-family: "Montserrat", "Arial", sans-serif;
  letter-spacing: -0.01em;
}

.mono,
.num {
  font-variant-numeric: tabular-nums;
}

a {
  color: var(--onest-blue-700);
}

button {
  font-family: inherit;
}

::selection {
  background: rgba(0, 84, 158, 0.16);
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: var(--radius-sm);
}

.shell {
  display: flex;
  min-height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--onest-blue-700);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  color: #fff;
  font-size: 14px;
  flex: 0 0 auto;
}

.brand-logo {
  height: 42px;
  width: auto;
  max-width: 170px;
  flex: 0 0 auto;
  object-fit: contain;
  display: block;
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 6px 12px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-text b {
  font-family: "Montserrat", sans-serif;
  font-size: 15px;
  font-weight: 700;
}

.brand-text span {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.64);
  letter-spacing: 0.02em;
}

.main {
  flex: 1;
  min-width: 0;
  padding: 32px 40px 64px;
  max-width: 1180px;
}

.topline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 4px;
}

h1.page-title {
  font-size: 32px;
  font-weight: 700;
  margin: 0;
  font-family: "Montserrat", sans-serif;
}

p.lede {
  color: var(--muted);
  max-width: 62ch;
  margin: 8px 0 0;
  font-size: 14px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.card-pad {
  padding: 24px;
}

.grid-courses {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.course-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.course-card .norma {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 500;
}

.course-card h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  font-family: "Montserrat", sans-serif;
}

.course-meta {
  display: flex;
  gap: 14px;
  font-size: 12.5px;
  color: var(--muted);
}

.course-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.01em;
  width: fit-content;
}

.chip .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.chip.pend {
  background: var(--neutral-bg);
  color: var(--neutral);
}

.chip.pend .dot {
  background: var(--neutral);
}

.chip.curso {
  background: var(--warning-bg);
  color: var(--warning);
}

.chip.curso .dot {
  background: var(--warning);
}

.chip.ok {
  background: var(--success-bg);
  color: var(--success);
}

.chip.ok .dot {
  background: var(--success);
}

.chip.venc {
  background: var(--danger-bg);
  color: var(--danger);
}

.chip.venc .dot {
  background: var(--danger);
}

/* Checkbox de selección en tablas (constancias en lote): objetivo táctil 24px visual dentro de una celda de 44px */
input[type="checkbox"].chk-cert,
input[type="checkbox"].chk-empleado-lote,
input[type="checkbox"]#chk-todos-empleados-lote {
  width: 20px;
  height: 20px;
  accent-color: var(--onest-blue-700);
  cursor: pointer;
}

td:has(.chk-cert),
td:has(.chk-empleado-lote),
th:has(#chk-todos-empleados-lote) {
  width: 44px;
  text-align: center;
}

/* Foco visible también sobre fondos oscuros (sidebar) */
.sidebar :focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.45);
}

.btn {
  appearance: none;
  border: none;
  background: var(--onest-blue-700);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
  transition: background 0.2s ease;
}

.btn:hover {
  background: var(--onest-blue-900);
}

.btn:active {
  background: var(--onest-blue-900);
}

.btn.ghost {
  background: #fff;
  color: var(--onest-blue-700);
  border: 1px solid var(--onest-blue-700);
}

.btn.ghost:hover {
  background: var(--onest-blue-100);
}

.btn.success {
  background: var(--onest-green-500);
  color: #fff;
}

.btn.success:hover {
  background: var(--onest-green-700);
}

.btn.sm {
  height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
  margin-bottom: 16px;
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  padding: 0;
}

.back-link:hover {
  color: var(--onest-blue-700);
}

.temario {
  margin: 16px 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.temario li {
  display: flex;
  gap: 12px;
  font-size: 14px;
  padding: 12px;
  background: var(--surface-2);
  border-radius: var(--radius-md);
}

.temario li .idx {
  color: var(--onest-blue-700);
  font-weight: 700;
  flex: 0 0 auto;
}

.opt-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  max-height: 220px;
  overflow-y: auto;
}

.opt {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  cursor: pointer;
}

.opt input {
  accent-color: var(--onest-blue-700);
}

form.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-700);
}

.field input,
.field select {
  font-family: inherit;
  font-size: 14px;
  height: 44px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-300);
  background: var(--white);
  color: var(--ink);
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--onest-blue-700);
  box-shadow: var(--focus);
}

.hint {
  font-size: 12.5px;
  color: var(--muted);
}

.error-text {
  font-size: 12.5px;
  color: var(--danger);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 640px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

th {
  text-align: left;
  font-size: 12px;
  color: var(--gray-700);
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  background: var(--gray-100);
}

td {
  padding: 12px;
  border-bottom: 1px solid var(--gray-200);
}

tr:last-child td {
  border-bottom: none;
}

tbody tr:hover td {
  background: var(--gray-50);
}

.table-wrap {
  overflow-x: auto;
}

td.mono {
  font-size: 12.5px;
}

th.num,
td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.empty {
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  color: var(--muted);
}

.loading-inline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13.5px;
  padding: 48px 0;
}

.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex: 0 0 auto;
  border: 2px solid var(--border);
  border-top-color: var(--onest-blue-700);
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation-duration: 1.4s;
  }
}

.form-error {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: var(--danger-bg);
  color: var(--danger);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.4;
}

.barh-track {
  width: 100%;
  height: 8px;
  border-radius: 99px;
  background: var(--gray-100);
  overflow: hidden;
}

.barh-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.3s ease;
}

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--paper);
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 32px;
}

.login-card .brand {
  margin-bottom: 20px;
}

.login-card .brand-text span {
  color: var(--muted);
}

.login-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.role-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  background: var(--surface-2);
  padding: 4px;
  border-radius: var(--radius-md);
}

.role-toggle button {
  flex: 1;
  padding: 8px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  font-weight: 600;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}

.role-toggle button.active {
  background: var(--surface);
  color: var(--onest-blue-700);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.banner-inline {
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 16px;
}

.cert-page {
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 2px dashed var(--border);
  position: relative;
}

.cert-page:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.cert-page::before {
  content: "Constancia " attr(data-idx) " de " attr(data-total);
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

.dc3-document {
  width: 200mm;
  max-width: 100%;
  min-height: 263mm;
  margin: 0 auto;
  background: #fff;
  color: #000;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  box-sizing: border-box;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

/* ==========================================================
   ENCABEZADO
   ========================================================== */

.dc3-header {
  text-align: center;
  margin-bottom: 12px;
}

.dc3-format {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 3px;
}

.dc3-title {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
}

/* ==========================================================
   SECCIONES
   ========================================================== */

.dc3-section {
  width: 100%;
  margin-bottom: 15px;
  border-left: 1px solid #000;
  border-right: 1px solid #000;
  border-bottom: 1px solid #000;
  box-sizing: border-box;
}

.dc3-section-title {
  background: #000;
  color: #fff;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  padding: 7px 5px;
  text-transform: uppercase;
  box-sizing: border-box;
}

/* ==========================================================
   CAMPOS
   ========================================================== */

.dc3-field {
  padding: 4px 6px;
  border-top: 1px solid #000;
  box-sizing: border-box;
  min-height: 42px;
}

.dc3-full {
  width: 100%;
}

.dc3-label {
  display: block;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 400;
  margin-bottom: 3px;
}

.dc3-value {
  display: block;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.25;
  min-height: 16px;
}

/* ==========================================================
   CURP
   ========================================================== */

.dc3-worker-row {
  display: grid;
  grid-template-columns: 72% 28%;
  border-top: 1px solid #000;
}

.dc3-curp-container {
  padding: 5px;
  border-right: 1px solid #000;
  box-sizing: border-box;
}

.dc3-occupation {
  padding: 5px;
  box-sizing: border-box;
  font-size: 10px;
  line-height: 1.25;
}

.dc3-occupation strong {
  display: block;
  margin-top: 3px;
  font-size: 10.5px;
  font-weight: 500;
}

/* ==========================================================
   CASILLAS CURP / RFC
   ========================================================== */

.dc3-box-row {
  display: flex;
  width: 100%;
  margin-top: 5px;
}

.dc3-char {
  flex: 1 1 0;
  min-width: 0;
  height: 34px;
  border-top: 1px solid #000;
  border-right: 1px solid #000;
  border-bottom: 1px solid #000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  font-size: 12px;
  font-family: "Courier New", monospace;
  font-weight: 700;
}

.dc3-char:first-child {
  border-left: 1px solid #000;
}

/* ==========================================================
   RFC
   ========================================================== */

.dc3-rfc-row {
  border-top: 1px solid #000;
  padding: 5px;
  box-sizing: border-box;
}

.dc3-rfc-label {
  margin-bottom: 4px;
}

.dc3-rfc-boxes {
  width: 50%;
}

.dc3-rfc-boxes .dc3-char {
  flex: 1 1 0;
  min-width: 0;
}



/* ==========================================================
   CURSO Y FECHAS
   ========================================================== */

.dc3-course-row {
  display: grid;
  grid-template-columns: 22% 11% 67%;
  border-top: 1px solid #000;
  box-sizing: border-box;
}

.dc3-hours {
  padding: 5px;
  border-right: 1px solid #000;
  box-sizing: border-box;
}

.dc3-big-value {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 500;
}

.dc3-period-label {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-right: 1px solid #000;
  box-sizing: border-box;
  line-height: 1.2;
}

.dc3-period {
  display: flex;
  align-items: stretch;
  width: 100%;
}

.dc3-period-block {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 4px;
  box-sizing: border-box;
}

.dc3-period-word {
  margin-right: 5px;
  font-size: 10px;
}

.dc3-period-separator {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

/* ==========================================================
   FECHA
   ========================================================== */

.dc3-date {
  display: flex;
  width: 100%;
  gap: 4px;
}

.dc3-date-group {
  flex: 1;
  text-align: center;
}

.dc3-date-title {
  display: block;
  font-size: 9px;
  margin-bottom: 2px;
}

.dc3-date-boxes {
  display: flex;
}

.dc3-date-boxes .dc3-char {
  height: 31px;
  font-size: 10px;
}

/* ==========================================================
   DECLARACIÓN
   ========================================================== */

.dc3-declaration {
  border: 1px solid #000;
  text-align: center;
  font-weight: 700;
  font-size: 11px;
  line-height: 1.35;
  padding: 10px 12px;
  margin-top: 16px;
}

/* ==========================================================
   FIRMAS
   ========================================================== */

.dc3-signatures {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  border-left: 1px solid #000;
  border-right: 1px solid #000;
  border-bottom: 1px solid #000;
  padding: 18px 35px 12px;
  box-sizing: border-box;
}

.dc3-signature {
  text-align: center;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 145px;
}

.dc3-signature-role {
  font-size: 11px;
  min-height: 34px;
  line-height: 1.3;
}

.dc3-signature-space {
  height: 90px;
  min-height: 90px;
  max-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.dc3-signature-image {
  display: block;
  width: auto;
  height: 88px;
  max-width: 100%;
  max-height: 88px;
  object-fit: contain;
  transform: none;
}

.dc3-signature-name {
  font-size: 10.5px;
  min-height: 28px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 4px;
}

.dc3-signature-line {
  border-bottom: 1px solid #000;
  width: 100%;
  margin-top: 4px;
}

.dc3-signature-caption {
  font-size: 10px;
  margin-top: 4px;
}



/* ============================================================
   SELECT BUSCABLE
   ============================================================ */

.searchable-select {
  position: relative;
  min-width: 0;
}

.searchable-select label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-700);
}

.searchable-control {
  position: relative;
  width: 100%;
}

.searchable-control input {
  box-sizing: border-box;
  width: 100%;
  height: 44px;
  padding: 0 44px 0 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  background: var(--white);
  color: var(--ink);
  font: inherit;
  outline: none;
}

.searchable-control input:focus {
  border-color: var(--onest-blue-700);
  box-shadow: var(--focus);
}

.searchable-arrow {
  position: absolute;
  top: 50%;
  right: 7px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--gray-500);
  font-size: 18px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.searchable-arrow:hover {
  background: var(--gray-100);
}

.searchable-menu {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  z-index: 1000;
  box-sizing: border-box;
  max-height: 260px;
  padding: 6px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.15);
}

/* Evita que el menú aparezca cuando tiene [hidden] */
.searchable-menu[hidden] {
  display: none !important;
}

.search-option {
  display: block;
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 9px 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}

.search-option:hover {
  background: var(--gray-50);
}

.search-option[hidden] {
  display: none !important;
}

/* ============================================================
   GRID DE FILTROS
   ============================================================ */

.empleados-filtros-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  overflow: visible;
}

@media (max-width: 900px) {
  .empleados-filtros-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   MODAL
   ============================================================ */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.45);
}

.modal-card {
  width: 100%;
  max-width: 460px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  padding: 24px;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.modal-head h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.modal-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.modal-close {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--gray-700);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover {
  background: var(--gray-100);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

/* ==========================================================
   EMISIÓN POR LOTE - CONSTANCIAS DC-3
   ========================================================== */

.section-kicker {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 14px;
}

.empleado-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar-mini {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Montserrat", sans-serif;
  font-size: 11px;
  font-weight: 700;
  background: var(--onest-blue-100);
  color: var(--onest-blue-700);
}

/* Resalta la fila cuando su checkbox está marcado */
tr:has(.chk-empleado-lote:checked) td {
  background: var(--onest-blue-100);
}

.badge-contador {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  background: var(--neutral-bg);
  color: var(--neutral);
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.badge-contador.has-selection {
  background: var(--success-bg);
  color: var(--success);
  font-weight: 600;
}

/* Barra de acción inferior fija, visible al hacer scroll en listas largas */
.emitir-bar {
  position: sticky;
  bottom: 0;
  z-index: 10;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
}

.emitir-bar .btn-row {
  align-items: center;
  justify-content: space-between;
}

/* ============================================================
   EMISIÓN POR LOTE - MODAL DE PROGRESO / RESULTADO
   ============================================================ */

.modal-lote-estado,
.modal-lote-resultado {
  text-align: center;
}

.emision-spinner {
  width: 46px;
  height: 46px;
  margin: 4px auto 22px;
  border: 4px solid var(--onest-blue-100);
  border-top-color: var(--onest-blue-700);
  border-radius: 50%;
  animation: spinner-emision-lote 0.8s linear infinite;
}

@keyframes spinner-emision-lote {
  to {
    transform: rotate(360deg);
  }
}

.resultado-lote-ok,
.resultado-lote-warning {
  width: 54px;
  height: 54px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 26px;
  font-weight: 800;
}

.resultado-lote-ok {
  color: var(--success);
  background: var(--success-bg);
}

.resultado-lote-warning {
  color: var(--warning);
  background: var(--warning-bg);
}

.resultado-lote-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 24px 0;
}

.resultado-lote-grid>div {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.resultado-lote-grid span,
.resultado-lote-grid strong {
  display: block;
}

.resultado-lote-grid strong {
  margin-top: 6px;
  font-size: 22px;
  font-family: "Montserrat", sans-serif;
}

.modal-lote-resultado .modal-actions {
  justify-content: center;
}

/* ==========================================================
   TABLA DE CONSTANCIAS - ADMIN
   ========================================================== */

.admin-cert-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.admin-cert-table {
  width: 100%;
  min-width: 980px;
  table-layout: fixed;
  border-collapse: collapse;
}

.admin-cert-table th,
.admin-cert-table td {
  padding: 12px 14px;
  vertical-align: middle;
}

.admin-cert-table .col-curso {
  width: 24%;
  min-width: 220px;
}

.admin-cert-table .col-horas {
  width: 8%;
  min-width: 80px;
  text-align: center;
  white-space: nowrap;
}

.admin-cert-table .col-folio {
  width: 15%;
  min-width: 145px;
  white-space: nowrap;
}

.admin-cert-table .col-fecha {
  width: 13%;
  min-width: 135px;
}

.admin-cert-table .col-capacitador {
  width: 19%;
  min-width: 180px;
}

.admin-cert-table .col-estatus {
  width: 8%;
  min-width: 100px;
  text-align: center;
}

/* ==========================================================
   TOASTS
   ========================================================== */
.toast-host {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.portal-toast {
  min-width: 320px;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 5px solid var(--info);
  border-radius: 14px;
  box-shadow: 0 14px 30px rgba(16, 24, 40, 0.16);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 14px 16px;
  animation: toastIn 0.18s ease-out;
}

.portal-toast.success {
  border-left-color: var(--success);
}

.portal-toast.warning {
  border-left-color: var(--warning);
}

.portal-toast.danger {
  border-left-color: var(--danger);
}

.portal-toast.info {
  border-left-color: var(--info);
}

.portal-toast-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 2px;
}

.portal-toast-message {
  font-size: 14px;
  color: #475467;
  line-height: 1.45;
}

.portal-toast-close {
  border: 0;
  background: transparent;
  color: #667085;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.portal-toast.closing {
  opacity: 0;
  transform: translateY(-6px);
  transition: all 0.18s ease;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================
   MODAL
   ========================================================== */
.modal-host {
  position: relative;
  z-index: 9998;
}

.portal-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(2px);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.16s ease-out;
}

.portal-modal {
  width: 100%;
  max-width: 500px;
  background: #fff;
  border: 1px solid #d9e2ec;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.2);
  overflow: hidden;
  animation: modalIn 0.18s ease-out;
}

.portal-modal-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 22px 12px;
}

.portal-modal-icon {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  flex: 0 0 auto;
}

.portal-modal.info .portal-modal-icon {
  background: var(--info-bg);
  color: var(--info);
}

.portal-modal.success .portal-modal-icon {
  background: var(--success-bg);
  color: var(--success);
}

.portal-modal.warning .portal-modal-icon {
  background: var(--warning-bg);
  color: var(--warning);
}

.portal-modal.danger .portal-modal-icon {
  background: var(--danger-bg);
  color: var(--danger);
}

.portal-modal-title {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  color: #0f172a;
}

.portal-modal-content {
  padding: 0 22px 18px;
}

.portal-modal-message {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: #475467;
}

.portal-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 22px 22px;
  border-top: 1px solid #eef2f6;
}

.portal-modal-actions.single {
  justify-content: flex-end;
}

.portal-modal-overlay.closing,
.portal-modal-overlay.closing .portal-modal {
  opacity: 0;
  transition: all 0.16s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ==========================================================
   DASHBOARD CERTIFICADOR - NUEVO DISEÑO
   ========================================================== */

.cert-dashboard-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;

  margin-bottom: 26px;
  padding: 26px 28px;

  background:
    linear-gradient(135deg,
      var(--onest-blue-900),
      var(--onest-blue-700));

  color: #fff;

  border-radius: var(--radius-lg);

  box-shadow:
    0 12px 30px rgba(0, 62, 117, 0.16);
}

.cert-dashboard-hero .eyebrow,
.cert-dashboard-hero .lede {
  color:
    rgba(255,
      255,
      255,
      0.72);
}

.cert-dashboard-hero .page-title {
  color: #fff;
}

.cert-dashboard-hero-badge {
  display: flex;
  align-items: center;
  gap: 14px;

  min-width: 190px;

  padding: 14px 18px;

  background:
    rgba(255,
      255,
      255,
      0.1);

  border:
    1px solid rgba(255,
      255,
      255,
      0.18);

  border-radius:
    var(--radius-lg);
}

.cert-dashboard-hero-badge-icon {
  width: 48px;
  height: 48px;

  display: flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  background: #fff;

  color:
    var(--onest-blue-900);

  border-radius:
    var(--radius-md);

  font-family:
    "Montserrat",
    sans-serif;

  font-size: 12px;
  font-weight: 800;
}

.cert-dashboard-hero-badge b,
.cert-dashboard-hero-badge span {
  display: block;
}

.cert-dashboard-hero-badge b {
  font-family:
    "Montserrat",
    sans-serif;

  font-size: 24px;
}

.cert-dashboard-hero-badge span {
  font-size: 12px;

  color:
    rgba(255,
      255,
      255,
      0.7);
}

/* ==========================================================
   MÉTRICAS
   ========================================================== */

.cert-dashboard-metrics {
  display: grid;

  grid-template-columns:
    repeat(5,
      minmax(0, 1fr));

  gap: 14px;

  margin-bottom: 24px;
}

.cert-metric-card {
  display: flex;
  align-items: center;
  gap: 14px;

  min-width: 0;

  padding: 18px;

  background:
    var(--surface);

  border:
    1px solid var(--border);

  border-radius:
    var(--radius-lg);

  box-shadow:
    var(--shadow);
}

.cert-metric-icon {
  width: 42px;
  height: 42px;

  display: flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  border-radius:
    12px;

  font-weight: 800;
}

.cert-metric-card--primary .cert-metric-icon {
  color:
    var(--info);

  background:
    var(--info-bg);
}

.cert-metric-card--success .cert-metric-icon {
  color:
    var(--success);

  background:
    var(--success-bg);
}

.cert-metric-card--warning .cert-metric-icon {
  color:
    var(--warning);

  background:
    var(--warning-bg);
}

.cert-metric-card--danger .cert-metric-icon {
  color:
    var(--danger);

  background:
    var(--danger-bg);
}

.cert-metric-card--neutral .cert-metric-icon {
  color:
    var(--gray-700);

  background:
    var(--gray-100);
}

.cert-metric-content {
  min-width: 0;
}

.cert-metric-label {
  display: block;

  color:
    var(--muted);

  font-size: 12px;
}

.cert-metric-value {
  display: block;

  margin-top: 2px;

  color:
    var(--ink);

  font-family:
    "Montserrat",
    sans-serif;

  font-size: 28px;
  line-height: 1.1;
}

.cert-metric-caption {
  display: block;

  margin-top: 4px;

  color:
    var(--gray-500);

  font-size: 11.5px;
}

/* ==========================================================
   PANELES
   ========================================================== */

.cert-dashboard-main-grid {
  display: grid;

  grid-template-columns:
    minmax(0, 1.8fr) minmax(280px, 0.8fr);

  gap: 20px;
}

.cert-dashboard-panel {
  min-width: 0;
}

.cert-dashboard-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;

  margin-bottom: 22px;
}

.cert-dashboard-panel-title {
  margin: 0;

  font-size: 19px;
}

.cert-dashboard-pill {
  padding: 6px 10px;

  background:
    var(--surface-2);

  color:
    var(--gray-700);

  border-radius:
    999px;

  font-size: 12px;
  font-weight: 600;
}

/* ==========================================================
   CURSOS
   ========================================================== */

.cert-dashboard-course-list {
  display: flex;
  flex-direction: column;

  gap: 20px;
}

.cert-dashboard-course {
  padding-bottom: 18px;

  border-bottom:
    1px solid var(--border);
}

.cert-dashboard-course:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.cert-dashboard-course-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;

  margin-bottom: 10px;
}

.cert-dashboard-course-head b {
  display: block;

  font-size: 13.5px;
}

.cert-dashboard-course-code {
  display: block;

  margin-top: 3px;

  color:
    var(--muted);

  font-size: 11px;
}

.cert-dashboard-course-total {
  flex: 0 0 auto;

  text-align: right;
}

.cert-dashboard-course-total strong,
.cert-dashboard-course-total span {
  display: block;
}

.cert-dashboard-course-total strong {
  color:
    var(--onest-blue-700);

  font-family:
    "Montserrat",
    sans-serif;

  font-size: 20px;
}

.cert-dashboard-course-total span {
  color:
    var(--muted);

  font-size: 10.5px;
}

.cert-dashboard-bar {
  background:
    linear-gradient(90deg,
      var(--onest-blue-500),
      var(--onest-green-500));
}

.cert-dashboard-course-footer {
  margin-top: 6px;

  color:
    var(--muted);

  font-size: 10.5px;
}

/* ==========================================================
   DESTACADO
   ========================================================== */

.cert-dashboard-featured-panel {
  background:
    linear-gradient(180deg,
      var(--surface),
      var(--onest-blue-100));
}

.cert-dashboard-featured {
  display: flex;
  flex-direction: column;

  padding: 22px;

  background:
    var(--surface);

  border:
    1px solid var(--border);

  border-radius:
    var(--radius-lg);
}

.cert-dashboard-featured-number {
  color:
    var(--onest-blue-700);

  font-family:
    "Montserrat",
    sans-serif;

  font-size: 48px;
  font-weight: 700;

  line-height: 1;
}

.cert-dashboard-featured-label {
  margin-top: 4px;

  color:
    var(--muted);

  font-size: 12px;
}

.cert-dashboard-featured-divider {
  height: 1px;

  margin: 18px 0;

  background:
    var(--border);
}

.cert-dashboard-featured-name {
  font-size: 15px;
  line-height: 1.4;
}

.cert-dashboard-featured-code {
  margin-top: 5px;

  color:
    var(--muted);

  font-size: 11px;
}

/* ==========================================================
   BÚSQUEDA
   ========================================================== */

.cert-dashboard-search {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 28px;

  margin-top: 20px;

  padding: 24px;
}

.cert-dashboard-search-copy {
  display: flex;
  align-items: center;
  gap: 16px;

  min-width: 0;
}

.cert-dashboard-search-icon {
  width: 48px;
  height: 48px;

  display: flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  background:
    var(--onest-blue-100);

  color:
    var(--onest-blue-700);

  border-radius:
    var(--radius-md);

  font-size: 22px;
}

.cert-dashboard-search-form {
  display: flex;
  align-items: end;
  gap: 12px;

  flex: 0 0 auto;
}

.cert-dashboard-search-field {
  width: 260px;
}

.cert-dashboard-search-btn {
  white-space: nowrap;
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 1050px) {

  .cert-dashboard-metrics {
    grid-template-columns:
      repeat(3,
        minmax(0, 1fr));
  }
}

@media (max-width: 850px) {

  .cert-dashboard-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .cert-dashboard-main-grid {
    grid-template-columns:
      1fr;
  }

  .cert-dashboard-search {
    align-items: stretch;
    flex-direction: column;
  }

  .cert-dashboard-search-form {
    align-items: stretch;
    flex-direction: column;
  }

  .cert-dashboard-search-field {
    width: 100%;
  }
}

@media (max-width: 640px) {

  .cert-dashboard-metrics {
    grid-template-columns:
      1fr;
  }

  .cert-dashboard-hero {
    padding: 22px;
  }

  .cert-dashboard-hero-badge {
    width: 100%;
  }
}

/* ==========================================================
   BUSCAR TRABAJADOR POR NSS
   ========================================================== */

.sup-search-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;

  margin-bottom: 24px;
  padding: 26px 28px;

  background:
    linear-gradient(135deg,
      var(--onest-blue-900),
      var(--onest-blue-700));

  color: #fff;

  border-radius:
    var(--radius-lg);

  box-shadow:
    0 12px 30px rgba(0, 62, 117, 0.14);
}

.sup-search-hero .eyebrow,
.sup-search-hero .lede {
  color:
    rgba(255,
      255,
      255,
      0.74);
}

.sup-search-hero .page-title {
  color: #fff;
}

.sup-search-hero-icon {
  width: 64px;
  height: 64px;

  display: flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  background:
    rgba(255,
      255,
      255,
      0.12);

  border:
    1px solid rgba(255,
      255,
      255,
      0.2);

  border-radius:
    16px;

  font-family:
    "Montserrat",
    sans-serif;

  font-size: 16px;
  font-weight: 800;
}

.sup-search-card {
  max-width: 760px;
}

.sup-search-card-head {
  margin-bottom: 20px;
}

.sup-search-title {
  margin:
    0 0 5px;

  font-size: 19px;
}

.sup-search-form {
  display: flex;
  align-items: end;
  gap: 12px;
}

.sup-search-field {
  flex: 1;
}

.sup-search-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.sup-search-empty {
  display: flex;
  align-items: flex-start;
  gap: 14px;

  max-width: 760px;

  margin-top: 18px;
  padding: 16px 18px;

  background:
    var(--danger-bg);

  color:
    var(--danger);

  border:
    1px solid rgba(217,
      45,
      32,
      0.16);

  border-radius:
    var(--radius-lg);
}

.sup-search-empty-icon {
  width: 34px;
  height: 34px;

  display: flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  background:
    #fff;

  border-radius:
    50%;

  font-weight: 800;
}

.sup-search-empty b {
  display: block;

  margin-bottom: 3px;
}

.sup-search-empty p {
  margin: 0;

  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 700px) {

  .sup-search-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .sup-search-form {
    align-items: stretch;
    flex-direction: column;
  }

  .sup-search-btn {
    width: 100%;
  }
}

/* ==========================================================
   EMPLEADOS
   ========================================================== */

.empleados-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 24px;

  margin-bottom: 24px;
  padding: 26px 28px;

  background:
    linear-gradient(135deg,
      var(--onest-blue-900),
      var(--onest-blue-700));

  color: #fff;

  border-radius:
    var(--radius-lg);

  box-shadow:
    0 12px 30px rgba(0, 62, 117, 0.14);
}

.empleados-hero .eyebrow,
.empleados-hero .lede {
  color:
    rgba(255,
      255,
      255,
      0.74);
}

.empleados-hero .page-title {
  color: #fff;
}

.empleados-hero-stat {
  min-width: 130px;

  display: flex;
  flex-direction: column;
  align-items: flex-end;

  padding: 14px 16px;

  background:
    rgba(255,
      255,
      255,
      0.1);

  border:
    1px solid rgba(255,
      255,
      255,
      0.18);

  border-radius:
    var(--radius-lg);
}

.empleados-hero-stat-label {
  font-size: 11px;

  color:
    rgba(255,
      255,
      255,
      0.7);
}

.empleados-hero-stat strong {
  font-family:
    "Montserrat",
    sans-serif;

  font-size: 32px;
  line-height: 1.1;
}

.empleados-hero-stat-caption {
  font-size: 12px;

  color:
    rgba(255,
      255,
      255,
      0.74);
}

/* ==========================================================
   FILTROS
   ========================================================== */

.empleados-filter-card {
  margin-bottom: 20px;
}

.empleados-filter-head {
  margin-bottom: 18px;
}

.empleados-filter-title {
  margin: 0 0 4px;

  font-size: 18px;
}

/* ==========================================================
   TABLA
   ========================================================== */

.empleados-table-card {
  overflow: hidden;
}

.empleados-table-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  gap: 16px;

  padding: 20px 24px;

  border-bottom:
    1px solid var(--border);
}

.empleados-table-title {
  margin: 0;

  font-size: 18px;
}

.empleados-result-count {
  padding: 6px 10px;

  background:
    var(--surface-2);

  color:
    var(--gray-700);

  border-radius:
    999px;

  font-size: 12px;
  font-weight: 600;
}

.empleados-table th,
.empleados-table td {
  vertical-align: middle;
}

.empleados-table tbody tr {
  transition:
    background 0.15s ease;
}

.empleados-actions,
.empleados-actions-head {
  text-align: right;
  white-space: nowrap;
}

/* ==========================================================
   ESTADO VACÍO
   ========================================================== */

.empleados-empty {
  display: flex;
  align-items: center;
  gap: 16px;

  padding: 24px;

  background:
    var(--surface);

  border:
    1px dashed var(--border);

  border-radius:
    var(--radius-lg);

  color:
    var(--muted);
}

.empleados-empty-icon {
  width: 44px;
  height: 44px;

  display: flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  background:
    var(--onest-blue-100);

  color:
    var(--onest-blue-700);

  border-radius:
    50%;

  font-size: 20px;
}

.empleados-empty b {
  display: block;

  color:
    var(--ink);

  margin-bottom: 3px;
}

.empleados-empty p {
  margin: 0;

  font-size: 13px;
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 760px) {

  .empleados-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .empleados-hero-stat {
    align-items: flex-start;
    width: 100%;
  }

  .empleados-table-head {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* ============================================================
   EMPLEADOS - CORRECCIÓN DE FILTROS
   ============================================================ */

/* Cuatro columnas alineadas */
.empleados-filter-card .empleados-filtros-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 16px !important;
  align-items: start !important;
  width: 100%;
  margin-top: 22px;
}

/* Cada campo ocupa exactamente su columna */
.empleados-filter-card .empleados-filtros-grid>.field {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Etiquetas a la misma altura */
.empleados-filter-card .empleados-filtros-grid>.field>label {
  display: block;
  min-height: 20px;
  margin: 0 !important;
  line-height: 20px;
}

/* Contenedores de los inputs */
.empleados-filter-card .empleados-filtros-grid .searchable-control {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 44px;
  min-height: 44px;
  margin: 0 !important;
}

/* Todos los inputs con las mismas dimensiones */
.empleados-filter-card .empleados-filtros-grid .searchable-control input {
  width: 100% !important;
  height: 44px !important;
  min-height: 44px !important;
  margin: 0 !important;
  box-sizing: border-box;
}

/* Mantener el espacio de las flechas */
.empleados-filter-card .searchable-select input {
  padding-right: 42px !important;
}

/* ============================================================
   CONTADOR Y BOTÓN LIMPIAR FILTROS
   ============================================================ */

.empleados-filter-card .empleados-filter-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap;
  gap: 20px !important;
  width: 100%;
  margin-top: 36px !important;
  padding-top: 18px !important;
  border-top: 1px solid #e5e7eb;
}

.empleados-filter-card #empleados-resultados-visibles {
  display: inline-block;
  margin: 0;
}

.empleados-filter-card #btn-limpiar-filtros-empleados {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin: 0 !important;
  padding: 10px 18px;
  white-space: nowrap;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1050px) {
  .empleados-filter-card .empleados-filtros-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 600px) {
  .empleados-filter-card .empleados-filtros-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .empleados-filter-card .empleados-filter-footer {
    align-items: stretch !important;
    flex-direction: column;
    gap: 14px !important;
    margin-top: 28px !important;
  }

  .empleados-filter-card #btn-limpiar-filtros-empleados {
    width: 100%;
  }
}


/* ==========================================================
   PERFIL DEL CAPACITADOR
   ========================================================== */

.perfil-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 24px;

  margin-bottom: 22px;
  padding: 26px 28px;

  background:
    linear-gradient(135deg,
      var(--onest-blue-900),
      var(--onest-blue-700));

  color: #fff;

  border-radius:
    var(--radius-lg);

  box-shadow:
    0 12px 30px rgba(0, 62, 117, 0.14);
}

.perfil-hero-main {
  display: flex;
  align-items: center;
  gap: 18px;

  min-width: 0;
}

.perfil-hero .eyebrow,
.perfil-hero .lede {
  color:
    rgba(255,
      255,
      255,
      0.72);
}

.perfil-hero .page-title {
  color: #fff;
}

.perfil-avatar {
  width: 68px;
  height: 68px;

  display: flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  background:
    rgba(255,
      255,
      255,
      0.14);

  border:
    1px solid rgba(255,
      255,
      255,
      0.22);

  border-radius:
    18px;

  font-family:
    "Montserrat",
    sans-serif;

  font-size: 22px;
  font-weight: 800;
}

.perfil-status {
  display: flex;
  align-items: center;
  gap: 10px;

  min-width: 170px;

  padding: 12px 14px;

  background:
    rgba(255,
      255,
      255,
      0.1);

  border:
    1px solid rgba(255,
      255,
      255,
      0.18);

  border-radius:
    var(--radius-lg);
}

.perfil-status-dot {
  width: 10px;
  height: 10px;

  flex: 0 0 auto;

  border-radius:
    50%;
}

.perfil-status-dot.is-active {
  background:
    #69dc76;
}

.perfil-status-dot.is-inactive {
  background:
    #ff867f;
}

.perfil-status b,
.perfil-status span {
  display: block;
}

.perfil-status b {
  font-size: 13px;
}

.perfil-status span {
  margin-top: 2px;

  color:
    rgba(255,
      255,
      255,
      0.7);

  font-size: 11px;
}

/* ==========================================================
   INFORMACIÓN
   ========================================================== */

.perfil-info-grid {
  display: grid;

  grid-template-columns:
    repeat(4,
      minmax(0, 1fr));

  gap: 14px;

  margin-bottom: 20px;
}

.perfil-info-card {
  padding: 18px;

  background:
    var(--surface);

  border:
    1px solid var(--border);

  border-radius:
    var(--radius-lg);

  box-shadow:
    var(--shadow);
}

.perfil-info-label {
  display: block;

  margin-bottom: 7px;

  color:
    var(--muted);

  font-size: 11.5px;
}

.perfil-info-card strong {
  display: block;

  overflow-wrap: anywhere;

  font-size: 14px;
}

.perfil-text-success {
  color:
    var(--success);
}

.perfil-text-danger {
  color:
    var(--danger);
}

/* ==========================================================
   DC-5
   ========================================================== */

.perfil-dc5-card {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 24px;

  margin-bottom: 26px;
}

.perfil-dc5-main {
  display: flex;
  align-items: center;
  gap: 16px;

  min-width: 0;
}

.perfil-dc5-icon {
  width: 58px;
  height: 58px;

  display: flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  background:
    var(--onest-blue-100);

  color:
    var(--onest-blue-700);

  border-radius:
    var(--radius-lg);

  font-family:
    "Montserrat",
    sans-serif;

  font-size: 13px;
  font-weight: 800;
}

.perfil-section-title {
  margin: 0 0 6px;

  font-size: 18px;
}

.perfil-dc5-description {
  max-width: 620px;

  margin: 0;
}

.perfil-dc5-actions {
  display: flex;
  gap: 10px;

  flex: 0 0 auto;

  flex-wrap: wrap;
}

/* ==========================================================
   CURSOS
   ========================================================== */

.perfil-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  gap: 16px;

  margin-bottom: 16px;
}

.perfil-section-heading {
  margin: 0;

  font-family:
    "Montserrat",
    sans-serif;

  font-size: 22px;
}

.perfil-course-count {
  padding: 6px 10px;

  background:
    var(--surface-2);

  color:
    var(--gray-700);

  border-radius:
    999px;

  font-size: 12px;
  font-weight: 600;
}

.perfil-course-grid {
  display: grid;

  grid-template-columns:
    repeat(auto-fill,
      minmax(260px,
        1fr));

  gap: 16px;
}

.perfil-course-card {
  display: flex;
  flex-direction: column;
  gap: 14px;

  padding: 18px;

  background:
    var(--surface);

  border:
    1px solid var(--border);

  border-radius:
    var(--radius-lg);

  box-shadow:
    var(--shadow);

  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.perfil-course-card:hover {
  transform:
    translateY(-2px);

  box-shadow:
    0 8px 24px rgba(15, 23, 42, 0.08);
}

.perfil-course-top {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 12px;
}

.perfil-course-code {
  color:
    var(--muted);

  font-size: 11px;

  font-family:
    monospace;
}

.perfil-course-status {
  padding: 4px 7px;

  background:
    var(--success-bg);

  color:
    var(--success);

  border-radius:
    var(--radius-sm);

  font-size: 10.5px;
  font-weight: 600;
}

.perfil-course-name {
  margin: 0;

  font-size: 15px;
  line-height: 1.4;
}

.perfil-course-meta {
  display: grid;

  grid-template-columns:
    1fr 1fr;

  gap: 12px;

  margin-top: auto;
  padding-top: 12px;

  border-top:
    1px solid var(--border);
}

.perfil-course-meta-label {
  display: block;

  color:
    var(--muted);

  font-size: 10.5px;
}

.perfil-course-meta b {
  display: block;

  margin-top: 3px;

  font-size: 12.5px;
}

/* ==========================================================
   VACÍO
   ========================================================== */

.perfil-empty {
  display: flex;
  align-items: center;
  gap: 14px;

  padding: 18px;

  background:
    var(--surface-2);

  border-radius:
    var(--radius-lg);

  color:
    var(--muted);
}

.perfil-empty-icon {
  width: 38px;
  height: 38px;

  display: flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  background:
    var(--onest-blue-100);

  color:
    var(--onest-blue-700);

  border-radius:
    50%;

  font-weight: 800;
}

.perfil-empty b {
  display: block;

  color:
    var(--ink);
}

.perfil-empty p {
  margin:
    3px 0 0;

  font-size: 13px;
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 900px) {

  .perfil-info-grid {
    grid-template-columns:
      repeat(2,
        minmax(0, 1fr));
  }

  .perfil-dc5-card {
    align-items:
      flex-start;

    flex-direction:
      column;
  }
}

@media (max-width: 700px) {

  .perfil-hero {
    align-items:
      flex-start;

    flex-direction:
      column;
  }

  .perfil-status {
    width: 100%;
  }

  .perfil-info-grid {
    grid-template-columns:
      1fr;
  }

  .perfil-dc5-main {
    align-items:
      flex-start;
  }

  .perfil-section-head {
    flex-direction:
      column;
  }
}

/* ==========================================================
   DASHBOARD ADMINISTRADOR
   ========================================================== */

.admin-dashboard-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;

  margin-bottom: 24px;
  padding: 28px;

  background:
    linear-gradient(135deg,
      var(--onest-blue-900),
      var(--onest-blue-700));

  color: #fff;

  border-radius:
    var(--radius-lg);

  box-shadow:
    0 12px 30px rgba(0, 62, 117, 0.15);
}

.admin-dashboard-hero .eyebrow,
.admin-dashboard-hero .lede {
  color:
    rgba(255, 255, 255, 0.74);
}

.admin-dashboard-hero .page-title {
  color: #fff;
}

.admin-dashboard-hero-badge {
  min-width: 190px;

  padding: 16px 18px;

  background:
    rgba(255, 255, 255, 0.1);

  border:
    1px solid rgba(255, 255, 255, 0.18);

  border-radius:
    var(--radius-lg);
}

.admin-dashboard-hero-label,
.admin-dashboard-hero-caption {
  display: block;

  color:
    rgba(255, 255, 255, 0.7);

  font-size: 11.5px;
}

.admin-dashboard-hero-badge strong {
  display: block;

  margin: 3px 0;

  font-family:
    "Montserrat",
    sans-serif;

  font-size: 30px;
}

/* ==========================================================
   MÉTRICAS
   ========================================================== */

.admin-dashboard-metrics {
  display: grid;

  grid-template-columns:
    repeat(auto-fit,
      minmax(145px, 1fr));

  gap: 14px;

  margin-bottom: 24px;
}

.admin-metric-card {
  padding: 18px;

  background:
    var(--surface);

  border:
    1px solid var(--border);

  border-top:
    3px solid var(--gray-300);

  border-radius:
    var(--radius-lg);

  box-shadow:
    var(--shadow);
}

.admin-metric-card--primary {
  border-top-color:
    var(--info);
}

.admin-metric-card--success {
  border-top-color:
    var(--success);
}

.admin-metric-card--warning {
  border-top-color:
    var(--warning);
}

.admin-metric-card--danger {
  border-top-color:
    var(--danger);
}

.admin-metric-label {
  display: block;

  color:
    var(--muted);

  font-size: 11.5px;
}

.admin-metric-value {
  display: block;

  margin-top: 5px;

  color:
    var(--ink);

  font-family:
    "Montserrat",
    sans-serif;

  font-size: 30px;
  line-height: 1.1;
}

.admin-metric-card--success .admin-metric-value {
  color:
    var(--success);
}

.admin-metric-card--warning .admin-metric-value {
  color:
    var(--warning);
}

.admin-metric-card--danger .admin-metric-value {
  color:
    var(--danger);
}

.admin-metric-caption {
  display: block;

  margin-top: 5px;

  color:
    var(--gray-500);

  font-size: 11px;
}

/* ==========================================================
   SECCIONES
   ========================================================== */

.admin-dashboard-section {
  margin-bottom: 20px;
}

.admin-dashboard-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  gap: 16px;

  margin-bottom: 20px;
}

.admin-dashboard-table-head {
  padding:
    22px 24px 0;
}

.admin-dashboard-section-title {
  margin:
    0 0 4px;

  font-size: 19px;
}

.admin-dashboard-pill {
  padding:
    6px 10px;

  background:
    var(--surface-2);

  color:
    var(--gray-700);

  border-radius:
    999px;

  font-size: 12px;
  font-weight: 600;
}

/* ==========================================================
   PREDIOS
   ========================================================== */

.admin-predio-grid {
  display: grid;

  grid-template-columns:
    repeat(auto-fit,
      minmax(230px, 1fr));

  gap: 14px;
}

.admin-predio-card {
  padding: 16px;

  background:
    var(--surface-2);

  border:
    1px solid var(--border);

  border-radius:
    var(--radius-lg);
}

.admin-predio-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  gap: 14px;

  margin-bottom: 12px;
}

.admin-predio-card-head b {
  display: block;

  font-size: 13.5px;
}

.admin-predio-card-sub {
  display: block;

  margin-top: 3px;

  color:
    var(--muted);

  font-size: 11px;
}

.admin-predio-progress {
  margin-bottom: 10px;
}

.admin-predio-card-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;

  color:
    var(--muted);

  font-size: 11px;
}

/* ==========================================================
   TABLA DE CURSOS
   ========================================================== */

.admin-dashboard-course-table th,
.admin-dashboard-course-table td {
  vertical-align: middle;
}

.admin-dashboard-course-table td:first-child {
  min-width: 260px;
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 800px) {

  .admin-dashboard-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-dashboard-hero-badge {
    width: 100%;
  }

  .admin-dashboard-section-head {
    flex-direction: column;
  }
}

/* ==========================================================
   ADMIN - AVANCE POR EMPLEADO
   ========================================================== */

.admin-avance-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 24px;

  margin-bottom: 24px;
  padding: 28px;

  background:
    linear-gradient(135deg,
      var(--onest-blue-900),
      var(--onest-blue-700));

  color: #fff;

  border-radius:
    var(--radius-lg);

  box-shadow:
    0 12px 30px rgba(0, 62, 117, 0.15);
}

.admin-avance-hero .eyebrow,
.admin-avance-hero .lede {
  color:
    rgba(255,
      255,
      255,
      0.74);
}

.admin-avance-hero .page-title {
  color: #fff;
}

.admin-avance-hero-stat {
  min-width: 150px;

  display: flex;
  flex-direction: column;
  align-items: flex-end;

  padding: 14px 18px;

  background:
    rgba(255,
      255,
      255,
      0.1);

  border:
    1px solid rgba(255,
      255,
      255,
      0.18);

  border-radius:
    var(--radius-lg);
}

.admin-avance-hero-label,
.admin-avance-hero-caption {
  font-size: 11.5px;

  color:
    rgba(255,
      255,
      255,
      0.72);
}

.admin-avance-hero-stat strong {
  font-family:
    "Montserrat",
    sans-serif;

  font-size: 32px;
  line-height: 1.1;
}

/* ==========================================================
   BUSCADOR
   ========================================================== */

.admin-avance-search-card {
  margin-bottom: 20px;
}

.admin-avance-search-head {
  margin-bottom: 18px;
}

.admin-avance-search-title {
  margin: 0 0 4px;

  font-size: 18px;
}

.admin-avance-search-field {
  max-width: 520px;
}

/* ==========================================================
   TABLA
   ========================================================== */

.admin-avance-table-card {
  overflow: hidden;
}

.admin-avance-table-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  gap: 16px;

  padding: 20px 24px;

  border-bottom:
    1px solid var(--border);
}

.admin-avance-table-title {
  margin: 0;

  font-size: 18px;
}

.admin-avance-count {
  padding: 6px 10px;

  background:
    var(--surface-2);

  color:
    var(--gray-700);

  border-radius:
    999px;

  font-size: 12px;
  font-weight: 600;
}

.admin-avance-table th,
.admin-avance-table td {
  vertical-align: middle;
}

.admin-avance-actions,
.admin-avance-actions-head {
  text-align: right;

  white-space: nowrap;
}

/* ==========================================================
   ESTADO VACÍO
   ========================================================== */

.admin-avance-empty {
  display: flex;
  align-items: center;
  gap: 14px;

  padding: 22px;

  background:
    var(--surface);

  border:
    1px dashed var(--border);

  border-radius:
    var(--radius-lg);

  color:
    var(--muted);
}

.admin-avance-empty-icon {
  width: 42px;
  height: 42px;

  display: flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  background:
    var(--onest-blue-100);

  color:
    var(--onest-blue-700);

  border-radius:
    50%;

  font-weight: 800;
}

.admin-avance-empty b {
  display: block;

  color:
    var(--ink);
}

.admin-avance-empty p {
  margin:
    3px 0 0;

  font-size: 13px;
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 760px) {

  .admin-avance-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-avance-hero-stat {
    align-items: flex-start;

    width: 100%;
  }

  .admin-avance-table-head {
    flex-direction: column;
  }
}

/* ==========================================================
   SIDEBAR
   ========================================================== */

.sidebar-mobile-toggle,
.mobile-sidebar-header,
.sidebar-mobile-backdrop {
  display: none;
}


/* ==========================================================
   CONTENEDOR
   ========================================================== */

.sidebar {
  position: sticky;
  top: 0;

  width: 270px;
  height: 100vh;

  flex: 0 0 270px;

  display: flex;
  flex-direction: column;

  padding: 20px 16px 18px;

  background:
    linear-gradient(180deg,
      var(--onest-blue-900) 0%,
      #002f59 100%);

  color: #fff;

  overflow-y: auto;
  overflow-x: hidden;

  z-index: 100;
}


/* Scrollbar */

.sidebar::-webkit-scrollbar {
  width: 5px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background:
    rgba(255,
      255,
      255,
      0.15);

  border-radius: 99px;
}


/* ==========================================================
   MARCA
   ========================================================== */

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 14px;

  padding:
    4px 6px 22px;

  border-bottom:
    1px solid rgba(255,
      255,
      255,
      0.1);
}

.sidebar-brand-logo {
  width: 76px;
  height: 58px;

  flex: 0 0 auto;

  object-fit: contain;

  padding: 7px;

  background: #fff;

  border-radius: 12px;
}

.sidebar-brand-copy {
  min-width: 0;
}

.sidebar-brand-copy b {
  display: block;

  color: #fff;

  font-family:
    "Montserrat",
    sans-serif;

  font-size: 13px;
  font-weight: 700;

  line-height: 1.25;
}

.sidebar-brand-copy span {
  display: block;

  margin-top: 4px;

  overflow: hidden;

  color:
    rgba(255,
      255,
      255,
      0.52);

  font-size: 10.5px;

  line-height: 1.3;

  text-overflow: ellipsis;
  white-space: nowrap;
}


/* ==========================================================
   USUARIO
   ========================================================== */

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 11px;

  margin-top: 18px;
  padding: 12px;

  background:
    rgba(255,
      255,
      255,
      0.07);

  border:
    1px solid rgba(255,
      255,
      255,
      0.08);

  border-radius:
    12px;
}

.sidebar-user-avatar {
  width: 40px;
  height: 40px;

  display: flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  background:
    rgba(255,
      255,
      255,
      0.12);

  border:
    1px solid rgba(255,
      255,
      255,
      0.15);

  border-radius:
    11px;

  color: #fff;

  font-family:
    "Montserrat",
    sans-serif;

  font-size: 13px;
  font-weight: 800;
}

.sidebar-user-info {
  min-width: 0;
}

.sidebar-user-label {
  display: block;

  margin-bottom: 1px;

  color:
    rgba(255,
      255,
      255,
      0.42);

  font-size: 9px;
  font-weight: 600;

  letter-spacing:
    0.06em;

  text-transform:
    uppercase;
}

.sidebar-user-name {
  display: block;

  overflow: hidden;

  color: #fff;

  font-size: 12.5px;
  font-weight: 600;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-role {
  display: block;

  margin-top: 2px;

  overflow: hidden;

  color:
    rgba(255,
      255,
      255,
      0.55);

  font-size: 10px;

  text-overflow: ellipsis;
  white-space: nowrap;
}


/* ==========================================================
   NAVEGACIÓN
   ========================================================== */

.sidebar-nav {
  display: flex;
  flex-direction: column;

  gap: 4px;

  margin-top: 22px;
}

.sidebar-nav-label {
  padding:
    0 10px 8px;

  color:
    rgba(255,
      255,
      255,
      0.4);

  font-size: 10px;
  font-weight: 600;

  letter-spacing:
    0.09em;

  text-transform:
    uppercase;
}

.sidebar-nav-item {
  position: relative;

  display: flex;
  align-items: center;
  gap: 11px;

  min-height: 43px;

  padding:
    9px 12px;

  color:
    rgba(255,
      255,
      255,
      0.72);

  border:
    1px solid transparent;

  border-radius:
    9px;

  text-decoration: none;

  cursor: pointer;

  transition:
    color 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease;
}

.sidebar-nav-item:hover {
  color: #fff;

  background:
    rgba(255,
      255,
      255,
      0.07);
}

.sidebar-nav-item:active {
  transform:
    scale(0.985);
}


/* Activo */

.sidebar-nav-item.active {
  color: #fff;

  background:
    rgba(255,
      255,
      255,
      0.12);

  border-color:
    rgba(255,
      255,
      255,
      0.08);
}

.sidebar-nav-item.active::before {
  content: "";

  position: absolute;

  left: -1px;
  top: 9px;
  bottom: 9px;

  width: 3px;

  background:
    var(--onest-green-500);

  border-radius:
    0 3px 3px 0;
}


/* Iconos */

.sidebar-nav-icon {
  width: 20px;
  height: 20px;

  display: flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  color:
    rgba(255,
      255,
      255,
      0.55);
}

.sidebar-nav-item:hover .sidebar-nav-icon,
.sidebar-nav-item.active .sidebar-nav-icon {
  color: #fff;
}

.sidebar-nav-icon svg {
  width: 18px;
  height: 18px;

  fill:
    currentColor;
}

.sidebar-nav-text {
  flex: 1;

  min-width: 0;

  overflow: hidden;

  font-size: 13px;
  font-weight: 500;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-active-dot {
  width: 6px;
  height: 6px;

  flex: 0 0 auto;

  background:
    var(--onest-green-500);

  border-radius:
    50%;

  box-shadow:
    0 0 0 3px rgba(57,
      181,
      74,
      0.12);
}


/* ==========================================================
   PARTE INFERIOR
   ========================================================== */

.sidebar-bottom {
  display: flex;
  flex-direction: column;
  gap: 10px;

  margin-top: auto;
  padding-top: 22px;
}

.sidebar-help {
  display: flex;
  align-items: center;
  gap: 12px;

  padding: 12px 14px;

  background:
    rgba(255,
      255,
      255,
      0.04);

  border:
    1px solid rgba(255,
      255,
      255,
      0.07);

  border-radius:
    10px;
}

.sidebar-help-icon {
  width: 34px;
  height: 34px;

  display: flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 34px;

  background:
    rgba(57,
      181,
      74,
      0.15);

  color:
    #78df85;

  border-radius:
    8px;

  font-family:
    "Montserrat",
    sans-serif;

  font-size: 9px;
  font-weight: 800;

  line-height: 1;
}

.sidebar-help>div {
  display: flex;
  flex-direction: column;
  justify-content: center;

  min-height: 34px;
}

.sidebar-help b,
.sidebar-help span {
  display: block;
}

.sidebar-help b {
  color:
    rgba(255,
      255,
      255,
      0.82);

  font-size: 10.5px;
}

.sidebar-help span {
  margin-top: 2px;

  color:
    rgba(255,
      255,
      255,
      0.4);

  font-size: 9.5px;
}


/* Cerrar sesión */

.sidebar-logout {
  width: 100%;
  height: 40px;

  display: flex;
  align-items: center;
  justify-content: flex-start;

  gap: 10px;

  padding:
    0 11px;

  background:
    transparent;

  color:
    rgba(255,
      255,
      255,
      0.66);

  border:
    1px solid rgba(255,
      255,
      255,
      0.1);

  border-radius:
    9px;

  cursor: pointer;

  font-size: 12px;
  font-weight: 500;

  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.sidebar-logout:hover {
  background:
    rgba(217,
      45,
      32,
      0.14);

  color:
    #fff;
}

.sidebar-logout svg {
  width: 17px;
  height: 17px;

  fill:
    currentColor;
}


/* ==========================================================
   TABLET
   ========================================================== */

@media (max-width: 1050px) {

  .sidebar {
    width: 235px;
    flex-basis: 235px;
  }

  .main {
    padding:
      28px 28px 60px;
  }

}


/* ==========================================================
   MÓVIL
   ========================================================== */

@media (max-width: 820px) {

  /*
   * Shell vuelve a columna,
   * ya que usamos header móvil.
   */

  .shell {
    display: block;
  }


  /*
   * Barra móvil
   */

  .mobile-sidebar-header {
    position: sticky;

    top: 0;

    z-index: 900;

    height: 66px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding:
      10px 16px;

    background:
      var(--onest-blue-900);

    box-shadow:
      0 3px 12px rgba(15,
        23,
        42,
        0.15);
  }

  .mobile-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;

    min-width: 0;
  }

  .mobile-sidebar-brand img {
    width: 58px;
    height: 46px;

    object-fit: contain;

    padding: 5px;

    background: #fff;

    border-radius: 8px;
  }

  .mobile-sidebar-brand div {
    min-width: 0;
  }

  .mobile-sidebar-brand b {
    display: block;

    overflow: hidden;

    color: #fff;

    font-family:
      "Montserrat",
      sans-serif;

    font-size: 12px;

    text-overflow:
      ellipsis;

    white-space:
      nowrap;
  }

  .mobile-sidebar-brand span {
    display: block;

    margin-top: 1px;

    color:
      rgba(255,
        255,
        255,
        0.55);

    font-size: 10px;
  }


  /*
   * Hamburguesa
   */

  .sidebar-mobile-button {
    width: 42px;
    height: 42px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 5px;

    flex: 0 0 auto;

    border:
      1px solid rgba(255,
        255,
        255,
        0.14);

    border-radius:
      9px;

    cursor: pointer;
  }

  .sidebar-mobile-button span {
    width: 18px;
    height: 2px;

    display: block;

    background: #fff;

    border-radius:
      99px;

    transition:
      transform 0.2s ease,
      opacity 0.2s ease;
  }


  /*
   * Sidebar móvil
   */

  .sidebar {
    position: fixed;

    top: 0;
    left: 0;

    z-index: 1100;

    width: min(84vw,
        310px);

    height: 100dvh;

    padding:
      18px 15px;

    transform:
      translateX(-105%);

    transition:
      transform 0.24s ease;

    box-shadow:
      14px 0 36px rgba(15,
        23,
        42,
        0.2);
  }


  /*
   * Backdrop
   */

  .sidebar-mobile-backdrop {
    position: fixed;

    inset: 0;

    z-index: 1000;

    display: block;

    background:
      rgba(15,
        23,
        42,
        0.52);

    backdrop-filter:
      blur(2px);

    opacity: 0;

    visibility: hidden;

    cursor: pointer;

    transition:
      opacity 0.2s ease,
      visibility 0.2s ease;
  }


  /*
   * Abrir
   */

  .sidebar-mobile-toggle:checked~.sidebar-mobile-backdrop {
    opacity: 1;

    visibility:
      visible;
  }

  .sidebar-mobile-toggle:checked~.sidebar {
    transform:
      translateX(0);
  }


  /*
   * Hamburguesa animada
   */

  .sidebar-mobile-toggle:checked~.mobile-sidebar-header .sidebar-mobile-button span:nth-child(1) {
    transform:
      translateY(7px) rotate(45deg);
  }

  .sidebar-mobile-toggle:checked~.mobile-sidebar-header .sidebar-mobile-button span:nth-child(2) {
    opacity: 0;
  }

  .sidebar-mobile-toggle:checked~.mobile-sidebar-header .sidebar-mobile-button span:nth-child(3) {
    transform:
      translateY(-7px) rotate(-45deg);
  }


  /*
   * Contenido
   */

  .main {
    width: 100%;

    max-width: none;

    padding:
      22px 18px 50px;
  }

}


/* ==========================================================
   MÓVILES PEQUEÑOS
   ========================================================== */

@media (max-width: 480px) {

  .sidebar {
    width: min(88vw,
        300px);
  }

  .mobile-sidebar-header {
    height: 62px;

    padding:
      9px 12px;
  }

  .mobile-sidebar-brand img {
    width: 52px;
    height: 42px;
  }

  .mobile-sidebar-brand b {
    font-size: 11.5px;
  }

  .main {
    padding:
      18px 14px 44px;
  }

}

/* ==========================================================
   ADMIN - INSTRUCTORES
   ========================================================== */

.admin-staff-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;

  margin-bottom: 24px;
  padding: 28px;

  background:
    linear-gradient(135deg,
      var(--onest-blue-900),
      var(--onest-blue-700));

  color: #fff;

  border-radius:
    var(--radius-lg);

  box-shadow:
    0 12px 30px rgba(0, 62, 117, 0.15);
}

.admin-staff-hero .eyebrow,
.admin-staff-hero .lede {
  color:
    rgba(255,
      255,
      255,
      0.74);
}

.admin-staff-hero .page-title {
  color: #fff;
}

.admin-staff-hero-stat {
  min-width: 145px;

  display: flex;
  flex-direction: column;
  align-items: flex-end;

  padding: 14px 18px;

  background:
    rgba(255,
      255,
      255,
      0.1);

  border:
    1px solid rgba(255,
      255,
      255,
      0.18);

  border-radius:
    var(--radius-lg);
}

.admin-staff-hero-label,
.admin-staff-hero-caption {
  color:
    rgba(255,
      255,
      255,
      0.7);

  font-size: 11px;
}

.admin-staff-hero-stat strong {
  font-family:
    "Montserrat",
    sans-serif;

  font-size: 32px;
  line-height: 1.1;
}


/* ==========================================================
   FORMULARIO
   ========================================================== */

.admin-staff-form-card {
  margin-bottom: 22px;
}

.admin-staff-section-head {
  margin-bottom: 20px;
}

.admin-staff-section-title {
  margin: 0 0 4px;

  font-size: 19px;
}

.admin-staff-block {
  padding: 20px;

  background:
    var(--surface-2);

  border:
    1px solid var(--border);

  border-radius:
    var(--radius-lg);
}

.admin-staff-block-head {
  display: flex;
  align-items: center;
  gap: 12px;

  margin-bottom: 18px;
}

.admin-staff-block-head b,
.admin-staff-block-head span {
  display: block;
}

.admin-staff-block-head b {
  font-size: 14px;
}

.admin-staff-step {
  width: 32px;
  height: 32px;

  display: flex !important;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  background:
    var(--onest-blue-700);

  color: #fff;

  border-radius:
    9px;

  font-family:
    "Montserrat",
    sans-serif;

  font-size: 12px;
  font-weight: 800;
}


/* ==========================================================
   DC-5
   ========================================================== */

.admin-staff-file-box {
  display: flex;
  align-items: center;
  gap: 16px;

  padding: 16px;

  background:
    var(--surface);

  border:
    1px dashed var(--gray-300);

  border-radius:
    var(--radius-lg);
}

.admin-staff-file-icon {
  width: 52px;
  height: 52px;

  display: flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  background:
    var(--danger-bg);

  color:
    var(--danger);

  border-radius:
    12px;

  font-family:
    "Montserrat",
    sans-serif;

  font-size: 11px;
  font-weight: 800;
}

.admin-staff-file-field {
  flex: 1;

  min-width: 0;
}


/* ==========================================================
   CURSOS
   ========================================================== */

.admin-staff-course-editor {
  padding: 18px;

  background:
    var(--surface);

  border:
    1px solid var(--border);

  border-radius:
    var(--radius-lg);
}

.admin-staff-course-actions {
  margin-top: 14px;
}

.admin-staff-course-list-wrap {
  margin-top: 18px;
}

.admin-staff-course-list-head {
  margin-bottom: 10px;
}

.admin-staff-course-list-head b,
.admin-staff-course-list-head span {
  display: block;
}

.admin-staff-submit {
  display: flex;
  justify-content: flex-end;

  padding-top: 4px;
}


/* ==========================================================
   TABLA
   ========================================================== */

.admin-staff-table-card {
  overflow: hidden;
}

.admin-staff-table-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  gap: 16px;

  padding: 20px 24px;

  border-bottom:
    1px solid var(--border);
}

.admin-staff-count {
  padding: 6px 10px;

  background:
    var(--surface-2);

  color:
    var(--gray-700);

  border-radius:
    999px;

  font-size: 12px;
  font-weight: 600;
}

.admin-staff-course-count {
  display: inline-flex;

  padding: 5px 8px;

  background:
    var(--onest-blue-100);

  color:
    var(--onest-blue-700);

  border-radius:
    var(--radius-sm);

  font-size: 11.5px;
  font-weight: 600;
}

.admin-staff-table th,
.admin-staff-table td {
  vertical-align: middle;
}


/* ==========================================================
   VACÍO
   ========================================================== */

.admin-staff-empty {
  display: flex;
  align-items: center;
  gap: 14px;

  padding: 22px;

  background:
    var(--surface);

  border:
    1px dashed var(--border);

  border-radius:
    var(--radius-lg);

  color:
    var(--muted);
}

.admin-staff-empty-icon {
  width: 42px;
  height: 42px;

  display: flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  background:
    var(--onest-blue-100);

  color:
    var(--onest-blue-700);

  border-radius:
    50%;

  font-weight: 800;
}

.admin-staff-empty b {
  display: block;

  color:
    var(--ink);
}

.admin-staff-empty p {
  margin:
    3px 0 0;

  font-size: 13px;
}


/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 760px) {

  .admin-staff-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-staff-hero-stat {
    align-items: flex-start;

    width: 100%;
  }

  .admin-staff-file-box {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-staff-table-head {
    flex-direction: column;
  }

  .admin-staff-submit .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================
   ADMIN - MÉTRICAS
   ========================================================== */

.admin-metricas-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;

  margin-bottom: 24px;
  padding: 28px;

  background:
    linear-gradient(135deg,
      var(--onest-blue-900),
      var(--onest-blue-700));

  color: #fff;

  border-radius:
    var(--radius-lg);

  box-shadow:
    0 12px 30px rgba(0, 62, 117, 0.15);
}

.admin-metricas-hero .eyebrow,
.admin-metricas-hero .lede {
  color:
    rgba(255,
      255,
      255,
      0.74);
}

.admin-metricas-hero .page-title {
  color: #fff;
}


/* ==========================================================
   RESUMEN HERO
   ========================================================== */

.admin-metricas-hero-summary {
  display: grid;

  grid-template-columns:
    repeat(3, auto);

  gap: 10px;
}

.admin-metricas-hero-summary>div {
  min-width: 82px;

  padding: 11px 13px;

  background:
    rgba(255,
      255,
      255,
      0.1);

  border:
    1px solid rgba(255,
      255,
      255,
      0.18);

  border-radius:
    var(--radius-lg);
}

.admin-metricas-summary-label {
  display: block;

  color:
    rgba(255,
      255,
      255,
      0.68);

  font-size: 10px;
}

.admin-metricas-hero-summary strong {
  display: block;

  margin-top: 2px;

  font-family:
    "Montserrat",
    sans-serif;

  font-size: 22px;
}


/* ==========================================================
   SECCIONES
   ========================================================== */

.admin-metricas-section {
  margin-bottom: 20px;

  overflow: hidden;
}

.admin-metricas-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  gap: 16px;

  padding: 20px 24px;

  border-bottom:
    1px solid var(--border);
}

.admin-metricas-section-title {
  margin: 0 0 4px;

  font-size: 19px;
}

.admin-metricas-pill {
  padding: 6px 10px;

  background:
    var(--surface-2);

  color:
    var(--gray-700);

  border-radius:
    999px;

  font-size: 12px;
  font-weight: 600;
}


/* ==========================================================
   TABLAS
   ========================================================== */

.admin-metricas-table th,
.admin-metricas-table td {
  vertical-align: middle;
}

.admin-metricas-table td:first-child {
  min-width: 220px;
}


/* ==========================================================
   TASA DE CERTIFICACIÓN
   ========================================================== */

.admin-metricas-rate {
  min-width: 150px;
}

.admin-metricas-rate strong {
  display: block;

  margin-bottom: 6px;

  color:
    var(--onest-blue-700);

  font-size: 12.5px;
}

.admin-metricas-rate .barh-track {
  height: 6px;
}

.admin-metricas-rate-bar {
  background:
    linear-gradient(90deg,
      var(--onest-blue-500),
      var(--onest-green-500));
}


/* ==========================================================
   ESTADO VACÍO
   ========================================================== */

.admin-metricas-empty {
  margin: 20px 24px;
}


/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 800px) {

  .admin-metricas-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-metricas-hero-summary {
    width: 100%;

    grid-template-columns:
      repeat(3, 1fr);
  }

  .admin-metricas-section-head {
    flex-direction: column;
  }
}

@media (max-width: 520px) {

  .admin-metricas-hero-summary {
    grid-template-columns:
      1fr;
  }
}

/* ==========================================================
   EMISIÓN POR LOTE
   ========================================================== */

.emision-lote-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;

  margin-bottom: 24px;
  padding: 28px;

  background:
    linear-gradient(135deg,
      var(--onest-blue-900),
      var(--onest-blue-700));

  color: #fff;

  border-radius:
    var(--radius-lg);

  box-shadow:
    0 12px 30px rgba(0, 62, 117, 0.15);
}

.emision-lote-hero .eyebrow,
.emision-lote-hero .lede {
  color:
    rgba(255,
      255,
      255,
      0.74);
}

.emision-lote-hero .page-title {
  color: #fff;
}

.emision-lote-hero-stat {
  min-width: 145px;

  display: flex;
  flex-direction: column;
  align-items: flex-end;

  padding: 14px 18px;

  background:
    rgba(255,
      255,
      255,
      0.1);

  border:
    1px solid rgba(255,
      255,
      255,
      0.18);

  border-radius:
    var(--radius-lg);
}

.emision-lote-hero-label,
.emision-lote-hero-caption {
  color:
    rgba(255,
      255,
      255,
      0.7);

  font-size: 11px;
}

.emision-lote-hero-stat strong {
  font-family:
    "Montserrat",
    sans-serif;

  font-size: 32px;
  line-height: 1.1;
}

/* ==========================================================
   FILTROS DE EMISIÓN POR LOTE
   ========================================================== */

.emision-lote-filters {
  align-items: start;
}

.emision-lote-filters .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.emision-lote-filters .field label,
.emision-lote-filters .searchable-select label {
  display: block;
  margin: 0;
  line-height: 20px;
}

.emision-lote-filters .searchable-control {
  width: 100%;
  height: 44px;
}

.emision-lote-filters .searchable-control input {
  width: 100%;
  height: 44px;
}


/* ==========================================================
   ACCIONES Y CONTADOR
   ========================================================== */

.emision-lote-filter-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;

  margin-top: 20px;
  padding-top: 18px;

  border-top: 1px solid var(--border);
}

.emision-lote-filter-info {
  display: flex;
  align-items: center;
  gap: 8px;

  color: var(--muted);
  font-size: 12px;
}

.emision-lote-selection-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}


/* ==========================================================
   OCULTAR FILAS FILTRADAS
   ========================================================== */

.emision-lote-table tr[hidden] {
  display: none !important;
}


/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 1000px) {

  .emision-lote-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .emision-lote-filters .field:first-child {
    grid-column: 1 / -1;
  }

}

@media (max-width: 700px) {

  .emision-lote-filters {
    grid-template-columns: 1fr;
  }

  .emision-lote-filters .field:first-child {
    grid-column: auto;
  }

  .emision-lote-filter-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .emision-lote-selection-actions {
    flex-direction: column;
  }

  .emision-lote-selection-actions .btn {
    width: 100%;
    justify-content: center;
  }

}


/* ==========================================================
   SECCIONES
   ========================================================== */

.emision-lote-config-card,
.emision-lote-search-card {
  margin-bottom: 20px;
}

.emision-lote-section-head {
  display: flex;
  align-items: center;
  gap: 12px;

  margin-bottom: 18px;
}

.emision-lote-step {
  width: 32px;
  height: 32px;

  display: flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  background:
    var(--onest-blue-700);

  color: #fff;

  border-radius:
    9px;

  font-family:
    "Montserrat",
    sans-serif;

  font-size: 12px;
  font-weight: 800;
}

.emision-lote-section-title {
  margin: 0 0 4px;

  font-size: 18px;
}


/* ==========================================================
   CONFIGURACIÓN
   ========================================================== */

.emision-lote-config {
  display: grid;

  grid-template-columns:
    minmax(0, 2fr) minmax(220px, 1fr);

  gap: 16px;
}


/* ==========================================================
   BUSCADOR
   ========================================================== */

.emision-lote-search-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;

  gap: 16px;
}

.emision-lote-search-field {
  flex: 1;

  max-width: 520px;
}

.emision-lote-selection-actions {
  display: flex;
  gap: 10px;

  flex-wrap: wrap;
}

/* ==========================================================
   EMISIÓN POR LOTE - FILTROS
   ========================================================== */

.emision-lote-search-card {
  margin-bottom: 20px;
  overflow: visible;
}

.emision-lote-filters {
  display: grid;
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
  overflow: visible;
}

.emision-lote-filters .field {
  min-width: 0;
}

.emision-lote-filters .searchable-control {
  width: 100%;
}

.emision-lote-filters .searchable-control input {
  width: 100%;
}

/* Mantener el menú por encima de los demás campos */

.emision-lote-filters .searchable-select {
  position: relative;
}

.emision-lote-filters .searchable-select:focus-within {
  z-index: 30;
}

.emision-lote-filters .searchable-menu {
  z-index: 40;
}

/* Contador y botones */

.emision-lote-filter-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;

  margin-top: 22px;
  padding-top: 18px;

  border-top: 1px solid var(--border);
}

.emision-lote-filter-info {
  color: var(--muted);
  font-size: 12px;
}

.emision-lote-selection-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

/* Filas ocultas */

.emision-lote-table tr[hidden] {
  display: none !important;
}

/* Responsive */

@media (max-width: 900px) {
  .emision-lote-filters {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .emision-lote-filter-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .emision-lote-selection-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .emision-lote-selection-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================
   TABLA
   ========================================================== */

.emision-lote-table-card {
  overflow: hidden;

  margin-bottom: 16px;
}

.emision-lote-table-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  gap: 16px;

  padding: 20px 24px;

  border-bottom:
    1px solid var(--border);
}

.emision-lote-count {
  padding: 6px 10px;

  background:
    var(--surface-2);

  color:
    var(--gray-700);

  border-radius:
    999px;

  font-size: 12px;
  font-weight: 600;
}

.emision-lote-table th,
.emision-lote-table td {
  vertical-align: middle;
}


/* ==========================================================
   BARRA DE ACCIÓN
   ========================================================== */

.emision-lote-action-bar {
  bottom: 12px;

  border:
    1px solid rgba(0,
      84,
      158,
      0.12);

  box-shadow:
    0 -4px 18px rgba(15,
      23,
      42,
      0.08);
}

.emision-lote-action-content {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 18px;
}

.emision-lote-action-content>div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.emision-lote-action-label {
  color:
    var(--muted);

  font-size: 11px;
}

.emision-lote-submit {
  min-width: 180px;

  justify-content: center;
}


/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 800px) {

  .emision-lote-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .emision-lote-hero-stat {
    width: 100%;

    align-items: flex-start;
  }

  .emision-lote-config {
    grid-template-columns:
      1fr;
  }

  .emision-lote-search-row {
    align-items: stretch;
    flex-direction: column;
  }

  .emision-lote-search-field {
    max-width: none;
  }

  .emision-lote-selection-actions {
    width: 100%;
  }

  .emision-lote-action-content {
    align-items: stretch;
    flex-direction: column;
  }

  .emision-lote-submit {
    width: 100%;
  }
}

/* ==========================================================
   IMPRESIÓN POR LOTE
   ========================================================== */

.print-lote-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;

  margin-bottom: 20px;
  padding: 28px;

  background:
    linear-gradient(135deg,
      var(--onest-blue-900),
      var(--onest-blue-700));

  color: #fff;

  border-radius:
    var(--radius-lg);

  box-shadow:
    0 12px 30px rgba(0, 62, 117, 0.15);
}

.print-lote-hero .eyebrow,
.print-lote-hero .lede {
  color:
    rgba(255,
      255,
      255,
      0.74);
}

.print-lote-hero .page-title {
  color: #fff;
}

.print-lote-hero-stat {
  min-width: 145px;

  display: flex;
  flex-direction: column;
  align-items: flex-end;

  padding: 14px 18px;

  background:
    rgba(255,
      255,
      255,
      0.1);

  border:
    1px solid rgba(255,
      255,
      255,
      0.18);

  border-radius:
    var(--radius-lg);
}

.print-lote-hero-label,
.print-lote-hero-caption {
  color:
    rgba(255,
      255,
      255,
      0.7);

  font-size: 11px;
}

.print-lote-hero-stat strong {
  font-family:
    "Montserrat",
    sans-serif;

  font-size: 32px;
  line-height: 1.1;
}


/* ==========================================================
   ACCIONES
   ========================================================== */

.print-lote-actions {
  position: sticky;
  top: 12px;

  z-index: 20;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 20px;

  margin-bottom: 24px;

  box-shadow:
    0 10px 26px rgba(15, 23, 42, 0.08);
}

.print-lote-actions-copy {
  min-width: 0;
}

.print-lote-actions-title {
  margin: 0 0 4px;

  font-size: 18px;
}

.print-lote-buttons {
  display: flex;
  gap: 10px;

  flex: 0 0 auto;
}


/* ==========================================================
   ENCABEZADO DE PREVISUALIZACIÓN
   ========================================================== */

.print-lote-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  gap: 16px;

  margin-bottom: 14px;
}

.print-lote-preview-title {
  margin: 0;

  font-size: 18px;
}

.print-lote-count {
  padding: 6px 10px;

  background:
    var(--surface-2);

  color:
    var(--gray-700);

  border-radius:
    999px;

  font-size: 12px;
  font-weight: 600;
}


/* ==========================================================
   DOCUMENTOS
   ========================================================== */

.print-lote-documents {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.print-lote-documents .cert-page {
  padding: 22px;

  background:
    var(--surface);

  border:
    1px solid var(--border);

  border-radius:
    var(--radius-lg);

  box-shadow:
    var(--shadow);
}

.print-lote-documents .cert-page::before {
  margin-bottom: 14px;

  color:
    var(--onest-blue-700);
}


/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 760px) {

  .print-lote-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .print-lote-hero-stat {
    width: 100%;

    align-items: flex-start;
  }

  .print-lote-actions {
    position: static;

    align-items: stretch;
    flex-direction: column;
  }

  .print-lote-buttons {
    width: 100%;

    flex-direction: column;
  }

  .print-lote-buttons .btn {
    width: 100%;

    justify-content: center;
  }

  .print-lote-preview-head {
    flex-direction: column;
  }

  .print-lote-documents .cert-page {
    padding: 12px;
  }
}

/* ==========================================================
   TRABAJADOR
   ========================================================== */

.trabajador-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;

  margin-bottom: 20px;
  padding: 26px 28px;

  background:
    linear-gradient(135deg,
      var(--onest-blue-900),
      var(--onest-blue-700));

  color: #fff;

  border-radius:
    var(--radius-lg);

  box-shadow:
    0 12px 30px rgba(0, 62, 117, 0.15);
}

.trabajador-hero-main {
  display: flex;
  align-items: center;
  gap: 18px;

  min-width: 0;
}

.trabajador-hero .eyebrow,
.trabajador-hero .lede {
  color:
    rgba(255,
      255,
      255,
      0.72);
}

.trabajador-hero .page-title {
  color: #fff;
}

.trabajador-avatar {
  width: 68px;
  height: 68px;

  display: flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  background:
    rgba(255,
      255,
      255,
      0.14);

  border:
    1px solid rgba(255,
      255,
      255,
      0.2);

  border-radius:
    18px;

  font-family:
    "Montserrat",
    sans-serif;

  font-size: 20px;
  font-weight: 800;
}

.trabajador-hero-badge {
  min-width: 165px;

  display: flex;
  flex-direction: column;
  align-items: flex-end;

  padding: 14px 18px;

  background:
    rgba(255,
      255,
      255,
      0.1);

  border:
    1px solid rgba(255,
      255,
      255,
      0.18);

  border-radius:
    var(--radius-lg);
}

.trabajador-hero-badge-label,
.trabajador-hero-badge-caption {
  color:
    rgba(255,
      255,
      255,
      0.7);

  font-size: 11px;
}

.trabajador-hero-badge strong {
  margin: 3px 0;

  font-family:
    "Montserrat",
    sans-serif;

  font-size: 28px;
}


/* ==========================================================
   DATOS GENERALES
   ========================================================== */

.trabajador-info-grid {
  display: grid;

  grid-template-columns:
    repeat(4,
      minmax(0, 1fr));

  gap: 14px;

  margin-bottom: 20px;
}

.trabajador-info-card {
  padding: 16px;

  background:
    var(--surface);

  border:
    1px solid var(--border);

  border-radius:
    var(--radius-lg);

  box-shadow:
    var(--shadow);
}

.trabajador-info-label {
  display: block;

  margin-bottom: 6px;

  color:
    var(--muted);

  font-size: 11px;
}

.trabajador-info-card strong {
  display: block;

  overflow-wrap: anywhere;

  font-size: 13px;
}


/* ==========================================================
   RESUMEN
   ========================================================== */

.trabajador-stats {
  display: grid;

  grid-template-columns:
    repeat(3,
      minmax(0, 1fr));

  gap: 14px;

  margin-bottom: 26px;
}

.trabajador-course-list {
  display: flex;
  flex-direction: column;

  gap: 16px;
}

.trabajador-course-card {
  padding: 20px;

  background:
    var(--surface);

  border:
    1px solid var(--border);

  border-radius:
    var(--radius-lg);

  box-shadow:
    var(--shadow);
}

.trabajador-course-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  gap: 18px;

  margin-bottom: 16px;
}

.trabajador-stat {
  padding: 18px;

  background:
    var(--surface);

  border:
    1px solid var(--border);

  border-top:
    3px solid var(--gray-300);

  border-radius:
    var(--radius-lg);

  box-shadow:
    var(--shadow);
}

.trabajador-stat--primary {
  border-top-color:
    var(--info);
}

.trabajador-stat--warning {
  border-top-color:
    var(--warning);
}

.trabajador-stat--danger {
  border-top-color:
    var(--danger);
}

.trabajador-stat-label {
  display: block;

  color:
    var(--muted);

  font-size: 11.5px;
}

.trabajador-stat strong {
  display: block;

  margin-top: 4px;

  font-family:
    "Montserrat",
    sans-serif;

  font-size: 28px;
}

.trabajador-stat--warning strong {
  color:
    var(--warning);
}

.trabajador-stat--danger strong {
  color:
    var(--danger);
}

.trabajador-stat-caption {
  display: block;

  margin-top: 4px;

  color:
    var(--gray-500);

  font-size: 11px;
}


/* ==========================================================
   CABECERA DE CURSOS
   ========================================================== */

.trabajador-course-grid {
  display: grid;

  grid-template-columns:
    repeat(3,
      minmax(0, 1fr));

  gap: 14px;

  padding: 16px;

  background:
    var(--surface-2);

  border-radius:
    var(--radius-md);
}

.trabajador-courses-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  gap: 16px;

  margin-bottom: 16px;
}

.trabajador-courses-title {
  margin: 0;

  font-size: 21px;
}

.trabajador-course-count {
  padding: 6px 10px;

  background:
    var(--surface-2);

  color:
    var(--gray-700);

  border-radius:
    999px;

  font-size: 12px;
  font-weight: 600;
}


/* ==========================================================
   CURSOS
   ========================================================== */

.trabajador-course-code {
  display: block;

  margin-bottom: 4px;

  color:
    var(--muted);

  font-size: 11px;
}

.trabajador-course-title {
  margin: 0;

  font-size: 17px;
  line-height: 1.35;
}

.trabajador-course-status {
  flex: 0 0 auto;
}


/* ==========================================================
   DETALLE DEL CURSO
   ========================================================== */

.trabajador-course-field {
  min-width: 0;
}

.trabajador-course-field-label {
  display: block;

  margin-bottom: 5px;

  color:
    var(--muted);

  font-size: 10.5px;
}

.trabajador-course-field strong {
  display: block;

  overflow-wrap: anywhere;

  font-size: 12.5px;
}

.trabajador-course-vigencia {
  min-height: 24px;

  display: flex;
  align-items: center;
}


/* ==========================================================
   ACCIONES
   ========================================================== */

.trabajador-course-actions {
  display: flex;
  gap: 10px;

  margin-top: 16px;

  flex-wrap: wrap;
}


/* ==========================================================
   VACÍO
   ========================================================== */

.trabajador-empty {
  display: flex;
  align-items: center;
  gap: 14px;

  padding: 22px;

  background:
    var(--surface);

  border:
    1px dashed var(--border);

  border-radius:
    var(--radius-lg);

  color:
    var(--muted);
}

.trabajador-empty-icon {
  width: 42px;
  height: 42px;

  display: flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  background:
    var(--onest-blue-100);

  color:
    var(--onest-blue-700);

  border-radius:
    50%;

  font-weight: 800;
}

.trabajador-empty b {
  display: block;

  color:
    var(--ink);
}

.trabajador-empty p {
  margin:
    3px 0 0;

  font-size: 13px;
}


/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 900px) {

  .trabajador-info-grid {
    grid-template-columns:
      repeat(2,
        minmax(0, 1fr));
  }

  .trabajador-course-grid {
    grid-template-columns:
      repeat(2,
        minmax(0, 1fr));
  }
}

@media (max-width: 700px) {

  .trabajador-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .trabajador-hero-main {
    align-items: flex-start;
  }

  .trabajador-hero-badge {
    width: 100%;

    align-items: flex-start;
  }

  .trabajador-info-grid,
  .trabajador-stats,
  .trabajador-course-grid {
    grid-template-columns:
      1fr;
  }

  .trabajador-courses-head {
    flex-direction: column;
  }

  .trabajador-course-head {
    flex-direction: column;
  }

  .trabajador-course-actions {
    flex-direction: column;
  }

  .trabajador-course-actions .btn {
    width: 100%;

    justify-content: center;
  }
}

/* ==========================================================
   CONSTANCIAS
   ========================================================== */

.constancias-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;

  margin-bottom: 20px;
  padding: 28px;

  background:
    linear-gradient(135deg,
      var(--onest-blue-900),
      var(--onest-blue-700));

  color: #fff;

  border-radius:
    var(--radius-lg);

  box-shadow:
    0 12px 30px rgba(0, 62, 117, 0.15);
}

.constancias-hero .eyebrow,
.constancias-hero .lede {
  color:
    rgba(255,
      255,
      255,
      0.74);
}

.constancias-hero .page-title {
  color: #fff;
}

.constancias-hero-stat {
  min-width: 145px;

  display: flex;
  flex-direction: column;
  align-items: flex-end;

  padding: 14px 18px;

  background:
    rgba(255,
      255,
      255,
      0.1);

  border:
    1px solid rgba(255,
      255,
      255,
      0.18);

  border-radius:
    var(--radius-lg);
}

.constancias-hero-label,
.constancias-hero-caption {
  color:
    rgba(255,
      255,
      255,
      0.7);

  font-size: 11px;
}

.constancias-hero-stat strong {
  font-family:
    "Montserrat",
    sans-serif;

  font-size: 32px;
  line-height: 1.1;
}


/* ==========================================================
   TOOLBAR
   ========================================================== */

.constancias-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 20px;

  margin-bottom: 20px;
}

.constancias-toolbar-title {
  margin: 0 0 4px;

  font-size: 18px;
}

.constancias-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;

  flex-wrap: wrap;

  flex: 0 0 auto;
}


/* ==========================================================
   TABLA
   ========================================================== */

.constancias-table-card {
  overflow: hidden;
}

.constancias-table-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  gap: 16px;

  padding: 20px 24px;

  border-bottom:
    1px solid var(--border);
}

.constancias-table-title {
  margin: 0;

  font-size: 18px;
}

.constancias-count {
  padding: 6px 10px;

  background:
    var(--surface-2);

  color:
    var(--gray-700);

  border-radius:
    999px;

  font-size: 12px;
  font-weight: 600;
}

.constancias-table th,
.constancias-table td {
  vertical-align: middle;
}

.constancias-folio {
  color:
    var(--onest-blue-700);

  font-size: 12px;
  font-weight: 600;
}

.constancias-actions,
.constancias-actions-head {
  text-align: right;

  white-space: nowrap;
}


/* ==========================================================
   VACÍO
   ========================================================== */

.constancias-empty {
  display: flex;
  align-items: center;
  gap: 16px;

  padding: 24px;

  background:
    var(--surface);

  border:
    1px dashed var(--border);

  border-radius:
    var(--radius-lg);

  color:
    var(--muted);
}

.constancias-empty-icon {
  width: 48px;
  height: 48px;

  display: flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  background:
    var(--onest-blue-100);

  color:
    var(--onest-blue-700);

  border-radius:
    12px;

  font-family:
    "Montserrat",
    sans-serif;

  font-size: 10px;
  font-weight: 800;
}

.constancias-empty b {
  display: block;

  color:
    var(--ink);

  margin-bottom: 4px;
}

.constancias-empty p {
  margin:
    0 0 12px;

  font-size: 13px;
}


/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 800px) {

  .constancias-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .constancias-hero-stat {
    width: 100%;

    align-items: flex-start;
  }

  .constancias-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .constancias-toolbar-actions {
    width: 100%;
  }

  .constancias-table-head {
    flex-direction: column;
  }
}

@media (max-width: 560px) {

  .constancias-toolbar-actions {
    flex-direction: column;
  }

  .constancias-toolbar-actions .btn {
    width: 100%;

    justify-content: center;
  }

  .constancias-empty {
    align-items: flex-start;
  }
}

/* ==========================================================
   DETALLE DE CONSTANCIA
   ========================================================== */

.constancia-detail-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;

  margin-bottom: 20px;
  padding: 28px;

  background:
    linear-gradient(135deg,
      var(--onest-blue-900),
      var(--onest-blue-700));

  color: #fff;

  border-radius:
    var(--radius-lg);

  box-shadow:
    0 12px 30px rgba(0, 62, 117, 0.15);
}

.constancia-detail-hero .eyebrow,
.constancia-detail-hero .lede {
  color:
    rgba(255,
      255,
      255,
      0.74);
}

.constancia-detail-hero .page-title {
  color: #fff;
}

.constancia-detail-hero-stat {
  min-width: 190px;

  display: flex;
  flex-direction: column;
  align-items: flex-end;

  padding: 14px 18px;

  background:
    rgba(255,
      255,
      255,
      0.1);

  border:
    1px solid rgba(255,
      255,
      255,
      0.18);

  border-radius:
    var(--radius-lg);
}

.constancia-detail-hero-label,
.constancia-detail-hero-caption {
  color:
    rgba(255,
      255,
      255,
      0.7);

  font-size: 11px;
}

.constancia-detail-hero-stat strong {
  display: block;

  max-width: 240px;

  margin: 3px 0;

  overflow-wrap: anywhere;

  font-size: 14px;
}


/* ==========================================================
   TOOLBAR
   ========================================================== */

.constancia-detail-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 20px;

  margin-bottom: 24px;
}

.constancia-detail-info {
  display: grid;

  grid-template-columns:
    repeat(3,
      minmax(130px, auto));

  gap: 26px;
}

.constancia-detail-info-label {
  display: block;

  margin-bottom: 4px;

  color:
    var(--muted);

  font-size: 10.5px;
}

.constancia-detail-info strong {
  display: block;

  font-size: 12.5px;
}

.constancia-detail-print {
  flex: 0 0 auto;

  white-space: nowrap;
}


/* ==========================================================
   ENCABEZADO DE PREVIEW
   ========================================================== */

.constancia-detail-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 16px;

  margin-bottom: 14px;
}

.constancia-detail-preview-title {
  margin: 0;

  font-size: 18px;
}

.constancia-detail-status {
  padding: 6px 10px;

  background:
    var(--onest-blue-100);

  color:
    var(--onest-blue-700);

  border-radius:
    var(--radius-sm);

  font-family:
    "Montserrat",
    sans-serif;

  font-size: 10px;
  font-weight: 800;
}


/* ==========================================================
   DOCUMENTO
   ========================================================== */

.constancia-detail-document {
  padding: 22px;

  background:
    var(--surface);

  border:
    1px solid var(--border);

  border-radius:
    var(--radius-lg);

  box-shadow:
    var(--shadow);

  overflow-x: auto;
}


/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 800px) {

  .constancia-detail-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .constancia-detail-hero-stat {
    width: 100%;

    align-items: flex-start;
  }

  .constancia-detail-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .constancia-detail-info {
    grid-template-columns:
      repeat(3,
        minmax(0, 1fr));

    gap: 14px;
  }

  .constancia-detail-print {
    width: 100%;

    justify-content: center;
  }
}

@media (max-width: 600px) {

  .constancia-detail-info {
    grid-template-columns:
      1fr;
  }

  .constancia-detail-preview-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .constancia-detail-document {
    padding: 10px;
  }
}

/* ==========================================================
   LOGIN
   ========================================================== */

.login-wrap {
  min-height: 100vh;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 28px;

  background:
    radial-gradient(circle at top left,
      rgba(22, 119, 189, 0.12),
      transparent 34%),
    var(--paper);
}


/* ==========================================================
   CONTENEDOR
   ========================================================== */

.login-shell {
  width: 100%;
  max-width: 960px;
  min-height: 560px;

  display: grid;

  grid-template-columns:
    minmax(0, 1.05fr) minmax(360px, 0.95fr);

  overflow: hidden;

  background:
    var(--surface);

  border:
    1px solid var(--border);

  border-radius:
    20px;

  box-shadow:
    0 24px 60px rgba(15, 23, 42, 0.12);
}


/* ==========================================================
   PANEL IZQUIERDO
   ========================================================== */

.login-brand-panel {
  display: flex;
  flex-direction: column;

  padding: 34px;

  background:
    linear-gradient(145deg,
      var(--onest-blue-900),
      #002d54);

  color: #fff;
}

.login-brand-top {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 16px;
}

.login-logo-box {
  width: 165px;
  height: 78px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 10px 14px;

  background: #fff;

  border-radius: 14px;
}

.login-logo-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.login-brand-tag {
  padding:
    6px 10px;

  background:
    rgba(255,
      255,
      255,
      0.1);

  color:
    rgba(255,
      255,
      255,
      0.78);

  border:
    1px solid rgba(255,
      255,
      255,
      0.14);

  border-radius:
    999px;

  font-size: 10.5px;
  font-weight: 600;

  text-transform:
    uppercase;

  letter-spacing:
    0.06em;
}

.login-brand-content {
  margin-top: auto;
  margin-bottom: auto;
}

.login-brand-eyebrow {
  margin:
    0 0 8px;

  color:
    rgba(255,
      255,
      255,
      0.6);

  font-size: 11px;
  font-weight: 600;

  text-transform:
    uppercase;

  letter-spacing:
    0.08em;
}

.login-brand-content h1 {
  margin: 0;

  color: #fff;

  font-size: 38px;
  line-height: 1.08;
}

.login-brand-content p {
  max-width: 420px;

  margin:
    14px 0 0;

  color:
    rgba(255,
      255,
      255,
      0.7);

  font-size: 14px;
  line-height: 1.6;
}

.login-brand-footer {
  display: flex;
  align-items: center;

  gap: 12px;

  padding-top: 20px;

  border-top:
    1px solid rgba(255,
      255,
      255,
      0.1);
}

.login-brand-badge {
  width: 42px;
  height: 42px;

  display: flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;

  background:
    rgba(57,
      181,
      74,
      0.14);

  color:
    #7be287;

  border-radius:
    10px;

  font-family:
    "Montserrat",
    sans-serif;

  font-size: 10px;
  font-weight: 800;
}

.login-brand-footer b,
.login-brand-footer span {
  display: block;
}

.login-brand-footer b {
  font-size: 11.5px;
}

.login-brand-footer span {
  margin-top: 2px;

  color:
    rgba(255,
      255,
      255,
      0.48);

  font-size: 10px;
}


/* ==========================================================
   FORMULARIO
   ========================================================== */

.login-card {
  display: flex;
  flex-direction: column;
  justify-content: center;

  padding: 48px 46px;

  background:
    var(--surface);
}

.login-card-head {
  margin-bottom: 26px;
}

.login-title {
  margin: 0;

  font-size: 28px;
}

.login-description {
  margin:
    8px 0 0;

  color:
    var(--muted);

  font-size: 13px;
  line-height: 1.5;
}

.login-form {
  gap: 18px;
}

.login-submit {
  width: 100%;

  justify-content: center;

  margin-top: 4px;
}

.login-card-footer {
  display: flex;
  align-items: center;
  justify-content: center;

  gap: 7px;

  margin-top: 24px;

  color:
    var(--muted);

  font-size: 10.5px;
}

.login-security-dot {
  width: 6px;
  height: 6px;

  flex: 0 0 auto;

  background:
    var(--success);

  border-radius:
    50%;
}


/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 800px) {

  .login-wrap {
    padding: 18px;
  }

  .login-shell {
    max-width: 480px;

    grid-template-columns:
      1fr;
  }

  .login-brand-panel {
    padding: 24px;
  }

  .login-brand-content {
    margin:
      34px 0;
  }

  .login-brand-content h1 {
    font-size: 30px;
  }

  .login-card {
    padding:
      34px 28px;
  }
}

@media (max-width: 480px) {

  .login-wrap {
    align-items: flex-start;

    padding: 0;

    background:
      var(--surface);
  }

  .login-shell {
    min-height: 100vh;

    border: 0;
    border-radius: 0;

    box-shadow: none;
  }

  .login-brand-panel {
    padding:
      22px 20px;
  }

  .login-brand-content {
    margin:
      28px 0;
  }

  .login-brand-footer {
    display: none;
  }

  .login-card {
    padding:
      30px 20px 36px;
  }
}

.dc3-rfc-boxes .dc3-rfc-separator {
  flex: 0 0 9px;
  height: 36px;
  display: flex;
  justify-content: center;
  align-items: center;
  font: 700 12px "Courier New", monospace;
  border-bottom: 1px solid #000;
}

.dc3-rfc-boxes .dc3-rfc-separator+.dc3-char {
  border-left: 1px solid #000;
}

/* Fechas sin borde superior */
.dc3-date-boxes .dc3-char {
  border-top: 0;
}

.dc3-curp-boxes .dc3-char,
.dc3-rfc-boxes .dc3-char {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  box-sizing: border-box;
  border: 1px solid #000;
  font-family: "Times New Roman", serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  color: #000;
}

/* CURP: distribuir 18 caracteres dentro del espacio disponible */
.dc3-curp-boxes {
  display: flex;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.dc3-curp-boxes .dc3-char {
  flex: 1 1 0;
  min-width: 0;
  border-right: 0;
}

.dc3-curp-boxes .dc3-char:last-child {
  border-right: 1px solid #000;
}

/* RFC: conservar sus dimensiones y separadores existentes */
.dc3-rfc-boxes .dc3-char {
  flex-shrink: 0;
}

/* Unir visualmente declaración y firmas */
.dc3-declaration {
  border-bottom: 0;
}

.dc3-signatures {
  border-top: 0;
}

/* Instrucciones */
.dc3-instructions {
  margin-top: 9px;
  padding: 0 7px;
  color: #000;
  font: 9px/1.28 Arial, Helvetica, sans-serif;
}

.dc3-instructions-heading {
  font-weight: 700;
  margin-bottom: 4px;
}

.dc3-instructions>div:not(.dc3-instructions-heading):not(.dc3-instructions-footer) {
  margin-bottom: 2px;
}

.dc3-instructions-footer {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-top: 6px;
}

.dc3-instructions-footer span:last-child {
  text-align: right;
  font-weight: 700;
}

/* ==========================================================
   REVERSO DC-3
   ========================================================== */

.dc3-reverso {
  width: 200mm;
  max-width: 100%;
  min-height: 263mm;
  padding: 9mm 5mm 5mm;
  font-family: Arial, Helvetica, sans-serif;
  color: #000;
  background: #fff;
}

.dc3-reverso h2 {
  margin: 0 0 8px;
  text-align: center;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 700;
}

.dc3-reverso .dc3-reverso-segundo-titulo {
  margin-top: 24px;
}

.dc3-reverso-columnas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 12mm;
  align-items: start;
}

.dc3-reverso-tabla {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 9px;
  line-height: 1.28;
}

.dc3-reverso-tabla th {
  background: #fff;
  color: #000;
  border: 0;
  padding: 0 2px 5px;
  font-size: 9px;
  text-align: center;
  vertical-align: bottom;
}

.dc3-reverso-tabla th:first-child,
.dc3-reverso-tabla td:first-child {
  width: 65px;
  text-align: center;
}

.dc3-reverso-tabla td {
  border: 0;
  padding: 2px;
  vertical-align: top;
}

.dc3-reverso-tabla .dc3-reverso-area td {
  font-weight: 700;
  padding-top: 9px;
}

.dc3-reverso-pie {
  margin-top: 28px;
  text-align: right;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
}

.dc3-rfc-boxes,
.dc3-date-boxes {
  display: flex !important;
  align-items: stretch !important;
  flex-wrap: nowrap !important;
  gap: 0 !important;
}

/* Casillas individuales */
.dc3-rfc-boxes .dc3-char,
.dc3-date-boxes .dc3-char {
  box-sizing: border-box !important;
  display: flex !important;
  flex: 1 1 0 !important;
  min-width: 0 !important;
  align-items: center !important;
  justify-content: center !important;
  border-top: 0 !important;
  border-right: 1px solid #000 !important;
  border-bottom: 1px solid #000 !important;
  border-left: 0 !important;
  border-radius: 0 !important;
}

/* Primera casilla: borde izquierdo */
.dc3-rfc-boxes .dc3-char:first-child,
.dc3-date-boxes .dc3-char:first-child {
  border-left: 1px solid #000 !important;
}

/* Guiones del RFC: exactamente iguales a las demás casillas */
.dc3-rfc-boxes .dc3-rfc-separator {
  display: flex !important;
  flex: 1 1 0 !important;
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  font: inherit !important;
  align-items: center !important;
  justify-content: center !important;
  border-top: 0 !important;
  border-right: 1px solid #000 !important;
  border-bottom: 1px solid #000 !important;
  border-left: 0 !important;
}

/* Evitar dobles bordes junto a los guiones */
.dc3-rfc-boxes .dc3-rfc-separator+.dc3-char {
  border-left: 0 !important;
}

/* Conservar los separadores de los grupos de fecha */
.dc3-date-group {
  min-width: 0;
}

.dc3-date-boxes {
  width: 100%;
}


/* CURP: 18 casillas uniformes */
.dc3-document .dc3-curp-boxes {
  display: grid;
  grid-template-columns: repeat(18, minmax(0, 1fr));
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.dc3-document .dc3-curp-boxes .dc3-char {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 34px;
  padding: 0;
  box-sizing: border-box;
  border: 1px solid #000;
  border-right: 0;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: 1;
}

.dc3-document .dc3-curp-boxes .dc3-char:last-child {
  border-right: 1px solid #000;
}

.dc3-document .dc3-curp-boxes .dc3-char {
  display: flex !important;
  flex: 1 1 0 !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 0 !important;
  height: 34px !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  border-top: 0 !important;
  border-right: 1px solid #000 !important;
  border-bottom: 1px solid #000 !important;
  border-left: 0 !important;
  border-radius: 0 !important;
}

/* Borde izquierdo solamente en la primera casilla */
.dc3-document .dc3-curp-boxes .dc3-char:first-child {
  border-left: 1px solid #000 !important;
}

.dc3-document .dc3-curp-boxes .dc3-char,
.dc3-document .dc3-rfc-boxes .dc3-char,
.dc3-document .dc3-rfc-boxes .dc3-rfc-separator {
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  font-style: normal !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  color: #000 !important;
}


/* ==========================================================
   DC-3 - FIRMA PROPORCIONAL SIN RECORTES
   ========================================================== */
.dc3-document .dc3-signature-space {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 90px !important;
  min-height: 90px !important;
  max-height: 90px !important;
  overflow: hidden !important;
}
.dc3-document .dc3-signature-image {
  display: block !important;
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: 90px !important;
  object-fit: contain !important;
  object-position: center !important;
  transform: none !important;
}
@media print {
  .dc3-document .dc3-signature-space {
    height: 90px !important;
    min-height: 90px !important;
    max-height: 90px !important;
    overflow: hidden !important;
  }
  .dc3-document .dc3-signature-image {
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 90px !important;
    object-fit: contain !important;
    transform: none !important;
  }
}


/* ==========================================================
   IMPRESIÓN
   ========================================================== */

@media print {

  .toast-host,
  .modal-host,
  .portal-modal-overlay {
    display: none !important;
  }


  html,
  body {
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }

  .no-print,
  .sidebar,
  .back-link,
  .topline {
    display: none !important;
  }

  .shell {
    display: block !important;
    width: auto !important;
    min-height: 0 !important;
  }

  .main {
    display: block !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .cert-page {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
    page-break-after: always;
  }

  .cert-page:last-child {
    page-break-after: auto;
  }

  .cert-page::before {
    display: none;
  }

  /* MISMO TAMAÑO QUE LA VISTA PREVIA */
  .dc3-document {
    width: 200mm !important;
    max-width: 200mm !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 auto !important;
    padding: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
    transform: none !important;
    zoom: 1 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .dc3-document,
  .dc3-document * {
    box-sizing: border-box !important;
  }

  /* Evita que elementos importantes se partan entre páginas */
  .dc3-section,
  .dc3-course-row,
  .dc3-declaration,
  .dc3-signatures {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }

  .dc3-signature {
    min-height: 145px !important;
  }

  .dc3-signature-space {
    height: 90px !important;
    min-height: 90px !important;
    max-height: 90px !important;
    overflow: hidden !important;
  }

  .dc3-signature-image {
    width: auto !important;
    height: 88px !important;
    max-width: 100% !important;
    max-height: 88px !important;
    object-fit: contain !important;
    transform: none !important;
  }

  .dc3-instructions {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* Evitar alturas mínimas que generen páginas vacías */
  .dc3-document {
    min-height: 0 !important;
  }

  /* El reverso comienza en una página nueva */
  .dc3-reverso {
    break-before: page !important;
    page-break-before: always !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* Evitar cortes dentro de las filas del catálogo */
  .dc3-reverso-tabla tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .dc3-anverso,
  .dc3-document:not(.dc3-reverso) {
    min-height: 0 !important;
    height: auto !important;
    padding-top: 4mm !important;
    padding-bottom: 3mm !important;
    margin-bottom: 0 !important;
    break-after: auto !important;
    page-break-after: auto !important;
  }

  /* Reducir espacios verticales del certificado */
  .dc3-header {
    margin-bottom: 3px !important;
  }

  .dc3-section {
    margin-top: 2px !important;
    margin-bottom: 2px !important;
  }

  .dc3-declaration {
    margin-top: 3px !important;
    margin-bottom: 0 !important;
  }

  /* Mantener firmas compactas */
  .dc3-signatures {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-bottom: 3px !important;
  }

  .dc3-signature-space {
    height: 42px !important;
    min-height: 42px !important;
  }

  .dc3-signature-image {
    max-height: 42px !important;
    object-fit: contain !important;
  }

  /* Instrucciones debajo de las firmas */
  .dc3-instructions {
    display: block !important;
    position: static !important;
    margin-top: 3px !important;
    margin-bottom: 0 !important;
    padding: 2px 5px 0 !important;
    font-size: 7px !important;
    line-height: 1.12 !important;
    break-before: auto !important;
    page-break-before: auto !important;
    break-inside: auto !important;
    page-break-inside: auto !important;
  }

  .dc3-instructions-heading {
    margin-bottom: 2px !important;
  }

  .dc3-instructions>div:not(.dc3-instructions-heading):not(.dc3-instructions-footer) {
    margin-bottom: 1px !important;
  }

  .dc3-instructions-footer {
    margin-top: 3px !important;
  }

  /* Segunda página: reverso */
  .dc3-reverso {
    break-before: page !important;
    page-break-before: always !important;
    min-height: 0 !important;
    height: auto !important;
    break-after: auto !important;
    page-break-after: auto !important;
  }

  .dc3-rfc-boxes .dc3-char,
  .dc3-date-boxes .dc3-char,
  .dc3-rfc-boxes .dc3-rfc-separator {
    border-right: 1px solid #000 !important;
    border-bottom: 1px solid #000 !important;
  }

  .dc3-curp-boxes .dc3-char {
    height: 34px;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  @page {
    size: letter portrait;
    margin: 8mm;
  }
}