/* =========================================================
   DASHBOARD & PERFORMANCE TRACKER STYLES
   ========================================================= */

/* ================= OVERVIEW STATS ROW ================= */
.dash-stats-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.dash-stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px 15px;
    text-align: center;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.dash-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
    opacity: 0.3;
}

.dash-stat-card:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.dash-stat-icon {
    font-size: 1.6rem;
    margin-bottom: 10px;
    opacity: 0.8;
}

.dash-stat-value {
    font-size: 2rem;
    font-weight: 800;
    font-family: var(--font-code);
    margin-bottom: 5px;
}

.dash-stat-label {
    font-family: var(--font-code);
    font-size: 0.75rem;
    color: var(--text-mute);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ================= DASHBOARD GRID ================= */
.dash-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.dash-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 25px;
    transition: all 0.3s;
}

.dash-card:hover {
    background: rgba(255, 255, 255, 0.05);
}

.dash-card-wide {
    grid-column: span 1;
}

.dash-card-full {
    grid-column: span 2;
}

.dash-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.dash-card-header h3 {
    color: var(--text-main);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dash-card-header h3 i {
    color: #bd93f9;
}

.dash-card-subtitle {
    font-family: var(--font-code);
    font-size: 0.75rem;
    color: var(--text-mute);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ================= ACCURACY CHART ================= */
.dash-chart-area {
    position: relative;
    display: flex;
    flex-direction: column;
}

.dash-grid-lines {
    position: relative;
    width: 100%;
}

.dash-grid-line {
    position: absolute;
    left: 0;
    width: 100%;
    border-top: 1px dashed rgba(255, 255, 255, 0.07);
}

.dash-grid-label {
    font-family: var(--font-code);
    font-size: 0.65rem;
    color: var(--text-mute);
    position: absolute;
    left: -35px;
    top: -8px;
}

.dash-bars-row {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    padding-left: 35px;
    height: 100%;
}

.dash-bar-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.dash-bar {
    width: 80%;
    border-radius: 4px 4px 0 0;
    transition: all 0.5s ease;
    min-height: 4px;
    cursor: pointer;
    position: relative;
}

.dash-bar:hover {
    filter: brightness(1.3);
    transform: scaleX(1.1);
}

.dash-bar-wrapper:hover .dash-bar-tooltip {
    opacity: 1;
    transform: translateY(-5px);
}

.dash-bar-tooltip {
    position: absolute;
    bottom: 100%;
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 5px 10px;
    font-family: var(--font-code);
    font-size: 0.75rem;
    color: var(--text-main);
    white-space: nowrap;
    opacity: 0;
    transition: all 0.2s;
    pointer-events: none;
    z-index: 10;
    text-align: center;
}

.dash-bar-label {
    font-family: var(--font-code);
    font-size: 0.65rem;
    color: var(--text-mute);
    margin-top: 5px;
}

/* ================= HEATMAP ================= */
.dash-heatmap-grid {
    display: grid;
    grid-template-columns: 120px repeat(5, 1fr);
    gap: 4px;
}

.dash-hm-corner {
    background: transparent;
}

.dash-hm-header {
    font-family: var(--font-code);
    font-size: 0.7rem;
    color: var(--why-cyan);
    text-align: center;
    padding: 8px 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.dash-hm-row-label {
    font-family: var(--font-code);
    font-size: 0.75rem;
    color: var(--atlas-gold);
    display: flex;
    align-items: center;
    padding-right: 10px;
    font-weight: 600;
}

.dash-hm-cell {
    border-radius: 6px;
    padding: 12px 6px;
    text-align: center;
    font-family: var(--font-code);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--void);
    cursor: pointer;
    transition: all 0.3s;
    min-height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dash-hm-cell.empty {
    background: rgba(255, 255, 255, 0.03) !important;
    opacity: 1 !important;
    color: var(--text-mute);
    font-size: 0.7rem;
    border: 1px dashed var(--border);
}

.dash-hm-cell:hover {
    transform: scale(1.08);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
    z-index: 2;
}

.dash-hm-legend {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-family: var(--font-code);
    font-size: 0.7rem;
    color: var(--text-mute);
    flex-wrap: wrap;
}

.dash-hm-legend span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dash-hm-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
}

/* ================= HISTORY TABLE ================= */
.dash-history-table {
    width: 100%;
}

.dash-ht-header {
    display: grid;
    grid-template-columns: 50px 1fr 100px 70px 80px 80px 110px;
    gap: 10px;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 8px;
    font-family: var(--font-code);
    font-size: 0.75rem;
    color: var(--text-mute);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.dash-ht-row {
    display: grid;
    grid-template-columns: 50px 1fr 100px 70px 80px 80px 110px;
    gap: 10px;
    padding: 12px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-family: var(--font-code);
    font-size: 0.85rem;
    color: var(--text-main);
    transition: all 0.2s;
    animation: slideIn 0.3s ease;
}

.dash-ht-row:hover {
    background: rgba(255, 255, 255, 0.03);
    transform: translateX(3px);
}

.dash-ht-col {
    display: flex;
    align-items: center;
}

.dash-ht-col.wide {
    font-weight: 600;
    color: var(--atlas-gold);
}

.dash-mode-tag {
    font-size: 0.65rem;
    background: rgba(189, 147, 249, 0.15);
    color: #bd93f9;
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid rgba(189, 147, 249, 0.3);
    font-weight: 700;
}

/* ================= EMPTY STATES ================= */
.dash-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-mute);
}

.dash-empty i {
    display: block;
}

.dash-empty p {
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 1200px) {
    .dash-stats-row {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .dash-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .dash-grid {
        grid-template-columns: 1fr;
    }

    .dash-card-wide,
    .dash-card-full {
        grid-column: span 1;
    }

    .dash-heatmap-grid {
        grid-template-columns: 80px repeat(5, 1fr);
        font-size: 0.65rem;
    }

    .dash-hm-cell {
        padding: 8px 2px;
        font-size: 0.65rem;
        min-height: 35px;
    }

    .dash-ht-header,
    .dash-ht-row {
        grid-template-columns: 40px 1fr 80px 60px 70px 70px 90px;
        font-size: 0.7rem;
        gap: 5px;
    }

    .dash-stat-value {
        font-size: 1.5rem;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}