/* ================================================================
   badges.css — Sistema de Badges Canónico de VigiTools
   Fuentes originales:
     - assets/css/tablas.css  (líneas 170–363)
     - assets/css/sitio.css   (líneas 1575–1790)
     - assets/css/material-dashboard.css (líneas 5919–5944, 21743–21784, 23454–23468)
   ================================================================ */

/* ================================================================
   1. BASE BOOTSTRAP (.badge) — originalmente en material-dashboard.css
   ================================================================ */
.badge {
  --bs-badge-padding-x: 0.9em;
  --bs-badge-padding-y: 0.55em;
  --bs-badge-font-size: 0.75em;
  --bs-badge-font-weight: 700;
  --bs-badge-color: #fff;
  --bs-badge-border-radius: 0.45rem;
  display: inline-block;
  padding: var(--bs-badge-padding-y) var(--bs-badge-padding-x);
  font-size: var(--bs-badge-font-size);
  font-weight: var(--bs-badge-font-weight);
  line-height: 1;
  color: var(--bs-badge-color);
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: var(--bs-badge-border-radius);
  text-transform: uppercase;
}
.badge:empty { display: none; }
.btn .badge { position: relative; top: -1px; }

/* ── Variantes de color Bootstrap ── */
.badge.bg-primary   { background: #00588bff; }
.badge.bg-secondary { background: #737373; }
.badge.bg-success   { background: #4CAF50; }
.badge.bg-info      { background: #1A73E8; }
.badge.bg-warning   { background: #fb8c00; }
.badge.bg-danger    { background: #F44335; }
.badge.bg-light     { background: #e5e5e5; }
.badge.bg-dark      { background: #262626; }
.badge.bg-white     { background: #fff; }
.badge.bg-dark-blue { background: #1A237E; }

/* ── Badge dentro de .fixed-plugin ── */
.fixed-plugin .badge {
  border: 1px solid #fff;
  border-radius: 50%;
  cursor: pointer;
  display: inline-block;
  height: 23px;
  margin-right: 5px;
  position: relative;
  width: 23px;
  transition: all 0.2s ease-in-out;
}
.fixed-plugin .badge:hover,
.fixed-plugin .badge.active { border-color: #262626; }

/* ================================================================
   2. BADGE PENDIENTE — Rojo Rosa (estado urgente / acción requerida)
   ================================================================ */
.badge-pendiente,
.badge-status-pendiente,
.badge.badge-pendiente,
.badge-pill-custom.badge-pendiente,
.ne-pendiente,
.ne-sm-pendiente,
.bs-pendiente,
body .badge-pendiente,
a.badge-pendiente,
span.badge-pendiente {
  background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 50%, #fecdd3 100%) !important;
  color: #9f1239 !important;
  font-weight: 700 !important;
  border: 1.5px solid #e11d48 !important;
  border-radius: 50px !important;
  font-size: 0.72rem !important;
  padding: 3px 10px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  vertical-align: middle !important;
  gap: 4px !important;
  box-shadow: 0 1px 3px rgba(225, 29, 72, 0.18) !important;
  letter-spacing: 0.02em !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

/* ── Alias: Pendiente Rojo explícito ── */
.badge-pendiente-rojo,
.badge.badge-pendiente-rojo,
.badge-status-pendiente-rojo,
.badge-pill-custom.badge-pendiente-rojo {
  background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 50%, #fecdd3 100%) !important;
  color: #9f1239 !important;
  font-weight: 700 !important;
  border: 1.5px solid #e11d48 !important;
  border-radius: 50px !important;
  font-size: 0.72rem !important;
  padding: 3px 10px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  vertical-align: middle !important;
  gap: 4px !important;
  box-shadow: 0 1px 3px rgba(225, 29, 72, 0.18) !important;
  letter-spacing: 0.02em !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

/* ── Alias: Aprobada Rojo (indica acción requerida: exportar a terna) ── */
.badge-aprobada-rojo,
.badge-aprobadas-rojo,
.badge-aprobado-rojo,
.badge-aprobados-rojo,
.badge.badge-aprobada-rojo,
.badge.badge-aprobadas-rojo,
.badge.badge-aprobado-rojo,
.badge.badge-aprobados-rojo,
.badge-status-aprobada-rojo,
.badge-status-aprobadas-rojo,
.badge-pill-custom.badge-aprobada-rojo,
.badge-pill-custom.badge-aprobadas-rojo,
body .badge-aprobada-rojo,
body .badge-aprobadas-rojo,
body .badge-aprobado-rojo,
body .badge-aprobados-rojo,
a.badge-aprobada-rojo,
a.badge-aprobadas-rojo,
span.badge-aprobada-rojo,
span.badge-aprobadas-rojo {
  background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 50%, #fecdd3 100%) !important;
  color: #9f1239 !important;
  font-weight: 700 !important;
  border: 1.5px solid #e11d48 !important;
  border-radius: 50px !important;
  font-size: 0.72rem !important;
  padding: 3px 10px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  vertical-align: middle !important;
  gap: 4px !important;
  box-shadow: 0 1px 3px rgba(225, 29, 72, 0.18) !important;
  letter-spacing: 0.02em !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

/* ================================================================
   3. BADGE PROCESADA / PROCESADO — Verde Teal (estado completado canónico)
   ================================================================ */
.badge-procesada,
.badge-procesado,
.badge-procesadas,
.badge-procesados,
.badge-status-procesada,
.badge-status-procesado,
.badge.badge-procesada,
.badge.badge-procesado,
.badge.badge-procesadas,
.badge.badge-procesados,
.badge-pill-custom.badge-procesada,
.badge-pill-custom.badge-procesado,
.badge-pill-custom.badge-procesadas,
.badge-pill-custom.badge-procesados,
.ne-procesada,
.ne-sm-procesada,
.bs-procesada,
.bs-procesado,
.bs-procesadas,
.bs-procesados,
body .badge-procesada,
body .badge-procesado,
a.badge-procesada,
a.badge-procesado,
span.badge-procesada,
span.badge-procesado {
  background: linear-gradient(135deg, #e6f9f6 0%, #cbf2ec 50%, #9fe4d9 100%) !important;
  color: #0f766e !important;
  border: 1.5px solid #2ab5a1 !important;
  border-radius: 50px !important;
  font-weight: 700 !important;
  font-size: 0.72rem !important;
  padding: 3px 10px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  vertical-align: middle !important;
  gap: 4px !important;
  box-shadow: 0 1px 3px rgba(42, 181, 161, 0.18) !important;
  letter-spacing: 0.02em !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

/* ================================================================
   4. BADGE PROCESADA-GRIS / RECHAZADO-GRIS — Gris neutro (archivado / sin acción)
   ================================================================ */
.badge-procesada-gris,
.badge-procesadas-gris,
.badge-procesado-gris,
.badge-procesados-gris,
.badge-rechazado-gris,
.badge-rechazada-gris,
.badge.badge-procesada-gris,
.badge.badge-procesadas-gris,
.badge.badge-procesado-gris,
.badge.badge-procesados-gris,
.badge.badge-rechazado-gris,
.badge.badge-rechazada-gris,
.badge-status-procesada-gris,
.badge-status-procesadas-gris,
.badge-status-rechazado-gris,
.badge-status-rechazada-gris,
.badge-pill-custom.badge-procesada-gris,
.badge-pill-custom.badge-procesadas-gris,
.badge-pill-custom.badge-rechazado-gris,
.badge-pill-custom.badge-rechazada-gris,
body .badge-procesada-gris,
body .badge-procesadas-gris,
body .badge-procesado-gris,
body .badge-procesados-gris,
a.badge-procesada-gris,
a.badge-procesadas-gris,
span.badge-procesada-gris,
span.badge-procesadas-gris {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%) !important;
  color: #475569 !important;
  font-weight: 700 !important;
  border: 1.5px solid #94a3b8 !important;
  border-radius: 50px !important;
  font-size: 0.72rem !important;
  padding: 3px 10px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  vertical-align: middle !important;
  gap: 4px !important;
  box-shadow: 0 1px 3px rgba(100, 116, 139, 0.18) !important;
  letter-spacing: 0.02em !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

/* ================================================================
   5. BADGE APROBADA / APROBADO — Verde Esmeralda (aprobación definitiva)
   ================================================================ */
.badge-aprobada,
.badge-aprobado,
.badge-status-aprobada,
.badge-status-aprobado,
.badge.badge-aprobada,
.badge.badge-aprobado,
.badge-pill-custom.badge-aprobada,
.badge-pill-custom.badge-aprobado,
.ne-aprobada,
.bs-aprobada,
body .badge-aprobada,
body .badge-aprobado,
a.badge-aprobada,
a.badge-aprobado,
span.badge-aprobada,
span.badge-aprobado {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 50%, #a7f3d0 100%) !important;
  color: #065f46 !important;
  border: 1.5px solid #10b981 !important;
  border-radius: 50px !important;
  font-weight: 700 !important;
  font-size: 0.72rem !important;
  padding: 3px 10px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  vertical-align: middle !important;
  gap: 4px !important;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.18) !important;
  letter-spacing: 0.02em !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

/* ================================================================
   6. BADGE RECHAZADA / RECHAZADO — Rojo Rosa (denegado)
   ================================================================ */
.badge-rechazada,
.badge-rechazado,
.badge-status-rechazada,
.badge-status-rechazado,
.badge.badge-rechazada,
.badge.badge-rechazado,
.badge-pill-custom.badge-rechazada,
.badge-pill-custom.badge-rechazado,
.ne-rechazada,
.bs-rechazada,
body .badge-rechazado,
body .badge-rechazada,
a.badge-rechazado,
a.badge-rechazada,
span.badge-rechazado,
span.badge-rechazada {
  background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 50%, #fecdd3 100%) !important;
  color: #9f1239 !important;
  border: 1.5px solid #e11d48 !important;
  border-radius: 50px !important;
  font-weight: 700 !important;
  font-size: 0.72rem !important;
  padding: 3px 10px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  vertical-align: middle !important;
  gap: 4px !important;
  box-shadow: 0 1px 3px rgba(225, 29, 72, 0.18) !important;
  letter-spacing: 0.02em !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

/* ================================================================
   7. BADGE EN PROCESO — Azul (en tramitación / revisión activa)
   ================================================================ */
.badge-en-proceso,
.badge-en_proceso,
.badge-status-en-proceso,
.badge-status-en_proceso,
.badge.badge-en-proceso,
.badge.badge-en_proceso,
.badge-pill-custom.badge-en-proceso,
.ne-en-proceso,
.bs-en-proceso {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 50%, #bfdbfe 100%) !important;
  color: #1e40af !important;
  border: 1.5px solid #3b82f6 !important;
  border-radius: 50px !important;
  font-weight: 700 !important;
  font-size: 0.72rem !important;
  padding: 3px 10px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  vertical-align: middle !important;
  gap: 4px !important;
  box-shadow: 0 1px 3px rgba(59, 130, 246, 0.18) !important;
  letter-spacing: 0.02em !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

/* ================================================================
   8. BADGE HOVER — efecto interactivo en badges enlace (<a>)
   ================================================================ */
a.badge-pendiente:hover,
a.badge-pendiente-rojo:hover,
a.badge-procesada:hover,
a.badge-procesado:hover,
a.badge-procesada-gris:hover,
a.badge-procesadas-gris:hover,
a.badge-aprobada:hover,
a.badge-aprobado:hover,
a.badge-aprobada-rojo:hover,
a.badge-aprobadas-rojo:hover,
a.badge-rechazada:hover,
a.badge-rechazado:hover,
a.badge-rechazado-gris:hover,
a.badge-rechazada-gris:hover {
  transform: translateY(-1px);
  opacity: 0.9;
}

/* ================================================================
   9. BADGES DE NOTAS Y EVALUACIÓN DE CANDIDATOS
   ================================================================ */
.exam-score-badge {
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 6px;
  padding: 2px 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
  line-height: 1.2;
}

/* ================================================================
   10. BADGES DE FILTRO INTERACTIVO (Pills en barra de búsqueda)
   ================================================================ */
.badge-filtro-estatus {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1.5px solid #e2e8f0;
  border-radius: 50px;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 4px 12px;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  user-select: none;
  line-height: 1.4;
}
.badge-filtro-estatus:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #334155;
}
/* Estado activo neutro (Todas) */
.badge-filtro-estatus.active {
  background: #1e293b;
  border-color: #1e293b;
  color: #fff;
  box-shadow: 0 2px 8px rgba(30, 41, 59, 0.18);
}
/* Pendientes — estilo rojo rosa */
.badge-filtro-pendiente,
.badge-filtro-pendiente-rojo {
  color: #9f1239;
  background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%);
  border-color: #e11d48;
}
.badge-filtro-pendiente:hover,
.badge-filtro-pendiente-rojo:hover {
  background: linear-gradient(135deg, #ffe4e6 0%, #fecdd3 100%);
  border-color: #be123c;
  color: #881337;
}
.badge-filtro-pendiente.active,
.badge-filtro-pendiente-rojo.active {
  background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
  border-color: #9f1239;
  color: #fff;
  box-shadow: 0 2px 8px rgba(225, 29, 72, 0.28);
}
/* Procesadas — estilo gris neutro */
.badge-filtro-procesada-gris,
.badge-filtro-procesado-gris,
.badge-filtro-procesada,
.badge-filtro-procesado {
  color: #475569;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-color: #94a3b8;
}
.badge-filtro-procesada-gris:hover,
.badge-filtro-procesado-gris:hover,
.badge-filtro-procesada:hover,
.badge-filtro-procesado:hover {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  border-color: #64748b;
  color: #334155;
}
.badge-filtro-procesada-gris.active,
.badge-filtro-procesado-gris.active,
.badge-filtro-procesada.active,
.badge-filtro-procesado.active {
  background: linear-gradient(135deg, #64748b 0%, #475569 100%);
  border-color: #334155;
  color: #fff;
  box-shadow: 0 2px 8px rgba(71, 85, 105, 0.28);
}
/* Procesadas — variante teal VigiTools opcional */
.badge-filtro-procesada-teal {
  color: #0f766e;
  background: linear-gradient(135deg, #f0fdfb 0%, #e6f9f6 100%);
  border-color: #2ab5a1;
}
.badge-filtro-procesada-teal:hover {
  background: linear-gradient(135deg, #e6f9f6 0%, #cbf2ec 100%);
  border-color: #1e8e7d;
  color: #0a5c56;
}
.badge-filtro-procesada-teal.active {
  background: linear-gradient(135deg, #2ab5a1 0%, #1e8e7d 100%);
  border-color: #156c5f;
  color: #fff;
  box-shadow: 0 2px 8px rgba(42, 181, 161, 0.28);
}
/* Contador numérico dentro del badge */
.badge-filtro-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  border-radius: 50px;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0 5px;
  background: rgba(0, 0, 0, 0.10);
  line-height: 1;
}
.badge-filtro-pendiente.active .badge-filtro-count,
.badge-filtro-procesada.active .badge-filtro-count,
.badge-filtro-estatus.active .badge-filtro-count {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* ================================================================
   10. BADGES DE EVENTOS DE CONTRATACIÓN (RRHH)
   ================================================================ */
.badge-evento {
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  padding: 3px 10px !important;
  border-radius: 50px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  white-space: nowrap !important;
}
.badge-evento-inicial {
  background: linear-gradient(135deg, #e6f9f6 0%, #cbf2ec 50%, #9fe4d9 100%) !important;
  color: #0f766e !important;
  border: 1.5px solid #2ab5a1 !important;
  box-shadow: 0 1px 3px rgba(42, 181, 161, 0.18) !important;
}
.badge-evento-recontratacion {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 50%, #bfdbfe 100%) !important;
  color: #1d4ed8 !important;
  border: 1.5px solid #3b82f6 !important;
  box-shadow: 0 1px 3px rgba(59, 130, 246, 0.18) !important;
}
.badge-evento-despido {
  background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 50%, #fecdd3 100%) !important;
  color: #be123c !important;
  border: 1.5px solid #f43f5e !important;
  box-shadow: 0 1px 3px rgba(244, 63, 94, 0.18) !important;
}
.badge-evento-vacacion {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 50%, #fde68a 100%) !important;
  color: #92400e !important;
  border: 1.5px solid #d97706 !important;
  box-shadow: 0 1px 3px rgba(217, 119, 6, 0.18) !important;
}
.badge-evento-decimo {
  background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 50%, #e9d5ff 100%) !important;
  color: #6b21a8 !important;
  border: 1.5px solid #a855f7 !important;
  box-shadow: 0 1px 3px rgba(168, 85, 247, 0.18) !important;
}