:root {
  --orange: #f36b21;
  --orange-dark: #d95412;
  --orange-soft: #fff4ed;
  --ink: #171717;
  --muted: #676b71;
  --line: #dfe1e4;
  --line-dark: #c6c9cd;
  --surface: #fff;
  --soft: #f7f7f6;
  --success: #26734d;
  --danger: #bc3e32;
  --shadow: 0 18px 55px rgba(20, 20, 20, .07);
  --radius: 12px;
  --font: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #fff; color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.shell { width: min(1240px, calc(100% - 48px)); margin: 0 auto; }

.topbar { height: 92px; border-bottom: 1px solid var(--line); background: #fff; position: relative; overflow: hidden; }
.topbar::after { content: ""; position: absolute; right: -20px; top: -8px; width: 520px; height: 110px; opacity: .6; background: radial-gradient(circle at 12% 58%, var(--orange) 0 3px, transparent 4px), radial-gradient(circle at 88% 65%, var(--orange) 0 3px, transparent 4px), linear-gradient(135deg, transparent 45%, #e5e6e8 46% 47%, transparent 48%) 20px 0 / 88px 56px, linear-gradient(45deg, transparent 45%, #e5e6e8 46% 47%, transparent 48%) 0 28px / 88px 56px; pointer-events: none; }
.topbar-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1; }
.logo { display: block; width: 132px; height: 67px; object-fit: contain; object-position: left center; }
.online-status { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.online-status span { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(38,115,77,.1); }

.page { padding: 37px 0 50px; }
.intro h1 { margin: 0; font-size: clamp(29px, 3vw, 39px); line-height: 1.25; letter-spacing: -.025em; font-weight: 760; }
.intro-subtitle { margin: 10px 0 15px; color: var(--muted); font-size: 17px; }
.safety-note { display: flex; align-items: flex-start; gap: 9px; margin: 0; max-width: 920px; color: #46494e; }
.safety-note svg { width: 23px; height: 23px; flex: 0 0 auto; color: var(--orange); margin-top: 1px; }

.steps { margin: 34px 0 35px; display: grid; grid-template-columns: repeat(3, 1fr); position: relative; }
.steps-line { position: absolute; top: 17px; left: 16.667%; right: 16.667%; height: 3px; border-radius: 999px; background: #dcdfe2; overflow: hidden; }
.steps-line span { display: block; width: 0; height: 100%; background: var(--orange); transition: width .25s ease; }
.step { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 8px; border: 0; background: transparent; color: #70747a; font-size: 13px; padding: 0; }
.step span { display: grid; place-items: center; width: 35px; height: 35px; border: 1.5px solid #aeb2b7; border-radius: 50%; color: #666b70; background: #fff; font-weight: 650; transition: all .2s ease; }
.step strong { font-weight: 500; }
.step.is-active { color: var(--ink); }
.step.is-active strong { font-weight: 700; }
.step.is-active span { color: #fff; border-color: var(--orange); background: var(--orange); box-shadow: 0 0 0 5px rgba(243,107,33,.1); }
.step.is-done span { color: var(--orange-dark); border-color: var(--orange); background: var(--orange-soft); }

.form-frame { display: grid; grid-template-columns: minmax(0, 1fr) 285px; min-height: 560px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.form-main { min-width: 0; padding: 30px 38px 35px 0; }
.form-aside { border-left: 1px solid var(--line); padding: 31px 0 31px 34px; }
.panel { display: none; animation: reveal .22s ease; }
.panel.is-active { display: block; }
@keyframes reveal { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.panel h2, .success-panel h2 { margin: 0 0 7px; font-size: 27px; line-height: 1.35; font-weight: 760; }
.panel h2 > span { color: var(--orange); font-variant-numeric: tabular-nums; }
.section-copy { margin: 0 0 24px; color: var(--muted); }
.panel-title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.demand-count { flex: 0 0 auto; margin-top: 4px; color: var(--orange-dark); background: var(--orange-soft); border: 1px solid #ffd8c2; border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 650; }

.fields { display: grid; gap: 18px 20px; }
.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { min-width: 0; }
.field.span-2 { grid-column: 1 / -1; }
.field label { display: block; margin: 0 0 7px; color: #242629; font-weight: 650; line-height: 1.45; }
.field label em { color: var(--orange-dark); font-style: normal; margin-left: 3px; }
.field label span { color: #85898e; font-size: 12px; font-weight: 400; margin-left: 7px; }
input, select, textarea, .fixed-value { width: 100%; border: 1px solid var(--line-dark); border-radius: 7px; background: #fff; color: var(--ink); padding: 10px 12px; outline: none; transition: border-color .16s ease, box-shadow .16s ease, background .16s ease; }
input, select, .fixed-value { height: 45px; }
textarea { resize: vertical; min-height: 84px; line-height: 1.6; }
input::placeholder, textarea::placeholder { color: #9a9da2; }
input:focus, select:focus, textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(243,107,33,.11); }
input:disabled, select:disabled { background: #f4f5f5; color: #8b8e92; }
.fixed-field { max-width: calc(50% - 10px); }
.fixed-value { display: flex; align-items: center; background: var(--soft); color: #50545a; }
.invalid { border-color: var(--danger) !important; box-shadow: 0 0 0 3px rgba(188,62,50,.09) !important; }

.requirement-card { margin: 0 0 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 9px 28px rgba(20,20,20,.035); overflow: hidden; }
.requirement-card-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 19px; border-bottom: 1px solid var(--line); background: #fafafa; }
.requirement-card-header > div { display: flex; align-items: center; gap: 10px; }
.requirement-card-header h3 { margin: 0; font-size: 17px; }
.requirement-index { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: var(--orange); color: #fff; font-weight: 700; font-size: 13px; }
.remove-requirement { border: 0; background: transparent; color: var(--danger); font-size: 13px; padding: 5px 0 5px 10px; }
.requirement-card .fields { padding: 20px; }
.add-button { width: 100%; min-height: 50px; display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px dashed #e4a17d; border-radius: 9px; background: var(--orange-soft); color: var(--orange-dark); font-weight: 650; }
.add-button:hover { background: #ffeadf; }
.add-button svg { width: 19px; height: 19px; }
.add-button:disabled { color: #999; border-color: var(--line); background: var(--soft); cursor: not-allowed; }

.review-block { margin: 18px 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.review-heading { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; background: #fafafa; border-bottom: 1px solid var(--line); }
.review-heading h3 { margin: 0; font-size: 16px; }
.review-heading button { border: 0; background: transparent; color: var(--orange-dark); padding: 3px; font-size: 13px; }
.review-profile { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); }
.review-profile div { background: #fff; padding: 13px 15px; }
.review-profile span, .review-demand span { display: block; color: var(--muted); font-size: 12px; }
.review-profile strong { display: block; margin-top: 3px; font-size: 14px; }
.review-demand { padding: 15px 16px; border-bottom: 1px solid var(--line); }
.review-demand:last-child { border-bottom: 0; }
.review-demand h4 { margin: 0 0 8px; font-size: 16px; }
.review-demand-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 20px; }
.review-demand p { margin: 2px 0 0; color: #35383d; }
.confirm-row { display: flex; align-items: flex-start; gap: 9px; margin: 20px 0 5px; cursor: pointer; }
.confirm-row input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--orange); }
.submit-error { min-height: 25px; color: var(--danger); font-size: 13px; margin-top: 5px; }

.success-panel { display: none; text-align: center; padding: 82px 20px; }
.success-panel.is-active { display: block; }
.success-icon { width: 60px; height: 60px; margin: 0 auto 20px; display: grid; place-items: center; border-radius: 50%; background: #eaf6ef; color: var(--success); }
.success-icon svg { width: 32px; height: 32px; stroke-width: 2.2; }
.success-panel p { margin: 8px auto 25px; color: var(--muted); max-width: 500px; }

.aside-section { padding: 0 0 26px; margin: 0 0 26px; border-bottom: 1px solid var(--line); }
.aside-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 11px; }
.aside-heading svg { width: 28px; height: 28px; color: var(--orange); }
.aside-heading h3 { margin: 0; font-size: 17px; }
.aside-section p { margin: 0; color: #53575c; font-size: 13px; }
.aside-section ul { margin: 14px 0 0; padding: 0; list-style: none; color: #53575c; font-size: 13px; }
.aside-section li { position: relative; padding-left: 14px; margin: 7px 0; }
.aside-section li::before { content: ""; position: absolute; left: 0; top: .7em; width: 4px; height: 4px; border-radius: 50%; background: var(--orange); }
.draft-note { border: 0; margin: 0; padding: 0; }
.draft-note span { display: inline-flex; color: var(--success); font-weight: 650; font-size: 13px; margin-bottom: 7px; }

.form-actions { min-height: 83px; display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; border-bottom: 1px solid var(--line); }
.button { min-height: 44px; border-radius: 7px; padding: 9px 20px; border: 1px solid var(--line-dark); background: #fff; color: var(--ink); font-weight: 650; transition: background .16s ease, border-color .16s ease, transform .16s ease; }
.button:hover { transform: translateY(-1px); }
.button.primary { min-width: 150px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; border-color: var(--orange); background: var(--orange); color: #fff; }
.button.primary:hover { background: var(--orange-dark); }
.button.primary:disabled { background: #c8c8c8; border-color: #c8c8c8; cursor: wait; transform: none; }
.button.secondary:hover { border-color: #aeb2b7; background: #fafafa; }
.button svg { width: 20px; height: 20px; }
.honeypot { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 100; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: #202124; color: #fff; border-radius: 8px; padding: 10px 16px; box-shadow: var(--shadow); transition: opacity .2s ease, transform .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 管理后台 */
.admin-body { background: #f5f6f6; }
.admin-topbar { height: 76px; }
.admin-brand { display: flex; align-items: center; gap: 22px; }
.admin-brand .logo { width: 100px; height: 52px; }
.admin-brand strong { padding-left: 21px; border-left: 1px solid var(--line); font-size: 17px; }
.admin-nav { display: flex; align-items: center; gap: 20px; }
.admin-nav a, .admin-nav button { border: 0; background: transparent; color: #4f5358; text-decoration: none; font-size: 13px; padding: 5px 0; }
.admin-page { padding: 32px 0 55px; }
.login-card { width: min(500px, 100%); margin: 70px auto; padding: 34px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
.login-card h1 { margin: 0; font-size: 27px; }
.login-card > p { margin: 8px 0 24px; color: var(--muted); }
.login-card label { display: block; font-weight: 650; margin-bottom: 7px; }
.login-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.admin-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.admin-title-row h1 { margin: 0; font-size: 31px; }
.admin-title-row p { margin: 5px 0 0; color: var(--muted); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-bottom: 18px; }
.stats-grid article { padding: 18px 20px; border: 1px solid var(--line); background: #fff; border-radius: 9px; }
.stats-grid span { color: var(--muted); font-size: 13px; }
.stats-grid strong { display: block; margin-top: 2px; font-size: 27px; line-height: 1.3; }
.filters { display: grid; grid-template-columns: 1.1fr 1.1fr .8fr 1.6fr auto auto; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.filters .button { min-height: 45px; }
.text-button { border: 0; background: transparent; color: var(--orange-dark); padding: 0 7px; }
.table-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; padding: 12px 3px 8px; }
.table-wrap { border: 1px solid var(--line); border-radius: 9px; background: #fff; overflow-x: auto; }
.data-table { width: 100%; min-width: 1050px; border-collapse: collapse; }
.data-table th { background: #fafafa; color: #4e5257; text-align: left; font-size: 12px; font-weight: 650; padding: 12px 13px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table td { padding: 13px; border-bottom: 1px solid #eceeef; vertical-align: top; font-size: 13px; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table strong, .data-table span { display: block; }
.data-table span { color: var(--muted); margin-top: 2px; }
.status-select { width: 96px; min-width: 96px; height: 36px; padding: 5px 7px; border-radius: 6px; font-size: 12px; }
.row-actions { display: flex; gap: 8px; white-space: nowrap; }
.row-actions button { border: 0; background: transparent; color: var(--orange-dark); padding: 4px 0; font-size: 12px; }
.row-actions .delete { color: var(--danger); }
.empty-state { padding: 60px 20px; text-align: center; color: var(--muted); }
.detail-dialog { width: min(760px, calc(100% - 32px)); max-height: 85vh; border: 0; border-radius: 12px; padding: 0; box-shadow: 0 24px 80px rgba(0,0,0,.2); }
.detail-dialog::backdrop { background: rgba(20,20,20,.42); }
.dialog-header { display: flex; justify-content: space-between; align-items: flex-start; padding: 20px 23px; border-bottom: 1px solid var(--line); }
.dialog-header span { color: var(--muted); font-size: 12px; }
.dialog-header h2 { margin: 3px 0 0; font-size: 22px; }
.dialog-header button { border: 0; background: transparent; font-size: 28px; line-height: 1; color: #777; }
#detail-content { padding: 21px 23px 27px; max-height: calc(85vh - 90px); overflow: auto; }
.detail-profile { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 20px; margin-bottom: 20px; padding: 14px 16px; background: var(--soft); border-radius: 8px; }
.detail-profile span, .detail-item span { display: block; color: var(--muted); font-size: 12px; }
.detail-profile strong, .detail-item p { display: block; margin: 2px 0 0; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 22px; }
.detail-item.wide { grid-column: 1 / -1; }
.detail-item p { white-space: pre-wrap; }

@media (max-width: 900px) {
  .form-frame { grid-template-columns: 1fr; }
  .form-main { padding-right: 0; }
  .form-aside { border: 0; border-top: 1px solid var(--line); padding: 26px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
  .aside-section { padding-right: 15px; }
  .draft-note { grid-column: 1 / -1; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .filters { grid-template-columns: 1fr 1fr; }
  .admin-title-row { align-items: flex-start; }
}

@media (max-width: 640px) {
  .shell { width: min(100% - 28px, 1240px); }
  .topbar { height: 72px; }
  .logo { width: 106px; height: 55px; }
  .online-status { font-size: 12px; }
  .topbar::after { display: none; }
  .page { padding-top: 25px; }
  .intro h1 { font-size: 27px; }
  .intro-subtitle { font-size: 15px; line-height: 1.55; }
  .safety-note { font-size: 13px; }
  .steps { margin: 27px 0; }
  .step strong { font-size: 12px; }
  .form-main { padding: 24px 0 28px; }
  .panel h2, .success-panel h2 { font-size: 23px; }
  .two-columns { grid-template-columns: 1fr; }
  .field.span-2 { grid-column: auto; }
  .fixed-field { max-width: none; }
  .requirement-card .fields { padding: 17px 15px; }
  .panel-title-row { display: block; }
  .demand-count { display: inline-flex; margin: -10px 0 18px; }
  .review-profile { grid-template-columns: 1fr 1fr; }
  .review-demand-grid { grid-template-columns: 1fr; }
  .form-aside { display: block; padding-top: 25px; }
  .form-actions { position: sticky; bottom: 0; z-index: 20; margin-left: -14px; margin-right: -14px; padding: 0 14px; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); }
  .button.primary { min-width: 132px; }
  .admin-brand strong { display: none; }
  .admin-page { padding-top: 20px; }
  .login-card { margin: 35px auto; padding: 24px 20px; }
  .login-row { grid-template-columns: 1fr; }
  .admin-title-row { display: block; }
  .admin-title-row .button { width: 100%; margin-top: 15px; }
  .stats-grid { gap: 9px; }
  .stats-grid article { padding: 14px; }
  .filters { grid-template-columns: 1fr; }
  .table-meta span:last-child { display: none; }
  .detail-grid, .detail-profile { grid-template-columns: 1fr; }
  .detail-item.wide { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
