/* 1. Main Dashboard Wrapper */
.dashboard-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 100%;
}

/* 2. The Unified Grid */
.stats-main {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    width: 100%;  margin-bottom: 16px;
}

/* 3. The Unified Stat Item (Box) */
.stat-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 1.25rem;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    border-color: var(--accent-color);
}

/* 4. Labels (Locked to Primary Text) */
.stat-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text-primary); /* Remains text-primary per your request */
    text-transform: uppercase;
    margin-bottom: 6px;
}

/* 5. Values (Color Coded by Asset) */
.val {
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.val.ltc {
    color: var(--accent-color); /* Blue */
}

.val.usd {
    color: var(--accent-euro); /* Emerald Green */
}


/* 6. Flow Logic */
.flow-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.badge {
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    font-variant-numeric: tabular-nums;
}

.badge.green {
    background: rgba(74, 222, 128, 0.12);
    color: var(--text-up);
}

.badge.red {
    background: rgba(248, 113, 113, 0.12);
    color: var(--text-down);
}

/* 7. Mobile View (2-column layout) */
@media (max-width: 640px) {
    .stats-main {
        grid-template-columns: repeat(2, 1fr); 
        gap: 10px;
    }

    .stat-item {
        padding: 1rem;
        /* Ensure content stays inside */
        overflow: hidden; 
    }

    .flow-row {
        /* This is the key fix: stack the value and the badge */
        flex-direction: column;
        align-items: flex-start; 
        gap: 4px;
    }

    .val {
        font-size: 1.15rem; /* Slightly smaller to prevent overflow */
        white-space: nowrap;
    }

    .badge {
        font-size: 0.65rem;
        padding: 1px 6px;
    }
}
/* This handles the alignment for ALL badges (Price, 1D Flow, 30D Flow) */
.flow-row {
    display: flex;
    align-items: center; 
    gap: 8px;
    margin-top: 4px;
}

/* Ensure the badge is vertically centered with the price text */
.badge {
    height: fit-content;
    line-height: 1;
    padding: 3px 8px; /* Standardized padding for all pills */
}.val.meta {
    color: var(--cons-color) !important;
}
/* Maintain your existing logic for everything else */
.val:not(.ltc):not(.usd):not(.meta) {
    color: var(--text-primary);
}
