:root {
  --ui-primary: var(--brand-primary, #2563eb);
  --ui-primary-rgb: var(--brand-primary-rgb, 37, 99, 235);
  --ui-accent: var(--brand-accent, #7dd3fc);
  --ui-accent-rgb: var(--brand-accent-rgb, 125, 211, 252);
  --ui-ink: var(--brand-ink, #172554);
  --ui-muted: #64748b;
  --ui-border: rgba(15, 23, 42, .1);
  --ui-surface: #ffffff;
  --ui-soft: #eef7ff;
  --ui-soft-strong: #dff2ff;
  --ui-caution: #475569;
  --ui-caution-bg: #f8fafc;
}

body {
  color: #1f2937;
  background: #f4f8fb;
}

h1,
h2,
h3,
h4,
h5,
h6,
.app-brand,
.sidebar-section-title,
.fw-semibold {
  letter-spacing: 0;
}

.app-shell {
  background: #f4f8fb;
}

.app-sidebar {
  width: 224px;
  padding: 1rem .7rem !important;
  background:
    linear-gradient(180deg, rgba(8, 18, 46, .14), rgba(8, 18, 46, 0) 42%),
    var(--sidebar-bg);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, .07), .7rem 0 1.8rem rgba(15, 23, 42, .08);
}

.app-sidebar-header {
  min-height: 46px;
  margin-bottom: 1rem !important;
  padding: 0 .15rem;
}

.app-brand {
  min-width: 0;
  gap: .55rem;
  font-size: .85rem;
  line-height: 1.15;
}

.app-brand span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-brand-chip {
  width: 34px;
  height: 34px;
  border-radius: .5rem;
  padding: .24rem;
  box-shadow: 0 .4rem .9rem rgba(0, 0, 0, .16);
}

.sidebar-section-toggle {
  min-height: 28px;
  padding: .35rem .55rem;
  color: rgba(255, 255, 255, .62);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .04em;
}

.sidebar-section-toggle:hover {
  color: #fff;
}

.sidebar-section-toggle .bi-chevron-down {
  font-size: .72rem;
}

.sidebar-link {
  min-height: 34px;
  gap: .55rem;
  padding: .46rem .58rem;
  border-radius: .45rem;
  color: rgba(255, 255, 255, .82);
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.15;
}

.sidebar-link .bi {
  width: 1rem;
  color: rgba(255, 255, 255, .76);
  font-size: .94rem;
  text-align: center;
}

.sidebar-link:hover,
.sidebar-link:focus,
.sidebar-link.active {
  color: #fff;
  background: rgba(255, 255, 255, .11);
  box-shadow: inset 3px 0 0 rgba(var(--ui-accent-rgb), .92);
}

.sidebar-link:hover .bi,
.sidebar-link:focus .bi,
.sidebar-link.active .bi {
  color: #fff;
}

.app-sidebar .mb-3 {
  margin-bottom: .72rem !important;
}

.app-topbar {
  min-height: 54px;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid rgba(15, 23, 42, .08);
  box-shadow: 0 .35rem 1rem rgba(15, 23, 42, .03);
}

.app-content {
  max-width: 1380px;
  padding: 1.15rem 1.35rem 1.75rem;
}

.card,
.subject-panel,
.exam-sidebar,
.exam-topbar,
.exam-question-card {
  border-radius: .5rem;
  border: 1px solid rgba(15, 23, 42, .08) !important;
  box-shadow: 0 .55rem 1.35rem rgba(15, 23, 42, .06) !important;
}

.card {
  background: rgba(255, 255, 255, .96);
}

.card-body {
  padding: 1rem;
}

.btn {
  border-radius: .45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .42rem;
  font-weight: 700;
}

.btn-sm {
  border-radius: .38rem;
}

.btn-primary {
  background-color: var(--ui-primary);
  border-color: var(--ui-primary);
  color: #fff;
  box-shadow: 0 .35rem .75rem rgba(var(--ui-primary-rgb), .14);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
  filter: none;
}

.btn-outline-primary {
  color: var(--ui-primary);
  border-color: rgba(var(--ui-primary-rgb), .34);
  background: rgba(var(--ui-primary-rgb), .03);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  color: #fff;
  background: var(--ui-primary);
  border-color: var(--ui-primary);
}

.btn-success,
.btn-outline-success,
.btn-danger,
.btn-outline-danger,
.btn-warning,
.btn-outline-warning {
  box-shadow: none;
}

.btn-success,
.btn-outline-success {
  color: #075985;
  border-color: #bae6fd;
  background: #f0f9ff;
}

.btn-success:hover,
.btn-success:focus,
.btn-outline-success:hover,
.btn-outline-success:focus {
  color: #0f172a;
  border-color: #7dd3fc;
  background: #e0f2fe;
}

.btn-danger,
.btn-outline-danger {
  color: #475569;
  border-color: #cbd5e1;
  background: #f8fafc;
}

.btn-danger:hover,
.btn-danger:focus,
.btn-outline-danger:hover,
.btn-outline-danger:focus {
  color: #0f172a;
  border-color: #94a3b8;
  background: #e2e8f0;
}

.btn-warning,
.btn-outline-warning {
  color: #475569;
  border-color: #cbd5e1;
  background: #f8fafc;
}

.btn-warning:hover,
.btn-warning:focus,
.btn-outline-warning:hover,
.btn-outline-warning:focus {
  color: #0f172a;
  border-color: #94a3b8;
  background: #e2e8f0;
}

.btn:disabled,
.btn.disabled {
  color: #94a3b8;
  border-color: #dbe3ec;
  background: #f8fafc;
  opacity: 1;
}

.page-actions {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  flex-wrap: wrap;
}

.icon-action {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(37, 99, 235, .18);
  border-radius: .5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 .35rem .8rem rgba(15, 23, 42, .05);
  text-decoration: none;
  transition: background-color .14s ease, border-color .14s ease, color .14s ease, box-shadow .14s ease;
}

.icon-action:hover,
.icon-action:focus {
  color: #172554;
  border-color: #7dd3fc;
  background: #e0f2fe;
  box-shadow: 0 .55rem 1rem rgba(37, 99, 235, .08);
  outline: 0;
}

.icon-action.is-primary {
  color: #fff;
  border-color: var(--ui-primary);
  background: var(--ui-primary);
}

.icon-action.is-primary:hover,
.icon-action.is-primary:focus {
  color: #fff;
  border-color: #1d4ed8;
  background: #1d4ed8;
}

.icon-action:disabled,
.icon-action.disabled {
  color: #94a3b8;
  border-color: #dbe3ec;
  background: #f8fafc;
  box-shadow: none;
  cursor: not-allowed;
}

.icon-action-sm {
  width: 32px;
  height: 32px;
  border-radius: .42rem;
  box-shadow: none;
}

.table-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: .35rem;
}

tr[data-row-href] {
  cursor: pointer;
}

tr[data-row-href]:hover > * {
  background-color: rgba(var(--ui-primary-rgb), .045) !important;
}

tr[data-row-href]:focus-visible {
  outline: 2px solid rgba(var(--ui-primary-rgb), .34);
  outline-offset: -2px;
}

.form-control,
.form-select,
.select2-container--default .select2-selection--single {
  border-color: rgba(15, 23, 42, .12);
  border-radius: .45rem;
}

.select2-container {
  width: 100% !important;
}

.w-auto + .select2-container {
  width: auto !important;
  min-width: 9rem;
}

.select2-container--default .select2-selection--single {
  min-height: 40px;
  display: flex;
  align-items: center;
  background: #fff;
  box-shadow: inset 0 1px 1px rgba(15, 23, 42, .025);
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  width: 100%;
  padding-left: .75rem;
  padding-right: 2.2rem;
  color: #1f2937;
  line-height: 38px;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: #8a94a6;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 38px;
  right: .45rem;
}

.form-control-sm + .select2-container .select2-selection--single,
.form-select-sm + .select2-container .select2-selection--single {
  min-height: 34px;
}

.form-control-sm + .select2-container .select2-selection--single .select2-selection__rendered,
.form-select-sm + .select2-container .select2-selection--single .select2-selection__rendered {
  line-height: 32px;
  font-size: .875rem;
}

.form-control-sm + .select2-container .select2-selection--single .select2-selection__arrow,
.form-select-sm + .select2-container .select2-selection--single .select2-selection__arrow {
  height: 32px;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
  border-color: rgba(var(--ui-primary-rgb), .48);
  box-shadow: 0 0 0 .18rem rgba(var(--ui-primary-rgb), .12);
}

.select2-dropdown {
  border-color: rgba(15, 23, 42, .14);
  border-radius: .45rem;
  box-shadow: 0 .8rem 1.6rem rgba(15, 23, 42, .12);
  overflow: hidden;
}

.select2-search--dropdown {
  padding: .55rem;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
  min-height: 36px;
  border-color: rgba(15, 23, 42, .14);
  border-radius: .4rem;
  outline: 0;
}

.select2-results__option {
  padding: .55rem .75rem;
  font-size: .9rem;
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
  color: #0f172a;
  background: #dff2ff;
}

.select2-container--default .select2-results__option--selected {
  background: rgba(var(--ui-primary-rgb), .08);
  color: #172033;
}

.form-label {
  margin-bottom: .35rem;
  color: #485568;
  font-size: .83rem;
  font-weight: 800;
}

.card form .mb-3 {
  margin-bottom: .9rem !important;
}

.form-control,
.form-select {
  min-height: 40px;
  background-color: #fff;
  box-shadow: inset 0 1px 1px rgba(15, 23, 42, .025);
}

textarea.form-control {
  min-height: 92px;
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(var(--ui-primary-rgb), .48);
  box-shadow: 0 0 0 .18rem rgba(var(--ui-primary-rgb), .12);
}

.form-control.is-invalid,
.was-validated .form-control:invalid,
.form-select.is-invalid,
.was-validated .form-select:invalid {
  border-color: #94a3b8;
  background-image: none;
  box-shadow: 0 0 0 .16rem rgba(37, 99, 235, .08);
}

.invalid-feedback,
.text-danger {
  color: var(--ui-caution) !important;
}

.badge {
  border-radius: 999px;
  font-weight: 800;
}

.text-bg-success,
.text-bg-danger,
.text-bg-warning,
.text-bg-secondary {
  color: #334155 !important;
  background-color: #eef2f7 !important;
}

.text-bg-success {
  color: #075985 !important;
  background-color: #e0f2fe !important;
}

.text-bg-danger {
  color: #475569 !important;
  background-color: #f1f5f9 !important;
}

.text-bg-warning {
  color: #475569 !important;
  background-color: #f1f5f9 !important;
}

.table {
  color: #293241;
}

.table > :not(caption) > * > * {
  padding: .78rem .9rem;
  border-bottom-color: rgba(15, 23, 42, .08);
}

.table thead th {
  color: #596579;
  background: #f7f9fc;
  font-size: .74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.table-striped > tbody > tr:nth-of-type(odd) > * {
  --bs-table-accent-bg: rgba(15, 23, 42, .018);
}

.alert {
  border-radius: .5rem;
}

.alert-danger,
.alert-warning {
  color: #475569;
  background: #f8fafc;
}

.alert-success,
.alert-info {
  color: #075985;
  background: #e0f2fe;
}

.alert-danger,
.alert-warning,
.alert-success,
.alert-info {
  border: 1px solid rgba(15, 23, 42, .08);
}

.text-success {
  color: #075985 !important;
}

.border-danger,
.border-success {
  border-color: rgba(15, 23, 42, .14) !important;
}

.result-error-mark {
  color: #b91c1c !important;
  font-weight: 800;
  text-decoration-line: underline;
  text-decoration-color: #dc2626;
  text-decoration-thickness: 2px;
  text-underline-offset: .18em;
}

.result-success-mark {
  color: #15803d !important;
  font-weight: 800;
  text-decoration-line: underline;
  text-decoration-color: #16a34a;
  text-decoration-thickness: 2px;
  text-underline-offset: .18em;
}

.result-question-toggle {
  gap: .25rem;
  color: #475569;
  font-weight: 800;
}

.result-question-toggle.is-correct {
  color: #15803d;
}

.result-question-toggle.is-correct .result-status {
  text-decoration-line: underline;
  text-decoration-color: #16a34a;
  text-decoration-thickness: 2px;
  text-underline-offset: .18em;
}

.result-question-toggle.is-wrong {
  color: #b91c1c;
}

.result-question-toggle.is-wrong .result-status {
  text-decoration-line: underline;
  text-decoration-color: #dc2626;
  text-decoration-thickness: 2px;
  text-underline-offset: .18em;
}

.result-question-toggle.is-blank {
  color: #64748b;
}

.mobile-menu-btn,
.sidebar-toggle-btn,
.profile-toggle {
  border-radius: .45rem;
}

.sidebar-toggle-btn.sidebar-toggle-inside {
  width: 32px;
  height: 32px;
  padding: 0;
  flex: 0 0 auto;
}

.topbar-avatar {
  width: 30px;
  height: 30px;
  border-color: rgba(15, 23, 42, .1);
}

.profile-toggle {
  min-height: 38px;
  padding: .2rem .45rem .2rem .25rem;
  background: #fff;
  box-shadow: 0 .3rem .8rem rgba(15, 23, 42, .04);
}

.offcanvas.app-sidebar-mobile {
  width: min(284px, 88vw);
  background:
    linear-gradient(180deg, rgba(8, 18, 46, .14), rgba(8, 18, 46, 0) 42%),
    var(--sidebar-bg);
}

.offcanvas.app-sidebar-mobile .offcanvas-header {
  padding: 1rem;
}

.offcanvas.app-sidebar-mobile .offcanvas-body {
  padding: .2rem .75rem 1rem;
}

.question-pagination-bar {
  border-radius: .45rem;
  border-color: rgba(15, 23, 42, .1);
}

.question-pagination-summary {
  background: #f8fafc;
  border-right-color: rgba(15, 23, 42, .08);
  color: #64748b;
}

.question-pagination-nav .page-link {
  color: #334155;
}

.question-pagination-nav .page-item.active .page-link {
  background: var(--brand-primary);
}

.dashboard-shell {
  display: grid;
  gap: 1rem;
}

.dashboard-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.dashboard-kicker {
  margin-bottom: .35rem;
  color: var(--brand-primary);
  font-size: .78rem;
  font-weight: 800;
}

.dashboard-title {
  margin: 0;
  color: #172033;
  font-size: 1.45rem;
}

.dashboard-subtitle {
  margin: .25rem 0 0;
  color: #667085;
  font-size: .9rem;
}

.metric-card {
  height: 100%;
  transition: transform .16s ease, box-shadow .16s ease;
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 .75rem 1.8rem rgba(15, 23, 42, .08) !important;
}

.metric-card .card-body {
  display: flex;
  align-items: center;
  gap: .9rem;
  min-height: 92px;
  padding: .95rem;
}

.metric-icon {
  width: 44px;
  height: 44px;
  border-radius: .5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: var(--metric-color, var(--brand-primary));
  background: #eef4ff;
  background: color-mix(in srgb, var(--metric-color, var(--brand-primary)) 14%, #fff);
  font-size: 1.35rem;
}

.metric-label {
  margin-bottom: .12rem;
  color: #526070;
  font-size: .76rem;
  font-weight: 800;
}

.metric-value {
  color: #111827;
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1;
}

.metric-help {
  margin-top: .18rem;
  color: #8a94a6;
  font-size: .72rem;
  font-weight: 700;
}

.dashboard-metrics > .col:nth-child(1) .metric-card {
  --metric-color: #2563eb;
}

.dashboard-metrics > .col:nth-child(2) .metric-card {
  --metric-color: #1d4ed8;
}

.dashboard-metrics > .col:nth-child(3) .metric-card {
  --metric-color: #0284c7;
}

.dashboard-metrics > .col:nth-child(4) .metric-card {
  --metric-color: #64748b;
}

.dashboard-metrics > .col:nth-child(5) .metric-card {
  --metric-color: #0ea5e9;
}

.dashboard-metrics > .col:nth-child(6) .metric-card {
  --metric-color: #0369a1;
}

.dashboard-metrics > .col:nth-child(7) .metric-card {
  --metric-color: #334155;
}

.dashboard-panel {
  min-height: 100%;
}

.dashboard-panel-title {
  margin: 0;
  color: #172033;
  font-size: .9rem;
  font-weight: 800;
}

.dashboard-panel-subtitle {
  margin: .2rem 0 0;
  color: #8a94a6;
  font-size: .78rem;
}

.dashboard-mini-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .7rem 0;
  border-bottom: 1px solid rgba(15, 23, 42, .08);
}

.dashboard-mini-row:last-child {
  border-bottom: 0;
}

.dashboard-mini-label {
  color: #475569;
  font-size: .84rem;
  font-weight: 700;
}

.dashboard-mini-value {
  color: #111827;
  font-weight: 800;
}

.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.page-kicker {
  margin-bottom: .28rem;
  color: var(--brand-primary);
  font-size: .76rem;
  font-weight: 800;
}

.page-title {
  margin: 0;
  color: #172033;
  font-size: 1.35rem;
}

.page-subtitle {
  max-width: 760px;
  margin: .3rem 0 0;
  color: #667085;
  font-size: .9rem;
}

.section-filter {
  margin-bottom: 1.15rem;
  padding: 1rem;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: .5rem;
  background: #f8fafc;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin-top: 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem 1rem;
}

.form-grid .form-field {
  margin-bottom: 0 !important;
}

.form-grid .form-field.is-wide,
.form-grid .form-field-check,
.form-grid .form-actions {
  grid-column: 1 / -1;
}

.form-field-check {
  display: flex;
  align-items: center;
  min-height: 40px;
}

.empty-state {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: 1rem;
  border: 1px dashed rgba(15, 23, 42, .18);
  border-radius: .5rem;
  background: #f8fafc;
}

.empty-state .bi {
  color: var(--brand-primary);
  font-size: 1.3rem;
}

.question-editor .card-body {
  padding: 1.25rem;
}

.question-editor textarea.form-control {
  min-height: 180px;
}

.math-content {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.math-content mjx-container {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

.math-preview {
  min-height: 42px;
  border: 1px solid rgba(15, 23, 42, .12);
  border-radius: .5rem;
  background: #f8fafc;
  padding: .65rem .75rem;
}

.math-preview.is-empty {
  color: #64748b;
}

.math-preview-compact {
  min-height: 36px;
  padding: .5rem .6rem;
  font-size: .92rem;
}

.question-form-grid > .col-md-3,
.question-form-grid > .col-md-6,
.question-form-grid > .col-12 {
  min-width: 0;
}

.assignment-page .card-body {
  padding: 1.2rem;
}

.assignment-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
}

.assignment-column {
  min-width: 0;
}

.assignment-column-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .6rem;
}

.assignment-column-title {
  margin: 0;
  color: #172033;
  font-size: .95rem;
}

.assignment-column-subtitle {
  margin-top: .18rem;
  color: #7b8495;
  font-size: .78rem;
}

.assignment-count-group {
  display: inline-flex;
  gap: .35rem;
}

.assignment-count {
  min-width: 2rem;
  height: 1.65rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 .55rem;
  color: #344054;
  background: #eef2f7;
  font-size: .76rem;
  font-weight: 800;
}

.assignment-count.is-new {
  color: var(--brand-primary);
  background: rgba(var(--brand-primary-rgb), .12);
}

.assignment-count.is-remove {
  color: #991b1b;
  background: #fee2e2;
}

.assignment-list {
  position: relative;
  height: min(58vh, 560px);
  min-height: 360px;
  overflow: auto;
  padding: .55rem;
  border: 1px solid rgba(15, 23, 42, .1);
  border-radius: .5rem;
  background: #fff;
}

.assignment-list.is-disabled {
  opacity: .68;
}

.assignment-list.is-empty::before {
  content: attr(data-empty);
  position: absolute;
  inset: .55rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  color: #8a94a6;
  text-align: center;
  font-size: .88rem;
}

.assignment-item {
  width: 100%;
  display: block;
  margin: 0 0 .5rem;
  padding: .7rem .75rem;
  border: 1px solid rgba(15, 23, 42, .09);
  border-radius: .45rem;
  color: #263241;
  background: #fff;
  text-align: left;
  transition: border-color .14s ease, background-color .14s ease, box-shadow .14s ease;
}

.assignment-item:last-child {
  margin-bottom: 0;
}

.assignment-item:hover,
.assignment-item:focus {
  border-color: rgba(var(--brand-primary-rgb), .36);
  background: #fbfcff;
  box-shadow: 0 .35rem .9rem rgba(15, 23, 42, .05);
  outline: 0;
}

.assignment-item.is-selected {
  border-color: rgba(var(--brand-primary-rgb), .56);
  background: rgba(var(--brand-primary-rgb), .08);
  box-shadow: inset 3px 0 0 var(--brand-primary);
}

.assignment-item.is-existing {
  background: #f8fafc;
}

.assignment-item.is-removing {
  border-color: rgba(220, 38, 38, .32);
  background: #fff8f8;
}

.assignment-item-top {
  display: flex;
  align-items: center;
  gap: .45rem;
  flex-wrap: wrap;
  margin-bottom: .35rem;
}

.assignment-item-top:last-child {
  margin-bottom: 0;
}

.assignment-id {
  color: #111827;
  font-size: .8rem;
  font-weight: 900;
}

.assignment-pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.25rem;
  border-radius: 999px;
  padding: .1rem .45rem;
  color: #475569;
  background: #eef2f7;
  font-size: .68rem;
  font-weight: 800;
}

.assignment-pill.is-assigned {
  color: #075985;
  background: #e0f2fe;
}

.assignment-pill.is-new {
  color: var(--brand-primary);
  background: rgba(var(--brand-primary-rgb), .12);
}

.assignment-pill.is-remove {
  color: #991b1b;
  background: #fee2e2;
}

.assignment-pill.is-muted {
  color: #8a4b13;
  background: #fff3cd;
}

.assignment-text {
  display: block;
  color: #475467;
  font-size: .84rem;
  line-height: 1.35;
}

.assignment-actions {
  display: grid;
  align-content: center;
  gap: .55rem;
}

.assignment-actions .btn,
.assignment-actions .icon-action {
  width: 44px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.import-preview-header .card-body {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.import-summary {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .45rem;
  flex-wrap: wrap;
}

.import-summary-badge {
  min-height: 1.7rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: .32rem;
  padding: .25rem .6rem;
  color: #475569;
  background: #eef2f7;
  font-size: .75rem;
  font-weight: 800;
}

.import-summary-badge strong {
  color: #172033;
}

.import-summary-badge.is-success {
  color: #075985;
  background: #e0f2fe;
}

.import-summary-badge.is-danger {
  color: #475569;
  background: #f1f5f9;
}

.import-summary-badge.is-warning {
  color: #475569;
  background: #eef2f7;
}

.import-preview-toolbar .card-body {
  padding: .85rem 1rem;
}

.import-toolbar-field {
  width: min(100%, 280px);
}

.import-preview-card {
  overflow: hidden;
}

.import-preview-scroll {
  max-height: calc(100vh - 250px);
  min-height: 420px;
  overflow: auto;
}

.import-preview-table {
  min-width: 2380px;
  table-layout: fixed;
}

.import-preview-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f7f9fc;
}

.import-preview-table tbody tr {
  background: #fff;
}

.import-preview-table tbody tr.has-errors > * {
  --bs-table-accent-bg: #fff8f8;
  background: #fff8f8;
}

.import-preview-table tbody tr.is-omitted > * {
  --bs-table-accent-bg: #f8fafc;
  background: #f8fafc;
  opacity: .72;
}

.import-preview-table .col-row {
  width: 72px;
}

.import-preview-table .col-catalog {
  width: 140px;
}

.import-preview-table .col-question {
  width: 360px;
}

.import-preview-table .col-explanation {
  width: 300px;
}

.import-preview-table .col-small {
  width: 95px;
}

.import-preview-table .col-tiny {
  width: 74px;
}

.import-preview-table .col-option {
  width: 210px;
}

.import-preview-table .col-status {
  width: 260px;
}

.import-preview-table .col-omit {
  width: 84px;
}

.import-preview-table textarea.form-control {
  min-height: 94px;
  resize: vertical;
}

.import-preview-table .form-control-sm {
  font-size: .86rem;
}

.row-number-chip {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #172033;
  background: #eef2f7;
  font-weight: 900;
}

.status-pill {
  min-height: 1.55rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  padding: .2rem .55rem;
  font-size: .74rem;
  font-weight: 900;
}

.status-pill.is-success {
  color: #075985;
  background: #e0f2fe;
}

.status-pill.is-warning {
  color: #475569;
  background: #eef2f7;
}

.import-error-box {
  border: 1px solid #cbd5e1;
  border-radius: .45rem;
  padding: .55rem .65rem;
  color: #475569;
  background: #f8fafc;
  font-size: .8rem;
  line-height: 1.32;
}

@media (max-width: 991.98px) {
  .app-content {
    padding: 1rem;
  }

  .dashboard-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-heading {
    flex-direction: column;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .assignment-board {
    grid-template-columns: 1fr;
  }

  .assignment-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-content: stretch;
  }

  .assignment-actions .btn,
  .assignment-actions .icon-action {
    width: 100%;
  }

  .assignment-list {
    height: auto;
    max-height: 420px;
  }

  .import-preview-header .card-body {
    flex-direction: column;
  }

  .import-summary {
    justify-content: flex-start;
  }
}

@media (max-width: 575.98px) {
  .app-content {
    padding: .85rem;
  }

  .metric-card .card-body {
    min-height: 86px;
    gap: .7rem;
  }

  .metric-icon {
    width: 38px;
    height: 38px;
    font-size: 1.12rem;
  }

  .metric-value {
    font-size: 1.45rem;
  }
}
