/* ============ 证书在线查询核验系统 共用样式 ============ */
:root {
  --primary: #1e5aa8;
  --primary-deep: #123a6d;
  --gold: #c9a45c;
  --gold-deep: #a1812b;
  --bg: #eef2f7;
  --card: #ffffff;
  --text: #1c2733;
  --muted: #667085;
  --line: #e3e8ef;
  --ok: #16a34a;
  --danger: #dc2626;
  --warn: #d97706;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(18, 58, 109, .08);
  --shadow-lg: 0 14px 40px rgba(18, 58, 109, .16);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.flex { display: flex; align-items: center; }
.gap { gap: 10px; }
.mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.hidden { display: none !important; }
.text-muted { color: var(--muted); }
.text-center { text-align: center; }

/* ---------- 顶栏 ---------- */
.site-header {
  background: linear-gradient(120deg, #0d2f5c 0%, var(--primary) 55%, #2e74c4 100%);
  color: #fff;
  box-shadow: 0 4px 18px rgba(13, 47, 92, .25);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; min-height: 76px; flex-wrap: wrap; gap: 8px; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand .logo {
  width: 46px; height: 46px; border-radius: 12px;
  background: linear-gradient(135deg, var(--gold), #f0d9a0);
  display: inline-flex; align-items: center; justify-content: center;
  color: #6b4e0a; font-size: 26px;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.55);
}
.brand h1 { margin: 0; font-size: 21px; letter-spacing: 1px; font-weight: 700; }
.brand .sub { font-size: 12px; opacity: .78; letter-spacing: 2px; }
.header-link {
  color: #fff; opacity: .85; font-size: 14px;
  border: 1px solid rgba(255,255,255,.4); border-radius: 999px; padding: 6px 16px;
}
.header-link:hover { opacity: 1; text-decoration: none; background: rgba(255,255,255,.12); }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,.6);
  padding: 24px;
}
.section-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 18px; font-weight: 700; margin: 0 0 16px;
}
.section-title::before {
  content: ""; width: 5px; height: 22px; border-radius: 4px;
  background: linear-gradient(180deg, var(--gold), var(--primary));
}

/* ---------- 表单 ---------- */
label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; color: #344054; }
input, select, textarea {
  width: 100%;
  border: 1px solid #cfd8e3;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 90, 168, .14);
}
input[readonly] { background: #f4f6f9; color: #5a6572; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 10px;
  padding: 10px 20px; font-size: 15px; font-weight: 600; cursor: pointer;
  font-family: inherit; transition: all .15s; white-space: nowrap; background: transparent;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, #245fae, #163f77); color: #fff; }
.btn-primary:hover:not(:disabled) { filter: brightness(1.12); }
.btn-gold { background: linear-gradient(135deg, #d9b25e, var(--gold-deep)); color: #fff; }
.btn-gold:hover:not(:disabled) { filter: brightness(1.08); }
.btn-ghost { border-color: #cfd8e3; color: #344054; background: #fff; }
.btn-ghost:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.btn-success { background: var(--ok); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger-ghost { border-color: #f3b6b6; color: var(--danger); background: #fff; }
.btn-danger-ghost:hover { background: var(--danger); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }

/* ---------- 徽章 / 提示 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
}
.badge-ok { background: #e5f7ec; color: #137a38; }
.badge-danger { background: #fdeaea; color: #b91c1c; }
.badge-info { background: #e8f0fc; color: var(--primary); }
.badge-gold { background: #faf3df; color: #8a6d1f; }
.alert {
  border-radius: 12px; padding: 13px 16px; font-size: 14px;
  display: flex; gap: 10px; align-items: flex-start; line-height: 1.55;
}
.alert-error { background: #fdeaea; color: #991b1b; border: 1px solid #f5c2c2; }
.alert-ok { background: #e8f8ee; color: #116b36; border: 1px solid #bfe8cf; }
.alert-info { background: #eaf1fc; color: #1d4e89; border: 1px solid #c8daf2; }

/* ---------- 页脚 ---------- */
.site-footer {
  margin-top: auto;
  background: #fff; border-top: 1px solid var(--line);
  padding: 20px 0; color: #7b8694; font-size: 13px;
}
.site-footer .container { display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- Toast ---------- */
#toastWrap {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  z-index: 9999; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none;
}
.toast {
  background: #1f2937; color: #fff; padding: 11px 22px; border-radius: 999px;
  font-size: 14px; box-shadow: 0 8px 26px rgba(0,0,0,.2);
  animation: toastIn .22s ease;
  max-width: 86vw; text-align: center;
}
.toast.err { background: var(--danger); }
.toast.ok { background: #137a38; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; } }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .brand h1 { font-size: 18px; }
  .site-header .container { min-height: 64px; }
}
@media (max-width: 600px) {
  body { font-size: 14px; }
  .container { padding: 0 12px; }
  .brand h1 { font-size: 16px; letter-spacing: 0; }
  .brand .sub { font-size: 10px; letter-spacing: 1px; }
  .brand .logo { width: 38px; height: 38px; font-size: 21px; }
  .header-link { padding: 5px 12px; font-size: 13px; }
  .card { padding: 16px; }
}
