/* ==========================================================================
   SALES PORTAL SPECIFIC STYLES
   ========================================================================== */

/* --- Apple-style Segmented Capsule Controls --- */
.segmented-control {
    display: flex;
    background: #F1F5F9; /* Clean soft slate background */
    padding: 3px;
    border-radius: 18px; /* Slightly reduced radius */
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: inset 0 2px 4px rgba(15, 23, 42, 0.03);
    align-items: center;
    gap: 2px;
}

.segmented-btn {
    padding: 4px 10px; /* Super compact fit to stay inline with titles perfectly */
    font-size: 0.72rem; /* Slightly reduced to optimize space and visual weight */
    font-weight: 700;
    border-radius: 14px; /* Matches capsule outer curve */
    border: none;
    cursor: pointer;
    background: transparent;
    color: var(--text-sub);
    font-family: 'Plus Jakarta Sans', sans-serif;
    letter-spacing: -0.15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.segmented-btn i {
    font-size: 0.8rem;
    transition: transform 0.25s ease;
}

.segmented-btn:hover {
    color: var(--text-main);
    background: rgba(15, 23, 42, 0.04); /* Soft background hint on hover */
}

.segmented-btn:hover i {
    transform: scale(1.1);
}

.segmented-btn.active {
    background: #FFFFFF;
    color: var(--accent-purple);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.12), 0 1px 3px rgba(0, 0, 0, 0.02);
}

.segmented-btn.active:hover {
    background: #FFFFFF;
    color: var(--accent-purple);
    transform: translateY(-0.5px) scale(1.01);
}

/* Alert styling for Unassigned Inbound Leads */
.command-card-orange.alert-pulse {
    background: rgba(249, 115, 22, 0.04);
    border-color: rgba(249, 115, 22, 0.35);
    box-shadow: 0 0 15px rgba(249, 115, 22, 0.08);
    animation: cardGlowAlert 2s infinite ease-in-out;
}

.command-card-orange.alert-pulse .command-card-value {
    color: var(--accent-orange);
}

@keyframes cardGlowAlert {
    0% { border-color: rgba(249, 115, 22, 0.35); box-shadow: 0 0 15px rgba(249, 115, 22, 0.08); }
    50% { border-color: rgba(249, 115, 22, 0.6); box-shadow: 0 0 25px rgba(249, 115, 22, 0.18); }
    100% { border-color: rgba(249, 115, 22, 0.35); box-shadow: 0 0 15px rgba(249, 115, 22, 0.08); }
}

/* --- Sales Donut Chart Card --- */
.sales-donut-card {
    height: 500px !important; /* Restored to 500px for absolute grid balance */
}

/* --- Admin Funnel 2-Column Grid adapter --- */
.admin-chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* --- RESPONSIVE MEDIA QUERIES FOR SALES SPECIFICS --- */
@media (max-width: 550px) {
    .admin-chart-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 991px) {
    .segmented-control {
        overflow-x: auto !important;
        white-space: nowrap !important;
        max-width: 100% !important;
        display: flex !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 4px 8px !important;
        scrollbar-width: none !important; /* Firefox */
    }
    
    .segmented-control::-webkit-scrollbar {
        display: none !important; /* Chrome/Safari */
    }
    
    .segmented-btn {
        flex: 0 0 auto !important;
    }
}
