/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --ink: #17202a;
  --muted: #667085;
  --line: #d9dee7;
  --brand: #0f766e;
  --brand-strong: #0b5f59;
  --accent: #b42318;
  --sidebar: #182230;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
}

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
}

.admin-sidebar {
  background: var(--sidebar);
  color: #eef2f6;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.admin-brand-mark {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  background: #fdb022;
  color: #111827;
  font-size: 13px;
}

.admin-nav {
  margin-top: 28px;
  flex: 1;
}

.admin-sidebar-footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.admin-sidebar-footer form {
  margin: 0;
}

.admin-logout-button {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  background: transparent;
  color: #cdd5df;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.admin-logout-button:hover {
  border-color: rgba(255, 255, 255, 0.4);
  color: #ffffff;
}

.admin-login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.18), transparent 34%),
    var(--bg);
}

.admin-login-card {
  width: min(100%, 420px);
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 20px 48px rgba(24, 34, 48, 0.12);
}

.admin-login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-login-brand div {
  display: grid;
  gap: 2px;
}

.admin-login-brand span:last-child,
.admin-login-heading span {
  color: var(--muted);
  font-size: 13px;
}

.admin-login-heading {
  margin: 32px 0 24px;
}

.admin-login-heading p {
  margin: 0 0 6px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.admin-login-heading h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

.admin-login-form {
  display: grid;
  gap: 18px;
}

.admin-login-form .field {
  display: grid;
  gap: 7px;
}

.admin-login-form label {
  font-size: 13px;
  font-weight: 700;
}

.admin-login-form .field-input {
  width: 100%;
}

.admin-login-submit {
  width: 100%;
  min-height: 42px;
  justify-content: center;
  cursor: pointer;
}

@media (max-width: 520px) {
  .admin-login-card {
    padding: 28px 22px;
  }
}

.admin-nav-link {
  display: block;
  padding: 10px 12px;
  border-radius: 6px;
  color: #cdd5df;
  text-decoration: none;
  font-size: 14px;
}

.admin-nav-link.active {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.admin-main {
  min-width: 0;
  padding: 28px;
}

.admin-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.admin-kicker {
  margin: 0 0 4px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
}

.admin-header h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}

.admin-stat {
  min-width: 132px;
  display: grid;
  gap: 2px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  text-align: right;
}

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

.admin-stat strong {
  font-size: 26px;
}

.filter-panel,
.result-table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.filter-panel {
  padding: 16px;
  margin-bottom: 18px;
}

.college-name-search-field .select-control {
  min-width: 220px;
}

.notice-error {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #fecdca;
  border-radius: 6px;
  background: #fffbfa;
  color: var(--accent);
  font-size: 13px;
}

.notice-success {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #abefc6;
  border-radius: 6px;
  background: #ecfdf3;
  color: #067647;
  font-size: 13px;
}

.college-year-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 4px solid #98a2b3;
  border-radius: 6px;
  background: #ffffff;
}

.college-year-status > div {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.college-year-status span,
.college-year-status small {
  color: var(--muted);
  font-size: 12px;
}

.college-year-status.status-processing {
  border-left-color: #f79009;
  background: #fffcf5;
}

.college-year-status.status-reviewing {
  border-left-color: #2e90fa;
  background: #eff8ff;
}

.college-year-status.status-completed {
  border-left-color: #12b76a;
  background: #ecfdf3;
}

.college-year-status.status-failed {
  border-left-color: #f04438;
  background: #fffbfa;
}

.college-year-status.status-not_admitting {
  border-left-color: #667085;
  background: #f9fafb;
}

.college-year-status .field-select {
  min-width: 120px;
}

.year-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid #d0d5dd;
  border-radius: 999px;
  background: #f9fafb;
  color: #475467;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.year-status-badge.status-processing {
  border-color: #fedf89;
  background: #fffaeb;
  color: #b54708;
}

.year-status-badge.status-reviewing {
  border-color: #b2ddff;
  background: #eff8ff;
  color: #175cd3;
}

.year-status-badge.status-completed {
  border-color: #abefc6;
  background: #ecfdf3;
  color: #067647;
}

.year-status-badge.status-partial,
.year-status-badge.status-pending,
.year-status-badge.status-queued {
  border-color: #fedf89;
  background: #fffaeb;
  color: #b54708;
}

.year-status-badge.status-empty {
  border-color: #d0d5dd;
  background: #f9fafb;
  color: #475467;
}

.year-status-badge.status-failed {
  border-color: #fecdca;
  background: #fffbfa;
  color: #b42318;
}

.year-status-badge.status-not_admitting {
  border-color: #d0d5dd;
  background: #f2f4f7;
  color: #344054;
}

.filter-form {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) minmax(220px, 1.5fr) minmax(160px, 1fr) minmax(120px, 0.7fr) auto;
  gap: 12px;
  align-items: end;
}

.field {
  display: grid;
  gap: 6px;
}

.field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.select-control {
  width: 100%;
  height: 40px;
  padding: 0 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

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

.primary-button,
.secondary-button {
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 6px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.primary-button {
  border: 1px solid var(--brand-strong);
  background: var(--brand);
  color: #ffffff;
}

.secondary-button {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
}

.primary-button.small,
.secondary-button.small {
  height: 32px;
  padding: 0 10px;
  font-size: 13px;
}

.result-table-wrap {
  overflow: hidden;
}

.import-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.import-row-actions form {
  display: inline;
  margin: 0;
}

.import-row-invalid td {
  background: #fff8f6;
}

.result-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.result-table th,
.result-table td {
  padding: 13px 14px;
  border-bottom: 1px solid #edf0f4;
  text-align: left;
  vertical-align: top;
}

.result-table th {
  background: #f8fafc;
  color: #475467;
  font-size: 12px;
  font-weight: 700;
}

.result-table tr:last-child td {
  border-bottom: 0;
}

.result-table strong {
  display: block;
  margin-bottom: 3px;
}

.muted {
  color: var(--muted);
}

.table-link {
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
}

.table-title-link,
.breadcrumb-link {
  color: var(--ink);
  text-decoration: none;
}

.table-title-link:hover,
.breadcrumb-link:hover {
  color: var(--brand);
}

.header-subtitle {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.header-subtitle span::before {
  content: "/";
  margin-right: 8px;
  color: #98a2b3;
}

.college-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.college-summary-card {
  position: relative;
  min-width: 0;
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.manual-review-summary-card {
  padding-left: 16px;
  border-color: #f6c36a;
  border-left: 4px solid #d97706;
  background: #fff7ed;
}

.manual-review-summary-card::after {
  content: "人工审核";
  justify-self: start;
  width: fit-content;
  padding: 2px 6px;
  border: 1px solid #fed7aa;
  border-radius: 4px;
  background: #ffedd5;
  color: #9a3412;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.college-summary .manual-review-summary-card span {
  color: #9a3412;
}

.college-summary .manual-review-summary-card strong {
  color: #7c2d12;
}

.college-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.college-summary strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}

.detail-filter-form {
  display: grid;
  grid-template-columns: minmax(140px, 160px) minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.detail-grid {
  display: grid;
  gap: 18px;
}

.college-workspace-nav {
  position: sticky;
  z-index: 20;
  top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 14px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 4px 12px rgba(16, 24, 40, 0.08);
}

.college-workspace-nav span {
  padding: 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.college-workspace-nav button {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 7px 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.college-workspace-nav button small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.college-workspace-nav button:hover {
  background: #f2f4f7;
  color: var(--brand);
}

.college-workspace-nav button.is-active {
  background: var(--brand);
  color: #fff;
}

.college-workspace-nav button.is-active small {
  color: rgba(255, 255, 255, 0.78);
}

.college-workspace-panel[hidden] {
  display: none;
}

.article-type-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.article-type-tab {
  padding: 8px 14px;
  border-radius: 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.article-type-tab:hover {
  background: #f2f4f7;
  color: var(--brand);
}

.article-type-tab.is-active {
  background: var(--brand);
  color: #fff;
}

.article-filter-form {
  display: grid;
  grid-template-columns: minmax(150px, 190px) minmax(300px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.article-import-section {
  margin-bottom: 14px;
}

.article-url-form {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 16px 18px 10px;
}

.article-import-hint {
  margin: 0;
  padding: 0 18px 16px;
  color: var(--muted);
  font-size: 12px;
}

.article-confirm-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 16px;
  padding: 20px;
}

.article-confirm-title,
.article-recognition-preview,
.article-confirm-actions {
  grid-column: 1 / -1;
}

.article-recognition-preview {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f9fafb;
}

.article-recognition-preview p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.article-confirm-actions {
  display: flex;
  gap: 10px;
}

.article-list-table {
  min-width: 1040px;
}

.article-list-table td small,
.article-date-cell small,
.article-title-cell small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.article-date-cell {
  min-width: 120px;
}

.article-title-cell {
  min-width: 280px;
  max-width: 480px;
}

.article-date-missing,
.article-image-warning,
.article-image-ok,
.article-visibility-on,
.article-visibility-off {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 3px 7px;
  border: 1px solid;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.article-date-missing {
  border-color: #f2d394;
  background: #fffaeb;
  color: #93370d;
}

.article-image-warning {
  border-color: #fda29b;
  background: #fff1f0;
  color: #b42318;
}

.article-image-ok,
.article-visibility-on {
  border-color: #a6f4c5;
  background: #ecfdf3;
  color: #067647;
}

.article-visibility-off {
  border-color: #d0d5dd;
  background: #f8fafc;
  color: #475467;
}

.article-header-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.article-visibility-form,
.article-link-form {
  margin: 0;
}

.article-actions-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.article-link-form {
  display: grid;
  grid-template-columns: minmax(220px, 360px) 160px;
  gap: 12px 16px;
  align-items: end;
}

.article-link-choices {
  display: flex;
  gap: 16px;
  grid-column: 1 / -1;
}

.article-link-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.article-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 16px 0 4px;
  color: var(--muted);
  font-size: 13px;
}

.article-detail-content {
  max-width: 920px;
  margin: 0 auto;
  padding: 24px;
}

.article-detail-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 14px auto;
}

.article-image-issue-box {
  border-color: #fda29b;
  background: #fff7f6;
}

@media (max-width: 800px) {
  .article-filter-form,
  .article-url-form,
  .article-confirm-form {
    grid-template-columns: 1fr;
  }

  .article-confirm-title,
  .article-recognition-preview,
  .article-confirm-actions {
    grid-column: auto;
  }

  .article-type-tabs {
    overflow-x: auto;
  }

  .article-type-tab {
    white-space: nowrap;
  }
}

.detail-section {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  overflow: hidden;
}

.collapsible-data-section {
  scroll-margin-top: 64px;
}

.collapsible-data-section.is-collapsed > :not(.section-heading) {
  display: none;
}

.collapsible-data-section.is-collapsed > .section-heading > :not(h2):not(span):not(.section-collapse-button) {
  display: none;
}

.collapsible-data-section.is-collapsed > .section-heading {
  border-bottom: 0;
}

.section-collapse-button {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #ffffff;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.section-collapse-button:hover {
  border-color: #98a2b3;
  color: var(--ink);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid #edf0f4;
  background: #f8fafc;
}

.section-heading h2 {
  margin: 0;
  font-size: 16px;
}

.section-heading span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.section-heading span strong {
  color: var(--ink);
  font-size: 15px;
}

.batch-filter-form {
  grid-template-columns: minmax(140px, 180px) minmax(240px, 1fr) auto;
}

.batch-panel {
  margin-bottom: 18px;
}

.batch-toolbar {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid #edf0f4;
}

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

.batch-summary {
  padding: 12px 16px;
  border-bottom: 1px solid #edf0f4;
  color: var(--muted);
  font-size: 13px;
}

.batch-log-row td {
  padding-top: 0;
  background: #fcfcfd;
}

.batch-log-row summary {
  cursor: pointer;
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
}

.batch-log {
  max-height: 340px;
  overflow: auto;
  margin: 10px 0 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #101828;
  color: #f2f4f7;
  white-space: pre-wrap;
  font-size: 12px;
  line-height: 1.55;
}

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

.compact-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.compact-table th,
.compact-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #edf0f4;
  text-align: left;
  vertical-align: top;
}

.compact-table th {
  color: #475467;
  font-size: 12px;
  font-weight: 700;
}

.compact-table .action-col {
  width: 132px;
  min-width: 132px;
  white-space: nowrap;
}

.compact-table .action-col .table-link {
  display: block;
  width: max-content;
  white-space: nowrap;
}

.compact-table .action-col .table-link + .table-link {
  margin-top: 6px;
}

.compact-table .action-col form {
  margin: 6px 0 0;
}

.specialty-analysis-table {
  min-width: 1040px;
}

.specialty-analysis-table th:nth-child(1) {
  width: 180px;
}

.specialty-analysis-table th:nth-child(3),
.specialty-analysis-table th:nth-child(4),
.specialty-analysis-table th:nth-child(5) {
  width: 150px;
}

.specialty-analysis-table th:nth-child(6) {
  width: 92px;
}

.analysis-school-cell .table-link,
.specialty-analysis-table td > strong {
  display: block;
  margin-bottom: 4px;
}

.analysis-meta-line {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.analysis-chip-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.analysis-detail-cell {
  white-space: nowrap;
}

.analysis-row-details {
  position: relative;
}

.analysis-row-details summary {
  color: var(--accent);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  list-style: none;
}

.analysis-row-details summary::-webkit-details-marker {
  display: none;
}

.analysis-row-details[open] summary {
  margin-bottom: 10px;
}

.analysis-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
  min-width: 560px;
  white-space: normal;
}

.analysis-detail-grid section {
  border: 1px solid #edf0f4;
  border-radius: 8px;
  padding: 10px 12px;
  background: #f9fafb;
}

.analysis-detail-grid h3 {
  margin: 0 0 8px;
  color: #475467;
  font-size: 12px;
}

.analysis-detail-grid p {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
}

.analysis-detail-grid p + p {
  margin-top: 6px;
}

.danger-link {
  color: #b42318;
}

.requirement-condition-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 8px;
}

.inline-edit-link {
  white-space: nowrap;
}

.missing-condition-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 6px;
}

.missing-condition-actions form {
  margin: 0;
}

.coverage-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
  margin: 12px 0 18px;
}

.coverage-checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  font-size: 13px;
}

.coverage-checkbox-item span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.quality-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  padding: 0 0 14px;
}

.quality-metric-card {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fcfcfd;
}

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

.quality-metric-card strong {
  color: #101828;
  font-size: 22px;
}

.quality-warning-box {
  display: grid;
  gap: 3px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid #fedf89;
  border-left: 4px solid #f79009;
  border-radius: 6px;
  background: #fffaeb;
  color: #93370d;
}

.quality-warning-box strong {
  color: #93370d;
}

.quality-warning-box span {
  color: #b54708;
  font-size: 13px;
}

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

.field-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.advanced-sync-panel {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fcfcfd;
}

.advanced-sync-panel summary {
  cursor: pointer;
  color: #344054;
  font-weight: 700;
}

.coverage-filter-form {
  margin-bottom: 10px;
}

.coverage-status-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.coverage-status-summary span {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fcfcfd;
  color: var(--muted);
  font-size: 12px;
}

.coverage-status-summary strong {
  color: #101828;
}

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

.inline-sync-form {
  display: inline;
}

.button-link {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
}

.drag-handle-col { width: 32px; min-width: 32px; }
.drag-handle-cell { text-align: center; vertical-align: middle; padding: 0 !important; }
.drag-handle {
  cursor: grab;
  color: #9ca3af;
  font-size: 16px;
  user-select: none;
  display: inline-block;
}
.drag-handle:active { cursor: grabbing; }
tr.plan-draggable.dragging { opacity: 0.4; }
tr.plan-draggable.drag-over { border-top: 2px solid #2563eb; }

.document-list {
  display: grid;
}

.document-item {
  border-bottom: 1px solid #edf0f4;
}

.document-item:last-child {
  border-bottom: 0;
}

.document-item summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  cursor: pointer;
  font-weight: 700;
}

.document-item summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.document-item > p,
.document-content {
  padding: 0 16px 16px;
}

.document-content {
  max-height: 520px;
  overflow: auto;
  color: #344054;
  line-height: 1.65;
  font-size: 14px;
}

.document-content img {
  max-width: 100%;
  height: auto !important;
}

.document-content table {
  max-width: 100%;
  border-collapse: collapse;
}

.document-content td,
.document-content th {
  border: 1px solid #d0d5dd;
  padding: 6px 8px;
}

.merged-candidate-row td {
  padding-top: 7px;
  padding-bottom: 7px;
  background: #f8fafc;
  border-bottom-color: #e4e7ec;
}

.merged-candidate-row td:first-child {
  padding-left: 30px;
}

.merged-candidate-name {
  margin-right: 8px;
  font-weight: 700;
}

.merged-candidate-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  margin-right: 8px;
  border-radius: 999px;
  background: #eef4ff;
  color: #3538cd;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.merged-candidate-row small,
.merge-status {
  color: var(--muted);
}

.over-year-list {
  display: grid;
}

.over-year-item {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid #edf0f4;
}

.over-year-item:last-child {
  border-bottom: 0;
}

.over-year-item > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
}

.over-year-item > div span {
  color: var(--muted);
}

.over-year-item ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.over-year-item li {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #475467;
  font-size: 13px;
}

.empty-inline {
  padding: 24px 16px;
  color: var(--muted);
  text-align: center;
}

.empty-state {
  display: grid;
  gap: 4px;
  padding: 42px 20px;
  text-align: center;
}

.empty-state span {
  color: var(--muted);
}

@media (max-width: 900px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    padding: 14px 16px;
  }

  .admin-nav {
    margin-top: 12px;
  }

  .admin-main {
    padding: 18px;
  }

  .admin-header {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-stat {
    text-align: left;
  }

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

  .detail-filter-form,
  .college-summary {
    grid-template-columns: 1fr;
  }

  .filter-actions {
    justify-content: stretch;
  }

  .primary-button,
  .secondary-button {
    flex: 1;
  }

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

  .result-table {
    min-width: 760px;
  }
}

/* ---- 录取名单匹配标记 ---- */
.unmatched-row {
  opacity: 0.6;
}

.plan-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.plan-badge.matched {
  background: #d1f0e0;
  color: #0f766e;
}

.plan-badge.unmatched {
  background: #fef0c7;
  color: #b45309;
}

.plan-badge.over {
  background: #fde8e8;
  color: #b42318;
}

.plan-badge.winter-badge {
  background: #dbeafe;
  color: #1e40af;
}

.plan-badge.restriction-badge {
  background: #fce7f3;
  color: #9d174d;
}

/* ---- 批次标签 ---- */
.batch-tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}

.batch-tag.batch-first {
  background: #dbeafe;
  color: #1d4ed8;
}

.batch-tag.batch-second {
  background: #fef3c7;
  color: #92400e;
}

.batch-tag.batch-none {
  color: #9ca3af;
}

/* ---- 招生计划对比表 ---- */
.plan-compare-table .num-col {
  width: 78px;
  text-align: right;
  white-space: nowrap;
}

.plan-admit-pair {
  display: inline-grid;
  grid-template-columns: minmax(20px, auto) 8px minmax(20px, auto);
  align-items: baseline;
  justify-content: end;
  min-height: 22px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.plan-admit-pair.pair-over {
  padding: 1px 4px;
  margin: -2px -4px;
  border: 1px solid #fedf89;
  border-radius: 4px;
  background: #fffaeb;
}

.pair-planned {
  color: #175cd3;
}

.pair-divider {
  color: #98a2b3;
  font-weight: 500;
  text-align: center;
}

.pair-admitted {
  color: #067647;
}

.pair-over .pair-planned,
.pair-over .pair-divider,
.pair-over .pair-admitted {
  color: #b54708;
}

.pair-total {
  font-size: 14px;
}

.plan-distribution {
  display: block;
  margin-top: 4px;
  color: #667085;
  line-height: 1.45;
}

.sport-data-groups {
  display: grid;
  gap: 16px;
}

.comparison-program-section {
  display: grid;
  gap: 8px;
}

.comparison-program-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 2px solid #d0d5dd;
  background: #f8fafc;
}

.comparison-program-heading h3 {
  margin: 0;
  font-size: 15px;
}

.comparison-season-heading {
  padding: 2px 12px 0;
}

.comparison-season-badge {
  padding: 2px 7px;
  border: 1px solid #b2ccff;
  border-radius: 4px;
  background: #eff4ff;
  color: #175cd3;
  font-size: 12px;
  font-weight: 700;
}

.comparison-program-groups {
  display: grid;
  gap: 8px;
}

.guide-plan-major-heading {
  margin: 16px 0 8px;
  padding: 8px 12px;
  background: var(--bg);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
}

.sport-data-group {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
}

.sport-data-group summary {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 12px;
  cursor: pointer;
  color: var(--ink);
}

.sport-data-group summary:hover {
  background: #f8fafc;
}

.sport-data-group summary.summary-filled {
  border-left: 4px solid #17b26a;
  background: #ecfdf3;
  color: #067647;
}

.sport-data-group summary.summary-filled:hover {
  background: #dcfae6;
}

.sport-data-group summary.summary-filled span {
  color: #067647;
}

.sport-data-group summary.summary-over {
  border-left: 4px solid #f79009;
  background: #fffaeb;
  color: #b54708;
}

.sport-data-group summary.summary-over:hover {
  background: #fef0c7;
}

.sport-data-group summary.summary-over span {
  color: #b54708;
}

.sport-data-group summary strong {
  font-size: 14px;
}

.sport-data-group summary span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.sport-data-group-content {
  border-top: 1px solid var(--line);
}

.sport-data-group-content .compact-table {
  margin: 0;
}

.diff-cell {
  font-weight: 700;
}

.diff-plus {
  color: #b42318;
}

.diff-minus {
  color: #0f766e;
}

.status-ok { }

.status-warn {
  background: #fffaeb;
}

.status-info {
  background: #f0fdf4;
}

.status-empty {
  background: #fffbeb;
  opacity: 0.8;
}

/* ---- 运动项目字典 ---- */
.sport-dict-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.sport-dict-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 20px;
}

.sport-dict-title {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 12px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--brand);
  color: var(--ink);
}

.sport-group {
  margin-bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

.sport-group:last-child {
  margin-bottom: 0;
}

.sport-group-name {
  font-size: 13px;
  font-weight: 700;
  color: #475467;
  min-width: 48px;
}

.sport-group-subs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.sport-sub-tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 6px;
  background: #f0f9ff;
  color: #0369a1;
  font-size: 12px;
  white-space: nowrap;
}

.sport-sub-empty {
  color: #9ca3af;
  font-size: 12px;
}

/* ---- 项目名称编辑 ---- */
.editable-name {
  position: relative;
}

.editable-name:hover .edit-trigger {
  opacity: 1;
}

.edit-trigger {
  opacity: 0;
  transition: opacity 0.15s;
  margin-left: 2px;
  vertical-align: middle;
}

.editable-form {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.edit-title-input {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  border: none;
  border-bottom: 2px solid var(--brand);
  background: transparent;
  padding: 0 4px;
  width: 120px;
  outline: none;
}

.edit-tag-input {
  font-size: 12px;
  border: 1px solid var(--brand);
  border-radius: 6px;
  padding: 2px 6px;
  width: 80px;
  outline: none;
}

/* ---- 性别不限标签 ---- */
.gender-unlimited {
  color: #9ca3af;
  font-size: 12px;
  font-style: italic;
}

/* ---- 招生计划编辑 ---- */
.plan-edit-panel {
  padding: 12px 16px;
  margin: 0 0 12px 0;
  background: #f9fafb;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.manual-plan-panel {
  margin: 0 0 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
}

.guide-plan-text-prefill {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.guide-plan-text-prefill-heading {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.guide-plan-text-prefill-heading small {
  color: var(--muted);
}

.guide-plan-text-prefill-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.guide-plan-text-prefill-input {
  min-height: 72px;
  resize: vertical;
}

.manual-plan-prefill-result {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: baseline;
  padding: 8px 10px;
  border-left: 3px solid #1570ef;
  background: #eff8ff;
  color: #1849a9;
}

.manual-plan-prefill-result small {
  width: 100%;
  color: #b54708;
}

.plan-prefill-task-list {
  display: grid;
  gap: 8px;
}

.plan-prefill-task-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.plan-prefill-task-heading small {
  color: var(--muted);
}

.plan-prefill-task-heading span {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}

.plan-prefill-task {
  display: grid;
  gap: 5px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 6px;
  background: #ffffff;
}

.plan-prefill-task p {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
}

.plan-prefill-task small {
  color: var(--muted);
}

.plan-prefill-task-status {
  width: fit-content;
  padding: 2px 7px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #475467;
  font-size: 12px;
  font-weight: 700;
}

.plan-prefill-task.status-processing,
.plan-prefill-task.status-pending {
  border-left-color: #f79009;
}

.plan-prefill-task.status-succeeded {
  border-left-color: #12b76a;
}

.plan-prefill-task.status-failed {
  border-left-color: #d92d20;
  background: #fffbfa;
}

.plan-prefill-task .task-error {
  color: #b42318;
  font-weight: 700;
}

.plan-prefill-task .task-warning {
  color: #b54708;
}

.manual-plan-form {
  display: grid;
  gap: 14px;
}

.manual-plan-section {
  display: grid;
  gap: 9px;
}

.manual-plan-section h3 {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
}

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

.manual-plan-grid.score-grid {
  grid-template-columns: repeat(5, minmax(130px, 1fr));
}

.requirement-mode-field {
  max-width: 260px;
}

.manual-gender-requirements {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 10px;
}

.manual-gender-requirement {
  min-width: 0;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
}

.manual-gender-requirement legend {
  padding: 0 5px;
  font-size: 12px;
  font-weight: 700;
}

.manual-quota-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 220px));
  gap: 10px;
}

.manual-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.manual-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.manual-plan-grid .field-input,
.manual-plan-grid .field-select,
.manual-plan-description {
  width: 100%;
  box-sizing: border-box;
}

.manual-sport-picker {
  position: relative;
}

.manual-search-select {
  position: relative;
}

.manual-search-select .manual-sport-root-filter {
  height: 32px;
  padding-right: 34px;
  background: white;
}

.manual-search-select-toggle {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 32px;
  height: 30px;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0 5px 5px 0;
  background: #f8fafc;
  cursor: pointer;
}

.manual-search-select-toggle::after {
  content: "";
  position: absolute;
  top: 11px;
  left: 11px;
  width: 7px;
  height: 7px;
  border-right: 2px solid #667085;
  border-bottom: 2px solid #667085;
  transform: rotate(45deg);
}

.manual-search-select-options {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  max-height: 240px;
  overflow-y: auto;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  box-shadow: 0 8px 20px rgba(16, 24, 40, 0.14);
}

.manual-search-select-option {
  display: block;
  width: 100%;
  padding: 7px 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.manual-search-select-option:hover,
.manual-search-select-option[aria-selected="true"] {
  background: #eef4ff;
  color: #175cd3;
}

.manual-search-select-empty {
  display: block;
  padding: 8px;
  color: var(--muted);
  font-size: 12px;
}

.manual-sport-root-native {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.manual-plan-description {
  min-height: 58px;
  resize: vertical;
}

.manual-subdivide-field {
  grid-column: span 2;
}

.manual-checkbox-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(90px, 1fr));
  gap: 5px 10px;
  min-height: 112px;
  max-height: 220px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
}

.manual-checkbox-list.is-disabled {
  min-height: 38px;
  background: #f3f4f6;
}

.manual-checkbox-list label {
  display: flex;
  gap: 5px;
  align-items: center;
  font-size: 12px;
}

.manual-eligibility-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 8px;
  max-height: 460px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
}

.manual-eligibility-list.is-disabled {
  background: #f3f4f6;
}

.eligibility-event-group {
  min-width: 0;
  padding: 7px;
  border: 1px solid #e4e7ec;
  border-radius: 6px;
  background: #f9fafb;
}

.eligibility-event-heading {
  display: grid;
  gap: 2px;
  margin-bottom: 5px;
  padding-bottom: 5px;
  border-bottom: 1px solid #e4e7ec;
}

.eligibility-event-heading strong {
  font-size: 12px;
}

.eligibility-event-heading small {
  color: var(--muted);
  font-size: 10px;
}

.eligibility-item {
  display: grid;
  grid-template-columns: minmax(70px, 1fr) auto auto;
  gap: 7px;
  align-items: center;
  padding: 5px 6px;
  border-bottom: 1px solid #eef0f3;
  font-size: 12px;
}

.eligibility-item small {
  grid-column: 1 / -1;
  grid-row: 2;
  color: var(--muted);
  font-size: 11px;
}

.eligibility-child-item {
  padding-left: 14px;
}

.eligibility-item label {
  display: flex;
  align-items: center;
  gap: 3px;
}

@media (max-width: 1100px) {
  .guide-plan-text-prefill-form {
    grid-template-columns: 1fr;
  }

  .manual-plan-grid,
  .manual-plan-grid.score-grid,
  .manual-quota-grid,
  .manual-eligibility-list {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }
}

.plan-form {
  width: 100%;
}

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

.plan-input {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  min-width: 80px;
  flex: 1 1 100px;
}

.plan-input-num {
  max-width: 70px;
  min-width: 60px;
  flex: 0 0 auto;
}

.plan-input-sm {
  max-width: 60px;
  min-width: 50px;
  flex: 0 0 auto;
}

.inline-admin-form {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-left: 8px;
}

.inline-admin-form .field-input {
  width: 96px;
  min-width: 96px;
}

.plan-select {
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  background: white;
  flex: 0 0 auto;
}

.plan-edit-row.hidden {
  display: none;
}

.plan-edit-row td {
  padding: 8px 12px;
  background: #f9fafb;
}

.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  padding: 2px 5px;
  color: var(--muted);
  border-radius: 4px;
}

.icon-btn:hover {
  background: #edf0f4;
  color: var(--ink);
}

.icon-danger:hover {
  background: #fde8e8;
  color: #b42318;
}

.candidate-delete-form {
  display: inline;
}

.level-stat {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  white-space: nowrap;
}

.editing {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
}

.hidden {
  display: none;
}

.small {
  font-size: 12px;
  padding: 4px 12px;
}

/* ---- 录取名单编辑 ---- */
.candidate-form {
  width: 100%;
}

.candidate-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: flex-end;
}

.candidate-score-row {
  margin-top: 10px;
  flex-wrap: nowrap;
}

.candidate-score-row .cand-field {
  flex: 0 0 auto;
}

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

.candidate-batch-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 0;
}

.candidate-batch-toolbar .field-select {
  min-width: 190px;
}

.selection-column {
  width: 34px;
  text-align: center;
}

.cand-field {
  display: flex;
  flex-direction: column;
  font-size: 11px;
  font-weight: 700;
  color: #667085;
  gap: 3px;
}

.field-input {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 13px;
  min-width: 70px;
}

.field-input.field-sm {
  max-width: 72px;
  min-width: 60px;
}

.field-select {
  padding: 5px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 13px;
  background: white;
  min-width: 60px;
}

.field-select.field-wide {
  min-width: 100px;
}

/* ---- 招生简章富文本编辑器 ---- */
.guide-editor {
  margin-top: 8px;
}

.guide-actions {
  display: flex;
  gap: 8px;
  padding: 0 16px 12px;
}

.guide-rich-editor {
  padding: 0 16px 16px;
}

.guide-title-input {
  width: 100%;
  margin-bottom: 10px;
}

.guide-quill-editor {
  min-height: 480px;
  font-size: 14px;
}

.guide-quill-editor img {
  max-width: 100%;
  height: auto;
}

.danger-button {
  color: #b42318;
  border-color: #fda29b;
}

.guide-images-panel {
  border-top: 1px solid var(--line);
  padding: 16px;
}

.guide-images-heading,
.guide-batch-form,
.guide-image-meta,
.guide-image-actions,
.guide-image-purpose-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.guide-images-heading {
  justify-content: space-between;
  margin-bottom: 14px;
  align-items: flex-start;
}

.guide-images-heading h3 {
  margin: 0 0 3px;
  font-size: 15px;
}

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

.guide-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.document-image-preview-page {
  min-height: 100vh;
  padding: 20px;
  background: #f2f4f7;
}

.document-image-preview-page header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.document-image-preview-page h1 {
  margin: 4px 0 0;
  font-size: 18px;
}

.document-image-preview-page small {
  color: var(--muted);
}

.document-image-preview-canvas {
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--line);
  background: #ffffff;
}

.document-image-preview-canvas img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.admission-program-confirmation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid #fecdca;
  background: #fffbfa;
}

.admission-program-confirmation.is-confirmed {
  border-bottom-color: #abefc6;
  background: #ecfdf3;
}

.admission-program-confirmation > div {
  display: grid;
  gap: 3px;
}

.admission-program-confirmation small {
  color: var(--muted);
  font-size: 12px;
}

.admission-program-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admission-program-form .field-select {
  min-width: 220px;
}

@media (max-width: 900px) {
  .admission-program-confirmation {
    align-items: flex-start;
    flex-direction: column;
  }
}

.guide-image-heading-actions,
.guide-upload-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.guide-image-heading-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.guide-plan-pool-form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.guide-plan-heading {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.guide-plan-heading .danger-button {
  margin-left: auto;
}

.guide-plan-pool-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid #edf0f4;
  background: #ffffff;
}

.guide-plan-pool-toolbar > div {
  display: grid;
  gap: 2px;
}

.guide-plan-pool-toolbar small {
  color: var(--muted);
  font-size: 12px;
}

#guide-plan-table-wrap .compact-table {
  min-width: 900px;
}

.pool-name-input {
  width: 160px;
}

@media (max-width: 900px) {
  .guide-plan-pool-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
}

.shared-pool-badge {
  color: #175cd3;
  border-color: #84adff;
  background: #eff4ff;
}

.guide-upload-input {
  max-width: 220px;
  font-size: 12px;
}

.guide-image-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: white;
}

.guide-image-stage-banner {
  display: grid;
  gap: 2px;
  margin: -10px -10px 9px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  border-radius: 7px 7px 0 0;
  background: #f2f4f7;
  color: #475467;
}

.guide-image-stage-banner strong {
  font-size: 13px;
}

.guide-image-stage-banner span {
  font-size: 11px;
}

.recognition-stage-raw_ocr .guide-image-stage-banner {
  border-bottom-color: #b2ddff;
  background: #eff8ff;
  color: #175cd3;
}

.recognition-stage-organized .guide-image-stage-banner {
  border-bottom-color: #fec84b;
  background: #fffaeb;
  color: #b54708;
}

.recognition-stage-applied .guide-image-stage-banner {
  border-bottom-color: #75c58e;
  background: #ecfdf3;
  color: #067647;
}

.recognition-stage-failed .guide-image-stage-banner {
  border-bottom-color: #fda29b;
  background: #fef3f2;
  color: #b42318;
}

.guide-image-stage-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  margin-bottom: 8px;
}

.guide-image-stage-track span {
  padding: 4px 3px;
  border-radius: 3px;
  background: #f2f4f7;
  color: #98a2b3;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
}

.guide-image-stage-track span.complete {
  background: #dcfae6;
  color: #067647;
}

.guide-image-card.status-succeeded {
  border-color: #75c58e;
}

.guide-image-card.status-failed {
  border-color: #f97066;
}

.guide-image-card.status-ignored {
  opacity: 0.62;
}

.guide-image-select {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
}

.guide-image-preview {
  display: flex;
  height: 180px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.guide-image-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.guide-image-meta {
  justify-content: space-between;
  margin: 9px 0;
  font-size: 12px;
}

.guide-image-meta strong {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.image-split-badge {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #eef4ff;
  color: #3538cd;
  border: 1px solid #c7d7fe;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.image-split-badge.source {
  background: #fff7ed;
  color: #c2410c;
  border-color: #fed7aa;
}

.guide-image-program-form {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #475467;
}

.guide-image-program-form .field-select {
  width: 100%;
  min-width: 0;
}

.image-status {
  color: var(--muted);
}

.guide-image-purpose-form {
  align-items: stretch;
}

.guide-image-purpose-form .plan-select {
  min-width: 0;
  flex: 1;
}

.guide-image-actions {
  margin-top: 8px;
}

.guide-image-actions form {
  display: inline;
}

.guide-prompt-input {
  min-width: 260px;
}

.guide-image-recognize-form {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.guide-image-prompt {
  width: 100%;
  min-height: 58px;
  resize: vertical;
}

.guide-image-result {
  margin-top: 10px;
  font-size: 12px;
}

.guide-image-result pre {
  max-height: 260px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  background: #f8fafc;
  padding: 8px;
}

.image-ocr-versions {
  margin-top: 12px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.image-ocr-versions h4 {
  margin: 0 0 8px;
  font-size: 12px;
}

.image-ocr-version-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding: 7px 0;
}

.image-ocr-version-link {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  font-size: 11px;
}

.image-ocr-version-link strong {
  color: var(--brand);
  white-space: nowrap;
}

.image-ocr-version-row form {
  flex: none;
}

.image-ocr-apply-hint {
  flex: none;
  color: var(--muted);
  font-size: 11px;
}

.image-ocr-apply-hint.ready {
  color: #b54708;
  font-weight: 700;
}

.image-ocr-apply-hint.success {
  color: #067647;
  font-weight: 700;
}

.ocr-current-status {
  display: grid;
  gap: 3px;
  margin-bottom: 12px;
  padding: 11px 13px;
  border: 1px solid #b2ddff;
  border-left-width: 4px;
  border-radius: 6px;
  background: #eff8ff;
  color: #175cd3;
}

.ocr-current-status span {
  font-size: 12px;
}

.ocr-current-status.status-organized {
  border-color: #fec84b;
  background: #fffaeb;
  color: #b54708;
}

.ocr-current-status.status-applied {
  border-color: #75c58e;
  background: #ecfdf3;
  color: #067647;
}

.guide-images-empty {
  margin: 0;
}

.ocr-pipeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--line);
}

.ocr-pipeline-step {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 12px;
  background: white;
}

.ocr-pipeline-step > span {
  display: grid;
  width: 24px;
  height: 24px;
  flex: none;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.ocr-pipeline-step.complete > span {
  border-color: #75c58e;
  background: #ecfdf3;
  color: #067647;
}

.ocr-pipeline-step div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.ocr-pipeline-step strong {
  font-size: 13px;
}

.ocr-pipeline-step small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ocr-history {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.ocr-history summary {
  cursor: pointer;
  color: var(--muted);
}

.ocr-history-link {
  display: block;
  padding: 5px 0;
  color: var(--brand);
  text-decoration: none;
}

.ocr-content-label {
  display: grid;
  gap: 3px;
}

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

.ocr-editor-layout {
  display: grid;
  grid-template-columns: minmax(280px, 38%) minmax(0, 1fr);
  gap: 16px;
  min-height: calc(100vh - 170px);
}

.ocr-editor-source,
.ocr-editor-workspace {
  min-width: 0;
}

.ocr-editor-source {
  display: grid;
  grid-template-rows: minmax(320px, 1fr) auto;
  gap: 12px;
}

.ocr-editor-image-link {
  display: flex;
  min-height: 0;
  align-items: flex-start;
  justify-content: center;
  overflow: auto;
  border: 1px solid var(--line);
  background: white;
  padding: 10px;
}

.ocr-editor-image-link img {
  max-width: 100%;
  height: auto;
}

.ocr-version-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 6px;
}

.ocr-version-nav-link {
  display: grid;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  background: white;
  color: var(--ink);
  text-decoration: none;
  font-size: 11px;
}

.ocr-version-nav-link.active {
  border-color: var(--brand);
  box-shadow: inset 3px 0 0 var(--brand);
}

.ocr-version-nav-link span,
.ocr-version-nav-link small {
  color: var(--muted);
}

.ocr-editor-workspace {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  background: white;
  padding: 12px;
}

.ocr-editor-meta,
.ocr-editor-actions,
.ocr-apply-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ocr-apply-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ocr-editor-meta {
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}

.ocr-draft-form {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 10px;
}

.ocr-draft-content {
  width: 100%;
  min-height: 520px;
  flex: 1;
  resize: vertical;
  border: 1px solid var(--line);
  padding: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  line-height: 1.55;
}

.ocr-apply-actions {
  margin-top: 10px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

@media (max-width: 980px) {
  .guide-images-heading,
  .guide-image-heading-actions,
  .guide-upload-form,
  .guide-batch-form {
    align-items: stretch;
    flex-direction: column;
  }

  .guide-upload-input {
    max-width: none;
  }

  .ocr-editor-layout {
    grid-template-columns: 1fr;
  }
}

.paragraph-list {
  padding: 8px 0;
}

.para-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
  position: relative;
}

.para-item:hover {
  border-color: var(--brand);
}

.para-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.para-type-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 10px;
  background: #f0f9ff;
  color: #0369a1;
  text-transform: uppercase;
}

.para-item.para-image .para-type-badge {
  background: #fef3c7;
  color: #92400e;
}

.para-item.para-table .para-type-badge {
  background: #ecfdf5;
  color: #065f46;
}

.para-item.para-heading .para-type-badge {
  background: #f3e8ff;
  color: #7c3aed;
}

.para-content {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
}

.para-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.para-table-wrap td, .para-table-wrap th {
  border: 1px solid var(--line);
  padding: 4px 6px;
}

.para-editor {
  margin-top: 8px;
  border: 1px solid var(--brand);
  border-radius: 6px;
  overflow: hidden;
}

.quill-editor {
  min-height: 100px;
  font-size: 14px;
}

.quill-editor .ql-toolbar {
  border: none !important;
  border-bottom: 1px solid var(--line) !important;
}

.quill-editor .ql-container {
  border: none !important;
}

.quill-actions {
  display: flex;
  gap: 8px;
  padding: 8px 12px;
  background: #f9fafb;
  border-top: 1px solid var(--line);
}

.add-para-form {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

/* ---- 来源链接标签 ---- */
.source-url-badge {
  display: inline-block;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 4px;
  padding: 1px 8px;
  margin-left: 8px;
  vertical-align: middle;
}

/* 复制条件弹窗 */
.copy-form-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 999;
  display: flex; align-items: center; justify-content: center;
}
.copy-form-panel {
  background: #fff; border-radius: 8px; max-width: 520px; width: 90vw; max-height: 70vh;
  display: flex; flex-direction: column; box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.copy-form-header {
  padding: 12px 16px; border-bottom: 1px solid #e5e7eb;
  display: flex; align-items: center; gap: 12px;
}
.copy-form-header strong { font-size: 15px; }
.copy-form-close { margin-left: auto; background: none; border: none; font-size: 20px; cursor: pointer; color: #9ca3af; }
.copy-form-body { padding: 12px 16px; overflow-y: auto; flex: 1; }
.copy-form-checklist { display: flex; flex-direction: column; gap: 4px; max-height: 40vh; overflow-y: auto; }
.copy-form-check-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; cursor: pointer; border-radius: 4px; }
.copy-form-check-item:hover { background: #f3f4f6; }
.copy-form-checkbox { width: 16px; height: 16px; cursor: pointer; }
.copy-form-footer { padding: 10px 16px; border-top: 1px solid #e5e7eb; display: flex; gap: 8px; justify-content: flex-end; }
.support-article-table .support-title-cell {
  min-width: 220px;
}

.support-content-cell,
.feedback-content-cell {
  max-width: 520px;
  color: var(--muted);
  line-height: 1.55;
}

.support-editor-section,
.feedback-detail-section,
.feedback-status-section {
  padding: 20px;
}

.support-editor-form {
  display: grid;
  grid-template-columns: minmax(180px, 240px) 1fr;
  gap: 18px;
  max-width: 900px;
}

.support-form-wide,
.support-form-actions {
  grid-column: 1 / -1;
}

.support-content-input {
  min-height: 200px;
  resize: vertical;
}

.support-checkbox-field {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 13px;
}

.support-form-actions,
.feedback-status-form,
.feedback-filter-form {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px;
}

.feedback-reply-field {
  flex: 1 1 100%;
}

.feedback-reply-field textarea {
  min-height: 96px;
  resize: vertical;
}

.feedback-status-form .field small {
  color: var(--muted);
  font-size: 11px;
}

.year-status-badge.status-adopted {
  border-color: #b2ddff;
  background: #eff8ff;
  color: #175cd3;
}

.feedback-query-field {
  flex: 1 1 280px;
}

.user-feedback-table td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.feedback-detail-content {
  max-width: 860px;
  padding: 20px 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.75;
  white-space: pre-wrap;
}

.feedback-meta-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.feedback-meta-list div {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
}

.feedback-meta-list dt {
  color: var(--muted);
}

.feedback-meta-list dd {
  margin: 0;
}

.feedback-status-section {
  margin-top: 18px;
}

.year-status-badge.status-resolved {
  border-color: #abefc6;
  background: #ecfdf3;
  color: #067647;
}

.year-status-badge.status-closed {
  border-color: #d0d5dd;
  background: #f2f4f7;
  color: #475467;
}

@media (max-width: 800px) {
  .support-editor-form {
    grid-template-columns: 1fr;
  }

  .support-form-wide,
  .support-form-actions {
    grid-column: auto;
  }
}
.energy-grant-section,
.energy-products-section,
.energy-transactions-section {
  margin-bottom: 18px;
  padding: 18px;
}

.energy-grant-form,
.energy-user-filter form {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px;
}

.energy-description-field {
  flex: 1 1 280px;
}

.energy-reason-template-field {
  flex: 0 1 180px;
}

.energy-product-form {
  display: grid;
  grid-template-columns: minmax(150px, 1.2fr) repeat(4, minmax(110px, 0.8fr)) auto auto;
  align-items: end;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.energy-product-form > div small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.energy-product-description {
  grid-column: 1 / -1;
}

.energy-amount {
  font-weight: 800;
}

.energy-amount.is-positive {
  color: #067647;
}

.energy-amount.is-negative {
  color: #b42318;
}

@media (max-width: 1000px) {
  .energy-product-form {
    grid-template-columns: 1fr 1fr;
  }

  .energy-product-description {
    grid-column: 1 / -1;
  }
}

.admin-users-table td {
  min-width: 120px;
  vertical-align: top;
}

.admin-users-table td:nth-child(2) {
  min-width: 180px;
  max-width: 260px;
}

.admin-users-table td:nth-child(3) {
  min-width: 420px;
}

.admin-users-table td small {
  display: block;
  max-width: 320px;
  margin-top: 5px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
}

.admin-user-profile-form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.admin-user-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 8px 10px;
  width: 100%;
}

.admin-user-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

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

.admin-user-field .select-control,
.admin-user-field .field-input {
  width: 100%;
  min-width: 0;
}

.admin-user-inline-form,
.admin-user-vip-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-user-vip-form {
  margin-top: 8px;
}

.admin-user-vip-form .field-input {
  width: 72px;
}

.admin-user-vip-status {
  color: #9a6700;
}

.admin-users-table form.button_to {
  margin-top: 8px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}

.usage-period-switch {
  display: flex;
  gap: 8px;
}

.usage-period-switch .active {
  border-color: var(--brand);
  background: #ecfdf3;
  color: var(--brand-strong);
}

.usage-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.usage-summary-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.usage-summary-card span {
  color: var(--muted);
  font-size: 13px;
}

.usage-summary-card strong {
  font-size: 28px;
}

.usage-section {
  margin-bottom: 18px;
  padding: 18px;
}

.usage-section-heading {
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
}

.usage-section-heading h2,
.usage-section-heading p {
  margin: 0;
}

.usage-section-heading h2 {
  font-size: 18px;
}

.usage-section-heading p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.usage-table {
  width: 100%;
}

.usage-trend {
  display: grid;
  gap: 10px;
}

.usage-trend-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.usage-trend-row time {
  color: var(--muted);
}

.usage-trend-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #eaecf0;
}

.usage-trend-track span {
  display: block;
  min-width: 2px;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

@media (max-width: 1000px) {
  .usage-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .usage-summary-grid {
    grid-template-columns: 1fr;
  }

  .usage-period-switch {
    flex-wrap: wrap;
  }
}
