:root {
  --bg: #f5f8fb;
  --panel: #ffffff;
  --line: #e1e8ef;
  --line-strong: #cfdbe6;
  --text: #243142;
  --muted: #7a8796;
  --muted-2: #9aa6b4;
  --brand: #004ea2;
  --brand-weak: #edf5ff;
  --brand-soft: #f5f9fe;
  --green: #5f9f8f;
  --green-bg: #eef8f5;
  --yellow: #a78342;
  --yellow-bg: #fbf5e8;
  --red: #b75d5d;
  --red-bg: #fbefef;
  --purple: #6d44a5;
  --purple-bg: #f0e9fb;
  --blue: #004ea2;
  --blue-bg: #edf5ff;
  --soft-card: #fbfcfd;
  --soft-blue-card: #f8fbfe;
  --shadow-soft: 0 10px 30px rgba(44, 64, 88, 0.06);
  --shadow-panel: 0 14px 36px rgba(44, 64, 88, 0.07);
  --radius-panel: 16px;
  --radius-card: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #edf3f8;
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 8px;
  min-height: 38px;
  padding: 8px 13px;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

button:hover {
  border-color: #a9cce6;
  background: #f8fbfe;
}

button.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 8px 18px rgba(63, 127, 182, 0.16);
}

button.primary:hover {
  background: #356f9f;
  border-color: #356f9f;
}

button.danger {
  color: var(--red);
  border-color: #f0b9b9;
  background: #fff;
}

button.danger:hover {
  background: var(--red-bg);
  border-color: #e6a7a7;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}

.parent-shell {
  min-height: 100vh;
  grid-template-rows: auto 1fr;
}

.topbar {
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 24px;
  background: #ffffff;
  border-bottom: 1px solid #e3ebf3;
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 760;
  color: #23344a;
  font-size: 17px;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #004ea2;
  color: #ffffff;
  border: 1px solid #004ea2;
  box-shadow: inset 0 -3px 0 #ffde12;
  font-size: 15px;
}

.nav {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid #e5edf4;
  border-radius: 8px;
  background: #f5f8fb;
}

.nav button {
  border-color: transparent;
  background: transparent;
  min-height: 32px;
  border-radius: 6px;
  padding-inline: 16px;
}

.nav button.active {
  background: #e7f1fc;
  border-color: #aac9ea;
  color: #004ea2;
  box-shadow: none;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  padding: 24px 28px 42px;
  max-width: 1640px;
  width: 100%;
  margin: 0 auto;
}

.parent-layout {
  align-items: start;
  min-height: calc(100vh - 58px);
  grid-template-rows: auto auto;
  overflow: visible;
  max-width: 1500px;
}

.layout.sidebar-hidden {
  grid-template-columns: minmax(0, 1fr);
  max-width: 1560px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.profile-fixed-summary .profile-summary {
  padding: 0;
  border-bottom: 0;
}

.profile-fixed-summary .profile-summary-tags {
  display: flex;
}

.profile-top-panel .form-actions {
  position: sticky;
  bottom: 0;
  background: #fff;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.option-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.option-fields .field-wide {
  grid-column: 1 / -1;
}

.segmented label.active {
  border-color: #b9d5ef;
  background: var(--blue-bg);
  color: var(--blue);
}

.profile-summary {
  position: relative;
  top: auto;
  z-index: 2;
  display: grid;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.profile-summary.compact {
  box-shadow: none;
}

.profile-summary-main,
.profile-summary-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.profile-summary-tags span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #475569;
  font-size: 12px;
  background: #f3f6fa;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 3px 8px;
}

.profile-summary-tags b {
  color: #778499;
  font-weight: 600;
}

.panel-header {
  min-height: 62px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: #fff;
}

.panel-header > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.panel-header h2,
.panel-header h3 {
  margin: 0;
  color: #29384b;
  font-size: 18px;
  line-height: 1.35;
}

.panel-header p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.panel-body {
  padding: 18px;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field,
.field-wide {
  display: grid;
  gap: 6px;
}

.field-wide {
  grid-column: 1 / -1;
}

label {
  color: #2c3848;
  font-size: 14px;
  font-weight: 650;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  color: var(--text);
  min-height: 42px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

select {
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, #8da0b4 50%) calc(100% - 18px) 50% / 6px 6px no-repeat,
    linear-gradient(135deg, #8da0b4 50%, transparent 50%) calc(100% - 13px) 50% / 6px 6px no-repeat,
    #fff;
  padding-right: 34px;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #b9d7ee;
  background-color: #fbfdff;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(63, 127, 182, 0.12);
}

textarea {
  min-height: 84px;
  resize: vertical;
}

.check {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid #dfe8f0;
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
  color: #2c3848;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.check:hover {
  border-color: #b9d7ee;
  background: #f8fbfe;
}

.check input {
  width: auto;
  min-height: auto;
  accent-color: var(--brand);
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.workspace {
  display: grid;
  gap: 16px;
  min-width: 0;
  min-height: 0;
  overflow: visible;
  padding-right: 0;
  padding-bottom: 16px;
}

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

.panel-header > .status-row {
  display: flex;
  justify-content: flex-end;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 14px;
  color: #334155;
  background: #fff;
}

.pill.green {
  background: var(--green-bg);
  color: var(--green);
  border-color: #b7ded2;
}

.pill.yellow {
  background: var(--yellow-bg);
  color: var(--yellow);
  border-color: #f0d18d;
}

.pill.red {
  background: var(--red-bg);
  color: var(--red);
  border-color: #efbbbb;
}

.pill.purple {
  background: var(--purple-bg);
  color: var(--purple);
  border-color: #d6c4ef;
}

.pill.blue {
  background: var(--blue-bg);
  color: var(--blue);
  border-color: #b9d5ef;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.rank-match-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rank-match-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid #d7e2ef;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  font-size: 13px;
}

.rank-match-item b {
  color: var(--brand);
}

.major-fit-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.major-analysis-workspace {
  min-width: 0;
}

.major-fit-panel {
  overflow: visible;
}

.major-analysis-workspace.detail-open {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 13fr);
  align-items: start;
  gap: 14px;
}

.major-analysis-workspace.detail-open .major-fit-grid {
  min-width: 0;
  gap: 10px;
}

.major-analysis-note {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #f5d38a;
  border-radius: 6px;
  background: #fff8e6;
  color: #8a5a00;
  font-size: 14px;
  line-height: 1.45;
}

.zero-recommendation-note {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid #b9d7ee;
  border-radius: 8px;
  background: #f5faff;
}

.zero-recommendation-note strong {
  color: #234f78;
  font-size: 15px;
}

.zero-recommendation-note p {
  max-width: 920px;
  margin: 6px 0 10px;
  color: #526579;
  font-size: 14px;
  line-height: 1.6;
}

.zero-recommendation-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.zero-recommendation-reasons span {
  padding: 4px 8px;
  border: 1px solid #d6e6f3;
  border-radius: 999px;
  background: #fff;
  color: #4b647c;
  font-size: 12px;
}

.zero-recommendation-note > button {
  flex: 0 0 auto;
}

.major-drag-note {
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
}

.static-value {
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid #dce5ef;
  border-radius: 10px;
  background: #f8fbfe;
  color: #263445;
  font-size: 14px;
  font-weight: 750;
}

.major-bucket {
  display: grid;
  grid-template-columns: minmax(150px, 180px) minmax(0, 1fr);
  align-content: stretch;
  align-items: stretch;
  gap: 0;
  min-width: 0;
  min-height: 0;
  border: 1px solid #dce5ef;
  border-left: 4px solid var(--green);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.major-bucket.recommend {
  border-left-color: var(--green);
}

.major-bucket.neutral {
  border-left-color: var(--brand);
}

.major-bucket.not-recommended {
  border-left-color: var(--yellow);
}

.major-bucket.absolute-no {
  border-left-color: var(--red);
}

.major-bucket-head {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px;
  border-right: 1px solid var(--line);
  background: #f8fafc;
}

.major-bucket.recommend .major-bucket-head {
  background: #f4fbf8;
}

.major-bucket.neutral .major-bucket-head {
  background: #f7fbff;
}

.major-bucket.not-recommended .major-bucket-head {
  background: #fffaf0;
}

.major-bucket.absolute-no .major-bucket-head {
  background: #fff5f5;
}

.major-bucket.preference-excluded {
  border-left-color: #8b5cf6;
}

.major-bucket.preference-excluded .major-bucket-head {
  background: #faf5ff;
}

.major-bucket-head strong {
  font-size: 16px;
}

.major-bucket-head span {
  color: var(--muted);
  font-size: 12px;
}

.major-direction-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 56px;
  min-width: 0;
  padding: 10px;
  align-content: flex-start;
  background: #fff;
}

.major-name-chip.recommend {
  border-color: #abd8c8;
  background: #f2fbf7;
  color: #21715d;
}

.major-name-chip.neutral {
  border-color: #bdd8f2;
  background: #f2f8ff;
  color: var(--brand);
}

.major-name-chip.not-recommended,
.major-name-chip.yellow {
  border-color: #efd99f;
  background: #fff9ea;
  color: #8a5a00;
}

.major-name-chip.absolute-no,
.major-name-chip.red {
  border-color: #efc2c2;
  background: #fff2f2;
  color: var(--red);
}

.major-direction-chip {
  display: inline-flex;
  align-items: stretch;
  max-width: 100%;
  border: 1px solid #d8e3ef;
  border-radius: 999px;
  background: #fff;
  overflow: hidden;
  cursor: grab;
}

.major-direction-chip.dragging {
  opacity: 0.5;
}

.major-direction-chip.selected {
  box-shadow: 0 0 0 2px rgba(29, 104, 179, 0.12);
}

.major-direction-chip.expanded {
  border-color: var(--brand);
  background: #f5faff;
  box-shadow: inset 0 0 0 1px rgba(29, 104, 179, 0.18);
}

.major-direction-chip-main {
  border: 0;
  background: transparent;
}

.major-direction-chip-main {
  display: grid;
  gap: 2px;
  width: 100%;
  min-width: 0;
  padding: 7px 11px;
  color: #263445;
  text-align: left;
}

.major-direction-chip-title-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.major-direction-chip-title-line em {
  flex: 0 0 auto;
  color: #21715d;
  font-size: 11px;
  font-style: normal;
  font-weight: 750;
}

.major-direction-chip-main strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.major-direction-chip-main span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.15;
}

.major-direction-chip.recommend {
  border-color: #abd8c8;
  background: #f2fbf7;
}

.major-direction-chip.neutral {
  border-color: #bdd8f2;
  background: #f2f8ff;
}

.major-direction-chip.not-recommended,
.major-direction-chip.yellow {
  border-color: #efd99f;
  background: #fff9ea;
}

.major-direction-chip.absolute-no,
.major-direction-chip.red {
  border-color: #efc2c2;
  background: #fff2f2;
}

.major-direction-chip.preference-excluded {
  border-color: #d8c5f5;
  background: #f9f5ff;
}

.major-direction-inline-detail {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfdff;
  box-shadow: 0 8px 22px rgba(44, 64, 88, 0.06);
}

.major-analysis-workspace.detail-open .major-direction-inline-detail {
  position: sticky;
  top: 76px;
  max-height: calc(100vh - 92px);
  overflow: auto;
}

.major-analysis-workspace.detail-open .major-bucket {
  grid-template-columns: minmax(0, 1fr);
}

.major-analysis-workspace.detail-open .major-bucket-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-right: 0;
  border-bottom: 1px solid var(--line);
}

.major-analysis-workspace.detail-open .major-direction-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
  padding: 10px;
}

.major-analysis-workspace.detail-open .major-direction-chip {
  width: 100%;
  border-radius: 10px;
}

.major-analysis-workspace.detail-open .major-direction-chip-main {
  flex: 1 1 auto;
}

.major-direction-inline-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.major-direction-inline-head > div {
  display: grid;
  gap: 3px;
}

.major-direction-inline-head strong {
  color: #263445;
  font-size: 16px;
}

.major-direction-inline-head span {
  color: var(--muted);
  font-size: 12px;
}

.major-direction-inline-head button {
  flex: 0 0 auto;
}

.direction-inline-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.95fr) minmax(320px, 1.05fr);
  gap: 12px;
}

.direction-inline-section {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.major-fit-empty {
  min-height: 120px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
}

.major-fit-empty.compact {
  min-height: 70px;
}

.metric {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.metric strong {
  display: block;
  font-size: 22px;
  margin-top: 4px;
}

.metric span {
  color: var(--muted);
  font-size: 12px;
}

.red-text {
  color: var(--red);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.toolbar-left,
.toolbar-right {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

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

.candidate {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 5px solid #b5bec9;
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.candidate.dragging {
  opacity: 0.5;
}

.candidate.green {
  border-left-color: var(--green);
}

.candidate.yellow {
  border-left-color: var(--yellow);
  background: #fffdf7;
}

.candidate.red {
  border-left-color: var(--red);
  background: #fffafa;
}

.candidate.favorite {
  box-shadow: inset 0 0 0 2px #d9c6f0;
}

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

.drag-handle {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--muted);
  cursor: grab;
  background: #fff;
}

.candidate-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.candidate-title h3 {
  margin: 0;
  font-size: 17px;
}

.group-index {
  min-width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  background: #eef4ff;
  border: 1px solid #c8d8f0;
  color: var(--brand);
  font-size: 13px;
  font-weight: 750;
}

.group-index.small {
  min-width: 24px;
  height: 24px;
  margin-right: 8px;
  font-size: 12px;
  vertical-align: middle;
}

.school-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  font-weight: 750;
  font-size: 17px;
}

.school-link:hover {
  color: var(--brand);
  text-decoration: underline;
}

.school-link.compact {
  font-size: 15px;
}

.group-title {
  font-weight: 750;
  font-size: 17px;
}

.inline-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--brand);
}

.inline-link:hover {
  text-decoration: underline;
}

.subline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.school-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px;
}

.school-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid #d7e2ef;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
}

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

.adjust-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #2c3848;
  font-size: 13px;
  white-space: nowrap;
}

.adjust-toggle input {
  width: auto;
}

.major-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.candidate-sections {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--line);
}

.candidate-section {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 12px 0;
  background: transparent;
  min-width: 0;
}

.candidate-section:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.candidate-section strong {
  display: block;
  margin-bottom: 8px;
  color: #344256;
  font-size: 13px;
}

.admission-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admission-item {
  display: grid;
  grid-template-columns: auto auto auto;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 8px;
  background: #fbfcfe;
}

.admission-item b {
  color: var(--text);
}

.admission-item em {
  color: var(--muted);
  font-style: normal;
}

.admission-item > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.admission-item > span:first-child i {
  padding: 2px 5px;
  border-radius: 4px;
  background: #dcecff;
  color: var(--brand);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.admission-item.current-plan {
  border-color: #9bc5ed;
  background: #f2f8ff;
}

.candidate-history-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.42fr);
  gap: 18px;
  padding-top: 14px;
}

.candidate-history-block {
  min-width: 0;
}

.candidate-history-block > strong {
  display: block;
  margin-bottom: 8px;
  color: #344256;
  font-size: 13px;
}

.plan-count-section {
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.plan-count-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(86px, 1fr));
  gap: 8px;
}

.plan-count-item {
  display: grid;
  gap: 3px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.plan-count-item span {
  color: var(--muted);
  font-size: 12px;
}

.plan-count-item b {
  color: #26364b;
  font-size: 15px;
}

.plan-count-item.current {
  border-color: #a8ccec;
  background: #f2f8ff;
}

.plan-count-item.current b {
  color: var(--brand);
}

.plan-count-item.missing b {
  color: #8a98a9;
  font-weight: 600;
}

.major-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  background: #fff;
  cursor: pointer;
  color: #243244;
  font-size: 13px;
}

.major-chip.green {
  background: var(--green-bg);
  border-color: #b7ded2;
  color: var(--green);
}

.major-chip.yellow {
  background: var(--yellow-bg);
  border-color: #f0d18d;
  color: var(--yellow);
}

.major-chip.red {
  background: var(--red-bg);
  border-color: #efbbbb;
  color: var(--red);
}

.major-chip.exclude {
  text-decoration: line-through;
}

.major-chip.passive {
  display: inline-flex;
  cursor: default;
  background: #f8fafc;
  color: #334155;
}

.school-groups {
  display: grid;
  gap: 10px;
}

.school-groups-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.school-groups-title strong {
  font-size: 15px;
}

.school-groups-title span {
  color: var(--muted);
  font-size: 13px;
}

.school-group-list {
  display: grid;
  gap: 10px;
}

.school-group-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.school-group-card.current {
  border-color: #b9cff0;
  background: #f8fbff;
}

.school-group-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.school-group-head strong {
  display: block;
  font-size: 15px;
}

.school-group-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.empty {
  min-height: 300px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-panel);
  background: linear-gradient(180deg, #fff, #fbfcfe);
  font-size: 15px;
}

.admin-layout {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 16px;
  display: grid;
  gap: 16px;
}

.admin-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 16px;
}

.admin-sidebar {
  position: sticky;
  top: 74px;
  align-self: start;
  height: calc(100vh - 90px);
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-side-title {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 4px;
}

.admin-side-title strong {
  font-size: 16px;
}

.admin-side-title span {
  color: var(--muted);
  font-size: 12px;
}

.admin-nav {
  display: grid;
  gap: 4px;
  padding: 10px;
}

.admin-nav button {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 10px 11px;
  color: #334155;
}

.admin-nav button.active {
  background: var(--brand-weak);
  color: var(--brand);
  font-weight: 700;
}

.admin-main {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.admin-page-title {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.admin-page-title h2 {
  margin: 0;
  font-size: 20px;
}

.admin-page-title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

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

.admin-home-card {
  min-height: 92px;
  display: grid;
  gap: 6px;
  align-content: start;
  text-align: left;
  padding: 12px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
}

.admin-home-card:hover {
  border-color: #b9cff0;
  background: #f8fbff;
}

.admin-home-card strong {
  color: var(--text);
  font-size: 15px;
}

.admin-home-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.admin-home-card em {
  color: var(--brand);
  font-style: normal;
  font-size: 12px;
}

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

.template-card {
  display: grid;
  gap: 10px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.template-card strong {
  display: block;
  margin-bottom: 5px;
  font-size: 15px;
}

.template-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 12px;
}

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

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

table {
  border-collapse: collapse;
  width: 100%;
  background: #fff;
  font-size: 13px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 8px 9px;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

th {
  background: #f0f3f7;
  color: #344256;
  position: sticky;
  top: 0;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(18, 27, 41, 0.46);
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
}

.modal {
  max-width: 720px;
  width: min(720px, 100%);
  max-height: min(760px, 92vh);
  overflow: auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
}

.modal-header {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
}

.modal-title-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  flex: 1;
  min-width: 0;
}

.modal-title-group h3 {
  flex-shrink: 0;
}

.modal-title-group .status-row {
  flex-wrap: wrap;
}

.modal-title-group .status-row .pill {
  display: inline-flex;
  margin-top: 0;
}

.modal-header span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.modal-body {
  padding: 16px;
  display: grid;
  gap: 14px;
}

.major-detail-loading {
  min-height: 160px;
  display: grid;
  place-items: center;
  border: 1px dashed #cbd9e8;
  border-radius: 8px;
  background: #f7fafc;
  color: #64748b;
  font-size: 14px;
}

.major-detail-loading.error {
  border-color: #efcaca;
  background: #fff7f7;
  color: #a83232;
}

.reference-profile {
  display: grid;
  gap: 14px;
}

.reference-source {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-left: 3px solid #2c78ba;
  background: #f3f8fc;
}

.reference-source strong {
  color: #174f83;
  font-size: 15px;
}

.reference-source span {
  color: var(--muted);
  font-size: 12px;
}

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

.reference-text-section.wide {
  grid-column: 1 / -1;
}.reference-text-section {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}.reference-text-section > strong {
  display: block;
  margin-bottom: 7px;
  color: #28384d;
  font-size: 14px;
}.reference-text-section p {
  margin: 0;
  color: #46566b;
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-line;
}

.track-source-note {
  margin-top: 10px;
  color: #8a97a8;
  font-size: 12px;
}

.major-rule-notice {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 14px;
  padding: 12px 14px;
  border-left: 3px solid #d7a838;
  background: #fff9ea;
  color: #674900;
}

.major-rule-notice.red {
  border-left-color: #d46a6a;
  background: #fff3f3;
  color: #8a3030;
}

.major-rule-notice strong {
  font-size: 14px;
}

.major-rule-notice p {
  margin: 0 0 6px;
  font-size: 14px;
  line-height: 1.55;
}

.major-rule-notice p:last-child {
  margin-bottom: 0;
}

.major-rule-notice p span {
  display: inline-block;
  min-width: 58px;
  margin-right: 8px;
  font-weight: 700;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.info-block {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.info-block strong {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
}

.info-block p {
  margin: 0;
  color: #35445a;
  line-height: 1.5;
}

.score-bars {
  display: grid;
  gap: 8px;
}

.bar {
  display: grid;
  grid-template-columns: 92px 1fr 28px;
  gap: 8px;
  align-items: center;
  color: #35445a;
  font-size: 13px;
}

.bar-track {
  height: 8px;
  border-radius: 999px;
  background: #e5e9f0;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: var(--brand);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  padding: 10px 13px;
  background: #172033;
  color: #fff;
  border-radius: 8px;
  z-index: 30;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
}@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    height: auto;
  }

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

  .summary-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .major-fit-grid {
    grid-template-columns: 1fr;
  }

}@media (max-width: 640px) {
  .topbar {
    align-items: flex-start;
    height: auto;
    padding: 12px;
    flex-direction: column;
  }

  .layout,
  .admin-layout,
  .admin-shell {
    padding: 10px;
  }

  .admin-home-grid {
    grid-template-columns: 1fr;
  }

  .template-grid {
    grid-template-columns: 1fr;
  }.field-grid,
.info-grid {
    grid-template-columns: 1fr;
  }

  .candidate-head {
    grid-template-columns: 1fr;
  }

  .candidate-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

/* Three-page parent workflow */
.parent-layout {
  align-content: start;
  grid-template-rows: auto auto;
  gap: 14px;
  padding-top: 14px;
  padding-bottom: 12px;
}

.parent-page-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  position: relative;
  padding: 7px 16px;
  border: 1px solid #dfe8f1;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(28, 57, 86, 0.05);
}

.catalog-nav-row {
  display: flex;
  align-items: stretch;
  gap: 12px;
}
.catalog-nav-row .parent-page-nav { flex: 1; }
.catalog-nav-btn {
  padding: 0 24px;
  border: 1px solid var(--brand);
  color: var(--brand);
  background: #fff;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.catalog-nav-btn:hover { background: var(--brand); color: #fff; }

.journey-step {
  position: relative;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 3px 8px;
  border: 0;
  border-radius: 8px;
  text-align: left;
  background: transparent;
}

.journey-step:last-child {
  border-right: 0;
}

.journey-step:hover {
  background: #f7faff;
}

.journey-step.active {
  background: transparent;
  box-shadow: none;
}

.journey-step .journey-dot {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid #d6e0ea;
  border-radius: 50%;
  color: #6b7787;
  background: #fff;
  font-size: 14px;
  font-weight: 800;
}

.journey-step.active .journey-dot {
  border-color: #004ea2;
  color: #fff;
  background: #004ea2;
}

.journey-step.ready .journey-dot {
  border-color: #a8d7c8;
  color: var(--green);
  background: var(--green-bg);
}

.journey-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.journey-step strong {
  min-width: 0;
  font-size: 16px;
  line-height: 1.25;
  color: #2f3d50;
}

.journey-step.active strong {
  color: #004ea2;
}

.journey-step em {
  color: var(--muted);
  font-size: 14px;
  font-style: normal;
  white-space: nowrap;
}

.journey-step.ready em {
  color: var(--green);
}

.journey-connector {
  flex: 1;
  height: 1px;
  margin-left: 14px;
  margin-right: 24px;
  align-self: center;
  background-image: repeating-linear-gradient(to right, #C9D8E8 0 6px, transparent 6px 12px);
}

/* 第二步页标题区（紧凑工具栏式） */
.major-page > .parent-page-heading {
  padding: 20px 0 4px;
  align-items: center;
}
.major-page-title {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.major-page-step {
  color: #2f78c8;
  font-size: 13px;
  font-weight: 500;
}
.major-page-title h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.25;
  color: #20334b;
}
.major-page-hint {
  margin: 0;
  color: #66788f;
  font-size: 13px;
}
.major-page-heading > .major-page-stats {
  display: flex;
  align-items: center;
  gap: 18px;
}
.major-page-stats .stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: 999px;
  font-size: 13px;
  color: #4a5a70;
  white-space: nowrap;
}
.major-page-stats .stat i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.major-page-stats .stat.recommend i { background: #34a47c; }
.major-page-stats .stat.avoid i { background: #d25460; }
.major-page-stats .stat b {
  font-weight: 700;
  color: #20334b;
}

.parent-page {
  display: grid;
  gap: 14px;
  min-width: 0;
}.parent-page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}.parent-page-heading > div {
  display: grid;
  gap: 4px;
}.parent-page-heading > div > span {
  color: #2f78c8;
  font-size: 14px;
  font-weight: 700;
}

.parent-page-heading h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: 0;
  color: #20334b;
}

.profile-page > .parent-page-heading {
  min-height: 48px;
  padding: 0 2px;
}

.profile-page > .parent-page-heading .pill.blue {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-color: #b9d4ed;
  border-radius: 8px;
  background: #e7f1fc;
  color: #004ea2;
  font-size: 14px;
  font-weight: 700;
}

.parent-page-heading > .profile-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-heading-actions > button {
  min-height: 34px;
  padding: 6px 11px;
}

.profile-heading-actions > .primary {
  border-color: #004ea2;
  background: #004ea2;
  box-shadow: inset 0 -3px 0 rgba(255, 222, 18, 0.7);
}

.profile-form-panel .panel-body {
  padding: 0;
}

.profile-page .profile-form-panel {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.profile-page .profile-form-panel > .panel-header {
  margin-bottom: 16px;
  padding: 0;
  border-bottom: 0;
  background: transparent;
}

.profile-page .profile-form-panel > .panel-header h2 {
  font-size: 20px;
  color: #273a51;
}

.profile-page .profile-form-panel > .panel-header button {
  min-height: 34px;
  padding: 6px 10px;
  border-color: transparent;
  background: transparent;
  color: #65768a;
}

.profile-reset-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.profile-reset-button > span {
  color: #2f78c8;
  font-size: 18px;
  line-height: 1;
}

.profile-page .profile-form-panel > .panel-header button:hover {
  border-color: #cfe2f2;
  background: #f4f9fd;
  color: var(--brand);
}

.profile-form-stack {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: stretch;
  gap: 12px;
}

.profile-form-section {
  --section-color: #004ea2;
  --section-soft: #eaf3fc;
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #dde7f0;
  border-top: 3px solid var(--section-color);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 5px 16px rgba(26, 57, 87, 0.045);
}

.profile-form-section:last-child {
  padding-bottom: 14px;
  border-bottom: 1px solid #dde7f0;
}

.profile-basic-section {
  grid-column: 1 / -1;
}

.profile-ability-section {
  --section-color: #006b86;
  --section-soft: #eaf7f8;
  grid-column: span 6;
}

.profile-career-section {
  --section-color: #a81e32;
  --section-soft: #fbf0f2;
  grid-column: span 6;
}

.profile-plan-section {
  --section-color: #9a7600;
  --section-soft: #fff8d8;
  grid-column: span 6;
}

.profile-note-section {
  --section-color: #6b4ea2;
  --section-soft: #f2effa;
  grid-column: span 6;
  align-self: start;
}

.profile-section-head {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.section-number {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--section-color);
  border-radius: 8px;
  background: var(--section-color);
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
}

.profile-section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex: 0 0 auto;
}

.section-icon {
  position: relative;
  width: 28px;
  height: 28px;
  border: 1px solid #d5e2ef;
  border-radius: 8px;
  background: var(--section-soft);
  flex: 0 0 auto;
}

.section-icon::before,
.section-icon::after {
  content: "";
  position: absolute;
  border-color: var(--brand);
}

.section-icon.basic::before {
  left: 9px;
  top: 8px;
  width: 12px;
  height: 14px;
  border: 1.6px solid var(--brand);
  border-radius: 3px;
}

.section-icon.basic::after {
  left: 12px;
  top: 13px;
  width: 7px;
  height: 1.6px;
  background: var(--brand);
  box-shadow: 0 5px 0 var(--brand);
}

.section-icon.ability::before {
  left: 7px;
  right: 7px;
  bottom: 8px;
  height: 1.6px;
  background: var(--brand);
}

.section-icon.ability::after {
  left: 9px;
  top: 9px;
  width: 13px;
  height: 11px;
  border-left: 1.6px solid var(--brand);
  border-bottom: 1.6px solid var(--brand);
  transform: skew(-12deg);
}

.section-icon.career::before {
  left: 8px;
  top: 10px;
  width: 14px;
  height: 10px;
  border: 1.6px solid var(--brand);
  border-radius: 3px;
}

.section-icon.career::after {
  left: 12px;
  top: 8px;
  width: 6px;
  height: 4px;
  border: 1.6px solid var(--brand);
  border-bottom: 0;
  border-radius: 3px 3px 0 0;
}

.section-icon.plan::before {
  left: 8px;
  top: 9px;
  width: 15px;
  height: 13px;
  border: 1.6px solid var(--brand);
  border-radius: 3px;
}

.section-icon.plan::after {
  left: 12px;
  top: 13px;
  width: 8px;
  height: 1.6px;
  background: var(--brand);
  box-shadow: 0 4px 0 var(--brand);
}

.section-icon.note::before {
  left: 9px;
  top: 8px;
  width: 13px;
  height: 15px;
  border: 1.6px solid var(--brand);
  border-radius: 3px;
}

.section-icon.note::after {
  left: 12px;
  top: 13px;
  width: 7px;
  height: 1.6px;
  background: var(--brand);
  box-shadow: 0 4px 0 var(--brand);
}

.profile-section-head > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-section-head h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
  color: #004ea2;
  letter-spacing: 0;
}

.profile-section-head p {
  flex: 1 1 auto;
  margin: 0;
  color: #708095;
  font-size: 14px;
  line-height: 1.4;
}

.profile-section-head .section-icon {
  display: none;
}

.question-grid {
  display: grid;
  gap: 12px;
}

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

.profile-career-section .question-grid,
.profile-plan-section .question-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-career-section .question-card-head p,
.profile-plan-section .question-card-head p {
  display: none;
}

.profile-career-section .option-checks {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.profile-ability-section .question-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.question-card {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 11px;
  border: 1px solid #e0e8f0;
  border-radius: 8px;
  background: #fbfdff;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.question-card:hover {
  border-color: #bdd6eb;
  background: #f8fbff;
  box-shadow: 0 6px 16px rgba(44, 76, 108, 0.04);
}

.question-card-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.question-card-head > div {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 7px;
  flex-wrap: wrap;
}

.profile-page .profile-section-head p,
.profile-page .question-card-head > span,
.profile-page .question-card-head p,
.profile-page .manual-note-hint {
  display: none;
}

.profile-page .question-card-head {
  display: block;
}

.profile-page .question-card-head > div {
  display: block;
}

.profile-page .question-card-head strong {
  color: #004ea2;
  font-size: 15px;
}

.question-card-head > span {
  width: auto;
  min-width: 34px;
  min-height: 24px;
  padding: 2px 6px;
  display: grid;
  place-items: center;
  border: 1px solid #dfe7ef;
  border-radius: 6px;
  background: var(--section-soft);
  color: var(--section-color);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.question-card-head strong {
  display: block;
  font-size: 15px;
  line-height: 1.35;
  color: #2a3d54;
  flex: 0 0 auto;
}

.question-card-head p {
  flex: 1 1 170px;
  margin: 0;
  color: #75859a;
  font-size: 14px;
  line-height: 1.35;
}

.question-card-body {
  min-width: 0;
}

.profile-page input,
.profile-page select,
.profile-page textarea,
.profile-page .static-value,
.profile-page .check,
.profile-page .segmented label {
  border-radius: 8px;
}

.profile-page input,
.profile-page select,
.profile-page .static-value {
  min-height: 36px;
  padding-top: 7px;
  padding-bottom: 7px;
}

.profile-page select:hover,
.profile-page input:hover,
.profile-page textarea:hover {
  border-color: #91bde4;
}

.profile-page .static-value {
  display: flex;
  align-items: center;
  background: #f3f7fb;
  border-color: #dbe5ee;
}

.profile-page .check {
  min-height: 32px;
  padding: 5px 8px;
  background: #ffffff;
}

.profile-page .check.active {
  border-color: #94bfe6;
  background: #eaf4ff;
  color: #246fb8;
}

.profile-page .check input {
  width: 16px;
  height: 16px;
  min-height: 0;
  accent-color: #2f78c8;
}

.multi-select-dropdown {
  position: relative;
  min-width: 0;
}

.multi-select-dropdown.open {
  z-index: 40;
}

.multi-select-trigger {
  width: 100%;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 11px;
  border-color: #dbe5ee;
  border-radius: 8px;
  background: #ffffff;
  color: #2b3d53;
  text-align: left;
}

.multi-select-trigger > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.multi-select-trigger > i {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-right: 2px solid #8193a6;
  border-bottom: 2px solid #8193a6;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.16s ease;
}

.multi-select-dropdown.open .multi-select-trigger {
  border-color: #79addb;
  box-shadow: 0 0 0 3px rgba(0, 78, 162, 0.1);
}

.multi-select-dropdown.open .multi-select-trigger > i {
  transform: translateY(2px) rotate(225deg);
}

.multi-select-menu {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  width: 100%;
  min-width: 230px;
  max-height: 240px;
  display: grid;
  gap: 3px;
  padding: 6px;
  overflow-y: auto;
  border: 1px solid #cbdbe9;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(28, 56, 86, 0.16);
}

.multi-select-menu .check {
  min-height: 34px;
  border-color: transparent;
  background: #ffffff;
}

.multi-select-menu .check:hover {
  background: #edf5ff;
}

.multi-select-menu .check.active {
  border-color: transparent;
  background: #e7f1fc;
  color: #004ea2;
}

.profile-basic-section .segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  gap: 8px;
}

.profile-basic-section .segmented label {
  min-height: 34px;
  justify-content: center;
  background: #ffffff;
}

.profile-basic-section .segmented label.active {
  border-color: #8ebde7;
  background: #eaf4ff;
  color: #246fb8;
  font-weight: 700;
}

.profile-basic-section .segmented input {
  width: 16px;
  height: 16px;
  min-height: 0;
  accent-color: #2f78c8;
}

.profile-basic-section .nested-option-stack {
  gap: 10px;
}

.profile-basic-section .nested-option-stack .option-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-basic-section .nested-option-stack .option-checks .check {
  flex: 0 0 auto;
  min-width: 72px;
  justify-content: center;
}

.radio-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.radio-pill {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  border: 1px solid #dbe5ee;
  border-radius: 8px;
  background: #fff;
  color: #344255;
  font-size: 14px;
  cursor: pointer;
}

.radio-pill.active {
  border-color: #8cbce8;
  background: #eaf4ff;
  color: #246fb8;
  font-weight: 700;
}

.radio-pill input {
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0;
  accent-color: #2f78c8;
}

.academic-ability-row .radio-pill-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.academic-ability-row .radio-pill {
  justify-content: center;
  min-width: 0;
  min-height: 30px;
  padding: 4px 6px;
}

.academic-ability-row .radio-pill input {
  display: none;
}

.academic-question-card {
  background: #f8fbfe;
}

.personality-question-card {
  background: #ffffff;
}

.personality-question-card .radio-pill-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
}

.personality-question-card .radio-pill {
  justify-content: flex-start;
}

.manual-notes-textarea {
  width: 100%;
  min-height: 96px;
  padding: 13px 14px;
  border-color: #d7e2ed;
  border-radius: 8px;
  background: #fbfdff;
  line-height: 1.5;
  resize: vertical;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-actions.end {
  justify-content: flex-end;
  padding-top: 2px;
}

.profile-page .page-actions .primary {
  min-height: 46px;
  padding-inline: 20px;
  border-radius: 8px;
  background: #2f78c8;
  border-color: #2f78c8;
}

.page-actions.between {
  justify-content: space-between;
  padding-top: 2px;
}

.action-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-review {
  overflow: hidden;
}

.profile-review-head {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px;
  background: #fff;
}

.profile-review-head > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.profile-review-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-review-head strong {
  font-size: 15px;
}

.profile-review-head span {
  color: var(--muted);
  font-size: 12px;
}

.profile-review .profile-summary {
  border-top: 1px solid var(--line);
  border-bottom: 0;
  padding: 10px 14px;
  background: #fbfcfe;
}

.subject-eligibility-panel {
  padding: 16px 18px;
  border-left: 4px solid var(--brand);
}

.subject-eligibility-heading,
.subject-eligibility-heading > div,
.subject-exclusion-breakdown {
  display: flex;
  align-items: center;
}

.subject-eligibility-heading {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.subject-eligibility-heading > div {
  gap: 10px;
  flex-wrap: wrap;
}

.subject-eligibility-heading strong {
  font-size: 16px;
}

.subject-eligibility-heading span,
.subject-eligibility-metrics span,
.subject-eligibility-metrics em,
.subject-exclusion-breakdown {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.subject-basis {
  padding: 4px 9px;
  border: 1px solid #bfd6eb;
  border-radius: 999px;
  background: var(--brand-weak);
  color: var(--brand) !important;
  white-space: nowrap;
}

.subject-eligibility-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.subject-eligibility-metrics > div {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 3px 8px;
  min-width: 0;
  padding: 10px 12px;
  border-right: 1px solid var(--line);
  background: var(--soft-card);
}

.subject-eligibility-metrics > div:last-child {
  border-right: 0;
}

.subject-eligibility-metrics strong {
  grid-row: 1 / 3;
  grid-column: 2;
  color: var(--text);
  font-size: 22px;
}

.subject-eligibility-metrics .eligible strong {
  color: #21715d;
}

.subject-eligibility-metrics .excluded strong {
  color: var(--red);
}

.subject-exclusion-breakdown {
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.subject-exclusion-breakdown em {
  padding: 3px 8px;
  border-radius: 999px;
  background: #f5f7fa;
  color: #5d6c7e;
  font-style: normal;
}

.subject-eligibility-panel.compact {
  padding-block: 12px;
}

.outdated-note {
  padding: 10px 12px;
  border: 1px solid #f0d18d;
  border-radius: 6px;
  background: var(--yellow-bg);
  color: #805000;
  font-size: 13px;
}

.major-reason-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.major-reason-list span {
  padding: 3px 7px;
  border: 1px solid #cfe0d9;
  border-radius: 999px;
  background: #f2faf7;
  color: #2f6658;
  font-size: 11px;
}

.modal-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.modal-section-title strong {
  font-size: 15px;
}

.modal-section-title span {
  color: var(--muted);
  font-size: 12px;
}

.school-detail-section,
.school-detail-modal .school-groups {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #dce6ef;
  border-radius: 8px;
  background: #fff;
}

.school-detail-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e4ebf2;
}

.school-detail-section-head strong {
  color: #26384e;
  font-size: 17px;
}

.school-detail-section-head span {
  color: var(--muted);
  font-size: 12px;
}

.school-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 24px;
  margin: 0;
}

.school-fact {
  min-width: 0;
  padding: 10px 0;
  border-bottom: 1px solid #edf1f5;
}

.school-fact:nth-last-child(-n + 3) {
  border-bottom: 0;
}

.school-fact dt {
  margin: 0 0 5px;
  color: #758399;
  font-size: 12px;
}

.school-fact dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: #28394e;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.45;
}

.school-strength-line {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding-top: 2px;
}

.school-strength-line > strong {
  padding-top: 5px;
  color: #344256;
  font-size: 14px;
}

.school-detail-empty {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.school-reference-feature-list {
  display: grid;
  gap: 8px;
}

.school-reference-feature-list article {
  padding: 10px 12px;
  border: 1px solid #dbe5ef;
  border-radius: 7px;
  background: #fbfcfe;
}

.school-reference-feature-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.school-reference-feature-head strong {
  color: #2b3b50;
  font-size: 14px;
}

.school-reference-feature-head span {
  color: var(--muted);
  font-size: 12px;
}

.school-reference-feature-list p {
  margin: 7px 0 0;
  color: #46566b;
  font-size: 14px;
  line-height: 1.55;
}

.school-reference-feature-list p b {
  display: inline-block;
  min-width: 40px;
  color: #1765a5;
}

.major-reason-list.large span {
  font-size: 12px;
  padding: 5px 9px;
}

.direction-explain {
  margin: 0;
  color: #334155;
  font-size: 13px;
  line-height: 1.6;
}

.direction-major-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: flex-start;
}

.direction-major-chip-list.inline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.direction-major-selection-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.direction-major-selection-actions button {
  min-height: 30px;
  padding: 4px 9px;
  border-color: #bdd8f2;
  color: var(--brand);
  font-size: 12px;
}

.major-library-target {
  width: fit-content;
  padding: 4px 8px;
  border: 1px solid;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.major-library-target.recommend {
  border-color: #b8dece;
  background: #f2faf7;
  color: #21715d;
}

.major-library-target.avoid {
  border-color: #efc2c2;
  background: #fff4f4;
  color: #b4232f;
}

.direction-major-option {
  display: flex;
  align-items: stretch;
  min-width: 0;
  min-height: 40px;
  border: 1px solid #d8e3ef;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.direction-major-option.selected {
  border-color: #77b9e8;
  box-shadow: 0 0 0 2px rgba(29, 104, 179, 0.1);
}

.direction-major-checkbox {
  position: relative;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border-right: 1px solid #d8e3ef;
  background: #f8fbfe;
  cursor: pointer;
}

.direction-major-checkbox input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.direction-major-checkbox span {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 1px solid #aebdca;
  border-radius: 4px;
  background: #fff;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.direction-major-checkbox input:checked + span {
  border-color: var(--brand);
  background: var(--brand);
}

.direction-major-checkbox input:checked + span::after {
  content: "✓";
}

.direction-major-checkbox input:focus-visible + span {
  outline: 2px solid rgba(29, 104, 179, 0.3);
  outline-offset: 2px;
}

.direction-major-option .direction-major-chip {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: left;
}

.direction-major-chip {
  min-height: 34px;
  max-width: 100%;
  padding: 7px 11px;
  border: 1px solid #d8e3ef;
  border-radius: 999px;
  background: #fff;
  color: #263445;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.direction-major-chip:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: #f7fbff;
}

.direction-major-chip.yellow {
  border-color: #efd99f;
  background: #fff9ea;
  color: #8a5a00;
}

.direction-major-chip.red {
  border-color: #efc2c2;
  background: #fff2f2;
  color: var(--red);
}

.school-filter-rows {
  display: grid;
  gap: 12px;
}

.school-filter-row {
  min-height: 46px;
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.school-filter-row > strong {
  color: #344256;
  font-size: 15px;
}

.school-province-filter {
  width: 100%;
}

.school-province-menu {
  position: static;
  width: 100%;
  min-width: 0;
  max-height: none;
  margin-top: 6px;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  overflow: visible;
}

.school-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.school-filter-chips button {
  min-height: 36px;
  padding: 7px 14px;
  border-color: #d5e0ea;
  background: #fff;
  color: #344256;
}

.school-filter-chips button.active {
  border-color: var(--brand);
  background: #edf6ff;
  color: var(--brand);
  box-shadow: inset 0 0 0 1px var(--brand);
}

.school-exclusion-field {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border: 1px solid #d5e0ea;
  border-radius: 7px;
  background: #fff;
}

.school-exclusion-choice {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #344256;
  cursor: pointer;
}

.school-exclusion-choice:hover {
  border-color: #b9d6f2;
  background: #f5faff;
}

.school-exclusion-choice.active {
  border-color: #8ab9e8;
  background: #edf6ff;
  color: var(--brand);
}

.school-exclusion-choice input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--brand);
}

.school-score-body {
  display: grid;
  grid-template-columns: minmax(440px, 560px) minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
}

.school-score-controls {
  display: grid;
  grid-template-columns: minmax(170px, 1.4fr) repeat(2, minmax(110px, 0.8fr));
  gap: 12px;
  align-items: end;
}

.school-score-panel {
  border: 1px solid #8ab9e8;
  border-top: 4px solid var(--brand);
  background: #f4f9ff;
  box-shadow: 0 10px 24px rgba(0, 78, 162, 0.12);
}

.school-score-panel .panel-body {
  padding-block: 18px;
}

.school-score-field {
  width: 100%;
}

.school-score-field label,
.school-margin-field label {
  margin-bottom: 8px;
  color: var(--brand);
  font-size: 17px;
  font-weight: 800;
}

.school-score-field input,
.school-margin-field input {
  box-sizing: border-box;
  height: 58px;
  min-height: 58px;
  border: 2px solid #71a9dd;
  border-radius: 10px;
  background: #fff;
  color: #17385f;
}

.school-score-field input {
  font-size: 24px;
  font-weight: 800;
}

.school-margin-field input {
  font-size: 20px;
  font-weight: 750;
}

.school-rank-preview {
  min-width: 0;
  min-height: 78px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  border-left: 1px solid #bfd6eb;
}

.school-rank-preview > strong {
  color: #315170;
  font-size: 14px;
}

.school-rank-placeholder {
  color: #6d8197;
  font-size: 14px;
}

.school-rank-placeholder.loading {
  color: var(--brand);
}

.school-rank-placeholder.error {
  color: var(--red);
}

.school-rank-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.school-rank-list .rank-match-item {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 7px;
  padding: 6px 9px;
  line-height: 1.25;
}

.school-rank-list .rank-match-item b {
  grid-row: 1 / 3;
  align-self: center;
  white-space: nowrap;
}

.school-rank-list .rank-match-item span {
  white-space: nowrap;
}

.school-score-body > .primary {
  min-width: 180px;
  min-height: 52px;
}@media (max-width: 1100px) {
  .school-score-body {
    grid-template-columns: minmax(440px, 560px) minmax(0, 1fr);
  }

  .school-score-body > .primary {
    grid-column: 1 / -1;
    justify-self: end;
  }
}@media (max-width: 760px) {
  .school-score-body {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

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

  .school-score-field {
    grid-column: 1 / -1;
  }

  .school-rank-preview {
    border-top: 1px solid #bfd6eb;
    border-left: 0;
  }

  .school-rank-list {
    grid-template-columns: 1fr;
  }
}

.major-chip.recommended {
  box-shadow: inset 0 0 0 2px var(--brand);
}

.major-chip.recommended::after {
  content: "推荐";
  margin-left: 5px;
  color: var(--brand);
  font-size: 10px;
  font-weight: 700;
}

/* Full-site visual polish */
.profile-review,
.school-filter-panel,
.school-score-panel,
.candidate-panel {
  box-shadow: var(--shadow-soft);
}

.profile-review-head {
  padding: 12px 18px;
  background: linear-gradient(180deg, #fff, #fbfcfe);
}

.profile-review-head strong {
  color: #29384b;
  font-size: 16px;
}.profile-review-head span,
.profile-summary-tags span,
.major-bucket-head span,
.major-direction-chip-main span {
  font-size: 14px;
}

.profile-summary-tags span {
  padding: 5px 10px;
  background: #f6f8fb;
}

.summary-strip {
  gap: 14px;
}

.metric {
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow-soft);
}

.metric strong {
  font-size: 28px;
}

.metric span {
  font-size: 14px;
}

.rank-match-item {
  min-height: 34px;
  border-radius: 10px;
  font-size: 14px;
}

.major-fit-grid {
  gap: 14px;
}

.major-drag-note {
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid #dce7f0;
  border-radius: 12px;
  background: #f8fbfe;
  color: #667589;
  font-size: 14px;
}

.major-bucket {
  grid-template-columns: minmax(170px, 210px) minmax(0, 1fr);
  border-left-width: 3px;
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(44, 64, 88, 0.04);
}

.major-bucket-head {
  padding: 16px;
  background: #fbfcfd;
}

.major-bucket-head strong {
  color: #2d3a4d;
  font-size: 16px;
}

.major-direction-list {
  gap: 10px;
  padding: 14px;
}

.major-direction-chip {
  min-height: 40px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(44, 64, 88, 0.03);
}

.major-direction-chip-main {
  padding: 8px 12px;
}

.major-direction-chip-main strong {
  font-size: 14px;
}

.major-fit-empty {
  border-radius: 14px;
  background: #fbfcfe;
  font-size: 15px;
}

.candidate-toolbar {
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid #e4ebf2;
  border-radius: 14px;
  background: #fbfcfe;
}

.candidate-list {
  gap: 14px;
}

.candidate {
  border-left-width: 4px;
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.candidate:hover {
  border-color: #cbdbe8;
  box-shadow: var(--shadow-panel);
}

.candidate.favorite {
  box-shadow: inset 0 0 0 1px #d9c6f0, var(--shadow-soft);
}

.candidate-head {
  gap: 16px;
}

.group-index {
  border-radius: 10px;
  background: #f4f8fc;
}

.school-link,
.group-title {
  font-size: 18px;
}

.subline {
  font-size: 14px;
}

.school-tags span {
  min-height: 24px;
  font-size: 13px;
}

.candidate-actions {
  padding-top: 2px;
}

.drag-handle {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.adjust-toggle {
  min-height: 36px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 14px;
}

.adjust-toggle:hover {
  border-color: #dce7f0;
  background: #f8fbfe;
}

.adjustment-unavailable {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid #dce7f0;
  border-radius: 10px;
  background: #f8fbfe;
  color: #64748b;
  font-size: 13px;
  white-space: nowrap;
}

.candidate-sections {
  margin-top: 2px;
}

.candidate-section {
  padding: 14px 0;
}

.candidate-section strong {
  color: #344256;
  font-size: 15px;
}

.admission-list {
  gap: 8px;
}

.admission-item {
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 14px;
}

.major-chip {
  min-height: 34px;
  padding: 7px 11px;
  font-size: 14px;
}

.admin-login-layout {
  min-height: calc(100vh - 66px);
  align-content: center;
  justify-items: center;
  padding: 28px;
}

.admin-login-panel {
  width: min(520px, 100%);
}

.admin-login-body {
  display: grid;
  gap: 14px;
}

.admin-shell {
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 24px;
  max-width: 1640px;
  padding: 24px 28px 42px;
}

.admin-sidebar {
  top: 86px;
  height: calc(100vh - 110px);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
}

.admin-side-title {
  padding: 18px;
  background: linear-gradient(180deg, #fff, #fbfcfe);
}

.admin-side-title strong {
  color: #29384b;
  font-size: 18px;
}

.admin-side-title span {
  font-size: 14px;
}

.admin-nav {
  gap: 5px;
  padding: 12px;
}

.admin-nav button {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 14px;
}

.admin-nav button:hover {
  border-color: #dbe7f1;
  background: #f8fbfe;
}

.admin-nav button.active {
  border-color: #cde1f2;
  background: #f1f7fc;
}

.admin-nav-group {
  display: grid;
  gap: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid #edf1f5;
}

.admin-nav-group:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.admin-nav-label {
  padding: 7px 10px 3px;
  color: #8794a5;
  font-size: 12px;
  font-weight: 700;
}

.admin-main {
  gap: 18px;
}

.admin-page-title {
  min-height: 76px;
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: var(--shadow-soft);
}

.admin-page-title h2 {
  color: #29384b;
  font-size: 24px;
}

.admin-page-title p {
  font-size: 14px;
}

.admin-home-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.admin-home-sections {
  display: grid;
  gap: 14px;
}

.admin-home-section .panel-header {
  min-height: 52px;
  padding-block: 12px;
}

.admin-home-section .panel-body {
  padding-top: 14px;
}

.admin-home-card {
  min-height: 96px;
  gap: 8px;
  padding: 16px;
  border-radius: 14px;
  background: #fff;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.admin-home-card:hover {
  border-color: #cde1f2;
  background: #fbfdff;
  box-shadow: 0 10px 24px rgba(44, 64, 88, 0.07);
  transform: translateY(-1px);
}

.admin-home-card strong {
  color: #29384b;
  font-size: 17px;
}

.admin-home-card span,
.admin-home-card em {
  font-size: 14px;
}

.admin-dataset-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 9px;
  border: 1px solid #dfe8f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.admin-dataset-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 8px 12px;
  border-color: transparent;
  background: transparent;
  color: #536276;
}

.admin-dataset-tabs button:hover {
  border-color: #dbe7f1;
  background: #f8fbfe;
}

.admin-dataset-tabs button.active {
  border-color: #bcd6ee;
  background: #edf6fd;
  color: #075aa8;
  font-weight: 750;
}

.admin-dataset-tabs em {
  min-width: 24px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #eef2f6;
  color: #68778a;
  font-size: 12px;
  font-style: normal;
  text-align: center;
}

.admin-dataset-tabs button.active em {
  background: #dcecf9;
  color: #075aa8;
}

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

.template-card {
  gap: 12px;
  padding: 16px;
  border-radius: 14px;
  background: #fff;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.template-card:hover {
  border-color: #cde1f2;
  box-shadow: 0 10px 24px rgba(44, 64, 88, 0.06);
}

.template-card strong {
  color: #29384b;
  font-size: 16px;
}

.template-card p {
  color: #667589;
  font-size: 14px;
}

.template-card input[type="file"] {
  min-height: 44px;
  padding: 9px;
  background: #fbfcfe;
}

.template-actions {
  justify-content: flex-end;
}

.upload-result,
.upload-error-table,
.data-table-wrap {
  margin-top: 16px;
}

.admin-insert {
  border: 1px solid #dfe8f0;
  border-radius: 12px;
  background: #fbfcfe;
}

.admin-insert summary {
  padding: 12px 14px;
  color: #17589b;
  font-weight: 750;
  cursor: pointer;
}

.admin-insert-grid {
  padding: 4px 14px 14px;
}

.admin-insert .form-actions {
  padding: 0 14px 14px;
}

.table-wrap {
  border-color: #dfe8f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

table {
  font-size: 14px;
}

th,
td {
  padding: 10px 11px;
  border-bottom-color: #e8eef4;
}

th {
  background: #f6f8fb;
  color: #344256;
  font-size: 14px;
  font-weight: 750;
}

tbody tr:hover td {
  background: #fbfdff;
}

td input,
td select {
  min-width: 150px;
  min-height: 36px;
  padding: 7px 9px;
}

.admin-table-wrap table {
  min-width: 920px;
}

.admin-row-action {
  position: sticky;
  right: 0;
  width: 76px;
  min-width: 76px;
  text-align: center;
  background: #fff;
  box-shadow: -1px 0 0 #e8eef4;
}

th.admin-row-action {
  background: #f6f8fb;
}

.admin-empty-row {
  padding: 32px;
  color: #718096;
  text-align: center;
}

.field-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.form-actions {
  justify-content: flex-end;
}

.modal-backdrop {
  background: rgba(24, 35, 50, 0.38);
  backdrop-filter: blur(4px);
  z-index: 50;
}

.modal {
  max-width: 820px;
  width: min(820px, 100%);
  /* 高度上限：大屏不超 780px，小屏不超视口 90% */
  max-height: min(90vh, 780px);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  box-shadow: 0 22px 70px rgba(25, 40, 58, 0.28);
  overflow: hidden;
}

.modal.school-detail-modal {
  width: min(980px, 100%);
  max-width: 980px;
}

.modal.major-detail-modal {
  width: min(880px, 100%);
  max-width: 880px;
}

.school-detail-modal .modal-body {
  background: #f5f8fb;
}

.modal.admin-edit-modal {
  width: min(1080px, 100%);
  max-width: 1080px;
}

.admin-edit-grid {
  align-items: start;
}

.admin-edit-field-wide {
  grid-column: span 2;
}

.admin-edit-grid textarea {
  min-height: 104px;
  resize: vertical;
}

.modal-header {
  min-height: 68px;
  padding: 18px 20px;
  background: linear-gradient(180deg, #fff, #fbfcfe);
}

.modal-header h3 {
  color: #263445;
  font-size: 22px;
  line-height: 1.3;
}

.modal-header span {
  font-size: 14px;
}

.modal-body {
  padding: 20px;
  gap: 16px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}

.info-grid {
  gap: 12px;
}

.info-block {
  padding: 12px;
  border-radius: 12px;
  background: #fbfcfe;
}

.info-block strong {
  color: #344256;
  font-size: 14px;
}

.info-block p {
  color: #46566b;
  font-size: 14px;
  line-height: 1.65;
}

.score-bars {
  gap: 10px;
}

.bar {
  grid-template-columns: 100px 1fr 34px;
  font-size: 14px;
}

.bar-track {
  height: 9px;
}

.school-group-card {
  border-radius: 14px;
}

.modal-section-title strong {
  color: #29384b;
  font-size: 16px;
}

.modal-section-title span,
.direction-explain {
  font-size: 14px;
}

.direction-major-chip {
  min-height: 36px;
  font-size: 14px;
}

.toast {
  border-radius: 12px;
  background: #263445;
  font-size: 14px;
}@media (max-width: 1100px) {
  .candidate-history-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .plan-count-section {
    padding-top: 12px;
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    height: auto;
  }

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

  .admin-home-grid,
  .template-grid,
  .field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .profile-form-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-basic-section,
  .profile-ability-section,
  .profile-note-section {
    grid-column: 1 / -1;
  }

  .profile-career-section,
  .profile-plan-section {
    grid-column: span 1;
  }

  .profile-basic-section .question-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .profile-ability-section .academic-ability-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .direction-inline-grid {
    grid-template-columns: 1fr;
  }

}@media (max-width: 840px) {
  .subject-eligibility-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .subject-eligibility-metrics > div:nth-child(2) {
    border-right: 0;
  }

  .subject-eligibility-metrics > div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

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

  .school-fact:nth-last-child(-n + 3) {
    border-bottom: 1px solid #edf1f5;
  }

  .school-fact:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .profile-form-stack {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile-basic-section,
  .profile-ability-section,
  .profile-career-section,
  .profile-plan-section,
  .profile-note-section {
    grid-column: 1;
  }

  .profile-basic-section .question-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}@media (max-width: 720px) {
  .subject-eligibility-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .reference-section-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .reference-text-section.wide {
    grid-column: 1;
  }

  .reference-source {
    align-items: flex-start;
    flex-direction: column;
  }

  .school-detail-section-head,
  .school-groups-title {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .school-fact:nth-last-child(-n + 2) {
    border-bottom: 1px solid #edf1f5;
  }

  .school-fact:last-child {
    border-bottom: 0;
  }

  .school-strength-line {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .school-strength-line > strong {
    padding-top: 0;
  }

  .plan-count-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .topbar {
    height: auto;
    min-height: 64px;
    padding: 10px 14px;
  }

  .brand {
    font-size: 15px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .nav button {
    min-height: 34px;
    padding-inline: 10px;
  }

  .admin-shell,
  .admin-layout,
  .layout {
    padding: 14px;
  }

  .admin-page-title,
  .panel-header,
  .parent-page-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .panel-header > .status-row {
    justify-content: flex-start;
    width: 100%;
  }

  .admin-nav,
  .admin-home-grid,
  .template-grid,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .admin-edit-field-wide {
    grid-column: 1;
  }

  .journey-connector {
    display: none;
  }

  .parent-page-nav {
    grid-template-columns: 1fr;
  }

  .parent-page-nav::before {
    display: none;
  }

  .journey-step {
    min-height: 54px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .journey-step:last-child {
    border-bottom: 0;
  }

  .parent-page-heading {
    align-items: start;
  }

  .parent-page-heading h1 {
    font-size: 21px;
  }

  .parent-page-heading > .profile-heading-actions {
    justify-content: flex-start;
  }

  .profile-form-section {
    padding: 14px;
  }

  .multi-select-menu {
    min-width: 100%;
  }

  .profile-section-head {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 10px;
  }

  .section-number {
    width: 34px;
    height: 34px;
  }

  .section-icon {
    display: none;
  }

  .major-bucket {
    grid-template-columns: 1fr;
  }

  .major-analysis-workspace.detail-open {
    grid-template-columns: minmax(0, 1fr);
  }

  .major-analysis-workspace.detail-open .major-direction-inline-detail {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .major-bucket-head {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .question-grid,
  .major-fit-grid,
  .direction-inline-grid {
    grid-template-columns: 1fr;
  }

  .profile-ability-section .academic-ability-grid,
  .profile-ability-section .question-grid,
  .profile-basic-section .question-grid,
  .profile-career-section .question-grid,
  .profile-plan-section .question-grid {
    grid-template-columns: 1fr;
  }

  .page-actions.between,
  .profile-review-head {
    align-items: stretch;
    flex-direction: column;
  }

  .school-filter-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .school-exclusion-field {
    align-items: stretch;
    flex-direction: column;
  }

  .school-province-menu {
    width: 100%;
    grid-template-columns: repeat(2, minmax(90px, 1fr));
  }

  .school-score-body {
    align-items: stretch;
    flex-direction: column;
  }

  .school-score-field,
  .school-score-body > .primary {
    width: 100%;
  }

  .action-group {
    align-items: stretch;
    flex-direction: column;
  }

  .zero-recommendation-note {
    align-items: stretch;
    flex-direction: column;
  }

  .zero-recommendation-note > button {
    align-self: flex-start;
  }

  .profile-review-head > div {
    justify-content: space-between;
  }
}

/* ===== 规则管理页 ===== */
.rules-manager {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rules-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 16px;
  align-items: start;
}

.rules-sidebar {
  position: sticky;
  top: 100px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.rules-sidebar-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fff, #fbfcfe);
}

.rules-sidebar-title strong {
  color: #29384b;
  font-size: 15px;
}

.rules-sidebar-title span {
  font-size: 12px;
  color: var(--muted);
}

.rules-sidebar-actions {
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
}
.rules-add-btn {
  width: 100%;
  padding: 6px 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  background: transparent;
  color: var(--blue);
  font-size: 12px;
  cursor: pointer;
}
.rules-add-btn:hover {
  background: var(--blue-bg);
  border-style: solid;
}

.rules-add-condition-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  background: #fbfcfe;
  border-bottom: 1px solid var(--line);
}
.rules-add-condition-form input {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  font-size: 12px;
  background: #fff;
}
.rules-add-condition-form input:focus {
  outline: none;
  border-color: var(--blue);
}
.rules-add-condition-actions {
  display: flex;
  gap: 6px;
}
.rules-add-condition-actions button {
  flex: 1;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}
.rules-add-condition-actions button.primary {
  border: 1px solid var(--blue);
  background: var(--blue);
  color: #fff;
}
.rules-add-condition-actions button.primary:hover {
  filter: brightness(1.08);
}

.rules-nav-delete {
  display: none;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
}
.rules-nav button:hover .rules-nav-delete {
  display: flex;
}
.rules-nav-delete:hover {
  background: var(--red-bg);
  color: var(--red);
}

.rules-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px;
  max-height: calc(100vh - 220px);
  overflow-y: auto;
}

.rules-nav button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 9px 11px;
  font-size: 13px;
  text-align: left;
  color: var(--text);
  background: transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.rules-nav button:hover {
  background: var(--brand-soft);
  border-color: #dbe7f1;
}

.rules-nav button.active {
  background: var(--brand-weak);
  border-color: #cde1f2;
  color: var(--brand);
  font-weight: 600;
}

.rules-nav-count {
  flex-shrink: 0;
  min-width: 22px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  border-radius: 10px;
  background: var(--bg);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.rules-nav button.active .rules-nav-count {
  background: var(--brand);
  color: #fff;
}

.rules-detail {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rules-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.rules-detail-header h3 {
  color: #29384b;
  font-size: 18px;
  margin: 0 0 4px;
}

.rules-detail-header p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.rules-buckets {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rule-bucket {
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: var(--radius-card);
  padding: 14px 16px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.rule-bucket.bucket-recommend { border-left-color: var(--green); }
.rule-bucket.bucket-pending { border-left-color: var(--line); opacity: 0.85; }
.rule-bucket.bucket-caution { border-left-color: var(--blue); }
.rule-bucket.bucket-avoid { border-left-color: var(--yellow); }
.rule-bucket.bucket-exclude { border-left-color: var(--red); }

.rule-bucket-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  cursor: default;
}

.rule-bucket.bucket-recommend .rule-bucket-header {
  cursor: pointer;
  user-select: none;
}

.rule-bucket-title-area {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.rule-bucket-title {
  font-size: 14px;
  font-weight: 600;
  color: #29384b;
}

.rule-bucket-desc {
  font-size: 12px;
  color: var(--muted);
}

.rule-bucket-count {
  flex-shrink: 0;
  min-width: 28px;
  height: 22px;
  line-height: 22px;
  text-align: center;
  border-radius: 11px;
  background: var(--bg);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  padding: 0 8px;
}

.rule-bucket.bucket-recommend .rule-bucket-count { background: var(--green-bg); color: var(--green); }
.rule-bucket.bucket-caution .rule-bucket-count { background: var(--blue-bg); color: var(--blue); }
.rule-bucket.bucket-avoid .rule-bucket-count { background: var(--yellow-bg); color: var(--yellow); }
.rule-bucket.bucket-exclude .rule-bucket-count { background: var(--red-bg); color: var(--red); }

.rule-bucket-classes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 28px;
  align-items: center;
}

.rule-no-class {
  font-size: 12px;
  color: var(--muted-2);
}

.rule-class-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #d8e2ec;
  border-radius: 8px;
  padding: 4px 4px 4px 10px;
  background: var(--soft-card);
  font-size: 13px;
}

.rule-class-chip-name {
  color: var(--text);
}

.rule-class-chip-name em {
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
  margin-left: 4px;
}

.rule-class-chip button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.rule-class-chip button:hover {
  background: var(--red-bg);
  color: var(--red);
}
.rule-class-chip:hover .rule-class-chip-actions,
.rule-class-chip-actions:hover {
  display: inline-flex;
}
.rule-class-chip-actions .mini-move-btn {
  width: auto;
  height: auto;
  padding: 3px 10px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.rule-class-chip-actions .mini-move-btn:hover {
  filter: brightness(0.95);
  background: inherit;
  color: inherit;
}
.rule-class-chip-actions .mini-move-btn.bucket-caution {
  background: var(--blue-bg);
  color: var(--blue);
  border-color: #b6d2f5;
}
.rule-class-chip-actions .mini-move-btn.bucket-avoid {
  background: var(--yellow-bg);
  color: var(--yellow);
  border-color: #ecd9a0;
}
.rule-class-chip-actions .mini-move-btn.bucket-exclude {
  background: var(--red-bg);
  color: var(--red);
  border-color: #efbbbb;
}

.rules-library {
  margin-bottom: 16px;
  padding: 14px 16px;
  background: linear-gradient(180deg, var(--blue-bg) 0%, var(--soft-card) 100%);
  border: 1px solid var(--blue);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
}

.rules-library-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.rules-library-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: 0.5px;
}

.class-picker-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--blue);
  border-radius: 8px;
  background: #fff;
  color: var(--blue);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}
.class-picker-trigger:hover {
  background: var(--blue-bg);
}
.class-picker-trigger.open {
  background: var(--blue);
  color: #fff;
}
.class-picker-trigger-label {
  font-weight: 600;
}
.class-picker-count {
  padding: 1px 8px;
  border-radius: 10px;
  background: var(--blue-bg);
  color: var(--blue);
  font-size: 11px;
  font-weight: 600;
}
.class-picker-trigger.open .class-picker-count {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.rules-library-bucket {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  white-space: nowrap;
}
.rules-library-bucket-label {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.rules-library-bucket select {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
  color: var(--text);
  background: var(--panel);
  cursor: pointer;
}

.class-picker {
  margin-top: 12px;
}
.class-picker-panel {
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  overflow: hidden;
}
.class-picker-search {
  width: 100%;
  padding: 8px 12px;
  border: none;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  background: #fff;
}
.class-picker-search:focus {
  outline: none;
  border-bottom-color: var(--blue);
}
.class-picker-list {
  max-height: 320px;
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.class-picker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  user-select: none;
}
.class-picker-item:hover {
  background: var(--blue-bg);
}
.class-picker-item.checked {
  background: var(--blue-bg);
}
.class-picker-item input[type="checkbox"] {
  flex-shrink: 0;
  width: auto;
  min-height: 0;
  height: 16px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: none;
  cursor: pointer;
  accent-color: var(--blue);
}
.class-picker-item-name {
  flex: 1;
  font-weight: 500;
}
.class-picker-item em {
  flex-shrink: 0;
  font-style: normal;
  font-size: 11px;
  color: var(--muted-2);
}
.class-picker-empty {
  padding: 18px;
  text-align: center;
  font-size: 13px;
  color: var(--muted-2);
}

.rules-picked-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}
.rule-picked-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 6px 3px 10px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--blue);
  color: var(--blue);
  font-size: 12px;
  font-weight: 500;
}
.rule-picked-chip em {
  font-style: normal;
  font-size: 11px;
  color: var(--muted-2);
  font-weight: 400;
}
.rule-picked-chip button {
  border: none;
  background: transparent;
  color: var(--blue);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  border-radius: 50%;
}
.rule-picked-chip button:hover {
  background: var(--blue);
  color: #fff;
}

.rules-empty {
  color: var(--muted);
  font-size: 14px;
  padding: 24px;
  text-align: center;
}@media (max-width: 900px) {
  .rules-layout {
    grid-template-columns: 1fr;
  }

  .rules-sidebar {
    position: static;
  }

  .rules-nav {
    max-height: 240px;
  }

  .rules-library-head {
    flex-direction: column;
    align-items: stretch;
  }
  .rules-library-bucket {
    margin-left: 0;
  }
}

/* 专业库浏览页 */
.catalog-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.catalog-title-block h1 { margin: 0 0 4px; font-size: 24px; }
.catalog-title-block p { margin: 0; color: #66788f; font-size: 13px; }
.catalog-search-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.catalog-search-row input {
  width: 300px;
  padding: 8px 12px;
  border: 1px solid #d4dce8;
  border-radius: 8px;
  font-size: 13px;
}
.catalog-search-row input:focus { outline: 2px solid rgba(30, 100, 190, 0.25); border-color: var(--brand); }
.catalog-total { color: #66788f; font-size: 13px; }

.catalog-layout { display: flex; gap: 14px; align-items: flex-start; }
.catalog-side {
  width: 150px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #fff;
  border: 1px solid #e3e9f2;
  border-radius: 10px;
  padding: 12px 10px;
  position: sticky;
  top: 64px;
}
.catalog-side > strong { font-size: 13px; margin-bottom: 6px; }
.catalog-cat {
  text-align: left;
  padding: 7px 10px;
  border: 0;
  background: transparent;
  border-radius: 7px;
  font-size: 13px;
  color: #344256;
  cursor: pointer;
}
.catalog-cat:hover { background: #eef3fa; }
.catalog-cat.active { background: #e3edfb; color: var(--brand); font-weight: 700; }

.catalog-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.catalog-group { background: #fff; border: 1px solid #e3e9f2; border-radius: 10px; padding: 12px 14px; }
.catalog-group-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.catalog-group-head strong { font-size: 15px; }
.catalog-group-head span { color: #8a97a8; font-size: 12px; }
.catalog-major-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.catalog-major-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 9px 12px;
  border: 1px solid #e3e9f2;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  color: #344256;
  cursor: pointer;
  text-align: left;
}
.catalog-major-item:hover { border-color: var(--brand); color: var(--brand); }
.catalog-major-item em { color: #b6c1cf; font-style: normal; }@media (max-width: 900px) {
  .catalog-layout { flex-direction: column; }
  .catalog-side { width: 100%; position: static; flex-direction: row; flex-wrap: wrap; }
  .catalog-major-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.rules-view-tabs button {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid #d9d9d9;
  border-radius: 8px 8px 0 0;
  background: #f5f5f5;
  cursor: pointer;
  font-size: 13px;
}
.rules-view-tabs button.active {
  background: #fff;
  border-bottom-color: #fff;
  font-weight: 600;
}
.catalog-group {
  margin-bottom: 28px;
  padding: 16px 20px;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  background: #fff;
}
.catalog-group h3 {
  margin: 0 0 6px;
  font-size: 15px;
}
.catalog-desc {
  margin: 0 0 12px;
  font-size: 12px;
  color: #888;
}
.catalog-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.catalog-table th,
.catalog-table td {
  border-bottom: 1px solid #f0f0f0;
  padding: 6px 10px;
  text-align: left;
}
.catalog-table select {
  padding: 4px 8px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-size: 12px;
}

/* ---------- 目录表：固定列宽，防挤压 ---------- */
.catalog-table {
  table-layout: fixed;
}
.catalog-table col.c-code { width: 70px; }
.catalog-table col.c-name { width: 150px; }
.catalog-table col.c-first { width: 150px; }
.reselect-opts {
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.reselect-opt {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  cursor: pointer;
  font-size: 13px;
}
.reselect-opt input[type="checkbox"] {
  width: 15px;
  height: 15px;
  margin: 0;
  cursor: pointer;
}

/* ---------- 目录表：固定列宽，防挤压 ---------- */
.catalog-table {
  table-layout: fixed;
}
.catalog-table col.c-code { width: 70px; }
.catalog-table col.c-name { width: 150px; }
.catalog-table col.c-first { width: 150px; }
.reselect-opts {
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.reselect-opt {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  cursor: pointer;
  font-size: 13px;
}
.reselect-opt input[type="checkbox"] {
  width: 15px;
  height: 15px;
  margin: 0;
  cursor: pointer;
}

/* ---------- 再选科目多选下拉 ---------- */
.reselect-dropdown {
  position: relative;
  display: inline-block;
}
.reselect-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 110px;
  padding: 5px 10px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
}
.reselect-toggle .caret {
  font-size: 10px;
  color: #888;
}
.reselect-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 130px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  padding: 6px 10px;
  z-index: 60;
}
.reselect-dropdown.open .reselect-menu {
  display: block;
}
.reselect-menu .reselect-opt {
  padding: 5px 2px;
}

/* ---------- 再选科目多选下拉 ---------- */
.reselect-dropdown {
  position: relative;
  display: inline-block;
}
.reselect-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 110px;
  padding: 5px 10px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
}
.reselect-toggle .caret {
  font-size: 10px;
  color: #888;
}
.reselect-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 130px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  padding: 6px 10px;
  z-index: 60;
}
.reselect-dropdown.open .reselect-menu {
  display: block;
}
.reselect-menu .reselect-opt {
  padding: 5px 2px;
  display: flex;      /* 菜单内竖排：一行一个选项 */
  align-items: center;
}

/* 目录表：拉开列间距 */
.catalog-table td,
.catalog-table th {
  padding: 10px 18px;
}
.catalog-table col.c-first { width: 210px; }
.catalog-table .reselect-toggle { min-width: 130px; }

/* 目录表：拉开列间距 */
.catalog-table td,
.catalog-table th {
  padding: 10px 18px;
}
.catalog-table col.c-first { width: 210px; }
.catalog-table .reselect-toggle { min-width: 130px; }


/* ---------- 规则侧栏：固定入口 ---------- */
.rules-fixed-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 10px;
  margin-top: 12px;
}
.rules-fixed-nav button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  cursor: pointer;
  font-size: 13px;
  color: #1e3a5f;
}
.rules-fixed-nav button.active {
  background: #1e3a5f;
  color: #fff;
  border-color: #1e3a5f;
}
.rules-fixed-nav button.active .rules-nav-count {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}
.rules-view-tabs { display: none; }

/* ---------- 选科适合度：四选区 ---------- */
.fitness-zone {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: 18px;
  background: #fff;
  overflow: hidden;
}
.fitness-zone-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #eef2f7;
  font-size: 14px;
}
.fitness-zone-count {
  font-size: 12px;
  color: #64748b;
}
.fitness-zone-body {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 16px;
  min-height: 52px;
}
.fitness-chip {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  background: #f8fafc;
  font-size: 13px;
  cursor: grab;
}
.fitness-chip:active { cursor: grabbing; }
.fitness-chip.dragging { opacity: 0.4; }
.fitness-empty { font-size: 12px; color: #94a3b8; }
.fitness-zone { transition: background 0.15s; }

/* 条件规则：推荐桶的移动按钮悬停才显示（93 类 × 3 按钮常驻太乱） */
.rule-class-chip .rule-class-chip-actions {
  visibility: hidden;
  transition: opacity 0.12s;
}
.rule-class-chip:hover .rule-class-chip-actions,
.rule-class-chip:focus-within .rule-class-chip-actions {
  visibility: visible;
}

/* 条件规则：推荐桶的移动按钮悬停才显示（93 类 × 3 按钮常驻太乱） */
.rule-class-chip .rule-class-chip-actions {
  visibility: hidden;
  transition: opacity 0.12s;
}
.rule-class-chip:hover .rule-class-chip-actions,
.rule-class-chip:focus-within .rule-class-chip-actions {
  visibility: visible;
}

/* ---------- 条件规则：桶样式与选科适合度选区统一 ---------- */
.rule-bucket {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  margin-bottom: 18px;
  overflow: hidden;
}
.rule-bucket-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #eef2f7;
}
.rule-bucket-title {
  font-size: 14px;
  font-weight: 600;
  color: #1e3a5f;
}
.rule-bucket-desc {
  display: block;
  font-size: 12px;
  color: #64748b;
  font-weight: 400;
  margin-top: 2px;
}
.rule-bucket-count {
  font-size: 12px;
  color: #64748b;
}
.rule-bucket-classes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 16px;
}
.rule-class-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  background: #f8fafc;
  font-size: 13px;
}
.rule-class-chip-name em {
  font-style: normal;
  color: #94a3b8;
  margin-left: 4px;
  font-size: 12px;
}
.rule-class-chip-actions {
  display: inline-flex;
  gap: 4px;
}
.mini-move-btn {
  padding: 2px 8px;
  border: 1px solid #d9d9d9;
  border-radius: 10px;
  background: #fff;
  font-size: 11px;
  cursor: pointer;
}
.rule-no-class {
  font-size: 12px;
  color: #94a3b8;
}

/* ---------- 条件规则：桶样式与选科适合度选区统一 ---------- */
.rule-bucket {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  margin-bottom: 18px;
  overflow: hidden;
}
.rule-bucket-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #eef2f7;
}
.rule-bucket-title {
  font-size: 14px;
  font-weight: 600;
  color: #1e3a5f;
}
.rule-bucket-desc {
  display: block;
  font-size: 12px;
  color: #64748b;
  font-weight: 400;
  margin-top: 2px;
}
.rule-bucket-count {
  font-size: 12px;
  color: #64748b;
}
.rule-bucket-classes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 16px;
}
.rule-class-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  background: #f8fafc;
  font-size: 13px;
}
.rule-class-chip-name em {
  font-style: normal;
  color: #94a3b8;
  margin-left: 4px;
  font-size: 12px;
}
.rule-class-chip-actions {
  display: inline-flex;
  gap: 4px;
}
.mini-move-btn {
  padding: 2px 8px;
  border: 1px solid #d9d9d9;
  border-radius: 10px;
  background: #fff;
  font-size: 11px;
  cursor: pointer;
}
.rule-no-class {
  font-size: 12px;
  color: #94a3b8;
}

/* ---------- 条件列表：与固定入口同款卡片风格 ---------- */
.rules-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 10px 12px;
}
.rules-nav button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  cursor: pointer;
  font-size: 13px;
  color: #1e3a5f;
  text-align: left;
}
.rules-nav button:hover {
  border-color: #94a3b8;
}
.rules-nav button.active {
  background: #1e3a5f;
  color: #fff;
  border-color: #1e3a5f;
}
.rules-nav button.active .rules-nav-count {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}
.rules-nav .rules-nav-delete {
  border: none;
  background: none;
  color: #94a3b8;
  font-size: 14px;
  cursor: pointer;
  padding: 0 2px;
}
.rules-nav button.active .rules-nav-delete {
  color: rgba(255, 255, 255, 0.7);
}

/* ---------- 条件列表：与固定入口同款卡片风格 ---------- */
.rules-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 10px 12px;
}
.rules-nav button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  cursor: pointer;
  font-size: 13px;
  color: #1e3a5f;
  text-align: left;
}
.rules-nav button:hover {
  border-color: #94a3b8;
}
.rules-nav button.active {
  background: #1e3a5f;
  color: #fff;
  border-color: #1e3a5f;
}
.rules-nav button.active .rules-nav-count {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}
.rules-nav .rules-nav-delete {
  border: none;
  background: none;
  color: #94a3b8;
  font-size: 14px;
  cursor: pointer;
  padding: 0 2px;
}
.rules-nav button.active .rules-nav-delete {
  color: rgba(255, 255, 255, 0.7);
}

/* 推荐桶的删除按钮：红色提示 */
.rule-class-chip-actions[title^="删除"] {
  color: #dc2626;
  font-weight: 600;
  border: none;
  background: none;
  font-size: 14px;
  padding: 0 2px;
}

/* 推荐桶的删除按钮：红色提示 */
.rule-class-chip-actions[title^="删除"] {
  color: #dc2626;
  font-weight: 600;
  border: none;
  background: none;
  font-size: 14px;
  padding: 0 2px;
}

/* 条件规则：× 右上角红色小叉（悬停显示），删除=回归待分配 */
.rule-class-chip.has-x { position: relative; }
.rule-chip-x {
  border: none;
  background: none;
  color: #94a3b8;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}
.rule-chip-x:hover {
  color: #dc2626;
}

/* 选科适合度：chip 右上角 ×（删除=回归默认值得考虑） */
.fitness-chip {
  position: relative;
}
.fitness-chip-x {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 16px;
  height: 16px;
  display: none;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: #dc2626;
  color: #fff;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.fitness-chip:hover .fitness-chip-x,
.fitness-chip:focus-within .fitness-chip-x {
  display: flex;
}
.fitness-chip-x:hover {
  background: #b91c1c;
}

/* 管理端大表：搜索框与分页控件 */
.admin-table-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
}
.admin-table-toolbar input[type="search"] {
  flex: 1;
  max-width: 420px;
  padding: 7px 10px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-size: 13px;
}
.admin-table-pager {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0;
  flex-wrap: wrap;
}
.admin-table-pager button {
  padding: 5px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
}
.admin-table-pager button:disabled {
  color: #b6c2cf;
  cursor: not-allowed;
  background: #f5f7f9;
}
.admin-pager-info {
  font-size: 13px;
  color: #5b6b7c;
}

/* 受限专业不参与命中时的说明条 */
.restricted-note {
  margin: 12px 0;
  padding: 10px 14px;
  border: 1px solid #f0c36d;
  border-left: 4px solid #e8a33d;
  border-radius: 6px;
  background: #fff8e8;
  color: #7a5410;
  font-size: 13px;
  line-height: 1.6;
}

/* 修复 hidden 属性被显式 display 覆盖导致的过滤失效（全局兜底） */
[hidden] {
  display: none !important;
}

.class-picker-count-note {
  display: block;
  font-size: 12px;
  color: #667085;
  margin: 4px 0 0;
}

/* 规则库分组按钮：统一间距与视觉（此前无专属样式，间距依赖浏览器默认不均） */
.rules-nav {
  gap: 6px !important;
}

.rules-nav .rules-cond-group-btn {
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #e3e8ef;
  border-radius: 8px;
  background: #f7f9fc;
  cursor: pointer;
  text-align: left;
}

.rules-nav .rules-cond-group-btn:hover {
  border-color: #b9c6da;
  background: #eef2f8;
}

.rules-nav .rules-cond-group-btn.active {
  border-color: transparent;
}

/* 规则库列表与上方"新增条件"区块拉开距离 */
.rules-nav {
  padding-top: 10px !important;
}

/* 规则库列表与上方"新增条件"区块拉开距离 */
.rules-nav {
  padding-top: 10px !important;
}
