:root {
  --ink: #16202e;
  --ink-2: #46586c;
  --muted: #7d8b9c;
  --line: #e3e9f0;
  --bg: #f5f7fa;
  --card: #ffffff;
  --brand: #1f5fa8;
  --brand-dark: #174a84;
  --brand-soft: #e8f1fb;
  --accent: #c8892b;
  --green: #1f8a5b;
  --red: #c0392b;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(22, 32, 46, .08);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", system-ui, sans-serif;
  color: var(--ink); background: var(--bg); line-height: 1.65;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* 公告条 */
.announce { background: var(--brand-dark); color: #fff; font-size: 14px; text-align: center; padding: 8px 16px; }
.announce:empty { display: none; }

/* 头部 */
.site-header { background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; }
.logo { display: flex; align-items: baseline; gap: 10px; }
.logo .name { font-size: 22px; font-weight: 700; color: var(--ink); }
.logo .sub { font-size: 13px; color: var(--muted); }
.nav { display: flex; flex-wrap: wrap; gap: 4px; }
.nav a { padding: 8px 12px; border-radius: 8px; color: var(--ink-2); font-size: 15px; }
.nav a:hover { background: var(--brand-soft); text-decoration: none; }
.nav a.active { color: var(--brand); background: var(--brand-soft); font-weight: 600; }

/* 通用区块 */
.hero { background: linear-gradient(135deg, #174a84 0%, #1f5fa8 60%, #2f79c4 100%); color: #fff; padding: 56px 0; }
.hero h1 { font-size: 32px; margin: 0 0 12px; }
.hero p { font-size: 17px; opacity: .92; max-width: 720px; }
.section { padding: 40px 0; }
.section h2 { font-size: 24px; margin: 0 0 20px; }
.grid { display: grid; gap: 18px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.card h3 { margin: 0 0 8px; font-size: 18px; }
.muted { color: var(--muted); font-size: 14px; }

/* 按钮 */
.btn { display: inline-block; border: 0; cursor: pointer; border-radius: 10px; padding: 10px 18px; font-size: 15px; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); text-decoration: none; }
.btn-ghost { background: #fff; color: var(--brand); border: 1px solid var(--brand); }
.btn-light { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn-danger { background: #fbeae8; color: var(--red); }

/* 表格 */
.table-wrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; }
th { background: var(--bg); color: var(--ink-2); font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; }
.price { font-weight: 700; color: var(--brand-dark); }
.buy-range { color: var(--ink-2); }

/* 筛选栏 */
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 18px; }
.filters select, .filters input[type=text] { padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 15px; background: #fff; }
.filters input[type=text] { min-width: 200px; }

/* 表单 */
.form-grid { display: grid; gap: 16px; }
.form-grid.cols-2 { grid-template-columns: 1fr 1fr; }
label.field { display: block; font-size: 14px; color: var(--ink-2); }
label.field span.req { color: var(--red); }
label.field input, label.field select, label.field textarea {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px; font-size: 15px; background: #fff;
}
label.field textarea { resize: vertical; min-height: 84px; }

/* 徽章/状态 */
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; }
.badge.pending { background: #fff4e0; color: var(--accent); }
.badge.quoted { background: var(--brand-soft); color: var(--brand); }
.badge.done { background: #e6f4ec; color: var(--green); }
.badge.cancelled { background: #eee; color: var(--muted); }
.tag { display: inline-block; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 2px 10px; font-size: 13px; color: var(--ink-2); margin: 2px 4px 2px 0; }

/* FAQ */
.faq-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; }
.faq-q { padding: 16px 20px; cursor: pointer; font-weight: 600; display: flex; justify-content: space-between; gap: 12px; }
.faq-a { padding: 0 20px 16px; color: var(--ink-2); display: none; }
.faq-item.open .faq-a { display: block; }

/* 步骤 */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; text-align: center; }
.step .no { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 700; display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; }

/* 页脚 */
.site-footer { background: #1c2836; color: #c8d3df; margin-top: 48px; padding: 36px 0 20px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
.site-footer h4 { color: #fff; margin: 0 0 12px; }
.site-footer a { color: #c8d3df; }
.copyright { margin-top: 24px; padding-top: 16px; border-top: 1px solid #334456; font-size: 13px; color: #8fa1b3; }

/* 提示条 */
.alert { padding: 12px 16px; border-radius: 10px; margin: 12px 0; font-size: 15px; }
.alert.ok { background: #e6f4ec; color: var(--green); }
.alert.err { background: #fbeae8; color: var(--red); }
.hidden { display: none !important; }

/* 后台 */
.admin-wrap { max-width: 1180px; margin: 0 auto; padding: 24px 20px; }
.admin-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 20px; }
.admin-tabs button { border: 1px solid var(--line); background: #fff; padding: 9px 16px; border-radius: 10px; cursor: pointer; font-size: 15px; color: var(--ink-2); }
.admin-tabs button.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.stat-pill { background: var(--brand-soft); color: var(--brand); border-radius: 999px; padding: 4px 12px; font-size: 14px; }

@media (max-width: 900px) {
  .grid.cols-3, .grid.cols-2, .form-grid.cols-2, .footer-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .header-inner { flex-direction: column; align-items: flex-start; }
}
