:root {
    --gms-green: #0b8f55;
    --gms-green-dark: #087044;
    --gms-green-mid: #0fa366;
    --gms-green-soft: #edfaf3;
    --gms-green-glow: rgba(11, 143, 85, .12);
    --gms-primary: var(--gms-green-dark);
    --gms-primary-hover: #065f3b;
    --gms-primary-accent: var(--gms-green);
    --gms-primary-soft: var(--gms-green-soft);
    --gms-focus-ring: rgba(8, 112, 68, .22);
    --gms-ink: #111827;
    --gms-ink-2: #374151;
    --gms-muted: #6b7280;
    --gms-line: #e5e7eb;
    --gms-line-strong: #d1d5db;
    --gms-line-soft: #f3f4f6;
    --gms-surface: #ffffff;
    --gms-surface-subtle: #f8faf9;
    --gms-canvas: #f9fafb;
    --gms-danger: #dc2626;
    --gms-danger-dark: #991b1b;
    --gms-danger-soft: #fff1f2;
    --gms-danger-line: #fecaca;
    --gms-success: #15803d;
    --gms-success-dark: #166534;
    --gms-success-soft: #f0fdf4;
    --gms-success-line: #bbf7d0;
    --gms-warning: #d97706;
    --gms-warning-dark: #92400e;
    --gms-warning-soft: #fffbeb;
    --gms-warning-line: #fde68a;
    --gms-info: #0284c7;
    --gms-info-dark: #0369a1;
    --gms-info-soft: #f0f9ff;
    --gms-info-line: #bae6fd;
    --gms-font-sans: "Plus Jakarta Sans", Inter, "Segoe UI", Arial, sans-serif;
    --gms-font-size-xs: 12px;
    --gms-font-size-sm: 13px;
    --gms-font-size-md: 14px;
    --gms-font-size-lg: 16px;
    --gms-font-size-xl: 20px;
    --gms-space-1: 4px;
    --gms-space-2: 8px;
    --gms-space-3: 12px;
    --gms-space-4: 16px;
    --gms-space-5: 20px;
    --gms-space-6: 24px;
    --gms-space-8: 32px;
    --gms-space-10: 40px;
    --gms-space-12: 48px;
    --gms-sidebar: 252px;
    --gms-topbar: 68px;
    --gms-radius-sm: 6px;
    --gms-radius-control: 8px;
    --gms-radius: 10px;
    --gms-radius-lg: 14px;
    --gms-radius-xl: 18px;
    --gms-radius-pill: 999px;
    --gms-shadow-sm: 0 1px 2px rgba(17,24,39,.05), 0 1px 3px rgba(17,24,39,.06);
    --gms-shadow: 0 8px 24px rgba(17,24,39,.08);
    --gms-shadow-lg: 0 18px 48px rgba(17,24,39,.14);
}

*, *::before, *::after { box-sizing: border-box; }
html { min-height: 100%; }
body.gms-app {
    margin: 0;
    min-height: 100vh;
    background: var(--gms-canvas);
    color: var(--gms-ink);
    font-family: var(--gms-font-sans);
    font-size: var(--gms-font-size-md);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button, input, select, textarea { font: inherit; }
a { text-underline-offset: .18em; }
a:focus-visible,
button:focus-visible,
[tabindex]:not([tabindex="-1"]):focus-visible {
    outline: 3px solid var(--gms-focus-ring);
    outline-offset: 2px;
}
::selection { color: var(--gms-ink); background: #cdeedc; }

.gms-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1040;
    width: var(--gms-sidebar);
    display: flex;
    flex-direction: column;
    background: var(--gms-green-dark);
    border-right: 1px solid rgba(255,255,255,.12);
    transition: transform .22s cubic-bezier(.4,0,.2,1);
}
.gms-brand {
    min-height: var(--gms-topbar);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    border-bottom: 1px solid rgba(255,255,255,.16);
}
.gms-brand-mark {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: block;
    object-fit: contain;
    padding: 4px;
    border-radius: 9px;
    background: #fff;
}
.gms-brand-copy { min-width: 0; }
.gms-brand-copy strong { display: block; font-size: 16px; font-weight: 800; letter-spacing: -.02em; color: #fff; line-height: 1.15; }
.gms-brand-copy span { display: block; margin-top: 4px; color: rgba(255,255,255,.68); font-size: 10px; font-weight: 600; letter-spacing: .01em; line-height: 1.25; }
.gms-sidebar-menu { flex: 1; overflow-y: auto; padding: 12px 10px 18px; }
.gms-sidebar-menu::-webkit-scrollbar { width: 4px; }
.gms-sidebar-menu::-webkit-scrollbar-thumb { border-radius: 99px; background: rgba(255,255,255,.28); }
.gms-nav-label {
    margin: 20px 9px 7px;
    color: rgba(255,255,255,.58);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .11em;
    text-transform: uppercase;
}
.gms-nav-link {
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 1px 0;
    padding: 8px 11px;
    border-radius: 8px;
    color: rgba(255,255,255,.84);
    font-weight: 600;
    font-size: 13px;
    line-height: 1.35;
    text-decoration: none;
    transition: background .15s, color .15s;
}
.gms-nav-link span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gms-nav-link i { width: 20px; flex: 0 0 20px; font-size: 15px; text-align: center; opacity: .72; transition: opacity .15s; }
.gms-nav-link:hover { color: #fff; background: rgba(255,255,255,.10); }
.gms-nav-link:hover i { opacity: 1; }
.gms-nav-link.active {
    position: relative;
    color: #fff !important;
    background: rgba(255,255,255,.16) !important;
    font-weight: 700;
}
.gms-nav-link.active::before { content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: #fff; }
.gms-nav-link.active i { opacity: 1; color: #fff; }
.gms-sidebar-footer { padding: 10px; border-top: 1px solid var(--gms-line); }
.gms-sidebar-footer .gms-nav-link { color: var(--gms-danger); }
.gms-sidebar-footer .gms-nav-link:hover { background: #fff5f5; }

.gms-topbar {
    position: sticky;
    top: 0;
    z-index: 1025;
    min-height: var(--gms-topbar);
    margin-left: var(--gms-sidebar);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: var(--gms-surface);
    border-bottom: 1px solid var(--gms-line);
}
.gms-page-context { min-width: 0; flex: 1 1 auto; }
.gms-console-label { color: var(--gms-muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.gms-breadcrumb { margin-top: 2px; color: var(--gms-ink); font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gms-top-actions { flex: 0 0 auto; display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.gms-user-button {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    padding: 4px 10px 4px 5px;
    border: 1px solid var(--gms-line);
    border-radius: var(--gms-radius-control);
    background: var(--gms-surface);
    color: var(--gms-ink);
    transition: background .15s, border-color .15s;
}
.gms-user-button:hover { border-color: #cdeedc; background: var(--gms-green-soft); }
.gms-avatar { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 50%; background: var(--gms-primary); color: #fff; font-size: 13px; font-weight: 800; letter-spacing: -.01em; }
.gms-user-copy { text-align: left; line-height: 1.2; }
.gms-user-copy strong { display: block; max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; font-weight: 700; }
.gms-user-copy small { color: var(--gms-primary); font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.gms-mobile-toggle { display: none; width: 40px; height: 40px; flex: 0 0 40px; border: 1px solid var(--gms-line); border-radius: var(--gms-radius-control); color: var(--gms-ink-2); background: var(--gms-surface); }
.gms-mobile-toggle:hover { border-color: var(--gms-primary); color: var(--gms-primary); background: var(--gms-primary-soft); }
.gms-sidebar-backdrop { display: none; position: fixed; inset: 0; z-index: 1035; background: rgba(0,0,0,.35); }

.content {
    min-height: calc(100vh - var(--gms-topbar));
    margin-left: var(--gms-sidebar);
    padding: 28px clamp(22px, 2.4vw, 34px) 48px;
    background: var(--gms-canvas);
}
.content > .container-fluid, .content > .container { max-width: 1560px; padding: 0; }

h1, h2, h3, h4, h5, h6 { color: var(--gms-ink); line-height: 1.3; letter-spacing: -.025em; }
h2.fw-bold, h3.fw-bold, h4.fw-bold { font-weight: 800 !important; }
.text-muted { color: var(--gms-muted) !important; }
.gms-surface {
    border: 1px solid var(--gms-line);
    border-radius: var(--gms-radius);
    background: var(--gms-surface);
}
.gms-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--gms-space-4);
    margin-bottom: var(--gms-space-6);
}
.gms-page-heading { min-width: 0; }
.gms-page-kicker {
    display: block;
    margin-bottom: var(--gms-space-1);
    color: var(--gms-primary);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.gms-page-title { margin: 0; font-size: clamp(22px, 2.5vw, 30px); font-weight: 800; }
.gms-page-description { max-width: 720px; margin: var(--gms-space-2) 0 0; color: var(--gms-muted); font-size: var(--gms-font-size-sm); }
.gms-page-actions,
.gms-toolbar-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gms-space-2); }
.gms-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: var(--gms-space-3) var(--gms-space-4);
    margin-bottom: var(--gms-space-4);
}
.gms-toolbar-main { display: flex; flex: 1 1 420px; flex-wrap: wrap; align-items: end; gap: var(--gms-space-3); }

.card {
    border: 1px solid var(--gms-line);
    border-radius: var(--gms-radius);
    background: var(--gms-surface);
    box-shadow: none;
}
.card.gms-card-interactive { transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.card.gms-card-interactive:hover { border-color: var(--gms-line-strong); box-shadow: var(--gms-shadow-sm); transform: translateY(-1px); }
.card-header { padding: var(--gms-space-4) var(--gms-space-5); border-color: var(--gms-line); background: var(--gms-surface); font-weight: 600; }
.card-body { padding: var(--gms-space-5); }
.card-footer { padding: var(--gms-space-3) var(--gms-space-5); border-color: var(--gms-line); background: var(--gms-surface-subtle); }
.card-title { font-weight: 700; letter-spacing: -.02em; }
.card.bg-primary, .card.bg-info, .card.bg-secondary, .card.bg-success, .card.bg-danger {
    position: relative;
    overflow: hidden;
    color: var(--gms-ink) !important;
    background: #fff !important;
}
.card.bg-primary::after, .card.bg-info::after, .card.bg-secondary::after,
.card.bg-success::after, .card.bg-danger::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--gms-primary);
}
.card.bg-success::after { background: var(--gms-success); }
.card.bg-danger::after { background: var(--gms-danger); }
.card.bg-info::after { background: var(--gms-info-dark); }
.card.bg-secondary::after { background: #9ca3af; }
.card.bg-primary .card-body, .card.bg-info .card-body, .card.bg-secondary .card-body,
.card.bg-success .card-body, .card.bg-danger .card-body { text-align: left !important; }
.card.bg-primary h6, .card.bg-info h6, .card.bg-secondary h6,
.card.bg-success h6, .card.bg-danger h6 { color: var(--gms-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.card.bg-primary h2, .card.bg-info h2, .card.bg-secondary h2,
.card.bg-success h2, .card.bg-danger h2 { margin: 6px 0 0; color: var(--gms-ink); font-size: 30px; font-weight: 800; }

.btn {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: var(--gms-radius-control);
    font-size: var(--gms-font-size-sm);
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -.005em;
    transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.btn-sm { min-height: 32px; border-radius: var(--gms-radius-sm); font-size: var(--gms-font-size-xs); }
.btn-lg { min-height: 46px; font-size: var(--gms-font-size-md); }
.btn:focus-visible { box-shadow: 0 0 0 3px var(--gms-focus-ring); }
.btn:disabled, .btn.disabled { box-shadow: none; cursor: not-allowed; opacity: .6; }
.btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--gms-primary);
    --bs-btn-border-color: var(--gms-primary);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--gms-primary-hover);
    --bs-btn-hover-border-color: var(--gms-primary-hover);
    --bs-btn-active-bg: var(--gms-primary-hover);
    --bs-btn-active-border-color: var(--gms-primary-hover);
}
.btn-outline-primary {
    --bs-btn-color: var(--gms-primary);
    --bs-btn-border-color: var(--gms-green);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--gms-primary);
    --bs-btn-hover-border-color: var(--gms-primary);
    --bs-btn-active-bg: var(--gms-primary-hover);
    --bs-btn-active-border-color: var(--gms-primary-hover);
}
.btn-secondary {
    --bs-btn-color: var(--gms-ink-2);
    --bs-btn-bg: var(--gms-line-soft);
    --bs-btn-border-color: var(--gms-line-strong);
    --bs-btn-hover-color: var(--gms-ink);
    --bs-btn-hover-bg: #e5e7eb;
    --bs-btn-hover-border-color: #cbd5e1;
}
.btn-outline-secondary {
    --bs-btn-color: var(--gms-ink-2);
    --bs-btn-border-color: var(--gms-line-strong);
    --bs-btn-hover-color: var(--gms-ink);
    --bs-btn-hover-bg: var(--gms-line-soft);
    --bs-btn-hover-border-color: #9ca3af;
}
.btn-success { --bs-btn-bg: var(--gms-success); --bs-btn-border-color: var(--gms-success); --bs-btn-hover-bg: var(--gms-success-dark); --bs-btn-hover-border-color: var(--gms-success-dark); }
.btn-outline-success { --bs-btn-color: var(--gms-success); --bs-btn-border-color: var(--gms-success); --bs-btn-hover-bg: var(--gms-success); --bs-btn-hover-border-color: var(--gms-success); }
.btn-info { --bs-btn-color: #fff; --bs-btn-bg: var(--gms-info-dark); --bs-btn-border-color: var(--gms-info-dark); --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #075985; --bs-btn-hover-border-color: #075985; }
.btn-warning { --bs-btn-color: #422006; --bs-btn-bg: #fbbf24; --bs-btn-border-color: #fbbf24; --bs-btn-hover-color: #422006; --bs-btn-hover-bg: #f59e0b; --bs-btn-hover-border-color: #f59e0b; }
.btn-danger { --bs-btn-bg: var(--gms-danger); --bs-btn-border-color: var(--gms-danger); --bs-btn-hover-bg: var(--gms-danger-dark); --bs-btn-hover-border-color: var(--gms-danger-dark); }
.btn-outline-danger { --bs-btn-color: var(--gms-danger); --bs-btn-border-color: var(--gms-danger); --bs-btn-hover-bg: var(--gms-danger); --bs-btn-hover-border-color: var(--gms-danger); }

.form-control, .form-select, .input-group-text {
    min-height: 40px;
    border-color: var(--gms-line);
    border-radius: var(--gms-radius-control);
    color: var(--gms-ink);
    background-color: var(--gms-surface);
    font-size: var(--gms-font-size-sm);
    font-family: inherit;
    transition: border-color .15s, box-shadow .15s;
}
.form-control-sm, .form-select-sm,
.input-group-sm > .form-control, .input-group-sm > .form-select, .input-group-sm > .input-group-text {
    min-height: 32px;
    border-radius: var(--gms-radius-sm);
    font-size: var(--gms-font-size-xs);
}
.form-control::placeholder { color: #9ca3af; opacity: 1; }
.form-control:focus, .form-select:focus {
    border-color: var(--gms-primary);
    box-shadow: 0 0 0 3px var(--gms-focus-ring);
}
.form-control:disabled, .form-select:disabled,
.form-control[readonly] { color: var(--gms-muted); background-color: var(--gms-line-soft); opacity: 1; }
.form-label { margin-bottom: 6px; color: var(--gms-ink-2); font-size: var(--gms-font-size-xs); font-weight: 700; }
.form-text { margin-top: 6px; color: var(--gms-muted); font-size: 11px; line-height: 1.5; }
.invalid-feedback, .valid-feedback { margin-top: 5px; font-size: 11px; line-height: 1.45; }
.invalid-feedback { color: var(--gms-danger-dark); }
.valid-feedback { color: var(--gms-success-dark); }
.form-control.is-invalid, .form-select.is-invalid,
.was-validated .form-control:invalid, .was-validated .form-select:invalid { border-color: var(--gms-danger); }
.form-control.is-invalid:focus, .form-select.is-invalid:focus,
.was-validated .form-control:invalid:focus, .was-validated .form-select:invalid:focus { box-shadow: 0 0 0 3px rgba(220,38,38,.14); }
.form-control.is-valid, .form-select.is-valid,
.was-validated .form-control:valid, .was-validated .form-select:valid { border-color: var(--gms-success); }
.form-control.is-valid:focus, .form-select.is-valid:focus,
.was-validated .form-control:valid:focus, .was-validated .form-select:valid:focus { box-shadow: 0 0 0 3px rgba(21,128,61,.14); }
.form-check-input:checked { border-color: var(--gms-primary); background-color: var(--gms-primary); }
.form-check-input:focus { border-color: var(--gms-primary); box-shadow: 0 0 0 3px var(--gms-focus-ring); }
.input-group-text { color: var(--gms-ink-2); background: var(--gms-line-soft); }

.table-responsive { overflow-x: auto; overflow-y: hidden; border: 1px solid var(--gms-line); border-radius: var(--gms-radius); background: var(--gms-surface); }
.table { margin-bottom: 0; --bs-table-hover-bg: var(--gms-green-soft); }
.table > :not(caption) > * > * { padding: 13px 14px; border-bottom-color: var(--gms-line); vertical-align: middle; }
.table thead th {
    color: var(--gms-muted);
    background: var(--gms-line-soft) !important;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    white-space: nowrap;
    border-bottom: 1px solid var(--gms-line) !important;
}
.table tbody td { color: var(--gms-ink-2); font-size: var(--gms-font-size-sm); }
.table tbody tr:last-child > * { border-bottom-width: 0; }
.table-hover > tbody > tr { transition: background-color .12s ease; }
.table-danger { --bs-table-bg: var(--gms-danger-soft); }
.table .btn-group, .table .gms-table-actions { white-space: nowrap; }

/* Student list table footer and pagination */
.gms-student-table-shell {
    overflow: hidden;
    border: 1px solid var(--gms-line);
    border-radius: var(--gms-radius);
    background: var(--gms-surface);
}
.gms-student-table-wrap {
    overflow-x: auto;
    overflow-y: hidden;
    border: 0;
    border-radius: 0;
}
.gms-student-table-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px 24px;
    min-height: 64px;
    padding: 12px 14px;
    border-top: 1px solid var(--gms-line);
    background: var(--gms-line-soft);
}
.gms-student-table-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
    color: var(--gms-muted);
    font-size: 12px;
}
.gms-student-total-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.gms-student-total-value {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--gms-ink-2);
    font-size: 13px;
    font-weight: 800;
}
.gms-student-total-value i { color: var(--gms-primary); font-size: 14px; }
.gms-student-range {
    padding-left: 12px;
    border-left: 1px solid var(--gms-line-strong);
    white-space: nowrap;
}
.gms-student-pagination-nav {
    max-width: 100%;
    overflow-x: auto;
    padding: 2px;
}
.gms-student-pagination { flex-wrap: nowrap; gap: 5px; }
.gms-student-pagination .page-link {
    min-width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0 10px;
    border: 1px solid var(--gms-line-strong);
    border-radius: var(--gms-radius-control) !important;
    color: var(--gms-primary);
    background: var(--gms-surface);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    box-shadow: none;
    transition: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.gms-student-pagination .page-item:not(.active):not(.disabled) .page-link:hover {
    color: var(--gms-primary-hover);
    border-color: var(--gms-primary);
    background: var(--gms-primary-soft);
}
.gms-student-pagination .page-link:focus {
    border-color: var(--gms-primary);
    box-shadow: 0 0 0 3px var(--gms-focus-ring);
}
.gms-student-pagination .page-item.active .page-link {
    z-index: 1;
    color: #fff;
    border-color: var(--gms-primary);
    background: var(--gms-primary);
    box-shadow: none;
}
.gms-student-pagination .page-item.disabled .page-link {
    color: #9ca3af;
    border-color: var(--gms-line);
    background: var(--gms-surface-subtle);
    box-shadow: none;
    opacity: .75;
}
.gms-student-pagination .gms-pagination-ellipsis .page-link {
    min-width: 22px;
    padding: 0 3px;
    border-color: transparent;
    background: transparent;
    opacity: 1;
}
.gms-student-single-page { color: var(--gms-muted); font-size: 11px; font-weight: 700; }

@media (max-width: 575.98px) {
    .gms-student-table-footer { align-items: stretch; padding: 12px; }
    .gms-student-table-summary { width: 100%; }
    .gms-student-pagination-nav { width: 100%; }
    .gms-student-pagination { justify-content: space-between; }
    .gms-student-pagination .page-link { padding: 0 9px; }
    .gms-master-toolbar { align-items: stretch; padding: var(--gms-space-3); }
    .gms-master-toolbar-main,
    .gms-master-search,
    .gms-master-toolbar-meta { width: 100%; max-width: none; }
    .gms-master-table-footer { align-items: stretch; padding: var(--gms-space-3); }
    .gms-master-table-footer nav,
    .gms-master-table-footer .pagination { width: 100%; }
    .gms-master-table-footer .pagination { justify-content: flex-start; }
}

.pagination { flex-wrap: wrap; gap: var(--gms-space-1); margin-bottom: 0; }
.pagination .page-link {
    min-width: 36px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--gms-line-strong);
    border-radius: var(--gms-radius-control) !important;
    color: var(--gms-ink-2);
    background: var(--gms-surface);
    font-size: var(--gms-font-size-xs);
    font-weight: 600;
    box-shadow: none;
}
.pagination .page-link:hover { z-index: 1; border-color: var(--gms-primary); color: var(--gms-primary); background: var(--gms-primary-soft); }
.pagination .page-link:focus { z-index: 2; border-color: var(--gms-primary); box-shadow: 0 0 0 3px var(--gms-focus-ring); }
.pagination .page-item.active .page-link { border-color: var(--gms-primary); color: #fff; background: var(--gms-primary); }
.pagination .page-item.disabled .page-link { border-color: var(--gms-line); color: #9ca3af; background: var(--gms-line-soft); opacity: .8; }

.gms-master-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: var(--gms-space-3);
    margin-bottom: var(--gms-space-4);
    padding: var(--gms-space-4);
    border: 1px solid var(--gms-line);
    border-radius: var(--gms-radius);
    background: var(--gms-surface);
}
.gms-master-toolbar-main { flex: 1 1 360px; min-width: min(100%, 360px); }
.gms-master-toolbar-meta {
    display: flex;
    align-items: center;
    min-height: 40px;
}
.gms-master-search { max-width: 520px; }
.gms-master-total {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 10px;
    border: 1px solid var(--gms-line);
    border-radius: var(--gms-radius-pill);
    color: var(--gms-ink-2);
    background: var(--gms-line-soft);
    font-size: var(--gms-font-size-xs);
    font-weight: 700;
    white-space: nowrap;
}
.gms-master-table-shell {
    overflow: hidden;
    border: 1px solid var(--gms-line);
    border-radius: var(--gms-radius);
    background: var(--gms-surface);
}
.gms-master-table-wrap {
    overflow-x: auto;
    overflow-y: hidden;
}
.gms-master-table-wrap .table { min-width: 860px; }
.gms-master-table-wrap tbody tr[hidden] { display: none !important; }
.gms-table-primary {
    color: var(--gms-ink) !important;
    font-weight: 700;
}
.gms-table-muted {
    max-width: 520px;
    color: var(--gms-muted) !important;
}
.gms-table-code {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 8px;
    border: 1px solid var(--gms-line);
    border-radius: var(--gms-radius-sm);
    color: var(--gms-ink-2);
    background: var(--gms-line-soft);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}
.gms-badge-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.gms-table-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    white-space: nowrap;
}
.gms-master-table-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--gms-space-3);
    min-height: 58px;
    padding: var(--gms-space-3) var(--gms-space-4);
    border-top: 1px solid var(--gms-line);
    background: var(--gms-line-soft);
}
.gms-master-table-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--gms-space-2);
}
.gms-master-range {
    color: var(--gms-muted);
    font-size: var(--gms-font-size-xs);
    font-weight: 600;
    white-space: nowrap;
}
.gms-pagination-ellipsis .page-link {
    min-width: 22px;
    border-color: transparent;
    background: transparent;
}

.gms-question-summary {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gms-space-2);
    margin: calc(var(--gms-space-3) * -1) 0 var(--gms-space-4);
}
.gms-question-summary span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 30px;
    padding: 5px 10px;
    border: 1px solid var(--gms-line);
    border-radius: var(--gms-radius-pill);
    color: var(--gms-muted);
    background: var(--gms-surface);
    font-size: var(--gms-font-size-xs);
    font-weight: 700;
}
.gms-question-summary strong {
    color: var(--gms-ink);
    font-weight: 800;
}
.gms-summary-action-header {
    align-items: center;
    flex-wrap: wrap;
}
.gms-summary-action-header .gms-question-summary,
.gms-summary-action-header .gms-exam-summary {
    flex: 1 1 420px;
    margin: 0;
}
.gms-summary-action-header .gms-page-actions {
    margin-left: auto;
    justify-content: flex-end;
}
.gms-question-toolbar .gms-filter-actions {
    display: flex;
    align-items: end;
    gap: var(--gms-space-2);
}
.gms-question-table { min-width: 1120px; }
.gms-question-table tbody tr[hidden] { display: none !important; }
.gms-question-check {
    width: 42px;
    text-align: center;
}
.gms-question-preview {
    min-width: 360px;
    max-width: 620px;
}
.gms-question-preview span {
    display: -webkit-box;
    overflow: hidden;
    color: var(--gms-ink-2);
    line-height: 1.55;
    overflow-wrap: anywhere;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.gms-question-image-link {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border: 1px solid #b7e4cd;
    border-radius: var(--gms-radius-control);
    color: var(--gms-primary);
    background: var(--gms-primary-soft);
    text-decoration: none;
}
.gms-question-image-link:hover {
    border-color: var(--gms-primary);
    color: #fff;
    background: var(--gms-primary);
}

.gms-exam-summary,
.gms-builder-context {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gms-space-2);
    margin: calc(var(--gms-space-3) * -1) 0 var(--gms-space-4);
}
.gms-exam-summary span,
.gms-builder-context span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 32px;
    padding: 5px 10px;
    border: 1px solid var(--gms-line);
    border-radius: var(--gms-radius-pill);
    color: var(--gms-muted);
    background: var(--gms-surface);
    font-size: var(--gms-font-size-xs);
    font-weight: 700;
}
.gms-exam-summary strong,
.gms-builder-context strong {
    color: var(--gms-ink);
    font-weight: 800;
}
.gms-exam-table { min-width: 1140px; }
.gms-setting-check {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: var(--gms-space-2);
    margin: 0;
    padding: 10px 12px;
    border: 1px solid var(--gms-line);
    border-radius: var(--gms-radius-control);
    background: var(--gms-surface-subtle);
}
.gms-setting-check .form-check-input {
    flex: 0 0 auto;
    float: none;
    margin: 0;
}
.gms-setting-check .form-check-label {
    margin: 0;
    line-height: 1.35;
    cursor: pointer;
}
.gms-builder-workspace,
.gms-schedule-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(340px, .8fr);
    gap: var(--gms-space-5);
    align-items: start;
}
.gms-builder-panel,
.gms-schedule-list,
.gms-schedule-form-panel {
    overflow: hidden;
    border: 1px solid var(--gms-line);
    border-radius: var(--gms-radius);
    background: var(--gms-surface);
}
.gms-builder-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--gms-space-3);
    padding: var(--gms-space-4);
    border-bottom: 1px solid var(--gms-line);
    background: var(--gms-surface-subtle);
}
.gms-builder-panel-header h4 {
    margin: 0;
    font-size: var(--gms-font-size-lg);
    font-weight: 800;
}
.gms-builder-panel-header p {
    margin: 4px 0 0;
    color: var(--gms-muted);
    font-size: var(--gms-font-size-xs);
}
.gms-builder-list,
.gms-builder-available-list {
    display: grid;
    gap: 0;
    max-height: 680px;
    overflow: auto;
}
.gms-builder-question,
.gms-builder-available {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--gms-space-3);
    padding: var(--gms-space-4);
    border-bottom: 1px solid var(--gms-line);
    background: var(--gms-surface);
}
.gms-builder-question:last-child,
.gms-builder-available:last-child {
    border-bottom: 0;
}
.gms-builder-question.is-incompatible {
    background: var(--gms-danger-soft);
}
.gms-builder-question-body,
.gms-builder-available > div {
    min-width: 0;
}
.gms-builder-question-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: var(--gms-space-2);
}
.gms-builder-question p,
.gms-builder-available p {
    margin: 0;
    color: var(--gms-ink-2);
    font-size: var(--gms-font-size-sm);
    line-height: 1.55;
    overflow-wrap: anywhere;
}
.gms-builder-action {
    flex: 0 0 auto;
    margin: 0;
}
.gms-schedule-table { min-width: 960px; }
.gms-schedule-form-panel {
    padding: 0;
}
.gms-schedule-form-panel form {
    padding: var(--gms-space-4);
}
.gms-monitor-header {
    margin-bottom: var(--gms-space-4);
}
.gms-live-indicator,
.gms-report-limit {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 12px;
    border: 1px solid var(--gms-success-line);
    border-radius: var(--gms-radius-pill);
    color: var(--gms-success-dark);
    background: var(--gms-success-soft);
    font-size: var(--gms-font-size-xs);
    font-weight: 800;
    white-space: nowrap;
}
.gms-report-limit {
    border-color: var(--gms-line);
    color: var(--gms-ink-2);
    background: var(--gms-surface);
}
.gms-batch-report-table-wrap {
    border-radius: var(--gms-radius-sm);
}
.gms-batch-report-table {
    table-layout: fixed;
    border-color: var(--gms-line-strong);
}
.gms-batch-report-table > :not(caption) > * > * {
    padding: 10px 12px;
    border-color: var(--gms-line-strong);
}
.gms-batch-report-table thead .gms-report-date-header {
    color: var(--gms-ink-2);
    background: var(--gms-surface-subtle) !important;
    font-size: 10px;
    letter-spacing: 0;
    text-transform: none;
    white-space: normal;
}
.gms-batch-report-table .gms-report-subject-name {
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.35;
}
.gms-batch-report-table .gms-report-col-number { width: 58px; }
.gms-batch-report-table .gms-report-col-student { width: 240px; }
.gms-batch-report-table .gms-report-col-username { width: 150px; }
.gms-batch-report-table .gms-report-col-score { width: 100px; }
.gms-batch-report-table .gms-report-col-average { width: 112px; }
.gms-batch-report-table .gms-report-col-points { width: 132px; }
.gms-batch-report-table .gms-report-col-rank { width: 76px; }
.gms-batch-report-table .gms-report-col-action { width: 145px; }
.gms-batch-report-table tbody td,
.gms-batch-report-table tfoot td,
.gms-batch-report-table tfoot th {
    white-space: nowrap;
}
.gms-batch-report-table tbody td:nth-child(2) {
    white-space: normal;
    overflow-wrap: anywhere;
}
.gms-batch-report-table tfoot th,
.gms-batch-report-table tfoot td {
    color: var(--gms-ink-2);
    background: var(--gms-line-soft);
    border-top: 1px solid var(--gms-line-strong);
    font-size: var(--gms-font-size-xs);
    font-weight: 700;
}
.gms-report-detail-action {
    white-space: nowrap;
}
.gms-report-sort-form .form-select {
    min-width: 190px;
}
.gms-monitor-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    overflow: hidden;
    margin-bottom: var(--gms-space-4);
    border: 1px solid var(--gms-line);
    border-radius: var(--gms-radius);
    background: var(--gms-surface);
}
.gms-monitor-strip > div {
    min-width: 0;
    padding: 14px 16px;
    border-right: 1px solid var(--gms-line);
}
.gms-monitor-strip > div:last-child {
    border-right: 0;
}
.gms-monitor-strip-label,
.gms-monitor-strip-note {
    display: block;
    color: var(--gms-muted);
    font-size: var(--gms-font-size-xs);
    line-height: 1.45;
}
.gms-monitor-strip-label {
    margin-bottom: 4px;
    font-weight: 700;
    letter-spacing: .035em;
    text-transform: uppercase;
}
.gms-monitor-strip strong {
    display: block;
    color: var(--gms-ink);
    font-size: 20px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.025em;
}
.gms-monitor-strip-note {
    margin-top: 5px;
}
.gms-monitor-panel {
    overflow: hidden;
    border: 1px solid var(--gms-line);
    border-radius: var(--gms-radius);
    background: var(--gms-surface);
}
.gms-monitor-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--gms-space-3);
    padding: var(--gms-space-4);
    border-bottom: 1px solid var(--gms-line);
    background: var(--gms-surface-subtle);
}
.gms-monitor-panel-header h4 {
    margin: 0;
    font-size: var(--gms-font-size-lg);
    font-weight: 800;
}
.gms-monitor-panel-header p {
    margin: 4px 0 0;
    color: var(--gms-muted);
    font-size: var(--gms-font-size-xs);
}
.gms-monitor-table {
    min-width: 1050px;
}
.gms-monitor-table th {
    white-space: nowrap;
}
.gms-monitor-row td {
    vertical-align: middle;
}
.gms-monitor-time {
    width: 150px;
    white-space: nowrap;
}
.gms-monitor-time time {
    color: var(--gms-ink-2);
    font-size: var(--gms-font-size-xs);
    font-weight: 700;
}
.gms-monitor-person {
    min-width: 210px;
}
.gms-monitor-exam {
    min-width: 220px;
    color: var(--gms-ink-2);
    font-weight: 600;
}
.gms-violation-badge {
    max-width: 260px;
    white-space: normal;
    text-align: left;
}
.gms-action-text {
    display: block;
    color: var(--gms-ink-2);
    font-size: var(--gms-font-size-xs);
    font-weight: 600;
    line-height: 1.5;
    overflow-wrap: anywhere;
}
.gms-violation-action {
    min-width: 170px;
    max-width: 280px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.gms-violation-action small {
    display: flex;
    align-items: center;
    gap: 5px;
    width: 100%;
    margin-top: 4px;
    color: var(--gms-muted);
    font-size: 10.5px;
    font-weight: 600;
}
.gms-schedule-status-strip {
    margin-top: calc(var(--gms-space-2) * -1);
}

@media (max-width: 1199.98px) {
    .gms-builder-workspace,
    .gms-schedule-workspace {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .gms-builder-panel-header,
    .gms-builder-question,
    .gms-builder-available {
        display: block;
    }
    .gms-builder-panel-header form,
    .gms-builder-action {
        margin-top: var(--gms-space-3);
    }
    .gms-builder-action .btn {
        width: 100%;
    }
    .gms-monitor-panel-header {
        display: block;
    }
    .gms-monitor-panel-header .badge {
        margin-top: var(--gms-space-3);
    }
}

@media (max-width: 767.98px) {
    .gms-monitor-strip {
        grid-template-columns: 1fr;
    }
    .gms-monitor-strip > div {
        border-right: 0;
        border-bottom: 1px solid var(--gms-line);
    }
    .gms-monitor-strip > div:last-child {
        border-bottom: 0;
    }
    .gms-live-indicator,
    .gms-report-limit {
        width: 100%;
        justify-content: center;
    }
}

.badge { padding: .42em .7em; border-radius: var(--gms-radius-pill); font-size: 10px; font-weight: 700; line-height: 1.25; letter-spacing: .015em; }
.badge.bg-primary { color: var(--gms-primary) !important; border: 1px solid #b7e4cd; background: var(--gms-primary-soft) !important; }
.badge.bg-success { color: var(--gms-success-dark) !important; border: 1px solid var(--gms-success-line); background: var(--gms-success-soft) !important; }
.badge.bg-danger { color: var(--gms-danger-dark) !important; border: 1px solid var(--gms-danger-line); background: var(--gms-danger-soft) !important; }
.badge.bg-warning { color: var(--gms-warning-dark) !important; border: 1px solid var(--gms-warning-line); background: var(--gms-warning-soft) !important; }
.badge.bg-info { color: var(--gms-info-dark) !important; border: 1px solid var(--gms-info-line); background: var(--gms-info-soft) !important; }
.badge.bg-secondary, .badge.bg-light { color: var(--gms-ink-2) !important; border: 1px solid var(--gms-line); background: var(--gms-line-soft) !important; }
.bg-primary { background-color: var(--gms-primary) !important; }
.bg-success { background-color: var(--gms-success) !important; }
.text-primary { color: var(--gms-primary) !important; }
.text-success { color: var(--gms-success) !important; }
.border-primary { border-color: var(--gms-primary) !important; }
.border-success { border-color: var(--gms-success) !important; }
.bg-danger { background-color: var(--gms-danger) !important; }
.bg-info { background-color: var(--gms-info-dark) !important; }
.text-danger { color: var(--gms-danger) !important; }
.text-info { color: var(--gms-info-dark) !important; }
.text-warning { color: var(--gms-warning-dark) !important; }
.border-danger { border-color: var(--gms-danger) !important; }
.border-info { border-color: var(--gms-info-dark) !important; }
.border-warning { border-color: var(--gms-warning) !important; }
.alert { padding: var(--gms-space-3) var(--gms-space-4); border-width: 1px; border-radius: var(--gms-radius); font-size: var(--gms-font-size-sm); line-height: 1.55; }
.alert-heading { margin-bottom: var(--gms-space-1); font-size: var(--gms-font-size-md); font-weight: 700; }
.alert-success { color: var(--gms-success-dark); background: var(--gms-success-soft); border-color: var(--gms-success-line); }
.alert-danger { color: var(--gms-danger-dark); background: var(--gms-danger-soft); border-color: var(--gms-danger-line); }
.alert-warning { color: var(--gms-warning-dark); background: var(--gms-warning-soft); border-color: var(--gms-warning-line); }
.alert-info { color: var(--gms-info-dark); background: var(--gms-info-soft); border-color: var(--gms-info-line); }
.alert-dismissible { padding-right: 3rem; }
.gms-user-import-result { display: grid; gap: var(--gms-space-3); }
.gms-user-import-result__heading { display: flex; align-items: flex-start; gap: var(--gms-space-3); }
.gms-user-import-result__heading > i { margin-top: 2px; font-size: 18px; line-height: 1; }
.gms-user-import-result__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    padding-top: var(--gms-space-3);
    border-top: 1px solid currentColor;
    border-top-color: var(--gms-line-strong);
}
.gms-user-import-result__stats > div { min-width: 110px; }
.gms-user-import-result__stats dt { margin-bottom: 2px; font-size: var(--gms-font-size-xs); font-weight: 600; opacity: .8; }
.gms-user-import-result__stats dd { margin: 0; color: inherit; font-size: var(--gms-font-size-lg); font-weight: 800; line-height: 1.2; }

.nav-tabs { gap: 2px; border-bottom: 1px solid var(--gms-line); margin-bottom: 20px; }
.nav-tabs .nav-link { min-height: 40px; border: 0; border-bottom: 2px solid transparent; padding: 9px 14px; color: var(--gms-muted); font-weight: 600; font-size: var(--gms-font-size-sm); border-radius: 0; }
.nav-tabs .nav-link:hover { color: var(--gms-primary); background: transparent; }
.nav-tabs .nav-link:focus-visible { outline-offset: -2px; }
.nav-tabs .nav-link.active { color: var(--gms-primary) !important; background: transparent; border-bottom-color: var(--gms-primary); font-weight: 700; }
.gms-filter-card { border: 1px solid var(--gms-line) !important; background: #fff; }
.gms-filter-card .card-body { padding: 16px 18px; }
.gms-filter-form .form-label { margin-bottom: .4rem; color: var(--gms-ink-2); font-size: 11px; font-weight: 700; letter-spacing: .02em; }
.gms-filter-actions { display: flex; flex-wrap: nowrap; align-items: flex-end; align-self: flex-end; gap: .5rem; }
.gms-filter-actions .btn { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; }
.gms-filter-actions .btn-primary { min-width: 108px; }
.gms-filter-actions .btn-outline-secondary { flex: 0 0 40px; width: 40px; padding-right: 0; padding-left: 0; }
@media (max-width: 767.98px) {
  .gms-filter-actions .btn-primary { flex: 1; }
}
.modal-content { border: 1px solid var(--gms-line); border-radius: var(--gms-radius-lg); box-shadow: var(--gms-shadow-lg); }

/* Student CSV import modal */
#importStudentModal .modal-header { padding: 1.25rem 1.5rem; }
#importStudentModal .modal-body { padding: 1.5rem; }
#importStudentModal .modal-footer { padding: 1rem 1.5rem; }
.csv-import-guide { padding: 1rem; border: 1px solid #bae6fd; border-radius: .75rem; color: #475569; background: #f0f9ff; }
.csv-format-table { min-width: 560px; table-layout: fixed; background: #fff; font-size: .8rem; }
.csv-format-table th, .csv-format-table td { padding: .65rem .5rem; text-align: center; vertical-align: middle; overflow-wrap: anywhere; }
.csv-import-rules { margin-top: 1rem; padding-left: 1.25rem; font-style: normal; font-size: .82rem; line-height: 1.65; }
.csv-import-rules li { padding-left: .2rem; }
.csv-import-rules li + li { margin-top: .4rem; }
.csv-import-rules li::marker { color: var(--gms-info); }
.csv-import-rules strong { color: #334155; font-weight: 700; }
.csv-import-rules code { padding: .1rem .3rem; border-radius: .25rem; color: #be185d; background: #fff; font-size: .78rem; }
.csv-scope-examples { padding: 1rem; border: 1px solid #fde68a; border-radius: .75rem; color: #475569; background: #fffbeb; }
.csv-example-row { display: grid; grid-template-columns: 8rem minmax(0, 1fr); align-items: center; gap: .65rem; margin-top: .4rem; }
.csv-example-row > span { font-size: .78rem; font-weight: 600; }
.csv-example-row code { display: block; min-width: 0; padding: .35rem .5rem; overflow-x: auto; border: 1px solid #fde68a; border-radius: .35rem; color: #334155; background: #fff; white-space: nowrap; }
@media (max-width: 575.98px) {
  #importStudentModal .modal-header, #importStudentModal .modal-body, #importStudentModal .modal-footer { padding: 1rem; }
  .csv-example-row { grid-template-columns: 1fr; gap: .15rem; }
}
.modal-header { border-color: var(--gms-line); padding: var(--gms-space-4) var(--gms-space-5); }
.modal-body { padding: var(--gms-space-5); }
.modal-footer { gap: var(--gms-space-2); border-color: var(--gms-line); padding: var(--gms-space-3) var(--gms-space-5); background: var(--gms-surface-subtle); }
.modal-title { font-weight: 700; font-size: var(--gms-font-size-lg); letter-spacing: -.02em; }
.modal-backdrop.show { opacity: .42; }
.btn-close:focus { box-shadow: 0 0 0 3px var(--gms-focus-ring); }
.schedule-edit-modal { background: transparent; }
.schedule-edit-modal .modal-dialog { width: auto; max-width: 560px; }
.schedule-edit-modal .modal-content { max-height: calc(100vh - 32px); overflow: hidden; }
.schedule-edit-modal .modal-body { overflow-y: auto; }
.dropdown-menu { min-width: 190px; padding: 6px; border: 1px solid var(--gms-line); border-radius: var(--gms-radius); background: var(--gms-surface); box-shadow: var(--gms-shadow); }
.dropdown-item { min-height: 36px; display: flex; align-items: center; padding: 8px 10px; border-radius: var(--gms-radius-sm); color: var(--gms-ink-2); font-size: var(--gms-font-size-sm); font-weight: 500; }
.dropdown-item:hover, .dropdown-item:focus { background: var(--gms-primary-soft); color: var(--gms-primary); }
.dropdown-item:focus-visible { outline: 2px solid var(--gms-focus-ring); outline-offset: -2px; }
.dropdown-item:active { background: var(--gms-primary); color: #fff; }
.dropdown-item.text-danger:hover, .dropdown-item.text-danger:focus { color: var(--gms-danger) !important; background: var(--gms-danger-soft); }
.dropdown-divider { border-color: var(--gms-line); margin: 4px 0; }

#nprogress { position: fixed; inset: 0 0 auto; z-index: 9999; height: 3px; background: var(--gms-primary); transform-origin: left; transform: scaleX(0); transition: transform .25s ease; border-radius: 0 2px 2px 0; }
.loading #nprogress { transform: scaleX(.7); }
.loaded #nprogress { transform: scaleX(1); }
.spinner-border.text-primary { color: var(--gms-primary) !important; }

@media (max-width: 991.98px) {
    .gms-sidebar { transform: translateX(-100%); box-shadow: var(--gms-shadow-lg); }
    body.sidebar-open .gms-sidebar { transform: translateX(0); }
    body.sidebar-open .gms-sidebar-backdrop { display: block; }
    .gms-mobile-toggle { display: inline-grid; place-items: center; }
    .gms-topbar { margin-left: 0; padding: 0 14px; justify-content: flex-start; gap: 10px; }
    .gms-page-context { flex: 1 1 auto; }
    .gms-top-actions { width: auto; margin-left: auto; justify-content: flex-end; gap: 8px; }
    .content { margin-left: 0; padding: 20px 16px 36px; }
    .gms-user-copy { display: none; }
    .gms-top-actions > .btn { display: none; }
    .gms-page-header { align-items: stretch; }
}

@media (max-width: 575.98px) {
    :root { --gms-topbar: 60px; }
    .gms-topbar { min-height: var(--gms-topbar); padding: 0 12px; }
    .gms-console-label { display: none; }
    .gms-breadcrumb { font-size: 13px; }
    .gms-user-button { min-height: 38px; padding: 2px 7px 2px 3px; }
    .gms-avatar { width: 32px; height: 32px; flex-basis: 32px; font-size: 12px; }
    .gms-mobile-toggle { width: 38px; height: 38px; flex-basis: 38px; }
    .content { padding: 16px 12px 30px; }
    .card-body { padding: 14px; }
    .gms-page-header { display: block; margin-bottom: var(--gms-space-5); }
    .gms-page-actions { width: 100%; margin-top: var(--gms-space-3); }
    .gms-page-actions .btn { flex: 1 1 auto; }
    .gms-toolbar, .gms-toolbar-main, .gms-toolbar-actions { align-items: stretch; }
    .gms-toolbar-actions { width: 100%; }
    .gms-toolbar-actions .btn { flex: 1 1 auto; }
    h2 { font-size: 1.35rem; }
    h3, h4 { font-size: 1.15rem; }
    .modal-dialog { margin: 12px; }
    .table > :not(caption) > * > * { padding: 10px; }
}

/* Authentication */
body.gms-auth { min-height: 100vh; margin: 0; background: var(--gms-canvas); font-family: var(--gms-font-sans); color: var(--gms-ink); font-size: var(--gms-font-size-md); line-height: 1.55; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
.gms-auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, 46%) 1fr; }
.gms-auth-visual { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 52px; color: #fff; background: linear-gradient(155deg, #052e1a 0%, #076338 45%, #0b8f55 100%); }
.gms-auth-brand { position: relative; z-index: 1; display: flex; width: 80%; max-width: 620px; align-items: center; justify-content: center; gap: clamp(20px, 2vw, 30px); }
.gms-auth-brand .gms-brand-mark { width: clamp(96px, 8vw, 132px); height: clamp(96px, 8vw, 132px); flex: 0 0 clamp(96px, 8vw, 132px); padding: 10px; background: #fff; border-radius: 18px; object-fit: contain; }
.gms-auth-brand strong { display: block; font-size: clamp(32px, 3vw, 44px); line-height: 1.05; font-weight: 800; letter-spacing: -.03em; white-space: nowrap; }
.gms-auth-brand small { display: block; margin-top: 8px; color: rgba(255,255,255,.76); font-weight: 500; font-size: clamp(13px, 1.15vw, 16px); line-height: 1.35; }
.gms-auth-panel { display: grid; place-items: center; padding: 48px 40px; background: var(--gms-canvas); }
.gms-auth-card { width: 100%; max-width: 460px; padding: 36px; border: 1px solid var(--gms-line); border-radius: var(--gms-radius-lg); background: #fff; box-shadow: var(--gms-shadow); }
.gms-auth-card h2 { margin-bottom: 6px; font-size: 24px; font-weight: 800; letter-spacing: -.03em; }
.gms-auth-card > p { margin-bottom: 24px; color: var(--gms-muted); font-size: 13px; }
.gms-auth-card .nav-tabs { margin-bottom: 22px; }
.gms-auth-card .nav-link { width: 100%; padding: 10px; justify-content: center; }
.gms-auth-card .btn { min-height: 44px; font-size: 14px; }
.gms-auth-card .gms-change-program-btn {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 7px 13px;
    border: 1px solid rgba(11,143,85,.24);
    border-radius: 999px;
    color: var(--gms-green-dark);
    background: var(--gms-green-soft);
    font-size: 12px;
    font-weight: 700;
    box-shadow: none;
}
.gms-auth-card .gms-change-program-btn i { font-size: 15px; transition: transform .2s ease; }
.gms-auth-card .gms-change-program-btn:hover {
    border-color: var(--gms-green);
    color: #fff;
    background: var(--gms-primary);
    box-shadow: none;
}
.gms-auth-card .gms-change-program-btn:hover i { transform: rotate(-45deg); }
.gms-auth-card .gms-change-program-btn:focus-visible { outline: 3px solid var(--gms-green-glow); outline-offset: 2px; }
.gms-auth-mobile-brand { display: none; }

@media (max-width: 900px) {
    .gms-auth-shell { grid-template-columns: minmax(0, 1fr); }
    .gms-auth-visual { display: none; }
    .gms-auth-panel { width: 100%; min-width: 0; padding: 28px 16px; }
    .gms-auth-mobile-brand { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; margin-bottom: 24px; text-align: center; }
    .gms-auth-mobile-brand .gms-brand-mark { width: 68px; height: 68px; flex-basis: 68px; padding: 5px; object-fit: contain; }
    .gms-auth-mobile-brand .gms-brand-copy strong { color: var(--gms-green); font-size: 21px; }
    .gms-auth-card > h2,
    .gms-auth-card > p { text-align: center; }
    .gms-auth-card { width: 100%; min-width: 0; max-width: min(460px, calc(100vw - 32px)); padding: 24px 20px; }
    .gms-auth-card .input-group { min-width: 0; }
}

/* 404 page */
body.gms-error-guest {
    min-height: 100vh;
    margin: 0;
    color: var(--gms-ink);
    background: var(--gms-canvas);
    font-family: var(--gms-font-sans);
}
.gms-error-page {
    min-height: min(720px, calc(100vh - var(--gms-topbar) - 56px));
    display: grid;
    place-items: center;
    padding: 32px 16px;
}
body.gms-error-guest .gms-error-page { min-height: 100vh; }
.gms-error-card {
    position: relative;
    isolation: isolate;
    width: min(100%, 680px);
    overflow: hidden;
    padding: 42px 44px 46px;
    border: 1px solid var(--gms-line);
    border-radius: var(--gms-radius-xl);
    background: var(--gms-surface);
    box-shadow: var(--gms-shadow);
    text-align: center;
}
.gms-error-brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 28px;
    color: var(--gms-ink);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .04em;
    text-decoration: none;
}
.gms-error-brand img {
    width: 40px;
    height: 40px;
    min-width: 40px;
    flex: 0 0 40px;
    display: block;
    object-fit: contain;
    object-position: center;
    aspect-ratio: 1 / 1;
    padding: 3px;
    border-radius: 9px;
    background: var(--gms-green-soft);
}
.gms-error-icon {
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    margin: 12px auto 22px;
    border: 1px solid #cdeedc;
    border-radius: 22px;
    color: var(--gms-green);
    background: var(--gms-green-soft);
    box-shadow: none;
    font-size: 32px;
}
.gms-error-eyebrow {
    margin: 0 0 8px;
    color: var(--gms-green);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .11em;
    text-transform: uppercase;
}
.gms-error-card h1 { margin: 0; font-size: clamp(27px, 5vw, 38px); font-weight: 800; }
.gms-error-message {
    max-width: 480px;
    margin: 14px auto 26px;
    color: var(--gms-muted);
    font-size: 14px;
    line-height: 1.75;
}
.gms-error-action {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
}

@media (max-width: 575.98px) {
    .gms-error-page { padding: 20px 4px; }
    .gms-error-card { padding: 30px 20px 34px; border-radius: 16px; }
    .gms-error-brand { margin-bottom: 22px; }
    .gms-error-icon { width: 66px; height: 66px; font-size: 28px; }
    .gms-error-action { width: 100%; }
}

/* Student portal */
body.gms-student { min-height: 100vh; background: var(--gms-canvas); color: var(--gms-ink); font-family: var(--gms-font-sans); font-size: var(--gms-font-size-md); line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
.gms-student-nav { min-height: 68px; background: #fff; border-bottom: 1px solid var(--gms-line); position: sticky; top: 0; z-index: 100; }
.gms-student-nav .container { max-width: 1320px; }
.gms-student-nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.gms-student-brand { min-width: 0; display: flex; align-items: center; gap: 10px; color: var(--gms-ink); font-weight: 800; text-decoration: none; letter-spacing: -.02em; }
.gms-student-brand:hover { color: var(--gms-ink); }
.gms-student-brand .gms-brand-mark { width: 38px; height: 38px; flex: 0 0 38px; padding: 4px; border-radius: 10px; background: var(--gms-green-soft); object-fit: contain; }
.gms-student-brand span { display: block; font-size: 16px; line-height: 1.18; white-space: nowrap; }
.gms-student-brand small { display: block; margin-top: 3px; color: var(--gms-muted); font-size: 10.5px; font-weight: 600; letter-spacing: 0; }
.gms-student-actions { display: flex; align-items: center; gap: 9px; }
.gms-student-console { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; }
.gms-student-content { max-width: 1320px; margin: 0 auto; padding: 30px 24px 50px; }
.gms-student-user { min-height: 42px; display: flex; align-items: center; gap: 9px; padding: 4px 6px 4px 4px; border: 1px solid transparent; border-radius: var(--gms-radius-pill); color: var(--gms-ink); background: transparent; }
.gms-student-user:hover,
.gms-student-user[aria-expanded="true"] { border-color: var(--gms-line); background: var(--gms-surface-subtle); }
.gms-student-dropdown-head { padding: 8px 10px 9px; border-bottom: 1px solid var(--gms-line-soft); margin-bottom: 5px; }
.gms-student-dropdown-head strong,
.gms-student-dropdown-head small { display: block; }
.gms-student-dropdown-head strong { max-width: 210px; overflow: hidden; color: var(--gms-ink); font-size: var(--gms-font-size-sm); font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.gms-student-dropdown-head small { margin-top: 3px; color: var(--gms-primary); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.accordion-item { border: 1px solid var(--gms-line) !important; border-radius: var(--gms-radius) !important; overflow: hidden; }
.accordion-button { font-size: 14px; font-weight: 600; font-family: inherit; }
.accordion-button:not(.collapsed) { color: var(--gms-green-dark); background: var(--gms-green-soft); box-shadow: none; }
.accordion-button:focus { box-shadow: 0 0 0 3px var(--gms-focus-ring); }
.gms-student-hero { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 30px 34px; border-radius: 20px; color: #fff; background: linear-gradient(135deg, #064b2c 0%, var(--gms-green) 70%, #11a866 100%); box-shadow: 0 14px 35px rgba(6,75,44,.16); }
.gms-student-hero > * { position: relative; z-index: 1; }
.gms-student-eyebrow { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 9px; color: rgba(255,255,255,.78); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.gms-student-hero h1 { margin: 0; color: #fff; font-size: clamp(25px, 3vw, 36px); font-weight: 800; line-height: 1.22; letter-spacing: -.035em; }
.gms-student-hero p { max-width: 620px; margin: 10px 0 0; color: rgba(255,255,255,.82); font-size: 14px; line-height: 1.65; }
.gms-student-hero-stat { min-width: 120px; padding: 17px 20px; border: 1px solid rgba(255,255,255,.18); border-radius: 15px; background: rgba(255,255,255,.14); text-align: center; }
.gms-student-hero-stat span { display: block; color: #fff; font-size: 30px; font-weight: 800; line-height: 1; }
.gms-student-hero-stat small { display: block; margin-top: 7px; color: rgba(255,255,255,.78); font-size: 11px; }
.gms-section-heading { min-height: 52px; display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.gms-section-kicker { display: block; margin-bottom: 2px; color: var(--gms-green); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.gms-section-heading h2 { margin: 0; font-size: 21px; font-weight: 800; line-height: 1.3; letter-spacing: -.025em; }
.gms-section-count { padding: 6px 10px; border-radius: 999px; color: var(--gms-muted); background: #fff; border: 1px solid var(--gms-line); font-size: 11px; font-weight: 700; }
.gms-exam-accordion .accordion-item { overflow: hidden; border-radius: 15px !important; background: #fff; }
.gms-exam-accordion .accordion-button { min-height: 72px; gap: 13px; padding: 15px 18px; background: #fff; }
.gms-exam-accordion .accordion-button:not(.collapsed) { border-bottom: 1px solid var(--gms-line-soft); }
.gms-exam-accordion .accordion-button strong { display: block; color: var(--gms-ink); font-size: 15.5px; line-height: 1.4; }
.gms-exam-accordion .accordion-button small { display: block; margin-top: 4px; color: var(--gms-muted); font-size: 11.5px; font-weight: 500; line-height: 1.45; }
.gms-subject-icon { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 10px; color: var(--gms-green); background: var(--gms-green-soft); font-size: 17px; }
.gms-exam-accordion .accordion-body { padding: 18px; background: #fbfcfb; }
.gms-exam-card { position: relative; height: 100%; overflow: hidden; display: flex; flex-direction: column; padding: 18px; border: 1px solid var(--gms-line); border-radius: 14px; background: #fff; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.gms-exam-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--gms-green); }
.gms-exam-card:hover { transform: translateY(-3px); border-color: rgba(11,143,85,.34); box-shadow: 0 12px 28px rgba(17,24,39,.08); }
.gms-exam-card.is-selesai::before { background: #16a34a; }
.gms-exam-card.is-menunggu::before { background: #f59e0b; }
.gms-exam-card.is-terkunci::before, .gms-exam-card.is-berakhir::before { background: #94a3b8; }
.gms-exam-card-top { min-height: 25px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gms-exam-type, .gms-exam-status { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 800; line-height: 1.35; }
.gms-exam-type { padding: 5px 8px; border-radius: 999px; }
.gms-exam-type.is-awal { color: #075985; background: #e0f2fe; }
.gms-exam-type.is-akhir { color: #92400e; background: #fef3c7; }
.gms-exam-type.is-umum { color: #475569; background: #f1f5f9; }
.gms-exam-status { color: var(--gms-green-dark); text-align: right; }
.is-menunggu .gms-exam-status { color: #b45309; }
.is-terkunci .gms-exam-status, .is-berakhir .gms-exam-status { color: #64748b; }
.is-selesai .gms-exam-status { color: #15803d; }
.gms-exam-card h3 { min-height: 46px; margin: 16px 0 12px; color: var(--gms-ink); font-size: 17px; font-weight: 800; line-height: 1.42; letter-spacing: -.018em; }
.gms-exam-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.gms-exam-meta span { display: inline-flex; align-items: center; gap: 5px; padding: 7px 9px; border-radius: 7px; color: var(--gms-muted); background: #f8faf9; font-size: 11px; line-height: 1.4; }
.gms-exam-meta i { color: var(--gms-green); }
.gms-exam-meta strong { color: var(--gms-ink); font-weight: 800; }
.gms-exam-schedule { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 15px; padding: 11px; border-radius: 10px; background: var(--gms-green-soft); }
.is-menunggu .gms-exam-schedule { background: #fffbeb; }
.is-berakhir .gms-exam-schedule, .is-terkunci .gms-exam-schedule { background: #f8fafc; }
.gms-exam-schedule > i { margin-top: 2px; color: var(--gms-green); font-size: 15px; }
.is-menunggu .gms-exam-schedule > i { color: #d97706; }
.is-berakhir .gms-exam-schedule > i, .is-terkunci .gms-exam-schedule > i { color: #64748b; }
.gms-exam-schedule span, .gms-exam-schedule strong, .gms-exam-schedule small { display: block; }
.gms-exam-schedule span { color: var(--gms-muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.gms-exam-schedule strong { margin-top: 3px; color: var(--gms-ink); font-size: 11.5px; line-height: 1.55; }
.gms-exam-schedule small { margin-top: 4px; color: var(--gms-green-dark); font-size: 10.5px; font-weight: 700; line-height: 1.45; }
.gms-exam-card-action { margin-top: auto; }
.gms-exam-card-action .btn { min-height: 40px; font-size: 12.5px; font-weight: 700; line-height: 1.35; }
.gms-start-exam-btn { display: inline-flex; align-items: center; justify-content: center; }
.gms-start-exam-btn i { transition: transform .18s ease; }
.gms-start-exam-btn:hover i { transform: translateX(3px); }
.gms-exam-score { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; padding: 8px 10px; border: 1px dashed #86efac; border-radius: 9px; background: #f0fdf4; }
.gms-exam-score span { color: #166534; font-size: 11px; font-weight: 700; }
.gms-exam-score strong { color: #15803d; font-size: 20px; }
.gms-empty-state { padding: var(--gms-space-10) var(--gms-space-6); border: 1px dashed var(--gms-line-strong); border-radius: var(--gms-radius-lg); background: var(--gms-surface); text-align: center; }
.gms-empty-icon { width: 48px; height: 48px; display: grid; place-items: center; margin: 0 auto var(--gms-space-3); border-radius: var(--gms-radius); color: var(--gms-primary); background: var(--gms-primary-soft); font-size: 21px; }
.gms-empty-state h3 { margin-bottom: 6px; font-size: var(--gms-font-size-lg); font-weight: 700; }
.gms-empty-state p { max-width: 430px; margin: 0 auto; color: var(--gms-muted); font-size: var(--gms-font-size-xs); }
.gms-empty-state .btn { margin-top: var(--gms-space-4); }
.gms-empty-state.is-compact { padding: 35px 18px; border: 0; }
.gms-import-summary {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid var(--gms-line);
    border-radius: var(--gms-radius);
    background: var(--gms-surface);
}
.gms-import-summary > div {
    min-width: 0;
    padding: var(--gms-space-3) var(--gms-space-4);
    border-right: 1px solid var(--gms-line);
}
.gms-import-summary > div:last-child { border-right: 0; }
.gms-import-summary span {
    display: block;
    margin-bottom: 4px;
    color: var(--gms-muted);
    font-size: var(--gms-font-size-xs);
    font-weight: 600;
}
.gms-import-summary strong {
    display: block;
    color: var(--gms-ink);
    font-size: var(--gms-font-size-lg);
    line-height: 1.25;
}
.gms-historical-preview-wrap {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
}
.gms-historical-preview-table {
    width: max-content;
    min-width: 1760px;
    table-layout: auto;
}
.gms-historical-preview-table > :not(caption) > * > * {
    padding: 10px 12px;
    line-height: 1.35;
    white-space: nowrap;
}
.gms-historical-preview-table th:nth-child(1),
.gms-historical-preview-table td:nth-child(1) { min-width: 72px; }
.gms-historical-preview-table th:nth-child(2),
.gms-historical-preview-table td:nth-child(2) { min-width: 220px; }
.gms-historical-preview-table th:nth-child(3),
.gms-historical-preview-table td:nth-child(3) { min-width: 170px; }
.gms-historical-preview-table th:nth-child(4),
.gms-historical-preview-table td:nth-child(4) { min-width: 280px; }
.gms-historical-preview-table th:nth-child(5),
.gms-historical-preview-table td:nth-child(5) { min-width: 310px; }
.gms-historical-preview-table th:nth-child(6),
.gms-historical-preview-table td:nth-child(6) { min-width: 360px; }
.gms-historical-preview-table th:nth-child(7),
.gms-historical-preview-table td:nth-child(7) { min-width: 90px; }
.gms-historical-preview-table th:nth-child(8),
.gms-historical-preview-table td:nth-child(8) { min-width: 260px; }
.gms-historical-preview-table ul {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px 20px;
    margin-top: 4px;
}
.gms-historical-preview-table li { white-space: nowrap; }
.gms-import-validation-cell { min-width: 220px; }
.gms-activity-card { overflow: hidden; border: 1px solid var(--gms-line); border-radius: 15px; background: #fff; }
.gms-activity-list { max-height: 620px; overflow: auto; }
.gms-activity-item { display: grid; grid-template-columns: minmax(0,1fr) 56px; align-items: start; width: 100%; min-width: 0; gap: 12px; padding: 14px 15px; border-bottom: 1px solid var(--gms-line-soft); transition: background .15s ease; }
.gms-activity-item:last-child { border-bottom: 0; }
.gms-activity-item:hover { background: #f8fbf9; }
.gms-activity-copy { min-width: 0; }
.gms-activity-copy strong, .gms-activity-copy span, .gms-activity-copy small { display: block; }
.gms-activity-copy strong { color: var(--gms-ink); font-size: 12.5px; line-height: 1.45; }
.gms-activity-copy span { margin-top: 3px; color: var(--gms-muted); font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
.gms-activity-copy small { margin-top: 6px; color: #7f8b99; font-size: 10px; line-height: 1.45; }
.gms-activity-item time { display: grid; min-width: 56px; justify-items: end; align-self: start; color: var(--gms-muted); font-size: 10.5px; font-weight: 700; line-height: 1.4; text-align: right; white-space: nowrap; }
.gms-activity-item time small { display: block; margin-top: 3px; color: #94a3b8; font-size: 9px; }
.activity-log-table-wrap { overflow-x: auto !important; overflow-y: hidden; }
.activity-log-table { min-width: 1180px; }
.activity-log-target {
    width: 32%;
    min-width: 260px;
    max-width: 460px;
    line-height: 1.5;
    white-space: normal;
    overflow-wrap: anywhere;
}

@media (max-width: 767.98px) {
    .gms-import-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .gms-import-summary > div:nth-child(3n) { border-right: 0; }
    .gms-import-summary > div:nth-child(-n + 3) { border-bottom: 1px solid var(--gms-line); }
    .gms-student-nav-inner { gap: 10px; }
    .gms-student-console { display: none; }
    .gms-student-content { padding: 20px 14px 36px; }
    .gms-student-nav .gms-user-copy { display: none; }
    .gms-student-nav { min-height: 60px; }
    .gms-student-brand .gms-brand-mark { width: 34px; height: 34px; flex-basis: 34px; }
    .gms-student-brand span { font-size: 14px; }
    .gms-student-brand small { font-size: 9.5px; }
    .gms-student-user { min-height: 38px; padding-right: 4px; }
    .gms-student-hero { align-items: flex-start; padding: 23px 20px; }
    .gms-student-hero h1 { font-size: clamp(23px, 7vw, 29px); }
    .gms-student-hero-stat { min-width: 90px; padding: 13px; }
    .gms-student-hero-stat span { font-size: 24px; }
    .gms-student-hero p { font-size: 13px; line-height: 1.6; }
    .gms-section-heading h2 { font-size: 19px; }
    .gms-exam-accordion {
        border-top: 1px solid var(--gms-line);
    }
    .gms-exam-accordion .accordion-item {
        margin-bottom: 0 !important;
        border: 0 !important;
        border-bottom: 1px solid var(--gms-line) !important;
        border-radius: 0 !important;
        background: transparent;
    }
    .gms-exam-accordion .accordion-button,
    .gms-exam-accordion .accordion-button:not(.collapsed) {
        min-height: 64px;
        padding: 13px 4px 13px 0;
        border-bottom: 0;
        background: transparent;
    }
    .gms-exam-accordion .accordion-button > .flex-grow-1 {
        min-width: 0;
        padding-right: 4px;
    }
    .gms-exam-accordion .accordion-button strong {
        overflow-wrap: anywhere;
    }
    .gms-exam-accordion .accordion-button::after {
        width: 32px;
        height: 32px;
        flex: 0 0 32px;
        margin-left: 8px;
        background-position: center;
        background-size: 16px;
    }
    .gms-exam-accordion .accordion-button:focus {
        box-shadow: none;
    }
    .gms-exam-accordion .accordion-button:focus-visible {
        border-radius: 6px;
        outline: 2px solid var(--gms-primary);
        outline-offset: -2px;
    }
    .gms-exam-accordion .accordion-body {
        padding: 0 0 16px;
        background: transparent;
    }
    .gms-exam-card { padding: 15px; }
    .gms-exam-card h3 { min-height: 0; font-size: 16px; line-height: 1.45; }
    .gms-activity-item { grid-template-columns: minmax(0,1fr) 48px; column-gap: 10px; }
    .gms-activity-item time { min-width: 48px; }
}

@media (max-width: 480px) {
    .gms-student-hero { display: block; }
    .gms-student-hero-stat { display: inline-flex; align-items: center; gap: 8px; margin-top: 17px; padding: 9px 12px; text-align: left; }
    .gms-student-hero-stat span { font-size: 20px; }
    .gms-student-hero-stat small { margin: 0; }
    .gms-exam-card-top { align-items: flex-start; }
    .gms-exam-status { max-width: 48%; }
}

/* Phase 18: responsive resilience */
.gms-responsive-heading,
.gms-table-toolbar,
.gms-responsive-action-row {
    min-width: 0;
}
.gms-responsive-heading > :first-child,
.gms-table-toolbar > :first-child,
.gms-responsive-action-row > :first-child,
.gms-responsive-meta > * {
    min-width: 0;
}
.gms-responsive-heading h1,
.gms-responsive-heading h2,
.gms-responsive-heading h3,
.gms-responsive-heading h4,
.gms-responsive-heading p,
.gms-responsive-meta {
    overflow-wrap: anywhere;
}
.gms-scroll-tabs {
    max-width: 100%;
}
.gms-roles-table {
    min-width: 520px;
}
.gms-people-table {
    min-width: 760px;
}
.table-responsive {
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
}
.dropdown-menu {
    max-width: calc(100vw - 24px);
}
.dropdown-item {
    white-space: normal;
    overflow-wrap: anywhere;
}

@media (max-width: 1199.98px) {
    .gms-sidebar {
        transform: translateX(-100%);
        box-shadow: var(--gms-shadow-lg);
    }
    body.sidebar-open .gms-sidebar {
        transform: translateX(0);
    }
    body.sidebar-open .gms-sidebar-backdrop {
        display: block;
    }
    .gms-mobile-toggle {
        display: inline-grid;
        place-items: center;
    }
    .gms-topbar {
        margin-left: 0;
    }
    .content {
        margin-left: 0;
    }
    .gms-page-header,
    .gms-responsive-heading {
        flex-wrap: wrap;
    }
    .gms-page-actions,
    .gms-responsive-heading > .btn,
    .gms-responsive-heading > form {
        flex: 0 0 auto;
        max-width: 100%;
    }
}

@media (max-width: 991.98px) {
    .gms-topbar,
    .gms-top-actions,
    .content,
    .content > .container,
    .content > .container-fluid,
    .gms-toolbar-main,
    .gms-master-toolbar-main {
        min-width: 0;
    }
    .gms-toolbar-main,
    .gms-master-toolbar-main {
        flex-basis: 100%;
    }
    .gms-page-actions {
        flex-wrap: wrap;
    }
}

@media (max-width: 767.98px) {
    .gms-scroll-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 1px;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }
    .gms-scroll-tabs .nav-item {
        flex: 0 0 auto;
    }
    .gms-scroll-tabs .nav-link {
        white-space: nowrap;
    }
    .gms-responsive-heading {
        align-items: stretch !important;
        flex-direction: column;
        gap: var(--gms-space-3);
    }
    .gms-responsive-heading > .btn,
    .gms-responsive-heading > form,
    .gms-responsive-heading > form .btn {
        width: 100%;
    }
    .gms-table-toolbar {
        align-items: stretch !important;
        flex-direction: column;
    }
    .gms-table-toolbar > div:last-child,
    .gms-table-toolbar > .btn {
        display: flex;
        width: 100%;
        flex-wrap: wrap;
        gap: var(--gms-space-2);
    }
    .gms-table-toolbar > div:last-child .btn,
    .gms-table-toolbar > .btn {
        flex: 1 1 auto;
        margin-right: 0 !important;
    }
    .gms-report-sort-form {
        width: 100%;
    }
    .gms-responsive-action-row {
        align-items: stretch !important;
        flex-direction: column;
        gap: var(--gms-space-3);
    }
    .gms-responsive-action-row form,
    .gms-responsive-action-row form .btn {
        width: 100%;
    }
    .gms-responsive-meta {
        flex-wrap: wrap;
        gap: var(--gms-space-2) var(--gms-space-4) !important;
    }
    .card-header.d-flex.justify-content-between {
        flex-wrap: wrap;
    }
    .gms-master-table-footer,
    .gms-student-table-footer {
        align-items: stretch;
    }
    .gms-master-table-footer nav,
    .gms-student-pagination-nav {
        width: 100%;
    }
    .gms-master-table-footer .pagination,
    .gms-student-pagination,
    .card-footer > .pagination {
        width: 100%;
        max-width: 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }
    .modal-dialog-scrollable .modal-content {
        max-height: calc(100dvh - 24px);
    }
}

@media (max-width: 575.98px) {
    .gms-report-sort-form,
    .gms-report-sort-form > div,
    .gms-report-sort-form .form-select,
    .gms-report-sort-form .btn {
        width: 100%;
    }
    .gms-import-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gms-import-summary > div,
    .gms-import-summary > div:nth-child(3n) { border-right: 1px solid var(--gms-line); }
    .gms-import-summary > div:nth-child(even) { border-right: 0; }
    .gms-import-summary > div:nth-child(-n + 4) { border-bottom: 1px solid var(--gms-line); }
    .gms-page-title,
    .gms-responsive-heading h3,
    .gms-responsive-heading h4 {
        overflow-wrap: anywhere;
    }
    .gms-filter-actions {
        width: 100%;
    }
    .gms-filter-actions .btn-primary {
        min-width: 0;
    }
    .gms-student-range {
        width: 100%;
        padding-left: 0;
        border-left: 0;
    }
    .modal-header,
    .modal-body,
    .modal-footer {
        padding-right: 14px;
        padding-left: 14px;
    }
    .modal-footer {
        align-items: stretch;
    }
    .modal-footer .btn {
        flex: 1 1 auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
