﻿@import 'css/buttons.css';

@font-face {
    font-family: 'Source Sans Pro';
    src: url(/fonts/source-sans-pro.semibold.ttf) format('truetype');
}

::deep html, ::deep body {
    height: 100%;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

html {
    /* Lock the root font size */
    font-size: 16px !important;
}

body {
    /* Force text to maintain size */
    text-size-adjust: none;
    -webkit-text-size-adjust: none;
    -moz-text-size-adjust: none;
    -ms-text-size-adjust: none;
}

/* Add zoom control and prevention */
#app {
    zoom: 1;
    -moz-transform: scale(1);
    -moz-transform-origin: 0 0;
    -o-transform: scale(1);
    -o-transform-origin: 0 0;
    -webkit-transform: scale(1);
    -webkit-transform-origin: 0 0;
    transform: scale(1);
    transform-origin: 0 0;
    min-height: 100vh;
    min-width: 100vw;
}

/* ===== Enhanced Navigation Bar ===== */
.navigation {
    padding: 0 16px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    height: 64px !important;
    display: flex;
    align-items: center;
}

.main-menu {
    background: none;
    height: 100% !important;
    margin-left: 8px;
}

.main-menu .e-menu-text {
    color: #FFF !important;
    font-size: 15px;
    font-weight: 500;
    height: 32px !important;
    line-height: 24px;
    letter-spacing: 0.2px;
    transition: color 0.2s ease;
}

.e-menu {
    height: 100% !important;
}

.main-menu .e-menu-item {
    border-bottom: 4px solid transparent !important;
    height: 100% !important;
    align-items: center;
    padding: 0 16px !important;
    margin: 0 2px;
    transition: all 0.2s ease;
}

.main-menu .e-menu-item:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
}

.main-menu .e-menu-item.e-custom-selected {
    background: #FFF !important;
    color: #072E90 !important;
    border-bottom: 3px solid #426CD8 !important;
    font-weight: 600;
}

.main-menu .e-menu-item.e-custom-selected .e-menu-text {
    color: #072E90 !important;
}

.nav-button {
    width: 36px !important;
    height: 36px !important;
    margin-right: 10px;
    background: rgba(255, 255, 255, 0.1) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    box-shadow: none;
    border: none;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.nav-button:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

.e-dropdown-popup ul .e-item {
    display: flex;
    align-items: center;
    padding: 10px 16px !important;
    transition: background 0.2s ease;
}

.e-dropdown-popup ul .e-item:hover {
    background: #f5f7ff !important;
}

.icon-audit,
.icon-logout,
.icon-user {
    width: 22px;
    height: 22px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    display: inline-block;
    margin-right: 12px;
}

.icon-audit {
    background-image: url('assets/icons/clock-fast-backward.svg');
}

.icon-logout {
    background-image: url('assets/icons/icon-log-out.svg');
}

.icon-user {
    background-image: url('assets/icons/icon-user.svg');
}

.icon-person-identity {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-image: url('assets/person_identity.svg');
    background-size: 70%;
    background-color: #426CD8;
    background-repeat: no-repeat;
    background-position: center;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.8);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.icon-person-identity:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

.dropdown-round {
    background: none;
    border: none;
    margin-left: 8px;
}

.e-dropdown-btn {
    background: transparent !important;
    border: none !important;
    transition: background 0.2s ease;
}

.e-dropdown-btn:hover {
    background: rgba(90, 117, 180, 0.2) !important;
    border: none;
}

.e-dropdown-popup {
    background: #FFF !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1) !important;
    overflow: hidden;
    margin-top: 8px !important;
    border: none !important;
}

.e-disabled {
    opacity: 1 !important;
    font-weight: 600 !important;
    color: #072E90 !important;
    border-bottom: 1px solid #f0f0f0 !important;
    background-color: #f8f9ff !important;
    padding: 12px 16px !important;
}

.no-auth-content {
    margin: 0 !important;
    padding: 0 !important;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}
/* END MainLayout.razor.css */
/* ==============================================
   STORE COMPARISON DASHBOARD - FDA ANALYTICS
   ============================================== */

/* Variables específicas para el componente */
:root {
    --stepper-primary: #0038a8;
    --stepper-secondary: #4788ff;
    --stepper-accent: #e30613;
    --stepper-success: #00bfae;
    --stepper-warning: #f9a602;
    --stepper-gray: #f8f9fa;
    --stepper-text: #333;
    --stepper-light-text: #666;
    --stepper-border: #e9ecef;
    --stepper-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --stepper-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* ==============================================
   CONTENEDOR PRINCIPAL DEL STEPPER
   ============================================== */

.stepper-dashboard {
    width: 100%;
    min-height: 100vh;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    padding: 2rem 1rem;
    box-sizing: border-box;
}

/* Compact variations with FIXED SIZING */
.stepper-dashboard.compact .dashboard-header { padding: 1.25rem; border-radius: 14px; }
.stepper-dashboard.compact .header-content h1 { font-size: 1.4rem; }
.stepper-dashboard.compact .dashboard-icon { font-size: 1.6rem !important; }
.stepper-dashboard.compact .header-subtitle { font-size: 0.95rem; }
.stepper-dashboard.compact .stepper-navigation { padding: 1.25rem; border-radius: 14px; }

/* FIXED: Maintain consistent card sizing */
.stepper-dashboard.compact .step { 
    gap: 0.5rem; 
    padding: 0.5rem; 
    min-width: 140px; 
    max-width: 140px; /* Fixed max width */
    width: 140px; /* Fixed width */
    border-radius: 10px; 
    height: auto;
    min-height: 120px; /* Fixed min height to prevent shrinking */
}

.stepper-dashboard.compact .step-indicator { 
    width: 44px; 
    height: 44px; 
    font-size: 1rem; 
    flex-shrink: 0; /* Prevent shrinking */
}

.stepper-dashboard.compact .step-content {
    max-width: 140px; /* Fixed content width */
    min-height: 50px; /* Ensure minimum height for content area */
}

.stepper-dashboard.compact .step-title { 
    font-size: 0.9rem; 
    min-height: 30px; /* Minimum height for title */
    line-height: 1.1;
}

.stepper-dashboard.compact .step-description { 
    font-size: 0.75rem; 
    min-height: 60px; /* Minimum height for description */
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.stepper-dashboard.compact .step-connector { top: 24px; }
.stepper-dashboard.compact .step-content-area { border-radius: 14px; }
.stepper-dashboard.compact .step-panel { padding: 1.25rem 1rem; min-height: 360px; }
.stepper-dashboard.compact .selection-summary { border-radius: 12px; }
.stepper-dashboard.compact .stores-grid { gap: 0.75rem; }
.stepper-dashboard.compact .store-card { padding: 0.65rem; border-radius: 10px; }
.stepper-dashboard.compact .store-avatar { width: 34px; height: 34px; font-size: 0.9rem; }
.stepper-dashboard.compact .store-details h3 { font-size: 0.9rem; }
.stepper-dashboard.compact .store-location { font-size: 0.75rem; }
.stepper-dashboard.compact .store-metric { font-size: 0.8rem; }
.stepper-dashboard.compact .selector-card { padding: 1.25rem 1rem; border-radius: 12px; }
.stepper-dashboard.compact .selector-icon { width: 64px; height: 64px; border-radius: 14px; }
.stepper-dashboard.compact .selector-name { font-size: 1rem; }
.stepper-dashboard.compact .product-card { padding: 1rem; }
.stepper-dashboard.compact .kpi-cards { gap: 1rem; }
.stepper-dashboard.compact .kpi-card { padding: 1.25rem; border-radius: 12px; gap: 1rem; }
.stepper-dashboard.compact .kpi-icon { width: 46px; height: 46px; font-size: 1.4rem; border-radius: 12px; }
.stepper-dashboard.compact .kpi-value { font-size: 1.1rem; }
.stepper-dashboard.compact .kpi-label { font-size: 0.8rem; }
.stepper-dashboard.compact .kpi-detail { font-size: 0.7rem; }
.stepper-dashboard.compact .chart-container { padding: 1.25rem; border-radius: 14px; }
.stepper-dashboard.compact .chart-header h3 { font-size: 1.1rem; }
.stepper-dashboard.compact .store-avatar-small { width: 32px; height: 32px; font-size: 0.8rem; }
.stepper-dashboard.compact .column-container { width: 48px; }
.stepper-dashboard.compact .store-name-small { font-size: 0.75rem; }
.stepper-dashboard.compact .results-table { padding: 1.25rem; border-radius: 14px; }
.stepper-dashboard.compact .header-cell { padding: 0.8rem 1rem; }
.stepper-dashboard.compact .table-cell { padding: 0.8rem 1rem; }
.stepper-dashboard.compact .mini-avatar { width: 24px; height: 24px; font-size: 0.7rem; }
.stepper-dashboard.compact .insights-summary { padding: 1.25rem; border-radius: 14px; }
.stepper-dashboard.compact .summary-grid { gap: 1rem; }
.stepper-dashboard.compact .summary-item { padding: 1.25rem; border-radius: 12px; }
.stepper-dashboard.compact .summary-icon { width: 46px; height: 46px; font-size: 1.4rem; border-radius: 12px; }
.stepper-dashboard.compact .summary-title { font-size: 1.05rem; }
.stepper-dashboard.compact .summary-description { font-size: 0.85rem; }
.stepper-dashboard.compact .step-navigation-buttons { padding: 1rem; }

/* ==============================================
   HEADER DEL DASHBOARD
   ============================================== */

.dashboard-header {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--stepper-shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.header-content h1 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--stepper-primary);
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dashboard-icon {
    font-size: 1.6rem !important;
    color: var(--stepper-accent);
}

.header-subtitle {
    color: var(--stepper-light-text);
    margin: 0;
    font-size: 1rem;
    line-height: 1.4;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* ==============================================
   ESTADOS DE CARGA DEL DASHBOARD
   ============================================== */

.dashboard-loading {
    background: white;
    border-radius: 20px;
    padding: 4rem 2rem;
    text-align: center;
    box-shadow: var(--stepper-shadow);
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.loading-animation {
    position: relative;
}

.spinner-ring {
    width: 80px;
    height: 80px;
    border: 6px solid var(--stepper-gray);
    border-top: 6px solid var(--stepper-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-content h3 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--stepper-primary);
    margin: 0 0 0.5rem 0;
}

.loading-content p {
    color: var(--stepper-light-text);
    margin: 0;
    font-size: 1.1rem;
}

.error-panel {
    background: linear-gradient(135deg, #ffe8e8, #ffebee);
    border: 2px solid rgba(244, 67, 54, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #d32f2f;
    font-weight: 600;
    margin-bottom: 2rem;
}

    .error-panel .material-icons {
        font-size: 2rem;
        color: #f44336;
    }

/* ==============================================
   NAVEGACIÓN DEL STEPPER - FIXED SIZING
   ============================================== */

.stepper-navigation {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 1rem;
    box-shadow: var(--stepper-shadow);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.steps-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    min-height: 150px; /* Fixed minimum height for consistency */
    max-height: 150px; /* Fixed maximum height to prevent growing */
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 1rem;
    border-radius: 16px;
    min-width: 180px;
    max-width: 180px; /* Fixed maximum width */
    width: 180px; /* Fixed width */
    text-align: center;
    min-height: 130px; /* Fixed minimum height */
    max-height: 130px; /* Fixed maximum height */
    box-sizing: border-box; /* Include padding in size calculations */
}

    .step:hover:not(.disabled) {
        background: rgba(0, 56, 168, 0.02);
        transform: translateY(-2px);
    }

    .step.disabled {
        cursor: not-allowed;
        opacity: 0.5;
    }

.step-indicator {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
    flex-shrink: 0; /* Prevent shrinking */
}

.step:not(.active):not(.completed) .step-indicator {
    background: var(--stepper-gray);
    color: var(--stepper-light-text);
    border: 3px solid #ddd;
}

.step.active .step-indicator {
    background: linear-gradient(135deg, var(--stepper-primary), var(--stepper-secondary));
    color: white;
    border: 3px solid var(--stepper-primary);
    animation: pulse 2s infinite;
}

.step.completed .step-indicator {
    background: linear-gradient(135deg, var(--stepper-success), #2ed573);
    color: white;
    border: 3px solid var(--stepper-success);
}

.step-content {
    max-width: 160px;
    min-height: 60px; /* Fixed minimum height for content */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.step-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--stepper-text);
    margin-bottom: 0.5rem;
    min-height: 24px; /* Fixed minimum height for title */
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.step.active .step-title {
    color: var(--stepper-primary);
}

.step.completed .step-title {
    color: var(--stepper-success);
}

.step-description {
    font-size: 0.85rem;
    color: var(--stepper-light-text);
    line-height: 1.3;
    min-height: 36px; /* Fixed minimum height for description */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.step-connector {
    position: absolute;
    top: 30px;
    left: 90px;
    right: -90px;
    height: 4px;
    background: #ddd;
    z-index: 1;
    transition: all 0.3s ease;
}

    .step-connector.completed {
        background: linear-gradient(90deg, var(--stepper-success), #2ed573);
    }

.step:last-child .step-connector {
    display: none;
}

/* ==============================================
   ÁREA DE CONTENIDO DE PASOS
   ============================================== */

.step-content-area {
    background: white;
    border-radius: 20px;
    box-shadow: var(--stepper-shadow);
    margin-bottom: 1rem;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.step-panel {
    padding: 2.5rem 2rem;
    min-height: 500px;
}

.step-header {
    text-align: center;
    border-bottom: 2px solid var(--stepper-gray);
}

    .step-header h2 {
        font-size: 1.1rem;
        font-weight: 600;
        color: var(--stepper-primary);
        margin: 0 0 1rem 0;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.75rem;
    }

    .step-header p {
        color: var(--stepper-light-text);
        margin: 0;
        font-size: 1.1rem;
        line-height: 1.5;
        max-width: 600px;
        margin: 0 auto;
    }

/* ==============================================
   RESUMEN DE SELECCIÓN
   ============================================== */

.selection-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--stepper-gray), #f1f3f4);
    border-radius: 16px;
    padding: 1.5rem 2rem;
    border: 2px solid rgba(0, 56, 168, 0.1);
}

.summary-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    color: var(--stepper-primary);
    font-size: 1rem;
}

    .summary-card .material-icons {
        color: var(--stepper-accent);
        font-size: 1.5rem;
    }

.clear-btn {
    background: linear-gradient(135deg, var(--stepper-accent), #ff4757);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

    .clear-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(227, 6, 19, 0.3);
    }

/* ==============================================
   GRILLA DE TIENDAS
   ============================================== */

.stores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.store-card {
    background: white;
    border-radius: 16px;
    border: 2px solid var(--stepper-border);
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

    .store-card:hover:not(.disabled) {
        transform: translateY(-4px);
        box-shadow: var(--stepper-shadow-hover);
        border-color: var(--stepper-secondary);
    }

    .store-card.selected {
        border-color: var(--stepper-primary);
        background: linear-gradient(135deg, rgba(0, 56, 168, 0.02), rgba(71, 136, 255, 0.02));
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(0, 56, 168, 0.15);
    }

    .store-card.disabled {
        opacity: 0.5;
        cursor: not-allowed;
        background: #f8f9fa;
    }

    .store-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, var(--stepper-primary), var(--stepper-secondary));
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .store-card.selected::before {
        opacity: 1;
    }

.store-status {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.status-selected {
    color: var(--stepper-success) !important;
    animation: bounceIn 0.5s ease;
}

.store-info {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.store-avatar {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.4rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.store-details {
    flex: 1;
    min-width: 0;
}

    .store-details h3 {
        font-size: 1.2rem;
        font-weight: 700;
        color: var(--stepper-text);
        margin: 0 0 0.5rem 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.store-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--stepper-light-text);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

    .store-location .material-icons {
        font-size: 1rem;
    }

.store-metric {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--stepper-primary);
    font-weight: 600;
    font-size: 0.9rem;
}

    .store-metric .material-icons {
        font-size: 1rem;
    }

/* ==============================================
   SELECTOR DE TIPO DE solución
   ============================================== */

.selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.selector-card {
    background: white;
    border: 2px solid var(--stepper-border);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

    .selector-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--stepper-shadow-hover);
        border-color: var(--stepper-secondary);
    }

    .selector-card.selected {
        border-color: var(--stepper-primary);
        background: linear-gradient(135deg, rgba(0, 56, 168, 0.02), rgba(71, 136, 255, 0.02));
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(0, 56, 168, 0.15);
    }

.selector-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem auto;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.selector-card:hover .selector-icon {
    transform: scale(1.05);
}

.selector-icon .material-icons {
    font-size: 2.5rem;
    color: white;
}

.selector-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--stepper-text);
    margin-bottom: 1rem;
}

.selected-indicator {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--stepper-success), #2ed573);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(0, 191, 174, 0.3);
    animation: bounceIn 0.5s ease;
}

/* ==============================================
   SELECTOR DE PRODUCTOS
   ============================================== */

.product-selector {
    margin-bottom: 2rem;
}

.search-section {

    text-align: center;
}

    .search-section h3 {
        font-size: 1.4rem;
        font-weight: 700;
        color: var(--stepper-primary);
        margin: 0;
    }

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
    background: var(--stepper-gray);
    border-radius: 16px;
    border: 2px solid rgba(0, 0, 0, 0.04);
}

.product-card {
    background: white;
    border: 2px solid var(--stepper-border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

    .product-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
        border-color: var(--stepper-secondary);
    }

    .product-card.selected {
        border-color: var(--stepper-primary);
        background: linear-gradient(135deg, rgba(0, 56, 168, 0.02), rgba(71, 136, 255, 0.02));
        transform: translateY(-1px);
        box-shadow: 0 6px 20px rgba(0, 56,168, 0.15);
    }

.product-info {
    flex: 1;
    min-width: 0;
}

.product-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--stepper-text);
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-sku {
    font-size: 0.85rem;
    color: var(--stepper-light-text);
    font-family: 'Courier New', monospace;
}

/* Improved product list visuals */
.product-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--stepper-primary), var(--stepper-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    margin-right: 12px;
    box-shadow: 0 3px 12px rgba(0, 56, 168, 0.25);
}

.sku-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(0, 56, 168, 0.08);
    color: #0038a8;
    font-weight: 700;
    font-size: 0.75rem;
}

/* ==============================================
   SECCIÓN DE RESULTADOS
   ============================================== */

.results-section {
    padding: 2rem 0;
}

.kpi-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.kpi-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

    .kpi-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    }

    .kpi-card::before {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 120px;
        height: 120px;
        border-radius: 50%;
        opacity: 0.05;
        z-index: 0;
    }

    .kpi-card.highlight::before {
        background: linear-gradient(135deg, #ffd700, #ffed4e);
    }

    .kpi-card.success::before {
        background: linear-gradient(135deg, var(--stepper-success), #2ed573);
    }

    .kpi-card.warning::before {
        background: linear-gradient(135deg, var(--stepper-warning), #ffc048);
    }

    .kpi-card.caution::before {
        background: linear-gradient(135deg, #ff9800, #ffb74d);
    }

    .kpi-card.opportunity::before {
        background: linear-gradient(135deg, #9c27b0, #ba68c8);
    }

.kpi-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.kpi-card.highlight .kpi-icon {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.3);
}

.kpi-card.success .kpi-icon {
    background: linear-gradient(135deg, var(--stepper-success), #2ed573);
    box-shadow: 0 6px 20px rgba(0, 191, 174, 0.3);
}

.kpi-card.warning .kpi-icon {
    background: linear-gradient(135deg, var(--stepper-warning), #ffc048);
    box-shadow: 0 6px 20px rgba(249, 166, 2, 0.3);
}

.kpi-card.caution .kpi-icon {
    background: linear-gradient(135deg, #ff9800, #ffb74d);
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.3);
}

.kpi-card.opportunity .kpi-icon {
    background: linear-gradient(135deg, #9c27b0, #ba68c8);
    box-shadow: 0 6px 20px rgba(156, 39, 176, 0.3);
}

.kpi-card:not(.highlight):not(.success):not(.warning):not(.caution):not(.opportunity) .kpi-icon {
    background: linear-gradient(135deg, var(--stepper-primary), var(--stepper-secondary));
    box-shadow: 0 6px 20px rgba(0, 56, 168, 0.3);
}

/* ==============================================
   GRÁFICO DE DISTRIBUCIÓN
   ============================================== */

.chart-container {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 3rem;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

    .chart-header h3 {
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--stepper-primary);
        margin: 0;
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

.chart-legend {
    display: flex;
    gap: 2rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--stepper-text);
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

    .legend-color.has-product {
        background: linear-gradient(135deg, var(--stepper-primary), var(--stepper-secondary));
    }

    .legend-color.no-product {
        background: #e0e0e0;
    }

.enhanced-chart {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    gap: 1rem;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #f8f9fa, #f1f3f4);
    border-radius: 16px;
    margin-bottom: 1.5rem;
    min-height: 300px;
}

.chart-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100px;
    max-width: 140px;
    flex: 1;
}

.column-header {
    text-align: center;
    margin-bottom: 1rem;
}

.store-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    margin: 0 auto 0.5rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

.interactions-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--stepper-text);
    margin-bottom: 0.25rem;
}

.market-share-small {
    font-size: 0.8rem;
    color: var(--stepper-light-text);
}

.column-container {
    width: 60px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
    margin-bottom: 1rem;
}

.column-bar {
    width: 100%;
    border-radius: 8px 8px 4px 4px;
    transition: all 0.3s ease;
    position: relative;
    min-height: 10px;
}

    .column-bar.has-product {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }

    .column-bar.no-product {
        background: #e0e0e0 !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

.column-footer {
    text-align: center;
}

.store-name-small {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--stepper-text);
    margin-bottom: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.performance-indicator {
    font-size: 0.7rem;
}

.performance-star {
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    font-weight: 700;
    color: white;
}

    .performance-star.platinum {
        background: linear-gradient(135deg, #e5e4e2, #f5f5f5);
        color: #333;
    }

    .performance-star.gold {
        background: linear-gradient(135deg, #ffd700, #ffed4e);
        color: #333;
    }

    .performance-star.silver {
        background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
        color: #333;
    }

    .performance-star.bronze {
        background: linear-gradient(135deg, #cd7f32, #d2691e);
        color: white;
    }

.no-product-indicator {
    padding: 0.25rem 0.5rem;
    background: #e0e0e0;
    color: #666;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* ==============================================
   TABLA DE ANÁLISIS DETALLADO
   ============================================== */

.results-table {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 3rem;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

    .results-table h3 {
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--stepper-primary);
        margin: 0 0 2rem 0;
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

.table-container {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.2fr 1fr 1fr 1fr;
    background: linear-gradient(135deg, var(--stepper-primary), var(--stepper-secondary));
    color: white;
    font-weight: 700;
    min-height: 60px;
}

.header-cell {
    padding: 1.2rem;
    display: flex;
    align-items: center;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    letter-spacing: 0.3px;
}

    .header-cell:last-child {
        border-right: none;
    }

.table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.2fr 1fr 1fr 1fr;
    min-height: 70px;
    border-bottom: 1px solid #f1f3f4;
    transition: all 0.3s ease;
    background: white;
}

    .table-row:hover {
        background: rgba(0, 56, 168, 0.02);
        transform: translateX(2px);
    }

    .table-row.no-product-row {
        background: rgba(224, 224, 224, 0.1);
    }

.table-cell {
    padding: 1.2rem;
    display: flex;
    align-items: center;
    border-right: 1px solid #f1f3f4;
    font-size: 0.9rem;
}

    .table-cell:last-child {
        border-right: none;
    }

.market-share-cell {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}

.market-share-value {
    font-weight: 700;
    color: var(--stepper-primary);
}

.market-share-bar {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.market-share-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.vs-average {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    padding: 0.5rem;
    border-radius: 8px;
    font-size: 0.85rem;
}

    .vs-average.positive {
        background: rgba(76, 175, 80, 0.1);
        color: #388e3c;
    }

    .vs-average.negative {
        background: rgba(244, 67, 54, 0.1);
        color: #d32f2f;
    }

    .vs-average.neutral {
        background: rgba(158, 158, 158, 0.1);
        color: #616161;
    }

.status-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8rem;
}

    .status-badge.yes {
        background: rgba(76, 175, 80, 0.1);
        color: #388e3c;
    }

    .status-badge.no {
        background: rgba(244, 67, 54, 0.1);
        color: #d32f2f;
    }

.potential-value {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--stepper-primary);
}

    .potential-value.leader {
        color: #ffd700;
    }

/* ==============================================
   RESUMEN EJECUTIVO
   ============================================== */

.insights-summary {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 3rem;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

    .insights-summary h3 {
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--stepper-primary);
        margin: 0 0 2rem 0;
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.summary-item {
    display: flex;
    gap: 1.5rem;
    padding: 2rem;
    border-radius: 16px;
    border: 2px solid rgba(0, 0, 0, 0.04);
    background: linear-gradient(135deg, #f8f9fa, #f1f3f4);
    transition: all 0.3s ease;
}

    .summary-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    }

.summary-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--stepper-primary), var(--stepper-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    box-shadow: 0 6px 20px rgba(0, 56,168, 0.3);
    flex-shrink: 0;
}

.summary-content {
    flex: 1;
}

.summary-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--stepper-text);
    margin-bottom: 0.75rem;
}

.summary-description {
    line-height: 1.5;
    color: var(--stepper-light-text);
}

.status-excellent {
    color: #388e3c;
    font-weight: 600;
}

.status-good {
    color: #689f38;
    font-weight: 600;
}

.status-fair {
    color: #f57c00;
    font-weight: 600;
}

.status-poor {
    color: #d32f2f;
    font-weight: 600;
}

/* ==============================================
   SECCIONES DE CARGA
   ============================================== */

.loading-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    gap: 1.5rem;
    text-align: center;
}

    .loading-section.large {
        padding: 5rem 2rem;
    }

.mini-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 56, 168, 0.1);
    border-left-color: var(--stepper-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.progress-ring {
    width: 80px;
    height: 80px;
    border: 6px solid rgba(0, 56, 168, 0.1);
    border-left-color: var(--stepper-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-section h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--stepper-primary);
    margin: 0;
}

.loading-section p {
    color: var(--stepper-light-text);
    margin: 0;
    font-size: 1.1rem;
}

/* ==============================================
   MENSAJES SIN DATOS
   ============================================== */

.no-data-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4rem 2rem;
    text-align: center;
    color: var(--stepper-light-text);
    background: linear-gradient(135deg, #f8f9fa, #f1f3f4);
    border-radius: 16px;
    border: 2px dashed #ddd;
}

    .no-data-message .material-icons {
        font-size: 4rem;
        margin-bottom: 1.5rem;
        color: #ccc;
    }

    .no-data-message h3 {
        font-size: 1.5rem;
        font-weight: 700;
        color: #555;
        margin: 0 0 0.75rem 0;
    }

    .no-data-message p {
        margin: 0;
        font-size: 1.1rem;
        line-height: 1.5;
        max-width: 400px;
    }

/* ==============================================
   BOTONES DE NAVEGACIÓN
   ============================================== */

.step-navigation-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    background: white;
    border-radius: 0 0 20px 20px;
    border-top: 2px solid var(--stepper-gray);
}

.spacer {
    flex: 1;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

    .nav-btn.primary {
        background: linear-gradient(135deg, var(--stepper-primary), var(--stepper-secondary));
        color: white;
        box-shadow: 0 6px 20px rgba(0, 56, 168, 0.3);
    }

        .nav-btn.primary:hover:not(:disabled) {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(0, 56, 168, 0.4);
        }

    .nav-btn.secondary {
        background: white;
        color: var(--stepper-primary);
        border: 2px solid var(--stepper-primary);
    }

        .nav-btn.secondary:hover {
            background: var(--stepper-primary);
            color: white;
            transform: translateY(-2px);
        }

    .nav-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        transform: none !important;
    }

.export-btn {
    background: linear-gradient(135deg, var(--stepper-success), #2ed573);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(0,191,174, 0.3);
}

    .export-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0,191,174, 0.4);
}

/* ==============================================
   ANIMACIONES
   ============================================== */

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }

    50% {
        transform: scale(1.05);
    }

    70% {
        transform: scale(0.9);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==============================================
   DISEÑO RESPONSIVO - WITH FIXED STEP SIZING
   ============================================== */

@media (max-width: 1200px) {
    .stepper-dashboard {
        padding: 1.5rem 1rem;
    }

    .dashboard-header {
        padding: 1.5rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .steps-container {
        flex-direction: column;
        gap: 1rem;
        min-height: auto; /* Allow flexible height on mobile */
        max-height: none; /* Remove height constraint on mobile */
    }

    .step {
        flex-direction: row;
        min-width: 100%;
        max-width: 100%; /* Full width on mobile */
        width: 100%; /* Full width on mobile */
        text-align: left;
        padding: 1rem;
        min-height: 80px; /* Reduced min height for mobile */
        max-height: 80px; /* Fixed max height for mobile */
        justify-content: flex-start;
        align-items: center;
    }

    .step-content {
        max-width: none; /* Remove width constraint on mobile */
        min-height: auto; /* Allow flexible height on mobile */
        text-align: left;
        flex: 1;
    }

    .step-title {
        min-height: auto; /* Allow flexible height on mobile */
        font-size: 0.95rem;
    }

    .step-description {
        min-height: auto; /* Allow flexible height on mobile */
        font-size: 0.8rem;
        -webkit-line-clamp: 1; /* Single line on mobile */
    }

    .step-connector {
        display: none;
    }

    .stores-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }

    .selector-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }

    .kpi-cards {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .enhanced-chart {
        flex-wrap: wrap;
        justify-content: center;
    }

    .table-header,
    .table-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .table-cell {
        padding: 0.75rem;
        border-right: none;
        border-bottom: 1px solid #f1f3f4;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .stepper-dashboard {
        padding: 1rem 0.5rem;
    }

    .dashboard-header {
        padding: 1rem;
    }

    .header-content h1 {
        font-size: 1.6rem;
    }

    .step-panel {
        padding: 1.5rem 1rem;
    }

    .step-header h2 {
        font-size: 1.4rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    /* Compact mode adjustments for mobile */
    .stepper-dashboard.compact .step {
        min-height: 70px;
        max-height: 70px;
        padding: 0.75rem;
    }

    .stepper-dashboard.compact .step-indicator {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }

    .stepper-dashboard.compact .step-title {
        font-size: 0.85rem;
    }

    .stepper-dashboard.compact .step-description {
        font-size: 0.7rem;
    }

    .stores-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .selector-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
        max-height: 300px;
    }

    .kpi-cards {
        grid-template-columns: 1fr;
    }

    .kpi-card {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .chart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .enhanced-chart {
        min-height: 250px;
        padding: 1rem;
    }

    .step-navigation-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .header-content h1 {
        font-size: 1.4rem;
    }

    .step-indicator {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }

    /* Extra compact mode for very small screens */
    .stepper-dashboard.compact .step {
        min-height: 60px;
        max-height: 60px;
        padding: 0.5rem;
    }

    .stepper-dashboard.compact .step-indicator {
        width: 36px;
        height: 36px;
        font-size: 0.8rem;
    }

    .stepper-dashboard.compact .step-title {
        font-size: 0.8rem;
    }

    .stepper-dashboard.compact .step-description {
        font-size: 0.65rem;
    }

    .selector-icon {
        width: 60px;
        height: 60px;
    }

        .selector-icon .material-icons {
            font-size: 2rem;
        }

    .chart-container,
    .results-table,
    .insights-summary {
        padding: 1.5rem;
    }

    .summary-item {
        padding: 1.5rem;
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .summary-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        margin: 0 auto;
    }
}

/* ==============================================
   UTILIDADES ADICIONALES
   ============================================== */

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.p-1 {
    padding: 0.5rem;
}

.p-2 {
    padding: 1rem;
}

.p-3 {
    padding: 1.5rem;
}

.p-4 {
    padding: 2rem;
}

.fw-normal {
    font-weight: 400;
}

.fw-medium {
    font-weight: 500;
}

.fw-semibold {
    font-weight: 600;
}

.fw-bold {
    font-weight: 700;
}

.fw-extrabold {
    font-weight: 800;
}

.opacity-50 {
    opacity: 0.5;
}

.opacity-75 {
    opacity: 0.75;
}

.d-flex {
    display: flex;
}

.d-block {
    display: block;
}

.d-none {
    display: none;
}

.flex-column {
    flex-direction: column;
}

.align-items-center {
    align-items: center;
}

.justify-content-center {
    justify-content: center;
}

.justify-content-between {
    justify-content: space-between;
}

.gap-1 {
    gap: 0.5rem;
}

.gap-2 {
    gap: 1rem;
}

.gap-3 {
    gap: 1.5rem;
}

.gap-4 {
    gap: 2rem;
}

/* ==============================================
   GLOBAL VIEW DASHBOARD (UI) - CONSOLIDATED STYLES
   Scoped to .dashboard-ultra-modern to avoid collisions
   ============================================== */

.dashboard-ultra-modern {
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 2rem 1rem 1rem 1rem;
    box-sizing: border-box;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(12px) saturate(1.2);
    border-radius: 32px;
    box-shadow: 0 8px 32px rgba(0, 56, 168, 0.10), 0 1.5px 8px rgba(0,0,0,0.04);
    animation: fadeInUp 0.6s ease;
    overflow: hidden;
    flex-grow: 1;
    max-width: 100%;
    overflow-x: hidden;
}

    .dashboard-ultra-modern .dashboard-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 2rem;
        padding: 1.25rem;
        border-radius: 14px;
        flex-wrap: nowrap;
    }

   

.dashboard-ultra-modern .modern-dashboard-block {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 2.5rem;
    flex: 1 1 auto;
}

.dashboard-ultra-modern .modern-summary-row {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 1rem;
    align-items: stretch;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--stepper-accent, #e30613) #f0f0f0;
}

.dashboard-ultra-modern .modern-summary-row::-webkit-scrollbar { height: 8px; }
.dashboard-ultra-modern .modern-summary-row::-webkit-scrollbar-thumb {
    background-color: var(--stepper-accent, #e30613);
    border-radius: 8px;
    border: 2px solid #ffffff40;
}
.dashboard-ultra-modern .modern-summary-row::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 8px;
}

.dashboard-ultra-modern .modern-card {
    --shelf-color: var(--stepper-accent, #e30613);
    background: rgba(255,255,255,0.85);
    border-radius: 18px;
    box-shadow: 0 2px 12px #0038a820;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.2rem;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1.5px solid #e3061320;
    min-width: 220px;
    max-width: 320px;
    flex: 0 0 auto;
    scroll-snap-align: start;
    cursor: pointer;
    border-top: 4px solid var(--shelf-color);
}

.dashboard-ultra-modern .modern-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 56, 168, 0.15);
}

.dashboard-ultra-modern .modern-card-top {
    box-shadow: 0 4px 24px #e3061340;
    background: rgba(255,255,255,0.97);
}

.dashboard-ultra-modern .modern-card-total-special {
    position: relative;
    background: linear-gradient(135deg, rgba(227, 6, 19, 0.95) 0%, rgba(227, 6, 19, 0.85) 100%);
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 8px 32px rgba(227, 6, 19, 0.25), 0 4px 16px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(12px) saturate(1.2);
    min-width: 280px;
    max-width: 380px;
    overflow: hidden;
    cursor: default;
    animation: totalCardPulse 3s ease-in-out infinite;
}

.dashboard-ultra-modern .modern-card-total-special:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(227, 6, 19, 0.3), 0 6px 20px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.dashboard-ultra-modern .modern-card-total-special .modern-card-content {
    color: white;
}

.dashboard-ultra-modern .modern-card-total-special .modern-card-icon {
    background: linear-gradient(135deg, var(--stepper-accent, #e30613), #b8050f);
}

.dashboard-ultra-modern .modern-card-total-special .modern-card-content h3 { color: white; font-weight: 800; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); }
.dashboard-ultra-modern .modern-card-value-total {
    font-size: 2.5rem !important;
    font-weight: 900 !important;
    color: white !important;
    margin-bottom: 2px;
    letter-spacing: 2px;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    line-height: 1;
}
.dashboard-ultra-modern .modern-card-total-special .modern-card-label { color: rgba(255, 255, 255, 0.95); font-weight: 600; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); }

.dashboard-ultra-modern .total-card-decoration { position: absolute; top: 0; right: 0; width: 100%; height: 100%; pointer-events: none; overflow: hidden; border-radius: 18px; }
.dashboard-ultra-modern .decoration-sparkle { position: absolute; width: 4px; height: 4px; background: rgba(255, 255, 255, 0.6); border-radius: 50%; animation: sparkleFloat 4s ease-in-out infinite; }
.dashboard-ultra-modern .decoration-sparkle:nth-child(1) { top: 20%; right: 15%; animation-delay: 0s; }
.dashboard-ultra-modern .decoration-sparkle:nth-child(2) { top: 60%; right: 25%; animation-delay: 1.5s; }
.dashboard-ultra-modern .decoration-sparkle:nth-child(3) { top: 40%; right: 10%; animation-delay: 3s; }

.dashboard-ultra-modern .modern-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 2rem;
    box-shadow: 0 2px 8px #0038a820;
    background: var(--shelf-color);
}

.dashboard-ultra-modern .modern-card-content h3 { margin: 0 0 4px 0; font-size: 1.1rem; color: #0038a8; font-weight: 700; }
.dashboard-ultra-modern .modern-card-value { font-size: 2rem; font-weight: 800; color: var(--stepper-accent, #e30613); margin-bottom: 2px; letter-spacing: 1px; text-shadow: 0 2px 8px #e3061320; }
.dashboard-ultra-modern .modern-card-label { font-size: 0.95rem; color: #0038a8; font-weight: 500; opacity: 0.8; }

.dashboard-ultra-modern .modern-data-container { display: flex; gap: 2rem; width: 100%; }
.dashboard-ultra-modern .modern-chart-container, 
.dashboard-ultra-modern .modern-table-container {
    flex: 1;
    background: rgba(255,255,255,0.45);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 56, 168, 0.10), 0 1.5px 8px rgba(0,0,0,0.04);
    padding: 1.5rem;
    backdrop-filter: blur(8px) saturate(1.1);
    display: flex;
    flex-direction: column;
}

.dashboard-ultra-modern .modern-timeline-container {
    width: 100%;
    background: rgba(255,255,255,0.45);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 56, 168, 0.10), 0 1.5px 8px rgba(0,0,0,0.04);
    padding: 1.5rem;
    backdrop-filter: blur(8px) saturate(1.1);
    display: flex;
    flex-direction: column;
}

.dashboard-ultra-modern .modern-timeline-container .e-chart-legend .e-legend-text { font-weight: 600 !important; font-size: 11px !important; }
.dashboard-ultra-modern .modern-timeline-container .e-chart-tooltip div { background: rgba(255, 255, 255, 0.95) !important; border: 1px solid #e0e0e0 !important; border-radius: 8px !important; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important; }

.dashboard-ultra-modern .modern-chart-header { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 1rem; }
.dashboard-ultra-modern .modern-chart-header .material-icons { font-size: 2rem; color: var(--stepper-accent, #e30613); filter: drop-shadow(0 2px 8px #e3061340); margin-top: 2px; }
.dashboard-ultra-modern .chart-title-section { flex: 1; }
.dashboard-ultra-modern .modern-chart-header h2 { margin: 0 0 4px 0; font-weight: 700; color: #0038a8; font-size: 1.3rem; }
.dashboard-ultra-modern .chart-subtitle { margin: 0; font-size: 0.85rem; color: #666; font-weight: 500; font-style: italic; }

.dashboard-ultra-modern .modern-table-wrapper { flex: 1; overflow-y: auto; max-height: 350px; scrollbar-width: thin; scrollbar-color: var(--stepper-accent, #e30613) #f0f0f0; }
.dashboard-ultra-modern .modern-table-wrapper::-webkit-scrollbar { width: 8px; }
.dashboard-ultra-modern .modern-table-wrapper::-webkit-scrollbar-thumb { background-color: var(--stepper-accent, #e30613); border-radius: 8px; border: 2px solid #ffffff40; }
.dashboard-ultra-modern .modern-table-wrapper::-webkit-scrollbar-track { background: #f0f0f0; border-radius: 8px; }
.dashboard-ultra-modern .modern-table { display: flex; flex-direction: column; gap: 0.5rem; }
.dashboard-ultra-modern .modern-table-item { display: flex; justify-content: space-between; align-items: center; padding: 1rem; margin-bottom: 0.5rem; background: rgba(255,255,255,0.8); border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); transition: all 0.2s ease; }
.dashboard-ultra-modern .modern-table-item:hover { background: rgba(255,255,255,0.95); box-shadow: 0 4px 12px rgba(0,0,0,0.1); transform: translateX(4px); }
.dashboard-ultra-modern .modern-table-cell { display: flex; align-items: center; gap: 12px; }
.dashboard-ultra-modern .shelf-name { font-weight: 600; color: #0038a8; flex: 1; }
.dashboard-ultra-modern .count-value { font-weight: 700; color: var(--stepper-accent, #e30613); font-size: 1.2rem; min-width: 80px; text-align: right; justify-content: flex-end; }
.dashboard-ultra-modern .modern-no-data { display: flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 1rem; color: #666; }

.dashboard-loading-ultra-modern {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 75vh;
    gap: 2rem;
    padding: 3rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.98) 0%, rgba(255,255,255,0.92) 100%);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 56, 168, 0.12), 0 2px 8px rgba(0,0,0,0.04), inset 0 1px 0 rgba(255,255,255,0.8);
    backdrop-filter: blur(15px) saturate(1.3);
    border: 1px solid rgba(255,255,255,0.5);
    margin: 2rem auto;
    max-width: 500px;
    animation: fadeInLoader 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.dashboard-loading-spinner { position: relative; width: 80px; height: 80px; }
.dashboard-spinner-ring { width: 80px; height: 80px; border: 5px solid rgba(227, 6, 19, 0.1); border-radius: 50%; border-top-color: var(--stepper-accent, #e30613); animation: dashboardSpin 1.2s linear infinite; position: relative; }
.dashboard-spinner-ring::before { content: ''; position: absolute; top: -5px; left: -5px; right: -5px; bottom: -5px; border: 2px solid rgba(0, 56, 168, 0.1); border-radius: 50%; border-top-color: #0038a8; animation: dashboardSpin 2s linear infinite reverse; }
.dashboard-loading-content h3 { font-size: 1.5rem; font-weight: 800; color: #072E90; margin: 0 0 0.5rem 0; text-align: center; letter-spacing: 0.5px; text-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.dashboard-loading-content p { font-size: 1rem; color: #0038a8; opacity: 0.8; margin: 0; text-align: center; font-weight: 500; }

@keyframes totalCardPulse { 0%, 100% { box-shadow: 0 8px 32px rgba(227, 6, 19, 0.25), 0 4px 16px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.2); } 50% { box-shadow: 0 12px 40px rgba(227, 6, 19, 0.35), 0 6px 20px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.3); } }
@keyframes sparkleFloat { 0%, 100% { opacity: 0.3; transform: translateY(0) scale(1); } 50% { opacity: 1; transform: translateY(-10px) scale(1.5); } }
@keyframes dashboardSpin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes fadeInLoader { 0% { opacity: 0; transform: translateY(20px) scale(0.95); } 100% { opacity: 1; transform: translateY(0) scale(1); } }

@media screen and (max-width: 1024px) {
    .dashboard-ultra-modern .dashboard-header h1 { font-size: 1.6rem; }
    .dashboard-ultra-modern .modern-card-total-special { min-width: 240px; max-width: 320px; }
    .dashboard-ultra-modern .modern-card-value-total { font-size: 2.2rem !important; }
    .dashboard-ultra-modern .modern-card { min-width: 180px; padding: 1rem 0.8rem; gap: 0.8rem; }
    .dashboard-ultra-modern .modern-card-content h3 { font-size: 1rem; }
    .dashboard-ultra-modern .modern-card-value { font-size: 1.6rem; }
    .dashboard-ultra-modern .modern-card-label { font-size: 0.85rem; }
    .dashboard-ultra-modern .modern-chart-header h2 { font-size: 1.1rem; }
}

@media screen and (max-width: 768px) {
    .dashboard-ultra-modern { padding: 1rem; border-radius: 20px; }
    .dashboard-ultra-modern .dashboard-header { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
    .dashboard-ultra-modern .modern-card-total-special { min-width: 200px; max-width: 100%; }
    .dashboard-ultra-modern .modern-card-value-total { font-size: 2rem !important; }
    .dashboard-ultra-modern .modern-data-container { flex-direction: column; gap: 1.5rem; }
    .dashboard-ultra-modern .modern-summary-row { flex-wrap: wrap; overflow-x: visible; scroll-snap-type: none; justify-content: center; }
    .dashboard-ultra-modern .modern-card { flex: 1 1 100%; max-width: 100%; min-width: unset; }
    .dashboard-ultra-modern .modern-timeline-container { margin-top: 1.5rem; padding: 1rem; }
}

@media screen and (max-width: 480px) {
    .dashboard-ultra-modern .dashboard-header h1 { font-size: 1.3rem; }
    .dashboard-ultra-modern .dashboard-icon { font-size: 2rem; }
    .dashboard-ultra-modern .modern-card-total-special { min-width: 180px; padding: 1rem 0.8rem; }
    .dashboard-ultra-modern .modern-card-value-total { font-size: 1.8rem !important; }
    .dashboard-ultra-modern .modern-card { min-width: 160px; padding: 0.8rem 0.6rem; }
    .dashboard-ultra-modern .modern-card-icon { width: 48px; height: 48px; font-size: 1.5rem; }
    .dashboard-ultra-modern .modern-card-value { font-size: 1.4rem; }
    .dashboard-ultra-modern .modern-card-label { font-size: 0.8rem; }
    .dashboard-ultra-modern .modern-chart-header h2 { font-size: 0.95rem; }
}

/* Enhanced navigation buttons inside step panels */
.stepper-dashboard.compact .step-navigation-buttons {
    display: none !important; /* Hide old navigation buttons */
}

/* Enhanced integrated navigation in step headers */
.stepper-dashboard.compact .step-header-with-nav {
    background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(248,250,252,0.9));
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 56, 168, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(10px);
}

.stepper-dashboard.compact .step-header {
    margin-bottom: 0;
    border-bottom: none;
    text-align: left;
    padding-bottom: 0;
}

.stepper-dashboard.compact .step-navigation-integrated {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 56, 168, 0.1);
}

.stepper-dashboard.compact .nav-spacer {
    flex: 1;
}

.stepper-dashboard.compact .nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.75rem;
    border-radius: 12px;
    border: 2px solid transparent;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    min-width: 140px;
    justify-content: center;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.stepper-dashboard.compact .nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.stepper-dashboard.compact .nav-btn:hover::before {
    left: 100%;
}

.stepper-dashboard.compact .nav-btn.primary {
    background: linear-gradient(135deg, var(--stepper-primary), var(--stepper-secondary));
    color: white;
    border-color: var(--stepper-primary);
    box-shadow: 0 6px 20px rgba(0, 56, 168, 0.3);
}

.stepper-dashboard.compact .nav-btn.primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #0044cc, #5599ff);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 56, 168, 0.4);
}

.stepper-dashboard.compact .nav-btn.primary:disabled {
    background: linear-gradient(135deg, #e0e0e0, #f5f5f5);
    color: #999;
    border-color: #e0e0e0;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
}

.stepper-dashboard.compact .nav-btn.secondary {
    background: rgba(255, 255, 255, 0.95);
    color: var(--stepper-primary);
    border-color: var(--stepper-primary);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(0, 56, 168, 0.15);
}

.stepper-dashboard.compact .nav-btn.secondary:hover {
    background: rgba(0, 56, 168, 0.05);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 56, 168, 0.2);
}

.stepper-dashboard.compact .nav-btn.success {
    background: linear-gradient(135deg, var(--stepper-success), #2ed573);
    color: white;
    border-color: var(--stepper-success);
    box-shadow: 0 6px 20px rgba(0,191,174, 0.3);
}

.stepper-dashboard.compact .nav-btn.success:hover {
    background: linear-gradient(135deg, #00a896, #20c997);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,191,174, 0.4);
}

.stepper-dashboard.compact .nav-btn .material-icons {
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}

.stepper-dashboard.compact .nav-btn:hover .material-icons {
    transform: scale(1.1);
}

/* Enhanced button animations */
.stepper-dashboard.compact .nav-btn:active {
    transform: translateY(-1px);
    transition: transform 0.1s ease;
}

/* Export button integration */
.stepper-dashboard.compact .export-btn {
    background: linear-gradient(135deg, var(--stepper-success), #2ed573);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(0, 191, 174, 0.3);
    margin-top: 1rem;
}

.stepper-dashboard.compact .export-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 191, 174, 0.4);
    background: linear-gradient(135deg, #00a896, #20c997);
}

/* Responsive design for integrated navigation */
@media (max-width: 768px) {
    .stepper-dashboard.compact .step-header-with-nav {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .stepper-dashboard.compact .step-navigation-integrated {
        flex-direction: column;
        gap: 1rem;
        margin-top: 1rem;
        padding-top: 1rem;
    }
    
    .stepper-dashboard.compact .nav-spacer {
        display: none;
    }
    
    .stepper-dashboard.compact .nav-btn {
        width: 100%;
        min-width: unset;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .stepper-dashboard.compact .nav-btn {
        padding: 1rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .stepper-dashboard.compact .nav-btn .material-icons {
        font-size: 1.1rem;
    }
    
    .stepper-dashboard.compact .step-header h2 {
        font-size: 1.3rem;
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
}

/* Enhanced Product Selection Styles */
.product-selector-enhanced {
    background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(248,250,252,0.9));
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 56, 168, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(10px);
}

.product-header-section {
    margin-bottom: 2rem;
}

.product-stats-summary {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.8);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    min-width: 180px;
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.stat-item.selected {
    background: linear-gradient(135deg, rgba(227, 6, 19, 0.1), rgba(227, 6, 19, 0.05));
    border: 1px solid rgba(227, 6, 19, 0.2);
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #0038a8, #4788ff);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(0, 56, 168, 0.3);
}

.stat-item.selected .stat-icon {
    background: linear-gradient(135deg, #e30613, #ff4757);
    box-shadow: 0 4px 12px rgba(227, 6, 19, 0.3);
}

.stat-content .stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #333;
    line-height: 1;
}

.stat-content .stat-label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
}

.product-search-container {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    background: white;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.product-search-field {
    flex: 1;
    min-width: 300px;
}

.clear-product-search-btn {
    background: rgba(244, 67, 54, 0.1) !important;
    color: #f44336 !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
}

.clear-product-search-btn:hover {
    background: rgba(244, 67, 54, 0.2) !important;
    transform: translateY(-2px);
}

.products-results-section {
    margin-top: 1.5rem;
}

.products-header-enhanced {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.products-header-enhanced h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.3rem;
    font-weight: 700;
    color: #0038a8;
    margin: 0;
}

.products-header-enhanced .material-icons {
    font-size: 1.4rem;
}

.search-info {
    font-size: 0.9rem;
    color: #666;
    margin: 0.25rem 0 0 2rem;
}

.search-info strong {
    color: #e30613;
    background: rgba(227, 6, 19, 0.1);
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
}

.selected-product-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(227, 6, 19, 0.1);
    color: #e30613;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-weight: 600;
    border: 1px solid rgba(227, 6, 19, 0.2);
}

.enhanced-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.enhanced-product-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    min-height: 180px;
    display: flex;
    flex-direction: column;
}

.enhanced-product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.6s ease;
    pointer-events: none;
}

.enhanced-product-card:hover::before {
    left: 100%;
}

.enhanced-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
    border-color: rgba(0, 56, 168, 0.2);
}

.enhanced-product-card.selected {
    border-color: #e30613;
    background: linear-gradient(135deg, rgba(227, 6, 19, 0.02), rgba(227, 6, 19, 0.05));
    box-shadow: 0 6px 20px rgba(227, 6, 19, 0.15);
}

.enhanced-product-card.selected:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(227, 6, 19, 0.25);
}

.product-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.product-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, #0038a8, #4788ff);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 56, 168, 0.3);
    transition: all 0.3s ease;
}

.enhanced-product-card.selected .product-icon {
    background: linear-gradient(135deg, #e30613, #ff4757);
    box-shadow: 0 4px 15px rgba(227, 6, 19, 0.4);
}

.enhanced-product-card:hover .product-icon {
    transform: scale(1.1);
}

.selection-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 30px;
    height: 30px;
    background: #e30613;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(227, 6, 19, 0.4);
    animation: bounceIn 0.6s ease;
}

@keyframes bounceIn {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.3); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

.product-card-content {
    flex: 1;
    margin-bottom: 1rem;
}

.product-name-enhanced {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.enhanced-product-card.selected .product-name-enhanced {
    color: #e30613;
}

.product-sku-enhanced {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #666;
    background: rgba(0, 56, 168, 0.05);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-weight: 500;
}

.product-sku-enhanced .material-icons {
    font-size: 1rem;
    color: #0038a8;
}

.product-card-actions {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.action-selected {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #e30613;
    font-weight: 600;
    font-size: 0.9rem;
}

.action-select {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #0038a8;
    font-weight: 500;
    font-size: 0.9rem;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.enhanced-product-card:hover .action-select {
    opacity: 1;
}

.no-products-found {
    text-align: center;
    padding: 3rem 1.5rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    border: 2px dashed rgba(0, 56, 168, 0.2);
}

.no-products-found .material-icons {
    font-size: 4rem;
    color: #ccc;
    margin-bottom: 1rem;
}

.no-products-found h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #666;
    margin: 0 0 0.5rem 0;
}

.no-products-found p {
    color: #888;
    margin-bottom: 1.5rem;
}

.no-products-found strong {
    color: #e30613;
    background: rgba(227, 6, 19, 0.1);
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
}

.pagination-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 152, 0, 0.1);
    color: #ff9800;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 152, 0, 0.2);
    font-weight: 500;
    margin-top: 1rem;
}

.pagination-info .material-icons {
    font-size: 1.2rem;
}

/* Responsive Design for Product List */
@media (max-width: 768px) {
    .product-stats-summary {
        flex-direction: column;
        gap: 1rem;
    }
    
    .stat-item {
        padding: 0.75rem 1rem;
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .stat-icon {
        width: 35px;
        height: 35px;
        font-size: 1.1rem;
    }
    
    .product-search-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .product-search-field {
        min-width: unset;
    }
    
    .products-header-enhanced {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .enhanced-products-grid {
        grid-template-columns: 1fr;
    }
    
    .enhanced-product-card {
        min-height: 140px;
        padding: 1rem;
    }
    
    .product-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .product-selector-enhanced {
        padding: 1rem;
    }
    
    .stat-item {
        padding: 0.75rem 1rem;
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .stat-icon {
        width: 35px;
        height: 35px;
        font-size: 1.1rem;
    }
    
    .enhanced-product-card {
        padding: 1rem;
        min-height: 120px;
    }
    
    .product-name-enhanced {
        font-size: 1rem;
    }
}

/* Legacy product selector compatibility styles */
.stepper-dashboard.compact .product-selector {
    /* Hide legacy selector when enhanced version is present */
    display: none;
}

.stepper-dashboard.compact .product-selector-enhanced + .product-selector {
    display: none;
}

/* Ensure the enhanced version takes precedence */
.stepper-dashboard.compact .product-selector-enhanced {
    display: block !important;
}

/* Legacy product grid styles - keep as fallback */
.stepper-dashboard.compact .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.stepper-dashboard.compact .product-card {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-height: 120px;
    display: flex;
    flex-direction: column;
}

.stepper-dashboard.compact .product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-color: rgba(0, 56, 168, 0.2);
}

.stepper-dashboard.compact .product-card.selected {
    border-color: #e30613;
    background: linear-gradient(135deg, rgba(227, 6, 19, 0.02), rgba(227, 6, 19, 0.05));
    box-shadow: 0 6px 20px rgba(227, 6, 19, 0.15);
}

.stepper-dashboard.compact .product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.stepper-dashboard.compact .product-name {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    flex: 1;
}

.stepper-dashboard.compact .product-card.selected .product-name {
    color: #e30613;
}

.stepper-dashboard.compact .product-sku {
    font-size: 0.8rem;
    color: #666;
    background: rgba(0, 56, 168, 0.05);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    align-self: flex-start;
}

.stepper-dashboard.compact .selected-indicator {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    color: #e30613;
    font-size: 1.5rem;
}

.e-menu-item.e-disabled {
    height: fit-content !important;
}