/* ===== OVERRIDES GLOBALES DE ESTILOS ===== */
/* Forzar fondo claro en el body */
body {
    background-color: #F5F7FA !important;
    color: #334155 !important;
}

/* Forzar fondo oscuro en el sidebar */
.sidebar {
    background-color: #0F172A !important;
}

/* Forzar fondo oscuro en las cards por defecto */
.card {
    background-color: #0F172A;
    color: #E5E7EB;
    border: 1px solid rgba(226, 232, 240, 0.1);
}

/* Forzar fondo blanco en las cards de estadísticas/KPI */
.card.bg-white, .stat-card {
    background-color: #FFFFFF !important;
    color: #1e293b !important;
    border: 1px solid #e2e8f0 !important;
}

/* Ajuste de textos en cards blancas */
.card.bg-white h1, .card.bg-white h2, .card.bg-white h3, 
.card.bg-white h4, .card.bg-white h5, .card.bg-white h6,
.stat-card h1, .stat-card h2, .stat-card h3, 
.stat-card h4, .stat-card h5, .stat-card h6 {
    color: #0f172a !important;
}

.card.bg-white .text-muted, .stat-card .text-muted {
    color: #64748b !important;
}

/* Estilos del sistema de permisos - ACTIVADO */
.permission-denied, .permission-hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    pointer-events: none !important;
    position: absolute !important;
}

/* FIX CRÍTICO: Eliminada restricción agresiva de visibilidad */
/*
#nuevaCotizacionContent:not(.active) .form-actions,
#nuevaCotizacionContent:not(.active) #btnGuardar,
.cotizacion-container:not(#nuevaCotizacionContent) #btnGuardar {
    display: none !important;
}
*/

/* Asegurar que secciones no activas no muestren controles flotantes */
.cotizacion-container:not(.active) {
    display: none !important;
}

/* ===== FIX ANCHO Y CENTRADO GLOBAL (DEFINITIVO) ===== */ 
:root { 
    --content-max: none; 
    --content-pad: 24px; 
    --sidebar-w: 260px;
} 

/* Estructura Principal */
.dashboard-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-w) !important;
    position: fixed !important;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
}

/* El área principal (derecha del sidebar) */ 
.main-content { 
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 84px !important; /* Espacio para el Topbar fijo */
    max-width: none !important;
    transition: margin-left 0.3s ease, width 0.3s ease;
} 

@media (min-width: 992px) {
    .main-content {
        margin-left: var(--sidebar-w) !important;
        width: calc(100% - var(--sidebar-w)) !important;
    }
}

@media (max-width: 991.98px) {
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        padding-top: 70px !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}

/* Neutralizar contenedores de Bootstrap/Frameworks */ 
main .container, 
main .container-sm, 
main .container-md, 
main .container-lg, 
main .container-xl, 
main .container-xxl,
main .container-fluid,
.content-wrapper,
#content,
.content-area { 
    max-width: none !important; 
    width: 100% !important; 
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin: 0 !important;
} 

/* Contenedor maestro real: aplica a TODO lo que sea contenido directo */ 
main > *,
.content-view { 
    width: 100% !important; 
    flex: 1;
} 

/* Grid consistente para TODO el contenido visible */ 
.page-container { 
    max-width: 100% !important; 
    margin-left: 0 !important; 
    margin-right: 0 !important; 
    padding-left: var(--content-pad) !important; 
    padding-right: var(--content-pad) !important; 
    box-sizing: border-box !important;
    width: 100% !important;
}

/* ===== DASHBOARD GRID SYSTEM ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 Columnas balanceadas */
    gap: 24px; /* Espaciado consistente */
    width: 100%;
}

.span-2 {
    grid-column: span 2;
}

/* Ajustes de componentes dentro del grid */
.dashboard-grid .chart-card,
.dashboard-grid .stats-card,
.dashboard-grid .priority-actions-card {
    height: 100%; /* Igualar alturas */
    margin-bottom: 0 !important; /* El grid maneja el gap */
}

/* Responsive Dashboard */
@media (max-width: 1100px) {
    .dashboard-grid {
        grid-template-columns: 1fr; /* Colapsar a 1 columna */
    }
    .span-2 {
        grid-column: span 1;
    }
}

/* Responsive Fixes */
@media (min-width: 992px) {
    .page-container .stats-grid,
    .page-container .iso-certificates-section,
    .page-container .content-grid {
        max-width: 100% !important; /* Allow full width */
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}

/* Sidebar Toggle Logic */
.sidebar.collapsed + .main-content {
    margin-left: 0 !important; /* Full width when sidebar closed */
}

/* Fix: Folder Grid Layout (2 cols Desktop / 1 col Mobile) */
.folder-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    width: 100% !important;
}

@media (min-width: 1200px) {
    .folder-grid {
        grid-template-columns: 1fr 1fr !important;
    }
}

@media (max-width: 992px) {
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        padding-top: 70px !important;
    }
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    .sidebar.active {
        transform: translateX(0);
    }
}

/* ===== ANIMACIONES GLOBALES ===== */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInScale {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ===== ESTILOS GENERALES ===== */
.page-header {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.page-header-gradient {
    background: var(--brand-gradient);
    color: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}
.page-header-gradient:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    transform: translateY(-2px);
}

.card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
}

.loading {
    text-align: center;
    padding: 3rem;
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}
.loading::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 30px; height: 30px;
    border: 3px solid rgba(102, 126, 234, 0.3);
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}
.empty-state i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* ===== BOTONES ===== */
.btn {
    border-radius: 15px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Botón Primario (Naranja ISOS - Default) */
.btn-primary {
    background: var(--isos-orange);
    border-color: var(--isos-orange);
    color: white;
}
.btn-primary:hover {
    background: #e55a2b;
    border-color: #e55a2b;
    color: white;
}

/* Botón Primario Gradiente (Purple - New UI) */
.btn-primary-gradient {
    background: var(--brand-gradient);
    border: none;
    color: white;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}
.btn-primary-gradient:hover {
    background: linear-gradient(135deg, #5a67d8, #66419e);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
    border: none;
}

.btn-success {
    background: linear-gradient(135deg, #2563eb, #043778);
    color: white;
    border: none;
}

.btn-consultar {
    background: var(--brand-gradient);
    color: white;
    border: none;
    padding: 18px 28px;
    border-radius: 15px;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}
.btn-consultar:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}
.btn-consultar:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-action {
    background: var(--brand-gradient);
    border: none;
    border-radius: 25px;
    padding: 0.25rem 0.75rem;
    color: white;
    font-size: 0.75rem;
}

/* ===== FORMULARIOS ===== */
.form-group {
    margin-bottom: 25px;
    position: relative;
}
.form-group label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    color: #374151;
}
.form-control, .form-select, .form-group input, .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(102, 126, 234, 0.1);
    border-radius: 15px;
    transition: all 0.3s;
}
.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    outline: none;
}

.form-section {
    background: rgba(102, 126, 234, 0.02);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 25px;
    border-left: 4px solid #667eea;
    animation: slideInUp 0.6s ease;
}

.form-actions {
    padding: 40px 45px;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.8) 0%, rgba(241, 245, 249, 0.8) 100%);
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    border-top: 1px solid rgba(102, 126, 234, 0.1);
}

.ruc-input-group {
    display: flex;
    gap: 15px;
    align-items: flex-end;
}
.ruc-input-group input { flex: 1; }

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
    padding: 15px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 12px;
}
.checkbox-group:hover { background: rgba(102, 126, 234, 0.1); }
.checkbox-group input[type="checkbox"] { width: 20px; height: 20px; accent-color: #667eea; }

/* Estados de validación */
.form-group.auto-filled { border-left: 4px solid #2563eb; background: rgba(16, 185, 129, 0.05); }
.form-group.manual-required { border-left: 4px solid #f59e0b; background: rgba(251, 191, 36, 0.05); }

.error-message {
    color: #ef4444;
    font-size: 14px;
    margin-top: 8px;
    display: none;
    padding: 10px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 8px;
}
.error-message.show { display: block; animation: slideInDown 0.3s ease; }

.success-message {
    color: #2563eb;
    font-size: 14px;
    margin-top: 8px;
    display: none;
    padding: 10px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 8px;
}
.success-message.show { display: block; animation: slideInDown 0.3s ease; }


/* ===== TABLAS ===== */
.table th {
    background: var(--isos-light);
    color: white;
    border: none;
    font-weight: 600;
}
.table td {
    vertical-align: middle;
}
.table tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.05);
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

#usuariosTable { border-radius: 8px; overflow: hidden; }
#usuariosTable thead th { background-color: #f8f9fc; color: #5a5c69; }

/* Badges */
.badge { font-size: 0.75rem; font-weight: 500; padding: 0.35em 0.65em; border-radius: 4px; color: #000 !important; }
.badge.badge-auditoria-anual,
.badge.badge-auditoria-anual i { color: #fff !important; }
.badge-pendiente { background: #ffc107; color: #000 !important; }
.badge-enviada { background: #17a2b8; color: #000 !important; }
.badge-rechazada { background: #dc3545; color: #000 !important; }
.badge-borrador { background: #6c757d; color: #000 !important; }

/* Nuevos badges para Cotizaciones */
.badge-nuevo { background: #28a745; color: #000 !important; }
.badge-vencido { background: #dc3545; color: #000 !important; }
.badge-cerrado { background: #6c757d; color: #000 !important; }

.iso-badge {
    background: #e3f2fd; color: #1976d2;
    padding: 2px 6px; border-radius: 4px;
    font-size: 0.7rem; margin: 1px; display: inline-block;
}

/* ===== TARJETAS Y COMPONENTES ESPECIFICOS ===== */

/* Cotizaciones */
.cotizacion-container {
    display: none;
    animation: fadeInScale 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    padding-bottom: 20px; /* Adjusted for static footer */
}
.cotizacion-container.active { display: block; }

.cotizacion-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #667eea 100%);
    background-size: 200% 200%;
    animation: gradientShift 6s ease infinite;
    color: white;
    padding: 40px;
    border-radius: 25px;
    margin-bottom: 40px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.3);
}

.cotizacion-steps {
    display: flex;
    justify-content: center;
    margin-bottom: 50px;
    gap: 30px;
    flex-wrap: wrap;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 25px 30px;
    background: white;
    border-radius: 20px;
    border: 2px solid rgba(102, 126, 234, 0.1);
    transition: all 0.4s;
    min-width: 200px;
    cursor: pointer;
}
.step.active {
    background: var(--brand-gradient);
    color: white;
    border-color: #667eea;
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 20px 50px rgba(102, 126, 234, 0.3);
}
.step.completed {
    background: linear-gradient(135deg, #2563eb, #043778);
    color: white;
    border-color: #2563eb;
}

/* Casa Matriz Cards */
.casa-matriz-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}
.casa-card {
    border: 2px solid rgba(102, 126, 234, 0.1);
    border-radius: 20px;
    padding: 30px;
    cursor: pointer;
    transition: all 0.4s;
    background: white;
    position: relative;
    overflow: hidden;
}
.casa-card:hover {
    border-color: #667eea;
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(102, 126, 234, 0.15);
}
.casa-card.selected {
    border: 2px solid #2563eb;
    background: rgba(16, 185, 129, 0.05);
}
.casa-card.selected::before {
    content: ''; position: absolute; top:0; left:0; right:0; height:4px;
    background: linear-gradient(90deg, #2563eb, #043778);
}

/* ISO Cards */
.iso-standards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 30px;
}
.iso-card {
    border: 2px solid rgba(102, 126, 234, 0.1);
    border-radius: 15px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.4s;
    background: #ffffff !important; /* FORCE WHITE BACKGROUND */
    position: relative;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.iso-card h4 {
    color: #2c3e50 !important;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.iso-card p {
    color: #4b5563 !important;
    font-size: 0.9rem;
}
.iso-card label {
    color: #333 !important;
    font-weight: 500;
}
.iso-card:hover {
    border-color: #667eea;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    background: #ffffff !important; /* Maintain white on hover */
}
.iso-card.selected {
    border: 2px solid #2563eb;
    background: rgba(16, 185, 129, 0.05) !important; /* Light green tint when selected */
}

/* Usuarios Cards */
.usuarios-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid #e3e6f0;
}
.usuarios-card:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(0,0,0,0.12); }

.avatar-sm, .avatar-title {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
}
.avatar-title { color: white; font-weight: 600; font-size: 14px; }

/* Calculadora Precios */
.precio-calculator {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 20px;
    padding: 35px;
    margin-top: 30px;
    border: 2px solid rgba(102, 126, 234, 0.1);
}
.precio-row {
    display: flex; justify-content: space-between; padding: 15px 0;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}
.precio-row:last-child {
    border-bottom: none; font-weight: 700; font-size: 1.2rem; color: #1e293b;
    margin-top: 15px; padding: 20px 15px; background: rgba(102, 126, 234, 0.1); border-radius: 12px;
}

/* ===== SIDEBAR & NAV ===== */
.sidebar .submenu {
    margin-left: 16px; padding-left: 12px; border-left: 2px solid #e9ecef;
    display: none; list-style: none;
}
.sidebar .nav-item.active .submenu { display: block; }
.sidebar .submenu li a {
    padding: 8px 10px; font-size: 0.9rem; color: rgba(255,255,255,0.8);
    display: block; text-decoration: none;
}
.sidebar .submenu li a:hover { color: #fff; }

.user-submenu-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    margin: 6px 14px 6px 40px;
    padding: 8px 12px;
    cursor: pointer;
    display: flex; align-items: center; gap: 10px;
}
.user-submenu-card:hover { background: rgba(255, 255, 255, 0.15); }
.user-submenu-card .name { font-weight: 600; font-size: 0.85rem; color: #fff; }
.user-submenu-card .role { font-size: 0.75rem; color: rgba(255,255,255,0.6); }

/* ===== RENTABILIDAD & REPORTES ===== */
.rentabilidad-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #1d4ed8 100%);
    color: white; padding: 2.5rem; border-radius: 20px; margin-bottom: 2rem;
    box-shadow: 0 20px 40px rgba(30, 58, 138, 0.15);
    position: relative; overflow: hidden;
}

.profit-card {
    border: none; border-radius: 16px;
    padding: 1.5rem; color: white;
    transition: all 0.3s;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}
.profit-card:hover { transform: translateY(-5px); }
.profit-card.positive { background: linear-gradient(135deg, #043778 0%, #2563eb 100%); color: white !important; }
.profit-card.negative { background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%); }
.profit-card.neutral { background: linear-gradient(135deg, #374151 0%, #6b7280 100%); }
.profit-card.revenue { background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%); }

.metric-value { font-size: 2.5rem; font-weight: 800; margin-bottom: 0.5rem; }
.metric-label { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; }

.filter-section {
    background: white; padding: 2rem; border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06); margin-bottom: 2rem;
}

/* Tabla de Datos (Reportes) */
.data-table {
    background: white; border-radius: 20px; overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
}
.data-table .card-header {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 1.5rem; border-bottom: 2px solid #e2e8f0;
}

/* Scope Local: Reportes Ventas */
#reportesVentasContent .page-header {
    background: linear-gradient(135deg, #007bff, #6610f2);
    color: white;
}

/* Scope Local: Costos */
#gestionCostosContent .nav-link.active {
    background-color: #ea580c !important;
    color: white !important;
}

/* ===== MODAL ===== */
.modal-content { border-radius: 20px; border: none; box-shadow: 0 25px 50px rgba(0,0,0,0.15); }
.modal-header { border-radius: 20px 20px 0 0; padding: 1.5rem; }

/* FIX: Contraste en Modal de Edición */
#editarUsuarioModal .modal-body { padding: 1.5rem !important; }

/* FIX: Contraste Nueva Cotización - REMOVED TO ALLOW CORPORATE THEME */
/* #nuevaCotizacionContent h1, #nuevaCotizacionContent h2, #nuevaCotizacionContent h3,
#nuevaCotizacionContent p, #nuevaCotizacionContent label {
    color: #000 !important;
}
#nuevaCotizacionContent .form-control {
    background-color: #fff !important; color: #000 !important; border: 1px solid #ced4da !important;
} */

/* ===== ISO MODULE (NEW) ===== */
.iso-module-container {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: #f4f6f9; z-index: 9999; display: flex;
}
.iso-sidebar { width: 260px; background: #2c3e50; color: white; display: flex; flex-direction: column; }
.iso-main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; background: #f8f9fa; }

/* ===== OVERRIDES GLOBALES DE TABLAS ===== */
table thead th, .table thead th, .data-table thead th {
    background: #0d6efd !important;
    color: white !important;
    font-weight: 600 !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .cotizacion-header h1 { font-size: 28px; }
    .cotizacion-steps { flex-direction: column; }
    .form-actions { flex-direction: column; }
    .form-grid { grid-template-columns: 1fr; }
    .iso-standards { grid-template-columns: 1fr; }
    
    .search-filters .d-flex { flex-direction: column; gap: 10px; }
    .search-filters .d-flex > div { width: 100%; }
}

/* ===== SIG MODULE STYLES ===== */
.sig-submodule-link {
    border-radius: 8px !important;
    margin-bottom: 5px;
    border: none;
    color: #555;
    font-weight: 500;
}
.sig-submodule-link:hover {
    background-color: #f8f9fa;
    color: var(--isos-light);
}
.sig-submodule-link.active {
    background-color: rgba(111, 66, 193, 0.1) !important;
    color: var(--isos-light) !important;
    border-left: 3px solid var(--isos-light) !important;
}

.dashed-border {
    border: 2px dashed #dee2e6;
}

/* --- FIX: Nueva Cotización invisible --- */ 

/* 1) Si el contenedor está activo, SIEMPRE debe verse */ 
.cotizacion-container.active, 
#nuevaCotizacionContent.active, 
#nuevaCotizacionContent[style*="display: block"]{ 
  display: block !important; 
  visibility: visible !important; 
  opacity: 1 !important; 
} 

/* 2) Evitar que un CSS global mate toda la cotizacion */ 
.cotizacion-container{ 
  display: none;           /* Changed from block to none for safety */ 
} 

.cotizacion-container.active {
  display: block !important;
} 

/* 3) Las secciones internas del wizard sí pueden ocultarse */ 
.form-section{ 
  display: none; 
} 
.form-section.active{ 
  display: block !important; 
  visibility: visible !important;
  opacity: 1 !important;
} 

/* 4) Manejo de vistas por JS */ 
.content-view{ display:none; } 
.content-view.active{ display:block !important; }

/* Asegurar texto blanco en fondos con azul Bootstrap (#0d6efd), azul corporativo (#043778) y variantes */
.bg-primary,
.btn-primary,
.btn-success,
.step.completed,
.profit-card.positive,
.am-save-btn,
.rentabilidad-header,
[style*="background-color: #043778"],
[style*="background: #043778"],
[style*="background: linear-gradient"][style*="#043778"],
[style*="background:linear-gradient"][style*="#043778"],
[style*="background-color: #0d6efd"],
[style*="background: #0d6efd"],
[style*="background: linear-gradient"][style*="#0d6efd"],
[style*="background:linear-gradient"][style*="#0d6efd"] {
    color: white !important;
}


