/* ========================================
   DASHBOARD.CSS - Dashboard page specific
   ======================================== */

/* ========== KPI Cards Grid ========== */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.kpi-card {
    background: white;
    border-radius: 16px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.kpi-info h4 {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 6px;
}

.kpi-number {
    font-size: 22px;
    font-weight: bold;
    color: #1e293b;
}

.kpi-change {
    font-size: 11px;
    margin-top: 5px;
    color: #22c55e;
}

.kpi-icon {
    width: 40px;
    height: 40px;
    background: #eff6ff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kpi-icon i {
    font-size: 20px;
    color: #3b82f6;
}

/* ========== Two Columns Layout ========== */
.dashboard-two-columns {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 25px;
    margin-bottom: 30px;
}

.right-column {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* ========== Stats Cards ========== */
.stats-card {
    background: white;
    border-radius: 24px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    transition: all 0.3s ease;
}

.stats-card h3 {
    font-size: 18px;
    color: #1e293b;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stats-card h3 i {
    color: #3b82f6;
}

/* ========== Traffic Sources ========== */
.traffic-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
}

.traffic-item:last-child {
    border-bottom: none;
}

.traffic-name {
    display: flex;
    align-items: center;
    gap: 12px;
}

.traffic-name i {
    width: 32px;
    color: #3b82f6;
}

.traffic-percent {
    font-weight: bold;
    color: #1e293b;
}

/* ========== Visitor Types ========== */
.visitor-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #e2e8f0;
}

.visitor-item:last-child {
    border-bottom: none;
}

.visitor-name {
    font-weight: 500;
}

.visitor-value {
    font-size: 20px;
    font-weight: bold;
    color: #3b82f6;
}

/* ========== Three Columns Layout ========== */
.dashboard-three-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

/* ========== Top Lists ========== */
.top-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
}

.top-list-item:last-child {
    border-bottom: none;
}

.top-list-name {
    display: flex;
    align-items: center;
    gap: 10px;
}

.top-list-rank {
    width: 28px;
    height: 28px;
    background: #eff6ff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: #3b82f6;
}

.top-list-percent {
    font-weight: bold;
    color: #22c55e;
}

/* ========== Chart Card ========== */
.chart-card canvas {
    max-height: 300px;
    width: 100%;
}

/* ========================================
   DASHBOARD RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .dashboard-two-columns {
        grid-template-columns: 1fr;
    }
    
    .dashboard-three-columns {
        grid-template-columns: 1fr;
    }
    
    .kpi-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-card {
        padding: 18px;
    }
}

@media (max-width: 480px) {
    .stats-card {
        padding: 15px;
    }
    
    .chart-card canvas {
        max-height: 200px;
    }
}
/* Fix grid to prevent overflow */
.kpi-grid {
    width: 100%;
    box-sizing: border-box;
}

.kpi-card {
    box-sizing: border-box;
    overflow: hidden;
}

.kpi-number {
    word-break: break-word;
    font-size: 20px;
}

@media (max-width: 480px) {
    .kpi-number {
        font-size: 18px;
    }
    
    .kpi-info h4 {
        font-size: 11px;
    }
    
    .kpi-icon {
        width: 35px;
        height: 35px;
    }
    
    .kpi-icon i {
        font-size: 16px;
    }
}