:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --panel-2: #eef3f8;
  --text: #172033;
  --muted: #667085;
  --line: #d9e0ea;
  --brand: #126a7c;
  --brand-strong: #0f5362;
  --danger: #b42318;
  --warn: #9a5b00;
  --ok: #087443;
  --shadow: 0 8px 22px rgba(23, 32, 51, 0.08);
}

* {
  box-sizing: border-box;
}

/* Shared form toggles use the same class in legacy and spring mode views. */
.workbench-intake-form .hidden {
  display: none !important;
}

/* School media library */
.school-media-section {
  overflow: hidden;
}

.school-media-library {
  position: relative;
  min-width: 0;
  border-top: 1px solid #eef1f5;
  background: #fff;
}

.school-media-toolbar {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(180px, 360px) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #e4e7ec;
  background: #fbfcfe;
  padding: 9px 12px;
}

.school-media-type-switch {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border: 1px solid #e1e6ef;
  border-radius: 9px;
  background: #fff;
  padding: 3px;
}

.school-media-type-switch button,
.school-media-toolbar-actions button,
.school-media-selection-bar button,
.school-media-pagination button {
  min-height: 32px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-color: transparent;
  background: transparent;
  color: #475467;
  padding: 0 9px;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.school-media-type-switch button:hover,
.school-media-type-switch button.is-active {
  background: #f0f5ff;
  color: #1849a9;
}

.school-media-type-switch button.is-active {
  box-shadow: inset 0 0 0 1px #c9d9f6;
}

.school-media-type-switch .school-color-icon,
.school-media-toolbar-actions .school-color-icon,
.school-media-categories .school-color-icon {
  width: 23px;
  height: 23px;
  border-radius: 6px;
}

.school-media-search {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #d5dbe6;
  border-radius: 8px;
  background: #fff;
  color: #667085;
  padding: 0 9px;
}

.school-media-search:focus-within {
  border-color: #84adf4;
  box-shadow: 0 0 0 3px rgba(23, 92, 211, 0.1);
}

.school-media-search input {
  min-width: 0;
  min-height: 34px !important;
  border: 0 !important;
  background: transparent;
  box-shadow: none !important;
  padding: 0;
  font-size: 12px;
}

.school-media-toolbar-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.school-media-toolbar-actions button {
  border-color: #d5def0;
  background: #fff;
}

.school-media-toolbar-actions button.primary {
  border-color: #175cd3;
  background: #175cd3;
  color: #fff;
  box-shadow: 0 3px 8px rgba(23, 92, 211, 0.16);
}

.school-media-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #fecdd6;
  background: #fff6f7;
  color: #9f1239;
  padding: 8px 12px;
  font-size: 11px;
}

.school-media-alert .school-color-icon {
  width: 25px;
  height: 25px;
}

.school-media-alert span:nth-child(2) {
  flex: 1;
}

.school-media-alert button {
  min-height: 30px !important;
  border-color: #fda4af;
  background: #fff;
  color: #be123c;
}

.school-media-workspace {
  min-width: 0;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  min-height: 430px;
}

.school-media-categories {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  border-right: 1px solid #e4e7ec;
  background: #fbfcfe;
  padding: 10px 8px;
}

.school-media-categories header {
  display: grid;
  gap: 2px;
  padding: 2px 7px 8px;
}

.school-media-categories header span {
  color: #344054;
  font-size: 11px;
  font-weight: 800;
}

.school-media-categories header small {
  color: #98a2b3;
  font-size: 9px;
}

.school-media-categories button {
  min-width: 0;
  min-height: 35px !important;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  border-color: transparent;
  background: transparent;
  color: #475467;
  padding: 3px 7px;
  text-align: left;
}

.school-media-categories button:hover {
  background: #f1f5fb;
}

.school-media-categories button.is-active {
  border-color: #c8d8f5;
  background: #edf4ff;
  color: #1849a9;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}

.school-media-categories button > span:nth-child(2) {
  min-width: 0;
  overflow: hidden;
  font-size: 11px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.school-media-categories button strong {
  min-width: 23px;
  border-radius: 999px;
  background: #eef1f5;
  color: #667085;
  padding: 2px 6px;
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.school-media-categories button.is-active strong {
  background: #d7e6ff;
  color: #1849a9;
}

.school-media-results {
  position: relative;
  min-width: 0;
  background: #fff;
}

.school-media-selection-bar {
  min-width: 0;
  min-height: 45px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  border-bottom: 1px solid #eef1f5;
  background: #fff;
  padding: 6px 10px;
}

.school-media-selection-bar.is-active {
  border-bottom-color: #c7d7f4;
  background: #f6f9ff;
}

.school-media-selection-bar > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}

.school-media-selection-bar > div:last-child {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.school-media-selection-bar strong {
  color: #667085;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.school-media-selection-bar.is-active strong {
  color: #1849a9;
}

.school-media-selection-bar button {
  border-color: #d5def0;
  background: #fff;
}

.school-media-selection-bar button.danger {
  border-color: #fecdd6;
  color: #c01048;
}

.school-media-selection-bar label {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #667085;
  font-size: 10px;
  white-space: nowrap;
}

.school-media-selection-bar select {
  min-width: 110px;
  min-height: 32px;
  border-color: #d5def0;
  background: #fff;
  font-size: 11px;
}

.school-media-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 9px;
  padding: 10px;
}

.school-media-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e2e7ef;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.school-media-card:hover {
  border-color: #b7c9ea;
  box-shadow: 0 5px 14px rgba(16, 24, 40, 0.09);
  transform: translateY(-1px);
}

.school-media-card.is-selected {
  border-color: #5087e6;
  box-shadow: 0 0 0 2px rgba(23, 92, 211, 0.14), 0 5px 14px rgba(16, 24, 40, 0.08);
}

.school-media-card-check {
  position: absolute;
  z-index: 3;
  top: 7px;
  left: 7px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.school-media-card-check input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.school-media-card-check span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.62);
  color: transparent;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.24);
  transition: background-color 150ms ease, color 150ms ease;
}

.school-media-card-check:hover span,
.school-media-card-check input:focus-visible + span {
  background: rgba(15, 23, 42, 0.82);
  color: rgba(255, 255, 255, 0.55);
}

.school-media-card-check input:checked + span {
  border-color: #175cd3;
  background: #175cd3;
  color: #fff;
}

.school-media-card-check input:focus-visible + span {
  outline: 3px solid rgba(80, 135, 230, 0.35);
  outline-offset: 2px;
}

.school-media-preview-button {
  position: relative;
  width: 100%;
  min-height: 0 !important;
  display: block;
  overflow: hidden;
  border: 0 !important;
  border-radius: 0 !important;
  aspect-ratio: 3 / 2;
  background: #eef2f7;
  padding: 0;
}

.school-media-preview-button img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 220ms ease;
}

.school-media-card:hover .school-media-preview-button img {
  transform: scale(1.025);
}

.school-media-video-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  place-items: center;
  background:
    radial-gradient(circle at 25% 18%, rgba(139, 92, 246, 0.24), transparent 34%),
    linear-gradient(135deg, #1e293b, #334155 60%, #1f2937);
  color: #fff;
}

.school-media-video-placeholder > .school-color-icon {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.92);
}

.school-media-video-placeholder > i {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  align-self: end;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(6px);
}

.school-media-video-placeholder > small {
  padding: 0 0 13px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 9px;
}

.school-media-type-badge {
  position: absolute;
  right: 7px;
  bottom: 7px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  padding: 3px 7px;
  font-size: 9px;
  font-weight: 800;
  backdrop-filter: blur(5px);
}

.school-media-type-badge.is-video {
  background: rgba(91, 33, 182, 0.78);
}

.school-media-card-body {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 8px 9px 9px;
}

.school-media-card-body > strong {
  min-width: 0;
  overflow: hidden;
  color: #1d2939;
  font-size: 11px;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.school-media-card-body > div,
.school-media-card-body footer {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  color: #98a2b3;
  font-size: 9px;
}

.school-media-category-tag {
  min-width: 0;
  max-width: 70%;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  overflow: hidden;
  border-radius: 999px;
  padding: 3px 6px;
  color: #475467;
  font-size: 9px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.school-media-category-tag.is-rose { background: #fff0f3; color: #c01048; }
.school-media-category-tag.is-violet { background: #f3edff; color: #6938b8; }
.school-media-category-tag.is-cyan { background: #e7f8fb; color: #0e7090; }
.school-media-category-tag.is-amber { background: #fffaeb; color: #b54708; }
.school-media-category-tag.is-teal { background: #e9f8f2; color: #087443; }
.school-media-category-tag.is-indigo { background: #eef4ff; color: #3538cd; }
.school-media-category-tag.is-green { background: #ecfdf3; color: #067647; }
.school-media-category-tag.is-orange { background: #fff4ed; color: #c2410c; }

.school-media-card-body footer {
  border-top: 1px solid #f0f2f5;
  padding-top: 6px;
}

.school-media-card-body footer > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.school-media-card-body footer a {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #175cd3;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
}

.school-media-empty {
  min-height: 300px;
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 7px;
  color: #98a2b3;
  text-align: center;
}

.school-media-empty > .school-color-icon {
  width: 50px;
  height: 50px;
  border-radius: 13px;
}

.school-media-empty strong {
  color: #344054;
  font-size: 13px;
}

.school-media-empty p {
  max-width: 420px;
  margin: 0;
  font-size: 11px;
}

.school-media-empty button {
  margin-top: 5px;
}

.school-media-pagination {
  min-height: 45px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid #eef1f5;
  padding: 6px 10px;
}

.school-media-pagination > span {
  color: #667085;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.school-media-pagination > div {
  display: flex;
  gap: 6px;
}

.school-media-pagination button {
  border-color: #d5def0;
  background: #fff;
}

.school-media-loading {
  min-height: 340px;
  display: grid;
  grid-template-columns: repeat(3, 9px);
  place-content: center;
  gap: 5px;
  color: #667085;
}

.school-media-loading span,
.school-media-refreshing span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #5087e6;
  animation: school-media-pulse 900ms infinite alternate;
}

.school-media-loading span:nth-child(2) { animation-delay: 150ms; }
.school-media-loading span:nth-child(3) { animation-delay: 300ms; }

.school-media-loading p {
  grid-column: 1 / -1;
  margin: 5px 0 0;
  font-size: 11px;
  text-align: center;
}

.school-media-refreshing {
  position: absolute;
  z-index: 5;
  top: 52px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #d5def0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #475467;
  padding: 5px 9px;
  font-size: 9px;
  box-shadow: 0 3px 10px rgba(16, 24, 40, 0.1);
}

.school-media-refreshing span {
  width: 7px;
  height: 7px;
}

@keyframes school-media-pulse {
  from { opacity: 0.35; transform: translateY(1px); }
  to { opacity: 1; transform: translateY(-1px); }
}

.modal.modal-school-media-upload,
.modal.modal-school-media-categories {
  width: min(900px, calc(100vw - 32px));
  max-height: min(820px, 88vh);
}

.modal.modal-school-media-preview {
  width: min(1120px, calc(100vw - 32px));
  max-height: min(820px, 90vh);
}

.modal-school-media-upload .modal-body,
.modal-school-media-categories .modal-body,
.modal-school-media-preview .modal-body {
  padding: 0;
}

.school-media-upload-form {
  display: grid;
  grid-template-rows: auto auto auto minmax(100px, 1fr) auto;
  max-height: calc(88vh - 54px);
}

.school-media-upload-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #eef1f5;
  background: #fbfcfe;
  padding: 11px 14px;
}

.school-media-upload-head label {
  min-width: 220px;
  display: grid;
  gap: 5px;
  color: #475467;
  font-size: 10px;
  font-weight: 750;
}

.school-media-upload-head select {
  min-height: 36px;
}

.school-media-upload-head p {
  margin: 0;
  color: #667085;
  font-size: 10px;
  line-height: 1.55;
}

.school-media-dropzone {
  position: relative;
  min-height: 138px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  border: 1.5px dashed #b9c7df;
  border-radius: 11px;
  background: #f8faff;
  margin: 13px 14px 10px;
  color: #667085;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.school-media-dropzone:hover,
.school-media-dropzone.is-dragging {
  border-color: #5087e6;
  background: #eff5ff;
}

.school-media-dropzone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.school-media-dropzone > .school-color-icon {
  width: 48px;
  height: 48px;
  border-radius: 13px;
}

.school-media-dropzone strong {
  color: #1d2939;
  font-size: 13px;
}

.school-media-dropzone span:last-child {
  font-size: 10px;
}

.school-media-upload-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 280px);
  align-items: center;
  gap: 12px;
  border-top: 1px solid #f0f2f5;
  border-bottom: 1px solid #f0f2f5;
  padding: 8px 14px;
  color: #475467;
  font-size: 10px;
}

.school-media-upload-summary progress,
.school-media-upload-item progress {
  width: 100%;
  height: 6px;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: #e8edf5;
}

.school-media-upload-summary progress::-webkit-progress-bar,
.school-media-upload-item progress::-webkit-progress-bar { background: #e8edf5; }
.school-media-upload-summary progress::-webkit-progress-value,
.school-media-upload-item progress::-webkit-progress-value { background: #175cd3; border-radius: 999px; }
.school-media-upload-summary progress::-moz-progress-bar,
.school-media-upload-item progress::-moz-progress-bar { background: #175cd3; border-radius: 999px; }

.school-media-upload-queue {
  min-height: 100px;
  overflow-y: auto;
  padding: 4px 14px 9px;
}

.school-media-upload-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 30px minmax(180px, 1fr) minmax(100px, 180px) 62px 30px;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid #f0f2f5;
  padding: 8px 2px;
}

.school-media-upload-item > .school-color-icon {
  width: 28px;
  height: 28px;
}

.school-media-upload-item > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.school-media-upload-item strong,
.school-media-upload-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.school-media-upload-item strong {
  color: #344054;
  font-size: 11px;
}

.school-media-upload-item span,
.school-media-upload-item em {
  color: #98a2b3;
  font-size: 9px;
  font-style: normal;
}

.school-media-upload-item.is-success em { color: #067647; }
.school-media-upload-item.is-failed em,
.school-media-upload-item.is-failed span { color: #c01048; }

.school-media-upload-item > button {
  min-width: 28px;
  min-height: 28px;
  display: grid;
  place-items: center;
  border-color: transparent;
  background: transparent;
  color: #667085;
  padding: 0;
}

.school-media-upload-empty,
.school-media-category-manager-empty {
  min-height: 92px;
  display: grid;
  place-items: center;
  color: #98a2b3;
  font-size: 10px;
  text-align: center;
}

.school-media-upload-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid #e4e7ec;
  background: #fbfcfe;
  padding: 10px 14px;
}

.school-media-upload-actions button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.school-media-category-manager {
  display: grid;
  grid-template-rows: auto auto minmax(120px, 1fr);
  max-height: calc(88vh - 54px);
}

.school-media-new-category {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  border-bottom: 1px solid #e4e7ec;
  background: #fbfcfe;
  padding: 12px 14px;
}

.school-media-new-category > .school-color-icon {
  width: 34px;
  height: 34px;
}

.school-media-new-category label {
  display: grid;
  gap: 4px;
  color: #475467;
  font-size: 10px;
  font-weight: 750;
}

.school-media-new-category input {
  min-height: 36px;
}

.school-media-new-category button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.school-media-category-manager-note {
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid #eef1f5;
  background: #fffcf5;
  color: #b54708;
  padding: 7px 14px;
  font-size: 9px;
}

.school-media-category-manager-list {
  overflow-y: auto;
  padding: 4px 14px 12px;
}

.school-media-category-manager-list > div:not(.school-media-category-manager-empty) {
  min-width: 0;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #f0f2f5;
  padding: 8px 2px;
}

.school-media-category-manager-list .school-color-icon {
  width: 30px;
  height: 30px;
}

.school-media-category-manager-list label {
  min-width: 0;
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.school-media-category-manager-list label span {
  color: #98a2b3;
  font-size: 9px;
}

.school-media-category-manager-list input {
  min-width: 0;
  min-height: 34px;
}

.school-media-category-manager-list button {
  min-height: 32px;
  font-size: 10px;
}

.school-media-category-manager-list button.danger {
  border-color: #fecdd6;
  background: #fff;
  color: #c01048;
}

.school-media-lightbox {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  min-height: min(680px, calc(90vh - 55px));
  background: #0f172a;
}

.school-media-lightbox-stage {
  position: relative;
  min-width: 0;
  min-height: 420px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.025) 25%, transparent 25%, transparent 75%, rgba(255, 255, 255, 0.025) 75%),
    #0f172a;
  background-size: 24px 24px;
}

.school-media-lightbox-stage img,
.school-media-lightbox-stage video {
  width: 100%;
  height: 100%;
  max-height: min(680px, calc(90vh - 55px));
  display: block;
  object-fit: contain;
}

.school-media-lightbox-nav {
  position: absolute;
  z-index: 2;
  top: 50%;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.62);
  color: #fff;
  padding: 0;
  transform: translateY(-50%);
  backdrop-filter: blur(7px);
}

.school-media-lightbox-nav.is-prev { left: 14px; }
.school-media-lightbox-nav.is-next { right: 14px; }
.school-media-lightbox-nav:disabled { opacity: 0.2; }

.school-media-lightbox-info {
  align-content: start;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  background: #fff;
  color: #344054;
  padding: 18px;
}

.school-media-lightbox-info > .school-color-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}

.school-media-lightbox-info > div span {
  color: #98a2b3;
  font-size: 9px;
}

.school-media-lightbox-info h3 {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  color: #1d2939;
  font-size: 14px;
  line-height: 1.45;
}

.school-media-lightbox-info dl {
  grid-column: 1 / -1;
  display: grid;
  gap: 0;
  margin: 8px 0 0;
}

.school-media-lightbox-info dl > div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
  border-bottom: 1px solid #f0f2f5;
  padding: 9px 0;
  font-size: 10px;
}

.school-media-lightbox-info dt { color: #98a2b3; }
.school-media-lightbox-info dd { margin: 0; color: #344054; font-weight: 700; overflow-wrap: anywhere; }

.school-media-download-link {
  grid-column: 1 / -1;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 8px;
  background: #175cd3;
  color: #fff;
  font-size: 11px;
  font-weight: 750;
  text-decoration: none;
}

.school-media-lightbox-info > small {
  grid-column: 1 / -1;
  color: #98a2b3;
  font-size: 9px;
  line-height: 1.5;
}

@media (max-width: 1100px) {
  .school-media-toolbar {
    grid-template-columns: auto minmax(180px, 1fr);
  }

  .school-media-toolbar-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .school-media-grid {
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  }
}

@media (max-width: 760px) {
  .school-media-toolbar {
    grid-template-columns: 1fr;
  }

  .school-media-type-switch,
  .school-media-search,
  .school-media-toolbar-actions {
    width: 100%;
  }

  .school-media-type-switch button {
    flex: 1;
  }

  .school-media-toolbar-actions {
    grid-column: auto;
  }

  .school-media-toolbar-actions button {
    flex: 1;
  }

  .school-media-workspace {
    grid-template-columns: 1fr;
  }

  .school-media-categories {
    overflow-x: auto;
    flex-direction: row;
    border-right: 0;
    border-bottom: 1px solid #e4e7ec;
  }

  .school-media-categories header {
    display: none;
  }

  .school-media-categories button {
    min-width: 145px;
  }

  .school-media-selection-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .school-media-selection-bar > div:last-child {
    justify-content: flex-start;
  }

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

  .school-media-lightbox {
    grid-template-columns: 1fr;
    max-height: calc(90vh - 55px);
    overflow-y: auto;
  }

  .school-media-lightbox-stage {
    min-height: 48vh;
  }

  .school-media-upload-head,
  .school-media-upload-summary {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .school-media-upload-item {
    grid-template-columns: 30px minmax(0, 1fr) 30px;
  }

  .school-media-upload-item progress,
  .school-media-upload-item em {
    grid-column: 2;
  }

  .school-media-upload-item > button {
    grid-column: 3;
    grid-row: 1;
  }

  .school-media-new-category {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .school-media-new-category button {
    grid-column: 1 / -1;
  }

  .school-media-category-manager-list > div:not(.school-media-category-manager-empty) {
    grid-template-columns: 30px minmax(0, 1fr) auto;
  }

  .school-media-category-manager-list label {
    grid-template-columns: 1fr;
  }

  .school-media-category-manager-list button.danger {
    grid-column: 3;
  }
}

@media (max-width: 480px) {
  .school-media-grid {
    gap: 7px;
    padding: 7px;
  }

  .school-media-card-body footer > span {
    display: none;
  }

  .school-media-selection-bar select {
    max-width: 130px;
  }

  .school-media-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .school-media-pagination > div button {
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .school-media-card,
  .school-media-preview-button img {
    transition: none;
  }

  .school-media-loading span,
  .school-media-refreshing span {
    animation: none;
  }
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 10000;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border-radius: 8px;
  background: #0f5362;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-140%);
  transition: transform 120ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  font-size: 14px;
}

[hidden] {
  display: none !important;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 0 12px;
  cursor: pointer;
}

button.primary {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

button.danger {
  border-color: var(--danger);
  color: var(--danger);
}

button.link-button {
  min-height: 0;
  border: 0;
  background: transparent;
  color: var(--brand-strong);
  padding: 0;
  text-align: left;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

input,
select,
textarea {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 7px 9px;
}

select[multiple],
.multi-select {
  min-height: 96px;
  padding: 6px;
}

textarea {
  min-height: 78px;
  resize: vertical;
}

label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(140deg, #f5f7fb 0%, #e4edf0 100%);
}

.login-box {
  width: min(360px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 28px;
}

.login-title {
  margin: 0 0 22px;
  font-size: 24px;
  font-weight: 700;
}

.form-stack {
  display: grid;
  gap: 14px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 54px 1fr;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  padding: 0 18px;
}

.brand {
  font-weight: 700;
  font-size: 17px;
  white-space: nowrap;
}

.tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 100%;
}

.tab {
  border: 0;
  border-radius: 0;
  background: transparent;
  height: 100%;
  padding: 0 14px;
  color: var(--muted);
}

.tab.active {
  color: var(--brand-strong);
  box-shadow: inset 0 -3px 0 var(--brand);
}

.user-area {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
}

.link-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #b7d0d7;
  border-radius: 999px;
  background: #eef7f9;
  color: var(--brand-strong);
  text-decoration: none;
  font-weight: 600;
}

.content {
  min-height: 0;
  padding: 18px;
  overflow: auto;
}

.content:has(.workbench-page) {
  overflow: hidden;
}

.content:has(.scheme-lanes) {
  overflow: visible;
}

.content:has(.scheme-group-detail-drawer) {
  padding-bottom: calc(min(486px, 86vh) + 32px);
}

.section {
  display: grid;
  gap: 14px;
}

.toolbar {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}

.toolbar label {
  min-width: 130px;
}

.toolbar .data-training-mode-multi {
  min-width: 160px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel-header {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 10px 14px;
}

.panel-title {
  font-weight: 700;
}

.panel-body {
  padding: 14px;
}

.grid {
  display: grid;
  gap: 12px;
}

.grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.span-2 {
  grid-column: span 2;
}

.settings-wide {
  grid-column: 1 / -1;
}

.template-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.template-status-item {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  min-width: 0;
}

.template-status-item span,
.template-copy-preview span {
  color: var(--muted);
  font-size: 12px;
}

.template-status-item strong,
.template-copy-preview strong {
  overflow-wrap: anywhere;
}

.template-copy-preview {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.template-copy-preview > div {
  display: grid;
  gap: 4px;
}

.template-copy-preview pre {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: inherit;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 9px 10px;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--panel-2);
  color: #344054;
  font-weight: 600;
}

.data-sort {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  text-align: left;
  cursor: pointer;
}

.data-sort:hover,
.data-sort.active {
  color: var(--brand-strong);
}

.data-sort em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 12px;
  color: var(--brand-strong);
  font-style: normal;
  font-weight: 700;
}

td.actions {
  display: flex;
  gap: 6px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 12px;
}

.commercial-metric-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.operational-metric-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin: 10px 0 14px;
}

.metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.metric.metric-ok {
  border-color: #b7e3c5;
  background: #f2fbf5;
}

.metric.metric-warn {
  border-color: #f3cf7a;
  background: #fffbeb;
}

.metric.metric-danger {
  border-color: #f3b4b4;
  background: #fff5f5;
}

.metric-value {
  font-size: 24px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.metric-label {
  color: var(--muted);
  margin-top: 4px;
}

.split {
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr);
  gap: 14px;
  min-height: 520px;
}

.list {
  display: grid;
  gap: 8px;
}

.list-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  cursor: pointer;
}

.list-item.active {
  border-color: var(--brand);
  background: #eef9fb;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  background: var(--panel-2);
  color: #344054;
  font-size: 12px;
}

.status.ok {
  background: #e8f5ee;
  color: var(--ok);
}

.status.warn {
  background: #fff4dd;
  color: var(--warn);
}

.status.danger {
  background: #fdecec;
  color: var(--danger);
}

.student-planning-status-select {
  min-width: 112px;
  padding: 6px 8px;
  font-size: 13px;
}

.student-planning-note {
  max-width: 180px;
  margin-top: 4px;
  white-space: normal;
}

.planning-status-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.scheme-student-note-item small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 400;
}

.muted {
  color: var(--muted);
}

.empty {
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(23, 32, 51, 0.38);
  padding: 20px;
}

.modal {
  width: min(1080px, 100%);
  max-height: min(860px, 92vh);
  overflow: auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 22px 60px rgba(23, 32, 51, 0.28);
}

.modal.modal-compact {
  width: min(560px, calc(100vw - 32px));
  max-height: min(580px, 72vh);
}

.modal.modal-claim-ad-editor {
  width: min(1180px, calc(100vw - 32px));
  max-height: min(900px, 92vh);
}

.modal.modal-narrow {
  width: min(460px, calc(100vw - 32px));
}

.modal-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: #fff;
  padding: 12px 14px;
}

.modal-body {
  padding: 14px;
}

.modal-compact .modal-body {
  padding: 12px;
}

.data-column-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 8px 14px;
}

.data-column-settings-note,
.data-column-settings-actions {
  grid-column: 1 / -1;
}

.data-column-settings-note {
  margin-bottom: 2px;
}

.data-column-settings label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  color: var(--text);
  font-size: 13px;
}

.data-column-settings input[type="checkbox"] {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0;
  padding: 0;
  accent-color: var(--brand);
}

.data-column-settings input[type="checkbox"]:disabled {
  opacity: 0.55;
}

.data-keyword-filter {
  min-width: 220px;
}

.data-detail-drawer {
  position: fixed;
  right: 18px;
  bottom: 0;
  left: 18px;
  z-index: 38;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: min(560px, 84vh);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #fff;
  box-shadow: 0 -12px 32px rgba(23, 32, 51, 0.16);
}

.data-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}

.data-detail-title {
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
}

.data-detail-actions {
  display: inline-flex;
  gap: 8px;
  flex: 0 0 auto;
}

.data-detail-body {
  min-height: 0;
  overflow: auto;
  padding: 12px 14px 16px;
}

.data-detail-grid,
.data-detail-all-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}

.data-detail-all-fields {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.data-detail-field {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 8px 9px;
}

.data-detail-field span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.data-detail-field strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  white-space: normal;
}

.data-detail-field-wide {
  min-height: 62px;
}

.data-detail-section {
  margin-top: 12px;
}

.data-detail-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--text);
  font-weight: 700;
}

.data-detail-section-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.data-detail-table {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.data-detail-table table {
  min-width: 1120px;
}

.data-detail-table th,
.data-detail-table td {
  white-space: normal;
  overflow-wrap: anywhere;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  max-width: 420px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #172033;
  color: #fff;
  padding: 12px 14px;
  box-shadow: var(--shadow);
}

.inline-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.workbench-page {
  height: calc(100vh - 90px);
  min-height: 560px;
  display: grid;
  grid-template-columns: 370px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.workbench-sidebar {
  min-width: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: #fbfcfe;
}

.wb-intake-panel {
  display: grid;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
  padding: 12px;
}

.wb-intake-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.wb-intake-panel-head strong {
  color: #172033;
  font-size: 14px;
}

.wb-intake-panel-head button,
.wb-intake-actions button,
.wb-intake-link-row button {
  min-height: 32px;
  padding: 5px 9px;
}

.wb-intake-panel input {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 6px 8px;
  color: #344054;
  font-size: 12px;
}

.wb-intake-url-field {
  display: grid;
  gap: 4px;
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.wb-intake-actions {
  gap: 6px;
}

.wb-intake-link-list {
  display: grid;
  gap: 6px;
  max-height: 136px;
  overflow: auto;
}

.wb-intake-link-row {
  display: grid;
  gap: 6px;
  border: 1px solid #e4eaf3;
  border-radius: 6px;
  background: #fff;
  padding: 6px;
}

.wb-intake-link-main,
.wb-intake-link-buttons {
  display: flex;
  align-items: center;
  gap: 5px;
}

.wb-intake-link-main {
  justify-content: space-between;
}

.wb-intake-link-buttons {
  flex-wrap: wrap;
}

.wb-intake-link-row span {
  min-width: 0;
  overflow: hidden;
  color: #344054;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wb-intake-link-row strong {
  color: #667085;
  font-size: 12px;
}

.wb-intake-link-url {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
}

.wb-intake-link-url b {
  color: #667085;
  font-size: 12px;
}

.wb-intake-link-url input {
  min-height: 28px;
  padding: 4px 6px;
}

.wb-intake-strip {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
  padding: 9px 16px;
}

.wb-intake-strip-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wb-intake-strip-main strong {
  flex: 0 0 auto;
  color: #172033;
  font-size: 13px;
  font-weight: 900;
}

.wb-intake-strip-main span {
  min-width: 0;
  overflow: hidden;
  color: #667085;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wb-intake-strip-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.wb-intake-strip-actions button {
  min-height: 32px;
  padding: 5px 10px;
}

.wb-intake-manager {
  display: grid;
  gap: 12px;
}

.workbench-sidebar-header {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
}

.workbench-sidebar-title {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.wb-pending-count {
  width: fit-content;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--muted);
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}

button.wb-pending-count {
  cursor: pointer;
}

.wb-pending-count.has-pending {
  border-color: rgba(217, 119, 6, 0.32);
  background: #fff7ed;
  color: #b45309;
}

.workbench-filterbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding: 10px;
}

.workbench-filterbar input,
.workbench-filterbar select {
  min-width: 0;
}

.workbench-sidebar-body {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 8px;
  overflow: auto;
  padding: 10px;
}

.wb-parent {
  width: 100%;
  min-height: 168px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  align-self: start;
}

.wb-parent:hover,
.wb-parent.active,
.wb-parent:focus-visible {
  border-left-color: #1a73e8;
  background: #e8f0fe;
}

.wb-parent:focus-visible {
  outline: 2px solid rgba(26, 115, 232, 0.28);
  outline-offset: 2px;
}

.wb-parent-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
  min-width: 0;
}

.wb-parent-status-row {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  min-height: 0;
}

.wb-parent-status-row:empty {
  display: none;
}

.wb-parent-status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  line-height: 18px;
  font-weight: 800;
  background: #f1f5f9;
  color: #475569;
}

.wb-parent-status.unread {
  background: #fee2e2;
  color: #b42318;
}

.wb-parent-status.pending {
  background: #fff7d6;
  color: #8a4b00;
}

.wb-parent-status.done {
  background: #dcfce7;
  color: #087443;
}

.wb-parent-status.idle {
  background: #f1f5f9;
  color: #475569;
}

.wb-parent-status.failed {
  background: #fef2f2;
  color: #b42318;
}

.wb-parent-title,
.wb-parent-interest {
  min-width: 0;
  overflow-wrap: anywhere;
}

.wb-parent-title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 14px;
  line-height: 19px;
}

.wb-parent-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.wb-parent-copy {
  height: 22px;
  min-height: 22px;
  padding: 0 7px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  line-height: 20px;
  font-weight: 700;
}

.wb-parent-copy:hover {
  background: #dbeafe;
}

.wb-parent-delete {
  width: 22px;
  height: 22px;
  min-height: 22px;
  padding: 0;
  flex: 0 0 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: var(--danger);
  font-weight: 700;
}

.wb-parent-delete:hover {
  background: #fee4e2;
}

.wb-parent-tags,
.wb-chat-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

.wb-parent-tags {
  max-height: none;
  overflow: visible;
}

.wb-parent-metrics {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  min-width: 0;
}

.wb-parent-metric {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 7px;
  border-radius: 999px;
  background: #eef2ff;
  color: #334155;
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
}

.wb-tag {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 22px;
  border-radius: 999px;
  background: #e6f4ea;
  color: #087443;
  padding: 2px 8px;
  font-size: 12px;
  line-height: 18px;
  overflow-wrap: anywhere;
}

.wb-parent-interest {
  display: block;
  max-height: none;
  line-height: 17px;
  overflow: visible;
  font-size: 12px;
  color: #475467;
}

.wb-parent-time {
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
}

.wb-parent-metrics {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  min-width: 0;
}

.wb-parent-metric {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 7px;
  border-radius: 999px;
  background: #eef2ff;
  color: #334155;
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
}
.wb-tag:first-child {
  background: #e8f0fe;
  color: #1a73e8;
}

.wb-tag:nth-child(3) {
  background: #fff4e5;
  color: #9a5b00;
}

.wb-radio-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 34px;
  color: var(--text);
}

.wb-radio-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: 14px;
}

.wb-recognition {
  display: grid;
  gap: 8px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fff7ed;
  padding: 10px;
}

.wb-recognition-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.wb-recognition-head strong {
  color: #9a3412;
}

.wb-recognition-overwrite {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #9a3412;
  font-size: 12px;
}

.wb-recognition-overwrite input {
  width: 14px;
  height: 14px;
  min-height: 0;
  margin: 0;
  accent-color: #ea580c;
}

.wb-recognition textarea {
  min-height: 76px;
  background: #fff;
}

.wb-recognition-actions {
  justify-content: flex-start;
}

.wb-recognition-actions button {
  min-height: 30px;
}

.wb-recognition-actions span {
  font-size: 12px;
}

.wb-parent-interest,
.wb-muted {
  color: var(--muted);
  font-size: 12px;
}

.workbench-chat {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.wb-chat-head {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
}

.wb-chat-head > div:first-child {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.wb-chat-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.wb-consult-session-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding: 8px 16px;
  background: #fff;
}

.wb-consult-session-bar select {
  min-width: 220px;
  max-width: min(420px, 48vw);
}

.wb-health {
  flex: 0 0 auto;
  border-bottom: 1px solid var(--line);
  padding: 7px 16px;
  color: var(--muted);
  font-size: 12px;
}

.wb-health-ok {
  color: var(--ok);
}

.wb-health-warn,
.wb-health-pending {
  color: var(--warn);
}

.wb-health-danger {
  color: var(--danger);
}

.wb-chat-list {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: auto;
  background: #f7f9fc;
  padding: 18px;
}

.wb-msg {
  display: flex;
}

.wb-msg.user {
  justify-content: flex-end;
}

.wb-msg.assistant {
  justify-content: flex-start;
}

.wb-bubble {
  max-width: min(680px, 76%);
  border-radius: 8px;
  padding: 10px 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.65;
}

.wb-message-time {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
}

.wb-message-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 8px;
  font-size: 12px;
}

.wb-message-actions button {
  min-height: 24px;
  padding: 0 8px;
  font-size: 12px;
}

.wb-message-status {
  color: var(--muted);
}

.wb-msg.user .wb-bubble {
  background: #1a73e8;
  color: #fff;
}

.wb-msg.assistant .wb-bubble {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
}

.wb-chat-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 12px;
}

.wb-send-actions {
  align-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wb-chat-input textarea {
  min-height: 132px;
  max-height: 360px;
  resize: vertical;
}

.wb-chat-input button {
  align-self: end;
  min-width: 78px;
}

.wb-empty {
  margin: auto;
}

.student-wizard {
  display: grid;
  gap: 16px;
}

.wizard-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.wizard-step {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  padding: 8px 10px;
}

.wizard-step.active {
  border-color: var(--brand);
  background: #eef9fb;
  color: var(--brand-strong);
}

.wizard-step.done {
  color: var(--ok);
}

.wizard-step-mark {
  display: inline-grid;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  place-items: center;
  border-radius: 999px;
  background: var(--panel-2);
  color: inherit;
  font-size: 12px;
  font-weight: 700;
}

.wizard-step.active .wizard-step-mark {
  background: var(--brand);
  color: #fff;
}

.wizard-step.done .wizard-step-mark {
  background: #e8f5ee;
}

.wizard-panel {
  min-height: 360px;
}

.choice-grid {
  display: grid;
  gap: 12px;
}

.choice-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.choice-card {
  display: grid;
  gap: 8px;
  min-height: 110px;
  align-content: center;
  justify-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 18px;
  text-align: left;
}

.choice-card strong {
  font-size: 18px;
}

.choice-card span {
  color: var(--muted);
}

.choice-card.active {
  border-color: var(--brand);
  background: #eef9fb;
  box-shadow: 0 0 0 2px rgba(18, 106, 124, 0.12);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.choice-tag {
  min-height: 30px;
  border-radius: 999px;
  background: #fff;
}

.choice-tag.active {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.certificate-list {
  display: grid;
  gap: 14px;
  max-height: 500px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.certificate-group {
  display: grid;
  gap: 8px;
}

.certificate-group-title,
.wizard-section-title {
  color: #344054;
  font-weight: 700;
}

.wizard-section-title {
  margin: 8px 0 10px;
}

.wizard-actions {
  position: sticky;
  bottom: 0;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--line);
  background: #fff;
  padding-top: 12px;
}

.predict-preview {
  display: grid;
  gap: 12px;
}

.preview-table {
  min-width: 640px;
}

.rank-lookup-status {
  grid-column: 1 / -1;
  min-height: 24px;
  align-self: center;
  font-size: 13px;
}

.upload-progress {
  display: grid;
  gap: 6px;
}

.progress-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.progress-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--panel-2);
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
  transition: width 0.18s ease;
}

.predict-result-table {
  margin-top: 10px;
}

.failure-raw {
  max-width: 360px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: #fff;
  padding: 10px 12px;
}

.pagination-bar label {
  min-width: 90px;
}

.group-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.field-group {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px 12px;
  margin-top: 8px;
}

.checkbox-grid label {
  display: flex;
  align-items: center;
  gap: 6px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 34px;
}

.check-option {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  color: var(--text);
  font-size: 13px;
}

.check-option input {
  width: auto;
  min-height: 0;
}

.major-editor {
  display: grid;
  gap: 12px;
}

.major-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.major-card-header {
  display: flex;
  align-items: center;
  min-height: 38px;
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
}

.major-card-fields {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
  padding: 10px;
}

.major-card-fields .span-2 {
  grid-column: span 2;
}

.scheme-board {
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: 14px;
}

.scheme-lanes {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 298px;
  align-items: start;
  gap: 14px;
}

.scheme-lanes.temporary-query-layout {
  grid-template-columns: minmax(0, 1fr);
}

.scheme-workbench-main {
  min-width: 0;
}

.scheme-delete-panel {
  position: sticky;
  top: 18px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 36px);
  overflow: hidden;
}

.scheme-filter-box {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 12px;
}

.scheme-filter-title {
  font-weight: 700;
  color: #344054;
}

.scheme-filter-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.scheme-workbench-control-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.scheme-workbench-control-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 32px;
}

.scheme-workbench-control-header .scheme-filter-title {
  font-size: 13px;
}

.scheme-workbench-control-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(620px, 1.28fr);
  gap: 10px;
  align-items: start;
}

.scheme-workbench-left-stack {
  display: grid;
  gap: 10px;
  align-content: start;
}

.scheme-workbench-control-grid .scheme-student-summary {
  margin-bottom: 0;
}

.temporary-query-control-grid {
  grid-template-columns: minmax(300px, 0.62fr) minmax(620px, 1.38fr);
}

.temporary-query-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.temporary-query-form-grid label,
.temporary-query-certifications,
.temporary-query-reselect {
  min-width: 0;
}

.temporary-query-reselect,
.temporary-query-certifications {
  grid-column: 1 / -1;
}

.temporary-query-inputs .choice-tag {
  border-radius: 6px;
}

.scheme-student-summary.focus {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.scheme-student-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.scheme-student-headline div {
  display: grid;
  gap: 2px;
}

.scheme-student-headline span,
.scheme-student-focus-card span,
.scheme-student-meta-item span {
  color: var(--muted);
  font-size: 11px;
}

.scheme-student-headline strong {
  color: var(--text);
  font-size: 18px;
  line-height: 1.15;
}

.scheme-student-headline em {
  border-radius: 999px;
  background: #e7f2f4;
  color: var(--brand-strong);
  padding: 4px 8px;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}

.scheme-student-focus-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.scheme-student-focus-card {
  display: grid;
  gap: 2px;
  min-height: 48px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
}

.scheme-student-focus-card.is-score {
  border-color: color-mix(in srgb, var(--brand) 42%, var(--line));
  background: #e7f5f7;
}

.scheme-student-focus-card.span-2 {
  grid-column: 1 / -1;
}

.scheme-student-focus-card strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.2;
}

.scheme-student-focus-card.is-score strong {
  color: var(--brand-strong);
  font-size: 20px;
}

.scheme-student-focus-card small {
  color: var(--muted);
  font-size: 11px;
}

.scheme-student-meta-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
}

.scheme-student-meta-item {
  display: grid;
  gap: 2px;
  min-height: 38px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.scheme-student-meta-item strong {
  color: var(--text);
  font-size: 12px;
  line-height: 1.2;
}

.scheme-student-meta-item.has-control strong {
  display: block;
}

.scheme-student-meta-item.has-control select {
  min-height: 28px;
  padding: 4px 7px;
  font-size: 12px;
}

.scheme-workbench-filter-box {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.scheme-workbench-tier-focus .tier-offset-box {
  gap: 8px;
  padding: 9px;
  border-color: color-mix(in srgb, var(--brand) 34%, var(--line));
  background: #fff;
}

.scheme-workbench-tier-focus .tier-offset-title {
  color: var(--brand-strong);
  font-weight: 700;
}

.scheme-workbench-tier-focus .tier-offset-card {
  min-height: 82px;
  padding: 8px;
}

.scheme-workbench-tier-focus .tier-offset-card strong b {
  font-size: 22px;
}

.scheme-workbench-tier-focus .tier-offset-actions button {
  min-width: 30px;
  min-height: 30px;
}

.scheme-workbench-filter-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.scheme-workbench-filter-actions > .primary {
  align-self: stretch;
  min-width: 78px;
  min-height: auto;
  padding: 0 12px;
}

.scheme-workbench-filter-secondary {
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.scheme-workbench-filter-secondary .scheme-filter-title {
  color: var(--muted);
  font-size: 12px;
}

.scheme-extra-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.scheme-extra-panel.is-open {
  border-color: color-mix(in srgb, var(--brand) 30%, var(--line));
}

.scheme-extra-head,
.scheme-extra-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.scheme-extra-head > div,
.scheme-extra-result-head > span {
  min-width: 0;
}

.scheme-extra-body {
  display: grid;
  gap: 10px;
}

.scheme-extra-mode-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.scheme-extra-mode {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  padding: 2px;
}

.scheme-extra-mode label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  border-radius: 4px;
  padding: 4px 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.scheme-extra-mode label:has(input:checked) {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.scheme-extra-mode input {
  accent-color: var(--brand);
}

.scheme-extra-query-grid {
  display: grid;
  grid-template-columns: minmax(110px, 0.8fr) minmax(150px, 1fr) minmax(180px, 1.5fr) auto;
  gap: 8px;
  align-items: end;
}

.scheme-extra-query-grid.is-direct {
  grid-template-columns: minmax(240px, 1fr) auto;
}

.scheme-extra-query-grid button {
  min-height: 34px;
}

.scheme-extra-table-wrap {
  max-height: 320px;
}

.scheme-extra-table-wrap table {
  width: 100%;
  min-width: 100%;
  table-layout: fixed;
}

.scheme-extra-table-wrap col.scheme-extra-select-col {
  width: 72px;
}

.scheme-extra-table-wrap col.scheme-col-school_name {
  width: 14%;
}

.scheme-extra-table-wrap col.scheme-col-school_code,
.scheme-extra-table-wrap col.scheme-col-group_code {
  width: 6.4%;
}

.scheme-extra-table-wrap col.scheme-col-tier,
.scheme-extra-table-wrap col.scheme-col-score_gap,
.scheme-extra-table-wrap col.scheme-col-city,
.scheme-extra-table-wrap col.scheme-col-province,
.scheme-extra-table-wrap col.scheme-col-nature,
.scheme-extra-table-wrap col.scheme-col-level,
.scheme-extra-table-wrap col.scheme-col-subject {
  width: 4.2%;
}

.scheme-extra-table-wrap col.scheme-col-predict_score,
.scheme-extra-table-wrap col.scheme-col-batch {
  width: 5.2%;
}

.scheme-extra-table-wrap col.scheme-col-tuition_range {
  width: 9%;
}

.scheme-extra-table-wrap col.scheme-col-subjects_required {
  width: 7%;
}

.scheme-extra-table-wrap col.scheme-col-training_mode {
  width: 8%;
}

.scheme-extra-table-wrap col.scheme-col-major_names {
  width: 18%;
}

.scheme-extra-table-wrap th:first-child,
.scheme-extra-table-wrap td:first-child {
  width: 72px;
  text-align: center;
}

.scheme-extra-select-cell .status {
  display: inline-block;
  white-space: nowrap;
}

.scheme-extra-table-wrap tr.is-already-added {
  background: #f8fafc;
  color: var(--muted);
}

.scheme-extra-table-wrap tr.is-selected td {
  background: color-mix(in srgb, var(--scheme-tier-color, #eef7fa) 72%, var(--brand) 28%);
  font-weight: 700;
}

.scheme-extra-table-wrap tr[data-select-group] {
  cursor: pointer;
}

.scheme-extra-badge {
  display: inline-block;
  margin-right: 6px;
  border-radius: 4px;
  background: #e7f2f4;
  color: var(--brand-strong);
  padding: 2px 5px;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.2;
  vertical-align: middle;
}

.scheme-extra-badge-parent {
  background: #fff4dc;
  color: #7a4b00;
}

@media (max-width: 980px) {
  .scheme-extra-mode-row {
    align-items: stretch;
    flex-direction: column;
  }

  .scheme-extra-mode {
    width: 100%;
  }

  .scheme-extra-mode label {
    flex: 1;
    justify-content: center;
  }

  .scheme-extra-query-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scheme-extra-query-grid button {
    grid-column: 1 / -1;
  }
}

.scheme-filter-grid.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.scheme-filter-grid.compact label {
  gap: 3px;
  font-size: 11px;
}

.scheme-filter-grid.compact input,
.scheme-filter-grid.compact select,
.scheme-filter-grid.compact .province-multi-trigger {
  min-height: 28px;
  border-radius: 5px;
  padding: 4px 7px;
  font-size: 12px;
}

.scheme-filter-grid.compact .tier-offset-box {
  gap: 6px;
  padding: 7px;
}

.scheme-filter-grid.compact .tier-offset-grid {
  gap: 6px;
}

.scheme-filter-grid.compact .tier-offset-card {
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 6px;
  padding: 6px 8px;
}

.scheme-filter-grid.compact .tier-offset-card strong {
  min-height: 20px;
}

.scheme-filter-grid.compact .tier-offset-card strong b {
  font-size: 16px;
}

.scheme-filter-grid.compact .tier-offset-count {
  white-space: nowrap;
}

.scheme-filter-grid.compact .tier-offset-actions {
  gap: 6px;
}

.scheme-filter-grid.compact .tier-offset-actions button {
  min-width: 28px;
  min-height: 28px;
}

.province-multi {
  position: relative;
  min-width: 0;
}

.province-multi-trigger {
  width: 100%;
  justify-content: space-between;
  border-color: var(--line);
  background: #fff;
  color: var(--text);
  font-weight: 400;
  text-align: left;
}

.province-multi-trigger:disabled {
  background: #f5f7fb;
}

.province-multi-caret {
  color: var(--muted);
  font-size: 11px;
}

.province-multi-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 12;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.province-multi-actions {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding: 8px;
}

.province-multi-actions button {
  min-height: 28px;
  padding: 4px 8px;
  font-size: 12px;
}

.city-region-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  border-bottom: 1px solid var(--line);
  padding: 8px;
}

.city-region-actions button {
  min-height: 26px;
  padding: 4px 6px;
  font-size: 12px;
}

.province-multi-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 8px;
  max-height: 220px;
  overflow: auto;
  padding: 8px;
}

.province-option {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  color: var(--text);
  font-size: 13px;
}

.province-option input[type="checkbox"] {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  min-height: 0;
  margin: 0;
  padding: 0;
  accent-color: var(--brand);
}

.tier-offset-box {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.tier-offset-title {
  font-size: 12px;
  color: var(--muted);
}

.tier-offset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.tier-offset-card {
  display: grid;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
}

.tier-offset-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.tier-offset-card-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.tier-offset-manual {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  margin: 0;
}

.tier-offset-manual span {
  display: none;
}

.tier-offset-manual input {
  width: 100%;
  min-height: 32px;
  border-radius: 6px;
  padding: 0 6px;
  font-size: 16px;
  font-weight: 800;
  text-align: center;
}

.tier-offset-count {
  color: var(--brand-strong);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.tier-offset-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.tier-offset-actions button {
  min-width: 0;
  padding: 0;
}

.tier-offset-limit {
  min-height: 14px;
  color: var(--danger);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
}

.tier-offset-limit.is-muted {
  color: var(--muted);
  font-weight: 600;
}

.tier-offset-actions button:disabled {
  border-color: var(--line);
  background: #f4f6f8;
  color: #98a2b3;
}

.scheme-workbench-search-box {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.scheme-workbench-search-row {
  display: grid;
  grid-template-columns: minmax(132px, 0.45fr) minmax(180px, 1fr) 36px 36px;
  gap: 8px;
  align-items: center;
}

.scheme-workbench-search-row select,
.scheme-workbench-search-row input {
  min-width: 0;
}

.scheme-workbench-search-row button {
  min-width: 0;
  padding: 0;
}

.scheme-workbench-search-status {
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
}

.scheme-search-float {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: min(720px, calc(100vw - 48px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 8px 10px;
  transform: translateX(-50%);
}

.content:has(.scheme-group-detail-drawer) .scheme-search-float {
  bottom: min(486px, 86vh);
  z-index: 45;
}

.scheme-search-float[hidden] {
  display: none;
}

.scheme-search-float span,
.scheme-search-float small {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.scheme-search-float strong,
.scheme-search-float em {
  color: var(--text);
  font-size: 13px;
  font-style: normal;
  white-space: nowrap;
}

.scheme-search-float em {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scheme-search-float button {
  width: 34px;
  min-width: 34px;
  padding: 0;
}

.scheme-search-float .text-button {
  width: auto;
  min-width: 76px;
  padding: 0 9px;
}

.scheme-context {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--muted);
}

.scheme-lanes > aside .panel-body {
  padding: 10px;
}

.scheme-delete-panel .panel-body.list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.scheme-lanes > aside .list-item {
  padding: 10px;
}

.scheme-filter-panel .panel-header,
.scheme-filter-panel .panel-body {
  padding-top: 10px;
  padding-bottom: 10px;
}

.scheme-filter-panel .panel-body {
  padding-left: 10px;
  padding-right: 10px;
}

.scheme-student-summary.compact .scheme-filter-title {
  font-size: 13px;
}

.scheme-student-summary {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.scheme-student-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.scheme-student-grid .field-group {
  min-height: 46px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
}

.scheme-student-grid .span-2 {
  grid-column: span 2;
}

.scheme-student-grid strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.25;
}

.scheme-student-grid .field-group.has-control strong {
  display: block;
}

.scheme-student-grid .field-group.has-control select {
  min-height: 26px;
  padding: 3px 8px;
  font-size: 13px;
}

[data-select-group] {
  cursor: default;
}

.scheme-tier-row {
  position: relative;
}

.scheme-tier-row td {
  background: var(--scheme-tier-color, transparent);
}

.scheme-tuition-cell {
  min-width: 112px;
}

.scheme-major-names-cell {
  min-width: 260px;
  max-width: 420px;
  white-space: normal;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.scheme-workbench-table-wrap {
  overflow: visible;
}

.scheme-workbench-table-wrap th {
  top: 0;
  z-index: 5;
}

tr.scheme-tier-row.is-selected {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
}

tr.scheme-tier-row.is-selected td {
  background: color-mix(in srgb, var(--scheme-tier-color, #eef7fa) 72%, var(--brand) 28%);
  font-weight: 700;
}

tr.scheme-tier-row.is-selected td:first-child {
  box-shadow: inset 4px 0 0 var(--brand);
}

.scheme-lanes > aside .list-item.scheme-tier-card {
  border-left: 4px solid color-mix(in srgb, var(--scheme-tier-color, #d9e0ea) 72%, #172033);
  background: var(--scheme-tier-color, #fff);
}

.scheme-lanes > aside .list-item.scheme-tier-card.is-selected {
  background: color-mix(in srgb, var(--scheme-tier-color, #eef7fa) 72%, var(--brand) 28%);
  box-shadow: inset 0 0 0 2px var(--brand);
  font-weight: 700;
}

.tier-color-form {
  display: grid;
  gap: 12px;
}

.tier-color-row {
  display: grid;
  grid-template-columns: 48px 1fr 96px;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.tier-color-label {
  font-weight: 700;
}

.tier-color-preview {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.scheme-group-detail-drawer {
  position: fixed;
  right: calc(18px + 298px + 25px);
  bottom: 0;
  left: 18px;
  z-index: 40;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: min(486px, 86vh);
  max-height: 86vh;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: var(--panel);
  box-shadow: 0 -10px 26px rgba(23, 32, 51, 0.16);
}

.scheme-group-detail-drawer.is-temporary-query {
  right: 18px;
}

.scheme-group-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.scheme-group-detail-header > div:first-child {
  min-width: 0;
}

.scheme-group-detail-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 0 0 auto;
}

.scheme-group-detail-actions span {
  min-width: 54px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  white-space: nowrap;
}

.scheme-group-detail-actions button {
  min-height: 30px;
  padding: 5px 10px;
  white-space: nowrap;
}

.scheme-group-detail-actions .danger {
  margin-right: 4px;
}

.scheme-group-detail-title {
  font-weight: 700;
  color: var(--text);
}

.scheme-group-detail-body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  min-height: 0;
  overflow: hidden;
  padding: 12px 14px 14px;
}

.scheme-group-summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.scheme-group-summary-grid .field-group {
  min-height: 44px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
}

.scheme-group-summary-grid strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.25;
}

.scheme-group-major-table {
  --scheme-major-move-width: 3.4%;
  --scheme-major-risk-width: 3.8%;
  --scheme-major-code-width: 4.8%;
  --scheme-major-name-width: 10.2%;
  --scheme-major-note-width: 12%;
  --scheme-major-description-width: 10.8%;
  --scheme-major-number-short-width: 4.4%;
  --scheme-major-money-width: 6%;
  --scheme-major-campus-width: 5%;
  --scheme-major-score-width: 6.2%;
  --scheme-major-admission-width: 6%;
  --scheme-major-training-mode-width: 11.8%;
  --scheme-major-requirement-width: 8.5%;
  min-height: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
}

.scheme-group-major-table table {
  width: 100%;
  min-width: 100%;
  table-layout: fixed;
}

.scheme-group-major-table col.scheme-major-move-col {
  width: var(--scheme-major-move-width);
}

.scheme-group-major-table col.scheme-major-risk-col {
  width: var(--scheme-major-risk-width);
}

.scheme-group-major-table col.scheme-major-col-code {
  width: var(--scheme-major-code-width);
}

.scheme-group-major-table col.scheme-major-col-name {
  width: var(--scheme-major-name-width);
}

.scheme-group-major-table col.scheme-major-col-note {
  width: var(--scheme-major-note-width);
}

.scheme-group-major-table col.scheme-major-col-description {
  width: var(--scheme-major-description-width);
}

.scheme-group-major-table col.scheme-major-col-number-short {
  width: var(--scheme-major-number-short-width);
}

.scheme-group-major-table col.scheme-major-col-money {
  width: var(--scheme-major-money-width);
}

.scheme-group-major-table col.scheme-major-col-campus {
  width: var(--scheme-major-campus-width);
}

.scheme-group-major-table col.scheme-major-col-score {
  width: var(--scheme-major-score-width);
}

.scheme-group-major-table col.scheme-major-col-admission {
  width: var(--scheme-major-admission-width);
}

.scheme-group-major-table col.scheme-major-col-training-mode {
  width: var(--scheme-major-training-mode-width);
}

.scheme-group-major-table col.scheme-major-col-requirement {
  width: var(--scheme-major-requirement-width);
}

.scheme-group-major-table.is-supplement {
  overflow-x: auto;
}

.scheme-group-major-table.is-supplement table {
  min-width: 1900px;
}

.scheme-major-sort {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  min-height: 24px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
}

.scheme-major-sort:hover,
.scheme-major-sort.active {
  color: var(--primary);
}

.scheme-major-sort em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 12px;
  font-style: normal;
  font-weight: 700;
}

.scheme-group-major-table th,
.scheme-group-major-table td {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

.scheme-group-major-table .scheme-major-col-code,
.scheme-group-major-table .scheme-major-col-number-short,
.scheme-group-major-table .scheme-major-col-money,
.scheme-group-major-table .scheme-major-col-campus,
.scheme-group-major-table .scheme-major-col-score,
.scheme-group-major-table .scheme-major-col-admission {
  text-align: center;
}

.scheme-group-major-table .scheme-major-col-number-short,
.scheme-group-major-table .scheme-major-col-money,
.scheme-group-major-table .scheme-major-col-score,
.scheme-group-major-table .scheme-major-col-admission {
  font-variant-numeric: tabular-nums;
}

.scheme-major-move-col,
.scheme-major-move-cell {
  text-align: center;
  white-space: nowrap;
}

.scheme-major-move-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.scheme-major-move-actions button {
  width: 28px;
  min-width: 28px;
  min-height: 26px;
  padding: 0;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

.scheme-tier-group {
  grid-column: 1 / -1;
}

@media (max-width: 980px) {
  .topbar {
    align-items: stretch;
    height: auto;
    flex-wrap: wrap;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .tabs {
    width: 100%;
    overflow-x: auto;
  }

  .tab {
    min-height: 40px;
    height: 40px;
  }

  .scheme-search-float {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: none;
    flex-wrap: wrap;
    transform: none;
  }

  .content:has(.scheme-group-detail-drawer) .scheme-search-float {
    bottom: 86vh;
  }

  .scheme-search-float em {
    max-width: 160px;
  }

  .grid.cols-2,
  .grid.cols-3,
  .grid.cols-4,
  .data-column-settings,
  .choice-grid.two,
  .split,
  .group-panel,
  .scheme-filter-grid,
  .scheme-board,
  .scheme-lanes,
  .workbench-page {
    grid-template-columns: 1fr;
  }

  .workbench-page {
    height: calc(100vh - 74px);
    min-height: 0;
    grid-template-rows: minmax(180px, 38vh) minmax(0, 1fr);
    overflow: hidden;
  }

  .workbench-sidebar {
    min-height: 0;
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .workbench-chat {
    min-height: 0;
  }

  .wb-chat-head,
  .wb-chat-input {
    grid-template-columns: 1fr;
  }

  .wb-chat-head {
    align-items: stretch;
    flex-direction: column;
  }

  .wb-intake-strip {
    align-items: stretch;
    flex-direction: column;
  }

  .wb-intake-strip-main,
  .wb-intake-strip-actions {
    justify-content: flex-start;
  }

  .wb-chat-input textarea {
    min-height: 112px;
  }

  .wb-bubble {
    max-width: 92%;
  }

  .span-2,
  .settings-wide {
    grid-column: auto;
  }

  .template-status-grid {
    grid-template-columns: 1fr;
  }

  .scheme-workbench-control-grid {
    grid-template-columns: 1fr;
  }

  .scheme-filter-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scheme-student-focus-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scheme-student-meta-grid {
    grid-template-columns: 1fr;
  }

  .scheme-workbench-filter-actions {
    grid-template-columns: 1fr;
  }

  .scheme-student-grid {
    grid-template-columns: 1fr;
  }

  .scheme-group-detail-drawer {
    right: 0;
    left: 0;
    height: 86vh;
    max-height: 86vh;
    border-radius: 8px 8px 0 0;
  }

  .scheme-group-detail-drawer.is-temporary-query {
    right: 0;
  }

  .content:has(.scheme-group-detail-drawer) {
    padding-bottom: calc(86vh + 24px);
  }

  .scheme-group-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tier-offset-grid {
    grid-template-columns: 1fr;
  }

  .scheme-delete-panel {
    position: static;
    max-height: none;
  }

  .scheme-delete-panel .panel-body.list {
    max-height: 320px;
  }

  .scheme-student-grid .span-2 {
    grid-column: auto;
  }

  .wizard-steps {
    grid-template-columns: 1fr;
  }

  .pagination-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .major-card-fields {
    grid-template-columns: 1fr;
  }

  .major-card-fields .span-2 {
    grid-column: auto;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 2026 operations redesign: dense admin shell with restrained SaaS polish. */
:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --panel: #ffffff;
  --panel-2: #f2f5f9;
  --panel-3: #eaf0f7;
  --text: #111827;
  --muted: #5f6b7a;
  --line: #d8e0eb;
  --line-strong: #b8c4d3;
  --brand: #2563eb;
  --brand-strong: #1d4ed8;
  --brand-soft: #eaf1ff;
  --accent: #059669;
  --accent-soft: #e8f7f1;
  --danger: #dc2626;
  --danger-soft: #feecec;
  --warn: #b45309;
  --warn-soft: #fff4df;
  --ok: #047857;
  --ok-soft: #e8f7f1;
  --primary: var(--brand);
  --surface-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 8px 22px rgba(15, 23, 42, 0.05);
  --shadow: var(--surface-shadow);
  --shadow-raised: 0 18px 44px rgba(15, 23, 42, 0.16);
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 10px;
  --topbar-height: 58px;
  --control-height: 36px;
  --page-gutter: 16px;
  --focus-ring: 0 0 0 3px rgba(37, 99, 235, 0.18);
  --motion-fast: 150ms;
  --motion-base: 220ms;
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --z-dropdown: 20;
  --z-sticky: 30;
  --z-overlay: 60;
  --z-toast: 80;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  background:
    linear-gradient(180deg, #ffffff 0, rgba(255, 255, 255, 0) 220px),
    var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  transition:
    border-color var(--motion-fast) var(--ease-standard),
    background-color var(--motion-fast) var(--ease-standard),
    color var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-standard);
}

button {
  min-height: var(--control-height);
  border-color: var(--line);
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  color: #1f2937;
  font-weight: 600;
  line-height: 1;
  touch-action: manipulation;
}

button:hover:not(:disabled) {
  border-color: var(--line-strong);
  background: #f8fafc;
}

button:active:not(:disabled) {
  transform: translateY(1px);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 0;
  box-shadow: var(--focus-ring);
}

button.primary {
  border-color: var(--brand);
  background: linear-gradient(180deg, #3478f6 0%, var(--brand) 100%);
  color: #fff;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2);
}

button.primary:hover:not(:disabled) {
  border-color: var(--brand-strong);
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
}

button.danger {
  border-color: #f3b7b7;
  background: #fff;
  color: var(--danger);
}

button.danger:hover:not(:disabled) {
  border-color: #ef8888;
  background: var(--danger-soft);
}

button.link-button {
  color: var(--brand-strong);
  font-weight: 700;
}

button:disabled {
  background: #f4f6f8;
  color: #98a2b3;
  cursor: not-allowed;
  opacity: 1;
}

input,
select,
textarea {
  min-height: var(--control-height);
  border-color: var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--line-strong);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  outline: 0;
  box-shadow: var(--focus-ring);
}

input[readonly],
textarea[readonly] {
  background: #f8fafc;
  color: #4b5563;
}

label {
  color: var(--muted);
  font-weight: 600;
}

.login-shell {
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.09), rgba(5, 150, 105, 0.08)),
    #f8fafc;
}

.login-box {
  border-color: rgba(216, 224, 235, 0.9);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-raised);
}

.login-title {
  color: #0f172a;
  letter-spacing: 0;
}

.app-shell {
  height: 100dvh;
  min-height: 100vh;
  grid-template-rows: var(--topbar-height) minmax(0, 1fr);
  overflow: hidden;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  gap: 16px;
  border-bottom-color: rgba(216, 224, 235, 0.92);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
  backdrop-filter: blur(10px);
  padding: 0 16px;
}

.brand {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #0f172a;
  font-size: 16px;
  letter-spacing: 0;
}

.brand::before {
  content: "";
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background:
    linear-gradient(135deg, var(--brand) 0%, #3b82f6 56%, var(--accent) 100%);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.22);
}

.tabs {
  gap: 3px;
  min-width: 0;
}

.tab {
  position: relative;
  height: 42px;
  min-height: 42px;
  border-radius: var(--radius-sm);
  padding: 0 12px;
  color: #516070;
  font-weight: 700;
  white-space: nowrap;
}

.tab:hover {
  background: #f3f6fb;
  color: #1f2937;
}

.tab.active {
  color: var(--brand-strong);
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.12);
}

.tab.active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 5px;
  height: 2px;
  border-radius: 999px;
  background: var(--brand);
}

.user-area {
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.link-chip {
  min-height: 32px;
  border-color: #c7d7fe;
  border-radius: var(--radius-sm);
  background: #eef4ff;
  color: var(--brand-strong);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.04);
}

.link-chip:hover {
  border-color: #9bb8ff;
  background: #e1ecff;
}

.content {
  min-height: 0;
  padding: var(--page-gutter);
  scrollbar-gutter: stable;
}

.content:has(.workbench-page) {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.section {
  max-width: 100%;
  gap: 12px;
}

.panel {
  border-color: rgba(216, 224, 235, 0.95);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--surface-shadow);
}

.panel-header {
  min-height: 48px;
  border-bottom-color: var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
  padding: 10px 12px;
}

.panel-title {
  color: #111827;
  font-size: 15px;
  font-weight: 800;
}

.panel-body {
  padding: 12px;
}

.toolbar {
  align-items: end;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-2);
}

.toolbar label {
  min-width: 124px;
}

.grid {
  gap: 12px;
}

.table-wrap {
  border-color: var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

table {
  color: #1f2937;
  font-size: 13px;
}

th,
td {
  border-bottom-color: #e5ebf3;
  padding: 8px 10px;
}

th {
  z-index: 2;
  background: #eef3f9;
  color: #344054;
  font-size: 12px;
  font-weight: 800;
}

tbody tr {
  transition: background-color var(--motion-fast) var(--ease-standard);
}

tbody tr:hover td {
  background-image: linear-gradient(rgba(37, 99, 235, 0.045), rgba(37, 99, 235, 0.045));
}

td.actions {
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.data-sort:hover,
.data-sort.active {
  color: var(--brand-strong);
}

.data-sort em {
  color: var(--brand-strong);
}

.metric {
  border-color: var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.metric-value {
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.metric-label {
  color: var(--muted);
}

.list-item {
  border-color: var(--line);
  border-radius: var(--radius);
  transition:
    border-color var(--motion-fast) var(--ease-standard),
    background-color var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard);
}

.list-item:hover {
  border-color: var(--line-strong);
  background: #fbfdff;
}

.list-item.active {
  border-color: rgba(37, 99, 235, 0.55);
  background: var(--brand-soft);
  box-shadow: inset 3px 0 0 var(--brand);
}

.status {
  min-height: 24px;
  border-radius: 999px;
  font-weight: 800;
}

.status.ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.status.warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.status.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.empty {
  color: #7b8794;
}

.modal-backdrop {
  z-index: var(--z-overlay);
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(3px);
}

.modal {
  border: 1px solid rgba(216, 224, 235, 0.95);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-raised);
}

.modal-header {
  z-index: 2;
  border-bottom-color: var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
}

.toast {
  z-index: var(--z-toast);
  border-color: rgba(15, 23, 42, 0.18);
  border-radius: var(--radius);
  background: #0f172a;
  box-shadow: var(--shadow-raised);
}

.inline-actions {
  gap: 6px;
}

.data-column-settings label,
.check-option,
.checkbox-grid label,
.province-option {
  color: #263445;
  font-weight: 600;
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--brand);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

.content > .section > .panel {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.content > .section > .panel > .panel-header {
  min-height: 52px;
  margin-bottom: 12px;
  border: 1px solid rgba(216, 224, 235, 0.95);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.98) 100%);
  box-shadow: var(--surface-shadow);
}

.content > .section > .panel > .panel-header .panel-title {
  font-size: 18px;
}

.content > .section > .panel > .panel-body {
  display: grid;
  gap: 12px;
  padding: 0;
}

.content > .section > .panel > .panel-body > .panel,
.content > .section > .panel > .panel-body > .table-wrap,
.content > .section > .panel > .panel-body > .student-wizard,
.content > .section > .panel > .panel-body > .split,
.content > .section > .panel > .panel-body > .grid {
  min-width: 0;
}

.workbench-page {
  height: calc(100dvh - var(--topbar-height) - 24px);
  min-height: 560px;
  grid-template-columns: minmax(340px, 370px) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  border-color: rgba(216, 224, 235, 0.95);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--surface-shadow);
}

.content:has(.workbench-page) > .workbench-page {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
}

.workbench-sidebar {
  min-height: 0;
  border-right-color: var(--line);
  background: #f7f9fc;
}

.workbench-sidebar-header,
.workbench-filterbar {
  border-bottom-color: var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.workbench-sidebar-header {
  min-height: 56px;
}

.workbench-sidebar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.workbench-sidebar-body {
  flex: 1 1 0;
  gap: 8px;
  padding: 10px;
}

.wb-parent {
  border-color: #dde5ef;
  border-left-width: 3px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.03);
  touch-action: manipulation;
}

.wb-parent:hover,
.wb-parent.active {
  border-color: rgba(37, 99, 235, 0.36);
  border-left-color: var(--brand);
  background: var(--brand-soft);
}

.wb-parent.active {
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.11);
}

.wb-parent-delete {
  color: var(--danger);
}

.wb-parent-copy {
  border-color: rgba(37, 99, 235, 0.18);
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.wb-parent-copy:hover {
  background: rgba(37, 99, 235, 0.14);
}

.wb-parent-status {
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.05);
}

.wb-parent-delete:hover {
  background: var(--danger-soft);
}

.wb-tag {
  background: var(--accent-soft);
  color: var(--ok);
  font-weight: 800;
}

.wb-tag:first-child {
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.wb-tag:nth-child(3) {
  background: var(--warn-soft);
  color: var(--warn);
}

.workbench-chat {
  background: #fff;
}

.wb-chat-head {
  min-height: 62px;
  border-bottom-color: var(--line);
  background: rgba(255, 255, 255, 0.9);
}

.wb-health {
  border-bottom-color: var(--line);
  background: #fbfcfe;
}

.wb-chat-list {
  gap: 10px;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.88) 0%, rgba(243, 247, 252, 0.9) 100%);
  padding: 16px;
}

.wb-bubble {
  border-radius: var(--radius);
  line-height: 1.68;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.wb-msg.user .wb-bubble {
  background: linear-gradient(180deg, #3478f6 0%, var(--brand) 100%);
}

.wb-msg.assistant .wb-bubble {
  border-color: var(--line);
  background: #fff;
}

.wb-chat-input {
  border-top-color: var(--line);
  background: #fff;
  padding: 12px;
}

.modal-rules {
  width: min(760px, calc(100vw - 32px));
}

.wb-rules-form {
  display: grid;
  gap: 12px;
}

.wb-rules-form label {
  display: grid;
  gap: 8px;
}

.wb-rules-form textarea {
  width: 100%;
  min-height: 280px;
  resize: vertical;
  line-height: 1.65;
}

.wb-rules-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.wb-rules-actions {
  justify-content: flex-end;
}

.student-wizard {
  gap: 12px;
}

.wizard-steps {
  gap: 6px;
}

.wizard-step {
  min-height: 42px;
  border-color: var(--line);
  border-radius: var(--radius);
  background: #fff;
  font-weight: 800;
}

.wizard-step.active {
  border-color: rgba(37, 99, 235, 0.48);
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.wizard-step.done {
  border-color: rgba(4, 120, 87, 0.26);
  background: var(--ok-soft);
  color: var(--ok);
}

.wizard-panel,
.choice-card,
.major-card,
.certificate-list {
  border-radius: var(--radius);
  border-color: var(--line);
  background: #fff;
}

.choice-card {
  min-height: 104px;
  transition:
    border-color var(--motion-fast) var(--ease-standard),
    background-color var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard);
}

.choice-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--surface-shadow);
}

.choice-card.active {
  border-color: rgba(37, 99, 235, 0.55);
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.1);
}

.choice-tag {
  border-color: var(--line);
  border-radius: 999px;
  background: #fff;
  font-weight: 700;
}

.choice-tag.active {
  border-color: var(--brand);
  background: var(--brand);
}

.wizard-actions {
  border-top-color: var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
}

.pagination-bar {
  border-color: var(--line);
  background: #fff;
}

.field-group {
  color: var(--muted);
  font-weight: 600;
}

.scheme-board {
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  gap: 12px;
}

.scheme-lanes {
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 12px;
}

.scheme-workbench-main,
.scheme-delete-panel {
  border-color: var(--line);
  box-shadow: var(--surface-shadow);
}

.scheme-delete-panel {
  top: calc(var(--topbar-height) + 12px);
  max-height: calc(100dvh - var(--topbar-height) - 24px);
}

.scheme-filter-box,
.scheme-workbench-control-panel,
.scheme-student-summary,
.scheme-workbench-filter-secondary,
.scheme-workbench-search-box,
.tier-offset-box {
  border-color: var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
}

.scheme-workbench-control-panel {
  padding: 10px;
}

.scheme-workbench-control-grid {
  grid-template-columns: minmax(280px, 0.66fr) minmax(560px, 1.34fr);
  gap: 10px;
}

.temporary-query-control-grid {
  grid-template-columns: minmax(300px, 0.62fr) minmax(560px, 1.38fr);
}

.scheme-student-summary.focus,
.scheme-student-focus-card,
.scheme-student-meta-item,
.scheme-student-grid .field-group,
.tier-offset-card {
  border-color: var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.scheme-student-focus-card {
  background: #f7f9fc;
}

.scheme-student-focus-card.is-score {
  border-color: rgba(37, 99, 235, 0.34);
  background: var(--brand-soft);
}

.scheme-student-headline strong,
.scheme-student-focus-card strong,
.scheme-student-meta-item strong,
.scheme-student-grid strong,
.scheme-group-summary-grid strong {
  color: #111827;
}

.scheme-student-headline em,
.tier-offset-count {
  color: var(--brand-strong);
}

.scheme-student-headline em {
  background: var(--brand-soft);
}

.scheme-workbench-filter-actions > .primary {
  min-height: 40px;
}

.scheme-workbench-table-wrap {
  border-radius: var(--radius);
}

.scheme-workbench-table-wrap th {
  top: 0;
}

.scheme-sort-actions {
  display: grid;
  grid-template-columns: minmax(28px, 1fr) repeat(5, 30px);
  align-items: center;
  gap: 4px;
  min-width: 190px;
}

.scheme-sort-meta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 0;
}

.scheme-sort-rank {
  min-width: 28px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.scheme-sort-actions button {
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  line-height: 1;
}

.scheme-sort-clear {
  min-height: 22px;
  padding: 2px 7px;
  border-color: #f4a460;
  background: #fff8ed;
  color: #8a4b08;
  font-size: 12px;
  line-height: 1.2;
}

.scheme-extra-restore-choice {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #8a4b08;
  font-size: 12px;
  white-space: nowrap;
}

.scheme-rank-form {
  display: grid;
  gap: 12px;
}

.scheme-rank-current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
}

.scheme-rank-current span {
  color: var(--muted);
  font-size: 13px;
}

.scheme-rank-current strong {
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}

.scheme-rank-error {
  min-height: 18px;
  color: var(--danger);
  font-size: 13px;
}

.scheme-tier-row.is-selected td,
.scheme-lanes > aside .list-item.scheme-tier-card.is-selected {
  box-shadow: inset 4px 0 0 var(--brand);
}

.scheme-tier-row.is-selected td {
  background-image: linear-gradient(rgba(37, 99, 235, 0.075), rgba(37, 99, 235, 0.075));
}

.scheme-search-float {
  z-index: var(--z-toast);
  border-color: rgba(37, 99, 235, 0.26);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-raised);
  backdrop-filter: blur(10px);
}

.province-multi-menu {
  z-index: var(--z-dropdown);
  border-color: var(--line);
  box-shadow: var(--shadow-raised);
}

.scheme-group-detail-drawer {
  z-index: var(--z-overlay);
  border-color: var(--line);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: #fff;
  box-shadow: 0 -18px 46px rgba(15, 23, 42, 0.18);
}

.scheme-group-detail-header {
  border-bottom-color: var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
}

.scheme-group-summary-grid .field-group {
  border-color: var(--line);
  background: #f8fafc;
}

.scheme-group-major-table {
  border-color: var(--line);
}

.scheme-major-sort:hover,
.scheme-major-sort.active {
  color: var(--brand-strong);
}

@media (max-width: 1200px) {
  .scheme-workbench-control-grid,
  .temporary-query-control-grid {
    grid-template-columns: 1fr;
  }

  .scheme-filter-grid.compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  :root {
    --topbar-height: auto;
    --page-gutter: 12px;
  }

  body {
    font-size: 14px;
  }

  button,
  input,
  select,
  textarea {
    min-height: 40px;
  }

  .app-shell {
    grid-template-rows: auto minmax(0, 1fr);
  }

  .topbar {
    position: sticky;
    gap: 10px;
    padding: 10px 12px;
  }

  .brand {
    min-height: 34px;
  }

  .tabs {
    order: 3;
    width: 100%;
    padding-bottom: 2px;
  }

  .tab {
    min-height: 40px;
    height: 40px;
    padding: 0 12px;
  }

  .user-area {
    margin-left: auto;
    gap: 8px;
  }

  .content > .section > .panel > .panel-header {
    align-items: stretch;
    flex-direction: column;
  }

  .content > .section > .panel > .panel-header .inline-actions {
    justify-content: flex-start;
  }

  .toolbar {
    align-items: stretch;
  }

  .toolbar label {
    min-width: min(100%, 180px);
  }

  .workbench-page {
    height: calc(100dvh - 126px);
    min-height: 0;
    grid-template-rows: minmax(180px, 36vh) minmax(0, 1fr);
    grid-template-columns: 1fr;
  }

  .wb-chat-list {
    padding: 12px;
  }

  .scheme-lanes,
  .scheme-board {
    grid-template-columns: 1fr;
  }

  .scheme-filter-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scheme-delete-panel {
    position: static;
    max-height: none;
  }

  .scheme-delete-panel .panel-body.list {
    max-height: 300px;
  }

  .scheme-search-float {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: none;
    transform: none;
  }

  .scheme-group-detail-drawer {
    height: 86dvh;
    max-height: 86dvh;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .content {
    padding: 10px;
  }

  .content > .section > .panel > .panel-header {
    margin-bottom: 10px;
  }

  .brand::before {
    width: 28px;
    height: 28px;
  }

  .user-area {
    width: 100%;
    justify-content: space-between;
  }

  .link-chip {
    min-height: 36px;
  }

  .grid.cols-2,
  .grid.cols-3,
  .grid.cols-4,
  .choice-grid.two,
  .template-status-grid,
  .metric-grid,
  .scheme-filter-grid.compact,
  .scheme-student-focus-grid,
  .scheme-group-summary-grid {
    grid-template-columns: 1fr;
  }

  .table-wrap {
    border-radius: var(--radius-sm);
  }

  th,
  td {
    padding: 8px;
  }

  .modal-backdrop {
    padding: 12px;
  }

  .modal {
    max-height: calc(100dvh - 24px);
  }

  .wb-bubble {
    max-width: 94%;
  }
}

/* 2026-06 final cascade lock for the settings/scheme IA redesign */
:root {
  --brand: #146356;
  --brand-strong: #0f4f45;
  --brand-soft: #e8f3ef;
  --brand-ink: #0c332d;
  --accent: #b7791f;
  --accent-soft: #fff4d8;
  --bg: #f6f7f2;
  --panel: #ffffff;
  --panel-2: #f2f5ef;
  --text: #1d2522;
  --muted: #66736d;
  --line: #d8dfd5;
  --shadow: 0 8px 20px rgba(29, 37, 34, 0.08);
  --shadow-raised: 0 14px 34px rgba(29, 37, 34, 0.12);
  --surface-shadow: 0 8px 22px rgba(29, 37, 34, 0.08);
}

body {
  background: linear-gradient(180deg, #f8faf4 0%, #f3f5ef 46%, #eef3ed 100%);
  color: var(--text);
}

button.primary,
.primary {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

button.primary:hover,
.primary:hover {
  border-color: var(--brand-strong);
  background: var(--brand-strong);
}

.tab.active,
.choice-tag.active {
  background: var(--brand);
}

.tab.active {
  color: #fff;
  box-shadow: 0 7px 18px rgba(20, 99, 86, 0.2);
}

.settings-workspace {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
}

.settings-nav {
  position: sticky;
  top: calc(var(--topbar-height) + 14px);
  display: grid;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--surface-shadow);
  backdrop-filter: blur(10px);
}

.settings-nav-item {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 58px;
  justify-items: start;
  border-color: transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.settings-nav-item.active,
.settings-nav-item:hover {
  border-color: rgba(20, 99, 86, 0.18);
  background: var(--brand-soft);
}

.settings-nav-item.active {
  box-shadow: inset 4px 0 0 var(--brand);
}

.settings-focus-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.settings-focus-card {
  display: grid;
  min-width: 0;
  min-height: 126px;
  align-content: space-between;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--surface-shadow);
}

.settings-focus-card.is-template {
  border-color: rgba(20, 99, 86, 0.26);
  background: linear-gradient(180deg, #fff 0%, var(--brand-soft) 100%);
}

.settings-focus-card.is-predict {
  border-color: rgba(183, 121, 31, 0.28);
  background: linear-gradient(180deg, #fff 0%, var(--accent-soft) 100%);
}

.settings-focus-card.is-base {
  border-color: rgba(20, 99, 86, 0.24);
  background: linear-gradient(180deg, #fff 0%, #eef7f4 100%);
}

.settings-focus-card.is-commercial {
  border-color: rgba(98, 111, 101, 0.24);
  background: linear-gradient(180deg, #fff 0%, #eef0ea 100%);
}

.settings-focus-card.is-ai {
  border-color: rgba(37, 99, 235, 0.24);
  background: linear-gradient(180deg, #fff 0%, var(--brand-soft) 100%);
}

.settings-section-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.settings-section-grid > .settings-wide {
  grid-column: 1 / -1;
}

.settings-main[data-settings-active="overview"] .settings-block:not(.settings-block-overview),
.settings-main[data-settings-active="scheme"] .settings-block:not(.settings-block-scheme),
.settings-main[data-settings-active="base"] .settings-block:not(.settings-block-base),
.settings-main[data-settings-active="accounts"] .settings-block:not(.settings-block-accounts),
.settings-main[data-settings-active="commercial"] .settings-block:not(.settings-block-commercial),
.settings-main[data-settings-active="ai"] .settings-block:not(.settings-block-ai),
.settings-main[data-settings-active="fields"] .settings-block:not(.settings-block-fields) {
  display: none;
}

.scheme-lanes.scheme-lanes-v3 {
  display: grid;
  grid-template-columns: minmax(260px, 310px) minmax(0, 1fr) minmax(300px, 360px);
  gap: 12px;
  align-items: start;
}

.scheme-filter-rail,
.scheme-side-rail {
  position: sticky;
  top: calc(var(--topbar-height) + 12px);
  max-height: calc(100dvh - var(--topbar-height) - 24px);
  min-height: 0;
}

.scheme-side-rail {
  display: grid;
  gap: 12px;
  overflow: hidden;
}

.scheme-workbench-v3 .scheme-filter-grid.compact {
  grid-template-columns: 1fr;
}

.scheme-workbench-v3 .scheme-workbench-table-wrap {
  max-height: calc(100dvh - var(--topbar-height) - 250px);
  overflow: auto;
  border: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: none;
}

.scheme-workbench-v3 .scheme-delete-panel {
  position: static;
  max-height: calc(42dvh - 24px);
  overflow: hidden;
}

.scheme-workbench-v3 .scheme-delete-panel .panel-body.list {
  max-height: calc(42dvh - 92px);
  overflow: auto;
}

.scheme-side-detail-panel .scheme-group-detail-drawer {
  position: static;
  right: auto;
  bottom: auto;
  left: auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: auto;
  max-height: min(58dvh, 560px);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.scheme-side-detail-panel .scheme-group-detail-body {
  min-height: 0;
  max-height: calc(min(58dvh, 560px) - 116px);
  overflow: auto;
  padding: 10px;
}

.scheme-side-detail-panel .scheme-group-summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.scheme-student-name {
  border-color: rgba(20, 99, 86, 0.28) !important;
  background: var(--brand-soft) !important;
}

.compact-info-item.is-note {
  border-color: rgba(183, 121, 31, 0.28);
  background: var(--accent-soft);
}

.scheme-tier-row.is-selected td {
  background-image: linear-gradient(rgba(20, 99, 86, 0.08), rgba(20, 99, 86, 0.08));
  box-shadow: inset 4px 0 0 var(--brand);
}

.scheme-lanes-v3 .list-item.scheme-tier-card.is-selected {
  box-shadow: inset 4px 0 0 var(--brand);
}

@media (max-width: 1380px) {
  .settings-focus-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scheme-lanes.scheme-lanes-v3 {
    grid-template-columns: minmax(240px, 290px) minmax(0, 1fr);
  }

  .scheme-side-rail {
    grid-column: 1 / -1;
    position: static;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    max-height: none;
  }
}

@media (max-width: 980px) {
  .settings-workspace,
  .scheme-lanes.scheme-lanes-v3,
  .scheme-side-rail {
    grid-template-columns: 1fr;
  }

  .settings-nav,
  .scheme-filter-rail,
  .scheme-side-rail {
    position: static;
    max-height: none;
  }

  .settings-section-grid,
  .settings-focus-grid {
    grid-template-columns: 1fr;
  }
}

.scheme-workbench-v3 {
  display: grid;
  gap: 12px;
}

.scheme-student-panel .panel-body {
  padding: 10px;
}

.scheme-student-compact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.42fr);
  grid-template-areas:
    "strip notes"
    "all all";
  gap: 8px;
}

.scheme-student-strip {
  grid-area: strip;
  display: grid;
  grid-template-columns: minmax(130px, 1.2fr) repeat(2, minmax(78px, 0.6fr)) minmax(180px, 1.45fr) minmax(78px, 0.55fr);
  gap: 8px;
}

.scheme-student-strip > div,
.compact-info-item {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.scheme-student-strip span,
.compact-info-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.scheme-student-strip strong,
.compact-info-item strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.scheme-student-name strong,
.scheme-student-score strong {
  color: var(--brand-strong);
  font-size: 18px;
}

.scheme-student-notes {
  grid-area: notes;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.compact-info-item.is-note strong {
  display: -webkit-box;
  min-height: 36px;
  max-height: 54px;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.scheme-student-all {
  grid-area: all;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.scheme-student-all summary {
  cursor: pointer;
  padding: 8px 10px;
  color: var(--brand-strong);
  font-weight: 700;
}

.compact-info-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 8px;
  max-height: 88px;
  overflow: auto;
  padding: 0 10px 10px;
}

.scheme-workbench-v3 .scheme-tier-row td:first-child {
  min-width: 184px;
  width: 184px;
}

.scheme-workbench-v3 .scheme-tier-row td:first-child .inline-actions {
  display: grid;
  grid-template-columns: minmax(28px, 1fr) repeat(5, 28px);
  align-items: center;
  gap: 4px;
}

.scheme-workbench-v3 .scheme-tier-row button[data-move-item],
.scheme-workbench-v3 .scheme-tier-row button[data-rank-item] {
  width: 28px;
  min-width: 28px;
  min-height: 28px;
  height: 28px;
  padding: 0;
}

.scheme-workbench-v3 .scheme-workbench-table-wrap td {
  vertical-align: middle;
  white-space: nowrap;
}

.scheme-workbench-v3 .scheme-major-names-cell {
  min-width: 220px;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .scheme-student-strip,
  .scheme-student-compact,
  .scheme-student-notes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scheme-student-compact {
    grid-template-areas:
      "strip strip"
      "notes notes"
      "all all";
  }

  .compact-info-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-height: 180px;
  }
}

@media (max-width: 640px) {
  .scheme-student-compact,
  .scheme-student-strip,
  .scheme-student-notes,
  .compact-info-grid {
    grid-template-columns: 1fr;
  }

  .scheme-student-compact {
    grid-template-areas:
      "strip"
      "notes"
      "all";
  }
}

.scheme-student-summary.focus.is-full {
  gap: 6px;
  overflow: visible;
}

.scheme-student-summary.focus.is-full .scheme-student-headline strong {
  font-size: 17px;
}

.scheme-student-summary.focus.is-full .scheme-student-focus-card {
  min-height: 42px;
  padding: 6px 7px;
}

.scheme-student-summary.focus.is-full .scheme-student-focus-card strong {
  font-size: 14px;
}

.scheme-student-summary.focus.is-full .scheme-student-focus-card.is-score strong {
  font-size: 18px;
}

.scheme-student-note-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.scheme-student-note-item {
  min-width: 0;
  min-height: 52px;
  padding: 6px 7px;
  border: 1px solid rgba(183, 121, 31, 0.28);
  border-radius: 6px;
  background: var(--accent-soft, #fff4d8);
}

.scheme-student-note-item span,
.scheme-student-full-item span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

.scheme-student-note-item strong {
  display: block;
  max-height: 34px;
  overflow: auto;
  margin-top: 3px;
  color: var(--text);
  font-size: 12px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.scheme-student-full-shell {
  position: relative;
  z-index: 8;
}

.scheme-student-full-shell summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 28px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--brand-strong);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  list-style: none;
}

.scheme-student-full-shell summary::-webkit-details-marker {
  display: none;
}

.scheme-student-full-shell summary::after {
  content: "▾";
  color: var(--muted);
  font-size: 11px;
}

.scheme-student-full-scroll {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 30;
  max-height: 260px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-raised);
  visibility: hidden;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
}

.scheme-student-full-shell[open] .scheme-student-full-scroll,
.scheme-student-full-shell:hover .scheme-student-full-scroll,
.scheme-student-full-shell:focus-within .scheme-student-full-scroll {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.scheme-student-full-item {
  min-width: 0;
  padding: 5px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
}

.scheme-student-full-item.is-wide {
  grid-column: 1 / -1;
}

.scheme-student-full-item strong {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-size: 12px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  .scheme-student-note-grid,
  .scheme-student-full-scroll {
    grid-template-columns: 1fr;
  }
}

/* Compact scheme workbench controls */
.scheme-workbench-top-actions {
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.scheme-top-predict {
  display: inline-grid;
  grid-template-columns: auto minmax(148px, 210px);
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.scheme-top-predict select {
  min-height: 28px;
  padding: 4px 26px 4px 8px;
  font-size: 12px;
}

.scheme-top-predict.is-static {
  grid-template-columns: auto auto;
}

.scheme-top-predict strong {
  color: var(--text);
  font-size: 12px;
}

.scheme-quick-access {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
  margin-bottom: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.scheme-quick-filter-row {
  display: grid;
  grid-template-columns: auto minmax(150px, 0.7fr) minmax(180px, 0.9fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.scheme-quick-switch {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.scheme-quick-filter-row label {
  display: block;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.scheme-quick-filter-row select,
.scheme-quick-switch select {
  min-width: 0;
}

.scheme-current-student-schemes,
.scheme-recent-visits {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-width: 0;
  flex-wrap: wrap;
}

.scheme-current-student-schemes span,
.scheme-recent-visits span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.scheme-current-student-schemes small,
.scheme-recent-visits small {
  color: var(--muted);
  font-size: 12px;
}

.scheme-current-student-schemes button,
.scheme-recent-visits button {
  display: inline-flex;
  max-width: 168px;
  min-height: 28px;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  padding: 0 9px;
  white-space: nowrap;
}

.scheme-current-student-schemes button strong,
.scheme-recent-visits button strong {
  overflow: hidden;
  text-overflow: ellipsis;
}

.scheme-quick-status {
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.scheme-quick-status.ok {
  background: #dcfce7;
  color: #166534;
}

.scheme-quick-status.warn {
  background: #fef3c7;
  color: #92400e;
}

.scheme-quick-status.danger {
  background: #fee2e2;
  color: #991b1b;
}

.scheme-ai-status-badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.scheme-ai-status-badge.running {
  background: #dbeafe;
  color: #1d4ed8;
}

.scheme-ai-status-badge.ok {
  background: #dcfce7;
  color: #166534;
}

.scheme-ai-status-badge.warning {
  background: #fef3c7;
  color: #92400e;
}

.scheme-ai-status-badge.failed {
  background: #fee2e2;
  color: #991b1b;
}

.scheme-ai-status-badge.none {
  background: #eef2f7;
  color: #475569;
}

.scheme-list-ai-review {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
  padding: 7px 9px;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  line-height: 1.45;
}

.scheme-list-ai-review.running {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.scheme-list-ai-review.ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.scheme-list-ai-review.warning {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.scheme-list-ai-review.failed {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.scheme-list-ai-review.none {
  border-color: #dbe3ee;
  background: #f8fafc;
  color: #475569;
}

.scheme-ai-status-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.scheme-ai-status-panel.running {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.scheme-ai-status-panel.ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.scheme-ai-status-panel.failed {
  border-color: #fecaca;
  background: #fef2f2;
}

.scheme-ai-status-main {
  display: flex;
  min-width: 240px;
  flex: 1 1 360px;
  gap: 10px;
  align-items: center;
}

.scheme-ai-status-main > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.scheme-ai-status-main strong {
  color: #172033;
  font-size: 14px;
  line-height: 1.35;
}

.scheme-ai-status-main span:not(.scheme-ai-status-badge) {
  color: #475569;
  font-size: 12px;
  line-height: 1.45;
}

.scheme-ai-status-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 8px;
}

.scheme-col-ai-review {
  width: 92px;
}

.scheme-ai-group-cell,
.scheme-major-risk-cell {
  text-align: center;
  white-space: nowrap;
}

.scheme-ai-group-badge,
.scheme-ai-deleted-bucket-badge {
  display: inline-flex;
  min-width: 66px;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 8px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
  white-space: nowrap;
}

.scheme-ai-group-badge span {
  border-radius: 999px;
  padding: 1px 4px;
  background: rgba(255, 255, 255, 0.78);
  font-size: 10px;
}

.scheme-ai-group-badge.high,
.scheme-ai-deleted-bucket-badge.high {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.scheme-ai-group-badge.medium,
.scheme-ai-deleted-bucket-badge.medium {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.scheme-ai-group-badge.low,
.scheme-ai-group-badge.none,
.scheme-ai-deleted-bucket-badge.low,
.scheme-ai-deleted-bucket-badge.none {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.scheme-ai-group-badge.running,
.scheme-ai-deleted-bucket-badge.running {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.scheme-ai-group-badge.failed,
.scheme-ai-deleted-bucket-badge.failed {
  border-color: #fecaca;
  background: #fee2e2;
  color: #991b1b;
}

.scheme-ai-group-panel {
  display: grid;
  gap: 9px;
  margin-bottom: 10px;
  padding: 11px 12px;
  border: 1px solid #d8b4fe;
  border-radius: 8px;
  background: #fbfaff;
}

.scheme-ai-group-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.scheme-ai-group-panel-head > div:first-child {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.scheme-ai-group-panel-head strong {
  color: #312e81;
  font-size: 14px;
}

.scheme-ai-group-panel-head span {
  color: #64748b;
  font-size: 12px;
}

.scheme-ai-group-panel-actions,
.scheme-ai-group-metrics,
.scheme-ai-group-top-findings {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.scheme-ai-group-metrics > span {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #ffffff;
  color: #475569;
  font-size: 12px;
  font-weight: 750;
}

.scheme-ai-group-metrics > .high {
  border-color: #fecaca;
  color: #991b1b;
}

.scheme-ai-group-metrics > .medium {
  border-color: #fed7aa;
  color: #9a3412;
}

.scheme-ai-group-metrics > .low {
  border-color: #bbf7d0;
  color: #166534;
}

.scheme-ai-group-top-findings button {
  display: inline-flex;
  max-width: min(420px, 100%);
  min-height: 30px;
  align-items: center;
  gap: 6px;
  border-color: #fecaca;
  background: #fff7f7;
  color: #7f1d1d;
}

.scheme-ai-group-top-findings button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scheme-risk-center {
  display: grid;
  grid-column: 1 / -1;
  gap: 10px;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid #cbd5e1;
  border-left: 4px solid #64748b;
  border-radius: 9px;
  background: #ffffff;
}

.scheme-risk-center.level-high {
  border-left-color: #dc2626;
  background: linear-gradient(90deg, #fff7f7 0, #ffffff 34%);
}

.scheme-risk-center.level-medium {
  border-left-color: #d97706;
  background: linear-gradient(90deg, #fffbeb 0, #ffffff 34%);
}

.scheme-risk-center.level-low,
.scheme-risk-center.level-none {
  border-left-color: #16a34a;
  background: linear-gradient(90deg, #f0fdf4 0, #ffffff 34%);
}

.scheme-risk-center-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.scheme-risk-center-head > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.scheme-risk-center-head > .scheme-risk-center-head-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.scheme-risk-center-kicker {
  color: #64748b;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .08em;
}

.scheme-risk-center-head strong {
  color: #0f172a;
  font-size: 16px;
}

.scheme-risk-center-head small {
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

.scheme-risk-center-metrics,
.scheme-risk-categories {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.scheme-risk-ai-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  padding: 8px 0;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}

.scheme-risk-ai-status > span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  border: 1px solid #dbe5ef;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
}

.scheme-risk-ai-status > .primary {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.scheme-risk-center-metrics > span,
.scheme-risk-categories > span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  border: 1px solid #dbe5ef;
  border-radius: 999px;
  background: rgba(255, 255, 255, .88);
  color: #334155;
  font-size: 12px;
}

.scheme-risk-center-metrics .high,
.scheme-risk-categories .level-high {
  border-color: #fecaca;
  color: #991b1b;
}

.scheme-risk-center-metrics .medium,
.scheme-risk-categories .level-medium {
  border-color: #fed7aa;
  color: #9a3412;
}

.scheme-risk-center-metrics .low,
.scheme-risk-categories .level-low,
.scheme-risk-categories .level-none {
  border-color: #bbf7d0;
  color: #166534;
}

.scheme-risk-findings {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.scheme-risk-findings > button,
.scheme-risk-findings > div {
  display: flex;
  min-width: 0;
  min-height: 34px;
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: rgba(255, 255, 255, .92);
  color: #334155;
  text-align: left;
}

.scheme-risk-findings em {
  flex: 0 0 auto;
  color: #9a3412;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.scheme-risk-findings span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scheme-risk-empty {
  margin: 0;
  color: #475569;
  font-size: 12px;
  line-height: 1.6;
}

@media (max-width: 720px) {
  .scheme-risk-center-head {
    display: grid;
  }

  .scheme-risk-center-head > .scheme-risk-center-head-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .scheme-risk-center-head button,
  .scheme-risk-findings > button {
    min-height: 44px;
  }

  .scheme-risk-findings {
    grid-template-columns: 1fr;
  }

  .scheme-risk-findings span {
    overflow: visible;
    white-space: normal;
  }
}

.scheme-tier-row.ai-risk-high {
  box-shadow: inset 4px 0 0 #dc2626;
}

.scheme-tier-row.ai-risk-medium {
  box-shadow: inset 4px 0 0 #f59e0b;
}

.scheme-major-risk-col {
  width: 72px;
}

.scheme-major-risk-cell button {
  min-height: 28px;
  padding: 0 8px;
}

.scheme-risk-annotation-form textarea {
  resize: vertical;
  line-height: 1.55;
}

.scheme-risk-annotation-form .inline-check {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
}

.scheme-lanes:not(.temporary-query-layout) .scheme-workbench-control-panel {
  gap: 8px;
  margin-bottom: 8px;
  padding: 8px;
}

.scheme-lanes:not(.temporary-query-layout) .scheme-workbench-control-header {
  display: none;
}

.scheme-lanes:not(.temporary-query-layout) .scheme-workbench-control-grid {
  grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.1fr);
  gap: 8px;
}

.scheme-student-summary.focus.is-direct {
  gap: 6px;
  padding: 8px;
  background: #fff;
}

.scheme-student-priority-row {
  display: grid;
  grid-template-columns: minmax(120px, 1.1fr) minmax(76px, 0.62fr) minmax(76px, 0.62fr) minmax(128px, 1.22fr);
  gap: 6px;
  align-items: stretch;
}

.scheme-student-identity-card {
  min-width: 0;
  min-height: 50px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 6px;
  align-items: center;
  padding: 6px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
}

.scheme-student-identity-card span,
.scheme-student-detail-inline b {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.scheme-student-identity-card strong {
  min-width: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.12;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scheme-student-identity-card em {
  justify-self: end;
  grid-row: span 2;
  align-self: center;
  padding: 3px 6px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.scheme-student-priority-row .scheme-student-focus-card {
  min-height: 50px;
  padding: 6px 7px;
}

.scheme-student-priority-row .scheme-student-focus-card strong {
  font-size: 14px;
}

.scheme-student-priority-row .scheme-student-focus-card.is-score strong {
  font-size: 19px;
}

.scheme-student-priority-row .scheme-student-focus-card.is-subject strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.2;
}

.scheme-student-note-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.scheme-student-note-row .scheme-student-note-item {
  min-height: 48px;
  padding: 6px 7px;
  border-radius: 6px;
}

.scheme-student-note-row .scheme-student-note-item.is-intent {
  border-color: rgba(217, 119, 6, 0.36);
  background: #fff7ed;
}

.scheme-student-note-row .scheme-student-note-item.is-design-direction {
  border-color: rgba(20, 184, 166, 0.3);
  background: #f0fdfa;
}

.scheme-student-note-row .scheme-student-note-item.is-physical {
  border-color: rgba(37, 99, 235, 0.22);
  background: #eff6ff;
}

.scheme-student-note-row .scheme-student-note-item strong {
  max-height: 40px;
  margin-top: 2px;
  overflow: auto;
  font-size: 12px;
  line-height: 1.3;
}

.scheme-communication-record {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(20, 184, 166, 0.28);
  border-radius: 8px;
  background: linear-gradient(135deg, #f0fdfa 0%, #ecfeff 100%);
}

.scheme-communication-record-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.scheme-communication-record-head label {
  display: block;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.scheme-communication-record-head span {
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.scheme-communication-record textarea {
  min-height: 112px;
  line-height: 1.5;
}

.scheme-workbench-filter-box > .scheme-communication-record textarea {
  min-height: 82px;
}

.scheme-communication-record-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.scheme-communication-record-actions small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.scheme-communication-record-actions button {
  flex: 0 0 auto;
}

.scheme-group-detail-drawer .scheme-group-detail-header {
  gap: 8px;
  padding: 7px 10px;
}

.scheme-group-detail-drawer .scheme-group-detail-actions {
  gap: 6px;
}

.scheme-group-detail-drawer .scheme-group-detail-actions button {
  min-height: 28px;
  padding: 4px 8px;
}

.scheme-group-detail-drawer .scheme-group-detail-title {
  font-size: 13px;
  line-height: 1.25;
}

.scheme-group-detail-drawer .scheme-group-detail-header .muted {
  font-size: 11px;
  line-height: 1.2;
}

.scheme-group-detail-drawer .scheme-group-detail-body {
  gap: 6px;
  padding: 8px 10px 10px;
}

.scheme-group-summary-compact {
  display: grid;
  gap: 5px;
}

.scheme-group-primary-summary {
  display: grid;
  grid-template-columns: minmax(220px, 1.7fr) minmax(92px, 0.65fr) minmax(88px, 0.58fr) minmax(78px, 0.52fr);
  gap: 6px;
}

.scheme-group-primary-item {
  min-width: 0;
  min-height: 34px;
  display: grid;
  gap: 1px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
}

.scheme-group-primary-item span,
.scheme-group-secondary-summary b {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
}

.scheme-group-primary-item strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.16;
  overflow-wrap: anywhere;
}

.scheme-group-primary-item:nth-child(3) strong,
.scheme-group-primary-item:nth-child(4) strong {
  color: var(--brand-strong);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.scheme-group-secondary-summary {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 4px;
}

.scheme-group-secondary-summary span {
  min-width: 0;
  min-height: 21px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f8fafc;
  color: var(--text);
  font-size: 11px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.scheme-group-secondary-summary span.is-wide {
  grid-column: auto;
}

.scheme-group-major-table th,
.scheme-group-major-table td {
  padding: 6px 8px;
  line-height: 1.28;
}

.scheme-workbench-table-wrap td.actions {
  align-items: center;
  gap: 4px;
}

.scheme-workbench-table-wrap td.actions button {
  min-height: 28px;
  padding: 0 7px;
  font-size: 12px;
}

.scheme-student-detail-inline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}

.scheme-student-detail-inline span {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 20px;
  padding: 2px 5px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f8fafc;
  color: var(--text);
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.scheme-student-detail-inline span.is-wide {
  grid-column: span 2;
}

.scheme-student-detail-inline b {
  flex: 0 0 auto;
}

.scheme-workbench-filter-secondary {
  gap: 5px;
  padding: 7px;
}

.scheme-workbench-filter-secondary .scheme-filter-title {
  line-height: 1.2;
}

.scheme-filter-grid.compact.secondary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.scheme-filter-grid.compact.secondary label {
  gap: 2px;
}

.scheme-filter-grid.compact.secondary input,
.scheme-filter-grid.compact.secondary select,
.scheme-filter-grid.compact.secondary .province-multi-trigger {
  min-height: 27px;
}

.scheme-workbench-filter-actions {
  grid-template-columns: minmax(0, 1fr) 72px;
  gap: 6px;
}

.scheme-workbench-filter-actions > .primary {
  min-width: 72px;
  padding: 0 8px;
  font-size: 13px;
}

.scheme-workbench-tier-focus .tier-offset-box {
  gap: 6px;
  padding: 7px;
}

.scheme-workbench-tier-focus .tier-offset-grid {
  gap: 5px;
}

.scheme-workbench-tier-focus .tier-offset-card {
  min-height: 60px;
  gap: 4px;
  padding: 6px;
}

.scheme-workbench-tier-focus .tier-offset-card strong b {
  font-size: 18px;
}

.scheme-workbench-tier-focus .tier-offset-actions button {
  min-width: 26px;
  min-height: 26px;
}

.scheme-result-search-strip {
  display: grid;
  grid-template-columns: minmax(360px, 1.1fr) minmax(280px, 0.9fr);
  align-items: stretch;
  gap: 8px;
  margin: 0 0 8px;
}

.scheme-result-search-strip .scheme-workbench-search-box {
  grid-column: auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.scheme-result-search-strip .scheme-filter-title {
  color: var(--brand-strong);
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.scheme-result-search-strip .scheme-workbench-search-row {
  display: grid;
  grid-template-columns: minmax(110px, 150px) minmax(0, 1fr) 30px 30px;
  gap: 5px;
  align-items: center;
}

.scheme-result-search-strip .scheme-workbench-search-row select,
.scheme-result-search-strip .scheme-workbench-search-row input,
.scheme-result-search-strip .scheme-workbench-search-row button {
  min-height: 30px;
}

.scheme-result-search-strip .scheme-workbench-search-row button {
  min-width: 30px;
  padding: 0;
}

.scheme-result-search-strip .scheme-workbench-search-status {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.scheme-result-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.scheme-result-summary-item {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
}

.scheme-result-summary-item span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
}

.scheme-result-summary-item strong {
  color: var(--brand-strong);
  font-size: 19px;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.scheme-delete-panel .list-item.scheme-tier-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px 6px;
  padding: 6px 7px;
}

.scheme-lanes:not(.temporary-query-layout) .scheme-delete-panel {
  z-index: 3;
}

.scheme-lanes:not(.temporary-query-layout) .scheme-workbench-table-wrap {
  position: relative;
  z-index: 0;
}

.scheme-delete-panel .list-item.scheme-tier-card strong {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  line-height: 1.22;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scheme-delete-panel .list-item.scheme-tier-card .scheme-delete-card-title {
  display: flex;
  grid-column: 1;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.scheme-delete-panel .list-item.scheme-tier-card .scheme-tier-mini-badge {
  flex: 0 0 auto;
  min-width: 22px;
  padding: 1px 5px;
  border: 1px solid color-mix(in srgb, var(--scheme-tier-color, #fca5a5) 70%, var(--scheme-ink) 30%);
  border-radius: 999px;
  background: color-mix(in srgb, var(--scheme-tier-color, #fff) 72%, #fff 28%);
  color: var(--scheme-ink);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
}

.scheme-delete-panel .list-item.scheme-tier-card .muted {
  min-width: 0;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.22;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scheme-delete-panel .list-item.scheme-tier-card .inline-actions {
  grid-column: 2;
  grid-row: 1 / span 3;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  margin-top: 0;
}

.scheme-delete-panel .list-item.scheme-tier-card button {
  min-height: 26px;
  padding: 0 7px;
  font-size: 12px;
}

.scheme-delete-panel .scheme-delete-panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: nowrap;
  min-width: max-content;
}

.scheme-delete-panel .scheme-delete-panel-actions select {
  width: 104px;
  min-height: 30px;
  padding: 0 6px;
  font-size: 12px;
}

.scheme-delete-panel .scheme-delete-panel-actions button {
  min-height: 30px;
  padding: 0 8px;
  font-size: 12px;
}

@media (max-width: 860px) {
  .scheme-lanes:not(.temporary-query-layout) .scheme-workbench-control-grid {
    grid-template-columns: 1fr;
  }

  .scheme-student-detail-inline {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .scheme-student-priority-row,
  .scheme-student-note-row,
  .scheme-result-search-strip,
  .scheme-result-search-strip .scheme-workbench-search-box,
  .scheme-workbench-filter-actions {
    grid-template-columns: 1fr;
  }

  .scheme-quick-access,
  .scheme-quick-filter-row,
  .scheme-quick-switch {
    grid-template-columns: 1fr;
  }

  .scheme-current-student-schemes,
  .scheme-recent-visits {
    justify-content: flex-start;
  }

  .scheme-current-student-schemes button,
  .scheme-recent-visits button {
    min-height: 44px;
  }

  .scheme-filter-grid.compact.secondary,
  .scheme-student-detail-inline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scheme-communication-record-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .scheme-communication-record-actions button {
    width: 100%;
  }

  .scheme-student-detail-inline span.is-wide {
    grid-column: 1 / -1;
  }
}

/* Scheme design page: orange flat theme inspired by gaokao.cn */
.content:has(.scheme-lanes) {
  --scheme-orange: #ff6a00;
  --scheme-orange-strong: #c2410c;
  --scheme-orange-soft: #fff2df;
  --scheme-amber: #f59e0b;
  --scheme-cyan: #0891b2;
  --scheme-cyan-soft: #e8fbff;
  --scheme-blue: #2563eb;
  --scheme-blue-soft: #eff6ff;
  --scheme-green: #16a34a;
  --scheme-green-soft: #ecfdf3;
  --scheme-red: #dc2626;
  --scheme-red-soft: #fff1f1;
  --scheme-ink: #2b1607;
  --scheme-muted: #8a5a2b;
  --scheme-line: #ffd6a7;
  --scheme-surface: #fffaf4;
  --scheme-surface-strong: #ffffff;
  background:
    linear-gradient(180deg, rgba(255, 106, 0, 0.10), rgba(255, 248, 240, 0) 260px),
    #fff8f1;
}

.content:has(.scheme-lanes) .scheme-lanes {
  color: var(--scheme-ink);
}

.content:has(.scheme-lanes) .scheme-workbench-main,
.content:has(.scheme-lanes) .scheme-delete-panel,
.content:has(.scheme-lanes) .scheme-workbench-control-panel,
.content:has(.scheme-lanes) .scheme-student-summary.focus,
.content:has(.scheme-lanes) .scheme-workbench-filter-secondary,
.content:has(.scheme-lanes) .scheme-result-search-strip .scheme-workbench-search-box,
.content:has(.scheme-lanes) .scheme-result-summary,
.content:has(.scheme-lanes) .scheme-group-detail-drawer {
  border-color: var(--scheme-line);
  background: var(--scheme-surface-strong);
  box-shadow: none;
}

.content:has(.scheme-lanes) .scheme-workbench-main > .panel-header,
.content:has(.scheme-lanes) .scheme-delete-panel > .panel-header,
.content:has(.scheme-lanes) .scheme-group-detail-header {
  border-color: var(--scheme-line);
  background:
    linear-gradient(90deg, rgba(255, 106, 0, 0.14), rgba(255, 176, 32, 0.10), rgba(8, 145, 178, 0.08)),
    #fffaf4;
}

.content:has(.scheme-lanes) .panel-title,
.content:has(.scheme-lanes) .scheme-filter-title,
.content:has(.scheme-lanes) .scheme-group-detail-title {
  color: var(--scheme-ink);
  font-weight: 800;
}

.content:has(.scheme-lanes) .muted,
.content:has(.scheme-lanes) .scheme-workbench-search-status,
.content:has(.scheme-lanes) .scheme-student-detail-inline b,
.content:has(.scheme-lanes) .scheme-student-identity-card span,
.content:has(.scheme-lanes) .scheme-student-focus-card span,
.content:has(.scheme-lanes) .scheme-student-note-item span,
.content:has(.scheme-lanes) .scheme-group-primary-item span,
.content:has(.scheme-lanes) .scheme-group-secondary-summary b,
.content:has(.scheme-lanes) .scheme-result-summary-item span {
  color: var(--scheme-muted);
}

.content:has(.scheme-lanes) button {
  border-color: #ffc083;
  background: #fff4e8;
  color: var(--scheme-orange-strong);
  box-shadow: none;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.content:has(.scheme-lanes) button:hover:not(:disabled) {
  border-color: #ff9a3d;
  background: #ffe2c2;
  color: #7c2d12;
  transform: translateY(-1px);
}

.content:has(.scheme-lanes) button:active:not(:disabled) {
  transform: translateY(0);
}

.content:has(.scheme-lanes) button:focus-visible,
.content:has(.scheme-lanes) input:focus,
.content:has(.scheme-lanes) select:focus,
.content:has(.scheme-lanes) .province-multi-trigger:focus {
  border-color: var(--scheme-orange);
  outline: 3px solid rgba(255, 106, 0, 0.18);
  outline-offset: 1px;
}

.content:has(.scheme-lanes) button.primary,
.content:has(.scheme-lanes) .scheme-workbench-filter-actions > .primary {
  border-color: var(--scheme-orange-strong);
  background: var(--scheme-orange-strong);
  color: #fff;
}

.content:has(.scheme-lanes) button.primary:hover:not(:disabled),
.content:has(.scheme-lanes) .scheme-workbench-filter-actions > .primary:hover:not(:disabled) {
  border-color: #9a3412;
  background: #9a3412;
  color: #fff;
}

.content:has(.scheme-lanes) button.danger,
.content:has(.scheme-lanes) .scheme-group-detail-actions .danger {
  border-color: #fecaca;
  background: var(--scheme-red-soft);
  color: var(--scheme-red);
}

.content:has(.scheme-lanes) button.danger:hover:not(:disabled),
.content:has(.scheme-lanes) .scheme-group-detail-actions .danger:hover:not(:disabled) {
  border-color: #f87171;
  background: #fee2e2;
  color: #991b1b;
}

.content:has(.scheme-lanes) input,
.content:has(.scheme-lanes) select,
.content:has(.scheme-lanes) .province-multi-trigger {
  border-color: #ffd5a3;
  background: #fffdfa;
  color: var(--scheme-ink);
  transition:
    border-color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease;
}

.content:has(.scheme-lanes) .scheme-top-predict {
  border-color: #ffca8d;
  background: #fff3e3;
}

.content:has(.scheme-lanes) .scheme-top-predict strong,
.content:has(.scheme-lanes) .scheme-student-identity-card strong,
.content:has(.scheme-lanes) .scheme-student-focus-card strong,
.content:has(.scheme-lanes) .scheme-student-note-item strong,
.content:has(.scheme-lanes) .scheme-group-primary-item strong {
  color: var(--scheme-ink);
}

.content:has(.scheme-lanes) .scheme-student-identity-card {
  border-color: #ffb46f;
  background: var(--scheme-orange-soft);
}

.content:has(.scheme-lanes) .scheme-student-identity-card em {
  background: var(--scheme-orange-strong);
  color: #fff;
}

.content:has(.scheme-lanes) .scheme-student-priority-row .scheme-student-focus-card {
  border-color: #ffe0bd;
  background: #fffaf2;
}

.content:has(.scheme-lanes) .scheme-student-priority-row .scheme-student-focus-card.is-score {
  border-color: #ff9f40;
  background: #fff0db;
}

.content:has(.scheme-lanes) .scheme-student-priority-row .scheme-student-focus-card.is-score strong {
  color: var(--scheme-orange-strong);
}

.content:has(.scheme-lanes) .scheme-student-priority-row .scheme-student-focus-card:nth-child(3) {
  border-color: #9ee6f1;
  background: var(--scheme-cyan-soft);
}

.content:has(.scheme-lanes) .scheme-student-priority-row .scheme-student-focus-card:nth-child(3) strong {
  color: var(--scheme-cyan);
}

.content:has(.scheme-lanes) .scheme-student-priority-row .scheme-student-focus-card.is-subject {
  border-color: #bfd7ff;
  background: var(--scheme-blue-soft);
}

.content:has(.scheme-lanes) .scheme-student-priority-row .scheme-student-focus-card.is-subject strong {
  color: #1d4ed8;
}

.content:has(.scheme-lanes) .scheme-student-note-row .scheme-student-note-item.is-intent {
  border-color: #ffb84d;
  background: #fff3cd;
}

.content:has(.scheme-lanes) .scheme-student-note-row .scheme-student-note-item.is-design-direction {
  border-color: #5eead4;
  background: #ccfbf1;
}

.content:has(.scheme-lanes) .scheme-student-note-row .scheme-student-note-item.is-intent strong {
  color: #7c2d12;
}

.content:has(.scheme-lanes) .scheme-student-detail-inline span,
.content:has(.scheme-lanes) .scheme-group-secondary-summary span {
  border-color: #ffe1bd;
  background: #fffaf2;
  color: var(--scheme-ink);
}

.content:has(.scheme-lanes) .scheme-student-detail-inline span:nth-child(4n + 1),
.content:has(.scheme-lanes) .scheme-group-secondary-summary span:nth-child(4n + 1) {
  border-color: #ffd19b;
  background: #fff3e3;
}

.content:has(.scheme-lanes) .scheme-student-detail-inline span:nth-child(4n + 2),
.content:has(.scheme-lanes) .scheme-group-secondary-summary span:nth-child(4n + 2) {
  border-color: #b7e9f3;
  background: var(--scheme-cyan-soft);
}

.content:has(.scheme-lanes) .scheme-student-detail-inline span:nth-child(4n + 3),
.content:has(.scheme-lanes) .scheme-group-secondary-summary span:nth-child(4n + 3) {
  border-color: #bfdbfe;
  background: var(--scheme-blue-soft);
}

.content:has(.scheme-lanes) .scheme-student-detail-inline span:nth-child(4n + 4),
.content:has(.scheme-lanes) .scheme-group-secondary-summary span:nth-child(4n + 4) {
  border-color: #bbf7d0;
  background: var(--scheme-green-soft);
}

.content:has(.scheme-lanes) .scheme-workbench-tier-focus .tier-offset-box {
  border-color: #ffb46f;
  background: #fffaf2;
}

.content:has(.scheme-lanes) .scheme-workbench-tier-focus .tier-offset-title {
  color: var(--scheme-orange-strong);
}

.content:has(.scheme-lanes) .scheme-workbench-tier-focus .tier-offset-card {
  border-color: #ffd9aa;
  background: #fff;
  box-shadow: none;
}

.content:has(.scheme-lanes) .scheme-workbench-tier-focus .tier-offset-card:nth-child(1) {
  border-color: #ffb199;
  background: #fff1ed;
}

.content:has(.scheme-lanes) .scheme-workbench-tier-focus .tier-offset-card:nth-child(2) {
  border-color: #9ee6f1;
  background: var(--scheme-cyan-soft);
}

.content:has(.scheme-lanes) .scheme-workbench-tier-focus .tier-offset-card:nth-child(3) {
  border-color: #bbf7d0;
  background: var(--scheme-green-soft);
}

.content:has(.scheme-lanes) .scheme-workbench-tier-focus .tier-offset-card strong b {
  color: var(--scheme-orange-strong);
}

.content:has(.scheme-lanes) .scheme-workbench-filter-secondary {
  background: #fffdf8;
}

.content:has(.scheme-lanes) .scheme-filter-grid.compact.secondary label {
  color: var(--scheme-muted);
}

.content:has(.scheme-lanes) .scheme-result-search-strip .scheme-workbench-search-box,
.content:has(.scheme-lanes) .scheme-result-summary {
  background: #fffaf3;
}

.content:has(.scheme-lanes) .scheme-result-summary-item {
  border-color: #ffdcb4;
  background: #fff;
}

.content:has(.scheme-lanes) .scheme-result-summary-item:nth-child(1) {
  background: #fff1df;
}

.content:has(.scheme-lanes) .scheme-result-summary-item:nth-child(2) {
  background: var(--scheme-cyan-soft);
}

.content:has(.scheme-lanes) .scheme-result-summary-item:nth-child(3) {
  background: var(--scheme-green-soft);
}

.content:has(.scheme-lanes) .scheme-result-summary-item strong {
  color: var(--scheme-orange-strong);
}

.content:has(.scheme-lanes) .scheme-result-summary-item:nth-child(2) strong {
  color: var(--scheme-cyan);
}

.content:has(.scheme-lanes) .scheme-result-summary-item:nth-child(3) strong {
  color: var(--scheme-green);
}

.content:has(.scheme-lanes) .scheme-workbench-table-wrap {
  border-color: var(--scheme-line);
  background: #fff;
}

.content:has(.scheme-lanes) .scheme-workbench-table-wrap th,
.content:has(.scheme-lanes) .scheme-group-major-table th {
  border-color: #ffd6a7;
  background: #fff0dc;
  color: #7c2d12;
}

.content:has(.scheme-lanes) .scheme-workbench-table-wrap td,
.content:has(.scheme-lanes) .scheme-group-major-table td {
  border-color: #ffe6c8;
  color: var(--scheme-ink);
}

.content:has(.scheme-lanes) tr.scheme-tier-row:hover td {
  background: color-mix(in srgb, var(--scheme-tier-color, #fff) 74%, #ffead5 26%);
}

.content:has(.scheme-lanes) tr.scheme-tier-row.is-selected td {
  background: color-mix(in srgb, var(--scheme-tier-color, #fff3e3) 62%, var(--scheme-orange) 18%, #fff 20%);
}

.content:has(.scheme-lanes) .scheme-sort-actions button,
.content:has(.scheme-lanes) .scheme-workbench-table-wrap td.actions button {
  border-color: #ffc083;
  background: #fff7ee;
}

.content:has(.scheme-lanes) .scheme-delete-panel .panel-body.list {
  background: #fff8f4;
}

.content:has(.scheme-lanes) .scheme-delete-panel .list-item.scheme-tier-card {
  border-color: color-mix(in srgb, var(--scheme-tier-color, #fca5a5) 58%, #fff 42%);
  border-left-color: color-mix(in srgb, var(--scheme-tier-color, #fca5a5) 78%, var(--scheme-ink) 22%);
  background: color-mix(in srgb, var(--scheme-tier-color, #fff) 42%, #fff 58%);
}

.content:has(.scheme-lanes) .scheme-delete-panel .list-item.scheme-tier-card.is-selected {
  background: color-mix(in srgb, var(--scheme-tier-color, #fff3e3) 54%, var(--scheme-orange) 18%, #fff 28%);
}

.content:has(.scheme-lanes) .scheme-delete-panel .list-item.scheme-tier-card strong {
  color: var(--scheme-ink);
}

.content:has(.scheme-lanes) .scheme-delete-panel .list-item.scheme-tier-card button:not(.danger) {
  border-color: #ffba7a;
  background: #fff7ed;
  color: var(--scheme-orange-strong);
}

.content:has(.scheme-lanes) .scheme-group-summary-compact,
.content:has(.scheme-lanes) .scheme-group-primary-item {
  border-color: #ffdcb4;
}

.content:has(.scheme-lanes) .scheme-group-primary-item {
  background: #fffaf2;
}

.content:has(.scheme-lanes) .scheme-group-primary-item:nth-child(3),
.content:has(.scheme-lanes) .scheme-group-primary-item:nth-child(4) {
  border-color: #ffb46f;
  background: #fff1df;
}

.content:has(.scheme-lanes) .scheme-group-primary-item:nth-child(3) strong,
.content:has(.scheme-lanes) .scheme-group-primary-item:nth-child(4) strong {
  color: var(--scheme-orange-strong);
}

@media (prefers-reduced-motion: reduce) {
  .content:has(.scheme-lanes) button,
  .content:has(.scheme-lanes) input,
  .content:has(.scheme-lanes) select,
  .content:has(.scheme-lanes) .province-multi-trigger {
    transition: none;
  }

  .content:has(.scheme-lanes) button:hover:not(:disabled) {
    transform: none;
  }
}

/* Scheme design page: simplified orange-white refinement */
.content:has(.scheme-lanes) {
  --scheme-orange: #f97316;
  --scheme-orange-strong: #c2410c;
  --scheme-orange-soft: #fff7ed;
  --scheme-orange-line: #fed7aa;
  --scheme-ink: #1f2937;
  --scheme-muted: #6b7280;
  --scheme-line: #e5e7eb;
  --scheme-surface: #f7f8fa;
  --scheme-surface-strong: #ffffff;
  background: var(--scheme-surface);
}

.content:has(.scheme-lanes) .scheme-workbench-main,
.content:has(.scheme-lanes) .scheme-delete-panel,
.content:has(.scheme-lanes) .scheme-workbench-control-panel,
.content:has(.scheme-lanes) .scheme-student-summary.focus,
.content:has(.scheme-lanes) .scheme-workbench-filter-secondary,
.content:has(.scheme-lanes) .scheme-result-search-strip .scheme-workbench-search-box,
.content:has(.scheme-lanes) .scheme-result-summary,
.content:has(.scheme-lanes) .scheme-group-detail-drawer,
.content:has(.scheme-lanes) .scheme-workbench-table-wrap {
  border-color: var(--scheme-line);
  background: var(--scheme-surface-strong);
  box-shadow: none;
}

.content:has(.scheme-lanes) .scheme-workbench-main > .panel-header,
.content:has(.scheme-lanes) .scheme-delete-panel > .panel-header,
.content:has(.scheme-lanes) .scheme-group-detail-header {
  border-color: var(--scheme-line);
  background: #fff;
}

.content:has(.scheme-lanes) .panel-title,
.content:has(.scheme-lanes) .scheme-filter-title,
.content:has(.scheme-lanes) .scheme-group-detail-title,
.content:has(.scheme-lanes) .scheme-student-identity-card strong,
.content:has(.scheme-lanes) .scheme-student-focus-card strong,
.content:has(.scheme-lanes) .scheme-student-note-item strong,
.content:has(.scheme-lanes) .scheme-group-primary-item strong {
  color: var(--scheme-ink);
}

.content:has(.scheme-lanes) .muted,
.content:has(.scheme-lanes) .scheme-workbench-search-status,
.content:has(.scheme-lanes) .scheme-student-detail-inline b,
.content:has(.scheme-lanes) .scheme-student-identity-card span,
.content:has(.scheme-lanes) .scheme-student-focus-card span,
.content:has(.scheme-lanes) .scheme-student-note-item span,
.content:has(.scheme-lanes) .scheme-group-primary-item span,
.content:has(.scheme-lanes) .scheme-group-secondary-summary b,
.content:has(.scheme-lanes) .scheme-result-summary-item span,
.content:has(.scheme-lanes) .scheme-filter-grid.compact.secondary label {
  color: var(--scheme-muted);
}

.content:has(.scheme-lanes) button {
  border-color: var(--scheme-orange-line);
  background: #fff;
  color: var(--scheme-orange-strong);
  box-shadow: none;
  transform: none;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.content:has(.scheme-lanes) button:hover:not(:disabled) {
  border-color: var(--scheme-orange);
  background: var(--scheme-orange-soft);
  color: var(--scheme-orange-strong);
  transform: none;
}

.content:has(.scheme-lanes) button.primary,
.content:has(.scheme-lanes) .scheme-workbench-filter-actions > .primary {
  border-color: var(--scheme-orange-strong);
  background: var(--scheme-orange-strong);
  color: #fff;
}

.content:has(.scheme-lanes) button.primary:hover:not(:disabled),
.content:has(.scheme-lanes) .scheme-workbench-filter-actions > .primary:hover:not(:disabled) {
  border-color: #9a3412;
  background: #9a3412;
  color: #fff;
}

.content:has(.scheme-lanes) input,
.content:has(.scheme-lanes) select,
.content:has(.scheme-lanes) .province-multi-trigger {
  border-color: var(--scheme-line);
  background: #fff;
  color: var(--scheme-ink);
  box-shadow: none;
}

.content:has(.scheme-lanes) input:focus,
.content:has(.scheme-lanes) select:focus,
.content:has(.scheme-lanes) .province-multi-trigger:focus,
.content:has(.scheme-lanes) button:focus-visible {
  border-color: var(--scheme-orange);
  outline: 3px solid rgba(249, 115, 22, 0.16);
  outline-offset: 1px;
}

.content:has(.scheme-lanes) .scheme-top-predict,
.content:has(.scheme-lanes) .scheme-quick-access,
.content:has(.scheme-lanes) .scheme-student-identity-card,
.content:has(.scheme-lanes) .scheme-student-priority-row .scheme-student-focus-card,
.content:has(.scheme-lanes) .scheme-workbench-tier-focus .tier-offset-card,
.content:has(.scheme-lanes) .scheme-student-detail-inline span,
.content:has(.scheme-lanes) .scheme-group-secondary-summary span,
.content:has(.scheme-lanes) .scheme-group-primary-item {
  border-color: var(--scheme-line);
  background: #fff;
}

.content:has(.scheme-lanes) .scheme-student-identity-card {
  border-left: 3px solid var(--scheme-orange);
}

.content:has(.scheme-lanes) .scheme-student-identity-card em {
  background: var(--scheme-orange-strong);
  color: #fff;
}

.content:has(.scheme-lanes) .scheme-student-priority-row .scheme-student-focus-card.is-score {
  border-color: var(--scheme-orange-line);
  background: var(--scheme-orange-soft);
}

.content:has(.scheme-lanes) .scheme-student-priority-row .scheme-student-focus-card.is-score strong,
.content:has(.scheme-lanes) .scheme-workbench-tier-focus .tier-offset-card strong b,
.content:has(.scheme-lanes) .scheme-result-summary-item strong,
.content:has(.scheme-lanes) .scheme-group-primary-item:nth-child(3) strong,
.content:has(.scheme-lanes) .scheme-group-primary-item:nth-child(4) strong {
  color: var(--scheme-orange-strong);
}

.content:has(.scheme-lanes) .scheme-student-priority-row .scheme-student-focus-card:nth-child(3),
.content:has(.scheme-lanes) .scheme-student-priority-row .scheme-student-focus-card.is-subject {
  border-color: var(--scheme-line);
  background: #fff;
}

.content:has(.scheme-lanes) .scheme-student-priority-row .scheme-student-focus-card:nth-child(3) strong,
.content:has(.scheme-lanes) .scheme-student-priority-row .scheme-student-focus-card.is-subject strong {
  color: var(--scheme-ink);
}

.content:has(.scheme-lanes) .scheme-student-note-row .scheme-student-note-item.is-intent {
  border-color: var(--scheme-orange-line);
  border-left: 3px solid var(--scheme-orange);
  background: var(--scheme-orange-soft);
}

.content:has(.scheme-lanes) .scheme-student-note-row .scheme-student-note-item.is-design-direction {
  border-color: rgba(13, 148, 136, 0.32);
  border-left: 3px solid #0d9488;
  background: #ccfbf1;
}

.content:has(.scheme-lanes) .scheme-communication-record {
  border-color: var(--scheme-orange-line);
  background: #fff;
}

.content:has(.scheme-lanes) .scheme-quick-access {
  border-color: var(--scheme-orange-line);
  background: #fff;
}

.content:has(.scheme-lanes) .scheme-quick-filter-row label {
  color: var(--scheme-ink);
}

.content:has(.scheme-lanes) .scheme-current-student-schemes span,
.content:has(.scheme-lanes) .scheme-current-student-schemes small,
.content:has(.scheme-lanes) .scheme-recent-visits span,
.content:has(.scheme-lanes) .scheme-recent-visits small {
  color: var(--scheme-muted);
}

.content:has(.scheme-lanes) .scheme-quick-filter-row select,
.content:has(.scheme-lanes) .scheme-quick-switch select {
  border-color: var(--scheme-orange-line);
  background: #fffaf7;
}

.content:has(.scheme-lanes) .scheme-current-student-schemes button,
.content:has(.scheme-lanes) .scheme-recent-visits button {
  border-color: #fed7aa;
  background: #fff7ed;
  color: var(--scheme-ink);
}

.content:has(.scheme-lanes) .scheme-communication-record-head label {
  color: var(--scheme-ink);
}

.content:has(.scheme-lanes) .scheme-communication-record-head span,
.content:has(.scheme-lanes) .scheme-communication-record-actions small {
  color: var(--scheme-muted);
}

.content:has(.scheme-lanes) .scheme-communication-record textarea {
  border-color: var(--scheme-orange-line);
  background: #fffaf7;
}

.content:has(.scheme-lanes) .scheme-communication-record textarea:focus {
  border-color: var(--scheme-orange);
  box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.14);
  outline: none;
}

.content:has(.scheme-lanes) .scheme-student-note-row .scheme-student-note-item.is-intent strong {
  color: var(--scheme-ink);
}

.content:has(.scheme-lanes) .scheme-student-detail-inline span:nth-child(n),
.content:has(.scheme-lanes) .scheme-group-secondary-summary span:nth-child(n) {
  border-color: var(--scheme-line);
  background: #fff;
  color: var(--scheme-ink);
}

.content:has(.scheme-lanes) .scheme-workbench-tier-focus .tier-offset-box {
  border-color: var(--scheme-line);
  background: #fff;
}

.content:has(.scheme-lanes) .scheme-workbench-tier-focus .tier-offset-title {
  color: var(--scheme-orange-strong);
}

.content:has(.scheme-lanes) .scheme-workbench-tier-focus .tier-offset-card:nth-child(n) {
  border-color: var(--scheme-line);
  background: #fff;
}

.content:has(.scheme-lanes) .scheme-workbench-filter-secondary,
.content:has(.scheme-lanes) .scheme-result-search-strip .scheme-workbench-search-box,
.content:has(.scheme-lanes) .scheme-result-summary,
.content:has(.scheme-lanes) .scheme-delete-panel .panel-body.list {
  background: #fff;
}

.content:has(.scheme-lanes) .scheme-result-summary-item:nth-child(n) {
  border-color: var(--scheme-line);
  background: #fff;
}

.content:has(.scheme-lanes) .scheme-result-summary-item {
  border-left: 3px solid var(--scheme-orange-line);
}

.content:has(.scheme-lanes) .scheme-result-summary-item:first-child {
  border-left-color: var(--scheme-orange);
  background: var(--scheme-orange-soft);
}

.content:has(.scheme-lanes) .scheme-workbench-table-wrap th,
.content:has(.scheme-lanes) .scheme-group-major-table th {
  border-color: var(--scheme-line);
  background: #fff7ed;
  color: #7c2d12;
}

.content:has(.scheme-lanes) .scheme-workbench-table-wrap td,
.content:has(.scheme-lanes) .scheme-group-major-table td {
  border-color: #edf0f3;
  color: var(--scheme-ink);
}

.content:has(.scheme-lanes) tr.scheme-tier-row td {
  background: color-mix(in srgb, var(--scheme-tier-color, #fff) 28%, #fff 72%);
}

.content:has(.scheme-lanes) tr.scheme-tier-row:hover td {
  background: color-mix(in srgb, var(--scheme-tier-color, #fff) 36%, #fff7ed 64%);
}

.content:has(.scheme-lanes) tr.scheme-tier-row.is-selected td {
  background: color-mix(in srgb, var(--scheme-tier-color, #fff) 32%, #ffedd5 68%);
}

.content:has(.scheme-lanes) .scheme-sort-actions button,
.content:has(.scheme-lanes) .scheme-workbench-table-wrap td.actions button {
  border-color: var(--scheme-orange-line);
  background: #fff;
}

.content:has(.scheme-lanes) button.danger,
.content:has(.scheme-lanes) .scheme-group-detail-actions .danger {
  border-color: #fecaca;
  background: #fff;
  color: #dc2626;
}

.content:has(.scheme-lanes) button.danger:hover:not(:disabled),
.content:has(.scheme-lanes) .scheme-group-detail-actions .danger:hover:not(:disabled) {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #b91c1c;
}

.content:has(.scheme-lanes) .scheme-delete-panel .list-item.scheme-tier-card {
  border-color: color-mix(in srgb, var(--scheme-tier-color, #fca5a5) 50%, var(--scheme-line) 50%);
  border-left-color: color-mix(in srgb, var(--scheme-tier-color, #fca5a5) 78%, var(--scheme-ink) 22%);
  background: color-mix(in srgb, var(--scheme-tier-color, #fff) 30%, #fff 70%);
}

.content:has(.scheme-lanes) .scheme-delete-panel .list-item.scheme-tier-card.is-selected {
  background: color-mix(in srgb, var(--scheme-tier-color, #fff) 38%, #ffedd5 62%);
}

.content:has(.scheme-lanes) .scheme-delete-panel .list-item.scheme-tier-card strong {
  color: var(--scheme-ink);
}

.content:has(.scheme-lanes) .scheme-delete-panel .list-item.scheme-tier-card button:not(.danger) {
  border-color: var(--scheme-orange-line);
  background: #fff;
  color: var(--scheme-orange-strong);
}

.content:has(.scheme-lanes) .scheme-group-primary-item:nth-child(3),
.content:has(.scheme-lanes) .scheme-group-primary-item:nth-child(4) {
  border-color: var(--scheme-orange-line);
  background: var(--scheme-orange-soft);
}

/* Scheme design page: balanced section tinting and readable tier colors */
.content:has(.scheme-lanes) {
  --scheme-zone-student: #ffefd6;
  --scheme-zone-filter: #edf4fb;
  --scheme-zone-search: #e8f1ff;
  --scheme-zone-stats-a: #ffedd5;
  --scheme-zone-stats-b: #ede9fe;
  --scheme-zone-stats-c: #dcfce7;
}

.content:has(.scheme-lanes) .scheme-student-summary.focus.is-direct {
  border-color: #f6bf83;
  background: var(--scheme-zone-student);
}

.content:has(.scheme-lanes) .scheme-student-summary.focus.is-direct .scheme-student-identity-card,
.content:has(.scheme-lanes) .scheme-student-summary.focus.is-direct .scheme-student-priority-row .scheme-student-focus-card,
.content:has(.scheme-lanes) .scheme-student-summary.focus.is-direct .scheme-student-detail-inline span {
  background: rgba(255, 255, 255, 0.78);
}

.content:has(.scheme-lanes) .scheme-student-summary.focus.is-direct .scheme-student-priority-row .scheme-student-focus-card.is-score {
  border-color: #fdba74;
  background: #ffe2bd;
}

.content:has(.scheme-lanes) .scheme-student-summary.focus.is-direct .scheme-student-note-row .scheme-student-note-item.is-intent {
  border-color: #fdba74;
  border-left-color: #ea580c;
  background: #ffe2bd;
}

.content:has(.scheme-lanes) .scheme-student-summary.focus.is-direct .scheme-student-note-row .scheme-student-note-item.is-design-direction {
  border-color: #5eead4;
  border-left-color: #0f766e;
  background: #ccfbf1;
}

.content:has(.scheme-lanes) .scheme-workbench-filter-secondary {
  border-color: #b8c6d8;
  background: var(--scheme-zone-filter);
}

.content:has(.scheme-lanes) .scheme-workbench-filter-secondary input,
.content:has(.scheme-lanes) .scheme-workbench-filter-secondary select,
.content:has(.scheme-lanes) .scheme-workbench-filter-secondary .province-multi-trigger {
  background: rgba(255, 255, 255, 0.82);
}

.content:has(.scheme-lanes) .scheme-result-search-strip .scheme-workbench-search-box {
  border-color: #b8cff4;
  background: var(--scheme-zone-search);
}

.content:has(.scheme-lanes) .scheme-result-search-strip .scheme-workbench-search-box select,
.content:has(.scheme-lanes) .scheme-result-search-strip .scheme-workbench-search-box input {
  background: rgba(255, 255, 255, 0.84);
}

.content:has(.scheme-lanes) .scheme-result-summary {
  background: #fff;
}

.content:has(.scheme-lanes) .scheme-result-summary-item:nth-child(1) {
  border-color: #fdba74;
  border-left-color: #ea580c;
  background: var(--scheme-zone-stats-a);
}

.content:has(.scheme-lanes) .scheme-result-summary-item:nth-child(2) {
  border-color: #c4b5fd;
  border-left-color: #7c3aed;
  background: var(--scheme-zone-stats-b);
}

.content:has(.scheme-lanes) .scheme-result-summary-item:nth-child(3) {
  border-color: #86efac;
  border-left-color: #16a34a;
  background: var(--scheme-zone-stats-c);
}

.content:has(.scheme-lanes) .scheme-result-summary-item:nth-child(1) strong {
  color: #9a3412;
}

.content:has(.scheme-lanes) .scheme-result-summary-item:nth-child(2) strong {
  color: #5b21b6;
}

.content:has(.scheme-lanes) .scheme-result-summary-item:nth-child(3) strong {
  color: #166534;
}

.content:has(.scheme-lanes) .scheme-workbench-tier-focus .tier-offset-card:nth-child(n) {
  border-color: var(--tier-offset-border, var(--scheme-line));
  background: var(--tier-offset-bg, #fff);
  color: var(--tier-offset-fg, var(--scheme-ink));
}

.content:has(.scheme-lanes) .scheme-workbench-tier-focus .tier-offset-card span,
.content:has(.scheme-lanes) .scheme-workbench-tier-focus .tier-offset-card em,
.content:has(.scheme-lanes) .scheme-workbench-tier-focus .tier-offset-card strong,
.content:has(.scheme-lanes) .scheme-workbench-tier-focus .tier-offset-card strong b,
.content:has(.scheme-lanes) .scheme-workbench-tier-focus .tier-offset-card strong small {
  color: var(--tier-offset-fg, var(--scheme-ink));
}

.content:has(.scheme-lanes) .scheme-workbench-tier-focus .tier-offset-actions button {
  border-color: color-mix(in srgb, var(--tier-offset-fg, #1f2937) 26%, transparent);
  background: color-mix(in srgb, var(--tier-offset-bg, #fff) 68%, #fff 32%);
  color: var(--tier-offset-fg, var(--scheme-ink));
}

.content:has(.scheme-lanes) .scheme-workbench-tier-focus .tier-offset-actions button:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--tier-offset-fg, #1f2937) 44%, transparent);
  background: color-mix(in srgb, var(--tier-offset-bg, #fff) 82%, #fff 18%);
  color: var(--tier-offset-fg, var(--scheme-ink));
}

.content:has(.scheme-lanes) .scheme-workbench-tier-focus .tier-offset-actions button:disabled {
  border-color: color-mix(in srgb, var(--tier-offset-fg, #1f2937) 14%, transparent);
  background: color-mix(in srgb, var(--tier-offset-bg, #fff) 42%, #fff 58%);
  color: color-mix(in srgb, var(--tier-offset-fg, var(--scheme-ink)) 52%, #fff 48%);
  cursor: not-allowed;
}

.content:has(.scheme-lanes) .scheme-workbench-tier-focus .tier-offset-limit {
  color: var(--tier-offset-fg, var(--scheme-ink));
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
  opacity: 0.96;
}

.content:has(.scheme-lanes) .scheme-workbench-tier-focus .tier-offset-limit.is-muted {
  font-weight: 700;
  opacity: 0.72;
}

/* Scheme workbench final polish */
html,
body,
button,
input,
select,
textarea,
table,
option,
optgroup {
  font-family: "Microsoft YaHei", "微软雅黑", "Segoe UI", Arial, sans-serif;
}

.content:has(.scheme-lanes) .scheme-workbench-tier-focus .tier-offset-title,
.content:has(.scheme-lanes) .scheme-workbench-filter-secondary > .scheme-filter-title {
  display: none;
}

.content:has(.scheme-lanes) .scheme-student-identity-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 13px 8px 6px;
  text-align: center;
}

.content:has(.scheme-lanes) .scheme-student-identity-card span {
  position: absolute;
  top: 5px;
  left: 7px;
  font-size: 11px;
  line-height: 1;
}

.content:has(.scheme-lanes) .scheme-student-identity-card strong {
  max-width: 100%;
  font-size: 19px;
  line-height: 1.05;
}

.content:has(.scheme-lanes) .scheme-student-identity-card em {
  display: none;
}

.content:has(.scheme-lanes) .scheme-student-detail-inline {
  gap: 3px;
}

.content:has(.scheme-lanes) .scheme-student-detail-inline span {
  align-items: flex-start;
  flex-wrap: wrap;
  min-height: 24px;
  height: auto;
  padding: 3px 6px;
  overflow: visible;
  font-size: 12px;
  line-height: 1.28;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.content:has(.scheme-lanes) .scheme-student-detail-inline b {
  flex: 0 0 auto;
  font-size: 11px;
  line-height: 1.28;
  white-space: nowrap;
}

.content:has(.scheme-lanes) .scheme-workbench-tier-focus .tier-offset-box {
  gap: 6px;
  padding: 8px;
}

.content:has(.scheme-lanes) .scheme-workbench-tier-focus .tier-offset-grid {
  gap: 8px;
}

.content:has(.scheme-lanes) .scheme-workbench-tier-focus .tier-offset-card {
  min-height: 76px;
  align-content: space-between;
  gap: 5px;
  padding: 8px 9px;
}

.content:has(.scheme-lanes) .scheme-workbench-tier-focus .tier-offset-card-head span {
  font-size: 13px;
  font-weight: 900;
  line-height: 1.05;
}

.content:has(.scheme-lanes) .scheme-workbench-tier-focus .tier-offset-count {
  font-size: 12px;
  font-weight: 900;
  line-height: 1.05;
}

.content:has(.scheme-lanes) .scheme-workbench-tier-focus .tier-offset-manual {
  display: block;
}

.content:has(.scheme-lanes) .scheme-workbench-tier-focus .tier-offset-manual input {
  min-height: 31px;
  border-color: color-mix(in srgb, var(--tier-offset-fg, #1f2937) 24%, transparent);
  background: color-mix(in srgb, var(--tier-offset-bg, #fff) 48%, #fff 52%);
  color: var(--tier-offset-fg, var(--scheme-ink));
  font-size: 15px;
  font-weight: 900;
}

.content:has(.scheme-lanes) .scheme-workbench-tier-focus .tier-offset-actions {
  gap: 6px;
}

.content:has(.scheme-lanes) .scheme-workbench-tier-focus .tier-offset-actions button {
  min-height: 26px;
  font-weight: 800;
}

.content:has(.scheme-lanes) .scheme-delete-panel {
  border-color: #fdba74;
  background: #fff4e6;
}

.content:has(.scheme-lanes) .scheme-delete-panel > .panel-header {
  border-color: #fdba74;
  background: #ffe4c2;
}

.content:has(.scheme-lanes) .scheme-delete-panel .panel-body.list {
  background: #fff4e6;
}

.content:has(.scheme-lanes) .scheme-delete-panel .empty {
  background: rgba(255, 255, 255, 0.55);
  border-radius: 6px;
}

.content:has(.scheme-lanes) .scheme-workbench-table-wrap tr.scheme-tier-row {
  height: 40px;
  background: color-mix(in srgb, var(--scheme-tier-color, #fff) 28%, #fff 72%);
}

.content:has(.scheme-lanes) .scheme-workbench-table-wrap tr.scheme-tier-row:hover {
  background: color-mix(in srgb, var(--scheme-tier-color, #fff) 36%, #fff7ed 64%);
}

.content:has(.scheme-lanes) .scheme-workbench-table-wrap tr.scheme-tier-row.is-selected {
  background: color-mix(in srgb, var(--scheme-tier-color, #fff) 32%, #ffedd5 68%);
  outline: 2px solid #111827;
  outline-offset: -2px;
}

.content:has(.scheme-lanes) .scheme-workbench-table-wrap tr.scheme-tier-row td {
  border-top: 1px solid #111827;
  border-right: 0;
  border-bottom: 1px solid #111827;
  border-left: 0;
  background: inherit;
  background-image: none;
  box-shadow: none;
}

.content:has(.scheme-lanes) .scheme-workbench-table-wrap tr.scheme-tier-row.is-selected td,
.content:has(.scheme-lanes) .scheme-workbench-table-wrap tr.scheme-tier-row.is-selected td:first-child {
  background: inherit;
  background-image: none;
  box-shadow: none;
}

.content:has(.scheme-lanes) .scheme-workbench-table-wrap td.actions {
  display: table-cell;
  vertical-align: middle;
  white-space: nowrap;
  background: inherit;
}

.content:has(.scheme-lanes) .scheme-workbench-table-wrap td.actions button + button {
  margin-left: 4px;
}

/* Scheme group detail: use tier tint only in the drawer header. */
.content:has(.scheme-lanes) .scheme-group-detail-drawer {
  --scheme-detail-tone: var(--scheme-tier-color, #fcd34d);
  --scheme-detail-tone-ink: color-mix(in srgb, var(--scheme-detail-tone) 62%, var(--scheme-ink) 38%);
  --scheme-detail-neutral-border: var(--scheme-line);
  --scheme-detail-neutral-bg: #fff;
  --scheme-detail-neutral-soft: #f8fafc;
  border-color: var(--scheme-detail-neutral-border);
}

.content:has(.scheme-lanes) .scheme-group-detail-drawer .scheme-group-detail-header {
  border-color: color-mix(in srgb, var(--scheme-detail-tone) 36%, var(--scheme-line) 64%);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--scheme-detail-tone) 30%, #fff 70%), rgba(255, 255, 255, 0.96) 72%),
    #fff;
}

.content:has(.scheme-lanes) .scheme-group-detail-drawer .scheme-group-detail-header .scheme-group-detail-title {
  color: var(--scheme-detail-tone-ink);
}

.content:has(.scheme-lanes) .scheme-group-detail-drawer .scheme-group-detail-actions button:not(#schemeGroupDetailClose) {
  border-color: color-mix(in srgb, var(--scheme-detail-tone) 58%, var(--scheme-line) 42%);
  background: color-mix(in srgb, var(--scheme-detail-tone) 24%, #fff 76%);
  color: var(--scheme-detail-tone-ink);
}

.content:has(.scheme-lanes) .scheme-group-detail-drawer .scheme-group-detail-actions button:not(#schemeGroupDetailClose):hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--scheme-detail-tone) 76%, var(--scheme-ink) 24%);
  background: color-mix(in srgb, var(--scheme-detail-tone) 36%, #fff 64%);
  color: color-mix(in srgb, var(--scheme-detail-tone) 48%, var(--scheme-ink) 52%);
}

.content:has(.scheme-lanes) .scheme-group-detail-drawer .scheme-group-detail-actions button:not(#schemeGroupDetailClose):focus-visible {
  border-color: color-mix(in srgb, var(--scheme-detail-tone) 78%, var(--scheme-ink) 22%);
  outline-color: color-mix(in srgb, var(--scheme-detail-tone) 34%, transparent);
}

.content:has(.scheme-lanes) .scheme-group-detail-drawer #schemeGroupDetailClose {
  border-color: #fecaca;
  background: #fff;
  color: #dc2626;
}

.content:has(.scheme-lanes) .scheme-group-detail-drawer #schemeGroupDetailClose:hover:not(:disabled) {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #b91c1c;
}

.content:has(.scheme-lanes) .scheme-group-detail-drawer .scheme-group-primary-item:nth-child(3),
.content:has(.scheme-lanes) .scheme-group-detail-drawer .scheme-group-primary-item:nth-child(4) {
  border-color: var(--scheme-detail-neutral-border);
  background: var(--scheme-detail-neutral-bg);
}

.content:has(.scheme-lanes) .scheme-group-detail-drawer .scheme-group-primary-item:nth-child(3) strong,
.content:has(.scheme-lanes) .scheme-group-detail-drawer .scheme-group-primary-item:nth-child(4) strong {
  color: var(--scheme-ink);
}

.content:has(.scheme-lanes) .scheme-group-detail-drawer .scheme-group-secondary-summary span {
  border-color: var(--scheme-detail-neutral-border);
  background: var(--scheme-detail-neutral-bg);
}

.content:has(.scheme-lanes) .scheme-group-detail-drawer .scheme-group-major-table th {
  border-color: var(--scheme-detail-neutral-border);
  background: var(--scheme-detail-neutral-soft);
  color: var(--scheme-muted);
}

.content:has(.scheme-lanes) .scheme-group-detail-drawer .scheme-group-major-table td {
  border-color: #edf0f3;
  background: #fff;
}

/* Scheme workbench scroll regression fix */
.content:has(.scheme-lanes) {
  --scheme-delete-panel-width: 360px;
  --scheme-lanes-gap: 14px;
  height: auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.content:has(.scheme-lanes) .scheme-lanes {
  min-height: max-content;
}

.content:has(.scheme-lanes) .scheme-lanes:not(.temporary-query-layout) {
  grid-template-columns: minmax(0, 1fr) var(--scheme-delete-panel-width);
  gap: var(--scheme-lanes-gap);
}

.content:has(.scheme-lanes) .scheme-workbench-main,
.content:has(.scheme-lanes) .scheme-workbench-main > .panel-body {
  min-width: 0;
}

.content:has(.scheme-lanes) .scheme-delete-panel {
  width: var(--scheme-delete-panel-width);
  min-width: 0;
}

.content:has(.scheme-lanes) .scheme-workbench-table-wrap {
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: visible;
}

.content:has(.scheme-lanes) .scheme-workbench-table-wrap table {
  width: 100%;
  min-width: 100%;
  table-layout: fixed;
}

.content:has(.scheme-lanes) .scheme-workbench-table-wrap col.scheme-col-sort {
  width: 184px;
}

.content:has(.scheme-lanes) .scheme-workbench-table-wrap col.scheme-col-school_name {
  width: 14%;
}

.content:has(.scheme-lanes) .scheme-workbench-table-wrap col.scheme-col-school_code,
.content:has(.scheme-lanes) .scheme-workbench-table-wrap col.scheme-col-group_code {
  width: 6.4%;
}

.content:has(.scheme-lanes) .scheme-workbench-table-wrap col.scheme-col-tier,
.content:has(.scheme-lanes) .scheme-workbench-table-wrap col.scheme-col-score_gap,
.content:has(.scheme-lanes) .scheme-workbench-table-wrap col.scheme-col-city,
.content:has(.scheme-lanes) .scheme-workbench-table-wrap col.scheme-col-province,
.content:has(.scheme-lanes) .scheme-workbench-table-wrap col.scheme-col-nature,
.content:has(.scheme-lanes) .scheme-workbench-table-wrap col.scheme-col-level,
.content:has(.scheme-lanes) .scheme-workbench-table-wrap col.scheme-col-subject {
  width: 4.2%;
}

.content:has(.scheme-lanes) .scheme-workbench-table-wrap col.scheme-col-predict_score,
.content:has(.scheme-lanes) .scheme-workbench-table-wrap col.scheme-col-batch {
  width: 5.2%;
}

.content:has(.scheme-lanes) .scheme-workbench-table-wrap col.scheme-col-tuition_range {
  width: 9%;
}

.content:has(.scheme-lanes) .scheme-workbench-table-wrap col.scheme-col-subjects_required {
  width: 7%;
}

.content:has(.scheme-lanes) .scheme-workbench-table-wrap col.scheme-col-training_mode {
  width: 8%;
}

.content:has(.scheme-lanes) .scheme-workbench-table-wrap col.scheme-col-major_names {
  width: 18%;
}

.content:has(.scheme-lanes) .scheme-workbench-table-wrap col.scheme-col-actions {
  width: 96px;
}

.content:has(.scheme-lanes) .scheme-workbench-table-wrap th,
.content:has(.scheme-lanes) .scheme-workbench-table-wrap td {
  padding: 7px 6px;
  height: 40px;
  max-height: 40px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: normal;
  line-height: 1.35;
}

.content:has(.scheme-lanes) .scheme-workbench-table-wrap .scheme-sort-actions {
  grid-template-columns: 22px repeat(6, 22px);
  width: 181px;
  min-width: 0;
  gap: 3px;
}

.content:has(.scheme-lanes) .scheme-workbench-table-wrap .scheme-sort-actions button,
.content:has(.scheme-lanes) .scheme-workbench-table-wrap td.actions button {
  min-width: 0;
  min-height: 26px;
  padding: 4px 5px;
}

.content:has(.scheme-lanes) .scheme-workbench-table-wrap .scheme-sort-actions button {
  width: 22px;
  padding: 0;
}

.content:has(.scheme-lanes) .scheme-workbench-table-wrap .scheme-sort-actions .scheme-sort-clear {
  width: 22px;
  min-width: 0;
  min-height: 26px;
  padding: 0;
  font-size: 14px;
  line-height: 1;
}

.content:has(.scheme-lanes) .scheme-workbench-table-wrap .scheme-sort-manual-badge {
  display: none;
}

.content:has(.scheme-lanes) .scheme-workbench-table-wrap .scheme-major-names-cell {
  max-width: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.content:has(.scheme-lanes) .scheme-workbench-table-wrap td.actions {
  white-space: nowrap;
}

.content:has(.scheme-lanes) .scheme-workbench-table-wrap td.actions button {
  width: auto;
}

.content:has(.scheme-lanes) .scheme-workbench-table-wrap td.actions button + button {
  margin-left: 0;
}

.content:has(.scheme-lanes) .scheme-group-detail-drawer:not(.is-temporary-query) {
  right: calc(18px + var(--scheme-delete-panel-width) + var(--scheme-lanes-gap));
}

@media (max-width: 1480px) {
  .content:has(.scheme-lanes) .scheme-lanes:not(.temporary-query-layout) {
    grid-template-columns: 1fr;
  }

  .content:has(.scheme-lanes) .scheme-delete-panel {
    position: static;
    width: auto;
    max-height: none;
  }

  .content:has(.scheme-lanes) .scheme-delete-panel .panel-body.list {
    max-height: 360px;
  }

  .content:has(.scheme-lanes) .scheme-group-detail-drawer:not(.is-temporary-query) {
    right: 18px;
  }
}

/* Temporary query reselect buttons need a distinct selected state inside the scheme page theme. */
.content:has(.scheme-lanes) .temporary-query-inputs [data-temporary-reselect].active {
  border-color: #ea580c;
  background: #ea580c;
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.34);
}

.content:has(.scheme-lanes) .temporary-query-inputs [data-temporary-reselect].active:hover:not(:disabled) {
  border-color: #c2410c;
  background: #c2410c;
  color: #fff;
}

.content:has(.scheme-lanes) .scheme-ai-group-badge,
.content:has(.scheme-lanes) .scheme-ai-deleted-bucket-badge {
  box-shadow: none;
}

.content:has(.scheme-lanes) .scheme-ai-group-badge.high,
.content:has(.scheme-lanes) .scheme-ai-deleted-bucket-badge.high {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.content:has(.scheme-lanes) .scheme-ai-group-badge.medium,
.content:has(.scheme-lanes) .scheme-ai-deleted-bucket-badge.medium {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.content:has(.scheme-lanes) .scheme-ai-group-badge.low,
.content:has(.scheme-lanes) .scheme-ai-group-badge.none,
.content:has(.scheme-lanes) .scheme-ai-deleted-bucket-badge.low,
.content:has(.scheme-lanes) .scheme-ai-deleted-bucket-badge.none {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.content:has(.scheme-lanes) .scheme-ai-group-badge.running,
.content:has(.scheme-lanes) .scheme-ai-deleted-bucket-badge.running {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.content:has(.scheme-lanes) .scheme-ai-group-badge.failed,
.content:has(.scheme-lanes) .scheme-ai-deleted-bucket-badge.failed {
  border-color: #fecaca;
  background: #fee2e2;
  color: #991b1b;
}

.content:has(.scheme-lanes) .scheme-ai-group-badge.high:hover:not(:disabled),
.content:has(.scheme-lanes) .scheme-ai-deleted-bucket-badge.high:hover:not(:disabled),
.content:has(.scheme-lanes) .scheme-ai-group-badge.failed:hover:not(:disabled),
.content:has(.scheme-lanes) .scheme-ai-deleted-bucket-badge.failed:hover:not(:disabled) {
  border-color: #fca5a5;
  background: #fee2e2;
  color: #991b1b;
}

.content:has(.scheme-lanes) .scheme-ai-group-badge.medium:hover:not(:disabled),
.content:has(.scheme-lanes) .scheme-ai-deleted-bucket-badge.medium:hover:not(:disabled) {
  border-color: #fdba74;
  background: #ffedd5;
  color: #9a3412;
}

.content:has(.scheme-lanes) .scheme-ai-group-badge.low:hover:not(:disabled),
.content:has(.scheme-lanes) .scheme-ai-group-badge.none:hover:not(:disabled),
.content:has(.scheme-lanes) .scheme-ai-deleted-bucket-badge.low:hover:not(:disabled),
.content:has(.scheme-lanes) .scheme-ai-deleted-bucket-badge.none:hover:not(:disabled) {
  border-color: #86efac;
  background: #dcfce7;
  color: #166534;
}

.modal-backdrop:has(.modal-scheme-ai) {
  pointer-events: none;
  place-items: stretch end;
  padding: 12px;
  background: transparent;
  backdrop-filter: none;
}

.modal-scheme-ai {
  display: flex;
  width: min(560px, calc(100vw - 24px));
  height: calc(100vh - 24px);
  height: calc(100dvh - 24px);
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  flex-direction: column;
  overflow: hidden;
  pointer-events: auto;
}

.modal-scheme-ai .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
}

.scheme-ai-review {
  display: grid;
  gap: 14px;
  color: #172033;
}

.scheme-ai-summary {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
}

.scheme-ai-summary span,
.scheme-ai-section h4,
.scheme-ai-grid h4 {
  margin: 0;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 800;
}

.scheme-ai-summary strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
  line-height: 1.2;
}

.scheme-ai-summary p,
.scheme-ai-item p,
.scheme-ai-action p {
  margin: 0;
  line-height: 1.55;
  white-space: pre-wrap;
}

.scheme-ai-target-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.scheme-ai-target-summary span {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.scheme-ai-target-summary .todo {
  background: #fef3c7;
  color: #92400e;
}

.scheme-ai-target-summary .handled {
  background: #dcfce7;
  color: #166534;
}

.scheme-ai-target-summary .missing,
.scheme-ai-target-summary .unknown {
  background: #f1f5f9;
  color: #475569;
}

.scheme-ai-coverage {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  background: #f0fdf4;
}

.scheme-ai-coverage.incomplete {
  border-color: #fecaca;
  background: #fef2f2;
}

.scheme-ai-coverage strong {
  color: #166534;
  font-size: 13px;
}

.scheme-ai-coverage.incomplete strong {
  color: #991b1b;
}

.scheme-ai-coverage div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.scheme-ai-coverage span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 12px;
  font-weight: 700;
}

.scheme-ai-coverage.incomplete span {
  background: #fee2e2;
  color: #991b1b;
}

.scheme-ai-time-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.scheme-ai-time-grid > div {
  min-width: 0;
  padding: 9px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.scheme-ai-time-grid span {
  display: block;
  margin-bottom: 3px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.scheme-ai-time-grid strong {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  color: #172033;
  font-size: 13px;
  line-height: 1.35;
}

.scheme-ai-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.scheme-ai-grid section,
.scheme-ai-section {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}

.scheme-ai-requirement {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  background: #eef2ff;
}

.scheme-ai-requirement h4 {
  margin: 0;
  color: #3730a3;
  font-size: 13px;
  font-weight: 800;
}

.scheme-ai-requirement pre {
  overflow: auto;
  max-height: 180px;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: #1e1b4b;
  font: inherit;
  line-height: 1.55;
}

.scheme-ai-grid ul,
.scheme-ai-section ul {
  margin: 0;
  padding-left: 18px;
  line-height: 1.55;
}

.scheme-ai-item,
.scheme-ai-action {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-left: 4px solid #94a3b8;
  border-radius: 7px;
  background: #f8fafc;
}

.scheme-ai-item.severity-high {
  border-left-color: #dc2626;
}

.scheme-ai-item.severity-medium {
  border-left-color: #d97706;
}

.scheme-ai-item.severity-low {
  border-left-color: #2563eb;
}

.scheme-ai-action {
  border-left-color: #16a34a;
  background: #f0fdf4;
}

.scheme-ai-item.target-handled,
.scheme-ai-action.target-handled {
  border-left-color: #16a34a;
  background: #f0fdf4;
}

.scheme-ai-item.target-missing,
.scheme-ai-action.target-missing,
.scheme-ai-item.target-unknown,
.scheme-ai-action.target-unknown {
  border-left-color: #64748b;
  background: #f1f5f9;
}

.scheme-ai-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.scheme-ai-item-head strong {
  min-width: 0;
  font-size: 14px;
  line-height: 1.35;
}

.scheme-ai-item-head span {
  flex: 0 0 auto;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.scheme-ai-item-badges {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.scheme-ai-item-head .scheme-ai-target-status.todo {
  background: #fef3c7;
  color: #92400e;
}

.scheme-ai-item-head .scheme-ai-target-status.handled {
  background: #dcfce7;
  color: #166534;
}

.scheme-ai-item-head .scheme-ai-target-status.missing,
.scheme-ai-item-head .scheme-ai-target-status.unknown {
  background: #f1f5f9;
  color: #475569;
}

.scheme-ai-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.scheme-ai-meta span {
  padding: 3px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
}

.scheme-ai-item-actions {
  display: flex;
  justify-content: flex-start;
}

.scheme-ai-locate-btn {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid #2563eb;
  border-radius: 6px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 800;
}

.scheme-ai-locate-btn:hover {
  background: #dbeafe;
}

.scheme-ai-progress {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 20px;
}

.scheme-ai-progress span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2563eb;
  animation: scheme-ai-progress-pulse 1s infinite ease-in-out;
}

.scheme-ai-progress span:nth-child(2) {
  animation-delay: .15s;
}

.scheme-ai-progress span:nth-child(3) {
  animation-delay: .3s;
}

@keyframes scheme-ai-progress-pulse {
  0%, 80%, 100% {
    opacity: .32;
    transform: scale(.86);
  }
  40% {
    opacity: 1;
    transform: scale(1);
  }
}

.scheme-tier-row.scheme-ai-located td,
.scheme-lanes > aside .list-item.scheme-tier-card.scheme-ai-located {
  animation: scheme-ai-located-flash 2.2s ease;
}

@keyframes scheme-ai-located-flash {
  0%, 100% {
    box-shadow: none;
  }
  20%, 70% {
    box-shadow: inset 0 0 0 3px #2563eb;
  }
}

@media (max-width: 720px) {
  .scheme-ai-grid {
    grid-template-columns: 1fr;
  }

  .scheme-ai-item-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

.vr-workspace {
  display: grid;
  gap: 14px;
}

.vr-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.vr-stats > div {
  display: grid;
  gap: 3px;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #f8fafc;
}

.vr-stats strong {
  font-size: 22px;
  line-height: 1.1;
}

.vr-stats span {
  color: #64748b;
  font-size: 12px;
}

.vr-link-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid #99f6e4;
  border-radius: 8px;
  background: #f0fdfa;
}

.vr-link-panel > div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.vr-link-panel span,
.vr-link-item code {
  color: #0f766e;
  word-break: break-all;
}

.vr-link-list {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.vr-link-item {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #ffffff;
}

.vr-link-item.is-active {
  border-left: 3px solid #0f766e;
}

.vr-link-item.is-paused {
  border-left: 3px solid #94a3b8;
  background: #f8fafc;
}

.vr-link-item-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.vr-link-item-main > div {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  min-width: 0;
}

.vr-link-item-main strong {
  color: #0f172a;
  font-size: 13px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vr-link-item-main span {
  color: #64748b;
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 800;
}

.vr-link-item code {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vr-link-item-actions {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.vr-link-item-actions button {
  min-height: 30px;
  padding: 5px 7px;
}

.vr-result-link-panel {
  display: grid;
  align-items: center;
  gap: 10px;
  grid-template-columns: minmax(170px, .8fr) auto minmax(260px, 1.7fr);
  padding: 10px 12px;
  border: 1px solid #bfd8e6;
  border-radius: 8px;
  background: linear-gradient(180deg, #f4fbff, #eef7fb);
}

.vr-result-link-panel > div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.vr-result-link-panel strong {
  font-size: 14px;
  color: #0f3d5e;
}

.vr-result-link-panel .inline-actions {
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.vr-result-link-panel span,
.vr-result-link-url {
  color: #4b5563;
  font-size: 12px;
}

.vr-result-link-url {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vr-result-link-url code {
  display: block;
  min-width: 0;
  overflow: hidden;
  padding: 8px 10px;
  border: 1px solid #d6e1ea;
  border-radius: 8px;
  background: #fff;
  color: #0f766e;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vr-orders-panel.panel {
  margin-top: 0;
}

.vr-orders-table table,
.vr-link-table table,
.vr-edit-table table {
  min-width: 980px;
}

.modal-volunteer-review {
  width: min(1480px, calc(100vw - 24px));
  max-height: min(92vh, 1020px);
}

.modal-volunteer-review .modal-body {
  max-height: min(calc(92vh - 56px), 964px);
  overflow: auto;
}

.vr-order-editor {
  display: grid;
  gap: 12px;
}

.vr-detail {
  display: grid;
  gap: 16px;
}

.vr-detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 8px;
}

.vr-version-switch {
  display: grid;
  gap: 4px;
  min-width: 240px;
}

.vr-version-switch select {
  min-width: 240px;
}

.vr-scroll-hint {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
}

.vr-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 6px 0 2px;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,255,255,.94));
  backdrop-filter: blur(10px);
}

.vr-summary > div {
  display: grid;
  align-items: center;
  column-gap: 10px;
  grid-template-columns: 72px minmax(0, 1fr);
  grid-template-areas:
    "label value"
    "label note";
  min-height: 58px;
  padding: 9px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
}

.vr-summary span,
.vr-detail-section h4 {
  margin: 0;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 800;
}

.vr-summary span {
  grid-area: label;
}

.vr-summary strong {
  grid-area: value;
  font-size: 18px;
  line-height: 1.2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vr-summary small {
  color: #475569;
  grid-area: note;
  line-height: 1.45;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vr-profile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid #dbeafe;
  border-radius: 8px;
}

.vr-profile-grid > div {
  display: grid;
  align-items: center;
  gap: 8px;
  grid-template-columns: 86px minmax(0, 1fr);
  min-height: 36px;
  min-width: 0;
  padding: 7px 10px;
  border-bottom: 1px solid #e5edf7;
  border-right: 1px solid #e5edf7;
  background: #ffffff;
}

.vr-profile-grid span {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vr-profile-grid strong {
  color: #0f172a;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.vr-detail-section {
  display: grid;
  gap: 12px;
}

.vr-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 12px;
  align-items: start;
}

.vr-detail-column {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.vr-detail-side {
  position: sticky;
  top: 76px;
  display: grid;
  gap: 10px;
  align-self: start;
}

.vr-detail-side-card {
  display: grid;
  gap: 6px;
  padding: 12px 13px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.05);
}

.vr-detail-side-card strong {
  color: #1d4ed8;
  font-size: 13px;
}

.vr-detail-side-card p {
  margin: 0;
  color: #475569;
  line-height: 1.55;
}

.vr-detail-section h4 {
  position: sticky;
  top: 76px;
  z-index: 1;
  margin: 0;
  padding: 8px 0 6px;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,255,255,.94));
}

.vr-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.vr-stats > div {
  display: grid;
  gap: 4px;
  min-height: 78px;
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
}

.vr-stats strong {
  font-size: 18px;
  line-height: 1.1;
}

.vr-stats span {
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
}

.vr-detail .table-wrap {
  overflow: auto;
  max-width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.vr-detail .table-wrap table {
  min-width: 1180px;
}

.vr-detail .vr-review-table-wrap {
  overflow-x: scroll;
  overflow-y: auto;
  padding-bottom: 10px;
  cursor: grab;
  scrollbar-color: #2563eb #dbeafe;
  scrollbar-width: auto;
  scrollbar-gutter: stable both-edges;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.vr-detail .vr-review-table-wrap.is-dragging {
  cursor: grabbing;
  user-select: none;
}

.vr-detail .vr-review-table-wrap table {
  min-width: 1760px;
}

.vr-review-table-wrap th:nth-child(2),
.vr-review-table-wrap td:nth-child(2) {
  min-width: 280px;
}

.vr-review-table-wrap th:nth-child(7),
.vr-review-table-wrap td:nth-child(7),
.vr-review-table-wrap th:nth-child(8),
.vr-review-table-wrap td:nth-child(8) {
  min-width: 360px;
  white-space: normal;
}

.vr-review-table-wrap::-webkit-scrollbar {
  height: 14px;
}

.vr-review-table-wrap::-webkit-scrollbar-track {
  border-radius: 999px;
  background: #dbeafe;
}

.vr-review-table-wrap::-webkit-scrollbar-thumb {
  border: 3px solid #dbeafe;
  border-radius: 999px;
  background: #2563eb;
}

.vr-review-table-wrap::-webkit-scrollbar-thumb:hover {
  background: #1d4ed8;
}

.vr-detail .table-wrap th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.vr-major {
  display: inline-block;
  margin: 0 5px 5px 0;
  padding: 2px 6px;
  border-radius: 6px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
}

tr.is-muted {
  color: #94a3b8;
  background: #f8fafc;
}

.vr-finding {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-left: 4px solid #94a3b8;
  border-radius: 7px;
  background: #fff;
}

.vr-finding.severity-high {
  border-left-color: #dc2626;
  background: #fff7f7;
}

.vr-finding.severity-medium {
  border-left-color: #d97706;
  background: #fffbeb;
}

.vr-finding.severity-low {
  border-left-color: #2563eb;
}

.vr-finding.status-applied,
.vr-finding.status-accepted,
.vr-finding.status-ignored {
  opacity: .72;
}

.vr-finding-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.vr-finding p {
  margin: 0;
  line-height: 1.55;
  white-space: pre-wrap;
}

.vr-finding-head span {
  flex: 0 0 auto;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 900px) {
  .vr-stats,
  .vr-profile-grid,
  .vr-summary {
    grid-template-columns: 1fr;
  }

  .vr-result-link-panel {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .vr-detail-grid {
    grid-template-columns: 1fr;
  }

  .modal-volunteer-review {
    width: calc(100vw - 16px);
  }

  .modal-volunteer-review .modal-body {
    max-height: 84vh;
  }

  .vr-detail-section h4 {
    top: 0;
  }

  .vr-detail-side {
    position: static;
  }

  .vr-link-panel,
  .vr-finding-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .vr-detail-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .vr-version-switch,
  .vr-version-switch select {
    width: 100%;
    min-width: 0;
  }
}

/* 20260715 candidate-first dashboard and 360-degree service workspace. */
.content:has(.service-dashboard-page) {
  background: linear-gradient(180deg, #f8fafc 0%, #eef4f8 100%);
}

.service-dashboard-page {
  --service-ink: #0f172a;
  --service-muted: #64748b;
  --service-line: #dbe4ee;
  --service-blue: #0369a1;
  --service-blue-soft: #eaf5fb;
  --service-green: #087443;
  --service-green-soft: #eaf7f0;
  --service-amber: #9a5b00;
  --service-amber-soft: #fff7df;
  --service-red: #b42318;
  --service-red-soft: #fff1f0;
  color: var(--service-ink);
  display: grid;
  gap: 16px;
}

.service-dashboard-hero {
  align-items: end;
  background: linear-gradient(135deg, #ffffff 0%, #f1f7fb 68%, #eef7f4 100%);
  border: 1px solid var(--service-line);
  border-radius: 10px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.07);
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 24px;
}

.service-dashboard-kicker {
  color: var(--service-blue);
  display: block;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.service-dashboard-hero h2 {
  color: var(--service-ink);
  font-size: clamp(24px, 2vw, 32px);
  line-height: 1.2;
  margin: 6px 0 8px;
}

.service-dashboard-hero p {
  color: var(--service-muted);
  line-height: 1.6;
  margin: 0;
}

.service-dashboard-actions {
  display: flex;
  gap: 10px;
}

.service-dashboard-actions button,
.service-dashboard-error button {
  min-height: 44px;
}

.service-dashboard-error {
  align-items: center;
  background: var(--service-red-soft);
  border: 1px solid #f4b8b3;
  border-radius: 8px;
  color: var(--service-red);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px 14px;
}

.service-dashboard-metrics {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
}

.service-dashboard-metric {
  background: #ffffff;
  border: 1px solid var(--service-line);
  border-top: 3px solid #94a3b8;
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.045);
  display: grid;
  gap: 3px;
  min-height: 104px;
  padding: 15px;
}

.service-dashboard-metric strong {
  color: var(--service-ink);
  font-size: 28px;
  line-height: 1;
}

.service-dashboard-metric span {
  font-size: 13px;
  font-weight: 850;
}

.service-dashboard-metric small {
  color: var(--service-muted);
  font-size: 11px;
}

.service-dashboard-metric.is-danger {
  background: linear-gradient(180deg, #ffffff 0%, var(--service-red-soft) 100%);
  border-top-color: var(--service-red);
}

.service-dashboard-metric.is-warn {
  background: linear-gradient(180deg, #ffffff 0%, var(--service-amber-soft) 100%);
  border-top-color: var(--service-amber);
}

.service-dashboard-metric.is-info {
  background: linear-gradient(180deg, #ffffff 0%, var(--service-blue-soft) 100%);
  border-top-color: var(--service-blue);
}

.service-pipeline {
  background: #ffffff;
  border: 1px solid var(--service-line);
  border-radius: 10px;
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(6, minmax(110px, 1fr));
  overflow: hidden;
}

.service-pipeline button {
  background: #ffffff;
  border: 0;
  border-right: 1px solid var(--service-line);
  border-radius: 0;
  display: grid;
  gap: 4px;
  min-height: 72px;
  padding: 12px 14px;
  text-align: left;
}

.service-pipeline button:last-child {
  border-right: 0;
}

.service-pipeline button:hover {
  background: #f1f7fb;
}

.service-pipeline strong {
  color: var(--service-blue);
  font-size: 21px;
}

.service-pipeline span {
  color: var(--service-muted);
  font-size: 12px;
  font-weight: 800;
}

.service-dashboard-workspace {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
}

.service-dashboard-panel {
  background: #ffffff;
  border: 1px solid var(--service-line);
  border-radius: 10px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.055);
  min-width: 0;
  overflow: hidden;
}

.service-dashboard-panel-head {
  align-items: end;
  background: #f8fafc;
  border-bottom: 1px solid var(--service-line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 15px 17px;
}

.service-dashboard-panel-head span,
.service-dashboard-panel-head small {
  color: var(--service-muted);
  font-size: 11px;
  font-weight: 800;
}

.service-dashboard-panel-head h3 {
  color: var(--service-ink);
  font-size: 18px;
  margin: 3px 0 0;
}

.service-task-list,
.service-student-list {
  display: grid;
}

.service-task-row {
  align-items: center;
  border-bottom: 1px solid #edf2f7;
  display: grid;
  gap: 12px;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  min-height: 70px;
  padding: 12px 16px;
}

.service-task-row:last-child,
.service-student-card:last-child {
  border-bottom: 0;
}

.service-task-row.is-overdue {
  background: var(--service-red-soft);
}

.service-task-row.is-today {
  background: var(--service-amber-soft);
}

.service-task-check,
.student-service-task-check {
  background: #ffffff;
  border: 2px solid #94a3b8;
  border-radius: 50%;
  height: 24px;
  min-height: 24px;
  padding: 0;
  width: 24px;
}

.service-task-check:hover,
.student-service-task-check:hover {
  background: var(--service-green-soft);
  border-color: var(--service-green);
}

.service-task-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.service-task-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-task-student {
  background: transparent;
  border: 0;
  color: var(--service-blue);
  justify-self: start;
  min-height: 0;
  padding: 0;
}

.service-task-meta {
  align-items: end;
  display: grid;
  gap: 5px;
  justify-items: end;
}

.service-task-meta time,
.student-service-task time {
  color: var(--service-muted);
  font-size: 11px;
}

.task-priority {
  background: #f1f5f9;
  border-radius: 999px;
  color: #475569;
  font-size: 10px;
  font-weight: 850;
  padding: 3px 7px;
  white-space: nowrap;
}

.task-priority.high {
  background: var(--service-amber-soft);
  color: var(--service-amber);
}

.task-priority.urgent {
  background: var(--service-red-soft);
  color: var(--service-red);
}

.service-student-card {
  align-items: center;
  border-bottom: 1px solid #edf2f7;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(190px, 1fr) auto minmax(150px, 0.72fr);
  padding: 12px 16px;
}

.service-student-main {
  background: transparent;
  border: 0;
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 0;
  text-align: left;
}

.service-student-main > span:last-child {
  color: var(--service-muted);
  font-size: 11px;
}

.service-student-name {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.service-student-signal {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.service-student-signal span {
  background: #f1f5f9;
  border-radius: 999px;
  color: #475569;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 7px;
}

.service-student-signal .is-unread {
  background: var(--service-blue-soft);
  color: var(--service-blue);
}

.service-student-next {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.service-student-next span,
.service-student-next time {
  color: var(--service-muted);
  font-size: 10px;
}

.service-student-next strong {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-student-next.is-overdue strong,
.service-student-next.is-overdue time {
  color: var(--service-red);
}

.service-dashboard-empty {
  color: var(--service-muted);
  padding: 28px 18px;
  text-align: center;
}

.operations-dashboard {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--service-line);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, .055);
}

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

.operations-dashboard-head > div {
  display: grid;
  gap: 2px;
}

.operations-dashboard-head span,
.operations-card header span {
  color: var(--service-blue);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.operations-dashboard-head h3,
.operations-card h4 {
  color: var(--service-ink);
  margin: 0;
}

.operations-dashboard-head h3 {
  font-size: 20px;
}

.operations-dashboard-head p {
  margin: 3px 0 0;
  color: var(--service-muted);
  font-size: 12px;
  line-height: 1.6;
}

.operations-dashboard-head time {
  color: var(--service-muted);
  font-size: 11px;
  white-space: nowrap;
}

.operations-metric-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.operations-metric {
  display: grid;
  gap: 3px;
  min-width: 0;
  min-height: 82px;
  padding: 11px 12px;
  border: 1px solid #e2e8f0;
  border-left: 3px solid #94a3b8;
  border-radius: 8px;
  background: #f8fafc;
}

.operations-metric strong {
  color: var(--service-ink);
  font-size: 23px;
  line-height: 1.1;
}

.operations-metric span {
  color: #334155;
  font-size: 12px;
  font-weight: 850;
}

.operations-metric small {
  overflow: hidden;
  color: var(--service-muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operations-metric.is-danger { border-left-color: var(--service-red); background: var(--service-red-soft); }
.operations-metric.is-warn { border-left-color: var(--service-amber); background: var(--service-amber-soft); }
.operations-metric.is-info { border-left-color: var(--service-blue); background: var(--service-blue-soft); }
.operations-metric.is-good { border-left-color: var(--service-green); background: var(--service-green-soft); }

.operations-dashboard-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.operations-card {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
}

.operations-card header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}

.operations-card h4 {
  margin-top: 2px;
  font-size: 14px;
}

.operations-card header small,
.operations-rate-row small,
.operations-card-note {
  color: var(--service-muted);
  font-size: 10px;
}

.operations-rate-list {
  display: grid;
  gap: 10px;
}

.operations-rate-row {
  display: grid;
  gap: 4px;
}

.operations-rate-row > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #475569;
  font-size: 11px;
  font-weight: 750;
}

.operations-rate-row b {
  color: var(--service-ink);
}

.operations-rate-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.operations-rate-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--service-blue), #0f9f75);
}

.operations-signal-list {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #e2e8f0;
}

.operations-signal-list > div {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 9px;
  background: #f8fafc;
}

.operations-signal-list dt {
  color: #64748b;
  font-size: 10px;
}

.operations-signal-list dd {
  margin: 0;
  color: var(--service-ink);
  font-size: 16px;
  font-weight: 850;
}

.operations-signal-list dd.danger,
.operations-table-card td.danger { color: var(--service-red); }
.operations-signal-list dd.warn { color: var(--service-amber); }

.operations-card-note {
  margin: 12px 0 0;
  line-height: 1.55;
}

.operations-table-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.operations-table-wrap {
  overflow-x: auto;
}

.operations-table-card table {
  width: 100%;
  min-width: 430px;
  border-collapse: collapse;
}

.operations-table-card th,
.operations-table-card td {
  padding: 7px 8px;
  border-bottom: 1px solid #edf2f7;
  color: #475569;
  font-size: 11px;
  text-align: right;
}

.operations-table-card th {
  background: #f8fafc;
  color: #64748b;
  font-weight: 850;
}

.operations-table-card th:first-child,
.operations-table-card td:first-child {
  text-align: left;
}

.operations-commercial {
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #cbd5e1;
}

.operations-commercial > div {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  background: #f8fafc;
}

.operations-commercial span {
  color: #64748b;
  font-size: 10px;
}

.operations-commercial b {
  color: #0f172a;
  font-size: 14px;
}

.service-dashboard-page button:focus-visible,
.student-management-page button:focus-visible,
.student-management-page select:focus-visible,
.student-management-page input:focus-visible,
.student-management-page textarea:focus-visible {
  outline: 3px solid rgba(3, 105, 161, 0.26);
  outline-offset: 2px;
}

.student-primary-status {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.student-management-workspace {
  grid-template-columns: 250px minmax(0, 1fr) 420px;
}

.student-management-table {
  min-width: 1180px;
}

.student-management-table .student-service-stage-select {
  min-width: 126px;
}

.student-next-task-cell {
  display: grid;
  gap: 4px;
  max-width: 170px;
  min-width: 120px;
}

.student-next-task-cell strong {
  font-size: 12px;
  line-height: 1.4;
}

.student-next-task-cell span {
  color: var(--student-muted);
  font-size: 10px;
}

.student-next-task-cell button {
  color: var(--student-blue);
  font-size: 11px;
  justify-self: start;
  min-height: 28px;
  padding: 0 8px;
}

.student-next-task-cell.is-overdue strong,
.student-next-task-cell.is-overdue span {
  color: var(--student-red);
}

.student-detail-panel {
  max-height: calc(100vh - 112px);
  overflow: auto;
}

.student-detail-panel.is-loading {
  min-height: 260px;
  place-items: center;
}

.student-detail-empty {
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
}

.student-service-stage-card {
  background: linear-gradient(135deg, #f1f7fb 0%, #ffffff 100%);
  border: 1px solid #bfdbfe;
  border-left: 4px solid #0369a1;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 12px;
}

.student-service-stage-card > div {
  display: grid;
  gap: 2px;
}

.student-service-stage-card span {
  color: var(--student-muted);
  font-size: 10px;
  font-weight: 800;
}

.student-service-stage-card strong {
  color: #0f172a;
  font-size: 16px;
}

.student-service-stage-card button {
  align-self: center;
  min-height: 36px;
}

.student-service-stage-card p {
  color: #475569;
  font-size: 12px;
  grid-column: 1 / -1;
  line-height: 1.55;
  margin: 0;
}

.student-detail-metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.student-detail-metric {
  min-height: 64px;
  padding: 8px;
}

.student-detail-metric strong {
  font-size: 15px;
}

.student-service-grid {
  display: grid;
  gap: 14px;
}

.student-detail-section-head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.student-detail-section-head > span {
  color: var(--student-muted);
  font-size: 10px;
  font-weight: 800;
}

.student-detail-section-head > span.is-alert {
  background: #eaf5fb;
  border-radius: 999px;
  color: #0369a1;
  padding: 3px 7px;
}

.student-detail-section-head button {
  color: var(--student-blue);
  font-size: 11px;
  min-height: 28px;
  padding: 0 8px;
}

.student-service-note {
  margin-top: 4px !important;
  min-height: 0 !important;
}

.student-service-task-list,
.student-service-scheme-list,
.student-service-timeline {
  display: grid;
  gap: 7px;
}

.student-service-task {
  align-items: start;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  padding: 9px;
}

.student-service-task.is-overdue {
  background: #fff1f0;
  border-color: #f4b8b3;
}

.student-service-task > div {
  display: grid;
  gap: 3px;
}

.student-service-task strong {
  font-size: 12px;
  line-height: 1.4;
}

.student-service-task p {
  background: transparent;
  border: 0;
  color: var(--student-muted);
  font-size: 11px;
  min-height: 0;
  padding: 0;
}

.student-service-scheme {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 9px 10px;
}

.student-service-scheme > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.student-service-scheme strong {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-service-scheme span,
.student-service-scheme time {
  color: var(--student-muted);
  font-size: 10px;
  white-space: nowrap;
}

.student-service-connection {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 10px;
}

.student-service-connection.is-connected {
  background: #eaf7f0;
  border-color: #b7e4cc;
}

.student-service-connection strong {
  font-size: 12px;
}

.student-service-connection span {
  color: var(--student-muted);
  font-size: 10px;
}

.student-service-link-button {
  color: var(--student-blue);
  font-size: 11px;
  justify-self: start;
  min-height: 30px;
}

.student-service-delivery {
  display: grid;
  gap: 7px;
}

.student-service-delivery > div {
  align-items: start;
  display: grid;
  gap: 10px;
  grid-template-columns: 68px minmax(0, 1fr);
}

.student-service-delivery span {
  color: var(--student-muted);
  font-size: 11px;
}

.student-service-delivery strong {
  font-size: 11px;
  line-height: 1.45;
}

.student-service-timeline-item {
  display: grid;
  gap: 8px;
  grid-template-columns: 10px minmax(0, 1fr);
}

.student-service-timeline-dot {
  background: #0369a1;
  border: 3px solid #dff1fa;
  border-radius: 50%;
  height: 10px;
  margin-top: 3px;
  width: 10px;
}

.student-service-timeline-item > div {
  display: grid;
  gap: 2px;
}

.student-service-timeline-item strong {
  font-size: 11px;
}

.student-service-timeline-item span {
  color: var(--student-muted);
  font-size: 10px;
}

.student-service-timeline-item p {
  background: transparent;
  border: 0;
  color: #475569;
  font-size: 11px;
  min-height: 0;
  padding: 2px 0 0;
}

.student-service-empty {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: var(--student-muted);
  font-size: 11px;
  padding: 12px;
  text-align: center;
}

.student-detail-danger-zone {
  border-top: 1px solid #edf2f7;
  display: flex;
  justify-content: flex-end;
  padding-top: 12px;
}

.modal-context-card {
  background: #f1f7fb;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  padding: 12px;
}

.modal-context-card span {
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 1660px) {
  .service-dashboard-metrics {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
  }

  .operations-metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .operations-commercial {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .student-management-workspace {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .student-detail-panel:not(.is-empty) {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
    max-height: none;
    position: static;
  }

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

@media (max-width: 1180px) {
  .service-dashboard-workspace {
    grid-template-columns: 1fr;
  }

  .operations-dashboard-grid,
  .operations-table-grid {
    grid-template-columns: 1fr;
  }

  .service-pipeline {
    grid-template-columns: repeat(3, minmax(110px, 1fr));
  }

  .service-pipeline button:nth-child(3) {
    border-right: 0;
  }

  .service-pipeline button:nth-child(-n + 3) {
    border-bottom: 1px solid var(--service-line);
  }

  .student-service-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .service-dashboard-hero {
    align-items: stretch;
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .service-dashboard-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .service-dashboard-metrics,
  .student-primary-status,
  .operations-metric-grid,
  .operations-commercial {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .operations-dashboard {
    padding: 13px;
  }

  .operations-dashboard-head {
    display: grid;
  }

  .operations-dashboard-head time {
    white-space: normal;
  }

  .service-pipeline {
    grid-template-columns: repeat(2, minmax(100px, 1fr));
  }

  .service-pipeline button:nth-child(n) {
    border-bottom: 1px solid var(--service-line);
    border-right: 1px solid var(--service-line);
  }

  .service-pipeline button:nth-child(2n) {
    border-right: 0;
  }

  .service-pipeline button:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .service-task-row {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .service-task-meta {
    align-items: center;
    grid-column: 2;
    grid-template-columns: auto minmax(0, 1fr);
    justify-items: start;
  }

  .service-student-card {
    align-items: start;
    grid-template-columns: 1fr auto;
  }

  .service-student-next {
    grid-column: 1 / -1;
  }

  .student-detail-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .student-detail-actions button {
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .service-dashboard-page *,
  .student-management-page * {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

.student-intake-grid {
  align-items: start;
}

.student-intake-grid > .panel {
  min-width: 0;
}

.student-intake-qr {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.student-intake-qr img {
  width: 180px;
  height: 180px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px;
}

.student-intake-qr p {
  margin: 8px 0 12px;
}

.student-intake-public {
  min-height: 100vh;
  background: #f5f7fb;
}

.intake-page {
  width: min(920px, 100%);
  margin: 0 auto;
  padding: 24px 14px 48px;
}

.intake-card {
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 18px;
}

.intake-card h1,
.intake-card h2,
.intake-card p {
  margin: 0;
}

.intake-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.intake-header h1 {
  font-size: 22px;
}

.intake-header span {
  flex: 0 0 auto;
  border: 1px solid #b7d0d7;
  border-radius: 999px;
  background: #eef7f9;
  color: var(--brand-strong);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
}

.intake-locked {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
}

.intake-locked div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.intake-locked span {
  color: var(--muted);
  font-size: 12px;
}

.intake-locked strong {
  overflow-wrap: anywhere;
}

.intake-section {
  display: grid;
  gap: 12px;
}

.intake-section h2 {
  color: #111827;
  font-size: 16px;
}

.intake-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.intake-field {
  min-width: 0;
}

.intake-field span {
  color: #344054;
  font-weight: 700;
}

.intake-field em {
  margin-left: 3px;
  color: var(--danger);
  font-style: normal;
}

.intake-field small {
  color: var(--muted);
}

.intake-choice-row,
.intake-choice-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.intake-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.intake-choice {
  display: flex;
  align-items: center;
  min-height: 34px;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: #263445;
  padding: 6px 9px;
  font-size: 13px;
}

.intake-choice input {
  width: auto;
  min-height: 0;
}

.intake-multi {
  position: relative;
  width: 100%;
}

.intake-multi-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: #263445;
  padding: 8px 10px;
  text-align: left;
}

.intake-multi-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .16);
  padding: 10px;
}

.intake-multi-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.intake-multi-actions button {
  min-height: 30px;
  padding: 4px 10px;
}

.intake-multi-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.intake-submit {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.intake-submit button {
  min-width: 160px;
}

.intake-error {
  color: var(--danger);
}

@media (max-width: 760px) {
  .student-intake-qr,
  .intake-form-grid,
  .intake-locked {
    grid-template-columns: 1fr;
  }

  .student-intake-qr img {
    justify-self: center;
  }

  .intake-header,
  .intake-submit {
    align-items: stretch;
    flex-direction: column;
  }

  .intake-choice-grid {
    grid-template-columns: 1fr;
  }

  .intake-multi-menu {
    position: static;
    margin-top: 6px;
  }

  .intake-multi-options {
    grid-template-columns: 1fr;
  }
}

.workbench-intake-public {
  min-height: 100dvh;
  margin: 0;
  background: #eef4f8;
  color: #172033;
}

.workbench-intake-page {
  display: grid;
  min-height: 100dvh;
  place-items: start center;
  padding: 28px 16px;
}

.workbench-intake-card {
  width: min(920px, 100%);
  border: 1px solid #d9e2ef;
  border-radius: 8px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 18px 40px rgba(15, 23, 42, .08);
  overflow: hidden;
}

.workbench-intake-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #e4eaf3;
  background: #eef5ff;
  padding: 22px 24px;
}

.workbench-intake-header span {
  display: block;
  color: #47627f;
  font-size: 13px;
  font-weight: 700;
}

.workbench-intake-header h1 {
  margin: 4px 0 0;
  color: #111827;
  font-size: 24px;
  line-height: 1.25;
}

.workbench-intake-form {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.workbench-intake-verify-form {
  max-width: 680px;
  margin: 0 auto;
}

.workbench-intake-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.workbench-intake-grid label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: #344054;
  font-weight: 700;
}

.workbench-intake-grid input,
.workbench-intake-grid select,
.workbench-intake-grid textarea {
  min-height: 44px;
  border: 1px solid #cfd8e6;
  border-radius: 6px;
  background: #fff;
  color: #111827;
  font: inherit;
  font-weight: 400;
  padding: 9px 11px;
}

.workbench-intake-grid textarea {
  min-height: 104px;
  resize: vertical;
}

.workbench-intake-grid small {
  color: #667085;
  font-weight: 500;
}

.workbench-intake-grid .span-2 {
  grid-column: 1 / -1;
}

.workbench-intake-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 14px;
}

.workbench-intake-fieldset {
  display: grid;
  gap: 12px;
  border: 1px solid #d9e2ef;
  border-radius: 8px;
  background: #f8fbff;
  padding: 14px;
}

.workbench-intake-fieldset legend {
  padding: 0 6px;
  color: #172033;
  font-weight: 800;
}

.workbench-intake-option-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #344054;
}

.workbench-intake-option-head span {
  display: inline-flex;
  gap: 8px;
}

.workbench-intake-option-head button {
  min-height: 32px;
  padding: 4px 10px;
}

.workbench-intake-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 8px;
}

.workbench-intake-check {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  min-height: 40px;
  gap: 7px !important;
  border: 1px solid #d8e1ee;
  border-radius: 6px;
  background: #fff;
  padding: 7px 9px;
  font-weight: 600 !important;
}

.workbench-intake-check input {
  min-height: 0 !important;
}

.workbench-intake-radio {
  display: flex;
  gap: 10px;
}

.workbench-intake-radio label {
  display: flex;
  align-items: center;
  min-height: 44px;
  gap: 8px;
  border: 1px solid #cfd8e6;
  border-radius: 6px;
  padding: 8px 12px;
  font-weight: 600;
}

.workbench-intake-radio input {
  min-height: 0;
}

.workbench-intake-status {
  grid-column: 1 / -1;
  min-height: 22px;
  color: #536579;
  font-size: 13px;
}

.workbench-intake-status.ok {
  color: #047857;
}

.workbench-intake-status.warn {
  color: #b45309;
}

.workbench-intake-error {
  min-height: 22px;
  color: #b42318;
  font-weight: 700;
}

.workbench-intake-submit {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid #e4eaf3;
  padding-top: 18px;
}

.workbench-intake-submit button {
  min-width: 160px;
  min-height: 44px;
}

.workbench-intake-success {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 52px 24px 58px;
  text-align: center;
}

.workbench-intake-success span {
  color: #047857;
  font-weight: 800;
}

.workbench-intake-success strong {
  border: 1px solid #b7d7c8;
  border-radius: 8px;
  background: #ecfdf3;
  color: #064e3b;
  font-size: 42px;
  letter-spacing: 0;
  line-height: 1;
  padding: 18px 26px;
}

.workbench-intake-success p {
  max-width: 460px;
  margin: 0;
  color: #344054;
  line-height: 1.7;
}

.workbench-intake-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid #1f6feb;
  border-radius: 6px;
  background: #1f6feb;
  color: #fff;
  font-weight: 800;
  padding: 9px 18px;
  text-decoration: none;
}

.intake-loading {
  padding: 36px 24px;
  color: #667085;
}

.claim-page {
  place-items: start center;
  padding: 16px 12px;
}

.claim-card {
  width: min(820px, 100%);
}

.claim-login-form {
  padding: 24px;
}

.claim-result {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.claim-card .workbench-intake-header {
  padding: 14px 18px;
}

.claim-card .workbench-intake-header span {
  color: #0369a1;
  font-size: 12px;
  font-weight: 800;
}

.claim-card .workbench-intake-header h1 {
  margin-top: 2px;
  font-size: 22px;
  line-height: 1.2;
}

.claim-overview {
  display: grid;
  gap: 8px;
}

.claim-overview-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 8px;
}

.claim-code-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-width: 168px;
  gap: 4px 8px;
  border: 1px solid #b7d7c8;
  border-radius: 8px;
  background: #f0fbf6;
  padding: 10px;
}

.claim-code-panel span {
  color: #087443;
  font-size: 12px;
  font-weight: 800;
}

.claim-code-panel strong {
  min-width: 0;
  color: #064e3b;
  font-size: 20px;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.claim-code-panel button {
  grid-row: 1 / span 2;
  grid-column: 2;
  min-width: 52px;
  min-height: 38px;
  border: 1px solid #0f9f6e;
  border-radius: 6px;
  background: #ffffff;
  color: #087443;
  font-weight: 800;
  padding: 6px 10px;
}

.claim-code-panel button:disabled {
  border-color: #cfd8e6;
  color: #98a2b3;
}

.claim-teacher-card {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
  border: 1px solid #dce8f7;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #f3f8ff 100%);
  padding: 10px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, .05);
}

.claim-teacher-avatar,
.claim-user-avatar {
  position: relative;
  display: grid;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  font-weight: 900;
  line-height: 1;
}

.claim-teacher-avatar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .32), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #1f6feb 0%, #0f9f6e 100%);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28), 0 8px 18px rgba(31, 111, 235, .22);
  overflow: visible;
}

.claim-teacher-avatar img {
  display: none;
}

.claim-teacher-avatar::after {
  content: "";
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 10px;
  height: 10px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #12b76a;
}

.claim-teacher-avatar.has-image {
  overflow: hidden;
  background: #e6edf6;
}

.claim-teacher-avatar.has-image span {
  display: none;
}

.claim-teacher-avatar.has-image img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.claim-user-avatar {
  background: #e8f5ee;
  color: #0b6b43;
}

.claim-teacher-main {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.claim-teacher-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.claim-teacher-row strong {
  color: #0f172a;
  font-size: 16px;
}

.claim-teacher-main p {
  margin: 0;
  color: #47627f;
  font-size: 12px;
  line-height: 1.35;
}

.claim-teacher-presence {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #cfeee0;
  border-radius: 999px;
  background: #eefbf5;
  color: #087443;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 8px;
}

.claim-teacher-presence i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #12b76a;
  box-shadow: 0 0 0 3px rgba(18, 183, 106, .16);
}

.claim-teacher-presence.is-offline {
  border-color: #d9e2ef;
  background: #f8fafc;
  color: #667085;
}

.claim-teacher-presence.is-offline i {
  background: #98a2b3;
  box-shadow: none;
}

.claim-presence-extra {
  color: #47627f;
  font-weight: 700;
}

.claim-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.claim-summary div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  min-width: 0;
  gap: 8px;
  border: 1px solid #d9e2ef;
  border-radius: 8px;
  background: #f8fbff;
  padding: 8px 10px;
}

.claim-summary span {
  flex: 0 0 auto;
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.claim-summary strong {
  min-width: 0;
  color: #111827;
  font-size: 15px;
  line-height: 1.25;
  overflow-wrap: anywhere;
  text-align: right;
}

.claim-wait-panel {
  display: grid;
  gap: 6px;
  border: 1px solid #bfe3d6;
  border-radius: 8px;
  background: #f0fbf6;
  padding: 10px 12px;
  color: #172033;
}

.claim-wait-title {
  color: #087443;
  font-size: 14px;
  font-weight: 800;
}

.claim-wait-title strong {
  color: #05603a;
}

.claim-wait-panel p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
}

.claim-result-section {
  display: grid;
  gap: 8px;
}

.claim-result-section h2 {
  margin: 0;
  color: #172033;
  font-size: 16px;
}

.claim-message-list,
.claim-chat-list,
.claim-ad-list {
  display: grid;
  gap: 14px;
}

.claim-chat-message {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.claim-chat-message.user {
  flex-direction: row-reverse;
  justify-content: flex-end;
}

.claim-chat-message.assistant {
  justify-content: flex-start;
}

.claim-chat-stack {
  display: grid;
  max-width: min(100%, 620px);
  min-width: 0;
  gap: 5px;
}

.claim-chat-bubble {
  border: 1px solid #d9e2ef;
  border-radius: 8px;
  background: #fff;
  padding: 12px 14px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, .05);
}

.claim-chat-message.user .claim-chat-bubble {
  border-color: #bfe4cd;
  background: #e9f8f0;
}

.claim-message,
.claim-ad {
  border: 1px solid #d9e2ef;
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.claim-message-meta {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.claim-message-content {
  color: #172033;
  line-height: 1.7;
}

.claim-file-message .claim-chat-bubble {
  display: grid;
  gap: 12px;
}

.claim-typing-message .claim-chat-bubble {
  width: fit-content;
  min-width: 128px;
}

.claim-typing-bubble {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.claim-typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #98a2b3;
  animation: claimTypingPulse 1.2s ease-in-out infinite;
}

.claim-typing-dot:nth-child(2) {
  animation-delay: .15s;
}

.claim-typing-dot:nth-child(3) {
  animation-delay: .3s;
}

.claim-typing-text {
  margin-left: 4px;
  color: #667085;
  font-size: 13px;
  font-weight: 700;
}

@keyframes claimTypingPulse {
  0%,
  80%,
  100% {
    opacity: .35;
    transform: translateY(0);
  }

  40% {
    opacity: 1;
    transform: translateY(-2px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .claim-typing-dot {
    animation: none;
  }
}

.claim-file-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  border: 1px solid #cfe0f5;
  border-radius: 8px;
  background: #f7fbff;
  color: #172033;
  padding: 12px;
  text-decoration: none;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.claim-file-card:hover,
.claim-file-card:focus-visible {
  border-color: #1f6feb;
  box-shadow: 0 10px 22px rgba(31, 111, 235, .14);
  transform: translateY(-1px);
}

.claim-file-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: #e6f0ff;
  color: #1f6feb;
}

.claim-file-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.claim-file-main {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.claim-file-main strong {
  color: #111827;
  font-size: 15px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.claim-file-main span {
  color: #667085;
  font-size: 12px;
}

.claim-file-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 50px;
  min-height: 34px;
  border-radius: 6px;
  background: #1f6feb;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.claim-empty {
  border: 1px dashed #cfd8e6;
  border-radius: 8px;
  color: #667085;
  padding: 18px;
}

.claim-followup-section {
  border-top: 1px solid #e4eaf3;
  padding-top: 16px;
}

.claim-followup-limit {
  margin: -4px 0 12px;
  color: #667085;
  font-size: 13px;
  line-height: 1.5;
}

.claim-followup-form {
  display: grid;
  gap: 10px;
}

.claim-followup-form textarea {
  min-height: 104px;
  resize: vertical;
}

.claim-followup-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.claim-followup-actions span {
  color: #667085;
  font-size: 13px;
  line-height: 1.5;
}

.claim-ad h3 {
  margin: 0 0 10px;
  color: #172033;
  font-size: 16px;
}

.claim-ad-body {
  display: grid;
  gap: 10px;
  color: #344054;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.claim-ad-body p {
  margin: 0;
}

.claim-ad-body img,
.claim-ad-body video {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: 420px;
  border-radius: 8px;
  object-fit: contain;
  background: #f2f5fa;
}

.claim-ad-body figure {
  display: grid;
  gap: 6px;
  margin: 0;
}

.claim-ad-body figcaption {
  color: #667085;
  font-size: 12px;
}

.claim-ad-table {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.claim-ad-table table {
  width: 100%;
  border-collapse: collapse;
  min-width: 360px;
}

.claim-ad-table td {
  border: 1px solid #d9e2ef;
  padding: 8px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.claim-ad-editor {
  display: grid;
  gap: 14px;
}

.claim-ad-editor-settings {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) repeat(4, minmax(92px, 1fr));
  gap: 10px;
  align-items: end;
}

.claim-teacher-avatar-setting {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  border: 1px solid #d9e2ef;
  border-radius: 8px;
  background: #f8fbff;
  padding: 12px;
}

.claim-teacher-avatar-preview {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #d9e2ef;
  border-radius: 50%;
  background: linear-gradient(135deg, #1f6feb 0%, #0f9f6e 100%);
  color: #fff;
  font-weight: 900;
}

.claim-teacher-avatar-preview.small {
  width: 44px;
  height: 44px;
  margin: 0 auto;
  font-size: 14px;
}

.claim-teacher-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.claim-teacher-avatar-controls {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.claim-ad-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 14px;
  align-items: start;
}

.claim-ad-editor-main {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.claim-ad-editor-toolbar {
  position: sticky;
  top: 55px;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
}

.claim-ad-editor-toolbar button {
  min-width: 68px;
}

.claim-ad-editor-block-list {
  display: grid;
  gap: 10px;
}

.claim-ad-editor-block {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.claim-ad-editor-block-head,
.claim-ad-table-tools,
.claim-ad-editor-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.claim-ad-editor-block-head > div:first-child {
  display: grid;
  gap: 2px;
}

.claim-ad-editor-block-head strong {
  color: var(--text);
  font-size: 14px;
}

.claim-ad-editor-block-head span {
  color: var(--muted);
  font-size: 12px;
}

.claim-ad-editor-block-actions,
.claim-ad-table-tools {
  display: flex;
  gap: 6px;
}

.claim-ad-editor-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.claim-ad-editor-fields label:only-child,
.claim-ad-media-upload,
.claim-ad-table-editor {
  grid-column: 1 / -1;
}

.claim-ad-editor-fields textarea {
  min-height: 132px;
}

.claim-ad-media-upload {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.claim-ad-media-upload input[type="file"] {
  min-width: 0;
}

.claim-ad-table-editor {
  display: grid;
  gap: 8px;
}

.claim-ad-table-input-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.claim-ad-table-input-wrap table {
  min-width: 0;
  width: 100%;
}

.claim-ad-table-input-wrap td {
  min-width: 130px;
  padding: 6px;
  white-space: normal;
}

.claim-ad-preview-panel {
  position: sticky;
  top: 55px;
  min-width: 0;
  display: grid;
  gap: 8px;
}

.claim-ad-preview-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.claim-ad-phone {
  width: min(100%, 360px);
  max-height: 620px;
  overflow: auto;
  border: 1px solid #cfd8e6;
  border-radius: 22px;
  background: #eef3f8;
  padding: 12px;
}

.claim-ad-phone-body {
  min-height: 420px;
  border-radius: 16px;
  background: #fff;
  padding: 14px;
}

.claim-ad-phone .claim-ad {
  padding: 12px;
}

.claim-ad-phone .claim-ad-body img,
.claim-ad-phone .claim-ad-body video {
  max-height: 240px;
}

.claim-ad-action-link,
.claim-ad-video-link {
  color: var(--brand-strong);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.claim-ad-video {
  position: relative;
}

.claim-ad-video-link {
  display: inline-flex;
  margin-top: 4px;
}

@media (max-width: 760px) {
  .workbench-intake-page {
    padding: 12px;
  }

  .workbench-intake-header,
  .workbench-intake-form {
    padding: 18px;
  }

  .workbench-intake-header h1 {
    font-size: 21px;
  }

  .workbench-intake-grid {
    grid-template-columns: 1fr;
  }

  .workbench-intake-grid.compact {
    grid-template-columns: 1fr;
  }

  .claim-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workbench-intake-submit {
    justify-content: stretch;
  }

  .workbench-intake-submit button {
    width: 100%;
  }

  .claim-result {
    gap: 10px;
    padding: 10px;
  }

  .claim-card .workbench-intake-header {
    padding: 10px 12px;
  }

  .claim-card .workbench-intake-header h1 {
    font-size: 19px;
  }

  .claim-overview-top {
    grid-template-columns: 1fr;
  }

  .claim-code-panel {
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-width: 0;
    padding: 8px 10px;
  }

  .claim-code-panel button {
    grid-row: auto;
    grid-column: auto;
  }

  .claim-teacher-card {
    align-items: center;
    padding: 8px 10px;
  }

  .claim-summary div {
    padding: 7px 8px;
  }

  .claim-summary strong {
    font-size: 14px;
  }

  .claim-chat-stack {
    max-width: calc(100vw - 106px);
  }

  .claim-file-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .claim-file-action {
    grid-column: 1 / -1;
    width: 100%;
  }

  .claim-followup-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .claim-followup-actions button {
    width: 100%;
  }

  .claim-ad {
    padding: 12px;
  }

  .claim-ad h3 {
    font-size: 15px;
  }

  .claim-ad-body {
    gap: 9px;
    line-height: 1.65;
  }

  .claim-ad-body img,
  .claim-ad-body video {
    max-height: 280px;
  }

  .claim-ad-table {
    margin-inline: -2px;
  }
}

@media (max-width: 900px) {
  .claim-ad-editor-settings,
  .claim-ad-editor-layout,
  .claim-ad-editor-fields,
  .claim-ad-media-upload,
  .claim-teacher-avatar-setting {
    grid-template-columns: 1fr;
  }

  .claim-ad-editor-toolbar,
  .claim-ad-preview-panel {
    position: static;
  }

  .claim-ad-phone {
    width: 100%;
    max-height: none;
    border-radius: 12px;
  }

  .claim-ad-phone-body {
    min-height: 260px;
  }
}

@media (max-width: 640px) {
  .modal.modal-claim-ad-editor {
    width: calc(100vw - 24px);
  }

  .claim-ad-editor-toolbar button {
    flex: 1 1 72px;
  }

  .claim-ad-editor-block-actions button,
  .claim-ad-table-tools button {
    flex: 1 1 auto;
  }
}

.scheme-review-public {
  background: #f6f7f9;
  color: #172033;
  min-height: 100vh;
}

.scheme-review-page {
  margin: 0 auto;
  max-width: 960px;
  padding: 18px;
}

.scheme-review-shell {
  display: grid;
  gap: 18px;
}

.scheme-review-hero {
  align-items: end;
  background: #ffffff;
  border: 1px solid #d9e1ec;
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(22, 34, 51, 0.08);
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 22px;
}

.scheme-review-kicker {
  color: #24715d;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 6px;
}

.scheme-review-hero h1,
.scheme-review-message h1 {
  font-size: 24px;
  line-height: 1.25;
  margin: 0;
}

.scheme-review-hero p,
.scheme-review-message p {
  color: #596579;
  line-height: 1.7;
  margin: 10px 0 0;
}

.scheme-review-stats {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(72px, 1fr));
}

.scheme-review-stats div {
  background: #f4f8f6;
  border: 1px solid #d9e9e2;
  border-radius: 8px;
  min-width: 72px;
  padding: 10px 12px;
  text-align: center;
}

.scheme-review-stats span {
  color: #66758a;
  display: block;
  font-size: 12px;
}

.scheme-review-stats strong {
  color: #172033;
  display: block;
  font-size: 22px;
  line-height: 1.2;
  margin-top: 2px;
}

.scheme-review-login,
.scheme-review-message,
.scheme-review-add-panel,
.scheme-review-section {
  background: #ffffff;
  border: 1px solid #d9e1ec;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(22, 34, 51, 0.06);
  padding: 18px;
}

.scheme-review-login {
  display: grid;
  gap: 14px;
}

.scheme-review-login label {
  display: grid;
  gap: 7px;
}

.scheme-review-login span {
  color: #33415c;
  font-size: 14px;
  font-weight: 700;
}

.scheme-review-login input {
  border: 1px solid #c8d4e3;
  border-radius: 8px;
  font-size: 16px;
  min-height: 46px;
  padding: 10px 12px;
}

.scheme-review-login button,
.scheme-review-add-form button,
.scheme-review-actions button {
  border-radius: 8px;
  min-height: 44px;
}

.scheme-review-error {
  color: #b42318;
  font-size: 14px;
  line-height: 1.5;
}

.scheme-review-loading {
  background: #ffffff;
  border: 1px solid #d9e1ec;
  border-radius: 8px;
  color: #596579;
  padding: 22px;
}

.scheme-review-loading.small {
  border: 0;
  padding: 12px 0;
}

.scheme-review-section-title {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.scheme-review-section-title h2 {
  font-size: 18px;
  margin: 0;
}

.scheme-review-section-title span {
  color: #66758a;
  font-size: 13px;
}

.scheme-review-add-panel {
  display: grid;
  gap: 12px;
}

.scheme-review-add-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.scheme-review-add-head h2 {
  font-size: 18px;
  margin: 0;
}

.scheme-review-add-form {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
}

.scheme-review-add-form label {
  display: grid;
  gap: 6px;
}

.scheme-review-add-form span {
  color: #33415c;
  font-size: 13px;
  font-weight: 700;
}

.scheme-review-add-form input {
  border: 1px solid #c8d4e3;
  border-radius: 8px;
  font-size: 15px;
  min-height: 44px;
  padding: 10px 12px;
}

.scheme-review-search-result {
  background: #f8fbff;
  border: 1px solid #d7e1ee;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 14px;
}

.scheme-review-search-result.tier-rush,
.scheme-review-group.tier-rush {
  background: #fff7ed;
  border-color: #fdba74;
  box-shadow: inset 4px 0 0 #f97316, 0 8px 22px rgba(31, 45, 71, 0.08);
}

.scheme-review-search-result.tier-stable,
.scheme-review-group.tier-stable {
  background: #ecfdf5;
  border-color: #86efac;
  box-shadow: inset 4px 0 0 #22c55e, 0 8px 22px rgba(31, 45, 71, 0.08);
}

.scheme-review-search-result.tier-safe,
.scheme-review-group.tier-safe {
  background: #eff6ff;
  border-color: #93c5fd;
  box-shadow: inset 4px 0 0 #3b82f6, 0 8px 22px rgba(31, 45, 71, 0.08);
}

.scheme-review-search-result.tier-unknown,
.scheme-review-group.tier-unknown {
  background: #f8fafc;
}

.scheme-review-list {
  display: grid;
  gap: 14px;
}

.scheme-review-group {
  background: #f8fbff;
  border: 1px solid #cfdae8;
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(31, 45, 71, 0.08);
  display: grid;
  gap: 12px;
  padding: 15px;
}

.scheme-review-sort {
  align-items: center;
  border-bottom: 1px solid #e7eef6;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(64px, 1fr) repeat(4, minmax(56px, auto));
  padding-bottom: 10px;
}

.scheme-review-rank {
  color: #475569;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.scheme-review-sort button {
  min-height: 36px;
  min-width: 56px;
  padding: 0 10px;
}

.scheme-review-group.is-selected {
  border-color: #65a68c;
  box-shadow: inset 4px 0 0 #2f806a, 0 8px 22px rgba(31, 45, 71, 0.08);
}

.scheme-review-group.tier-rush.is-selected {
  background: #fff3e3;
}

.scheme-review-group.tier-stable.is-selected {
  background: #e4faef;
}

.scheme-review-group.tier-safe.is-selected {
  background: #e7f1ff;
}

.scheme-review-group.is-deleted {
  box-shadow: 0 6px 18px rgba(31, 45, 71, 0.05);
  border-style: dashed;
}

.scheme-review-group.tier-rush.is-deleted {
  background: #fffaf4;
}

.scheme-review-group.tier-stable.is-deleted {
  background: #f3fcf7;
}

.scheme-review-group.tier-safe.is-deleted {
  background: #f5f9ff;
}

.scheme-review-group-title {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  line-height: 1.45;
}

.scheme-review-group-title strong {
  font-size: 16px;
}

.scheme-review-pill {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  padding: 6px 8px;
}

.scheme-review-pill.selected {
  background: #e6f5ef;
  color: #17614f;
}

.scheme-review-pill.added {
  background: #fff4dc;
  color: #7a4b00;
}

.scheme-review-pill.deleted {
  background: #f5e9e7;
  color: #9a3412;
}

.scheme-review-code-chip {
  align-items: center;
  background: #eef2f7;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #334155;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 6px 8px;
}

.scheme-review-group-meta,
.scheme-review-group-sub,
.scheme-review-note {
  color: #596579;
  font-size: 13px;
  line-height: 1.65;
  margin-top: 5px;
}

.scheme-review-note {
  color: #33415c;
}

.scheme-review-major-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.scheme-review-major-tags span {
  background: #f7f9fc;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  color: #42526b;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 6px 8px;
}

.scheme-review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.scheme-review-actions button {
  flex: 1 1 108px;
}

.scheme-review-major-panel {
  border-top: 1px solid #e3e9f2;
  padding-top: 12px;
}

.scheme-review-major-title {
  color: #33415c;
  font-weight: 700;
  margin-bottom: 10px;
}

.scheme-review-major-list {
  display: grid;
  gap: 10px;
}

.scheme-review-major {
  background: #f7f9fc;
  border: 1px solid #e1e8f0;
  border-radius: 8px;
  padding: 10px 12px;
}

.scheme-review-major strong {
  display: block;
  font-size: 14px;
  line-height: 1.45;
}

.scheme-review-major span,
.scheme-review-major p {
  color: #596579;
  display: block;
  font-size: 13px;
  line-height: 1.6;
  margin: 4px 0 0;
}

.scheme-review-empty {
  color: #66758a;
  padding: 14px 0;
}

.scheme-share-summary {
  background: #f7faf9;
  border: 1px solid #d9e9e2;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  margin: 0 0 12px;
  padding: 10px;
}

.scheme-share-summary div {
  min-width: 0;
}

.scheme-share-summary span {
  color: #66758a;
  display: block;
  font-size: 12px;
}

.scheme-share-summary strong {
  color: #172033;
  display: block;
  font-size: 14px;
  line-height: 1.45;
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.scheme-parent-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 5px;
}

.scheme-parent-badge {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  padding: 5px 7px;
  white-space: nowrap;
}

.scheme-parent-badge.selected {
  background: #e6f5ef;
  color: #17614f;
}

.scheme-parent-badge.added {
  background: #fff4dc;
  color: #7a4b00;
}

.scheme-parent-badge.deleted {
  background: #f5e9e7;
  color: #9a3412;
}

.scheme-parent-badge.note {
  background: #eef2ff;
  color: #3730a3;
}

.scheme-parent-badge.manual-sort {
  background: #fff7ed;
  color: #9a3412;
}

.scheme-share-modal {
  display: grid;
  gap: 14px;
}

.scheme-share-url {
  display: grid;
  gap: 6px;
}

.scheme-share-url span {
  color: #33415c;
  font-size: 13px;
  font-weight: 700;
}

.scheme-share-url input {
  border: 1px solid #c8d4e3;
  border-radius: 8px;
  font-size: 14px;
  padding: 10px 12px;
  width: 100%;
}

.scheme-share-meta {
  color: #66758a;
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  gap: 8px 14px;
}

.scheme-share-actions {
  gap: 8px;
}

@media (max-width: 900px) {
  .scheme-share-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .scheme-review-page {
    padding: 10px;
  }

  .scheme-review-hero {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .scheme-review-stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .scheme-review-hero h1,
  .scheme-review-message h1 {
    font-size: 22px;
  }

  .scheme-review-section,
  .scheme-review-add-panel,
  .scheme-review-login,
  .scheme-review-message {
    padding: 14px;
  }

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

  .scheme-review-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .scheme-review-sort {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .scheme-review-rank {
    grid-column: 1 / -1;
  }

  .scheme-review-sort button {
    min-width: 0;
    padding-inline: 6px;
  }
}

.scheme-review-tabs {
  background: #f6f7f9;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0 0 2px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.scheme-review-tabs button {
  background: #ffffff;
  border: 1px solid #c8d4e3;
  border-radius: 8px;
  color: #33415c;
  cursor: pointer;
  font-weight: 800;
  min-height: 44px;
}

.scheme-review-tabs button.is-active {
  background: #172033;
  border-color: #172033;
  color: #ffffff;
}

.scheme-review-tabs strong {
  font-variant-numeric: tabular-nums;
  margin-left: 6px;
}

.scheme-review-group-head {
  align-items: start;
  display: grid;
  gap: 10px;
  grid-template-columns: auto minmax(0, 1fr);
}

.scheme-review-tier {
  align-content: center;
  border: 1px solid #c8d4e3;
  border-radius: 8px;
  display: grid;
  height: 52px;
  justify-items: center;
  min-width: 52px;
  padding: 5px 6px;
  text-align: center;
}

.scheme-review-tier b {
  display: block;
  font-size: 22px;
  line-height: 1;
}

.scheme-review-tier small {
  display: block;
  font-size: 11px;
  line-height: 1.1;
  margin-top: 4px;
  white-space: nowrap;
}

.scheme-review-tier.rush {
  background: #fff7ed;
  border-color: #fdba74;
  color: #9a3412;
}

.scheme-review-tier.stable {
  background: #ecfdf5;
  border-color: #86efac;
  color: #166534;
}

.scheme-review-tier.safe {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.scheme-review-tier.unknown {
  background: #f8fafc;
  color: #475569;
}

.scheme-review-group-title {
  align-content: center;
  align-items: start;
  display: grid;
  gap: 6px;
  min-width: 0;
}

.scheme-review-group-title strong {
  font-size: 17px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.scheme-review-group-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.scheme-review-key-info {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 10px;
}

.scheme-review-key-info span {
  background: #f8fbff;
  border: 1px solid #d8e4ef;
  border-radius: 8px;
  color: #172033;
  font-weight: 800;
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 8px 10px;
}

.scheme-review-key-info b {
  color: #66758a;
  display: block;
  font-size: 12px;
  line-height: 1.2;
  margin-bottom: 2px;
}

.scheme-review-key-info .level-undergraduate {
  background: #eef6ff;
  border-color: #9cc8ff;
  color: #174ea6;
}

.scheme-review-key-info .level-undergraduate b {
  color: #3267b4;
}

.scheme-review-key-info .level-vocational {
  background: #f5f3ff;
  border-color: #c4b5fd;
  color: #5b21b6;
}

.scheme-review-key-info .level-vocational b {
  color: #6d4bc3;
}

.scheme-review-key-info .nature-public {
  background: #eefbf4;
  border-color: #86d9ad;
  color: #166534;
}

.scheme-review-key-info .nature-public b {
  color: #2f7b4f;
}

.scheme-review-key-info .nature-private {
  background: #fff4e6;
  border-color: #f6b56b;
  color: #9a3412;
}

.scheme-review-key-info .nature-private b {
  color: #b05a20;
}

.scheme-review-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.scheme-review-group.is-deleted .scheme-review-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.scheme-review-actions button {
  flex: none;
  min-width: 0;
  padding-inline: 8px;
  white-space: nowrap;
}

.scheme-review-section {
  scroll-margin-top: 70px;
}

@media (max-width: 720px) {
  .scheme-review-tabs {
    margin-inline: -2px;
    top: 0;
  }

  .scheme-review-key-info {
    gap: 6px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .scheme-review-key-info span {
    font-size: 13px;
    padding: 7px 6px;
  }

  .scheme-review-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .scheme-review-sort {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .scheme-review-rank {
    grid-column: 1 / -1;
  }

  .scheme-review-sort button {
    min-width: 0;
    padding-inline: 6px;
  }

  .scheme-review-group.is-deleted .scheme-review-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scheme-review-actions button {
    font-size: 13px;
  }
}

@media (max-width: 380px) {
  .scheme-review-actions button {
    font-size: 12px;
    padding-inline: 5px;
  }

  .scheme-review-tier {
    height: 50px;
    min-width: 46px;
  }
}

.scheme-snapshot-preview-chip {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid #f59e0b;
  border-radius: 6px;
  background: #fffbeb;
  color: #92400e;
  font-size: 12px;
  font-weight: 800;
}

.scheme-snapshot-preview-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  background: #fffbeb;
}

.scheme-snapshot-preview-banner > div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.scheme-snapshot-preview-banner strong {
  color: #92400e;
  font-size: 14px;
}

.scheme-snapshot-preview-banner span,
.scheme-snapshot-preview-banner small {
  color: #475569;
}

.modal-scheme-snapshots {
  max-width: 920px;
}

.scheme-snapshot-history {
  display: grid;
  gap: 12px;
}

.scheme-snapshot-history-head {
  display: flex;
  justify-content: flex-end;
}

.scheme-snapshot-list {
  display: grid;
  gap: 8px;
  max-height: 62vh;
  overflow: auto;
}

.scheme-snapshot-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.scheme-snapshot-row.is-checkpoint {
  border-color: #2563eb;
  background: #eff6ff;
}

.scheme-snapshot-row-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.scheme-snapshot-row-main strong,
.scheme-snapshot-row-main span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scheme-snapshot-row-main span {
  color: var(--muted);
  font-size: 12px;
}

.scheme-snapshot-parent-badge {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  border: 1px solid #22c55e;
  border-radius: 6px;
  background: #f0fdf4;
  color: #166534;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  white-space: normal;
}

@media (max-width: 760px) {
  .scheme-snapshot-preview-banner,
  .scheme-snapshot-row {
    grid-template-columns: 1fr;
  }

  .scheme-snapshot-preview-banner {
    align-items: stretch;
  }
}

/* 20260704 visual redesign phase 1 */
:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --panel-2: #f6f9fc;
  --panel-3: #eef5f7;
  --text: #132033;
  --muted: #66758a;
  --line: #d9e4ee;
  --line-strong: #c7d5e3;
  --brand: #0e6f7f;
  --brand-strong: #074f5d;
  --brand-soft: #e5f4f6;
  --accent: #d88719;
  --accent-soft: #fff4df;
  --danger: #b42318;
  --danger-soft: #fff1f0;
  --warn: #a15c00;
  --warn-soft: #fff7e6;
  --ok: #087443;
  --ok-soft: #e9f8ef;
  --info: #2563eb;
  --info-soft: #edf4ff;
  --shadow: 0 14px 36px rgba(15, 32, 51, 0.08);
  --shadow-soft: 0 8px 20px rgba(15, 32, 51, 0.06);
  --radius: 8px;
  --radius-sm: 6px;
}

body {
  background:
    linear-gradient(180deg, #f8fbff 0, #f4f7fb 240px),
    var(--bg);
  color: var(--text);
  font-variant-numeric: tabular-nums;
  text-rendering: geometricPrecision;
}

button,
input,
select,
textarea {
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease,
    color 160ms ease,
    opacity 160ms ease;
}

button {
  border-color: var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: 0 1px 1px rgba(15, 32, 51, 0.04);
  font-weight: 650;
}

button:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--brand) 42%, var(--line-strong));
  background: #f8fcfd;
  color: var(--brand-strong);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 22%, transparent);
  outline-offset: 2px;
}

button.primary {
  border-color: var(--brand);
  background: linear-gradient(180deg, #128195 0%, var(--brand) 100%);
  color: #fff;
  box-shadow: 0 8px 18px rgba(14, 111, 127, 0.2);
}

button.primary:hover:not(:disabled) {
  border-color: var(--brand-strong);
  background: linear-gradient(180deg, #0f7789 0%, var(--brand-strong) 100%);
  color: #fff;
}

button.danger {
  border-color: #f0b6af;
  background: #fff;
  color: var(--danger);
}

button.danger:hover:not(:disabled) {
  border-color: var(--danger);
  background: var(--danger-soft);
  color: var(--danger);
}

input,
select,
textarea {
  border-color: var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(15, 32, 51, 0.02);
}

input:focus,
select:focus,
textarea:focus {
  border-color: color-mix(in srgb, var(--brand) 52%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent);
  outline: 0;
}

label {
  color: #56657a;
  font-weight: 650;
}

.login-shell {
  background:
    radial-gradient(circle at 18% 20%, rgba(14, 111, 127, 0.08), transparent 30%),
    linear-gradient(145deg, #f8fbff 0%, #edf4f7 100%);
}

.login-box {
  border-color: rgba(14, 111, 127, 0.18);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(15, 32, 51, 0.14);
}

.login-title {
  color: #0b1f33;
  font-size: 21px;
  line-height: 1.32;
  letter-spacing: 0;
}

.app-shell {
  grid-template-rows: 62px 1fr;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom-color: rgba(199, 213, 227, 0.8);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 26px rgba(15, 32, 51, 0.06);
  backdrop-filter: saturate(1.2) blur(14px);
}

.brand {
  color: #0b1f33;
  font-size: 18px;
  letter-spacing: 0;
}

.brand::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 24px;
  margin-right: 9px;
  border-radius: 7px;
  vertical-align: -6px;
  background:
    linear-gradient(135deg, #0e6f7f 0%, #0b8ba0 58%, #74c5c8 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.46);
}

.tabs {
  gap: 2px;
  min-width: 0;
}

.tab {
  height: 42px;
  border-radius: 8px;
  color: #617087;
  font-weight: 700;
}

.tab:hover {
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.tab.active {
  background: linear-gradient(180deg, #eef9fb 0%, #e5f4f6 100%);
  color: var(--brand-strong);
  box-shadow:
    inset 0 -2px 0 var(--brand),
    0 1px 0 rgba(255, 255, 255, 0.75);
}

.user-area {
  color: #66758a;
  font-size: 13px;
}

.link-chip {
  border-color: color-mix(in srgb, var(--brand) 32%, var(--line));
  border-radius: 8px;
  background: #f1fbfc;
  color: var(--brand-strong);
}

.content {
  padding: 20px;
}

.panel {
  border-color: rgba(199, 213, 227, 0.86);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-soft);
}

.panel-header {
  min-height: 50px;
  border-bottom-color: rgba(217, 228, 238, 0.9);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
}

.panel-title {
  color: #102033;
  font-size: 15px;
  letter-spacing: 0;
}

.panel-body {
  padding: 16px;
}

.table-wrap {
  border-color: rgba(199, 213, 227, 0.9);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

table {
  background: #fff;
}

th,
td {
  border-bottom-color: #e6edf4;
  color: #25344a;
}

th {
  background: linear-gradient(180deg, #f8fbfd 0%, #f1f6fb 100%);
  color: #42536a;
  font-weight: 750;
}

tbody tr {
  transition: background-color 140ms ease, box-shadow 140ms ease;
}

tbody tr:hover td {
  background: #f8fcfd;
}

td.actions {
  align-items: center;
  flex-wrap: wrap;
}

.metric {
  position: relative;
  border-color: rgba(199, 213, 227, 0.9);
  border-radius: var(--radius);
  box-shadow: 0 6px 16px rgba(15, 32, 51, 0.045);
}

.metric::before {
  content: "";
  position: absolute;
  inset: 12px auto 12px 0;
  width: 3px;
  border-radius: 0 999px 999px 0;
  background: var(--brand);
}

.metric.metric-ok::before {
  background: var(--ok);
}

.metric.metric-warn::before {
  background: var(--accent);
}

.metric.metric-danger::before {
  background: var(--danger);
}

.metric-value {
  color: #102033;
  font-size: 25px;
  letter-spacing: 0;
}

.metric-label {
  color: #65748a;
  font-size: 12px;
  font-weight: 650;
}

.list-item {
  border-color: rgba(199, 213, 227, 0.9);
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(15, 32, 51, 0.035);
}

.list-item:hover {
  border-color: color-mix(in srgb, var(--brand) 38%, var(--line));
  background: #f9fcfd;
}

.list-item.active {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.status {
  border: 1px solid transparent;
  border-radius: 999px;
  background: #eef2f6;
  color: #53657a;
  font-weight: 750;
}

.status.ok {
  border-color: #c6ead2;
  background: var(--ok-soft);
  color: var(--ok);
}

.status.warn {
  border-color: #f3d59b;
  background: var(--warn-soft);
  color: var(--warn);
}

.status.danger {
  border-color: #f0b6af;
  background: var(--danger-soft);
  color: var(--danger);
}

.modal {
  border-color: rgba(199, 213, 227, 0.95);
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(15, 32, 51, 0.22);
}

.modal-header {
  background: linear-gradient(180deg, #fff 0%, #f8fbfd 100%);
}

.toast {
  border-radius: var(--radius);
  background: #0f2835;
  box-shadow: 0 18px 44px rgba(15, 32, 51, 0.24);
}

.inline-actions {
  align-items: center;
}

.content:has(.scheme-lanes) {
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(231, 243, 246, 0.64) 0, rgba(244, 247, 251, 0) 220px),
    var(--bg);
}

.scheme-lanes {
  gap: 16px;
}

.scheme-workbench-main,
.scheme-delete-panel {
  border-color: rgba(14, 111, 127, 0.15);
}

.content:has(.scheme-lanes) .scheme-workbench-main > .panel-header,
.content:has(.scheme-lanes) .scheme-delete-panel > .panel-header {
  background: linear-gradient(180deg, #ffffff 0%, #f4f9fb 100%);
}

.scheme-workbench-main > .panel-header {
  align-items: flex-start;
  gap: 14px;
  padding-block: 12px;
}

.scheme-workbench-main > .panel-header .panel-title {
  max-width: 520px;
  color: #0f2835;
  font-size: 16px;
  line-height: 1.4;
}

.scheme-workbench-top-actions {
  justify-content: flex-end;
  gap: 7px;
}

.scheme-workbench-top-actions button,
.scheme-delete-panel-actions button,
.scheme-delete-panel-actions select {
  min-height: 32px;
  padding-inline: 10px;
  font-size: 12px;
}

.scheme-workbench-control-panel {
  border-color: rgba(14, 111, 127, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(246, 250, 252, 0.96)),
    #f6f9fc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.scheme-workbench-control-header .scheme-filter-title,
.scheme-filter-title {
  color: #24384d;
  letter-spacing: 0;
}

.scheme-student-summary.focus {
  border-color: rgba(14, 111, 127, 0.2);
  border-radius: var(--radius);
  box-shadow: 0 8px 20px rgba(15, 32, 51, 0.055);
}

.scheme-student-headline strong {
  color: #0f2835;
}

.scheme-student-headline em {
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.scheme-student-focus-card {
  border-color: #dbe6ef;
  border-radius: var(--radius-sm);
  background: #f8fbfd;
}

.scheme-student-focus-card.is-score {
  border-color: color-mix(in srgb, var(--brand) 46%, var(--line));
  background: linear-gradient(180deg, #ebf8fa 0%, #f6fcfd 100%);
}

.scheme-student-focus-card.is-score strong {
  color: var(--brand-strong);
  font-size: 22px;
}

.scheme-student-meta-item {
  border-color: #dfe8f1;
  border-radius: var(--radius-sm);
}

.scheme-filter-box,
.scheme-workbench-filter-secondary,
.scheme-extra-panel,
.scheme-workbench-search-box,
.scheme-result-search-strip {
  border-color: rgba(199, 213, 227, 0.92);
  border-radius: var(--radius);
}

.scheme-workbench-tier-focus .tier-offset-box {
  border-color: rgba(14, 111, 127, 0.22);
  border-radius: var(--radius);
  background: #fff;
}

.scheme-workbench-tier-focus .tier-offset-card {
  border-radius: var(--radius-sm);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.scheme-workbench-filter-actions > .primary {
  min-width: 88px;
}

.scheme-share-summary,
.scheme-ai-status-panel,
.scheme-quick-access,
.scheme-result-search-strip {
  box-shadow: 0 6px 16px rgba(15, 32, 51, 0.045);
}

.scheme-workbench-table-wrap {
  border-color: rgba(14, 111, 127, 0.2);
  box-shadow: 0 10px 26px rgba(15, 32, 51, 0.07);
}

.scheme-workbench-table-wrap th {
  background: linear-gradient(180deg, #f8fbfd 0%, #eef5f9 100%);
  color: #34465e;
}

.scheme-workbench-table-wrap td {
  vertical-align: middle;
}

.scheme-tier-row td:first-child {
  border-left: 3px solid color-mix(in srgb, var(--scheme-tier-color, #dfe8f1) 62%, var(--brand) 38%);
}

.scheme-tier-row.is-selected td {
  box-shadow: inset 0 1px 0 rgba(14, 111, 127, 0.18), inset 0 -1px 0 rgba(14, 111, 127, 0.18);
}

.scheme-tier-row.is-selected td:first-child {
  box-shadow:
    inset 3px 0 0 var(--brand),
    inset 0 1px 0 rgba(14, 111, 127, 0.18),
    inset 0 -1px 0 rgba(14, 111, 127, 0.18);
}

.scheme-delete-panel {
  border-color: rgba(180, 35, 24, 0.2);
  box-shadow: 0 14px 34px rgba(15, 32, 51, 0.09);
}

.scheme-delete-panel > .panel-header {
  border-bottom-color: rgba(180, 35, 24, 0.14);
}

.scheme-delete-panel .panel-title {
  color: #8f1f17;
}

.scheme-delete-panel .panel-body.list {
  background: linear-gradient(180deg, #fff 0%, #fffafa 100%);
}

.scheme-lanes > aside .list-item.scheme-tier-card {
  border-radius: var(--radius);
  box-shadow: 0 6px 16px rgba(15, 32, 51, 0.055);
}

.scheme-delete-card-title {
  align-items: center;
}

.scheme-group-detail-drawer {
  border-color: rgba(14, 111, 127, 0.2);
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: 0 -18px 46px rgba(15, 32, 51, 0.12);
}

.scheme-group-detail-header {
  background: linear-gradient(180deg, #ffffff 0%, #f4f9fb 100%);
}

.scheme-group-detail-title {
  color: #0f2835;
}

.scheme-group-summary-grid .field-group,
.scheme-group-major-table,
.scheme-review-group,
.scheme-review-search-result {
  border-radius: var(--radius);
}

.scheme-review-group,
.scheme-review-search-result {
  box-shadow: 0 8px 20px rgba(15, 32, 51, 0.055);
}

.scheme-review-actions button.primary,
.workbench-intake-submit button.primary,
.claim-followup-actions button.primary,
.result-actions button.primary {
  box-shadow: 0 10px 24px rgba(14, 111, 127, 0.18);
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-rows: auto 1fr;
  }

  .topbar {
    flex-wrap: wrap;
    gap: 10px;
    padding-block: 10px;
  }

  .tabs {
    order: 3;
    width: 100%;
    overflow-x: auto;
  }

  .tab {
    flex: 0 0 auto;
  }

  .user-area {
    flex-wrap: wrap;
  }
}

@media (max-width: 760px) {
  .content {
    padding: 12px;
  }

  .panel-body {
    padding: 12px;
  }

  .brand {
    font-size: 16px;
  }

  .scheme-workbench-main > .panel-header {
    align-items: stretch;
  }

  .scheme-workbench-top-actions {
    justify-content: flex-start;
  }
}

/* 20260704 scheme workbench strict redesign: preserve workflow, improve hierarchy. */
.content:has(.scheme-lanes) {
  --scheme-blue: #2563eb;
  --scheme-blue-strong: #1d4ed8;
  --scheme-blue-soft: #eff6ff;
  --scheme-cyan: #0891b2;
  --scheme-cyan-soft: #ecfeff;
  --scheme-amber: #d97706;
  --scheme-amber-soft: #fffbeb;
  --scheme-green: #16a34a;
  --scheme-green-soft: #ecfdf3;
  --scheme-red: #dc2626;
  --scheme-red-soft: #fff1f2;
  --scheme-ink: #172033;
  --scheme-muted: #64748b;
  --scheme-line: #dbe5ef;
  --scheme-line-strong: #c8d5e3;
  --scheme-surface: #f7faff;
  --scheme-surface-strong: #ffffff;
  background:
    linear-gradient(180deg, rgba(226, 238, 255, 0.72) 0, rgba(248, 250, 252, 0) 260px),
    #f5f7fb;
  color: var(--scheme-ink);
}

.content:has(.scheme-lanes) .scheme-workbench-main,
.content:has(.scheme-lanes) .scheme-delete-panel,
.content:has(.scheme-lanes) .scheme-workbench-control-panel,
.content:has(.scheme-lanes) .scheme-student-summary.focus,
.content:has(.scheme-lanes) .scheme-workbench-filter-box,
.content:has(.scheme-lanes) .scheme-workbench-filter-secondary,
.content:has(.scheme-lanes) .scheme-quick-access,
.content:has(.scheme-lanes) .scheme-ai-status-panel,
.content:has(.scheme-lanes) .scheme-ai-group-panel,
.content:has(.scheme-lanes) .scheme-risk-center,
.content:has(.scheme-lanes) .scheme-result-search-strip,
.content:has(.scheme-lanes) .scheme-workbench-search-box,
.content:has(.scheme-lanes) .scheme-result-summary,
.content:has(.scheme-lanes) .scheme-extra-panel,
.content:has(.scheme-lanes) .scheme-share-summary,
.content:has(.scheme-lanes) .scheme-group-detail-drawer {
  border-color: var(--scheme-line);
  background: var(--scheme-surface-strong);
  box-shadow: 0 12px 30px rgba(15, 32, 51, 0.055);
}

.content:has(.scheme-lanes) .scheme-workbench-main > .scheme-workbench-header {
  display: grid;
  align-items: start;
  gap: 14px;
  grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.55fr);
  border-color: var(--scheme-line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(246, 250, 255, 0.98) 100%),
    #ffffff;
  padding: 14px 16px;
}

.content:has(.scheme-lanes) .scheme-workbench-title-zone {
  align-content: start;
  display: grid;
  gap: 10px;
  min-width: 0;
}

.content:has(.scheme-lanes) .scheme-workbench-main > .scheme-workbench-header .panel-title {
  max-width: none;
  color: #0f172a;
  font-size: 18px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.content:has(.scheme-lanes) .scheme-workbench-title-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.content:has(.scheme-lanes) .scheme-workbench-action-groups {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  min-width: 0;
}

.content:has(.scheme-lanes) .scheme-action-group {
  align-content: start;
  border: 1px solid var(--scheme-line);
  border-radius: 8px;
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 8px;
  background: #ffffff;
}

.content:has(.scheme-lanes) .scheme-action-group.is-planning {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.content:has(.scheme-lanes) .scheme-action-group.is-review {
  border-color: #c4b5fd;
  background: #fbfaff;
}

.content:has(.scheme-lanes) .scheme-action-group.is-snapshot {
  border-color: #fed7aa;
  background: #fffaf3;
}

.content:has(.scheme-lanes) .scheme-action-group.is-settings {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.content:has(.scheme-lanes) .scheme-action-group.is-output {
  border-color: #fde68a;
  background: #fffdf2;
}

.content:has(.scheme-lanes) .scheme-action-group-label {
  color: #526174;
  display: block;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.content:has(.scheme-lanes) .scheme-workbench-top-actions,
.content:has(.scheme-lanes) .planning-status-inline {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-start;
  min-width: 0;
}

.content:has(.scheme-lanes) button,
.content:has(.scheme-lanes) .scheme-delete-panel-actions select,
.content:has(.scheme-lanes) input,
.content:has(.scheme-lanes) select,
.content:has(.scheme-lanes) textarea,
.content:has(.scheme-lanes) .province-multi-trigger {
  border-color: var(--scheme-line-strong);
  background: #ffffff;
  color: var(--scheme-ink);
}

.content:has(.scheme-lanes) button {
  min-height: 32px;
  box-shadow: none;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

.content:has(.scheme-lanes) button:hover:not(:disabled) {
  border-color: #93b4e8;
  background: #f1f6ff;
  color: var(--scheme-blue-strong);
  transform: none;
}

.content:has(.scheme-lanes) button.primary,
.content:has(.scheme-lanes) .scheme-workbench-filter-actions > .primary,
.content:has(.scheme-lanes) .planning-status-inline button.primary {
  border-color: var(--scheme-blue-strong);
  background: linear-gradient(180deg, #2f73ff 0%, var(--scheme-blue) 100%);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.18);
}

.content:has(.scheme-lanes) button.primary:hover:not(:disabled),
.content:has(.scheme-lanes) .scheme-workbench-filter-actions > .primary:hover:not(:disabled) {
  border-color: #1e40af;
  background: #1d4ed8;
  color: #ffffff;
}

.content:has(.scheme-lanes) button.danger {
  border-color: #fecdd3;
  background: var(--scheme-red-soft);
  color: var(--scheme-red);
}

.content:has(.scheme-lanes) button.danger:hover:not(:disabled) {
  border-color: #fda4af;
  background: #ffe4e6;
  color: #be123c;
}

.content:has(.scheme-lanes) button:focus-visible,
.content:has(.scheme-lanes) input:focus,
.content:has(.scheme-lanes) select:focus,
.content:has(.scheme-lanes) textarea:focus,
.content:has(.scheme-lanes) .province-multi-trigger:focus {
  border-color: var(--scheme-blue);
  outline: 3px solid rgba(37, 99, 235, 0.16);
  outline-offset: 1px;
}

.content:has(.scheme-lanes) .scheme-top-predict {
  border-color: #bfdbfe;
  background: var(--scheme-blue-soft);
  border-radius: 8px;
}

.content:has(.scheme-lanes) .scheme-top-predict span,
.content:has(.scheme-lanes) .muted,
.content:has(.scheme-lanes) .scheme-workbench-search-status,
.content:has(.scheme-lanes) .scheme-student-detail-inline b,
.content:has(.scheme-lanes) .scheme-student-identity-card span,
.content:has(.scheme-lanes) .scheme-student-focus-card span,
.content:has(.scheme-lanes) .scheme-student-note-item span,
.content:has(.scheme-lanes) .scheme-result-summary-item span {
  color: var(--scheme-muted);
}

.content:has(.scheme-lanes) .scheme-workbench-control-panel {
  border-radius: 8px;
  padding: 12px;
  background: #f8fbff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.content:has(.scheme-lanes) .scheme-workbench-control-header {
  margin-bottom: 10px;
}

.content:has(.scheme-lanes) .scheme-workbench-control-header .scheme-filter-title {
  color: #0f172a;
  font-size: 14px;
  font-weight: 850;
}

.content:has(.scheme-lanes) .scheme-workbench-overview-grid {
  align-items: stretch;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(min(430px, 100%), 1fr));
  margin-bottom: 10px;
}

.content:has(.scheme-lanes) .scheme-workbench-overview-grid .scheme-quick-access,
.content:has(.scheme-lanes) .scheme-workbench-overview-grid .scheme-ai-group-panel,
.content:has(.scheme-lanes) .scheme-workbench-overview-grid .scheme-risk-center {
  height: 100%;
  margin-bottom: 0;
  min-width: 0;
}

.content:has(.scheme-lanes) .scheme-workbench-overview-grid .scheme-quick-access {
  grid-column: 1 / -1;
  border-color: #bfdbfe;
  background: #f0f7ff;
}

.content:has(.scheme-lanes) .scheme-workbench-overview-grid .scheme-ai-group-panel {
  border-color: #ddd6fe;
  background: #faf5ff;
}

.content:has(.scheme-lanes) .scheme-workbench-overview-grid .scheme-risk-center {
  border-color: #cbd5e1;
}

.content:has(.scheme-lanes) .scheme-workbench-overview-grid .scheme-ai-group-panel-head {
  align-items: flex-start;
}

.content:has(.scheme-lanes) .scheme-workbench-overview-grid .scheme-ai-group-top-findings button {
  max-width: 100%;
}

.content:has(.scheme-lanes) .scheme-workbench-control-grid {
  align-items: stretch;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(430px, 0.95fr) minmax(560px, 1.25fr);
}

.content:has(.scheme-lanes) .scheme-share-summary {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.content:has(.scheme-lanes) .scheme-workbench-left-stack,
.content:has(.scheme-lanes) .scheme-workbench-filter-box {
  min-width: 0;
}

.content:has(.scheme-lanes) .scheme-student-summary.focus.is-direct {
  border-radius: 8px;
  padding: 14px;
}

.content:has(.scheme-lanes) .scheme-student-priority-row {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(170px, 1.25fr) repeat(3, minmax(112px, 0.8fr));
}

.content:has(.scheme-lanes) .scheme-student-identity-card,
.content:has(.scheme-lanes) .scheme-student-priority-row .scheme-student-focus-card,
.content:has(.scheme-lanes) .scheme-student-note-row .scheme-student-note-item,
.content:has(.scheme-lanes) .scheme-student-detail-inline span {
  border-color: var(--scheme-line);
  border-radius: 8px;
  background: #ffffff;
}

.content:has(.scheme-lanes) .scheme-student-identity-card {
  border-color: #bfdbfe;
  background: var(--scheme-blue-soft);
}

.content:has(.scheme-lanes) .scheme-student-identity-card strong,
.content:has(.scheme-lanes) .scheme-student-focus-card strong,
.content:has(.scheme-lanes) .scheme-student-note-item strong {
  color: #0f172a;
}

.content:has(.scheme-lanes) .scheme-student-identity-card em {
  background: var(--scheme-blue);
  color: #ffffff;
}

.content:has(.scheme-lanes) .scheme-student-priority-row .scheme-student-focus-card.is-score {
  border-color: #93c5fd;
  background: #f0f7ff;
}

.content:has(.scheme-lanes) .scheme-student-priority-row .scheme-student-focus-card.is-score strong {
  color: var(--scheme-blue-strong);
  font-size: 23px;
}

.content:has(.scheme-lanes) .scheme-student-priority-row .scheme-student-focus-card.is-subject {
  border-color: #bae6fd;
  background: var(--scheme-cyan-soft);
}

.content:has(.scheme-lanes) .scheme-student-priority-row .scheme-student-focus-card.is-subject strong {
  color: var(--scheme-cyan);
}

.content:has(.scheme-lanes) .scheme-student-note-row {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(140px, 0.65fr) minmax(0, 1fr) minmax(0, 1fr);
}

.content:has(.scheme-lanes) .scheme-student-note-row .scheme-student-note-item.is-intent {
  border-color: #fde68a;
  background: var(--scheme-amber-soft);
}

.content:has(.scheme-lanes) .scheme-student-note-row .scheme-student-note-item.is-design-direction {
  border-color: #bae6fd;
  background: #f0fbff;
}

.content:has(.scheme-lanes) .scheme-student-detail-inline {
  max-height: 132px;
  overflow: auto;
  padding-right: 2px;
}

.content:has(.scheme-lanes) .scheme-student-detail-inline span:nth-child(n) {
  border-color: #e2e8f0;
  background: #f8fafc;
  color: #1f2937;
}

.content:has(.scheme-lanes) .scheme-workbench-filter-box {
  align-content: start;
  border-radius: 8px;
  display: grid;
  gap: 10px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.content:has(.scheme-lanes) .scheme-workbench-filter-layout {
  align-items: stretch;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
}

.content:has(.scheme-lanes) .scheme-workbench-filter-layout > * {
  min-width: 0;
}

.content:has(.scheme-lanes) .scheme-communication-record {
  border-color: #fed7aa;
  border-radius: 8px;
  background: #fff7ed;
}

.content:has(.scheme-lanes) .scheme-communication-record-head label {
  color: #0f172a;
}

.content:has(.scheme-lanes) .scheme-communication-record textarea {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.content:has(.scheme-lanes) .scheme-workbench-filter-actions {
  align-items: stretch;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) 92px;
}

.content:has(.scheme-lanes) .scheme-workbench-tier-focus .tier-offset-box {
  border-color: var(--scheme-line);
  border-radius: 8px;
  background: #ffffff;
}

.content:has(.scheme-lanes) .scheme-workbench-tier-focus .tier-offset-title,
.content:has(.scheme-lanes) .scheme-workbench-filter-secondary > .scheme-filter-title {
  color: #0f172a;
  font-weight: 850;
}

.content:has(.scheme-lanes) .scheme-workbench-tier-focus .tier-offset-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.content:has(.scheme-lanes) .scheme-workbench-tier-focus .tier-offset-card:nth-child(1) {
  border-color: #fecaca;
  background: #fff7f7;
}

.content:has(.scheme-lanes) .scheme-workbench-tier-focus .tier-offset-card:nth-child(2) {
  border-color: #fde68a;
  background: #fffbeb;
}

.content:has(.scheme-lanes) .scheme-workbench-tier-focus .tier-offset-card:nth-child(3) {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.content:has(.scheme-lanes) .scheme-workbench-tier-focus .tier-offset-card strong b {
  color: #0f172a;
}

.content:has(.scheme-lanes) .scheme-workbench-filter-actions > .primary {
  align-self: stretch;
  min-width: 0;
}

.content:has(.scheme-lanes) .scheme-workbench-filter-secondary {
  border-radius: 8px;
  padding: 12px;
  background: #ffffff;
}

.content:has(.scheme-lanes) .scheme-filter-grid.compact.secondary {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
}

.content:has(.scheme-lanes) .scheme-filter-grid.compact.secondary label {
  color: #526174;
}

.content:has(.scheme-lanes) .scheme-result-search-strip {
  align-items: stretch;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(360px, 0.9fr) minmax(320px, 0.65fr);
  padding: 10px;
}

.content:has(.scheme-lanes) .scheme-result-search-strip .scheme-workbench-search-box,
.content:has(.scheme-lanes) .scheme-result-summary {
  border-radius: 8px;
  box-shadow: none;
}

.content:has(.scheme-lanes) .scheme-result-search-strip .scheme-workbench-search-box {
  border-color: #bae6fd;
  background: #f0fbff;
}

.content:has(.scheme-lanes) .scheme-result-summary {
  border-color: #c7d2fe;
  background: #f5f7ff;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.content:has(.scheme-lanes) .scheme-result-summary-item:nth-child(n) {
  border-color: #dbeafe;
  background: #f8fbff;
}

.content:has(.scheme-lanes) .scheme-result-summary-item strong {
  color: var(--scheme-blue-strong);
}

.content:has(.scheme-lanes) .scheme-workbench-table-wrap {
  border-color: var(--scheme-line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(15, 32, 51, 0.075);
}

.content:has(.scheme-lanes) .scheme-workbench-table-wrap th,
.content:has(.scheme-lanes) .scheme-group-major-table th {
  border-color: #dbe5ef;
  background: #f3f7fb;
  color: #42526b;
}

.content:has(.scheme-lanes) .scheme-workbench-table-wrap td,
.content:has(.scheme-lanes) .scheme-group-major-table td {
  border-color: #edf2f7;
  color: #1f2937;
}

.content:has(.scheme-lanes) tr.scheme-tier-row:hover td {
  background: color-mix(in srgb, var(--scheme-tier-color, #f8fafc) 34%, #ffffff 66%);
}

.content:has(.scheme-lanes) tr.scheme-tier-row.is-selected td {
  background: color-mix(in srgb, var(--scheme-tier-color, #eff6ff) 42%, #ffffff 58%);
}

.content:has(.scheme-lanes) .scheme-sort-actions button,
.content:has(.scheme-lanes) .scheme-workbench-table-wrap td.actions button {
  border-color: #dbeafe;
  background: #f8fbff;
  color: var(--scheme-blue-strong);
}

.content:has(.scheme-lanes) .scheme-delete-panel {
  border-color: #fecdd3;
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(15, 32, 51, 0.08);
}

.content:has(.scheme-lanes) .scheme-delete-panel > .panel-header {
  border-color: #fecdd3;
  background: #fff7f8;
}

.content:has(.scheme-lanes) .scheme-delete-panel .panel-title {
  color: #be123c;
}

.content:has(.scheme-lanes) .scheme-delete-panel .panel-body.list {
  background: linear-gradient(180deg, #ffffff 0%, #fff7f8 100%);
}

.content:has(.scheme-lanes) .scheme-delete-panel .list-item.scheme-tier-card {
  border-color: #ffe4e6;
  border-left-color: color-mix(in srgb, var(--scheme-tier-color, #fda4af) 72%, #be123c 28%);
  border-radius: 8px;
  background: #ffffff;
}

.content:has(.scheme-lanes) .scheme-delete-panel .list-item.scheme-tier-card.is-selected {
  background: color-mix(in srgb, var(--scheme-tier-color, #fff1f2) 22%, #ffffff 78%);
}

.content:has(.scheme-lanes) .scheme-group-detail-drawer {
  border-color: #bfdbfe;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 -18px 44px rgba(15, 32, 51, 0.16);
}

.content:has(.scheme-lanes) .scheme-group-detail-drawer .scheme-group-detail-header {
  border-color: #dbeafe;
  background: #f8fbff;
}

.content:has(.scheme-lanes) .scheme-group-detail-drawer .scheme-group-detail-title {
  color: #0f172a;
}

.content:has(.scheme-lanes) .scheme-group-detail-drawer .scheme-group-primary-item:nth-child(n),
.content:has(.scheme-lanes) .scheme-group-detail-drawer .scheme-group-secondary-summary span {
  border-color: #e2e8f0;
  background: #f8fafc;
}

@media (max-width: 1640px) {
  .content:has(.scheme-lanes) .scheme-workbench-main > .scheme-workbench-header {
    grid-template-columns: 1fr;
  }

  .content:has(.scheme-lanes) .scheme-workbench-action-groups {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
  }
}

@media (max-width: 1280px) {
  .content:has(.scheme-lanes) .scheme-workbench-control-grid,
  .content:has(.scheme-lanes) .scheme-result-search-strip {
    grid-template-columns: 1fr;
  }

  .content:has(.scheme-lanes) .scheme-filter-grid.compact.secondary {
    grid-template-columns: repeat(2, minmax(128px, 1fr));
  }
}

@media (max-width: 900px) {
  .content:has(.scheme-lanes) .scheme-workbench-action-groups,
  .content:has(.scheme-lanes) .scheme-student-priority-row,
  .content:has(.scheme-lanes) .scheme-student-note-row,
  .content:has(.scheme-lanes) .scheme-workbench-filter-actions {
    grid-template-columns: 1fr;
  }

  .content:has(.scheme-lanes) .scheme-filter-grid.compact.secondary {
    grid-template-columns: 1fr;
  }
}

/* 20260704 student management redesign: overview, filters, table and detail workspace. */
.content:has(.student-management-page) {
  background:
    linear-gradient(180deg, #f6f8fb 0%, #eef3f7 100%);
}

.student-management-page {
  --student-ink: #172033;
  --student-muted: #637083;
  --student-line: #d9e2ec;
  --student-panel: #ffffff;
  --student-surface: #f7f9fc;
  --student-blue: #2563eb;
  --student-blue-soft: #eaf2ff;
  --student-teal: #0f766e;
  --student-teal-soft: #e8f6f3;
  --student-amber: #b7791f;
  --student-amber-soft: #fff7df;
  --student-red: #b4233a;
  --student-red-soft: #fff1f3;
  color: var(--student-ink);
  display: grid;
  gap: 16px;
}

.student-management-hero {
  align-items: end;
  background:
    linear-gradient(135deg, #ffffff 0%, #f5f9ff 58%, #fbf7ee 100%);
  border: 1px solid var(--student-line);
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(18, 32, 48, 0.08);
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 20px;
}

.student-management-kicker,
.student-table-eyebrow,
.student-detail-eyebrow {
  color: #64748b;
  display: block;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.4;
  text-transform: uppercase;
}

.student-management-heading h2 {
  color: var(--student-ink);
  font-size: 24px;
  line-height: 1.2;
  margin: 4px 0 6px;
}

.student-management-heading p {
  color: var(--student-muted);
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
}

.student-management-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.student-management-actions button,
.student-filter-title button,
.student-detail-actions button,
.student-management-table .actions button {
  border-radius: 8px;
  min-height: 34px;
}

.student-management-actions #newStudentBtn,
.student-management-actions #temporaryQueryBtn {
  align-items: center;
  box-sizing: border-box;
  display: inline-flex;
  height: 50px;
  justify-content: center;
  min-height: 50px;
  min-width: 100px;
  padding: 0 16px;
  width: 100px;
}

.student-status-overview {
  align-items: stretch;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(360px, .76fr) minmax(0, 1.24fr);
}

.student-primary-status {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.student-status-card {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--student-line);
  border-left: 4px solid var(--student-blue);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(18, 32, 48, 0.055);
  display: grid;
  gap: 3px;
  justify-items: center;
  min-height: 68px;
  padding: 12px 14px;
  text-align: center;
}

.student-status-card strong {
  color: var(--student-ink);
  font-size: 26px;
  line-height: 1.15;
}

.student-status-card span {
  color: var(--student-muted);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.45;
}

.student-status-card.is-ok {
  background: linear-gradient(180deg, #ffffff 0%, var(--student-teal-soft) 100%);
  border-color: #b7e4dc;
  border-left-color: var(--student-teal);
}

.student-status-card.is-warn {
  background: linear-gradient(180deg, #ffffff 0%, var(--student-amber-soft) 100%);
  border-color: #f3d38a;
  border-left-color: var(--student-amber);
}

.student-status-card.is-danger {
  background: linear-gradient(180deg, #ffffff 0%, var(--student-red-soft) 100%);
  border-color: #f4b8c3;
  border-left-color: var(--student-red);
}

.student-secondary-strip {
  align-content: center;
  background: #ffffff;
  border: 1px solid var(--student-line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(18, 32, 48, 0.045);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 68px;
  padding: 10px 12px;
}

.student-secondary-strip span {
  align-content: center;
  background: var(--student-surface);
  border: 1px solid #e4ebf3;
  border-radius: 8px;
  color: var(--student-muted);
  display: inline-grid;
  font-size: 11px;
  font-weight: 800;
  gap: 4px;
  justify-items: center;
  line-height: 1.1;
  min-height: 54px;
  min-width: 78px;
  padding: 7px 10px;
  text-align: center;
  white-space: nowrap;
}

.student-secondary-strip strong {
  color: var(--student-ink);
  display: block;
  font-size: 19px;
  line-height: 1.05;
}

.student-secondary-strip span:last-child {
  min-width: 174px;
}

.workbench-page .wb-msg.user .wb-bubble {
  align-items: center;
  column-gap: 10px;
  display: grid;
  grid-template-areas:
    "time time"
    "content actions";
  grid-template-columns: minmax(0, 1fr) auto;
  line-height: 1.45;
  min-height: 0;
  padding: 8px 10px;
  row-gap: 5px;
}

.workbench-page .wb-msg.user .wb-message-time {
  color: #dbeafe;
  font-size: 11px;
  grid-area: time;
  line-height: 14px;
  margin: 0;
}

.workbench-page .wb-msg.user .wb-bubble-content {
  grid-area: content;
  line-height: 1.5;
  min-width: 0;
}

.workbench-page .wb-msg.user .wb-message-actions {
  align-self: center;
  grid-area: actions;
  margin: 0;
}

.workbench-page .wb-msg.user .wb-message-actions button {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(255, 255, 255, 0.72);
  color: #0f4f8f;
  min-height: 26px;
  padding: 0 8px;
}

.workbench-page .wb-msg.user .wb-message-status {
  color: #dbeafe;
}

.student-management-workspace {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: 280px minmax(0, 1fr) 340px;
}

.student-filter-rail,
.student-table-panel,
.student-detail-panel {
  background: var(--student-panel);
  border: 1px solid var(--student-line);
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(18, 32, 48, 0.07);
}

.student-filter-rail {
  display: grid;
  gap: 12px;
  padding: 14px;
  position: sticky;
  top: 14px;
}

.student-filter-title {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.student-filter-title span {
  color: var(--student-ink);
  font-size: 15px;
  font-weight: 850;
}

.student-filter-title button {
  background: var(--student-blue-soft);
  border-color: #bfdbfe;
  color: #1d4ed8;
  font-size: 12px;
  padding: 0 10px;
}

.student-filter-field {
  color: var(--student-muted);
  display: grid;
  font-size: 12px;
  font-weight: 750;
  gap: 6px;
}

.student-filter-field input,
.student-filter-field select,
.student-management-table select {
  background: #f8fafc;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  color: var(--student-ink);
  min-height: 36px;
}

.student-filter-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) 82px;
  margin-top: 2px;
}

.student-filter-submit {
  width: 100%;
}

.student-filter-actions button {
  min-height: 36px;
}

.student-table-panel {
  min-width: 0;
  overflow: hidden;
}

.student-table-toolbar {
  align-items: center;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border-bottom: 1px solid var(--student-line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 14px 16px;
}

.student-table-toolbar strong {
  color: var(--student-ink);
  display: block;
  font-size: 18px;
  line-height: 1.2;
}

.student-table-toolbar > span {
  background: var(--student-surface);
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  color: var(--student-muted);
  font-size: 12px;
  font-weight: 750;
  padding: 6px 10px;
  white-space: nowrap;
}

.student-management-table-wrap {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
  max-height: calc(100vh - 320px);
}

.student-management-table {
  min-width: 1080px;
}

.student-management-table th {
  background: #f4f7fb;
  border-color: #dbe4ee;
  color: #455468;
  font-size: 12px;
  font-weight: 850;
  padding: 11px 12px;
  white-space: nowrap;
}

.student-management-table td {
  border-color: #edf2f7;
  color: #243244;
  padding: 12px;
  vertical-align: middle;
}

.student-management-table tbody tr {
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.student-management-table tbody tr:hover td {
  background: #f9fbff;
}

.student-management-table tbody tr.is-selected td {
  background: #eef6ff;
  box-shadow: inset 0 1px 0 #dbeafe, inset 0 -1px 0 #dbeafe;
}

.student-management-table tbody tr.is-selected td:first-child {
  box-shadow: inset 4px 0 0 var(--student-blue), inset 0 1px 0 #dbeafe, inset 0 -1px 0 #dbeafe;
}

.student-name-cell,
.student-score-block {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.student-name-cell strong,
.student-score-block strong {
  color: var(--student-ink);
  font-size: 14px;
  line-height: 1.25;
}

.student-name-cell span,
.student-score-block span,
.student-choice-cell {
  color: var(--student-muted);
  font-size: 12px;
  line-height: 1.4;
}

.student-choice-cell {
  display: block;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-source-pill,
.student-scheme-count {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 750;
  min-height: 24px;
  padding: 3px 9px;
  white-space: nowrap;
}

.student-source-pill {
  background: #f1f5f9;
  color: #475569;
}

.student-scheme-count.is-ok {
  background: var(--student-teal-soft);
  color: var(--student-teal);
}

.student-scheme-count.is-empty {
  background: var(--student-amber-soft);
  color: var(--student-amber);
}

.student-management-table .student-planning-status-select {
  min-width: 116px;
}

.student-planning-note {
  font-size: 11px;
  line-height: 1.4;
  margin-top: 5px;
  max-width: 170px;
}

.student-management-table td.actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 190px;
}

.student-management-table .actions button {
  font-size: 12px;
  min-height: 30px;
  padding: 0 9px;
}

.student-detail-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  position: sticky;
  top: 14px;
}

.student-detail-panel.is-empty {
  min-height: 260px;
  place-items: center;
}

.student-detail-empty {
  color: var(--student-muted);
  font-size: 13px;
}

.student-detail-profile {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.student-detail-profile h3 {
  color: var(--student-ink);
  font-size: 22px;
  line-height: 1.2;
  margin: 4px 0;
}

.student-detail-subtitle {
  color: var(--student-muted);
  font-size: 12px;
  line-height: 1.5;
}

.student-detail-profile .status {
  flex: 0 0 auto;
  white-space: nowrap;
}

.student-detail-metrics {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.student-detail-metric {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  min-height: 72px;
  padding: 10px;
}

.student-detail-metric span {
  color: var(--student-muted);
  font-size: 11px;
  font-weight: 750;
}

.student-detail-metric strong {
  color: var(--student-ink);
  font-size: 17px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.student-detail-metric.is-score {
  background: var(--student-blue-soft);
  border-color: #bfdbfe;
}

.student-detail-metric.is-ok {
  background: var(--student-teal-soft);
  border-color: #b7e4dc;
}

.student-detail-metric.is-warn {
  background: var(--student-amber-soft);
  border-color: #f3d38a;
}

.student-detail-section {
  border-top: 1px solid #edf2f7;
  display: grid;
  gap: 8px;
  padding-top: 12px;
}

.student-detail-section h4 {
  color: var(--student-ink);
  font-size: 14px;
  line-height: 1.25;
  margin: 0;
}

.student-detail-section p {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  color: #334155;
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
  min-height: 54px;
  padding: 10px;
}

.student-detail-field {
  align-items: start;
  display: grid;
  gap: 8px;
  grid-template-columns: 78px minmax(0, 1fr);
}

.student-detail-field span {
  color: var(--student-muted);
  font-size: 12px;
  line-height: 1.5;
}

.student-detail-field strong {
  color: #243244;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.student-detail-actions {
  border-top: 1px solid #edf2f7;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 12px;
}

.student-detail-actions button {
  flex: 1 1 130px;
  font-size: 12px;
}

@media (max-width: 1660px) {
  .student-management-workspace {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .student-detail-panel {
    grid-column: 1 / -1;
    position: static;
  }

  .student-detail-panel:not(.is-empty) {
    grid-template-columns: minmax(240px, 0.9fr) minmax(260px, 1fr) minmax(250px, 0.8fr);
  }

  .student-detail-actions {
    align-content: start;
    border-top: 0;
    padding-top: 0;
  }
}

@media (max-width: 1180px) {
  .student-management-hero,
  .student-management-workspace {
    grid-template-columns: 1fr;
  }

  .student-management-actions {
    justify-content: flex-start;
  }

  .student-filter-rail,
  .student-detail-panel {
    position: static;
  }

  .student-status-overview {
    grid-template-columns: 1fr;
  }

  .student-detail-panel:not(.is-empty) {
    grid-template-columns: 1fr;
  }

  .student-detail-actions {
    border-top: 1px solid #edf2f7;
    padding-top: 12px;
  }
}

@media (max-width: 720px) {
  .student-management-hero,
  .student-filter-rail,
  .student-detail-panel {
    padding: 14px;
  }

  .student-primary-status,
  .student-detail-metrics {
    grid-template-columns: 1fr;
  }

  .student-table-toolbar,
  .student-detail-profile,
  .student-management-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .student-management-actions #newStudentBtn,
  .student-management-actions #temporaryQueryBtn {
    min-width: 0;
    width: 100%;
  }

  .workbench-page .wb-msg.user .wb-bubble {
    grid-template-areas:
      "time"
      "content"
      "actions";
    grid-template-columns: 1fr;
  }

  .workbench-page .wb-msg.user .wb-message-actions {
    justify-content: flex-end;
  }

  .student-table-toolbar > span {
    align-self: flex-start;
  }
}

/* 20260704 data management redesign: data asset workspace with filter rail and side insight panel. */
.content:has(.data-management-page) {
  background: linear-gradient(180deg, #f7f9fc 0%, #eef3f8 100%);
}

.data-management-page {
  --data-ink: #172033;
  --data-muted: #637083;
  --data-line: #d8e3ef;
  --data-panel: #ffffff;
  --data-surface: #f7f9fc;
  --data-blue: #1e40af;
  --data-blue-soft: #eaf2ff;
  --data-teal: #0f766e;
  --data-teal-soft: #e7f7f3;
  --data-amber: #b7791f;
  --data-amber-soft: #fff7df;
  --data-red: #b4233a;
  --data-red-soft: #fff1f3;
  color: var(--data-ink);
  display: grid;
  gap: 16px;
}

.data-management-hero {
  align-items: end;
  background: linear-gradient(135deg, #ffffff 0%, #f4f8ff 62%, #fbf8ef 100%);
  border: 1px solid var(--data-line);
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(18, 32, 48, 0.08);
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 20px;
}

.data-management-kicker,
.data-table-eyebrow {
  color: #64748b;
  display: block;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.4;
  text-transform: uppercase;
}

.data-management-heading h2 {
  color: var(--data-ink);
  font-size: 24px;
  line-height: 1.2;
  margin: 4px 0 6px;
}

.data-management-heading p {
  color: var(--data-muted);
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
}

.data-management-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.data-management-actions button,
.data-filter-actions button,
.data-management-table .actions button,
.data-detail-actions button {
  border-radius: 8px;
  min-height: 34px;
}

.data-management-actions button {
  align-items: center;
  box-sizing: border-box;
  display: inline-flex;
  height: 50px;
  justify-content: center;
  min-height: 50px;
  min-width: 100px;
  padding: 0 16px;
  width: 100px;
}

.data-asset-kpi-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(6, minmax(140px, 1fr));
}

.data-asset-metric {
  background: #ffffff;
  border: 1px solid var(--data-line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(18, 32, 48, 0.055);
  display: grid;
  gap: 5px;
  min-height: 90px;
  padding: 14px;
}

.data-asset-metric span {
  color: var(--data-muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

.data-asset-metric strong {
  color: var(--data-ink);
  font-size: 23px;
  line-height: 1.1;
}

.data-asset-metric em {
  color: #64748b;
  font-size: 11px;
  font-style: normal;
  line-height: 1.35;
}

.data-asset-metric.is-primary {
  background: linear-gradient(180deg, #ffffff 0%, var(--data-blue-soft) 100%);
  border-color: #bfdbfe;
}

.data-asset-metric.is-ok {
  background: linear-gradient(180deg, #ffffff 0%, var(--data-teal-soft) 100%);
  border-color: #b7e4dc;
}

.data-asset-metric.is-warn {
  background: linear-gradient(180deg, #ffffff 0%, var(--data-amber-soft) 100%);
  border-color: #f2d38c;
}

.admission-change-monitor {
  display: grid;
  gap: 11px;
  padding: 16px;
  border: 1px solid var(--data-line);
  border-left: 4px solid var(--data-blue);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(18, 32, 48, .055);
}

.admission-change-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.admission-change-head > div {
  display: grid;
  gap: 2px;
}

.admission-change-head > div > span {
  color: var(--data-blue);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.admission-change-head h3 {
  margin: 0;
  color: var(--data-ink);
  font-size: 18px;
}

.admission-change-head p {
  margin: 3px 0 0;
  color: var(--data-muted);
  font-size: 12px;
  line-height: 1.55;
}

.admission-change-head button {
  flex: 0 0 auto;
  min-height: 40px;
}

.admission-change-metrics {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.admission-change-metrics > div {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #f8fafc;
}

.admission-change-metrics b {
  color: var(--data-ink);
  font-size: 20px;
}

.admission-change-metrics span {
  color: var(--data-muted);
  font-size: 10px;
  font-weight: 750;
}

.admission-change-metrics .danger { border-color: #fecdd3; background: var(--data-red-soft); }
.admission-change-metrics .danger b { color: var(--data-red); }
.admission-change-metrics .warn { border-color: #fde68a; background: var(--data-amber-soft); }
.admission-change-metrics .warn b { color: var(--data-amber); }

.admission-change-run {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  padding: 8px 10px;
  border-radius: 7px;
  background: var(--data-blue-soft);
  color: #31527f;
  font-size: 11px;
}

.admission-change-run.is-empty {
  background: var(--data-amber-soft);
  color: #7c4a03;
}

.admission-change-run strong {
  color: var(--data-blue);
}

.admission-change-run small {
  margin-left: auto;
}

.admission-change-list {
  display: grid;
  gap: 6px;
}

.admission-change-item {
  display: grid;
  align-items: center;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 9px 10px;
  border: 1px solid #e2e8f0;
  border-left: 3px solid #94a3b8;
  border-radius: 7px;
  background: #ffffff;
}

.admission-change-item.severity-high { border-left-color: var(--data-red); background: #fffafa; }
.admission-change-item.severity-medium { border-left-color: var(--data-amber); background: #fffdf7; }

.admission-change-item-main {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.admission-change-item-main > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.admission-change-item-main > div span {
  padding: 2px 6px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: 10px;
  font-weight: 850;
}

.admission-change-item-main strong {
  color: var(--data-ink);
  font-size: 12px;
}

.admission-change-item-main p {
  margin: 0;
  color: #475569;
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: normal;
}

.admission-change-item-main small {
  color: var(--data-muted);
  font-size: 10px;
}

.admission-change-actions {
  display: flex;
  gap: 6px;
}

.admission-change-actions button {
  min-height: 32px;
  padding: 0 9px;
  font-size: 11px;
}

.admission-change-empty {
  padding: 12px;
  border: 1px dashed #cbd5e1;
  border-radius: 7px;
  color: var(--data-muted);
  font-size: 12px;
  text-align: center;
}

.data-management-workspace {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: 300px minmax(0, 1fr) 360px;
}

.data-filter-rail,
.data-table-panel,
.data-management-side > .data-detail-drawer,
.data-asset-side-panel {
  background: var(--data-panel);
  border: 1px solid var(--data-line);
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(18, 32, 48, 0.07);
}

.data-filter-rail {
  display: grid;
  gap: 14px;
  padding: 14px;
  position: sticky;
  top: 14px;
}

.data-filter-title {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.data-filter-title span {
  color: var(--data-ink);
  font-size: 15px;
  font-weight: 850;
}

.data-filter-title strong {
  background: var(--data-blue-soft);
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: var(--data-blue);
  font-size: 12px;
  padding: 5px 9px;
  white-space: nowrap;
}

.data-filter-section {
  border-top: 1px solid #edf2f7;
  display: grid;
  gap: 9px;
  padding-top: 12px;
}

.data-filter-section h3 {
  color: var(--data-ink);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.25;
  margin: 0;
}

.data-filter-rail label,
.data-filter-rail .field-group {
  color: var(--data-muted);
  display: grid;
  font-size: 12px;
  font-weight: 750;
  gap: 6px;
}

.data-filter-rail label.is-disabled,
.data-filter-rail .field-group.is-disabled {
  opacity: 0.48;
}

.data-filter-rail input,
.data-filter-rail select,
.data-filter-rail .province-multi-trigger,
.data-management-pagination select {
  background: #f8fafc;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  color: var(--data-ink);
  min-height: 36px;
  width: 100%;
}

.data-filter-range-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.data-filter-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) 82px;
}

.data-filter-rail .data-training-mode-multi {
  min-width: 0;
  position: relative;
}

.data-filter-rail .province-multi-menu {
  left: 0;
  right: 0;
  width: auto;
  z-index: 28;
}

.data-table-panel {
  min-width: 0;
  overflow: hidden;
}

.data-table-toolbar {
  align-items: start;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border-bottom: 1px solid var(--data-line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 14px 16px;
}

.data-table-toolbar strong {
  color: var(--data-ink);
  display: block;
  font-size: 18px;
  line-height: 1.25;
}

.data-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.data-filter-chip {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  color: #475569;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.3;
  padding: 4px 8px;
}

.data-filter-chip.is-muted {
  background: #f8fafc;
  color: #64748b;
}

.data-table-count {
  background: var(--data-blue-soft);
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  display: grid;
  gap: 2px;
  justify-items: end;
  min-width: 112px;
  padding: 10px 12px;
}

.data-table-count strong {
  color: var(--data-blue);
  font-size: 20px;
}

.data-table-count span {
  color: #3b5b8c;
  font-size: 12px;
  font-weight: 750;
}

.data-management-table-wrap {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
  max-height: calc(100vh - 340px);
}

.data-management-table {
  min-width: 1180px;
}

.data-management-table th {
  background: #f4f7fb;
  border-color: #dbe4ee;
  color: #455468;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.data-management-table td {
  border-color: #edf2f7;
  color: #243244;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.data-management-table-wrap.is-compact th,
.data-management-table-wrap.is-compact td {
  padding: 8px 10px;
}

.data-management-table-wrap.is-comfortable th,
.data-management-table-wrap.is-comfortable td {
  padding: 12px 12px;
}

.data-management-table tbody tr {
  cursor: pointer;
}

.data-management-table tbody tr:hover td {
  background: #f9fbff;
}

.data-management-table tbody tr:focus-visible td {
  outline: 2px solid #bfdbfe;
  outline-offset: -2px;
}

.data-management-table tbody tr.has-quality-warning td:first-child {
  box-shadow: inset 4px 0 0 #f6c453;
}

.data-management-table .data-sort {
  align-items: center;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  gap: 5px;
  min-height: 0;
  padding: 0;
}

.data-management-table .data-sort.active {
  color: var(--data-blue);
}

.data-management-table .data-sort em {
  color: var(--data-blue);
  font-style: normal;
}

.data-management-table td.actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 150px;
}

.data-management-table .actions button {
  font-size: 12px;
  min-height: 30px;
  padding: 0 9px;
}

.data-management-pagination {
  border-top: 1px solid var(--data-line);
  margin: 0;
  padding: 12px 14px;
}

.data-management-side {
  min-width: 0;
  position: sticky;
  top: 14px;
}

.data-management-side > .data-detail-drawer {
  bottom: auto;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: min(720px, calc(100vh - 150px));
  left: auto;
  max-height: calc(100vh - 150px);
  position: static;
  right: auto;
  z-index: auto;
}

.data-management-side .data-detail-header {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border-color: var(--data-line);
  border-radius: 8px 8px 0 0;
}

.data-management-side .data-detail-title {
  color: var(--data-ink);
}

.data-management-side .data-detail-body {
  min-height: 0;
  overflow: auto;
}

.data-management-side .data-detail-grid,
.data-management-side .data-detail-all-fields {
  grid-template-columns: 1fr;
}

.data-management-side .data-detail-table {
  max-height: 260px;
}

.data-asset-side-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.data-asset-side-head span {
  color: #64748b;
  display: block;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.4;
  text-transform: uppercase;
}

.data-asset-side-head strong {
  color: var(--data-ink);
  display: block;
  font-size: 20px;
  line-height: 1.25;
  margin-top: 4px;
}

.data-asset-side-head p,
.data-asset-quality p,
.data-asset-side-hint p {
  color: var(--data-muted);
  font-size: 12px;
  line-height: 1.6;
  margin: 6px 0 0;
}

.data-asset-quality {
  background: var(--data-blue-soft);
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 12px;
}

.data-asset-quality > div {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.data-asset-quality span {
  color: #31527f;
  font-size: 12px;
  font-weight: 750;
}

.data-asset-quality strong {
  color: var(--data-blue);
  font-size: 24px;
  line-height: 1;
}

.data-asset-distribution {
  border-top: 1px solid #edf2f7;
  display: grid;
  gap: 8px;
  padding-top: 12px;
}

.data-asset-distribution h4,
.data-asset-side-hint strong {
  color: var(--data-ink);
  font-size: 14px;
  line-height: 1.25;
  margin: 0;
}

.data-asset-bar-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 72px minmax(0, 1fr) 28px;
}

.data-asset-bar-row span {
  color: #475569;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-asset-bar-row div {
  background: #edf2f7;
  border-radius: 999px;
  height: 7px;
  overflow: hidden;
}

.data-asset-bar-row i {
  background: linear-gradient(90deg, var(--data-blue) 0%, #14b8a6 100%);
  border-radius: inherit;
  display: block;
  height: 100%;
}

.data-asset-bar-row strong {
  color: var(--data-muted);
  font-size: 12px;
  text-align: right;
}

.data-asset-side-hint {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
}

@media (max-width: 1720px) {
  .data-asset-kpi-grid {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
  }

  .admission-change-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .data-management-workspace {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .data-management-side {
    grid-column: 1 / -1;
    position: static;
  }

  .data-management-side > .data-detail-drawer,
  .data-asset-side-panel {
    height: auto;
    max-height: none;
  }

  .data-asset-side-panel {
    grid-template-columns: minmax(220px, 0.8fr) minmax(260px, 1fr) minmax(260px, 1fr) minmax(220px, 0.8fr);
  }
}

@media (max-width: 1180px) {
  .data-management-hero,
  .data-management-workspace {
    grid-template-columns: 1fr;
  }

  .data-management-actions {
    justify-content: flex-start;
  }

  .data-filter-rail,
  .data-management-side {
    position: static;
  }

  .data-asset-kpi-grid,
  .data-asset-side-panel {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }
}

@media (max-width: 720px) {
  .data-management-hero,
  .data-filter-rail,
  .data-asset-side-panel {
    padding: 14px;
  }

  .data-asset-kpi-grid,
  .data-asset-side-panel,
  .data-filter-range-grid,
  .data-filter-actions {
    grid-template-columns: 1fr;
  }

  .data-table-toolbar,
  .data-management-actions,
  .admission-change-head {
    align-items: stretch;
    flex-direction: column;
  }

  .admission-change-monitor {
    padding: 13px;
  }

  .admission-change-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admission-change-item {
    grid-template-columns: 1fr;
  }

  .admission-change-actions button,
  .admission-change-head button {
    min-height: 44px;
  }

  .data-management-actions button {
    min-width: 0;
    width: 100%;
  }

  .data-table-count {
    justify-items: start;
  }
}

/* 20260704 remaining admin pages redesign: shared operational workspace system. */
.ops-page {
  --ops-ink: #172033;
  --ops-muted: #5b677a;
  --ops-line: #dce4ee;
  --ops-soft: #f5f8fc;
  --ops-blue: #2563eb;
  --ops-teal: #0f8f86;
  --ops-gold: #b7791f;
  --ops-violet: #6d5bd0;
  display: grid;
  gap: 16px;
  min-width: 0;
}

.ops-hero {
  align-items: start;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 251, 255, 0.96) 48%, rgba(240, 253, 250, 0.92) 100%),
    radial-gradient(circle at 100% 0%, rgba(37, 99, 235, 0.12), transparent 36%);
  border: 1px solid var(--ops-line);
  border-radius: 8px;
  box-shadow: 0 16px 42px rgba(25, 39, 68, 0.08);
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) auto;
  overflow: hidden;
  padding: 18px;
}

.ops-kicker {
  color: var(--ops-blue);
  display: block;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.4;
  margin-bottom: 5px;
}

.ops-hero h2 {
  color: var(--ops-ink);
  font-size: 24px;
  line-height: 1.2;
  margin: 0;
}

.ops-hero p,
.ops-side-panel p,
.ops-latest-card p {
  color: var(--ops-muted);
  font-size: 13px;
  line-height: 1.6;
  margin: 6px 0 0;
}

.ops-hero-actions,
.ops-control-cluster {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.ops-control-cluster {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid #e5edf7;
  border-radius: 8px;
  padding: 10px;
}

.ops-control-cluster label {
  color: #4a5568;
  display: grid;
  font-size: 12px;
  font-weight: 750;
  gap: 5px;
  min-width: 132px;
}

.ops-control-cluster select,
.ops-control-cluster input {
  min-height: 34px;
}

.ops-kpi-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
}

.ops-metric {
  background: #ffffff;
  border: 1px solid var(--ops-line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(25, 39, 68, 0.06);
  min-width: 0;
  padding: 14px;
  position: relative;
}

.ops-metric::before {
  background: #94a3b8;
  border-radius: 999px;
  content: "";
  display: block;
  height: 4px;
  margin-bottom: 12px;
  width: 36px;
}

.ops-metric.accent::before {
  background: var(--ops-blue);
}

.ops-metric.teal::before {
  background: var(--ops-teal);
}

.ops-metric.gold::before {
  background: #d69e2e;
}

.ops-metric.violet::before {
  background: var(--ops-violet);
}

.ops-metric.danger::before {
  background: #dc2626;
}

.ops-metric-value {
  color: var(--ops-ink);
  font-size: 24px;
  font-weight: 850;
  line-height: 1.1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-metric-label {
  color: #4b5563;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  margin-top: 6px;
}

.ops-metric-note {
  color: #718096;
  font-size: 12px;
  line-height: 1.4;
  margin-top: 3px;
}

.ops-workspace {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.ops-workspace-side {
  grid-template-columns: 300px minmax(0, 1fr);
}

.student-intake-layout {
  grid-template-columns: 260px minmax(0, 1fr) 280px;
}

.volunteer-review-layout {
  grid-template-columns: 320px minmax(0, 1fr) 280px;
}

.ops-rail,
.ops-side-panel,
.ops-table-panel {
  background: #ffffff;
  border: 1px solid var(--ops-line);
  border-radius: 8px;
  box-shadow: 0 16px 38px rgba(25, 39, 68, 0.07);
  min-width: 0;
  overflow: hidden;
}

.ops-rail,
.ops-side-panel {
  align-self: start;
  display: grid;
  gap: 14px;
  padding: 16px;
  position: sticky;
  top: 14px;
}

.ops-table-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.ops-panel-head {
  display: grid;
  gap: 4px;
}

.ops-panel-head.inline {
  align-items: center;
  border-bottom: 1px solid var(--ops-line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
}

.ops-panel-head span,
.ops-latest-card span,
.ops-info-item span {
  color: #64748b;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.4;
}

.ops-panel-head strong,
.ops-latest-card strong {
  color: var(--ops-ink);
  display: block;
  font-size: 18px;
  line-height: 1.25;
}

.ops-count {
  background: #eef6ff;
  border: 1px solid #c7dcff;
  border-radius: 999px;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
  padding: 6px 10px;
  white-space: nowrap;
}

.ops-info-list {
  display: grid;
  gap: 8px;
}

.ops-info-item {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e5eaf1;
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 10px;
}

.ops-info-item strong {
  color: var(--ops-ink);
  font-size: 14px;
  line-height: 1.3;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ops-info-item.danger strong {
  color: #dc2626;
}

.ops-action-grid {
  display: grid;
  gap: 8px;
}

.ops-action-grid button {
  justify-content: center;
  width: 100%;
}

.ops-muted-note {
  background: #f8fafc;
  border: 1px solid #e5eaf1;
  border-radius: 8px;
  color: var(--ops-muted);
  font-size: 12px;
  line-height: 1.55;
  padding: 10px;
}

.ops-alert {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #9a3412;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.5;
  padding: 10px 12px;
}

.ops-alert.danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.ops-latest-card {
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  border: 1px solid #e5edf7;
  border-radius: 8px;
  padding: 12px;
}

.ops-table-wrap {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
  max-height: calc(100vh - 340px);
}

.ops-table-wrap table {
  min-width: 980px;
}

.student-intake-table-wrap table {
  min-width: 1500px;
}

.ops-table-wrap th {
  background: #f4f7fb;
  border-color: #dfe8f2;
  color: #445166;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.ops-table-wrap td {
  border-color: #edf2f7;
  color: #253246;
  max-width: 260px;
  vertical-align: middle;
}

.ops-table-wrap tbody tr:hover td {
  background: #f9fbff;
}

.ops-table-wrap td.actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 180px;
}

.ops-table-wrap .actions button {
  font-size: 12px;
  min-height: 30px;
  padding: 0 9px;
}

.claim-config-card .claim-teacher-avatar-preview.large {
  height: 76px;
  margin: 0;
  width: 76px;
}

.volunteer-review-links-rail > .panel {
  background: transparent;
  border: 0;
  box-shadow: none;
  min-width: 0;
}

.volunteer-review-links-rail > .panel > .panel-header {
  border: 0;
  padding: 0 0 12px;
}

.volunteer-review-links-rail > .panel > .panel-body {
  padding: 0;
}

.volunteer-review-links-rail .vr-link-panel {
  align-items: stretch;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.volunteer-review-links-rail .vr-link-panel .inline-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
}

.volunteer-review-links-rail .vr-link-panel .inline-actions button {
  min-width: 0;
  padding-left: 8px;
  padding-right: 8px;
  white-space: nowrap;
  width: 100%;
  word-break: keep-all;
}

.vr-orders-panel .vr-orders-table {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
  max-height: calc(100vh - 360px);
}

.vr-orders-panel .vr-orders-table table {
  min-width: 1180px;
}

.admin-workbench-redesign {
  background: linear-gradient(180deg, #f6f8fb 0%, #eef5f4 100%);
  gap: 16px;
  padding: 16px;
}

.admin-workbench-redesign .workbench-sidebar,
.admin-workbench-redesign .workbench-chat {
  background: #ffffff;
  border: 1px solid #dce4ee;
  border-radius: 8px;
  box-shadow: 0 16px 38px rgba(25, 39, 68, 0.08);
  overflow: hidden;
}

.admin-workbench-redesign .workbench-sidebar-header,
.admin-workbench-redesign .workbench-chat-header {
  background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
  border-bottom: 1px solid #e2e8f0;
}

.admin-workbench-redesign .workbench-parent-item.active {
  background: #eef6ff;
  box-shadow: inset 4px 0 0 #2563eb;
}

.admin-workbench-redesign .workbench-message.assistant,
.admin-workbench-redesign .workbench-message.system {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.admin-workbench-redesign .workbench-message.user {
  background: #eff6ff;
  border-color: #bfdbfe;
}

/* Scheme student summary: prevent wrapped text from overlapping and avoid nested scroll. */
.content:has(.scheme-lanes) .scheme-student-summary.focus.is-direct {
  align-content: start;
  gap: 8px;
  overflow: visible;
}

.content:has(.scheme-lanes) .scheme-student-priority-row,
.content:has(.scheme-lanes) .scheme-student-note-row {
  align-items: stretch;
}

.content:has(.scheme-lanes) .scheme-student-note-row {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
}

.content:has(.scheme-lanes) .scheme-student-note-row .scheme-student-note-item {
  align-content: start;
  display: grid;
  gap: 3px;
  min-height: 54px;
  overflow: visible;
}

.content:has(.scheme-lanes) .scheme-student-note-row .scheme-student-note-item strong {
  display: block;
  max-height: none;
  overflow: visible;
  overflow-wrap: anywhere;
  white-space: normal;
  word-break: break-word;
}

.content:has(.scheme-lanes) .scheme-student-detail-inline {
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.content:has(.scheme-lanes) .scheme-student-detail-inline span {
  align-content: start;
  align-items: flex-start;
  min-height: 30px;
  overflow: visible;
  overflow-wrap: anywhere;
  white-space: normal;
  word-break: break-word;
}

.content:has(.scheme-lanes) .scheme-student-detail-inline span.is-health-risk,
.content:has(.scheme-lanes) .scheme-student-detail-inline span.is-health-caution {
  border-width: 1px 1px 1px 3px;
  font-weight: 800;
}

.content:has(.scheme-lanes) .scheme-student-detail-inline span.is-health-risk {
  border-color: #fbbf24;
  background: #fffbeb;
  color: #92400e;
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.1);
}

.content:has(.scheme-lanes) .scheme-student-summary.focus.is-direct .scheme-student-detail-inline span.is-health-risk {
  border-color: #fbbf24;
  background: #fffbeb;
}

.content:has(.scheme-lanes) .scheme-student-detail-inline span.is-health-caution {
  border-color: #fcd34d;
  background: #fffbeb;
  color: #92400e;
}

.content:has(.scheme-lanes) .scheme-student-summary.focus.is-direct .scheme-student-detail-inline span.is-health-caution {
  border-color: #fcd34d;
  background: #fffbeb;
}

.content:has(.scheme-lanes) .scheme-student-detail-inline span.is-health-risk b,
.content:has(.scheme-lanes) .scheme-student-detail-inline span.is-health-caution b {
  color: currentColor;
}

.content:has(.scheme-lanes) .scheme-student-detail-inline span.is-health-risk::after,
.content:has(.scheme-lanes) .scheme-student-detail-inline span.is-health-caution::after {
  align-self: center;
  border-radius: 999px;
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  margin-left: auto;
  padding: 3px 5px;
  white-space: nowrap;
}

.content:has(.scheme-lanes) .scheme-student-detail-inline span.is-health-risk::after {
  background: #d97706;
  color: #fff;
  content: "注意";
}

.content:has(.scheme-lanes) .scheme-student-detail-inline span.is-health-caution::after {
  background: #f59e0b;
  color: #fff;
  content: "注意";
}

.content:has(.scheme-lanes) .scheme-student-detail-inline span.is-wide {
  grid-column: span 2;
}

/* Scheme student summary responsive fallback for narrow workbench columns. */
.content:has(.scheme-lanes) .scheme-workbench-left-stack {
  container: scheme-student-summary / inline-size;
}

.content:has(.scheme-lanes) .scheme-student-summary.focus.is-direct,
.content:has(.scheme-lanes) .scheme-student-priority-row,
.content:has(.scheme-lanes) .scheme-student-note-row,
.content:has(.scheme-lanes) .scheme-student-detail-inline {
  max-width: 100%;
  min-width: 0;
}

.content:has(.scheme-lanes) .scheme-student-identity-card,
.content:has(.scheme-lanes) .scheme-student-priority-row .scheme-student-focus-card,
.content:has(.scheme-lanes) .scheme-student-note-row .scheme-student-note-item,
.content:has(.scheme-lanes) .scheme-student-detail-inline span {
  min-width: 0;
}

.content:has(.scheme-lanes) .scheme-student-identity-card strong,
.content:has(.scheme-lanes) .scheme-student-priority-row .scheme-student-focus-card strong {
  overflow-wrap: anywhere;
  white-space: normal;
  word-break: break-word;
}

@container scheme-student-summary (max-width: 560px) {
  .content:has(.scheme-lanes) .scheme-student-priority-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content:has(.scheme-lanes) .scheme-student-identity-card,
  .content:has(.scheme-lanes) .scheme-student-priority-row .scheme-student-focus-card.is-subject {
    grid-column: 1 / -1;
  }

  .content:has(.scheme-lanes) .scheme-student-note-row {
    grid-template-columns: 1fr;
  }

  .content:has(.scheme-lanes) .scheme-student-detail-inline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .content:has(.scheme-lanes) .scheme-student-detail-inline span.is-wide {
    grid-column: 1 / -1;
  }
}

@container scheme-student-summary (max-width: 380px) {
  .content:has(.scheme-lanes) .scheme-student-priority-row,
  .content:has(.scheme-lanes) .scheme-student-detail-inline {
    grid-template-columns: 1fr;
  }
}

/* Scheme workbench header: span the delete-column top space and reduce card height. */
.content:has(.scheme-lanes) .scheme-lanes:not(.temporary-query-layout) > .scheme-workbench-header {
  align-items: start;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 250, 255, 0.98) 100%),
    #ffffff;
  border: 1px solid var(--scheme-line, var(--line));
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(15, 32, 51, 0.055);
  display: grid;
  gap: 10px;
  grid-column: 1 / -1;
  grid-template-columns: minmax(220px, 0.42fr) minmax(0, 2.58fr);
  min-height: 0;
  padding: 10px 12px;
}

.content:has(.scheme-lanes) .scheme-lanes:not(.temporary-query-layout) > .scheme-workbench-header .scheme-workbench-title-zone {
  gap: 6px;
}

.content:has(.scheme-lanes) .scheme-lanes:not(.temporary-query-layout) > .scheme-workbench-header .panel-title {
  color: #0f172a;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.28;
  max-width: none;
  overflow-wrap: anywhere;
}

.content:has(.scheme-lanes) .scheme-lanes:not(.temporary-query-layout) > .scheme-workbench-header .scheme-workbench-title-meta {
  gap: 6px;
}

.content:has(.scheme-lanes) .scheme-lanes:not(.temporary-query-layout) > .scheme-workbench-header .scheme-workbench-action-groups {
  align-items: start;
  display: grid;
  gap: 6px;
  grid-template-columns:
    minmax(260px, 1fr)
    minmax(220px, 0.85fr)
    minmax(320px, 1.2fr)
    minmax(132px, 0.55fr)
    minmax(156px, 0.65fr);
  min-width: 0;
}

.content:has(.scheme-lanes) .scheme-lanes:not(.temporary-query-layout) > .scheme-workbench-header .scheme-action-group {
  align-content: start;
  border-radius: 8px;
  gap: 0;
  min-height: 0;
  padding: 6px;
}

.content:has(.scheme-lanes) .scheme-lanes:not(.temporary-query-layout) > .scheme-workbench-header .scheme-action-group-label {
  font-size: 11px;
  line-height: 1.1;
}

.content:has(.scheme-lanes) .scheme-lanes:not(.temporary-query-layout) > .scheme-workbench-header .scheme-workbench-top-actions,
.content:has(.scheme-lanes) .scheme-lanes:not(.temporary-query-layout) > .scheme-workbench-header .planning-status-inline {
  gap: 4px;
}

.content:has(.scheme-lanes) .scheme-lanes:not(.temporary-query-layout) > .scheme-workbench-header button,
.content:has(.scheme-lanes) .scheme-lanes:not(.temporary-query-layout) > .scheme-workbench-header select,
.content:has(.scheme-lanes) .scheme-lanes:not(.temporary-query-layout) > .scheme-workbench-header .scheme-top-predict {
  min-height: 32px;
}

.content:has(.scheme-lanes) .scheme-lanes:not(.temporary-query-layout) > .scheme-workbench-header button {
  font-size: 12px;
  padding: 6px 9px;
  white-space: nowrap;
}

@media (max-width: 1480px) {
  .content:has(.scheme-lanes) .scheme-lanes:not(.temporary-query-layout) > .scheme-workbench-header {
    grid-template-columns: 1fr;
  }

  .content:has(.scheme-lanes) .scheme-lanes:not(.temporary-query-layout) > .scheme-workbench-header .scheme-workbench-action-groups {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
  }
}

@media (max-width: 900px) {
  .content:has(.scheme-lanes) .scheme-lanes:not(.temporary-query-layout) > .scheme-workbench-header .scheme-workbench-action-groups {
    grid-template-columns: 1fr;
  }
}

.settings-dashboard-page {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: 260px minmax(0, 1fr);
}

.settings-dashboard-page .settings-nav {
  background: #ffffff;
  border: 1px solid #dce4ee;
  border-radius: 8px;
  box-shadow: 0 16px 38px rgba(25, 39, 68, 0.07);
  padding: 8px;
  position: sticky;
  top: 14px;
}

.settings-dashboard-page .settings-nav-item {
  border-radius: 7px;
  gap: 3px;
}

.settings-dashboard-page .settings-nav-item.active {
  background: #eef6ff;
  box-shadow: inset 4px 0 0 #2563eb;
}

.settings-dashboard-page .settings-main {
  min-width: 0;
}

.settings-dashboard-page .settings-focus-grid {
  gap: 12px;
}

.settings-dashboard-page .settings-focus-card,
.settings-dashboard-page .settings-section-grid > .panel {
  border: 1px solid #dce4ee;
  border-radius: 8px;
  box-shadow: 0 14px 32px rgba(25, 39, 68, 0.06);
}

.settings-dashboard-page .settings-focus-card {
  background: #ffffff;
}

.settings-dashboard-page .settings-section-grid {
  gap: 14px;
}

@media (max-width: 1600px) {
  .ops-kpi-grid {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
  }

  .student-intake-layout,
  .volunteer-review-layout {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .student-intake-insight,
  .volunteer-review-insight {
    grid-column: 1 / -1;
    position: static;
  }

  .student-intake-insight,
  .volunteer-review-insight {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .ops-hero,
  .ops-workspace-side,
  .student-intake-layout,
  .volunteer-review-layout,
  .settings-dashboard-page {
    grid-template-columns: 1fr;
  }

  .ops-hero-actions,
  .ops-control-cluster {
    justify-content: flex-start;
  }

  .ops-rail,
  .ops-side-panel,
  .settings-dashboard-page .settings-nav {
    position: static;
  }

  .admin-workbench-redesign {
    padding: 12px;
  }
}

@media (max-width: 720px) {
  .ops-hero,
  .ops-rail,
  .ops-side-panel {
    padding: 14px;
  }

  .ops-kpi-grid,
  .ops-control-cluster,
  .student-intake-insight,
  .volunteer-review-insight {
    grid-template-columns: 1fr;
  }

  .ops-panel-head.inline {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Keep the candidate-service overrides last so the earlier management theme cannot reset the new layout. */
.student-primary-status {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.student-management-workspace {
  grid-template-columns: 250px minmax(0, 1fr) 420px;
}

.student-management-table {
  min-width: 1180px;
}

.student-detail-metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.student-detail-section .student-service-task p,
.student-detail-section .student-service-timeline-item p {
  background: transparent;
  border: 0;
  min-height: 0;
  padding: 0;
}

@media (max-width: 1660px) {
  .student-management-workspace {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .student-detail-panel:not(.is-empty) {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
    max-height: none;
    position: static;
  }

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

@media (max-width: 1180px) {
  .student-management-workspace,
  .student-service-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .student-primary-status,
  .student-detail-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    padding: 10px 12px;
  }

  .brand,
  .tabs,
  .user-area {
    grid-column: 1;
    min-width: 0;
    width: 100%;
  }

  .brand {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .user-area {
    display: grid;
    gap: 7px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-left: 0;
  }

  .user-area .link-chip {
    justify-content: center;
    min-width: 0;
    padding: 0 5px;
    text-align: center;
  }

  .user-area > span {
    align-self: center;
    grid-column: 1 / 3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .user-area #logoutBtn {
    min-height: 38px;
  }

  .tabs {
    order: initial;
  }
}

.service-dashboard-metrics {
  grid-template-columns: repeat(6, minmax(120px, 1fr));
}

@media (max-width: 1180px) {
  .service-dashboard-metrics {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }
}

@media (max-width: 720px) {
  .service-dashboard-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Candidate AI service assistant: content-first, auditable and touch-friendly. */
.student-ai-assistant-section {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  border-color: #cbdbe8;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
}

.student-ai-assistant-head > div {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.student-ai-assistant-head > div:first-child {
  display: grid;
  gap: 3px;
}

.student-ai-assistant-head > div:first-child span,
.student-ai-subhead span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.student-ai-assistant-head button,
.student-ai-stage-suggestion button,
.student-ai-fact-actions button,
.student-ai-task-suggestion button {
  min-height: 36px;
}

.student-ai-status,
.student-ai-confirmed {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  background: var(--ok-soft, #eaf7f0);
  color: var(--ok);
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 800;
}

.student-ai-status.is-stale {
  background: var(--warn-soft, #fff4db);
  color: var(--warn);
}

.student-ai-error {
  border: 1px solid #f1b8b4;
  border-radius: 8px;
  background: var(--danger-soft, #fff1f0);
  color: var(--danger);
  padding: 10px 12px;
  line-height: 1.5;
}

.student-ai-fallback {
  border: 1px solid #e9cc8a;
  border-radius: 8px;
  background: #fff8e8;
  color: #6b4b16;
  padding: 10px 12px;
  line-height: 1.5;
}

.student-ai-summary {
  display: grid;
  gap: 5px;
  border: 1px solid #b9d7e7;
  border-left: 4px solid #0369a1;
  border-radius: 8px;
  background: #f2f8fc;
  padding: 12px 14px;
}

.student-ai-summary > span,
.student-ai-stage-suggestion span {
  color: #475569;
  font-size: 11px;
  font-weight: 800;
}

.student-ai-summary p,
.student-ai-stage-suggestion p,
.student-ai-concern p {
  margin: 0;
  color: #1e293b;
  line-height: 1.65;
}

.student-ai-summary small {
  color: var(--muted);
}

.student-ai-stage-suggestion {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid #dce4ed;
  border-radius: 8px;
  background: #fff;
  padding: 11px 12px;
}

.student-ai-stage-suggestion > div {
  display: grid;
  gap: 4px;
}

.student-ai-stage-suggestion strong {
  color: #0f172a;
  font-size: 14px;
}

.student-ai-stage-suggestion p {
  color: var(--muted);
  font-size: 11px;
}

.student-ai-insights,
.student-ai-work-grid {
  display: grid;
  gap: 10px;
}

.student-ai-insights {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.student-ai-work-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
}

.student-ai-insights > section,
.student-ai-work-grid > section {
  min-width: 0;
  border: 1px solid #dce4ed;
  border-radius: 8px;
  background: #fff;
  padding: 11px;
}

.student-ai-insights h5,
.student-ai-subhead h5 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 12px;
}

.student-ai-insights ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: #334155;
  line-height: 1.5;
}

.student-ai-concern {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  margin-top: 6px;
  border-left: 3px solid #c07a11;
  border-radius: 6px;
  background: #fff8e8;
  padding: 7px 8px;
}

.student-ai-concern.is-high {
  border-left-color: var(--danger);
  background: var(--danger-soft, #fff1f0);
}

.student-ai-concern.is-low {
  border-left-color: var(--ok);
  background: var(--ok-soft, #eaf7f0);
}

.student-ai-concern span {
  color: #6b4b16;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.student-ai-concern.is-high span {
  color: var(--danger);
}

.student-ai-concern.is-low span {
  color: var(--ok);
}

.student-ai-concern p {
  font-size: 11px;
}

.student-ai-empty {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.student-ai-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.student-ai-facts,
.student-ai-task-suggestions {
  display: grid;
  gap: 7px;
}

.student-ai-fact,
.student-ai-task-suggestion {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  padding: 9px 10px;
}

.student-ai-fact.is-proposed {
  border-left: 3px solid #c07a11;
}

.student-ai-fact.is-confirmed {
  border-left: 3px solid var(--ok);
}

.student-ai-fact > div:first-child,
.student-ai-task-suggestion > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.student-ai-fact span,
.student-ai-task-suggestion span,
.student-ai-fact small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.student-ai-fact strong,
.student-ai-task-suggestion strong {
  color: #1e293b;
  font-size: 11px;
  line-height: 1.5;
}

.student-ai-fact-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

@media (max-width: 1180px) {
  .student-ai-insights,
  .student-ai-work-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .student-ai-assistant-head,
  .student-ai-stage-suggestion,
  .student-ai-fact,
  .student-ai-task-suggestion {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .student-ai-assistant-head > div:last-child,
  .student-ai-fact-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .student-ai-assistant-head button,
  .student-ai-stage-suggestion button,
  .student-ai-fact-actions button,
  .student-ai-task-suggestion button {
    min-height: 44px;
  }

  .student-ai-insights {
    grid-template-columns: 1fr;
  }
}

/* Final accessibility and small-screen navigation safeguards. */
@media (max-width: 760px) {
  .tabs {
    min-height: 48px;
    scroll-padding-inline: 8px;
    scroll-snap-type: x proximity;
    overscroll-behavior-inline: contain;
  }

  .tab {
    min-height: 44px;
    scroll-snap-align: start;
  }

  .content {
    scroll-padding-top: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skip-link {
    transition: none;
  }
}

/* Institution-first management workspace */
.content:has(.school-management-page),
.content:has(.school-detail-page) {
  background: #f3f6fb;
  min-width: 0;
  width: 100%;
  padding: 14px 16px 28px;
}

body:has(.school-management-page),
body:has(.school-detail-page) {
  overflow-x: hidden;
}

body:has(.school-management-page) .app-shell,
body:has(.school-detail-page) .app-shell {
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
}

body:has(.school-management-page) .topbar,
body:has(.school-detail-page) .topbar {
  min-width: 0;
}

body:has(.school-management-page) .tabs,
body:has(.school-detail-page) .tabs {
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

body:has(.school-management-page) .tabs::-webkit-scrollbar,
body:has(.school-detail-page) .tabs::-webkit-scrollbar,
.school-stat-strip::-webkit-scrollbar,
.school-detail-tabs::-webkit-scrollbar {
  display: none;
}

.school-management-page,
.school-detail-page {
  --school-primary: #175cd3;
  --school-primary-strong: #1849a9;
  --school-primary-soft: #eff4ff;
  --school-ink: #101828;
  --school-muted: #667085;
  --school-line: #e4e7ec;
  --school-surface: #ffffff;
  --school-soft: #f8fafc;
  --school-icon-blue: #175cd3;
  --school-icon-blue-soft: #eff4ff;
  --school-icon-cyan: #0e7090;
  --school-icon-cyan-soft: #e7f8fb;
  --school-icon-teal: #087443;
  --school-icon-teal-soft: #e9f8f2;
  --school-icon-green: #067647;
  --school-icon-green-soft: #ecfdf3;
  --school-icon-amber: #b54708;
  --school-icon-amber-soft: #fffaeb;
  --school-icon-orange: #c2410c;
  --school-icon-orange-soft: #fff4ed;
  --school-icon-rose: #c01048;
  --school-icon-rose-soft: #fff0f3;
  --school-icon-violet: #6938b8;
  --school-icon-violet-soft: #f3edff;
  --school-icon-indigo: #3538cd;
  --school-icon-indigo-soft: #eef4ff;
  --school-icon-slate: #475467;
  --school-icon-slate-soft: #f2f4f7;
  color: var(--school-ink);
  display: grid;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

#schoolDetailTabPanel {
  width: 100%;
  min-width: 0;
}

.school-management-page button,
.school-detail-page button,
.school-management-page input,
.school-management-page select,
.school-detail-page input {
  min-height: 38px;
  border-radius: 8px;
}

.school-management-page button,
.school-detail-page button,
.school-management-page a,
.school-detail-page a {
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.school-management-page button:focus-visible,
.school-detail-page button:focus-visible,
.school-management-page input:focus-visible,
.school-management-page select:focus-visible,
.school-detail-page input:focus-visible,
.school-detail-page a:focus-visible {
  outline: 3px solid rgba(23, 92, 211, 0.22);
  outline-offset: 2px;
  border-color: var(--school-primary);
}

.school-management-page button.primary,
.school-detail-page button.primary {
  border-color: var(--school-primary);
  background: var(--school-primary);
}

.school-management-page button.primary:hover:not(:disabled),
.school-detail-page button.primary:hover:not(:disabled) {
  border-color: var(--school-primary-strong);
  background: var(--school-primary-strong);
}

.sm-icon {
  flex: 0 0 auto;
  vertical-align: middle;
}

.school-management-head,
.school-detail-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid #dce4f1;
  border-radius: 12px;
  background:
    radial-gradient(circle at 86% 10%, rgba(77, 139, 240, 0.14), transparent 28%),
    linear-gradient(135deg, #ffffff 0%, #f6f9ff 100%);
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.045);
  padding: 16px 18px;
}

.school-management-kicker {
  display: block;
  color: var(--school-primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
  margin-bottom: 7px;
}

.school-management-head h1,
.school-detail-identity h1 {
  margin: 0;
  color: #0c2550;
  font-size: 24px;
  line-height: 1.2;
}

.school-management-head h1 {
  display: flex;
  align-items: center;
  gap: 9px;
}

.school-management-head p,
.school-detail-identity p {
  margin: 7px 0 0;
  color: var(--school-muted);
  line-height: 1.5;
}

.school-management-actions,
.school-detail-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.school-management-actions button,
.school-detail-actions button,
.school-query-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-weight: 700;
  white-space: nowrap;
}

.school-mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.school-mode-tab {
  min-width: 0;
  min-height: 66px !important;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-color: #dce3ee;
  background: #fff;
  padding: 9px 12px;
  text-align: left;
}

.school-mode-tab:hover {
  border-color: #b2c6e8;
  background: #f8faff;
}

.school-mode-tab.is-active {
  border-color: #84adf4;
  background: var(--school-primary-soft);
  box-shadow: inset 0 -3px 0 var(--school-primary);
}

.school-mode-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #f2f4f7;
  color: #475467;
}

.school-mode-tab.is-active .school-mode-icon {
  background: #dbe8ff;
  color: var(--school-primary);
}

.school-mode-tab > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.school-mode-tab strong {
  color: var(--school-ink);
  font-size: 14px;
}

.school-mode-tab small {
  overflow: hidden;
  color: var(--school-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.school-mode-tab em {
  min-width: 42px;
  color: var(--school-primary-strong);
  font-size: 18px;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  text-align: right;
}

.school-stat-strip,
.school-detail-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--school-line);
  border-radius: 10px;
  background: var(--school-surface);
  scrollbar-width: none;
}

.school-stat-strip > div,
.school-detail-metrics > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
}

.school-stat-strip > div + div,
.school-detail-metrics > div + div {
  border-left: 1px solid var(--school-line);
}

.school-stat-strip > div > span,
.school-detail-metrics > div > span {
  width: 32px;
  height: 32px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: var(--school-primary-soft);
  color: var(--school-primary);
}

.school-stat-strip p,
.school-detail-metrics p {
  min-width: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 1px 6px;
  margin: 0;
}

.school-stat-strip strong,
.school-detail-metrics strong {
  color: #0c2550;
  font-size: 19px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.school-stat-strip em,
.school-detail-metrics em {
  color: #344054;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.school-stat-strip small,
.school-detail-metrics small {
  grid-column: 1 / -1;
  overflow: hidden;
  color: #98a2b3;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.school-filter-panel {
  display: grid;
  grid-template-columns: minmax(280px, 2fr) repeat(3, minmax(112px, 0.7fr)) auto auto;
  align-items: end;
  gap: 8px;
  border: 1px solid var(--school-line);
  border-radius: 10px;
  background: var(--school-surface);
  padding: 10px;
}

.school-filter-panel label {
  min-width: 0;
  gap: 4px;
  color: #475467;
  font-size: 11px;
  font-weight: 700;
}

.school-filter-panel label > span {
  min-height: 17px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.school-filter-panel input,
.school-filter-panel select {
  min-height: 38px;
  border-color: #d0d5dd;
  background: #fff;
  color: var(--school-ink);
}

.school-search-field {
  position: relative;
}

.school-search-field input {
  padding-left: 11px;
}

.school-reset-button {
  color: #475467;
}

.school-advanced-filter {
  grid-column: 1 / -1;
  border-top: 1px solid #eef1f5;
  padding-top: 7px;
}

.school-advanced-filter summary {
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #475467;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  list-style: none;
}

.school-advanced-filter summary::-webkit-details-marker {
  display: none;
}

.school-advanced-filter summary span {
  color: #98a2b3;
  font-size: 11px;
  font-weight: 500;
}

.school-advanced-filter > div {
  display: grid;
  grid-template-columns: repeat(6, minmax(100px, 1fr));
  gap: 8px;
  padding-top: 8px;
}

.school-list-panel,
.school-detail-section {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--school-line);
  border-radius: 10px;
  background: var(--school-surface);
}

.school-list-panel > header,
.school-detail-section > header {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--school-line);
  padding: 9px 13px;
}

.school-list-panel > header > div {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.school-list-panel > header strong {
  color: #1d2939;
  font-size: 15px;
}

.school-list-panel > header > div > span {
  color: var(--school-muted);
  font-size: 12px;
}

.school-list-panel > header > small {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #98a2b3;
  font-size: 11px;
}

.school-list-panel .data-filter-chip {
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #d6e4ff;
  border-radius: 999px;
  background: #f5f8ff;
  color: #1849a9;
  padding: 0 8px;
  font-size: 10px;
}

.school-list-panel .data-filter-chip.is-muted {
  border-color: #e4e7ec;
  background: #f9fafb;
  color: #667085;
}

.school-table-wrap,
.school-detail-table-wrap {
  width: 100%;
  min-width: 0;
  overflow: auto;
  overscroll-behavior-inline: contain;
}

.school-management-table,
.school-detail-data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.school-management-table {
  min-width: 1000px;
}

.school-management-table th,
.school-management-table td,
.school-detail-data-table th,
.school-detail-data-table td {
  border-bottom: 1px solid #eef1f5;
  padding: 8px 10px;
  text-align: left;
  vertical-align: middle;
}

.school-management-table th,
.school-detail-data-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
  color: #475467;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.school-management-table tbody tr {
  cursor: pointer;
  outline: 1px solid transparent;
  outline-offset: -1px;
  transition: background-color 160ms ease, box-shadow 160ms ease, outline-color 160ms ease;
}

.school-management-table tbody td {
  background-color: transparent;
}

.school-management-table tbody tr:hover,
.school-management-table tbody tr:focus-visible {
  background-color: #eaf2ff;
  box-shadow: inset 4px 0 0 #2563eb;
  outline-color: #a9c7fa;
}

.school-management-table tbody tr:hover td,
.school-management-table tbody tr:focus-visible td {
  background: transparent;
  box-shadow: none;
}

.school-management-table tbody tr:hover .school-name-link,
.school-management-table tbody tr:focus-visible .school-name-link {
  color: #0b4cc9;
}

.school-management-table tbody tr:focus-visible {
  outline: 2px solid #84adf4;
  outline-offset: -2px;
}

.school-management-table tbody tr:last-child td,
.school-detail-data-table tbody tr:last-child td {
  border-bottom: 0;
}

.school-identity-cell {
  min-width: 286px;
}

.school-identity-content {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
}

.school-identity-copy {
  width: 100%;
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  gap: 5px;
}

.school-name-link {
  width: 100%;
  max-width: 100%;
  min-height: 0 !important;
  display: block;
  overflow: visible;
  border: 0;
  background: transparent;
  color: #173b77;
  padding: 1px 0;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  text-align: left;
  overflow-wrap: anywhere;
  white-space: normal;
}

.school-name-link:hover {
  color: var(--school-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.school-identity-copy > span,
.school-detail-identity p {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.school-identity-cell code,
.school-detail-identity code,
.school-detail-data-table code {
  border-radius: 4px;
  background: #f2f4f7;
  color: #475467;
  padding: 2px 5px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.school-identity-cell i,
.school-detail-identity i {
  border: 1px solid #dce4f1;
  border-radius: 999px;
  background: #f8fafc;
  color: #475467;
  padding: 2px 6px;
  font-size: 10px;
  font-style: normal;
}

.school-logo {
  position: relative;
  width: 42px;
  height: 42px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(23, 92, 211, 0.16);
  border-radius: 11px;
  background: linear-gradient(145deg, #eaf2ff, #d8e7ff);
  color: #1849a9;
  box-shadow: 0 2px 7px rgba(16, 24, 40, 0.08);
}

.school-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
  padding: 3px;
}

.school-logo img ~ strong,
.school-logo img ~ i {
  display: none;
}

.school-logo strong {
  font-size: 17px;
  font-weight: 900;
}

.school-logo i {
  position: absolute;
  right: 2px;
  bottom: 1px;
  color: rgba(24, 73, 169, 0.45);
  line-height: 0;
}

.school-logo-1 { background: linear-gradient(145deg, #e9f8f2, #d0f0e1); color: #087443; }
.school-logo-2 { background: linear-gradient(145deg, #fff4e5, #ffe1b7); color: #b54708; }
.school-logo-3 { background: linear-gradient(145deg, #f3edff, #e2d5ff); color: #6938b8; }
.school-logo-4 { background: linear-gradient(145deg, #fff0f3, #ffd8e0); color: #c01048; }
.school-logo-5 { background: linear-gradient(145deg, #e7f8fb, #cdf0f5); color: #0e7090; }

.school-logo.is-large {
  width: 72px;
  height: 72px;
  border-radius: 17px;
}

.school-logo.is-large strong {
  font-size: 28px;
}

.school-location {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #344054;
  font-weight: 700;
  white-space: nowrap;
}

.school-subtle {
  display: block;
  max-width: 180px;
  overflow: hidden;
  color: #98a2b3;
  font-size: 10px;
  margin-top: 3px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.school-number-cell {
  min-width: 86px;
  font-variant-numeric: tabular-nums;
}

.school-number-cell strong,
.school-detail-data-table td > strong {
  color: #1d2939;
  font-size: 13px;
}

.school-number-cell .school-metric-value {
  display: block;
  line-height: 1.25;
}

.school-number-cell small,
.school-detail-data-table td > small {
  display: block;
  color: #98a2b3;
  font-size: 9px;
  margin-top: 2px;
}

.school-number-cell .school-metric-year,
.school-detail-data-table .school-metric-year,
.school-detail-metrics .school-metric-year {
  display: flex;
  align-items: center;
  gap: 3px;
  width: max-content;
  max-width: 100%;
  color: #667085;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.school-metric-year .sm-icon {
  flex: 0 0 auto;
}

.school-metric-year.is-empty,
.school-metric-year.is-unknown {
  font-weight: 500;
}

.school-data-empty {
  color: #667085;
  font-size: 11px;
  font-weight: 500;
}

.school-detail-gap {
  color: #98a2b3;
  font-size: 11px;
  font-weight: 500;
}

.school-completeness {
  min-width: 76px;
  display: grid;
  grid-template-columns: 38px auto;
  align-items: center;
  gap: 6px;
}

.school-completeness i {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7f6ec;
}

.school-completeness i::after {
  width: var(--value);
  height: 100%;
  display: block;
  border-radius: inherit;
  background: #12b76a;
  content: "";
}

.school-completeness strong {
  color: #067647;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.school-completeness.is-warn i {
  background: #fff0c7;
}

.school-completeness.is-warn i::after {
  background: #f79009;
}

.school-completeness.is-warn strong {
  color: #b54708;
}

.school-row-actions,
.school-detail-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  white-space: nowrap;
}

.school-icon-button {
  width: 36px;
  min-height: 36px !important;
  display: inline-grid;
  place-items: center;
  padding: 0;
  color: #475467;
}

.school-open-button,
.school-detail-row-actions button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px !important;
  border-color: #c9d9f5;
  background: #f5f8ff;
  color: #1849a9;
  padding: 0 9px;
  font-size: 11px;
  font-weight: 700;
}

.school-sort {
  min-height: 0 !important;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: 11px;
  font-weight: 800;
}

.school-sort em {
  color: #98a2b3;
  font-style: normal;
}

.school-sort.is-active,
.school-sort.is-active em {
  color: var(--school-primary);
}

.school-pagination {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--school-line);
  padding: 7px 12px;
  color: var(--school-muted);
  font-size: 11px;
}

.school-pagination > div {
  display: flex;
  align-items: center;
  gap: 6px;
}

.school-pagination label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}

.school-pagination select {
  width: 68px;
  min-height: 34px;
}

.school-empty-state {
  min-height: 180px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  color: #98a2b3;
  text-align: center;
}

.school-empty-state strong {
  color: #344054;
  font-size: 14px;
}

.school-empty-state span {
  font-size: 12px;
}

.school-breadcrumb {
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #98a2b3;
  font-size: 11px;
}

.school-breadcrumb button {
  min-height: 30px !important;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  color: var(--school-primary);
  padding: 0 4px;
  font-weight: 700;
}

.school-breadcrumb strong {
  color: #475467;
}

.school-detail-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 15px;
}

.school-detail-identity > div {
  min-width: 0;
}

.school-detail-mode {
  display: block;
  color: var(--school-primary);
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 5px;
}

.school-detail-identity h1 {
  font-size: 25px;
}

.school-detail-metrics {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.school-detail-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  border: 1px solid var(--school-line);
  border-radius: 10px;
  background: #fff;
  padding: 4px;
}

.school-detail-tabs button {
  min-height: 38px !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-color: transparent;
  background: transparent;
  color: #667085;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
}

.school-detail-tabs button:hover {
  background: #f5f8ff;
  color: #1849a9;
}

.school-detail-tabs button.is-active {
  border-color: #c7d7f4;
  background: var(--school-primary-soft);
  color: var(--school-primary-strong);
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.08);
}

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

.school-detail-section.is-wide {
  grid-column: 1 / -1;
}

.school-detail-section > header {
  align-items: flex-start;
  background: #fbfcfe;
}

.school-detail-section > header > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.school-detail-section > header > div > span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--school-primary-soft);
  color: var(--school-primary);
}

.school-detail-section h2 {
  margin: 0;
  color: #1d2939;
  font-size: 14px;
}

.school-detail-section > header p {
  margin: 1px 0 0;
  color: #98a2b3;
  font-size: 11px;
}

.school-detail-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  padding: 3px 12px 10px;
}

.school-detail-info-grid.is-four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.school-detail-info-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  border-bottom: 1px solid #f0f2f5;
  padding: 11px 5px;
}

.school-detail-info-item > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #f2f4f7;
  color: #667085;
}

.school-detail-info-item p {
  min-width: 0;
  display: grid;
  gap: 3px;
  margin: 0;
}

.school-detail-info-item em {
  color: #98a2b3;
  font-size: 10px;
  font-style: normal;
}

.school-detail-info-item strong,
.school-detail-info-item a {
  overflow: hidden;
  color: #344054;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  text-decoration: none;
  text-overflow: ellipsis;
}

.school-detail-info-item a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--school-primary);
}

.school-detail-list-toolbar {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
}

.school-detail-list-toolbar label {
  width: min(420px, 100%);
  display: flex;
  align-items: center;
  gap: 7px;
  color: #667085;
}

.school-detail-list-toolbar input {
  min-height: 36px;
}

.school-detail-list-toolbar > span {
  color: #667085;
  font-size: 11px;
}

.school-detail-data-table {
  min-width: 1080px;
  font-size: 11px;
}

.school-detail-data-table td {
  color: #475467;
  font-variant-numeric: tabular-nums;
}

.school-detail-data-table tbody tr:hover td {
  background: #fbfcff;
}

.school-detail-wide-cell {
  max-width: 280px;
  white-space: normal;
}

.school-detail-section .data-detail-all-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding: 4px 12px 12px;
}

.school-detail-section .data-detail-field {
  min-width: 0;
  border-bottom: 1px solid #f0f2f5;
  padding: 10px 8px;
}

.school-detail-section .data-detail-field span {
  display: block;
  color: #98a2b3;
  font-size: 10px;
  margin-bottom: 4px;
}

.school-detail-section .data-detail-field strong {
  display: block;
  overflow-wrap: anywhere;
  color: #344054;
  font-size: 12px;
  line-height: 1.5;
}

.school-list-limit {
  margin: 0;
  border-top: 1px solid #eef1f5;
  background: #fffcf5;
  color: #b54708;
  padding: 9px 12px;
  font-size: 11px;
}

/* Semantic icon system: one consistent line-icon family with color-coded meaning. */
.school-color-icon {
  --school-icon-fg: var(--school-icon-blue, #175cd3);
  --school-icon-bg: var(--school-icon-blue-soft, #eff4ff);
  width: 28px;
  height: 28px;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 7px;
  background: var(--school-icon-bg);
  color: var(--school-icon-fg);
}

.school-color-icon.is-blue { --school-icon-fg: #175cd3; --school-icon-bg: #eff4ff; }
.school-color-icon.is-cyan { --school-icon-fg: #0e7090; --school-icon-bg: #e7f8fb; }
.school-color-icon.is-teal { --school-icon-fg: #087443; --school-icon-bg: #e9f8f2; }
.school-color-icon.is-green { --school-icon-fg: #067647; --school-icon-bg: #ecfdf3; }
.school-color-icon.is-amber { --school-icon-fg: #b54708; --school-icon-bg: #fffaeb; }
.school-color-icon.is-orange { --school-icon-fg: #c2410c; --school-icon-bg: #fff4ed; }
.school-color-icon.is-rose { --school-icon-fg: #c01048; --school-icon-bg: #fff0f3; }
.school-color-icon.is-violet { --school-icon-fg: #6938b8; --school-icon-bg: #f3edff; }
.school-color-icon.is-indigo { --school-icon-fg: #3538cd; --school-icon-bg: #eef4ff; }
.school-color-icon.is-slate { --school-icon-fg: #475467; --school-icon-bg: #f2f4f7; }

.school-stat-strip > div:nth-child(1) > span { background: var(--school-icon-teal-soft); color: var(--school-icon-teal); }
.school-stat-strip > div:nth-child(2) > span { background: var(--school-icon-violet-soft); color: var(--school-icon-violet); }
.school-stat-strip > div:nth-child(3) > span { background: var(--school-icon-indigo-soft); color: var(--school-icon-indigo); }
.school-stat-strip > div:nth-child(4) > span { background: var(--school-icon-green-soft); color: var(--school-icon-green); }
.school-stat-strip > div:nth-child(5) > span { background: var(--school-icon-amber-soft); color: var(--school-icon-amber); }

.school-detail-metrics > div > .school-color-icon,
.school-detail-section > header > div > .school-color-icon,
.school-detail-info-item > .school-color-icon {
  background: var(--school-icon-bg);
  color: var(--school-icon-fg);
}

.school-detail-metrics > div > .school-color-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.school-detail-section > header > div > .school-color-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.school-detail-info-item > .school-color-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.school-tab-icon {
  width: 25px;
  height: 25px;
  border-radius: 6px;
}

.school-detail-tabs button.is-active .school-tab-icon {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 18%, transparent);
}

.school-table-column-heading {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.school-table-column-heading > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.school-table-header-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
}

.school-sort .school-table-column-heading {
  gap: 6px;
}

.school-management-table,
.school-detail-data-table {
  min-width: max(760px, calc(var(--school-column-count, 7) * 142px));
}

.school-management-table th:last-child,
.school-management-table td:last-child,
.school-detail-data-table th:last-child,
.school-detail-data-table td:last-child {
  width: 58px;
}

.school-table-link {
  max-width: 260px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  overflow-wrap: anywhere;
  color: var(--school-primary);
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
}

.school-table-link:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.school-table-number,
.school-table-primary-text {
  display: block;
  color: #1d2939;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.school-table-text {
  display: block;
  max-width: 260px;
  overflow: hidden;
  color: #475467;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.school-drill-table tbody tr {
  cursor: pointer;
}

.school-drill-table tbody tr:hover td,
.school-drill-table tbody tr:focus-visible td {
  background: #f6f8ff;
}

.school-drill-table tbody tr:focus-visible {
  outline: 2px solid #84adf4;
  outline-offset: -2px;
}

.school-detail-list-tools {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.school-detail-list-tools > span {
  color: #667085;
  font-size: 11px;
}

.school-detail-list-tools > button {
  min-height: 34px !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-color: #d5def0;
  background: #fff;
  color: #344054;
  padding: 0 9px;
  font-size: 11px;
  font-weight: 700;
}

.school-detail-list-tools > button .school-color-icon {
  width: 23px;
  height: 23px;
  border-radius: 6px;
}

.school-detail-list-tools > .school-group-filter-chip {
  border-color: #ded1f7;
  background: #faf7ff;
  color: #5d3295;
}

.school-group-subject-switch {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border: 1px solid #d5def0;
  border-radius: 7px;
  background: #f8fafc;
  padding: 3px;
}

.school-group-subject-switch button {
  min-width: 66px;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #475467;
  padding: 0 9px;
  font-size: 11px;
  font-weight: 750;
}

.school-group-subject-switch button strong {
  min-width: 19px;
  border-radius: 4px;
  background: #e4e7ec;
  color: #475467;
  padding: 1px 5px;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.school-group-subject-switch button:hover {
  background: #eef2f7;
  color: #101828;
}

.school-group-subject-switch button.is-active {
  border-color: #b7cdf7;
  background: #fff;
  color: #1849a9;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.12);
}

.school-group-subject-switch button.is-physics.is-active {
  border-color: #84adf4;
  background: #edf4ff;
  color: #1849a9;
}

.school-group-subject-switch button.is-history.is-active {
  border-color: #f5b897;
  background: #fff4ed;
  color: #9a3412;
}

.school-group-subject-switch button.is-physics.is-active strong {
  background: #dbe9ff;
  color: #1849a9;
}

.school-group-subject-switch button.is-history.is-active strong {
  background: #ffdfcc;
  color: #9a3412;
}

.school-back-button {
  border-color: #cbd8ee;
  background: #fff;
  color: #1849a9;
}

.school-all-fields-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 4px 12px 12px;
}

.school-all-field {
  min-width: 0;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  border-bottom: 1px solid #f0f2f5;
  padding: 10px 8px;
}

.school-all-field > .school-color-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.school-all-field p {
  min-width: 0;
  display: grid;
  gap: 3px;
  margin: 0;
}

.school-all-field em {
  color: #98a2b3;
  font-size: 10px;
  font-style: normal;
}

.school-all-field strong,
.school-all-field code,
.school-all-field a,
.school-all-field p > span {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #344054;
  font-size: 12px;
  line-height: 1.45;
}

.school-all-field .school-table-link {
  color: var(--school-primary);
}

.school-all-field .school-table-text {
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.modal.modal-school-columns {
  width: min(820px, calc(100vw - 32px));
  max-height: min(760px, 86vh);
}

.modal-school-columns .modal-body {
  padding: 0;
}

.school-column-settings {
  display: grid;
  grid-template-rows: auto auto minmax(180px, 1fr) auto;
  max-height: calc(86vh - 52px);
}

.school-column-settings-note {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #e4e7ec;
  background: #f8faff;
  padding: 12px 14px;
}

.school-column-settings-note > .school-color-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.school-column-settings-note p {
  display: grid;
  gap: 2px;
  margin: 0;
}

.school-column-settings-note strong {
  color: #1d2939;
  font-size: 13px;
}

.school-column-settings-note p span,
.school-column-settings-note em {
  color: #667085;
  font-size: 11px;
  font-style: normal;
}

.school-column-settings-note em {
  border-radius: 999px;
  background: #e8effc;
  color: #1849a9;
  padding: 5px 9px;
  font-weight: 800;
  white-space: nowrap;
}

.school-column-settings-toolbar {
  display: flex;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid #e4e7ec;
  padding: 9px 12px;
}

.school-column-settings-toolbar label {
  min-width: 220px;
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 7px;
  color: #667085;
}

.school-column-settings-toolbar input {
  min-height: 36px;
}

.school-column-settings-toolbar button {
  min-height: 34px;
  flex: 0 0 auto;
  padding-inline: 9px;
  font-size: 11px;
}

.school-column-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
  gap: 7px;
  overflow: auto;
  padding: 11px 12px;
}

.school-column-options > label {
  min-width: 0;
  min-height: 48px;
  display: grid;
  grid-template-columns: 17px 25px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  background: #fff;
  padding: 7px 8px;
  cursor: pointer;
}

.school-column-options > label:hover {
  border-color: #a9bfe5;
  background: #f8faff;
}

.school-column-options input {
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0;
  accent-color: #175cd3;
}

.school-column-options .school-color-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}

.school-column-options label > span:last-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.school-column-options strong,
.school-column-options small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.school-column-options strong {
  color: #344054;
  font-size: 12px;
}

.school-column-options small {
  color: #98a2b3;
  font-size: 9px;
}

.school-column-settings-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #e4e7ec;
  background: #fff;
  padding: 10px 12px;
}

.school-column-settings-actions > span {
  color: #98a2b3;
  font-size: 10px;
}

.school-column-settings-actions > div {
  display: flex;
  gap: 7px;
}

.school-column-settings-actions button {
  min-height: 36px;
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 1280px) {
  .school-filter-panel {
    grid-template-columns: minmax(260px, 2fr) repeat(2, minmax(120px, 1fr)) auto auto;
  }

  .school-filter-panel > label:nth-of-type(4) {
    grid-column: auto;
  }

  .school-stat-strip {
    grid-template-columns: repeat(5, minmax(140px, 1fr));
    overflow-x: auto;
  }

  .school-detail-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .school-detail-metrics > div:nth-child(4) {
    border-left: 0;
    border-top: 1px solid var(--school-line);
  }

  .school-detail-metrics > div:nth-child(5),
  .school-detail-metrics > div:nth-child(6) {
    border-top: 1px solid var(--school-line);
  }

  .school-detail-info-grid.is-four,
  .school-detail-section .data-detail-all-fields,
  .school-all-fields-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1400px) {
  body:has(.school-management-page) .user-area .link-chip,
  body:has(.school-detail-page) .user-area .link-chip {
    display: none;
  }
}

@media (max-width: 900px) {
  .content:has(.school-management-page),
  .content:has(.school-detail-page) {
    padding: 10px;
  }

  .school-management-head,
  .school-detail-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .school-management-actions,
  .school-detail-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .school-mode-tabs {
    grid-template-columns: 1fr;
  }

  .school-mode-tab {
    min-height: 58px !important;
  }

  .school-filter-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .school-search-field,
  .school-advanced-filter {
    grid-column: 1 / -1;
  }

  .school-advanced-filter > div {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .school-detail-overview-grid {
    grid-template-columns: 1fr;
  }

  .school-detail-section.is-wide {
    grid-column: auto;
  }

  .school-column-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .school-column-settings-toolbar {
    flex-wrap: wrap;
  }

  .school-column-settings-toolbar label {
    flex-basis: 100%;
  }
}

@media (max-width: 600px) {
  .school-management-page,
  .school-detail-page {
    gap: 9px;
  }

  .school-management-head,
  .school-detail-hero {
    border-radius: 10px;
    padding: 14px;
  }

  .school-management-head h1,
  .school-detail-identity h1 {
    font-size: 20px;
  }

  .school-management-actions,
  .school-detail-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .school-management-actions button,
  .school-detail-actions button,
  .school-query-button,
  .school-reset-button,
  .school-pagination button,
  .school-detail-tabs button {
    min-height: 44px !important;
  }

  .school-management-actions .primary,
  .school-detail-actions .primary {
    grid-column: 1 / -1;
  }

  .school-filter-panel {
    grid-template-columns: 1fr 1fr;
  }

  .school-search-field,
  .school-advanced-filter {
    grid-column: 1 / -1;
  }

  .school-filter-panel input,
  .school-filter-panel select {
    min-height: 44px;
    font-size: 16px;
  }

  .school-advanced-filter > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .school-stat-strip {
    grid-template-columns: repeat(5, 220px);
  }

  .school-list-panel > header {
    align-items: flex-start;
    flex-direction: column;
  }

  .school-list-panel > header > small {
    display: none;
  }

  .school-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .school-pagination > div {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .school-pagination label {
    grid-column: 1 / -1;
  }

  .school-pagination select {
    width: 100%;
    min-height: 44px;
    font-size: 16px;
  }

  .school-detail-identity {
    align-items: flex-start;
  }

  .school-logo.is-large {
    width: 58px;
    height: 58px;
  }

  .school-detail-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .school-detail-metrics > div,
  .school-detail-metrics > div:nth-child(4) {
    border-top: 1px solid var(--school-line);
    border-left: 0;
  }

  .school-detail-metrics > div:nth-child(-n + 2) {
    border-top: 0;
  }

  .school-detail-metrics > div:nth-child(even) {
    border-left: 1px solid var(--school-line);
  }

  .school-detail-metrics p {
    display: flex;
    align-items: baseline;
    gap: 2px 5px;
    flex-wrap: wrap;
  }

  .school-detail-metrics em {
    flex: 0 0 100%;
    white-space: nowrap;
  }

  .school-detail-metrics strong,
  .school-detail-metrics small {
    grid-column: auto;
    white-space: nowrap;
  }

  .school-detail-tabs {
    scroll-snap-type: x proximity;
  }

  .school-detail-tabs button {
    scroll-snap-align: start;
  }

  .school-detail-info-grid,
  .school-detail-info-grid.is-four,
  .school-detail-section .data-detail-all-fields,
  .school-all-fields-grid {
    grid-template-columns: 1fr;
  }

  .school-detail-list-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .school-detail-list-toolbar input {
    min-height: 44px;
    font-size: 16px;
  }

  .school-detail-list-tools {
    width: 100%;
    justify-content: flex-start;
  }

  .school-group-subject-switch {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
  }

  .school-group-subject-switch button {
    min-width: 0;
    min-height: 42px;
  }

  .school-column-settings-note {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .school-column-settings-note em {
    grid-column: 1 / -1;
    width: fit-content;
  }

  .school-column-options {
    grid-template-columns: 1fr;
  }

  .school-column-settings-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .school-column-settings-actions > div {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

.supplement-mode-summary {
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.supplement-detail-modal .table-wrap {
  max-height: min(52vh, 560px);
}

.supplement-detail-modal table,
#supplementPlanPreview table {
  min-width: 1180px;
}

@media (max-width: 600px) {
  #supplementImport.cols-2 {
    grid-template-columns: 1fr;
  }

  #supplementImport label,
  #supplementImport input,
  #supplementImport select,
  #supplementScoreImport input {
    min-height: 44px;
  }

  .supplement-detail-modal .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* School admission dimensions, trend views and structured editors */
.school-subject-metric.is-physics {
  box-shadow: inset 3px 0 0 #2e6fde;
}

.school-subject-metric.is-history {
  box-shadow: inset 3px 0 0 #d05a1d;
}

.school-subject-badge {
  min-width: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d0d5dd;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.school-subject-badge.is-physics {
  border-color: #b7cdf7;
  background: #edf4ff;
  color: #1849a9;
}

.school-subject-badge.is-history {
  border-color: #f4c6a7;
  background: #fff4ed;
  color: #9c2f0b;
}

.school-subject-badge.is-unknown {
  background: #f2f4f7;
  color: #475467;
}

.school-admission-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--school-line);
  background: #fbfcfe;
  padding: 10px 13px;
}

.school-admission-batches {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.school-admission-batches button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-color: #d0d5dd;
  background: #fff;
  font-weight: 700;
}

.school-admission-batches button.is-active {
  border-color: #84adf4;
  background: #eff4ff;
  color: #1849a9;
  box-shadow: inset 0 -2px 0 #175cd3;
}

.school-trend-layout {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.school-trend-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dce4f1;
  border-radius: 8px;
  background: #fff;
}

.school-trend-panel > header {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #eef1f5;
  background: #fbfcfe;
  padding: 8px 12px;
}

.school-trend-panel > header > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.school-trend-panel > header strong {
  color: #1d2939;
  font-size: 14px;
}

.school-trend-panel > header > span {
  color: #667085;
  font-size: 11px;
}

.school-trend-chart {
  min-width: 0;
  padding: 10px 12px 4px;
}

.school-trend-chart svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.school-trend-chart line {
  stroke: #e4e7ec;
  stroke-width: 1;
}

.school-trend-chart line.is-year {
  stroke: #f0f2f5;
  stroke-dasharray: 4 5;
}

.school-trend-chart text {
  fill: #667085;
  font-family: inherit;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.school-trend-series path {
  fill: none;
  stroke: var(--series-color);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.school-trend-series circle {
  fill: #fff;
  stroke: var(--series-color);
  stroke-width: 3;
}

.school-trend-series .school-trend-value {
  fill: var(--series-color);
  font-size: 11px;
  font-weight: 800;
}

.school-trend-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 0 4px 4px;
}

.school-trend-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #344054;
  font-size: 11px;
  font-weight: 700;
}

.school-trend-legend i {
  width: 18px;
  height: 3px;
  border-radius: 999px;
  background: var(--series-color);
}

.school-trend-empty {
  min-height: 220px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  color: #667085;
  text-align: center;
}

.school-trend-empty strong {
  color: #344054;
}

.school-trend-empty span {
  font-size: 12px;
}

.school-admission-table {
  min-width: 1120px;
}

.school-admission-table td,
.school-admission-table th {
  font-variant-numeric: tabular-nums;
}

.school-icon-button.is-trend {
  border-color: #c7d7fe;
  background: #eef4ff;
  color: #3538cd;
}

.school-icon-button.is-danger {
  border-color: #fecdd6;
  background: #fff1f3;
  color: #c01048;
}

.modal.modal-school-trend,
.modal.modal-data-editor {
  width: min(1080px, calc(100vw - 28px));
  max-height: min(880px, 92vh);
}

.modal-school-trend .modal-body,
.modal-data-editor .modal-body {
  padding: 0;
}

.school-major-trend-modal {
  max-height: calc(92vh - 56px);
  display: grid;
  gap: 12px;
  overflow: auto;
  padding: 12px;
}

.school-trend-note {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid #d6e4ff;
  border-radius: 8px;
  background: #f5f8ff;
  padding: 10px 12px;
}

.school-trend-note p {
  display: grid;
  gap: 2px;
  margin: 0;
}

.school-trend-note strong {
  color: #1849a9;
  font-size: 13px;
}

.school-trend-note span {
  color: #475467;
  font-size: 11px;
  line-height: 1.5;
}

.school-structured-editor {
  max-height: calc(92vh - 56px);
  display: grid;
  overflow: auto;
  background: #f8fafc;
}

.school-editor-section {
  border-bottom: 1px solid #e4e7ec;
  background: #fff;
  padding: 14px 16px 16px;
}

.school-editor-section.is-primary {
  background: #fbfdff;
  box-shadow: inset 4px 0 0 #175cd3;
}

.school-editor-section > header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.school-editor-section > header > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.school-editor-section > header strong {
  color: #1d2939;
  font-size: 14px;
}

.school-editor-section > header span {
  color: #667085;
  font-size: 11px;
}

.school-editor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.school-editor-grid.is-four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.school-editor-field,
.school-editor-grid > label {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 6px;
  color: #475467;
  font-size: 11px;
  font-weight: 750;
}

.school-editor-field > span,
.school-editor-grid > label > span {
  min-height: 22px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.school-editor-field.is-wide,
.school-editor-grid > label.is-wide {
  grid-column: 1 / -1;
}

.school-editor-field input,
.school-editor-field select,
.school-editor-field textarea,
.school-editor-grid > label input,
.school-editor-grid > label select,
.school-editor-grid > label textarea {
  width: 100%;
  min-height: 42px;
  border-color: #d0d5dd;
  border-radius: 6px;
  background: #fff;
  color: #101828;
}

.school-editor-field textarea,
.school-editor-grid > label textarea {
  min-height: 88px;
  resize: vertical;
}

.school-editor-field.is-primary input,
.school-editor-field.is-primary select,
.school-editor-grid > label.is-primary input,
.school-editor-grid > label.is-primary select {
  border-color: #9dbcf5;
  background: #f8fbff;
  box-shadow: 0 0 0 2px rgba(23, 92, 211, 0.06);
}

.school-editor-actions {
  position: sticky;
  z-index: 4;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid #d0d5dd;
  background: rgba(255, 255, 255, 0.98);
  padding: 11px 16px;
  box-shadow: 0 -5px 16px rgba(16, 24, 40, 0.06);
}

.school-editor-actions button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-weight: 750;
}

@media (prefers-reduced-motion: reduce) {
  .school-trend-series path,
  .school-trend-series circle {
    transition: none;
  }
}

@media (max-width: 900px) {
  .school-editor-grid,
  .school-editor-grid.is-four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .school-admission-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 600px) {
  .school-editor-grid,
  .school-editor-grid.is-four {
    grid-template-columns: 1fr;
  }

  .school-editor-field.is-wide,
  .school-editor-grid > label.is-wide {
    grid-column: auto;
  }

  .school-editor-section {
    padding: 13px 12px 15px;
  }

  .school-editor-field input,
  .school-editor-field select,
  .school-editor-field textarea,
  .school-editor-grid > label input,
  .school-editor-grid > label select,
  .school-editor-grid > label textarea {
    min-height: 44px;
    font-size: 16px;
  }

  .school-editor-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 10px 12px;
  }

  .school-admission-batches {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .school-admission-batches button,
  .school-admission-toolbar > button {
    min-height: 44px;
  }

  .school-trend-chart {
    min-width: 620px;
  }

  .school-trend-panel {
    overflow-x: auto;
  }
}
