/* ==========================================================================
   SISTEMA DE DISEÑO & ESTILOS PREMIUM - BEATRIX ANALYTICS
   ========================================================================== */

/* Variables CSS */
:root {
    --bg-main: #090d16;
    --bg-card: rgba(15, 23, 42, 0.75);
    --bg-card-hover: rgba(22, 36, 62, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-hover: rgba(0, 242, 254, 0.4);
    
    --primary: #00f2fe;
    --primary-glow: rgba(0, 242, 254, 0.25);
    --primary-dark: #00c6ff;
    --secondary: #6366f1;
    --secondary-glow: rgba(99, 102, 241, 0.25);
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dark: #0f172a;
    
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.1);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.1);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.1);
    
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    
    --font-heading: 'Outfit', 'Inter', -apple-system, sans-serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --shadow-premium: 0 10px 40px 0 rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 25px rgba(0, 242, 254, 0.2);
}

/* Reset y Estilos Generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: stretch;
}

/* Clases de Utilidad */
.hide {
    display: none !important;
}

.fade-in {
    animation: fadeIn var(--transition-normal) forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Decoraciones de Fondo (Glow Spheres) */
.background-decorations {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.glow-sphere {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.35;
    mix-blend-mode: screen;
}

.glow-sphere-1 {
    top: -10%;
    right: 5%;
    width: 45vw;
    height: 45vw;
    background: radial-gradient(circle, var(--primary) 0%, rgba(0,0,0,0) 70%);
    animation: float1 30s infinite alternate ease-in-out;
}

.glow-sphere-2 {
    bottom: -15%;
    left: 5%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--secondary) 0%, rgba(0,0,0,0) 70%);
    animation: float2 35s infinite alternate ease-in-out;
}

@keyframes float1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-8%, 12%) scale(1.05); }
}

@keyframes float2 {
    0% { transform: translate(0, 0) scale(1.05); }
    100% { transform: translate(12%, -8%) scale(0.95); }
}

/* ==========================================================================
   ESTILOS DE LOGIN
   ========================================================================== */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 20px;
    z-index: 10;
}

.login-card {
    background: var(--bg-card);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--border-color);
    border-radius: 28px;
    padding: 44px;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-premium);
    transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.login-card:hover {
    border-color: rgba(0, 75, 147, 0.25);
    box-shadow: var(--shadow-premium), var(--shadow-glow);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.logo-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    color: white;
    box-shadow: 0 8px 20px rgba(0, 75, 147, 0.35);
}

.logo-icon svg {
    width: 32px;
    height: 32px;
}

.login-header h2 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
    background: linear-gradient(to right, #ffffff, #d1d5db);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-header p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    pointer-events: none;
}

.input-wrapper input {
    width: 100%;
    padding: 14px 16px 14px 46px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: white;
    font-family: var(--font-sans);
    font-size: 15px;
    transition: all var(--transition-fast);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 4px rgba(0, 75, 147, 0.15);
}

.error-message {
    color: #f87171;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 20px;
    text-align: center;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    border-radius: 12px;
    color: white;
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(0, 75, 147, 0.3);
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 75, 147, 0.45);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-icon {
    width: 18px;
    height: 18px;
    transition: transform var(--transition-fast);
}

.btn-primary:hover .btn-icon {
    transform: translateX(4px);
}

.quick-access {
    margin-top: 28px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.quick-access h4 {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    text-align: center;
}

.quick-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    max-height: 140px;
    overflow-y: auto;
    padding-right: 4px;
}

/* Estilo para scrollbar pequeño de botones rápidos */
.quick-buttons::-webkit-scrollbar {
    width: 4px;
}
.quick-buttons::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 99px;
}

.btn-outline-sm {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-outline-sm:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border-color: var(--text-muted);
}

/* ==========================================================================
   ESTILOS DEL DASHBOARD LAYOUT
   ========================================================================== */
.dashboard-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    width: 100%;
    min-height: 100vh;
    z-index: 10;
    transition: grid-template-columns 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dashboard-wrapper.sidebar-collapsed {
    grid-template-columns: 80px 1fr;
}

/* Sidebar Estilos */
.sidebar {
    background: rgba(8, 10, 18, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-right: 1px solid var(--border-color);
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
}

.logo-icon-sm {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 10px rgba(0, 75, 147, 0.2);
}

.logo-icon-sm svg {
    width: 20px;
    height: 20px;
}

.sidebar-brand h3 {
    font-size: 18px;
    font-weight: 800;
    background: linear-gradient(to right, #ffffff, #9ca3af);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.user-profile-widget {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    flex-shrink: 0;
}

.user-details {
    overflow: hidden;
}

.user-details h4 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

.badge {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 99px;
    background: rgba(0, 75, 147, 0.12);
    color: var(--primary);
    border: 1px solid rgba(0, 75, 147, 0.25);
    display: inline-block;
}

.sidebar-nav {
    flex: 1;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 6px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 12px;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}

.sidebar-nav li.active a,
.sidebar-nav a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.04);
}

.sidebar-nav li.active a {
    background: rgba(0, 75, 147, 0.1);
    color: var(--primary);
    border: 1px solid rgba(0, 75, 147, 0.2);
}

.nav-icon {
    width: 20px;
    height: 20px;
}

.sidebar-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}

.btn-logout {
    width: 100%;
    background: transparent;
    border: none;
    color: #f87171;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    font-size: 14px;
    font-family: var(--font-sans);
    font-weight: 500;
    cursor: pointer;
    border-radius: 12px;
    transition: all var(--transition-fast);
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.08);
}

/* Main Content Estilos */
.main-content {
    padding: 30px;
    overflow-y: auto;
    max-height: 100vh;
}

/* ==========================================================================
   BARRA DE FILTROS GLOBALES
   ========================================================================== */
.global-filters-bar {
    background: var(--bg-card);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 30px;
    position: relative;
    z-index: 1000;
}
/* Active Filter Tags */
.active-filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}
.filter-tag {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 153, 224, 0.1);
    color: #0099e0;
    border: 1px solid rgba(0, 153, 224, 0.2);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}
.filter-tag:hover {
    background: rgba(0, 153, 224, 0.15);
    border-color: rgba(0, 153, 224, 0.4);
}
.filter-tag .tag-close, .filter-tag .tag-close-all {
    margin-left: 8px;
    cursor: pointer;
    font-weight: 700;
    color: #9ca3af;
    transition: color 0.15s ease;
}
.filter-tag .tag-close:hover, .filter-tag .tag-close-all:hover {
    color: #ef4444;
}

.multiselect-trigger.filter-active {
    border-color: #0099e0;
    background: rgba(0, 153, 224, 0.04);
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    align-items: end;
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-item label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.filter-item select {
    width: 100%;
    max-width: 100% !important;
}

/* Topbar */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.topbar-left h1 {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.topbar-left .subtitle {
    color: var(--text-muted);
    font-size: 13.5px;
}

.select-premium {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: white;
    padding: 10px 14px;
    font-family: var(--font-sans);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: all var(--transition-fast);
}

.select-premium:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 75, 147, 0.15);
}

.select-premium option {
    background: #0f111a;
    color: white;
}

/* Custom Multiselect */
.custom-multiselect {
    position: relative;
    width: 100%;
}

.multiselect-trigger {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: white;
    padding: 10px 14px;
    font-family: var(--font-sans);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all var(--transition-fast);
    user-select: none;
}

.multiselect-trigger:hover {
    border-color: var(--border-color-hover);
    background: rgba(255, 255, 255, 0.05);
}

.multiselect-trigger span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 8px;
    max-width: 200px;
}

.multiselect-trigger .trigger-icon {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    transition: transform var(--transition-fast);
}

.custom-multiselect.open .multiselect-trigger .trigger-icon {
    transform: rotate(180deg);
}

.multiselect-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    min-width: 220px;
    background: #0e111c;
    border: 1px solid rgba(0, 75, 147, 0.35);
    border-radius: 12px;
    box-shadow: var(--shadow-premium), var(--shadow-glow);
    z-index: 9999;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    animation: slideDown 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.multiselect-actions {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 8px;
}

.btn-link-sm {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-sans);
    transition: color var(--transition-fast);
}

.btn-link-sm:hover {
    color: var(--secondary);
    text-decoration: underline;
}

.multiselect-options {
    max-height: 200px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-right: 4px;
}

.multiselect-options::-webkit-scrollbar {
    width: 4px;
}
.multiselect-options::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 99px;
}

.multiselect-option-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-main);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.multiselect-option-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.multiselect-option-item input[type="checkbox"] {
    accent-color: var(--primary);
    cursor: pointer;
    width: 15px;
    height: 15px;
}

/* ==========================================================================
   CARDS DE INDICADORES (KPIs)
   ========================================================================== */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.kpi-card {
    background: var(--bg-card);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.kpi-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-color-hover);
    background: var(--bg-card-hover);
    box-shadow: 0 12px 30px -5px rgba(0,0,0,0.4);
}

.kpi-icon-wrapper {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.kpi-icon-wrapper svg {
    width: 22px;
    height: 22px;
}

/* Colores de Iconos KPI */
.kpi-icon-wrapper.sales {
    background: rgba(0, 75, 147, 0.1);
    color: var(--primary);
}

.kpi-icon-wrapper.target {
    background: rgba(6, 182, 212, 0.1);
    color: var(--secondary);
}

.kpi-icon-wrapper.volume {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.kpi-icon-wrapper.products {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.kpi-data {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.kpi-title {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.kpi-data h3 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kpi-trend {
    font-size: 11.5px;
    font-weight: 600;
}

.trend-up {
    color: var(--success);
}

.trend-down {
    color: var(--danger);
}

.trend-neutral {
    color: var(--text-muted);
}

.kpi-subtext {
    font-size: 11px;
    color: var(--text-muted);
}

/* ==========================================================================
   SECCIÓN DE GRÁFICOS (CHARTS)
   ========================================================================== */
.charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

/* Ajustes responsivos para grids de gráficos */
@media (max-width: 1400px) {
    .charts-grid {
        grid-template-columns: 1fr 1fr;
    }
    .chart-card.large {
        grid-column: span 2;
    }
}

@media (max-width: 900px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
    .chart-card.large {
        grid-column: span 1;
    }
    .dashboard-wrapper {
        grid-template-columns: 1fr;
    }
    .sidebar {
        height: auto;
        position: relative;
        padding: 20px;
    }
}

.chart-card {
    background: var(--bg-card);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--border-color);
    border-radius: 22px;
    padding: 22px;
    display: flex;
    flex-direction: column;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.chart-header h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 2px;
}

.chart-subtitle {
    font-size: 11.5px;
    color: var(--text-muted);
}

.chart-body {
    flex: 1;
    position: relative;
    min-height: 250px;
    width: 100%;
}

.chart-body.compact {
    min-height: 220px;
}

/* ==========================================================================
   TABLA DE DATOS COMERCIALES / PROBABILÍSTICAS
   ========================================================================== */
.table-card {
    background: var(--bg-card);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--border-color);
    border-radius: 22px;
    padding: 22px;
    margin-bottom: 30px;
}

.table-header {
    margin-bottom: 20px;
}

.table-header h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 2px;
}

.table-subtitle {
    font-size: 11.5px;
    color: var(--text-muted);
}

.table-responsive {
    overflow-x: auto;
}

.premium-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.premium-table th {
    padding: 14px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.premium-table td {
    padding: 10px 14px;
    font-size: 11px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: #e5e7eb;
}

.oc-link {
    color: #3b82f6 !important;
    text-decoration: underline !important;
    font-weight: 700;
    cursor: pointer;
    transition: color 0.15s ease;
}

.oc-link:hover {
    color: #60a5fa !important;
}

.premium-table tbody tr {
    transition: background-color var(--transition-fast);
}

.premium-table tbody tr.main-row {
    cursor: pointer;
}

.premium-table tbody tr.main-row:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

/* Estilos específicos de predicciones */
.probability-track {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 99px;
    overflow: hidden;
    margin-top: 4px;
}

.probability-fill {
    height: 100%;
    border-radius: 99px;
    transition: width 0.5s ease-in-out;
}

/* Expandibles de Tabla */
.expanded-detail-row {
    background: rgba(0, 75, 147, 0.015);
}

.expanded-detail-row td {
    padding: 0 !important; /* El padding se maneja adentro */
}

.prediction-detail-card {
    padding: 24px;
    border-left: 4px solid var(--primary);
    background: rgba(20, 24, 40, 0.4);
    animation: slideDown 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.prediction-detail-card h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mini-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    overflow: hidden;
}

.mini-table th {
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.5px;
}

.mini-table td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

/* ==========================================================================
   ESTILOS DE PANEL ADMINISTRATIVO (CARGA EXCEL)
   ========================================================================== */
.admin-panel-card {
    background: var(--bg-card);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 36px;
    max-width: 800px;
    margin: 0 auto;
}

.upload-zone {
    border: 2px dashed rgba(0, 75, 147, 0.3);
    background: rgba(0, 75, 147, 0.02);
    border-radius: 18px;
    padding: 48px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--primary);
    background: rgba(0, 75, 147, 0.05);
    box-shadow: var(--shadow-glow);
}

.upload-icon {
    width: 60px;
    height: 60px;
    background: rgba(0, 75, 147, 0.08);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px auto;
}

.upload-icon svg {
    width: 32px;
    height: 32px;
}

.upload-zone h3 {
    font-size: 18px;
    margin-bottom: 6px;
}

.upload-zone p {
    font-size: 13px;
    color: var(--text-muted);
}

.upload-status-box {
    margin-top: 24px;
    padding: 16px 20px;
    border-radius: 12px;
    font-size: 14px;
    text-align: center;
    border: 1px solid transparent;
}

.upload-status-box.success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.upload-status-box.error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.excel-instructions {
    margin-top: 36px;
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
}

.excel-instructions h3 {
    font-size: 14px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.excel-instructions ul {
    list-style-type: none;
}

.excel-instructions li {
    font-size: 13.5px;
    color: var(--text-muted);
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.excel-instructions li::before {
    content: "•";
    color: var(--primary);
    font-size: 20px;
    position: absolute;
    left: 4px;
    top: -4px;
}

.excel-instructions code {
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    color: var(--secondary);
}

/* Logo styles */
.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 24px;
}
.logo-container-double {
    gap: 24px;
}
.logo-divider {
    width: 1px;
    height: 60px;
    background-color: var(--border-color);
}
.brand-logo-img {
    height: 75px;
    object-fit: contain;
}
.brand-logo-mp {
    height: 78px;
}
.sidebar-logo-img {
    height: 57px;
    object-fit: contain;
    margin: 0 auto;
}

/* Watermark chart corner logo */
.chart-corner-logo {
    position: absolute;
    top: 14px;
    right: 18px;
    height: 14px;
    width: auto;
    object-fit: contain;
    opacity: 0.45;
    pointer-events: none;
    z-index: 10;
    transition: opacity var(--transition-fast);
}

.chart-card:hover .chart-corner-logo {
    opacity: 0.8;
}

/* Search input inside multiselect dropdown */
.multiselect-search-input {
    width: calc(100% - 20px);
    margin: 6px 10px 8px 10px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: white;
    font-size: 13px;
    font-family: var(--font-sans);
    transition: all var(--transition-fast);
}

.multiselect-search-input:focus {
    outline: none;
    border-color: var(--secondary);
    background: rgba(255, 255, 255, 0.08);
}

/* KPI Modal Windows */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(6, 7, 10, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    opacity: 1;
    transition: opacity 0.25s ease;
}
.modal-backdrop.hide {
    opacity: 0;
    pointer-events: none;
}
.modal-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 90%;
    max-width: 650px;
    padding: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    transform: scale(1);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-backdrop.hide .modal-container {
    transform: scale(0.9);
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}
.modal-header h3 {
    color: white;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}
.modal-close-btn {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.15s ease;
}
.modal-close-btn:hover {
    color: #ef4444;
}
.kpi-modal-chart-container {
    position: relative;
    height: 350px;
    width: 100%;
}

/* Table Sorting Styles */
.sortable-header {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.15s ease, color 0.15s ease;
    position: relative;
}
.sortable-header:hover {
    background-color: rgba(255, 255, 255, 0.04);
    color: white !important;
}
.sort-icon {
    display: inline-block;
    margin-left: 6px;
    font-size: 10px;
    vertical-align: middle;
    color: var(--text-muted);
    transition: color 0.15s ease;
}
.active-sort {
    color: #0099e0 !important;
    background-color: rgba(0, 153, 224, 0.04);
}
.active-sort .sort-icon {
    color: #0099e0 !important;
}

/* Order Detail Modal Specific Styles */
.order-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}
@media (max-width: 768px) {
    .order-info-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}
.order-info-section {
    background: rgba(255, 255, 255, 0.02);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}
.order-info-section h4 {
    color: #0099e0;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.order-info-section p {
    margin: 8px 0;
    font-size: 13.5px;
    line-height: 1.4;
}
.order-info-section strong {
    color: var(--text-muted);
}

/* Banner de aviso permanente en la barra lateral */
.sidebar-disclaimer-banner {
    background: rgba(245, 158, 11, 0.03);
    border: 1px solid rgba(245, 158, 11, 0.15);
    border-radius: 12px;
    padding: 12px 14px;
    margin: 16px 14px;
    font-family: var(--font-sans);
}

.sidebar-disclaimer-banner .disclaimer-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    font-weight: 700;
    color: #f59e0b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.sidebar-disclaimer-banner p {
    font-size: 11px;
    line-height: 1.45;
    color: #9ca3af;
    margin: 0;
}

/* ==========================================================================
   ESTILOS PARA BARRA LATERAL COLAPSABLE
   ========================================================================== */
.btn-sidebar-toggle {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.btn-sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    border-color: var(--text-muted);
}

.sidebar-collapsed .btn-sidebar-toggle {
    transform: rotate(180deg);
}

.sidebar-collapsed .sidebar {
    padding: 30px 10px;
}

.sidebar-collapsed .sidebar-brand {
    justify-content: center !important;
    margin-bottom: 24px;
}

.sidebar-collapsed .sidebar-brand img.sidebar-logo-img {
    display: none;
}

.sidebar-collapsed .user-profile-widget {
    padding: 8px 0;
    justify-content: center;
    border: none;
    background: transparent;
}

.sidebar-collapsed .user-details {
    display: none;
}

.sidebar-collapsed #impersonation-widget,
.sidebar-collapsed #connection-status-widget {
    display: none !important;
}

.sidebar-collapsed .sidebar-nav span {
    display: none;
}

.sidebar-collapsed .sidebar-nav a {
    justify-content: center;
    padding: 12px 0;
}

.sidebar-collapsed .sidebar-disclaimer-banner {
    display: none;
}

.sidebar-collapsed .btn-logout span {
    display: none;
}

.sidebar-collapsed .btn-logout {
    justify-content: center;
    padding: 12px 0;
}

/* Estilos responsivos para tarjetas de comparación SAP */
.sap-comparison-card {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 20px !important;
    width: 100% !important;
}

@media (max-width: 900px) {
    .kpi-card.sap-comparison-card {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 16px !important;
    }
    .kpi-card.sap-comparison-card .sap-card-section-kilos {
        min-width: 100% !important;
    }
    .kpi-card.sap-comparison-card .sap-card-section-monto {
        border-top: 1px solid var(--border-color);
        padding-top: 16px;
        margin-top: 4px;
        min-width: 100% !important;
    }
}

/* Toast Notification System */
.toast-alert {
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    color: white;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    min-width: 320px;
    max-width: 450px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
    backdrop-filter: blur(10px);
    animation: toast-slide-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: all 0.3s ease;
}

.toast-alert.info {
    border-left-color: #3b82f6; /* Blue */
}

.toast-alert.success {
    border-left-color: #10b981; /* Green */
}

.toast-alert.warning {
    border-left-color: #f59e0b; /* Yellow */
}

.toast-alert.error {
    border-left-color: #ef4444; /* Red */
}

.toast-alert-close {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    line-height: 1;
    transition: color 0.15s ease;
}

.toast-alert-close:hover {
    color: white;
}

@keyframes toast-slide-in {
    from {
        transform: translateY(100%) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.toast-fade-out {
    opacity: 0;
    transform: translateY(-20px) scale(0.9);
}

/* Animation for spinning sync icon */
@keyframes spin-clockwise {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.spinning-icon {
    animation: spin-clockwise 1s linear infinite;
}

/* ==========================================================================
   NUEVO: ESTILOS PARA PROYECTO CROSS-SELLING
   ========================================================================== */

/* Estilos de Pestañas */
.tab-btn {
    border-bottom: 2px solid transparent !important;
}

.tab-btn:hover {
    color: white !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

.tab-btn.active {
    color: #06b6d4 !important;
    border-bottom: 2px solid #06b6d4 !important;
    background: rgba(6, 182, 212, 0.05) !important;
}

.subtab-btn:hover {
    color: white !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

.subtab-btn.active {
    color: white !important;
    background: #06b6d4 !important;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3) !important;
}

/* Radar Heatmap */
.cross-heatmap-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 4px;
    margin-top: 10px;
}

.cross-heatmap-table th {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 8px;
    text-align: center;
    border: none;
}

.cross-heatmap-table td {
    padding: 12px;
    text-align: center;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    color: white;
    transition: all 0.2s ease;
}

.cross-heatmap-table td.row-label {
    background: rgba(255, 255, 255, 0.02) !important;
    color: var(--text-muted);
    text-align: left;
    font-size: 12.5px;
    border: 1px solid var(--border-color);
}

.cross-heatmap-cell {
    cursor: pointer;
    position: relative;
}

.cross-heatmap-cell:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.cell-opportunity {
    background: linear-gradient(135deg, #b45309, #d97706) !important; /* Dorado/Amarillo */
    border: 1px solid #f59e0b;
}

.cell-covered {
    background: linear-gradient(135deg, #065f46, #047857) !important; /* Verde */
    border: 1px solid #10b981;
}

.cell-empty {
    background: rgba(255, 255, 255, 0.03) !important; /* Gris */
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-weight: normal;
}

/* Tooltip flotante */
.cross-tooltip {
    display: none;
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #0f172a;
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: white;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: normal;
    z-index: 100;
    width: 220px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.cross-heatmap-cell:hover .cross-tooltip {
    display: block;
}

/* Alertas de Stock y Termómetro */
.stock-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.2s;
}

.stock-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.stock-status-badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

.stock-ok {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
}

.stock-low {
    background: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
}

.stock-critical {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    animation: pulse-border 1.5s infinite;
}

@keyframes pulse-border {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* Custom CSS overrides for detailed SAP filters and options dropdowns to prevent overlapping */
#subview-sap-sales .multiselect-trigger {
    font-size: 11.5px;
    padding: 8px 12px;
}

#subview-sap-sales .multiselect-option-item span {
    font-size: 11px !important;
}

#subview-sap-sales .option-row span {
    font-size: 11px !important;
}

/* Premium styling for predictions table */
#subview-predictions .premium-table th {
    font-size: 12px;
    font-weight: 700;
    color: #e5e7eb;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    background: rgba(255, 255, 255, 0.015);
    border-bottom: 2px solid rgba(0, 153, 224, 0.25);
    padding: 12px;
}

#predictions-table-body td {
    font-size: 10.5px;
    color: #cbd5e1;
    padding: 8px 12px;
}

#predictions-table-body td strong, 
#predictions-table-body td span {
    font-size: 10.5px;
}

/* ==========================================================================
   ESTILOS PREMIUM PARA TARJETAS REGIONALES
   ========================================================================== */
.region-card-premium {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 8px;
    transition: all var(--transition-normal);
}

.region-card-premium:hover {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(6, 182, 212, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
}

.region-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 0.3px;
}

.region-sales-badge {
    font-size: 11px;
    font-weight: 700;
    color: #34d399;
    background: rgba(52, 211, 153, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.mfg-ranking-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mfg-row {
    display: flex;
    align-items: center;
    font-size: 11px;
    color: var(--text-muted);
}

.mfg-rank {
    font-weight: 700;
    color: var(--text-muted);
    width: 20px;
}

.mfg-dot {
    width: 6px;
    height: 6px;
    background: linear-gradient(135deg, #b45309, #d97706) !important; /* Dorado/Amarillo */
    border: 1px solid #f59e0b;
}

.cell-covered {
    background: linear-gradient(135deg, #065f46, #047857) !important; /* Verde */
    border: 1px solid #10b981;
}

.cell-empty {
    background: rgba(255, 255, 255, 0.03) !important; /* Gris */
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-weight: normal;
}

/* Tooltip flotante */
.cross-tooltip {
    display: none;
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #0f172a;
    border: 1px solid rgba(6, 182, 212, 0.3);
    color: white;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: normal;
    z-index: 100;
    width: 220px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.cross-heatmap-cell:hover .cross-tooltip {
    display: block;
}

/* Alertas de Stock y Termómetro */
.stock-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.2s;
}

.stock-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.stock-status-badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}

.stock-ok {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
}

.stock-low {
    background: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
}

.stock-critical {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    animation: pulse-border 1.5s infinite;
}

@keyframes pulse-border {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* Custom CSS overrides for detailed SAP filters and options dropdowns to prevent overlapping */
#subview-sap-sales .multiselect-trigger {
    font-size: 11.5px;
    padding: 8px 12px;
}

#subview-sap-sales .multiselect-option-item span {
    font-size: 11px !important;
}

#subview-sap-sales .option-row span {
    font-size: 11px !important;
}

/* Premium styling for predictions table */
#subview-predictions .premium-table th {
    font-size: 12px;
    font-weight: 700;
    color: #e5e7eb;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    background: rgba(255, 255, 255, 0.015);
    border-bottom: 2px solid rgba(0, 153, 224, 0.25);
    padding: 12px;
}

#predictions-table-body td {
    font-size: 10.5px;
    color: #cbd5e1;
    padding: 8px 12px;
}

#predictions-table-body td strong, 
#predictions-table-body td span {
    font-size: 10.5px;
}

/* ==========================================================================
   ESTILOS PREMIUM PARA TARJETAS REGIONALES
   ========================================================================== */
.region-card-premium {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 8px;
    transition: all var(--transition-normal);
}

.region-card-premium:hover {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(6, 182, 212, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
}

.region-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 0.3px;
}

.region-sales-badge {
    font-size: 11px;
    font-weight: 700;
    color: #34d399;
    background: rgba(52, 211, 153, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.mfg-ranking-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mfg-row {
    display: flex;
    align-items: center;
    font-size: 11px;
    color: var(--text-muted);
}

.mfg-rank {
    font-weight: 700;
    color: var(--text-muted);
    width: 20px;
}

.mfg-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 6px;
    display: inline-block;
}

.mfg-name {
    flex: 1;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mfg-pct {
    font-weight: 700;
    color: var(--secondary);
}

/* ==========================================================================
   ESTILOS DE SUBMENÚ COLAPSABLE (MERCADO PÚBLICO)
   ========================================================================== */
.nav-item-submenu {
    display: flex;
    flex-direction: column;
    margin-bottom: 6px;
}

.submenu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 12px;
    transition: all var(--transition-normal);
    border: 1px solid transparent;
}

.submenu-header:hover {
    color: white;
    background: rgba(255, 255, 255, 0.04);
}

.submenu-header-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
}

.submenu-arrow-icon {
    width: 14px;
    height: 14px;
    transition: transform var(--transition-normal);
    opacity: 0.6;
}

.nav-item-submenu.open .submenu-arrow-icon {
    transform: rotate(180deg);
}

.submenu-list {
    list-style: none;
    padding-left: 20px;
    margin-top: 4px;
    border-left: 1px solid rgba(255, 255, 255, 0.08); /* Línea vertical de guía */
    margin-left: 22px; /* Alineación con el icono del padre */
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height var(--transition-normal) cubic-bezier(0.4, 0, 0.2, 1), opacity var(--transition-normal) cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item-submenu.open .submenu-list {
    max-height: 350px;
    opacity: 1;
}

/* Modificar padding de enlaces del submenú para alinearlos mejor */
.submenu-list a {
    padding: 10px 14px !important;
    font-size: 13.5px !important;
    background: transparent !important; /* Quitar fondo de bloque de los sub-ítems */
    border: 1px solid transparent !important;
}

.submenu-list a:hover {
    color: white !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border-radius: 8px;
}

.submenu-list li.active a {
    color: var(--secondary) !important; /* Destacar sub-ítem activo en cian */
    font-weight: 600 !important;
}

/* Resaltar cabecera si el submenú contiene un item activo */
.nav-item-submenu.has-active .submenu-header {
    color: var(--secondary);
    border-left: 3px solid var(--secondary);
    border-radius: 0 12px 12px 0;
    background: rgba(6, 182, 212, 0.03);
}

/* Soporte para Sidebar Colapsado */
.sidebar-collapsed .submenu-header-title span {
    display: none;
}

.sidebar-collapsed .submenu-header {
    justify-content: center;
    padding: 12px 0;
}

.sidebar-collapsed .submenu-arrow-icon {
    display: none !important;
}

.sidebar-collapsed .submenu-list {
    padding-left: 0;
}

.sidebar-collapsed .submenu-list a {
    justify-content: center;
    padding: 10px 0 !important;
}

/* ==========================================================================
   ESTILOS DE LA HOJA DE UTILIDADES
   ========================================================================== */
.btn-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12.5px;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.btn-pill:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.btn-pill.active {
    background: rgba(6, 182, 212, 0.15);
    border-color: var(--secondary);
    color: var(--secondary);
}

/* Tarjetas de Utilidades */
.utility-card {
    background: rgba(30, 41, 59, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all var(--transition-fast);
    backdrop-filter: blur(5px);
    position: relative;
    overflow: hidden;
}

.utility-card:hover {
    transform: translateY(-2px);
    border-color: rgba(6, 182, 212, 0.25);
    box-shadow: 0 8px 24px -10px rgba(6, 182, 212, 0.2);
}

.utility-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.utility-badge-category {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
}

.utility-sku {
    font-size: 11px;
    font-weight: 600;
    color: var(--secondary);
    background: rgba(6, 182, 212, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.utility-card-title {
    font-size: 14.5px;
    font-weight: 600;
    color: white;
    margin: 4px 0;
    line-height: 1.4;
}

.utility-card-thumbnail {
    width: 100%;
    height: 150px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.03);
    overflow: hidden;
}

.utility-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform var(--transition-normal);
}

.utility-card:hover .utility-card-thumbnail img {
    transform: scale(1.03);
}

.utility-card-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
}

.utility-download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.utility-download-btn:hover {
    background: rgba(6, 182, 212, 0.1);
    border-color: rgba(6, 182, 212, 0.3);
    color: var(--secondary);
}

.utility-download-btn-primary {
    background: linear-gradient(135deg, rgba(0, 75, 147, 0.4), rgba(6, 182, 212, 0.4));
    border-color: rgba(6, 182, 212, 0.35);
}

.utility-download-btn-primary:hover {
    background: linear-gradient(135deg, rgba(0, 75, 147, 0.6), rgba(6, 182, 212, 0.6));
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

/* Tarjetas de Licitación ChileCompra (v5.7) */
.tender-card {
    background: rgba(30, 41, 59, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: all var(--transition-fast) ease-in-out;
    backdrop-filter: blur(8px);
    position: relative;
    overflow: hidden;
}

.tender-card:hover {
    transform: translateY(-2px);
    border-color: rgba(6, 182, 212, 0.25);
    box-shadow: 0 10px 20px -10px rgba(0, 0, 0, 0.5), 0 0 15px rgba(6, 182, 212, 0.05);
    background: rgba(30, 41, 59, 0.5);
}

.tender-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.tender-code {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 0.05em;
    font-family: monospace;
}

.tender-badge-state {
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.tender-badge-state.publicada {
    border: 1px solid var(--secondary);
    color: var(--secondary);
    background: rgba(0, 153, 224, 0.05);
}

.tender-badge-state.cerrada {
    border: 1px solid #f59e0b;
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.05);
}

.tender-badge-state.adjudicada {
    border: 1px solid #10b981;
    color: #10b981;
    background: rgba(16, 185, 129, 0.05);
}

.tender-badge-state.desierta {
    border: 1px solid #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.tender-card-title {
    font-size: 14px;
    font-weight: 700;
    color: white;
    line-height: 1.4;
}

.tender-organism {
    font-size: 12px;
    color: #38bdf8;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tender-organism svg {
    width: 14px;
    height: 14px;
    opacity: 0.8;
}

.tender-description {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}

.tender-items-list {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 12px;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tender-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--text-muted);
}

.tender-item-name {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 70%;
}

.tender-item-qty {
    font-weight: 600;
    color: var(--secondary);
}

.tender-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 12px;
    margin-top: 4px;
}

.tender-monto {
    display: flex;
    flex-direction: column;
}

.tender-monto-label {
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tender-monto-value {
    font-size: 13.5px;
    font-weight: 800;
    color: #10b981;
}

.tender-date-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--text-muted);
}

/* ==========================================================================
   PERSISTENCIA DE ALTURA EN TABLA DE ORDENES (15 FILAS MÁXIMO CON SCROLL)
   ========================================================================== */
#orders-table-container {
    max-height: 535px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.15) transparent;
}
#orders-table-container::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
#orders-table-container::-webkit-scrollbar-thumb {
    background-color: rgba(255,255,255,0.15);
    border-radius: 4px;
}
#orders-table-container .premium-table th {
    position: sticky;
    top: 0;
    background-color: #0d1527; /* Fondo opaco a juego con var(--bg-card) */
    z-index: 20;
    box-shadow: inset 0 -1px 0 rgba(255,255,255,0.08);
}

/* ==========================================================================
   ESTILOS PREMIUM PARA EL DASHBOARD ESTILO POWER BI (MERCADO PÚBLICO)
   ========================================================================== */
.powerbi-dashboard-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 25px;
}

.powerbi-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-bottom: 12px;
    margin-bottom: 10px;
}

.powerbi-section-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.powerbi-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
}

.powerbi-card {
    background: var(--bg-card);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    overflow: hidden;
}

.powerbi-card:hover {
    border-color: rgba(6, 182, 212, 0.25);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.powerbi-card.col-12 { grid-column: span 12; }
.powerbi-card.col-8  { grid-column: span 8; }
.powerbi-card.col-6  { grid-column: span 6; }
.powerbi-card.col-4  { grid-column: span 4; }

@media (max-width: 1024px) {
    .powerbi-card.col-8, .powerbi-card.col-4, .powerbi-card.col-6 {
        grid-column: span 12;
    }
}

.powerbi-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 10px;
}

.powerbi-card-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.powerbi-card-title h3 {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text-main);
}

.powerbi-card-title p {
    font-size: 11px;
    color: var(--text-muted);
}

.powerbi-card-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.powerbi-btn-action {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-muted);
    border-radius: 6px;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.powerbi-btn-action:hover {
    background: rgba(6, 182, 212, 0.15);
    border-color: var(--secondary);
    color: white;
}

.powerbi-card-body {
    transition: max-height 0.3s ease;
    overflow: visible;
}

.powerbi-card.collapsed {
    gap: 0;
}

.powerbi-card.collapsed .powerbi-card-body {
    display: none;
}

/* KPIs del nuevo Dashboard */
.powerbi-kpis-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    width: 100%;
}

.powerbi-kpi-card {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.powerbi-kpi-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.powerbi-kpi-icon.sales   { background: rgba(6, 182, 212, 0.15); color: var(--secondary); }
.powerbi-kpi-icon.ticket  { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.powerbi-kpi-icon.volume  { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.powerbi-kpi-icon.share   { background: rgba(139, 92, 246, 0.15); color: #8b5cf6; }

.powerbi-kpi-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.powerbi-kpi-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.powerbi-kpi-value {
    font-size: 17px;
    font-weight: 800;
    color: white;
}

/* Tabla Matriz */
.powerbi-matrix-container {
    overflow-x: auto;
    width: 100%;
}

.matrix-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.matrix-table th {
    padding: 10px 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(255,255,255,0.08);
}

.matrix-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: #e5e7eb;
}

.matrix-table tr.total-row {
    background: rgba(255,255,255,0.04);
    font-weight: 700;
}

.matrix-table tr.total-row td {
    border-top: 1px solid rgba(255,255,255,0.15);
    border-bottom: 2px solid rgba(255,255,255,0.15);
    color: white;
}

/* Módulo Especial de Análisis de Precios */
.price-analysis-filters {
    display: flex;
    gap: 15px;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 12px 18px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    margin-bottom: 10px;
}

.price-analysis-filters select {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    outline: none;
    font-size: 12.5px;
    min-width: 160px;
}

.price-trend-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 10.5px;
    font-weight: 700;
}

.price-trend-badge.up {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.price-trend-badge.down {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.price-trend-badge.equal {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.benchmark-gap-badge {
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
}

.benchmark-gap-badge.positive {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.benchmark-gap-badge.negative {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

/* Skeletons de Carga */
.powerbi-skeleton {
    width: 100%;
    height: 120px;
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 12px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Barra de Filtros Autónomos del Dashboard Power BI */
.powerbi-local-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 14px 18px;
    border-radius: 14px;
    margin-bottom: 22px;
    position: relative;
    z-index: 1100;
}

.powerbi-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 140px;
}

.powerbi-filter-group.align-end {
    justify-content: flex-end;
    flex: 0 0 auto;
    min-width: auto;
}

.powerbi-filter-group label {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.powerbi-filter-group select {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-main);
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.powerbi-filter-group select:hover,
.powerbi-filter-group select:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

.powerbi-btn-reset-filters {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #f87171;
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.powerbi-btn-reset-filters:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #ffffff;
    border-color: #ef4444;
}

/* ==========================================================================
   COMPONENTES PERSONALIZADOS: DROPDOWN DE MULTISELECCIÓN CON BUSCADOR
   ========================================================================== */
.custom-multiselect-container {
    position: relative;
    width: 100%;
}

.multiselect-btn {
    width: 100%;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-main);
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.multiselect-btn:hover {
    border-color: var(--secondary);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

.multiselect-btn::after {
    content: "";
    border: solid var(--text-muted);
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 3px;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    margin-left: 8px;
    flex-shrink: 0;
}

.custom-multiselect-container.open .multiselect-btn::after {
    transform: rotate(-135deg);
}

.multiselect-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    max-height: 280px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: fadeInDropdown 0.15s ease-out;
}

@keyframes fadeInDropdown {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.multiselect-dropdown.hide {
    display: none !important;
}

.multiselect-search-container {
    padding: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.multiselect-search-input {
    width: 100%;
    background: rgba(30, 41, 59, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: var(--text-main) !important;
    padding: 6px 10px !important;
    border-radius: 6px !important;
    font-size: 11.5px !important;
    outline: none !important;
    box-sizing: border-box;
}

.multiselect-search-input:focus {
    border-color: var(--secondary) !important;
    box-shadow: 0 0 5px rgba(6, 182, 212, 0.3) !important;
}

.multiselect-options-list {
    overflow-y: auto;
    flex: 1;
    padding: 4px 0;
}

.multiselect-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    font-size: 11.5px;
    color: #e2e8f0;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease;
}

.multiselect-option:hover {
    background: rgba(255, 255, 255, 0.05);
}

.multiselect-option.selected {
    background: rgba(6, 182, 212, 0.08);
    color: var(--secondary);
}

.multiselect-option input[type="checkbox"] {
    cursor: pointer;
    accent-color: var(--secondary);
    width: 13px;
    height: 13px;
    margin: 0;
}

.multiselect-option-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ==========================================================================
   COMPONENTES PIVOT TREE TABLE (COMPARADOR DE PRECIOS BENCHMARK)
   ========================================================================== */
.benchmark-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 14px;
    border-radius: 12px;
    margin-bottom: 18px;
}

.benchmark-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.benchmark-filter-group label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tree-toggle-btn {
    background: transparent;
    border: none;
    color: var(--secondary);
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-right: 6px;
    border-radius: 4px;
    transition: background-color 0.2s;
    user-select: none;
}

.tree-toggle-btn:hover {
    background: rgba(6, 182, 212, 0.15);
}

.tree-row-level-0 {
    background: rgba(15, 23, 42, 0.55) !important;
    font-weight: 700;
}

.tree-row-level-1 {
    background: rgba(15, 23, 42, 0.25) !important;
    font-weight: 600;
}

.tree-row-level-2 {
    background: rgba(15, 23, 42, 0.08) !important;
    font-weight: 400;
}

.indent-level-1 {
    padding-left: 24px !important;
}

.indent-level-2 {
    padding-left: 48px !important;
}

.price-diff-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10.5px;
    font-weight: 700;
}

.price-diff-badge.softys {
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
}

.price-diff-badge.positive {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.price-diff-badge.negative {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.price-diff-badge.neutral {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

/* ==========================================================================
   ANIMACIÓN DINÁMICA DE LOGO "RESPIRACIÓN DE LUZ" & TÍTULO ROSADO/FUCSIA
   ========================================================================== */
.beatrix-logo-container {
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 12px 24px;
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 8px;
}

/* Destello / Brillo de luz que recorre el logo */
.beatrix-logo-container::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        60deg,
        rgba(255, 255, 255, 0) 20%,
        rgba(255, 46, 147, 0.25) 45%,
        rgba(255, 255, 255, 0.45) 50%,
        rgba(217, 70, 239, 0.25) 55%,
        rgba(255, 255, 255, 0) 80%
    );
    transform: rotate(25deg);
    animation: lightShimmerSweep 4.5s infinite cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

@keyframes lightShimmerSweep {
    0% { transform: translateX(-150%) rotate(25deg); }
    35% { transform: translateX(150%) rotate(25deg); }
    100% { transform: translateX(150%) rotate(25deg); }
}

/* Efecto de Respiración de Luz en la Imagen del Logo (Aumentado >125%) */
.brand-logo-img-dynamic {
    height: 140px;
    max-width: 340px;
    object-fit: contain;
    animation: logoBreathingGlow 3.8s ease-in-out infinite alternate;
    transition: transform 0.3s ease;
}

/* Logo de Sidebar Engrandecido */
.sidebar-logo-img {
    height: 85px;
    max-width: 220px;
    object-fit: contain;
    filter: drop-shadow(0 0 14px rgba(255, 0, 127, 0.4));
}

@keyframes logoBreathingGlow {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 16px rgba(255, 0, 127, 0.5)) drop-shadow(0 0 30px rgba(0, 242, 254, 0.4));
    }
    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 35px rgba(236, 72, 153, 0.9)) drop-shadow(0 0 60px rgba(217, 70, 239, 0.7));
    }
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 20px rgba(244, 63, 94, 0.6)) drop-shadow(0 0 40px rgba(99, 102, 241, 0.5));
    }
}

/* Título BEATRIX con Gradiente de tonos Rosados y Fucsias Neón */
.beatrix-title-glow {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 26px;
    letter-spacing: -0.5px;
    margin-top: 4px;
    background: linear-gradient(
        120deg,
        #ff007f 0%,
        #ff2e93 25%,
        #f43f5e 50%,
        #d946ef 75%,
        #ff007f 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fuchsiaGradientFlow 4s linear infinite;
    filter: drop-shadow(0 0 18px rgba(255, 0, 127, 0.35));
}

@keyframes fuchsiaGradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* BOTÓN DE CONTACTO WHATSAPP CTA EN LOGIN */
.whatsapp-cta-card {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.whatsapp-cta-button {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(37, 211, 102, 0.08);
    border: 1px solid rgba(37, 211, 102, 0.3);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.whatsapp-cta-button:hover {
    background: rgba(37, 211, 102, 0.18);
    border-color: rgba(37, 211, 102, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.3);
}

.whatsapp-icon-pulse {
    color: #25d366;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: whatsappPulse 2s infinite;
}

@keyframes whatsappPulse {
    0% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(37, 211, 102, 0.7)); }
    70% { transform: scale(1.15); filter: drop-shadow(0 0 12px rgba(37, 211, 102, 0.5)); }
    100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(37, 211, 102, 0)); }
}

.whatsapp-cta-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.whatsapp-cta-title {
    font-size: 12px;
    font-weight: 600;
    color: #f8fafc;
}

.whatsapp-cta-phone {
    font-size: 13px;
    color: #25d366;
    font-weight: 700;
}

/* OCULTAR BANNER ROJO DE PRUEBAS DE CLOUDFLARE EN CAPTCHA */
#captcha-container {
    display: flex !important;
    justify-content: center !important;
    align-items: flex-start !important;
    margin-top: 10px;
    margin-bottom: 10px;
    height: 65px !important;
    max-height: 65px !important;
    overflow: hidden !important;
    border-radius: 12px;
}




