/* Admin console — additive only, never touches main.css. */

.teacher-shell{min-height:100vh;background:var(--cream);display:grid;grid-template-columns:230px 1fr}

/* v1.2: nav moved from a horizontal topbar row (which overflowed past
   ~15 tabs) to a fixed, independently-scrollable left rail — same
   position:fixed;inset pattern as learn.ai2n.ai's .sidebar, and same
   "the flex child scrolls, not the whole rail" fix already applied
   there for the same underlying overflow-clipping bug. */
.side-rail{position:fixed;inset:0 auto 0 0;width:230px;background:#fff;border-right:1px solid var(--line);display:flex;flex-direction:column;z-index:20}
.shell-main{grid-column:2;min-width:0}

/* Logo lives at the top of the sidebar itself (its own bordered header
   cell), not the topbar — matches learn.ai2n.ai's .sidebar-brand
   placement, adapted to this app's light (not navy) rail. */
.side-rail-brand{flex:0 0 auto;height:76px;display:flex;align-items:center;padding:0 22px;border-bottom:1px solid var(--line)}
.side-rail-brand img{height:26px;width:auto;display:block;max-width:100%}

.teacher-topbar{height:76px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 38px;position:sticky;top:0;z-index:15;gap:20px}
.teacher-topbar-brand{display:flex;align-items:center;gap:14px;flex-shrink:0}
.teacher-topbar-brand img{height:26px;width:auto;display:block}
.teacher-topbar-brand b{display:block;font-size:14px;color:var(--ink)}
.teacher-topbar-brand small{display:block;font-size:11px;color:var(--muted)}
.teacher-topbar-actions{display:flex;align-items:center;gap:16px;flex-shrink:0}

/* Identity chip: replaces the plain "adminIdentity" text that used to
   live in the topbar brand (or, briefly, the sidebar footer) — an
   avatar-initial badge + name + role/school subtitle, matching the
   mockup's top-right cluster. No new icon asset: the avatar is just the
   first letter on a token-derived background, same "plain glyph, no
   icon library" convention as the rest of this app. */
.identity-chip{display:flex;align-items:center;gap:10px}
.identity-avatar{width:32px;height:32px;border-radius:50%;background:var(--navy);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:13px;flex-shrink:0}
.identity-chip b{display:block;font-size:12.5px;color:var(--ink)}
.identity-chip small{display:block;font-size:11px;color:var(--muted)}

/* Header search: reuses .search-wrap from main.css (already styled,
   shared with learn.ai2n.ai) verbatim, just adds the results dropdown. */
.search-wrap{flex:1 1 auto;max-width:420px}
#global-search-results{top:calc(100% + 6px);left:0;right:auto;width:100%;max-height:360px;overflow-y:auto}
.search-result-group{padding:6px 14px 2px;font-size:10px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--muted)}
.search-result-row{display:block;width:100%;text-align:left;border:0;background:transparent;padding:9px 14px;font-size:12.5px;color:var(--ink);border-radius:8px}
.search-result-row:hover,.search-result-row:focus-visible{background:var(--cream)}
.search-result-row small{display:block;color:var(--muted);font-size:11px}

/* Sidebar footer branding + dynamic per-school footer over the main
   content — see the header-redesign design decisions in the plan for
   why "current school" resolves differently per app. */
.powered-by-badge{display:flex;align-items:center;gap:10px}
.powered-by-mark{width:28px;height:28px;border-radius:8px;background:var(--navy);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:13px;flex-shrink:0}
.powered-by-badge small{display:block;font-size:9px;letter-spacing:.08em;color:var(--muted)}
.powered-by-badge b{display:block;font-size:12px;color:var(--ink)}

.school-brand-footer{display:flex;align-items:center;gap:10px;max-width:1040px;margin:0 auto;padding:16px 38px 28px;color:var(--muted);font-size:12px}
.school-brand-footer img{height:24px;width:24px;object-fit:cover;border-radius:6px}

#main-content{max-width:1040px;margin:0 auto;padding:32px 38px 60px}

.teacher-view{display:none}
.teacher-view.active{display:block}

.teacher-view-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:22px;flex-wrap:wrap}
.teacher-view-head h1{margin:0;font-size:22px;color:var(--ink)}

.teacher-filter{display:flex;gap:6px;background:var(--cream);border:1px solid var(--line);border-radius:11px;padding:4px}
.filter-btn{border:0;background:transparent;color:var(--muted);font-size:11px;font-weight:700;padding:8px 14px;border-radius:8px}
.filter-btn.active{background:#fff;color:var(--navy);box-shadow:0 4px 12px rgba(6,43,99,.08)}

.queue-list{display:flex;flex-direction:column;gap:10px}
.queue-row{width:100%;text-align:left;border:1px solid var(--line);background:#fff;border-radius:14px;padding:16px 18px;display:flex;align-items:center;justify-content:space-between;gap:16px;box-shadow:0 4px 14px rgba(6,43,99,.04);transition:box-shadow .15s,border-color .15s;cursor:pointer}
.queue-row:hover{border-color:var(--blue);box-shadow:0 8px 22px rgba(6,43,99,.09)}
.queue-row-main{display:flex;flex-direction:column;gap:3px;min-width:0}
.queue-row-main b{font-size:13.5px;color:var(--ink)}
.queue-row-main span{font-size:12px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.queue-row-meta{display:flex;align-items:center;gap:10px;flex-shrink:0}

.score-badge{font:700 12px Arial,sans-serif;color:var(--navy);background:var(--cream);border:1px solid var(--line);border-radius:8px;padding:5px 10px;white-space:nowrap}

.status-pill{font:700 10px Arial,sans-serif;letter-spacing:.04em;text-transform:uppercase;border-radius:999px;padding:5px 11px;white-space:nowrap}
.status-pill.status-submitted{background:rgba(245,130,32,.12);color:#b25c10}
.status-pill.status-reviewed{background:rgba(26,170,120,.14);color:#12764f}
.status-pill.status-published{background:rgba(26,170,120,.14);color:#12764f}
.status-pill.status-unpublished{background:rgba(101,118,140,.14);color:#4b5768}

.queue-empty{color:var(--muted);font-size:13px;text-align:center;padding:38px 0}

.detail-layout{display:grid;grid-template-columns:1.4fr 1fr;gap:20px;align-items:start;margin-top:18px}
@media (max-width:820px){.detail-layout{grid-template-columns:1fr}}

.detail-main{padding:26px}
.detail-aside{padding:22px}

.detail-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:6px}
.detail-head h2{margin:2px 0 0;font-size:18px;color:var(--ink)}

.detail-description{font-size:12.5px;color:var(--muted);line-height:1.6;margin:10px 0 18px}

.source-code{background:var(--navy-deep);color:#dce9ff;border-radius:12px;padding:18px;font:12px/1.6 Consolas,Menlo,monospace;overflow-x:auto;white-space:pre;max-height:480px}

.existing-feedback{font-size:12px;color:var(--muted);background:var(--cream);border-radius:10px;padding:10px 12px;margin-bottom:14px;line-height:1.5}

#review-form,.panel-form{display:flex;flex-direction:column;gap:12px}
#review-form textarea,.panel-form textarea,.panel-form input,.panel-form select{border:1.5px solid var(--line);border-radius:12px;padding:12px 14px;font-size:12.5px;color:var(--ink);resize:vertical;font-family:inherit}
#review-form textarea:focus,.panel-form textarea:focus,.panel-form input:focus,.panel-form select:focus{outline:none;border-color:var(--blue)}
#review-form .primary-btn,.panel-form .primary-btn{width:100%;display:flex;align-items:center;justify-content:center;gap:6px}

.review-status{min-height:16px;font-size:12px;color:var(--muted);margin:0;text-align:center}

.teacher-nav{flex:1 1 auto;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:2px;padding:28px 12px 16px}
/* Visible thin scrollbar on the nav rail, so its scrollability doesn't
   rely on a barely-noticeable default browser scrollbar. */
.teacher-nav{scrollbar-width:thin;scrollbar-color:var(--line) transparent}
.teacher-nav::-webkit-scrollbar{width:6px}
.teacher-nav::-webkit-scrollbar-track{background:transparent}
.teacher-nav::-webkit-scrollbar-thumb{background:var(--line);border-radius:3px}
.teacher-nav::-webkit-scrollbar-thumb:hover{background:var(--muted)}
.nav-tab{border:0;background:transparent;color:var(--muted);font-size:12px;font-weight:700;padding:10px 14px;border-radius:8px;text-align:left;width:100%}
.nav-tab.active{background:var(--cream);color:var(--navy)}

/* Grouped nav: each .nav-group is a header button + a collapsible items
   list. max-height (not display:none) drives the collapse so it can
   transition smoothly; the value only needs to exceed any real group's
   content height, it doesn't need to be exact. */
.nav-group{display:flex;flex-direction:column}
.nav-group-header{border:0;background:transparent;color:var(--ink);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;padding:10px 14px;border-radius:8px;text-align:left;display:flex;align-items:center;justify-content:space-between;width:100%}
.nav-group.has-active .nav-group-header{color:var(--navy)}
.nav-group-chevron{font-size:10px;transition:transform .15s;color:var(--muted)}
.nav-group-header[aria-expanded="true"] .nav-group-chevron{transform:rotate(0deg)}
.nav-group-header[aria-expanded="false"] .nav-group-chevron{transform:rotate(-90deg)}
.nav-group-items{max-height:600px;overflow:hidden;transition:max-height .18s ease;display:flex;flex-direction:column;gap:2px;padding-left:6px}
.nav-group-items[data-collapsed="true"]{max-height:0}
.nav-group[hidden]{display:none}

.side-rail-foot{flex:0 0 auto;padding:14px 18px;border-top:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:10px}
.side-rail-foot small{display:block;font-size:11px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.teacher-area{display:none}
.teacher-area.active{display:block}

.invite-form{margin-bottom:18px;padding:20px}
.invite-form-actions{display:flex;align-items:center;gap:14px}

.roster-row-meta{gap:12px}
.resend-btn{font-size:11px}

/* --- Admin-console-specific additions --- */
.teacher-subnav{display:flex;gap:6px;background:var(--cream);border:1px solid var(--line);border-radius:11px;padding:4px;margin-bottom:22px}
.subnav-tab{border:0;background:transparent;color:var(--muted);font-size:11px;font-weight:700;padding:8px 14px;border-radius:8px}
.subnav-tab.active{background:#fff;color:var(--navy);box-shadow:0 4px 12px rgba(6,43,99,.08)}

.drilldown-crumbs{display:flex;align-items:center;gap:6px;font-size:11.5px;color:var(--muted);margin-bottom:14px}
.drilldown-crumbs button{border:0;background:none;color:var(--blue);font-weight:700;font-size:11.5px;padding:0}
.drilldown-crumbs span{color:var(--muted)}

.panel-form{padding:20px;margin-bottom:18px}
.panel-form-row{display:flex;gap:10px}
.panel-form-row>*{flex:1}
.panel-form-actions{display:flex;align-items:center;gap:14px}

.mini-panel{padding:18px;margin-bottom:16px}
.mini-panel h3{margin:0 0 10px;font-size:13px;color:var(--ink)}

.choice-row{display:flex;align-items:center;gap:8px;margin-bottom:6px}
.choice-row input[type="text"]{flex:1;border:1.5px solid var(--line);border-radius:8px;padding:8px 10px;font-size:12px;color:var(--ink)}
.choice-row input[type="radio"]{flex-shrink:0}

.question-block{border:1px solid var(--line);border-radius:10px;padding:14px;margin-bottom:12px;background:var(--cream)}
.question-block textarea{width:100%;border:1.5px solid var(--line);border-radius:8px;padding:8px 10px;font-size:12.5px;margin-bottom:10px}

.icon-btn-sm{border:0;background:var(--cream);color:var(--muted);font-size:11px;font-weight:700;padding:5px 10px;border-radius:7px}
.icon-btn-sm:hover{color:var(--navy)}

.danger-btn{border:1px solid rgba(229,27,35,.3);background:rgba(229,27,35,.06);color:var(--red);font-size:11px;font-weight:700;padding:8px 14px;border-radius:8px}

.field-group{display:flex;flex-direction:column;gap:5px}
.field-label{font-size:11px;font-weight:700;color:var(--ink)}
.field-helper{font-size:10.5px;color:var(--muted);margin:0}
.field-error{font-size:10.5px;color:var(--red);font-weight:700;margin:0}
.panel-form select:disabled{background:var(--cream);color:var(--muted);cursor:not-allowed}
.panel-form input[readonly]{background:var(--cream);color:var(--ink)}
.panel-form select[aria-invalid="true"],.panel-form input[aria-invalid="true"]{border-color:var(--red)}

#course-list-filters select{border:1.5px solid var(--line);border-radius:12px;padding:10px 12px;font-size:12px;color:var(--ink);font-family:inherit;min-width:180px}
#course-list-filters select:focus{outline:none;border-color:var(--blue)}
