/* Shared workspace: green palette, consistent scale, responsive navigation. */
.shell {
  --color-primary: #006c3b;
  --color-primary-hover: #00552f;
  --color-accent: #b29251;
  --color-success: #168353;
  --color-warning: #a76c12;
  --color-danger: #bf4148;
  --color-text: #233c31;
  --color-muted: #718279;
  --color-line: #e1eae5;
  --color-surface: #fff;
  --color-background: #f4f7f5;
  --font-title: 28px;
  --font-subtitle: 20px;
  --font-body: 15px;
  --font-caption: 13px;
  --radius-control: 10px;
  --radius-card: 16px;
  --space-4: 4px;
  --space-8: 8px;
  --space-16: 16px;
  --space-24: 24px;
  --space-32: 32px;
  --shadow-card: 0 3px 16px #153e2610;
  --shadow-popover: 0 16px 44px #153e2626;
  --navy: #174a35;
  --blue: var(--color-primary);
  --green: var(--color-success);
  --red: var(--color-danger);
  --line: var(--color-line);
  --muted: var(--color-muted);
  display: grid;
  grid-template-columns: 252px minmax(0,1fr);
  background: var(--color-background);
  color: var(--color-text);
  font: var(--font-body)/1.6 "PingFang SC","Microsoft YaHei",system-ui,sans-serif;
}
.shell button,.shell input,.shell select,.shell textarea { border-radius: var(--radius-control); }
.shell button,.shell input,.shell select { min-height: 48px; }
.shell button { transition: background .16s, border-color .16s, box-shadow .16s; }
.shell input:focus,.shell select:focus,.shell textarea:focus { outline: 3px solid #006c3b22; border-color: var(--color-primary); }
.shell button:focus-visible,.shell a:focus-visible { outline: 3px solid #46aa78; outline-offset: 3px; }
.shell .primary:hover { background: var(--color-primary-hover); border-color: var(--color-primary-hover); }
.shell h1 { font-size: var(--font-title); letter-spacing: -.5px; }
.shell h2 { font-size: var(--font-subtitle); }
.shell .muted { font-size: var(--font-caption); }
.shell .card,.shell .metric { border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.shell .badge { background: #eaf4ee; color: #367557; }
.shell .badge.void { background: #fcebed; color: var(--color-danger); }
.shell .notice:not(.warn):not(.error) { background: #eaf4ee; color: #356348; }
.shell .student-check:has(input:checked) { background: #edf7f0; border-color: #6dad89; }
.shell .points-preview { background: #f5faf7; border-color: #a8c8b5; }
.shell th { background: #f5f8f6; color: #73857a; }
.shell .sidebar {
  z-index: 40; width: 252px; height: 100dvh; min-height: 620px;
  position: sticky; top: 0; padding: 28px 16px 20px;
  background: linear-gradient(165deg,#075b39 0%,#074d32 58%,#063e2b 100%);
  color: #fff; overflow-y: auto;
}
.shell .sidebar .brand { margin: 0 4px 32px; gap: 12px; color: inherit; text-decoration: none; }
.shell .shell-seal { display: grid; place-items: center; flex: 0 0 46px; height: 46px; border-radius: 50%; background: white; overflow: hidden; }
.shell .shell-seal img { width: 46px; height: 41px; object-fit: contain; }
.shell .brand strong { display: block; font-size: 17px; font-weight: 600; white-space: nowrap; }
.shell .brand small { font-size: 11px; color: #c0d7cb; opacity: 1; margin-top: 3px; white-space: nowrap; }
.shell .nav { gap: 20px; flex: 1; }
.shell .nav-group { display: flex; flex-direction: column; gap: 5px; }
.shell .nav-group-title { font-size: 11px; letter-spacing: 1.4px; color: #8fb5a2; margin: 0 16px 6px; }
.shell .nav button { display: flex; align-items: center; gap: 13px; height: 48px; padding: 0 16px; color: #cee0d6; font-size: 14px; font-weight: 400; border: 1px solid transparent; }
.shell svg { width: 20px; height: 20px; flex-shrink: 0; }
.shell .nav button svg { width: 19px; height: 19px; opacity: .8; }
.shell .nav button:hover { background: #ffffff0e; color: white; }
.shell .nav button.active { background: #ffffff; color: #006c3b; font-weight: 600; box-shadow: 0 4px 12px #002e2620; }
.shell .nav button.active svg { opacity: 1; }
.shell .side-note { border-top: 1px solid #ffffff1a; margin-top: 28px; padding: 18px 16px 0; line-height: 1.8; color: #98b9a8; }
.shell .side-note span,.shell .side-note small { display: block; }
.shell .side-note .school-caption { color: #cee0d6; margin-bottom: 2px; font-size: 13px; }
.shell .side-note small { font-size: 11px; margin-top: 8px; }
.shell .workspace { min-width: 0; }
.shell .topbar { min-height: 100px; padding: 20px 32px; gap: 24px; background: #fff; border-bottom: 1px solid var(--line); position: relative; z-index: 30; }
.shell .topbar-context { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.shell .semester-context label { font-size: 11px; color: var(--muted); margin: 0 0 3px; font-weight: 400; }
.shell #semester-status { font-size: 10px; background: #edf6f0; color: #38845c; padding: 1px 7px; border-radius: 4px; margin-left: 6px; }
.shell .topbar #semester-picker { width: 266px; max-width: 100%; height: 48px; min-height: 48px; border: 0; padding: 0 20px 0 0; border-radius: 4px; font-size: 14px; font-weight: 600; background: transparent; }
.shell .global-search { width: min(100%,360px); margin-left: auto; position: relative; }
.shell .global-search>svg { position: absolute; top: 15px; left: 14px; width: 18px; height: 18px; color: #83968b; pointer-events: none; }
.shell #global-student-search { height: 48px; padding-left: 42px; background: #f5f8f6; border-color: #edf1ee; font-size: 13px; }
.shell #global-student-search:focus { background: #fff; border-color: var(--color-primary); }
.shell .search-results { position: absolute; top: 56px; left: 0; right: 0; min-width: 280px; max-height: 380px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; padding: 6px; background: white; box-shadow: var(--shadow-popover); }
.shell .search-results button { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; text-align: left; padding: 10px; font-weight: 400; color: var(--color-text); }
.shell .search-results button:hover { background: #f0f7f3; }
.shell .search-results strong { display: block; font-size: 14px; }
.shell .search-results small { display: block; font-size: 12px; color: var(--muted); }
.shell .search-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #edf5ef; color: #367456; flex-shrink: 0; }
.shell .search-result-action { margin-left: auto; color: #527b65; font-size: 11px; white-space: nowrap; }
.shell .search-message { margin: 0; padding: 20px 12px; font-size: 13px; color: var(--muted); }
.shell .topbar-account { display: flex; align-items: center; gap: 18px; flex-shrink: 0; }
.shell .identity { display: flex; align-items: center; gap: 10px; text-align: left; }
.shell .identity strong { font-size: 14px; font-weight: 600; }
.shell .identity small { margin: 1px 0 0; font-size: 11px; }
.shell .cadre-person { flex-wrap:wrap;align-items:flex-start; }
.shell .cadre-person>div:first-child { min-width:0;flex:1 1 150px; }
.shell .cadre-person .badge { display:inline-block;margin-top:8px; }
.shell .cadre-actions { display:flex;gap:8px;flex-wrap:wrap;width:100%; }
.shell .user-avatar { width: 38px; height: 38px; display: grid; place-items: center; background: #e8f2ec; color: #27724c; border-radius: 50%; font-size: 15px; }
.shell #topbar-logout { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 0 0 0 16px; border: 0; border-left: 1px solid var(--line); border-radius: 0; background: transparent; color: #6a7f71; font-size: 13px; font-weight: 400; }
.shell #topbar-logout:hover { color: var(--color-primary); }
.shell #topbar-logout svg { width: 17px; height: 17px; }
.shell .content { max-width: 1440px; padding: 32px 32px 60px; outline: none; }
.shell #nav-toggle { display: none; }
.shell .nav-backdrop { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.login-page .login-internal-note { margin: 16px 0 0; color: var(--color-text-secondary); font-size: 13px; line-height: 1.6; text-align: center; }
@media (min-width: 768px) and (max-width: 1199px) {
  .shell { grid-template-columns: 220px minmax(0,1fr); }
  .shell .sidebar { width: 220px; padding-left: 12px; padding-right: 12px; }
  .shell .brand strong { font-size: 14px; }
  .shell .brand small { font-size: 10px; }
  .shell .sidebar .brand { gap: 8px; }
  .shell .shell-seal { flex-basis: 38px; height: 38px; }
  .shell .shell-seal img { width: 38px; height: 34px; }
  .shell .topbar { flex-wrap: wrap; gap: 14px 20px; padding: 18px 24px; }
  .shell .global-search { order: 3; width: 100%; max-width: none; }
  .shell .topbar-account { margin-left: auto; }
  .shell .content { padding: 28px 24px 50px; }
}
@media (max-width: 767.98px) {
  .shell { display: block; }
  .shell .sidebar { position: fixed; left: 0; top: 0; height: 100dvh; min-height: 0; width: 252px; transform: translateX(-100%); transition: transform .2s; padding-top: 24px; }
  .shell.nav-open .sidebar { transform: translateX(0); }
  .shell.nav-open .nav-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; width: 100%; height: 100%; z-index: 35; background: #102e2266; border: 0; border-radius: 0; }
  .shell .topbar { display: flex; position: relative; flex-wrap: wrap; gap: 16px 10px; padding: 18px 16px; }
  .shell .topbar-context { min-width: 0; flex: 1; gap: 10px; }
  .shell #nav-toggle { display: grid; place-items: center; width: 40px; min-width: 40px; padding: 0; color: #2b6647; background: #f2f7f3; border: 0; }
  .shell .semester-context { min-width: 0; }
  .shell .topbar #semester-picker { width: 100%; min-width: 0; font-size: 12px; max-width: 240px; }
  .shell .topbar-account { gap: 8px; }
  .shell .identity { gap: 6px; }
  .shell .identity strong { font-size: 12px; }
  .shell .user-avatar { display: none; }
  .shell #topbar-logout { width: 36px; padding: 0; border: 0; }
  .shell #topbar-logout span { display: none; }
  .shell .global-search { order: 3; width: 100%; max-width: none; }
  .shell .search-results { min-width: 0; }
  .shell .content { padding: 24px 16px 40px; }
  .shell .nav { display: flex; flex-direction: column; overflow: visible; }
  .shell .nav button { flex: none; white-space: normal; }
  .shell .nav-group-title { display: block; }
  .shell .side-note { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  .shell button,.shell .sidebar { transition: none; }
}
