* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, #ffffff 0%, #EFF3FC 100%);
  color: #333; line-height: 1.6; min-height: 100vh;
}
a { color: #2563eb; text-decoration: none; }
a:hover { color: #1D3866; }
code { background: #eef2ff; padding: 2px 6px; border-radius: 4px; font-size: 0.92em; }

.container { max-width: 1280px; margin: 0 auto; padding: 24px; }
.container.narrow { max-width: 560px; }

/* 顶部导航 - 深蓝渐变 */
.topbar {
  background: linear-gradient(135deg, #070C16 0%, #1D3866 100%);
  padding: 14px 28px;
  display: flex; justify-content: space-between; align-items: center;
  box-shadow: 0 2px 12px rgba(7,12,22,0.15);
}
.topbar strong { color: #fff; font-size: 16px; font-weight: 600; }
.topbar span { color: rgba(255,255,255,0.85); font-size: 13px; display: flex; align-items: center; gap: 12px; }
.topbar span a { color: rgba(255,255,255,0.9); }
.topbar span a:hover { color: #60a5fa; }

.hero { text-align: center; margin: 36px 0 28px; }
.hero h1 { font-size: 26px; color: #1D3866; margin-bottom: 8px; }
.hero .muted { font-size: 14px; }

/* 表单卡片 */
.form {
  background: #fff; border-radius: 14px; padding: 32px;
  box-shadow: 0 4px 24px rgba(29,56,102,0.08);
}
.form label { display: block; margin: 16px 0; font-size: 14px; color: #444; }
/* 所有 input 统一样式，不按 type 区分 */
.form input,
.form textarea,
.form select {
  display: block;
  width: 100%;
  padding: 11px 14px;
  margin-top: 6px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  background: #f8fafc;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.form input:focus,
.form textarea:focus,
.form select:focus {
  outline: none;
  border-color: #1D3866;
  box-shadow: 0 0 0 3px rgba(29,56,102,0.1);
  background: #fff;
}
.form textarea { resize: vertical; }
.form .check { display: flex; align-items: center; gap: 8px; }
.form .check input { width: auto; margin-top: 0; }

/* 按钮 - 品牌蓝渐变 */
.btn {
  display: inline-block; padding: 10px 20px; border-radius: 10px;
  border: none; cursor: pointer; font-size: 14px; font-weight: 500;
  transition: all 0.2s; text-align: center; text-decoration: none;
}
.btn.primary {
  background: linear-gradient(135deg, #1D3866 0%, #2563eb 100%);
  color: #fff; box-shadow: 0 4px 14px rgba(37,99,235,0.3);
}
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(37,99,235,0.4); color: #fff; }
.btn.big { width: 100%; padding: 14px; font-size: 16px; margin-top: 8px; }
.btn.small { padding: 5px 12px; font-size: 13px; }
.btn:disabled { background: #94a3b8; box-shadow: none; cursor: not-allowed; transform: none; }

/* 提示框 */
.alert { padding: 12px 16px; border-radius: 10px; margin: 12px 0; font-size: 14px; }
.alert.error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert.info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

.muted { color: #6b7280; font-size: 13px; }
.center { text-align: center; }
.req { color: #dc2626; }

/* 表格 */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,0.05); }
.table th, .table td { padding: 13px 14px; border-bottom: 1px solid #f1f5f9; text-align: left; font-size: 14px; }
.table td.wrap { white-space: normal; }
.table th { background: #f8fafc; color: #475569; font-weight: 600; }
.table tr:hover td { background: #f8fafc; }
.tag { padding: 3px 10px; border-radius: 999px; font-size: 12px; background: #e2e8f0; color: #475569; }
.tag.ok { background: #dcfce7; color: #166534; }
.tag.err { background: #fee2e2; color: #991b1b; }
.danger { color: #dc2626; }

.page-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.page-head h1 { color: #1D3866; font-size: 22px; }

/* 报告页 */
.report { background: #fff; padding: 48px 56px; border-radius: 16px; box-shadow: 0 4px 24px rgba(0,0,0,0.06); overflow: hidden; }
.report-meta { border-bottom: 1px solid #e2e8f0; padding-bottom: 20px; margin-bottom: 28px; }
.report-meta h1 { color: #1D3866; margin-bottom: 8px; font-size: 28px; }
.report-meta .muted { font-size: 13px; }
.md { font-size: 15px; line-height: 1.9; color: #333; }
.md p { margin: 12px 0; }
.md h1 { font-size: 22px; color: #1D3866; border-bottom: 2px solid #EFF3FC; padding-bottom: 10px; margin-top: 36px; }
.md h2 { font-size: 19px; color: #1D3866; margin-top: 30px; padding-left: 10px; border-left: 4px solid #1D3866; }
.md h3 { font-size: 16px; color: #334155; margin-top: 24px; font-weight: 600; }
.md ul, .md ol { padding-left: 24px; margin: 12px 0; }
.md li { margin: 6px 0; }
.md table { border-collapse: collapse; width: 100%; margin: 16px 0; font-size: 14px; }
.md table th, .md table td { border: 1px solid #e2e8f0; padding: 10px 14px; text-align: left; }
.md table th { background: #f8fafc; font-weight: 600; color: #475569; }
.md table tr:hover td { background: #f8fafc; }
.md pre { background: #0f172a; color: #e2e8f0; padding: 16px; border-radius: 10px; overflow-x: auto; font-size: 13px; line-height: 1.6; }
.md code { background: #f1f5f9; padding: 2px 6px; border-radius: 4px; font-size: 13px; }
.md pre code { background: transparent; color: inherit; padding: 0; }
.md blockquote { border-left: 3px solid #1D3866; padding-left: 16px; color: #64748b; margin: 16px 0; }

/* 等待页 spinner */
.spinner {
  width: 48px; height: 48px; margin: 0 auto;
  border: 4px solid #e2e8f0; border-top-color: #1D3866;
  border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 页面布局工具类 */
.page-auth { padding-top: 50px; }
.captcha-row { display: flex; gap: 8px; align-items: flex-start; }
.captcha-row input { flex: 1; margin-top: 0; }
.captcha-row img { cursor: pointer; height: 44px; width: auto; border: 1px solid #e2e8f0; border-radius: 8px; flex-shrink: 0; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }

@media (max-width: 640px) {
  .topbar { padding: 12px 16px; flex-direction: column; gap: 8px; }
  .form { padding: 20px; }
  .container { padding: 16px; }
}

@media print {
  .topbar, .btn { display: none !important; }
  body { background: #fff; }
  .report { box-shadow: none; padding: 0; }
}

/* 品牌标识 */
.brand-link { display: flex; align-items: baseline; gap: 6px; text-decoration: none; }
.brand-link strong { color: #fff; font-size: 18px; font-weight: 700; letter-spacing: 1px; }
.brand-link small { color: rgba(255,255,255,0.6); font-size: 12px; }

/* 底部版权 */
.footer {
  text-align: center; padding: 32px 24px; margin-top: 48px;
  color: #6b7280; font-size: 13px; border-top: 1px solid #e2e8f0;
}
.footer p { margin: 4px 0; }
.footer a { color: #1D3866; }

.table th.col-id, .table td.col-id { width: 55px; white-space: nowrap; }
.table th.col-actions, .table td.col-actions { width: 130px; white-space: nowrap; }
.table th.col-status, .table td.col-status { width: 95px; white-space: nowrap; }
.table th.col-time, .table td.col-time { width: 180px; white-space: nowrap; }
.nowrap { white-space: nowrap; }

.notice-bar {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 12px 16px;
  margin: 0 0 20px;
  font-size: 13px;
  color: #92400e;
  line-height: 1.6;
}
.notice-bar a { color: #b45309; font-weight: 600; text-decoration: underline; }

.report-footer {
  margin-top: 30px;
  padding: 20px;
  background: #f8fafc;
  border-radius: 10px;
  text-align: center;
  font-size: 13px;
  color: #475569;
}
.report-footer strong { color: #1D3866; }
