:root {
  --bg: #ffffff;
  --page-bg: #eef3f8;
  --card: #ffffff;
  --panel: #f5f7fb;
  --panel-2: #eef3f9;
  --border: #d6e3f0;
  --border-soft: #dfe8f2;

  --text: #0d1b38;
  --muted: #5c7292;
  --heading: #33527c;
  --accent: #5878a3;
  --accent-soft: #e7eef7;

  --success: #5878a3;
  --warning: #5878a3;
  --danger: #5878a3;

  --radius: var(--ui-radius, 8px);
  --radius-lg: var(--ui-radius, 8px);

  --space-1: var(--ui-space-1, 8px);
  --space-2: var(--ui-space-2, 12px);
  --space-3: var(--ui-space-3, 16px);
  --space-4: var(--ui-space-4, 20px);
  --space-5: var(--ui-space-5, 24px);
  --space-6: var(--ui-space-6, 32px);
}

.qla-dashboard-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.qla-dashboard-kicker {
  margin: 0 0 6px 0;
  color: var(--heading);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.qla-dashboard-title {
  margin: 0;
  color: var(--heading);
  font-size: 2rem;
  line-height: 1.05;
  font-weight: 400;
}

.qla-dashboard-copy {
  margin: 8px 0 0 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.45;
}

.qla-dashboard-hero {
  min-height: 168px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.qla-dashboard-hero-metric {
  margin-top: 18px;
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 8px;
}

.qla-dashboard-hero-value {
  margin: 0;
  color: #5d78a1;
  font-size: 4rem;
  line-height: 0.95;
  font-weight: 800;
}

.qla-dashboard-hero-suffix {
  color: var(--heading);
  font-size: 1.15rem;
  font-weight: 700;
}

.qla-stat-card--compact {
  min-height: 152px;
}

.qla-stat-card--status .qla-stat-value.is-strong {
  color: #5878a3;
}

.qla-stat-card--status .qla-stat-value.is-muted {
  color: #8aa0bd;
}

.qla-panel-placeholder {
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
  background: #ffffff;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.qla-toolbar-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.qla-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}

.qla-field--compact {
  min-width: 150px;
}

.qla-field--stretch {
  flex: 1 1 260px;
  min-width: 220px;
}

.qla-segmented {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
  gap: 4px;
}

.qla-segmented-control {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
  gap: 4px;
}

.qla-segmented-btn {
  border: 0;
  background: transparent;
  color: var(--heading);
  border-radius: 6px;
  padding: 8px 12px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.qla-segmented-control__btn {
  border: 0;
  background: transparent;
  color: var(--heading);
  border-radius: 6px;
  padding: 8px 12px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.qla-segmented-btn.is-active {
  background: var(--accent);
  color: #ffffff;
}

.qla-segmented-control__btn.is-active {
  background: var(--accent);
  color: #ffffff;
}

.qla-inline-choice {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 40px;
  padding: 0 12px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--heading);
  font-weight: 700;
  cursor: pointer;
}

.qla-inline-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.qla-inline-choice.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.qla-inline-choice-label {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  margin-right: 6px;
}

.qla-radio-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--heading);
  font-weight: 700;
  cursor: pointer;
}

.qla-radio-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.qla-radio-pill:has(input:checked) {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.qla-table-compact th,
.qla-table-compact td {
  padding-top: 10px;
  padding-bottom: 10px;
}

.qla-grid-card {
  overflow: hidden;
}

.qla-grid-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
}

.qla-grid-table {
  width: 100%;
  min-width: 880px;
  border-collapse: separate;
  border-spacing: 0;
}

.qla-grid-table thead th {
  background: var(--panel-2);
  color: var(--heading);
  padding: 13px 14px;
  font-size: 0.92rem;
  font-weight: 700;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.qla-grid-table thead th:first-child,
.qla-grid-table tbody td:first-child {
  text-align: left;
}

.qla-grid-table tbody tr {
  background: #ffffff;
}

.qla-grid-table tbody tr:hover td {
  background: #f8fbff;
}

.qla-grid-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-soft);
  text-align: center;
  vertical-align: middle;
}

.qla-grid-class {
  color: var(--heading);
  font-weight: 700;
  white-space: nowrap;
}

.qla-grid-cell {
  font-weight: 700;
  border-left: 1px solid transparent;
  border-right: 1px solid transparent;
}

.qla-grid-cell.is-empty {
  color: #90a2b8;
  font-weight: 600;
}

.hod-teachers-shell {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hod-teachers-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hod-teachers-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-soft);
}

.hod-teachers-section-kicker {
  margin: 0 0 6px 0;
  color: var(--heading);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hod-teachers-section-title {
  margin: 0;
  color: var(--text);
  font-size: 1.2rem;
  line-height: 1.2;
  font-weight: 700;
}

.hod-teachers-section-copy {
  margin: 8px 0 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.hod-teachers-create-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.35fr) minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.hod-teachers-field {
  min-width: 0;
}

.hod-teachers-action {
  justify-content: flex-end;
  min-width: 170px;
}

.hod-teachers-table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
}

.hod-teachers-footer-actions {
  justify-content: flex-end;
  padding-top: 4px;
}

@media (max-width: 1080px) {
  .hod-teachers-create-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hod-teachers-action {
    min-width: 0;
  }
}

@media (max-width: 720px) {
  .hod-teachers-create-grid {
    grid-template-columns: 1fr;
  }

  .hod-teachers-action .qla-btn {
    width: 100%;
  }
}

.qla-grid-cell.is-low {
  background: #f8e9ec;
  color: #9d4051;
}

.qla-grid-cell.is-mid {
  background: #fbf2df;
  color: #8f6a1f;
}

.qla-grid-cell.is-high {
  background: #e7f2eb;
  color: #3d6f55;
}

.qla-grid-cell.is-summary {
  box-shadow: inset 0 0 0 1px rgba(88, 120, 163, 0.08);
}

.qla-grid-summary-row td {
  background: #f5f7fb;
  font-weight: 700;
}

.qla-grid-summary-row:hover td {
  background: #eef3f9;
}

.qla-grid-summary-label {
  color: var(--heading);
}

.qla-grid-tooltip {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(13, 27, 56, 0.12);
  padding: 12px;
}

.workspace-dense .qla-card,
.workspace-dense .qla-chart-card,
.workspace-dense .qla-sidebar {
  padding: 14px 16px;
}

.workspace-dense .qla-card-header {
  margin-bottom: 12px;
}

.workspace-dense .qla-card-header h2,
.workspace-dense .qla-card-header h3,
.workspace-dense .qla-card h2,
.workspace-dense .qla-card h3 {
  font-size: 1.02rem;
}

.workspace-dense .qla-chart-subtitle,
.workspace-dense .qla-dashboard-copy,
.workspace-dense .qla-list-meta,
.workspace-dense .qla-note {
  font-size: 0.88rem;
  line-height: 1.35;
}

.workspace-dense .qla-dashboard-kicker,
.workspace-dense .qla-field label,
.workspace-dense .qla-nav-section-title {
  font-size: 0.82rem;
}

.workspace-dense .qla-dashboard-title {
  font-size: 1.7rem;
}

.workspace-dense .qla-dashboard-hero {
  min-height: 132px;
}

.workspace-dense .qla-dashboard-hero-value {
  font-size: 3.35rem;
}

.workspace-dense .qla-dashboard-hero-suffix {
  font-size: 1rem;
}

.workspace-dense .qla-stat-card {
  padding: 18px 20px;
  min-height: 138px;
}

.workspace-dense .qla-stat-card--compact {
  min-height: 132px;
}

.workspace-dense .qla-stat-label {
  margin: 0 0 12px 0;
  font-size: 0.95rem;
}

.workspace-dense .qla-stat-value {
  font-size: 2.7rem;
}

.workspace-dense .qla-stat-subtext,
.workspace-dense .qla-stat-trend {
  margin-top: 10px;
  font-size: 0.85rem;
}

.workspace-dense .qla-btn {
  min-height: 38px;
  padding: 8px 14px;
  font-size: 0.88rem;
}

.workspace-dense .qla-input,
.workspace-dense .qla-select,
.workspace-dense .qla-textarea {
  padding: 8px 10px;
  font-size: 0.92rem;
}

.workspace-dense .qla-textarea {
  min-height: 92px;
}

.workspace-dense .qla-form-row,
.workspace-dense .qla-toolbar-row,
.workspace-dense .qla-action-grid {
  gap: 10px;
}

.workspace-dense .qla-table th {
  padding: 10px 12px;
  font-size: 0.86rem;
}

.workspace-dense .qla-table td {
  padding: 10px 12px;
  font-size: 0.9rem;
}

.workspace-dense .qla-badge {
  padding: 4px 8px;
  font-size: 0.76rem;
}

.workspace-dense .qla-panel,
.workspace-dense .qla-panel-soft,
.workspace-dense .qla-note,
.workspace-dense .qla-alert {
  padding: 12px 14px;
}

.workspace-dense .mb-4 {
  margin-bottom: 16px;
}

.hod-assigned-filters {
  width: 100%;
  justify-content: flex-start;
  gap: 10px;
}

.hod-assigned-filters .hod-assigned-filter {
  flex: 1 1 12rem;
  min-width: 11rem;
}

@media (min-width: 900px) {
  .hod-assigned-filters {
    flex-wrap: nowrap;
  }

  .hod-assigned-filters .hod-assigned-filter-term {
    flex: 0 0 13rem;
  }

  .hod-assigned-filters .hod-assigned-filter-year {
    flex: 0 0 12rem;
  }

  .hod-assigned-filters .hod-assigned-filter-teacher {
    flex: 0 0 15rem;
  }
}

.hod-assigned-card-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.hod-assigned-actions {
  flex-wrap: nowrap;
  gap: 6px;
}

.hod-assigned-secondary,
.hod-assigned-meta {
  line-height: 1.35;
}

.hod-assigned-secondary {
  font-size: 0.74rem;
}

.hod-assigned-meta {
  font-size: 0.76rem;
}

@media (max-width: 1024px) {
  .hod-assigned-card-top {
    grid-template-columns: 1fr;
  }

  .hod-assigned-actions {
    flex-wrap: wrap;
    justify-content: flex-start !important;
  }
}

.hod-assign-step-shell {
  width: 100%;
  max-width: 96rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hod-assign-step-intro {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hod-assign-step-kicker {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hod-assign-step-heading {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--heading);
}

.hod-assign-step-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hod-assign-step-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--heading);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.hod-assign-step-pill.is-active {
  border-color: rgba(164, 184, 210, 0.95);
  background: var(--qla-sidebar-active-bg);
  color: var(--text);
  box-shadow: 0 10px 20px rgba(95, 128, 171, 0.12);
}

.hod-assign-step-card {
  padding: 18px 20px;
}

.hod-assign-step-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}

.hod-assign-step-form {
  width: 100%;
}

.hod-assign-step-controls {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-soft);
}

.hod-assign-year-form {
  display: flex;
  align-items: end;
  gap: 12px;
}

.hod-assign-year-select {
  width: 13rem;
}

.hod-assign-class-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hod-assign-class-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hod-assign-class-heading {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.hod-assign-class-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--heading);
}

.hod-assign-class-count {
  color: #748497;
  font-size: 0.84rem;
  font-weight: 600;
}

.hod-assign-class-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.hod-assign-class-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.hod-assign-class-tile {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.hod-assign-class-tile:hover {
  border-color: #9fb6d3;
  background: #fbfdff;
}

.hod-assign-class-tile:has(.hod-assign-class-checkbox:checked) {
  border-color: #9cb5d8;
  background: #eef4fb;
  box-shadow: inset 0 0 0 1px rgba(95, 128, 171, 0.1);
}

.hod-assign-class-tile:has(.hod-assign-class-checkbox:checked)::after {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #5f80ab;
  flex: 0 0 auto;
}

.hod-assign-class-checkbox {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.hod-assign-class-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hod-assign-class-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.hod-assign-step-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
}

.hod-assign-step-actions-end {
  justify-content: flex-end;
}

.hod-assign-summary-card {
  padding: 16px;
  position: sticky;
  top: 18px;
}

.hod-assign-summary-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.hod-assign-summary-kicker {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hod-assign-summary-note {
  margin: 0;
  color: #6f8195;
  font-size: 0.78rem;
  font-weight: 600;
}

.hod-assign-summary-section {
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid var(--border-soft);
}

.hod-assign-summary-section:first-of-type {
  padding-top: 0;
  margin-top: 0;
  border-top: 0;
}

.hod-assign-summary-label {
  margin: 0 0 6px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hod-assign-summary-value {
  margin: 0;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
}

.hod-assign-summary-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hod-assign-summary-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hod-assign-summary-list-item {
  color: #425467;
  font-size: 0.88rem;
  line-height: 1.4;
}

.hod-assign-summary-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f4f7fb;
  border: 1px solid #dde7f2;
  color: #425467;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1;
}

.hod-assign-summary-empty {
  margin: 0;
  color: #76879a;
  font-size: 0.88rem;
  line-height: 1.45;
}

@media (max-width: 1024px) {
  .hod-assign-step-layout {
    grid-template-columns: 1fr;
  }

  .hod-assign-summary-card {
    position: static;
  }

  .hod-assign-class-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .hod-assign-year-form,
  .hod-assign-step-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hod-assign-year-select {
    width: 100%;
  }

  .hod-assign-class-header {
    flex-direction: column;
    align-items: stretch;
  }

  .hod-assign-class-grid {
    grid-template-columns: 1fr;
  }
}

.hod-template-library-shell {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hod-template-library-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.hod-template-library-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hod-template-library-kicker {
  color: var(--heading);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hod-template-library-title {
  margin: 0;
  color: var(--text);
  font-size: 1.25rem;
  line-height: 1.15;
  font-weight: 700;
}

.hod-template-library-copy-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.hod-template-library-location {
  margin-top: 2px;
}

.hod-template-library-breadcrumb-link {
  color: #66788c;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.16s ease;
}

.hod-template-library-breadcrumb-link:hover {
  color: var(--text);
}

.hod-template-library-breadcrumb-current {
  color: var(--text);
  font-weight: 600;
}

.hod-template-library-meta {
  margin-top: 2px;
  color: #748497;
}

.hod-template-library-card {
  padding: 16px 18px;
}

.hod-template-library-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  auto-rows: 1fr;
}

.hod-template-library-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.hod-template-library-section-kicker {
  margin: 0 0 4px 0;
  color: var(--heading);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hod-template-library-section-title {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.2;
  font-weight: 700;
}

.hod-template-folder-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  min-height: 112px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.hod-template-folder-card:hover {
  border-color: #c5d6e8;
  box-shadow: 0 8px 18px rgba(15, 35, 64, 0.06);
  background: #fbfdff;
}

.hod-template-folder-card-wide {
  grid-column: span 2;
}

.hod-template-source-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hod-template-source-card {
  min-height: 132px;
}

.hod-template-library-table-shell {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
}

.hod-template-library-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.hod-template-library-empty {
  padding: 10px 2px 2px;
  color: #748497;
  font-size: 0.9rem;
  line-height: 1.45;
}

@media (max-width: 960px) {
  .hod-template-library-top,
  .hod-template-library-panel-head {
    flex-direction: column;
    align-items: stretch;
  }

  .hod-template-library-grid {
    grid-template-columns: 1fr;
  }

  .hod-template-folder-card-wide {
    grid-column: span 1;
  }

  .hod-template-source-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1100px) {
  .qla-dashboard-intro {
    flex-direction: column;
  }

  .qla-dashboard-hero {
    min-height: 0;
  }

  .qla-dashboard-hero-metric {
    justify-content: flex-start;
  }

  .qla-toolbar-row {
    align-items: stretch;
  }

  .qla-field--compact,
  .qla-field--stretch {
    min-width: 100%;
  }
}

.teacher-workspace .workspace-hero-card {
  background: linear-gradient(180deg, #fbfcfe 0%, #f4f8fc 100%);
}

.teacher-workspace .workspace-title {
  font-size: 1.8rem;
}

.teacher-workspace .workspace-subtitle {
  max-width: 56rem;
}

.teacher-workspace .workspace-summary-strip {
  gap: 10px;
}

.teacher-workspace .workspace-summary-item {
  min-width: 124px;
  padding: 9px 11px;
}

.teacher-workspace .workspace-summary-value {
  font-size: 1rem;
}

.teacher-task-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 14px;
  align-items: start;
}

.teacher-assessment-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.teacher-assessment-card {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.teacher-assessment-main {
  min-width: 0;
  flex: 1 1 320px;
}

.teacher-assessment-title {
  margin: 0;
  color: var(--heading);
  font-size: 0.98rem;
  line-height: 1.2;
  font-weight: 700;
}

.teacher-assessment-copy {
  margin: 4px 0 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.teacher-assessment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.teacher-dashboard-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.teacher-dashboard-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 140px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
}

.teacher-dashboard-stat-label {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.teacher-dashboard-stat-value {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--heading);
  line-height: 1;
}

.teacher-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 16px;
}

.teacher-class-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.teacher-class-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.teacher-class-list-item,
.teacher-assessment-list-item {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
}

.teacher-class-list-main {
  min-width: 0;
  flex: 1 1 320px;
}

.teacher-class-list-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.teacher-class-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
}

.teacher-class-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.teacher-class-name {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--heading);
}

.teacher-class-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.84rem;
  color: var(--muted);
}

.teacher-class-actions {
  display: flex;
  justify-content: flex-start;
}

.teacher-dashboard-assessment-card {
  padding: 14px;
}

.teacher-dashboard-tools .workspace-actions {
  justify-content: flex-start;
}

.teacher-assessment-filters {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-content: flex-start;
  gap: 10px;
}

.teacher-assessment-filter {
  width: 100%;
  min-width: 0;
}

.teacher-assessment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.teacher-assessment-row-main {
  min-width: 0;
}

.teacher-assessment-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 8px;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--muted);
}

.teacher-assessment-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.teacher-login-shell {
  min-height: calc(100vh - 160px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 14px;
}

.teacher-login-card {
  width: min(100%, 430px);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  padding: 24px 24px 22px;
}

.teacher-login-brand {
  margin-bottom: 16px;
}

.teacher-login-brand .workspace-overline {
  margin-bottom: 8px;
}

.teacher-login-brand .workspace-title {
  font-size: 1.7rem;
  margin-bottom: 8px;
}

.teacher-login-brand .workspace-subtitle {
  margin: 0;
}

.teacher-login-card form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.teacher-login-card .qla-field {
  gap: 6px;
}

.teacher-login-card .qla-btn {
  width: 100%;
  justify-content: center;
}

.teacher-marksheet-page .workspace-title {
  font-size: 1.55rem;
}

.teacher-marksheet-page {
  gap: 12px;
}

.teacher-marksheet-page .workspace-card,
.teacher-marksheet-page .workspace-table-shell,
.teacher-marksheet-page .workspace-chip,
.teacher-marksheet-page .qla-btn {
  border-radius: var(--ui-radius);
}

.teacher-marksheet-topbar-shell {
  padding-top: 10px;
  padding-bottom: 10px;
}

.teacher-marksheet-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.teacher-marksheet-topbar .workspace-title,
.teacher-marksheet-topbar .workspace-subject-title {
  margin: 0;
}

.teacher-marksheet-workbar {
  overflow: visible;
}

.teacher-marksheet-workbar-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px 16px;
}

.teacher-marksheet-toolbar-group,
.teacher-marksheet-upload-form {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
}

.teacher-marksheet-style-form {
  min-width: 0;
}

.teacher-marksheet-toolbar-actions {
  justify-content: flex-start;
  min-width: 0;
}

.teacher-marksheet-toolbar-complete {
  justify-content: flex-end;
}

.teacher-marksheet-toolbar-label {
  color: var(--heading);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.teacher-marksheet-style-select {
  width: 16rem;
  min-width: 16rem;
  max-width: 16rem;
}

.teacher-marksheet-file-input {
  width: 14rem;
  max-width: 14rem;
  font-size: 0.82rem;
}

.teacher-marksheet-save-status {
  color: var(--muted);
  font-size: 0.76rem;
  min-width: 4rem;
  text-align: right;
}

.teacher-marksheet-panel {
  padding-top: 10px;
}

.teacher-marksheet-panel .workspace-panel-heading {
  margin-bottom: 8px;
}

.teacher-marksheet-class-label {
  margin: 3px 0 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.3;
  font-weight: 600;
}

.teacher-marksheet-exam-label {
  margin: 0;
  color: var(--heading);
  font-size: 0.98rem;
  line-height: 1.35;
  font-weight: 600;
}

.teacher-panel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.78fr);
  gap: 14px;
  align-items: start;
}

.teacher-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.teacher-stat-grid .qla-stat-card {
  min-height: 0;
}

.teacher-list-table td,
.teacher-list-table th {
  vertical-align: middle;
}

.qla-btn-sm {
  min-height: 30px;
  padding: 6px 10px;
  font-size: 0.78rem;
}

@media (max-width: 1100px) {
  .teacher-dashboard-grid,
  .teacher-class-grid,
  .teacher-task-grid,
  .teacher-panel-grid,
  .teacher-stat-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .teacher-assessment-filters {
    grid-template-columns: 1fr;
  }

  .teacher-assessment-row {
    grid-template-columns: 1fr;
  }

  .teacher-assessment-row-actions {
    justify-content: flex-start;
  }

  .teacher-marksheet-topbar,
  .teacher-marksheet-toolbar-complete {
    justify-content: flex-start;
  }

  .teacher-marksheet-toolbar-complete {
    margin-left: 0;
  }

  .teacher-marksheet-style-form,
  .teacher-marksheet-toolbar-actions,
  .teacher-marksheet-upload-form,
  .teacher-marksheet-toolbar-complete {
    flex: 1 1 100%;
    flex-wrap: wrap;
  }

  .teacher-marksheet-style-select,
  .teacher-marksheet-file-input {
    max-width: 100%;
    width: 100%;
  }

  .teacher-marksheet-save-status {
    min-width: 0;
    text-align: left;
  }
}
