/* Dashboard Panel Fixes - Corrige problemas de legibilidad */

/* Cambios estéticos globales */
.navbar-brand {
    color: #333333 !important; /* Gris oscuro para Lorien Inversiones */
    font-weight: 700;
}

/* Mejora de contraste para textos en paneles - sin relleno de color */
.panel-card {
    border: 1px solid #e3e6f0 !important;
    transition: all 0.3s ease !important;
    background-color: #ffffff !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05) !important;
}

.card-header {
    background-color: #f8fafc !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

/* Asegurar texto legible en todas las tarjetas */
.card .fw-bold, 
.card h4, 
.card h6,
.stat-details h4,
.stat-details h6,
.fw-bold.text-dark {
    color: #000000 !important;
    text-shadow: 0px 0px 1px rgba(255,255,255,0.5) !important;
}

.card .text-muted {
    color: #444444 !important;
}

/* Recuadros sin colores de relleno */
.bg-primary-soft,
.bg-success-soft,
.bg-warning-soft,
.bg-info-soft {
    background-color: #ffffff !important;
    border: 1px solid #e3e6f0 !important;
}

/* Bordes de color sutiles para identificar tipo */
.bg-primary-soft {
    border-left: 3px solid rgba(99, 102, 241, 0.8) !important;
}

.bg-success-soft {
    border-left: 3px solid rgba(16, 185, 129, 0.8) !important;
}

.bg-warning-soft {
    border-left: 3px solid rgba(245, 158, 11, 0.8) !important;
}

.bg-info-soft {
    border-left: 3px solid rgba(59, 130, 246, 0.8) !important;
}

/* Clases adicionales para mejorar legibilidad */
.panel-content {
    background-color: #ffffff !important;
}

.panel-content .badge {
    font-weight: 600 !important;
    text-shadow: none !important;
}

/* Mejoras para las estadísticas del dashboard - estilo más sobrio */
.dashboard-stats .card {
    background: #ffffff !important;
    color: #333333 !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05) !important;
    border: 1px solid #e2e8f0 !important;
}

.dashboard-stats .card .card-body {
    background: #ffffff !important;
}

.dashboard-stats .card h3 {
    color: #333333 !important;
    font-weight: 700 !important;
    font-size: 1.5rem !important;
}

.dashboard-stats .card h6 {
    color: #64748b !important;
    font-size: 0.8rem !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dashboard-stats .card p {
    color: #64748b !important;
    font-size: 0.75rem !important;
}

/* Sobreescribir estilos en línea - Necesario para dashboard_stats.html */
.dashboard-stats .card[style*="background"] {
    background: #ffffff !important;
}

.dashboard-stats .card[style*="color: white"] {
    color: #333333 !important;
}

/* Indicadores de tipo con colores sutiles */
.dashboard-stats .col-md-3:nth-child(1) .card {
    border-top: 3px solid var(--anboto-primary) !important; /* Primario */
}

.dashboard-stats .col-md-3:nth-child(2) .card {
    border-top: 3px solid #10b981 !important; /* Éxito */
}

.dashboard-stats .col-md-3:nth-child(3) .card {
    border-top: 3px solid #0ea5e9 !important; /* Info */
}

.dashboard-stats .col-md-3:nth-child(4) .card {
    border-top: 3px solid #f59e0b !important; /* Warning */
}

/* Mejora de legibilidad para números y porcentajes */
.fw-bold.text-success,
.fw-bold.text-danger {
    text-shadow: 0px 0px 1px rgba(255,255,255,0.5) !important;
    font-weight: 700 !important;
}

/* Arreglos específicos para gráficos */
/* COMENTADO: Esto estaba tapando los gráficos de Lightweight Charts
canvas {
    background-color: #ffffff !important;
}
*/

/* Recuadros de resumen de portfolio más pequeños y texto centrado */
.stat-card {
    min-height: 65px !important; /* Más compacto */
    padding: 0.75rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    background-color: #ffffff !important;
}

.stat-icon {
    margin-right: 0.75rem !important;
    font-size: 1.25rem !important;
}

.stat-details {
    flex-grow: 1;
    text-align: center !important;
}

.stat-details h6 {
    font-size: 0.7rem !important;
    margin-bottom: 0.2rem !important;
    color: #333333 !important;
}

.stat-details h4 {
    font-size: 1.25rem !important;
    line-height: 1 !important;
    margin-bottom: 0 !important;
    color: #000000 !important;
}

/* Corrección específica para los estilos en línea de dashboard_panels.html */
.stat-details h4[style*="color"], 
.fw-bold[style*="color"] {
    color: #000000 !important;
}

/* Maquetación más compacta para paneles en dispositivos móviles */
@media (max-width: 768px) {
    .col-6 {
        padding: 0.25rem !important;
    }
    
    .row.g-3 {
        margin: 0 -0.25rem !important;
    }

    .stat-card {
        min-height: 50px !important;
        padding: 0.5rem !important;
    }

    .stat-details h4 {
        font-size: 1rem !important;
    }
    
    .stat-details h6 {
        font-size: 0.65rem !important;
    }
    
    .stat-icon {
        font-size: 1rem !important;
    }
}

/* Correcciones para el estilo inline de dashboard_stats.html */
.dashboard-stats .card.shadow-sm.border-0 {
    border: 1px solid #e2e8f0 !important;
    background-color: #ffffff !important;
}

.dashboard-stats .card.shadow-sm.border-0 .card-body {
    background-color: #ffffff !important;
    color: #333333 !important;
}

.dashboard-stats .card.shadow-sm.border-0 h6.card-title {
    color: #64748b !important;
}

.dashboard-stats .card.shadow-sm.border-0 h3.fw-bold {
    color: #333333 !important;
}

.dashboard-stats .card.shadow-sm.border-0 p.small {
    color: #64748b !important;
}

/* Estilo para los datos-atributos */
.dashboard-stats [data-stat-type="primary"] {
    border-top: 3px solid var(--anboto-primary) !important;
}

.dashboard-stats [data-stat-type="success"] {
    border-top: 3px solid #10b981 !important;
}

.dashboard-stats [data-stat-type="info"] {
    border-top: 3px solid #0ea5e9 !important;
}

.dashboard-stats [data-stat-type="danger"] {
    border-top: 3px solid #ef4444 !important;
}

/* Barra de progreso pequeña */
.progress-sm {
    height: 6px !important;
}

/* Estilos específicos para el panel de administración */
body > main > div.container-fluid > div > div > div:nth-child(3) > div > div > div > div:nth-child(1) > div:nth-child(1) > div {
    background-color: #ffffff !important;
    color: rgb(38, 38, 38) !important;
}
