/* ============================================================
   GENERAL
   ============================================================ */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Inter", sans-serif;
    background: #f5f7fa;
}


/* ============================================================
   DASHBOARD WRAPPER
   ============================================================ */

.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
}


/* ============================================================
   SIDEBAR
   ============================================================ */

.dashboard-sidebar {
    width: 260px;
    min-height: 100vh;

    background: #212529;
    color: white;

    flex-shrink: 0;

    transition: width 0.3s ease;

    overflow: hidden;
}


/* ============================================================
   SIDEBAR HEADER
   ============================================================ */

.sidebar-header {
    height: 70px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 18px;

    border-bottom: 1px solid rgba(255,255,255,0.15);
}


.sidebar-logo {
    display: flex;
    align-items: center;

    gap: 12px;

    white-space: nowrap;

    font-size: 17px;
    font-weight: 600;
}


.sidebar-logo i {
    font-size: 22px;
}


/* ============================================================
   COLLAPSE BUTTON
   ============================================================ */

.sidebar-collapse-btn {
    width: 35px;
    height: 35px;

    border: 0;
    border-radius: 5px;

    background: rgba(255,255,255,0.1);

    color: white;

    cursor: pointer;

    flex-shrink: 0;
}


.sidebar-collapse-btn:hover {
    background: rgba(255,255,255,0.2);
}


/* ============================================================
   SIDEBAR MENU
   ============================================================ */

.sidebar-menu {
    padding-top: 15px;
}


.sidebar-link {
    display: flex;

    align-items: center;

    gap: 15px;

    width: 100%;

    padding: 14px 20px;

    color: white;

    text-decoration: none;

    white-space: nowrap;

    transition: background 0.2s ease;
}


.sidebar-link i {
    width: 22px;

    text-align: center;

    font-size: 17px;

    flex-shrink: 0;
}


.sidebar-link:hover {
    background: rgba(255,255,255,0.1);

    color: white;
}


.sidebar-link.active {
    background: #0d6efd;

    color: white;
}


/* ============================================================
   LOGOUT
   ============================================================ */

.logout-link {
    margin-top: 25px;

    border-top: 1px solid rgba(255,255,255,0.15);
}


/* ============================================================
   COLLAPSED SIDEBAR
   ============================================================ */

.dashboard-sidebar.collapsed {
    width: 75px;
}


.dashboard-sidebar.collapsed .sidebar-text {
    display: none;
}


.dashboard-sidebar.collapsed .sidebar-header {
    justify-content: center;

    padding: 0 10px;
}


.dashboard-sidebar.collapsed .sidebar-logo {
    display: none;
}


.dashboard-sidebar.collapsed .sidebar-link {
    justify-content: center;

    padding-left: 0;
    padding-right: 0;
}


.dashboard-sidebar.collapsed .sidebar-collapse-btn {
    margin: 0 auto;
}


/* ============================================================
   MAIN CONTENT
   ============================================================ */

.dashboard-content {
    flex: 1;

    min-width: 0;

    padding: 30px;
}


/* ============================================================
   DASHBOARD HEADER
   ============================================================ */

.dashboard-header {
    margin-bottom: 30px;
}


.dashboard-header h1 {
    font-size: 28px;

    font-weight: 600;

    margin-bottom: 5px;
}


/* ============================================================
   DASHBOARD CARDS
   ============================================================ */

.dashboard-card {
    height: 100%;

    padding: 22px;

    background: white;

    border-radius: 10px;

    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}


.dashboard-card-icon {
    font-size: 30px;

    color: #0d6efd;

    margin-bottom: 15px;
}


.dashboard-card h5 {
    font-weight: 600;

    margin-bottom: 10px;
}


.dashboard-card p {
    color: #6c757d;

    font-size: 14px;

    min-height: 42px;
}


.dashboard-card a {
    text-decoration: none;

    font-size: 14px;

    font-weight: 600;
}


/* ============================================================
   MOBILE TOP BAR
   ============================================================ */

.mobile-topbar {
    display: none;

    align-items: center;

    gap: 15px;

    margin-bottom: 25px;
}


.mobile-page-title {
    font-size: 20px;

    font-weight: 600;
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 991px) {

    .dashboard-sidebar {
        display: none;
    }


    .mobile-topbar {
        display: flex;
    }


    .dashboard-content {
        width: 100%;

        padding: 20px;
    }

}


/* ============================================================
   SMALL MOBILE
   ============================================================ */

@media (max-width: 576px) {

    .dashboard-content {
        padding: 15px;
    }


    .dashboard-header h1 {
        font-size: 23px;
    }

}
/* ============================================================
   MOBILE SIDEBAR
   ============================================================ */

@media (max-width: 991px) {

    .dashboard-sidebar.mobile-open {
        display: block;

        position: fixed;

        top: 0;
        left: 0;

        width: 280px;

        height: 100vh;

        z-index: 1050;

        box-shadow: 5px 0 20px rgba(0,0,0,0.25);
    }


    .dashboard-sidebar.mobile-open .sidebar-text {
        display: inline;
    }


    .dashboard-sidebar.mobile-open .sidebar-logo {
        display: flex;
    }


    .dashboard-sidebar.mobile-open .sidebar-header {
        justify-content: space-between;

        padding: 0 18px;
    }


    .dashboard-sidebar.mobile-open .sidebar-link {
        justify-content: flex-start;

        padding: 14px 20px;
    }

}


/* Dark overlay */

.mobile-overlay {
    display: none;

    position: fixed;

    inset: 0;

    background: rgba(0,0,0,0.5);

    z-index: 1040;
}


.mobile-overlay.active {
    display: block;
}
/* ============================================================
   MOBILE CLOSE BUTTON
   ============================================================ */

.mobile-close-btn {
    display: none;

    width: 38px;
    height: 38px;

    border: none;
    border-radius: 5px;

    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;

    font-size: 20px;
    cursor: pointer;

    align-items: center;
    justify-content: center;
}


/* ============================================================
   MOBILE SIDEBAR
   ============================================================ */

@media (max-width: 991px) {

    .dashboard-sidebar.mobile-open {
        display: block;

        position: fixed;

        top: 0;
        left: 0;

        width: 280px;
        height: 100vh;

        z-index: 1050;

        box-shadow: 5px 0 20px rgba(0, 0, 0, 0.25);

        overflow-y: auto;
    }


    /* Show X ONLY on mobile when sidebar is open */
    .dashboard-sidebar.mobile-open .mobile-close-btn {
        display: flex;
    }


    /* Hide desktop collapse arrow on mobile */
    .dashboard-sidebar.mobile-open .sidebar-collapse-btn {
        display: none;
    }


    /* Show menu text on mobile */
    .dashboard-sidebar.mobile-open .sidebar-text {
        display: inline;
    }


    /* Show logo on mobile */
    .dashboard-sidebar.mobile-open .sidebar-logo {
        display: flex;
    }


    /* Header layout */
    .dashboard-sidebar.mobile-open .sidebar-header {
        justify-content: space-between;
        padding: 0 18px;
    }


    /* Mobile menu links */
    .dashboard-sidebar.mobile-open .sidebar-link {
        justify-content: flex-start;
        padding: 14px 20px;
    }

}
/* ============================================================
   COLORFUL STAT CARDS & PROGRESS
   ============================================================ */

.stat-card {
    border: none;
    border-radius: 16px;
    padding: 1.4rem 1.5rem;
    color: #fff;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.16);
}

.stat-card::after {
    content: "";
    position: absolute;
    right: -20px;
    bottom: -20px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
}

.stat-card .stat-icon {
    font-size: 2rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

.stat-card .stat-value {
    font-size: 1.85rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 0.9rem;
    opacity: 0.92;
    margin-top: 0.25rem;
}

.stat-gradient-purple {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-gradient-blue {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.stat-gradient-green {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: #0b3d2e !important;
}

.stat-gradient-orange {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: #3d1a00 !important;
}

.stat-gradient-pink {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-gradient-teal {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.progress-ring-wrap {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.progress {
    height: 12px;
    border-radius: 10px;
    background: #e9ecef;
}

.progress-bar {
    border-radius: 10px;
}

.badge-leader {
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    color: #3d2a00;
    font-weight: 600;
}

.group-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.07);
    overflow: hidden;
}

.group-card .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 1rem 1.25rem;
}

.chat-box {
    max-height: 320px;
    overflow-y: auto;
    background: #f8f9fc;
    border-radius: 12px;
    padding: 1rem;
}

.chat-bubble {
    background: #fff;
    border-radius: 12px;
    padding: 0.65rem 0.9rem;
    margin-bottom: 0.6rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.chat-bubble.mine {
    background: linear-gradient(135deg, #e0e7ff 0%, #f3e8ff 100%);
    margin-left: 1.5rem;
}

.announcement-item {
    border-left: 4px solid #667eea;
    background: #f8f9fc;
    border-radius: 0 12px 12px 0;
    padding: 0.85rem 1rem;
    margin-bottom: 0.75rem;
}

.note-item {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 0.9rem 1rem;
    margin-bottom: 0.65rem;
    background: #fff;
    transition: box-shadow 0.15s;
}

.note-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.assignment-status-pending {
    background: #fff3cd;
    color: #856404;
}

.assignment-status-submitted {
    background: #cfe2ff;
    color: #084298;
}

.assignment-status-scored {
    background: #d1e7dd;
    color: #0f5132;
}

.btn-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: #fff;
}

.btn-gradient:hover {
    background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
    color: #fff;
}

.section-title {
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title i {
    color: #667eea;
}

.welcome-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    border-radius: 18px;
    padding: 1.75rem 2rem;
    color: #fff;
    margin-bottom: 1.75rem;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.35);
}

.welcome-banner h2 {
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.welcome-banner p {
    opacity: 0.95;
    margin-bottom: 0;
}

.table thead.table-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.table thead.table-gradient th {
    border: none;
    font-weight: 600;
}
