/* ============================================================
   编辑风 · 米白纸感 / 墨色 / 发丝线 / 深色胶囊 / 颗粒
   （风格参考：Cast & Render 提示词，适配中文与多页表单）
   ============================================================ */
:root {
  --fg: #0d0c0b;
  --fg-soft: rgba(13, 12, 11, .64);
  --fg-faint: rgba(13, 12, 11, .42);
  --shade: #f2f0ec;
  --card: #fbfaf8;
  --rule: rgba(13, 12, 11, .16);
  --rule-weak: rgba(13, 12, 11, .09);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --pill-bg: #0a0908;
  --pill-fg: #ffffff;
  --danger: #a33a2e;
  --radius: 4px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--shade);
  color: var(--fg);
  font: 400 15px/1.75 'Inter Tight', 'Helvetica Neue', Helvetica, Arial,
    'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: underline; text-decoration-color: rgba(13,12,11,.28); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--fg); }
::selection { background: rgba(13, 12, 11, .88); color: #fff; }
.wrap { max-width: 920px; margin: 0 auto; padding: 0 clamp(18px, 4vw, 32px); }

/* ---------- 顶部 chrome ---------- */
.chrome {
  position: sticky; top: 0; z-index: 40;
  background: linear-gradient(to bottom, rgba(242,240,236,.96) 0%, rgba(242,240,236,.82) 74%, rgba(242,240,236,0) 100%);
}
.chrome-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 62px; }
.mark {
  display: flex; align-items: center; gap: 9px;
  font-size: 15.5px; letter-spacing: -.012em; font-weight: 500;
  text-decoration: none; min-width: 0; flex-shrink: 1;
}
.mark-star { opacity: .85; font-size: 13px; }
.nav { display: flex; align-items: center; gap: clamp(16px, 3vw, 34px); flex-shrink: 0; }
.nav a {
  font-size: 14.5px; letter-spacing: -.008em; text-decoration: none;
  opacity: .88; transition: opacity .3s var(--ease);
}
.nav a:hover { opacity: 1; }

main { padding: clamp(28px, 5vw, 52px) 0 72px; }

/* ---------- 标题与文字 ---------- */
.page-title {
  font-weight: 500; letter-spacing: -.015em;
  font-size: clamp(24px, 3.6vw, 32px); line-height: 1.15;
  margin: 6px 0 22px; text-wrap: balance;
}
h2 { font-size: 16px; font-weight: 500; letter-spacing: -.008em; margin: 0 0 14px; }
.eyebrow {
  display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap;
  font-size: 12.5px; letter-spacing: .045em; color: var(--fg-soft);
  margin-bottom: clamp(14px, 2vw, 20px);
}
.eyebrow .dot { opacity: .5; }
.muted { color: var(--fg-soft); }
.faint { color: var(--fg-faint); }
.small { font-size: 13px; }
.center { text-align: center; }
.hint { color: var(--fg-faint); font-size: 13px; margin: 7px 0 0; letter-spacing: .005em; }

/* ---------- 卡片：发丝线 + 纸面 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 30px);
  margin-bottom: 22px;
}

/* ---------- 胶囊按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 42px; padding: 0 22px; border-radius: 999px;
  font: 500 14.5px/1 inherit; letter-spacing: -.008em;
  cursor: pointer; text-decoration: none; border: 1px solid transparent;
  transition: transform .4s var(--ease), background .3s var(--ease),
    color .3s var(--ease), border-color .3s var(--ease);
  -webkit-text-fill-color: currentColor;
}
.btn.primary { background: var(--pill-bg); color: var(--pill-fg); -webkit-text-fill-color: var(--pill-fg); }
.btn.primary:hover { transform: translateY(-2px); background: #000; text-decoration: none; }
.btn.ghost { background: transparent; border-color: var(--rule); color: var(--fg); }
.btn.ghost:hover { border-color: var(--fg); text-decoration: none; }
.btn.danger { background: transparent; border-color: rgba(163,58,46,.4); color: var(--danger); }
.btn.danger:hover { background: rgba(163,58,46,.06); border-color: var(--danger); }
.btn.small { height: 32px; padding: 0 14px; font-size: 13px; }
.btn.full { width: 100%; }
.btn:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }

/* ---------- 首页 hero：颗粒 + 大字 ---------- */
.hero {
  position: relative; overflow: hidden;
  text-align: center;
  padding: clamp(44px, 8vw, 84px) clamp(18px, 4vw, 40px);
  margin-bottom: 44px;
}
.hero::after {  /* SVG 湍流颗粒，防止平涂渐变出现条带 */
  content: ""; position: absolute; inset: -50%; pointer-events: none;
  opacity: .12; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/></filter><rect width='140' height='140' filter='url(%23n)' opacity='.5'/></svg>");
}
.hero > * { position: relative; z-index: 1; }
.hero h1 {
  font-weight: 400; letter-spacing: -.028em;
  font-size: clamp(34px, 7vw, 76px); line-height: 1.04;
  max-width: 18ch; margin: 0 auto; text-wrap: balance;
}
.hero .sub {
  margin: clamp(16px, 2.4vw, 26px) auto 0;
  font-size: clamp(14.5px, 1.3vw, 17px); line-height: 1.6; letter-spacing: -.005em;
  color: var(--fg-soft); max-width: 46ch; text-wrap: pretty;
}
.hero-actions {
  margin-top: clamp(26px, 3.6vw, 42px);
  display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; pointer-events: auto;
}
.hero .btn { height: 48px; padding: 0 27px; font-size: 15px; }

.sec-title {
  font-size: 12.5px; font-weight: 500; letter-spacing: .045em;
  color: var(--fg-soft); margin: 40px 0 16px; text-transform: uppercase;
}

/* 流程：编号列表 */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li {
  counter-increment: step;
  display: flex; gap: 18px; align-items: baseline;
  padding: 15px 4px; border-top: 1px solid var(--rule-weak);
}
.steps li:last-child { border-bottom: 1px solid var(--rule-weak); }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-size: 12.5px; letter-spacing: .06em; color: var(--fg-faint);
  min-width: 2.2em; flex-shrink: 0;
}
.steps b { font-weight: 500; letter-spacing: -.005em; display: block; }
.steps span { font-size: 13.5px; color: var(--fg-soft); line-height: 1.65; display: block; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: stretch; }
.grid2 .card { margin-bottom: 0; height: 100%; }
.plain { margin: 0; padding: 0; list-style: none; }
.plain li { padding: 9px 0; border-top: 1px solid var(--rule-weak); font-size: 14px; line-height: 1.7; }
.plain li:first-child { border-top: 0; padding-top: 2px; }
.plain b { font-weight: 500; }
.contact-line { font-size: 15px; margin: 4px 0; letter-spacing: .005em; }

/* ---------- 表单 ---------- */
.form { max-width: 720px; }
.field { margin-bottom: 20px; flex: 1; min-width: 0; }
.field label {
  display: flex; gap: 6px; font-size: 13px; font-weight: 500;
  letter-spacing: .02em; margin-bottom: 8px; color: var(--fg);
}
.field input, .field textarea, .field select {
  width: 100%;
  border: 1px solid var(--rule); border-radius: var(--radius);
  background: transparent; color: var(--fg);
  padding: 11px 13px; font: inherit; letter-spacing: -.003em;
  outline: none; transition: border-color .25s var(--ease), background .25s var(--ease);
}
.field textarea { resize: vertical; min-height: 120px; line-height: 1.7; }
.field select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M1 1l4 4 4-4' stroke='%230d0c0b' stroke-opacity='.55' fill='none' stroke-width='1.4'/></svg>"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.field input::placeholder, .field textarea::placeholder { color: var(--fg-faint); }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--fg); background: rgba(255,255,255,.5);
}
.field-row { display: flex; gap: 18px; }
.req { color: var(--danger); font-style: normal; font-size: 12px; }
.form-foot { display: flex; align-items: center; gap: 18px; margin-top: 4px; flex-wrap: wrap; }
.inline-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.inline-form input[type="number"] { width: 150px; }
.inline-form input[type="file"] { flex: 1; min-width: 220px; font-size: 13.5px; color: var(--fg-soft); }
input[type="file"]::file-selector-button {
  border: 1px solid var(--rule); border-radius: 999px; background: transparent;
  color: var(--fg); font: 500 13px/1 inherit; padding: 7px 15px; margin-right: 12px;
  cursor: pointer; transition: border-color .25s var(--ease);
}
input[type="file"]::file-selector-button:hover { border-color: var(--fg); }

/* ---------- 提交成功 ---------- */
.ok-big { font-size: clamp(20px, 3vw, 26px); font-weight: 500; letter-spacing: -.015em; margin: 4px 0 10px; }
.order-no { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 16px 0; flex-wrap: wrap; }
.order-no span {
  font-family: 'SF Mono', Consolas, Menlo, monospace;
  font-size: clamp(20px, 3.4vw, 30px); letter-spacing: .04em;
  border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 10px 22px; background: rgba(255,255,255,.45);
}

/* ---------- 查询 ---------- */
.search-row { display: flex; gap: 12px; }
.search-row input {
  flex: 1; border: 1px solid var(--rule); border-radius: var(--radius);
  background: transparent; padding: 12px 15px;
  font: 400 15.5px/1.4 'SF Mono', Consolas, Menlo, monospace; letter-spacing: .03em;
  color: var(--fg); outline: none; transition: border-color .25s var(--ease), background .25s var(--ease);
}
.search-row input::placeholder { font-family: inherit; color: var(--fg-faint); }
.search-row input:focus { border-color: var(--fg); background: rgba(255,255,255,.5); }
.track-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 6px; }
.ono-mid { font-family: 'SF Mono', Consolas, Menlo, monospace; font-size: 19px; letter-spacing: .03em; font-weight: 500; }
.order-title { margin: 2px 0 16px; font-size: 21px; font-weight: 500; letter-spacing: -.012em; }

/* 状态 pill（纸面同色系） */
.pill {
  display: inline-block; font-size: 12.5px; font-weight: 500; letter-spacing: .02em;
  border-radius: 999px; padding: 3px 13px; white-space: nowrap;
  border: 1px solid; vertical-align: middle;
}
.s-submitted { color: #8a6114; border-color: rgba(138,97,20,.35); background: rgba(214,178,94,.12); }
.s-priced    { color: #1d4f9c; border-color: rgba(29,79,156,.32); background: rgba(58,110,196,.09); }
.s-paid      { color: #5b3a91; border-color: rgba(91,58,145,.32); background: rgba(147,106,210,.10); }
.s-done      { color: #1f6b40; border-color: rgba(31,107,64,.32); background: rgba(63,150,100,.10); }
.s-cancelled { color: var(--fg-faint); border-color: var(--rule); background: transparent; }
.s-archived  { color: var(--fg-faint); border-color: var(--rule); background: transparent; border-style: dashed; }

/* 时间线 */
.timeline { list-style: none; margin: 6px 0 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 22px 24px; }
.timeline li::before {
  content: ""; position: absolute; left: 2px; top: 8px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--shade); border: 1.5px solid var(--rule);
}
.timeline li::after {
  content: ""; position: absolute; left: 5.5px; top: 21px; bottom: 0;
  width: 1px; background: var(--rule);
}
.timeline li:last-child { padding-bottom: 4px; }
.timeline li:last-child::after { display: none; }
.timeline li.done::before { background: var(--fg); border-color: var(--fg); }
.timeline li.next::before { border-color: var(--fg); box-shadow: 0 0 0 4px rgba(13,12,11,.08); }
.timeline b { font-size: 14.5px; font-weight: 500; letter-spacing: -.005em; }
.timeline li.wait b { color: var(--fg-faint); font-weight: 400; }
.timeline time { display: block; font-size: 12px; color: var(--fg-faint); letter-spacing: .03em; }

/* 键值表 */
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 0 26px; margin: 0; }
.kv > div {
  display: flex; gap: 12px; font-size: 13.5px;
  border-top: 1px solid var(--rule-weak); padding: 8px 0;
}
.kv dt { color: var(--fg-faint); min-width: 76px; flex-shrink: 0; letter-spacing: .02em; }
.kv dd { margin: 0; word-break: break-all; }

.note { border: 1px solid var(--rule-weak); border-left: 2px solid var(--fg); border-radius: 0 var(--radius) var(--radius) 0; padding: 10px 15px; font-size: 14px; }
.pay-box { border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px 17px; margin-bottom: 8px; background: rgba(255,255,255,.45); }
.pay-box p { margin: 4px 0; }

/* 预览 */
.preview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 12px 0 16px; }
.preview-grid a { text-align: center; font-size: 12px; letter-spacing: .03em; color: var(--fg-faint); display: block; }
.preview-grid img {
  width: 100%; display: block; margin-bottom: 6px;
  border: 1px solid var(--rule); border-radius: 2px;
  transition: transform .4s var(--ease);
}
.preview-grid a:hover { text-decoration: none; color: var(--fg-soft); }
.preview-grid a:hover img { transform: translateY(-3px); }

/* 文件列表 & 表格 */
.filelist { list-style: none; margin: 0 0 16px; padding: 0; }
.filelist li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--rule-weak); font-size: 14px; }
.filelist li:first-child { border-top: 0; }
.filelist .fname { flex: 1; word-break: break-all; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th {
  color: var(--fg-faint); font-weight: 500; text-align: left; letter-spacing: .04em;
  padding: 10px 12px; border-bottom: 1px solid var(--rule); white-space: nowrap;
}
td { padding: 11px 12px; border-bottom: 1px solid var(--rule-weak); }
tbody tr:hover td { background: rgba(255,255,255,.5); }
td.tt { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td a { text-decoration: none; border-bottom: 1px solid rgba(13,12,11,.25); }
td a:hover { border-bottom-color: var(--fg); }

/* ---------- 工作台（仅后台，不经导航入口） ---------- */
.stat-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-bottom: 20px; }
.stat { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px 18px; }
.stat b { display: block; font-size: 24px; font-weight: 500; letter-spacing: -.02em; }
.stat span { font-size: 12px; color: var(--fg-faint); letter-spacing: .03em; }
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.chips a {
  border: 1px solid var(--rule); border-radius: 999px; padding: 4px 15px;
  font-size: 13px; color: var(--fg-soft); text-decoration: none;
  transition: all .25s var(--ease);
}
.chips a.on { background: var(--pill-bg); border-color: var(--pill-bg); color: #fff; -webkit-text-fill-color: #fff; }
.chips a:hover { text-decoration: none; border-color: var(--fg); color: var(--fg); }
.chips a.on:hover { border-color: var(--pill-bg); color: #fff; }
.admin-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 0 22px; align-items: start; }
.admin-head { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.admin-head .page-title { margin: 8px 0 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.admin-link { font-size: 13.5px; color: var(--fg-soft); text-decoration: none; border-bottom: 1px solid transparent; }
.admin-link:hover { color: var(--fg); border-bottom-color: var(--fg); }
.act .hint { margin-top: 9px; }
.danger-zone h2 { color: var(--danger); }
.req-block { margin-top: 16px; font-size: 14px; }
.req-block p {
  white-space: pre-wrap; margin: 8px 0 0;
  border: 1px solid var(--rule-weak); border-radius: var(--radius);
  padding: 13px 15px; background: rgba(255,255,255,.4);
}

/* 登录 */
.login-wrap { display: flex; justify-content: center; padding-top: 44px; }
.login-card { width: 360px; max-width: 100%; }
.login-card h1 { font-size: 19px; font-weight: 500; letter-spacing: -.01em; margin: 0 0 20px; text-align: center; }

/* 提示条 */
.flashes { margin: 0 0 20px; }
.flash { border-radius: var(--radius); padding: 11px 16px; font-size: 13.5px; margin-bottom: 10px; border: 1px solid; letter-spacing: .005em; }
.flash.ok { background: rgba(63,150,100,.08); color: #1f6b40; border-color: rgba(31,107,64,.28); }
.flash.err { background: rgba(163,58,46,.06); color: var(--danger); border-color: rgba(163,58,46,.28); }

/* 错误页 */
.error-card { max-width: 460px; margin: 44px auto; }
.error-code { font-size: 44px; font-weight: 400; letter-spacing: -.03em; margin: 6px 0 2px; }

/* 页脚 */
.foot { border-top: 1px solid var(--rule); padding: 26px 0 34px; text-align: center; }
.foot p { margin: 3px 0; font-size: 13px; letter-spacing: .01em; color: var(--fg-soft); }
.foot .faint { font-size: 12px; letter-spacing: .03em; }
.foot b { color: var(--fg); font-weight: 500; }
.foot a { text-decoration: none; border-bottom: 1px solid rgba(13,12,11,.3); }
.foot a:hover { border-bottom-color: var(--fg); }

@media (max-width: 860px) {
  .stat-row { grid-template-columns: repeat(3, 1fr); }
  .admin-grid { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .grid2 { grid-template-columns: 1fr; }
  .preview-grid { grid-template-columns: repeat(2, 1fr); }
  .field-row { flex-direction: column; gap: 0; }
  .nav { gap: 15px; }
  .nav a { font-size: 13.5px; }
  .steps li { gap: 12px; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}
