/* ============================================ */
/* REPORT & ANALYTICS STYLES */
/* ============================================ */

/* Layout */
.report-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

/* KPI Card Icons */
.kpi-card-enhanced {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    position: relative;
    overflow: hidden;
    padding: 1.8rem;
}

.kpi-card-enhanced::before {
    content: '';
    position: absolute;
    right: -20px;
    top: -20px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.kpi-card-header {
    display: flex;
    justify-content: space-between;
    width: 100%;
    align-items: center;
    z-index: 1;
}

.kpi-icon-lg {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
}

.kpi-value-lg {
    font-size: 2rem;
    font-weight: 700;
    margin: 0.5rem 0;
    z-index: 1;
    background: linear-gradient(to right, #fff, #cbd5e1);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Enhanced Bar Chart */
.chart-container-enhanced {
    padding: 1rem;
    height: 320px;
    display: flex;
    flex-direction: column;
}

.bar-chart-visual {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 100%;
    padding-top: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

/* Grid lines */
.chart-grid-line {
    position: absolute;
    left: 0;
    right: 0;
    border-top: 1px dashed rgba(255, 255, 255, 0.05);
    width: 100%;
    z-index: 0;
}

.bar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
    flex: 1;
    position: relative;
    z-index: 1;
    cursor: pointer;
}

.bar {
    width: 35%;
    background: var(--primary);
    border-radius: 6px 6px 0 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    min-height: 4px;
    opacity: 0.8;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.bar.accent {
    background: var(--accent);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.3);
}

.bar-group:hover .bar {
    transform: scaleY(1.05);
    opacity: 1;
    filter: brightness(1.2);
}

.bar-tooltip {
    position: absolute;
    top: -35px;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
    white-space: nowrap;
    z-index: 10;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.bar-group:hover .bar-tooltip {
    opacity: 1;
    transform: translateY(-5px);
}

.bar-label {
    margin-top: 10px;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Donut Chart */
.chart-donut-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem;
}

.donut-chart-container {
    position: relative;
    width: 200px;
    height: 200px;
}

.chart-donut {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(var(--accent) 0% 42%,
            var(--primary) 42% 72%,
            var(--success) 72% 90%,
            var(--warning) 90% 100%);
    position: relative;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
    animation: rotateIn 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes rotateIn {
    from {
        transform: rotate(-90deg) scale(0.8);
        opacity: 0;
    }

    to {
        transform: rotate(0) scale(1);
        opacity: 1;
    }
}

.chart-donut::after {
    content: "SOURCES";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70%;
    height: 70%;
    background: var(--bg-card);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    width: 100%;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    transition: all 0.2s;
}

.legend-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    color: var(--text-main);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    box-shadow: 0 0 8px currentColor;
}