/* Staff workspaces use bounded lists and enough room for each action. */
.sidebar-toggle { display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; border: 1px solid var(--hair); border-radius: 12px; color: var(--ink2); background: var(--card); cursor: pointer; }
.sidebar-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-toggle:hover { background: var(--soft); color: var(--ink); }
.sidebar-toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.app-shell.is-sidebar-hidden { grid-template-columns: minmax(0, 1fr); }
.app-shell.is-sidebar-hidden > .sidebar { display: none; }
.is-sidebar-hidden .sidebar-toggle svg { transform: scaleX(-1); }
.nav-count { margin-inline-start: auto; border-radius: 20px; padding: 2px 7px; font-size: 11px; line-height: 1.5; font-weight: 800; background: #FE5722; color: #fff; font-variant-numeric: tabular-nums; }
.workspace-top { backdrop-filter: none; background: #fffdfa; gap: 12px; }
.workspace-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-top .bar-end { flex: none; margin-inline-start: auto; }
.workspace, .mobile-links { scrollbar-width: thin; scrollbar-color: #cbc4bd transparent; }
.workspace-top .dashboard-inbox > summary { width: 44px; height: 44px; }
@supports selector(::-webkit-scrollbar) {
  .workspace, .dashboard-inbox-items, .mobile-links { scrollbar-width: auto; scrollbar-color: auto; }
  .workspace::-webkit-scrollbar, .dashboard-inbox-items::-webkit-scrollbar, .mobile-links::-webkit-scrollbar { width: 5px; height: 5px; }
  .workspace::-webkit-scrollbar-track, .dashboard-inbox-items::-webkit-scrollbar-track, .mobile-links::-webkit-scrollbar-track { background: transparent; }
  .workspace::-webkit-scrollbar-thumb, .dashboard-inbox-items::-webkit-scrollbar-thumb, .mobile-links::-webkit-scrollbar-thumb { background: #cbc4bd; border-radius: 4px; }
  .workspace::-webkit-scrollbar-button, .dashboard-inbox-items::-webkit-scrollbar-button, .mobile-links::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
}
.app-shell .page { max-width: 1520px; padding-inline: clamp(20px, 2.8vw, 44px); }
.page [id] { scroll-margin-top: 88px; }
.page-head { align-items: flex-start; gap: 16px; margin-bottom: 24px; }
.page-head h1 { line-height: 1.35; overflow-wrap: anywhere; }
.page-head p { max-width: 68ch; }
.page-head .actions, .teacher-head-actions, .builder-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.btn { min-height: 44px; display: inline-flex; justify-content: center; align-items: center; gap: 8px; max-width: 100%; line-height: 1.5; text-align: center; white-space: normal; }
.btn-sm { padding-block: 8px; }
.filters { flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.filters > input[type="search"] { min-width: min(100%, 240px); flex: 1; }
.filters select { max-width: 100%; }
.media-library { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 18px; }
.media-course { border: 1px solid var(--hair); border-radius: 20px; box-shadow: none; transition: border-color 150ms ease; }
.media-course:hover { transform: none; box-shadow: none; border-color: #cfbdb1; }
.media-cover { border-radius: 14px; }
.media-body { padding: 14px 12px 10px; }
.media-body h2 { margin: 6px 0 12px; font-size: 17px; }
.media-meta, .media-counts { flex-wrap: wrap; gap: 6px 14px; }
.media-body footer { gap: 10px; }
.teacher-card-details { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--hair); }
.teacher-card-details > summary { cursor: pointer; font-size: 13px; font-weight: 700; min-height: 44px; align-content: center; }
.teacher-card-details[open] > summary { margin-bottom: 12px; }
.teacher-performance-card .teacher-card-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-block: 14px 0; }
.dashboard-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding-block: 20px; margin-top: 16px; border-top: 1px solid var(--hair); font-size: 13px; color: var(--ink2); }
.dashboard-pagination nav { display: flex; gap: 8px; align-items: center; }
.dashboard-pagination .page-position { padding-inline: 10px; font-variant-numeric: tabular-nums; }
.review-entry { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; padding: 18px 20px; margin-bottom: 24px; border: 1px solid #f2d9cc; background: #fff4ed; border-radius: 16px; }
.review-entry h2 { font-size: 17px; margin: 0 0 5px; }
.review-entry p { margin: 0; font-size: 13px; }
.teacher-form, .code-create-form, .editor-overview > * { min-width: 0; }
.teacher-form input, .teacher-form select, .teacher-form textarea { width: 100%; min-width: 0; }
.lesson-admin-actions, .lesson-admin-head, .video-review-actions { flex-wrap: wrap; gap: 10px; }
.course-access-table .btn { white-space: nowrap; }
@media (max-width: 850px) {
  .sidebar-toggle, .workspace-name { display: none; }
  .app-shell.is-sidebar-hidden { grid-template-columns: minmax(0, 1fr); }
  .workspace-top { flex-wrap: nowrap; min-height: 64px; gap: 8px; padding: 10px 16px; }
  .workspace-top .bar-end { width: auto; gap: 8px; }
  .workspace-top .mobile-logout { display: none; }
  .mobile-nav { position: static; flex: none; }
  .mobile-nav > summary { border: 1px solid var(--hair); border-radius: 8px; box-shadow: none; padding: 7px 10px; user-select: none; }
  .mobile-links { inset-inline: 0; top: calc(100% + 1px); width: auto; max-height: calc(100dvh - 72px); overflow-y: auto; overscroll-behavior: contain; padding: 8px 16px 16px; border-block: 1px solid var(--hair); border-radius: 0; box-shadow: 0 8px 16px #17111612; z-index: 70; }
  .workspace:has(.mobile-nav[open]) { scrollbar-color: transparent transparent; }
  .workspace:has(.mobile-nav[open])::-webkit-scrollbar-thumb { background: transparent; }
  @supports selector(::-webkit-scrollbar) { .workspace:has(.mobile-nav[open]) { scrollbar-color: auto; } }
  .mobile-links .nav-link, [dir="rtl"] .mobile-links .nav-link { min-height: 44px; padding: 10px 12px; border-radius: 6px; gap: 12px; }
  .mobile-links .side-icon, .mobile-links .nav-link.is-on .side-icon { width: 20px; height: 20px; padding: 0; background: transparent; border-radius: 0; color: currentColor; }
  .mobile-links .nav-link.is-on { box-shadow: none; background: #fff1e9; color: var(--brand); }
  .mobile-menu-account { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 16px 12px 0; margin-top: 8px; border-top: 1px solid var(--hair); }
  .mobile-menu-account strong { font-size: 13px; overflow-wrap: anywhere; }
  .mobile-menu-account form { margin: 0; }
  .workspace-top .language-trigger { box-shadow: none; border: 1px solid var(--hair); border-radius: 8px; padding-inline: 10px; }
  .workspace-top .dashboard-inbox-panel { position: absolute; inset-inline: 12px; top: calc(100% + 8px); width: auto; max-width: none; }
  .workspace-top .dashboard-inbox { position: static; }
}
@media (max-width: 600px) { .app-shell .page { padding-inline: 16px; } .workspace-top { padding-inline: 16px; } .page-head .actions, .teacher-head-actions { width: 100%; } .page-head .actions .btn, .teacher-head-actions .btn { flex: 1 1 auto; } .filters > * { width: 100%; } .dashboard-pagination { justify-content: center; text-align: center; } }
@media (max-width: 600px) {
  .course-access-table, .course-access-table tbody { display: block; width: 100%; }
  .course-access-table thead { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
  .course-access-table tr { display: grid; gap: 10px; padding-block: 16px; border-bottom: 1px solid var(--hair); }
  .course-access-table td { display: block; padding: 0; border: 0; white-space: normal; overflow-wrap: anywhere; }
  .course-access-table td[data-label]::before { content: attr(data-label); display: inline-block; margin-inline-end: 10px; color: var(--ink2); font-size: 12px; }
  .course-access-table td.end { text-align: start; }
}
@media (max-width: 360px) {
  .mobile-nav > summary { width: 44px; padding: 0; justify-content: center; gap: 0; font-size: 0; }
}
@media (prefers-reduced-motion: reduce) { .media-course { transition: none; } }
