.kpi-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-bottom: 3rem;
}

.kpi-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
    border: 2px solid rgba(0,200,83,0.3);
    border-radius: 18px;
    padding: 1.5rem;
    text-align: center;
}

.kpi-label {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
    margin-bottom: 0.25rem;
}

.kpi-value {
    font-size: 2.2rem;
    font-weight: 700;
}

.kpi-positive { color: var(--primary); }
.kpi-negative { color: var(--danger); }
.kpi-accent   { color: var(--accent); }




/* ============================================
   BUCKET SELECT (DASHBOARD FILTER)
   ============================================ */

.bucket-filter {
    margin-top: 1.5rem;
    margin-bottom: 2.5rem;
}

.bucket-filter label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
}

.bucket-filter select {
    width: 100%;
    max-width: 420px;

    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    background:
        linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
    border: 2px solid rgba(0, 200, 83, 0.35);
    border-radius: 14px;

    padding: 0.75rem 3rem 0.75rem 1rem;

    font-size: 0.95rem;
    font-weight: 500;
    color: white;

    cursor: pointer;
    transition: all 0.25s ease;
}

/* Custom arrow */
.bucket-filter select {
    background-image:
        linear-gradient(45deg, transparent 50%, var(--primary) 50%),
        linear-gradient(135deg, var(--primary) 50%, transparent 50%);
    background-position:
        calc(100% - 1.25rem) calc(50% + 0.1rem),
        calc(100% - 0.85rem) calc(50% + 0.1rem);
    background-size:
        6px 6px,
        6px 6px;
    background-repeat: no-repeat;
}

.bucket-filter select:hover {
    border-color: var(--primary);
    background:
        linear-gradient(135deg, rgba(255,255,255,0.12), rgba(255,255,255,0.04));
}

.bucket-filter select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 200, 83, 0.25);
}

.bucket-filter select option {
    background: #0f142e;
    color: white;
}


.chart-card {
    position: relative;
    height: 320px;
    gap: 2rem;
}

/* Mobile */
@media (max-width: 640px) {
    .chart-card {
        height: 260px;
    }
}







/* ============================================
   BUCKET PERFORMANCE TABLE
   ============================================ */

.bucket-table-controls {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.bucket-range {
    background: transparent;
    border: 2px solid rgba(0,200,83,0.35);
    color: white;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bucket-range.active,
.bucket-range:hover {
    background: rgba(0,200,83,0.15);
    border-color: var(--primary);
}

.table-wrapper {
    overflow-x: auto;
}

.bucket-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.bucket-table th,
.bucket-table td {
    padding: 0.85rem 0.75rem;
    text-align: left;
    white-space: nowrap;
}

.bucket-table thead th {
    color: rgba(255,255,255,0.6);
    font-weight: 600;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

.bucket-table tbody tr {
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.bucket-table tbody tr:hover {
    background: rgba(255,255,255,0.04);
}

.bucket-profit-positive {
    color: var(--primary);
}

.bucket-profit-negative {
    color: var(--danger);
}


.chart-card {
    position: relative;
    height: 320px;
}

/* Mobile */
@media (max-width: 640px) {
    .chart-card {
        height: 260px;
    }
}