/* =========================================================
   QUESTION BANK
========================================================= */

.question-menu > a {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}


/* =========================================================
   QUESTION BANK ARROW
========================================================= */

.question-bank-arrow {
    margin-left: auto;
    font-size: 12px;
    transition: transform 0.2s ease;
}


/* Rotate arrow when submenu is open */

.question-bank-toggle[aria-expanded="true"] .question-bank-arrow {
    transform: rotate(180deg);
}


/* =========================================================
   QUESTION BANK SUBMENU
========================================================= */

.sidebar-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
}


/* Submenu item */

.sidebar-submenu li {
    margin: 0;
}


/* Submenu link */

.sidebar-submenu li a {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 10px 15px 10px 48px;

    text-decoration: none;

    font-size: 14px;
}


/* Submenu icons */

.sidebar-submenu li a i {
    font-size: 14px;
}


/* =========================================================
   QUESTION BANK ACTIVE
========================================================= */

.question-menu.active > a {
    font-weight: 600;
}


/* =========================================================
   SUBMENU ACTIVE ITEM
========================================================= */

.sidebar-submenu li.active > a {
    font-weight: 600;
}


/* =========================================================
   SUBMENU HOVER
========================================================= */

.sidebar-submenu li a:hover {
    text-decoration: none;
}



/* ============================================================
   INFOGRO ADMIN PANEL
   DASHBOARD + NAVBAR + SIDEBAR
============================================================ */

:root {
    --admin-blue: #0d6efd;
    --admin-blue-dark: #084298;
    --admin-blue-light: #eaf3ff;

    --admin-bg: #f5f8fc;
    --admin-white: #ffffff;

    --admin-text: #172b4d;
    --admin-muted: #6b7c93;

    --admin-border: #dce5ef;

    --navbar-height: 70px;
    --sidebar-width: 245px;

    --radius: 10px;

    --shadow: 0 2px 8px rgba(25, 50, 80, 0.06);
}


/* ============================================================
   GLOBAL
============================================================ */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    background: var(--admin-bg);
    color: var(--admin-text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
}

a {
    text-decoration: none;
}


/* ============================================================
   TOP NAVBAR
============================================================ */

.admin-navbar {
    position: fixed;
    top: 0;
    left: 0;

    width: 100%;
    height: var(--navbar-height);

    z-index: 1050;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 24px;

    background: var(--admin-white);
    border-bottom: 1px solid var(--admin-border);

    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
}


/* Logo */



.admin-navbar .admin-brand {
    height: 70px !important;
    display: flex !important;
    align-items: center !important;
}

.admin-navbar .admin-brand img {
    height: 58px !important;
    width: auto !important;
    max-height: 58px !important;
    max-width: 250px !important;
    object-fit: contain !important;
    display: block !important;
}

/* Profile */

.admin-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-profile-icon {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: var(--admin-blue-light);
    color: var(--admin-blue);

    font-size: 18px;
}

.admin-profile-info {
    line-height: 1.2;
}

.admin-profile-info strong {
    display: block;
    color: var(--admin-text);
    font-size: 13px;
}

.admin-profile-info span {
    display: block;
    margin-top: 3px;

    color: var(--admin-muted);
    font-size: 11px;
}


/* ============================================================
   SIDEBAR
============================================================ */

.admin-sidebar {
    position: fixed;

    top: var(--navbar-height);
    left: 0;
    bottom: 0;

    width: var(--sidebar-width);

    z-index: 1000;

    overflow-x: hidden;
    overflow-y: auto;

    background: var(--admin-white);

    border-right: 1px solid var(--admin-border);

    padding: 18px 12px 25px;
}


/* Sidebar scrollbar */

.admin-sidebar::-webkit-scrollbar {
    width: 5px;
}

.admin-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.admin-sidebar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}


/* Sidebar heading */

.sidebar-title {
    padding: 5px 12px 10px;

    color: #8a98a9;

    font-size: 10px;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: 0.7px;
}


/* Sidebar links */

.admin-sidebar a {
    display: flex;
    align-items: center;

    min-height: 42px;

    margin-bottom: 3px;
    padding: 9px 12px;

    color: #4d6075;

    border-radius: 7px;

    font-size: 13px;
    font-weight: 500;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.admin-sidebar a i {
    width: 23px;

    margin-right: 9px;

    font-size: 16px;

    flex-shrink: 0;
    
}

.admin-sidebar a:hover {
    color: var(--admin-blue);
    background: var(--admin-blue-light);
}

.admin-sidebar a.active {
    color: var(--admin-white);
    background: linear-gradient(
        135deg,
        var(--admin-blue),
        var(--admin-blue-dark)
    );

    box-shadow: 0 3px 8px rgba(13, 110, 253, 0.18);
}


/* Sidebar divider */

.admin-sidebar hr {
    margin: 14px 8px;

    border: 0;
    border-top: 1px solid var(--admin-border);
}


/* ============================================================
   MAIN CONTENT
============================================================ */

.admin-content {
    width: calc(100% - var(--sidebar-width));

    min-height: calc(100vh - var(--navbar-height));

    margin-left: var(--sidebar-width);

    padding: calc(var(--navbar-height) + 26px) 30px 35px;
}


/* ============================================================
   DASHBOARD PAGE
============================================================ */

.dashboard-page {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
}


/* ============================================================
   PAGE HEADER
============================================================ */

.page-header {
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 22px;
}

.page-title-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-title-icon {
    width: 44px;
    height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 9px;

    background: var(--admin-blue-light);
    color: var(--admin-blue);

    font-size: 20px;
}

.page-header h1 {
    margin: 0;

    color: var(--admin-text);

    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
}

.page-header p {
    margin: 5px 0 0;

    color: var(--admin-muted);

    font-size: 13px;
}

.page-header p strong {
    color: var(--admin-text);
}


/* Date */

.page-date {
    display: flex;
    align-items: center;
    gap: 7px;

    padding: 9px 13px;

    color: #52667d;

    background: var(--admin-white);

    border: 1px solid var(--admin-border);
    border-radius: 7px;

    font-size: 12px;

    white-space: nowrap;
}

.page-date i {
    color: var(--admin-blue);
    font-size: 14px;
}


/* ============================================================
   STATISTICS
============================================================ */

.dashboard-stats {
    display: grid;

    grid-template-columns: repeat(4, minmax(0, 1fr));

    gap: 16px;

    margin-bottom: 24px;
}


.stat-card {
    position: relative;

    min-width: 0;

    display: flex;
    align-items: center;

    gap: 13px;

    padding: 18px;

    background: var(--admin-white);

    border: 1px solid var(--admin-border);
    border-radius: var(--radius);

    box-shadow: var(--shadow);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);

    box-shadow: 0 5px 15px rgba(25, 50, 80, 0.09);
}


/* Stat icon */

.stat-icon {
    width: 45px;
    height: 45px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 9px;

    background: var(--admin-blue-light);
    color: var(--admin-blue);

    font-size: 19px;
}


/* Stat information */

.stat-info {
    min-width: 0;
    flex: 1;
}

.stat-info span {
    display: block;

    color: var(--admin-muted);

    font-size: 12px;
    font-weight: 500;
}

.stat-info h2 {
    margin: 4px 0 0;

    color: var(--admin-text);

    font-size: 24px;
    font-weight: 700;

    line-height: 1;
}


/* View */

.stat-card > a {
    display: inline-flex;
    align-items: center;
    gap: 4px;

    color: var(--admin-blue);

    font-size: 11px;
    font-weight: 600;

    white-space: nowrap;
}

.stat-card > a:hover {
    color: var(--admin-blue-dark);
}


/* ============================================================
   DASHBOARD SECTION
============================================================ */

.dashboard-section {
    width: 100%;

    margin-bottom: 24px;

    padding: 20px;

    background: var(--admin-white);

    border: 1px solid var(--admin-border);
    border-radius: var(--radius);

    box-shadow: var(--shadow);
}


/* Section heading */

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 17px;
}

.section-header h3 {
    margin: 0;

    color: var(--admin-text);

    font-size: 16px;
    font-weight: 700;
}

.section-header p {
    margin: 4px 0 0;

    color: var(--admin-muted);

    font-size: 12px;
}


/* ============================================================
   QUICK ACTIONS
============================================================ */

.quick-actions {
    display: grid;

    grid-template-columns: repeat(4, minmax(0, 1fr));

    gap: 12px;
}


.action-card {
    min-width: 0;

    display: flex;
    align-items: center;

    gap: 11px;

    padding: 13px 14px;

    background: #f8fbff;

    border: 1px solid #e1eaf4;
    border-radius: 8px;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.action-card:hover {
    background: var(--admin-blue-light);

    border-color: #bfd7f7;

    transform: translateY(-1px);
}


/* Action icon */

.action-icon {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 8px;

    background: #e7f1ff;
    color: var(--admin-blue);

    font-size: 16px;
}


/* Action content */

.action-content {
    min-width: 0;
    flex: 1;
}

.action-content strong {
    display: block;

    overflow: hidden;

    color: var(--admin-text);

    font-size: 12px;
    font-weight: 600;

    white-space: nowrap;
    text-overflow: ellipsis;
}

.action-content small {
    display: block;

    margin-top: 3px;

    overflow: hidden;

    color: var(--admin-muted);

    font-size: 10px;

    white-space: nowrap;
    text-overflow: ellipsis;
}


/* Arrow */

.action-arrow {
    color: #9aaabd;

    font-size: 12px;

    flex-shrink: 0;
}

.action-card:hover .action-arrow {
    color: var(--admin-blue);
}


/* ============================================================
   SYSTEM GRID
============================================================ */

.system-grid {
    display: grid;

    grid-template-columns: repeat(4, minmax(0, 1fr));

    gap: 12px;
}


.system-card {
    min-width: 0;

    display: flex;
    align-items: flex-start;

    gap: 12px;

    padding: 15px;

    background: #fbfcfe;

    border: 1px solid #e2e9f1;

    border-radius: 8px;
}


/* System icon */

.system-icon {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 8px;

    background: var(--admin-blue-light);
    color: var(--admin-blue);

    font-size: 16px;
}


/* System content */

.system-card strong {
    display: block;

    color: var(--admin-text);

    font-size: 12px;
    font-weight: 700;
}

.system-card p {
    margin: 6px 0 0;

    color: var(--admin-muted);

    font-size: 11px;

    line-height: 1.55;
}


/* ============================================================
   FOOTER
============================================================ */

.admin-footer {
    width: calc(100% - var(--sidebar-width));

    margin-left: var(--sidebar-width);

    padding: 15px 30px;

    background: var(--admin-white);

    border-top: 1px solid var(--admin-border);

    color: var(--admin-muted);

    font-size: 11px;

    text-align: center;
}


/* ============================================================
   LARGE DESKTOP
============================================================ */

@media (max-width: 1200px) {

    .dashboard-stats,
    .quick-actions,
    .system-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}


/* ============================================================
   TABLET
============================================================ */

@media (max-width: 992px) {

    :root {
        --sidebar-width: 220px;
    }

    .admin-content {
        padding-left: 20px;
        padding-right: 20px;
    }

    .admin-footer {
        padding-left: 20px;
        padding-right: 20px;
    }

}


/* ============================================================
   MOBILE
============================================================ */

@media (max-width: 768px) {

    :root {
        --sidebar-width: 0px;
    }

    .admin-sidebar {
        display: none;
    }

    .admin-navbar {
        padding: 0 15px;
    }

    .admin-navbar .brand img {
        max-height: 40px;
    }

    .admin-profile-info {
        display: none;
    }

    .admin-content {
        width: 100%;
        margin-left: 0;

        padding: calc(var(--navbar-height) + 20px) 15px 25px;
    }

    .admin-footer {
        width: 100%;
        margin-left: 0;

        padding: 14px 15px;
    }

    .page-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .page-date {
        align-self: flex-start;
    }

}


/* ============================================================
   SMALL MOBILE
============================================================ */

@media (max-width: 576px) {

    .dashboard-stats,
    .quick-actions,
    .system-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-section {
        padding: 15px;
    }

    .page-header h1 {
        font-size: 21px;
    }

    .stat-card {
        padding: 15px;
    }

}


/* ============================================================
   VERY SMALL DEVICES
============================================================ */

@media (max-width: 400px) {

    .page-title-icon {
        width: 40px;
        height: 40px;
    }

    .page-header h1 {
        font-size: 19px;
    }

    .stat-info h2 {
        font-size: 21px;
    }

}

/* =====================================================
   TEST / SCHEDULE MENU
===================================================== */

.test-schedule-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}


/* Parent */

.test-schedule-menu > a {
    display: flex;
    align-items: center;
    gap: 10px;

    width: 100%;

    color: #4d6075;
    background: transparent;

    text-decoration: none;
    border-radius: 7px;
}


/* Parent hover */

.test-schedule-menu > a:hover {
    color: var(--admin-blue);
    background: var(--admin-blue-light);
}


/* IMPORTANT:
   Do NOT allow the general .active rule
   to make Test / Schedule blue.
*/

.test-schedule-menu.active > a {
    color: #4d6075;
    background: transparent;

    box-shadow: none;
}


/* Parent hover even when submenu is active */

.test-schedule-menu.active > a:hover {
    color: var(--admin-blue);
    background: var(--admin-blue-light);
}


/* =====================================================
   TEST / SCHEDULE SUBMENU
===================================================== */

.test-schedule-menu .sidebar-submenu {
    list-style: none;

    padding: 0;
    margin: 0;

    background: transparent;
}


/* Remove bullets from every submenu item */

.test-schedule-menu .sidebar-submenu li {
    list-style: none;

    margin: 0;
    padding: 0;
}


/* Submenu links */

.test-schedule-menu .sidebar-submenu li a {
    display: flex;
    align-items: center;

    gap: 10px;

    padding: 9px 12px 9px 48px;

    color: #4d6075;
    background: transparent;

    font-size: 13px;
    font-weight: 500;

    text-decoration: none;

    border-radius: 7px;
}


/* Submenu icons */

.test-schedule-menu .sidebar-submenu li a i {
    width: 23px;

    margin-right: 9px;

    font-size: 14px;

    flex-shrink: 0;
}


/* Submenu hover */

.test-schedule-menu .sidebar-submenu li a:hover {
    color: var(--admin-blue);
    background: var(--admin-blue-light);
}


/* =====================================================
   REMOVE BLUE ACTIVE STYLE FROM TEST / SCHEDULE
===================================================== */

.test-schedule-menu .sidebar-submenu li a.active {
    color: #4d6075;
    background: transparent;

    font-weight: 500;

    box-shadow: none;
}


/* Active submenu item hover */

.test-schedule-menu .sidebar-submenu li a.active:hover {
    color: var(--admin-blue);
    background: var(--admin-blue-light);
}


/* =====================================================
   CHEVRON
===================================================== */

.test-schedule-menu > a .bi-chevron-down {
    width: auto;

    margin-left: auto;
    margin-right: 0;

    font-size: 12px;

    transition: transform 0.2s ease;
}


/* Rotate when opened */

.test-schedule-menu > a[aria-expanded="true"] .bi-chevron-down {
    transform: rotate(180deg);
}

