/*====================================================
  HEADER - ESTILO DASHBOARD FINANCIERO
====================================================*/

.ph-header {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(4, 3, 74, 0.05);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

/* Línea superior decorativa institucional */
.ph-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #04034a 0%, #5b9f3b 100%);
}

/* LOGO DEL ASESOR */
.ph-header-logo {
    display: flex;
    align-items: center;
}

.ph-logo-placeholder {
    width: 140px;
    height: 52px;
    border-radius: 10px;
    border: 2px dashed #cbd5e1;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

/* TÍTULO CENTRAL Y MARCA */
.ph-header-title {
    text-align: center;
    flex: 1;
}

.ph-subtitle {
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    color: #5b9f3b;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 2px;
}

.ph-header-title h1 {
    font-size: 24px;
    font-weight: 800;
    color: #04034a;
    text-transform: uppercase;
    letter-spacing: -0.3px;
    line-height: 1.1;
    margin: 2px 0;
}

.ph-header-title p {
    font-size: 14px;
    font-weight: 700;
    color: #5b9f3b;
    margin: 0;
}

/* BOTÓN DESCARGAR PDF */
.ph-header-actions {
    display: flex;
    align-items: center;
}

.ph-btn-pdf {
    background: linear-gradient(135deg, #5b9f3b 0%, #46822a 100%);
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(91, 159, 59, 0.35);
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ph-btn-pdf:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(91, 159, 59, 0.45);
}

.ph-btn-pdf:active {
    transform: translateY(0);
}

/* OCULTAR BOTÓN EN LA IMPRESIÓN/PDF */
@media print {
    .ph-header-actions {
        display: none !important;
    }
}


/*====================================================
  SECCIÓN BASE & FICHA DEL PENSIONADO
====================================================*/

/* Contenedor principal de sección */
.ph-section {
    background: #ffffff;
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 24px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(4, 3, 74, 0.05);
}

/* Encabezado de la Sección */
.ph-section-title {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f5f9;
}

.ph-section-kicker {
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #5b9f3b; /* Verde institucional */
    font-weight: 800;
    display: block;
    margin-bottom: 3px;
}

.ph-section-title h2 {
    font-size: 20px;
    color: #04034a; /* Azul institucional */
    font-weight: 800;
    letter-spacing: -0.3px;
    margin: 0;
}

/* Grid de 2 columnas */
.ph-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* Tarjetas internas (Datos Personales e Información IMSS) */
.ph-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ph-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(4, 3, 74, 0.06);
}

.ph-card h3 {
    font-size: 15px;
    font-weight: 800;
    color: #04034a;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Indicador visual en el título de la tarjeta */
.ph-card h3::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 16px;
    background: #5b9f3b;
    border-radius: 4px;
}

/* TABLA DE INFORMACIÓN (Clave - Valor) */
.ph-table-info {
    width: 100%;
    border-collapse: collapse;
}

.ph-table-info tr {
    border-bottom: 1px dashed #cbd5e1;
}

.ph-table-info tr:last-child {
    border-bottom: none;
}

.ph-table-info td {
    padding: 10px 0;
    font-size: 13px;
    line-height: 1.4;
}

/* Etiqueta (Columna Izquierda) */
.ph-table-info td:first-child {
    color: #64748b;
    font-weight: 600;
    width: 50%;
}

/* Valor (Columna Derecha) */
.ph-table-info td:last-child {
    color: #04034a;
    font-weight: 700;
    text-align: right;
}

/* Resaltado especial para el Salario Promedio */
.ph-table-info tr:last-child td:last-child {
    color: #04034a;
    font-size: 14px;
    font-weight: 800;
}


/*====================================================
  SECCIÓN: MODALIDAD 40
====================================================*/

/* GRID DE 5 CAJAS SUPERIORES (Métricas) */
.ph-m40-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.ph-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.ph-box:hover {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(4, 3, 74, 0.05);
}

.ph-box span {
    font-size: 11px;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.2;
    margin-bottom: 6px;
    height: 26px;
    display: flex;
    align-items: center;
}

.ph-box strong {
    font-size: 17px;
    color: #04034a;
    font-weight: 800;
    line-height: 1.1;
}

.ph-box small {
    font-size: 11px;
    color: #5b9f3b; /* Verde institucional */
    font-weight: 700;
    margin-top: 4px;
}

/* GRID INFERIOR (Asignaciones vs Pensión Final) */
.ph-ley-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 20px;
    align-items: stretch;
}

/* Tarjeta de Asignaciones de Ley */
.ph-law-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e2e8f0;
}

.ph-law-card h3 {
    font-size: 15px;
    font-weight: 800;
    color: #04034a;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

.ph-law-card table {
    width: 100%;
    border-collapse: collapse;
}

.ph-law-card tr {
    border-bottom: 1px dashed #cbd5e1;
}

.ph-law-card tr:last-child {
    border-bottom: none;
}

.ph-law-card td {
    padding: 8px 4px;
    font-size: 13px;
}

.ph-law-card td:first-child {
    font-weight: 600;
    color: #1e293b;
}

.ph-law-card td:nth-child(2) {
    text-align: center;
    font-weight: 700;
    color: #5b9f3b;
    font-size: 12px;
}

.ph-law-card td:last-child {
    text-align: right;
    font-weight: 700;
    color: #04034a;
}

/* TARJETA DESTACADA: PENSIÓN FINAL (HERO CARD) */
.ph-pension-card {
    background: linear-gradient(180deg, #ffffff 0%, #f4fbf1 100%);
    border: 2px solid #5b9f3b;
    border-radius: 14px;
    padding: 24px 20px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(91, 159, 59, 0.15);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.ph-pension-card span {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #64748b;
    font-weight: 700;
}

.ph-pension-card strong {
    font-size: 22px;
    color: #04034a;
    font-weight: 800;
    margin-top: 4px;
}

.ph-pension-card hr {
    border: none;
    height: 1px;
    background: #dcfce7;
    width: 80%;
    margin: 16px 0;
}

.ph-pension-card strong.verde {
    font-size: 38px;
    color: #5b9f3b;
    font-weight: 800;
    line-height: 1;
    margin-top: 6px;
    letter-spacing: -1px;
}

/* Adaptación responsiva para grids compactos */
@media (max-width: 1024px) {
    .ph-m40-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .ph-ley-grid {
        grid-template-columns: 1fr;
    }
}


/*====================================================
  SECCIÓN: COMPARATIVA & GRÁFICA DE BARRAS
====================================================*/

/* Grid principal de las dos tarjetas de gráficas */
.ph-impacto {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.ph-bar-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e2e8f0;
}

.ph-bar-card h3 {
    font-size: 15px;
    font-weight: 800;
    color: #04034a;
    margin-bottom: 18px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

/* Fila individual de la gráfica (Etiqueta + Barra + Monto) */
.ph-bar-row {
    display: grid;
    grid-template-columns: 130px 1fr 110px;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.ph-bar-row:last-child {
    margin-bottom: 0;
}

.ph-bar-row span {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    line-height: 1.2;
}

/* CONTENEDOR DE LA BARRA (TRACK) */
.ph-bar {
    width: 100%;
    height: 20px;
    background: #e2e8f0;
    border-radius: 50px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* RELLENO DE LA BARRA (LLENADO) */
.ph-fill {
    height: 100%;
    display: block;
    border-radius: 50px;
    transition: width 0.8s ease-in-out;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
}

/* Color Barra Sin Modalidad 40 (Azul) */
.ph-fill.azul {
    background: linear-gradient(90deg, #4f7dff 0%, #04034a 100%) !important;
}

/* Color Barra Con Modalidad 40 (Verde Institucional) */
.ph-fill.verde {
    background: linear-gradient(90deg, #7fd957 0%, #5b9f3b 100%) !important;
    box-shadow: 0 0 10px rgba(91, 159, 59, 0.4);
}

/* Valor numérico al final de la barra */
.ph-bar-row strong {
    font-size: 14px;
    font-weight: 800;
    color: #04034a;
    text-align: right;
    white-space: nowrap;
}

/*====================================================
  BLOQUE DESTACADO ROI (RETORNO DE INVERSIÓN)
====================================================*/

.ph-roi {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    background: linear-gradient(135deg, #04034a 0%, #0c0866 100%);
    border-radius: 14px;
    padding: 22px 20px;
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(4, 3, 74, 0.15);
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
}

.ph-roi > div {
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, 0.12);
    padding: 0 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.ph-roi > div:last-child {
    border-right: none;
}

.ph-roi span {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 700;
    margin-bottom: 6px;
}

.ph-roi strong {
    display: block;
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.ph-roi small {
    display: inline-block;
    background: rgba(127, 217, 87, 0.2);
    color: #7fd957;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 12px;
    margin-top: 6px;
    border: 1px solid rgba(127, 217, 87, 0.3);
}

/* Adaptabilidad Responsiva */
@media (max-width: 900px) {
    .ph-impacto {
        grid-template-columns: 1fr;
    }
    .ph-roi {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .ph-roi > div:nth-child(2) {
        border-right: none;
    }
}

/*====================================================
  SECCIÓN: TABLA DE CUOTAS MODALIDAD 40
====================================================*/

/* CARDS DE RESUMEN DE CUOTAS (4 Columnas) */
.ph-cuotas-resumen {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

.ph-cuota-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
    text-align: center;
    transition: all 0.2s ease;
}

.ph-cuota-card:hover {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(4, 3, 74, 0.05);
}

.ph-cuota-card span {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.ph-cuota-card strong {
    display: block;
    font-size: 18px;
    font-weight: 800;
    color: #04034a;
    line-height: 1.1;
}

/* TABLA FINANCIERA DE CUOTAS */
.ph-cuotas-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    margin-top: 8px;
}

/* Cabecera Azul Institucional */
.ph-cuotas-table thead {
    background: #04034a;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
}

.ph-cuotas-table th {
    color: #ffffff;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Alineaciones profesionales por columna */
.ph-cuotas-table th:nth-child(1), .ph-cuotas-table td:nth-child(1),
.ph-cuotas-table th:nth-child(2), .ph-cuotas-table td:nth-child(2),
.ph-cuotas-table th:nth-child(4), .ph-cuotas-table td:nth-child(4) {
    text-align: center; /* Año, % IMSS y Días centrados */
}

.ph-cuotas-table th:nth-child(3), .ph-cuotas-table td:nth-child(3),
.ph-cuotas-table th:nth-child(5), .ph-cuotas-table td:nth-child(5),
.ph-cuotas-table th:nth-child(6), .ph-cuotas-table td:nth-child(6) {
    text-align: right; /* Importes monetarios alineados a la derecha */
}

/* Filas de datos */
.ph-cuotas-table td {
    padding: 12px 16px;
    font-size: 13px;
    color: #1e293b;
    border-bottom: 1px solid #f1f5f9;
}

.ph-cuotas-table tbody tr:last-child td {
    border-bottom: none;
}

/* Filas alternadas (Zebra Striping) */
.ph-cuotas-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.ph-cuotas-table tbody tr:hover {
    background: #f4fbf1; /* Ligero toque verde al pasar el cursor */
}

/* Columna de % IMSS destacado */
.ph-cuotas-table td:nth-child(2) {
    font-weight: 700;
    color: #5b9f3b;
}

/* Columna de Total Anual Destacado */
.ph-cuotas-table td:last-child {
    font-weight: 800;
    color: #04034a;
}

/* Responsivo para pantallas pequeñas */
@media (max-width: 768px) {
    .ph-cuotas-resumen {
        grid-template-columns: repeat(2, 1fr);
    }
}


/*====================================================
  PENSION HUB - EXECUTIVE INFOGRAPHIC REPORT (FULL)
  Colores Institucionales: #04034a (Azul) | #5b9f3b (Verde)
====================================================*/

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* RESET & PRINT FIX */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
    background-color: #f3f5f9;
    color: #1e293b;
}

/* 1. HEADER */
.ph-header {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(4, 3, 74, 0.05);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.ph-header::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #04034a 0%, #5b9f3b 100%);
}

.ph-header-logo { display: flex; align-items: center; }

.ph-logo-placeholder {
    width: 140px;
    height: 52px;
    border-radius: 10px;
    border: 2px dashed #cbd5e1;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.ph-header-title { text-align: center; flex: 1; }

.ph-subtitle {
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    color: #5b9f3b;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 2px;
}

.ph-header-title h1 {
    font-size: 24px;
    font-weight: 800;
    color: #04034a;
    text-transform: uppercase;
    letter-spacing: -0.3px;
    line-height: 1.1;
    margin: 2px 0;
}

.ph-header-title p {
    font-size: 14px;
    font-weight: 700;
    color: #5b9f3b;
}

.beneficio-acumulado{
    color: #7fd957 !important;
    font-size: 17px;
    margin-top: 15px;
    margin-bottom: 10px;

}

.ph-header-actions { display: flex; align-items: center; }

.ph-btn-pdf {
    background: linear-gradient(135deg, #5b9f3b 0%, #46822a 100%);
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(91, 159, 59, 0.35);
    transition: all 0.25s ease;
}

.ph-btn-pdf:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(91, 159, 59, 0.45);
}

/* 2. ESTRUCTURA DE SECCIONES BASE */
.ph-section {
    background: #ffffff;
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 24px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(4, 3, 74, 0.05);
}

.ph-section-title {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f5f9;
}

.ph-section-kicker {
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #5b9f3b;
    font-weight: 800;
    display: block;
    margin-bottom: 3px;
}

.ph-section-title h2 {
    font-size: 20px;
    color: #04034a;
    font-weight: 800;
    letter-spacing: -0.3px;
}

/* 3. FICHA DEL PENSIONADO */
.ph-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.ph-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e2e8f0;
}

.ph-card h3 {
    font-size: 15px;
    font-weight: 800;
    color: #04034a;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ph-card h3::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 16px;
    background: #5b9f3b;
    border-radius: 4px;
}

.ph-table-info { width: 100%; border-collapse: collapse; }
.ph-table-info tr { border-bottom: 1px dashed #cbd5e1; }
.ph-table-info tr:last-child { border-bottom: none; }
.ph-table-info td { padding: 10px 0; font-size: 13px; }
.ph-table-info td:first-child { color: #64748b; font-weight: 600; width: 50%; }
.ph-table-info td:last-child { color: #04034a; font-weight: 700; text-align: right; }

/* 4. MODALIDAD 40 */
.ph-m40-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.ph-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ph-box span {
    font-size: 11px;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 6px;
    height: 26px;
    display: flex;
    align-items: center;
}

.ph-box strong { font-size: 17px; color: #04034a; font-weight: 800; }
.ph-box small { font-size: 11px; color: #5b9f3b; font-weight: 700; margin-top: 4px; }

.ph-ley-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 20px;
}

.ph-law-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e2e8f0;
}

.ph-law-card h3 {
    font-size: 15px;
    font-weight: 800;
    color: #04034a;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

.ph-law-card table { width: 100%; border-collapse: collapse; }
.ph-law-card tr { border-bottom: 1px dashed #cbd5e1; }
.ph-law-card tr:last-child { border-bottom: none; }
.ph-law-card td { padding: 8px 4px; font-size: 13px; }
.ph-law-card td:first-child { font-weight: 600; color: #1e293b; }
.ph-law-card td:nth-child(2) { text-align: center; font-weight: 700; color: #5b9f3b; font-size: 12px; }
.ph-law-card td:last-child { text-align: right; font-weight: 700; color: #04034a; }

.ph-pension-card {
    background: linear-gradient(180deg, #ffffff 0%, #f4fbf1 100%);
    border: 2px solid #5b9f3b;
    border-radius: 14px;
    padding: 24px 20px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(91, 159, 59, 0.15);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.ph-pension-card span { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: #64748b; font-weight: 700; }
.ph-pension-card strong { font-size: 22px; color: #04034a; font-weight: 800; margin-top: 4px; }
.ph-pension-card hr { border: none; height: 1px; background: #dcfce7; width: 80%; margin: 16px 0; }
.ph-pension-card strong.verde { font-size: 38px; color: #5b9f3b; font-weight: 800; line-height: 1; letter-spacing: -1px; }

/* 5. COMPARATIVA Y BARRAS */
.ph-impacto { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 20px; }
.ph-bar-card { background: #f8fafc; border-radius: 12px; padding: 20px; border: 1px solid #e2e8f0; }
.ph-bar-card h3 { font-size: 15px; font-weight: 800; color: #04034a; margin-bottom: 18px; padding-bottom: 8px; border-bottom: 2px solid #e2e8f0; }

.ph-bar-row { display: grid; grid-template-columns: 130px 1fr 110px; align-items: center; gap: 12px; margin-bottom: 16px; }
.ph-bar-row:last-child { margin-bottom: 0; }
.ph-bar-row span { font-size: 12px; font-weight: 700; color: #64748b; }

.ph-bar {
    width: 100%; height: 20px; background: #e2e8f0; border-radius: 50px; overflow: hidden; position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.ph-fill { height: 100%; display: block; border-radius: 50px; }
.ph-fill.azul { background: linear-gradient(90deg, #4f7dff 0%, #04034a 100%) !important; }
.ph-fill.verde { background: linear-gradient(90deg, #7fd957 0%, #5b9f3b 100%) !important; box-shadow: 0 0 10px rgba(91, 159, 59, 0.4); }
.ph-bar-row strong { font-size: 14px; font-weight: 800; color: #04034a; text-align: right; }

.ph-roi {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
    background: linear-gradient(135deg, #04034a 0%, #0c0866 100%);
    border-radius: 14px; padding: 22px 20px; color: #ffffff;
}

.ph-roi > div { text-align: center; border-right: 1px solid rgba(255, 255, 255, 0.12); padding: 0 10px; }
.ph-roi > div:last-child { border-right: none; }
.ph-roi span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px; color: rgba(255, 255, 255, 0.75); font-weight: 700; margin-bottom: 6px; }
.ph-roi strong { display: block; font-size: 22px; font-weight: 800; color: #ffffff; }
.ph-roi small { display: inline-block; background: rgba(127, 217, 87, 0.2); color: #7fd957; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 12px; margin-top: 6px; }

/* 6. TABLA DE CUOTAS */
.ph-cuotas-resumen { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.ph-cuota-card { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 14px 16px; text-align: center; }
.ph-cuota-card span { display: block; font-size: 11px; font-weight: 700; color: #64748b; text-transform: uppercase; margin-bottom: 4px; }
.ph-cuota-card strong { display: block; font-size: 18px; font-weight: 800; color: #04034a; }

.ph-cuotas-table { width: 100%; border-collapse: separate; border-spacing: 0; border-radius: 12px; overflow: hidden; border: 1px solid #e2e8f0; margin-top: 8px; }
.ph-cuotas-table thead { background: #04034a; }
.ph-cuotas-table th { color: #ffffff; padding: 12px 16px; font-size: 12px; font-weight: 700; text-transform: uppercase; }
.ph-cuotas-table th:nth-child(1), .ph-cuotas-table td:nth-child(1),
.ph-cuotas-table th:nth-child(2), .ph-cuotas-table td:nth-child(2),
.ph-cuotas-table th:nth-child(4), .ph-cuotas-table td:nth-child(4) { text-align: center; }
.ph-cuotas-table th:nth-child(3), .ph-cuotas-table td:nth-child(3),
.ph-cuotas-table th:nth-child(5), .ph-cuotas-table td:nth-child(5),
.ph-cuotas-table th:nth-child(6), .ph-cuotas-table td:nth-child(6) { text-align: right; }
.ph-cuotas-table td { padding: 12px 16px; font-size: 13px; color: #1e293b; border-bottom: 1px solid #f1f5f9; }
.ph-cuotas-table tbody tr:nth-child(even) { background: #f8fafc; }
.ph-cuotas-table td:nth-child(2) { font-weight: 700; color: #5b9f3b; }
.ph-cuotas-table td:last-child { font-weight: 800; color: #04034a; }

/* 7. BENEFICIO & ROI FINAL */
.ph-beneficio { display: flex; flex-direction: column; gap: 20px; }
.ph-beneficio-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ph-beneficio-card { flex: 1; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 18px 14px; text-align: center; }
.ph-beneficio-card span { display: block; font-size: 11px; text-transform: uppercase; font-weight: 700; color: #64748b; margin-bottom: 6px; }
.ph-beneficio-card strong { display: block; font-size: 20px; font-weight: 800; color: #04034a; }

.ph-beneficio-card.success { background: linear-gradient(180deg, #ffffff 0%, #f4fbf1 100%); border-color: #5b9f3b; }
.ph-beneficio-card.success strong { color: #5b9f3b; }

.ph-beneficio-card.green { background: linear-gradient(135deg, #5b9f3b 0%, #46822a 100%); border-color: #5b9f3b; color: #ffffff; }
.ph-beneficio-card.green span { color: rgba(255, 255, 255, 0.85); }
.ph-beneficio-card.green strong { color: #ffffff; }

.ph-beneficio-arrow { font-size: 20px; font-weight: bold; color: #5b9f3b; transform: rotate(-90deg); }

.ph-beneficio-acumulado {
    background: linear-gradient(135deg, #04034a 0%, #0c0866 100%);
    border-radius: 14px; padding: 24px; color: #ffffff; text-align: center;
}

.ph-beneficio-acumulado h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: rgba(255, 255, 255, 0.8); font-weight: 700; margin-bottom: 18px; }
.ph-acumulado-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ph-acumulado-grid > div { background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 12px; padding: 16px 12px; }
.ph-acumulado-grid small { display: block; font-size: 11px; text-transform: uppercase; color: #7fd957; font-weight: 800; margin-bottom: 6px; }
.ph-acumulado-grid strong { display: block; font-size: 24px; font-weight: 800; color: #ffffff; }

/* REGLAS DE IMPRESIÓN Y EXPORTACIÓN PDF */
@media print {
    body { background: #ffffff !important; }
    .ph-btn-pdf { display: none !important; }
    .ph-section { page-break-inside: avoid; break-inside: avoid; box-shadow: none !important; border: 1px solid #cbd5e1 !important; }
}


/*====================================================
  GRÁFICA BARRAS VERTICALES (ELEVATED DASHBOARD)
====================================================*/

.ph-impacto-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.ph-chart-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 22px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(4, 3, 74, 0.03);
    display: flex;
    flex-direction: column;
}

.ph-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.ph-chart-header h3 {
    font-size: 16px;
    font-weight: 800;
    color: #04034a;
    margin: 0;
}

.ph-chart-header p {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

.ph-growth-badge {
    background: #eef8ea;
    color: #5b9f3b;
    font-size: 12px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid rgba(91, 159, 59, 0.2);
}

/* CONTENEDOR DE LA GRÁFICA VERTICAL */
.ph-vchart-box {
    position: relative;
    background: #f8fafc;
    border-radius: 12px;
    padding: 25px 20px 15px 20px;
    border: 1px solid #f1f5f9;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

/* Líneas de guía de fondo (Grid Lines) */
.ph-chart-grid-lines {
    position: absolute;
    top: 25px;
    left: 20px;
    right: 20px;
    bottom: 45px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: none;
}

.ph-chart-grid-lines span {
    border-bottom: 1px dashed #e2e8f0;
    width: 100%;
}

/* ESTRUCTURA DE COLUMNAS VERTICALES */
.ph-vchart-bars {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 180px;
}

.ph-vcol {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
    width: 90px;
}

/* Valores monetarios encima de cada columna */
.ph-vcol-value {
    font-size: 13px;
    font-weight: 800;
    color: #04034a;
    margin-bottom: 8px;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.ph-vcol-value.verde {
    color: #5b9f3b;
    font-size: 14px;
}

/* Riel de la columna */
.ph-vcol-track {
    width: 48px;
    height: 120px;
    background: #e2e8f0;
    border-radius: 10px 10px 0 0;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.06);
}

/* Relleno vertical con gradientes */
.ph-vcol-fill {
    width: 100%;
    border-radius: 10px 10px 0 0;
    transition: height 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
}

.ph-vcol-fill.azul {
    background: linear-gradient(180deg, #4f7dff 0%, #04034a 100%) !important;
}

.ph-vcol-fill.verde {
    background: linear-gradient(180deg, #7fd957 0%, #5b9f3b 100%) !important;
    box-shadow: 0 -4px 12px rgba(91, 159, 59, 0.4);
}

/* Etiquetas inferiores */
.ph-vcol-label {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ph-vcol-label.verde {
    color: #5b9f3b;
    font-weight: 800;
}

/* Conector central entre columnas */
.ph-vcol-connector {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px;
    padding-bottom: 20px;
}

.ph-connector-arrow {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #5b9f3b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* Adaptabilidad Responsiva */
@media (max-width: 1200px) {
    .ph-impacto-grid {
        grid-template-columns: 1fr;
    }
}


/*====================================================
  AVISO DE PENSIÓN MÍNIMA GARANTIZADA (ART. 168)
====================================================*/

.ph-pmg-notice {
    background: linear-gradient(135deg, #fffbeeb3 0%, #ffffff 100%);
    border: 1.5px solid #f59e0b;
    border-radius: 12px;
    padding: 12px 14px;
    margin-top: 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-align: left;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
}

.ph-pmg-icon {
    font-size: 20px;
    line-height: 1;
}

.ph-pmg-notice strong {
    color: #b45309;
    font-size: 12px;
    display: block;
    margin-bottom: 3px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.ph-pmg-notice p {
    color: #78350f;
    font-size: 11px;
    line-height: 1.4;
    margin: 0;
}

/* En la exportación a PDF se muestra limpio */
@media print {
    .ph-pmg-notice {
        border-color: #cbd5e1 !important;
        background: #f8fafc !important;
    }
}

/*====================================================
  FIX: BADGE DE "✓ GUARDADO" HORIZONTAL SEGURO
====================================================*/

.ph-saved-check,
.ph-saved-badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    width: auto !important; /* Permite expansión a lo ancho */
    height: auto !important;
    padding: 4px 10px !important;
    border-radius: 20px !important;
    background: #eef8ea !important;
    border: 1px solid rgba(91, 159, 59, 0.3) !important;
    color: #5b9f3b !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    white-space: nowrap !important; /* IMPIDE SALTOS DE LÍNEA VERTICALES */
    line-height: 1 !important;
    vertical-align: middle !important;
}