/* Small portal-specific branding layer. The shared responsive stylesheet loads last. */
/* Sidebar and content size the same grid row; only the document scrolls. */
body.rem-app > .wrapper { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); grid-template-rows: auto 1fr auto; min-height: 100vh; }
body.rem-app > .wrapper::before, body.rem-app > .wrapper::after { content: none; }
body.rem-app > .wrapper > .main-header { grid-column: 1 / -1; grid-row: 1; }
body.rem-app > .wrapper > .main-sidebar { grid-column: 1; grid-row: 2; position: relative; inset: auto; width: auto; height: auto; max-height: none; min-height: 0; padding-top: 0; overflow: visible; overscroll-behavior: auto; transform: none; }
body.rem-app > .wrapper > .content-wrapper { grid-column: 2; grid-row: 2; margin-left: 0; min-height: 0; }
body.rem-app > .wrapper > .main-footer { grid-column: 1 / -1; grid-row: 3; margin-left: 0; }
@media (min-width: 768px) {
    body.rem-app.ds-sidebar-collapsed > .wrapper { grid-template-columns: minmax(0, 1fr); }
    body.rem-app.ds-sidebar-collapsed > .wrapper > .main-sidebar { display: none; }
    body.rem-app.ds-sidebar-collapsed > .wrapper > .content-wrapper { grid-column: 1; }
}
@media (max-width: 767.98px) {
    body.rem-app > .wrapper { grid-template-columns: minmax(0, 1fr); }
    body.rem-app > .wrapper > .content-wrapper { grid-column: 1; }
    body.rem-app > .wrapper > .main-sidebar { display: none; width: min(260px, calc(100vw - 48px)); }
    body.rem-app.ds-sidebar-open { overflow: visible; }
    body.rem-app.ds-sidebar-open > .wrapper > .main-sidebar { display: block; }
}
@media print {
    body.rem-app > .wrapper { display: block; min-height: 0; }
}
.rem-auth .login-logo { flex-direction: column; text-align: center; gap: 16px; margin-bottom: 24px; }
.rem-auth .login-logo img { width: 112px; height: auto; max-width: 100%; object-fit: contain; padding: 3px; }
.rem-auth .login-brand-panel::before, .rem-auth .login-brand-panel::after { display: none; }
.rem-auth .rem-brand-note { margin: 24px 0 0; color: var(--brand-primary-contrast); line-height: 1.6; opacity: .82; }
.rem-auth .rem-password-option .form-check-label { display: flex; align-items: center; gap: 8px; }
.rem-auth .rem-password-option .form-check-input { float: none; margin: 0; }
.rem-student-portal { min-height: 100vh; background: var(--brand-background); color: var(--brand-text); }
.rem-student-header { background: var(--brand-student-header); border-bottom: 4px solid var(--brand-accent); color: var(--brand-student-header-contrast); box-shadow: 0 2px 8px rgba(0,0,0,.16); }
.rem-student-header-inner { width: min(1160px, calc(100% - 32px)); min-height: 72px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.rem-student-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--brand-student-header-contrast); text-decoration: none; }
.rem-student-brand:hover, .rem-student-brand:focus { color: var(--brand-student-header-contrast); text-decoration: none; }
.rem-student-brand img { width: 46px; height: 46px; object-fit: contain; }
.rem-student-brand span { display: flex; flex-direction: column; line-height: 1.2; }
.rem-student-brand strong { font-size: 17px; }
.rem-student-brand small { color: var(--brand-student-header-contrast); font-size: 12px; opacity: .78; }
.rem-student-nav { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.rem-student-nav-menu { position: relative; }
.rem-student-nav form { margin: 0; }
.rem-student-nav .btn { min-height: 34px; padding: 5px 10px; border-color: currentColor; color: var(--brand-student-header-contrast); background: transparent; font-size: 12px; white-space: nowrap; }
.rem-student-nav .btn:hover, .rem-student-nav .btn:focus { color: var(--brand-primary); background: var(--brand-primary-contrast); }
.rem-student-nav .btn.is-active { color: var(--brand-primary); background: var(--brand-primary-contrast); border-color: var(--brand-primary-contrast); }
.rem-student-nav .dropdown-menu { min-width: 210px; padding: 6px; margin-top: 8px !important; border: 1px solid #d8e2dc; border-radius: 7px; box-shadow: 0 12px 28px rgba(12,48,36,.18); }
.rem-student-nav .dropdown-item { display: flex; align-items: center; gap: 9px; padding: 9px 10px; color: #294238; border-radius: 5px; font-size: 13px; }
.rem-student-nav .dropdown-item i { width: 16px; color: #668075; text-align: center; }
.rem-student-nav .dropdown-item:hover, .rem-student-nav .dropdown-item:focus { color: var(--brand-primary); background: var(--brand-primary-soft); }
.rem-student-nav .dropdown-item.active, .rem-student-nav .dropdown-item:active { color: var(--brand-primary-contrast); background: var(--brand-primary); }
.rem-student-nav .dropdown-item.active i { color: #fff; }
.rem-student-main { width: min(1160px, calc(100% - 32px)); min-height: calc(100vh - 136px); margin: 0 auto; padding: 28px 0 40px; }
.rem-exam-mode { min-height: 100vh; background: #e9efec; }
.rem-exam-main { width: min(1180px, calc(100% - 32px)); min-height: 100vh; margin: 0 auto; padding: 18px 0; }
.rem-exam-mode .rem-attempt-shell { display: flex; min-height: calc(100vh - 36px); flex-direction: column; }
.rem-exam-entry-gate { position: fixed; inset: 0; z-index: 2050; display: grid; place-items: center; padding: 20px; background: rgba(9,35,27,.94); }
.rem-exam-entry-gate[hidden] { display: none; }
.rem-exam-entry-card { width: min(520px,100%); padding: 32px; color: #23312a; background: #fff; border: 1px solid rgba(255,255,255,.25); border-radius: 10px; box-shadow: 0 18px 55px rgba(0,0,0,.38); text-align: center; }
.rem-exam-entry-card > .fas { margin-bottom: 14px; color: var(--brand-primary); font-size: 36px; }
.rem-exam-entry-card h1 { margin: 0 0 12px; color: var(--dar-green-900); font-size: 25px; }
.rem-exam-entry-card p { line-height: 1.6; }
.rem-fullscreen-state { min-height: 20px; margin: 13px 0 0; color: #607067; font-size: 12px; }
.rem-start-warning-list { display: grid; gap: 8px; padding-left: 22px; }
.rem-student-page-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.rem-student-page-heading p { margin: 0 0 3px; color: #607067; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.rem-student-page-heading h1 { margin: 0; color: var(--dar-green-900); font-size: 26px; }
.rem-student-page-heading > span { color: #607067; }
.rem-student-welcome { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 24px; margin-bottom: 22px; color: var(--brand-primary-contrast); background: linear-gradient(135deg,var(--dar-green-800),var(--brand-primary)); border-radius: 8px; box-shadow: 0 5px 18px rgba(0,0,0,.15); }
.rem-student-welcome h2 { margin: 0 0 5px; color: #fff; font-size: 22px; }
.rem-student-welcome p { margin: 0; color: var(--brand-primary-contrast); opacity: .82; }
.rem-student-welcome > div:last-child { min-width: 190px; text-align: right; }
.rem-student-welcome span { display: block; color: #cfe3d8; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.rem-student-welcome strong { display: block; margin-top: 2px; font-size: 18px; }
.rem-student-dashboard-lead { margin: -14px 0 20px; color: #65746d; }
.rem-student-summary-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 12px; margin-bottom: 22px; }
.rem-student-summary-card { display: flex; align-items: center; justify-content: space-between; min-width: 0; min-height: 108px; padding: 18px; background: #fff; border: 1px solid #dce5e0; border-top: 3px solid #708178; border-radius: 8px; box-shadow: 0 4px 14px rgba(24,55,42,.06); }
.rem-student-summary-card > div { min-width: 0; }
.rem-student-summary-card span { display: block; min-height: 30px; color: #68786f; font-size: 10px; font-weight: 700; letter-spacing: .045em; line-height: 1.4; text-transform: uppercase; }
.rem-student-summary-card strong { display: block; margin-top: 4px; color: var(--brand-text); font-size: 26px; line-height: 1; }
.rem-student-summary-card > i { flex: 0 0 auto; margin-left: 10px; color: #708178; font-size: 22px; }
.rem-student-summary-primary { border-top-color: var(--brand-primary); }
.rem-student-summary-primary > i { color: var(--brand-primary); }
.rem-student-summary-success { border-top-color: #2f8f63; }
.rem-student-summary-success > i { color: #2f8f63; }
.rem-student-summary-secondary { border-top-color: #718178; }
.rem-student-summary-secondary > i { color: #718178; }
.rem-student-summary-info { border-top-color: #2f7f94; }
.rem-student-summary-info > i { color: #2f7f94; }
.rem-student-summary-warning { border-top-color: #c79617; }
.rem-student-summary-warning > i { color: #c79617; }
.rem-student-dashboard-panels { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.rem-student-dashboard-panel { min-width: 0; overflow: hidden; background: #fff; border: 1px solid #dce5e0; border-radius: 8px; box-shadow: 0 4px 14px rgba(24,55,42,.06); }
.rem-student-dashboard-panel > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 20px; border-bottom: 1px solid #e5ece8; }
.rem-student-dashboard-panel > header > div { display: flex; align-items: flex-start; min-width: 0; gap: 12px; }
.rem-student-dashboard-panel h2 { margin: 0; color: var(--dar-green-900); font-size: 18px; }
.rem-student-dashboard-panel header p { margin: 3px 0 0; color: #718078; font-size: 12px; line-height: 1.4; }
.rem-student-panel-icon { display: inline-grid; flex: 0 0 36px; width: 36px; height: 36px; place-items: center; border-radius: 7px; }
.rem-student-panel-icon-info { color: #206b7d; background: #e6f4f7; }
.rem-student-panel-icon-warning { color: #946c08; background: #fff5d8; }
.rem-student-dashboard-list { padding: 0; margin: 0; list-style: none; }
.rem-student-dashboard-list li { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 16px 20px; border-bottom: 1px solid #edf1ef; }
.rem-student-dashboard-list li:last-child { border-bottom: 0; }
.rem-student-dashboard-item-main { min-width: 0; }
.rem-student-dashboard-item-main > a { display: block; color: var(--brand-primary); font-weight: 700; overflow-wrap: anywhere; }
.rem-student-dashboard-item-main > span, .rem-student-dashboard-item-main > small { display: block; margin-top: 5px; color: #6b7a72; font-size: 12px; line-height: 1.45; }
.rem-student-dashboard-item-main > span i { width: 15px; color: #8a9b92; }
.rem-student-dashboard-list .badge { flex: 0 0 auto; margin-top: 2px; }
.rem-student-dashboard-empty { display: grid; min-height: 170px; place-content: center; padding: 28px 20px; color: #7b8982; text-align: center; }
.rem-student-dashboard-empty i { margin-bottom: 10px; color: #9aaba2; font-size: 28px; }
.rem-student-dashboard-empty p { margin: 0; }
.rem-student-footer { padding: 16px; color: #65746d; background: #fff; border-top: 1px solid #dbe3df; text-align: center; font-size: 12px; }
.rem-student-period-picker { display: grid; grid-template-columns: minmax(260px,560px) auto; align-items: end; gap: 10px; }
.rem-student-period-picker .ds-field { margin: 0; }
.rem-student-narrow { max-width: 720px; }
.rem-student-password-fields { display: grid; gap: 18px; }
.rem-student-portal .rem-details { margin: 0; }
.rem-student-portal .rem-details dt { margin-bottom: 5px; color: #65746d; font-size: 12px; }
.rem-student-portal .rem-details dd { margin: 0; overflow-wrap: anywhere; }
.rem-student-portal .rem-soa .table { min-width: 760px; width: 100%; table-layout: fixed; }
.rem-student-portal .rem-soa .table th, .rem-student-portal .rem-soa .table td { white-space: normal; overflow-wrap: anywhere; }
.rem-drill-schedule { display: block; min-width: 205px; font-size: 12px; line-height: 1.55; }
.rem-drill-state-note { display: block; max-width: 220px; margin-top: 5px; color: #66746d; line-height: 1.35; }
.rem-attempt-shell { overflow: hidden; background: #fff; border: 1px solid #dbe3df; border-radius: 8px; box-shadow: 0 5px 20px rgba(24,55,42,.08); }
.rem-attempt-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 24px; color: var(--brand-primary-contrast); background: linear-gradient(135deg,var(--dar-green-900),var(--brand-primary)); }
.rem-attempt-header p { margin: 0 0 4px; color: #cfe3d8; font-size: 12px; }
.rem-attempt-header h2 { margin: 0; color: #fff; font-size: 21px; }
.rem-attempt-timer { min-width: 150px; padding: 10px 14px; background: rgba(0,0,0,.18); border: 1px solid rgba(255,255,255,.25); border-radius: 6px; text-align: center; }
.rem-attempt-timer span { display: block; margin-bottom: 2px; color: var(--brand-primary-contrast); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .82; }
.rem-attempt-timer strong { display: block; color: #fff; font-size: 28px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.rem-attempt-timer small { display: block; margin-top: 4px; color: var(--brand-primary-contrast); font-size: 9px; letter-spacing: .04em; opacity: .82; }
.rem-attempt-progress { display: flex; justify-content: space-between; gap: 16px; padding: 12px 24px; background: var(--brand-primary-soft); border-bottom: 1px solid #dbe3df; font-size: 13px; }
.rem-attempt-progress span { color: #637168; }
.rem-attempt-question { padding: 26px 24px 20px; }
.rem-attempt-question[hidden] { display: none !important; }
.rem-attempt-question-stage { flex: 1; }
.rem-attempt-question h3 { margin: 0 0 22px; color: var(--brand-text); font-size: 18px; line-height: 1.55; }
.rem-attempt-question h3 > span { display: block; margin-bottom: 5px; color: #65746d; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.rem-attempt-choice { display: flex; align-items: flex-start; gap: 12px; padding: 13px 15px; margin-bottom: 10px; border: 1px solid #d8e1dc; border-radius: 6px; cursor: pointer; line-height: 1.5; transition: border-color .15s,background .15s; }
.rem-attempt-choice:hover { border-color: #69a184; background: #f6faf8; }
.rem-attempt-choice:has(input:checked) { border-color: var(--brand-primary); background: var(--brand-primary-soft); box-shadow: inset 3px 0 var(--brand-primary); }
.rem-attempt-choice input { flex: 0 0 auto; margin-top: 4px; accent-color: var(--brand-primary); }
.rem-attempt-choice span { min-width: 0; overflow-wrap: anywhere; }
.rem-answer-save-state { min-height: 20px; margin: 14px 0 0; color: #607067; font-size: 12px; }
.rem-question-navigator { display: flex; flex-wrap: wrap; gap: 7px; padding: 16px 24px; background: #fafcfb; border-top: 1px solid #e1e8e4; }
.rem-question-number { width: 34px; height: 34px; padding: 0; color: #425249; background: #fff; border: 1px solid #cfd9d3; border-radius: 4px; font-size: 12px; font-weight: 700; }
.rem-question-number.is-answered { color: var(--brand-primary-contrast); background: var(--brand-primary); border-color: var(--brand-primary); }
.rem-question-number.is-current { outline: 3px solid rgba(212,167,44,.38); border-color: #a77f13; }
.rem-attempt-actions { display: flex; gap: 8px; padding: 16px 24px 22px; border-top: 1px solid #e1e8e4; }
.rem-attempt-actions .btn-warning { margin-left: auto; }
.rem-submit-summary { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.rem-submit-summary > div { padding: 18px; background: #f4f7f5; border: 1px solid #dbe3df; border-radius: 6px; text-align: center; }
.rem-submit-summary span { display: block; color: #65746d; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.rem-submit-summary strong { display: block; margin-top: 3px; color: var(--dar-green-900); font-size: 28px; }
.rem-result-summary { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 10px; margin-bottom: 20px; }
.rem-result-summary > div { min-width: 0; padding: 15px 12px; background: #f4f7f5; border: 1px solid #dbe3df; border-radius: 6px; text-align: center; }
.rem-result-summary span { display: block; color: #65746d; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.rem-result-summary strong { display: block; margin-top: 4px; color: var(--dar-green-900); font-size: 21px; overflow-wrap: anywhere; }
.rem-answer-review > h2 { margin: 4px 0 16px; color: var(--dar-green-900); font-size: 19px; }
.rem-review-question-text { margin: 0 0 18px; color: #263d34; font-size: 16px; line-height: 1.6; }
.rem-review-answer-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin: 0; }
.rem-review-answer-grid > div { min-width: 0; padding: 12px; background: #f7f9f8; border: 1px solid #e0e6e3; border-radius: 5px; }
.rem-review-answer-grid dt { margin-bottom: 4px; color: #67766e; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.rem-review-answer-grid dd { margin: 0; overflow-wrap: anywhere; }
.rem-result-explanation { padding: 13px 15px; margin-top: 14px; background: #fff9e8; border-left: 3px solid var(--brand-accent); }
.rem-result-explanation p { margin: 4px 0 0; }
.rem-admin-review-choices { margin: 0 0 18px; padding-left: 34px; }
.rem-admin-review-choices li { padding: 3px 0 3px 5px; }
@media (max-width: 991.98px) {
    .rem-student-header-inner { align-items: stretch; flex-direction: column; padding: 13px 0; }
    .rem-student-nav { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
    .rem-student-summary-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 575.98px) {
    .rem-student-header-inner, .rem-student-page-heading, .rem-student-welcome { align-items: stretch; flex-direction: column; }
    .rem-student-nav { align-items: stretch; flex-direction: column; }
    .rem-student-nav-menu, .rem-student-nav .btn, .rem-student-nav form .btn { width: 100%; }
    .rem-student-nav .btn { justify-content: space-between; text-align: left; }
    .rem-student-nav .dropdown-menu { position: static !important; width: 100%; margin: 4px 0 2px !important; transform: none !important; box-shadow: none; }
    .rem-student-summary-grid, .rem-student-dashboard-panels { grid-template-columns: 1fr; }
    .rem-student-summary-card { min-height: 92px; }
    .rem-student-dashboard-panel > header, .rem-student-dashboard-list li { padding-left: 16px; padding-right: 16px; }
    .rem-student-dashboard-list li { flex-direction: column; }
    .rem-student-period-picker { grid-template-columns: 1fr; }
    .rem-student-welcome > div:last-child { min-width: 0; text-align: left; }
    .rem-attempt-header, .rem-attempt-progress { align-items: stretch; flex-direction: column; }
    .rem-attempt-timer { width: 100%; }
    .rem-attempt-question, .rem-question-navigator { padding-left: 16px; padding-right: 16px; }
    .rem-attempt-actions { flex-wrap: wrap; padding-left: 16px; padding-right: 16px; }
    .rem-attempt-actions .btn-warning { width: 100%; margin-left: 0; order: 3; }
    .rem-exam-main { width: 100%; padding: 0; }
    .rem-exam-mode .rem-attempt-shell { min-height: 100vh; border: 0; border-radius: 0; }
    .rem-exam-entry-card { padding: 24px 18px; }
    .rem-result-summary, .rem-review-answer-grid { grid-template-columns: 1fr; }
}
@media (min-width: 576px) and (max-width: 991.98px) {
    .rem-result-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
.rem-app .main-header .logo-lg { gap: 9px; font-size: 17px; }
.rem-app .main-header .logo-lg img.rem-logo { width: 34px; height: auto; object-fit: contain; }
.rem-app .sidebar-menu .ds-tree-toggle { font: inherit; }
.rem-app .sidebar-menu .menu-open > .ds-tree-toggle { color: #fff; background: rgba(31, 122, 77, .24); border-left-color: var(--dar-gold); }
.rem-app .sidebar-menu .menu-open > .ds-tree-toggle > .fas:first-child,
.rem-app .sidebar-menu .active > .ds-tree-toggle > .fas:first-child { color: #fff; }
.rem-app .sidebar-menu .treeview-menu > li > a { display: flex; align-items: center; gap: 6px; }
.rem-app .sidebar-menu .treeview-menu > li > a > .fa-circle { flex: 0 0 14px; }
.rem-app .sidebar-menu .treeview-menu > li.active > a { background: rgba(31, 122, 77, .18); font-weight: 700; }
.rem-app .sidebar-menu a:focus-visible, .rem-app .ds-tree-toggle:focus-visible { outline: 2px solid var(--dar-gold); outline-offset: -2px; }
.rem-app .rem-welcome { margin-bottom: 24px; overflow-wrap: anywhere; }
.rem-app .rem-welcome h2 { margin: 0 0 8px; font-size: 22px; font-weight: 700; color: var(--dar-green-900); }
.rem-app .rem-welcome p { margin: 0; color: var(--muted); }
.rem-app .budget-summary-card { height: 100%; }
.rem-app .main-header .user-menu .user-header p { overflow-wrap: anywhere; }
.rem-app .rem-filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); align-items: end; gap: 18px; }
.rem-app .select2-container { width: 100% !important; max-width: 100%; }
.rem-app .select2-container--default .select2-selection--single { height: 38px; border: 1px solid #ced4da; border-radius: .25rem; background: #fff; }
.rem-app .select2-container--default .select2-selection--single .select2-selection__rendered { padding-left: 12px; padding-right: 36px; color: #212529; line-height: 36px; }
.rem-app .select2-container--default .select2-selection--single .select2-selection__placeholder { color: #6c757d; }
.rem-app .select2-container--default .select2-selection--single .select2-selection__arrow { width: 34px; height: 36px; }
.rem-app .select2-container--default .select2-selection--single .select2-selection__clear { height: 34px; margin-right: 24px; color: #6c757d; font-size: 20px; }
.rem-app .select2-container--default.select2-container--focus .select2-selection--single,
.rem-app .select2-container--default.select2-container--open .select2-selection--single { border-color: #80bdff; outline: 0; box-shadow: 0 0 0 .2rem rgba(0, 123, 255, .25); }
.rem-app select.is-invalid + .select2 .select2-selection--single { border-color: #dc3545; }
.rem-app select.is-invalid + .select2.select2-container--focus .select2-selection--single { box-shadow: 0 0 0 .2rem rgba(220, 53, 69, .25); }
.select2-container--default .select2-search--dropdown .select2-search__field { border: 1px solid #ced4da; border-radius: .25rem; padding: 8px 10px; }
.select2-dropdown { border-color: #ced4da; box-shadow: 0 8px 20px rgba(15, 81, 50, .14); }
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable { background: var(--brand-primary); color: var(--brand-primary-contrast); }
.rem-app .rem-details { margin: 0; }
.rem-app .rem-details dt { color: var(--muted); font-size: 12px; margin-bottom: 5px; }
.rem-app .rem-details dd { margin: 0; overflow-wrap: anywhere; }
.rem-app .rem-legend { font-size: 16px; font-weight: 700; margin-bottom: 18px; }
.rem-drill-period-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 16px; }
.rem-drill-period-form .form-group, .rem-drill-period-form .ds-field { margin: 0; }
.rem-drill-status { display: flex; flex-wrap: wrap; gap: 6px; }
.rem-drill-instructions { white-space: pre-wrap; overflow-wrap: anywhere; }
.rem-drill-section-title { margin: 0 0 12px; color: var(--dar-green-900); font-size: 17px; font-weight: 700; }
.rem-question-column { min-width: 280px; white-space: normal; }
#drill-questions-table, #question-categories-table, #question-category-summary-table { font-size: 13px; }
#drill-questions-table th, #drill-questions-table td, #question-categories-table th, #question-categories-table td,
#question-category-summary-table th, #question-category-summary-table td { padding: 7px 9px; vertical-align: middle; }
#question-categories-table th:first-child, #question-categories-table td:first-child { min-width: 46px; white-space: nowrap; }
#drill-questions-table .btn, #question-categories-table .btn, #review-drills-table .rem-drill-row-actions .btn, .rem-question-toolbar-actions .btn { padding: 2px 6px; font-size: 11px; line-height: 1.35; }
.rem-question-filter { display: grid; grid-template-columns: minmax(260px,2fr) minmax(190px,1fr) auto; align-items: end; gap: 12px; }
.rem-question-filter .form-group, .rem-question-filter .ds-field { margin: 0; }
.rem-question-category-summary { max-width: 720px; margin-bottom: 18px; }
.rem-resource-filters { display: grid; grid-template-columns: repeat(auto-fit,minmax(190px,1fr)); align-items: end; gap: 14px; }
.rem-resource-filters .form-group, .rem-resource-filters .ds-field { margin: 0; }
.rem-resource-actions { flex-wrap: nowrap; gap: 4px; }
.rem-resource-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,340px),1fr)); gap: 20px; }
.rem-resource-grid > .box { margin-bottom: 0; min-width: 0; }
.rem-resource-description { white-space: pre-wrap; overflow-wrap: anywhere; }
#review-resources-table td, #resource-categories-table td { vertical-align: middle; }
.rem-question-row-actions, .rem-drill-row-actions { flex-wrap: nowrap; gap: 4px; }
.rem-question-row-actions .btn { white-space: nowrap; }
.rem-question-icon-action { display: inline-flex; align-items: center; justify-content: center; width: 27px; min-width: 27px; height: 25px; }
.rem-question-pager { margin-top: 14px; font-size: 13px; }
.rem-question-order-setting { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid #dce3df; font-size: 13px; }
.rem-question-copy { white-space: normal; overflow-wrap: anywhere; }
.rem-question-choices { display: grid; gap: 12px; }
.rem-question-choice { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; align-items: start; padding: 14px; border: 1px solid #dce3df; border-radius: 6px; }
.rem-question-choice.is-correct { border-color: var(--dar-green-700, #28704f); background: #edf7f1; }
.rem-question-choice-label { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--dar-green-900, #164b36); color: #fff; font-weight: 700; }
.rem-question-choice p { margin: 4px 0 8px; white-space: normal; overflow-wrap: anywhere; }
.rem-question-preview-list { display: grid; gap: 16px; }
.rem-question-preview-item { padding: 16px; border: 1px solid #dce3df; border-radius: 6px; font-size: 14px; }
.rem-question-preview-item header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.rem-question-preview-item h3 { margin: 0; color: var(--dar-green-900); font-size: 16px; font-weight: 700; }
.rem-question-preview-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
.rem-question-preview-choice { display: flex; align-items: start; gap: 6px; padding: 8px; border-radius: 4px; overflow-wrap: anywhere; }
.rem-question-preview-choice.is-correct { background: #edf7f1; }
.rem-question-preview-choice .badge { margin-left: auto; }
@media (max-width: 575.98px) {
    .rem-drill-period-form { grid-template-columns: 1fr; }
    .rem-drill-period-form .btn { width: 100%; }
    .rem-question-preview-choices { grid-template-columns: 1fr; }
}
.rem-cash-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 24px; }
.rem-cash-heading h2 { color: var(--dar-green-900); font-size: 24px; font-weight: 700; margin: 0 0 8px; }
.rem-cash-heading p { color: var(--muted); margin: 0; }
.rem-counter-date { color: var(--muted); white-space: nowrap; }
.rem-cash-workspace { display: grid; grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.6fr); gap: 24px; align-items: start; }
.rem-cash-workspace > div { min-width: 0; }
.rem-cash-workspace select { width: 100%; min-width: 0; }
.rem-cash-identity { display: flex; justify-content: space-between; align-items: start; gap: 16px; margin-bottom: 24px; }
.rem-cash-identity h2 { margin: 0 0 8px; font-size: 22px; font-weight: 700; overflow-wrap: anywhere; }
.rem-cash-identity p { color: var(--muted); margin: 4px 0; overflow-wrap: anywhere; }
.rem-cash-totals { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rem-cash-totals > div { padding: 16px; background: #f3f6f4; border-radius: 6px; }
.rem-cash-totals span { display: block; font-size: 13px; margin-bottom: 8px; }
.rem-cash-totals strong { display: block; font-size: 22px; overflow-wrap: anywhere; }
.rem-cash-totals .rem-cash-balance { grid-column: 1 / -1; background: var(--brand-primary); color: var(--brand-primary-contrast); border-left: 5px solid var(--brand-accent); }
.rem-cash-balance strong { font-size: 36px; }
.rem-cash-submit { border-top: 1px solid #dce3df; padding-top: 18px; }
.rem-cash-submit .btn { width: 100%; }
.rem-account-directory { margin-bottom: 24px; }
.rem-account-directory > summary { padding: 16px; border: 1px solid #dce3df; background: white; border-radius: 6px; cursor: pointer; font-weight: 600; }
.rem-counter .box-body { padding: 28px; }
.rem-counter-top { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px; border-bottom: 2px solid var(--dar-green-900); padding-bottom: 24px; }
.rem-counter-student h2 { font-size: 24px; font-weight: 700; margin: 0 0 10px; overflow-wrap: anywhere; }
.rem-counter-student p { margin: 6px 0; color: var(--muted); }
.rem-counter-total { text-align: right; align-self: start; }
.rem-counter-total span { display: block; font-size: 12px; letter-spacing: 0.06em; color: var(--muted); }
.rem-counter-total strong { display: block; font-size: clamp(30px, 3.5vw, 48px); color: var(--dar-green-900); margin-top: 8px; overflow-wrap: anywhere; }
.rem-counter-columns { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px; padding-top: 26px; }
.rem-counter-columns h2 { font-size: 17px; font-weight: 700; margin: 0 0 24px; }
.rem-counter-review .rem-details { grid-template-columns: 1fr 1fr; gap: 28px; }
.rem-counter-payment { border-left: 1px solid #dce3df; padding-left: 28px; min-width: 0; }
.rem-counter-payment .ds-form-grid { grid-template-columns: 1fr; gap: 18px; }
.rem-counter-payment fieldset { min-width: 0; }
.rem-counter-payment input[data-rem-payment-amount], .rem-counter-payment input[data-rem-payment-received] { text-align: right; font-size: 24px; font-weight: 600; height: 54px; }
.rem-counter-change { border-top: 1px solid #dce3df; border-bottom: 1px solid #dce3df; padding: 16px 0; }
.rem-counter-change > span, .rem-counter-change > small { display: block; }
.rem-counter-change output { display: block; text-align: right; font-size: 28px; font-weight: 700; margin: 6px 0; color: var(--dar-green-900); }
.rem-counter-change small { color: var(--muted); font-size: 12px; }
.rem-counter-actions { justify-content: flex-end; flex-wrap: wrap; padding-top: 20px; border-top: 1px solid #dce3df; }
.rem-counter-actions > .btn { flex: 1; }
#rem-student-search .modal-body { overflow-y: auto; }
#rem-student-search .table td { white-space: normal; overflow-wrap: anywhere; }
.rem-simple-cashier .box-body { padding: 28px; }
.rem-simple-cashier-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 24px; }
.rem-simple-cashier-heading h2 { margin: 0 0 6px; color: var(--dar-green-900); font-size: 24px; font-weight: 700; overflow-wrap: anywhere; }
.rem-simple-cashier-heading p { margin: 0; color: var(--muted); }
.rem-simple-cashier-label { margin-bottom: 5px !important; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.rem-student-balance-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 20px; }
.rem-student-balance-summary > div { min-width: 0; padding: 12px 14px; border: 1px solid #dce3df; border-radius: 6px; background: #f8faf9; }
.rem-student-balance-summary span, .rem-student-balance-summary small { display: block; }
.rem-student-balance-summary span { margin-bottom: 5px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.rem-student-balance-summary strong { display: block; margin-bottom: 3px; color: var(--dar-green-900); font-size: clamp(18px, 2vw, 24px); overflow-wrap: anywhere; }
.rem-student-balance-summary small { color: var(--muted); font-size: 11px; }
.rem-student-balance-summary .rem-student-balance-total { border-color: var(--brand-primary); background: var(--brand-primary); }
.rem-student-balance-summary .rem-student-balance-total span, .rem-student-balance-summary .rem-student-balance-total strong, .rem-student-balance-summary .rem-student-balance-total small { color: var(--brand-primary-contrast); }
.rem-current-payment h3 { margin: 0 0 16px; font-size: 18px; font-weight: 700; }
.rem-payment-period-selector { margin: 0 0 28px; padding: 18px; border: 1px solid #dce3df; border-radius: 6px; background: #f8faf9; }
.rem-payment-period-selector h3 { margin: 0 0 16px; font-size: 18px; font-weight: 700; }
.rem-payment-period-form { display: block; }
.rem-payment-period-form .form-group { margin: 0; }
.rem-current-payment { padding-top: 24px; border-top: 1px solid #dce3df; }
.rem-current-payment-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 22px; }
.rem-current-payment-heading h3 { margin-bottom: 5px; }
.rem-current-payment-heading p { margin: 0; color: var(--muted); }
.rem-current-payment-heading > strong { color: var(--dar-green-900); font-size: 22px; white-space: nowrap; }
@media (max-width: 991.98px) {
    .rem-counter-columns { grid-template-columns: 1fr; }
    .rem-counter-payment { border-left: 0; border-top: 1px solid #dce3df; padding: 24px 0 0; }
}
@media (max-width: 575.98px) {
    .rem-simple-cashier .box-body { padding: 18px; }
    .rem-simple-cashier-heading, .rem-current-payment-heading { align-items: stretch; flex-direction: column; }
    .rem-simple-cashier-heading .btn { width: 100%; }
    .rem-student-balance-summary { grid-template-columns: 1fr; }
    .rem-current-payment-heading > strong { white-space: normal; }
    .rem-counter .box-body { padding: 18px; }
    .rem-counter-top { grid-template-columns: 1fr; gap: 20px; }
    .rem-counter-total { text-align: left; padding: 18px; background: var(--brand-primary-soft); border-left: 4px solid var(--brand-accent); }
    .rem-counter-review .rem-details { grid-template-columns: 1fr; }
    #rem-student-search .table-responsive { overflow: visible; }
    #cashier-search-table { min-width: 0; width: 100%; }
    #cashier-search-table thead { display: none; }
    #cashier-search-table tbody { display: block; }
    #cashier-search-table tbody tr { display: grid; gap: 6px; padding: 16px 0; border-bottom: 1px solid #dce3df; }
    #cashier-search-table tbody td { display: block; border: 0; padding: 3px 0; width: auto; }
    #cashier-search-table tbody td:nth-child(2) { order: -1; font-weight: 600; }
    #cashier-search-table tbody td:nth-child(1)::before { content: 'Profile: '; color: var(--muted); }
    #cashier-search-table tbody td:nth-child(3)::before { content: 'Status: '; color: var(--muted); }
    #cashier-search-table tbody td:last-child .btn { width: 100%; margin-top: 6px; }
}
@media (max-width: 1100px) { .rem-cash-workspace { grid-template-columns: 1fr; } }
@media (max-width: 575.98px) { .rem-cash-heading { align-items: start; flex-direction: column; gap: 10px; } .rem-cash-totals { grid-template-columns: 1fr; } .rem-cash-identity { flex-direction: column; } }
/* Avoid carrying the desktop sidebar margin through a mobile resize animation. */
@media (max-width: 767.98px) {
    .rem-app .main-header .navbar, .rem-app .content-wrapper, .rem-app .main-footer { transition: none; }
}
.rem-soa { background: #fff; padding: 28px; border: 1px solid #dce3df; border-radius: 6px; }
.rem-soa-header { display: flex; align-items: center; gap: 20px; border-bottom: 2px solid var(--brand-primary); padding-bottom: 20px; margin-bottom: 24px; }
.rem-soa-header img { width: 90px; height: 90px; object-fit: contain; flex: 0 0 auto; }
.rem-soa-header h2 { font-size: 21px; }
.rem-soa-header h3 { font-size: 19px; }
.rem-soa-header p { margin: 6px 0; }
.rem-app .rem-soa .table { min-width: 760px; width: 100%; table-layout: fixed; }
.rem-app .rem-soa .table th, .rem-app .rem-soa .table td { white-space: normal; overflow-wrap: anywhere; }
.rem-app .rem-soa .table th:nth-child(1) { width: 12%; }
.rem-app .rem-soa .table th:nth-child(2) { width: 17%; }
.rem-app .rem-soa .table th:nth-child(3) { width: 32%; }
.rem-app .rem-soa .table th:nth-child(n+4) { width: 13%; }
.rem-app .rem-soa section > .rem-details + .rem-details { margin-top: 20px; }
.rem-report-period-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 16px; }
.rem-report-period-form .form-group, .rem-report-search-form .form-group { margin: 0; }
.rem-report-search-form { display: grid; grid-template-columns: minmax(240px, 1fr) auto auto; align-items: end; gap: 10px; flex: 1; }
.rem-enrollment-report { padding: 28px; border: 1px solid #dce3df; border-radius: 6px; background: #fff; }
.rem-enrollment-report-header { display: flex; align-items: center; gap: 20px; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 2px solid var(--dar-green-900); }
.rem-enrollment-report-header img { width: 90px; height: 90px; object-fit: contain; flex: 0 0 auto; }

/* SUPERADMIN branding editor and fixed-structure live preview. */
.rem-branding-layout { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(320px,.8fr); gap: 22px; align-items: start; }
.rem-branding-layout .box { margin-bottom: 22px; }
.rem-branding-logo-editor { display: grid; grid-template-columns: 150px minmax(0,1fr); gap: 22px; align-items: center; }
.rem-branding-field-label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 700; }
.rem-branding-current-logo { display: grid; place-items: center; width: 140px; height: 120px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.rem-branding-current-logo img { width: 100%; height: 100%; object-fit: contain; }
.rem-color-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.rem-color-field label { display: block; margin-bottom: 7px; font-weight: 700; }
.rem-color-control { display: grid; grid-template-columns: 48px minmax(0,1fr); gap: 9px; }
.rem-color-control input[type=color] { width: 48px; height: 38px; padding: 2px; border: 1px solid var(--border); border-radius: 4px; background: #fff; cursor: pointer; }
.rem-branding-actions { justify-content: flex-end; margin-bottom: 22px; }
.rem-branding-preview-panel { position: sticky; top: 18px; }
.rem-theme-preview { overflow: hidden; color: var(--preview-text); border: 1px solid #dfe5ea; border-radius: 8px; background: var(--preview-background); }
.rem-theme-preview-nav { display: flex; min-height: 58px; align-items: center; gap: 10px; padding: 9px 12px; color: var(--preview-primary-contrast,#fff); background: var(--preview-primary); border-bottom: 4px solid var(--preview-accent); }
.rem-theme-preview-nav img { width: 38px; height: 38px; object-fit: contain; }
.rem-theme-preview-nav strong { min-width: 0; overflow-wrap: anywhere; }
.rem-theme-preview-shell { display: grid; grid-template-columns: 100px minmax(0,1fr); min-height: 250px; }
.rem-theme-preview-shell nav { display: flex; flex-direction: column; gap: 3px; padding: 12px 8px; color: var(--preview-sidebar-contrast,#fff); background: var(--preview-sidebar); }
.rem-theme-preview-shell nav span { padding: 7px 8px; border-left: 3px solid transparent; border-radius: 3px; font-size: 11px; }
.rem-theme-preview-shell nav .is-active { border-left-color: var(--preview-accent); background: rgba(255,255,255,.12); font-weight: 700; }
.rem-theme-preview-content { min-width: 0; padding: 12px; }
.rem-theme-preview-card { padding: 12px; margin-bottom: 10px; border-top: 3px solid var(--preview-primary); border-radius: 4px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.rem-theme-preview-card p { margin: 5px 0 0; font-size: 11px; }
.rem-theme-preview-buttons { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.rem-theme-preview-buttons button { padding: 6px 8px; color: var(--preview-primary-contrast,#fff); background: var(--preview-primary); border: 1px solid var(--preview-primary); border-radius: 4px; font-size: 10px; }
.rem-theme-preview-buttons button + button { color: var(--preview-secondary-contrast,#fff); background: var(--preview-secondary); border-color: var(--preview-secondary); }
.rem-theme-preview table { width: 100%; background: #fff; font-size: 10px; }
.rem-theme-preview th,.rem-theme-preview td { padding: 6px; border: 1px solid #e2e7ea; }
.rem-theme-preview th { color: var(--preview-primary-contrast,#fff); background: var(--preview-primary); }
@media (max-width: 991.98px) { .rem-branding-layout { grid-template-columns: 1fr; } .rem-branding-preview-panel { position: static; } }
@media (max-width: 575.98px) { .rem-color-grid,.rem-branding-logo-editor { grid-template-columns: 1fr; } .rem-theme-preview-shell { grid-template-columns: 82px minmax(0,1fr); } }
.rem-enrollment-report-header p { margin: 4px 0; }
.rem-enrollment-report-header .rem-enrollment-report-institution { color: var(--dar-green-900); font-size: 21px; font-weight: 700; }
.rem-enrollment-report-header h2 { margin: 10px 0 4px; color: var(--dar-green-900); font-size: 21px; font-weight: 700; letter-spacing: .04em; }
.rem-enrollment-report-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 24px; }
.rem-enrollment-report-summary > div { padding: 14px 16px; border: 1px solid #dce3df; border-radius: 6px; background: #f8faf9; }
.rem-enrollment-report-summary dt { margin-bottom: 6px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.rem-enrollment-report-summary dd { margin: 0; color: var(--dar-green-900); font-size: 20px; font-weight: 700; overflow-wrap: anywhere; }
.rem-report-search-note { margin: 0 0 18px; color: var(--muted); }
.rem-enrollment-report-empty { margin: 0; padding: 28px; border: 1px dashed #b9c7bf; border-radius: 6px; background: #f8faf9; text-align: center; }
.rem-enrollment-report-table { min-width: 900px; margin-bottom: 0; }
.rem-enrollment-report-table th, .rem-enrollment-report-table td { white-space: normal; vertical-align: middle; overflow-wrap: anywhere; }
.rem-enrollment-report-table th:first-child, .rem-enrollment-report-table td:first-child { width: 48px; text-align: center; }
.rem-report-print-only { display: none; }
.rem-analytics-summary { grid-template-columns: repeat(4,minmax(0,1fr)); }
.rem-analytics-summary-six { grid-template-columns: repeat(3,minmax(0,1fr)); }
.rem-analytics-summary-four { grid-template-columns: repeat(4,minmax(0,1fr)); }
#drill-results-table, #question-analysis-table, #category-performance-table, #attempt-category-breakdown-table, #submission-reason-table, #most-missed-table, #drill-comparison-table, #student-drill-progress-table { font-size: 12px; }
#drill-results-table th, #drill-results-table td, #question-analysis-table th, #question-analysis-table td,
#category-performance-table th, #category-performance-table td, #attempt-category-breakdown-table th, #attempt-category-breakdown-table td,
#submission-reason-table th, #submission-reason-table td, #most-missed-table th, #most-missed-table td,
#drill-comparison-table th, #drill-comparison-table td, #student-drill-progress-table th, #student-drill-progress-table td { padding: 6px 8px; vertical-align: middle; }
#question-analysis-table { min-width: 1530px; }
#question-analysis-table td:nth-child(2) { min-width: 260px; white-space: normal; overflow-wrap: anywhere; }
#drill-results-table .btn { padding: 2px 6px; font-size: 11px; line-height: 1.35; }
.rem-drill-report-summary { grid-template-columns: repeat(4,minmax(0,1fr)); }
.rem-drill-report-summary dd { font-size: 15px; }
.rem-drill-report .rem-enrollment-report-print-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.rem-drill-report .rem-enrollment-report-print-table th, .rem-drill-report .rem-enrollment-report-print-table td { padding: 6px 8px; border: 1px solid #c8d2cc; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.rem-drill-report-section-title { margin: 18px 0 8px; color: var(--dar-green-900); font-size: 14px; font-weight: 700; }
.rem-drill-icon-action, .rem-period-icon-action { display: inline-flex; align-items: center; justify-content: center; width: 27px; min-width: 27px; height: 25px; }
.rem-score-report-summary { grid-template-columns: repeat(3,minmax(0,1fr)); }
.rem-score-filter-form { display: grid; grid-template-columns: minmax(260px,2fr) minmax(180px,1fr) auto; align-items: end; gap: 12px; }
.rem-score-filter-form .form-group { margin: 0; }
#drill-score-table { width: max-content; min-width: 100%; font-size: 12px; }
#drill-score-table th, #drill-score-table td { padding: 7px 9px; vertical-align: middle; white-space: nowrap; }
#drill-score-table th:nth-child(2), #drill-score-table td:nth-child(2) { min-width: 210px; white-space: normal; }
.rem-score-profile { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; font-weight: 400; }
.rem-score-student-link, .rem-score-attempt-link { font-weight: 700; text-decoration: none; }
.rem-score-student-link:hover, .rem-score-attempt-link:hover { text-decoration: underline; }
.rem-period-progress-context { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 18px; }
.rem-period-progress-context > div { min-width: 180px; padding: 12px 15px; border: 1px solid #dce5e0; border-radius: 6px; background: #f5f8f6; }
.rem-period-progress-context dt { margin-bottom: 4px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.rem-period-progress-context dd { margin: 0; color: var(--dar-green-900); font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
.rem-period-progress-summary { grid-template-columns: repeat(4,minmax(0,1fr)); }
.rem-student-progress-summary { grid-template-columns: repeat(5,minmax(0,1fr)); }
.rem-period-progress-value { display: grid; min-width: 125px; grid-template-columns: minmax(70px,1fr) auto; align-items: center; gap: 8px; }
.rem-period-progress-value progress { width: 100%; height: 9px; border: 0; border-radius: 999px; overflow: hidden; accent-color: #2f8f63; }
.rem-period-progress-value progress::-webkit-progress-bar { background: #dce5e0; }
.rem-period-progress-value progress::-webkit-progress-value { background: #2f8f63; }
.rem-period-progress-value progress::-moz-progress-bar { background: #2f8f63; }
.rem-period-progress-value strong { min-width: 43px; color: var(--dar-green-900); font-size: 12px; text-align: right; }
.rem-progress-note { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
@media (max-width: 767.98px) {
    .rem-report-period-form, .rem-report-search-form, .rem-enrollment-report-summary, .rem-analytics-summary, .rem-analytics-summary-six, .rem-analytics-summary-four, .rem-score-report-summary, .rem-score-filter-form, .rem-question-filter, .rem-period-progress-summary, .rem-student-progress-summary { grid-template-columns: 1fr; }
    .rem-report-period-form .btn, .rem-report-search-form .btn, .rem-score-filter-form .btn { width: 100%; }
    .rem-enrollment-report { padding: 18px; }
    .rem-enrollment-report-header { align-items: flex-start; flex-direction: column; }
    .rem-period-progress-context { display: grid; grid-template-columns: 1fr; }
    .rem-period-progress-context > div { min-width: 0; }
}
@media (max-width: 575.98px) {
    .rem-soa { padding: 16px; }
    .rem-soa-header { flex-direction: column; align-items: flex-start; }
}
@media print {
    @page { size: A4 portrait; margin: 12mm; }
    body.rem-app { background: white !important; color: black; font-size: 10pt; }
    .rem-app .main-header, .rem-app .main-sidebar, .rem-app .main-footer, .rem-app .content-header,
    .rem-app .skip-link, .rem-app .rem-no-print, .rem-app .modal, .rem-app .ds-sidebar-backdrop { display: none !important; }
    .rem-app .content-wrapper { margin: 0 !important; padding: 0 !important; min-height: 0 !important; }
    .rem-app .content, .rem-app .container-fluid { padding: 0 !important; }
    .rem-comprehensive-exam-report { page: rem-drill-landscape; }
    .rem-comprehensive-exam-attempt-report { page: rem-attempt-portrait; }
    .rem-comprehensive-exam-report .table-responsive, .rem-comprehensive-exam-attempt-report .table-responsive { overflow: visible !important; }
    .rem-comprehensive-exam-report table { width: 100% !important; min-width: 0 !important; font-size: 7pt; }
    .rem-comprehensive-exam-report th, .rem-comprehensive-exam-report td { padding: 3px 4px !important; white-space: normal !important; overflow-wrap: anywhere; }
    #comprehensive-exam-results-table th:last-child, #comprehensive-exam-results-table td:last-child,
    #exam-analytics-students th:last-child, #exam-analytics-students td:last-child,
    #exam-attempt-history th:last-child, #exam-attempt-history td:last-child { display: none !important; }
    .rem-soa { border: 0; padding: 0; box-shadow: none; }
    .rem-soa-header { break-inside: avoid; }
    .rem-soa .table-responsive { overflow: visible !important; max-height: none !important; }
    .rem-soa table { width: 100% !important; min-width: 0 !important; table-layout: fixed; font-size: 8pt; }
    .rem-soa th, .rem-soa td { white-space: normal !important; overflow-wrap: anywhere; padding: 5px !important; }
    .rem-soa thead { display: table-header-group; }
    .rem-soa tr { break-inside: avoid; }
    .rem-soa .ds-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
    .rem-enrollment-report { border: 0; padding: 0; box-shadow: none; }
    .rem-enrollment-report-header { break-inside: avoid; }
    .rem-enrollment-report-header img { width: 72px; }
    .rem-enrollment-report-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; break-inside: avoid; }
    .rem-enrollment-report-summary > div { padding: 8px; border: 1px solid #777; background: #fff; }
    .rem-enrollment-report-summary dt { color: #333; font-size: 8pt; }
    .rem-enrollment-report-summary dd { color: #000; font-size: 11pt; }
    .rem-report-screen-only { display: none !important; }
    .rem-report-print-only { display: block !important; }
    .rem-enrollment-report-header.rem-report-print-only { display: flex !important; }
    .rem-enrollment-report-print-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 9pt; }
    .rem-enrollment-report-print-table th, .rem-enrollment-report-print-table td { padding: 5px 6px; border: 1px solid #777; text-align: left; overflow-wrap: anywhere; }
    .rem-enrollment-report-print-table th:first-child, .rem-enrollment-report-print-table td:first-child { width: 7%; text-align: center; }
    .rem-enrollment-report-print-table th:nth-child(2) { width: 21%; }
    .rem-enrollment-report-print-table th:nth-child(4) { width: 20%; }
    .rem-enrollment-report-print-table thead { display: table-header-group; }
    .rem-enrollment-report-print-table tr { break-inside: avoid; }
    .rem-drill-report { page: rem-drill-landscape; }
    .rem-period-progress-report { page: rem-period-progress-landscape; }
    .rem-attempt-report { page: rem-attempt-portrait; }
    .rem-drill-report-summary { grid-template-columns: repeat(4,minmax(0,1fr)); }
    .rem-drill-report-summary > div { padding: 6px; }
    .rem-drill-report-summary dd { font-size: 9pt; }
    .rem-drill-results-print-table, .rem-question-analysis-print-table, .rem-category-performance-print-table { font-size: 7.5pt; }
    .rem-drill-results-print-table th, .rem-drill-results-print-table td,
    .rem-question-analysis-print-table th, .rem-question-analysis-print-table td { padding: 4px; }
    .rem-drill-results-print-table th:first-child, .rem-drill-results-print-table td:first-child,
    .rem-question-analysis-print-table th:first-child, .rem-question-analysis-print-table td:first-child { width: 4%; }
    .rem-drill-results-print-table th:nth-child(2) { width: 12%; }
    .rem-drill-results-print-table th:nth-child(3) { width: 20%; }
    .rem-drill-results-print-table th:nth-child(4) { width: 7%; }
    .rem-drill-results-print-table th:nth-child(5), .rem-drill-results-print-table th:nth-child(6) { width: 8%; }
    .rem-question-analysis-print-table th:nth-child(2) { width: 34%; }
    .rem-question-analysis-print-table th:nth-child(3) { width: 12%; }
    .rem-category-performance-print-table { margin-bottom: 12px; }
    .rem-drill-score-print-table { table-layout: auto; font-size: 7pt; }
    .rem-drill-score-print-table th, .rem-drill-score-print-table td { padding: 3px 4px; white-space: nowrap; overflow-wrap: normal; }
    .rem-drill-score-print-table th:first-child, .rem-drill-score-print-table td:first-child { width: 4%; }
    .rem-drill-score-print-table th:nth-child(2), .rem-drill-score-print-table td:nth-child(2) { width: 22%; white-space: normal; overflow-wrap: anywhere; }
    .rem-drill-score-print-table th:nth-child(4) { width: auto; }
    .rem-period-progress-print-summary { grid-template-columns: repeat(auto-fit,minmax(120px,1fr)); }
    .rem-period-progress-print-table { table-layout: fixed; font-size: 8pt; }
    .rem-period-progress-print-table th, .rem-period-progress-print-table td { padding: 4px 5px; text-align: center; }
    .rem-period-progress-print-table th:nth-child(2), .rem-period-progress-print-table td:nth-child(2) { width: 25%; text-align: left; white-space: normal; overflow-wrap: anywhere; }
    .rem-attempt-report .rem-result-summary { grid-template-columns: repeat(4,minmax(0,1fr)); }
    .rem-attempt-report .rem-result-summary > div { padding: 7px; border-color: #777; background: #fff; }
    .rem-attempt-report .rem-result-summary strong { color: #000; font-size: 11pt; }
    .rem-attempt-report .card, .rem-attempt-report .box { border: 1px solid #999; box-shadow: none; }
    .rem-attempt-report .table-responsive { overflow: visible !important; }
    .rem-attempt-report #attempt-category-breakdown-table { width: 100%; min-width: 0; table-layout: fixed; font-size: 7.5pt; }
    .rem-attempt-report #attempt-category-breakdown-table th, .rem-attempt-report #attempt-category-breakdown-table td { padding: 4px; white-space: normal; overflow-wrap: anywhere; }
    .rem-attempt-report .rem-answer-review .card, .rem-attempt-report .rem-answer-review .box { break-inside: avoid; }
    .rem-attempt-history { display: none !important; }
}
@page rem-drill-landscape { size: A4 landscape; margin: 10mm; }
@page rem-period-progress-landscape { size: A4 landscape; margin: 10mm; }
@page rem-attempt-portrait { size: A4 portrait; margin: 12mm; }
/* Keep Student Profile identifiers and compact actions readable inside the shared scroll wrapper. */
#profiles-table { min-width: 1120px; }
#profiles-table th,
#profiles-table td:nth-child(1),
#profiles-table td:nth-child(2),
#profiles-table td:nth-child(4),
#profiles-table td:nth-child(5),
#profiles-table td:nth-child(7),
#profiles-table td:nth-child(8),
#profiles-table td:nth-child(9) { white-space: nowrap; }
#profiles-table td:nth-child(3) { min-width: 190px; }
#profiles-table td:nth-child(9) .ds-actions { flex-wrap: nowrap; }

/* Phase 4 OMR scan comparison and optional detection overlay. */
.rem-omr-compare { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:1.25rem; align-items:start; }
.rem-omr-compare h3 { font-size:1rem; font-weight:700; margin:0 0 .75rem; }
.rem-omr-image { position:relative; width:100%; border:1px solid var(--dar-border,#dfe5ea); background:#fff; }
.rem-omr-image img { display:block; width:100%; height:auto; }
.rem-omr-overlay { display:none; position:absolute; inset:0; width:100%; height:100%; pointer-events:none; }
.rem-omr-debug:checked ~ .rem-omr-image .rem-omr-overlay { display:block; }
.rem-omr-review-image { max-width:100%; }
.rem-omr-question-crop { position:relative; width:min(100%,400px); height:65px; overflow:hidden; border:1px solid var(--dar-border,#dfe5ea); background:#fff; }
.rem-omr-question-crop img { position:absolute; max-width:none; height:auto; }
.rem-omr-verify-form { display:flex; gap:.35rem; align-items:center; margin-top:.3rem; }
.rem-omr-verify-form select { min-width:5rem; }

.rem-omr-identity { display:grid; grid-template-columns:max-content minmax(0,1fr); gap:.25rem 1rem; margin:.75rem 0 0; }
.rem-omr-identity dt { font-weight:700; }
.rem-omr-identity dd { margin:0; overflow-wrap:anywhere; }
@media (max-width:900px) { .rem-omr-compare { grid-template-columns:1fr; } }
@media (max-width:480px) { .rem-omr-identity { grid-template-columns:1fr; gap:.1rem; } .rem-omr-identity dd { margin-bottom:.5rem; } }

@media print { .rem-print-hide { display: none !important; } }

@page rem-paper-landscape { size: A4 landscape; margin: 12mm; }
@media print {
    .rem-paper-results { page: rem-paper-landscape; }
    .rem-paper-results > .card:first-child { display: none !important; }
    .rem-paper-results .table-responsive, .rem-paper-result .table-responsive { overflow: visible !important; }
    .rem-paper-results table, .rem-paper-result table { width: 100% !important; font-size: 8pt; }
    .rem-paper-results th, .rem-paper-results td,
    .rem-paper-result th, .rem-paper-result td { padding: 4px !important; white-space: normal !important; }
    .rem-paper-results tr, .rem-paper-result tr { break-inside: avoid; }
}

/* Official paper exam analytics and dedicated report views. */
.rem-sidebar-subheading { padding:.65rem 1rem .2rem 2.4rem; font-size:.72rem; font-weight:700; letter-spacing:.04em; text-transform:uppercase; opacity:.72; }
.rem-paper-analytics-header { display:flex; gap:1rem; align-items:center; padding:1rem 1.2rem; border:1px solid #d7dee5; border-radius:8px; background:#fff; margin-bottom:1rem; }
.rem-paper-analytics-logo, .rem-paper-individual-header img { width:64px; height:64px; object-fit:contain; flex:none; }
.rem-paper-analytics-brand { margin:0; font-weight:700; color:#455468; }
.rem-paper-analytics-header h1, .rem-paper-individual-header h1 { font-size:1.5rem; margin:.15rem 0 .4rem; }
.rem-paper-analytics-header p:last-child { margin-bottom:0; }
.rem-paper-analytics-filters { display:flex; flex-wrap:wrap; gap:.65rem; align-items:end; padding:1rem; border:1px solid #d7dee5; border-radius:8px; background:#fff; margin-bottom:1rem; }
.rem-paper-analytics-filters label { display:flex; flex-direction:column; gap:.2rem; min-width:145px; flex:1 1 145px; font-size:.85rem; font-weight:600; }
.rem-paper-analytics-filters label:nth-child(2), .rem-paper-analytics-filters label:last-of-type { min-width:210px; }
.rem-paper-analytics-actions, .rem-paper-analytics-jump { display:flex; flex-wrap:wrap; gap:.5rem; margin-bottom:1rem; }
.rem-paper-analytics-jump { padding:.65rem 0; border-top:1px solid #d7dee5; border-bottom:1px solid #d7dee5; }
.rem-paper-analytics-jump a { padding:.2rem .5rem; }
.rem-paper-analytics-dashboard section, .rem-paper-analytics-report section { background:#fff; border:1px solid #d7dee5; border-radius:8px; padding:1rem; margin-bottom:1rem; }
.rem-paper-analytics-dashboard section h2, .rem-paper-analytics-report section h2 { font-size:1.1rem; font-weight:700; margin:0 0 .8rem; }
.rem-paper-analytics-subtitle { font-size:1rem; font-weight:700; margin:1rem 0 .5rem; }
.rem-paper-analytics-report section h3 { font-size:1rem; font-weight:700; margin:1rem 0 .6rem; }
.rem-paper-analytics-cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:.6rem; margin-bottom:.8rem; }
.rem-paper-analytics-cards > div { border:1px solid #d7dee5; border-radius:6px; background:#f8fafc; padding:.65rem .8rem; }
.rem-paper-analytics-cards span { display:block; font-size:.79rem; color:#526070; }
.rem-paper-analytics-cards strong { display:block; font-size:1.2rem; color:#182a3b; }
.rem-paper-analytics-table { width:100%; }
.rem-paper-analytics-table th { white-space:nowrap; }
.rem-paper-analytics-meta, .rem-paper-analytics-page { font-size:.82rem; color:#49525c; }
.rem-paper-analytics-page { display:none; }
.rem-paper-individual-header { display:flex; align-items:center; gap:1rem; margin-bottom:1rem; }
.rem-paper-individual-header p { margin:0; }
@page rem-paper-analytics-portrait { size:A4 portrait; margin:12mm; @bottom-right { content:"Page " counter(page) " of " counter(pages); font-size:8pt; } }
@page rem-paper-analytics-landscape { size:A4 landscape; margin:10mm; @bottom-right { content:"Page " counter(page) " of " counter(pages); font-size:8pt; } }
@media print {
    .rem-paper-analytics-report { page:rem-paper-analytics-portrait; color:#000; }
    .rem-paper-analytics-report.rem-paper-analytics-landscape { page:rem-paper-analytics-landscape; }
    .rem-paper-analytics-report .rem-paper-analytics-header, .rem-paper-individual-header { border:0; padding:0; background:#fff; break-inside:avoid; }
    .rem-paper-analytics-report section { border:0; border-radius:0; padding:0; margin:0 0 6mm; background:#fff; break-before:auto; }
    .rem-paper-analytics-report section + section { break-before:page; }
    .rem-paper-analytics-report .rem-paper-analytics-cards > div { border:1px solid #777; background:#fff; }
    .rem-paper-analytics-report .table-responsive { overflow:visible !important; }
    .rem-paper-analytics-report table { width:100% !important; min-width:0 !important; border-collapse:collapse; font-size:8pt; }
    .rem-paper-analytics-report th, .rem-paper-analytics-report td { border:1px solid #777 !important; padding:4px 5px !important; color:#000 !important; white-space:normal !important; overflow-wrap:anywhere; }
    .rem-paper-analytics-report thead { display:table-header-group; }
    .rem-paper-analytics-report tr { break-inside:avoid; }
    .rem-paper-analytics-page { display:block; text-align:right; border-top:1px solid #777; padding-top:2mm; }
    .rem-paper-individual-report { page:rem-paper-analytics-portrait; }
    .rem-paper-individual-report .rem-paper-answers { display:none !important; }
    .rem-paper-individual-report .card { box-shadow:none; border:1px solid #777; break-inside:avoid; }
    .rem-paper-individual-report table th, .rem-paper-individual-report table td { border:1px solid #777; }
}

.rem-app #rem-omr-delete-form[hidden], .rem-app [data-omr-replace-link][hidden] { display: none !important; }

/* Enrollment workflow settings and the existing direct enrollment form. */
.rem-workflow-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.rem-direct-enrollment-fields > .ds-field { min-width: 0; }
.rem-workflow-option { display: flex; align-items: flex-start; gap: .75rem; padding: 1.25rem; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; background: #fff; }
.rem-workflow-option:has(input:checked) { outline: 2px solid var(--brand-primary); outline-offset: -2px; }
.rem-workflow-option input { flex: none; margin-top: .3rem; accent-color: var(--brand-primary); }
.rem-workflow-option strong, .rem-workflow-option span span, .rem-workflow-option small { display: block; }
.rem-workflow-option strong { font-size: 1.05rem; margin-bottom: .5rem; }
.rem-workflow-option span span { font-weight: 400; margin-bottom: .75rem; }
.rem-workflow-option small { color: var(--muted); font-weight: 400; }
@media (max-width: 767px) { .rem-workflow-options { grid-template-columns: 1fr; } }
/* Student paper results reuse the portal cards and semantic status badges. */
.rem-student-exam-tabs { gap: .25rem; }
.rem-student-exam-tabs .nav-link { font-weight: 700; color: var(--brand-primary); }
.rem-student-paper-results > h2, .rem-student-exam-mode-heading { font-size: 1.2rem; margin: 0 0 1rem; }
.rem-student-paper-result .rem-details dd { overflow-wrap: anywhere; }
.rem-student-paper-results .rem-result-summary, .rem-student-paper-result .rem-result-summary { grid-template-columns: repeat(4,minmax(0,1fr)); }
.rem-student-paper-results .rem-result-summary .badge, .rem-student-paper-result .rem-result-summary .badge { display: inline-block; color: #fff; font-size: .85rem; }
.rem-student-paper-counts { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .75rem; margin-bottom: 0; }
.rem-student-paper-counts dt { font-size: .85rem; }
.rem-student-paper-counts dd { font-size: 1.3rem; font-weight: 700; margin-bottom: 0; }
.rem-student-paper-categories { table-layout: fixed; width: 100%; margin-bottom: 0; }
.rem-student-paper-categories th:first-child { width: 46%; overflow-wrap: anywhere; }
.rem-student-paper-categories td { overflow-wrap: anywhere; }
.rem-student-paper-print { background: #fff; color: #111; }
.rem-student-paper-print main { max-width: 186mm; margin: 1.5rem auto; padding: 0 1rem; }
body.rem-student-paper-print .card, body.rem-student-paper-print .box { box-shadow: none; border: 1px solid #777; }
.rem-student-paper-print .rem-result-summary > div { background: #fff; border-color: #777; }
.rem-student-paper-print .rem-result-summary strong, .rem-student-paper-print .rem-result-summary span,
.rem-student-paper-print .table th, .rem-student-paper-print .table td { color: #111; }
.rem-student-paper-print .table th, .rem-student-paper-print .table td { border-color: #777; background: #fff; }
.rem-student-paper-print .badge { color: #111 !important; background: #fff !important; border: 1px solid #777; }
.rem-student-paper-print .rem-enrollment-report-header { border-color: #777; }
.rem-student-paper-print .rem-enrollment-report-header p, .rem-student-paper-print .rem-enrollment-report-header h2 { color: #111; }
.rem-student-paper-print-footer { border-top: 1px solid #777; padding-top: .65rem; font-size: .85rem; }
@media (max-width: 575px) {
    .rem-student-paper-counts { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .rem-student-paper-results .rem-result-summary, .rem-student-paper-result .rem-result-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .rem-student-exam-tabs .nav-link { padding: .6rem .7rem; }
}
@page rem-student-paper-portrait { size: A4 portrait; margin: 12mm; }
@media print {
    .rem-student-paper-print { page: rem-student-paper-portrait; }
    .rem-student-paper-print main { max-width: none; margin: 0; padding: 0; }
    .rem-student-paper-print .rem-enrollment-report-header { display: flex !important; break-inside: avoid; }
    .rem-student-paper-print .rem-details { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .rem-student-paper-print .rem-result-summary, .rem-student-paper-print .rem-student-paper-counts { grid-template-columns: repeat(4,minmax(0,1fr)); break-inside: avoid; }
    .rem-student-paper-print .table-responsive { overflow: visible !important; }
    .rem-student-paper-print .table { min-width: 0; font-size: 10pt; }
    .rem-student-paper-print .table th, .rem-student-paper-print .table td { white-space: normal; }
    .rem-student-paper-print thead { display: table-header-group; }
    .rem-student-paper-print tr { break-inside: avoid; }
    .rem-student-paper-print .box-title { break-after: avoid; }
}

/* Superadmin System Maintenance: isolated destructive action and accessible summary. */
.rem-reset-danger { padding: 1.5rem; border: 2px solid #b42318; border-radius: .65rem; background: #fff; color: #23313d; max-width: 58rem; }
.rem-reset-danger h2 { font-size: 1.5rem; }
.rem-reset-counts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem 1.25rem; }
.rem-reset-counts > div { border-bottom: 1px solid #dfe5ea; padding: .4rem 0; }
.rem-reset-counts dd { margin: .2rem 0; font-size: 1.2rem; }
.rem-reset-modal .ds-actions { flex-wrap: wrap; }
.rem-reset-modal .modal-body { overflow-wrap: anywhere; }
@media (max-width: 480px) { .rem-reset-counts { grid-template-columns: 1fr; } .rem-reset-danger { padding: 1rem; } .rem-reset-modal .btn { white-space: normal; } }
