﻿:root {
  --ink: #20201d;
  --muted: #6b6760;
  --line: #ded8cc;
  --paper: #f7f2e8;
  --panel: #fffaf1;
  --accent: #0f6f62;
  --accent-2: #b94a2f;
  --soft: #e8dfcf;
  --shadow: 0 18px 45px rgba(65, 54, 38, .12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(32, 32, 29, .035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(32, 32, 29, .035) 1px, transparent 1px),
    var(--paper);
  background-size: 28px 28px;
  font-family: "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 22px;
  color: #f8f0df;
  background: #1f2925;
  border-right: 1px solid rgba(255, 255, 255, .08);
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 34px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #1f2925;
  background: #f3c66f;
  border-radius: 8px;
  font-size: 22px;
  font-weight: 800;
}

.brand h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.brand p,
.rail-card p {
  margin: 4px 0 0;
  color: rgba(248, 240, 223, .64);
  font-size: 13px;
}

.auth-card {
  margin-bottom: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 8px;
}

.auth-card input {
  width: 100%;
  min-height: 38px;
  margin-top: 8px;
  padding: 8px 10px;
  color: #fff8e8;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
}

.auth-title {
  font-size: 13px;
  font-weight: 700;
}

.auth-button {
  width: 100%;
  margin-top: 10px;
}

.password-row {
  display: grid;
  grid-template-columns: 1fr 54px;
  gap: 6px;
  align-items: center;
}

.sms-row {
  display: grid;
  grid-template-columns: 1fr 54px;
  gap: 6px;
  align-items: center;
}

.sms-row .ghost-button {
  min-height: 38px;
  margin-top: 8px;
  padding: 0;
  color: #fff8e8;
}

.password-row .ghost-button {
  min-height: 38px;
  margin-top: 8px;
  padding: 0;
  color: #fff8e8;
}

.auth-links {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}

.link-button {
  padding: 0;
  color: #9de1d4;
  background: transparent;
  border: 0;
  font-size: 12px;
  cursor: pointer;
}

.register-panel {
  display: grid;
  gap: 2px;
  margin-top: 10px;
}

.auth-tip {
  margin-top: 8px;
  color: rgba(248, 240, 223, .68);
}

.membership-summary {
  margin: 8px 0;
  padding: 7px 8px;
  color: #dff8ef;
  background: rgba(11, 122, 104, .24);
  border: 1px solid rgba(157, 225, 212, .34);
  border-radius: 7px;
  font-size: 12px;
}

.membership-summary.expired {
  color: #ffd7cc;
  background: rgba(180, 64, 41, .22);
  border-color: rgba(255, 180, 160, .42);
}

.quota-summary {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  font-size: 12px;
  color: rgba(248, 240, 223, .82);
}

.renewal-panel {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.renewal-panel select,
.renewal-panel input {
  width: 100%;
  min-height: 34px;
  margin-top: 0;
}

.renewal-panel .secondary {
  width: 100%;
  min-height: 34px;
  padding: 7px 10px;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav-item {
  width: 100%;
  padding: 12px 14px;
  color: rgba(248, 240, 223, .78);
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
}

.nav-item.active,
.nav-item:hover {
  color: #fff8e8;
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .12);
}

.rail-card {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 28px;
  padding: 18px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 8px;
}

.rail-card strong {
  display: block;
  margin-top: 8px;
  font-size: 34px;
}

.workspace {
  padding: 28px;
  overflow: hidden;
}

.dashboard-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  padding: 22px;
  background: rgba(255, 250, 241, .9);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.dashboard-hero p {
  max-width: 640px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 16px;
}

.task-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: rgba(255, 250, 241, .82);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.task-card-primary {
  grid-row: span 2;
}

.task-card-head {
  display: grid;
  gap: 4px;
}

.task-card-head strong {
  font-size: 22px;
}

.task-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

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

.task-metrics button,
.quick-action {
  min-height: 84px;
  padding: 14px;
  text-align: left;
  background: #fffaf1;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.task-metrics span,
.quick-action small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.task-metrics strong {
  display: block;
  margin-top: 6px;
  color: var(--accent-2);
  font-size: 30px;
}

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

.quick-task-card {
  align-content: start;
}

.quick-action {
  width: 100%;
  min-height: 62px;
}

.quick-action span {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-weight: 800;
}

.panel {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
}

.panel.active {
  display: block;
}

.panel-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.admin-subhead {
  margin-top: 22px;
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.label {
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h2 {
  margin: 4px 0 0;
  font-size: 30px;
  line-height: 1.15;
}

.primary,
.secondary {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 700;
}

.primary {
  color: #fffaf1;
  background: var(--accent);
  border: 1px solid #0c5c52;
}

.secondary {
  color: var(--accent);
  background: #fffaf1;
  border: 1px solid var(--accent);
}

.danger-button {
  color: #9b321f;
  border-color: #d7a18f;
}

.danger-button:hover {
  color: #7a2b1f;
  background: #f4ddd2;
}

.row-action {
  white-space: nowrap;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.th-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.th-inline input[type="checkbox"] {
  margin: 0;
}

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

.quality-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin: -2px 0 16px;
}

.quality-item {
  padding: 12px;
  background: rgba(255, 250, 241, .72);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.quality-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.quality-item strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
}

.metric {
  padding: 18px;
  background: rgba(255, 250, 241, .82);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

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

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
}

.notice {
  margin: 14px 0;
  padding: 14px 16px;
  color: #23423d;
  background: #e3f0ea;
  border: 1px solid #bdd8ce;
  border-radius: 8px;
}

.notice.muted {
  color: var(--muted);
  background: rgba(255, 250, 241, .65);
  border-color: var(--line);
}

.hidden {
  display: none !important;
}

.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
  background: rgba(32, 32, 29, .48);
}

.modal-card {
  width: 100%;
  max-width: 620px;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.modal-head h2 {
  margin: 4px 0 0;
  font-size: 19px;
}

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

.modal-field {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.modal-field em {
  color: var(--accent-2);
  font-style: normal;
}

.modal-field input {
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
}

.modal-inline {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

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

.modal-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  font-size: 13px;
  color: var(--muted);
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 4px;
}

@media (max-width: 620px) {
  .modal-grid {
    grid-template-columns: 1fr;
  }

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

.toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 220px;
  gap: 12px;
  margin: 18px 0;
}

.regular-filters {
  display: grid;
  grid-template-columns: auto;
  gap: 12px;
  margin: 18px 0 10px;
  padding: 14px;
  background: rgba(255, 250, 241, .82);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.regular-advanced-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(4, minmax(150px, 1fr));
  gap: 12px;
  margin: 0 0 12px;
  padding: 14px;
  background: rgba(255, 250, 241, .68);
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.regular-advanced-filters input,
.regular-advanced-filters select {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.simplified-export-options {
  display: none !important;
}

.toolbar input,
.toolbar select,
.regular-filters input,
.regular-filters select,
.filter-row input,
.field input,
.field select {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.product-toolbar {
  grid-template-columns: auto;
  justify-content: start;
  padding: 14px;
  background: rgba(255, 250, 241, .82);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.regular-summary {
  margin: 0 0 12px;
}

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

.filter-chip,
.saved-plan-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  color: var(--accent);
  background: rgba(255, 250, 241, .92);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
}

.result-count {
  margin-bottom: 12px;
}

.table-wrap {
  max-height: calc(100vh - 300px);
  overflow: auto;
  background: rgba(255, 250, 241, .9);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
  font-size: 13px;
}

#library table {
  /* 13 列（含「集采（不含运）」）：列宽下限按 .table-input 的 120px 估算，
     留出横向滚动余量，避免新增列把其它列挤变形 */
  min-width: 1600px;
}

.regular-table-wrap table {
  min-width: 1540px;
}

th,
td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  background: rgba(255, 250, 241, .86);
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #eee4d3;
  font-size: 12px;
  white-space: nowrap;
}

.filter-row th {
  top: 41px;
  background: #f4ead8;
  padding: 8px 10px;
  vertical-align: middle;
}

#library th:nth-child(1),
#library td:nth-child(1),
.regular-table-wrap th:nth-child(1),
.regular-table-wrap td:nth-child(1) {
  width: 58px;
  min-width: 58px;
  text-align: center;
}

#library th:nth-child(2),
#library td:nth-child(2),
.regular-table-wrap th:nth-child(2),
.regular-table-wrap td:nth-child(2) {
  width: 116px;
  min-width: 116px;
}

#library th:nth-child(3),
#library td:nth-child(3) {
  width: 180px;
  min-width: 180px;
}

#library th:nth-child(4),
#library td:nth-child(4),
#library th:nth-child(5),
#library td:nth-child(5),
#library th:nth-child(6),
#library td:nth-child(6),
#library th:nth-child(7),
#library td:nth-child(7) {
  width: 128px;
  min-width: 128px;
}

.regular-table-wrap th:nth-child(3),
.regular-table-wrap td:nth-child(3),
.regular-table-wrap th:nth-child(4),
.regular-table-wrap td:nth-child(4),
.regular-table-wrap th:nth-child(5),
.regular-table-wrap td:nth-child(5),
.regular-table-wrap th:nth-child(6),
.regular-table-wrap td:nth-child(6) {
  width: 118px;
  min-width: 118px;
}

.regular-table-wrap th:nth-child(7),
.regular-table-wrap td:nth-child(7) {
  width: 320px;
  min-width: 320px;
}

.filter-row input,
.filter-row select {
  width: 100%;
  box-sizing: border-box;
  min-height: 34px;
  padding: 6px 8px;
  font-size: 12px;
  color: var(--ink);
  background: rgba(255, 250, 241, .96);
  border: 1px solid #d9cbb5;
  border-radius: 7px;
  outline: none;
}

.filter-row input:focus,
.filter-row select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(10, 122, 104, .12);
}

.filter-row .condition-row {
  display: grid;
  grid-template-columns: 72px minmax(86px, 1fr);
  gap: 6px;
}

.filter-row .condition-row input,
.filter-row .condition-row select {
  width: 100%;
  box-sizing: border-box;
  min-height: 34px;
  padding: 6px 8px;
  font-size: 12px;
}

.recovery-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0 14px;
  padding: 10px 12px;
  color: #315247;
  background: rgba(224, 242, 235, .72);
  border: 1px solid #b9d8cc;
  border-radius: 8px;
}

.recovery-summary div {
  display: grid;
  gap: 2px;
}

.import-detail {
  margin: 12px 0 16px;
  padding: 14px 16px;
  background: rgba(255, 253, 248, .9);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.import-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.import-detail .subtle {
  margin: 4px 0 8px;
}

.import-detail-warn {
  margin: 8px 0 12px;
  padding: 10px 12px;
  color: #7a2b1f;
  background: #f6e3d8;
  border: 1px solid #e0b9a6;
  border-radius: 8px;
}

.import-detail-warn ul {
  margin: 6px 0 0;
  padding-left: 20px;
}

.import-detail-warn li {
  margin: 3px 0;
}

.import-detail-table {
  margin-top: 4px;
  max-height: 460px;
  overflow: auto;
}

.import-detail-table table {
  min-width: 900px;
}

.import-detail-items {
  max-width: 420px;
  color: var(--muted);
}

.confirm-input {
  width: 150px;
  min-height: 36px;
  padding: 6px 10px;
  color: var(--text);
  background: var(--surface, #fff);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.table-input {
  width: 100%;
  min-width: 120px;
  min-height: 34px;
  padding: 6px 8px;
  color: var(--ink);
  background: rgba(255, 250, 241, .88);
  border: 1px solid transparent;
  border-radius: 6px;
}

.table-input:focus {
  background: #fff;
  border-color: var(--accent);
  outline: none;
}

.table-input.saving {
  border-color: #f3c66f;
}

.deleted-row {
  background: rgba(154, 128, 88, .12);
}

.deleted-row td {
  color: #6f6250;
}

.status-note {
  display: inline-flex;
  margin-top: 6px;
  padding: 3px 7px;
  color: #8a4b20;
  background: #fff0d7;
  border: 1px solid #edc78e;
  border-radius: 999px;
  font-size: 12px;
}

.thumb {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  object-fit: contain;
  color: var(--muted);
  background: #fffaf1;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
}

.thumb.empty {
  padding: 6px;
}

.duplicate-row td {
  background: rgba(185, 74, 47, .08);
}

.notice.warn {
  color: #7a2b1f;
  background: #f4ddd2;
  border-color: #ddb8a7;
}

.danger {
  color: #b94a2f;
  font-weight: 700;
}

.product-name {
  max-width: 420px;
  font-weight: 700;
}

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

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

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

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  color: #19463f;
  background: #d8ece4;
  border-radius: 999px;
  font-size: 12px;
}

.badge.warn {
  color: #7a2b1f;
  background: #f1d6ca;
}

.scheme-grid,
.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 18px;
  background: rgba(255, 250, 241, .86);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.scheme-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 16px;
}

.builder-hint {
  margin: 0 0 14px;
  padding: 12px 14px;
  color: #2f514a;
  background: #e3f0ea;
  border: 1px solid #bdd8ce;
  border-radius: 8px;
  font-size: 13px;
}

.brief-section {
  margin-bottom: 16px;
}

.brief-section .block-title {
  margin: 0 0 8px;
}

.compact-brief-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.advanced-field {
  display: none !important;
}

.table-filter-note {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  color: var(--muted);
  font-size: 12px;
}

.field span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

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

.field textarea {
  width: 100%;
  min-height: 82px;
  resize: vertical;
  padding: 10px 11px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.condition-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 8px;
}

.condition-row.compact {
  grid-template-columns: 72px minmax(86px, 1fr);
}

.condition-row select,
.condition-row input {
  min-width: 0;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 12px 14px;
  color: var(--muted);
  background: rgba(255, 250, 241, .72);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.pagination:empty {
  display: none;
}

.pagination-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.pagination-controls select {
  min-height: 32px;
  padding: 4px 8px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.pagination button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.image-slot {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 112px;
  padding: 14px;
  color: var(--muted);
  background: rgba(255, 250, 241, .72);
  border: 1px dashed #b9ad9a;
  border-radius: 8px;
}

.image-slot .plus {
  font-size: 28px;
  line-height: 1;
  color: var(--accent);
}

.image-slot small {
  margin-top: 4px;
  text-align: center;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 28px 12px 0;
  color: var(--muted);
  font-size: 13px;
}

.category-block {
  margin-top: 18px;
  padding: 18px;
  background: rgba(255, 250, 241, .72);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.description-block {
  margin-top: 18px;
  padding: 18px;
  background: rgba(255, 250, 241, .72);
  border: 1px solid var(--line);
  border-radius: 8px;
}

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

.ghost-button {
  min-height: 32px;
  padding: 0 12px;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 700;
}

.chips {
  display: grid;
  gap: 14px;
}

.category-block.collapsed .chips {
  display: none;
}

.category-group {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 10px 0;
  border-top: 1px solid rgba(222, 216, 204, .72);
}

.category-group:first-child {
  border-top: 0;
  padding-top: 0;
}

.category-group-title {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 34px;
}

.category-group-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  padding: 8px 11px;
  color: var(--muted);
  background: #fffaf1;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.chip.selected {
  color: #fffaf1;
  background: var(--accent);
  border-color: var(--accent);
}

.packages {
  display: grid;
  gap: 14px;
}

.comparison-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 16px;
}

.comparison-summary div {
  padding: 12px;
  background: rgba(255, 250, 241, .82);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.comparison-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.comparison-summary strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.compare-table-wrap,
.export-options {
  margin: 12px 0 16px;
  padding: 14px;
  background: rgba(255, 250, 241, .82);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: auto;
}

.saved-plan-manager {
  margin: 12px 0 16px;
  padding: 14px;
  background: rgba(255, 250, 241, .82);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.saved-plan-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.saved-plan-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px;
  background: #fffaf1;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.preset-actions {
  justify-content: flex-start;
  margin-bottom: 10px;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.compare-table th,
.compare-table td {
  min-width: 140px;
  padding: 10px 12px;
  border: 1px solid var(--line);
}

.compare-table th {
  position: static;
  width: 140px;
  background: #f1e7d6;
}

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

.package-card {
  background: rgba(255, 250, 241, .9);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.package-actions {
  padding: 10px 16px 0;
}

.recommendation-summary {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  background: #f0f7f1;
  border-bottom: 1px solid #cfe0d2;
}

.recommendation-summary span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.recommendation-summary strong {
  color: #20362c;
  font-size: 15px;
  line-height: 1.55;
}

.recommendation-summary p {
  max-width: 860px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.package-top {
  display: grid;
  grid-template-columns: auto 1fr repeat(6, minmax(90px, auto));
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.package-top input {
  width: 18px;
  height: 18px;
}

.package-title strong {
  display: block;
  font-size: 16px;
}

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

.selling-point {
  max-width: 620px;
  margin: 6px 0 0;
  color: #3d3a34;
  font-size: 12px;
  line-height: 1.55;
}

.score-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.score-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 10px;
  background: #fffaf1;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
}

.score-chip span {
  color: var(--muted);
}

.risk-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 12px;
}

.risk-list span {
  padding: 5px 8px;
  color: #7a2b1f;
  background: #f4ddd2;
  border: 1px solid #ddb8a7;
  border-radius: 999px;
  font-size: 12px;
}

.locked-button {
  color: #7a2b1f;
  border-color: #ddb8a7;
  background: #f4ddd2;
}

.stat strong {
  display: block;
  margin-top: 2px;
}

.package-products {
  padding: 0 16px 14px;
  /* 明细表现在是 8 列（含三项成本价），窄屏时横向滚动而不是把列压变形 */
  overflow-x: auto;
}

.package-products table {
  min-width: 760px;
  font-size: 12px;
}

.site-footer {
  display: grid;
  gap: 10px;
  margin-top: 28px;
  padding: 20px 0 6px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.site-footer strong {
  margin-right: 10px;
  color: var(--ink);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.site-footer a {
  color: #0f6f62;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.legal-page {
  min-height: 100vh;
  padding: 40px 20px;
}

.legal-shell {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 34px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.legal-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.legal-top h1 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.25;
}

.legal-top p,
.legal-section p,
.legal-section li {
  color: var(--muted);
  line-height: 1.75;
}

.legal-home {
  flex: 0 0 auto;
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
}

.legal-section {
  margin-top: 24px;
}

.legal-section h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.legal-section ul {
  margin: 0;
  padding-left: 20px;
}

.legal-note {
  margin-top: 28px;
  padding: 14px 16px;
  color: #6a4a12;
  background: #fff2c8;
  border: 1px solid #e3c979;
  border-radius: 8px;
  font-size: 13px;
}

/* ===== 未登录落地页 ===== */
.landing-panel {
  max-width: 1080px;
}

.landing-hero {
  padding: 34px 30px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.landing-hero h2 {
  margin: 8px 0 12px;
  font-size: 30px;
  line-height: 1.35;
}

.landing-hero p {
  margin: 0;
  max-width: 720px;
  color: var(--muted);
  line-height: 1.75;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.landing-note {
  margin-top: 14px;
  font-size: 13px;
  color: var(--accent);
}

.landing-section {
  margin-top: 34px;
}

.landing-section h3 {
  margin: 0 0 16px;
  font-size: 19px;
}

.landing-section > p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.75;
}

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

.landing-card {
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
}

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

.landing-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.landing-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.landing-steps li {
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  counter-increment: step;
}

.landing-steps li::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-bottom: 10px;
  color: #fff;
  background: var(--accent);
  border-radius: 50%;
  font-size: 13px;
}

.landing-steps strong {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
}

.landing-steps span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

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

.landing-price {
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.landing-price-value {
  font-size: 26px;
  color: var(--accent-2);
}

.landing-price-period {
  margin-left: 4px;
  color: var(--muted);
  font-size: 13px;
}

.landing-price p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.lead-form {
  display: grid;
  gap: 12px;
  max-width: 520px;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.lead-form textarea {
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
}

.lead-form button {
  justify-self: start;
}

@media (max-width: 980px) {
  .landing-cards,
  .landing-steps,
  .landing-prices {
    grid-template-columns: 1fr;
  }

  .landing-hero {
    padding: 24px 18px;
  }

  .landing-hero h2 {
    font-size: 23px;
  }

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

  .rail {
    position: static;
    height: auto;
  }

  .rail-card {
    position: static;
    margin-top: 20px;
  }

  .form-grid,
  .scheme-grid,
  .metrics,
  .toolbar,
  .regular-filters,
  .package-top {
    grid-template-columns: 1fr;
  }

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

  .panel-actions button {
    width: 100%;
  }

  .field.wide {
    grid-column: auto;
  }

  .legal-shell {
    padding: 24px 18px;
  }

  .legal-top {
    display: block;
  }
}
