/* ================================================================
   shared-styles.css — CentralHub shared design system
   Loaded on every page via build.js injection.
   Page-specific styles stay in each HTML file's <style> tag.
   ================================================================ */

/* ── Shared design tokens (spacing, type, shadow, radius, motion) ── */
@import url('tokens.css');

/* ── Central Hub accent overrides ──────────────────────────────── */
/* CH's house accent stays cyan — defer to the shared --secondary token
   so any future palette refresh in tokens.css flows through here too.
   Pages that need a different per-page accent (e.g. red math pacing)
   override --accent in their own <style> block AFTER this loads. */
:root {
  --accent:    var(--secondary);
  --accent-dk: var(--secondary-dk);
  --accent-2:  #e0f2fe;
}

/* ── Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Base ──────────────────────────────────────────────────────── */
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
}

/* ── Skeleton / shimmer loader ─────────────────────────────────── */
.skel {
  background: linear-gradient(90deg, var(--paper-2) 25%, var(--paper) 50%, var(--paper-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
  display: block;
}
@keyframes shimmer {
  0%   { background-position:  200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Badges ────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
  letter-spacing: 0.03em;
}
.badge-teal    { background: #e0f2fe; color: #0e7490; }
.badge-amber   { background: #fef3c7; color: #92400e; }
.badge-red     { background: #fee2e2; color: #991b1b; }
.badge-green   { background: #dcfce7; color: #166534; }
.badge-violet  { background: #ede9fe; color: #5b21b6; }
.badge-orange  { background: #ffedd5; color: #9a3412; }
.badge-neutral { background: var(--paper-2); color: var(--ink-2); }
.badge-pink    { background: #fce7f3; color: #9d174d; }

/* ── Buttons ───────────────────────────────────────────────────── */
/* Primary — gradient purple→teal */
.btn-primary,
.btn-save,
.btn-add,
.btn-new-topic,
.btn-post-reply,
.btn-add-task {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  background: linear-gradient(135deg, #7c3aed, #0891b2);
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  text-decoration: none;
}
.btn-primary:hover,
.btn-save:hover,
.btn-add:hover,
.btn-new-topic:hover,
.btn-post-reply:hover,
.btn-add-task:hover  { opacity: 0.88; transform: translateY(-1px); }
.btn-primary:disabled,
.btn-save:disabled,
.btn-post-reply:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Secondary — outline */
.btn-cancel,
.btn-cancel-form {
  padding: 9px 18px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color 0.2s;
}
.btn-cancel:hover,
.btn-cancel-form:hover { border-color: #bbb; }

/* Danger */
.btn-delete {
  padding: 9px 16px;
  background: none;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  color: #dc2626;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-delete:hover { background: #fee2e2; }

/* Small icon button */
.btn-icon {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink-3);
  transition: color 0.2s, border-color 0.2s;
}
.btn-icon:hover { color: var(--ink); border-color: #bbb; }
.btn-icon-delete:hover { color: #dc2626; border-color: #fca5a5; background: #fee2e2; }

/* Small action button (table rows) */
.btn-action {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  color: var(--ink-2);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.btn-action:hover { color: var(--ink); border-color: #bbb; }
.btn-action-del:hover { color: #dc2626; border-color: #fca5a5; background: #fee2e2; }

/* ── Modal ─────────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(28,28,46,0.55);
  backdrop-filter: blur(4px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--white);
  border-radius: 14px;
  width: 100%;
  max-width: 560px;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.25s ease;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-head h3 { font-size: 1rem; font-weight: 600; }

.modal-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--ink-3);
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: color 0.2s;
}
.modal-close:hover { color: var(--ink); }

.modal-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.modal-error {
  font-size: 0.82rem;
  color: #dc2626;
  background: #fee2e2;
  border-radius: 6px;
  padding: 8px 12px;
  display: none;
}
.modal-error.visible { display: block; }

/* ── Drawer (slide-in panel) ───────────────────────────────────── */
.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(28,28,46,0.45);
  z-index: 200;
}
.drawer-overlay.open { display: block; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 400px;
  max-width: 92vw;
  background: var(--white);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  z-index: 201;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}
.drawer-overlay.open .drawer { transform: translateX(0); }

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.drawer-head h3 { font-size: 1rem; font-weight: 600; }

.drawer-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--ink-3);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.drawer-close:hover { color: var(--ink); }

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.drawer-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-shrink: 0;
}

.drawer-error {
  font-size: 0.82rem;
  color: #dc2626;
  background: #fee2e2;
  border-radius: 6px;
  padding: 8px 12px;
  display: none;
}
.drawer-error.visible { display: block; }

/* ── Form elements ─────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.form-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-2);
}
.form-label .req { color: #dc2626; margin-left: 2px; }

.form-input,
.form-select,
.form-textarea {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  color: var(--ink);
  background: var(--paper);
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus  { border-color: var(--accent); background: var(--white); }
.form-input::placeholder,
.form-textarea::placeholder { color: var(--ink-3); }

.form-textarea { resize: vertical; min-height: 100px; line-height: 1.6; }

.form-hint  { font-size: 0.76rem; color: var(--ink-3); margin-top: 2px; }
.form-error {
  font-size: 0.82rem;
  color: #dc2626;
  background: #fee2e2;
  border-radius: 6px;
  padding: 8px 12px;
  display: none;
}
.form-error.visible { display: block; }

/* ── Table ─────────────────────────────────────────────────────── */
.table-wrap {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}
table       { width: 100%; border-collapse: collapse; }
thead       { background: var(--paper); border-bottom: 1px solid var(--border); }
th {
  padding: 11px 14px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
th.sortable        { cursor: pointer; user-select: none; }
th.sortable:hover  { color: var(--ink-2); }
th.sort-asc,
th.sort-desc,
th.sorted          { color: var(--accent); }
td {
  padding: 12px 14px;
  font-size: 0.87rem;
  color: var(--ink);
  border-bottom: 1px solid var(--paper-2);
  vertical-align: middle;
}
tr:last-child td   { border-bottom: none; }
tr:hover td        { background: var(--paper); }
.empty-row td {
  text-align: center;
  padding: 48px;
  color: var(--ink-3);
  font-size: 0.875rem;
}

/* ── Sidebar (left filter panel) ───────────────────────────────── */
.page-layout         { display: grid; grid-template-columns: 220px 1fr; min-height: calc(100vh - 62px); }
.sidebar             { background: var(--white); border-right: 1px solid var(--border); padding: 24px 16px; position: sticky; top: 62px; height: calc(100vh - 62px); overflow-y: auto; }
.sidebar-title       { font-size: 0.7rem; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 10px; }
.sidebar-section     { margin-bottom: 24px; }
.sidebar-stat        { display: flex; justify-content: space-between; align-items: center; font-size: 0.83rem; color: var(--ink-2); padding: 6px 0; border-bottom: 1px solid var(--paper-2); }
.sidebar-stat:last-child { border-bottom: none; }
.sidebar-stat-val    { font-weight: 600; color: var(--ink); }
.sidebar-divider     { height: 1px; background: var(--border); margin: 8px 0; }

/* ── Filter / search inputs in toolbar / sidebar ───────────────── */
.filter-label  { font-size: 0.8rem; font-weight: 500; color: var(--ink-2); margin-bottom: 6px; display: block; }
.filter-select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.84rem;
  color: var(--ink);
  background: var(--paper);
  outline: none;
  cursor: pointer;
}
.filter-select:focus { border-color: var(--accent); }

.search-input {
  width: 100%;
  padding: 9px 12px 9px 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  color: var(--ink);
  background: var(--white);
  outline: none;
  transition: border-color 0.2s;
}
.search-input:focus       { border-color: var(--accent); }
.search-input::placeholder { color: var(--ink-3); }

.btn-reset {
  width: 100%;
  padding: 8px;
  font-size: 0.82rem;
  color: var(--ink-3);
  background: none;
  border: 1px solid var(--border);
  border-radius: 7px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: color 0.2s, border-color 0.2s;
  margin-top: 8px;
}
.btn-reset:hover { color: var(--ink); border-color: #bbb; }

/* ── Toolbar row ───────────────────────────────────────────────── */
.toolbar         { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.toolbar-search  { flex: 1; min-width: 200px; position: relative; }
.search-icon     { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }

/* ── Avatar ────────────────────────────────────────────────────── */
.user-avatar,
.staff-avatar,
.post-avatar,
.topic-avatar,
.ann-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #0891b2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

/* ── Pagination ────────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px 16px;
  border-top: 1px solid var(--paper-2);
  flex-wrap: wrap;
}
.page-btn {
  min-width: 32px;
  height: 32px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--ink-2);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  transition: all 0.15s;
}
.page-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.page-btn.active  { background: linear-gradient(135deg,#7c3aed,#0891b2); border-color: transparent; color: #fff; font-weight: 700; }
.page-btn:disabled { opacity: 0.35; cursor: default; }

/* ── Empty state ───────────────────────────────────────────────── */
.empty-state {
  padding: 60px;
  text-align: center;
  color: var(--ink-3);
  font-size: 0.9rem;
}

/* ── Profile modal (from auth-guard.js) ────────────────────────── */
.profile-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: rgba(10,10,26,0.55);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.profile-modal-overlay.open { display: flex; }

.profile-modal {
  width: min(100%, 460px);
  background: #fff;
  border: 1px solid #e0ddd6;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.22);
  overflow: hidden;
  font-family: 'DM Sans', sans-serif;
}
.profile-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid #efede8;
}
.profile-modal-head h3 { margin: 0; font-size: 1rem; color: #1c1c2e; font-weight: 600; }
.profile-modal-close {
  border: 0;
  background: none;
  font-size: 1.3rem;
  line-height: 1;
  color: #8888a8;
  cursor: pointer;
  padding: 0;
}
.profile-modal-body { padding: 16px 18px; display: grid; gap: 12px; }
.profile-field { display: grid; gap: 5px; }
.profile-field label { font-size: 0.79rem; color: #44445a; font-weight: 500; }
.profile-field input {
  border: 1px solid #e0ddd6;
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 0.9rem;
  color: #1c1c2e;
  font-family: inherit;
  width: 100%;
  outline: none;
  transition: border-color 0.2s;
}
.profile-field input:focus { border-color: #0891b2; }
.profile-field input[readonly] { background: #f7f6f3; color: #666682; }
.profile-modal-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 14px 18px 16px;
  border-top: 1px solid #efede8;
}
.profile-btn-signout {
  border: none;
  background: none;
  color: #ef4444;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  padding: 8px 4px;
}
.profile-btn-signout:hover { text-decoration: underline; }
.profile-btn {
  border: 1px solid #d8d4ce;
  background: #fff;
  color: #44445a;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.profile-btn-primary {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, #7c3aed, #0891b2);
}
.profile-modal-msg {
  min-height: 18px;
  font-size: 0.78rem;
  color: #dc2626;
  padding: 0 18px 12px;
}
.profile-modal-msg.ok { color: #166534; }
.profile-avatar-editor   { display: flex; align-items: center; gap: 10px; }
.profile-avatar-preview  {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid #dcd8d2;
  background: linear-gradient(135deg, #7c3aed, #0891b2);
  background-size: cover;
  background-position: center;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
  overflow: hidden;
  user-select: none;
}
.profile-avatar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.profile-avatar-file    { display: none; }

/* Nav profile trigger hover effects */
.nav-profile-trigger { transition: color .15s ease, background-color .15s ease, box-shadow .15s ease; }
.nav-user-name.nav-profile-trigger {
  border-radius: 6px;
  padding: 4px 6px;
  margin: -4px -6px;
}
.nav-user-name.nav-profile-trigger:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.nav-avatar.nav-profile-trigger:hover {
  box-shadow: 0 0 0 2px rgba(255,255,255,0.35);
  cursor: pointer;
}

/* ================================================================
   Step 14 (2026-05-03) — Components ported from Teachers Hub base.css
   ----------------------------------------------------------------
   These add shared defaults for components CH didn't have yet.
   Anything redefined inline in a page's <style> block still wins
   (build.js injects shared-styles.css BEFORE the first <style> tag),
   so existing pages render unchanged. New pages get these for free.
   ================================================================ */

/* ── Generic button base (companion to existing .btn-primary etc.) ─ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--ink-2);
  text-decoration: none;
}
.btn:hover    { border-color: var(--ink-2); color: var(--ink); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; }

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--ink-2);
}
.btn-ghost:hover { background: var(--paper-2); }

.btn-danger {
  background: var(--red-2);
  border-color: #fca5a5;
  color: var(--red);
}
.btn-danger:hover { background: #fecaca; }

.btn-sm { padding: 5px 12px; font-size: 12px; }

/* ── Card (default — pages can override inline) ───────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.22s ease, transform 0.22s ease;
}
.card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

/* ── Chip / chips (filter pill default) ───────────────────────── */
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip {
  font-size: 11.5px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--paper);
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.15s;
  line-height: 1.6;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.on    { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── Spinner ───────────────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  width: 22px;
  height: 22px;
  border: 2.5px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

/* ── Toast ─────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  transform: translateY(60px);
  opacity: 0;
  transition: all 0.25s ease;
  z-index: var(--z-toast);
}
.toast.show      { transform: translateY(0); opacity: 1; }
.toast.show.warn { background: var(--amber); color: #fff3cd; }

/* ── Confirm dialog (lightweight alt to full modal-overlay) ────── */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28,28,46,0.45);
  backdrop-filter: blur(3px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}
.confirm-overlay.open { opacity: 1; visibility: visible; }
.confirm-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 24px 24px 20px;
  width: 100%;
  max-width: 380px;
  margin: 20px;
  transform: scale(0.96);
  transition: transform 0.22s cubic-bezier(0.34,1.56,0.64,1);
}
.confirm-overlay.open .confirm-box { transform: scale(1); }
.confirm-title { font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.confirm-msg   { font-size: 13px; color: var(--ink-2); line-height: 1.55; margin-bottom: 20px; }
.confirm-btns  { display: flex; gap: 8px; justify-content: flex-end; }

/* ── Role badge (e.g. "ADMIN" / "TEACHER" pills) ───────────────── */
.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1px solid var(--border);
  background: var(--paper);
  color: var(--ink-2);
}
.role-badge .role-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.role-dot-admin   { background: #f5a623; }
.role-dot-teacher { background: var(--green); }

/* ── Progress pill (compact %-bar with label) ──────────────────── */
.prog-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
}
.prog-bar-wrap { width: 90px; height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; }
.prog-bar-fill { height: 100%; background: var(--accent); border-radius: 3px; transition: width 0.5s ease; }
.prog-text         { font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.prog-text strong  { color: var(--ink); }

/* ── Page header (icon + title + subtitle block) ───────────────── */
.page-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.page-header-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, black));
  box-shadow: 0 4px 14px rgba(108,92,231,0.28);
}
.page-header-icon svg { width: 24px; height: 24px; color: #fff; }
.page-header-title    { font-size: 22px; font-weight: 800; color: var(--ink); line-height: 1.2; }
.page-header-sub      { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }

/* ── Page breadcrumb (e.g. Library › Documents › current) ──────── */
.page-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--white);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}
.page-breadcrumb a {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--ink-3);
  text-decoration: none;
  transition: color 0.15s;
}
.page-breadcrumb a:hover { color: var(--accent); }
.page-breadcrumb-sep     { color: var(--border); font-size: 14px; line-height: 1; user-select: none; }
.page-breadcrumb-current {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
}

/* ── Badge — token-driven variants (companion to existing hex variants) ─ */
.badge-accent {
  background: var(--accent-2);
  color: var(--accent);
}
.badge-blue {
  background: var(--blue-2);
  color: var(--blue);
}

/* ── Screen-reader-only utility ────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
