*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --pj-blue:    #0050dd;
  --pj-blue-dk: #0040b0;
  --pj-red:     #ef3340;
  --pj-gray:    #5e5d62;
  --bg:         #f0f2f7;
  --surface:    #ffffff;
  --border:     #e4e7ef;
  --text:       #1a1a2e;
  --text-muted: #5e5d62;
  --radius:     10px;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.07), 0 2px 8px rgba(0,0,0,.05);
  --shadow-md:  0 2px 6px rgba(0,0,0,.07), 0 6px 20px rgba(0,0,0,.07);
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 980px; margin: 0 auto; padding: 0 28px; }

/* ── Estados ────────────────────────────────────────────── */
.state-screen {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 100vh; gap: 16px;
}
.state-text  { color: var(--text-muted); font-size: 15px; }
.error-icon  { font-size: 52px; }
.error-title { font-size: 22px; font-weight: 700; color: var(--text); }
.error-desc  { color: var(--text-muted); font-size: 14px; max-width: 360px; text-align: center; }

.spinner {
  width: 42px; height: 42px;
  border: 3px solid var(--border);
  border-top-color: var(--pj-blue);
  border-radius: 50%;
  animation: spin .75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Header ─────────────────────────────────────────────── */
.header {
  background: #fff;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 0 var(--border), 0 2px 8px rgba(0,0,0,.06);
}
.header-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 28px;
  height: 60px;
  display: flex; align-items: center; justify-content: space-between;
}
.header-redline { height: 3px; background: var(--pj-red); }

.header-left   { display: flex; align-items: center; gap: 18px; }
.header-logo-pj { display: flex; align-items: center; }
.logo-pj-img   { height: 38px; width: auto; object-fit: contain; }
.header-divider {
  width: 1px; height: 30px;
  background: #dde0e8; flex-shrink: 0;
}
.header-sistema {
  color: var(--pj-blue); font-size: 14px; font-weight: 600;
  letter-spacing: -.01em; line-height: 1.3;
}

.header-right  { display: flex; align-items: center; gap: 10px; }
.hdr-nombre    { color: var(--pj-gray); font-size: 13px; font-weight: 500; }
.hdr-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--pj-blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff;
  flex-shrink: 0; letter-spacing: .03em;
  overflow: hidden;
}

/* ── Tarjeta de empleado ─────────────────────────────────── */
.profile-section {
  background: var(--bg);
  padding: 28px 0 32px;
}
.profile-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  display: flex;
  overflow: hidden;
}
.profile-accent-bar {
  width: 5px;
  background: linear-gradient(180deg, var(--pj-blue) 0%, var(--pj-red) 100%);
  flex-shrink: 0;
}
.profile-body {
  flex: 1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  padding: 28px 32px;
}

/* Identidad */
.profile-identity {
  display: flex; align-items: center; gap: 20px;
  flex: 1; min-width: 260px;
}
.profile-avatar {
  width: 96px; height: 96px; border-radius: 50%;
  background: var(--pj-blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 700; color: #fff;
  flex-shrink: 0; letter-spacing: .04em;
  overflow: hidden;
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--border);
}
.avatar-img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
}
.profile-info {
  display: flex; flex-direction: column; gap: 4px; flex: 1;
}
.profile-nombre {
  color: var(--text); font-size: 18px; font-weight: 700;
  line-height: 1.2; letter-spacing: -.01em;
}
.profile-puesto {
  color: var(--pj-blue); font-size: 13.5px; font-weight: 600;
  line-height: 1.3;
}
.profile-dependencia {
  color: var(--text-muted); font-size: 12px; font-weight: 400;
  line-height: 1.4;
}
.profile-refs {
  display: flex; align-items: center; gap: 6px;
  margin-top: 6px; flex-wrap: wrap;
}
.ref-label {
  color: #aaa9b3; font-size: 9.5px;
  text-transform: uppercase; letter-spacing: .7px; font-weight: 600;
}
.ref-value { color: var(--text-muted); font-size: 11.5px; }
.ref-sep   { color: #d1d0d8; font-size: 13px; }

/* Divisor vertical */
.profile-vdivider {
  width: 1px; background: var(--border);
  align-self: stretch; margin: 0 32px;
  flex-shrink: 0;
}

/* Números */
.profile-stats {
  display: flex; flex-direction: column;
  gap: 0; flex-shrink: 0; min-width: 200px;
}
.stat-box {
  display: flex; flex-direction: column; gap: 3px;
  padding: 8px 0;
}
.stat-hdivider {
  height: 1px; background: var(--border);
  margin: 8px 0;
}
.stat-label {
  color: var(--text-muted); font-size: 10px;
  text-transform: uppercase; letter-spacing: .7px; font-weight: 600;
}
.stat-value {
  color: var(--text); font-size: 22px; font-weight: 700;
  letter-spacing: -.02em; line-height: 1.1;
}
.stat-value.stat-anual { color: var(--pj-blue); }
.stat-periodo { color: #aaa9b3; font-size: 10px; margin-top: 1px; }

/* ── Barra de períodos ───────────────────────────────────── */
.period-nav-wrap {
  background: var(--bg);
  padding: 0 0 4px;
}
.period-nav {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 20px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
  position: relative;
}
.period-nav-label {
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .7px;
  color: var(--text-muted); white-space: nowrap;
}
.period-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.period-chip {
  padding: 6px 18px; border-radius: 20px;
  font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: inherit;
  border: 1.5px solid var(--border);
  color: var(--text-muted); background: transparent;
  transition: border-color .15s, color .15s, background .15s;
  line-height: 1;
}
.period-chip:hover {
  border-color: var(--pj-blue); color: var(--pj-blue);
  background: rgba(0,80,221,.05);
}
.period-chip.active {
  background: var(--pj-blue); color: #fff; border-color: var(--pj-blue);
}
.period-chip:focus-visible {
  outline: 3px solid rgba(0,80,221,.3); outline-offset: 2px;
}
.period-more-wrap { position: relative; }
.period-more-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 20px;
  font-size: 12px; font-weight: 600;
  cursor: pointer; font-family: inherit;
  border: 1.5px dashed var(--border);
  color: var(--text-muted); background: transparent;
  transition: border-color .15s, color .15s, border-style .15s;
  line-height: 1; white-space: nowrap;
}
.period-more-btn:hover, .period-more-btn.open {
  border-color: var(--pj-blue); color: var(--pj-blue); border-style: solid;
}
.period-more-btn svg { transition: transform .2s; }
.period-more-btn.open svg { transform: rotate(180deg); }
.period-more-btn:focus-visible { outline: 3px solid rgba(0,80,221,.3); outline-offset: 2px; }
.period-dropdown {
  position: absolute; top: calc(100% + 8px); left: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.1), 0 2px 6px rgba(0,0,0,.06);
  padding: 6px; list-style: none;
  min-width: 150px; z-index: 200;
}
.period-dd-item {
  padding: 8px 14px; border-radius: 7px;
  font-size: 13px; font-weight: 500;
  color: var(--text-muted); cursor: pointer;
  transition: background .1s, color .1s;
}
.period-dd-item:hover, .period-dd-item:focus-visible {
  background: var(--bg); color: var(--text); outline: none;
}
.period-dd-item.active { color: var(--pj-blue); font-weight: 700; }
.period-spinner {
  width: 16px; height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--pj-blue);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin-left: auto;
}

/* ── Estado de carga al cambiar período ──────────────────── */
.main-content { transition: opacity .2s; }
.main-content.is-loading { opacity: .45; pointer-events: none; }

/* ── Contenido ───────────────────────────────────────────── */
.main-content { padding: 36px 0 56px; }

/* Bloque de sección */
.section-block { margin-bottom: 36px; }

.section-header  { margin-bottom: 14px; }
.section-title-wrap {
  display: flex; align-items: flex-start; gap: 14px;
}
.section-num {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 6px;
  background: var(--pj-blue); color: #fff;
  font-size: 11px; font-weight: 700; flex-shrink: 0; margin-top: 1px;
}
.section-title {
  font-size: 16px; font-weight: 700; color: var(--text);
  letter-spacing: -.01em;
}
.section-sub {
  color: var(--text-muted); font-size: 12px; margin-top: 3px;
}

/* ── Tabla ───────────────────────────────────────────────── */
.table-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}
.comp-table { width: 100%; border-collapse: collapse; }

.comp-table thead tr { background: var(--pj-blue); }
.comp-table thead th {
  color: rgba(255,255,255,.9); font-weight: 600;
  font-size: 11px; text-transform: uppercase; letter-spacing: .6px;
  padding: 13px 20px; text-align: left;
}
.comp-table thead th.th-anterior { line-height: 1.5; }
.comp-table thead th .th-sub {
  display: block; font-size: 9px; font-weight: 500;
  letter-spacing: .3px; text-transform: none;
  color: rgba(255,255,255,.62); margin-top: 1px;
}
.comp-table th.col-monto,
.comp-table td.col-monto { text-align: right; }
.col-detalle { width: 55%; }

.comp-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background .12s;
}
.comp-table tbody tr:last-child { border-bottom: none; }
.comp-table tbody tr:hover { background: #f5f8ff; }

.comp-table td {
  padding: 12px 20px; font-size: 13.5px; color: var(--text);
}

/* Fila con valor */
.comp-table tbody tr.has-value .col-detalle { font-weight: 500; }
.comp-table tbody tr.has-value .monto-mensual {
  color: var(--pj-blue); font-weight: 600;
}
.comp-table tbody tr.has-value .monto-anual {
  color: var(--pj-blue-dk); font-weight: 600;
}

/* Celda anual sin valor mensual */
.comp-table tbody td.monto-na { color: #ccc9d4; font-weight: 400; }

/* Celda de periodo anterior (referencia, menos peso visual) */
.comp-table tbody tr.has-value .monto-anterior {
  color: var(--text-muted); font-weight: 500; font-size: 12.5px;
}

/* ── Tarjeta Seguro Médico ───────────────────────────────── */
.seguro-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--pj-blue);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  margin-bottom: 12px; overflow: hidden;
}
.seguro-header {
  display: flex; align-items: center; gap: 18px;
  padding: 18px 24px;
}
.seguro-icon { font-size: 28px; line-height: 1; flex-shrink: 0; }
.seguro-info { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.seguro-title { font-size: 14px; font-weight: 600; color: var(--text); }
.seguro-sub   { font-size: 11.5px; color: var(--text-muted); }
.seguro-plan-wrap {
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
  flex-shrink: 0;
}
.seguro-plan-label {
  font-size: 9.5px; font-weight: 600; color: #aaa9b3;
  text-transform: uppercase; letter-spacing: .6px;
}
.seguro-plan-badge {
  background: var(--pj-blue); color: #fff;
  font-size: 15px; font-weight: 700;
  padding: 4px 16px; border-radius: 6px;
  letter-spacing: .08em; text-transform: uppercase;
}
/* Franja de primas */
.seguro-primas {
  display: none;
  border-top: 1px solid var(--border);
}
.seguro-prima-item {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  gap: 4px; padding: 14px 12px;
  border-right: 1px solid var(--border);
  transition: background .15s;
}
.seguro-prima-item:last-child { border-right: none; }
.seguro-prima-label {
  font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .7px;
  color: var(--text-muted);
}
.seguro-prima-monto {
  font-size: 15px; font-weight: 700; color: var(--text);
  letter-spacing: -.01em;
}
.seguro-prima-tuplan {
  font-size: 10px; font-weight: 600; color: var(--pj-blue);
  display: none;
}
.seguro-prima-item.active { background: #f0f5ff; }
.seguro-prima-item.active .seguro-prima-label  { color: var(--pj-blue); }
.seguro-prima-item.active .seguro-prima-monto  { color: var(--pj-blue); }
.seguro-prima-item.active .seguro-prima-tuplan { display: block; }

/* Fila N/A */
.comp-table tbody tr.na-row td { color: var(--text-muted); }
.badge-na {
  display: inline-block;
  background: #f0f0f2; color: #9997a3;
  font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 4px;
  letter-spacing: .04em;
}

/* Total de sección */
.comp-table tfoot .total-row {
  background: #f5f8ff;
  border-top: 2px solid var(--pj-blue);
}
.comp-table tfoot .total-row td {
  color: var(--pj-blue); font-weight: 700;
  font-size: 13.5px; padding: 13px 20px;
}

/* ── Tarjeta Pensión ─────────────────────────────────────── */
.pension-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--pj-gray);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px 24px;
  margin-bottom: 12px;
}
.pension-header {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 18px;
}
.pension-icon { font-size: 28px; line-height: 1; flex-shrink: 0; }
.pension-info { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.pension-title { font-size: 14px; font-weight: 600; color: var(--text); }
.pension-sub   { font-size: 11.5px; color: var(--text-muted); }

.pension-corte-wrap {
  display: flex; flex-direction: column; align-items: flex-end; gap: 3px;
  flex-shrink: 0; margin-left: auto;
}
.pension-corte-label {
  font-size: 9.5px; font-weight: 600; color: #aaa9b3;
  text-transform: uppercase; letter-spacing: .6px;
}
.pension-corte-value {
  font-size: 13px; font-weight: 600; color: var(--pj-gray);
}

.pension-stats {
  display: flex; align-items: stretch;
  background: #f7f8fc;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.pension-stat-block {
  flex: 1; display: flex; flex-direction: column;
  gap: 6px; padding: 18px 20px;
}
.pension-stat-featured {
  background: #eef3ff;
  border-right: 1px solid var(--border);
}
.pension-vdivider {
  width: 1px; background: var(--border); flex-shrink: 0;
}
.pension-stat-label {
  font-size: 9.5px; font-weight: 600; color: #aaa9b3;
  text-transform: uppercase; letter-spacing: .6px;
}
.pension-stat-value {
  font-size: 18px; font-weight: 700;
  color: var(--pj-gray); letter-spacing: -.02em; line-height: 1.1;
}
.pension-stat-big {
  font-size: 24px; color: var(--pj-blue);
}
.pension-breakdown {
  display: flex; flex-direction: column; gap: 3px; margin-top: 4px;
}
.pension-breakdown-item {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; color: var(--text-muted);
}
.pension-breakdown-item strong { color: var(--text); font-weight: 600; }
.pension-breakdown-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
}
.dot-empleado { background: var(--pj-blue); }
.dot-inst     { background: var(--pj-red); }

/* ── Beneficios No Monetarios ────────────────────────────── */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.benefit-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 18px 16px;
  display: flex; flex-direction: column; gap: 6px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: box-shadow .18s, transform .18s, border-color .18s;
}
.benefit-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--pj-blue);
}
.benefit-card:focus-visible {
  outline: 3px solid rgba(0,80,221,.3);
  outline-offset: 2px;
}
.benefit-icon  { font-size: 26px; line-height: 1; }
.benefit-label {
  font-size: 13px; font-weight: 600; color: var(--text);
  line-height: 1.3; margin-top: 4px; flex: 1;
}
.benefit-desc  { font-size: 11.5px; color: var(--text-muted); line-height: 1.4; }
.benefit-cta {
  display: flex; align-items: center; gap: 4px;
  font-size: 11.5px; font-weight: 600; color: var(--pj-blue);
  margin-top: 8px; opacity: 0;
  transition: opacity .15s;
}
.benefit-card:hover .benefit-cta,
.benefit-card:focus-visible .benefit-cta { opacity: 1; }

/* ── Modal de detalle ─────────────────────────────────────── */
.benefit-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(10,12,30,.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 600; padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity .22s;
}
.benefit-modal-overlay.open { opacity: 1; pointer-events: auto; }
.benefit-modal {
  background: var(--surface);
  border-radius: 18px;
  max-width: 540px; width: 100%;
  max-height: 88vh; overflow-y: auto;
  box-shadow: 0 32px 80px rgba(0,0,0,.22), 0 4px 16px rgba(0,0,0,.1);
  transform: translateY(20px) scale(.96);
  transition: transform .3s cubic-bezier(.34,1.4,.64,1);
}
.benefit-modal-overlay.open .benefit-modal { transform: translateY(0) scale(1); }

/* Header azul suave — layout horizontal, sticky al hacer scroll */
.benefit-modal-header {
  background: #f0f5ff;
  border-radius: 18px 18px 0 0;
  padding: 20px 56px 20px 20px;
  position: sticky; top: 0; z-index: 1;
  display: flex; flex-direction: row; align-items: flex-start; gap: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.benefit-modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 30px; height: 30px; border-radius: 8px;
  border: 1px solid rgba(0,80,221,.2); background: rgba(255,255,255,.7);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--pj-blue);
  transition: background .12s, border-color .12s;
}
.benefit-modal-close:hover { background: #fff; border-color: var(--pj-blue); }
.benefit-modal-close:focus-visible { outline: 3px solid rgba(0,80,221,.3); outline-offset: 2px; }
.benefit-modal-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: rgba(255,255,255,.85);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; line-height: 1; flex-shrink: 0;
}
.benefit-modal-text { flex: 1; display: flex; flex-direction: column; gap: 4px; padding-top: 2px; }
.benefit-modal-title {
  font-size: 16px; font-weight: 700; color: var(--text);
  letter-spacing: -.02em; line-height: 1.25; margin: 0;
}
.benefit-modal-subtitle {
  font-size: 12px; color: var(--text-muted); line-height: 1.45; margin: 0;
}

/* Cuerpo */
.benefit-modal-body {
  padding: 0; display: flex; flex-direction: column;
}
.bm-section {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.bm-section:last-child { border-bottom: none; }
.bm-section-title {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px;
  color: var(--text-muted); margin-bottom: 12px;
}
.bm-items { display: flex; flex-direction: column; gap: 9px; }
.bm-item {
  display: flex; align-items: baseline; gap: 10px;
  font-size: 13.5px; color: var(--text); line-height: 1.55;
}
.bm-item::before {
  content: '✓';
  color: var(--pj-blue); font-weight: 700;
  flex-shrink: 0; font-size: 12px;
}

/* Footer de contacto */
.benefit-modal-footer {
  padding: 14px 20px;
  background: #f8f9fc;
  border-top: 1px solid var(--border);
  border-radius: 0 0 18px 18px;
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; color: var(--text-muted);
  line-height: 1.4;
}

/* ── Bolante de Pago ─────────────────────────────────────── */
.bolante-loading {
  display: flex; align-items: center; gap: 12px;
  padding: 32px 24px; color: var(--text-muted); font-size: 14px;
}
.bolante-spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--border); border-top-color: var(--pj-blue);
  animation: spin .8s linear infinite; flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
.bolante-error {
  padding: 16px 20px; color: #c0392b;
  background: #fdf2f2; border-radius: 10px; font-size: 13px;
}

/* Documento */
.bolante-doc {
  border: 1px solid var(--border); border-radius: 14px;
  overflow: hidden; background: var(--surface);
}

/* Cabecera periodo + recibo */
.bol-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 24px; border-bottom: 1px solid var(--border);
  background: #f0f4ff;
  border-left: 4px solid var(--pj-blue);
}
.bol-head-periodo, .bol-head-recibo {
  display: flex; flex-direction: column; gap: 2px;
}
.bol-head-recibo { align-items: flex-end; }
.bol-head-label {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .07em; color: var(--text-muted);
}
.bol-head-val {
  font-size: 15px; font-weight: 700; color: var(--text-main);
  text-transform: capitalize;
}
.bol-head-mono { font-family: monospace; font-size: 13px; letter-spacing: .04em; }

/* Secciones Ingresos / Deducciones / Aportes */
.bol-section { border-bottom: 1px solid var(--border); }
.bol-section-header {
  padding: 9px 24px; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em;
  border-bottom: 1px solid var(--border);
}
.bol-ing-header { color: #1a7340; background: #f0faf4; }
.bol-ded-header { color: #922b21; background: #fdf2f2; }
.bol-apt-header { color: var(--pj-blue); background: #eef3ff; }

/* Tabla de líneas */
.bol-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.bol-table td {
  padding: 9px 24px; border-bottom: 1px solid #f2f2f2;
  color: var(--text-main);
}
.bol-table tbody tr:last-child td { border-bottom: none; }
.bol-table td:last-child { text-align: right; white-space: nowrap; font-weight: 500; }

/* Fila de total por sección */
.bol-total-row td {
  padding: 10px 24px; background: var(--bg);
  border-top: 1px solid var(--border) !important;
  border-bottom: none !important;
  font-size: 12px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .04em;
}
.bol-total-val { font-size: 14px; color: var(--text-main) !important; }
.bol-total-ded { color: #922b21 !important; }
.bol-total-apt { color: var(--pj-blue) !important; }

/* Filas de deducción con fondo suave */
.bol-table-ded tbody tr td {
  background: #fff8f8;
}

/* Barra de proporción */
.bol-proporcion {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 24px; border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.bol-prop-bar-wrap {
  flex: 1; height: 6px; border-radius: 99px;
  background: #e8f5ee; overflow: hidden;
}
.bol-prop-bar {
  height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, #e74c3c, #c0392b);
  transition: width .6s ease;
  width: 0%;
}
.bol-prop-label {
  font-size: 11px; font-weight: 700; color: #922b21;
  white-space: nowrap; min-width: 110px; text-align: right;
}

/* Neto a recibir */
.bol-neto-wrap {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 24px;
  background: var(--surface);
  border-top: 3px solid var(--pj-blue);
}
.bol-neto-label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--text-muted);
}
.bol-neto-val {
  font-size: 28px; font-weight: 800; color: var(--pj-blue);
  letter-spacing: -.5px;
}

/* ── Convenios y Descuentos ──────────────────────────────── */
.convenios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.convenio-grupo-header {
  background: var(--pj-blue);
  color: rgba(255,255,255,.9);
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .6px;
  padding: 11px 20px;
}
.convenio-item-row {
  display: flex; align-items: center;
  padding: 11px 20px; gap: 12px;
  border-bottom: 1px solid var(--border);
  transition: background .12s;
}
.convenio-item-row--desc { align-items: flex-start; }
.convenio-item-main { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.convenio-item-desc { font-size: 12px; color: var(--text-muted); line-height: 1.45; }
.convenio-item-row:last-child { border-bottom: none; }
.convenio-item-row:hover { background: #f5f8ff; }
.convenio-item-nombre {
  flex: 1; font-size: 13px; color: var(--text);
}
.convenio-item-pct {
  font-size: 12.5px; font-weight: 700; color: var(--pj-blue);
  background: rgba(0,80,221,.08);
  padding: 3px 10px; border-radius: 6px;
  white-space: nowrap;
}

/* ── Total General ───────────────────────────────────────── */
.total-general-card {
  background: var(--pj-blue);
  border-radius: var(--radius);
  padding: 24px 32px;
  display: flex; align-items: center;
  justify-content: space-between;
  flex-wrap: wrap; gap: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
}
.tg-label {
  color: rgba(255,255,255,.8); font-size: 11px;
  text-transform: uppercase; letter-spacing: .8px;
  font-weight: 700;
}
.tg-cols {
  display: flex; align-items: center; gap: 0;
}
.tg-item  { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; padding: 0 28px; }
.tg-item:first-child { padding-left: 0; }
.tg-sep   { width: 1px; height: 40px; background: rgba(255,255,255,.25); }
.tg-sublabel {
  color: rgba(255,255,255,.6); font-size: 10px;
  text-transform: uppercase; letter-spacing: .6px;
}
.tg-value { color: #fff; font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.tg-value.tg-anual { color: #7eb8ff; }

/* ── Nota ────────────────────────────────────────────────── */
.footnote {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--pj-gray);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex; flex-direction: column; gap: 5px;
}
.footnote p { font-size: 11.5px; color: var(--text-muted); line-height: 1.5; }

/* ── Footer ──────────────────────────────────────────────── */
.footer {
  background: var(--pj-blue);
  text-align: center; padding: 18px;
  color: rgba(255,255,255,.45); font-size: 12px;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 700px) {
  .container          { padding: 0 16px; }
  .profile-body       { flex-direction: column; padding: 20px 18px; }
  .profile-vdivider   { width: 100%; height: 1px; margin: 18px 0; }
  .profile-stats      { width: 100%; flex-direction: row; gap: 0; }
  .stat-box           { flex: 1; }
  .stat-value         { font-size: 18px; }
  .stat-hdivider      { width: 1px; height: auto; margin: 0 14px; }
  .profile-avatar     { width: 72px; height: 72px; font-size: 22px; }
  .profile-nombre     { font-size: 15px; }
  .period-nav         { padding: 10px 14px; gap: 8px; }
  .period-chip        { padding: 5px 13px; font-size: 12px; }
  .period-more-btn    { padding: 5px 11px; font-size: 11px; }
  .period-chips       { gap: 5px; }
  .tg-cols            { width: 100%; justify-content: space-between; }
  .tg-item            { align-items: flex-start; }
  .tg-value           { font-size: 18px; }
  .total-general-card { padding: 18px 20px; }
  .comp-table td,
  .comp-table th      { padding: 10px 12px; font-size: 12.5px; }
  .benefits-grid      { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .benefit-cta        { opacity: 1; }
  .pension-stats      { flex-direction: column; }
  .pension-vdivider   { width: 100%; height: 1px; }
  .seguro-header      { flex-wrap: wrap; }
  .seguro-plan-wrap   { width: 100%; flex-direction: row; align-items: center; justify-content: space-between; }
  .seguro-prima-monto { font-size: 13px; }
  .seguro-prima-label { font-size: 9.5px; }
}
