:root {
  --bg: #0d1020;
  --bg-soft: #141833;
  --panel: #ffffff;
  --ink: #1c2130;
  --muted: #6b7280;
  --line: #e5e8f0;
  --primary: #5b5bd6;
  --primary-d: #4848b8;
  --accent: #00c2a8;
  --danger: #e0483e;
  --warn: #d98e04;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(20, 24, 51, .08);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: #f4f6fb; color: var(--ink); line-height: 1.65;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-d); }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
main { min-height: 60vh; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(90deg, #12142e 0%, #1b1f4a 60%, #123a4d 100%);
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.topbar-inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { width: 38px; height: 38px; border-radius: 9px; object-fit: cover; }
.brand-name { color: #fff; font-weight: 700; font-size: 18px; display: flex; flex-direction: column; line-height: 1.15; }
.brand-name small { font-size: 11px; color: #9ea3c7; font-weight: 400; }
.mainnav { display: flex; gap: 4px; flex: 1; }
.mainnav a { color: #cfd3ee; padding: 6px 14px; border-radius: 8px; font-size: 15px; }
.mainnav a:hover { background: rgba(255,255,255,.1); color: #fff; }
.tag-p1 { font-size: 10px; background: var(--accent); color: #06281f; padding: 1px 5px; border-radius: 5px; margin-left: 4px; vertical-align: 2px; }
.userbar { display: flex; align-items: center; gap: 12px; }
.ub-link { color: #cfd3ee; font-size: 14px; }
.ub-link:hover { color: #fff; }
.ub-link.admin { color: #ffd479; }
.ub-user { color: #fff; font-weight: 600; }
.inline-form { display: inline; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block; border: 1px solid transparent; cursor: pointer;
  padding: 9px 20px; border-radius: 10px; font-size: 14px; font-weight: 600;
  transition: .15s; text-align: center; background: none;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-d); color: #fff; }
.btn-outline { border-color: var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-ghost { color: var(--muted); }
.btn-ghost:hover { color: var(--ink); background: #eef0f8; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { opacity: .88; color: #fff; }
.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn-lg { padding: 13px 30px; font-size: 16px; }
.btn-block { display: block; width: 100%; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.btn-row.col { flex-direction: column; align-items: stretch; }

/* ---------- Hero ---------- */
.hero {
  background: radial-gradient(1200px 500px at 70% -10%, #2a2f6e 0%, transparent 60%),
              radial-gradient(800px 400px at 10% 110%, #0e4f4a 0%, transparent 55%),
              linear-gradient(120deg, #12142e, #181c45 55%, #0f2f3c);
  color: #fff; padding: 72px 0 56px;
}
.hero h1 { font-size: 40px; line-height: 1.3; max-width: 720px; }
.grad { background: linear-gradient(90deg, #7dd8ff, #6ef0d2); -webkit-background-clip: text; background-clip: text; color: transparent; display: block; }
.hero-sub { color: #b9bee0; margin: 16px 0 28px; font-size: 17px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero .btn-ghost { color: #cfd3ee; border: 1px solid rgba(255,255,255,.25); }
.hero .btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.hero .btn-outline { border-color: #6ef0d2; color: #6ef0d2; }
.hero .btn-outline:hover { background: #6ef0d2; color: #063a30; }
.hero-stats { display: flex; gap: 48px; margin-top: 44px; flex-wrap: wrap; }
.hero-stats b { font-size: 30px; display: block; }
.hero-stats span { color: #9ea3c7; font-size: 13px; }

/* ---------- 区块 ---------- */
.section { padding: 40px 20px 8px; }
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; gap: 12px; flex-wrap: wrap; }
.section-head h1, .section-head h2 { font-size: 24px; }
.more { font-size: 14px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.card {
  background: var(--panel); border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px;
  color: var(--ink); border: 1px solid transparent; transition: .15s;
}
a.card:hover { transform: translateY(-3px); border-color: var(--primary); color: var(--ink); }
.card h3 { font-size: 17px; }
.card-top { display: flex; gap: 6px; flex-wrap: wrap; }
.card-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 13px; }
.price { color: #e0621a; font-weight: 700; }
.score { color: var(--accent); font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.empty { padding: 30px; text-align: center; color: var(--muted); }

.badge { display: inline-block; font-size: 12px; background: #eef0f8; color: #4b5265; padding: 2px 9px; border-radius: 6px; }
.badge-genre { background: #e8e6fb; color: #4a3fb5; }
.badge-ai { background: #d8f5ef; color: #0a7a63; }
.badge-hot { background: #fde8dd; color: #b54a12; }
.badge-big { font-size: 14px; padding: 4px 14px; }

.trust { padding-bottom: 48px; }
.trust h2 { margin-bottom: 18px; }
.trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.trust-item { background: var(--panel); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.trust-item b { display: block; margin-bottom: 8px; color: var(--primary-d); }
.trust-item p { font-size: 14px; color: var(--muted); }

/* ---------- 页面与面板 ---------- */
.page { padding: 32px 20px 56px; }
.page.narrow { max-width: 860px; }
.page h1 { font-size: 26px; margin-bottom: 14px; }
.panel { background: var(--panel); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); margin-bottom: 20px; }
.panel h2 { font-size: 18px; margin-bottom: 14px; }
.panel.highlight { border: 1px solid var(--primary); }
.kv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px 20px; margin: 12px 0; }
.kv-grid span { display: block; font-size: 12px; color: var(--muted); }
.kv-grid b { font-weight: 600; }
.pre-wrap { white-space: pre-wrap; word-break: break-word; }
.logline { font-size: 16px; color: #3c4356; margin-bottom: 8px; }
.mono { font-family: ui-monospace, Menlo, monospace; font-size: 13px; }

.detail-layout { display: grid; grid-template-columns: 1fr 320px; gap: 22px; align-items: start; }
.detail-side { position: sticky; top: 84px; }
.trade-panel { text-align: center; }
.trade-price { font-size: 32px; font-weight: 800; color: #e0621a; margin-bottom: 6px; }
.trade-panel .btn { margin-top: 14px; }
.trade-panel .check-group { flex-direction: column; gap: 8px; text-align: left; margin: 8px 0 4px; }
.scope-label { display: block; font-size: 13px; font-weight: 600; text-align: left; margin-top: 10px; }

.eval-scores { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.eval-score-main, .eval-score { background: #f0f1fa; border-radius: 12px; padding: 12px 18px; text-align: center; }
.eval-score-main { background: linear-gradient(135deg, #5b5bd6, #00c2a8); color: #fff; }
.eval-score-main b, .eval-score b { font-size: 24px; display: block; }
.eval-score span, .eval-score-main span { font-size: 12px; opacity: .8; }
.eval-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 10px 0; }
.eval-cols h4 { margin-bottom: 6px; }
.eval-cols ul { padding-left: 18px; color: #3c4356; font-size: 14px; }
.locked-tip { background: #f7f8fd; border: 1px dashed var(--line); padding: 14px; border-radius: 10px; color: var(--muted); margin-top: 10px; }

/* ---------- 表单 ---------- */
.form label { display: block; margin-bottom: 14px; font-size: 14px; font-weight: 600; }
.form input, .form select, .form textarea, .filter-bar input, .filter-bar select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px;
  font-size: 14px; margin-top: 6px; font-family: inherit; background: #fff;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid #c9c8f2; border-color: var(--primary); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.check-line { display: flex; gap: 8px; align-items: center; font-weight: 400 !important; }
.check-line input { width: auto !important; margin: 0 !important; }
.role-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0 16px; }
.role-item { display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--line); border-radius: 10px; padding: 12px; cursor: pointer; font-weight: 400 !important; }
.role-item:hover { border-color: var(--primary); }
.role-item input { width: auto !important; margin: 0 !important; }
.role-item span { font-size: 12px; color: var(--muted); }

/* ---------- 认证页 ---------- */
.auth-page { display: flex; justify-content: center; padding: 56px 20px; }
.auth-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 36px; width: 420px; max-width: 100%; }
.auth-card.wide { width: 640px; }
.auth-card h1 { font-size: 22px; margin-bottom: 20px; }
.center { text-align: center; }
.demo-tip { margin-top: 18px; font-size: 12px; color: var(--muted); background: #f7f8fd; border-radius: 8px; padding: 10px; }
.demo-tip code { background: #eceef9; padding: 1px 5px; border-radius: 4px; }

.alert { background: #e9f7f4; border: 1px solid #bfe8dd; color: #0a6b56; padding: 12px 16px; border-radius: 10px; margin: 12px 0; font-size: 14px; }
.alert-error { background: #fdecea; border-color: #f5c6c2; color: #a02a22; }
.alert-warn { background: #fdf4e3; border-color: #f0dcae; color: #8a5b06; }
.flash { background: #e9f7f4; border: 1px solid #bfe8dd; color: #0a6b56; margin-top: 14px; padding: 10px 18px; border-radius: 10px; }

/* ---------- 表格 ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; color: var(--muted); font-weight: 600; font-size: 13px; padding: 10px 12px; border-bottom: 2px solid var(--line); }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.inline-flex { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-flex input { width: auto; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; }

/* ---------- 向导 ---------- */
.wstep legend { font-weight: 700; font-size: 17px; margin-bottom: 14px; }
.wstep { border: none; }
.wizard-bar { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; border-top: 1px solid var(--line); padding-top: 16px; }
.wizard-dots { display: flex; gap: 8px; }
.wizard-dots i { width: 10px; height: 10px; border-radius: 50%; background: #d9dcea; display: block; }
.wizard-dots i.on { background: var(--primary); }

/* ---------- 筛选条 ---------- */
.filter-bar { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.filter-bar input, .filter-bar select { width: auto; flex: 1; min-width: 120px; margin-top: 0; }

/* ---------- 投标 / 节点 ---------- */
.bid-item { border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-bottom: 12px; }
.bid-head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.ms-track { display: flex; gap: 8px; margin: 8px 0 18px; flex-wrap: wrap; }
.ms-node { flex: 1; min-width: 150px; background: #f0f1fa; border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.ms-dot { width: 12px; height: 12px; border-radius: 50%; background: #c6cbe0; }
.ms-funded .ms-dot, .ms-delivered .ms-dot { background: var(--warn); }
.ms-released .ms-dot { background: var(--accent); }
.ms-rework .ms-dot { background: var(--danger); }
.ms-card { border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-bottom: 12px; }
.ms-head { display: flex; gap: 14px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.deliverable { background: #f7f8fd; padding: 10px 14px; border-radius: 8px; margin: 8px 0; font-size: 14px; }
.dispute-box { display: inline-block; }
.dispute-box summary { list-style: none; display: inline-block; cursor: pointer; }
.dispute-box[open] summary { margin-bottom: 10px; }
.dispute-box form { min-width: 320px; }

.contract { background: #f7f8fd; border: 1px solid var(--line); border-radius: 10px; padding: 18px; font-size: 13px; white-space: pre-wrap; word-break: break-word; font-family: inherit; }
.review-item { display: flex; gap: 12px; align-items: baseline; padding: 10px 0; border-bottom: 1px dashed var(--line); flex-wrap: wrap; }

/* ---------- 钱包 / 收银台 ---------- */
.wallet-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 20px; }
.wallet-card span { color: var(--muted); font-size: 13px; display: block; margin-bottom: 6px; }
.wallet-card b { font-size: 26px; }
.recharge-form { display: flex; gap: 8px; }
.recharge-form input { margin-top: 0; }
.cashier-amount { font-size: 36px; font-weight: 800; text-align: center; margin: 18px 0; color: #e0621a; }
.in { color: #0a7a63; font-weight: 600; }
.out { color: #b54a12; font-weight: 600; }

/* ---------- 后台 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { text-align: center; color: var(--ink); }
.stat b { font-size: 26px; display: block; color: var(--primary-d); }
.stat span { font-size: 13px; color: var(--muted); }

.p1-hero { text-align: center; padding: 48px 30px; }
.p1-hero .trust-grid { text-align: left; margin-top: 24px; }

.check-group { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 14px; }
.form-section { font-size: 16px; margin: 20px 0 12px; padding-top: 14px; border-top: 1px dashed var(--line); }
.preview-box { background: #f7f8fd; border: 1px solid var(--line); border-radius: 10px; padding: 24px; text-align: center; }
.preview-box .btn { margin-bottom: 8px; }

/* ---------- 页脚 ---------- */
.footer { background: #12142e; color: #9ea3c7; padding: 32px 0; margin-top: 40px; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer strong { color: #fff; }
.footer p { font-size: 13px; margin-top: 6px; }
.footer-links { display: flex; flex-direction: column; gap: 6px; font-size: 13px; text-align: right; }

@media (max-width: 960px) {
  .detail-layout { grid-template-columns: 1fr; }
  .detail-side { position: static; }
  .mainnav { display: none; }
  .hero h1 { font-size: 30px; }
  .form-row, .eval-cols, .role-grid { grid-template-columns: 1fr; }
}
