/* V78 is intentionally loaded last and scoped to portal/community surfaces. */
:root{--v78-navy:#0b2a62;--v78-blue:#2457b8;--v78-ink:#17345e;--v78-line:#dbe6f4;--v78-soft:#f5f8fd;--v78-gold:#e6ad35}
:is(.brand-logo,.teacher-brand,.acc-brand,.navbar-brand,.site-brand) img{object-fit:contain!important;object-position:center!important;background:transparent!important}
.auth-forgot-link,.auth-back-link{display:inline-flex;align-items:center;justify-content:center;gap:7px;margin:2px 0 13px;color:#173d90;font-size:.78rem;font-weight:800}.auth-back-link{display:flex;margin-top:12px}
body.portal-page :is(.teacher-desktop-sidebar .rw-dashboard-link,.responsible-side-column .rw-dashboard-link,.acc-sidebar-head,.student-account-sidebar-title),
body.staff-visual-v21 :is(.teacher-desktop-sidebar .rw-dashboard-link,.responsible-side-column .rw-dashboard-link,.acc-sidebar-head){background:linear-gradient(135deg,#081f4b,#123d82)!important;color:#fff!important;border:0!important;box-shadow:inset 0 1px rgba(255,255,255,.14),0 10px 22px rgba(8,31,75,.18)}
body.portal-page :is(.teacher-desktop-sidebar .rw-dashboard-link,.responsible-side-column .rw-dashboard-link,.acc-sidebar-head,.student-account-sidebar-title) :is(strong,small,span,i),
body.staff-visual-v21 :is(.teacher-desktop-sidebar .rw-dashboard-link,.responsible-side-column .rw-dashboard-link,.acc-sidebar-head) :is(strong,small,span,i){color:#fff!important}
body.portal-page :is(.teacher-desktop-sidebar,.responsible-side-column,.acc-sidebar,.student-account-sidebar),body.staff-visual-v21 :is(.teacher-desktop-sidebar,.responsible-side-column,.acc-sidebar){overscroll-behavior:auto!important}
body.portal-page :is(.teacher-desktop-sidebar .menu-link,.responsible-side-column .menu-link,.acc-sidebar a,.student-account-sidebar a).active,
body.staff-visual-v21 :is(.teacher-desktop-sidebar .menu-link,.responsible-side-column .menu-link,.acc-sidebar a).active{position:relative;background:linear-gradient(135deg,#eaf2ff,#fff)!important;color:var(--v78-navy)!important;border-color:#9bb9ea!important;box-shadow:0 9px 20px rgba(24,70,145,.13),inset -4px 0 var(--v78-blue)!important;transform:none!important}
body.portal-page :is(.teacher-desktop-sidebar .menu-link,.responsible-side-column .menu-link,.acc-sidebar a).active::after,
body.staff-visual-v21 :is(.teacher-desktop-sidebar .menu-link,.responsible-side-column .menu-link,.acc-sidebar a).active::after{content:"";width:8px;height:8px;border-radius:50%;background:#28a879;box-shadow:0 0 0 4px rgba(40,168,121,.13);margin-inline-start:auto}
body.portal-page .teacher-desktop-sidebar .tw-icon,body.staff-visual-v21 .teacher-desktop-sidebar .tw-icon{filter:drop-shadow(0 7px 7px rgba(18,56,120,.18));transform:perspective(250px) rotateX(4deg)}

/* Reusable course selector: native control remains fully accessible. */
.v78-course-select{display:grid;grid-template-columns:52px minmax(0,1fr);align-items:center;gap:10px;min-width:min(100%,240px)}
.v78-course-art{display:grid;place-items:center;width:50px;height:50px;border-radius:15px;color:#fff;background:linear-gradient(145deg,#1d4fa9,#0b2a62);box-shadow:0 6px 0 #071d46,0 12px 20px rgba(11,42,98,.2),inset 0 2px rgba(255,255,255,.3);font-size:20px;font-weight:900;text-transform:uppercase}
.v78-course-art.java{background:linear-gradient(145deg,#f39a31,#b83c24);box-shadow:0 6px 0 #782819,0 12px 20px rgba(184,60,36,.22),inset 0 2px rgba(255,255,255,.35)}
.v78-course-art.java::before{content:"☕"}.v78-course-art.java{font-size:0}.v78-course-art.java::before{font-size:27px}
.course-art-java{background-image:url('/img/course-art/programming.svg')!important;background-size:86%!important;background-position:center!important;background-color:#fff!important;border-radius:22%}

/* Radio cards used by revision, PDF exams and readiness. */
.v78-category-radios{display:flex;flex-wrap:wrap;gap:9px}.v78-category-radio{position:relative;display:inline-flex;align-items:center;gap:8px;min-height:43px;padding:9px 15px;border:1px solid #cfdcf0;border-radius:14px;background:#fff;color:#365273;font-weight:800;cursor:pointer;box-shadow:0 4px 10px rgba(17,55,111,.06)}
.v78-category-radio input{position:absolute;opacity:0;pointer-events:none}.v78-category-radio::before{content:"";width:12px;height:12px;border:3px solid #fff;border-radius:50%;background:#b8c8df;box-shadow:0 0 0 1px #a8bad3}
.v78-category-radio:has(input:checked){color:#fff;border-color:#173d90;background:linear-gradient(135deg,#173d90,#3569c8);box-shadow:0 7px 17px rgba(23,61,144,.22)}.v78-category-radio:has(input:checked)::before{background:#f1bb42;box-shadow:0 0 0 1px #fff}
.v78-native-category{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip-path:inset(50%)!important}

/* Teacher content polish. */
body.teacher-portal-page :is(.rv-card,.ex-card,.rd-card,.oe-card,.ai-card){border-color:var(--v78-line)!important;box-shadow:0 12px 30px rgba(18,52,94,.075)!important}
body.teacher-portal-page :is(.rv-card,.ex-card,.rd-card,.oe-card,.ai-card)>.fw-bold:first-child,body.teacher-portal-page .oe-title{color:var(--v78-navy)!important}
body.teacher-portal-page :is(.course-card,[data-course-card],.teacher-course-card){position:relative;overflow:hidden;transition:transform .22s ease,box-shadow .22s ease,border-color .22s ease}
body.teacher-portal-page :is(.course-card,[data-course-card],.teacher-course-card)::before{content:"";position:absolute;inset-inline-start:0;top:0;width:5px;height:100%;background:linear-gradient(#1e59b8,#e6ad35,#178a70)}
body.teacher-portal-page :is(.course-card,[data-course-card],.teacher-course-card):hover{transform:translateY(-4px);border-color:#9db9e5!important;box-shadow:0 16px 30px rgba(17,55,111,.14)!important}
body.teacher-portal-page .teacher-course-card:nth-child(3n+2)::before{background:linear-gradient(#744da7,#2f73b9)}body.teacher-portal-page .teacher-course-card:nth-child(3n)::before{background:linear-gradient(#bd7527,#178a70)}
body.teacher-portal-page :is(.teacher-messages-heading,.notifications-hero,.tv-hero,.private-lessons-hero,.teacher-tool-stage>header){background:linear-gradient(135deg,#0b2a62,#2457b8)!important;color:#fff!important}
/* Final page-heading guard: legacy cached CSS must not turn blue title bars white. */
html body :is(.jawda-page-heading,.academic-hero,.bill-hero,.care-heading,.project-hero,.sa-hero,.acc-hero,.teacher-messages-heading,.leq-hero,.qb-hero,.events-page-heading,.leqs-head,.readiness-page-head,.responsible-welcome,.billing-workspace-head,.lectures-hero-box,.chgcat-hero,.teacher-pay-hero,.ov-hero,.guest-preview-heading,.plan-hero-card,.resource-intro,.info-hero,.ai-public-hero){background:#0b2a62!important;background-image:linear-gradient(135deg,#081f4b,#174f9d)!important;border-color:#244d82!important;color:#fff!important}
html body :is(.jawda-page-heading,.academic-hero,.bill-hero,.care-heading,.project-hero,.sa-hero,.acc-hero,.teacher-messages-heading,.leq-hero,.qb-hero,.events-page-heading,.leqs-head,.readiness-page-head,.responsible-welcome,.billing-workspace-head,.lectures-hero-box,.chgcat-hero,.teacher-pay-hero,.ov-hero,.guest-preview-heading,.plan-hero-card,.resource-intro,.info-hero,.ai-public-hero) :is(h1,h2,h3,h4,p,strong,small,.text-muted){color:#fff!important}
html body :is(.project-hero,.responsible-welcome,.ov-hero) p{color:#dbe8fa!important}
body.teacher-portal-page .lecture-icon-btn.action-edit{background:#eef4ff!important;border-color:#bfd1ef!important;color:#2457b8!important}body.teacher-portal-page .lecture-icon-btn.action-question{background:#eaf9f4!important;border-color:#bfe6d8!important;color:#16866c!important}body.teacher-portal-page .lecture-icon-btn.action-exam-question{background:#f5effc!important;border-color:#d9c8ee!important;color:#7552ad!important}body.teacher-portal-page .lecture-icon-btn.action-quiz{background:#fff6e8!important;border-color:#efd5ad!important;color:#a9631d!important}body.teacher-portal-page .lecture-icon-btn.action-active{background:#eaf8ef!important;border-color:#b9dfc7!important;color:#187b48!important}body.teacher-portal-page .lecture-icon-btn.action-inactive,body.teacher-portal-page .lecture-icon-btn.action-paid{background:#f2f4f8!important;border-color:#d7dce5!important;color:#667085!important}body.teacher-portal-page .lecture-icon-btn.action-free{background:#fff8dc!important;border-color:#eddb95!important;color:#8c6a00!important}

/* Two-stage online exam builder. */
.v78-exam-steps{display:flex;gap:8px;margin-bottom:16px}.v78-exam-step{display:flex;align-items:center;gap:8px;flex:1;padding:11px 14px;border:1px solid #d9e4f2;border-radius:14px;background:#f7f9fd;color:#6a7e99;font-weight:900}.v78-exam-step b{display:grid;place-items:center;width:28px;height:28px;border-radius:10px;background:#dce7f6}.v78-exam-step.active{color:#fff;background:linear-gradient(135deg,#0b2a62,#2457b8);border-color:#174994}.v78-exam-step.active b{color:#0b2a62;background:#fff}.v78-exam-panel[hidden]{display:none!important}.v78-exam-navigation{display:flex;justify-content:space-between;gap:10px;margin-top:18px}.v78-question-summary{background:linear-gradient(145deg,#fff,#f4f8fe)!important}.v78-question-summary+.v78-question-summary{margin-top:10px}

/* Profile modal loaded from each role's own profile page. */
.v78-profile-modal .modal-dialog{max-width:min(1100px,96vw)}.v78-profile-modal .modal-content{overflow:hidden;border:0;border-radius:25px;box-shadow:0 30px 80px rgba(5,24,62,.35)}.v78-profile-modal .modal-header{color:#fff;border:0;background:linear-gradient(135deg,#081f4b,#2457b8)}.v78-profile-modal .modal-title{display:flex;align-items:center;gap:12px;color:#fff;font-weight:900}.v78-profile-modal .modal-title i{display:grid;place-items:center;width:44px;height:44px;border-radius:14px;color:#173d90;background:linear-gradient(145deg,#fff,#cfe0ff);box-shadow:0 6px 0 #9fb9e5,0 10px 18px rgba(0,0,0,.16);font-size:22px}.v78-profile-frame{display:block;width:100%;height:min(72vh,760px);border:0;background:#f4f7fc}.v78-profile-modal .btn-close{filter:invert(1)}

/* Community group contrast and true Java identity for TM105. */
.community-page .room{--room-accent:#2b62bd;--room-soft:#edf4ff;background:linear-gradient(145deg,#fff,var(--room-soft))!important;border-color:color-mix(in srgb,var(--room-accent) 25%,#dbe6f4)!important}
.community-page .room.room-tone-1{--room-accent:#2468bd;--room-soft:#edf5ff}.community-page .room.room-tone-2{--room-accent:#16866c;--room-soft:#eaf9f4}.community-page .room.room-tone-3{--room-accent:#7552ad;--room-soft:#f4effc}.community-page .room.room-tone-4{--room-accent:#b76d22;--room-soft:#fff6e8}
.community-page .room.active{background:linear-gradient(135deg,#0b2a62,var(--room-accent))!important;color:#fff!important}.community-page .room-icon{color:var(--room-accent)!important}.community-page .room.active .room-icon{background:linear-gradient(145deg,#fff,#dce9ff)!important}

@media(max-width:991.98px){.v78-profile-modal .modal-dialog{margin:.6rem;max-width:calc(100vw - 1.2rem)}.v78-course-select{grid-template-columns:44px minmax(0,1fr)}.v78-course-art{width:42px;height:42px;border-radius:13px}.v78-exam-steps{overflow-x:auto}.v78-exam-step{min-width:170px}}
@media(max-width:575.98px){.v78-category-radios{display:grid;grid-template-columns:1fr 1fr}.v78-category-radio{justify-content:center;padding-inline:9px}.v78-profile-frame{height:78vh}.v78-exam-navigation>*{flex:1}}
@media(prefers-reduced-motion:reduce){body.teacher-portal-page :is(.course-card,[data-course-card],.teacher-course-card){transition:none!important;transform:none!important}}
