/* MODULO TALENTO HUMANO — estilos (full-width, sin max-width ni margin:0 auto) */
/* TH-REDISENO-v1: Clean Modern — tarjetas blancas, borde fino, radio 12px, acento azul var(--azul) */

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

.th-hero {
  background: #fff;
  color: var(--texto, #1E293B);
  border: 1px solid var(--borde, #E2E8F0);
  padding: 18px;
  border-radius: 12px;
  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; color: #64748b; margin-top: 4px; }

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

.th-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: var(--azul-bg, #EDF1F9); color: var(--azul, #1A3C8F);
  font-weight: 800; font-size: 12px;
}
.th-avatar-lg { width: 52px; height: 52px; font-size: 18px; }

.th-estado { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: #475569; }
.th-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.th-tag {
  display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 11px; font-weight: 600;
  background: var(--gris-light, #F1F5F9); color: #475569;
}

.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-radius: 12px;
  padding: 14px;
  box-shadow: var(--sombra, 0 4px 12px rgba(0,0,0,0.08));
}
.th-kpi-icono {
  width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 15px; margin-bottom: 8px;
}
.th-kpi-icono-azul { background: var(--azul-bg, #EDF1F9); }
.th-kpi-icono-verde { background: #dcfce7; }
.th-kpi-icono-rosa { background: #fce7f3; }
.th-kpi-icono-ambar { background: #fef3c7; }
.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-REDISENO-v1: franja de 4 cifras debajo del encabezado de la ficha */
.th-franja { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 12px 16px 0; }
.th-franja-tile {
  background: #fff; border: 1px solid var(--borde, #E2E8F0); border-radius: 12px; padding: 12px 14px;
}
.th-franja-valor { font-size: 18px; font-weight: 800; color: var(--texto, #1E293B); margin-top: 4px; }

/* TH-REDISENO-v1: barra de cartera (facturas/préstamos/notas débito) */
.th-barra { display: flex; width: 100%; height: 8px; border-radius: 99px; overflow: hidden; background: var(--gris-light, #F1F5F9); margin-bottom: 8px; }
.th-barra span { height: 100%; }
.th-barra-leyenda { display: flex; gap: 12px; font-size: 11px; color: #64748b; margin-bottom: 10px; flex-wrap: wrap; }
.th-barra-leyenda i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }

.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: 12px; 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-btn {
  background: var(--azul, #1A3C8F); color: #fff; border: 1px solid var(--azul, #1A3C8F);
  padding: 9px 16px; border-radius: 12px;
  font-family: inherit; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: filter 0.2s;
}
.th-btn:hover { filter: brightness(1.15); }
/* TH-REDISENO-v1: secundario (borde fino, fondo claro) en vez del bloque blanco translúcido sobre el degradado */
.th-btn-sec { background: #fff; color: var(--azul, #1A3C8F); border: 1px solid var(--borde, #E2E8F0); }
/* TH-REDISENO-v1: Retirar en texto/borde rojo, no bloque rojo */
.th-btn-rojo { background: #fff; color: var(--rojo, #EF4444); border: 1px solid var(--rojo, #EF4444); }
.th-btn-gris { background: var(--gris, #64748B); border-color: 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: 12px; 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; }

/* TH-LIQUIDACION-v1: pestaña "Liquidar quincena" */
.th-liq-selector { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 10px; }
.th-input-mini { width: 90px; padding: 6px 8px; }
.th-tabla-liq { font-size: 12px; }
.th-tabla-liq td, .th-tabla-liq th { white-space: nowrap; }
.th-chip-aviso { background: #fef3c7; color: #92400e; margin: 0 2px; cursor: help; }

@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); }
}
/* TH-REDISENO-v1: <760px una columna; la franja de 4 cifras queda en 2x2 */
@media (max-width: 760px) {
  .th-franja { grid-template-columns: repeat(2, 1fr); }
  .th-tabs { flex-wrap: wrap; }
}
@media (max-width: 600px) {
  .th-kpis { grid-template-columns: 1fr; }
  .th-franja { grid-template-columns: 1fr 1fr; }
  .th-form-grid { grid-template-columns: 1fr; }
  .th-hero { padding: 16px 14px; }
}

/* ═══ TH-PRESTACIONES-v1 (F3): prestaciones, novedades y asistente de perfil de pago (prefijo .thp-) ═══ */
:root { --thp-azul: var(--azul, #1A3C8F); --thp-linea: var(--borde, #E2E8F0); }
.thp-vista { animation: thp-in .25s cubic-bezier(.4, 0, .2, 1); }
@keyframes thp-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.thp-r { text-align: right; }
.thp-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.thp-acc { display: flex; gap: 8px; justify-content: flex-end; align-items: center; flex-wrap: wrap; margin: 12px 0; }
.thp-pag { display: flex; gap: 12px; justify-content: center; align-items: center; margin-top: 12px; }
.thp-h { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--thp-azul); margin: 16px 0 8px; padding-bottom: 4px; border-bottom: 1px solid var(--thp-linea); }
.thp-lee { background: #f7f9fd; border: 1px dashed #cfd7e6; border-radius: 8px; padding: 8px 10px; font-size: 12.5px; color: #5d6b85; margin: 8px 0; }
.thp-lee b { color: var(--texto, #1E293B); }
.thp-chip { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 20px; }
.thp-chip-v { background: #e4f5ea; color: #1f8a4c; }
.thp-chip-a { background: #fff3dc; color: #a86200; }
.thp-chip-g { background: #eef1f6; color: #5d6b85; }
.thp-chip-b { background: #eaf0fd; color: var(--thp-azul); }
.thp-chip-x { background: #fde9e7; color: #b3261e; }
.thp-aviso { background: #fff3dc; color: #6b4300; border-left: 4px solid #a86200; padding: 8px 10px; border-radius: 6px; font-size: 12.5px; margin-bottom: 6px; }
.thp-aviso-x { background: #fde9e7; color: #7d1a14; border-color: #b3261e; }
.thp-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.thp-pill { font: inherit; font-weight: 600; border: 1px solid var(--thp-linea); background: #fff; color: #5d6b85; padding: 7px 14px; border-radius: 20px; cursor: pointer; }
.thp-pill.thp-on { background: var(--thp-azul); border-color: var(--thp-azul); color: #fff; }
.thp-form { max-width: 760px; }
.thp-det { margin: 10px 0; font-size: 12.5px; }
.thp-det summary { cursor: pointer; color: var(--thp-azul); font-weight: 600; }
.thp-man { border: 1px dashed var(--thp-linea); border-radius: 8px; padding: 8px; margin-bottom: 8px; }
.thp-anulada td { opacity: .6; text-decoration: line-through; }
.thp-estado { display: flex; gap: 6px; align-items: center; font-size: 12.5px; color: #5d6b85; margin-right: auto; flex-wrap: wrap; }
.thp-paso { display: inline-flex; gap: 6px; align-items: center; }
.thp-paso i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 700; background: #e9edf5; color: #5d6b85; }
.thp-paso.thp-on i { background: var(--thp-azul); color: #fff; }
.thp-paso.thp-hecho i { background: #1f8a4c; color: #fff; }
.thp-hoja { background: #fff; border: 1px solid var(--thp-linea); border-radius: 12px; padding: 16px; box-shadow: 0 2px 14px rgba(26, 60, 143, .08); margin-top: 8px; }
.thp-hoja-tit { background: #d6d6d6; text-align: center; font-weight: 700; padding: 4px; border-radius: 4px; margin-bottom: 10px; }
.thp-hoja-emp { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 16px; font-size: 13px; margin-bottom: 10px; }
.thp-tot { display: flex; gap: 20px; justify-content: flex-end; flex-wrap: wrap; border-top: 1.5px solid #000; margin-top: 10px; padding-top: 8px; }
.thp-tot div { display: flex; flex-direction: column; text-align: right; }
.thp-tot span { font-size: 11px; color: #5d6b85; }
.thp-tot b { font-size: 16px; }
.thp-flash { animation: thp-fl .5s; }
@keyframes thp-fl { from { background: #fff6c7; } to { background: transparent; } }
/* asistente perfil de pago */
.thp-wz-head { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.thp-av { width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg, var(--thp-azul), #4f7bea); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 18px; flex-shrink: 0; }
.thp-barra { height: 6px; background: #e3e8f2; border-radius: 6px; overflow: hidden; margin: 6px 0 12px; }
.thp-barra i { display: block; height: 100%; background: linear-gradient(90deg, var(--thp-azul), #4f7bea); transform-origin: left; transition: transform .3s cubic-bezier(.4, 0, .2, 1); }
.thp-pasos { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.thp-pasobtn { font: inherit; font-size: 12.5px; border: 0; background: none; color: #5d6b85; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 6px; }
.thp-pasobtn i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 700; background: #e9edf5; }
.thp-pasobtn.thp-on { color: var(--thp-azul); font-weight: 700; }
.thp-pasobtn.thp-on i { background: var(--thp-azul); color: #fff; }
.thp-pasobtn.thp-ok i { background: #1f8a4c; color: #fff; }
.thp-opciones { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.thp-op { border: 1.5px solid var(--thp-linea); border-radius: 14px; padding: 14px; background: #fff; cursor: pointer; position: relative; transition: transform .2s, border-color .2s, box-shadow .2s; }
.thp-op:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(26, 60, 143, .08); }
.thp-op:focus-visible { outline: 2px solid var(--thp-azul); outline-offset: 2px; }
.thp-op.thp-si { border-color: var(--thp-azul); background: linear-gradient(180deg, #f5f8ff, #fff); }
.thp-op.thp-bloq { opacity: .55; cursor: not-allowed; }
.thp-op.thp-bloq:hover { transform: none; box-shadow: none; }
.thp-op h4 { margin: 6px 0 2px; font-size: 15px; }
.thp-op p { margin: 0; color: #5d6b85; font-size: 12.5px; line-height: 1.4; }
.thp-op .th-input { margin-top: 8px; }
.thp-ic { font-size: 24px; }
.thp-sw { position: absolute; top: 14px; right: 14px; width: 44px; height: 24px; border-radius: 20px; background: #cfd7e6; transition: background .2s; }
.thp-sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s; }
.thp-op.thp-si .thp-sw { background: var(--thp-azul); }
.thp-op.thp-si .thp-sw::after { transform: translateX(20px); }
.thp-ley { display: none; margin-top: 8px; font-size: 12px; color: #7d1a14; background: #fde9e7; padding: 6px 8px; border-radius: 6px; }
.thp-op.thp-no-ley .thp-ley { display: block; }
.thp-res { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 18px; }
.thp-res div { display: flex; justify-content: space-between; border-bottom: 1px dashed var(--thp-linea); padding: 6px 0; gap: 8px; }
.thp-pie { display: flex; justify-content: space-between; margin-top: 16px; gap: 8px; }
@media (max-width: 900px) { .thp-hoja-emp, .thp-res { grid-template-columns: 1fr; } .thp-pie .th-btn { flex: 1; } }
@media (prefers-reduced-motion: reduce) { .thp-vista, .thp-flash, .thp-op, .thp-sw, .thp-sw::after, .thp-barra i { animation: none !important; transition: none !important; } }
@media print { .thp-acc, .thp-top, .thp-pag { display: none !important; } .thp-hoja { box-shadow: none; border: 0; } }
