/* ============ Tokens ============ */
:root {
  --ink: #0e1116;
  --ink-2: #475160;
  --muted: #7b8492;
  --line: #e8eaef;
  --line-2: #eef0f4;
  --bg: #f5f6f8;
  --surface: #ffffff;
  /* Accent. Names kept as --teal* so existing rules pick it up. */
  --teal: #ff6f7d;
  --teal-d: #f0485a;
  --teal-ink: #8a2230;
  --teal-soft: #ffeef0;
  --red: #f24454;
  --red-d: #e02e44;
  --violet: #6f5bff;
  --coral: #ff7a59;
  --amber: #e0922f;
  --green: #1f9d57;
  --ink-bar: #15171c;
  --danger: #e5484d;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(13,17,22,.05), 0 4px 14px rgba(13,17,22,.04);
  --shadow-md: 0 14px 40px rgba(13,17,22,.12);
  --shadow-pop: 0 20px 60px rgba(13,17,22,.22);
  --side-w: 232px;
  --font: 'Atkinson Hyperlegible', 'Atkinson Hyperlegible Next', system-ui, -apple-system, sans-serif;
  --display: 'Atkinson Hyperlegible', 'Atkinson Hyperlegible Next', system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
h1 { font-size: 28px; letter-spacing: -.02em; }
h2 { font-size: 18px; letter-spacing: -.01em; }
h3 { font-size: 16px; }
.muted { color: var(--muted); }
.link { color: var(--teal-d); font-weight: 600; font-size: 14px; }
.link:hover { text-decoration: underline; }
code { background: var(--line-2); padding: 1px 6px; border-radius: 6px; font-size: 13px; }
::selection { background: rgba(0,205,176,.25); }

/* ============ Buttons ============ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45em; font: inherit; font-weight: 600; font-size: 14px; border: 1.5px solid transparent; border-radius: 999px; padding: 9px 16px; cursor: pointer; transition: .16s ease; white-space: nowrap; }
.btn--primary { background: var(--ink); color: #fff; }
.btn--primary:hover { background: #000; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn--primary:disabled { background: #aeb4bd; cursor: not-allowed; transform: none; box-shadow: none; }
.btn--soft { background: var(--teal-soft); color: var(--teal-d); }
.btn--soft:hover { background: #d5f6ef; }
.btn--ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: #cfd5dc; }
.btn--danger { background: #fdecec; color: var(--danger); }
.btn--danger:hover { background: #fbdcdc; }
.btn--red { background: var(--red); color: #fff; }
.btn--red:hover { background: var(--red-d); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn--lg { padding: 12px 22px; font-size: 15px; }
.btn--sm { padding: 6px 12px; font-size: 13px; }
.icon-btn { background: none; border: 0; cursor: pointer; color: var(--muted); font-size: 18px; line-height: 1; padding: 4px 8px; border-radius: 8px; transition: .15s; }
.icon-btn:hover { background: var(--line-2); color: var(--ink); }
.icon-btn--sm { font-size: 13px; padding: 3px 6px; }

/* ============ App shell ============ */
#app { display: flex; min-height: 100vh; }
.sidebar { width: var(--side-w); flex: none; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 40; }
.logo { display: flex; align-items: center; gap: 8px; padding: 20px 20px 18px; font-weight: 800; font-size: 20px; letter-spacing: -.04em; }
.logo__mark { width: 30px; height: 30px; display: grid; place-items: center; background: var(--red); color: #fff; border-radius: 9px; font-size: 19px; }
.logo__ai { font-size: 12px; font-weight: 700; color: var(--teal-d); background: var(--teal-soft); padding: 2px 6px; border-radius: 6px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; padding: 6px 12px; flex: 1; overflow-y: auto; }
.side-link { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; color: var(--ink-2); font-weight: 500; font-size: 14.5px; transition: .14s; cursor: pointer; border: 0; background: none; width: 100%; text-align: left; font-family: inherit; }
.side-link:hover { background: var(--bg); color: var(--ink); }
.side-link.active { background: var(--teal-soft); color: var(--teal-ink); font-weight: 600; }
.side-link__ico { width: 22px; text-align: center; font-size: 16px; }
.side-foot { padding: 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.side-link--btn { color: var(--muted); font-size: 13.5px; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 6px 8px; }
.side-user__info { overflow: hidden; }
.side-user__info strong { display: block; font-size: 13.5px; }
.side-user__info small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 34px; height: 34px; flex: none; border-radius: 50%; background: linear-gradient(135deg, var(--teal), var(--violet)); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.avatar--sm { width: 28px; height: 28px; font-size: 11px; }
.avatar--top { width: 32px; height: 32px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; height: 56px; background: var(--ink-bar); display: flex; align-items: center; gap: 14px; padding: 0 16px; }
.topbar__burger { display: none; background: none; border: 0; font-size: 22px; cursor: pointer; color: #fff; }
/* school / programme selector */
.school-select { display: flex; align-items: center; gap: 9px; color: #fff; background: none; border: 0; font: inherit; cursor: pointer; padding: 7px 10px; border-radius: 9px; transition: background .15s; max-width: 320px; }
.school-select:hover { background: rgba(255,255,255,.08); }
.school-select__mark { width: 26px; height: 26px; flex: none; display: grid; place-items: center; background: var(--red); color: #fff; border-radius: 8px; font-weight: 800; font-size: 16px; }
.school-select__name { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.school-select__caret { opacity: .6; font-size: 10px; }
.topbar__search { position: relative; flex: 1; max-width: 480px; margin: 0 auto; display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14); border-radius: 10px; padding: 8px 12px; color: rgba(255,255,255,.65); }
.topbar__search:focus-within { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.3); }
.topbar__search .search-ai { width: 24px; height: 24px; flex: none; border-radius: 7px; display: grid; place-items: center; background: linear-gradient(135deg, var(--red), var(--violet)); color: #fff; font-size: 13px; }
.topbar__search input { flex: 1; border: 0; background: none; font: inherit; font-size: 14px; color: #fff; outline: none; }
.topbar__search input::placeholder { color: rgba(255,255,255,.6); }
.topbar__kbd { font-size: 11px; color: rgba(255,255,255,.5); border: 1px solid rgba(255,255,255,.2); border-radius: 6px; padding: 2px 7px; }
.search-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-md); overflow: hidden; z-index: 50; max-height: 360px; overflow-y: auto; }
.search-hit { display: flex; align-items: center; justify-content: space-between; padding: 11px 14px; transition: background .12s; }
.search-hit:hover { background: var(--bg); }
.search-hit span { font-size: 14px; font-weight: 500; }
.search-hit small { font-size: 12px; color: var(--muted); }
.search-empty { padding: 14px; font-size: 13.5px; color: var(--muted); }
.topbar__actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.top-icon { position: relative; width: 36px; height: 36px; border-radius: 9px; background: none; border: 0; cursor: pointer; color: rgba(255,255,255,.85); font-size: 16px; display: grid; place-items: center; transition: background .15s; }
.top-icon:hover { background: rgba(255,255,255,.1); color: #fff; }
.top-icon__badge { position: absolute; top: 3px; right: 3px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; }
.top-icon__dot { position: absolute; top: 7px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
.avatar--top { width: 30px; height: 30px; margin-left: 4px; }

.outlet { flex: 1; }
.page { max-width: 1080px; margin: 0 auto; padding: 30px 28px 80px; }
.scrim { position: fixed; inset: 0; background: rgba(13,17,22,.4); z-index: 35; }

/* ============ Shared bits ============ */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head p { margin-top: 5px; font-size: 14.5px; }
.page-head__title { display: flex; align-items: center; gap: 14px; }
.course-dot { width: 14px; height: 14px; border-radius: 5px; flex: none; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 14px; display: flex; gap: 7px; align-items: center; }
.crumbs a:hover { color: var(--teal-d); }
.crumbs span { opacity: .5; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; margin-bottom: 18px; }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel__head h2 { display: flex; align-items: center; gap: 8px; }
.panel__head-actions { display: flex; gap: 8px; }
.count { font-size: 12px; font-weight: 700; background: var(--bg); color: var(--muted); border-radius: 999px; padding: 1px 9px; }

.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; }
.chip--frame { background: #f0eefe; border-color: #e2ddfd; color: var(--violet); }
.chip--type { background: var(--teal-soft); border-color: #cdf3eb; color: var(--teal-d); }
.chip--todo { background: #fff5e9; border-color: #fde7c8; color: var(--amber); }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }

.status { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 10px; }
.status--draft { background: #eef0f4; color: #6a7280; }
.status--inprogress { background: #fff3e0; color: var(--amber); }
.status--published { background: #e7f8ef; color: var(--green); }

.empty { text-align: center; padding: 60px 20px; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius-lg); }
.empty__ico { font-size: 32px; width: 64px; height: 64px; margin: 0 auto 14px; display: grid; place-items: center; background: var(--teal-soft); color: var(--teal-d); border-radius: 18px; }
.empty h2 { margin-bottom: 6px; }
.empty p { margin-bottom: 18px; }
.empty-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.empty-inline { font-size: 14px; padding: 10px 0; }
.hint { font-size: 12.5px; margin-top: 10px; }

/* AI flourishes */
.ai-tag { font-size: 11px; font-weight: 700; color: var(--teal-d); background: var(--teal-soft); border-radius: 999px; padding: 3px 9px; letter-spacing: .02em; }
.ai-tag--inline { font-weight: 600; }
.ai-note { font-size: 14px; color: var(--ink-2); background: linear-gradient(135deg, rgba(0,205,176,.08), rgba(111,91,255,.06)); border: 1px solid rgba(0,205,176,.2); border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; }
.ai-thinking { display: flex; align-items: center; gap: 10px; padding: 18px; color: var(--teal-d); font-weight: 500; font-size: 14.5px; }
.spin { width: 16px; height: 16px; border: 2px solid rgba(0,205,176,.3); border-top-color: var(--teal-d); border-radius: 50%; animation: spin .7s linear infinite; }
.spin--sm { width: 13px; height: 13px; border-width: 2px; display: inline-block; vertical-align: -1px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ Dashboard ============ */
.dash-hero { background: linear-gradient(120deg, #0a4a40, #06302a); color: #fff; border-radius: var(--radius-lg); padding: 28px 30px; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; position: relative; overflow: hidden; }
.dash-hero::after { content: "✦"; position: absolute; right: -10px; top: -20px; font-size: 200px; color: rgba(0,205,176,.10); }
.dash-hero h1 { font-family: var(--display); font-weight: 600; font-size: 26px; max-width: 560px; position: relative; }
.dash-hero p { color: #bfe9df; margin-top: 8px; font-size: 14.5px; position: relative; }
.dash-hero p strong { color: #fff; }
.dash-hero__eyebrow { color: var(--teal); font-weight: 600; font-size: 13.5px; margin-bottom: 6px; }
.dash-hero .btn { position: relative; flex: none; }
.dash-hero .btn--primary { background: var(--teal); color: var(--teal-ink); }
.dash-hero .btn--primary:hover { background: #fff; }

.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.kpi__num { font-family: var(--display); font-weight: 700; font-size: 32px; line-height: 1; }
.kpi__label { font-size: 13px; color: var(--muted); margin-top: 4px; }

.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.task-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.task { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.task__ico { width: 30px; height: 30px; flex: none; display: grid; place-items: center; background: var(--teal-soft); color: var(--teal-d); border-radius: 9px; font-size: 14px; }
.task__text { flex: 1; font-size: 14px; }
.mini-units { display: flex; flex-direction: column; gap: 8px; }
.mini-unit { display: flex; align-items: center; gap: 11px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px; transition: .14s; }
.mini-unit:hover { border-color: #cfd5dc; background: var(--bg); }
.mini-unit > div { flex: 1; min-width: 0; }
.mini-unit strong { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-unit small { font-size: 12.5px; }

.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.quick { border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 4px; transition: .16s; }
.quick:hover { border-color: transparent; box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.quick__ico { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; font-size: 19px; margin-bottom: 8px; }
.quick strong { font-size: 14.5px; }
.quick small { font-size: 12.5px; color: var(--muted); }

/* greeting strip */
.greeting { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.greeting h1 { font-family: var(--display); font-weight: 600; font-size: 26px; }
.greeting p { color: var(--muted); font-size: 14.5px; margin-top: 4px; }
.greeting p strong { color: var(--ink); }

/* ===== Learning library row ===== */
.panel__head .go-lib { }
.lib-row { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.lib-row::-webkit-scrollbar { height: 8px; }
.lib-row::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }
.lib-card { position: relative; flex: 0 0 200px; height: 150px; border-radius: 16px; overflow: hidden; cursor: pointer; scroll-snap-align: start; box-shadow: var(--shadow-sm); transition: transform .16s, box-shadow .16s; display: flex; flex-direction: column; justify-content: flex-end; }
.lib-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.lib-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05) 40%, rgba(0,0,0,.62)); }
.lib-card__crown { position: absolute; top: 10px; left: 10px; z-index: 2; width: 26px; height: 26px; border-radius: 8px; background: var(--amber); color: #fff; display: grid; place-items: center; font-size: 14px; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.lib-card__text { position: relative; z-index: 2; padding: 12px 14px; color: #fff; }
.lib-card__text strong { display: block; font-size: 14.5px; line-height: 1.25; text-shadow: 0 1px 4px rgba(0,0,0,.4); }
.lib-card__text small { font-size: 12px; opacity: .9; }

/* ===== Modules grid ===== */
.modules-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px 12px; }
.mod-tile { display: flex; align-items: center; gap: 13px; padding: 12px 12px; border-radius: 12px; cursor: pointer; transition: background .14s; text-align: left; background: none; border: 0; font: inherit; width: 100%; }
.mod-tile:hover { background: var(--bg); }
.mod-tile__ico { position: relative; width: 42px; height: 42px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 20px; }
.mod-tile__badge { position: absolute; top: -4px; right: -4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; }
.mod-tile__txt strong { display: block; font-size: 14px; font-weight: 500; color: var(--ink); }
.mod-tile__txt small { font-size: 12px; color: var(--muted); }
.panel__drag { color: var(--line); letter-spacing: 1px; cursor: grab; font-size: 16px; }

/* ===== Courses & classes ===== */
.cc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cc-card { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; cursor: pointer; transition: .16s; }
.cc-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.cc-card__cover { height: 84px; position: relative; }
.cc-card__cover span { position: absolute; left: 12px; bottom: 10px; background: rgba(0,0,0,.35); color: #fff; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; backdrop-filter: blur(4px); }
.cc-card__body { padding: 14px 16px; }
.cc-card__body h3 { font-size: 15px; margin-bottom: 6px; }
.cc-card__body .muted { font-size: 12.5px; }
.cc-card__foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.cc-avatars { display: flex; }
.cc-avatars .avatar { width: 26px; height: 26px; font-size: 10px; border: 2px solid #fff; margin-left: -7px; }
.cc-avatars .avatar:first-child { margin-left: 0; }

/* ===== Avatars / role tags / sidebar user ===== */
.avatar--lg { width: 56px; height: 56px; font-size: 18px; }
.avatar--xl { width: 76px; height: 76px; font-size: 26px; }
.side-user__info { flex: 1; min-width: 0; }
.role-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--red-d); background: var(--teal-soft); border-radius: 999px; padding: 4px 11px; margin-bottom: 4px; align-self: flex-start; }
.role-tag--t { color: var(--violet); background: #efeaff; }
#logoutBtn { font-size: 16px; }

/* ===== Login ===== */
.login { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100vh; }
.login__brand {
  background: linear-gradient(148deg, #23b9e7 0%, #29c7a1 52%, #5970d9 100%);
  color: #fff;
  padding: clamp(34px, 5vw, 58px);
  position: relative;
  overflow: hidden;
}
.login__brand-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(18px, 3vh, 28px);
  max-width: 620px;
  padding-top: clamp(8px, 4vh, 44px);
}
.logo--login {
  color: #fff;
  gap: 18px;
}
.logo--login .logo__mark {
  width: clamp(110px, 12vw, 140px);
  height: clamp(110px, 12vw, 140px);
  border-radius: 28px;
  background: transparent;
  color: var(--school-purple);
  box-shadow: none;
}
.logo--login .logo__mark-img {
  padding: 0;
  background: transparent;
}
.logo--login .logo__name {
  color: #fff;
  font-size: clamp(42px, 4.8vw, 58px);
}
.logo--login .logo__ai { background: rgba(255,255,255,.2); color: #fff; }
.login__pitch { margin-top: clamp(28px, 6vh, 72px); position: relative; }
.login__pitch h1 { font-family: var(--display); font-weight: 700; font-size: clamp(36px, 4.5vw, 58px); line-height: 1.06; max-width: 560px; color: #fff; }
.login__pitch p { margin-top: 18px; font-size: 17px; line-height: 1.55; color: rgba(255,255,255,.9); max-width: 470px; }
.login__points { list-style: none; display: flex; flex-direction: column; gap: 10px; position: relative; }
.login__points li { font-size: 15.5px; color: rgba(255,255,255,.95); }
.login__brandfoot { font-size: 13px; color: rgba(255,255,255,.7); position: relative; }
.login__panel { display: grid; place-items: start center; padding: clamp(38px, 6vh, 64px) 24px 40px; background: var(--bg); }
.login__form { width: 100%; max-width: 380px; }
.login__lang { margin-bottom: 18px; }
.login__form > h2 { font-size: 24px; }
.login__form > .muted { margin: 6px 0 24px; font-size: 14.5px; }
.login__sso { display: grid; gap: 10px; margin-bottom: 18px; }
.login__google {
  width: 100%;
  justify-content: center;
  gap: 10px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .07);
}
.login__google:hover:not(:disabled) { border-color: var(--teal); background: var(--teal-soft); }
.login__google:disabled { cursor: not-allowed; opacity: .64; box-shadow: none; }
.login__google.is-loading { opacity: .72; }
.login__google-mark {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #4285f4;
  background: #f7fbff;
  border: 1px solid #dbeafe;
  font-weight: 800;
}
.login__auth-note { font-size: 12.5px; line-height: 1.45; color: var(--muted); margin: 0; }
.login__auth-note--warn { color: #9a3412; }
.login__or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.login__or::before,
.login__or::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.login__form form { display: flex; flex-direction: column; }
.login__submit { width: 100%; margin-top: 6px; }
.login__err { background: #fdecec; color: var(--danger); font-size: 13.5px; border-radius: 9px; padding: 9px 12px; margin-bottom: 14px; }
.login__demos { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 20px; }
.login__demos-h { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.login__demo-list { display: flex; flex-direction: column; gap: 8px; }
.demo-acct { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; cursor: pointer; transition: .14s; font: inherit; text-align: left; }
.demo-acct:hover { border-color: var(--red); background: var(--teal-soft); }
.demo-acct__role { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; border-radius: 6px; padding: 3px 8px; }
.demo-acct__role--admin { background: var(--teal-soft); color: var(--red-d); }
.demo-acct__role--teacher { background: #efeaff; color: var(--violet); }
.demo-acct__email { display: grid; gap: 1px; min-width: 0; font-size: 13.5px; color: var(--ink-2); }
.demo-acct__email strong,
.demo-acct__email small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.demo-acct__email strong { color: var(--ink); font-size: 13px; }
.demo-acct__email small { color: var(--muted); font-size: 12px; }
.login__note { margin-top: 14px; font-size: 12px; color: var(--muted); }
.login__note code { font-size: 11px; }
form.shake { animation: shake .4s; }
@keyframes shake { 0%,100%{transform:translateX(0)} 20%,60%{transform:translateX(-6px)} 40%,80%{transform:translateX(6px)} }

/* ===== Data tables (admin / directory) ===== */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.dtable { width: 100%; border-collapse: collapse; font-size: 14px; }
.dtable thead th { text-align: left; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; padding: 12px 16px; background: var(--bg); border-bottom: 1px solid var(--line); white-space: nowrap; }
.dtable td { padding: 12px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.dtable tbody tr:last-child td { border-bottom: 0; }
.dtable tbody tr[data-teacher], .dtable tbody tr[data-course], .dtable tbody tr[data-student] { cursor: pointer; transition: background .12s; }
.dtable tbody tr[data-teacher]:hover, .dtable tbody tr[data-course]:hover, .dtable tbody tr[data-student]:hover { background: var(--bg); }
.cellrow { display: flex; align-items: center; gap: 10px; }
.cellrow strong { font-weight: 600; font-size: 14px; }
.cellrow small { display: block; }
.dtable__act { text-align: right; white-space: nowrap; }
.link--button { border: 0; background: transparent; font: inherit; cursor: pointer; padding: 0; }
.kpi-row--6 { grid-template-columns: repeat(6, 1fr); }

/* ===== Teacher cards ===== */
.teacher-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; text-align: center; cursor: pointer; transition: .16s; display: flex; flex-direction: column; align-items: center; }
.teacher-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.teacher-card .avatar--lg { margin-bottom: 12px; }
.teacher-card h3 { font-size: 16px; }
.teacher-card__email { font-size: 13px; color: var(--muted); margin-top: 6px; word-break: break-all; }
.teacher-card__stats { display: flex; gap: 18px; margin: 16px 0; font-size: 13px; color: var(--ink-2); }
.teacher-card__stats strong { color: var(--ink); }
.teacher-card__programmes { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin: -2px 0 14px; }
.teacher-card__programmes span { border-radius: 999px; background: var(--bg); color: var(--muted); padding: 4px 8px; font-size: 11px; font-weight: 800; }
.teacher-card__foot { display: flex; gap: 8px; width: 100%; }
.teacher-card__foot .btn { flex: 1; }

.impersonation-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; padding: 8px 26px; background: #1d1d1d; color: #fff; font-size: 13px; font-weight: 800; }
.impersonation-bar button { border: 0; border-radius: 7px; background: #fff; color: #1d1d1d; padding: 8px 12px; font: inherit; font-size: 12px; font-weight: 900; cursor: pointer; }

.teacher-flow-grid, .backend-grid, .backend-columns { display: grid; gap: 14px; }
.teacher-flow-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.teacher-flow-grid--wide { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.teacher-flow-card, .backend-card { border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 16px; text-align: left; transition: .16s; }
.teacher-flow-card:hover, .backend-card:hover, .watch-list button:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.teacher-flow-card__top { display: flex; align-items: center; gap: 10px; }
.teacher-flow-card__top strong, .teacher-flow-card__top small { display: block; }
.teacher-flow-card__top strong { color: var(--ink); font-size: 14px; }
.teacher-flow-card__top small, .teacher-flow-card p { color: var(--muted); font-size: 12.5px; }
.teacher-flow-card__mix { display: flex; flex-wrap: wrap; gap: 6px; margin: 13px 0 9px; }
.teacher-flow-card__mix span { border-radius: 999px; background: var(--bg); color: var(--school-purple); padding: 4px 8px; font-size: 11px; font-weight: 900; }
.teacher-flow-card > div:last-child { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.teacher-flow-card button, .teacher-flow-card a, .watch-list button { border: 0; border-radius: 7px; font: inherit; cursor: pointer; font-size: 12px; font-weight: 900; }
.teacher-flow-card button { background: var(--school-purple); color: #fff; padding: 8px 10px; }
.teacher-flow-card a { display: inline-flex; align-items: center; background: var(--bg); color: var(--ink-2); padding: 8px 10px; }
.backend-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 18px; }
.backend-card { min-height: 122px; cursor: pointer; font: inherit; }
.backend-card span, .teacher-debug span { color: var(--muted); font-size: 12px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.backend-card strong { display: block; margin: 8px 0; color: var(--school-purple); font-size: 34px; line-height: 1; }
.backend-card small { color: var(--muted); font-size: 12.5px; line-height: 1.35; font-weight: 700; }
.backend-columns { grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); margin-bottom: 18px; }
.watch-list { display: grid; gap: 10px; }
.watch-list button { width: 100%; background: var(--bg); padding: 12px; text-align: left; }
.watch-list strong, .watch-list small { display: block; }
.watch-list strong { color: var(--ink); font-size: 14px; }
.watch-list small { margin-top: 3px; color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.programme-audit { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.programme-audit div { border-radius: 12px; background: var(--bg); padding: 14px; }
.programme-audit span, .programme-audit small, .programme-audit strong { display: block; }
.programme-audit span { color: var(--muted); font-size: 12px; font-weight: 900; }
.programme-audit strong { margin-top: 7px; color: var(--school-purple); font-size: 26px; line-height: 1; }
.programme-audit small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.teacher-debug { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.teacher-debug strong { display: block; margin-top: 6px; color: var(--ink); font-size: 20px; }
.teacher-debug p { margin-top: 5px; color: var(--muted); font-size: 13px; }

/* ===== AI budget admin ===== */
.ai-budget-hero { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.ai-budget-hero article, .feature-spend-grid article { border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 18px; }
.ai-budget-hero span, .feature-spend-grid span { display: block; color: var(--muted); font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }
.ai-budget-hero strong { display: block; margin-top: 8px; color: var(--school-purple); font-size: 30px; line-height: 1; }
.ai-budget-hero small, .feature-spend-grid small { display: block; margin-top: 9px; color: var(--muted); font-size: 12.5px; line-height: 1.35; font-weight: 700; }
.ai-budget-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); gap: 18px; align-items: start; }
.ai-budget-main, .ai-budget-side { display: grid; gap: 18px; min-width: 0; }
.ai-budget-main .panel { min-width: 0; }
.ai-budget-meter, .ai-table-meter { height: 9px; border-radius: 999px; background: var(--line-2); overflow: hidden; margin-top: 13px; }
.ai-budget-meter i, .ai-table-meter i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #22b86a, var(--school-purple)); }
.ai-budget-meter--warm i, .ai-table-meter i.warn { background: linear-gradient(90deg, #f9b72f, #ff8c42); }
.ai-table-meter i.danger { background: linear-gradient(90deg, #f04438, #b42318); }
.ai-usage-table { table-layout: fixed; }
.ai-usage-table th:nth-child(1) { width: 24%; }
.ai-usage-table th:nth-child(2) { width: 22%; }
.ai-usage-table th:nth-child(3) { width: 14%; }
.ai-usage-table th:nth-child(4) { width: 8%; }
.ai-usage-table th:nth-child(5) { width: 12%; }
.ai-usage-table th:nth-child(6) { width: 20%; }
.ai-usage-table td { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.ai-usage-table .dtable__act { white-space: normal; }
.ai-usage-table .dtable__act button { margin: 0 7px 5px 0; }
.ai-usage-table td strong, .ai-usage-table td small { display: block; }
.ai-usage-table td small { margin-top: 4px; }
.ai-status { display: inline-flex; border-radius: 999px; padding: 5px 9px; font-size: 11px; font-weight: 900; }
.ai-status--ok { background: #eef8f5; color: #17626b; }
.ai-status--limited { background: #f4f0fa; color: var(--school-purple); }
.ai-status--warn { background: #fff8e9; color: #a15f10; }
.ai-status--danger { background: #fff0ee; color: #b42318; }
.feature-spend-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.feature-spend-grid strong { display: block; margin-top: 8px; color: var(--ink); font-size: 22px; }
.ai-alert-list { display: grid; gap: 10px; }
.ai-alert-list button { border: 1px solid var(--line); border-radius: 12px; background: var(--bg); padding: 12px; text-align: left; font: inherit; cursor: pointer; }
.ai-alert-list button strong, .ai-alert-list button span { display: block; }
.ai-alert-list button span { margin-top: 4px; color: var(--muted); font-size: 12.5px; }
.ai-alert-list .is-warn { border-color: #ffe2a8; background: #fffaf0; }
.ai-alert-list .is-danger { border-color: #ffd1cb; background: #fff6f5; }
.supabase-blueprint { display: grid; gap: 10px; }
.supabase-blueprint div { display: grid; grid-template-columns: 28px 1fr; gap: 2px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); padding: 12px; }
.supabase-blueprint span { grid-row: 1 / span 2; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: var(--school-purple); color: #fff; font-weight: 900; }
.supabase-blueprint strong { color: var(--ink); font-size: 13px; }
.supabase-blueprint small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.schema-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.schema-chips span { border-radius: 999px; background: var(--teal-soft); color: var(--school-purple); padding: 6px 9px; font-size: 11px; font-weight: 900; }
.ai-policy-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.ai-policy-summary div { border: 1px solid var(--line); border-radius: 12px; background: var(--bg); padding: 12px; }
.ai-policy-summary span, .ai-policy-summary small { display: block; color: var(--muted); font-size: 11.5px; font-weight: 800; }
.ai-policy-summary strong { display: block; margin: 5px 0 3px; color: var(--school-purple); font-size: 20px; }

/* ===== Student profile ===== */
.profile-hero { display: flex; align-items: center; gap: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px 26px; margin-bottom: 18px; }
.profile-hero__main { flex: 1; }
.profile-hero h1 { font-family: var(--display); font-weight: 600; }
.profile-hero--deep { align-items: flex-start; }
.student-profile-tags, .student-profile-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.student-profile-actions { justify-content: flex-end; margin-top: 0; }
.student-overview-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.student-stat { min-height: 112px; border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 18px; text-align: left; font: inherit; cursor: pointer; transition: .16s; }
.student-stat:hover, .student-course-grade:hover, .student-cpoms-card:hover, .next-step-list button:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.student-stat span, .student-stat small { display: block; }
.student-stat span { color: var(--muted); font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }
.student-stat strong { display: block; margin: 8px 0 4px; color: var(--school-purple); font-size: 31px; line-height: 1; font-weight: 900; }
.student-stat small { color: var(--muted); font-size: 12.5px; line-height: 1.35; font-weight: 700; }
.student-profile-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 340px); gap: 18px; align-items: start; }
.student-profile-main, .student-profile-side { display: grid; gap: 18px; min-width: 0; }
.student-profile-main .panel { min-width: 0; }
.student-gradebook { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.student-course-grade { border: 1px solid var(--line); border-top: 4px solid var(--course); border-radius: 14px; background: #fff; padding: 16px; transition: .16s; }
.student-course-grade > div:first-child { display: grid; grid-template-columns: 12px 1fr; gap: 3px 10px; align-items: center; }
.student-course-grade > div:first-child .dot { grid-row: 1 / span 2; }
.student-course-grade strong, .student-course-grade small { display: block; }
.student-course-grade > div:first-child strong { color: var(--ink); font-size: 14px; }
.student-course-grade > div:first-child small { color: var(--muted); font-size: 12px; }
.student-course-grade__score { display: flex; align-items: end; justify-content: space-between; gap: 10px; margin: 14px 0 10px; }
.student-course-grade__score strong { color: var(--school-purple); font-size: 28px; line-height: 1; }
.student-course-grade__score small, .student-course-grade p { color: var(--muted); font-size: 12.5px; }
.student-course-grade p { margin-top: 10px; line-height: 1.35; }
.assessment-evidence-list { display: grid; gap: 12px; }
.assessment-evidence-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: stretch; border: 1px solid #e8f0f8; border-radius: 16px; background: #fff; padding: 14px; }
.assessment-evidence-card__main { min-width: 0; display: grid; gap: 12px; }
.assessment-evidence-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.assessment-evidence-card__top > div { min-width: 0; }
.assessment-evidence-card__top strong { display: block; color: var(--ink); font-size: 14.5px; line-height: 1.3; overflow-wrap: anywhere; }
.assessment-evidence-card__top small { display: block; margin-top: 3px; color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.assessment-evidence-card__meta { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; }
.assessment-evidence-card__meta div { min-width: 0; border-radius: 12px; background: #f7fbff; padding: 10px; }
.assessment-evidence-card__meta span { display: block; color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }
.assessment-evidence-card__meta strong { display: block; margin-top: 5px; color: var(--ink); font-size: 16px; line-height: 1.2; }
.assessment-evidence-card__meta small { color: var(--muted); font-size: 12px; }
.assessment-evidence-card__meta p { margin-top: 5px; color: var(--ink-2); font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.assessment-evidence-card__action { display: flex; align-items: center; justify-content: flex-end; }
.assessment-evidence-card__action .btn { white-space: nowrap; }
.status-pill--graded { background: #eef8f5; color: #17626b; }
.status-pill--review { background: #fff8e9; color: #a15f10; }
.status-pill--missing { background: #fff0ee; color: #b42318; }
.evidence-timeline { display: grid; gap: 10px; }
.evidence-timeline article { position: relative; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); padding: 13px 14px 13px 42px; }
.evidence-timeline article::before { content: ''; position: absolute; left: 17px; top: 17px; width: 10px; height: 10px; border-radius: 999px; background: var(--school-purple); box-shadow: 0 0 0 4px var(--teal-soft); }
.evidence-timeline time { display: block; color: var(--muted); font-size: 11.5px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }
.evidence-timeline strong { display: block; margin-top: 3px; color: var(--ink); font-size: 14px; }
.evidence-timeline p { margin-top: 4px; color: var(--ink-2); font-size: 13px; line-height: 1.4; }
.profile-side-action, .profile-side-link { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; margin-top: 14px; border: 0; border-radius: 8px; background: var(--teal-soft); color: var(--school-purple); padding: 0 12px; font: inherit; font-size: 12.5px; font-weight: 900; cursor: pointer; }
.profile-side-link { width: 100%; text-decoration: none; }
.student-cpoms-panel { border-color: #ffe0db; background: linear-gradient(180deg, #fff, #fff8f7); }
.student-cpoms-list { display: grid; gap: 10px; }
.student-cpoms-card { width: 100%; border: 1px solid #f3ddd9; border-radius: 12px; background: #fff; padding: 12px; text-align: left; font: inherit; cursor: pointer; transition: .16s; }
.student-cpoms-card span { display: inline-flex; border-radius: 999px; background: #fff0ee; color: #b42318; padding: 3px 8px; font-size: 11px; font-weight: 900; }
.student-cpoms-card strong { display: block; margin-top: 8px; color: var(--ink); font-size: 14px; }
.student-cpoms-card small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; font-weight: 800; }
.student-cpoms-card p { margin-top: 8px; color: var(--ink-2); font-size: 12.5px; line-height: 1.35; }
.student-cpoms-card--low span { background: #eef8f5; color: #17626b; }
.student-cpoms-card--medium span { background: #fff8e9; color: #a15f10; }
.next-step-list { display: grid; gap: 9px; }
.next-step-list button { border: 0; border-radius: 10px; background: var(--bg); padding: 12px; text-align: left; font: inherit; cursor: pointer; transition: .16s; }
.next-step-list strong, .next-step-list small { display: block; }
.next-step-list strong { color: var(--ink); font-size: 13.5px; }
.next-step-list small { margin-top: 3px; color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.student-evidence-modal { display: grid; gap: 14px; }
.student-evidence-modal section { border: 1px solid var(--line); border-radius: 12px; background: var(--bg); padding: 13px; }
.student-evidence-modal section span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 11.5px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }
.student-evidence-modal p { color: var(--ink-2); font-size: 14px; line-height: 1.48; }
.student-rubric-list { display: grid; gap: 8px; }
.student-rubric-list div { display: flex; justify-content: space-between; gap: 10px; border-radius: 8px; background: #fff; padding: 9px 10px; }
.student-rubric-list strong, .student-rubric-list small { font-size: 13px; }
.student-evidence-score { display: inline-flex; justify-self: start; border-radius: 999px; background: var(--school-purple); color: #fff; padding: 8px 12px; font-size: 13px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.kv span { color: var(--muted); }
.grade-mini { display: flex; flex-direction: column; gap: 8px; }
.grade-mini__row { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; background: var(--bg); border-radius: 10px; font-size: 13.5px; }
.grade-mini__score { font-weight: 700; color: var(--red-d); }

/* ===== Directory toolbar ===== */
.dir-toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.dir-search { flex: 1; min-width: 220px; display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 9px 13px; color: var(--muted); }
.dir-search input { flex: 1; border: 0; background: none; font: inherit; font-size: 14px; outline: none; color: var(--ink); }
.dir-filter { border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font: inherit; font-size: 14px; background: #fff; }
.dir-count { font-size: 13px; color: var(--muted); margin-left: auto; }

.roster-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.roster-metric {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 18px;
  box-shadow: 0 14px 38px rgba(15, 80, 125, .06);
}

.roster-metric span,
.roster-metric small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.roster-metric span {
  text-transform: uppercase;
  letter-spacing: .04em;
}

.roster-metric strong {
  display: block;
  margin: 8px 0 4px;
  color: var(--teal-d);
  font-size: 28px;
  line-height: 1.05;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.student-roster-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.roster-sidebar,
.roster-detail {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 16px 46px rgba(15, 80, 125, .07);
}

.roster-sidebar {
  position: sticky;
  top: 96px;
  overflow: hidden;
}

.roster-sidebar__head {
  padding: 18px 18px 12px;
  background:
    radial-gradient(circle at 88% 10%, rgba(220, 255, 71, .24), transparent 32%),
    linear-gradient(135deg, #f6fcff, #fff);
  border-bottom: 1px solid var(--line);
}

.roster-sidebar__head span,
.roster-detail__head span {
  display: block;
  color: var(--teal-d);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.roster-sidebar__head strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 18px;
}

.roster-sidebar__head p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}

.roster-grade-list {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.roster-grade-card,
.roster-class-card {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform .16s, box-shadow .16s, border-color .16s, background .16s;
}

.roster-grade-card {
  border-radius: 16px;
  padding: 13px;
}

.roster-grade-card:hover,
.roster-grade-card.is-active {
  border-color: #cceefa;
  background: #f3fbff;
}

.roster-grade-card span,
.roster-grade-card small,
.roster-class-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.roster-grade-card strong {
  display: block;
  margin: 5px 0 3px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.25;
}

.roster-main {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.roster-toolbar {
  margin-bottom: 0;
}

.roster-class-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.roster-class-card {
  position: relative;
  min-height: 156px;
  overflow: hidden;
  border-color: var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 16px;
}

.roster-class-card:hover,
.roster-class-card.is-active {
  transform: translateY(-2px);
  border-color: #b8eaff;
  box-shadow: 0 18px 42px rgba(15, 80, 125, .11);
}

.roster-class-card.is-active {
  background:
    radial-gradient(circle at 86% 10%, rgba(220, 255, 71, .22), transparent 32%),
    #fff;
}

.roster-class-card__bar {
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
}

.roster-class-card strong {
  display: block;
  margin: 11px 0 4px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.roster-class-card__subjects {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 12px;
}

.roster-detail {
  overflow: hidden;
}

.roster-detail__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.roster-detail__head h2 {
  margin-top: 4px;
  color: var(--ink);
  font-size: 22px;
}

.roster-detail__head p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.roster-table-wrap {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.roster-empty {
  margin: 16px;
}
.pillc { display: inline-block; font-size: 11.5px; font-weight: 600; color: var(--c); background: color-mix(in srgb, var(--c) 13%, #fff); border-radius: 999px; padding: 2px 9px; }

/* ===== Classes ===== */
.classes-page { max-width: 1120px; }
.classes-toolbar { align-items: stretch; }
.classes-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.class-card { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; cursor: pointer; transition: .16s; box-shadow: 0 10px 30px rgba(20, 36, 55, .04); }
.class-card:hover { border-color: rgba(24,151,212,.28); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.class-card[hidden] { display: none; }
.class-card__stripe { height: 6px; }
.class-card__body { padding: 18px; }
.class-card__head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; margin-bottom: 16px; }
.class-card__head > div { min-width: 0; }
.class-card__head h2 { margin: 9px 0 4px; font-size: 19px; line-height: 1.25; overflow-wrap: anywhere; }
.class-meta-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.class-meta-list div { min-width: 0; background: #fbfcff; border: 1px solid var(--line-2); border-radius: 8px; padding: 10px; }
.class-meta-list small,
.class-card__next small,
.class-card__stats small { display: block; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.class-meta-list strong { display: block; margin-top: 5px; font-size: 13px; overflow-wrap: anywhere; }
.class-meta-list em { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; font-style: normal; }
.class-card__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.class-card__stats div { border-radius: 8px; background: linear-gradient(135deg, rgba(24,151,212,.08), rgba(111,91,255,.06)); padding: 11px 12px; }
.class-card__stats strong { display: block; color: var(--teal-d); font-size: 22px; line-height: 1; }
.class-card__stats small { margin-top: 6px; }
.class-subject-strip { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.class-card__next { min-height: 66px; border: 1px solid var(--line-2); border-radius: 8px; padding: 12px; margin-bottom: 14px; }
.class-card__next strong { display: block; margin-top: 5px; line-height: 1.35; overflow-wrap: anywhere; }
.class-card__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.class-detail-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; background: linear-gradient(135deg, color-mix(in srgb, var(--class-color) 13%, #fff), #fff); border: 1px solid var(--line); border-left: 6px solid var(--class-color); border-radius: 8px; padding: 24px; margin-bottom: 18px; }
.class-detail-hero h1 { margin: 10px 0 5px; }
.class-detail-hero p { color: var(--ink-2); }
.class-teacher-stack { display: flex; flex-direction: row-reverse; }
.class-teacher-stack .avatar { margin-left: -8px; border: 2px solid #fff; }
.class-subject-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.class-subject-card { min-width: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.class-subject-card__bar { height: 5px; }
.class-subject-card__body { padding: 16px; }
.class-subject-card h3 { margin: 11px 0 4px; font-size: 17px; }
.class-subject-card__meta { display: flex; gap: 8px; flex-wrap: wrap; margin: 13px 0; }
.class-subject-card__meta span { color: var(--muted); background: var(--bg); border-radius: 999px; padding: 4px 9px; font-size: 12px; font-weight: 700; }

/* ===== Enroll checklist ===== */
.enroll-list { display: flex; flex-direction: column; gap: 6px; max-height: 180px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.enroll { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 8px; font-size: 14px; cursor: pointer; }
.enroll:hover { background: var(--bg); }
.enroll input { accent-color: var(--red); }

/* ============ Planner ============ */
.course-grid, .tutor-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.course-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; cursor: pointer; transition: .18s; text-align: left; padding: 0; font: inherit; }
.course-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.course-card__bar { height: 7px; }
.course-card__body { padding: 18px; }
.course-card__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.course-card h3 { margin-bottom: 4px; }
.course-card__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
.course-card--add, .tutor-card--add { border: 1.5px dashed var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--muted); min-height: 180px; font-weight: 600; }
.course-card--add:hover, .tutor-card--add:hover { border-color: var(--teal); color: var(--teal-d); box-shadow: none; transform: none; }
.plus { font-size: 26px; }

.unit-list { display: flex; flex-direction: column; gap: 12px; }
.unit-row { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 20px; display: flex; gap: 14px; align-items: flex-start; cursor: pointer; transition: .16s; }
.unit-row:hover { box-shadow: var(--shadow-sm); border-color: #cfd5dc; }
.unit-row__main { flex: 1; min-width: 0; }
.unit-row__head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.unit-row__head h3 { font-size: 17px; }
.unit-row__stmt { font-size: 14px; margin-bottom: 12px; }
.unit-row__meta { display: flex; gap: 8px; flex-wrap: wrap; }

/* ============ Unit detail ============ */
.unit-hero { background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--accent); border-radius: var(--radius-lg); padding: 24px 26px; display: flex; justify-content: space-between; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.unit-hero__main { flex: 1; min-width: 260px; }
.unit-hero h1 { font-family: var(--display); font-weight: 600; margin: 10px 0; }
.unit-hero__stmt { font-size: 16px; color: var(--ink-2); max-width: 620px; }
.unit-hero__meta { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.unit-hero__actions { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.unit-hero__actions .btn--primary { background: var(--teal-ink); }

.unit-cols { display: grid; grid-template-columns: 1fr 1.15fr; gap: 18px; align-items: start; }
.inq-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.inq { display: flex; align-items: flex-start; gap: 11px; padding: 11px 12px; background: var(--bg); border-radius: 11px; font-size: 14px; }
.inq__num { width: 22px; height: 22px; flex: none; background: var(--teal-soft); color: var(--teal-d); border-radius: 7px; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.inq span:nth-child(2) { flex: 1; }
.inq .icon-btn { opacity: 0; }
.inq:hover .icon-btn { opacity: 1; }

.progress { height: 7px; background: var(--line-2); border-radius: 999px; overflow: hidden; margin-bottom: 6px; }
.progress__bar { height: 100%; background: linear-gradient(90deg, var(--teal), var(--teal-d)); border-radius: 999px; transition: width .4s; }
.progress__label { font-size: 12.5px; margin-bottom: 14px; }

.lesson-list { display: flex; flex-direction: column; gap: 10px; }
.lesson { display: flex; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; transition: .15s; }
.lesson.is-done { background: #fafbfa; }
.lesson.is-done .lesson__head strong { text-decoration: line-through; color: var(--muted); }
.lesson__check { flex: none; width: 24px; height: 24px; border-radius: 7px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; color: #fff; font-size: 13px; font-weight: 700; display: grid; place-items: center; transition: .15s; }
.lesson.is-done .lesson__check { background: var(--teal); border-color: var(--teal); }
.lesson__body { flex: 1; min-width: 0; }
.lesson__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 3px; }
.lesson__head strong { font-size: 14.5px; }
.lesson__dur { font-size: 12.5px; flex: none; }
.lesson__body p { font-size: 13.5px; }
.lesson__acts { margin: 8px 0 0 16px; font-size: 13px; color: var(--ink-2); display: flex; flex-direction: column; gap: 3px; }
.lesson__menu { display: flex; flex-direction: column; gap: 2px; opacity: 0; }
.lesson:hover .lesson__menu { opacity: 1; }

.ai-suggest { display: flex; flex-direction: column; gap: 10px; }
.ai-pick { display: flex; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; align-items: flex-start; }
.ai-pick:hover { border-color: var(--teal); }
.ai-pick input { margin-top: 3px; accent-color: var(--teal-d); }
.ai-pick strong { display: block; font-size: 14px; }
.ai-pick small { display: block; font-size: 12.5px; margin: 2px 0 6px; }
.ai-pick__acts { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--muted); }

/* ===== Unit planner ===== */
.planner-page { max-width: 1140px; }
.planner-hero { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 16px; }
.planner-hero__cover { height: 116px; }
.planner-hero__body { padding: 16px 24px 18px; }
.planner-hero__body h1 { font-family: var(--display); font-weight: 600; margin: 10px 0 12px; font-size: 30px; }
.planner-hero__meta { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13.5px; color: var(--ink-2); }
.planner-hero__statement { max-width: 780px; margin-top: 14px; color: var(--ink-2); font-size: 15px; line-height: 1.55; }
.planner-hero__actions { position: absolute; top: 14px; right: 16px; display: flex; gap: 8px; }

.planner-insight { display: grid; grid-template-columns: 1.25fr repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 18px; }
.planner-insight article { min-width: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); padding: 14px; }
.planner-insight span { display: block; color: var(--muted); font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.planner-insight strong { display: block; margin-top: 6px; color: var(--ink); font-size: 20px; line-height: 1.15; overflow-wrap: anywhere; }
.planner-insight small { display: block; margin-top: 6px; color: var(--muted); line-height: 1.35; }
.planner-insight__bar { height: 8px; border-radius: 999px; background: var(--line-2); overflow: hidden; margin-top: 10px; }
.planner-insight__bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--teal), var(--red)); }

.planner-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.planner-tab { background: none; border: 0; font: inherit; font-size: 15px; font-weight: 600; color: var(--muted); padding: 12px 16px; cursor: pointer; position: relative; transition: color .15s; }
.planner-tab:hover { color: var(--ink); }
.planner-tab.is-active { color: var(--ink); }
.planner-tab.is-active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 3px; background: var(--red); border-radius: 3px 3px 0 0; }

.planner-layout { display: grid; grid-template-columns: 216px 1fr; gap: 28px; align-items: start; }
.planner-nav { position: sticky; top: 72px; display: flex; flex-direction: column; gap: 18px; max-height: calc(100vh - 90px); overflow-y: auto; }
.pn-group { display: flex; flex-direction: column; gap: 2px; }
.pn-group__label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 6px; padding-left: 11px; }
.pn-link { font-size: 13.5px; color: var(--ink-2); padding: 6px 11px; border-radius: 8px; cursor: pointer; border-left: 2px solid transparent; transition: .14s; }
.pn-link:hover { background: var(--bg); color: var(--ink); }
.pn-link.is-active { color: var(--red-d); background: var(--teal-soft); border-left-color: var(--red); font-weight: 600; }
.pn-addweek { align-self: flex-start; }

.planner-section { scroll-margin-top: 76px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px 24px; margin-bottom: 16px; }
.ps-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.ps-head h3 { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.ps-body { font-size: 14.5px; color: var(--ink-2); }
.ps-text { line-height: 1.65; }
.ps-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.ps-list li { display: flex; align-items: flex-start; gap: 11px; padding: 10px 12px; background: var(--bg); border-radius: 10px; }
.ps-list__txt { flex: 1; }
.ps-bullet { flex: none; width: 22px; height: 22px; border-radius: 7px; background: var(--teal-soft); color: var(--red-d); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.ps-list .icon-btn { opacity: 0; }
.ps-list li:hover .icon-btn { opacity: 1; }
.ps-empty { font-size: 14px; color: var(--muted); }
.linkbtn { background: none; border: 0; color: var(--red-d); font: inherit; font-weight: 600; cursor: pointer; padding: 0; }
.linkbtn:hover { text-decoration: underline; }
.kv2 { display: grid; grid-template-columns: 90px 1fr; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: 14.5px; }
.kv2:last-child { border-bottom: 0; }
.kv2 > span { color: var(--muted); font-weight: 600; font-size: 13px; padding-top: 1px; }
.kv2__v { color: var(--ink); }
.kv2--reflection { grid-template-columns: 130px 1fr; }
.tq-cat { margin-bottom: 16px; }
.tq-cat:last-child { margin-bottom: 0; }
.tq-cat__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.tq-cat__head h4 { font-size: 13.5px; color: var(--ink); }

.exp-list { display: flex; flex-direction: column; gap: 10px; }
.exp-card { display: flex; gap: 14px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 12px; transition: .15s; }
.exp-card:hover { border-color: #cfd5dc; box-shadow: var(--shadow-sm); }
.exp-card__thumb { flex: none; width: 56px; height: 56px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-size: 20px; font-weight: 700; }
.exp-card__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.exp-card__body strong { font-size: 14.5px; }
.exp-card.is-done .exp-card__body strong { text-decoration: line-through; color: var(--muted); }
.exp-card__hint { font-size: 12.5px; }
.exp-card__menu { display: flex; gap: 2px; opacity: 0; }
.exp-card:hover .exp-card__menu { opacity: 1; }

.ai-unit-wizard__shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; min-height: 440px; }
.ai-unit-wizard__aside { border-radius: 18px; background: linear-gradient(145deg, #f2fbff, #f8f4ff); border: 1px solid var(--line); padding: 16px; }
.ai-unit-wizard__aside > span { display: inline-flex; border-radius: 999px; background: #fff; color: var(--red-d); font-size: 11px; font-weight: 900; padding: 5px 9px; }
.ai-unit-wizard__aside strong { display: block; margin-top: 12px; color: var(--ink); line-height: 1.25; }
.ai-unit-wizard__aside small { display: block; margin-top: 4px; color: var(--muted); line-height: 1.35; }
.ai-unit-wizard__steps { display: grid; gap: 7px; margin-top: 18px; }
.ai-unit-wizard__steps button { display: flex; align-items: center; gap: 8px; border: 0; border-radius: 12px; background: rgba(255,255,255,.72); color: var(--ink-2); padding: 8px; text-align: left; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.ai-unit-wizard__steps button span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 8px; background: var(--line-2); color: var(--muted); font-size: 11px; flex: none; }
.ai-unit-wizard__steps button.is-active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.ai-unit-wizard__steps button.is-active span { background: var(--red); color: #fff; }
.ai-unit-wizard__steps button.is-done span { background: var(--teal); color: #fff; }
.ai-unit-wizard__main { min-width: 0; }
.ai-unit-wizard__progress { height: 8px; border-radius: 999px; background: var(--line-2); overflow: hidden; margin-bottom: 18px; }
.ai-unit-wizard__progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--teal), var(--red)); }
.ai-unit-wizard__eyebrow { display: block; color: var(--muted); font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }
.ai-unit-wizard__main h3 { font-size: 22px; margin-bottom: 8px; }
.ai-unit-wizard__main p { color: var(--ink-2); line-height: 1.5; margin-bottom: 14px; }
.ai-unit-wizard__main textarea { width: 100%; min-height: 166px; border: 1.5px solid var(--line); border-radius: 14px; padding: 13px; font: inherit; font-size: 14px; color: var(--ink); resize: vertical; outline: none; }
.ai-unit-wizard__main textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0,205,176,.12); }
.ai-unit-wizard__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.ai-unit-wizard__actions .btn[disabled] { opacity: .45; cursor: not-allowed; }
.ai-unit-wizard__check { margin-top: 14px; }
.ai-unit-wizard__thinking { min-height: 340px; display: grid; place-items: center; text-align: center; align-content: center; gap: 12px; }
.ai-unit-wizard__thinking .spin { width: 34px; height: 34px; }
.ai-unit-wizard__thinking p { max-width: 420px; margin: 0 auto; }

@media (max-width: 900px) {
  .planner-insight { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .planner-layout { grid-template-columns: 1fr; }
  .planner-nav { position: static; flex-direction: row; flex-wrap: wrap; max-height: none; gap: 10px 18px; padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
  .pn-group { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px; }
  .pn-group__label { width: 100%; margin-bottom: 0; }
  .planner-hero__actions { position: static; margin-top: 12px; }
  .planner-hero__cover { height: 80px; }
  .ai-unit-wizard__shell { grid-template-columns: 1fr; }
  .ai-unit-wizard__steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .planner-insight { grid-template-columns: 1fr; }
  .planner-hero__actions { flex-direction: column; }
  .planner-hero__actions .btn { width: 100%; }
  .ai-unit-wizard__steps { grid-template-columns: 1fr; }
  .ai-unit-wizard__actions { flex-direction: column-reverse; }
  .ai-unit-wizard__actions .btn { width: 100%; }
  .assessment-evidence-card,
  .assessment-evidence-card__meta {
    grid-template-columns: 1fr;
  }
  .assessment-evidence-card__top {
    flex-direction: column;
    align-items: flex-start;
  }
  .assessment-evidence-card__action {
    justify-content: flex-start;
  }
  .report-actions {
    justify-content: stretch;
    flex-wrap: wrap;
  }
  .report-actions .btn {
    flex: 1 1 140px;
  }
}

/* ============ Assessments ============ */
.assessment-docket { margin-bottom: 18px; }
.assessment-policy {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 12px;
  background: #eef9ff;
  color: var(--teal-d);
  font-size: 12.5px;
  font-weight: 800;
  white-space: nowrap;
}
.assessment-docket__summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.assessment-docket__summary article {
  border: 1px solid var(--line);
  background: #f8fbfe;
  border-radius: 16px;
  padding: 14px;
}
.assessment-docket__summary span,
.assessment-docket__summary small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.assessment-docket__summary strong {
  display: block;
  color: var(--teal-d);
  font-size: 26px;
  line-height: 1.05;
  margin: 6px 0;
}
.assessment-docket__days {
  display: grid;
  grid-template-columns: repeat(7, minmax(150px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.docket-day {
  min-height: 162px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 12px;
  display: grid;
  gap: 10px;
  align-content: start;
}
.docket-day--ok { border-color: #c9f1e4; background: #fbfffd; }
.docket-day--warn { border-color: #ffe0a3; background: #fffaf0; }
.docket-day--danger { border-color: #ffc2be; background: #fff6f5; }
.docket-day__date,
.docket-day__load { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.docket-day__date strong { color: var(--ink); font-size: 13px; }
.docket-day__date span,
.docket-day__load small,
.docket-day p { color: var(--muted); font-size: 12px; }
.docket-day__load strong { font-size: 24px; line-height: 1; color: var(--ink); }
.docket-day__tasks { display: grid; gap: 7px; }
.docket-day__tasks a,
.docket-day__tasks span {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}
.docket-day__tasks a:hover { color: var(--teal-d); }
.docket-day__tasks span { color: var(--muted); }
.asm-load-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 11.5px;
  font-weight: 900;
  white-space: nowrap;
}
.asm-load-badge--ok { background: #e9fbf2; color: #087a4c; }
.asm-load-badge--warn { background: #fff1d6; color: #a25c00; }
.asm-load-badge--danger { background: #ffe4e1; color: #bb241c; }
.asm-load-badge--muted { background: #eef2f6; color: var(--muted); }
.asm-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.asm-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; transition: .16s; display: flex; flex-direction: column; }
.asm-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.asm-card__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-size: 12.5px; }
.asm-card h3 { margin-bottom: 7px; }
.asm-card__desc { font-size: 13.5px; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.asm-card__foot { display: flex; align-items: center; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-2); font-size: 12.5px; }
.asm-card__meta { margin-left: auto; color: var(--muted); }

.asm-desc { font-size: 15px; color: var(--ink-2); line-height: 1.6; }
.rubric-wrap { overflow-x: auto; }
.rubric { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.rubric th, .rubric td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.rubric thead th { background: var(--bg); font-size: 12px; font-weight: 700; color: var(--ink-2); position: sticky; top: 0; }
.rubric tbody th { background: #fcfdfd; font-weight: 600; width: 160px; }
.rubric__crit { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.rubric__cell { min-height: 20px; outline: none; border-radius: 4px; }
.rubric__cell:focus { box-shadow: 0 0 0 2px rgba(0,205,176,.35); background: #fff; }
.rubric--mini { font-size: 12px; margin-top: 10px; }
.rubric--mini th, .rubric--mini td { padding: 6px 8px; }

.draft-preview { border: 1px solid rgba(0,205,176,.25); background: linear-gradient(135deg, rgba(0,205,176,.05), rgba(111,91,255,.04)); border-radius: 14px; padding: 16px; margin-top: 14px; }
.draft-preview h4 { margin: 8px 0 4px; font-size: 16px; }
.modal__inlinefoot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.schedule-preview {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: #f9fbfd;
  display: grid;
  gap: 12px;
  margin: 12px 0 14px;
}
.schedule-preview--ok { border-color: #c9f1e4; background: #fbfffd; }
.schedule-preview--warn { border-color: #ffe0a3; background: #fffaf0; }
.schedule-preview--danger { border-color: #ffc2be; background: #fff6f5; }
.schedule-preview--muted { background: #f7f9fb; }
.schedule-preview__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}
.schedule-preview__head strong { display: block; color: var(--ink); font-size: 14px; }
.schedule-preview__head p,
.schedule-preview__empty {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  margin-top: 4px;
}
.schedule-preview__head span {
  color: var(--teal-d);
  background: #eef9ff;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.schedule-preview__tasks {
  display: grid;
  gap: 8px;
}
.schedule-preview__tasks > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.schedule-task-pill {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 9px 10px;
}
.schedule-task-pill strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
  font-size: 13px;
}
.schedule-task-pill small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.schedule-task-pill--locked { cursor: default; }
.schedule-preview__students {
  display: grid;
  gap: 8px;
}
.schedule-preview__students div {
  display: grid;
  gap: 2px;
  border-radius: 12px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(226,232,240,.9);
  padding: 9px 10px;
}
.schedule-preview__students strong { font-size: 13px; color: var(--ink); }
.schedule-preview__students small { color: var(--muted); line-height: 1.35; }

/* ============ Grading ============ */
.gradebook-page .page-head {
  align-items: center;
}

.gradebook-switcher {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.gradebook-switcher__head,
.gradebook-option-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 80, 125, .05);
}

.gradebook-switcher__head {
  padding: 18px;
  background:
    radial-gradient(circle at 86% 8%, rgba(220, 255, 71, .24), transparent 34%),
    linear-gradient(135deg, #f8fcff, #fff);
}

.gradebook-switcher__head span,
.gradebook-option-card__status {
  display: block;
  color: var(--teal-d);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.gradebook-switcher__head strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.2;
}

.gradebook-switcher__head p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}

.gradebook-option-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.gradebook-option-card {
  position: relative;
  min-height: 166px;
  overflow: hidden;
  padding: 16px;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform .16s, box-shadow .16s, border-color .16s, background .16s;
}

.gradebook-option-card:hover,
.gradebook-option-card.is-active {
  transform: translateY(-2px);
  border-color: #b8eaff;
  box-shadow: 0 18px 42px rgba(15, 80, 125, .11);
}

.gradebook-option-card.is-active {
  background:
    radial-gradient(circle at 86% 10%, rgba(220, 255, 71, .2), transparent 32%),
    #fff;
}

.gradebook-option-card.is-empty {
  border-style: dashed;
}

.gradebook-option-card__bar {
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
}

.gradebook-option-card strong {
  display: block;
  margin: 11px 0 5px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.gradebook-option-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.gradebook-option-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.gradebook-option-card__meta b {
  color: var(--ink);
}

.gradebook-option-card__status {
  margin-top: 12px;
  color: var(--muted);
  letter-spacing: 0;
  text-transform: none;
}

.sheet-gradebook-hero {
  display: grid;
  grid-template-columns: 1.35fr repeat(3, minmax(0, .75fr));
  gap: 12px;
  margin-bottom: 14px;
}

.sheet-gradebook-hero article,
.gradebook-sync-note {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 16px 18px;
  box-shadow: 0 10px 28px rgba(15, 80, 125, .05);
}

.sheet-gradebook-hero span,
.gradebook-sync-note strong {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.sheet-gradebook-hero strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.15;
}

.sheet-connect strong {
  font-size: 15px;
}

.sheet-gradebook-hero small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
}

.sheet-connect--warn {
  border-color: #ffd9a8 !important;
  background: #fffaf1 !important;
}

.sheet-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 4px;
}

.sheet-tabs button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-2);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  padding: 8px 13px;
  cursor: pointer;
  white-space: nowrap;
}

.sheet-tabs button.active {
  border-color: #b7e9fa;
  background: #ecfaff;
  color: var(--teal-d);
}

.sheet-gradebook-panel {
  padding: 0;
  overflow: hidden;
}

.sheet-gradebook-panel .panel__head {
  margin: 0;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.sheet-table-wrap {
  overflow-x: auto;
}

.sheet-gradebook-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.sheet-gradebook-table--classic {
  min-width: 2080px;
}

.sheet-gradebook-table th,
.sheet-gradebook-table td {
  border-right: 1px solid #e6edf5;
  border-bottom: 1px solid #e6edf5;
  padding: 10px 12px;
  text-align: left;
  vertical-align: middle;
}

.sheet-gradebook-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fbfe;
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.sheet-gradebook-table th[style*="--cat"] {
  background: var(--cat);
  color: #1f2937;
}

.sheet-gradebook-table th[rowspan="2"] {
  vertical-align: bottom;
}

.sheet-gradebook-table .sheet-assessment-code {
  min-width: 74px;
  text-align: center;
}

.sheet-gradebook-table .sheet-calculated {
  background: #4472c4;
  color: #fff;
  text-align: center;
}

.sheet-gradebook-table .sheet-calculated small {
  color: rgba(255, 255, 255, .78);
}

.sheet-gradebook-table .sheet-comment-head {
  background: #d6dde8;
  min-width: 260px;
}

.sheet-gradebook-table th small {
  display: block;
  margin-top: 2px;
  color: rgba(31, 41, 55, .66);
  font-size: 10px;
}

.sheet-gradebook-table tr:last-child td {
  border-bottom: 0;
}

.sheet-gradebook-table a {
  color: var(--ink);
  font-weight: 800;
}

.sheet-tab-empty {
  padding: 42px 24px;
  text-align: center;
  background: #fbfdff;
}

.sheet-tab-empty strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
}

.sheet-tab-empty p {
  max-width: 540px;
  margin: 8px auto 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.sheet-score-cell {
  background: color-mix(in srgb, var(--cat) 52%, #fff);
  min-width: 112px;
}

.sheet-score-cell input,
.sheet-comment-input {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 9px;
  background: rgba(255, 255, 255, .72);
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  outline: none;
  padding: 8px 9px;
}

.sheet-score-cell input {
  min-width: 72px;
  max-width: 88px;
  text-align: center;
}

.sheet-start-code {
  display: inline-flex;
  justify-content: center;
  min-width: 52px;
  border-radius: 8px;
  background: #ffd023;
  color: #1d1d1d;
  font-weight: 900;
  padding: 5px 7px;
}

.sheet-comment-input {
  min-width: 260px;
  font-weight: 600;
}

.sheet-comment-input--wide {
  min-width: 320px;
}

.sheet-score-cell input:focus,
.sheet-comment-input:focus {
  border-color: #9bdff4;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(24, 194, 242, .12);
}

.sheet-letter {
  display: inline-flex;
  min-width: 42px;
  justify-content: center;
  border-radius: 999px;
  background: #e8f7ef;
  color: #167647;
  font-weight: 900;
  padding: 5px 10px;
}

.sheet-letter--R {
  background: #fff1f0;
  color: #b42318;
}

.gradebook-sync-note {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin: 14px 0 18px;
  align-items: center;
}

.gradebook-sync-note p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.gradebook-sync-note code {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gradebook-feedback-panel {
  margin-top: 18px;
}

.grade-list { display: flex; flex-direction: column; gap: 12px; }
.grade-row { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; transition: .15s; }
.grade-row:hover { border-color: #cfd5dc; box-shadow: var(--shadow-sm); }
.grade-row__main { flex: 1; min-width: 0; }
.grade-row__main strong { display: block; font-size: 14.5px; }
.grade-row__bar { width: 180px; flex: none; }
.grade-row__bar .progress { margin-bottom: 4px; }

.grade-board { display: flex; flex-direction: column; gap: 12px; }
.sub-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.sub-card.is-graded { border-color: #cdeee6; }
.sub-card__head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; }
.sub-card__head strong { flex: 1; font-size: 14.5px; }
.sub-score { font-weight: 700; color: var(--teal-d); font-size: 14px; }
.sub-card__toggle { background: none; border: 0; cursor: pointer; font-size: 14px; color: var(--muted); padding: 4px 8px; }
.sub-card__work { padding: 0 18px 18px; border-top: 1px solid var(--line-2); }
.sub-text { font-size: 14px; color: var(--ink-2); background: var(--bg); border-radius: 10px; padding: 14px; margin: 14px 0; line-height: 1.6; }
.rubric--grade th { width: auto; }
.level-pick { display: flex; gap: 6px; }
.lvl { width: 30px; height: 30px; border-radius: 8px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; font-weight: 700; font-size: 13px; color: var(--ink-2); transition: .12s; }
.lvl:hover { border-color: var(--teal); }
.lvl.on { background: var(--teal); border-color: var(--teal); color: #fff; }
.sub-feedback, .field textarea, .field input, .field select, .write-area, .report-text { width: 100%; font: inherit; font-size: 14px; color: var(--ink); border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff; outline: none; transition: .14s; resize: vertical; }
.sub-feedback:focus, .field textarea:focus, .field input:focus, .field select:focus, .write-area:focus, .report-text:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0,205,176,.12); }
.sub-grade .field { margin-top: 14px; }
.sub-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.pill-count { background: rgba(255,255,255,.25); border-radius: 999px; padding: 1px 8px; font-size: 12px; margin-left: 4px; }

/* ============ Fields (modal & forms) ============ */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--ink-2); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field .err { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(229,72,77,.12); }
.swatches { display: flex; gap: 8px; }
.swatch { width: 28px; height: 28px; border-radius: 8px; border: 2px solid transparent; cursor: pointer; transition: .12s; }
.swatch.on { border-color: var(--ink); transform: scale(1.1); box-shadow: 0 0 0 2px #fff inset; }

/* ============ Tutors & chat ============ */
.tutor-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; cursor: pointer; transition: .16s; display: flex; flex-direction: column; }
.tutor-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.tutor-card__ava { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; color: #fff; font-size: 22px; margin-bottom: 12px; }
.tutor-card__ava.sm { width: 38px; height: 38px; font-size: 18px; margin: 0; }
.tutor-card h3 { margin-bottom: 3px; }
.tutor-card__rules { font-size: 13px; color: var(--ink-2); margin: 12px 0; flex: 1; }
.tutor-card__foot { display: flex; gap: 8px; }

.chat-page { max-width: 820px; }
.chat-shell { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; height: calc(100vh - 180px); min-height: 480px; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.chat-head strong { display: block; font-size: 14.5px; }
.chat-head small { font-size: 12.5px; }
.chat-badge { margin-left: auto; font-size: 11.5px; font-weight: 700; color: var(--green); background: #e7f8ef; border-radius: 999px; padding: 4px 10px; cursor: default; }
.chat-log { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.bubble { max-width: 78%; padding: 11px 15px; border-radius: 16px; font-size: 14px; line-height: 1.5; }
.bubble--tutor { background: var(--bg); border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 5px; }
.bubble--student { background: var(--ink); color: #fff; align-self: flex-end; border-bottom-right-radius: 5px; }
.bubble--typing { padding: 14px 16px; }
.dotpulse { display: inline-flex; gap: 4px; }
.dotpulse i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: pulse 1.1s infinite; }
.dotpulse i:nth-child(2) { animation-delay: .18s; } .dotpulse i:nth-child(3) { animation-delay: .36s; }
@keyframes pulse { 0%,60%,100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.chat-input { display: flex; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--line); }
.chat-input input { flex: 1; border: 1.5px solid var(--line); border-radius: 999px; padding: 11px 16px; font: inherit; font-size: 14px; outline: none; }
.chat-input input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0,205,176,.12); }
.chat-suggest { display: flex; gap: 8px; padding: 0 18px 16px; flex-wrap: wrap; }
.chip--prompt { cursor: pointer; transition: .14s; }
.chip--prompt:hover { border-color: var(--teal); color: var(--teal-d); }

/* ============ Reports & Writing ============ */
.report-layout, .write-layout { display: grid; grid-template-columns: 1fr 1.1fr; gap: 18px; align-items: start; }
.report-form { display: flex; flex-direction: column; }
.report-placeholder { text-align: center; padding: 40px 20px; }
.report-placeholder .empty__ico { margin: 0 auto 14px; }
.report-evidence { display: grid; gap: 3px; font-size: 12.5px; color: var(--teal-d); background: var(--teal-soft); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; }
.report-evidence strong { color: var(--ink); font-size: 13px; }
.report-evidence span { color: var(--teal-d); line-height: 1.35; }
.report-text { line-height: 1.6; }
.report-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.saved-reports { display: flex; flex-direction: column; gap: 12px; }
.saved-report { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.saved-report--approved { border-color: #bbefd8; background: #fcfffd; }
.saved-report__head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.saved-report__head > div { min-width: 0; flex: 1; }
.saved-report__head strong,
.saved-report__head small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.saved-report__head strong { font-size: 14px; }
.saved-report__head small { color: var(--muted); font-size: 12.5px; }
.saved-report p { font-size: 13.5px; color: var(--ink-2); line-height: 1.6; }
.saved-report__actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.report-status { flex: none; border-radius: 999px; background: #fff8e9; color: #a15f10; padding: 5px 9px; font-size: 11.5px; font-weight: 900; }
.report-status--approved { background: #eef8f5; color: #17626b; }
.report-review-note { display: grid; gap: 3px; border: 1px solid #dceaf7; border-radius: 14px; background: #f7fbff; padding: 12px; margin-bottom: 14px; }
.report-review-note strong { color: var(--ink); font-size: 14px; }
.report-review-note span { color: var(--muted); font-size: 13px; line-height: 1.4; }

.write-area { line-height: 1.6; }
.write-modes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 14px 0; }
.mode-btn { border: 1.5px solid var(--line); background: #fff; border-radius: 11px; padding: 10px 8px; cursor: pointer; text-align: center; transition: .14s; font: inherit; }
.mode-btn:hover { border-color: #cfd5dc; }
.mode-btn.on { border-color: var(--teal); background: var(--teal-soft); }
.mode-btn strong { display: block; font-size: 13px; }
.mode-btn small { font-size: 11px; color: var(--muted); }
.write-result { font-size: 15px; line-height: 1.7; color: var(--ink); white-space: pre-wrap; background: var(--bg); border-radius: 12px; padding: 16px; }

/* ============ Modal ============ */
.modal-overlay { position: fixed; inset: 0; background: rgba(13,17,22,.45); z-index: 80; display: grid; place-items: center; padding: 20px; opacity: 0; transition: opacity .18s; }
.modal-overlay.in { opacity: 1; }
.modal { background: #fff; border-radius: var(--radius-lg); width: 100%; box-shadow: var(--shadow-pop); transform: translateY(12px) scale(.98); transition: transform .2s; max-height: 90vh; display: flex; flex-direction: column; }
.modal-overlay.in .modal { transform: none; }
.modal__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line-2); }
.modal__head h3 { font-size: 17px; }
.modal__x { background: none; border: 0; cursor: pointer; font-size: 15px; color: var(--muted); padding: 6px; border-radius: 8px; }
.modal__x:hover { background: var(--line-2); color: var(--ink); }
.modal__body { padding: 22px; overflow-y: auto; }
.modal__foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--line-2); }

/* ============ Toast ============ */
.toast-host { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.toast { display: flex; align-items: center; gap: 10px; background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 999px; font-size: 14px; font-weight: 500; box-shadow: var(--shadow-pop); opacity: 0; transform: translateY(14px); transition: .28s cubic-bezier(.16,.84,.44,1); }
.toast.in { opacity: 1; transform: none; }
.toast__ico { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.toast--ok .toast__ico { background: var(--teal); color: var(--teal-ink); }
.toast--ai .toast__ico { background: var(--violet); color: #fff; }
.toast--info .toast__ico { background: #fff; color: var(--ink); }

/* ============ AI slide-over ============ */
.ai-panel { position: fixed; inset: 0; z-index: 90; pointer-events: none; }
.ai-panel__scrim { position: absolute; inset: 0; background: rgba(13,17,22,.4); opacity: 0; transition: opacity .25s; }
.ai-panel__sheet { position: absolute; top: 0; right: 0; height: 100%; width: 420px; max-width: 92vw; background: #fff; box-shadow: var(--shadow-pop); display: flex; flex-direction: column; transform: translateX(100%); transition: transform .28s cubic-bezier(.16,.84,.44,1); }
.ai-panel.open { pointer-events: auto; }
.ai-panel.open .ai-panel__scrim { opacity: 1; }
.ai-panel.open .ai-panel__sheet { transform: none; }
.ai-panel__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.ai-panel__title { font-weight: 700; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.ai-panel__spark { width: 28px; height: 28px; border-radius: 9px; background: linear-gradient(135deg, var(--teal), var(--violet)); color: #fff; display: grid; place-items: center; font-size: 15px; }
.ai-panel__mode { display: inline-flex; margin-top: 6px; border-radius: 999px; background: #f4f0fa; color: #756d81; padding: 4px 8px; font-size: 11px; font-weight: 800; }
.ai-panel__mode--live { background: #eafff7; color: #087a55; }
.ai-panel__mode--demo { background: #fff8ec; color: #9a5b14; }
.ai-panel__x { background: none; border: 0; cursor: pointer; font-size: 15px; color: var(--muted); padding: 6px; border-radius: 8px; }
.ai-panel__x:hover { background: var(--line-2); }
.ai-panel__log { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.ai-msg { display: flex; gap: 10px; max-width: 100%; }
.ai-msg--user { justify-content: flex-end; }
.ai-msg__ava { width: 26px; height: 26px; flex: none; border-radius: 8px; background: linear-gradient(135deg, var(--teal), var(--violet)); color: #fff; display: grid; place-items: center; font-size: 13px; }
.ai-msg__bubble { font-size: 14px; line-height: 1.55; padding: 11px 14px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); }
.ai-msg--bot .ai-msg__bubble { border-bottom-left-radius: 5px; }
.ai-msg--user .ai-msg__bubble { background: var(--ink); color: #fff; border: 0; border-bottom-right-radius: 5px; }
.ai-msg__meta { margin-top: 9px; color: #908897; font-size: 11px; font-weight: 800; }
.ai-ul { margin: 8px 0 4px; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.ai-link { display: inline-block; margin-top: 8px; color: var(--teal-d); font-weight: 600; }
.ai-link:hover { text-decoration: underline; }
.ai-panel__suggest { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 18px 12px; }
.ai-chip { font-size: 12.5px; font-weight: 600; color: var(--ink-2); background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; cursor: pointer; transition: .14s; }
.ai-chip:hover { border-color: var(--teal); color: var(--teal-d); }
.ai-panel__form { display: flex; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--line); }
.ai-panel__form input { flex: 1; border: 1.5px solid var(--line); border-radius: 999px; padding: 11px 16px; font: inherit; font-size: 14px; outline: none; }
.ai-panel__form input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0,205,176,.12); }
.ai-panel__fine { font-size: 11px; color: var(--muted); padding: 0 18px 14px; }

/* ============ Responsive ============ */
@media (max-width: 1000px) {
  .dash-grid, .report-layout, .write-layout, .unit-cols { grid-template-columns: 1fr; }
  .asm-grid { grid-template-columns: 1fr; }
  .assessment-docket__summary { grid-template-columns: 1fr; }
  .assessment-docket__days { grid-template-columns: repeat(7, minmax(170px, 1fr)); }
  .course-grid, .tutor-grid, .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .classes-grid { grid-template-columns: 1fr; }
  .class-subject-grid { grid-template-columns: 1fr; }
  .modules-grid { grid-template-columns: repeat(2, 1fr); }
  .cc-grid { grid-template-columns: repeat(2, 1fr); }
  .student-profile-layout, .ai-budget-layout, .student-roster-layout, .gradebook-switcher { grid-template-columns: 1fr; }
  .roster-sidebar { position: static; }
  .roster-grade-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .student-overview-grid, .student-gradebook, .ai-budget-hero, .feature-spend-grid, .sheet-gradebook-hero, .roster-summary-grid, .roster-class-grid, .gradebook-option-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .teacher-flow-grid, .teacher-flow-grid--wide, .backend-grid, .backend-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-row--6 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .login { grid-template-columns: 1fr; }
  .login__brand { display: none; }
}
@media (max-width: 820px) {
  .sidebar { position: fixed; left: 0; transform: translateX(-100%); transition: transform .25s; }
  .sidebar.open { transform: none; }
  .topbar__burger { display: block; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .dash-hero { flex-direction: column; align-items: flex-start; }
  .write-modes { grid-template-columns: repeat(3, 1fr); }
  .school-select__name { max-width: 150px; }
  .topbar__kbd { display: none; }
}
@media (max-width: 560px) {
  .page { padding: 20px 16px 70px; }
  .course-grid, .tutor-grid, .quick-grid, .kpi-row { grid-template-columns: 1fr; }
  .class-meta-list, .class-card__stats { grid-template-columns: 1fr; }
  .class-card__head { flex-direction: column; }
  .class-card__actions .btn { width: 100%; justify-content: center; }
  .class-detail-hero { align-items: flex-start; flex-direction: column; padding: 18px; }
  .modules-grid, .cc-grid, .student-overview-grid, .student-gradebook, .teacher-flow-grid, .teacher-flow-grid--wide, .backend-grid, .backend-columns, .programme-audit, .ai-budget-hero, .feature-spend-grid, .ai-policy-summary, .sheet-gradebook-hero, .roster-summary-grid, .roster-grade-list, .roster-class-grid, .gradebook-option-grid { grid-template-columns: 1fr; }
  .roster-detail__head { align-items: flex-start; flex-direction: column; }
  .roster-detail__head .btn { width: 100%; justify-content: center; }
  .gradebook-sync-note { display: block; }
  .gradebook-sync-note code { display: block; margin-top: 10px; max-width: 100%; }
  .teacher-debug, .impersonation-bar { align-items: flex-start; flex-direction: column; }
  .profile-hero--deep, .student-profile-actions { align-items: flex-start; flex-direction: column; }
  .field-row { grid-template-columns: 1fr; }
  .schedule-preview__head,
  .schedule-task-pill {
    grid-template-columns: 1fr;
  }
  .schedule-preview__head span,
  .schedule-task-pill small {
    justify-self: start;
  }
  .topbar__search { max-width: none; }
  h1 { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) { * { animation-duration: .001s !important; transition-duration: .05s !important; } }

/* ============ Syllara dashboard layer ============ */
:root {
  --font: 'Atkinson Hyperlegible', 'Atkinson Hyperlegible Next', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --display: 'Atkinson Hyperlegible', 'Atkinson Hyperlegible Next', system-ui, -apple-system, sans-serif;
  --school-purple: #6b06c9;
  --school-purple-2: #9d4ff2;
  --school-orange: #f9b72f;
  --school-orange-2: #ff8633;
  --school-ink: #14101c;
  --school-soft: #f7f8fb;
  --school-muted: #7a7882;
  --school-line: #eceef5;
  --side-w: 296px;
}

body {
  background: #fff;
  color: var(--school-ink);
  letter-spacing: 0;
}

::selection {
  background: rgba(107, 6, 201, .16);
}

#app {
  background: #fff;
}

.sidebar {
  width: var(--side-w);
  border-right: 0;
  background: #fff;
  box-shadow: 22px 0 48px rgba(49, 28, 82, .035);
}

.logo {
  gap: 12px;
  padding: 58px 48px 38px;
  color: var(--school-purple);
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 0;
}

.logo__mark {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: transparent;
  color: var(--school-purple);
  border: 4px solid currentColor;
  position: relative;
  font-size: 0;
}

.logo__mark::before,
.logo__mark::after {
  content: "";
  position: absolute;
  border: 4px solid currentColor;
  border-radius: 999px;
}

.logo__mark::before {
  width: 18px;
  height: 18px;
  left: 8px;
  top: -12px;
  background: #fff;
}

.logo__mark::after {
  width: 48px;
  height: 20px;
  left: -7px;
  bottom: -12px;
  border-top: 0;
  border-radius: 0 0 18px 18px;
}

.logo__mark-core {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 21px;
  font-weight: 900;
  line-height: 1;
}

.logo__name {
  line-height: 1;
}

.side-nav {
  gap: 12px;
  padding: 0 48px 18px;
}

.side-link {
  min-height: 48px;
  gap: 15px;
  padding: 12px 13px;
  border-radius: 8px;
  color: #777981;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
}

.side-link:hover {
  background: #f7f2ff;
  color: var(--school-purple);
}

.side-link.active {
  background: #efe2ff;
  color: var(--school-purple);
  font-weight: 800;
}

.side-link__ico {
  width: 22px;
  color: currentColor;
  font-size: 21px;
  line-height: 1;
}

.side-link__label {
  flex: 1;
}

.side-link__chev {
  margin-left: auto;
  font-size: 17px;
  color: currentColor;
}

.side-foot {
  border-top: 0;
  padding: 24px 32px 30px;
  gap: 0;
}

.upgrade-card {
  min-height: 210px;
  border-radius: 8px;
  background: linear-gradient(145deg, #6940ff 0%, #9b38ec 100%);
  color: #fff;
  padding: 86px 22px 17px;
  text-align: center;
  position: relative;
  box-shadow: 0 22px 40px rgba(101, 58, 222, .18);
}

.upgrade-card img {
  position: absolute;
  top: -28px;
  left: 50%;
  width: 106px;
  height: 106px;
  object-fit: cover;
  border-radius: 50%;
  transform: translateX(-50%);
}

.upgrade-card p {
  max-width: 172px;
  margin: 0 auto 20px;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 700;
}

.upgrade-card__btn {
  width: 146px;
  height: 42px;
  border: 0;
  border-radius: 7px;
  background: #fff;
  color: #7c33db;
  font: inherit;
  font-weight: 900;
  font-size: 16px;
  cursor: pointer;
}

.shell-hidden-action {
  display: none;
}

.main {
  background: #fff;
}

.topbar {
  height: 79px;
  background: #fff;
  border-bottom: 1px solid var(--school-line);
  padding: 0 33px;
  gap: 18px;
}

.topbar__burger {
  color: var(--school-ink);
}

.topbar__search {
  width: min(410px, 42vw);
  max-width: 410px;
  height: 42px;
  margin: 0;
  padding: 0 13px;
  border: 0;
  border-radius: 7px;
  background: #fbfbfc;
  color: #b6b2bc;
}

.topbar__search:focus-within {
  background: #fff;
  border: 1px solid #ead8ff;
  box-shadow: 0 0 0 4px rgba(107, 6, 201, .06);
}

.topbar__search input {
  color: var(--school-ink);
  font-size: 14px;
  font-weight: 600;
}

.topbar__search input::placeholder {
  color: #b4b0ba;
}

.topbar__search .search-ai {
  width: auto;
  height: auto;
  background: transparent;
  color: var(--school-purple);
  font-size: 30px;
  line-height: 1;
}

.topbar__actions {
  gap: 14px;
}

.language-toggle,
.login__lang {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border: 1px solid #e8e2f0;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(28, 20, 45, .05);
}

.language-toggle button,
.login__lang button {
  min-width: 42px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #817989;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  transition: .14s ease;
}

.language-toggle button:hover,
.login__lang button:hover {
  color: var(--school-purple);
  background: #f7f1ff;
}

.language-toggle button.active,
.login__lang button.active {
  color: #fff;
  background: linear-gradient(135deg, var(--school-purple), var(--school-purple-2));
}

.top-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #f0edf4;
  color: #15111b;
  font-size: 21px;
  box-shadow: 0 6px 18px rgba(28, 20, 45, .06);
}

.top-icon:hover {
  background: #f8f3ff;
  color: var(--school-purple);
}

.top-icon__dot {
  top: 7px;
  right: 9px;
  width: 8px;
  height: 8px;
  background: #ee243c;
  border: 2px solid #fff;
}

.top-user {
  display: flex;
  align-items: center;
  gap: 11px;
  border: 0;
  background: transparent;
  padding: 0 2px 0 4px;
  color: var(--school-ink);
  font: inherit;
  cursor: pointer;
}

.top-user img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 3px #fff, 0 5px 15px rgba(31, 21, 45, .12);
}

.top-user span {
  display: grid;
  gap: 0;
  text-align: left;
  min-width: 72px;
}

.top-user strong {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.1;
}

.top-user small {
  color: #8a878f;
  font-size: 14px;
  line-height: 1.2;
}

.top-user i {
  font-style: normal;
  font-size: 21px;
}

.account-menu-wrap {
  position: relative;
  flex: none;
}

.account-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(320px, calc(100vw - 28px));
  z-index: 70;
  background: #fff;
  border: 1px solid var(--school-line);
  border-radius: 8px;
  box-shadow: 0 24px 54px rgba(31, 20, 48, .16);
  padding: 8px;
}

.account-menu[hidden] {
  display: none;
}

.account-menu__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 12px;
  border-bottom: 1px solid var(--school-line);
  margin-bottom: 6px;
}

.account-menu__head div {
  min-width: 0;
}

.account-menu__head strong,
.account-menu__head small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu__head strong {
  color: var(--school-ink);
  font-size: 14px;
  font-weight: 900;
}

.account-menu__head small {
  color: #8a878f;
  font-size: 12px;
  margin-top: 2px;
}

.account-menu button,
.account-menu a {
  width: 100%;
  display: block;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--school-ink);
  padding: 10px 11px;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.account-menu button:hover,
.account-menu a:hover {
  background: #f6fbff;
}

.account-menu button span,
.account-menu a span,
.account-menu button small,
.account-menu a small {
  display: block;
}

.account-menu button span,
.account-menu a span {
  font-size: 13px;
  font-weight: 900;
}

.account-menu button small,
.account-menu a small {
  color: #817989;
  font-size: 12px;
  margin-top: 3px;
}

.account-menu__danger span {
  color: #c73737;
}

.account-profile {
  display: grid;
  gap: 10px;
}

.account-profile div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  padding: 11px 12px;
}

.account-profile small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.account-profile strong {
  display: block;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.account-profile p,
.account-password-form p {
  font-size: 13px;
  line-height: 1.45;
}

.search-results {
  border-color: var(--school-line);
  border-radius: 10px;
  box-shadow: 0 18px 38px rgba(31, 20, 48, .11);
}

.school-demo-page {
  width: min(100%, 1296px);
  margin: 0 auto;
  padding: 14px 34px 40px;
}

.school-demo-welcome {
  margin-bottom: 20px;
}

.school-demo-welcome h1 {
  font-size: 27px;
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: 0;
}

.school-demo-welcome p {
  margin-top: 2px;
  color: #6f6b75;
  font-size: 16px;
  font-weight: 600;
}

.school-demo-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
  margin-bottom: 26px;
}

.school-stat {
  min-height: 104px;
  border-radius: 8px;
  padding: 21px 28px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
}

.school-stat--lavender {
  background: #fbf5ff;
}

.school-stat--aqua {
  background: #eefcff;
}

.school-stat--peach {
  background: #fff6f1;
}

.school-stat span {
  display: block;
  color: #7a7482;
  font-size: 16px;
  font-weight: 700;
}

.school-stat strong {
  display: block;
  margin-top: 4px;
  color: #48464b;
  font-size: 30px;
  line-height: 1;
  font-weight: 900;
}

.school-stat__icon {
  width: 54px;
  height: 54px;
  position: relative;
  flex: none;
  color: var(--icon-color, var(--school-purple-2));
}

.school-stat__icon--graduation {
  --icon-color: #a15cf3;
}

.school-stat__icon--teacher {
  --icon-color: #6ba7f4;
}

.school-stat__icon--medal {
  --icon-color: #fa944f;
}

.school-stat__icon--graduation::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 13px;
  width: 45px;
  height: 24px;
  background: currentColor;
  clip-path: polygon(50% 0, 100% 28%, 50% 56%, 0 28%);
  opacity: .9;
}

.school-stat__icon--graduation::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 31px;
  width: 27px;
  height: 18px;
  border: 4px solid currentColor;
  border-top: 0;
  border-radius: 0 0 22px 22px;
}

.school-stat__icon--teacher::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 17px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: currentColor;
}

.school-stat__icon--teacher::after {
  content: "";
  position: absolute;
  left: 7px;
  bottom: 7px;
  width: 40px;
  height: 25px;
  border-radius: 24px 24px 5px 5px;
  background: currentColor;
  clip-path: polygon(0 100%, 15% 20%, 40% 20%, 50% 70%, 60% 20%, 85% 20%, 100% 100%);
}

.school-stat__icon--medal::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 9px;
  width: 36px;
  height: 24px;
  background: currentColor;
  clip-path: polygon(0 0, 33% 0, 50% 48%, 67% 0, 100% 0, 68% 58%, 82% 100%, 18% 100%, 32% 58%);
}

.school-stat__icon--medal::after {
  content: "★";
  position: absolute;
  left: 16px;
  top: 24px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: currentColor;
  color: #fff;
  font-size: 11px;
}

.school-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(430px, 1.55fr) minmax(250px, .82fr) minmax(280px, .84fr);
  gap: 26px;
  align-items: start;
}

.school-dashboard-grid > *,
.school-demo-stats > * {
  min-width: 0;
}

.school-panel {
  background: #fff;
  border: 1px solid #f3f2f7;
  border-radius: 8px;
  padding: 26px;
  box-shadow: 0 16px 48px rgba(54, 34, 81, .045);
  min-width: 0;
}

.school-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.school-panel__head h2 {
  font-size: 22px;
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: 0;
}

.school-panel__head a,
.routine-filters a {
  color: #77727e;
  font-size: 15px;
  font-weight: 700;
}

.panel-menu {
  border: 0;
  background: transparent;
  color: #9a96a1;
  font: inherit;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.routine-filters {
  display: grid;
  grid-template-columns: 1fr 1.25fr .8fr auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 31px;
}

.routine-filters button {
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid #f0eef6;
  border-radius: 4px;
  background: #fff;
  color: #35313b;
  padding: 0 10px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
}

.routine-filters a {
  justify-self: end;
}

.routine-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
}

.routine-card {
  min-height: 166px;
  border-radius: 8px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 12px 34px rgba(44, 32, 60, .055);
}

.routine-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
}

.routine-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--routine-soft);
  color: var(--routine-main);
  font-size: 19px;
}

.routine-card h3 {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0;
}

.routine-line {
  height: 5px;
  border-radius: 999px;
  background: var(--routine-track);
  margin: 7px 0 8px;
  overflow: hidden;
}

.routine-line i {
  display: block;
  width: 70%;
  height: 100%;
  border-radius: inherit;
  background: var(--routine-main);
}

.routine-card p {
  color: #bbb6c1;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
}

.routine-card > button {
  width: 100%;
  height: 30px;
  border: 0;
  border-radius: 6px;
  background: var(--routine-button);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.routine-card--blue {
  --routine-main: #1da9f5;
  --routine-soft: #e9f7ff;
  --routine-track: #effcff;
  --routine-button: linear-gradient(90deg, #653cf4, #a143f0);
}

.routine-card--orange {
  --routine-main: #f8a52f;
  --routine-soft: #fff4dd;
  --routine-track: #fff8e9;
  --routine-button: #202020;
}

.library-list {
  display: grid;
  gap: 9px;
}

.library-item {
  width: 100%;
  min-height: 52px;
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #f0eef5;
  border-radius: 6px;
  background: #fff;
  padding: 6px 10px;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.library-item img {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  object-fit: cover;
}

.library-item strong {
  display: block;
  color: #282431;
  font-size: 15px;
  line-height: 1;
  font-weight: 800;
}

.library-item small {
  display: block;
  color: #87838e;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 600;
}

.library-item em {
  color: #b7b2bd;
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
}

.school-panel--course {
  min-height: 357px;
}

.course-ring {
  width: 235px;
  height: 235px;
  margin: 4px auto 25px;
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    conic-gradient(from -36deg,
      #8743f4 0deg 162deg,
      transparent 162deg 177deg,
      #43f229 177deg 223deg,
      transparent 223deg 243deg,
      #ff9b32 243deg 333deg,
      transparent 333deg 360deg);
}

.course-ring::before {
  content: "";
  position: absolute;
  inset: 38px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 10px 30px rgba(45, 33, 63, .08);
}

.course-ring div {
  position: relative;
  z-index: 1;
  width: 124px;
  height: 124px;
  border-radius: 50%;
  display: grid;
  place-content: center;
  text-align: center;
  background: #fff;
}

.course-ring span {
  color: #8a8490;
  font-size: 18px;
  font-weight: 700;
}

.course-ring strong {
  color: #13071e;
  font-size: 29px;
  line-height: 1.1;
  font-weight: 900;
}

.course-legend {
  display: flex;
  justify-content: center;
  gap: 26px;
  color: #7a7480;
  font-size: 12px;
  font-weight: 700;
}

.course-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.legend-dot--math {
  background: #ff9b32;
}

.legend-dot--english {
  background: #7c3eee;
}

.legend-dot--chemistry {
  background: #44f327;
}

.student-table {
  display: grid;
  gap: 0;
}

.student-table__head,
.student-row {
  display: grid;
  grid-template-columns: 38px minmax(170px, 1.4fr) 104px 86px 88px;
  align-items: center;
}

.student-table__head {
  color: #8b8790;
  font-size: 16px;
  font-weight: 700;
  padding: 8px 0 21px;
  border-bottom: 1px solid #f0eef5;
}

.student-row {
  min-height: 56px;
  color: #1d1724;
  font-size: 16px;
  font-weight: 700;
}

.student-row.is-selected {
  background: linear-gradient(90deg, rgba(255,255,255,0), #fff6ff 28%, #fff);
}

.check {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1.5px solid #aeb0b7;
  border-radius: 6px;
  background: #fff;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
}

.check.is-on {
  border-color: #9c21df;
  background: #9c21df;
}

.student-person {
  display: flex;
  align-items: center;
  gap: 13px;
}

.student-person img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.school-panel--exams {
  min-height: 181px;
}

.exam-badge {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 11px;
  border-radius: 999px;
  color: #f16675;
  background: #fff0f3;
  font-size: 13px;
  font-weight: 800;
}

.exam-total {
  display: block;
  margin: 22px 0 12px;
  color: #11051c;
  font-size: 38px;
  line-height: 1;
  font-weight: 900;
}

.school-panel--exams p {
  color: #8a858f;
  max-width: 260px;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 600;
}

.school-panel--exams a {
  color: #9d37e4;
  font-weight: 900;
}

.course-ad {
  min-height: 165px;
  display: grid;
  grid-template-columns: 88px 1fr;
  align-items: center;
  gap: 18px;
  background: #eef1ff;
  border-radius: 8px;
  padding: 20px 22px;
}

.course-ad img {
  width: 88px;
  height: 126px;
  object-fit: cover;
  border-radius: 6px;
}

.course-ad span {
  display: block;
  color: #18121f;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
}

.course-ad strong {
  display: block;
  color: #0f0b16;
  font-size: 19px;
  line-height: 1.2;
  font-weight: 900;
  max-width: 150px;
  margin-bottom: 16px;
}

.course-ad button {
  height: 31px;
  border: 0;
  border-radius: 7px;
  background: #1d1d1d;
  color: #fff;
  padding: 0 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.school-panel--notifications {
  padding-bottom: 24px;
}

.notice-list {
  display: grid;
  gap: 15px;
}

.notice-item {
  min-height: 71px;
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 16px;
  border: 1px solid #f0eef5;
  border-radius: 7px;
  background: #fff;
  padding: 10px 12px;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.notice-item img {
  width: 52px;
  height: 52px;
  border-radius: 3px;
  object-fit: cover;
}

.notice-item strong {
  display: block;
  color: #221c29;
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 5px;
}

.notice-item small {
  display: flex;
  gap: 18px;
  color: #8d8792;
  font-size: 14px;
  font-weight: 700;
}

.notice-item i,
.notice-item em {
  color: #a5a1aa;
  font-style: normal;
}

.school-panel--performers {
  grid-column: 2 / span 2;
  min-height: 320px;
}

.period-select {
  height: 38px;
  min-width: 110px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  border: 1px solid #f0eef5;
  border-radius: 4px;
  background: #fff;
  color: #86808c;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.performer-chart {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 8px 8px 28px 0;
  overflow: hidden;
}

.performer-chart::before {
  content: "";
  position: absolute;
  left: 150px;
  right: 0;
  top: 8px;
  bottom: 28px;
  background:
    linear-gradient(to right,
      transparent 0 calc(25% - 1px),
      #eef0f6 calc(25% - 1px) 25%,
      transparent 25% calc(50% - 1px),
      #eef0f6 calc(50% - 1px) 50%,
      transparent 50% calc(75% - 1px),
      #eef0f6 calc(75% - 1px) 75%,
      transparent 75%);
  pointer-events: none;
}

.performer-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  align-items: center;
  min-height: 47px;
  position: relative;
  z-index: 1;
}

.performer-class {
  color: #77727d;
  font-size: 15px;
  font-weight: 700;
}

.performer-track {
  position: relative;
  height: 42px;
}

.performer-track::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 10px;
  height: 24px;
  border-radius: 999px;
  background: rgba(253, 236, 239, .75);
}

.performer-bar {
  position: absolute;
  top: 4px;
  height: 34px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  padding: 0 14px 0 16px;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 10px 18px rgba(74, 40, 120, .12);
}

.performer-bar--purple {
  background: linear-gradient(90deg, #6041e7, #ae3ee8);
}

.performer-bar--gold {
  background: linear-gradient(90deg, #f8a520, #ff7b2b);
}

.performer-bar--cyan {
  background: linear-gradient(90deg, #5b42ea, #34ddc7);
}

.performer-bar--orange {
  background: linear-gradient(90deg, #f22949, #ff862b);
}

.performer-avatars {
  display: flex;
  flex: none;
}

.performer-avatars img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #fff;
  object-fit: cover;
  margin-left: -8px;
}

.performer-avatars img:first-child {
  margin-left: 0;
}

.performer-track > strong {
  position: absolute;
  top: 7px;
  transform: translateX(8px);
  height: 27px;
  display: grid;
  place-items: center;
  min-width: 42px;
  padding: 0 9px;
  border-radius: 999px;
  background: #fff;
  color: #6c6572;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 6px 14px rgba(52, 36, 72, .08);
}

.performer-days {
  position: absolute;
  left: 150px;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  color: #8c8791;
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 1180px) {
  .school-dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }

  .school-panel--routine,
  .school-panel--students,
  .school-panel--notifications,
  .school-panel--performers {
    grid-column: 1 / -1;
  }

  .course-ad {
    min-height: 100%;
  }
}

@media (max-width: 960px) {
  .sidebar {
    position: fixed;
    left: 0;
    transform: translateX(-100%);
    transition: transform .25s;
  }

  .sidebar.open {
    transform: none;
  }

  .topbar__burger {
    display: block;
  }

  .topbar {
    padding: 0 18px;
  }

  .topbar__search {
    width: 100%;
    max-width: none;
  }

  .top-user span,
  .top-user i {
    display: none;
  }

  .school-demo-page {
    padding: 20px 18px 36px;
  }
}

@media (max-width: 760px) {
  .school-demo-stats,
  .school-dashboard-grid,
  .routine-cards {
    grid-template-columns: 1fr;
  }

  .school-panel--routine,
  .school-panel--students,
  .school-panel--notifications,
  .school-panel--performers {
    grid-column: auto;
  }

  .routine-filters {
    grid-template-columns: 1fr;
  }

  .routine-filters a {
    justify-self: start;
  }

  .student-table {
    overflow-x: auto;
  }

  .student-table__head,
  .student-row {
    min-width: 610px;
  }

  .school-panel--performers {
    overflow-x: auto;
  }

  .performer-chart {
    min-width: 620px;
  }
}

@media (max-width: 560px) {
  .topbar {
    height: auto;
    min-height: 72px;
    flex-wrap: wrap;
    padding-block: 12px;
  }

  .topbar__search {
    order: 3;
    flex-basis: 100%;
  }

  .topbar__actions {
    margin-left: auto;
  }

  .school-demo-welcome h1 {
    font-size: 25px;
  }

  .school-panel {
    padding: 20px;
  }

  .course-ring {
    width: 205px;
    height: 205px;
  }
}

/* ============ Syllara product layer ============ */
.btn--primary {
  background: var(--school-purple);
  color: #fff;
}

.btn--primary:hover {
  background: var(--school-purple-2);
}

.logo {
  gap: 12px;
  padding: 34px 32px 26px;
  color: var(--school-purple);
  align-items: center;
}

.logo__mark {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--school-purple), var(--school-purple-2));
  color: #fff;
  box-shadow: 0 12px 24px rgba(107, 6, 201, .18);
  overflow: hidden;
}

.logo__mark::before,
.logo__mark::after {
  display: none;
}

.logo__mark-core {
  font-size: 18px;
  letter-spacing: 0;
}

.logo__mark-img,
.brand-logo-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.logo__mark-img {
  padding: 6px;
  background: #fff;
}

.logo__text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.logo__name {
  color: var(--school-purple);
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
}

.logo__text small {
  display: block;
  max-width: 172px;
  color: #8b8790;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logo--login {
  padding: 0;
  font-size: clamp(42px, 4.8vw, 58px);
  gap: 18px;
}

.logo--login .logo__name {
  color: #fff;
  font-size: clamp(42px, 4.8vw, 58px);
}

.logo--login .logo__text small {
  color: rgba(255,255,255,.8);
  max-width: 340px;
  font-size: 13px;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.logo--login .logo__mark {
  width: clamp(110px, 12vw, 140px);
  height: clamp(110px, 12vw, 140px);
  border-radius: 28px;
  background: transparent;
  color: var(--school-purple);
  box-shadow: none;
}

.logo--login .logo__mark-img {
  padding: 0;
  background: transparent;
}

.side-nav {
  padding-inline: 32px;
  gap: 8px;
}

.side-nav__group {
  display: grid;
  gap: 6px;
}

.side-nav__group + .side-nav__group {
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px solid #f0eef5;
}

.side-nav__heading {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 0 12px 2px;
}

.side-nav__heading span {
  color: #21172e;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.side-nav__heading small {
  color: #aaa5b0;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.2;
}

.side-link {
  min-height: 46px;
  font-size: 15px;
}

.side-foot {
  padding-inline: 24px;
}

.workspace-card {
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 12px;
  background: linear-gradient(145deg, rgba(107, 6, 201, .95), rgba(157, 79, 242, .92));
  color: #fff;
  box-shadow: 0 18px 36px rgba(107, 6, 201, .16);
}

.workspace-card span {
  display: block;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
  opacity: .82;
  margin-bottom: 7px;
}

.workspace-card strong {
  display: block;
  font-size: 17px;
  line-height: 1.18;
}

.workspace-card p {
  margin: 8px 0 14px;
  font-size: 13px;
  line-height: 1.35;
  color: rgba(255,255,255,.82);
}

.workspace-card a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 13px;
  border-radius: 7px;
  background: #fff;
  color: var(--school-purple);
  font-size: 13px;
  font-weight: 900;
}

.side-link--btn {
  color: #87828e;
}

.top-user__avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--school-purple), var(--school-purple-2));
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 0 0 3px #fff, 0 5px 15px rgba(31, 21, 45, .12);
}

.syllara-page {
  width: min(100%, 1296px);
  margin: 0 auto;
  padding: 28px 34px 46px;
}

.teacher-home {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .74fr);
  gap: 20px;
  align-items: stretch;
  margin-bottom: 20px;
}

.teacher-home__main,
.teacher-home__side {
  border: 1px solid #f0eef5;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 48px rgba(54, 34, 81, .045);
}

.teacher-home__main {
  padding: 28px;
}

.teacher-home__kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.teacher-home__kicker span {
  color: var(--school-purple);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.teacher-home__kicker strong {
  color: #6d6674;
  background: #f8f5fc;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 900;
}

.teacher-home h1 {
  max-width: 780px;
  color: #17111f;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: 0;
}

.teacher-home p {
  max-width: 760px;
  margin-top: 12px;
  color: #69636f;
  font-size: 16px;
  line-height: 1.45;
  font-weight: 700;
}

.home-programs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.home-programs span {
  border-radius: 999px;
  background: #f5efff;
  color: var(--school-purple);
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 900;
}

.teacher-home__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.teacher-home__side {
  padding: 22px;
}

.teacher-home__side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.teacher-home__side-head h2 {
  font-size: 21px;
  font-weight: 900;
}

.teacher-home__side-head button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: var(--school-purple);
  color: #fff;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.priority-stack {
  display: grid;
  gap: 10px;
}

.priority-card {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 4px 11px;
  align-items: center;
  width: 100%;
  min-height: 72px;
  border: 1px solid #f1edf6;
  border-radius: 8px;
  background: #fbfbfd;
  padding: 12px;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: .16s;
}

.priority-card:hover,
.programme-card:hover,
.ai-prompt-stack button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(54, 34, 81, .08);
}

.priority-card span {
  grid-row: 1 / span 2;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(107, 6, 201, .1);
  color: var(--school-purple);
  font-size: 13px;
  font-weight: 900;
}

.priority-card strong {
  color: #21182a;
  font-size: 14px;
  font-weight: 900;
}

.priority-card small {
  color: #807987;
  font-size: 12.5px;
  line-height: 1.35;
  font-weight: 800;
}

.programme-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.programme-card {
  min-height: 190px;
  border: 1px solid #f0eef5;
  border-radius: 8px;
  background: linear-gradient(145deg, #fff, var(--programme-bg, #f8f5ff));
  padding: 18px;
  transition: .16s;
}

.programme-card > span {
  display: inline-flex;
  border-radius: 999px;
  background: #fff;
  color: var(--programme-color, var(--school-purple));
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
}

.programme-card strong {
  display: block;
  margin-top: 13px;
  color: #17111f;
  font-size: 21px;
  line-height: 1.12;
  font-weight: 900;
}

.programme-card p {
  margin: 10px 0 16px;
  color: #746e7c;
  font-size: 13.5px;
  line-height: 1.4;
  font-weight: 700;
}

.programme-card div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.programme-card button,
.ai-prompt-stack button {
  border: 0;
  border-radius: 7px;
  font: inherit;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.programme-card button {
  min-height: 36px;
  background: var(--programme-color, var(--school-purple));
  color: #fff;
  padding: 0 12px;
}

.programme-card button + button {
  background: #fff;
  color: var(--programme-color, var(--school-purple));
}

.programme-card--kinder { --programme-bg: #f2fff8; --programme-color: #189f61; }
.programme-card--pyp { --programme-bg: #eefcff; --programme-color: #178aad; }
.programme-card--myp { --programme-bg: #f8f1ff; --programme-color: #7b30dd; }
.programme-card--dp { --programme-bg: #fff8ec; --programme-color: #e48521; }
.programme-card--other { --programme-bg: #f7f7fb; --programme-color: #635a6d; }

.ai-coach-card {
  background:
    radial-gradient(circle at 88% 8%, rgba(157, 79, 242, .14), transparent 34%),
    #fff;
}

.ai-prompt-stack {
  display: grid;
  gap: 10px;
}

.ai-prompt-stack button {
  min-height: 48px;
  background: #fbf8ff;
  color: #271a34;
  border: 1px solid #efe7fb;
  padding: 11px 12px;
  text-align: left;
  line-height: 1.25;
}

.syllara-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, .72fr);
  gap: 24px;
  align-items: stretch;
  margin-bottom: 22px;
}

.syllara-hero__copy,
.syllara-hero__card,
.syllara-panel,
.syllara-stat {
  border: 1px solid #f0eef5;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 48px rgba(54, 34, 81, .045);
}

.syllara-hero__copy {
  padding: 32px;
  background:
    radial-gradient(circle at 85% 15%, rgba(157, 79, 242, .16), transparent 32%),
    linear-gradient(135deg, rgba(107, 6, 201, .08), rgba(249, 183, 47, .08));
}

.syllara-eyebrow {
  display: inline-flex;
  color: var(--school-purple);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 10px;
}

.syllara-hero h1 {
  max-width: 760px;
  font-size: clamp(32px, 4vw, 54px);
  line-height: .98;
  font-weight: 900;
  letter-spacing: 0;
}

.syllara-hero p {
  max-width: 720px;
  margin-top: 14px;
  color: #69636f;
  font-size: 17px;
  line-height: 1.5;
  font-weight: 700;
}

.syllara-hero__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.syllara-hero__card {
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    linear-gradient(145deg, #fff, #f8f2ff);
}

.syllara-hero__card span,
.brand-preview-card span {
  color: var(--school-purple);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.syllara-hero__card strong {
  display: block;
  margin-top: 10px;
  color: #13071e;
  font-size: 24px;
  line-height: 1.12;
  font-weight: 900;
}

.syllara-hero__card p {
  margin: 12px 0 22px;
  font-size: 15px;
}

.syllara-hero__card button,
.empty-action,
.admin-actions button,
.course-stack button,
.focus-list button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.syllara-hero__card button,
.empty-action {
  align-self: flex-start;
  height: 38px;
  border-radius: 7px;
  background: #1d1d1d;
  color: #fff;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 900;
}

.pathway-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.pathway-actions button + button {
  background: var(--school-purple);
}

.syllara-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.syllara-stat {
  min-height: 108px;
  display: grid;
  grid-template-columns: 48px 1fr;
  grid-template-rows: auto auto;
  gap: 4px 14px;
  align-items: center;
  padding: 20px;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.syllara-stat span {
  grid-row: 1 / span 2;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: var(--school-purple);
  background: rgba(107, 6, 201, .1);
  font-size: 22px;
}

.syllara-stat strong {
  font-size: 31px;
  line-height: 1;
  font-weight: 900;
}

.syllara-stat small {
  color: #7d7884;
  font-size: 14px;
  font-weight: 800;
}

.dashboard-customizer-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 22px;
  border: 1px solid #f0eef5;
  border-radius: 8px;
  background:
    radial-gradient(circle at 94% 18%, rgba(157, 79, 242, .14), transparent 32%),
    #fff;
  box-shadow: 0 16px 48px rgba(54, 34, 81, .045);
  padding: 18px 20px;
}

.dashboard-customizer-strip span {
  display: block;
  color: var(--school-purple);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.dashboard-customizer-strip strong {
  display: block;
  margin-top: 4px;
  color: #18111f;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 900;
}

.dashboard-customizer-strip p {
  margin-top: 5px;
  color: #7d7884;
  font-size: 13.5px;
  font-weight: 700;
}

.syllara-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, .72fr);
  gap: 22px;
  align-items: start;
}

.syllara-grid > * {
  min-width: 0;
}

.syllara-panel {
  padding: 26px;
  min-width: 0;
}

.syllara-panel--wide {
  grid-column: 1;
}

.syllara-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.syllara-panel__head h2 {
  font-size: 23px;
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: 0;
}

.syllara-panel__head p,
.syllara-muted {
  margin-top: 4px;
  color: #7b7582;
  font-size: 14.5px;
  line-height: 1.45;
  font-weight: 700;
}

.dashboard-widget-grid--compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-widget-grid--compact .syllara-panel--wide {
  grid-column: auto;
}

.dashboard-widget-grid--compact .dashboard-widget {
  padding: 20px;
}

.dashboard-widget-grid--compact .unit-showcase,
.dashboard-widget-grid--compact .module-launcher,
.dashboard-widget-grid--compact .programme-cards {
  grid-template-columns: 1fr;
}

.dashboard-widget-grid--compact .unit-tile,
.dashboard-widget-grid--compact .module-card {
  min-height: 0;
}

.dashboard-mini-metrics {
  display: grid;
  gap: 10px;
}

.dashboard-mini-metrics button {
  min-width: 0;
  border: 1px solid #f0eef5;
  border-radius: 8px;
  background: #fbfbfd;
  padding: 14px;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: .16s;
}

.dashboard-mini-metrics button:hover,
.dashboard-student-list button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(54, 34, 81, .08);
}

.dashboard-mini-metrics span {
  display: block;
  color: #817a86;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.dashboard-mini-metrics strong {
  display: block;
  margin-top: 4px;
  color: var(--school-purple);
  font-size: 30px;
  line-height: 1;
  font-weight: 900;
}

.dashboard-mini-metrics small {
  display: block;
  margin-top: 5px;
  color: #817a86;
  font-size: 12px;
  font-weight: 800;
}

.report-widget {
  display: grid;
  gap: 12px;
}

.report-widget__score {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  border-radius: 8px;
  background: #f8f2ff;
  padding: 14px;
}

.report-widget__score > span {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #fff;
  color: var(--school-purple);
  font-size: 21px;
  font-weight: 900;
}

.report-widget__score strong,
.dashboard-student-list strong {
  display: block;
  color: #21182a;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 900;
}

.report-widget__score small,
.dashboard-student-list small {
  display: block;
  margin-top: 3px;
  color: #807987;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 800;
}

.dashboard-student-list {
  display: grid;
  gap: 9px;
}

.dashboard-student-list button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 2px 10px;
  align-items: center;
  min-width: 0;
  border: 1px solid #f0eef5;
  border-radius: 8px;
  background: #fbfbfd;
  padding: 11px;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: .16s;
}

.dashboard-student-list button > span {
  grid-row: 1 / span 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--violet));
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.dashboard-settings {
  display: grid;
  gap: 14px;
}

.dashboard-density {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dashboard-density label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #f0eef5;
  border-radius: 999px;
  background: #fbfbfd;
  padding: 9px 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 900;
}

.dashboard-widget-choices {
  display: grid;
  gap: 10px;
  max-height: min(52vh, 520px);
  overflow: auto;
  padding-right: 4px;
}

.dashboard-widget-choice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #f0eef5;
  border-radius: 12px;
  background: #fff;
  padding: 12px;
}

.dashboard-widget-choice label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  cursor: pointer;
}

.dashboard-widget-choice strong,
.dashboard-widget-choice small {
  display: block;
}

.dashboard-widget-choice strong {
  color: #21182a;
  font-size: 14px;
  font-weight: 900;
}

.dashboard-widget-choice small {
  margin-top: 3px;
  color: #807987;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 800;
}

.dashboard-widget-choice > div {
  display: flex;
  gap: 6px;
}

.dashboard-widget-choice button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 9px;
  background: #f4eefb;
  color: var(--school-purple);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.dashboard-reset-layout {
  justify-self: start;
}

.ib-strands {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.ib-strands span {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  border-radius: 8px;
  background: #fbf8ff;
  color: #403848;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 900;
}

.ib-strands i {
  flex: none;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--school-purple);
  color: #fff;
  font-size: 11px;
  font-style: normal;
}

.unit-showcase,
.module-launcher {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.unit-tile,
.module-card {
  min-height: 214px;
  border: 1px solid #f0eef5;
  border-radius: 8px;
  background: #fff;
  padding: 18px;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: .16s;
}

.unit-tile {
  border-top: 4px solid var(--accent);
}

.unit-tile:hover,
.module-card:hover,
.syllara-stat:hover,
.course-stack button:hover,
.focus-list button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(54, 34, 81, .09);
}

.unit-tile strong,
.module-card strong {
  display: block;
  margin-top: 13px;
  color: #18111f;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 900;
}

.unit-tile small,
.module-card small {
  display: block;
  color: #817a86;
  font-size: 12.5px;
  line-height: 1.35;
  font-weight: 800;
}

.unit-tile p {
  margin: 12px 0 14px;
  color: #766f7d;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 700;
}

.unit-tile em {
  color: var(--school-purple);
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.module-card {
  min-height: 184px;
  background: var(--module-bg, #fff);
}

.module-card span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #fff;
  color: var(--module-color, var(--school-purple));
  font-size: 22px;
  box-shadow: 0 8px 20px rgba(30, 20, 48, .06);
}

.module-card--purple { --module-bg: #fbf5ff; --module-color: #7b30dd; }
.module-card--orange { --module-bg: #fff8ec; --module-color: #f08b26; }
.module-card--green { --module-bg: #f2fff8; --module-color: #189f61; }
.module-card--cyan { --module-bg: #effcff; --module-color: #219acb; }
.module-card--blue { --module-bg: #f4f7ff; --module-color: #507bea; }
.module-card--pink { --module-bg: #fff4fb; --module-color: #d4458f; }
.module-card--red { --module-bg: #fff5f3; --module-color: #b42318; }
.module-card--brand { --module-bg: #f8f2ff; --module-color: var(--school-purple); }

.module-launcher--compact .module-card {
  min-height: 154px;
}

.focus-list {
  list-style: none;
  display: grid;
  gap: 10px;
}

.focus-list button {
  width: 100%;
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 8px;
  background: #fbfbfd;
  color: #292331;
  padding: 12px;
  text-align: left;
  font-size: 14px;
  font-weight: 800;
}

.focus-list span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(107, 6, 201, .1);
  color: var(--school-purple);
}

.course-stack {
  display: grid;
  gap: 10px;
}

.course-stack button {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 4px 12px;
  align-items: center;
  border-radius: 8px;
  background: #fbfbfd;
  padding: 13px;
  text-align: left;
}

.course-stack span {
  grid-row: 1 / span 2;
  width: 12px;
  height: 40px;
  border-radius: 999px;
}

.course-stack strong {
  color: #241d2b;
  font-size: 14px;
  font-weight: 900;
}

.course-stack small {
  color: #817a86;
  font-size: 12px;
  font-weight: 800;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.admin-actions button {
  height: 36px;
  border-radius: 7px;
  background: #f7f2ff;
  color: var(--school-purple);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 900;
}

.brand-kit {
  display: grid;
  grid-template-columns: minmax(300px, .8fr) minmax(360px, 1fr);
  gap: 18px;
  align-items: start;
}

.brand-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.brand-preview__logo {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}

.brand-preview strong {
  display: block;
  color: #17111f;
  font-size: 28px;
  line-height: 1;
  font-weight: 900;
}

.brand-preview small {
  display: block;
  color: #7b7582;
  font-size: 14px;
  font-weight: 800;
  margin-top: 4px;
}

.brand-preview__logo .brand-logo-img,
.brand-uploader__preview .brand-logo-img {
  padding: 6px;
  border-radius: inherit;
  background: #fff;
}

.brand-preview-card {
  margin-top: 20px;
  border-radius: 8px;
  padding: 24px;
  color: #fff;
  background:
    radial-gradient(circle at 90% 0, rgba(255,255,255,.24), transparent 34%),
    linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
}

.brand-preview-card span {
  color: rgba(255,255,255,.82);
}

.brand-preview-card h2 {
  margin-top: 12px;
  font-size: 28px;
  font-weight: 900;
}

.brand-preview-card p {
  margin: 10px 0 18px;
  color: rgba(255,255,255,.84);
  font-weight: 700;
}

.brand-preview-card button {
  border: 0;
  border-radius: 7px;
  background: #fff;
  color: var(--brand-primary);
  padding: 10px 14px;
  font: inherit;
  font-weight: 900;
}

.brand-kit__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.brand-uploader {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 14px;
  align-items: center;
  border: 1px dashed #d8d2e3;
  border-radius: 12px;
  background: #fbf9ff;
  padding: 14px;
  margin-bottom: 14px;
  cursor: pointer;
  transition: .15s;
}

.brand-uploader:hover {
  border-color: var(--school-purple);
  background: #f8f2ff;
}

.brand-uploader__preview {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--school-purple), var(--school-purple-2));
  color: #fff;
  font-size: 19px;
  font-weight: 900;
}

.brand-uploader__copy strong,
.brand-uploader__copy small {
  display: block;
}

.brand-uploader__copy strong {
  color: #17111f;
  font-size: 14px;
  font-weight: 900;
}

.brand-uploader__copy small {
  margin-top: 3px;
  color: #817a86;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.brand-uploader input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.brand-remove-logo {
  min-height: 36px;
  margin: -4px 0 14px;
  border: 0;
  border-radius: 8px;
  background: #f4eefb;
  color: var(--school-purple);
  padding: 0 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

@media (max-width: 1180px) {
  .teacher-home,
  .syllara-hero,
  .syllara-grid,
  .brand-kit {
    grid-template-columns: 1fr;
  }

  .syllara-panel--wide {
    grid-column: auto;
  }
}

@media (max-width: 860px) {
  .syllara-stats,
  .programme-cards,
  .unit-showcase,
  .module-launcher,
  .ib-strands {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .syllara-page {
    padding: 20px 18px 38px;
  }

  .teacher-home__main,
  .teacher-home__side,
  .syllara-hero__copy,
  .syllara-hero__card,
  .syllara-panel {
    padding: 20px;
  }

  .syllara-stats,
  .programme-cards,
  .unit-showcase,
  .module-launcher,
  .ib-strands {
    grid-template-columns: 1fr;
  }

  .syllara-hero {
    grid-template-columns: 1fr;
  }
}

/* ============ CPOMS safeguarding ============ */
.cpoms-page {
  width: min(100%, 1280px);
  margin: 0 auto;
  padding: 28px 34px 46px;
  color: #17212b;
}

.cpoms-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 18px;
  margin-bottom: 18px;
}

.cpoms-hero > div,
.cpoms-confidential,
.cpoms-panel,
.cpoms-stat {
  border: 1px solid #ece7e4;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 38px rgba(50, 36, 30, .055);
}

.cpoms-hero > div {
  padding: 32px;
  background:
    radial-gradient(circle at 92% 10%, rgba(180, 35, 24, .1), transparent 30%),
    linear-gradient(135deg, #fff, #fff8f6);
}

.cpoms-eyebrow {
  display: inline-flex;
  color: #b42318;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.cpoms-hero h1 {
  max-width: 760px;
  color: #15171c;
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

.cpoms-hero p {
  max-width: 730px;
  margin-top: 14px;
  color: #685f5d;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.52;
}

.cpoms-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.cpoms-confidential {
  display: grid;
  align-content: center;
  padding: 26px;
  border-top: 5px solid #b42318;
  background: #1f2429;
  color: #fff;
}

.cpoms-confidential span,
.cpoms-detail span,
.transfer-pack span {
  color: #ffb4aa;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.cpoms-confidential strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
  line-height: 1.12;
  font-weight: 900;
}

.cpoms-confidential p {
  margin-top: 10px;
  color: rgba(255,255,255,.76);
  font-size: 13.5px;
  line-height: 1.45;
}

.cpoms-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.cpoms-stat {
  min-height: 116px;
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 18px;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.cpoms-stat span,
.cpoms-stat small {
  color: #756d6a;
  font-size: 12px;
  font-weight: 900;
}

.cpoms-stat strong {
  color: #15171c;
  font-size: 31px;
  line-height: 1;
  font-weight: 900;
}

.cpoms-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 352px;
  gap: 18px;
  align-items: start;
}

.cpoms-main,
.cpoms-side {
  display: grid;
  gap: 18px;
}

.cpoms-panel {
  padding: 22px;
}

.cpoms-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.cpoms-panel__head h2 {
  color: #15171c;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0;
}

.cpoms-panel__head p,
.cpoms-muted {
  margin-top: 4px;
  color: #706966;
  font-size: 13.5px;
  line-height: 1.45;
  font-weight: 750;
}

.concern-list {
  display: grid;
  gap: 10px;
}

.concern-card {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 5px 14px;
  align-items: start;
  border: 1px solid #eee7e4;
  border-left: 5px solid var(--priority, #e0922f);
  border-radius: 10px;
  background: #fff;
  padding: 14px;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: .16s;
}

.concern-card:hover,
.cpoms-stat:hover,
.chronology-card:hover,
.action-stack button:hover,
.category-bars button:hover,
.cpoms-share:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(50, 36, 30, .08);
}

.concern-card--high { --priority: #b42318; }
.concern-card--medium { --priority: #e0922f; }
.concern-card--low { --priority: #17626b; }

.concern-card span {
  grid-row: 1 / span 3;
  align-self: start;
  border-radius: 999px;
  background: color-mix(in srgb, var(--priority) 12%, white);
  color: var(--priority);
  padding: 5px 9px;
  text-align: center;
  font-size: 11px;
  font-weight: 900;
}

.concern-card strong {
  color: #15171c;
  font-size: 15px;
  font-weight: 900;
}

.concern-card small {
  color: #817875;
  font-size: 12px;
  font-weight: 800;
}

.concern-card p {
  grid-column: 2 / -1;
  color: #514947;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 700;
}

.concern-card em {
  grid-column: 3;
  grid-row: 1 / span 2;
  color: #8e5b56;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.chronology-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.chronology-card {
  min-height: 142px;
  display: grid;
  justify-items: start;
  align-content: start;
  gap: 6px;
  border: 1px solid #eee7e4;
  border-top: 4px solid var(--risk);
  border-radius: 10px;
  background: #fffdfc;
  padding: 15px;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: .16s;
}

.chronology-card strong {
  color: #15171c;
  font-size: 15px;
  font-weight: 900;
}

.chronology-card small {
  color: #817875;
  font-size: 12px;
  font-weight: 800;
}

.chronology-card em {
  margin-top: 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--risk) 11%, white);
  color: var(--risk);
  padding: 5px 9px;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.cpoms-panel--locked {
  background:
    linear-gradient(135deg, rgba(31, 36, 41, .96), rgba(31, 36, 41, .91)),
    #1f2429;
  color: #fff;
}

.cpoms-panel--locked h2 {
  color: #fff;
}

.cpoms-rules {
  list-style: none;
  display: grid;
  gap: 10px;
}

.cpoms-rules li {
  position: relative;
  padding-left: 18px;
  color: rgba(255,255,255,.78);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 750;
}

.cpoms-rules li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .65em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffb4aa;
}

.action-stack,
.category-bars {
  display: grid;
  gap: 9px;
}

.action-stack button,
.category-bars button {
  border: 0;
  border-radius: 10px;
  background: #fff8f6;
  padding: 12px;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.action-stack span,
.category-bars span {
  color: #b42318;
  font-size: 11px;
  font-weight: 900;
}

.action-stack strong,
.category-bars strong {
  display: block;
  margin-top: 4px;
  color: #15171c;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 900;
}

.action-stack small {
  display: block;
  margin-top: 4px;
  color: #817875;
  font-size: 12px;
  font-weight: 800;
}

.category-bars button {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  background: #fbfaf9;
}

.category-bars i {
  grid-column: 1 / -1;
  height: 6px;
  border-radius: 999px;
  background: var(--bar);
}

.cpoms-share {
  width: 100%;
  min-height: 42px;
  margin-top: 14px;
  border: 0;
  border-radius: 9px;
  background: #1f2429;
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.cpoms-form {
  display: grid;
  gap: 12px;
}

.cpoms-form-note {
  border-radius: 10px;
  background: #fff8f6;
  color: #8e453e;
  padding: 11px 12px;
  font-size: 12.5px;
  font-weight: 800;
}

.cpoms-detail,
.chronology-modal,
.transfer-pack {
  display: grid;
  gap: 14px;
}

.cpoms-detail__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cpoms-detail__meta span,
.status-pill {
  border-radius: 999px;
  background: #f4f0ee;
  color: #514947;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 900;
}

.status-pill--high { background: #fff0ee; color: #b42318; }
.status-pill--medium { background: #fff8e9; color: #a15f10; }
.status-pill--low { background: #eef8f5; color: #17626b; }

.cpoms-detail section,
.chronology-modal article {
  border: 1px solid #eee7e4;
  border-radius: 10px;
  background: #fffdfc;
  padding: 14px;
}

.cpoms-detail section span {
  color: #b42318;
}

.cpoms-detail p,
.chronology-modal p,
.transfer-pack p {
  margin-top: 6px;
  color: #514947;
  font-size: 13px;
  line-height: 1.55;
  font-weight: 750;
}

.cpoms-next-steps,
.transfer-pack div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cpoms-next-steps button,
.transfer-pack button {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  background: #fff1ef;
  color: #b42318;
  padding: 0 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
}

.chronology-modal article {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 4px 14px;
}

.chronology-modal time {
  grid-row: 1 / span 2;
  color: #b42318;
  font-size: 12px;
  font-weight: 900;
}

.chronology-modal strong {
  color: #15171c;
  font-size: 14px;
  font-weight: 900;
}

.chronology-modal p {
  margin-top: 0;
}

.transfer-pack {
  border-radius: 14px;
  background: #fff8f6;
  padding: 18px;
}

.transfer-pack h3 {
  color: #15171c;
  font-size: 22px;
  font-weight: 900;
}

@media (max-width: 1180px) {
  .cpoms-hero,
  .cpoms-layout {
    grid-template-columns: 1fr;
  }

  .cpoms-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .cpoms-stats,
  .chronology-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cpoms-side {
    grid-template-columns: 1fr;
  }

  .concern-card {
    grid-template-columns: 1fr;
  }

  .concern-card span,
  .concern-card p,
  .concern-card em {
    grid-column: auto;
    grid-row: auto;
  }
}

@media (max-width: 560px) {
  .cpoms-page {
    padding: 20px 18px 38px;
  }

  .cpoms-hero > div,
  .cpoms-confidential,
  .cpoms-panel {
    padding: 20px;
  }

  .cpoms-stats,
  .chronology-grid {
    grid-template-columns: 1fr;
  }
}

/* ============ Kindergarten reports ============ */
.kinder-page {
  width: min(100%, 1280px);
  margin: 0 auto;
  padding: 28px 34px 46px;
  color: #12363d;
}

.kinder-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) 330px;
  gap: 20px;
  margin-bottom: 18px;
}

.kinder-hero__copy,
.kinder-ready-card,
.kinder-panel,
.kinder-stat {
  border: 1px solid rgba(18, 54, 61, .08);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(18, 54, 61, .05);
}

.kinder-hero__copy {
  padding: 32px;
  background:
    radial-gradient(circle at 88% 12%, rgba(215, 238, 233, .88), transparent 34%),
    linear-gradient(135deg, #ffffff, #f4faf7);
}

.kinder-eyebrow {
  display: inline-flex;
  color: #17626b;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.kinder-hero h1 {
  max-width: 760px;
  color: #12363d;
  font-size: clamp(34px, 4.2vw, 56px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

.kinder-hero p {
  max-width: 680px;
  margin-top: 14px;
  color: rgba(18, 54, 61, .68);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.55;
}

.kinder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.kinder-ready-card {
  display: grid;
  justify-items: center;
  padding: 26px;
  text-align: center;
  background: linear-gradient(180deg, #fff, #f7fbf9);
}

.kinder-ready-card > span,
.report-preview__top span {
  color: #17626b;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.kinder-ring {
  position: relative;
  width: 142px;
  height: 142px;
  display: grid;
  place-items: center;
  margin: 18px 0;
  border-radius: 50%;
  background:
    radial-gradient(circle, #fff 57%, transparent 59%),
    conic-gradient(#17626b calc(var(--ready) * 1%), #e3eae8 0);
}

.kinder-ring strong,
.kinder-ring small {
  grid-area: 1 / 1;
}

.kinder-ring strong {
  color: #12363d;
  font-size: 32px;
  font-weight: 900;
}

.kinder-ring small {
  margin-top: 48px;
  color: rgba(18, 54, 61, .55);
  font-size: 12px;
  font-weight: 800;
}

.kinder-ready-card p {
  color: rgba(18, 54, 61, .62);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.kinder-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.kinder-stat {
  min-height: 126px;
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 18px;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.kinder-stat span,
.kinder-stat small {
  color: rgba(18, 54, 61, .62);
  font-size: 12px;
  font-weight: 900;
}

.kinder-stat strong {
  color: #12363d;
  font-size: 30px;
  line-height: 1;
  font-weight: 900;
}

.kinder-stat--blue { background: #eaf3fb; }
.kinder-stat--mint { background: #e9f6ee; }
.kinder-stat--blush { background: #fdeef2; }
.kinder-stat--lemon { background: #fbf3e2; }

.kinder-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 352px;
  gap: 18px;
  align-items: start;
}

.kinder-main,
.kinder-aside {
  display: grid;
  gap: 18px;
}

.kinder-panel {
  padding: 22px;
}

.kinder-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.kinder-panel__head h2 {
  color: #12363d;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0;
}

.kinder-panel__head p {
  margin-top: 4px;
  color: rgba(18, 54, 61, .58);
  font-size: 13.5px;
  font-weight: 800;
}

.kinder-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.kinder-flow button,
.kid-card,
.recheck-card,
.queue-list button,
.skill-cloud button,
.branch-link,
.report-preview-card > button,
.note-photo-row button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.kinder-flow button {
  min-height: 132px;
  display: grid;
  align-content: start;
  gap: 9px;
  border-radius: 14px;
  background: #f5f8f7;
  padding: 16px;
  text-align: left;
}

.kinder-flow span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: #17626b;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.kinder-flow strong {
  color: #12363d;
  font-size: 15px;
  font-weight: 900;
}

.kinder-flow small {
  color: rgba(18, 54, 61, .62);
  font-size: 12.5px;
  line-height: 1.45;
  font-weight: 800;
}

.kid-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.kid-card {
  min-height: 190px;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 5px;
  border-radius: 16px;
  padding: 16px;
  text-align: center;
  transition: .16s;
}

.kid-card:hover,
.kinder-flow button:hover,
.recheck-card:hover,
.queue-list button:hover,
.skill-cloud button:hover,
.kinder-stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(18, 54, 61, .08);
}

.kid-card--mint { background: #d3efe7; }
.kid-card--lemon { background: #fbefc9; }
.kid-card--lav { background: #e4dff8; }
.kid-card--green { background: #ddf1d6; }
.kid-card--blush { background: #fad9e7; }
.kid-card--blue { background: #d7e8fb; }

.kid-avatar {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.78);
  color: #12363d;
  font-size: 14px;
  font-weight: 900;
}

.kid-card strong {
  margin-top: 6px;
  color: #12363d;
  font-size: 15px;
  font-weight: 900;
}

.kid-card em {
  color: rgba(18, 54, 61, .55);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.kid-card small {
  color: rgba(18, 54, 61, .62);
  font-size: 12px;
  font-weight: 800;
}

.kid-card i {
  margin-top: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  padding: 5px 10px;
  color: #17626b;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.kid-card i.needs-evidence {
  color: #b16716;
}

.recheck-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.recheck-card {
  min-height: 128px;
  border-radius: 14px;
  padding: 15px;
  text-align: left;
}

.recheck-card--lav { background: #f1edff; }
.recheck-card--blush { background: #fff0f6; }
.recheck-card--blue { background: #eef7ff; }

.recheck-card span,
.queue-list span {
  display: inline-flex;
  border-radius: 999px;
  background: rgba(255,255,255,.75);
  color: #17626b;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 900;
}

.recheck-card strong,
.queue-list strong {
  display: block;
  margin-top: 12px;
  color: #12363d;
  font-size: 14px;
  font-weight: 900;
}

.recheck-card small,
.queue-list small {
  display: block;
  margin-top: 5px;
  color: rgba(18, 54, 61, .64);
  font-size: 12px;
  line-height: 1.4;
  font-weight: 800;
}

.report-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  border-radius: 999px;
  background: #eef2f0;
  padding: 4px;
}

.report-tabs button {
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(18, 54, 61, .62);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.report-tabs button.active {
  background: #fff;
  color: #17626b;
  box-shadow: 0 4px 10px rgba(18, 54, 61, .08);
}

.skill-cloud {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.skill-cloud button {
  border: 1px solid color-mix(in srgb, var(--skill) 30%, #fff);
  border-radius: 12px;
  background: color-mix(in srgb, var(--skill) 12%, #fff);
  padding: 10px;
  text-align: left;
}

.skill-cloud strong,
.skill-cloud small {
  display: block;
}

.skill-cloud strong {
  color: var(--skill);
  font-size: 12px;
  font-weight: 900;
}

.skill-cloud small {
  color: rgba(18, 54, 61, .58);
  font-size: 11px;
  font-weight: 800;
}

.branch-link {
  width: 100%;
  min-height: 42px;
  margin-top: 14px;
  border-radius: 11px;
  background: #17626b;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.report-preview-card {
  display: grid;
  gap: 16px;
  background: linear-gradient(180deg, #fff, #f6faf8);
}

.report-preview__top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.report-preview__top strong {
  color: #12363d;
  font-size: 13px;
  font-weight: 900;
}

.report-student {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 14px;
  background: #d7eee9;
  padding: 13px;
}

.report-student strong,
.report-student small {
  display: block;
}

.report-student small {
  color: rgba(18, 54, 61, .58);
  font-size: 12px;
  font-weight: 800;
}

.report-preview-card section {
  border-top: 1px solid #e3eae8;
  padding-top: 14px;
}

.report-preview-card h3,
.full-report-preview h3 {
  color: #12363d;
  font-size: 16px;
  font-weight: 900;
}

.report-preview-card h3 span,
.full-report-preview h3 span {
  color: rgba(18, 54, 61, .45);
  font-size: 13px;
}

.report-preview-card p,
.full-report-preview p,
.full-report-preview li {
  margin-top: 7px;
  color: rgba(18, 54, 61, .78);
  font-size: 13px;
  line-height: 1.6;
  font-weight: 700;
}

.report-preview-card p.zh,
.full-report-preview p.zh {
  color: rgba(18, 54, 61, .64);
  line-height: 1.8;
}

.report-preview-card > button {
  min-height: 42px;
  border-radius: 11px;
  background: #17626b;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.queue-list {
  display: grid;
  gap: 9px;
}

.queue-list button {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 10px;
  border-radius: 12px;
  background: #f7faf8;
  padding: 12px;
  text-align: left;
}

.queue-list strong {
  margin-top: 0;
}

.queue-list small {
  grid-column: 1 / -1;
}

.student-modal,
.quick-note-demo,
.full-report-preview {
  display: grid;
  gap: 14px;
}

.student-modal__head {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 16px;
  padding: 15px;
}

.student-modal__head strong,
.student-modal__head small {
  display: block;
}

.student-modal__head small {
  color: rgba(18, 54, 61, .56);
  font-size: 13px;
}

.student-modal__head p,
.student-modal article p {
  color: rgba(18, 54, 61, .66);
  font-size: 13px;
  font-weight: 800;
}

.student-modal__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.student-modal__grid section,
.student-modal article {
  border: 1px solid #e3eae8;
  border-radius: 14px;
  padding: 14px;
}

.student-modal span,
.student-modal article span {
  color: #17626b;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.student-modal__grid strong {
  display: block;
  margin-top: 5px;
  color: #12363d;
  font-size: 16px;
}

.student-modal__grid small {
  display: block;
  color: rgba(18, 54, 61, .55);
  font-size: 12px;
  font-weight: 800;
}

.note-photo-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.note-photo-row button {
  min-height: 38px;
  border-radius: 10px;
  background: #eef2f0;
  color: #17626b;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 900;
}

.full-report-preview {
  max-width: 640px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid #e3eae8;
  border-radius: 18px;
  background: #fff;
}

.full-report-preview header {
  background: #d7eee9;
  padding: 28px;
}

.full-report-preview header span {
  color: #0f4a52;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.full-report-preview h2 {
  margin-top: 8px;
  color: #12363d;
  font-size: 34px;
  font-weight: 900;
}

.full-report-preview h2 small {
  color: rgba(18, 54, 61, .55);
  font-size: 18px;
}

.full-report-preview section {
  padding: 0 28px 22px;
}

.full-report-preview section:first-of-type {
  padding-top: 10px;
}

.full-report-preview ul {
  margin: 10px 0 0 18px;
}

@media (max-width: 1180px) {
  .kinder-hero,
  .kinder-workspace {
    grid-template-columns: 1fr;
  }

  .kinder-aside {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .kinder-stats,
  .kid-grid,
  .recheck-list,
  .kinder-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kinder-aside {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .kinder-page {
    padding: 20px 18px 38px;
  }

  .kinder-hero__copy,
  .kinder-ready-card,
  .kinder-panel {
    padding: 20px;
  }

  .kinder-stats,
  .kid-grid,
  .recheck-list,
  .kinder-flow,
  .skill-cloud,
  .student-modal__grid {
    grid-template-columns: 1fr;
  }
}

/* ============ Expanded portal modules ============ */
.portal-page {
  max-width: 1220px;
}

.portal-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  border: 1px solid #f0eef5;
  border-radius: 8px;
  background:
    radial-gradient(circle at 92% 0, rgba(157, 79, 242, .14), transparent 32%),
    linear-gradient(135deg, rgba(107, 6, 201, .07), rgba(249, 183, 47, .06));
  padding: 26px;
  margin-bottom: 18px;
  box-shadow: 0 16px 48px rgba(54, 34, 81, .045);
}

.portal-hero > span {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--school-purple), var(--school-purple-2));
  font-size: 29px;
  flex: none;
}

.portal-hero h1 {
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0;
}

.portal-hero p {
  max-width: 820px;
  margin-top: 8px;
  color: #716b78;
  font-size: 16px;
  line-height: 1.45;
  font-weight: 700;
}

.portal-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.portal-toolbar .dir-search {
  min-width: 320px;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.resource-card,
.portal-panel {
  border: 1px solid #f0eef5;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 48px rgba(54, 34, 81, .045);
}

.resource-card {
  min-height: 218px;
  display: flex;
  flex-direction: column;
  padding: 22px;
  background: linear-gradient(145deg, var(--resource-bg, #fff), #fff);
}

.resource-card__type {
  align-self: flex-start;
  border-radius: 999px;
  background: #fff;
  color: var(--resource-color, var(--school-purple));
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(40, 26, 62, .06);
}

.resource-card h2 {
  margin-top: 18px;
  color: #17111f;
  font-size: 21px;
  line-height: 1.08;
  font-weight: 900;
}

.resource-card p {
  margin-top: 8px;
  color: #7b7582;
  font-weight: 800;
}

.resource-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 20px;
}

.resource-card__foot span {
  color: #8c8691;
  font-size: 13px;
  font-weight: 800;
}

.resource-card__foot button,
.collection-strip button {
  border: 0;
  border-radius: 7px;
  background: #1d1d1d;
  color: #fff;
  padding: 9px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.resource-card--purple { --resource-bg: #fbf5ff; --resource-color: #7b30dd; }
.resource-card--orange { --resource-bg: #fff8ec; --resource-color: #f08b26; }
.resource-card--green { --resource-bg: #f2fff8; --resource-color: #189f61; }
.resource-card--cyan { --resource-bg: #effcff; --resource-color: #219acb; }
.resource-card--blue { --resource-bg: #f4f7ff; --resource-color: #507bea; }
.resource-card--pink { --resource-bg: #fff4fb; --resource-color: #d4458f; }

.portal-two,
.portfolio-board,
.project-lanes {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
  gap: 18px;
  margin-bottom: 18px;
  align-items: start;
}

.project-lanes {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.portal-panel {
  padding: 24px;
  min-width: 0;
}

.portal-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.portal-panel__head h2 {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0;
}

.portal-panel__head a {
  color: var(--school-purple);
  font-size: 14px;
  font-weight: 900;
}

.collection-strip {
  border-radius: 8px;
  padding: 26px;
  color: #fff;
  background:
    radial-gradient(circle at 100% 0, rgba(255,255,255,.24), transparent 32%),
    linear-gradient(135deg, var(--school-purple), var(--school-purple-2));
}

.collection-strip span {
  color: rgba(255,255,255,.78);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.collection-strip strong {
  display: block;
  max-width: 520px;
  margin-top: 12px;
  font-size: 27px;
  line-height: 1.05;
  font-weight: 900;
}

.collection-strip p {
  max-width: 640px;
  margin: 12px 0 20px;
  color: rgba(255,255,255,.82);
  font-weight: 700;
}

.metric-bars {
  display: grid;
  gap: 14px;
}

.metric-bar div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
  color: #332b3b;
  font-size: 14px;
  font-weight: 900;
}

.metric-bar strong {
  color: #7c7584;
}

.metric-bar i {
  display: block;
  height: 9px;
  border-radius: 999px;
  background: #f1eef6;
  overflow: hidden;
}

.metric-bar em {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.portfolio-feature {
  min-height: 370px;
}

.evidence-timeline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.evidence-card {
  min-height: 150px;
  border: 1px solid #f0eef5;
  border-top: 4px solid var(--accent);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.evidence-card span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.evidence-card strong,
.thread-list strong,
.surface-grid strong,
.project-card strong {
  display: block;
  margin-top: 8px;
  color: #18111f;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 900;
}

.evidence-card small,
.thread-list small,
.surface-grid small,
.project-card small {
  display: block;
  margin-top: 5px;
  color: #817a86;
  font-size: 12.5px;
  font-weight: 800;
}

.portfolio-students,
.surface-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.portfolio-students button,
.surface-grid button,
.thread-list button,
.project-card,
.standards-grid button {
  border: 1px solid #f0eef5;
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: .16s;
}

.portfolio-students button {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 2px 10px;
  align-items: center;
}

.portfolio-students strong {
  color: #201929;
  font-size: 14px;
  font-weight: 900;
}

.portfolio-students small {
  grid-column: 2;
  color: #817a86;
  font-size: 12px;
  font-weight: 800;
}

.family-composer .field textarea,
.family-composer .field input {
  background: #fbfbfd;
}

.thread-list,
.ops-timeline,
.project-stack,
.standards-grid,
.timeline-list {
  display: grid;
  gap: 10px;
}

.thread-list button span {
  display: inline-flex;
  border-radius: 999px;
  background: #f7f2ff;
  color: var(--school-purple);
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 900;
}

.surface-grid button span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(107, 6, 201, .1);
  color: var(--school-purple);
  font-weight: 900;
}

.ops-timeline button {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  align-items: center;
  gap: 12px;
  border: 1px solid #f0eef5;
  border-radius: 8px;
  background: #fff;
  padding: 13px;
  text-align: left;
  font: inherit;
}

.ops-timeline time {
  color: var(--school-purple);
  font-size: 14px;
  font-weight: 900;
}

.ops-timeline strong {
  display: block;
  color: #201929;
  font-size: 14px;
  font-weight: 900;
}

.ops-timeline small,
.ops-timeline em {
  color: #817a86;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.attendance-rings {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.attendance-rings div {
  display: grid;
  place-items: center;
  min-height: 92px;
  border-radius: 8px;
  background: #fbf8ff;
  text-align: center;
}

.attendance-rings strong {
  color: #18111f;
  font-size: 25px;
  font-weight: 900;
}

.attendance-rings span {
  color: #817a86;
  font-size: 12px;
  font-weight: 900;
}

.project-card {
  display: grid;
  gap: 7px;
  border-top: 4px solid var(--accent);
}

.project-card > span,
.standards-grid i {
  height: 8px;
  border-radius: 999px;
  background: #f1eef6;
  overflow: hidden;
}

.project-card > span i,
.standards-grid i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.project-card em {
  color: var(--accent);
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
}

.standards-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.standards-grid button strong {
  display: block;
  color: #18111f;
  font-size: 16px;
  font-weight: 900;
}

.standards-grid button span {
  display: block;
  margin: 6px 0 10px;
  color: #817a86;
  font-size: 12px;
  font-weight: 800;
}

.timeline-list span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-radius: 8px;
  background: #fbfbfd;
  padding: 13px;
}

.timeline-list strong {
  color: #201929;
  font-size: 14px;
  font-weight: 900;
}

.timeline-list small {
  color: #817a86;
  font-size: 12px;
  font-weight: 800;
}

.resource-card:hover,
.evidence-card:hover,
.portfolio-students button:hover,
.surface-grid button:hover,
.thread-list button:hover,
.project-card:hover,
.standards-grid button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(54, 34, 81, .09);
}

@media (max-width: 960px) {
  .resource-grid,
  .portal-two,
  .portfolio-board,
  .project-lanes,
  .portfolio-students,
  .surface-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .portal-hero {
    align-items: flex-start;
    padding: 20px;
  }

  .portal-hero > span {
    width: 48px;
    height: 48px;
    font-size: 23px;
  }

  .evidence-timeline,
  .standards-grid,
  .attendance-rings {
    grid-template-columns: 1fr;
  }

  .ops-timeline button {
    grid-template-columns: 1fr;
  }
}

/* ===== Bright rounded product refresh inspired by the latest reference ===== */
:root {
  --font: 'Atkinson Hyperlegible', 'Atkinson Hyperlegible Next', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --display: 'Atkinson Hyperlegible', 'Atkinson Hyperlegible Next', system-ui, -apple-system, sans-serif;
  --ink: #111827;
  --ink-2: #435166;
  --muted: #748094;
  --line: #e8f0f8;
  --line-2: #f1f6fb;
  --bg: #f6fbff;
  --surface: #ffffff;
  --teal: #18c2f2;
  --teal-d: #078fc2;
  --teal-ink: #035d84;
  --teal-soft: #e9f9ff;
  --red: #ff6b57;
  --red-d: #ec4f3a;
  --violet: #3c64d8;
  --coral: #ff805d;
  --amber: #f7bf3d;
  --green: #22c76b;
  --school-purple: #12b7ee;
  --school-purple-2: #4fd8ff;
  --school-orange: #f7bf3d;
  --school-orange-2: #ff805d;
  --school-ink: #111827;
  --school-soft: #f6fbff;
  --school-muted: #748094;
  --school-line: #e8f0f8;
  --radius: 18px;
  --radius-lg: 26px;
  --shadow-sm: 0 8px 22px rgba(15, 80, 125, .07);
  --shadow-md: 0 18px 48px rgba(15, 80, 125, .12);
  --shadow-pop: 0 30px 80px rgba(15, 38, 65, .24);
}

body {
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 255, 255, .55), transparent 22%),
    radial-gradient(circle at 92% 16%, rgba(216, 255, 73, .28), transparent 18%),
    linear-gradient(135deg, #13a8f2 0%, #26c4ff 58%, #1799e7 100%);
  color: var(--school-ink);
}

#app {
  min-height: calc(100vh - 28px);
  margin: 14px;
  overflow: hidden;
  border-radius: 30px;
  background: rgba(247, 252, 255, .98);
  box-shadow: 0 34px 95px rgba(0, 62, 113, .28);
}

.sidebar {
  width: 284px;
  height: calc(100vh - 28px);
  top: 14px;
  margin: 0;
  border-right: 1px solid rgba(224, 236, 247, .72);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(246, 251, 255, .94));
  box-shadow: 20px 0 52px rgba(24, 95, 146, .08);
}

.logo {
  padding: 28px 30px 20px;
  gap: 12px;
}

.logo__mark {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, #ffffff 0 14%, transparent 15%),
    linear-gradient(135deg, #20d3ff, #0aa8e8);
  box-shadow: 0 12px 28px rgba(12, 160, 222, .24);
}

.logo__mark-core {
  color: #fff;
  font-size: 17px;
  font-weight: 900;
}

.logo__name {
  color: #172033;
  font-size: 24px;
  font-weight: 900;
}

.logo__text small {
  color: #92a0b2;
  font-size: 11.5px;
  font-weight: 800;
}

.side-nav {
  padding-inline: 22px;
  gap: 8px;
}

.side-nav__group + .side-nav__group {
  border-top: 0;
  margin-top: 14px;
  padding-top: 8px;
}

.side-nav__heading {
  padding: 0 12px 4px;
}

.side-nav__heading span {
  color: #8a98ab;
  font-size: 10.5px;
  letter-spacing: .08em;
}

.side-nav__heading small {
  color: #b3bfce;
}

.side-link {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: #526277;
  padding: 9px 12px;
  font-size: 14px;
  font-weight: 850;
}

.side-link:hover {
  border-color: #e7f3fb;
  background: #fff;
  box-shadow: 0 10px 26px rgba(11, 123, 174, .06);
  color: #182236;
}

.side-link.active {
  border-color: #d7f2fd;
  background: #fff;
  color: var(--teal-d);
  box-shadow: 0 12px 30px rgba(11, 123, 174, .10);
}

.side-link__ico {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #ecfaff;
  color: var(--teal-d);
  font-size: 13px;
}

.side-link.active .side-link__ico {
  background: linear-gradient(135deg, #18c2f2, #37d6ff);
  color: #fff;
}

.side-foot {
  border-top: 0;
  padding: 16px 22px 22px;
  gap: 9px;
}

.workspace-card {
  border: 0;
  border-radius: 20px;
  background:
    radial-gradient(circle at 12% 16%, rgba(255, 255, 255, .45), transparent 18%),
    linear-gradient(145deg, #24c8ff, #119ee4);
  box-shadow: 0 18px 42px rgba(13, 153, 216, .26);
}

.workspace-card a {
  border-radius: 999px;
  color: #067eb1;
}

.main {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .78), rgba(245, 251, 255, .95)),
    var(--bg);
}

.topbar {
  height: 72px;
  margin: 0;
  border-bottom: 1px solid rgba(226, 239, 249, .8);
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(18px);
  color: #172033;
  padding: 0 28px;
}

.topbar__burger {
  color: #172033;
}

.topbar__search {
  max-width: 520px;
  min-height: 44px;
  border: 1px solid #e6f0f8;
  border-radius: 16px;
  background: #fff;
  color: #94a3b8;
  box-shadow: 0 10px 28px rgba(15, 80, 125, .06);
}

.topbar__search:focus-within {
  border-color: #b7e9fa;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(24, 194, 242, .12), 0 12px 30px rgba(15, 80, 125, .08);
}

.topbar__search input {
  color: #172033;
}

.topbar__search input::placeholder {
  color: #9ba8ba;
}

.topbar__search .search-ai {
  border-radius: 50%;
  background: #ecfaff;
  color: var(--teal-d);
}

.top-icon,
.top-user {
  border: 1px solid #e8f0f8;
  background: #fff;
  color: #172033;
  box-shadow: 0 8px 24px rgba(15, 80, 125, .06);
}

.top-icon:hover,
.top-user:hover {
  background: #f7fcff;
  color: var(--teal-d);
}

.top-user__avatar,
.avatar {
  background: linear-gradient(135deg, #18c2f2, #2bd673);
  box-shadow: 0 0 0 3px #fff, 0 8px 18px rgba(15, 80, 125, .14);
}

.outlet {
  background:
    radial-gradient(circle at 88% 8%, rgba(220, 255, 71, .18), transparent 20%),
    linear-gradient(180deg, rgba(247, 252, 255, .94), rgba(247, 252, 255, .98));
}

.page,
.syllara-page {
  max-width: 1280px;
  padding: 30px 34px 56px;
}

h1,
.syllara-hero h1,
.teacher-home h1 {
  color: #111827;
  letter-spacing: 0;
}

.panel,
.syllara-panel,
.syllara-stat,
.syllara-hero__copy,
.syllara-hero__card,
.teacher-home__main,
.teacher-home__side,
.profile-hero,
.student-stat,
.student-course-grade,
.backend-card,
.teacher-flow-card,
.kpi,
.cc-card,
.unit-tile,
.module-card,
.portal-panel,
.kinder-panel,
.cpoms-panel,
.resource-card,
.evidence-card,
.project-card {
  border-color: rgba(224, 236, 247, .92);
  border-radius: 22px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 16px 46px rgba(15, 80, 125, .07);
}

.panel__head h2,
.syllara-panel__head h2,
.school-panel__head h2,
.cpoms-panel__head h2,
.kinder-panel__head h2,
.portal-panel__head h2 {
  color: #111827;
}

.syllara-hero__copy,
.teacher-home__main,
.profile-hero--deep {
  background:
    radial-gradient(circle at 84% 12%, rgba(220, 255, 71, .28), transparent 22%),
    linear-gradient(135deg, #ffffff 0%, #edfaff 100%);
}

.syllara-hero__card,
.ai-coach-card,
.student-cpoms-panel {
  background:
    radial-gradient(circle at 88% 8%, rgba(24, 194, 242, .18), transparent 28%),
    #ffffff;
}

.btn,
.syllara-hero__card button,
.empty-action,
.admin-actions button,
.course-stack button,
.focus-list button,
.programme-card button,
.ai-prompt-stack button,
.profile-side-action,
.profile-side-link {
  border-radius: 999px;
}

.btn--primary,
.btn--red,
.syllara-hero__card button,
.empty-action {
  background: #172033;
  color: #fff;
  box-shadow: 0 12px 28px rgba(23, 32, 51, .16);
}

.btn--primary:hover,
.btn--red:hover,
.syllara-hero__card button:hover,
.empty-action:hover {
  background: #0e1728;
}

.btn--soft,
.profile-side-action,
.profile-side-link {
  background: #e9f9ff;
  color: var(--teal-d);
}

.btn--ghost {
  background: #fff;
  border-color: #e6f0f8;
}

.student-stat strong,
.student-course-grade__score strong,
.syllara-stat strong,
.backend-card strong,
.kpi__num,
.programme-audit strong,
.ai-budget-hero strong {
  color: var(--teal-d);
}

.student-stat:hover,
.student-course-grade:hover,
.student-cpoms-card:hover,
.next-step-list button:hover,
.syllara-stat:hover,
.backend-card:hover,
.teacher-flow-card:hover,
.resource-card:hover,
.evidence-card:hover,
.project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 54px rgba(15, 80, 125, .13);
}

.student-assessment-table,
.ai-usage-table,
.dtable {
  border-collapse: separate;
  border-spacing: 0;
}

.table-wrap {
  border-color: #e8f0f8;
  border-radius: 18px;
  background: #fff;
}

.dtable thead th {
  background: #f6fbff;
  color: #7d8ba0;
}

.dtable tbody tr[data-teacher]:hover,
.dtable tbody tr[data-course]:hover,
.dtable tbody tr[data-student]:hover {
  background: #f7fcff;
}

.status,
.status-pill,
.chip,
.chip--frame,
.pillc,
.ai-status {
  border-radius: 999px;
}

.student-gradebook,
.student-overview-grid,
.syllara-stats,
.ai-budget-hero {
  gap: 16px;
}

.student-profile-layout,
.ai-budget-layout,
.syllara-grid {
  gap: 22px;
}

.modal {
  border-radius: 26px;
}

.modal-overlay {
  background: rgba(10, 35, 55, .48);
  backdrop-filter: blur(6px);
}

.ai-panel__sheet {
  border-radius: 28px 0 0 28px;
}

@media (max-width: 820px) {
  body {
    background: var(--bg);
  }

  #app {
    min-height: 100vh;
    margin: 0;
    border-radius: 0;
  }

  .sidebar {
    height: 100vh;
    top: 0;
    border-radius: 0 26px 26px 0;
  }

  .topbar {
    height: 64px;
    padding-inline: 16px;
  }

  .page,
  .syllara-page {
    padding-inline: 18px;
  }
}

/* Final colour/scrollbar polish for the blue reference direction. */
.side-nav {
  scrollbar-width: none;
}

.side-nav::-webkit-scrollbar {
  display: none;
}

.student-stat strong,
.student-course-grade__score strong,
.syllara-stat strong,
.backend-card strong,
.kpi__num,
.programme-audit strong,
.ai-budget-hero strong,
.syllara-eyebrow,
.teacher-home__kicker span,
.syllara-hero__card span,
.brand-preview-card span,
.link,
.side-link.active,
.profile-side-action,
.profile-side-link {
  color: #078fc2;
}

.side-link.active .side-link__ico,
.progress__bar,
.ai-budget-meter i,
.ai-table-meter i {
  background: linear-gradient(90deg, #16bdf0, #33d6ff);
}

.btn--soft,
.profile-side-action,
.profile-side-link,
.chip--frame,
.pillc {
  background: #e9f9ff;
  color: #078fc2;
}

.status--published,
.status-pill--graded,
.ai-status--ok {
  background: #edfff7;
  color: #09865a;
}

/* AI budget page responsive polish. */
.admin-ai-budget {
  container-type: inline-size;
}

.admin-ai-budget .page-head {
  align-items: flex-start;
}

.admin-ai-budget .ai-budget-hero {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
}

.admin-ai-budget .ai-budget-hero article {
  min-width: 0;
}

.admin-ai-budget .ai-budget-hero strong {
  font-size: clamp(24px, 2.2vw, 30px);
  line-height: 1.06;
  overflow-wrap: normal;
  word-break: normal;
}

.admin-ai-budget .feature-spend-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
}

.admin-ai-budget .ai-budget-layout {
  grid-template-columns: minmax(720px, 1fr) minmax(300px, 360px);
}

.admin-ai-budget .table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.admin-ai-budget .ai-usage-table {
  min-width: 875px;
  table-layout: auto;
}

.admin-ai-budget .ai-usage-table th:nth-child(1) { width: 220px; }
.admin-ai-budget .ai-usage-table th:nth-child(2) { width: 190px; }
.admin-ai-budget .ai-usage-table th:nth-child(3) { width: 130px; }
.admin-ai-budget .ai-usage-table th:nth-child(4) { width: 70px; }
.admin-ai-budget .ai-usage-table th:nth-child(5) { width: 115px; }
.admin-ai-budget .ai-usage-table th:nth-child(6) { width: 150px; }

.admin-ai-budget .ai-usage-table th,
.admin-ai-budget .ai-usage-table td {
  overflow-wrap: normal;
  word-break: normal;
}

.admin-ai-budget .ai-usage-table td strong {
  line-height: 1.25;
}

.admin-ai-budget .ai-usage-table .cellrow {
  align-items: center;
  min-width: 0;
}

.admin-ai-budget .ai-usage-table .cellrow > div {
  min-width: 0;
}

.admin-ai-budget .ai-usage-table .cellrow strong,
.admin-ai-budget .ai-usage-table .cellrow small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-ai-budget .ai-usage-table .dtable__act {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.admin-ai-budget .ai-usage-table .dtable__act button {
  margin: 0;
}

@media (max-width: 1280px) {
  .admin-ai-budget .ai-budget-layout {
    grid-template-columns: 1fr;
  }
}

@container (max-width: 1180px) {
  .admin-ai-budget .ai-budget-layout {
    grid-template-columns: 1fr;
  }
}

@container (max-width: 760px) {
  .admin-ai-budget .panel {
    padding: 20px;
  }

  .admin-ai-budget .table-wrap {
    border: 0;
    background: transparent;
    overflow: visible;
  }

  .admin-ai-budget .ai-usage-table {
    display: block;
    min-width: 0;
    width: 100%;
    border-spacing: 0;
  }

  .admin-ai-budget .ai-usage-table thead {
    display: none;
  }

  .admin-ai-budget .ai-usage-table tbody {
    display: grid;
    gap: 12px;
  }

  .admin-ai-budget .ai-usage-table tr {
    display: grid;
    border: 1px solid #e8f0f8;
    border-radius: 18px;
    background: #fff;
    padding: 14px;
    box-shadow: 0 14px 34px rgba(15, 80, 125, .08);
  }

  .admin-ai-budget .ai-usage-table tr:hover {
    background: #fff;
  }

  .admin-ai-budget .ai-usage-table td {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding: 9px 0;
    border-bottom: 1px solid #edf4fa;
  }

  .admin-ai-budget .ai-usage-table td::before {
    content: attr(data-label);
    color: #7d8ba0;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
  }

  .admin-ai-budget .ai-usage-table td[data-label="Teacher"] {
    display: block;
    padding-top: 0;
  }

  .admin-ai-budget .ai-usage-table td[data-label="Teacher"]::before {
    content: none;
  }

  .admin-ai-budget .ai-usage-table .cellrow strong,
  .admin-ai-budget .ai-usage-table .cellrow small {
    white-space: normal;
  }

  .admin-ai-budget .ai-usage-table td > small,
  .admin-ai-budget .ai-usage-table td > .ai-table-meter {
    grid-column: 2;
    margin-top: 0;
  }

  .admin-ai-budget .ai-usage-table td > .ai-status {
    justify-self: start;
  }

  .admin-ai-budget .ai-usage-table .dtable__act {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    text-align: left;
    padding-bottom: 0;
    border-bottom: 0;
  }

  .admin-ai-budget .ai-usage-table .dtable__act::before {
    flex: 0 0 100%;
    text-align: left;
  }

  .admin-ai-budget .ai-usage-table .dtable__act button {
    border-radius: 999px;
    background: #e9f9ff;
    padding: 7px 11px;
  }
}

@media (max-width: 560px) {
  .admin-ai-budget .page-head .panel__head-actions {
    width: 100%;
  }

  .admin-ai-budget .page-head .panel__head-actions .btn {
    flex: 1;
  }
}

.ai-routing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 18px;
  margin-bottom: 18px;
  align-items: stretch;
}

.ai-routing-panel,
.ai-cache-panel,
.ai-route-panel {
  min-width: 0;
}

.ai-provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 12px;
}

.ai-provider-card,
.ai-route-card {
  min-width: 0;
  border: 1px solid #e6eef7;
  border-radius: 18px;
  background: #fff;
  padding: 14px;
  box-shadow: 0 14px 34px rgba(15, 80, 125, .06);
}

.ai-provider-card.is-disabled,
.ai-route-card.is-disabled {
  opacity: .62;
}

.ai-provider-card__head,
.ai-route-card__top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.ai-provider-card__head > div,
.ai-route-card__top > div {
  min-width: 0;
  flex: 1;
}

.ai-provider-card strong,
.ai-route-card strong {
  display: block;
  color: #142033;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.ai-provider-card small,
.ai-route-card span,
.ai-provider-card p,
.ai-cache-note {
  color: #718198;
  line-height: 1.4;
}

.ai-provider-card small {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.ai-provider-card p {
  margin: 12px 0;
  font-size: 13px;
}

.ai-provider-mark {
  display: inline-grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: linear-gradient(135deg, #35c5f4, #7c2ff0);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.ai-provider-card__head .ai-status {
  flex: 0 0 auto;
}

.ai-provider-pricing {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.ai-provider-pricing span {
  border-radius: 12px;
  background: #f4f9fd;
  padding: 9px;
  color: #718198;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
}

.ai-provider-pricing b {
  display: block;
  color: #142033;
  font-size: 13px;
  margin-top: 3px;
}

.ai-provider-secret {
  display: grid;
  gap: 3px;
  border: 1px solid #e6eef7;
  border-radius: 14px;
  background: #f8fcff;
  padding: 10px 11px;
  margin-top: 12px;
}

.ai-provider-secret span,
.secret-help span {
  color: #718198;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.ai-provider-secret strong,
.secret-help strong {
  color: #b26a00;
  line-height: 1.25;
}

.ai-provider-secret strong.is-connected,
.secret-help.is-connected strong {
  color: #09865a;
}

.ai-provider-secret small,
.secret-help small {
  color: #718198;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.secret-help {
  display: grid;
  gap: 4px;
  border: 1px solid #ffdca7;
  border-radius: 16px;
  background: #fff9ef;
  padding: 13px;
  margin-bottom: 12px;
}

.secret-help.is-connected {
  border-color: #bbefd8;
  background: #effff7;
}

.ai-provider-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.ai-cache-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ai-cache-metrics div {
  border: 1px solid #e6eef7;
  border-radius: 16px;
  background: #f8fcff;
  padding: 12px;
}

.ai-cache-metrics span {
  display: block;
  color: #718198;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.ai-cache-metrics strong {
  display: block;
  margin-top: 5px;
  color: #142033;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.ai-cache-note {
  margin-top: 14px;
  font-size: 13px;
}

.ai-route-panel {
  margin-bottom: 18px;
}

.ai-route-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 12px;
}

.ai-route-card__top {
  align-items: center;
}

.ai-route-card__top span {
  display: block;
  margin-bottom: 3px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.ai-route-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}

.ai-route-flow div {
  min-width: 0;
  border-radius: 14px;
  background: #f4f9fd;
  padding: 11px;
}

.ai-route-flow span {
  display: block;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.ai-route-flow i {
  display: block;
  width: 24px;
  height: 2px;
  border-radius: 999px;
  background: #b6c7da;
  position: relative;
}

.ai-route-flow i::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 7px;
  height: 7px;
  border-top: 2px solid #b6c7da;
  border-right: 2px solid #b6c7da;
  transform: translateY(-50%) rotate(45deg);
}

.ai-route-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.ai-route-meta span {
  border-radius: 999px;
  background: #eef9ff;
  color: #277394;
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 800;
}

.toggle-field {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #e6eef7;
  border-radius: 14px;
  background: #f8fcff;
  padding: 12px 14px;
  margin-bottom: 12px;
  color: #142033;
  font-weight: 800;
}

.toggle-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--school-purple);
}

@container (max-width: 1040px) {
  .admin-ai-budget .ai-routing-grid {
    grid-template-columns: 1fr;
  }
}

@container (max-width: 620px) {
  .ai-provider-pricing,
  .ai-route-flow {
    grid-template-columns: 1fr;
  }

  .ai-route-flow i {
    display: none;
  }

  .ai-cache-metrics {
    grid-template-columns: 1fr;
  }
}

/* App chrome edge alignment and Syllara brand fit. */
@media (min-width: 821px) {
  #app {
    align-items: stretch;
  }

  .sidebar {
    top: 0;
    height: calc(100vh - 28px);
    border-radius: 30px 0 0 30px;
    overflow: hidden;
  }

  .main {
    min-height: calc(100vh - 28px);
    border-radius: 0 30px 30px 0;
    overflow: clip;
  }

  .topbar {
    top: 0;
    height: 72px;
    min-height: 72px;
    border-radius: 0 30px 0 0;
    padding: 0 30px;
  }

  .logo {
    min-height: 84px;
    padding: 24px 28px 16px;
    overflow: hidden;
  }

  .logo__text {
    min-width: 0;
    max-width: 184px;
    display: grid;
    gap: 2px;
  }

  .logo__name,
  .logo__text small {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .logo__name {
    line-height: 1.05;
  }

  .logo__text small {
    line-height: 1.2;
  }

  .topbar__search {
    min-width: 220px;
  }

  .topbar__actions {
    min-width: 0;
    flex: none;
  }

  .top-user {
    width: clamp(212px, 22vw, 282px);
    height: 48px;
    min-height: 48px;
    border-radius: 18px;
    padding: 4px 12px 4px 7px;
    overflow: hidden;
  }

  .top-user__avatar {
    flex: none;
  }

  .top-user span:not(.top-user__avatar) {
    min-width: 0;
    flex: 1;
  }

  .top-user strong,
  .top-user small {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .top-user i {
    flex: none;
  }
}

@media (min-width: 821px) and (max-width: 1040px) {
  .topbar {
    gap: 12px;
    padding: 0 18px;
  }

  .topbar__search {
    min-width: 150px;
  }

  .topbar__actions {
    gap: 8px;
  }

  .top-icon {
    width: 34px;
    height: 34px;
  }

  .top-user {
    width: clamp(170px, 24vw, 212px);
    gap: 8px;
    padding-right: 10px;
  }

  .top-user strong {
    font-size: 14px;
  }

  .top-user small {
    font-size: 12px;
  }
}

@media (max-width: 820px) {
  .topbar {
    top: 0;
    border-radius: 0;
  }

  .main {
    border-radius: 0;
    overflow: visible;
  }
}

/* ============ Department monitor ============ */
.teacher-position {
  display: inline-flex;
  margin-top: 8px;
  border-radius: 999px;
  background: #eef8ff;
  color: #1375a8;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 900;
}

.hod-hero {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.hod-stat {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 18px;
  box-shadow: 0 16px 42px rgba(34, 71, 101, .06);
}

.hod-stat span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.hod-stat strong {
  display: block;
  margin: 8px 0 4px;
  color: var(--ink);
  font-size: 30px;
  line-height: 1;
}

.hod-stat small {
  display: block;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.35;
}

.hod-stat--danger { border-color: #ffd6d9; background: #fff7f7; }
.hod-stat--blue { border-color: #d8ecff; background: #f8fcff; }
.hod-stat--green { border-color: #d9f2e6; background: #f7fff9; }
.hod-stat--amber { border-color: #ffe1aa; background: #fffaf0; }

.department-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, .9fr);
  gap: 18px;
  align-items: start;
}

.hod-alert-panel,
.hod-roster-panel,
.hod-gradebook-panel {
  box-shadow: 0 18px 54px rgba(34, 71, 101, .055);
}

.hod-alert {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 15px;
  margin-bottom: 12px;
  background: #fff;
}

.hod-alert--critical {
  border-color: #ffc7c9;
  background: #fff7f7;
}

.hod-alert--warning {
  border-color: #ffe2b6;
  background: #fffaf2;
}

.hod-alert__main {
  min-width: 0;
}

.hod-alert__main span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.hod-alert__main strong {
  display: block;
  margin-top: 5px;
  font-size: 15px;
  color: var(--ink);
}

.hod-alert__main p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.hod-alert__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: none;
}

.hod-roster {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hod-teacher {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #fff;
}

.hod-teacher strong,
.hod-teacher small {
  display: block;
}

.hod-teacher strong {
  font-size: 14px;
}

.hod-teacher small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.hod-teacher > span:last-child {
  min-width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 900;
}

.hod-gradebook-wrap {
  overflow-x: auto;
}

.hod-gradebook-table {
  min-width: 960px;
}

.hod-gradebook-table tr.is-critical td {
  background: #fff8f8;
}

.hod-gradebook-table tr.is-watch td {
  background: #fffdf5;
}

.hod-gradebook-table td small {
  display: block;
  font-size: 12px;
}

.hod-score-pill {
  display: inline-flex;
  margin: 0 6px 6px 0;
  border-radius: 999px;
  background: #f3f6f9;
  color: var(--ink-2);
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.hod-score-pill.is-low {
  background: #fff1f1;
  color: #c92f39;
}

.hod-risk {
  display: inline-flex;
  justify-content: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.hod-risk--critical {
  background: #fff1f1;
  color: #c92f39;
}

.hod-risk--watch {
  background: #fff7df;
  color: #9a6200;
}

.hod-risk--ok {
  background: #eaf8ef;
  color: #167647;
}

.sheet-score-cell input:disabled,
.sheet-comment-input:disabled {
  color: var(--ink-2);
  background: rgba(246, 248, 251, .86);
  cursor: default;
  -webkit-text-fill-color: var(--ink-2);
}

@media (max-width: 1000px) {
  .hod-hero {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .department-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .hod-hero {
    grid-template-columns: 1fr;
  }

  .hod-alert {
    display: block;
  }

  .hod-alert__actions {
    flex-direction: row;
    flex-wrap: wrap;
    margin-top: 12px;
  }
}

/* ============ House points ============ */
.house-score-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.house-score-card {
  min-height: 250px;
  border: 1px solid color-mix(in srgb, var(--house) 26%, var(--line));
  border-radius: 22px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--house) 10%, #fff), #fff 52%);
  padding: 18px;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  box-shadow: 0 18px 54px rgba(34, 71, 101, .065);
  transition: transform .16s, box-shadow .16s;
}

.house-score-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 70px rgba(34, 71, 101, .12);
}

.house-score-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.house-rank {
  border-radius: 999px;
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--house) 25%, var(--line));
  color: var(--house);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 900;
}

.house-emblem,
.house-hero__mark {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--house);
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 14px 36px color-mix(in srgb, var(--house) 22%, transparent);
}

.house-score-card h2 {
  font-size: 19px;
  margin-bottom: 5px;
}

.house-score-card p {
  color: var(--muted);
  font-size: 13px;
  min-height: 38px;
}

.house-score-card > strong {
  display: block;
  margin-top: auto;
  font-size: 36px;
  line-height: 1;
  color: var(--house);
}

.house-meter {
  height: 9px;
  border-radius: 999px;
  background: #eef2f7;
  overflow: hidden;
  margin: 13px 0 10px;
}

.house-meter span {
  display: block;
  width: var(--pct);
  height: 100%;
  border-radius: inherit;
  background: var(--house);
}

.house-score-card small {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.35;
}

.house-layout,
.house-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .85fr);
  gap: 18px;
  align-items: start;
}

.behavior-bank {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.behavior-bank__group {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: #fff;
}

.behavior-bank__group h3 {
  margin-bottom: 10px;
}

.behavior-bank__group div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.behavior-bank__group span {
  display: inline-flex;
  gap: 6px;
  border-radius: 999px;
  background: #f4f8fb;
  color: var(--ink-2);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

.behavior-bank__group span strong {
  color: var(--green);
}

.behavior-bank__group--deduction span strong {
  color: var(--danger);
}

.house-ledger {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.house-ledger-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 12px;
  background: #fff;
}

.house-ledger-row__points {
  min-width: 44px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #eaf8ef;
  color: #167647;
  font-size: 13px;
  font-weight: 900;
}

.house-ledger-row.is-deduction .house-ledger-row__points {
  background: #fff1f1;
  color: #c92f39;
}

.house-ledger-row strong,
.house-ledger-row small {
  display: block;
}

.house-ledger-row strong {
  font-size: 13.5px;
}

.house-ledger-row small,
.house-ledger-row p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.house-ledger-row p {
  margin-top: 5px;
}

.house-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  border-radius: 24px;
  border: 1px solid color-mix(in srgb, var(--house) 28%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--house) 13%, #fff), #fff);
  padding: 24px;
  margin-bottom: 18px;
  box-shadow: 0 18px 54px rgba(34, 71, 101, .06);
}

.house-hero__main {
  flex: 1;
  min-width: 0;
}

.house-hero__main span {
  display: block;
  color: var(--house);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.house-hero__main p {
  color: var(--muted);
}

.house-hero__score {
  text-align: right;
}

.house-hero__score strong {
  display: block;
  color: var(--house);
  font-size: 42px;
  line-height: 1;
}

.house-hero__score small {
  color: var(--muted);
  font-weight: 800;
}

.house-class-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.house-class-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fff;
  padding: 14px;
  cursor: pointer;
  transition: background .14s, border-color .14s;
}

.house-class-card:hover {
  border-color: #d6dce6;
  background: #fbfdff;
}

.house-class-card > div:first-child {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.house-class-card strong,
.house-class-card small {
  display: block;
}

.house-class-card small {
  color: var(--muted);
  font-size: 12px;
}

.house-class-card__score {
  text-align: right;
}

.house-class-card__score strong {
  color: var(--ink);
  font-size: 23px;
}

.house-class-card__actions {
  display: flex;
  gap: 8px;
}

.house-class-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.house-class-summary article {
  border: 1px solid color-mix(in srgb, var(--house) 23%, var(--line));
  border-radius: 18px;
  background: #fff;
  padding: 16px;
}

.house-class-summary span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.house-class-summary strong {
  display: block;
  margin-top: 6px;
  color: var(--house);
  font-size: 28px;
}

.house-class-summary small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.house-student-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.house-student-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 14px;
}

.house-student-card__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.house-student-card__head strong,
.house-student-card__head small {
  display: block;
}

.house-student-card__head small,
.house-student-card p {
  color: var(--muted);
  font-size: 12px;
}

.house-student-card p {
  margin: 12px 0;
  min-height: 34px;
}

.house-student-score {
  min-width: 38px;
  height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #eaf8ef;
  color: #167647;
  font-weight: 900;
}

.house-student-score.is-negative {
  background: #fff1f1;
  color: #c92f39;
}

.house-student-card__actions {
  display: flex;
  gap: 8px;
}

.house-student-card__actions .btn {
  flex: 1;
}

.house-point-modal-target {
  border: 1px solid color-mix(in srgb, var(--house) 26%, var(--line));
  border-radius: 16px;
  background: color-mix(in srgb, var(--house) 9%, #fff);
  padding: 14px;
  margin-bottom: 14px;
}

.house-point-modal-target span,
.house-point-modal-target strong {
  display: block;
}

.house-point-modal-target span {
  color: var(--house);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.house-point-modal-target strong {
  margin-top: 4px;
}

@media (max-width: 1180px) {
  .house-score-grid,
  .house-class-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .house-student-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .house-layout,
  .house-detail-grid,
  .behavior-bank {
    grid-template-columns: 1fr;
  }

  .house-class-card {
    grid-template-columns: 1fr;
  }

  .house-class-card__score {
    text-align: left;
  }
}

@media (max-width: 560px) {
  .house-score-grid,
  .house-class-summary,
  .house-student-grid {
    grid-template-columns: 1fr;
  }

  .house-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .house-hero__score {
    text-align: left;
  }
}

/* ===== Admin setup wizard ===== */
.setup-wizard-page {
  max-width: 1220px;
}

.setup-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.setup-steps article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 14px 16px;
}

.setup-steps span {
  grid-row: span 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--teal-soft);
  color: var(--teal-d);
  font-weight: 900;
}

.setup-steps strong,
.setup-steps small {
  min-width: 0;
}

.setup-steps small {
  color: var(--muted);
  font-size: 12.5px;
}

.setup-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.setup-main {
  min-width: 0;
}

.setup-profile-panel .field-row {
  margin-bottom: 16px;
}

.setup-field-block > span {
  display: block;
  margin-bottom: 8px;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.setup-level-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.setup-check-pill {
  cursor: pointer;
}

.setup-check-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.setup-check-pill span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 7px 12px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 800;
  transition: .14s ease;
}

.setup-check-pill input:checked + span {
  border-color: color-mix(in srgb, var(--teal-d) 35%, var(--line));
  background: var(--teal-soft);
  color: var(--teal-d);
}

.setup-module-head {
  align-items: flex-start;
}

.setup-inline-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.setup-module-sections {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.setup-module-section h3 {
  margin-bottom: 10px;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.setup-module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.module-toggle-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 14px;
  cursor: pointer;
  transition: border-color .14s ease, background .14s ease, box-shadow .14s ease;
}

.module-toggle-card:hover {
  border-color: color-mix(in srgb, var(--teal-d) 22%, var(--line));
  box-shadow: var(--shadow-sm);
}

.module-toggle-card.is-on {
  border-color: color-mix(in srgb, var(--teal-d) 35%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--teal-soft) 70%, #fff), #fff);
}

.module-toggle-card.is-required {
  cursor: default;
}

.module-toggle-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.module-toggle-card__switch {
  position: relative;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: #e7ebf0;
  transition: background .14s ease;
}

.module-toggle-card__switch::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(13,17,22,.18);
  transition: transform .14s ease;
}

.module-toggle-card.is-on .module-toggle-card__switch {
  background: var(--teal-d);
}

.module-toggle-card.is-on .module-toggle-card__switch::after {
  transform: translateX(18px);
}

.module-toggle-card__copy {
  min-width: 0;
}

.module-toggle-card__copy strong,
.module-toggle-card__copy small,
.module-toggle-card__copy em {
  display: block;
}

.module-toggle-card__copy strong {
  margin-bottom: 4px;
  font-size: 14.5px;
}

.module-toggle-card__copy small {
  color: var(--muted);
  font-size: 12.5px;
}

.module-toggle-card__copy em {
  margin-top: 8px;
  color: var(--teal-d);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.setup-summary {
  position: sticky;
  top: 76px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.setup-summary__eyebrow {
  color: var(--teal-d);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.setup-summary > strong {
  display: block;
  font-size: 30px;
  line-height: 1.08;
}

.setup-summary > strong b {
  color: var(--teal-d);
}

.setup-summary > p {
  color: var(--muted);
  font-size: 13.5px;
}

.setup-summary__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}

.setup-summary__list div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
}

.setup-summary__list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.setup-summary__list strong {
  min-width: 0;
  font-size: 13px;
}

.setup-summary .btn {
  width: 100%;
}

@media (max-width: 1040px) {
  .setup-layout {
    grid-template-columns: 1fr;
  }

  .setup-summary {
    position: static;
  }
}

@media (max-width: 760px) {
  .setup-steps,
  .setup-module-grid {
    grid-template-columns: 1fr;
  }

  .setup-module-head {
    align-items: stretch;
    flex-direction: column;
  }

  .setup-inline-actions {
    justify-content: flex-start;
  }
}

/* Login lockup is intentionally larger than the sidebar logo. */
.login .logo--login {
  width: min(100%, 620px);
  overflow: visible;
}

.login .logo--login .logo__text {
  flex: 1;
  max-width: 390px;
  overflow: visible;
}

.login .logo--login .logo__name,
.login .logo--login .logo__text small {
  max-width: none;
  overflow: visible;
  text-overflow: clip;
}

.login .logo--login .logo__name {
  white-space: nowrap;
}

.login .logo--login .logo__text small {
  white-space: normal;
}

/* Announcements and acknowledgement tracking. */
.top-icon--announcement {
  font-weight: 900;
}

.announcements-page,
.admin-announcements-page {
  max-width: 1180px;
}

.announcement-page-kpis,
.announcement-admin-kpis {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.announcement-page-kpis span,
.announcement-admin-kpis article {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 13px 16px;
  box-shadow: 0 16px 42px rgba(34, 71, 101, .06);
}

.announcement-page-kpis strong,
.announcement-admin-kpis strong {
  color: var(--teal-d);
  font-size: 24px;
  line-height: 1;
}

.announcement-admin-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
}

.announcement-admin-kpis article {
  display: grid;
  gap: 6px;
}

.announcement-admin-kpis span,
.announcement-admin-kpis small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.announcement-callout {
  display: flex;
  align-items: center;
  gap: 15px;
  border: 1px solid #fed7aa;
  border-radius: 22px;
  background: linear-gradient(135deg, #fff7ed, #fff);
  padding: 18px 20px;
  margin-bottom: 18px;
}

.announcement-callout > span {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #f97316;
  color: #fff;
  font-weight: 900;
}

.announcement-callout strong {
  display: block;
  font-size: 18px;
}

.announcement-callout p {
  color: var(--muted);
  font-size: 14px;
}

.announcement-callout--clear {
  border-color: #bbf7d0;
  background: linear-gradient(135deg, #f0fdf4, #fff);
}

.announcement-callout--clear > span {
  background: #22c55e;
}

.announcement-list {
  display: grid;
  gap: 14px;
}

.announcement-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  border: 1px solid var(--line);
  border-left: 6px solid #38bdf8;
  border-radius: 22px;
  background: #fff;
  padding: 20px;
  box-shadow: 0 18px 48px rgba(15, 80, 125, .08);
}

.announcement-card--urgent {
  border-left-color: #ef4444;
}

.announcement-card--important {
  border-left-color: #f97316;
}

.announcement-card--needs-action {
  background: linear-gradient(135deg, #fff7ed, #fff);
}

.announcement-card__main {
  min-width: 0;
}

.announcement-card__meta,
.announcement-card__receipt,
.announcement-admin-progress,
.announcement-pending-list {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.announcement-card__meta {
  margin-bottom: 10px;
}

.announcement-card__meta span,
.announcement-card__receipt span,
.announcement-card__receipt small,
.announcement-admin-progress span,
.announcement-pending-list span,
.announcement-pin,
.announcement-priority {
  border-radius: 999px;
  background: #eef7ff;
  color: #16719d;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 900;
}

.announcement-priority {
  background: #f3e8ff;
  color: #6d13c9;
}

.announcement-card--urgent .announcement-priority {
  background: #fee2e2;
  color: #b91c1c;
}

.announcement-card--important .announcement-priority {
  background: #ffedd5;
  color: #c2410c;
}

.announcement-pin {
  background: #e0f2fe;
  color: #0369a1;
}

.announcement-card h2 {
  margin-bottom: 8px;
  font-size: 20px;
}

.announcement-card p {
  color: var(--ink-2);
  line-height: 1.6;
}

.announcement-card__receipt,
.announcement-admin-progress,
.announcement-pending-list {
  margin-top: 14px;
}

.announcement-card__receipt span {
  background: #eefdf6;
  color: #15803d;
}

.announcement-card__actions {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.announcement-card__actions .btn:disabled {
  opacity: .55;
  cursor: default;
}

.announcement-admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}

.announcement-admin-progress span {
  background: #f8fafc;
  color: var(--muted);
}

.announcement-admin-progress strong {
  color: var(--ink);
}

.announcement-pending-list span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff7ed;
  color: #9a3412;
}

.announcement-pending-list b {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fed7aa;
  color: #9a3412;
  font-size: 10px;
}

.announcement-pending-list--clear {
  color: #15803d;
  background: #f0fdf4;
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 800;
}

.announcement-policy ol {
  display: grid;
  gap: 12px;
  counter-reset: announcement-policy;
  list-style: none;
}

.announcement-policy li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
}

.announcement-policy li::before {
  counter-increment: announcement-policy;
  content: counter(announcement-policy);
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #f3e8ff;
  color: #6d13c9;
  font-weight: 900;
}

.announcement-policy strong,
.announcement-policy span {
  display: block;
}

.announcement-policy span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 10px 0;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 800;
}

.check-row input {
  width: 16px;
  height: 16px;
}

@media (max-width: 900px) {
  .announcement-card,
  .announcement-admin-layout,
  .announcement-admin-kpis {
    grid-template-columns: 1fr;
  }

  .announcement-card__actions {
    justify-content: flex-start;
  }
}

/* School calendar and personal teacher schedule. */
.school-calendar-page {
  max-width: 1240px;
}

.calendar-hero-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.calendar-hero-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  padding: 18px;
  box-shadow: 0 18px 48px rgba(15, 80, 125, .08);
}

.calendar-hero-card span,
.calendar-hero-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.calendar-hero-card strong {
  display: block;
  margin: 7px 0 4px;
  color: var(--teal-d);
  font-size: 28px;
  line-height: 1;
}

.calendar-hero-card--today {
  background: linear-gradient(135deg, #e8f9ff, #fff);
}

.calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}

.calendar-main,
.calendar-side {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.calendar-week-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.calendar-day {
  min-width: 150px;
  border: 1px solid #e8f0f8;
  border-radius: 18px;
  background: #f8fcff;
  padding: 12px;
}

.calendar-day.is-today {
  border-color: #b7e9fa;
  background: linear-gradient(180deg, #effcff, #fff);
  box-shadow: 0 16px 38px rgba(24, 194, 242, .12);
}

.calendar-day__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.calendar-day__head span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #e9f9ff;
  color: var(--teal-d);
  font-size: 12px;
  font-weight: 900;
}

.calendar-day__head strong {
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-day__blocks,
.calendar-today-list,
.school-date-list,
.calendar-assessment-list {
  display: grid;
  gap: 10px;
}

.schedule-block,
.calendar-assessment-row {
  width: 100%;
  min-width: 0;
  border: 1px solid #edf3fa;
  border-radius: 16px;
  background: #fff;
  padding: 12px;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: .16s ease;
}

.schedule-block {
  position: relative;
  display: grid;
  gap: 4px;
  overflow: hidden;
}

.schedule-block:hover,
.calendar-assessment-row:hover,
.school-date-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(15, 80, 125, .12);
}

.schedule-block i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
}

.schedule-block span {
  color: var(--teal-d);
  font-size: 11px;
  font-weight: 900;
}

.schedule-block strong {
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.25;
}

.schedule-block small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.schedule-block--compact {
  padding-left: 16px;
}

.school-date-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 14px;
  transition: .16s ease;
}

.school-date-card span {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 9px;
  background: #e9f9ff;
  color: var(--teal-d);
  font-size: 11px;
  font-weight: 900;
}

.school-date-card strong,
.school-date-card small {
  display: block;
}

.school-date-card strong {
  margin-top: 9px;
  color: var(--ink);
  line-height: 1.3;
}

.school-date-card small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.school-date-card p {
  margin-top: 9px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.45;
}

.school-date-card--green span {
  background: #dcfce7;
  color: #166534;
}

.school-date-card--orange span {
  background: #ffedd5;
  color: #c2410c;
}

.school-date-card--purple span {
  background: #f3e8ff;
  color: #6d13c9;
}

.school-date-card--blue span {
  background: #dbeafe;
  color: #1d4ed8;
}

.calendar-assessment-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.calendar-assessment-row > span {
  width: 10px;
  height: 44px;
  border-radius: 999px;
}

.calendar-assessment-row strong,
.calendar-assessment-row small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-assessment-row strong {
  color: var(--ink);
  font-size: 14px;
}

.calendar-assessment-row small {
  color: var(--muted);
  font-size: 12.5px;
}

.calendar-assessment-row em {
  border-radius: 999px;
  background: #f8fafc;
  color: var(--muted);
  padding: 6px 10px;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

@media (max-width: 1040px) {
  .calendar-layout,
  .calendar-hero-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .calendar-assessment-row {
    grid-template-columns: 8px minmax(0, 1fr);
  }

  .calendar-assessment-row em {
    grid-column: 2;
    justify-self: start;
  }
}

/* Game Evidence / BlueCat v1 */
.games-page {
  display: grid;
  gap: 22px;
}

.game-hero-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.game-hero-card,
.game-session-summary article {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 18px 40px rgba(15, 23, 42, .06);
  padding: 18px;
  min-width: 0;
}

.game-hero-card span,
.game-hero-card small,
.game-session-summary span,
.game-session-summary small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
}

.game-hero-card span,
.game-session-summary span {
  text-transform: uppercase;
  letter-spacing: .04em;
}

.game-hero-card strong,
.game-session-summary strong {
  display: block;
  margin: 7px 0 4px;
  color: var(--ink);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.game-hero-card--blue { background: linear-gradient(145deg, #eff8ff, #fff); }
.game-hero-card--green { background: linear-gradient(145deg, #edfdf7, #fff); }
.game-hero-card--orange { background: linear-gradient(145deg, #fff6e8, #fff); }
.game-hero-card--purple { background: linear-gradient(145deg, #f6efff, #fff); }

.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 22px;
  align-items: start;
}

.game-main,
.game-side {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.game-session-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.game-session-head > div {
  min-width: 0;
}

.game-session-head h2 {
  margin: 8px 0 4px;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.08;
}

.game-provider-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal-d);
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.game-session-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.game-session-summary article {
  box-shadow: none;
  padding: 14px;
}

.game-session-summary strong {
  font-size: clamp(20px, 2vw, 28px);
}

.game-link-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.game-link-strip span {
  min-width: 0;
  border-radius: 14px;
  background: #f7fbff;
  color: var(--ink-2);
  padding: 11px 12px;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.game-link-strip strong {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.game-concept-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.game-concept-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 16px;
}

.game-concept-card > div:first-child {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.game-concept-card strong {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.game-concept-card span {
  color: var(--ink);
  font-size: 22px;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}

.game-concept-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.game-concept-card--red .progress__bar,
.game-score--low {
  background: linear-gradient(90deg, #ef4444, #fb7185);
}

.game-concept-card--orange .progress__bar,
.game-score--watch {
  background: linear-gradient(90deg, #f59e0b, #fb923c);
}

.game-concept-card--green .progress__bar,
.game-score--ok {
  background: linear-gradient(90deg, #22c55e, #2dd4bf);
}

.game-results-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.game-results-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: #fff;
}

.game-results-table th,
.game-results-table td {
  border-bottom: 1px solid #edf2f7;
  padding: 14px;
  text-align: left;
  vertical-align: middle;
}

.game-results-table th {
  background: #f6fbff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.game-results-table td {
  color: var(--ink);
  font-size: 14px;
}

.game-score {
  display: inline-flex;
  align-items: center;
  min-width: 58px;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  padding: 7px 10px;
  font-weight: 950;
  line-height: 1;
}

.game-results-table td > small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.game-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin: 3px 5px 3px 0;
  border-radius: 999px;
  background: #fff4e5;
  color: #b45309;
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

.game-session-list {
  display: grid;
  gap: 10px;
}

.game-session-button {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  padding: 14px;
  text-align: left;
}

.game-session-button.is-active {
  border-color: rgba(24, 168, 216, .55);
  background: #f0fbff;
  box-shadow: inset 0 0 0 1px rgba(24, 168, 216, .2);
}

.game-session-button strong,
.game-session-button small,
.game-session-button span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-session-button strong {
  font-size: 14px;
}

.game-session-button small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.game-session-button span {
  margin-top: 8px;
  color: var(--teal-d);
  font-size: 12px;
  font-weight: 900;
}

.game-ai-panel {
  background: linear-gradient(145deg, #ecfbff, #fff);
}

.game-ai-panel > span {
  color: var(--teal-d);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.game-ai-panel h2 {
  margin: 8px 0;
  font-size: 22px;
}

.game-ai-panel p {
  margin-bottom: 16px;
  color: var(--muted);
  line-height: 1.5;
}

.game-import-modal {
  display: grid;
  gap: 16px;
}

.game-import-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.game-import-hint {
  border-radius: 14px;
  background: #f7fbff;
  padding: 12px 14px;
}

.game-import-hint strong,
.game-import-hint span {
  display: block;
  font-size: 13px;
  line-height: 1.45;
}

.game-import-hint span {
  color: var(--muted);
}

.game-feedback-modal {
  display: grid;
  gap: 14px;
}

.game-feedback-modal section {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 14px;
}

.game-feedback-modal span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.game-feedback-modal strong {
  display: block;
  margin-top: 7px;
  color: var(--ink);
  font-size: 22px;
}

.game-feedback-modal p {
  margin-top: 6px;
  color: var(--ink-2);
  line-height: 1.5;
}

.game-feedback-modal textarea {
  width: 100%;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  resize: vertical;
  font: inherit;
  line-height: 1.5;
}

.student-game-evidence-list {
  display: grid;
  gap: 12px;
}

.student-game-evidence-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 14px;
}

.student-game-evidence-card > div {
  min-width: 0;
}

.student-game-evidence-card span,
.student-game-evidence-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.student-game-evidence-card span {
  color: var(--teal-d);
  font-weight: 950;
}

.student-game-evidence-card strong {
  display: block;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.student-game-evidence-card__score {
  font-size: 24px;
  text-align: right;
}

.student-game-evidence-card p {
  grid-column: 1 / -1;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 1180px) {
  .game-layout {
    grid-template-columns: 1fr;
  }

  .game-side {
    grid-template-columns: minmax(0, 1fr) minmax(280px, .7fr);
  }
}

@media (max-width: 900px) {
  .game-hero-grid,
  .game-session-summary,
  .game-link-strip,
  .game-concept-grid,
  .game-side {
    grid-template-columns: 1fr;
  }

  .game-session-head {
    display: grid;
  }
}

@media (max-width: 620px) {
  .game-hero-card,
  .game-session-summary article,
  .game-concept-card,
  .student-game-evidence-card {
    border-radius: 14px;
    padding: 13px;
  }

  .student-game-evidence-card {
    grid-template-columns: 1fr;
  }

  .student-game-evidence-card__score {
    text-align: left;
  }
}

/* Student and parent portal mockups */
.portal-mockups-page {
  display: grid;
  gap: 24px;
}

.portal-mockups-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: stretch;
  border: 1px solid rgba(24, 168, 216, .22);
  border-radius: 28px;
  background:
    radial-gradient(circle at 12% 10%, rgba(45, 204, 191, .18), transparent 30%),
    radial-gradient(circle at 90% 20%, rgba(109, 19, 201, .12), transparent 32%),
    linear-gradient(135deg, #f5fcff, #fff);
  padding: clamp(22px, 4vw, 42px);
  box-shadow: 0 22px 55px rgba(15, 23, 42, .08);
}

.portal-mockups-hero span,
.portal-build-notes span,
.portal-persona__head span {
  display: inline-flex;
  color: var(--teal-d);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.portal-mockups-hero h1 {
  margin: 10px 0;
  color: var(--ink);
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.03;
  letter-spacing: 0;
}

.portal-mockups-hero p {
  max-width: 720px;
  color: var(--ink-2);
  font-size: 17px;
  line-height: 1.55;
}

.portal-mockups-hero aside {
  align-self: end;
  border: 1px solid rgba(255, 255, 255, .85);
  border-radius: 22px;
  background: rgba(255, 255, 255, .74);
  padding: 20px;
}

.portal-mockups-hero aside strong {
  display: block;
  color: var(--ink);
  font-size: 18px;
}

.portal-mockups-hero aside p {
  margin-top: 8px;
  font-size: 14px;
}

.portal-persona-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  align-items: start;
}

.portal-persona {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 255, 255, .86);
  padding: 20px;
  box-shadow: 0 24px 56px rgba(15, 23, 42, .08);
}

.portal-persona__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.portal-persona__head h2 {
  margin: 8px 0 5px;
  color: var(--ink);
  font-size: 26px;
  line-height: 1.1;
}

.portal-persona__head p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.portal-screen-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.portal-screen-tabs button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-2);
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 900;
}

.portal-screen-tabs button.is-active {
  border-color: rgba(24, 168, 216, .42);
  background: linear-gradient(135deg, #e6f9ff, #fff);
  color: var(--teal-d);
}

.portal-device {
  overflow: hidden;
  border: 8px solid #101828;
  border-radius: 34px;
  background: #101828;
  box-shadow: 0 28px 60px rgba(15, 23, 42, .18);
}

.portal-device__chrome {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 12px;
}

.portal-device__chrome span {
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .28);
}

.portal-device__screens {
  position: relative;
  min-height: 600px;
  border-radius: 24px;
  background: linear-gradient(145deg, #f5fcff, #fff);
  overflow: hidden;
}

.portal-preview-screen {
  display: none;
  min-height: 600px;
}

.portal-preview-screen.is-active {
  display: block;
}

.mock-login,
.mock-app {
  min-height: 600px;
  padding: 22px;
}

.mock-login {
  display: grid;
  align-content: space-between;
}

.mock-login--student {
  background: linear-gradient(155deg, #2fc7d3, #36c7a7 50%, #6777d8);
}

.mock-login--parent {
  background: linear-gradient(155deg, #7655db, #2fbfcd 56%, #35c88e);
}

.mock-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.mock-logo > span {
  display: grid;
  place-items: center;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 12px 30px rgba(15, 23, 42, .14);
}

.mock-logo img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.mock-logo strong,
.mock-logo small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mock-login .mock-logo strong,
.mock-login .mock-logo small {
  color: #fff;
}

.mock-logo strong {
  font-size: 20px;
  line-height: 1.05;
}

.mock-logo small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.mock-login__body {
  border-radius: 26px;
  background: rgba(255, 255, 255, .92);
  padding: 22px;
  box-shadow: 0 24px 54px rgba(15, 23, 42, .18);
}

.mock-login__body span {
  color: var(--teal-d);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.mock-login__body h3 {
  margin: 9px 0 8px;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.08;
}

.mock-login__body p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.mock-login__body button,
.mock-card button {
  width: 100%;
  min-height: 46px;
  margin-top: 18px;
  border: 0;
  border-radius: 999px;
  background: #101828;
  color: #fff;
  font-weight: 950;
}

.mock-login__body small {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.mock-app {
  background:
    radial-gradient(circle at 12% 0%, rgba(45, 204, 191, .13), transparent 28%),
    linear-gradient(180deg, #f5fcff, #fff);
}

.mock-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.mock-top .mock-logo > span {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
  border-radius: 12px;
}

.mock-top .mock-logo img {
  width: 28px;
  height: 28px;
}

.mock-top .mock-logo strong {
  color: var(--ink);
  font-size: 16px;
}

.mock-top > span {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #eef7ff;
  color: var(--teal-d);
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 950;
}

.mock-title h3 {
  color: var(--ink);
  font-size: 28px;
  line-height: 1.08;
}

.mock-hero,
.mock-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, .9);
  padding: 18px;
  box-shadow: 0 16px 38px rgba(15, 23, 42, .07);
}

.mock-hero {
  margin: 16px 0;
  background: linear-gradient(145deg, #ebfbff, #fff);
}

.mock-hero--family {
  background: linear-gradient(145deg, #f3efff, #fff);
}

.mock-hero span,
.mock-card span {
  display: inline-flex;
  color: var(--teal-d);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.mock-hero h3,
.mock-card h3 {
  margin: 8px 0;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.12;
}

.mock-hero p,
.mock-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.48;
}

.mock-stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.mock-stat-row article {
  min-width: 0;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 12px;
}

.mock-stat-row strong,
.mock-stat-row span,
.mock-stat-row small {
  display: block;
}

.mock-stat-row strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.mock-stat-row span {
  margin-top: 6px;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 900;
}

.mock-stat-row small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.mock-list,
.mock-timeline,
.mock-progress-list,
.mock-calendar-list,
.mock-child-switcher {
  display: grid;
  gap: 10px;
}

.mock-list button,
.mock-timeline div,
.mock-calendar-list article,
.mock-child-switcher button,
.mock-note,
.mock-report-preview,
.mock-progress-row {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 13px;
}

.mock-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 12px;
  text-align: left;
}

.mock-list strong,
.mock-list small,
.mock-list span,
.mock-timeline strong,
.mock-timeline small {
  display: block;
  min-width: 0;
}

.mock-list strong,
.mock-timeline strong,
.mock-calendar-list strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.3;
}

.mock-list small,
.mock-timeline small,
.mock-calendar-list small {
  color: var(--muted);
  font-size: 12px;
}

.mock-list span {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  border-radius: 999px;
  background: #e8f8ff;
  color: var(--teal-d);
  padding: 6px 9px;
  font-size: 11px;
  font-weight: 950;
}

.mock-card--focus {
  background: linear-gradient(145deg, #fff8eb, #fff);
}

.mock-card--bluecat {
  background: linear-gradient(145deg, #e9fbff, #fff);
}

.mock-big-score {
  margin: 12px 0;
  color: var(--ink);
  font-size: 54px;
  font-weight: 950;
  line-height: 1;
}

.mock-note {
  margin-top: 12px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.45;
}

.mock-progress-row {
  display: grid;
  gap: 9px;
}

.mock-progress-row div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.mock-progress-row strong,
.mock-progress-row span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
}

.mock-progress-row i {
  height: 9px;
  border-radius: 999px;
  background: #edf2f7;
  overflow: hidden;
}

.mock-progress-row b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #21b8e5, #31d0a3);
}

.mock-report-preview {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.mock-report-preview strong {
  color: var(--ink);
}

.mock-report-preview p {
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.45;
}

.mock-child-switcher {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 14px 0;
}

.mock-child-switcher button {
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
}

.mock-child-switcher button.is-active {
  border-color: rgba(24, 168, 216, .55);
  background: #eafbff;
}

.mock-child-switcher span {
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 99px;
  background: linear-gradient(135deg, #2cc7d3, #35c98f);
  color: #fff;
  font-size: 11px;
  font-weight: 950;
}

.mock-child-switcher strong {
  color: var(--ink);
  font-size: 13px;
}

.mock-calendar-list article {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
}

.mock-calendar-list time {
  color: var(--teal-d);
  font-size: 12px;
  font-weight: 950;
}

.portal-build-notes {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #fff;
  padding: 24px;
}

.portal-build-notes h2 {
  margin: 8px 0;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.12;
}

.portal-build-notes p {
  color: var(--muted);
  line-height: 1.55;
}

.portal-build-notes > div {
  display: grid;
  gap: 10px;
}

.portal-build-notes section {
  border-radius: 18px;
  background: #f6fbff;
  padding: 14px;
}

.portal-build-notes section strong {
  color: var(--ink);
}

.portal-build-notes section p {
  margin-top: 4px;
  font-size: 13px;
}

@media (max-width: 1200px) {
  .portal-persona-grid,
  .portal-build-notes {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .portal-mockups-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .portal-persona {
    padding: 14px;
    border-radius: 20px;
  }

  .portal-device {
    border-width: 5px;
    border-radius: 26px;
  }

  .portal-device__screens,
  .portal-preview-screen,
  .mock-login,
  .mock-app {
    min-height: 560px;
  }

  .mock-login,
  .mock-app {
    padding: 16px;
  }

  .mock-stat-row,
  .mock-child-switcher {
    grid-template-columns: 1fr;
  }
}

/* Keep the working navigation visible and readable at every portal width. */
.topbar {
  position: fixed;
  top: 14px;
  left: calc(14px + 284px);
  right: 14px;
  z-index: 90;
}

.outlet {
  padding-top: 72px;
}

.impersonation-bar {
  position: fixed;
  top: 14px;
  left: calc(14px + 284px);
  right: 14px;
  z-index: 92;
  min-height: 44px;
}

.main--impersonating .topbar {
  top: 58px;
}

.main--impersonating .outlet {
  padding-top: 116px;
}

.topbar__actions,
.account-menu-wrap {
  flex: 0 0 auto;
}

.top-user {
  min-width: 48px;
}

.top-user__avatar {
  display: grid !important;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  min-width: 42px;
  max-width: 42px;
  height: 42px;
}

.top-user > .top-user__avatar {
  min-width: 42px;
  max-width: 42px;
}

.top-user > span:not(.top-user__avatar) {
  min-width: 0;
}

.top-user strong,
.top-user small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 821px) {
  .main {
    overflow: visible;
  }
}

@media (max-width: 960px) {
  .topbar {
    gap: 12px;
    left: 14px;
    right: 14px;
  }

  .impersonation-bar {
    left: 14px;
    right: 14px;
  }

  .topbar__search {
    flex: 1 1 220px;
    min-width: 180px;
  }

  .top-user {
    width: clamp(164px, 24vw, 212px);
    height: 48px;
    justify-content: flex-start;
    gap: 8px;
    padding: 4px 10px 4px 6px;
    border-radius: 18px;
  }

  .top-user__avatar {
    flex-basis: 40px;
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    height: 40px;
  }

  .top-user > .top-user__avatar {
    min-width: 40px;
    max-width: 40px;
  }

  .top-user > span:not(.top-user__avatar) {
    display: grid !important;
    flex: 1;
  }

  .top-user i {
    display: block !important;
  }
}

@media (min-width: 961px) {
  .top-user > span:not(.top-user__avatar) {
    display: grid !important;
  }

  .top-user i {
    display: block !important;
  }
}

@media (max-width: 820px) {
  .topbar {
    top: 0;
    left: 0;
    right: 0;
  }

  .outlet {
    padding-top: 64px;
  }

  .impersonation-bar {
    top: 0;
    left: 0;
    right: 0;
  }

  .main--impersonating .topbar {
    top: 44px;
  }

  .main--impersonating .outlet {
    padding-top: 108px;
  }
}

@media (max-width: 720px) {
  .top-user {
    width: 52px;
    justify-content: center;
    padding: 3px;
  }

  .top-user > span:not(.top-user__avatar),
  .top-user i {
    display: none !important;
  }
}
