﻿/* ===============================
   PAGE BACKGROUND
================================ */
body {
    background: #f1f5f9;
}

/* ===============================
   DASHBOARD CARDS
================================ */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(9, 1fr); /* exact 9 cards */
    gap: 16px;
    margin-bottom: 30px;
}

/*.dashboard-card {
    background: #fff;
    padding: 18px;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(0,0,0,.06);
    transition: 0.2s;
}*/

@media (max-width: 768px) {
    .dashboard-cards {
        grid-template-columns: repeat(2, 1fr); /* 2 per row */
    }
}


.dashboard-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100px; /* fixed height for all cards */
    background: #ffffff;
}

    .dashboard-card h6 {
        margin-bottom: 6px;
        font-size: 13px;
        color: #6b7280; /* soft gray */
    }

    .dashboard-card h2 {
        margin: 0;
    }

    /*.dashboard-card.students {
        border-left: 5px solid #3b82f6;
    }

    .dashboard-card.subjects {
        border-left: 5px solid #10b981;
    }

    .dashboard-card.average {
        border-left: 5px solid #f59e0b;
    }

    .dashboard-card.danger {
        border-left: 5px solid #ef4444;
    }

    .dashboard-card.warning {
        border-left: 4px solid #f59e0b;*/ /* orange */
    /*}

        .dashboard-card.warning h2 {
            color: #f59e0b;
        }*/

    /* Total Students */
    .dashboard-card.students {
        border-left: 4px solid #3b82f6;
    }

    /* Appeared */
    .dashboard-card.info {
        border-left: 4px solid #0ea5e9;
    }

    /* Absent */
    .dashboard-card.warning {
        border-left: 4px solid #ef4444; /* red */
    }

        .dashboard-card.warning h2 {
            color: #ef4444;
        }

    /* Subjects */
    .dashboard-card.subjects {
        border-left: 4px solid #10b981;
    }

    /* Average */
    .dashboard-card.average {
        border-left: 4px solid #6366f1;
    }

    /* Weak */
    .dashboard-card.weak {
        border-left: 4px solid #f59e0b;
    }

    /* Pass */
    .dashboard-card.success {
        border-left: 4px solid #22c55e;
    }

    /* Fail */
    .dashboard-card.danger {
        border-left: 4px solid #dc2626;
    }

        .dashboard-card.danger h2 {
            color: #dc2626;
        }

    .dashboard-card h2 {
        font-size: 22px;
        font-weight: 600;
        line-height: 1.2;
    }

    .dashboard-card:hover {
        transform: translateY(-2px);
        transition: 0.2s ease;
    }

.stat-label {
    font-size: 12px;
}

.dashboard-card.partial {
    border-left: 4px solid #f59e0b; /* amber */
}

    .dashboard-card.partial h2 {
        color: #f59e0b;
    }

/* ===============================
   FILTER BAR
================================ */
.dashboard-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 24px;
    background: #ffffff;
    padding: 14px 20px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,.08);
    margin-bottom: 24px;
    width: 100%;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 14px;
    position: relative;
    min-width: 140px;
}

    .filter-group span {
        font-size: 13px;
        font-weight: 500;
        color: #6b7280;
        white-space: nowrap;
    }

    .filter-group select {
        height: 36px;
        padding: 4px 12px;
        font-size: 13px;
        border-radius: 10px;
        border: 1px solid #e5e7eb;
        background: #ffffff;
        min-width: 120px;
        transition: all 0.2s ease;
    }

        .filter-group select:hover {
            border-color: #c7d2fe;
        }

        .filter-group select:focus {
            outline: none;
            border-color: #6366f1;
            box-shadow: 0 0 0 2px rgba(99,102,241,0.15);
        }

    .filter-group:not(:last-child)::after {
        content: "";
        width: 1px;
        height: 20px;
        background: #e5e7eb;
        margin-left: 14px;
    }

/* 🔥 FORCE CLEAN DROPDOWN (override bootstrap) */
.form-select {
    background-color: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: none !important;
    border-radius: 10px !important;
}

    /* remove grey focus glow */
    .form-select:focus {
        background-color: #ffffff !important;
        border-color: #6366f1 !important;
        box-shadow: 0 0 0 2px rgba(99,102,241,0.15) !important;
    }

.chart-container {
    height: 360px; /* ⭐ BIGGER = premium feel */
    padding: 10px 10px 0 10px;
}

.card {
    padding: 16px !important;
}

    .card h5 {
        font-size: 18px;
        font-weight: 600;
    }

/*.chart-container {
    width: 100%;
    max-width: 1200px;  ⭐ balanced width 
    height: 360px;
    margin: 0 auto;
}*/

.chart-container {
    width: 100%;
    height: 300px;
}

@media (max-width: 768px) {

    .dashboard-filter-bar {
        flex-direction: column; /* 🔥 stack vertically */
        align-items: stretch;
    }

    .filter-group {
        width: 100%;
        justify-content: space-between;
    }

        .filter-group select {
            width: 60%;
        }

        .filter-group::after {
            display: none;
        }
}

@media (min-width: 769px) {
    .menu-btn {
        display: none;
    }
}

/*.chart-container {
    margin-left: 0;*/ /* ⭐ align with card content */
    /*margin-right: auto;
}*/


.page-title i {
    color: #4f46e5; /* same as your app theme */
}

.page-title i {
    color: #4f46e5;
    font-size: 22px;
    flex-shrink: 0; /* ✅ icon won't shrink */
}

.page-title span {
    font-size: 20px;
    font-weight: 600;
}

.menu-btn {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #374151;
}

/*@media (max-width: 768px) {

    .sidebar {
        transform: translateX(-100%);
    }

        .sidebar.active {
            transform: translateX(0);
        }

    .main-content {
        margin-left: 0 !important;
        width: 100%;
    }
}*/

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    z-index: 1500;
    display: none;
}

    .sidebar-overlay.active {
        display: block;
    }

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    z-index: 1500;
    display: none;
}

    .sidebar-overlay.active {
        display: block;
    }

.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
}

.card {
    margin-bottom: 16px;
}

.clickable {
    cursor: pointer;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-box {
    background: white;
    width: 400px;
    padding: 20px;
    border-radius: 12px;
}

.ai-insight-card {
    border-left: 5px solid #6f42c1;
    background: #fcfbff;
    border-radius: 12px;
}

.ai-insight-text {
    line-height: 1.8;
    font-size: 15px;
}