/* =========================================================
   DASHBOARD.CSS
   Student Performance Analytics Portal
   Dashboard Center
   ========================================================= */


/* ==================== PAGE FOUNDATION ==================== */

#main-content {
    width: 100%;
    min-height: 60vh;
}


/* ==================== DASHBOARD PAGE HEADER ==================== */

/* #dashboardHeader.dashboard-header,
#overviewHeader.dashboard-header {
    width: min(1180px, calc(100% - 40px));

    margin: 0 auto;

    padding: 42px 20px 24px;

    text-align: center;
}


#dashboardHeader h1,
#overviewHeader h2 {
    margin: 0;

    color: #172033;

    font-weight: 700;

    letter-spacing: -0.4px;
}


#dashboardHeader h1 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
}


#overviewHeader h2 {
    font-size: clamp(1.35rem, 3vw, 1.8rem);
}


#dashboardHeader p {
    max-width: 650px;

    margin: 10px auto 0;

    color: #64748b;

    font-size: 0.88rem;

    line-height: 1.7;
} */


/* ==================== DASHBOARD TOOLBAR ==================== */

#dashboardToolbar.dashboard-toolbar {
    width: min(1180px, calc(100% - 40px));

    margin: 0 auto 26px;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 12px;

    padding: 14px;

    background: #ffffff;

    border: 1px solid #e2e8f0;

    border-radius: 14px;

    box-shadow:
        0 8px 22px rgba(15, 23, 42, 0.05);
}


#dashboardSearch.dashboard-search {
    flex: 1;

    min-width: 180px;

    min-height: 44px;

    padding: 10px 13px;

    border: 1px solid #d7dee8;

    border-radius: 9px;

    background: #ffffff;

    color: #0f172a;

    font-family: inherit;

    font-size: 0.8rem;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}


#dashboardSearch::placeholder {
    color: #94a3b8;
}


#dashboardSearch:hover {
    border-color: #a5b4fc;
}


#dashboardSearch:focus {
    border-color: #4f46e5;

    box-shadow:
        0 0 0 3px rgba(79, 70, 229, 0.09);
}


#refreshDashboard {
    flex-shrink: 0;

    min-height: 44px;

    white-space: nowrap;
}


/* ==================== DASHBOARD CARDS ==================== */

#dashboardCards.dashboard-cards {
    width: min(1180px, calc(100% - 40px));

    margin: 0 auto 34px;

    display: grid;

    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 20px;
}


/* ==================== ROLE CARDS ==================== */

#dashboardCards .dashboard-card {
    min-width: 0;

    min-height: 245px;

    padding: 30px 24px;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    text-align: center;

    background: #ffffff;

    border: 1px solid #e2e8f0;

    border-radius: 18px;

    box-shadow:
        0 12px 28px rgba(15, 23, 42, 0.07);

    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease,
        border-color 0.22s ease;
}


#dashboardCards .dashboard-card:hover {
    transform: translateY(-5px);

    border-color: #c7d2fe;

    box-shadow:
        0 18px 36px rgba(15, 23, 42, 0.11);
}


#dashboardCards .dashboard-card>h2 {
    width: 66px;
    height: 66px;

    margin: 0 0 16px;

    display: flex;

    align-items: center;
    justify-content: center;

    background: #eef2ff;

    border-radius: 16px;

    font-size: 1.9rem;

    line-height: 1;
}


#dashboardCards .dashboard-card>h3 {
    margin: 0;

    color: #1e293b;

    font-size: 1.05rem;

    font-weight: 700;
}


#dashboardCards .dashboard-card>p {
    max-width: 280px;

    margin: 10px 0 0;

    color: #64748b;

    font-size: 0.76rem;

    line-height: 1.7;
}


#dashboardCards .dashboard-card>br {
    display: none;
}


#dashboardCards .dashboard-card>.btn {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    margin-top: 18px;

    min-height: 42px;

    padding: 9px 17px;

    border-radius: 9px;

    text-decoration: none;
}


/* ==================== ROLE-SPECIFIC ACCENTS ==================== */

#dashboardCards .dashboard-card[data-role="Administrator"]>h2 {
    background: #eef2ff;
}


#dashboardCards .dashboard-card[data-role="Teacher"]>h2 {
    background: #ecfeff;
}


#dashboardCards .dashboard-card[data-role="Student"]>h2 {
    background: #f0fdf4;
}


/* ==================== PORTAL MODULES ==================== */

#portalModules.activity-section {
    width: min(1000px, calc(100% - 40px));

    margin: 0 auto 38px;

    padding: 28px;

    background: #ffffff;

    border: 1px solid #e2e8f0;

    border-radius: 18px;

    box-shadow:
        0 10px 26px rgba(15, 23, 42, 0.06);
}


#portalModules h2 {
    margin: 0 0 20px;

    color: #1e293b;

    font-size: 1.2rem;

    text-align: center;
}


#portalModules .activity-list {
    margin: 0;

    padding: 0;

    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 10px 18px;

    list-style: none;
}


#portalModules .activity-list li {
    padding: 11px 13px;

    background: #f8fafc;

    border: 1px solid #eef2f7;

    border-radius: 9px;

    color: #475569;

    font-size: 0.74rem;

    line-height: 1.5;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}


#portalModules .activity-list li:hover {
    transform: translateX(2px);

    background: #eef2ff;

    border-color: #c7d2fe;

    color: #312e81;
}


/* ==================== PORTAL OVERVIEW ==================== */

#overviewCards.dashboard-cards {
    width: min(1000px, calc(100% - 40px));

    margin: 0 auto 40px;

    display: grid;

    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 18px;
}


#overviewCards .card {
    min-width: 0;

    padding: 25px;

    text-align: center;

    background: #ffffff;

    border: 1px solid #e2e8f0;

    border-radius: 16px;

    box-shadow:
        0 10px 24px rgba(15, 23, 42, 0.06);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}


#overviewCards .card:hover {
    transform: translateY(-3px);

    border-color: #c7d2fe;

    box-shadow:
        0 15px 30px rgba(15, 23, 42, 0.09);
}


#overviewCards .card h3 {
    margin: 0 0 10px;

    color: #475569;

    font-size: 0.8rem;

    font-weight: 600;
}


#overviewCards .card h2 {
    margin: 0;

    color: #312e81;

    font-size: 1.8rem;

    font-weight: 700;
}


/* ==================== NOTIFICATION PANEL ==================== */

#notificationPanel.notification-panel {
    position: fixed;

    top: 82px;

    right: 22px;

    z-index: 5000;

    width: min(380px, calc(100vw - 30px));

    max-height: min(620px, calc(100vh - 105px));

    overflow: hidden;

    display: flex;

    flex-direction: column;

    background: #ffffff;

    border: 1px solid #e2e8f0;

    border-radius: 16px;

    box-shadow:
        0 20px 50px rgba(15, 23, 42, 0.18);

    opacity: 0;

    visibility: hidden;

    transform: translateY(-10px);

    pointer-events: none;

    transition:
        opacity 0.2s ease,
        transform 0.2s ease,
        visibility 0.2s ease;
}


#notificationPanel.active,
#notificationPanel[aria-hidden="false"] {
    opacity: 1;

    visibility: visible;

    transform: translateY(0);

    pointer-events: auto;
}


#notificationPanel .notification-header {
    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 16px 18px;

    border-bottom: 1px solid #e2e8f0;
}


#notificationPanel .notification-header h3 {
    margin: 0;

    color: #1e293b;

    font-size: 0.9rem;
}


#closeNotifications {
    width: 34px;
    height: 34px;

    border: 0;

    border-radius: 8px;

    background: #f1f5f9;

    color: #64748b;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}


#closeNotifications:hover {
    background: #fee2e2;

    color: #dc2626;
}


#notificationSearch {
    width: calc(100% - 28px);

    min-height: 40px;

    margin: 12px 14px;

    padding: 9px 12px;

    border: 1px solid #d7dee8;

    border-radius: 9px;

    background: #f8fafc;

    color: #0f172a;

    font-family: inherit;

    font-size: 0.75rem;

    outline: none;
}


#notificationSearch:focus {
    border-color: #4f46e5;

    box-shadow:
        0 0 0 3px rgba(79, 70, 229, 0.08);
}


#notificationList {
    flex: 1;

    overflow-y: auto;

    padding: 4px 14px 14px;
}


/* ==================== DARK THEME ==================== */

.dark-theme #dashboardHeader h1,
.dark-theme #overviewHeader h2 {
    color: #f8fafc;
}


.dark-theme #dashboardHeader p {
    color: #94a3b8;
}


.dark-theme #dashboardToolbar.dashboard-toolbar {
    background: #111827;

    border-color: #334155;

    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.18);
}


.dark-theme #dashboardSearch.dashboard-search {
    background: #1e293b;

    border-color: #334155;

    color: #f8fafc;
}


.dark-theme #dashboardCards .dashboard-card,
.dark-theme #overviewCards .card,
.dark-theme #portalModules.activity-section {
    background: #111827;

    border-color: #334155;

    box-shadow:
        0 15px 32px rgba(0, 0, 0, 0.20);
}


.dark-theme #dashboardCards .dashboard-card:hover,
.dark-theme #overviewCards .card:hover {
    border-color: #4f46e5;

    box-shadow:
        0 18px 38px rgba(0, 0, 0, 0.27);
}


.dark-theme #dashboardCards .dashboard-card>h3 {
    color: #f1f5f9;
}


.dark-theme #dashboardCards .dashboard-card>p {
    color: #94a3b8;
}


.dark-theme #dashboardCards .dashboard-card[data-role="Administrator"]>h2 {
    background: rgba(99, 102, 241, 0.16);
}


.dark-theme #dashboardCards .dashboard-card[data-role="Teacher"]>h2 {
    background: rgba(6, 182, 212, 0.12);
}


.dark-theme #dashboardCards .dashboard-card[data-role="Student"]>h2 {
    background: rgba(34, 197, 94, 0.12);
}


.dark-theme #portalModules h2 {
    color: #f1f5f9;
}


.dark-theme #portalModules .activity-list li {
    background: #1e293b;

    border-color: #334155;

    color: #cbd5e1;
}


.dark-theme #portalModules .activity-list li:hover {
    background: #312e81;

    border-color: #4338ca;

    color: #ffffff;
}


.dark-theme #overviewCards .card h3 {
    color: #94a3b8;
}


.dark-theme #overviewCards .card h2 {
    color: #a5b4fc;
}


/* ==================== DARK NOTIFICATIONS ==================== */

.dark-theme #notificationPanel.notification-panel {
    background: #111827;

    border-color: #334155;
}


.dark-theme #notificationPanel .notification-header {
    border-bottom-color: #334155;
}


.dark-theme #notificationPanel .notification-header h3 {
    color: #f8fafc;
}


.dark-theme #closeNotifications {
    background: #1e293b;

    color: #94a3b8;
}


.dark-theme #closeNotifications:hover {
    background: #7f1d1d;

    color: #fecaca;
}


.dark-theme #notificationSearch {
    background: #1e293b;

    border-color: #334155;

    color: #f8fafc;
}


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

@media (max-width: 900px) {

    #dashboardCards.dashboard-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }


    #overviewCards.dashboard-cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

}


@media (max-width: 700px) {

    #dashboardHeader.dashboard-header,
    #overviewHeader.dashboard-header {
        width: calc(100% - 28px);

        padding: 30px 12px 18px;
    }


    #dashboardToolbar.dashboard-toolbar {
        width: calc(100% - 28px);

        flex-direction: column;

        align-items: stretch;
    }


    #dashboardSearch.dashboard-search {
        width: 100%;

        flex: none;
    }


    #refreshDashboard {
        width: 100%;
    }


    #dashboardCards.dashboard-cards {
        width: calc(100% - 28px);

        grid-template-columns: 1fr;

        gap: 15px;
    }


    #dashboardCards .dashboard-card {
        min-height: 225px;

        padding: 25px 20px;
    }


    #portalModules.activity-section {
        width: calc(100% - 28px);

        padding: 22px 18px;
    }


    #portalModules .activity-list {
        grid-template-columns: 1fr;
    }


    #overviewCards.dashboard-cards {
        width: calc(100% - 28px);

        grid-template-columns: 1fr;

        gap: 14px;
    }


    #notificationPanel.notification-panel {
        top: 70px;

        right: 14px;

        width: calc(100vw - 28px);
    }

}


@media (max-width: 480px) {

    #dashboardHeader h1 {
        font-size: 1.7rem;
    }


    #overviewHeader h2 {
        font-size: 1.3rem;
    }


    #dashboardHeader p {
        font-size: 0.78rem;
    }


    #dashboardCards .dashboard-card {
        min-height: 215px;

        padding: 23px 18px;
    }


    #dashboardCards .dashboard-card>h2 {
        width: 58px;
        height: 58px;

        font-size: 1.7rem;
    }


    #dashboardCards .dashboard-card>h3 {
        font-size: 0.98rem;
    }


    #dashboardCards .dashboard-card>p {
        font-size: 0.72rem;
    }


    #portalModules .activity-list li {
        font-size: 0.7rem;
    }


    #notificationPanel.notification-panel {
        max-height: calc(100vh - 90px);
    }

}


/* ==================== REDUCED MOTION ==================== */

@media (prefers-reduced-motion: reduce) {

    #dashboardCards .dashboard-card,
    #overviewCards .card,
    #portalModules .activity-list li,
    #notificationPanel {
        transition: none;
    }

}


/* =========================================================
   END OF DASHBOARD.CSS
   ========================================================= */




/* =========================================================
   PORTAL PAGE HEADER
   Dashboard Center / Student Dashboard / Profile
   ========================================================= */

.portal-page-header {
    position: relative;

    width: calc(100% - 40px);
    max-width: 1250px;

    margin: 22px auto 32px;

    min-height: 205px;

    padding: 45px 40px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;

    overflow: hidden;

    border-radius: 24px;

    background:
        radial-gradient(circle at 8% 95%,
            rgba(255, 255, 255, 0.10) 0 70px,
            transparent 71px),
        radial-gradient(circle at 97% 5%,
            rgba(255, 255, 255, 0.10) 0 95px,
            transparent 96px),
        linear-gradient(135deg,
            #312e81 0%,
            #4338ca 50%,
            #5b4fd8 100%);

    box-shadow:
        0 18px 40px rgba(49, 46, 129, 0.18);

    isolation: isolate;
}


/* Decorative glow */

.portal-page-header::before {
    content: "";

    position: absolute;

    width: 170px;
    height: 170px;

    top: -85px;
    right: 70px;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.06);

    z-index: -1;
}


/* Decorative bottom-left glow */

.portal-page-header::after {
    content: "";

    position: absolute;

    width: 150px;
    height: 150px;

    bottom: -80px;
    left: 25px;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.06);

    z-index: -1;
}


/* Main title */

.portal-page-header h1 {
    position: relative;

    margin: 0 0 14px;

    text-align: center;

    color: #ffffff;

    font-size: clamp(2rem, 4vw, 3rem);

    font-weight: 700;

    line-height: 1.15;

    letter-spacing: -1px;

    z-index: 2;
}


/* Subtitle */

.portal-page-header p {
    position: relative;

    margin: 0;

    max-width: 850px;

    text-align: center;

    color: rgba(255, 255, 255, 0.82);

    font-size: 1.05rem;

    font-weight: 400;

    line-height: 1.7;

    z-index: 2;
}