/* ============================================================
   Performance pages — 招生绩效预览 & 绩效方案设置
   复用全局设计令牌（base.css），仅做精致化增强，不覆盖其他页面。
   ============================================================ */

/* ---------- 页面头部 Hero ---------- */
.perf-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 20px;
  padding: 26px 26px 24px;
}

.perf-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 100% 0%, var(--primary-glow) 0%, transparent 42%),
    radial-gradient(circle at 0% 120%, rgba(234, 88, 12, 0.08) 0%, transparent 40%);
}

.perf-hero-head {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.perf-hero .panel-actions form {
  margin: 0;
}

.perf-hero-title {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.perf-hero-title h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
}

.perf-hero-title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
}

.perf-hero-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: var(--radius-md);
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 8px 18px var(--primary-glow);
}

.perf-hero-icon svg {
  width: 22px;
  height: 22px;
}

.perf-hero-meta {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.perf-hero-meta .toolbar {
  margin-bottom: 0;
}

.perf-hero-meta .pill {
  min-height: 28px;
}

/* 状态徽章配色：草稿/已发布/已锁定 */
.perf-status {
  font-weight: 800;
}

.perf-status.is-draft {
  color: light-dark(#a16207, #fde68a);
  background: light-dark(#fef3c7, rgba(217, 119, 6, 0.18));
  border-color: light-dark(rgba(217, 119, 6, 0.28), rgba(251, 191, 36, 0.28));
}

.perf-status.is-published {
  color: light-dark(#047857, #86efac);
  background: light-dark(#d1fae5, rgba(22, 163, 74, 0.16));
  border-color: light-dark(rgba(16, 185, 129, 0.28), rgba(52, 211, 153, 0.28));
}

.perf-status.is-locked {
  color: var(--muted);
  background: light-dark(#f1f5f9, rgba(148, 163, 184, 0.14));
  border-color: var(--line);
}

.perf-notice {
  position: relative;
}

/* ---------- 预览页统计卡片 ---------- */
.perf-stats {
  position: relative;
  margin-top: 20px;
}

.perf-detail-hero-head {
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.perf-detail-hero-actions {
  justify-content: flex-end;
}

.perf-detail-hero-actions .toolbar {
  margin: 0;
}

.perf-detail-stats {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 14px;
  margin-top: 20px;
}

.perf-detail-stats > .perf-stat {
  width: 180px;
  flex: 0 0 180px;
}

.perf-stat {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 90px;
  padding: 0 18px 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: var(--backdrop-blur);
  transition: var(--transition);
}

.perf-stat:hover {
  transform: translateY(-4px);
  border-color: light-dark(rgba(99, 102, 241, 0.25), rgba(255, 255, 255, 0.15));
  box-shadow: 0 12px 22px -8px var(--shadow-color), 0 4px 12px -2px var(--shadow-color);
}

.perf-stat-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 6px 12px var(--primary-glow);
}

.perf-stat-icon.tone-green {
  background: linear-gradient(135deg, var(--green), #059669);
  box-shadow: 0 6px 12px rgba(16, 185, 129, 0.22);
}

.perf-stat-icon.tone-accent {
  background: linear-gradient(135deg, var(--accent), #c2410c);
  box-shadow: 0 6px 12px rgba(234, 88, 12, 0.22);
}

.perf-stat-icon.tone-rose {
  background: linear-gradient(135deg, var(--rose), #be123c);
  box-shadow: 0 6px 12px rgba(244, 63, 94, 0.22);
}

.perf-stat-icon svg {
  width: 20px;
  height: 20px;
}

.perf-stat-body span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.perf-stat-body strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.perf-stat-body em {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
}

/* ---------- 设置页：步骤化分区 ---------- */
.perf-step {
  position: relative;
}

.perf-step-title {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.perf-step-title > div {
  min-width: 0;
}

.perf-step-title h2 {
  margin: 0;
  font-size: 17px;
}

.perf-step-title span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.55;
}

.perf-step-badge {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 4px 10px var(--primary-glow);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  font-weight: 800;
}

/* 只读规则说明卡 */
.perf-rule-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 4px;
}

.perf-rule-card {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: light-dark(rgba(15, 23, 42, 0.02), rgba(255, 255, 255, 0.02));
}

.perf-rule-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.perf-rule-card strong {
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.5;
}

.perf-callout {
  display: flex;
  gap: 12px;
  margin: 16px 0 0;
  padding: 14px 16px;
  border: 1px solid light-dark(rgba(124, 58, 237, 0.18), rgba(129, 140, 248, 0.22));
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-sm);
  background: light-dark(rgba(124, 58, 237, 0.04), rgba(129, 140, 248, 0.08));
  color: var(--ink);
  font-size: 13px;
  line-height: 1.65;
}

.perf-callout svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  color: var(--primary);
}

.perf-callout strong {
  font-weight: 800;
}

/* ---------- 设置页：通用规则与继承式例外 ---------- */
.perf-generic-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.perf-generic-panel {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: light-dark(rgba(248, 250, 252, 0.64), rgba(15, 23, 42, 0.2));
}

.perf-generic-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.perf-generic-heading strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.perf-generic-heading span {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
}

.perf-generic-input-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

.perf-generic-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 142px;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 38px;
}

.perf-generic-input > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.perf-generic-input > div {
  position: relative;
}

.perf-generic-input input {
  width: 100%;
  min-height: 37px;
  padding-right: 42px;
  font-weight: 750;
}

.perf-generic-input em {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}

.perf-effective-rate-wrap {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.perf-effective-rate-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

.perf-effective-rate-table th,
.perf-effective-rate-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  font-size: 12px;
}

.perf-effective-rate-table thead th {
  color: var(--muted);
  background: light-dark(rgba(248, 250, 252, 0.84), rgba(15, 23, 42, 0.42));
  font-weight: 750;
}

.perf-effective-rate-table tbody th {
  color: var(--ink);
  text-align: left;
  font-weight: 800;
}

.perf-effective-rate-table td {
  color: var(--primary);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
}

.perf-effective-rate-table tbody tr:last-child th,
.perf-effective-rate-table tbody tr:last-child td {
  border-bottom: 0;
}

.perf-school-rule-list {
  display: grid;
  gap: 16px;
  margin-top: 14px;
}

.perf-school-rule-block {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: light-dark(rgba(248, 250, 252, 0.48), rgba(15, 23, 42, 0.16));
}

.perf-school-rule-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: light-dark(rgba(255, 255, 255, 0.6), rgba(15, 23, 42, 0.28));
}

.perf-school-rule-head span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: .06em;
}

.perf-school-rule-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
}

.perf-school-rule-actions {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 10px;
  flex-wrap: wrap;
}

.perf-school-rule-actions > strong {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--accent);
  background: light-dark(rgba(99, 102, 241, .1), rgba(129, 140, 248, .18));
  font-size: 11px;
  font-weight: 800;
}

.perf-school-channel-row {
  display: grid;
  grid-template-columns: 174px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: light-dark(rgba(248, 250, 252, 0.52), rgba(15, 23, 42, 0.2));
}

.perf-school-channel-row .perf-field-label {
  line-height: 1.55;
}

.perf-school-channel-row .perf-field-label em {
  display: block;
  color: var(--muted);
  font-size: 10.5px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.perf-school-channel-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  min-width: 620px;
}

.perf-override-control {
  display: grid;
  grid-template-columns: minmax(88px, 1fr) 76px;
  grid-template-areas:
    "label label"
    "mode value";
  gap: 6px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: light-dark(#fff, rgba(255, 255, 255, 0.025));
}

.perf-override-control > span {
  grid-area: label;
  color: var(--ink);
  font-size: 11px;
  font-weight: 750;
}

.perf-override-control select {
  grid-area: mode;
}

.perf-override-control input {
  grid-area: value;
}

.perf-override-control select,
.perf-override-control input {
  width: 100%;
  min-width: 0;
  min-height: 32px;
  padding: 0 7px;
  font-size: 11px;
}

.perf-project-rule-scroll {
  margin: 0;
}

.perf-project-rule-table {
  width: 100%;
  min-width: 1320px;
  border-collapse: collapse;
}

.perf-project-rule-table th,
.perf-project-rule-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  text-align: left;
}

.perf-project-rule-table thead th {
  color: var(--muted);
  background: light-dark(rgba(248, 250, 252, 0.88), rgba(15, 23, 42, 0.32));
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.perf-project-rule-table tbody tr:last-child td {
  border-bottom: 0;
}

.perf-project-rule-table td:nth-child(1) {
  width: 52px;
}

.perf-project-rule-table td:nth-child(2) {
  min-width: 130px;
  color: var(--ink);
  font-size: 12.5px;
}

.perf-project-rule-table .perf-project-avatar {
  width: 30px;
  height: 30px;
  padding: 2px;
  border-radius: 9px;
  font-size: 10px;
  line-height: 1;
}

.perf-reward-input {
  width: 106px;
  min-height: 33px;
  text-align: right;
}

.perf-table-check {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.perf-table-check input {
  width: 15px;
  min-height: 15px;
  padding: 0;
  accent-color: var(--primary);
}

.perf-override-control.is-compact {
  grid-template-columns: 100px 56px;
  grid-template-areas: "mode value";
  width: 164px;
  padding: 0;
  border: 0;
  background: transparent;
}

.perf-override-control.is-compact select,
.perf-override-control.is-compact input {
  min-height: 32px;
  font-size: 11px;
}

/* ---------- 设置页：项目规则卡片 ---------- */
.perf-project-list {
  display: grid;
  gap: 14px;
}

.perf-school-block .perf-project-list {
  overflow: visible;
  padding-bottom: 0;
}

.perf-school-list {
  display: grid;
  gap: 22px;
}

.perf-school-block {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: light-dark(rgba(248, 250, 252, 0.62), rgba(15, 23, 42, 0.16));
}

.perf-school-block-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 0 2px 14px;
}

.perf-school-block-head span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
}

.perf-school-block-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
}

.perf-school-block-head > strong {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--accent);
  background: light-dark(rgba(99, 102, 241, .1), rgba(129, 140, 248, .18));
  font-size: 12px;
  font-weight: 800;
}

.perf-school-block-actions {
  display: flex;
  align-items: center;
  justify-content: end;
  gap: 10px;
  flex-wrap: wrap;
}

.perf-project-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: light-dark(rgba(255, 255, 255, 0.5), rgba(15, 23, 42, 0.2));
  transition: var(--transition-fast);
}

.perf-major-row {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: light-dark(rgba(255, 255, 255, 0.5), rgba(15, 23, 42, 0.2));
  transition: var(--transition-fast);
}

.perf-major-row:hover {
  border-color: light-dark(rgba(99, 102, 241, 0.28), rgba(255, 255, 255, 0.14));
}

.perf-major-inline {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(280px, 1.4fr);
  align-items: stretch;
  gap: 12px;
  min-width: 0;
  padding: 14px 16px;
}

.perf-major-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
}

.perf-major-summary::-webkit-details-marker {
  display: none;
}

.perf-major-row[open] .perf-major-summary {
  border-bottom: 1px solid var(--line);
  background: light-dark(#f8fafc, rgba(15, 23, 42, 0.4));
}

.perf-inline-field {
  display: grid;
  align-content: start;
  gap: 7px;
  width: auto;
}

.perf-special-field {
  width: auto;
  grid-template-columns: auto 110px auto;
  align-items: center;
}

.perf-special-field .perf-field-label {
  grid-column: 1;
}

.perf-special-field input[type="number"] {
  grid-column: 2;
}

.perf-special-field .perf-check {
  grid-column: 3;
}

.perf-special-field input[type="number"] {
  width: 100%;
}

.perf-channel-section {
  display: grid;
  gap: 10px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--line);
  background: light-dark(rgba(248, 250, 252, 0.52), rgba(15, 23, 42, 0.18));
}

.perf-project-card:hover {
  border-color: light-dark(rgba(99, 102, 241, 0.28), rgba(255, 255, 255, 0.14));
}

.perf-project-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 16px 18px;
  background: light-dark(#f8fafc, rgba(15, 23, 42, 0.4));
  border-bottom: 1px solid var(--line);
}

.perf-project-id {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.perf-project-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 3px;
  flex: 0 0 40px;
  border-radius: var(--radius-md);
  color: #fff;
  background: linear-gradient(135deg, #64748b, #475569);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
  overflow-wrap: anywhere;
  text-align: center;
}

.perf-project-avatar.is-masters {
  background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.perf-project-avatar.is-doctoral {
  background: linear-gradient(135deg, #7c3aed, #db2777);
}

.perf-project-avatar.is-joint {
  background: linear-gradient(135deg, #d97706, #f59e0b);
}

.perf-project-avatar.is-postdoctoral {
  background: linear-gradient(135deg, #0f766e, #14b8a6);
}

.perf-project-name strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.3;
}

.perf-project-name span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.perf-project-prices {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.perf-price-chip {
  display: grid;
  gap: 2px;
  min-width: 96px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: light-dark(#fff, rgba(255, 255, 255, 0.02));
  text-align: right;
}

.perf-price-chip span {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.perf-price-chip strong {
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 800;
}

.perf-price-chip.is-redline strong {
  color: var(--accent);
}

.perf-project-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  padding: 18px;
}

.perf-field {
  display: grid;
  gap: 8px;
  align-content: start;
}

.perf-field-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.perf-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: light-dark(#fff, rgba(15, 23, 42, 0.4));
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
}

.perf-check:hover {
  border-color: var(--primary);
  background: light-dark(rgba(99, 102, 241, 0.03), rgba(255, 255, 255, 0.03));
}

.perf-check input {
  width: 16px;
  min-height: 16px;
  padding: 0;
  accent-color: var(--primary);
}

.perf-check input:disabled {
  accent-color: var(--muted);
}

.perf-field input[type="number"] {
  width: 100%;
}

.perf-field-note {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.4;
}

/* 渠道提成 */
.perf-channel-field {
  grid-column: 1 / -1;
}

.perf-channel-grid2 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.perf-channel-control {
  display: grid;
  grid-template-columns: minmax(96px, 1fr) minmax(84px, 0.9fr);
  grid-template-areas:
    "label label"
    "mode value";
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: light-dark(#fff, rgba(255, 255, 255, 0.02));
  transition: var(--transition-fast);
  min-width: 0;
  flex: none;
}

.perf-channel-control:hover {
  border-color: light-dark(rgba(99, 102, 241, 0.3), rgba(255, 255, 255, 0.14));
}

.perf-channel-control label {
  grid-area: label;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
}

.perf-channel-control select {
  grid-area: mode;
}

.perf-channel-control input {
  grid-area: value;
}

.perf-channel-control select,
.perf-channel-control input {
  min-width: 0;
  min-height: 34px;
  padding: 0 10px;
  font-size: 13px;
}

.perf-empty {
  padding: 36px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  color: var(--muted);
  text-align: center;
  font-weight: 600;
  font-size: 14px;
}

/* ---------- 阶梯奖与团奖 ---------- */
.perf-factor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px 20px;
  margin-top: 4px;
}

.perf-tier-table th,
.perf-tier-table td {
  vertical-align: middle;
}

.perf-tier-table input {
  width: 100%;
  min-width: 110px;
  text-align: right;
}

.perf-tier-table .perf-tier-group-a {
  background: light-dark(rgba(124, 58, 237, 0.03), rgba(129, 140, 248, 0.05));
}

.perf-tier-divider {
  width: 1px;
}

/* ---------- 预览页操作条 ---------- */
.perf-actionbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.perf-actionbar-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}

.perf-actionbar-hint svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
}

.perf-actionbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ---------- 预览页表格增强 ---------- */
.perf-table td strong {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
}

.perf-table .perf-order-performance {
  color: light-dark(#c2410c, #fdba74);
  font-weight: 800;
  background: light-dark(#fff7ed, rgba(194, 65, 12, 0.14));
}

.perf-detail-summary-row td {
  font-weight: 800;
  background: light-dark(#f8fafc, rgba(148, 163, 184, 0.12));
  border-top: 2px solid var(--line);
}

.perf-consultant-name {
  font-weight: 800;
  color: var(--ink);
}

a.perf-consultant-name {
  text-decoration: none;
}

a.perf-consultant-name:hover {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.perf-factor-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.perf-factor-pill.is-full {
  color: light-dark(#047857, #86efac);
  background: light-dark(#d1fae5, rgba(22, 163, 74, 0.16));
}

.perf-factor-pill.is-cut {
  color: light-dark(#a16207, #fde68a);
  background: light-dark(#fef3c7, rgba(217, 119, 6, 0.18));
}

.perf-factor-pill.is-zero {
  color: light-dark(#b91c1c, #fca5a5);
  background: light-dark(#fee2e2, rgba(220, 38, 38, 0.16));
}

.perf-row-total td {
  background: light-dark(rgba(124, 58, 237, 0.04), rgba(129, 140, 248, 0.07));
}

.perf-exception-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.perf-exception-pill.has-items {
  color: light-dark(#b91c1c, #fca5a5);
  background: light-dark(#fee2e2, rgba(220, 38, 38, 0.16));
}

.perf-exception-pill.is-clear {
  color: light-dark(#047857, #86efac);
  background: light-dark(#d1fae5, rgba(22, 163, 74, 0.16));
}

/* ---------- 底部固定保存条 ---------- */
.perf-savebar {
  position: sticky;
  bottom: 16px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 4px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: 0 12px 30px -12px var(--shadow-color), 0 2px 8px var(--shadow-color);
  backdrop-filter: var(--backdrop-blur);
}

.perf-savebar-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}

.perf-savebar-note svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
}

.perf-savebar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.perf-savebar .primary-btn {
  min-height: 42px;
  padding: 0 22px;
  font-size: 14px;
}

/* 已锁定/已发布时的提示 */
.perf-locked-hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid light-dark(rgba(217, 119, 6, 0.28), rgba(251, 191, 36, 0.28));
  border-radius: var(--radius-sm);
  background: light-dark(#fef3c7, rgba(217, 119, 6, 0.14));
  color: light-dark(#a16207, #fde68a);
  font-size: 12.5px;
  font-weight: 700;
}

.perf-locked-hint svg {
  width: 16px;
  height: 16px;
}

/* ---------- 方案版本历史 ---------- */
.perf-history-panel,
.perf-detail-panel {
  margin-bottom: 20px;
}

.perf-history-table th,
.perf-history-table td {
  vertical-align: middle;
}

.perf-version-note {
  min-width: 180px;
  max-width: 360px;
  color: var(--muted);
}

.perf-history-actions,
.perf-inline-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.perf-history-actions {
  flex-wrap: wrap;
}

.perf-history-actions .ghost-btn,
.perf-history-actions .danger-btn {
  min-height: 34px;
  padding: 0 12px;
  font-size: 12px;
}

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

.perf-detail-grid > div,
.perf-detail-tier-grid > div {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: light-dark(rgba(248, 250, 252, 0.62), rgba(15, 23, 42, 0.2));
}

.perf-detail-grid span,
.perf-detail-tier-grid span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.perf-detail-grid strong,
.perf-detail-tier-grid strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.perf-detail-grid .perf-detail-note {
  grid-column: 1 / -1;
}

.perf-channel-summary {
  min-width: 280px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

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

.perf-table .perf-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  cursor: pointer;
  white-space: nowrap;
}

.perf-table .perf-sort-btn:hover,
.perf-table .perf-sort-btn:focus-visible {
  color: var(--primary, #2563eb);
  outline: none;
}

.perf-table textarea {
  min-width: 180px;
  resize: vertical;
}

/* ---------- 响应式 ---------- */
@media (max-width: 720px) {
  .perf-hero {
    padding: 20px 18px;
  }

  .perf-detail-hero-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .perf-hero-title h2 {
    font-size: 19px;
  }

  .perf-project-body {
    grid-template-columns: 1fr;
  }

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

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

  .perf-school-block {
    padding: 12px;
  }

  .perf-channel-control {
    grid-template-columns: minmax(96px, 1fr) minmax(78px, 0.8fr);
  }

  .perf-generic-layout {
    grid-template-columns: 1fr;
  }

  .perf-school-rule-head,
  .perf-school-channel-row {
    align-items: flex-start;
    grid-template-columns: 1fr;
  }

  .perf-school-rule-head {
    flex-direction: column;
  }

  .perf-school-rule-actions {
    justify-content: start;
  }

  .perf-savebar {
    flex-direction: column;
    align-items: stretch;
  }

  .perf-savebar-actions {
    justify-content: stretch;
  }

  .perf-savebar-actions .primary-btn {
    flex: 1;
  }

  .perf-detail-grid,
  .perf-detail-tier-grid {
    grid-template-columns: 1fr;
  }

  .perf-version-note,
  .perf-channel-summary {
    min-width: 180px;
  }
}
