:root {
  --bg: #f3f6fb;
  --panel: #ffffff;
  --text: #172033;
  --muted: #64748b;
  --line: #dbe3ef;
  --primary: #1257d6;
  --primary-pressed: #0e46ae;
  --warn: #b45309;
  --danger: #b42318;
  --ok: #067647;
  --shadow: 0 18px 48px rgba(24, 39, 75, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

button {
  border: 0;
  font: inherit;
}

.deal-shell {
  width: min(720px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 16px calc(36px + env(safe-area-inset-bottom));
}

.hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 4px 18px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  max-width: 510px;
  font-size: 30px;
  line-height: 1.24;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

h2 {
  font-size: 17px;
  line-height: 1.45;
}

.muted {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.status-pill {
  flex: 0 0 auto;
  min-width: 68px;
  padding: 8px 12px;
  border: 1px solid #bcd0f5;
  border-radius: 999px;
  background: #eaf1ff;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.panel,
.amount-card,
.notice {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.simulation-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 11px 14px;
  border: 1px solid #ffd591;
  border-radius: 10px;
  background: #fff7e6;
  color: #874d00;
  font-size: 13px;
  line-height: 1.5;
}

.simulation-notice strong {
  flex: none;
  padding: 1px 7px;
  border-radius: 999px;
  background: #fa8c16;
  color: #fff;
  font-size: 12px;
}

.service-change-notice {
  border-color: #bcd0f5;
  background: #f0f6ff;
  color: var(--primary);
}

.panel {
  padding: 18px;
}

.state-panel {
  display: grid;
  place-items: center;
  min-height: 220px;
  gap: 14px;
  text-align: center;
}

.state-title {
  color: var(--danger);
  font-size: 18px;
  font-weight: 800;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #d6e2f8;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.amount-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
  padding: 20px;
}

.amount-card span {
  color: var(--muted);
  font-size: 14px;
}

.amount-card strong {
  font-size: 28px;
  line-height: 1.2;
}

.provider-panel {
  margin-bottom: 14px;
}

.service-scope-panel {
  margin-bottom: 14px;
}

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

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

.scope-item {
  padding: 7px 10px;
  border: 1px solid #dce7f8;
  border-radius: 7px;
  background: #f5f8fd;
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
}

.excluded-scope {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #edf1f7;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.excluded-scope strong {
  color: var(--text);
}

.provider-details {
  display: grid;
  gap: 0;
  margin: 0;
}

.provider-details > div {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid #edf1f7;
}

.provider-details > div:first-child {
  border-top: 0;
}

.provider-details dt,
.provider-details dd {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}

.provider-details dt {
  color: var(--muted);
}

.provider-details dd {
  color: var(--text);
  font-weight: 650;
  overflow-wrap: anywhere;
}

.provider-disclaimer {
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid #edf1f7;
}

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

.timeline {
  display: grid;
  gap: 2px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid #edf1f7;
}

.timeline-item:first-child {
  border-top: 0;
}

.dot {
  width: 10px;
  height: 10px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 5px #eaf1ff;
}

.timeline-item p {
  color: var(--muted);
  font-size: 13px;
}

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

.timeline-item.target-stage {
  margin: 0 -10px;
  padding-right: 10px;
  padding-left: 10px;
  border-radius: 10px;
  background: #f0f6ff;
}

.notice {
  display: grid;
  gap: 6px;
  margin: 14px 0;
  padding: 14px 16px;
  border-color: #fedf89;
  background: #fffbeb;
  color: var(--warn);
}

.material-panel {
  display: grid;
  gap: 12px;
  margin: 14px 0;
}

.message-panel {
  margin: 14px 0;
}

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

.service-message {
  padding: 13px 14px;
  border-left: 3px solid var(--primary);
  border-radius: 8px;
  background: #f4f7fc;
}

.service-message p {
  color: var(--text);
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.file-picker {
  display: grid;
  place-items: center;
  min-height: 48px;
  border: 1px dashed #9db8ee;
  border-radius: 10px;
  background: #f8fbff;
  color: var(--primary);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.file-picker input {
  position: fixed;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.material-status {
  min-height: 24px;
  margin-top: 0;
}

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

.primary-button,
.secondary-button,
.ghost-button {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 10px;
  cursor: pointer;
}

.primary-button {
  background: var(--primary);
  color: #fff;
  font-weight: 800;
}

.primary-button:active {
  background: var(--primary-pressed);
}

.secondary-button:disabled {
  border-color: #d5deeb;
  background: #eef2f7;
  color: #94a3b8;
  cursor: not-allowed;
}

.secondary-button {
  border: 1px solid #9db8ee;
  background: #eef4ff;
  color: var(--primary);
  font-weight: 800;
}

.ghost-button {
  min-height: 34px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-size: 13px;
}

.action-hint {
  margin-top: 12px;
}

.hidden {
  display: none !important;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 420px) {
  .hero {
    display: block;
  }

  .status-pill {
    display: inline-block;
    margin-top: 14px;
  }

  h1 {
    font-size: 26px;
  }

  .amount-card {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}

/* ===== 咨询承接下单表单 ===== */
.form-field {
  margin-bottom: 12px;
}

.form-field label {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
  color: #4e5969;
}

.form-field input[type="text"],
.form-field input[type="tel"] {
  box-sizing: border-box;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  font-size: 15px;
  color: #1d2129;
}

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 8px 0 12px;
  font-size: 13px;
  color: #4e5969;
  line-height: 1.5;
}

.consent-row input[type="checkbox"] {
  margin-top: 2px;
}

/* ===== 咨询 V2 律师预约（与真实下单严格分区） ===== */
.appointment-verified {
  padding: 5px 9px;
  border-radius: 999px;
  background: #e8f3ff;
  color: #0f5dcc;
  font-size: 12px;
  font-weight: 700;
}

.appointment-partner {
  display: block;
  margin-top: 6px;
  font-size: 20px;
}

.appointment-demand {
  margin-top: 18px;
  padding: 14px;
  border-radius: 10px;
  background: #f7f8fa;
}

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

.appointment-demand p {
  margin-top: 7px;
  line-height: 1.65;
}

.appointment-result {
  margin: 14px 0;
  border-color: #b7ebd5;
  background: #f3fcf8;
}

.appointment-result strong {
  color: #007c55;
  font-size: 18px;
}

.appointment-result p {
  margin-top: 8px;
  line-height: 1.65;
}

.appointment-demand-no {
  color: #007c55;
  font-weight: 700;
}

.appointment-explanation {
  margin: 8px 0 18px;
  line-height: 1.65;
}

.appointment-submit {
  width: 100%;
  margin-top: 16px;
}

.appointment-form-error {
  margin-top: 14px;
  color: #c53a42;
  font-size: 13px;
  line-height: 1.55;
}

.appointment-submit:disabled {
  background: #94bfff;
  cursor: not-allowed;
}

.appointment-footnote {
  margin-top: 10px;
  text-align: center;
}
