.instructor-portal{--paper:#fffaf0;--ink:#243749;--rule:#d1c9bc;--muted:#566671}
[data-student-section="home"] .instructor-portal{--page:#f2ede3;--accent-ink:#1664b0;--button:#1664b0;--hover:#105495}
.instructor-portal .sidebar{overflow-y:auto;min-height:0;gap:16px}
.instructor-portal main{padding:32px clamp(20px,4vw,54px) 45px;max-width:1300px;min-width:0}
.instructor-portal h1{font-size:clamp(36px,4.7vw,65px);color:var(--accent-ink)}
.instructor-portal h2{font-size:29px}
.instructor-portal h3{font-size:23px}
.instructor-portal .card{background:#fffaf0}
.instructor-portal .sidebar #batch-context{color:#243749;text-align:center;position:relative}
.batch-name{font:26px/1.1 Georgia,serif;margin-bottom:5px;color:#1664b0}
.batch-level{font-size:12px;font-weight:700;margin-bottom:8px}
#batch-context label{font-size:11px;text-align:left}
#batch-context select{font-size:14px;margin-top:5px;background:#fffaf0;min-height:44px}
#batch-context a{display:block;font-size:12px;color:#1664b0;margin-top:10px;min-height:25px;font-weight:700}
.instructor-welcome{position:relative;isolation:isolate;padding:30px 22px;min-height:205px;background:linear-gradient(90deg,#f6f1e9e6,#f6f1e995),url('/assets/home-classroom.webp') center 30%/cover;border-radius:16px;margin-bottom:25px}
.instructor-welcome h1{margin-bottom:18px}
.instructor-demo{font-size:11px;font-weight:800;letter-spacing:.14em;text-transform:uppercase;color:#1664b0}
.instructor-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px}
.instructor-summary .card{margin-top:0}
.overview-link{display:block;padding:12px 0;border-bottom:1px solid #e4dccf;color:#243749;text-decoration:none;line-height:1.45}
.overview-link strong{display:block;color:#1664b0}
.overview-link:hover strong{text-decoration:underline}
.batch-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(260px,100%),1fr));gap:18px;margin-bottom:24px}
.batch-card{position:relative;overflow:hidden;border-top:4px solid #1664b0}
.batch-card .button{margin-top:10px}
.batch-intro{margin-bottom:25px;padding:18px 22px;background:#fffaf0e8;border-radius:12px;border-left:4px solid var(--accent-ink)}
.batch-intro p{margin:0;color:#566671}
.actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:14px}
.academy-editor .grid{margin-bottom:15px}
.academy-editor label{margin:12px 0;font-size:13px}
.academy-editor input,.academy-editor textarea,.academy-editor select,.permission-form select{display:block;width:100%;min-height:44px;background:#fffdf6;border:1px solid #b9ad9b;padding:10px;border-radius:7px;font:inherit;margin-top:5px;color:#243749}
.academy-editor input[type=checkbox]{display:inline;width:20px;min-height:20px;margin-right:8px}
.destination{display:block;padding:10px 13px;background:#efe8de;border-left:3px solid var(--accent-ink);font-size:14px;margin-bottom:16px;color:#243749}
.status-note{padding:10px 14px;background:#fff4cb;border-radius:7px;margin:12px 0}
.academy-item{border-top:1px solid #ded5c7;padding-top:17px;margin-top:17px}
.academy-meta{font-size:13px;color:#566671}
.academy-response{white-space:pre-wrap;padding:15px;background:#efe8de;border-radius:8px;color:#243749}
.upload-row{display:grid;grid-template-columns:1fr minmax(120px,.6fr);gap:10px;align-items:end}
.upload-row input[type=file]{font-size:12px}
.academy-error{color:#9a1747;white-space:pre-wrap}
.permission-form{margin-top:18px;border-top:1px solid #d1c9bc;padding-top:12px}
.permission-form label{display:flex;align-items:center;gap:10px;min-height:40px;font-size:14px}
.permission-form input{width:20px;height:20px}
.instructor-portal [role=alert]:empty{display:none}
.instructor-portal :is(.quiz-question-panel,.quiz-review,.quiz-card){background:#f7f2ff}
.instructor-portal #quiz-app .quiz-staff-toolbar>a{display:none}
.instructor-portal .section-intro{position:relative;isolation:isolate;padding:20px 22px;background:linear-gradient(90deg,#fffaf0e8,#fffaf0b3),url('/assets/home-classroom.webp') center/cover;border-radius:12px;margin-bottom:18px}
.instructor-portal[data-unused] {display:block}
[data-student-section="messages"] .instructor-portal main{display:flex;flex-direction:column;padding:12px 15px;max-width:none;height:100%;overflow:hidden}
[data-student-section="messages"] #instructor-content{display:grid;grid-template-rows:auto minmax(0,1fr);min-height:0;flex:1}
[data-student-section="messages"] .instructor-portal .batch-intro{margin-bottom:0;padding:8px 12px}
[data-student-section="messages"] .instructor-portal .batch-intro h1{font-size:20px;margin:0}
[data-student-section="messages"] .instructor-portal .batch-intro p{display:none}
.instructor-portal .chat-hero{padding-top:8px}
.instructor-portal .chat-hero h1{font-size:clamp(30px,4vw,53px);margin-bottom:10px}
.instructor-portal .chat-hero .eyebrow{display:none}
.instructor-portal .chat-stage{padding-inline:clamp(30px,10%,130px)}
.instructor-portal .chat-picker select{max-width:100%;font-size:14px}
.instructor-portal .chat-instructor{width:15%}
.instructor-portal .quiz-hero{min-height:190px}
.instructor-portal .quiz-teachers{height:190px}
.instructor-portal .quiz-heading h1{font-size:clamp(30px,4vw,50px)}
@media(max-width:1000px){.instructor-summary{grid-template-columns:1fr}.instructor-summary .card{padding:18px}.instructor-portal .sidebar{gap:12px}.instructor-portal .brand-monogram{font-size:48px}.instructor-portal .brand-name{font-size:20px}.instructor-portal #student-nav{gap:9px}.instructor-portal #student-nav a{font-size:13px;min-height:44px}}
@media(max-width:640px){.instructor-portal .sidebar{overflow:visible;display:grid;grid-template-columns:1fr 1fr 1fr}.instructor-portal #batch-context{grid-column:1/-1;grid-row:2}.instructor-portal .sidebar>.menu{grid-row:3}.instructor-portal .sidebar>.sign-out{grid-row:3}.instructor-portal #student-nav{grid-row:4}.instructor-portal .brand-monogram{font-size:36px}.instructor-portal .brand-name{font-size:15px}.instructor-portal .batch-name{font-size:22px}.instructor-portal main{padding:22px 14px}.instructor-welcome{min-height:170px;padding:22px 16px}.upload-row{grid-template-columns:1fr}.instructor-portal .chat-stage{padding-inline:0}.instructor-portal .chat-instructor{display:none}.instructor-portal .chat-panel{border-radius:13px;padding:10px}.instructor-portal .batch-intro{padding:12px}.instructor-portal .batch-intro h1{font-size:27px}.instructor-portal .quiz-hero{min-height:150px}.instructor-portal .quiz-teachers{height:145px}}
/* Instructor editors use normal page scrolling; only conversations are pinned. */
body.instructor-portal {overflow:auto}
.instructor-portal .journal {height:auto;min-height:100dvh}
.instructor-portal #instructor-main {display:block;height:auto;overflow:visible}
[data-student-section="messages"] .instructor-portal .journal {height:var(--message-height,100dvh);min-height:0;overflow:hidden}
[data-student-section="messages"] .instructor-portal #instructor-main {display:flex;height:100%;overflow:hidden}
@media(max-width:640px) {
  .instructor-portal .journal {display:block}
  [data-student-section="messages"] .instructor-portal .journal {display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr)}
}

.admin-count{display:inline-flex;background:#d21624;color:#fff;padding:3px 8px;border-radius:20px;font:700 12px/1.2 system-ui;margin-left:8px}
.academy-editor .check-label{display:flex;align-items:center;gap:9px}.academy-editor .check-label input{flex:0 0 20px;margin:0;min-height:20px}
.people-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(290px,100%),1fr));gap:18px}.people-list .card{margin-top:15px}
.instructor-portal dialog{max-width:560px;width:calc(100% - 32px);border:1px solid #c8bba9;border-radius:16px;background:#fffaf0;color:#243749;padding:26px}.instructor-portal dialog::backdrop{background:#1b2a3a80}

@media(max-width:640px){[data-student-section="messages"] .instructor-portal #student-nav.open{max-height:calc(100dvh - 330px);overflow-y:auto}}
