/* Kourse Mastery 5.4 — authoritative teacher workspace shell.
   This file intentionally loads after all legacy Mastery CSS. Lessons,
   Curriculum, and Mastery share these exact dimensions and tokens. */
:root{
  --kmt-font:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  --kmt-accent:#42cbc5;--kmt-ink:#172a40;--kmt-muted:#687e95;
  --kmt-light-bg:#f4f7fb;--kmt-light-surface:#fff;--kmt-light-soft:#edf4f9;--kmt-light-line:#cddce9;
  --kmt-dark-bg:#071322;--kmt-dark-surface:#0c2034;--kmt-dark-soft:#102a43;--kmt-dark-line:#294b68;
}
html,body{margin:0!important;padding:0!important}
body.km-teacher-native-shell{font-family:var(--kmt-font)!important}
body.km-teacher-native-shell *{box-sizing:border-box}
body.km-teacher-native-shell .kmn-teacher-workspace{position:fixed!important;inset:0!important;z-index:2147482000!important;width:100%!important;height:100dvh!important;min-height:100vh!important;max-width:none!important;margin:0!important;padding:0!important;overflow:auto!important;border:0!important;border-radius:0!important;box-shadow:none!important;font-family:var(--kmt-font)!important}

/* ONE teacher header. No view-specific sizing is allowed below this point. */
html body .kmn-teacher-workspace > .kmn-standard-app-header:not(.kmn-shared-app-header)[data-km-teacher-header]{
  position:sticky!important;top:0!important;left:0!important;right:0!important;z-index:5000!important;
  display:grid!important;grid-template-columns:300px minmax(320px,auto) 300px!important;align-items:center!important;
  width:100%!important;height:74px!important;min-height:74px!important;max-height:74px!important;
  margin:0!important;padding:0 24px!important;gap:20px!important;border-radius:0!important;transform:none!important;
  font-family:var(--kmt-font)!important;
}
html body .kmn-teacher-workspace > .kmn-standard-app-header:not(.kmn-shared-app-header) .kmn-standard-brand{
  display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:12px!important;
  width:300px!important;min-width:300px!important;height:74px!important;margin:0!important;padding:0!important;
}
html body .kmn-teacher-workspace > .kmn-standard-app-header:not(.kmn-shared-app-header) .kmn-standard-mark{
  display:grid!important;place-items:center!important;flex:0 0 44px!important;width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;max-width:44px!important;max-height:44px!important;
  margin:0!important;padding:0!important;border:2px solid var(--kmt-accent)!important;border-radius:13px!important;
  font-family:var(--kmt-font)!important;font-size:22px!important;font-weight:900!important;line-height:1!important;letter-spacing:0!important;
}
html body .kmn-teacher-workspace > .kmn-standard-app-header:not(.kmn-shared-app-header) .kmn-standard-brand-copy{
  display:flex!important;flex-direction:column!important;align-items:flex-start!important;justify-content:center!important;gap:5px!important;
  min-width:0!important;margin:0!important;padding:0!important;line-height:1!important;
}
html body .kmn-teacher-workspace > .kmn-standard-app-header:not(.kmn-shared-app-header) .kmn-standard-brand-copy strong{
  display:block!important;margin:0!important;padding:0!important;font-family:var(--kmt-font)!important;font-size:20px!important;font-weight:800!important;line-height:1.05!important;letter-spacing:-.02em!important;white-space:nowrap!important;
}
html body .kmn-teacher-workspace > .kmn-standard-app-header:not(.kmn-shared-app-header) .kmn-standard-brand-copy small{
  display:block!important;margin:0!important;padding:0!important;font-family:var(--kmt-font)!important;font-size:9px!important;font-weight:900!important;line-height:1!important;letter-spacing:.19em!important;white-space:nowrap!important;color:var(--kmt-accent)!important;
}
html body .kmn-teacher-workspace > .kmn-standard-app-header:not(.kmn-shared-app-header) .kmn-standard-nav{
  justify-self:center!important;align-self:center!important;display:flex!important;align-items:center!important;gap:5px!important;margin:0!important;padding:5px!important;border-radius:12px!important;
}
html body .kmn-teacher-workspace > .kmn-standard-app-header:not(.kmn-shared-app-header) .kmn-standard-nav a{
  display:flex!important;align-items:center!important;justify-content:center!important;height:38px!important;margin:0!important;padding:0 15px!important;border-radius:8px!important;text-decoration:none!important;font-family:var(--kmt-font)!important;font-size:14px!important;font-weight:800!important;line-height:1!important;
}
html body .kmn-teacher-workspace > .kmn-standard-app-header:not(.kmn-shared-app-header) .kmn-standard-actions{
  justify-self:end!important;align-self:center!important;display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:8px!important;width:300px!important;min-width:300px!important;height:74px!important;margin:0!important;padding:0!important;
}
html body .kmn-teacher-workspace > .kmn-standard-app-header:not(.kmn-shared-app-header) .kmn-theme-toggle,
html body .kmn-teacher-workspace > .kmn-standard-app-header:not(.kmn-shared-app-header) .kmn-standard-fullscreen,
html body .kmn-teacher-workspace > .kmn-standard-app-header:not(.kmn-shared-app-header) .kmn-standard-return{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;height:40px!important;min-height:40px!important;margin:0!important;border-radius:10px!important;font-family:var(--kmt-font)!important;font-size:13px!important;font-weight:800!important;line-height:1!important;text-decoration:none!important;white-space:nowrap!important;
}
html body .kmn-teacher-workspace > .kmn-standard-app-header:not(.kmn-shared-app-header) .kmn-theme-toggle{width:44px!important;min-width:44px!important;padding:0!important}
html body .kmn-teacher-workspace > .kmn-standard-app-header:not(.kmn-shared-app-header) .kmn-standard-fullscreen{padding:0 14px!important}
html body .kmn-teacher-workspace > .kmn-standard-app-header:not(.kmn-shared-app-header) .kmn-standard-return{padding:0 15px!important}

/* Shared workspace content geometry */
html body .kmn-teacher-workspace > .kmn-admin-page{position:relative!important;width:min(1220px,calc(100% - 48px))!important;max-width:1220px!important;margin:0 auto!important;padding:40px 0 72px!important;transform:none!important}

/* Light is the teacher default and is a complete theme, not a partial override. */
html[data-km-teacher-theme="light"] body.km-teacher-native-shell,
html[data-km-teacher-theme="light"] body .kmn-teacher-workspace{background:var(--kmt-light-bg)!important;color:var(--kmt-ink)!important}
html[data-km-teacher-theme="light"] body .kmn-teacher-workspace > .kmn-standard-app-header:not(.kmn-shared-app-header){background:#fff!important;border:0!important;border-bottom:1px solid var(--kmt-light-line)!important;box-shadow:0 1px 0 rgba(20,48,74,.03)!important;color:var(--kmt-ink)!important}
html[data-km-teacher-theme="light"] body .kmn-standard-nav{background:var(--kmt-light-soft)!important;border:1px solid var(--kmt-light-line)!important}
html[data-km-teacher-theme="light"] body .kmn-standard-nav a{color:#40566d!important}
html[data-km-teacher-theme="light"] body .kmn-standard-nav a.is-active{background:#dcecf7!important;color:var(--kmt-ink)!important}
html[data-km-teacher-theme="light"] body .kmn-standard-mark{background:#fff!important;color:var(--kmt-ink)!important}
html[data-km-teacher-theme="light"] body .kmn-standard-brand-copy strong{color:var(--kmt-ink)!important}
html[data-km-teacher-theme="light"] body .kmn-theme-toggle,
html[data-km-teacher-theme="light"] body .kmn-standard-fullscreen,
html[data-km-teacher-theme="light"] body .kmn-standard-return{background:#fff!important;color:var(--kmt-ink)!important;border:1px solid var(--kmt-light-line)!important}

html[data-km-teacher-theme="dark"] body.km-teacher-native-shell,
html[data-km-teacher-theme="dark"] body .kmn-teacher-workspace{background:var(--kmt-dark-bg)!important;color:#f5f8fb!important}
html[data-km-teacher-theme="dark"] body .kmn-teacher-workspace > .kmn-standard-app-header:not(.kmn-shared-app-header){background:#071d2e!important;border:0!important;border-bottom:1px solid var(--kmt-dark-line)!important;box-shadow:none!important;color:#fff!important}
html[data-km-teacher-theme="dark"] body .kmn-standard-nav{background:#0d2237!important;border:1px solid var(--kmt-dark-line)!important}
html[data-km-teacher-theme="dark"] body .kmn-standard-nav a{color:#aebfd0!important}
html[data-km-teacher-theme="dark"] body .kmn-standard-nav a.is-active{background:#173652!important;color:#fff!important}
html[data-km-teacher-theme="dark"] body .kmn-standard-mark{background:transparent!important;color:#fff!important}
html[data-km-teacher-theme="dark"] body .kmn-standard-brand-copy strong{color:#fff!important}
html[data-km-teacher-theme="dark"] body .kmn-theme-toggle,
html[data-km-teacher-theme="dark"] body .kmn-standard-fullscreen,
html[data-km-teacher-theme="dark"] body .kmn-standard-return{background:#102a43!important;color:#fff!important;border:1px solid #31506e!important}

@media(max-width:980px){
 html body .kmn-teacher-workspace > .kmn-standard-app-header:not(.kmn-shared-app-header)[data-km-teacher-header]{grid-template-columns:250px 1fr!important;padding:0 16px!important}
 html body .kmn-teacher-workspace > .kmn-standard-app-header:not(.kmn-shared-app-header) .kmn-standard-brand{width:250px!important;min-width:250px!important}
 html body .kmn-teacher-workspace > .kmn-standard-app-header:not(.kmn-shared-app-header) .kmn-standard-actions{width:auto!important;min-width:0!important}
 html body .kmn-teacher-workspace > .kmn-standard-app-header:not(.kmn-shared-app-header) .kmn-standard-nav{display:none!important}
}
@media(max-width:640px){
 html body .kmn-teacher-workspace > .kmn-standard-app-header:not(.kmn-shared-app-header)[data-km-teacher-header]{height:64px!important;min-height:64px!important;max-height:64px!important;grid-template-columns:1fr auto!important}
 html body .kmn-teacher-workspace > .kmn-standard-app-header:not(.kmn-shared-app-header) .kmn-standard-brand{height:64px!important;width:auto!important;min-width:0!important}
 html body .kmn-teacher-workspace > .kmn-standard-app-header:not(.kmn-shared-app-header) .kmn-standard-actions{height:64px!important}
 html body .kmn-teacher-workspace > .kmn-standard-app-header:not(.kmn-shared-app-header) .kmn-standard-fullscreen{display:none!important}
 html body .kmn-teacher-workspace > .kmn-standard-app-header:not(.kmn-shared-app-header) .kmn-standard-brand-copy strong{font-size:17px!important}
 html body .kmn-teacher-workspace > .kmn-admin-page{width:calc(100% - 28px)!important;padding-top:28px!important}
}
