:root {
  --bg: #6e0a13;
  --card: #ffffff;
  --primary: #c1121f;        /* 中国红 */
  --primary-dark: #8c0d17;
  --danger: #b00610;
  --ok: #16a34a;
  --muted: #6b6b6b;
  --border: #ecdede;
  --gold: #cda23a;
  --gold-light: #e6c259;
  --gold-dark: #a9842a;
  --cream: #fff8f2;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei",
    "PingFang SC", "Hiragino Sans GB", sans-serif;
  background: #7a0c16;
  background:
    radial-gradient(1100px 560px at 50% -160px, rgba(230,194,89,.22), transparent 62%),
    linear-gradient(168deg, #5e0a12 0%, #9a0f1c 50%, #720c15 100%);
  background-attachment: fixed;
  color: #1f1310;
  min-height: 100vh;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

.center {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.card {
  background: var(--card);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  padding: 32px 28px;
  width: 100%;
  max-width: 520px;
}

.card.wide { max-width: 100%; }

h1 {
  font-size: 22px;
  margin: 0 0 6px;
  color: var(--primary-dark);
}

.sub {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 24px;
  line-height: 1.6;
}

label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin: 18px 0 6px;
}

label .req { color: var(--danger); }
label .opt { color: var(--muted); font-weight: 400; font-size: 12px; }

input[type="text"],
input[type="password"],
input[type="tel"],
input[type="number"],
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 16px;
  font-family: inherit;
  transition: border-color .15s;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.12);
}

textarea { resize: vertical; min-height: 90px; }

input[type="file"] {
  width: 100%;
  padding: 14px;
  border: 1.5px dashed var(--primary);
  border-radius: 10px;
  background: #f8fafc;
  font-size: 14px;
}

.hint { color: var(--muted); font-size: 12px; margin-top: 6px; }

button, .btn {
  display: inline-block;
  width: 100%;
  margin-top: 24px;
  padding: 14px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background .15s;
}

button:hover, .btn:hover { background: var(--primary-dark); }

.btn.sm { width: auto; margin: 0; padding: 8px 14px; font-size: 13px; }
.btn.ghost { background: #f1f5f9; color: var(--primary-dark); }
.btn.ghost:hover { background: #e2e8f0; }

.flash { padding: 12px 14px; border-radius: 10px; font-size: 14px; margin-bottom: 12px; }
.flash.error { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.flash.ok { background: #f0fdf4; color: var(--ok); border: 1px solid #bbf7d0; }

.notice {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 13px;
  line-height: 1.6;
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 18px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  color: #fff;
  flex-wrap: wrap;
  gap: 10px;
}
.topbar h1 { color: #fff; margin: 0; }
.topbar .actions { display: flex; gap: 8px; }
.topbar a { color: #e0e7ff; text-decoration: none; font-size: 14px; }

.stats { display: flex; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.stat {
  background: var(--card); border-radius: 12px; padding: 14px 18px; flex: 1; min-width: 140px;
}
.stat .n { font-size: 24px; font-weight: 700; color: var(--primary-dark); }
.stat .l { font-size: 13px; color: var(--muted); }

table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; }
th, td { padding: 10px 12px; text-align: left; font-size: 13px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: #f1f5f9; color: var(--primary-dark); font-weight: 700; white-space: nowrap; }
tr:hover td { background: #f8fafc; }
.files a { display: inline-block; margin: 2px 4px 2px 0; padding: 2px 8px; background: #eef2ff; color: var(--primary-dark); border-radius: 6px; font-size: 12px; text-decoration: none; }
.files a:hover { background: #e0e7ff; }
.amount { color: var(--danger); font-weight: 600; white-space: nowrap; }

.table-scroll { overflow-x: auto; border-radius: 12px; }
.empty { color: var(--muted); text-align: center; padding: 40px; }

.success-icon { font-size: 56px; text-align: center; margin-bottom: 12px; }

/* ===== 大字模式（公开页面，方便老年人阅读和操作）===== */
.big { font-size: 18px; }
.big .card { padding: 36px 30px; }
.big h1 { font-size: 27px; margin-bottom: 10px; }
.big .sub { font-size: 17px; line-height: 1.7; }
.big label { font-size: 19px; margin-top: 22px; }
.big input[type="text"],
.big input[type="password"],
.big input[type="tel"],
.big input[type="number"],
.big textarea {
  font-size: 20px;
  padding: 15px 16px;
  border-radius: 12px;
}
.big input[type="file"] { font-size: 17px; padding: 18px; }
.big button, .big .btn { font-size: 21px; padding: 18px; margin-top: 28px; border-radius: 12px; }
.big .notice { font-size: 16px; line-height: 1.8; padding: 16px; }
.big .hint { font-size: 15px; }
.big .disclaimer { font-size: 15px; line-height: 1.9; }
.big .contact { font-size: 16px; }
.big .brand .brand-text { font-size: 23px; }
.big .brand .logo-img { width: 88px; height: 88px; }

/* 公示表格（大字、易读） */
.publist { font-size: 17px; }
.publist th, .publist td { padding: 13px 14px; }
.publist th { font-size: 16px; }
.publist tfoot td { background: #f1f5f9; font-size: 18px; }
.publist .amount { font-size: 18px; }
.big .stat .n { font-size: 26px; }
.big .stat .l { font-size: 14px; }

/* 进展页顶部导航按钮 */
.hub { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 22px; }
.hub .btn { margin: 0; }

/* 「仅受害人可见」标记与登录提示 */
.vo-badge {
  display: inline-block;
  background: #fef3c7; color: #b45309;
  border-radius: 6px; padding: 1px 8px;
  font-size: 13px; font-weight: 600; margin-left: 8px;
  vertical-align: middle;
}
.login-hint {
  background: #f1f5f9; border: 1px dashed #cbd5e1; border-radius: 10px;
  padding: 14px 16px; font-size: 16px; color: #475569; line-height: 1.7;
}
.login-hint a { color: var(--primary); font-weight: 700; }

/* 案件进展时间线 */
.timeline { position: relative; margin: 10px 0 24px; padding-left: 26px; }
.timeline::before {
  content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px;
  width: 3px; background: #dbe3f0; border-radius: 2px;
}
.tl-item { position: relative; margin-bottom: 22px; }
.tl-dot {
  position: absolute; left: -22px; top: 4px; width: 14px; height: 14px;
  background: var(--primary); border: 3px solid #fff; border-radius: 50%;
  box-shadow: 0 0 0 2px var(--primary);
}
.tl-item:first-child .tl-dot { background: var(--danger); box-shadow: 0 0 0 2px var(--danger); }
.tl-date { color: var(--primary-dark); font-weight: 700; font-size: 17px; }
.tl-title { font-size: 19px; font-weight: 700; margin: 2px 0; }
.tl-content { font-size: 17px; line-height: 1.8; color: #334155; white-space: pre-wrap; }

/* 公示页/登记页之间的导航小链接 */
.navlink {
  display: inline-block;
  margin-top: 16px;
  font-size: 16px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}
.navlink:hover { text-decoration: underline; }

.foot { text-align: center; color: rgba(255,255,255,.5); font-size: 12px; margin-top: 28px; }

/* 顶部联盟标识 */
.brand {
  text-align: center;
  color: #fff;
  margin-bottom: 18px;
}
.brand .logo-img {
  width: 72px;
  height: 72px;
  display: block;
  margin: 0 auto 8px;
}
.brand .brand-text {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .5px;
}

/* 统计图表 */
.charts { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.chart-card {
  background: #fff; border-radius: 12px; padding: 16px 18px; flex: 1; min-width: 300px;
}
.chart-card h3 { margin: 0 0 14px; font-size: 15px; color: var(--primary-dark); }

/* 金额分布：横向条 */
.barh { display: flex; align-items: center; gap: 10px; margin: 8px 0; font-size: 13px; }
.barh .lab { width: 70px; color: var(--muted); text-align: right; flex: none; }
.barh .track { flex: 1; background: #f1f5f9; border-radius: 6px; height: 18px; overflow: hidden; }
.barh .fill { height: 100%; background: linear-gradient(90deg, #3b82f6, #1e40af); border-radius: 6px; min-width: 2px; }
.barh .val { width: 32px; flex: none; font-weight: 600; color: var(--primary-dark); }

/* 每日趋势：纵向条 */
.barv-wrap { display: flex; align-items: flex-end; gap: 3px; height: 130px; overflow-x: auto; padding-top: 6px; }
.barv { flex: 1; min-width: 8px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.barv .col { width: 70%; min-height: 2px; background: linear-gradient(180deg, #60a5fa, #2563eb); border-radius: 3px 3px 0 0; transition: height .2s; }
.barv .col.zero { background: #e2e8f0; }
.barv .d { font-size: 9px; color: var(--muted); margin-top: 4px; white-space: nowrap; transform: rotate(-45deg); transform-origin: center; height: 16px; }
.barv .c { font-size: 10px; color: var(--primary-dark); font-weight: 600; height: 12px; }
.chart-empty { color: var(--muted); font-size: 13px; padding: 20px 0; text-align: center; }

/* 筛选栏 */
.filterbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  background: #fff;
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 16px;
  align-items: center;
}
.filterbar input {
  width: auto;
  flex: 1;
  min-width: 120px;
  padding: 9px 12px;
  font-size: 14px;
}
.filterbar .btn { width: auto; margin: 0; padding: 9px 16px; font-size: 14px; }

/* 删除按钮 */
.btn-del {
  width: auto;
  margin: 0;
  padding: 5px 12px;
  background: #fef2f2;
  color: var(--danger);
  border: 1px solid #fecaca;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}
.btn-del:hover { background: var(--danger); color: #fff; }

/* 联系方式 / 免责声明 */
.contact {
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
}
.disclaimer {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 18px;
}

/* 已登记受害者 · 滚动名单 */
.roll {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.roll-head,
.roll-row {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  font-size: 18px;
}
.roll-head {
  background: linear-gradient(90deg, #8c0d17, #c1121f);
  color: #fff;
  font-weight: 700;
  border-bottom: 2px solid var(--gold-light);
}
.roll-row {
  border-top: 1px solid var(--border);
}
.roll-row:nth-child(even) { background: #fdf7f5; }
.rc-name   { flex: 0 0 26%; font-weight: 700; color: #2a1410; }
.rc-region { flex: 1 1 auto; color: var(--muted); }
.rc-amount { flex: 0 0 34%; text-align: right;
  color: var(--danger); font-weight: 800;
  font-variant-numeric: tabular-nums; }
.roll-head .rc-region,
.roll-head .rc-amount { color: #ffe7d9; }

.roll-viewport {
  height: 360px;
  overflow: hidden;
  position: relative;
}
.roll-viewport.auto { height: auto; }       /* 人少时不滚动，按内容高度显示 */
.roll-track {
  display: flex;
  flex-direction: column;
  animation: roll-scroll 40s linear infinite;
}
.roll-track.static { animation: none; }     /* 人少时关掉滚动动画，避免重复 */
/* 名单在模板里复制了两份，向上滚动 50% 即可无缝循环 */
@keyframes roll-scroll {
  from { transform: translateY(0); }
  to   { transform: translateY(-50%); }
}
.roll:hover .roll-track { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .roll-track { animation: none; }
  .roll-viewport { overflow-y: auto; }
}

/* =======================================================================
   主页（home）整体排版 —— 维权主题：中国红 + 金 + 白
   ======================================================================= */
.home .wrap { max-width: 740px; padding-top: 34px; }
.home .card { padding: 30px 30px; }

/* ---- 英雄区 / 战报 ---- */
.hero {
  text-align: center;
  color: #fff;
  padding: 6px 16px 16px;
  margin-bottom: 30px;
}
.hero-emblem {
  width: 132px;
  height: 132px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  filter: drop-shadow(0 12px 26px rgba(0,0,0,.45));
}
.hero-title {
  font-family: "Source Han Serif SC", "Noto Serif SC", "Songti SC", STSong, SimSun, serif;
  font-size: 31px;
  font-weight: 800;
  margin: 0 auto 18px;
  color: #fff;
  letter-spacing: 1px;
  text-shadow: 0 2px 16px rgba(0,0,0,.5);
  line-height: 1.3;
}
/* 横幅标语 */
.ribbon {
  position: relative;
  display: inline-block;
  background: linear-gradient(180deg, #e23b3b 0%, #b3121b 100%);
  color: #fff8e7;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 4px;
  padding: 11px 34px;
  margin: 0 auto 26px;
  border: 1.5px solid var(--gold-light);
  border-radius: 4px;
  box-shadow: 0 8px 22px rgba(0,0,0,.4);
}
.ribbon::before, .ribbon::after {
  content: "";
  position: absolute; top: 0; width: 14px; height: 100%;
  background: #8c0d17;
}
.ribbon::before { left: -13px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 100% 50%); }
.ribbon::after  { right: -13px; clip-path: polygon(0 0, 100% 0, 0 100%, 100% 50%, 0 50%); }

.hero-stats {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.hstat {
  flex: 1;
  min-width: 158px;
  max-width: 300px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(230,194,89,.45);
  border-radius: 16px;
  padding: 18px 20px;
  backdrop-filter: blur(2px);
}
.hstat .hn {
  font-size: 32px;
  font-weight: 800;
  color: var(--gold-light);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  text-shadow: 0 1px 8px rgba(0,0,0,.3);
}
.hstat .hl {
  font-size: 15px;
  color: #f3dcd6;
  margin-top: 8px;
  letter-spacing: 1px;
}

/* ---- 卡片分区 ---- */
.section { margin-bottom: 24px; position: relative; overflow: hidden; }
.section::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 6px; height: 100%;
  background: linear-gradient(180deg, var(--gold-light), var(--gold-dark));
}
.section-head {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 2px solid #f3e7e4;
}
.section-head .sec-icon {
  font-size: 26px;
  width: 54px; height: 54px;
  flex: none;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #fdeceb, #fbdedd);
  border: 1px solid #f6cfcd;
  border-radius: 15px;
}
.section-head h2 {
  margin: 0;
  font-size: 24px;
  color: var(--primary-dark);
  font-weight: 800;
  letter-spacing: .5px;
}
.section-head .sec-sub {
  display: block;
  font-size: 14px;
  color: var(--muted);
  margin-top: 4px;
  font-weight: 400;
}

/* ---- 行动卡片（暖色 CTA） ---- */
.cta-card {
  text-align: center;
  background: linear-gradient(165deg, #ffffff 0%, var(--cream) 100%);
  border: 1px solid #f3d9c9;
  padding: 30px 30px 32px;
}
.cta-title {
  margin: 0 0 6px;
  font-size: 25px;
  color: var(--primary-dark);
  font-weight: 800;
}
.cta-sub {
  margin: 0 0 22px;
  font-size: 16px;
  color: var(--muted);
}

/* ---- 主按钮（红） / 金色强调按钮 ---- */
.btn.gold {
  background: linear-gradient(165deg, #d9242f 0%, #a3121b 100%);
  color: #fff;
  font-weight: 800;
  letter-spacing: 1px;
  border: 1.5px solid var(--gold-light);
  box-shadow: 0 10px 24px rgba(140,13,23,.4);
}
.btn.gold:hover { background: linear-gradient(165deg, #e23b3b 0%, #b3121b 100%); }

/* 手机端微调 */
@media (max-width: 560px) {
  .home .card { padding: 24px 20px; }
  .hero-title { font-size: 26px; }
  .ribbon { font-size: 15px; letter-spacing: 2px; padding: 10px 22px; }
  .section-head h2 { font-size: 20px; }
  .section-head .sec-icon { width: 46px; height: 46px; font-size: 22px; }
  .rc-amount { flex: 0 0 38%; }
}

/* =======================================================================
   响应式 · 电脑宽屏版（≥ 900px 启用多栏布局；窄屏自动回退为单列手机版）
   ======================================================================= */
@media (min-width: 900px) {

  /* ---- 主页：英雄区放大 + 内容两栏 ---- */
  .home .wrap { max-width: 1140px; padding-bottom: 56px; }
  .hero { margin-bottom: 40px; padding-top: 12px; }
  .hero-emblem { width: 152px; height: 152px; }
  .hero-title { font-size: 42px; margin-bottom: 22px; }
  .ribbon { font-size: 21px; padding: 13px 44px; letter-spacing: 6px; margin-bottom: 30px; }
  .hero-stats { gap: 22px; }
  .hstat { min-width: 240px; max-width: 360px; padding: 24px 30px; }
  .hstat .hn { font-size: 40px; }
  .hstat .hl { font-size: 16px; }

  .home-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 26px;
    align-items: start;
  }
  .home-grid .section { margin-bottom: 0; }
  .home-grid .roll-viewport { height: 440px; }

  /* CTA 通栏，但按钮不拉满整屏 */
  .cta-card .hub { max-width: 460px; margin-left: auto; margin-right: auto; }

  /* ---- 登记表单：字段两列 ---- */
  .page-form .wrap { max-width: 880px; }
  .page-form .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 26px;
  }
  .page-form .form-grid .field-full { grid-column: 1 / -1; }
  /* 网格内每个字段的第一个 label 顶距统一，保证两列对齐 */
  .page-form .form-grid .field > label:first-child { margin-top: 20px; }

  /* ---- 公示页：加宽，统计与名单更舒展 ---- */
  .page-list .wrap { max-width: 1040px; }
  .page-list .stats .stat { min-width: 200px; }

  /* ---- 登录/成功页：卡片略放大居中 ---- */
  .page-enter .card, .page-done .card { max-width: 560px; }
}

/* 往来文书（手机版） */
.doc-item { border: 1px solid var(--border); border-left: 5px solid var(--gold-light); border-radius: 12px; padding: 16px 16px; margin-bottom: 14px; background: #fff; }
.doc-item.t-问询 { border-left-color: #1d4ed8; }
.doc-item.t-申请 { border-left-color: #b45309; }
.doc-item.t-答复 { border-left-color: #15803d; }
.doc-item.t-通知 { border-left-color: #7c3aed; }
.doc-item .dm { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.doc-item .badge { font-size: 14px; font-weight: 800; color: #fff; background: #6b7280; border-radius: 18px; padding: 2px 12px; }
.doc-item .badge.t-问询 { background: #1d4ed8; }
.doc-item .badge.t-申请 { background: #b45309; }
.doc-item .badge.t-答复 { background: #15803d; }
.doc-item .badge.t-通知 { background: #7c3aed; }
.doc-item .ag { font-weight: 700; font-size: 16px; }
.doc-item .dt { color: var(--muted); font-size: 14px; }
.doc-item .dttl { font-size: 18px; font-weight: 800; margin: 4px 0 6px; }
.doc-item .dco { font-size: 16px; line-height: 1.8; color: #334155; white-space: pre-wrap; }
.doc-item .dfiles { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.doc-item .dfiles a { display: block; padding: 11px 14px; background: #fdf3f1; border: 1px solid #f0d2cf; border-radius: 10px; color: var(--primary-dark); font-weight: 700; font-size: 15px; text-decoration: none; }
.vo-tag { display: inline-block; background: #fef3c7; color: #b45309; border-radius: 6px; padding: 1px 8px; font-size: 13px; font-weight: 700; }

/* 平板中等屏（600–899px）：表单字段也可两列，主页仍单列更稳 */
@media (min-width: 640px) and (max-width: 899px) {
  .page-form .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 20px;
  }
  .page-form .form-grid .field-full { grid-column: 1 / -1; }
  .page-form .form-grid .field > label:first-child { margin-top: 18px; }
}

/* 嫌疑人照片（手机版） */
.suspect-item { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; margin-bottom: 16px; background: #fff; }
.suspect-item .photos { display: flex; overflow-x: auto; background: #111; }
.suspect-item .photos img { height: 240px; width: auto; object-fit: cover; flex: none; }
.suspect-item .photos .no-photo { height: 200px; width: 100%; display: flex; align-items: center; justify-content: center; color: #999; background: #f1f1f1; }
.suspect-item .body { padding: 14px 16px; }
.suspect-item .nm { font-size: 20px; font-weight: 800; }
.suspect-item .al { color: var(--danger); font-weight: 700; font-size: 15px; margin-left: 6px; }
.suspect-item .ds { font-size: 16px; color: #334155; margin-top: 8px; line-height: 1.8; white-space: pre-wrap; }
