/* ========================================= */
/* 🎯 PHASE 2: REVENUE DASHBOARD STYLES (excluding calendar) */
/* ========================================= */

/* 🧭 GLOBAL COLORS (HTML5UP Astral Theme Base) */
:root {
    --color-primary: #2e3842;
    --color-secondary: #5a6772;
    --color-accent: #50bfe6;
    --color-bg: #f5f7fa;
    --color-text: #2e3842;
    --color-border: #e0e6ed;
    /* KPI Arc Colors */
    --arc-red: #e74c3c;
    --arc-orange: #f39c12;
    --arc-blue: #3498db;
    --arc-green: #2ecc71;
    /* Podium Colors */
    --podium-1st: #f1c40f;
    --podium-2nd: #c0c0c0;
    --podium-3rd: #cd7f32;
}

/* ========================================= */
/* 🎨 KPI PERFORMANCE ARCS */
/* ========================================= */
.kpi-arcs-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    padding: 2rem 1rem;
    flex-wrap: wrap;
}

.kpi-arc {
    display: flex;
    justify-content: center;
    align-items: center;
}

.arc-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: conic-gradient(
        var(--arc-red) 0%,
        var(--arc-orange) 75%,
        var(--arc-blue) 90%,
        var(--arc-green) 100%
    );
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.arc-placeholder:hover {
    transform: scale(1.05);
}

.arc-placeholder.large {
    width: 160px;
    height: 160px;
}

.arc-label {
    font-size: 0.8rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.arc-value {
    font-size: 1.5rem;
}

.arc-sublabel {
    font-size: 0.7rem;
    opacity: 0.8;
}

/* ========================================= */
/* 🏆 PRODUCT ANALYTICS ROW */
/* ========================================= */
.product-analytics-row {
    display: flex;
    gap: 2rem;
    padding: 2rem 1rem;
    flex-wrap: wrap;
}

.winner-podium,
.trending-products {
    flex: 1;
    min-width: 300px;
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.section-title {
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tooltip-trigger {
    color: var(--color-secondary);
    cursor: help;
    font-size: 0.9rem;
}

.tooltip-trigger:hover {
    color: var(--color-accent);
}

/* 🏅 PODIUM STYLES */
.podium-container {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 1rem;
    margin: 1.5rem 0;
    height: 200px;
    position: relative;
}

.podium-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    border-radius: 8px 8px 0 0;
    width: 100px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--color-bg);
    border: 2px solid transparent;
}

.podium-step:hover {
    transform: translateY(-5px);
    border-color: var(--color-accent);
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}

.first-place {
    height: 180px;
    background: var(--podium-1st);
    color: white;
    z-index: 3;
}

.second-place {
    height: 140px;
    background: var(--podium-2nd);
    color: #333;
    z-index: 2;
}

.third-place {
    height: 100px;
    background: var(--podium-3rd);
    color: white;
    z-index: 1;
}

.podium-rank {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.podium-product {
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 0.5rem;
}

.podium-change {
    font-size: 0.8rem;
}

.trend-up {
    color: var(--arc-green);
}

.trend-down {
    color: var(--arc-red);
}

.trend-same {
    color: var(--color-secondary);
}

.view-all-btn {
    background: var(--color-accent);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
}

.view-all-btn:hover {
    background: #3aa8c9;
}

/* 📈 TRENDING PRODUCTS */
.trending-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.trending-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-border);
}

.trending-item:last-child {
    border-bottom: none;
}

.product-name {
    font-weight: 500;
}

.elo-score {
    font-weight: bold;
    color: var(--color-primary);
}

.trend-icon {
    font-size: 0.9rem;
}

/* ========================================= */
/* 📊 DETAIL INSIGHTS SECTION */
/* ========================================= */
.detail-insights {
    background: white;
    padding: 2rem;
    margin: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: relative;
}

.insights-toolbar {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 200px;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 1rem;
}

.compare-btn {
    background: var(--color-accent);
    color: white;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.compare-btn:hover {
    background: #3aa8c9;
}

.insight-period-dropdown {
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    min-width: 120px;
}

/* METRICS GRID */
.metrics-category {
    margin-bottom: 2rem;
}

.metric-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.metric-item {
    background: var(--color-bg);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
}

.metric-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.metric-item.inactive {
    opacity: 0.6;
    cursor: not-allowed;
}

.metric-label {
    font-size: 0.9rem;
    color: var(--color-secondary);
    margin-bottom: 0.25rem;
}

.metric-value {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--color-primary);
}

/* ========================================= */
/* 🌀 LOADING OVERLAY */
/* ========================================= */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 999;
    display: none;
}

.loading-overlay.active {
    display: flex;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--color-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    margin-top: 1rem;
    color: var(--color-text);
    font-weight: 500;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================= */
/* 📊 TOP 10 PRODUCTS - TEMPORARY FEEDBACK */
/* ========================================= */
.top-products-temp {
    margin-top: 2rem;
}

.top-products-title {
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.top-products-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.top-products-table th,
.top-products-table td {
    padding: 0.5rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.top-products-table th {
    background: var(--color-secondary);
    color: white;
    text-align: left;
}

.top-products-table td:nth-child(3),
.top-products-table td:nth-child(4) {
    text-align: right;
}

.temp-notice {
    font-size: 0.8rem;
    color: var(--color-secondary);
    margin-top: 0.5rem;
}

.no-products {
    color: var(--color-secondary);
    font-style: italic;
}

.no-data-state {
    text-align: center;
    padding: 2rem;
    color: var(--color-secondary);
    background: transparent;
}

/* ========================================= */
/* 🖼️ MODALS (HIDDEN BY DEFAULT) */
/* ========================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 2rem;
    display: none;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    margin-top: 1.5rem;
    padding: 0.5rem 1.5rem;
    background: var(--color-secondary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.modal-close:hover {
    background: #4a5560;
}

.compare-split {
    display: flex;
    gap: 2rem;
    margin: 2rem 0;
    align-items: flex-start;
}

.compare-divider {
    width: 1px;
    background: var(--color-border);
    margin: 1rem 0;
}

.compare-panel {
    flex: 1;
}

.chart-placeholder {
    height: 200px;
    background: var(--color-bg);
    border: 2px dashed var(--color-border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-secondary);
    font-style: italic;
}

.chart-placeholder.large {
    height: 300px;
}
