/* Estilos para el toggle switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}
.toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .toggle-slider {
    background-color: #3b82f6;
}
input:checked + .toggle-slider:before {
    transform: translateX(26px);
}
/* Estilos para botones de años */
.year-btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s;
}
.year-btn.active {
    background-color: #3b82f6;
    color: white;
}
.year-btn:not(.active) {
    background-color: #e5e7eb;
    color: #374151;
}

/* Estilos para la tabla más compacta */
.compact-table th {
    padding: 0.5rem !important;
    font-size: 0.7rem !important;
    white-space: nowrap;
}

.compact-table td {
    padding: 0.5rem !important;
    font-size: 0.75rem !important;
}

/* Estilos para filas recalculadas */
.recalculated-row {
    background-color: rgba(219, 234, 254, 0.5) !important;
}

/* Ajustes para números en tabla */
.number-cell {
    text-align: right !important;
    white-space: nowrap;
}

/* Para input de retiro especial */
.special-withdrawal-input {
    width: 70px;
    padding: 2px 4px;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    font-size: 0.75rem;
    text-align: right;
}

.special-withdrawal-btn {
    padding: 2px 4px;
    font-size: 0.7rem;
    background-color: #3b82f6;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 2px;
}

.special-withdrawal-btn:hover {
    background-color: #2563eb;
}

/* Ajuste de ancho de columnas */
.col-month { width: 40px; }
.col-capital { width: 95px; }
.col-packages { width: 50px; }
.col-benefit { width: 95px; }
.col-balance { width: 80px; }
.col-target { width: 60px; }
.col-fee { width: 80px; }
.col-withdrawal { width: 90px; }
.col-cum-withdrawal { width: 100px; }
.col-reinvest { width: 90px; }
.col-new-packages { width: 50px; }
.col-expired-packages { width: 50px; }
.col-special-withdrawal { width: 120px; }

/* Estilos para cabecera fija en scroll horizontal */
.table-wrapper {
    position: relative;
    overflow-x: auto;
    max-width: 100%;
}

.header-table-container {
    position: sticky;
    top: 0;
    z-index: 10;
    width: 100%;
    overflow: hidden;
}

.body-table-container {
    width: 100%;
    overflow-x: auto;
}

.header-table {
    margin-bottom: 0 !important;
}

.header-table th {
    background-color: #f9fafb;
    box-shadow: 0 2px 3px rgba(0,0,0,0.1);
}

.body-table {
    margin-top: 0 !important;
}

.body-table thead {
    visibility: hidden;
    height: 0;
    position: absolute;
}