/* MODULO TALENTO HUMANO — estilos (full-width, sin max-width ni margin:0 auto) */

#page-talentoHumano { max-width: 100%; animation: none !important; }

.th-hero {
  background: linear-gradient(135deg, var(--azul, #1A3C8F), var(--azul-light, #2B5CC3));
  color: #fff;
  padding: 20px 18px;
  border-radius: 0 0 16px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.th-hero h2 { font-weight: 800; letter-spacing: -0.4px; }
.th-hero-sub { font-size: 12px; opacity: 0.85; margin-top: 4px; }

.th-body { padding: 14px 16px; }

.th-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 14px 16px 0;
}
.th-kpi {
  background: #fff;
  border: 1px solid var(--borde, #E2E8F0);
  border-top: 3px solid var(--azul, #1A3C8F);
  border-radius: var(--radio, 10px);
  padding: 12px 14px;
  box-shadow: var(--sombra, 0 4px 12px rgba(0,0,0,0.08));
}
.th-kpi-label { font-size: 10px; text-transform: uppercase; font-weight: 700; letter-spacing: 0.5px; color: #64748b; }
.th-kpi-valor { font-size: 24px; font-weight: 900; color: var(--texto, #1E293B); margin: 4px 0 2px; }
.th-kpi-sub { font-size: 10px; color: #94a3b8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.th-filtros { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.th-input {
  padding: 9px 12px;
  border: 1px solid var(--borde, #E2E8F0);
  border-radius: var(--radio, 10px);
  font-family: inherit;
  font-size: 13px;
  flex: 1;
  min-width: 140px;
  background: #fff;
}
.th-input:focus { outline: none; border-color: var(--azul, #1A3C8F); box-shadow: 0 0 0 3px rgba(26,60,143,.12); }

.th-tabla-wrap { overflow-x: auto; }
.th-tabla { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radio, 10px); overflow: hidden; font-size: 13px; }
.th-tabla th {
  text-align: left; padding: 10px 12px; background: var(--gris-light, #F1F5F9);
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: #64748b;
}
.th-tabla td { padding: 10px 12px; border-top: 1px solid var(--borde, #E2E8F0); vertical-align: top; }
.th-tabla tbody tr:hover { background: var(--azul-bg, #EDF1F9); }
.th-tabla-mini { font-size: 12px; }
.th-num { font-weight: 700; white-space: nowrap; }
.th-sub { font-size: 11px; color: #94a3b8; }

.th-chip {
  display: inline-block; padding: 2px 10px; border-radius: 99px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.4px;
}
.th-chip-ACTIVO { background: #dcfce7; color: #15803d; }
.th-chip-RETIRADO { background: #fee2e2; color: #b91c1c; }
.th-chip-SUSPENDIDO { background: #fef3c7; color: #b45309; }
.th-chip-LICENCIA { background: #dbeafe; color: #1d4ed8; }

.th-btn {
  background: var(--azul, #1A3C8F); color: #fff; border: none;
  padding: 9px 16px; border-radius: var(--radio, 10px);
  font-family: inherit; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: filter 0.2s;
}
.th-btn:hover { filter: brightness(1.15); }
.th-btn-blanco { background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.4); }
.th-btn-rojo { background: var(--rojo, #EF4444); }
.th-btn-gris { background: var(--gris, #64748B); }
.th-btn-mini { padding: 5px 10px; font-size: 11px; }

.th-info-btn, .th-info-mini { background: none; border: none; cursor: pointer; font-size: 1rem; padding: 0 2px; }
.th-info-mini { font-size: 0.8rem; }

.th-empty {
  text-align: center; padding: 40px 20px; color: #94a3b8;
  background: #fff; border: 1px dashed var(--borde, #E2E8F0); border-radius: var(--radio-lg, 16px);
  font-size: 14px;
}

.th-tabs { display: flex; gap: 6px; padding: 12px 16px 0; }
.th-tab {
  background: #fff; border: 1px solid var(--borde, #E2E8F0); border-bottom: none;
  padding: 9px 18px; border-radius: 10px 10px 0 0; font-family: inherit;
  font-size: 13px; font-weight: 700; color: #64748b; cursor: pointer;
}
.th-tab-activo { color: var(--azul, #1A3C8F); border-top: 3px solid var(--azul, #1A3C8F); }

.th-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.th-card {
  background: #fff; border: 1px solid var(--borde, #E2E8F0);
  border-radius: var(--radio, 10px); padding: 14px; box-shadow: var(--sombra, 0 4px 12px rgba(0,0,0,0.08));
}
.th-card-titulo { font-size: 13px; font-weight: 800; margin-bottom: 10px; color: var(--texto, #1E293B); }
.th-fila { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--gris-light, #F1F5F9); font-size: 13px; }
.th-fila-label { color: #64748b; font-size: 12px; }
.th-costo-total {
  margin-top: 10px; padding: 10px; background: var(--azul-bg, #EDF1F9);
  border-radius: 8px; font-size: 14px; text-align: center;
}
.th-alerta {
  margin-top: 8px; padding: 8px 10px; background: #fef3c7; color: #92400e;
  border-radius: 8px; font-size: 12px;
}

.th-doc-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.th-modal-back {
  position: fixed; inset: 0; background: rgba(15,23,42,0.5);
  backdrop-filter: blur(4px); z-index: 9998;
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.th-modal {
  background: #fff; border-radius: var(--radio-lg, 16px); padding: 20px;
  width: 100%; max-width: calc(100vw - 40px); max-height: 90vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.th-info-campo { margin-bottom: 10px; font-size: 13px; }
.th-info-campo b { color: var(--azul, #1A3C8F); }
.th-info-campo p { margin: 3px 0 0; color: #475569; }

.th-form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.th-form-campo { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 700; color: #64748b; }
.th-form-campo .th-input { font-weight: 400; }
.th-form-check { flex-direction: row; align-items: center; gap: 8px; align-self: end; padding-bottom: 10px; }

@media (max-width: 900px) {
  .th-kpis { grid-template-columns: repeat(2, 1fr); }
  .th-grid-2 { grid-template-columns: 1fr; }
  .th-form-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .th-kpis { grid-template-columns: 1fr; }
  .th-form-grid { grid-template-columns: 1fr; }
  .th-hero { padding: 16px 14px; }
}
