/*==================================================
      PENSIONHUB CRM - MÓDULO FICHA Y LISTA DE CLIENTES
==================================================*/

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

.phcrm-clients {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    color: #0f172a;
    max-width: 1100px;
    margin: 0 auto;
}

/* Encabezados generales del CRM */
.phcrm-clients h2,
#contenidoPestana h3 {
    color: #04034a;
    font-size: 22px;
    font-weight: 800;
    margin-top: 0;
    margin-bottom: 18px;
    letter-spacing: -0.4px;
}

.phcrm-clients h3 {
    color: #04034a;
    font-size: 16px;
    font-weight: 800;
    margin-top: 20px;
    margin-bottom: 12px;
}

/*==================================================
     BARRA SUPERIOR DE BÚSQUEDA Y NUEVO CLIENTE
==================================================*/

.phcrm-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.phcrm-search-box {
    flex: 1;
    min-width: 280px;
}

#buscarCliente {
    width: 100%;
    padding: 12px 18px;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: all 0.25s ease;
    background-color: #ffffff;
    box-sizing: border-box;
}

#buscarCliente:focus {
    border-color: #5b9f3b;
    box-shadow: 0 0 0 4px rgba(91, 159, 59, 0.15);
}

#contadorClientes {
    font-size: 12px;
    color: #64748b;
    font-weight: 700;
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Botón + Nuevo Cliente */
#phcrm-new-client,
#btnGuardarCliente {
    background: linear-gradient(135deg, #5b9f3b 0%, #48842e 100%);
    color: #ffffff;
    border: none;
    padding: 13px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(91, 159, 59, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#phcrm-new-client:hover,
#btnGuardarCliente:hover {
    background: linear-gradient(135deg, #4b8730 0%, #3c6e26 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(91, 159, 59, 0.45);
}

#btnLimpiarCliente {
    background: #f0f4f9;
    color: #04034a;
    border: 1.5px solid #d5e0eb;
    padding: 13px 22px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s ease;
    margin-left: 8px;
}

#btnLimpiarCliente:hover {
    background: #e2ebf5;
    border-color: #b8cde0;
}

/*==================================================
    FORMULARIO REGISTRO DE CLIENTE (MODAL / CARD)
==================================================*/

#phcrm-client-form {
    background: #ffffff;
    border-radius: 20px;
    padding: 32px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 12px 35px rgba(4, 3, 74, 0.08);
    margin-bottom: 35px;
    position: relative;
    overflow: hidden;
}

#phcrm-client-form::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #04034a 0%, #5b9f3b 100%);
}

#phcrm-client-form p {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 12px;
}

/* ZONA DE CARGA DE PDF (DRAG & DROP ZONE) */
#phcrm-pdf {
    width: 100%;
    padding: 16px;
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-sizing: border-box;
    font-size: 13px;
    color: #64748b;
}

#phcrm-pdf:hover {
    background: #eef8ea;
    border-color: #5b9f3b;
    color: #5b9f3b;
}

/* Barra de Carga PDF */
#estadoCargaPDF {
    background: #f8fafc;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

#barraCargaPDF {
    background: linear-gradient(90deg, #5b9f3b, #74bf4f) !important;
}

#mensajeCargaPDF {
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
    margin-top: 8px;
    margin-bottom: 0;
}

/* Formulario Manual en Grid (2 Columnas) */
#phcrm-client-form input[type="text"],
#phcrm-client-form input[type="date"] {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 16px;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    transition: all 0.25s ease;
    background-color: #ffffff;
}

#phcrm-client-form input:focus {
    border-color: #5b9f3b;
    box-shadow: 0 0 0 4px rgba(91, 159, 59, 0.15);
    outline: none;
}

#phcrm-client-form hr {
    border: none;
    height: 1px;
    background: #e2e8f0;
    margin: 24px 0;
}

/* Vista previa del historial laboral detectado */
#vistaPreviaHistorial {
    background: #f8fafc;
    border: 1.5px dashed #cbd5e1;
    border-radius: 14px;
    padding: 20px;
    color: #64748b;
    font-size: 13px;
    text-align: center;
}

/*==================================================
        CONTENEDOR DE LA FICHA DEL CLIENTE
==================================================*/

#phcrm-ficha-cliente {
    background: #ffffff;
    border-radius: 20px;
    padding: 30px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 30px rgba(4, 3, 74, 0.07);
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

#phcrm-ficha-cliente::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 5px;
    background: linear-gradient(90deg, #04034a 0%, #5b9f3b 100%);
}

.phcrm-header {
    display: flex;
    align-items: center;
    gap: 22px;
    padding-bottom: 22px;
    border-bottom: 2px solid #f1f5f9;
    margin-bottom: 22px;
}

.phcrm-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #04034a 0%, #120e6e 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(4, 3, 74, 0.2);
    border: 3px solid #ffffff;
    outline: 2px solid #5b9f3b;
}

.phcrm-avatar svg {
    width: 30px;
    height: 30px;
}

.phcrm-info {
    flex: 1;
}

#clienteNombre {
    color: #04034a;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin: 0 0 8px 0;
    line-height: 1.1;
}

/* Insignias de Datos (NSS, CURP, Semanas) */
.phcrm-datos {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.phcrm-datos > span {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 12px;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.phcrm-datos > span strong {
    color: #04034a;
    font-weight: 700;
}

.phcrm-datos > span span {
    color: #1e293b;
    font-weight: 700;
}

/* Destacado Verde para Semanas */
.phcrm-datos > span:last-child {
    background: #eef8ea;
    border-color: rgba(91, 159, 59, 0.3);
}

.phcrm-datos > span:last-child strong,
.phcrm-datos > span:last-child span {
    color: #5b9f3b;
    font-weight: 800;
}

/* Pestañas de la Ficha */
.phcrm-tabs {
    display: flex;
    gap: 6px;
    background: #f1f5f9;
    padding: 6px;
    border-radius: 14px;
    margin-bottom: 24px;
    overflow-x: auto;
}

.phcrm-tab {
    flex: 1;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    background: transparent;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    text-align: center;
}

.phcrm-tab:hover {
    color: #04034a;
    background: rgba(255, 255, 255, 0.6);
}

.phcrm-tab.activo {
    background: #04034a;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(4, 3, 74, 0.2);
}

#contenidoPestana {
    min-height: 250px;
    animation: phcrmFadeIn 0.3s ease-in-out;
}

@keyframes phcrmFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/*==================================================
           TABLAS Y ACCIONES DEL HISTORIAL
==================================================*/

.phcrm-tabla {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    margin-bottom: 20px;
}

.phcrm-tabla th {
    background-color: #04034a;
    color: #ffffff;
    padding: 14px 16px;
    font-size: 12px;
    font-weight: 700;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.phcrm-tabla td {
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
    color: #334155;
    vertical-align: middle;
}

.phcrm-tabla tr:last-child td {
    border-bottom: none;
}

.phcrm-tabla tr:nth-child(even) {
    background-color: #f8fafc;
}

.phcrm-historial-acciones {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.phcrm-historial-acciones button {
    background: #ffffff;
    color: #04034a;
    border: 1.5px solid #cbd5e1;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
}

.phcrm-historial-acciones button:hover {
    border-color: #5b9f3b;
    color: #5b9f3b;
}

/* Tarjeta de Calculadoras */
.phcrm-calculos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.phcrm-calculadora {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.phcrm-calculadora h4 {
    margin-top: 0;
    color: #04034a;
    font-size: 18px;
    font-weight: 800;
}

#btnModalidad40 {
    background: #04034a;
    color: white;
    border: none;
    padding: 12px 22px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.25s ease;
}

#btnModalidad40:hover {
    background: #5b9f3b;
}

/* Adaptabilidad Responsiva */
@media (max-width: 768px) {
    .phcrm-top-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .phcrm-header {
        flex-direction: column;
        text-align: center;
    }
    .phcrm-datos {
        justify-content: center;
    }
    .phcrm-tabs {
        flex-direction: column;
    }
}

/*==================================================
  ESTILOS FORZADOS PARA LA TABLA DE #listaClientes
==================================================*/

#listaClientes {
    margin-top: 20px !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
}

/* Estilos de la tabla dentro de #listaClientes */
#listaClientes table,
#listaClientes .phcrm-tabla,
#listaClientes .phcrm-table,
.phcrm-clients table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    background: #ffffff !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03) !important;
    margin-top: 15px !important;
    margin-bottom: 20px !important;
}

/* Cabecera Azul Oscuro Corporativo */
#listaClientes table th,
#listaClientes .phcrm-tabla th,
#listaClientes .phcrm-table th,
.phcrm-clients table th {
    background-color: #04034a !important;
    color: #ffffff !important;
    padding: 14px 18px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-align: left !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* Celdas de la tabla */
#listaClientes table td,
#listaClientes .phcrm-tabla td,
#listaClientes .phcrm-table td,
.phcrm-clients table td {
    padding: 14px 18px !important;
    border-bottom: 1px solid #f1f5f9 !important;
    font-size: 13px !important;
    color: #334155 !important;
    vertical-align: middle !important;
}

#listaClientes table tr:last-child td,
#listaClientes .phcrm-tabla tr:last-child td {
    border-bottom: none !important;
}

/* Filas alternadas (Zebra) */
#listaClientes table tr:nth-child(even),
#listaClientes .phcrm-tabla tr:nth-child(even) {
    background-color: #f8fafc !important;
}

/* Efecto al pasar el cursor (Toque verde suave) */
#listaClientes table tr:hover,
#listaClientes .phcrm-tabla tr:hover {
    background-color: #f1f8ec !important;
}

/* Estilo para los botones Ver Ficha dentro de la tabla */
#listaClientes .btnVerCliente,
#listaClientes button {
    background: #5b9f3b !important;
    color: #ffffff !important;
    border: none !important;
    padding: 8px 16px !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    transition: all 0.25s ease !important;
}

#listaClientes .btnVerCliente:hover,
#listaClientes button:hover {
    background: #48842e !important;
    box-shadow: 0 4px 12px rgba(91, 159, 59, 0.3) !important;
}

/*====================================================
  SELECTOR DE MODO DE REGISTRO (PDF VS MANUAL)
====================================================*/

.phcrm-tab-modo {
    padding: 10px 18px;
    border-radius: 10px;
    border: 1.5px solid #cbd5e1;
    background: #f8fafc;
    color: #64748b;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.phcrm-tab-modo.activo {
    background: #04034a;
    color: #ffffff;
    border-color: #04034a;
    box-shadow: 0 4px 12px rgba(4, 3, 74, 0.2);
}

.phcrm-tab-modo:hover:not(.activo) {
    background: #ffffff;
    border-color: #5b9f3b;
    color: #5b9f3b;
}
/*====================================================
  AJUSTE DE TAMAÑO Y LEGIBILIDAD VISTA PREVIA HISTORIAL
====================================================*/

/* Contenedor con scroll horizontal para pantallas o tablas anchas */
#vistaPreviaHistorial {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px !important;
    padding: 16px !important;
    overflow-x: auto !important; /* Evita que la tabla se aplaste */
    margin-top: 15px !important;
}

#vistaPreviaHistorial table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    background: #ffffff !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    border: 1px solid #cbd5e1 !important;
}

/* Cabecera Azul Oscuro Corporativo */
#vistaPreviaHistorial th {
    background: #04034a !important;
    color: #ffffff !important;
    padding: 12px 10px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    white-space: nowrap !important;
}

/* Celdas de la tabla */
#vistaPreviaHistorial td {
    padding: 5px 2px !important;
    border-bottom: 1px solid #f1f5f9 !important;
    vertical-align: top !important;
}

/* Inputs de texto editables perfectamente visibles */
#vistaPreviaHistorial td input[type="text"],
#vistaPreviaHistorial td input[type="number"] {
    width: 100% !important;
    padding: 8px 10px !important; /* Espacio interno cómodo */
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    color: #0f172a !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
    outline: none !important;
    transition: all 0.2s ease !important;
}

#vistaPreviaHistorial td input:focus {
    border-color: #5b9f3b !important;
    box-shadow: 0 0 0 3px rgba(91, 159, 59, 0.15) !important;
}

/* ANCHOS PROPORCIONALES POR COLUMNA PARA EVITAR CORTE DE TEXTO */
#vistaPreviaHistorial td:nth-child(1),
#vistaPreviaHistorial td:nth-child(2) {
    width: 110px !important; /* Fecha Alta / Fecha Baja */
}

#vistaPreviaHistorial td:nth-child(3) {
    width: 130px !important; /* Estado / Entidad */
}

#vistaPreviaHistorial td:nth-child(4) {
    width: 90px !important; /* SBC */
}

#vistaPreviaHistorial td:nth-child(5) {
    min-width: 220px !important; /* Nombre del Patrón (Espacio amplio) */
}

#vistaPreviaHistorial td:nth-child(6) {
    width: 130px !important; /* Registro Patronal */
}

#vistaPreviaHistorial td:nth-child(7) {
    width: 120px !important; /* Error / Advertencia IMSS */
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #d97706 !important;
}

/*====================================================
  TABLA DE HISTORIAL CON INPUTS EXPANDIBLES Y ERRORES
====================================================*/

#vistaPreviaHistorial table.phcrm-historial-preview-table {
    table-layout: fixed !important; /* Forza a que todas las columnas tengan el mismo ancho */
    width: 100% !important;
    min-width: 700px !important;
}

#vistaPreviaHistorial table.phcrm-historial-preview-table th,
#vistaPreviaHistorial table.phcrm-historial-preview-table td {
    width: 14.28% !important; /* 100% / 7 columnas = Ancho igual responsivo */
    position: relative !important;
}

/* FILA CON ERROR IMSS - COLOR ANARANJADO */
#vistaPreviaHistorial table tr.fila-error-imss,
#vistaPreviaHistorial table tr.fila-error-imss td {
    background-color: #fff7ed !important; /* Naranja/Ámbar suave */
    border-left: 4px solid #f59e0b !important;
}

/* CONTENEDOR DE INPUT EXPANDIBLE */
.input-expand-wrapper {
    position: relative;
    width: 100%;
}

.input-expandable {
    width: 100% !important;
    padding: 8px 10px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !overflow;
    overflow: hidden !important;
    transition: all 0.2s ease !important;
}

/* AL DAR CLIC/FOCUS: SE EXPANDE Y FLOTA SOBRE LA CELDA */
.input-expandable:focus {
    position: absolute !important;
    top: -4px !important;
    left: -10px !important;
    min-width: 220px !important; /* Se expande para leer todo el texto */
    z-index: 50 !important;
    border-color: #5b9f3b !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15) !important;
    background: #ffffff !important;
}

/* BOTÓN DE BORRAR FILA */
.btnEliminarFilaPDF {
    background: #fee2e2;
    color: #dc2626;
    border: none;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.btnEliminarFilaPDF:hover {
    background: #fca5a5;
    color: #991b1b;
}

/*====================================================
  ESTILO INTERACTIVO UNIFICADO PARA LAS 3 TABLAS DE HISTORIAL
====================================================*/

.phcrm-tabla-historial-interactive,
#tablaHistorialManual,
#vistaPreviaHistorial table,
#contenidoPestana .phcrm-tabla {
    table-layout: fixed !important;
    width: 100% !important;
    min-width: 750px !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    background: #ffffff !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    border: 1px solid #cbd5e1 !important;
}

/* Cabecera Azul Oscuro Corporativo */
.phcrm-tabla-historial-interactive th,
#tablaHistorialManual th,
#vistaPreviaHistorial th,
#contenidoPestana .phcrm-tabla th {
    background: #04034a !important;
    color: #ffffff !important;
    padding: 12px 10px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    white-space: nowrap !important;
}

/* Celdas con ancho igual responsivo (14.28% c/u) */
.phcrm-tabla-historial-interactive td,
#tablaHistorialManual td,
#vistaPreviaHistorial td,
#contenidoPestana .phcrm-tabla td {
    width: 14.28% !important;
    position: relative !important;
    padding: 6px 8px !important;
    border-bottom: 1px solid #f1f5f9 !important;
    vertical-align: middle !important;
}

/* FILA CON ERROR IMSS - COLOR ANARANJADO/ÁMBAR */
.phcrm-tabla-historial-interactive tr.fila-error-imss,
#tablaHistorialManual tr.fila-error-imss,
#vistaPreviaHistorial tr.fila-error-imss,
#contenidoPestana .phcrm-tabla tr.fila-error-imss,
.phcrm-tabla-historial-interactive tr.fila-error-imss td,
#tablaHistorialManual tr.fila-error-imss td,
#vistaPreviaHistorial tr.fila-error-imss td,
#contenidoPestana .phcrm-tabla tr.fila-error-imss td {
    background-color: #fff7ed !important;
    border-left: 4px solid #f59e0b !important;
}

/* INPUTS EXPANDIBLES AL HACER CLIC/FOCUS */
.phcrm-tabla-historial-interactive td input,
#tablaHistorialManual td input,
#vistaPreviaHistorial td input,
#contenidoPestana .phcrm-tabla td input {
    width: 100% !important;
    padding: 8px 10px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    overflow: hidden !important;
    transition: all 0.2s ease !important;
}

/* AL DAR CLIC/FOCUS: SE EXPANDE Y FLOTA SOBRE LAS CELDAS VECINAS */
.phcrm-tabla-historial-interactive td input:focus,
#tablaHistorialManual td input:focus,
#vistaPreviaHistorial td input:focus,
#contenidoPestana .phcrm-tabla td input:focus {
    position: absolute !important;
    top: -4px !important;
    left: -10px !important;
    min-width: 220px !important; /* Expansión flotante */
    z-index: 50 !important;
    border-color: #5b9f3b !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15) !important;
    background: #ffffff !important;
}


/*====================================================
  FIX: TABLA DE DATOS GENERALES (SIN DESBORDE)
====================================================*/

/* Asegurar que el contenedor padre corte cualquier desborde */
#contenidoPestana {
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: auto !important;
}

/* Tabla de la Pestaña General (Se adapta al 100% del ancho) */
#contenidoPestana .phcrm-tabla {
    width: 100% !important;
    min-width: 0 !important; /* 👈 QUITA EL ANCHO FORZADO DE 750px */
    max-width: 100% !important;
    table-layout: auto !important;
    box-sizing: border-box !important;
}

/* Columna de Etiqueta (Nombre, CURP, NSS, Semanas) */
#contenidoPestana .phcrm-tabla th {
    width: 25% !important;
    background: #04034a !important;
    color: #ffffff !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    padding: 14px 16px !important;
}

/* Columna de Valores */
#contenidoPestana .phcrm-tabla td {
    width: 75% !important;
    word-break: break-word !important; /* Ajusta textos largos sin romper el contenedor */
    padding: 14px 16px !important;
}

/* Mantener el min-width SOLO en la tabla interactiva de Historial Laboral */
#contenidoPestana .phcrm-tabla.phcrm-tabla-historial-interactive {
    min-width: 750px !important;
    table-layout: fixed !important;
}

