:root {
    --isc2-primary: #0b7ea6;
    --isc2-primary-dark: #056786;
    --isc2-bg: #f3f7fb;
    --isc2-sidebar: #f7fafc;
    --isc2-text: #1f2b3d;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--isc2-text);
    background: var(--isc2-bg);
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.dashboard-body {
    overflow: hidden;
}

.login-body {
    background: linear-gradient(135deg, #eaf6fb 0%, #f6fbff 60%, #ffffff 100%);
}

.login-card {
    border-radius: 1rem;
}

.login-brand-panel {
    min-height: 520px;
    background: linear-gradient(155deg, var(--isc2-primary) 0%, var(--isc2-primary-dark) 100%);
    align-items: center;
}

.layout-wrapper {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: 45px 1fr;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    grid-column: 1;
    grid-row: 2;
    width: 270px;
    background: var(--isc2-sidebar);
    border-right: 1px solid #d8e6f0;
    transition: transform 0.25s ease-in-out;
    z-index: 1030;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.sidebar.sidebar-collapsed {
    width: 74px;
}

.sidebar-top {
    min-height: 45px;
    display: flex;
    align-items: center;
    padding: 0px 10px;
    font-size: 44px;
    font-weight: 900;
}

.sidebar-top .d-flex {
    width: 100%;
    justify-content: flex-end;
}

.brand-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--isc2-primary);
}

.user-avatar {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #d8e6f0;
    background: #fff;
}

.sidebar-nav {
    padding: 0;
    margin: 0;
    flex: 1;
}

.sidebar-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-menu li {
    margin: 0;
    padding: 0;
}

.sidebar-menu form {
    margin: 0;
}

.sidebar .sidebar-link {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0.7rem 1rem;
    color: #34465d;
    border: 0;
    border-radius: 0;
    text-decoration: none;
    text-align: left;
}

.menu-icon {
    display: inline-block;
    width: 18px;
    text-align: center;
    margin-right: 8px;
    font-size: 14px;
}

.menu-text {
    display: inline;
}

.menu-icon-img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    margin-right: 8px;
    vertical-align: middle;
}

.sidebar .sidebar-link.active,
.sidebar .sidebar-link:hover {
    background: #b6b6b685;
}

.sidebar-logout-btn {
    border: 0 !important;
    border-radius: 0;
    box-shadow: none !important;
}

.sidebar-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    color: #5b6f85;
    font-weight: 700;
}

.pearson-logo {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #0b7ea6;
    color: #fff;
    font-size: 20px;
    font-weight: 800;
    font-family: Georgia, "Times New Roman", serif;
    font-style: italic;
    line-height: 1;
}

.pearson-text {
    font-size: 25px;
    font-weight: 700;
}

.main-content {
    grid-column: 2;
    grid-row: 2;
    flex: 1;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.main-content>main {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.topbar {
    grid-column: 1 / -1;
    grid-row: 1;
    width: 100%;
    min-height: 45px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border-bottom: 1px solid #d8e6f0;
}

@media (min-width: 992px) {
    .topbar-title {
        font-size: 2rem !important;
        font-weight: 550 !important;
    }
}

.main-content .card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.main-content .card-body {
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.main-content .table-responsive {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-toggle-btn {
    border: 0;
    background: transparent;
    color: #3b4f66;
    font-size: 26px;
    line-height: 1;
    padding: 4px 6px;
    cursor: pointer;
}

.sidebar.sidebar-collapsed .menu-text,
.sidebar.sidebar-collapsed .small.text-secondary,
.sidebar.sidebar-collapsed .fw-semibold.text-break,
.sidebar.sidebar-collapsed .pearson-text {
    display: none;
}

.sidebar.sidebar-collapsed .sidebar-link {
    text-align: center;
    padding: 0.7rem 0.4rem;
}

.sidebar.sidebar-collapsed .menu-icon {
    margin-right: 0;
    width: auto;
}

.sidebar.sidebar-collapsed .menu-icon-img {
    margin-right: 0;
}

.sidebar.sidebar-collapsed .px-3.py-4.border-bottom .d-flex {
    justify-content: center;
}

.sidebar.sidebar-collapsed .sidebar-footer {
    justify-content: center;
}

.sidebar.sidebar-collapsed .user-avatar {
    width: 38px;
    height: 38px;
}

.footer {
    margin-top: 16px;
    padding: 10px 12px;
    background: #0b7ea6;
    color: #ffffff;
    text-align: center;
    font-size: 13px;
    line-height: 1.2;
}

.footer a {
    color: #ffffff;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.footer-links {
    font-size: 15px;
    font-weight: 600;
}

.table thead th {
    color: #4b6079;
    font-weight: 600;
}

.sort-trigger {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.sort-trigger:hover {
    color: #2f435b;
}

.sort-icons {
    font-size: 10px;
    letter-spacing: -1px;
    opacity: 0.5;
}

.sort-active {
    font-size: 14px;
    font-weight: 700;
    color: #2f435b;
}

.exam-table tbody td {
    color: #6b7280;
}

.exam-table tbody tr {
    transition: background-color 0.2s ease-in-out;
}

.exam-table tbody tr:hover {
    background-color: #eef4f8;
}

.btn-primary {
    background-color: var(--isc2-primary);
    border-color: var(--isc2-primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--isc2-primary-dark);
    border-color: var(--isc2-primary-dark);
}

@media (max-width: 991.98px) {
    .layout-wrapper {
        grid-template-columns: 1fr;
        grid-template-rows: 45px 1fr;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        transform: translateX(-100%);
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
    }

    .sidebar.sidebar-open {
        transform: translateX(0);
    }
}