/* ============ 陌路投票系统 · 白色高级风样式 ============ */
:root {
  --primary: #4f46e5;
  --primary-soft: #eef2ff;
  --danger: #dc2626;
  --ok: #059669;
  --warn: #d97706;
  --ink: #18181b;
  --ink-2: #3f3f46;
  --muted: #71717a;
  --line: #e8e9ee;
  --line-2: #f1f2f6;
  --bg: #fafafa;
  --card: #ffffff;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-md: 0 4px 12px rgba(16, 24, 40, .07);
  --shadow-lg: 0 20px 50px rgba(16, 24, 40, .16);
  --radius: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 20px; width: 100%; }
.main { flex: 1; padding-top: 28px; padding-bottom: 48px; }

/* ---------- 图标 ---------- */
.ic { width: 1em; height: 1em; display: inline-block; vertical-align: -0.14em; flex-shrink: 0; }
.ic-brand { width: 22px; height: 22px; color: var(--primary); }
.nav .ic { width: 15px; height: 15px; margin-right: 2px; opacity: .75; }
.nav a.on .ic { opacity: 1; }
.btn .ic { width: 15px; height: 15px; }
.uname .ic { width: 15px; height: 15px; opacity: .7; }
.alert .ic { width: 16px; height: 16px; margin-top: 3px; }
.pc-meta .ic, .vd-meta .ic { width: 13px; height: 13px; opacity: .75; }
.lb-title .ic { width: 16px; height: 16px; color: var(--primary); }

/* ---------- 顶栏 ---------- */
.topbar {
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line-2);
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-in { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand {
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand:hover { text-decoration: none; }
.nav { display: flex; gap: 2px; flex: 1; overflow-x: auto; }
.nav a {
  padding: 7px 13px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
  transition: .15s;
}
.nav a:hover { background: var(--line-2); color: var(--ink); text-decoration: none; }
.nav a.on { color: var(--primary); background: var(--primary-soft); font-weight: 600; }
.userbox { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.uname { font-size: 14px; color: var(--ink-2); max-width: 160px; overflow: hidden; text-overflow: ellipsis; display: inline-flex; align-items: center; }
.adm-tag {
  font-style: normal;
  font-size: 11px;
  color: var(--primary);
  border: 1px solid #dcdcf8;
  background: var(--primary-soft);
  padding: 1px 7px;
  border-radius: 99px;
  margin-left: 4px;
  font-weight: 600;
}

/* ---------- Hero（白底大标题） ---------- */
.hero {
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: 18px;
  padding: 40px 36px 34px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(79, 70, 229, .08) 0%, transparent 68%);
  pointer-events: none;
}
.hero h1 {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}
.hero > p { color: var(--muted); font-size: 15px; }
.hero-stats { display: flex; gap: 0; margin-top: 28px; flex-wrap: wrap; }
.hero-stats div {
  padding: 2px 28px 2px 0;
  margin-right: 28px;
  border-right: 1px solid var(--line-2);
  display: flex;
  flex-direction: column;
}
.hero-stats div:last-child { border-right: none; margin-right: 0; }
.hero-stats b { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.hero-stats span { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.card-title { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 18px; display: flex; align-items: center; gap: 8px; }
.empty { color: var(--muted); text-align: center; padding: 34px 0; }

/* ---------- 工具栏 / 标签 ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.tabs { display: flex; background: var(--card); border: 1px solid var(--line-2); border-radius: 11px; overflow: hidden; box-shadow: var(--shadow-sm); }
.tabs a { padding: 8px 18px; font-size: 14px; color: var(--muted); }
.tabs a:hover { text-decoration: none; background: var(--line-2); color: var(--ink); }
.tabs a.on { background: var(--ink); color: #fff; font-weight: 600; }
.search {
  flex: 1;
  min-width: 160px;
  max-width: 340px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  font-size: 14px;
  outline: none;
  background: var(--card);
  color: var(--ink);
  transition: .15s;
}
.search:focus { border-color: #c7c9f4; box-shadow: 0 0 0 3px rgba(79, 70, 229, .10); }

/* ---------- 投票列表 ---------- */
.poll-list { display: flex; flex-direction: column; gap: 14px; }
.poll-card { display: block; color: inherit; margin-bottom: 0; transition: .18s; }
.poll-card:hover {
  text-decoration: none;
  border-color: #dcdcf8;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.pc-head { display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.pc-head h3 { font-size: 16.5px; font-weight: 700; letter-spacing: -0.01em; flex: 1; min-width: 0; }
.pc-desc { color: var(--muted); font-size: 13.5px; margin-top: 7px; }
.pc-meta { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 12.5px; margin-top: 12px; align-items: center; }
.pc-meta span { display: inline-flex; align-items: center; gap: 5px; }

/* ---------- 徽章 ---------- */
.badge { display: inline-block; font-size: 12px; padding: 3px 11px; border-radius: 99px; font-weight: 600; white-space: nowrap; }
.st-active  { background: #ecfdf5; color: var(--ok); }
.st-pending { background: #fffbeb; color: var(--warn); }
.st-revoked { background: #fef2f2; color: var(--danger); }
.st-ended   { background: #f4f4f5; color: var(--muted); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: none;
  cursor: pointer;
  border-radius: 11px;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 600;
  transition: .15s;
  text-decoration: none !important;
  font-family: inherit;
  line-height: 1.4;
}
.btn-dark { background: var(--ink); color: #fff; box-shadow: var(--shadow-sm); }
.btn-dark:hover { background: #27272a; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: #4338ca; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-ok     { background: var(--ok); color: #fff; }
.btn-ok:hover { background: #047857; }
.btn-warn   { background: var(--warn); color: #fff; }
.btn-warn:hover { background: #b45309; }
.btn-danger { background: #fff; color: var(--danger); border: 1px solid #fecaca; }
.btn-danger:hover { background: #fef2f2; }
.btn-ghost  { background: var(--card); color: var(--ink-2); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--line-2); color: var(--ink); }
.btn-sm { padding: 5px 12px; font-size: 13px; border-radius: 8px; }
.btn-sm .ic { width: 13px; height: 13px; }
.btn-block { width: 100%; padding: 12px; font-size: 15px; }

/* ---------- 表单 ---------- */
.form { display: flex; flex-direction: column; gap: 16px; }
.lb { display: flex; flex-direction: column; gap: 7px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.lb .tip { font-weight: 400; font-size: 12px; color: var(--muted); }
.lb input, .lb textarea, .lb select {
  font-family: inherit;
  font-size: 14.5px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  background: var(--card);
  color: var(--ink);
  width: 100%;
  transition: .15s;
}
.lb input:focus, .lb textarea:focus, .lb select:focus { border-color: #c7c9f4; box-shadow: 0 0 0 3px rgba(79, 70, 229, .10); }
.lb input::placeholder, .lb textarea::placeholder { color: #a1a1aa; }
.lb-check { flex-direction: row; align-items: center; gap: 9px; font-weight: 500; }
.lb-check input { width: auto; accent-color: var(--primary); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.form-card { max-width: 660px; }
.auth-card { max-width: 430px; margin: 44px auto 0; padding: 32px 28px; }
.auth-brand { text-align: center; margin-bottom: 6px; }
.auth-brand .ic { width: 40px; height: 40px; color: var(--primary); }
.auth-card .card-title { justify-content: center; }
.auth-alt { text-align: center; font-size: 13px; color: var(--muted); margin-top: 6px; }
.captcha-row { display: flex; gap: 10px; align-items: center; }
.captcha-row input { flex: 1; }
.captcha-row img { border-radius: 9px; border: 1px solid var(--line); cursor: pointer; height: 45px; }

/* ---------- 投票详情 ---------- */
.vote-detail h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.vd-head { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.vd-meta { margin-top: 14px; }
.vd-desc {
  background: #fafafc;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 16px;
  font-size: 14.5px;
  margin-top: 16px;
  white-space: normal;
  color: var(--ink-2);
}
.sec-title { font-size: 16px; font-weight: 700; margin: 26px 0 14px; display: flex; align-items: baseline; gap: 8px; }
.sec-title small { color: var(--muted); font-weight: 400; font-size: 13px; }
.vote-form { margin-top: 6px; }
.opt {
  display: flex;
  align-items: center;
  gap: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 16px;
  margin-bottom: 11px;
  cursor: pointer;
  transition: .15s;
  background: var(--card);
}
.opt:hover { border-color: #d4d6f8; background: #fcfcff; }
.opt:has(input:checked) { border-color: var(--primary); background: #f7f7ff; box-shadow: 0 0 0 3px rgba(79, 70, 229, .08); }
.opt input { width: 17px; height: 17px; accent-color: var(--primary); }
.opt-txt { font-size: 15px; }
.vd-actions { display: flex; gap: 10px; margin-top: 28px; }

/* ---------- 结果条 ---------- */
.results { display: flex; flex-direction: column; gap: 16px; }
.res-row.mine .res-name { color: var(--ok); font-weight: 700; }
.res-line { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 7px; }
.res-name { display: inline-flex; align-items: center; gap: 6px; }
.res-name .ic { width: 14px; height: 14px; color: var(--ok); }
.res-num { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.bar { background: var(--line-2); border-radius: 99px; height: 8px; overflow: hidden; }
.bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  border-radius: 99px;
  transition: width .6s cubic-bezier(.2, .8, .3, 1);
}
.res-row.mine .bar i { background: linear-gradient(90deg, #34d399, #059669); }

/* ---------- 提示 ---------- */
.alert {
  border-radius: 12px;
  padding: 12px 15px;
  font-size: 14px;
  margin-bottom: 16px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid transparent;
}
.alert-ok   { background: #ecfdf5; color: #065f46; border-color: #d1fae5; }
.alert-err  { background: #fef2f2; color: #991b1b; border-color: #fee2e2; }
.alert-warn { background: #fffbeb; color: #92400e; border-color: #fef3c7; }
.alert-info { background: #eff6ff; color: #1e40af; border-color: #dbeafe; }

/* 