/* 车险工具站 · 全站样式
   配色跟桌面版保持一致：主色 #308cc6 */
:root {
  --blue: #308cc6;
  --blue-dark: #2472a4;
  --ink: #1f2937;
  --dim: #6b7280;
  --line: #e5e7eb;
  --bg: #f7f9fc;
  --panel: #ffffff;
  --ok: #2f9e44;
  --warn: #d97706;
  --error: #dc2626;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .05);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.65;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
code {
  background: #eef2f7; border-radius: 4px; padding: 1px 5px;
  font-family: Consolas, "Courier New", monospace; font-size: .92em;
}
h1, h2, h3 { line-height: 1.3; margin: 0 0 .6em; }
h1 { font-size: 26px; }
h2 { font-size: 21px; }
h3 { font-size: 17px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 18px; }
.dim { color: var(--dim); }
.small { font-size: 12.5px; }
.center { text-align: center; }

/* ---------------------------------------------------------------- 顶栏 -- */
.topbar {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
}
.topbar .bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 58px; flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 18px; font-weight: 700; color: var(--ink);
}
.brand:hover { text-decoration: none; color: var(--blue); }
.brand .dot {
  width: 12px; height: 12px; border-radius: 3px;
  background: linear-gradient(135deg, var(--blue), #52b6ea);
}
.nav { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.nav a {
  padding: 6px 11px; border-radius: 8px; color: #374151; font-size: 14px;
}
.nav a:hover { background: #eef6fc; color: var(--blue-dark); text-decoration: none; }
.nav a.hi { background: var(--blue); color: #fff; }
.nav a.hi:hover { background: var(--blue-dark); color: #fff; }

.announce {
  background: #fff8e1; border-bottom: 1px solid #ffe8a3;
  color: #92400e; font-size: 13.5px; padding: 8px 0;
}

/* ---------------------------------------------------------------- 提示 -- */
.flashes { margin: 16px 0 0; }
.flash {
  padding: 10px 14px; border-radius: 8px; margin-bottom: 8px;
  border: 1px solid transparent; font-size: 14px;
}
.flash.ok { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.flash.warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.flash.error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

/* ---------------------------------------------------------------- 首页 -- */
.hero {
  padding: 46px 0 26px; text-align: center;
  background: radial-gradient(1200px 240px at 50% -60px, #e6f3fb 0%, transparent 70%);
}
.hero h1 { font-size: 32px; margin-bottom: 8px; }
.hero .sub { color: var(--dim); font-size: 16px; margin: 0 0 20px; }
.hero-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.cards {
  display: grid; gap: 18px; margin: 8px 0 26px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 18px 16px; box-shadow: var(--shadow);
  border-top: 4px solid var(--accent, var(--blue));
  display: flex; flex-direction: column;
}
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.badge {
  display: inline-block; background: #eef6fc; color: var(--blue-dark);
  border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600;
}
.ver { font-size: 13px; color: var(--ok); font-weight: 700; }
.ver.dim { color: var(--dim); font-weight: 400; }
.card h2 { font-size: 18px; margin: 4px 0 6px; }
.card h2 a { color: var(--ink); }
.card .summary { color: var(--dim); font-size: 14px; margin: 0 0 12px; flex: 1; }
.card .meta { list-style: none; padding: 0; margin: 0 0 14px; font-size: 13px; color: var(--dim); }
.card .meta li { padding: 1px 0; }
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.notice {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 20px; margin-bottom: 32px;
}
.notice ul { margin: 6px 0 0; padding-left: 20px; color: #374151; font-size: 14px; }
.notice li { margin: 4px 0; }

/* ---------------------------------------------------------------- 按钮 -- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; padding: 8px 16px; border-radius: 9px; border: 1px solid transparent;
  font-size: 14px; font-weight: 600; cursor: pointer; text-align: center;
  background: #f1f5f9; color: var(--ink); transition: .15s;
}
.btn:hover { text-decoration: none; filter: brightness(.97); }
.btn.primary { background: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-dark); color: #fff; }
.btn.ghost { background: #fff; border-color: var(--line); color: #374151; }
.btn.ghost:hover { border-color: var(--blue); color: var(--blue-dark); }
.btn.danger { background: #fef2f2; color: var(--error); border-color: #fecaca; }
.btn.danger:hover { background: #fee2e2; color: var(--error); }
.btn.small { padding: 4px 10px; font-size: 12.5px; border-radius: 7px; }
.btn.block { display: flex; width: 100%; }
.btn.disabled { background: #f3f4f6; color: #9ca3af; cursor: not-allowed; }

/* ---------------------------------------------------------------- 面板 -- */
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; margin-bottom: 18px; box-shadow: var(--shadow);
  overflow-x: auto;
}
.panel > h2, .panel > h3 { margin-top: 0; }
.prose { color: #374151; font-size: 14px; margin: 0; }
.prose li { margin: 4px 0; }
.two-col { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.crumbs { font-size: 13px; color: var(--dim); margin: 18px 0 10px; }
.kv { display: grid; grid-template-columns: 96px 1fr; gap: 6px 12px; font-size: 14px; margin: 10px 0 14px; }
.kv span { color: var(--dim); }

/* ------------------------------------------------------------ 产品页 -- */
.product-head {
  display: grid; gap: 20px; align-items: start; margin-bottom: 18px;
  grid-template-columns: 1fr 320px;
}
.product-head h1 { margin: 8px 0 6px; }
.product-head .summary { color: var(--dim); margin: 0; }
.dl-box {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow);
}
.dl-box.empty { color: var(--dim); font-size: 14px; }
.dl-ver { font-size: 15px; margin-bottom: 2px; }
.dl-ver b { color: var(--ok); font-size: 18px; }
.dl-box .note { font-size: 13px; color: #374151; margin: 10px 0; }
.dl-box .btn.block { margin-top: 12px; }
.dl-box .dim.small { margin-top: 8px; word-break: break-all; }

/* ---------------------------------------------------------------- 表格 -- */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td {
  border-bottom: 1px solid var(--line); padding: 9px 10px; text-align: left; vertical-align: top;
}
.table th { background: #f8fafc; color: #475569; font-weight: 600; font-size: 13px; white-space: nowrap; }
.table tr.latest td { background: #f2fbf5; }
.table td.note { color: #4b5563; max-width: 380px; }
.small-table th, .small-table td { padding: 7px 9px; font-size: 13px; }
.table code { white-space: nowrap; }

.tag {
  display: inline-block; font-size: 11.5px; line-height: 1.6; padding: 0 7px;
  border-radius: 999px; background: #eef6fc; color: var(--blue-dark); font-weight: 600;
}
.tag.beta { background: #fffbeb; color: #92400e; }
.cdot {
  display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  margin-right: 7px; vertical-align: middle;
}
.ops { white-space: nowrap; }
.ops form, .ops details { display: inline-block; vertical-align: top; }
.ops details[open] { display: block; white-space: normal; }
.ops summary { list-style: none; }
.ops summary::-webkit-details-marker { display: none; }
.inline-form {
  display: grid; gap: 8px; margin: 8px 0; padding: 12px;
  border: 1px dashed var(--line); border-radius: 10px; background: #fafbfd; min-width: 260px;
}

.pager { display: flex; gap: 12px; align-items: center; justify-content: center; padding: 14px 0 4px; font-size: 14px; }
.pager a { padding: 4px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }

/* ---------------------------------------------------------------- 表单 -- */
.form-panel { max-width: 520px; margin: 32px auto; }
.form-panel.narrow { max-width: 420px; }
label { display: block; margin: 0 0 12px; font-size: 14px; }
label > span { display: block; color: #374151; margin-bottom: 5px; font-weight: 600; font-size: 13.5px; }
input[type=text], input[type=password], input[type=email], input[type=number],
input[name], textarea, select {
  width: 100%; padding: 9px 11px; border: 1px solid #d5dbe3; border-radius: 9px;
  font-size: 14px; font-family: inherit; background: #fff; color: var(--ink);
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(48, 140, 198, .15);
}
input[type=file] { padding: 7px; background: #f8fafc; }
input:disabled { background: #f3f4f6; color: #9ca3af; }
textarea { resize: vertical; }
.checkline { display: flex; align-items: flex-start; gap: 8px; font-weight: 400; }
.checkline > span { display: inline; margin: 0; font-weight: 400; }
.checkline input { width: auto; }
.req { color: var(--error); font-style: normal; }
.grid-2 { display: grid; gap: 0 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.searchbar { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.searchbar input { max-width: 320px; }

/* ---------------------------------------------------------------- 后台 -- */
.admin-layout { display: grid; gap: 18px; grid-template-columns: 200px 1fr; margin: 18px 0 30px; }
.side {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px; height: fit-content; position: sticky; top: 74px;
}
.side-title { font-weight: 700; font-size: 14px; color: var(--dim); padding: 4px 8px 10px; }
.side a {
  display: block; padding: 8px 10px; border-radius: 8px; color: #374151; font-size: 14px;
}
.side a:hover { background: #eef6fc; color: var(--blue-dark); text-decoration: none; }
.side a.on { background: var(--blue); color: #fff; }
.side hr { border: none; border-top: 1px solid var(--line); margin: 8px 0; }
.admin-main { min-width: 0; }

.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); margin-bottom: 18px; }
.stat {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; text-align: center; box-shadow: var(--shadow);
}
.stat .num { font-size: 24px; font-weight: 700; color: var(--blue-dark); }
.stat .lbl { font-size: 12.5px; color: var(--dim); }

/* ---------------------------------------------------------------- 其它 -- */
.error-page { text-align: center; padding: 48px 20px; max-width: 560px; margin: 40px auto; }
.error-page .code { font-size: 56px; font-weight: 800; color: var(--line); line-height: 1; }

.footer {
  border-top: 1px solid var(--line); background: #fff; margin-top: 30px;
  padding: 22px 0; text-align: center; font-size: 13px; color: var(--dim);
}
.footer div { margin: 3px 0; }

@media (max-width: 820px) {
  .product-head { grid-template-columns: 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .side { position: static; display: flex; flex-wrap: wrap; gap: 4px; }
  .side-title, .side hr { display: none; }
  .hero { padding-top: 30px; }
  .hero h1 { font-size: 26px; }
}

/* ------------------------------------------------------- 登录 / 注册页 -- */
/* 独立的居中卡片版式：不显示顶栏/页脚，适合手机和桌面 */
.auth-body {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 34px 18px;
  background:
    radial-gradient(900px 420px at 12% 0%, #dcf0fb 0%, transparent 62%),
    radial-gradient(760px 400px at 88% 100%, #e3f5ec 0%, transparent 62%),
    linear-gradient(180deg, #f4f9fd 0%, #eef2f7 100%);
}
.auth-wrap { width: 100%; max-width: 408px; }

.auth-brand {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  font-size: 19px; font-weight: 700; color: var(--ink); margin-bottom: 18px;
}
.auth-brand:hover { text-decoration: none; color: var(--blue); }
.auth-brand .dot {
  width: 12px; height: 12px; border-radius: 3px;
  background: linear-gradient(135deg, var(--blue), #52b6ea);
}

.auth-card {
  background: #fff; border: 1px solid var(--line); border-radius: 18px;
  padding: 30px 28px 24px;
  box-shadow: 0 2px 6px rgba(16, 24, 40, .05), 0 18px 46px rgba(16, 24, 40, .10);
}
.auth-icon {
  width: 52px; height: 52px; border-radius: 14px; margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; background: linear-gradient(135deg, var(--blue), #57b6ea);
  box-shadow: 0 8px 18px rgba(48, 140, 198, .28);
}
.auth-icon svg { width: 26px; height: 26px; }
.auth-title { font-size: 21px; text-align: center; margin: 0 0 4px; }
.auth-sub { text-align: center; color: var(--dim); font-size: 13px; margin: 0 0 20px; }

.auth-form .field { display: block; margin: 0 0 14px; }
.auth-form .field > span {
  display: block; font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 6px;
}
.auth-form input {
  height: 44px; padding: 0 13px; border-radius: 10px; font-size: 14.5px;
}
.auth-form input::placeholder { color: #a9b2bd; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }

.pass-wrap { position: relative; }
.pass-wrap input { padding-right: 58px; }
.pass-eye {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; color: var(--blue-dark);
  font-size: 12.5px; font-weight: 600; font-family: inherit;
  padding: 6px 10px; border-radius: 7px; cursor: pointer;
}
.pass-eye:hover { background: #eef6fc; }
.pass-eye.on { color: var(--dim); }

.auth-form .checkline { margin: 2px 0 4px; font-size: 13.5px; color: #374151; }
.auth-submit {
  height: 44px; margin-top: 8px; border-radius: 10px;
  font-size: 15px; letter-spacing: 1px;
  box-shadow: 0 6px 16px rgba(48, 140, 198, .26);
}
.auth-alt { text-align: center; font-size: 13.5px; color: var(--dim); margin: 16px 0 0; }
.auth-flashes { margin-bottom: 14px; }
.auth-flashes .flash { font-size: 13.5px; padding: 9px 12px; }
.auth-foot { text-align: center; font-size: 12.5px; color: var(--dim); margin-top: 16px; }

@media (max-width: 420px) {
  .auth-body { padding: 22px 14px; align-items: flex-start; }
  .auth-card { padding: 24px 18px 20px; border-radius: 16px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
}
