:root {
    /* === PALETA ISOS CONSULTING PERÚ (SGS STYLE) === */
    /* 1. Colores base (estructura / fondos) */
    --isos-navy: #4A4A4A;      /* Sidebar / Header */
    --isos-dark: #4A4A4A;      /* Sidebar / Header (Alias) */
    --isos-secondary: #6A6A6A; /* Cards Módulos / Submenús */
    --isos-deep: #2C2C2C;      /* Fondos muy oscuros */
    
    /* 2. Color de Acento (Naranja SGS) */
    --isos-orange: #F58220;    /* CTA Principal */
    --isos-orange-hover: #D96E11; /* Hover / Active */
    
    /* 3. Textos */
    --text-main: #334155;      /* Texto Principal (Gris Azulado Profundo) */
    --text-secondary: #64748B; /* Texto Secundario (Slate 500) */
    --text-muted: #94A3B8;     /* Texto Terciario (Slate 400) */
    --text-light: #FFFFFF;     /* Texto sobre fondos oscuros */
    
    /* 4. Bordes y Fondos */
    --border-color: #E2E8F0;
    --input-bg: #FFFFFF;
    --card-bg: #FFFFFF;
    --body-bg: #F8FAFC;        /* Fondo General (Slate 50) */

    /* 5. Estados */
    --status-success: #10B981;
    --status-warning: #F59E0B;
    --status-error: #EF4444;
    --status-info: #3B82F6;
    
    /* 6. Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* ===== RESET Y BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--body-bg) !important;
    color: var(--text-main);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    color: #1E293B; /* Slate 800 */
    font-weight: 700;
    letter-spacing: -0.025em;
}

/* ... (resto del CSS de estructura principal) ... */

/* ========================================================
   DASHBOARD GRID SYSTEM (MEJORADO)
   ======================================================== */

/* Grid Layout Principal */
.dashboard-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important; /* 2 Columnas Desktop */
    gap: 24px !important;
    margin-top: 24px !important;
}

@media (max-width: 1100px) { /* Breakpoint más suave */
    .dashboard-grid {
        grid-template-columns: 1fr !important; /* 1 Columna Mobile/Tablet */
    }
}

/* Estilo de Tarjetas Estadísticas - DISEÑO PREMIUM */
.stats-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important; /* Fixed 4 columns */
    gap: 14px !important;
}

@media (max-width: 991.98px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important; /* móvil: 2 columnas */
    }
}

@media (max-width: 420px) {
    .stats-grid {
        grid-template-columns: 1fr !important; /* 1 columna */
    }
}

/* Card KPI más compacta */
.stat-card {
    background: #fff;
    padding: 14px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.stat-number {
    font-size: 28px;
    font-weight: 800;
    color: #1E293B;
    margin: 0;
    line-height: 1.1;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.stat-change {
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.stat-change.positive { color: #10B981; }
.stat-change.negative { color: #EF4444; }

/* Grid de Carpetas (Certificados) - DISEÑO PREMIUM */
.folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.folder-card {
    background: #fff;
    padding: 24px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    border-left: 5px solid transparent;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    position: relative;
    overflow: hidden;
}

.folder-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.folder-card:nth-child(1) { border-left-color: #3B82F6; }
.folder-card:nth-child(2) { border-left-color: #10B981; }
.folder-card:nth-child(3) { border-left-color: #F59E0B; }

.folder-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    background: #F1F5F9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.folder-card:hover .folder-icon {
    transform: scale(1.1);
}

.folder-card:nth-child(1) .folder-icon { color: #3B82F6; background: rgba(59, 130, 246, 0.1); }
.folder-card:nth-child(2) .folder-icon { color: #10B981; background: rgba(16, 185, 129, 0.1); }
.folder-card:nth-child(3) .folder-icon { color: #F59E0B; background: rgba(245, 158, 11, 0.1); }

.folder-content {
    flex: 1;
}

.folder-content h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 6px 0;
    color: #1E293B;
}

.folder-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0 0 12px 0;
    line-height: 1.5;
}

.folder-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.stat-item {
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    background: #F1F5F9;
    padding: 4px 10px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.folder-arrow {
    color: #CBD5E1;
    font-size: 1.25rem;
    align-self: center;
    transition: transform 0.3s;
}

.folder-card:hover .folder-arrow {
    transform: translateX(4px);
    color: var(--isos-orange);
}

/* Tarjetas de Gráficos y Otros - DISEÑO PREMIUM */
.chart-card, .priority-actions-card, .stats-card {
    background: #fff;
    padding: 24px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    height: 100%;
}

.chart-card .card-header, 
.priority-actions-card .card-header, 
.stats-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    border-bottom: none;
    padding: 0;
}

.chart-card h3, 
.priority-actions-card h3, 
.stats-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1E293B;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.priority-actions-list {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.activity-placeholder {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.activity-placeholder i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Quick Stats mejorados */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.quick-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
    background: #F8FAFC;
    border-radius: 12px;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.quick-stat:hover {
    background: #fff;
    border-color: var(--isos-orange);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 600;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1E293B;
}

.sales-advance-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
}

.sales-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-bottom: 14px;
}

.sales-kpi {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    padding: 14px 14px;
    min-height: 74px;
}

.sales-kpi-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.sales-kpi-value {
    font-size: 1.12rem;
    font-weight: 800;
    letter-spacing: 0.2px;
    color: #0F172A;
}

.sales-kpi-value.up {
    color: #16A34A;
}

.sales-kpi-value.down {
    color: #DC2626;
}

.sales-kpi-delta {
    margin-top: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748B;
}

.sales-kpi-delta.up {
    color: #16A34A;
}

.sales-kpi-delta.down {
    color: #DC2626;
}

.sales-goal {
    background: #F8FAFC;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 16px;
}

.sales-goal-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 8px;
}

.sales-goal-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1E293B;
}

.sales-goal-value {
    font-size: 0.85rem;
    font-weight: 800;
    color: #0C2B5A;
}

.sales-goal-bar {
    width: 100%;
    height: 10px;
    background: #E2E8F0;
    border-radius: 999px;
    overflow: hidden;
}

.sales-goal-fill {
    height: 100%;
    background: linear-gradient(90deg, #0C2B5A 0%, #F27A1A 100%);
    border-radius: 999px;
}

.sales-advance-msg {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    text-align: center;
    background: rgba(248, 250, 252, 0.92);
    border: 1px dashed #CBD5E1;
    border-radius: 14px;
    color: #0F172A;
    font-weight: 600;
    z-index: 2;
}

@media (max-width: 1100px) {
    .sales-kpi-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .sales-kpi-grid {
        grid-template-columns: 1fr;
    }
    .sales-advance-controls {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .quick-stats {
        grid-template-columns: 1fr;
    }
}

/* === SUBMENU PREMIUM STYLING (NEW) === */
.submenu li a.highlight-menu-item {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    border-left: 3px solid #10B981;
    color: #059669 !important; /* Green-700 */
    font-weight: 600 !important;
    padding-left: 12px !important; /* Compensate for border */
    transition: all 0.3s ease;
}

.submenu li a.highlight-menu-item:hover {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.2) 0%, rgba(255, 255, 255, 0) 100%);
    padding-left: 16px !important;
}

.submenu li a.highlight-menu-item i {
    color: #10B981 !important; /* Green-500 */
    font-size: 1.1em;
    filter: drop-shadow(0 2px 4px rgba(16, 185, 129, 0.2));
}
