/* =============================================================================
   THE TEACHERS' PANEL LOOK — My Workspace (views/workspace/*.js).

   Taken from the teachers' panel of the legacy system (soft white cards on a
   quiet ground, small uppercase labels, pill chips, buttons coloured by how far
   a mark sheet has got) and drawn in this system's own colours, so the school's
   brand colour still leads.

   Every class here starts `mxt-`. Nothing restyles the shell, the side menu or
   another module: the workspace's markup carries these classes itself, and
   `.mxt-ws` frames each screen. The tokens are on :root (prefixed `--mxt-`)
   because the dialogs the workspace opens are drawn outside `.mxt-ws`.
   ========================================================================== */

:root {
  --mxt-accent: var(--primary-600, #25A194);
  --mxt-accent-soft: color-mix(in srgb, var(--mxt-accent) 12%, transparent);
  --mxt-surface: #ffffff;
  --mxt-surface-2: #f8f9fc;
  --mxt-border: #e6e9ef;
  --mxt-border-strong: #d5dae3;
  --mxt-text: #1d2433;
  --mxt-muted: #5f6b7d;
  --mxt-subtle: #8a94a6;

  --mxt-success: #12805c;  --mxt-success-soft: #e8f6f0;
  --mxt-warning: #b45309;  --mxt-warning-soft: #fdf4e7;
  --mxt-info: #1e5bb8;     --mxt-info-soft: #eaf1fc;
  --mxt-danger: #c0362c;   --mxt-danger-soft: #fdeeec;
  --mxt-neutral: #5f6b7d;  --mxt-neutral-soft: #eef0f4;

  /* How far a mark sheet has got: the solid colours the teachers' panel uses. */
  --mxt-t-zero: #c0362c;
  --mxt-t-low: #d9480f;
  --mxt-t-mid: #f0b429;   --mxt-t-mid-ink: #3d2c00;
  --mxt-t-high: #40a05a;
  --mxt-t-full: #12805c;

  --mxt-radius: 14px;
  --mxt-radius-sm: 10px;
  --mxt-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
}

:root[data-theme="dark"] {
  --mxt-surface: #171c25;
  --mxt-surface-2: #1e2430;
  --mxt-border: #2a3240;
  --mxt-border-strong: #3a4352;
  --mxt-text: #e6e9ef;
  --mxt-muted: #a6afbe;
  --mxt-subtle: #7f8999;

  --mxt-success: #4cc79a;  --mxt-success-soft: rgba(76, 199, 154, .14);
  --mxt-warning: #f0a35a;  --mxt-warning-soft: rgba(240, 163, 90, .14);
  --mxt-info: #6aa6f8;     --mxt-info-soft: rgba(106, 166, 248, .14);
  --mxt-danger: #f07a6e;   --mxt-danger-soft: rgba(240, 122, 110, .14);
  --mxt-neutral: #a6afbe;  --mxt-neutral-soft: rgba(166, 175, 190, .14);

  --mxt-t-zero: #d6483d;
  --mxt-t-low: #e0612a;
  --mxt-t-high: #3c9a62;
  --mxt-t-full: #1a9a72;

  --mxt-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 1px 3px rgba(0, 0, 0, .25);
}

/* ------------------------------------------------------------------ frame */
.mxt-ws { color: var(--mxt-text); min-width: 0; }
.mxt-ws h1, .mxt-ws h2, .mxt-ws h3 { color: var(--mxt-text); }
.mxt-ws a:not(.mxt-btn):not(.mxt-quick-item):not(.mxt-link) { color: var(--mxt-accent); }
.mxt-muted { color: var(--mxt-muted); font-size: 13px; }
.mxt-fine { font-size: 12px; color: var(--mxt-muted); }
.mxt-empty { margin: 0; color: var(--mxt-muted); font-size: 14px; }
.mxt-warn { margin: 12px 0 0; font-size: 13px; color: var(--mxt-warning); }
.mxt-more { margin: 12px 0 0; font-size: 13px; color: var(--mxt-muted); }
.mxt-label { display: block; margin-bottom: 6px; font-size: 11px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: var(--mxt-muted); }

/* ---------------------------------------------------------------- heading */
.mxt-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.mxt-head-text { min-width: 0; }
.mxt-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 4px;
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--mxt-subtle); }
.mxt-crumbs a { color: var(--mxt-subtle) !important; text-decoration: none; }
.mxt-crumbs a:hover { color: var(--mxt-accent) !important; }
.mxt-crumb-sep { opacity: .6; }
.mxt-title { margin: 0; font-size: 24px; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; overflow-wrap: anywhere; }
.mxt-sub { margin-top: 4px; font-size: 13px; color: var(--mxt-muted); }
.mxt-sub:empty { display: none; }
.mxt-head-action { display: flex; flex-wrap: wrap; gap: 8px; }

/* ----------------------------------------------------------- section label */
.mxt-section { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin: 28px 0 12px;
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--mxt-muted); }
.mxt-section small { font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--mxt-subtle); }

/* The class heading above its subjects: "S.2  MARKS ENTRY". */
.mxt-group { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin: 26px 0 12px;
  font-size: 17px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.mxt-group:first-child { margin-top: 4px; }
.mxt-group span { font-size: 11px; font-weight: 600; letter-spacing: .06em; color: var(--mxt-subtle); }

/* ------------------------------------------------------------------ cards */
.mxt-card { background: var(--mxt-surface); border: 1px solid var(--mxt-border); border-radius: var(--mxt-radius);
  box-shadow: var(--mxt-shadow); min-width: 0; }
.mxt-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
  padding: 14px 18px; border-bottom: 1px solid var(--mxt-border); }
.mxt-card-title { margin: 0; font-size: 15px; font-weight: 700; }
.mxt-card-action { display: flex; flex-wrap: wrap; gap: 6px; }
.mxt-card-body { padding: 18px; }
.mxt-card--flush { overflow: hidden; }
.mxt-card--flush .mxt-table th:first-child, .mxt-card--flush .mxt-table td:first-child { padding-left: 18px; }
.mxt-card--today { border-color: var(--mxt-accent); box-shadow: 0 0 0 3px var(--mxt-accent-soft); }

/* ---------------------------------------------------------------- me card */
.mxt-me { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding: 14px 18px;
  background: var(--mxt-surface); border: 1px solid var(--mxt-border); border-radius: var(--mxt-radius); box-shadow: var(--mxt-shadow); }
.mxt-me--solo { max-width: 560px; }
.mxt-avatar { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 46px; height: 46px; border-radius: 50%; background: var(--mxt-accent-soft); color: var(--mxt-accent);
  font-size: 19px; font-weight: 700; }
.mxt-me-text { min-width: 0; flex: 1; }
.mxt-me-name { font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
.mxt-me-meta { font-size: 13px; color: var(--mxt-muted); }
.mxt-me-date { text-align: right; font-size: 12px; color: var(--mxt-muted); flex-shrink: 0; }
.mxt-me-day { font-size: 18px; font-weight: 700; color: var(--mxt-text); }

/* ------------------------------------------------------------------ tiles */
.mxt-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 22px; }
.mxt-tile { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 16px 18px;
  background: var(--mxt-surface); border: 1px solid var(--mxt-border); border-radius: var(--mxt-radius); box-shadow: var(--mxt-shadow); }
.mxt-tile-ico { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 42px; height: 42px; border-radius: 11px; font-size: 20px; }
.mxt-tile-text { min-width: 0; }
.mxt-tile-label { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--mxt-muted); }
.mxt-tile-value { font-size: 21px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.mxt-tile-sub { font-size: 12px; color: var(--mxt-subtle); overflow-wrap: anywhere; }
.mxt-tone-primary { background: var(--mxt-accent-soft); color: var(--mxt-accent); }
.mxt-tone-success { background: var(--mxt-success-soft); color: var(--mxt-success); }
.mxt-tone-warning { background: var(--mxt-warning-soft); color: var(--mxt-warning); }
.mxt-tone-info    { background: var(--mxt-info-soft);    color: var(--mxt-info); }
.mxt-tone-danger  { background: var(--mxt-danger-soft);  color: var(--mxt-danger); }
.mxt-tone-neutral { background: var(--mxt-neutral-soft); color: var(--mxt-neutral); }

/* ------------------------------------------------------------------ chips */
.mxt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mxt-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1.6; white-space: nowrap; }
.mxt-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; flex-shrink: 0; }
.mxt-chip--primary { background: var(--mxt-accent-soft); color: var(--mxt-accent); }
.mxt-chip--success { background: var(--mxt-success-soft); color: var(--mxt-success); }
.mxt-chip--warning { background: var(--mxt-warning-soft); color: var(--mxt-warning); }
.mxt-chip--info    { background: var(--mxt-info-soft);    color: var(--mxt-info); }
.mxt-chip--danger  { background: var(--mxt-danger-soft);  color: var(--mxt-danger); }
.mxt-chip--neutral { background: var(--mxt-neutral-soft); color: var(--mxt-neutral); }
/* A percentage pill: soft tint of the tier colour, so a grid of them stays calm. */
.mxt-chip--tier.mxt-tier-zero { background: var(--mxt-danger-soft);  color: var(--mxt-danger); }
.mxt-chip--tier.mxt-tier-low  { background: var(--mxt-warning-soft); color: var(--mxt-warning); }
.mxt-chip--tier.mxt-tier-mid  { background: var(--mxt-warning-soft); color: var(--mxt-warning); }
.mxt-chip--tier.mxt-tier-high { background: var(--mxt-success-soft); color: var(--mxt-success); }
.mxt-chip--tier.mxt-tier-full { background: var(--mxt-success-soft); color: var(--mxt-success); }

/* ---------------------------------------------------------------- buttons */
.mxt-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 12px;
  border: 1px solid transparent; border-radius: 8px; font-size: 12.5px; font-weight: 600; line-height: 1.4;
  cursor: pointer; white-space: nowrap; transition: background-color .15s, border-color .15s, color .15s, filter .15s; }
.mxt-btn i { font-size: 14px; line-height: 1; }
.mxt-btn:disabled { opacity: .55; cursor: default; }
.mxt-btn--primary { background: var(--mxt-accent); color: #fff; }
.mxt-btn--primary:hover { filter: brightness(.92); }
.mxt-btn--ghost { background: var(--mxt-surface); color: var(--mxt-muted); border-color: var(--mxt-border-strong); }
.mxt-btn--ghost:hover { background: var(--mxt-surface-2); color: var(--mxt-text); }
.mxt-btn--danger { background: var(--mxt-danger-soft); color: var(--mxt-danger); }
.mxt-btn--danger:hover { border-color: var(--mxt-danger); }
.mxt-btn--tier { color: #fff; }
.mxt-btn--tier:hover { filter: brightness(.92); }
.mxt-btn--tier.mxt-tier-zero { background: var(--mxt-t-zero); }
.mxt-btn--tier.mxt-tier-low  { background: var(--mxt-t-low); }
.mxt-btn--tier.mxt-tier-mid  { background: var(--mxt-t-mid); color: var(--mxt-t-mid-ink); }
.mxt-btn--tier.mxt-tier-high { background: var(--mxt-t-high); }
.mxt-btn--tier.mxt-tier-full { background: var(--mxt-t-full); }
.mxt-btn:focus-visible, .mxt-seg-btn:focus-visible, .mxt-link:focus-visible, .mxt-quick-item:focus-visible {
  outline: 2px solid var(--mxt-accent); outline-offset: 2px; }

/* ----------------------------------------------------------------- tables */
.mxt-ws .table-responsive { -webkit-overflow-scrolling: touch; }
.mxt-table { width: 100%; margin: 0; border-collapse: separate; border-spacing: 0; color: var(--mxt-text); font-size: 13.5px; }
.mxt-table > thead > tr > th { padding: 10px 12px; background: var(--mxt-surface-2); border: 0; border-bottom: 1px solid var(--mxt-border);
  font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--mxt-muted); white-space: nowrap; }
.mxt-table > tbody > tr > td, .mxt-table > tfoot > tr > td, .mxt-table > tfoot > tr > th {
  padding: 10px 12px; background: transparent; border: 0; border-bottom: 1px solid var(--mxt-border); vertical-align: middle; color: var(--mxt-text); }
.mxt-table > tbody > tr:last-child > td { border-bottom: 0; }
.mxt-table > tbody > tr:hover > td { background: var(--mxt-surface-2); }
.mxt-table > tfoot > tr > th { font-size: 12px; font-weight: 700; color: var(--mxt-muted); background: var(--mxt-surface-2); border-top: 1px solid var(--mxt-border); border-bottom: 0; }
.mxt-table--plain > thead { display: none; }
.mxt-table > tbody > tr.mxt-row-mine > td { background: var(--mxt-accent-soft); }
.mxt-cell-title { font-weight: 600; }
.mxt-cell-sub { font-size: 12px; color: var(--mxt-muted); margin-top: 2px; }

/* --------------------------------------------------------- progress bar */
.mxt-bar-wrap { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.mxt-bar { flex: 1; height: 6px; border-radius: 999px; background: var(--mxt-neutral-soft); overflow: hidden; }
.mxt-bar-fill { display: block; height: 100%; border-radius: 999px; background: var(--mxt-t-zero); }
.mxt-bar-fill.mxt-tier-low { background: var(--mxt-t-low); }
.mxt-bar-fill.mxt-tier-mid { background: var(--mxt-t-mid); }
.mxt-bar-fill.mxt-tier-high { background: var(--mxt-t-high); }
.mxt-bar-fill.mxt-tier-full { background: var(--mxt-t-full); }
.mxt-bar-num { font-size: 12px; color: var(--mxt-muted); min-width: 34px; text-align: right; }

/* ---------------------------------------------------------------- notices */
.mxt-note { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 20px; padding: 12px 16px;
  border: 1px solid transparent; border-radius: var(--mxt-radius-sm); font-size: 13.5px; }
.mxt-note i { font-size: 18px; line-height: 1.2; flex-shrink: 0; }
.mxt-note--info    { background: var(--mxt-info-soft);    color: var(--mxt-info); }
.mxt-note--success { background: var(--mxt-success-soft); color: var(--mxt-success); }
.mxt-note--warning { background: var(--mxt-warning-soft); color: var(--mxt-warning); }
.mxt-note--danger  { background: var(--mxt-danger-soft);  color: var(--mxt-danger); }
.mxt-note--neutral { background: var(--mxt-neutral-soft); color: var(--mxt-neutral); }
.mxt-modal .mxt-note { margin-bottom: 12px; }

/* ------------------------------------------------------------ list rows */
.mxt-rows { list-style: none; margin: 0; padding: 0; }
.mxt-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 12px;
  padding: 11px 0; border-bottom: 1px solid var(--mxt-border); }
.mxt-row:first-child { padding-top: 0; }
.mxt-row:last-child { padding-bottom: 0; border-bottom: 0; }
.mxt-row-main { min-width: 0; flex: 1 1 200px; }
.mxt-row-title { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.mxt-row-sub { font-size: 12.5px; color: var(--mxt-muted); overflow-wrap: anywhere; }
.mxt-row-end { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* Quick actions: a grid of soft tiles, as the panel's menu is. */
.mxt-quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.mxt-quick-item { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid var(--mxt-border);
  border-radius: var(--mxt-radius-sm); background: var(--mxt-surface-2); color: var(--mxt-text) !important;
  font-size: 13px; font-weight: 600; text-decoration: none; }
.mxt-quick-item i { font-size: 18px; color: var(--mxt-accent); }
.mxt-quick-item:hover { border-color: var(--mxt-accent); background: var(--mxt-accent-soft); }

/* Attendance links: a title, what it opens, and an arrow. */
.mxt-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.mxt-link { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: var(--mxt-radius-sm);
  color: var(--mxt-text) !important; text-decoration: none; }
.mxt-link:hover { background: var(--mxt-surface-2); }
.mxt-link-ico { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 34px; height: 34px;
  border-radius: 9px; background: var(--mxt-accent-soft); color: var(--mxt-accent); font-size: 17px; }
.mxt-link-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.mxt-link-title { font-size: 14px; font-weight: 600; }
.mxt-link-hint { font-size: 12px; color: var(--mxt-muted); }
.mxt-link-go { color: var(--mxt-subtle); font-size: 18px; }

/* ----------------------------------------------------- subject cards */
.mxt-subject-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 6px; }
.mxt-subject-title { margin: 0; font-size: 16px; font-weight: 700; }
.mxt-subject-stream { font-size: 13px; color: var(--mxt-muted); }
.mxt-subject-learners { font-size: 13px; margin-bottom: 12px; }
.mxt-subject-reg { margin-top: 12px; font-size: 12.5px; color: var(--mxt-muted); }
.mxt-subject-reg i { margin-right: 4px; }
.mxt-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

/* The materials hub. */
.mxt-hub .mxt-card-body { display: flex; flex-direction: column; height: 100%; }
.mxt-hub-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.mxt-hub-title { margin: 0; font-size: 15px; font-weight: 700; }
.mxt-hub-figure { margin-bottom: 12px; font-size: 18px; font-weight: 700; }
.mxt-hub .mxt-btn { align-self: flex-start; }

/* ------------------------------------------------ filters and toolbars */
.mxt-filter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; margin-bottom: 20px; }
.mxt-filter-field { min-width: min(260px, 100%); }
.mxt-filter-check { padding-bottom: 8px; }
.mxt-filter-note { padding-bottom: 8px; }
.mxt-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 18px; }
.mxt-toolbar--links { margin-top: -6px; }
.mxt-toolbar-label { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--mxt-subtle); margin-right: 2px; }
.mxt-ws .form-select, .mxt-ws .form-control { border-radius: var(--mxt-radius-sm); border-color: var(--mxt-border-strong); }

/* ------------------------------------------------------------------ tabs */
.mxt-ws .nav.button-tab { display: flex; flex-wrap: nowrap; gap: 4px; margin-bottom: 18px !important; padding: 4px; overflow-x: auto;
  background: var(--mxt-surface); border: 1px solid var(--mxt-border); border-radius: var(--mxt-radius-sm); width: fit-content; max-width: 100%;
  scrollbar-width: none; }
.mxt-ws .nav.button-tab::-webkit-scrollbar { display: none; }
.mxt-ws .nav.button-tab .nav-link { background: transparent; color: var(--mxt-muted); border-radius: 8px; white-space: nowrap;
  font-size: 13px; font-weight: 600; padding: 7px 14px !important; }
.mxt-ws .nav.button-tab .nav-link:hover { color: var(--mxt-text); background: var(--mxt-surface-2); }
.mxt-ws .nav.button-tab .nav-link.active { background: var(--mxt-accent-soft); color: var(--mxt-accent); }

/* ------------------------------------------- details lists (Me) */
.mxt-ws dl.row dt { font-size: 12px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--mxt-subtle); padding-top: 2px; }
.mxt-ws dl.row dd { color: var(--mxt-text); }

/* ------------------------------------------- the register dialog */
.mxt-seg { display: inline-flex; gap: 0; border: 1px solid var(--mxt-border-strong); border-radius: 9px; overflow: hidden; background: var(--mxt-surface); }
.mxt-seg-btn { padding: 6px 12px; border: 0; border-right: 1px solid var(--mxt-border-strong); background: transparent;
  color: var(--mxt-muted); font-size: 12.5px; font-weight: 600; cursor: pointer; min-height: 34px; }
.mxt-seg-btn:last-child { border-right: 0; }
.mxt-seg-btn:hover { background: var(--mxt-surface-2); }
.mxt-seg-btn.is-on { color: #fff; }
.mxt-seg-btn.is-on[data-tone="success"] { background: var(--mxt-t-full); }
.mxt-seg-btn.is-on[data-tone="warning"] { background: var(--mxt-t-mid); color: var(--mxt-t-mid-ink); }
.mxt-seg-btn.is-on[data-tone="danger"]  { background: var(--mxt-t-zero); }
.mxt-seg-btn.is-on[data-tone="info"]    { background: var(--mxt-info); }
.mxt-modal .modal-content { border: 1px solid var(--mxt-border); border-radius: 16px; background: var(--mxt-surface); color: var(--mxt-text); }
.mxt-modal .modal-header { border-bottom: 1px solid var(--mxt-border); }
.mxt-modal .modal-title { font-size: 16px; font-weight: 700; }
.mxt-modal .modal-footer { border-top: 1px solid var(--mxt-border); gap: 8px; }

/* ------------------------------------------------------------- phones */
@media (max-width: 767px) {
  .mxt-title { font-size: 21px; }
  .mxt-head { margin-bottom: 16px; }
  .mxt-card-head { padding: 12px 14px; }
  .mxt-card-body { padding: 14px; }
  .mxt-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .mxt-tile { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; }
  .mxt-tile-value { font-size: 19px; }
  .mxt-me { padding: 12px 14px; }
  .mxt-me-date { display: none; }
  .mxt-group { font-size: 15px; }
  /* thumb-sized targets */
  .mxt-btn { min-height: 36px; }
  .mxt-seg-btn { min-height: 40px; padding: 6px 10px; }
  .mxt-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mxt-row-end { width: 100%; }
  .mxt-toolbar .mxt-btn { flex: 1 1 auto; }
  .mxt-filter-field { flex: 1 1 100%; }
  .mxt-table > tbody > tr > td, .mxt-table > thead > tr > th { padding: 9px 10px; }
}

@media (prefers-reduced-motion: reduce) { .mxt-btn { transition: none; } }
@media print { .mxt-btn, .mxt-toolbar, .mxt-head-action { display: none !important; } }

/* The theme sets heading sizes with !important (style.css h1..h3, fluid and
   large); these headings are small labels, so they say their own size the
   same way. */
.mxt-ws h1.mxt-title { font-size: 24px !important; line-height: 1.2; }
.mxt-ws h2.mxt-card-title { font-size: 15px !important; line-height: 1.3; }
.mxt-ws h2.mxt-section { font-size: 12px !important; line-height: 1.4; }
.mxt-ws h3.mxt-group { font-size: 17px !important; line-height: 1.3; }
.mxt-ws h3.mxt-group span { font-size: 11px !important; }
.mxt-ws h3.mxt-subject-title { font-size: 16px !important; line-height: 1.3; }
.mxt-ws h3.mxt-hub-title { font-size: 15px !important; line-height: 1.3; }
@media (max-width: 767px) {
  .mxt-ws h1.mxt-title { font-size: 21px !important; }
  .mxt-ws h3.mxt-group { font-size: 15px !important; }
}

/* Bootstrap's table paints each cell with an inset shadow of --bs-table-bg;
   these tables draw their own rows. */
.mxt-table { --bs-table-bg: transparent; --bs-table-color: var(--mxt-text); --bs-table-hover-bg: transparent; }
.mxt-table > :not(caption) > * > * { box-shadow: none; }

/* mxt2: each exam column with its own links, and the subject's action buttons. */
.mxt2-cols { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.mxt2-col { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.mxt2-col-chip { text-decoration: none; }
.mxt2-col-more { display: flex; flex-wrap: wrap; gap: 2px 8px; font-size: 11px; }
.mxt2-col-link { color: var(--mxt-muted, #6b7280); text-decoration: underline; text-underline-offset: 2px; }
.mxt2-col-link:hover { color: var(--mxt-text, #111827); }
.mxt2-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.mxt-table .mxt2-acts { margin-top: 0; max-width: 360px; }
.mxt2-acts .mxt-btn { padding: 5px 10px; font-size: 12px; }

/* mxt2: THE TEACHER'S PANEL HAS NO MODULE RAIL. app.js puts body.mxt2-teacher-panel on
   <body> when the user's landing is /workspace; the main menu takes the rail's space.
   The top bar keeps the profile menu and theme button but has no module switcher
   either (app.js draws none for a teacher): a teacher does not pick modules. Same shape
   as the leaders panel (mxl_leaders.css section 11). */
body.mxt2-teacher-panel .sb2 .sb-rail { display: none; }
body.mxt2-teacher-panel .sidebar.sb2 { --sb-rail: 0px; }
body.has-sb2.mxt2-teacher-panel #moduleSwitcher { display: none; }
@media (min-width: 1200px) {
  body.has-sb2.mxt2-teacher-panel .dashboard-main { margin-inline-start: 16.875rem; }
  body.has-sb2.mxt2-teacher-panel .sidebar.sb2 { width: 16.875rem; }
}
@media (min-width: 1650px) {
  body.has-sb2.mxt2-teacher-panel .dashboard-main { margin-inline-start: 18.125rem; }
  body.has-sb2.mxt2-teacher-panel .sidebar.sb2 { width: 18.125rem; }
}
/* Below 1200px the panel is a drawer behind the menu button, as on a phone. */
@media (min-width: 768px) and (max-width: 1199.98px) {
  body.has-sb2.mxt2-teacher-panel .sidebar.sb2 {
    inset-inline-start: -100%;
    width: min(21.5rem, 92vw);
    overflow: hidden;
    visibility: hidden;
    transition: inset-inline-start .25s ease, visibility 0s linear .25s;
  }
  body.has-sb2.mxt2-teacher-panel .sidebar.sb2.sidebar-open {
    inset-inline-start: 0;
    visibility: visible;
    box-shadow: 0 0 40px rgba(16, 24, 40, .25);
    transition: inset-inline-start .25s ease, visibility 0s;
  }
  body.has-sb2.mxt2-teacher-panel .sidebar.sb2 .sb-panel {
    position: relative;
    inset: auto;
    width: auto;
    max-width: none;
    transform: none;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
  }
  body.has-sb2.mxt2-teacher-panel .dashboard-main { margin-inline-start: 0; }
  body.has-sb2.mxt2-teacher-panel .sidebar-mobile-toggle { display: inline-block; }
}
body.mxt2-teacher-panel .sb-panel__title { display: none; }
body.mxt2-teacher-panel .sidebar.sb2 .sidebar-menu .sidebar-menu-group-title {
  margin: 16px 12px 4px;
  font-size: .6875rem;
  letter-spacing: .07em;
}
/* mxt2: in the top bar the module switcher is just its icon and arrow, so the bar stays on one line. */
body.mxt2-teacher-panel #moduleSwitcher .btn > .fw-medium { display: none; }
body.mxt2-teacher-panel #moduleSwitcher .btn { padding-inline: 12px !important; }
body.mxt2-teacher-panel .navbar-header #studentSearch { min-width: 0; }
