/* TUPS CBT independent visual theme
   Palette: midnight navy #02071a, neon cyan #03cdff, existing greys and white.
   Loaded after page stylesheets; presentation only, no application logic changes. */
:root{
  --tups-navy:#02071a;
  --tups-navy-2:#07132d;
  --tups-cyan:#03cdff;
  --tups-cyan-soft:#e7faff;
  --tups-white:#ffffff;
  --tups-ink:#171923;
  --tups-muted:#77727a;
  --tups-line:#d9d6d9;
  --tups-glow:0 0 0 1px rgba(3,205,255,.20),0 7px 22px rgba(3,205,255,.16),0 2px 7px rgba(2,7,26,.08);
  --lbis-maroon:var(--tups-cyan);
  --lbis-maroon-dark:#00a9d4;
  --lbis-maroon-deep:var(--tups-navy);
  --lbis-maroon-soft:var(--tups-cyan-soft);
  --lbis-focus:rgba(3,205,255,.28);
  --brand-maroon:var(--tups-cyan);
  --brand-maroon-dark:#00a9d4;
  --brand-soft:var(--tups-cyan-soft);
  --t-maroon:var(--tups-cyan);
  --t-maroon-dark:#00a9d4;
  --t-maroon-deep:var(--tups-navy);
  --t-soft:var(--tups-cyan-soft);
  --t-dark:var(--tups-navy);
  --t-dark-2:#07132b;
  --t-dark-3:#101c36;
}
html{color-scheme:light}
body{accent-color:var(--tups-cyan)}
/* Shared login and landing pages */
body:not(.admin-body):not(.teacher-body):not(.dashboard-body):not(.student-dashboard-page):not(.exam-room-page){
  background:#f5f4f5;
  color:var(--tups-ink);
}
.page-shell{background:#f5f4f5!important}
.login-panel,.device-message__panel{
  background:#fff!important;
  border-color:var(--tups-line)!important;
  border-top:5px solid var(--tups-cyan)!important;
  box-shadow:var(--tups-glow)!important;
}
.school-mark{background:var(--tups-navy)!important;color:#fff!important;border:2px solid var(--tups-cyan)}
h1{color:var(--tups-ink)}
.school-name,.field-help,footer{color:#77727a}
label{color:#41434c}
input,select,textarea{color:#171923}
input:focus,select:focus,textarea:focus,button:focus-visible{
  outline:3px solid rgba(3,205,255,.28)!important;
  outline-offset:2px;
  border-color:var(--tups-cyan)!important;
}
button:not(.button-secondary){
  background:var(--tups-cyan);
  border-color:var(--tups-cyan);
  color:var(--tups-navy);
  font-weight:800;
}
button:not(.button-secondary):hover{
  background:#00b8e6;
  border-color:#00b8e6;
  color:var(--tups-navy);
}
button.button-secondary,.back-link{color:var(--tups-navy);border-color:var(--tups-cyan)}
button.button-secondary:hover{background:var(--tups-cyan-soft);border-color:var(--tups-cyan)}
.back-link{font-weight:700}
/* Admin dashboard: retain the existing grey workspace; replace dark sidebar and maroon accents. */
body.admin-body .sidebar{background:var(--tups-navy)!important;color:#fff}
body.admin-body .brand-mark{background:var(--tups-cyan)!important;color:var(--tups-navy)!important}
body.admin-body .brand small,body.admin-body .sidebar-caption{color:#a9efff!important}
body.admin-body .nav-button{color:#e9faff!important}
body.admin-body .nav-button span{color:var(--tups-cyan)!important}
body.admin-body .nav-button:hover,body.admin-body .nav-button.active{background:#102746!important;color:#fff!important}
body.admin-body .nav-button.active{box-shadow:inset 3px 0 var(--tups-cyan)!important}
body.admin-body .logout-button{border-color:rgba(3,205,255,.65);color:#fff}
body.admin-body .topbar{background:#fff;color:var(--tups-ink)}
body.admin-body .topbar-label,body.admin-body .eyebrow{color:#007fa3!important}
body.admin-body .topbar h1{color:var(--tups-ink)!important}
body.admin-body .avatar{background:var(--tups-cyan-soft)!important;color:var(--tups-navy)!important}
body.admin-body .role-pill{background:var(--tups-cyan-soft)!important;color:#005b78!important}
body.admin-body .primary-button,body.admin-body .topbar-signout{
  background:var(--tups-cyan)!important;border-color:var(--tups-cyan)!important;color:var(--tups-navy)!important
}
body.admin-body .primary-button:hover,body.admin-body .topbar-signout:hover{background:#00b8e6!important;border-color:#00b8e6!important}
body.admin-body .secondary-button{background:#fff!important;color:var(--tups-navy)!important;border-color:var(--tups-cyan)!important}
body.admin-body .shortcut-card b{background:var(--tups-cyan-soft)!important;color:#00627f!important}
body.admin-body .shortcut-card:hover{border-color:var(--tups-cyan)!important;box-shadow:var(--tups-glow)!important}
body.admin-body .form-grid input:focus,body.admin-body .form-grid select:focus,body.admin-body .teacher-reset-form input:focus{outline:3px solid rgba(3,205,255,.24)!important;border-color:var(--tups-cyan)!important}
body.admin-body .security-note{border-left-color:var(--tups-cyan)!important}
body.admin-body .student-modal-card{border-top-color:var(--tups-cyan)!important}
body.admin-body .results-score-strip>div{background:var(--tups-cyan-soft)!important}
body.admin-body .results-score-strip strong{color:#00627f!important}
body.admin-body .results-release-control button.danger-button{color:#9d263e!important}
body.admin-body .teacher-role-form{border-left-color:var(--tups-cyan)!important;background:#fff!important}
body.admin-body .role-change-button{color:#00627f!important;border-color:var(--tups-cyan)!important}
/* Teacher dashboard */
body.teacher-body .teacher-sidebar{background:var(--tups-navy)!important;color:#fff}
body.teacher-body .teacher-brand-mark{background:var(--tups-cyan)!important;color:var(--tups-navy)!important}
body.teacher-body .teacher-brand small,body.teacher-body .sidebar-label{color:#a9efff!important}
body.teacher-body .teacher-nav-button{color:#e9faff!important}
body.teacher-body .teacher-nav-button span{color:var(--tups-cyan)!important}
body.teacher-body .teacher-nav-button:hover{background:#102746!important;color:#fff!important}
body.teacher-body .teacher-nav-button.active{background:#102746!important;color:#fff!important;box-shadow:inset 3px 0 var(--tups-cyan)!important}
body.teacher-body .teacher-help{background:#07132d!important;border-color:#24415b!important}
body.teacher-body .teacher-topbar{background:var(--tups-navy)!important;color:#fff}
body.teacher-body .topbar-kicker{color:#a9efff!important}
body.teacher-body .teacher-avatar{background:var(--tups-cyan)!important;color:var(--tups-navy)!important}
body.teacher-body .teacher-eyebrow{color:#007fa3!important}
body.teacher-body .teacher-role-pill{background:var(--tups-cyan-soft)!important;color:#005b78!important;border-color:#b5efff!important}
body.teacher-body .teacher-action-card:hover{border-color:var(--tups-cyan)!important;box-shadow:var(--tups-glow)!important}
body.teacher-body .action-icon,.teacher-body .empty-state-icon{background:var(--tups-cyan-soft)!important;color:#00627f!important}
body.teacher-body .teacher-action-card em,body.teacher-body .teacher-process-grid article>span{color:#007fa3!important}
body.teacher-body .teacher-notice-info{background:var(--tups-cyan-soft)!important;border-color:#b5efff!important;color:#263d48!important}
body.teacher-body .teacher-notice-info strong{color:#005b78!important}
body.teacher-body .teacher-table-card th{background:var(--tups-navy)!important;color:#fff!important}
body.teacher-body .teacher-primary-button{background:var(--tups-cyan)!important;border-color:var(--tups-cyan)!important;color:var(--tups-navy)!important}
body.teacher-body .teacher-primary-button:hover{background:#00b8e6!important}
body.teacher-body .teacher-secondary-button{color:var(--tups-navy)!important;border-color:var(--tups-cyan)!important}
body.teacher-body .teacher-field input:focus,body.teacher-body .teacher-field select:focus{border-color:var(--tups-cyan)!important;box-shadow:0 0 0 3px rgba(3,205,255,.18)!important}
body.teacher-body .teacher-results-stat-grid strong,body.teacher-body .teacher-result-score-strip strong{color:#00627f!important}
body.teacher-body .teacher-result-score-strip>div{background:var(--tups-cyan-soft)!important}
body.teacher-body .teacher-topbar .teacher-top-logout,
body.teacher-body .teacher-topbar .teacher-top-logout:hover{background:var(--tups-cyan)!important;border-color:var(--tups-cyan)!important;color:var(--tups-navy)!important}
/* Staff / platform workspace */
body.dashboard-body .dashboard-header{background:var(--tups-navy)!important;color:#fff}
body.dashboard-body .dashboard-brand__mark{background:var(--tups-cyan)!important;color:var(--tups-navy)!important}
body.dashboard-body .dashboard-brand small,body.dashboard-body .connection-indicator{color:#c9f5ff!important}
body.dashboard-body .sign-out-button,body.dashboard-body .switch-dashboard-button{
  background:var(--tups-cyan)!important;border-color:var(--tups-cyan)!important;color:var(--tups-navy)!important
}
body.dashboard-body .sign-out-button:hover,body.dashboard-body .switch-dashboard-button:hover{background:#00b8e6!important}
body.dashboard-body .eyebrow{color:#007fa3!important}
body.dashboard-body .role-chip,body.dashboard-body .card-icon{background:var(--tups-cyan-soft)!important;color:#005b78!important}
body.dashboard-body .card-status{color:#007fa3!important}
body.dashboard-body .workspace-card{box-shadow:var(--tups-glow)!important}
body.dashboard-body .workspace-card:hover{border-color:var(--tups-cyan)}
/* Student dashboard: midnight page canvas, white cards, readable dark card text. */
body.student-dashboard-page{background:var(--tups-navy)!important;color:#fff}
.student-topbar{background:var(--tups-navy)!important;border-bottom:1px solid #17314b!important;color:#fff}
.student-brand,.student-brand strong{color:#fff!important}
.student-brand small{color:#a9efff!important}
.student-brand-mark{background:var(--tups-cyan)!important;color:var(--tups-navy)!important}
.student-logout, .refresh-button{background:#fff!important;color:var(--tups-navy)!important;border-color:var(--tups-cyan)!important}
.student-logout:hover,.refresh-button:hover{background:var(--tups-cyan-soft)!important}
.student-welcome,.summary-card,.examinations-section,.exam-card,.student-results-section,.student-result-card,.student-result-subject-row,.student-result-detail,.student-answer-item{
  background:#fff!important;color:var(--tups-ink)!important;box-shadow:var(--tups-glow)!important
}
.student-welcome{border-top-color:var(--tups-cyan)!important}
.student-dashboard-page .eyebrow,.student-result-stats strong,.student-result-view-button{color:#00627f!important}
.student-class-card,.student-result-stats div{background:var(--tups-cyan-soft)!important}
.student-class-card strong{color:#005b78!important}
.student-section-actions #student-results-button,.student-result-view-button{
  background:var(--tups-cyan)!important;border-color:var(--tups-cyan)!important;color:var(--tups-navy)!important
}
.student-section-actions #student-results-button:hover,.student-result-view-button:hover{background:#00b8e6!important}
.student-section-actions #refresh-examinations{background:var(--tups-navy)!important;border-color:var(--tups-navy)!important;color:#fff!important}
.student-answer-review-heading{color:#007fa3!important}
.student-answer-response.incorrect{color:#a32235!important}
/* Examination room: preserve white reading surfaces and neutral greys; use TUPS accents. */
.exam-topbar{background:var(--tups-navy)!important;border-bottom-color:#17314b!important;color:#fff}
.exam-brand,.exam-brand strong{color:#fff!important}
.exam-brand small{color:#a9efff!important}
.exam-brand-mark{background:var(--tups-cyan)!important;color:var(--tups-navy)!important}
.exam-timer-wrap{background:#fff!important}
.exam-timer-wrap strong{color:#005b78!important}
.exam-exit{background:var(--tups-cyan)!important;border-color:var(--tups-cyan)!important;color:var(--tups-navy)!important}
.exam-panel,.exam-heading,.question-panel,.navigator-panel,.theory-stage,.theory-question-card,.candidate-identity-card,.submit-dialog-card{
  background:#fff!important;color:var(--tups-ink)!important;box-shadow:var(--tups-glow)!important
}
.exam-panel,.exam-heading{border-top-color:var(--tups-cyan)!important}
.exam-heading .eyebrow,.question-topline,.theory-question-card .question-topline{color:#007fa3!important}
.loading-mark,.result-mark,.state-icon,.exam-progress-card,#question-marks,.candidate-identity-icon{
  background:var(--tups-cyan-soft)!important;color:#005b78!important
}
.exam-progress-card strong{color:#005b78!important}
.progress-track span{background:var(--tups-cyan)!important}
.answer-option:hover{border-color:var(--tups-cyan)!important;background:#f3fcff!important}
.answer-option.selected{border-color:var(--tups-cyan)!important;background:var(--tups-cyan-soft)!important;box-shadow:inset 0 0 0 1px var(--tups-cyan)!important}
.answer-option.selected .option-letter{border-color:var(--tups-cyan)!important;background:var(--tups-cyan)!important;color:var(--tups-navy)!important}
.question-number.current{outline-color:var(--tups-cyan)!important;border-color:var(--tups-cyan)!important;color:#005b78!important}
.legend-dot.current{border-color:var(--tups-cyan)!important;background:var(--tups-cyan-soft)!important}
.submit-exam-button,.exam-state-panel button,.exam-result button,.theory-submit-row button{
  background:var(--tups-cyan)!important;border-color:var(--tups-cyan)!important;color:var(--tups-navy)!important
}
.submit-exam-button:hover,.theory-submit-row button:hover{background:#00b8e6!important}
.question-actions .button-secondary,.dialog-actions .button-secondary{color:var(--tups-navy)!important;border-color:var(--tups-cyan)!important}
.theory-question-card{border-left-color:var(--tups-cyan)!important}
.theory-answer-input:focus{outline:2px solid rgba(3,205,255,.25)!important;border-color:var(--tups-cyan)!important}
.exam-result-mark{background:var(--tups-cyan-soft)!important}
.exam-room-page .exam-footer{color:#d7eaf0}
/* White cards throughout: clear black text with subtle cyan glow, while preserving semantic status colours. */
.admin-body .stat-card,.admin-body .table-card,.admin-body .form-card,.admin-body .security-note,.admin-body .shortcut-card,
.teacher-body .teacher-info-card,.teacher-body .teacher-action-card,.teacher-body .teacher-table-card,.teacher-body .teacher-form-card,.teacher-body .teacher-google-card,.teacher-body .teacher-results-filter-card,.teacher-body .teacher-results-stat-grid article,
.dashboard-body .profile-strip,.dashboard-body .workspace-card,
.student-dashboard-page .student-welcome,.student-dashboard-page .summary-card,.student-dashboard-page .examinations-section,.student-dashboard-page .exam-card,
.exam-room-page .exam-panel,.exam-room-page .exam-heading,.exam-room-page .question-panel,.exam-room-page .navigator-panel,.exam-room-page .theory-stage,.exam-room-page .theory-question-card{
  box-shadow:var(--tups-glow)!important
}
.admin-body .table-card,.admin-body .form-card,.admin-body .stat-card,.admin-body .security-note,.admin-body .shortcut-card,
.teacher-body .teacher-info-card,.teacher-body .teacher-action-card,.teacher-body .teacher-table-card,.teacher-body .teacher-form-card,.teacher-body .teacher-google-card,
.dashboard-body .profile-strip,.dashboard-body .workspace-card{background:#fff}
@media(prefers-reduced-motion:no-preference){
  .primary-button,.secondary-button,.nav-button,.teacher-nav-button,.shortcut-card,.teacher-action-card{transition:background .15s ease,border-color .15s ease,box-shadow .15s ease,color .15s ease}
}


/* TUPS Platform Control Centre */
.admin-layout.platform-mode .platform-only{display:block}
.admin-layout.platform-mode nav.platform-only{display:grid}
.admin-layout.platform-mode .workspace-only{display:none!important}
.admin-layout.workspace-mode .platform-only{display:none!important}
.admin-layout.workspace-mode .workspace-only{display:block}
.admin-layout.workspace-mode nav.workspace-only{display:grid}
.platform-hero{
 display:flex;align-items:flex-start;justify-content:space-between;gap:24px;
 margin:0 0 22px;padding:28px 30px;border:1px solid #b5efff;border-left:5px solid #03cdff;
 border-radius:12px;background:#fff;box-shadow:var(--tups-glow)
}
.platform-hero h2{margin:0;color:#02071a;font-size:clamp(24px,3vw,32px)}
.platform-hero p:not(.eyebrow){max-width:720px;margin:9px 0 0;color:#555b66;font-size:13px;line-height:1.65}
.platform-hero .eyebrow{color:#007fa3!important}
.platform-status-pill{flex:0 0 auto;padding:8px 12px;border:1px solid #9cecff;border-radius:30px;background:#e7faff;color:#005b78;font-size:10px;font-weight:900;letter-spacing:.6px}
.platform-stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px;margin:18px 0 24px}
.platform-stat-grid .stat-card{min-height:110px;border-top:3px solid #03cdff;background:#fff;box-shadow:var(--tups-glow)}
.platform-stat-grid .stat-card strong{color:#02071a;font-size:28px}
.platform-action-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:0 0 30px}
.platform-action-card{min-height:180px;display:flex;flex-direction:column;align-items:flex-start;gap:9px;padding:21px;border:1px solid #d9e8ee;border-radius:11px;background:#fff;color:#171923;text-align:left;cursor:pointer;box-shadow:var(--tups-glow);transition:transform .15s,border-color .15s,box-shadow .15s}
.platform-action-card:hover{transform:translateY(-2px);border-color:#03cdff;box-shadow:0 0 0 1px rgba(3,205,255,.35),0 12px 28px rgba(3,205,255,.2)}
.platform-action-card>span{width:38px;height:38px;display:grid;place-items:center;border-radius:9px;background:#e7faff;color:#00627f;font-size:19px;font-weight:900}
.platform-action-card strong{color:#02071a;font-size:15px}
.platform-action-card small{color:#69717d;font-size:11px;line-height:1.6}
.platform-action-card b{margin-top:auto;color:#007fa3;font-size:11px}
.platform-selection-note{align-self:center;color:#69717d;font-size:12px;line-height:1.6}
#school-admin-create-wrap[hidden]{display:none!important}
#school-admin-create-wrap .form-card{margin-top:14px}
#school-admin-create-wrap .section-title h3{color:#02071a!important}
#panel-platform-staff .form-card h4{margin:0 0 18px;color:#02071a;font-size:16px}
.platform-mode .sidebar .brand-mark{font-size:11px}
.platform-mode .sidebar .nav-button{white-space:normal}
.platform-mode .platform-return-button{display:none}
.admin-body .platform-stat-grid .stat-card>span{color:#66717f}
.admin-body .platform-action-card:focus-visible{outline:3px solid rgba(3,205,255,.35);outline-offset:3px}
@media(max-width:1050px){.platform-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.platform-action-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.platform-hero{align-items:flex-start;flex-direction:column;padding:22px}.platform-action-grid{grid-template-columns:1fr}.platform-stat-grid{gap:10px}.platform-stat-grid .stat-card{padding:15px}}


/* ==========================================================
   TUPS CBT — unified visual system across every portal
   Shared rules are intentionally loaded after each page's
   legacy stylesheet so the TUPS palette wins consistently.
   ========================================================== */
:root{
  --tups-canvas:#f2f5f8;
  --tups-card:#ffffff;
  --tups-border:#dce5eb;
  --tups-text:#17212b;
  --tups-subtext:#647382;
  --tups-radius:12px;
  --tups-card-shadow:0 5px 18px rgba(2,7,26,.07),0 1px 3px rgba(2,7,26,.05);
}
body.admin-body,
body.teacher-body,
body.dashboard-body,
body.student-dashboard-page,
body.exam-room-page{
  color:var(--tups-text);
}
body.admin-body,
body.teacher-body,
body.dashboard-body,
body.exam-room-page{
  background:var(--tups-canvas)!important;
}
body.admin-body .admin-layout,
body.teacher-body .teacher-layout,
body.dashboard-body #dashboard-shell,
body.exam-room-page .exam-shell{
  background:var(--tups-canvas);
}
/* All authenticated portals share the same midnight navigation/header. */
body.admin-body .sidebar,
body.teacher-body .teacher-sidebar,
body.dashboard-body .dashboard-header,
body.student-dashboard-page .student-topbar,
body.exam-room-page .exam-topbar{
  background:var(--tups-navy)!important;
  color:#fff!important;
  border-color:#17314b!important;
}
body.admin-body .topbar,
body.teacher-body .teacher-topbar{
  background:var(--tups-navy)!important;
  color:#fff!important;
  border-bottom:1px solid #17314b!important;
  box-shadow:0 3px 14px rgba(2,7,26,.12);
}
body.admin-body .topbar h1,
body.admin-body .topbar-label,
body.admin-body .topbar .eyebrow,
body.teacher-body .teacher-topbar h1,
body.teacher-body .topbar-kicker{
  color:#fff!important;
}
body.admin-body .topbar-label,
body.teacher-body .topbar-kicker{
  color:#a9efff!important;
}
body.admin-body .topbar,
body.teacher-body .teacher-topbar,
body.dashboard-body .dashboard-header,
body.student-dashboard-page .student-topbar,
body.exam-room-page .exam-topbar{
  min-height:72px;
}
/* Unified white content surfaces and consistent depth. */
body.admin-body .stat-card,
body.admin-body .table-card,
body.admin-body .form-card,
body.admin-body .security-note,
body.admin-body .shortcut-card,
body.admin-body .platform-hero,
body.admin-body .platform-action-card,
body.teacher-body .teacher-welcome,
body.teacher-body .teacher-info-card,
body.teacher-body .teacher-action-card,
body.teacher-body .teacher-table-card,
body.teacher-body .teacher-form-card,
body.teacher-body .teacher-google-card,
body.teacher-body .teacher-results-filter-card,
body.teacher-body .teacher-results-stat-grid article,
body.dashboard-body .profile-strip,
body.dashboard-body .workspace-card,
body.student-dashboard-page .student-welcome,
body.student-dashboard-page .summary-card,
body.student-dashboard-page .examinations-section,
body.student-dashboard-page .exam-card,
body.student-dashboard-page .student-results-section,
body.student-dashboard-page .student-result-card,
body.exam-room-page .exam-panel,
body.exam-room-page .exam-heading,
body.exam-room-page .question-panel,
body.exam-room-page .navigator-panel,
body.exam-room-page .theory-stage,
body.exam-room-page .theory-question-card{
  background:var(--tups-card)!important;
  color:var(--tups-text)!important;
  border-color:var(--tups-border);
  border-radius:var(--tups-radius);
  box-shadow:var(--tups-card-shadow)!important;
}
/* A single accent treatment for primary actions and interactive states. */
body.admin-body .primary-button,
body.admin-body .topbar-signout,
body.teacher-body .teacher-primary-button,
body.teacher-body .teacher-top-logout,
body.dashboard-body .sign-out-button,
body.dashboard-body .switch-dashboard-button,
body.student-dashboard-page .student-section-actions #student-results-button,
body.student-dashboard-page .student-result-view-button,
body.exam-room-page .submit-exam-button,
body.exam-room-page .exam-exit,
body.exam-room-page .exam-state-panel button,
body.exam-room-page .exam-result button,
body.exam-room-page .theory-submit-row button{
  background:var(--tups-cyan)!important;
  border-color:var(--tups-cyan)!important;
  color:var(--tups-navy)!important;
  font-weight:800;
}
body.admin-body .secondary-button,
body.teacher-body .teacher-secondary-button,
body.student-dashboard-page .student-logout,
body.student-dashboard-page .refresh-button,
body.exam-room-page .question-actions .button-secondary,
body.exam-room-page .dialog-actions .button-secondary{
  background:#fff!important;
  border:1px solid var(--tups-cyan)!important;
  color:var(--tups-navy)!important;
}
body.admin-body button:focus-visible,
body.teacher-body button:focus-visible,
body.dashboard-body button:focus-visible,
body.student-dashboard-page button:focus-visible,
body.exam-room-page button:focus-visible,
body.admin-body input:focus,
body.admin-body select:focus,
body.teacher-body input:focus,
body.teacher-body select:focus,
body.dashboard-body input:focus,
body.dashboard-body select:focus,
body.student-dashboard-page input:focus,
body.exam-room-page textarea:focus{
  outline:3px solid rgba(3,205,255,.25)!important;
  outline-offset:2px;
  border-color:var(--tups-cyan)!important;
}
/* Keep data tables legible and consistent in every management workspace. */
body.admin-body table thead th,
body.teacher-body .teacher-table-card thead th{
  background:var(--tups-navy)!important;
  color:#fff!important;
}
body.admin-body table,
body.teacher-body .teacher-table-card table{
  border-color:var(--tups-border);
}
body.admin-body table tbody tr:nth-child(even),
body.teacher-body .teacher-table-card tbody tr:nth-child(even){
  background:#f6f9fb;
}
/* Student dashboard uses the same light work canvas as staff portals. */
body.student-dashboard-page{
  background:var(--tups-canvas)!important;
  color:var(--tups-text)!important;
}
body.student-dashboard-page .student-topbar{
  box-shadow:0 3px 14px rgba(2,7,26,.12);
}
body.student-dashboard-page .student-brand,
body.student-dashboard-page .student-brand strong,
body.exam-room-page .exam-brand,
body.exam-room-page .exam-brand strong{
  color:#fff!important;
}
body.student-dashboard-page .student-welcome,
body.student-dashboard-page .summary-card,
body.student-dashboard-page .examinations-section,
body.student-dashboard-page .exam-card,
body.student-dashboard-page .student-results-section{
  border:1px solid var(--tups-border)!important;
}
/* Shared content typography and spacing. */
body.admin-body .panel-view h2,
body.admin-body .panel-view h3,
body.teacher-body .teacher-panel h2,
body.teacher-body .teacher-panel h3,
body.dashboard-body .workspace-card h2,
body.dashboard-body .workspace-card h3,
body.student-dashboard-page h2,
body.student-dashboard-page h3{
  color:var(--tups-navy);
}
body.admin-body .panel-view p,
body.teacher-body .teacher-panel p,
body.dashboard-body .workspace-card p,
body.student-dashboard-page .student-welcome p{
  line-height:1.55;
}
body.admin-body input,
body.admin-body select,
body.admin-body textarea,
body.teacher-body input,
body.teacher-body select,
body.teacher-body textarea,
body.dashboard-body input,
body.dashboard-body select,
body.dashboard-body textarea,
body.student-dashboard-page input,
body.student-dashboard-page select,
body.student-dashboard-page textarea{
  border-color:var(--tups-border);
  border-radius:8px;
}
@media(max-width:760px){
  body.admin-body .topbar,
  body.teacher-body .teacher-topbar{min-height:64px}
}


/* Final canvas normalization: override older page-specific workspace colours. */
body.teacher-body,
body.teacher-body .teacher-layout,
body.teacher-body .teacher-main,
body.teacher-body .teacher-content,
body.admin-body .admin-layout,
body.dashboard-body,
body.dashboard-body #dashboard-shell,
body.exam-room-page{
  background-color:var(--tups-canvas)!important;
}
body.teacher-body .teacher-panel{background:transparent!important}


/* Contrast correction: text on white dashboard surfaces must remain dark.
   This is shared by the Platform, Admin, Teacher, Staff and Student portals. */
body.admin-body .platform-hero,
body.admin-body .platform-stat-grid .stat-card,
body.admin-body .platform-action-card,
body.admin-body .table-card,
body.admin-body .form-card,
body.admin-body .stat-card,
body.admin-body .security-note,
body.admin-body .shortcut-card,
body.teacher-body .teacher-welcome,
body.teacher-body .teacher-info-card,
body.teacher-body .teacher-action-card,
body.teacher-body .teacher-table-card,
body.teacher-body .teacher-form-card,
body.teacher-body .teacher-google-card,
body.teacher-body .teacher-results-filter-card,
body.teacher-body .teacher-results-stat-grid article,
body.dashboard-body .profile-strip,
body.dashboard-body .workspace-card,
body.student-dashboard-page .student-welcome,
body.student-dashboard-page .summary-card,
body.student-dashboard-page .examinations-section,
body.student-dashboard-page .exam-card,
body.student-dashboard-page .student-results-section,
body.student-dashboard-page .student-result-card,
body.exam-room-page .exam-panel,
body.exam-room-page .exam-heading,
body.exam-room-page .question-panel,
body.exam-room-page .navigator-panel,
body.exam-room-page .theory-stage,
body.exam-room-page .theory-question-card {
  color: #17212b !important;
}
body.admin-body .platform-hero h1,
body.admin-body .platform-hero h2,
body.admin-body .platform-hero h3,
body.admin-body .platform-hero p,
body.admin-body .platform-hero .eyebrow,
body.admin-body .platform-stat-grid .stat-card span,
body.admin-body .platform-stat-grid .stat-card strong,
body.admin-body .platform-stat-grid .stat-card small,
body.admin-body .platform-action-card strong,
body.admin-body .platform-action-card small,
body.admin-body .platform-action-card b,
body.admin-body .platform-action-card > span,
body.admin-body .content-area .welcome-row h1,
body.admin-body .content-area .welcome-row h2,
body.admin-body .content-area .welcome-row h2 span,
body.admin-body .content-area .welcome-row p,
body.teacher-body .teacher-welcome h1,
body.teacher-body .teacher-welcome h2,
body.teacher-body .teacher-welcome p,
body.teacher-body .teacher-info-card h1,
body.teacher-body .teacher-info-card h2,
body.teacher-body .teacher-info-card h3,
body.teacher-body .teacher-info-card p,
body.teacher-body .teacher-action-card h1,
body.teacher-body .teacher-action-card h2,
body.teacher-body .teacher-action-card h3,
body.teacher-body .teacher-action-card p,
body.teacher-body .teacher-form-card h1,
body.teacher-body .teacher-form-card h2,
body.teacher-body .teacher-form-card h3,
body.teacher-body .teacher-form-card p,
body.dashboard-body .profile-strip *,
body.dashboard-body .workspace-card h1,
body.dashboard-body .workspace-card h2,
body.dashboard-body .workspace-card h3,
body.dashboard-body .workspace-card p,
body.student-dashboard-page .student-welcome h1,
body.student-dashboard-page .student-welcome h2,
body.student-dashboard-page .student-welcome p,
body.student-dashboard-page .summary-card span,
body.student-dashboard-page .summary-card strong,
body.student-dashboard-page .examinations-section h1,
body.student-dashboard-page .examinations-section h2,
body.student-dashboard-page .exam-card h1,
body.student-dashboard-page .exam-card h2,
body.student-dashboard-page .exam-card p,
body.student-dashboard-page .student-results-section h1,
body.student-dashboard-page .student-results-section h2,
body.exam-room-page .exam-panel h1,
body.exam-room-page .exam-panel h2,
body.exam-room-page .exam-panel h3,
body.exam-room-page .exam-panel p,
body.exam-room-page .exam-heading h1,
body.exam-room-page .exam-heading h2,
body.exam-room-page .question-panel h1,
body.exam-room-page .question-panel h2,
body.exam-room-page .question-panel p {
  color: #17212b !important;
  -webkit-text-fill-color: #17212b !important;
}
/* The admin welcome strip is a white information surface, so use dark text. */
body.admin-body #admin-layout .content-area > .welcome-row {
  background: #ffffff !important;
  color: #17212b !important;
  border: 1px solid #dce5eb;
  border-left: 4px solid #03cdff;
  border-radius: 12px;
  padding: 20px 22px;
  box-shadow: var(--tups-card-shadow);
}
body.admin-body #admin-layout .content-area > .welcome-row .eyebrow,
body.admin-body #admin-layout .content-area > .welcome-row h2,
body.admin-body #admin-layout .content-area > .welcome-row h2 span,
body.admin-body #admin-layout .content-area > .welcome-row p:not(.eyebrow) {
  color: #17212b !important;
  -webkit-text-fill-color: #17212b !important;
}


/* =========================================================
   TUPS LOGIN EXPERIENCE — shared by account, admin and student login
   Background artwork is intentionally configurable later through
   --tups-login-background-image; no image is selected by default.
   ========================================================= */
:root{
  --tups-login-background-image:none;
  --tups-login-overlay:linear-gradient(125deg,rgba(2,7,26,.97) 0%,rgba(4,19,43,.91) 52%,rgba(0,86,115,.76) 100%);
}
body:not(.admin-body):not(.teacher-body):not(.dashboard-body):not(.student-dashboard-page):not(.exam-room-page){
  background:var(--tups-navy)!important;
  color:var(--tups-ink);
}
body:not(.admin-body):not(.teacher-body):not(.dashboard-body):not(.student-dashboard-page):not(.exam-room-page) .page-shell{
  position:relative;
  isolation:isolate;
  min-height:100vh;
  width:100%;
  padding:clamp(28px,5vh,56px) 22px 20px;
  background-color:var(--tups-navy)!important;
  background-image:var(--tups-login-overlay),var(--tups-login-background-image),
    radial-gradient(ellipse at 15% 18%,rgba(3,205,255,.20),transparent 34%),
    radial-gradient(ellipse at 88% 82%,rgba(3,205,255,.14),transparent 32%),
    linear-gradient(135deg,#02071a,#071a36 58%,#031c32)!important;
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
}
body:not(.admin-body):not(.teacher-body):not(.dashboard-body):not(.student-dashboard-page):not(.exam-room-page) .login-panel{
  width:min(100%,460px);
  padding:clamp(30px,4vw,44px);
  border:1px solid rgba(255,255,255,.82)!important;
  border-top:5px solid var(--tups-cyan)!important;
  border-radius:18px;
  background:rgba(255,255,255,.97)!important;
  box-shadow:0 24px 70px rgba(0,0,0,.32),0 0 0 1px rgba(3,205,255,.12)!important;
  backdrop-filter:blur(12px);
}
body:not(.admin-body):not(.teacher-body):not(.dashboard-body):not(.student-dashboard-page):not(.exam-room-page) .login-panel::before{
  content:"TUPS TECHNOLOGIES  •  SECURE EXAMINATION PORTAL";
  display:block;
  margin:0 0 18px;
  color:#007fa3;
  font-size:10px;
  font-weight:800;
  letter-spacing:1.45px;
  line-height:1.5;
  text-align:center;
}
body:not(.admin-body):not(.teacher-body):not(.dashboard-body):not(.student-dashboard-page):not(.exam-room-page) .login-panel h1{
  color:var(--tups-navy)!important;
  font-size:clamp(25px,3vw,30px);
  font-weight:800;
  letter-spacing:-.5px;
}
body:not(.admin-body):not(.teacher-body):not(.dashboard-body):not(.student-dashboard-page):not(.exam-room-page) .school-name{
  margin:10px 0 28px;
  color:#627181!important;
  font-size:13px;
  font-weight:600;
}
body:not(.admin-body):not(.teacher-body):not(.dashboard-body):not(.student-dashboard-page):not(.exam-room-page) .login-panel label{
  color:#26364a!important;
  font-weight:700;
}
body:not(.admin-body):not(.teacher-body):not(.dashboard-body):not(.student-dashboard-page):not(.exam-room-page) .login-panel input,
body:not(.admin-body):not(.teacher-body):not(.dashboard-body):not(.student-dashboard-page):not(.exam-room-page) .login-panel select{
  min-height:50px;
  border:1px solid #d5e0e8!important;
  border-radius:9px;
  background:#fbfdff;
}
body:not(.admin-body):not(.teacher-body):not(.dashboard-body):not(.student-dashboard-page):not(.exam-room-page) .login-panel button:not(.button-secondary){
  min-height:50px;
  border-radius:9px;
  box-shadow:0 7px 18px rgba(3,145,180,.18);
  letter-spacing:.1px;
}
body:not(.admin-body):not(.teacher-body):not(.dashboard-body):not(.student-dashboard-page):not(.exam-room-page) .login-panel .back-link{
  color:#007fa3!important;
}
body:not(.admin-body):not(.teacher-body):not(.dashboard-body):not(.student-dashboard-page):not(.exam-room-page) .tups-footer{
  margin-top:auto;
  width:min(100%,1100px);
  padding:15px 18px;
  border:1px solid rgba(255,255,255,.14);
  border-radius:12px;
  background:rgba(2,7,26,.58)!important;
  color:#e6f6fb!important;
  box-shadow:0 8px 28px rgba(0,0,0,.12);
}
body:not(.admin-body):not(.teacher-body):not(.dashboard-body):not(.student-dashboard-page):not(.exam-room-page) .tups-footer strong,
body:not(.admin-body):not(.teacher-body):not(.dashboard-body):not(.student-dashboard-page):not(.exam-room-page) .tups-footer a{
  color:#e6f6fb!important;
}
@media(max-width:600px){
  body:not(.admin-body):not(.teacher-body):not(.dashboard-body):not(.student-dashboard-page):not(.exam-room-page) .page-shell{
    padding:24px 14px 14px;
  }
  body:not(.admin-body):not(.teacher-body):not(.dashboard-body):not(.student-dashboard-page):not(.exam-room-page) .login-panel{
    padding:28px 22px;
  }
}

/* TUPS Platform Control Centre — final layout refinement */
body.admin-body .platform-hero{
  align-items:center;
  padding:30px 32px;
  border:1px solid #173b56;
  border-left:5px solid var(--tups-cyan);
  background:linear-gradient(115deg,#02071a 0%,#081a35 68%,#0a2c43 100%);
  box-shadow:0 14px 34px rgba(2,7,26,.16);
}
body.admin-body .platform-hero h2,
body.admin-body .platform-hero p:not(.eyebrow){
  color:#f4fbff!important;
  -webkit-text-fill-color:#f4fbff!important;
}
body.admin-body .platform-hero .eyebrow{
  color:#70e5ff!important;
  letter-spacing:1.7px;
}
body.admin-body .platform-status-pill{
  border-color:rgba(3,205,255,.55);
  background:rgba(3,205,255,.12);
  color:#a9efff;
  white-space:nowrap;
}
body.admin-body .platform-stat-grid .stat-card{
  position:relative;
  overflow:hidden;
  padding:20px 21px;
  border:1px solid #dce8ee;
  border-top:3px solid var(--tups-cyan);
  border-radius:12px;
  box-shadow:0 7px 22px rgba(2,7,26,.055);
}
body.admin-body .platform-stat-grid .stat-card strong{
  margin:12px 0 5px;
  font-size:clamp(25px,2.2vw,30px);
  letter-spacing:-.7px;
}
body.admin-body .platform-action-card{
  min-height:174px;
  border-color:#dce8ee;
  box-shadow:0 7px 22px rgba(2,7,26,.055);
}
body.admin-body .platform-action-card:focus-visible{
  outline:3px solid rgba(3,205,255,.55);
  outline-offset:3px;
}
body.admin-body .platform-action-card>span{
  width:42px;height:42px;border:1px solid #b8effb;
}
body.admin-body .platform-action-card b{
  display:inline-flex;
  align-items:center;
  gap:6px;
}
body.admin-body .school-context-selector{
  min-height:39px;
  border:1px solid #b8dce7;
  box-shadow:0 2px 8px rgba(2,7,26,.06);
}
body.admin-body .platform-selection-note{
  padding:12px 14px;
  border-left:3px solid var(--tups-cyan);
  border-radius:0 8px 8px 0;
  background:#f0fbfe;
}
body.admin-body .teacher-role-form{
  border-left-color:var(--tups-cyan);
  background:#f4fbfd;
}
body.admin-body .role-change-button{
  border-color:#9bddec;
  color:#005b78;
}
body.admin-body .topbar-user{
  flex-wrap:wrap;
}
body.admin-body .platform-mode .content-area{
  width:min(1380px,100%);
}
@media(max-width:1050px){
  body.admin-body .topbar{padding:14px 20px;gap:12px}
  body.admin-body .topbar-user{justify-content:flex-end}
}
@media(max-width:760px){
  body.admin-body .topbar{align-items:flex-start;flex-direction:column}
  body.admin-body .topbar-user{width:100%;justify-content:flex-start}
  body.admin-body .school-context-selector{max-width:100%;min-width:180px}
  body.admin-body .platform-hero{padding:23px 22px}
}
@media(max-width:520px){
  body.admin-body .platform-stat-grid{grid-template-columns:1fr 1fr}
  body.admin-body .platform-stat-grid .stat-card{min-width:0;padding:14px}
  body.admin-body .platform-stat-grid .stat-card strong{font-size:23px}
  body.admin-body .platform-stat-grid .stat-card small{font-size:10px}
}
