/* ===== 阿里滴滴 — 全局样式（科技感 · 响应式） ===== */
:root {
  --bg-a: #f4f7fd;
  --bg-b: #e8eefb;
  --card: #ffffff;
  --text: #16223b;
  --muted: #7a86a3;
  --accent: #2f6bff;
  --accent-2: #19d3ff;
  --accent-dark: #1d4ed8;
  --grad: linear-gradient(120deg, #2f6bff, #19d3ff);
  --error: #e5484d;
  --border: #e5eaf4;
  --shadow-sm: 0 4px 14px rgba(31, 45, 75, 0.06);
  --shadow-md: 0 14px 34px rgba(31, 45, 75, 0.12);
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, var(--bg-a) 0%, var(--bg-b) 100%);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

/* ===== 顶部导航（毛玻璃科技感） ===== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 12px 26px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(31, 45, 75, 0.06);
}

.brand {
  text-decoration: none;
  display: inline-flex;
  flex-direction: column;
  line-height: 1.15;
  cursor: pointer;
  user-select: none;
}
.brand-title {
  font-size: 21px;
  font-weight: 900;
  letter-spacing: 2px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-sub {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 4px;
  color: var(--muted);
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 18px;
}
.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 2px;
  position: relative;
  transition: color .16s ease;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  height: 2px; width: 0;
  background: var(--grad);
  transition: width .18s ease;
}
.nav-links a:hover {
  color: var(--accent);
}
.nav-links a:hover::after { width: 100%; }

.nav-cta {
  background: var(--grad) !important;
  color: #fff !important;
  padding: 9px 20px !important;
  border-radius: 999px !important;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(47, 107, 255, 0.38);
  transition: transform .16s ease, box-shadow .16s ease !important;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(47, 107, 255, 0.46); }
.nav-cta::after { display: none; }

/* 登录用户徽章：与普通导航区分 */
.nav-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(47, 107, 255, 0.10);
  border: 1px solid rgba(47, 107, 255, 0.28);
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  border-radius: 999px;
  padding: 6px 12px 6px 8px;
  box-shadow: 0 2px 8px rgba(47, 107, 255, 0.12);
}
/* 未登录/退出后隐藏头像与退出登录（display:flex 会覆盖 hidden 属性，需显式隐藏） */
.nav-user[hidden] { display: none; }
.nav-links a[hidden] { display: none; }
.nav-user-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}
.nav-user a {
  color: var(--error);
  font-weight: 600;
  padding: 2px 4px;
}
.nav-user a::after { display: none; }
.nav-user a:hover { color: #c81e1e; }

/* ===== 布局 ===== */
.container { width: min(1080px, 94vw); margin: 24px auto; }

.auth-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px 34px;
  width: 380px;
  max-width: 92vw;
  margin: 9vh auto 0;
  box-shadow: var(--shadow-md);
}
.auth-card h1 { margin: 0 0 6px; font-size: 24px; letter-spacing: 1px; }
.subtitle { margin: 0 0 22px; color: var(--muted); }

/* ===== 表单 ===== */
form { display: flex; flex-direction: column; gap: 12px; }
label { font-size: 13px; font-weight: 600; color: var(--muted); }
input, select, textarea {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
  width: 100%;
  background: #fff;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.16);
}
.form-row { display: flex; gap: 12px; }
.form-row > div { flex: 1; }

button {
  padding: 12px 16px;
  border: none;
  border-radius: 12px;
  background: var(--grad);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
  box-shadow: 0 6px 16px rgba(47, 107, 255, 0.28);
}
button:hover { filter: brightness(1.05); transform: translateY(-1px); }
button:active { transform: translateY(0); }
button.secondary {
  background: #fff;
  color: var(--accent);
  border: 1px solid rgba(47, 107, 255, 0.35);
  box-shadow: none;
}
button.secondary:hover { box-shadow: var(--shadow-sm); }
button.danger {
  background: #fff;
  color: var(--error);
  border: 1px solid rgba(229, 72, 77, 0.4);
  box-shadow: none;
}
button.danger:hover { background: #fff5f5; box-shadow: var(--shadow-sm); }
button.select-clear-danger {
  background: var(--error);
  color: #fff;
  border: 1px solid var(--error);
  box-shadow: 0 6px 16px rgba(229, 72, 77, 0.28);
}
button.select-clear-danger:hover {
  background: #dc2626;
  transform: translateY(-1px);
}
.btn-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  color: inherit;
  font-size: 11px;
  line-height: 1;
}
button.select-clear-danger .btn-count { background: rgba(255, 255, 255, 0.22); }
button.link { background: transparent; color: var(--accent); padding: 0; box-shadow: none; }

.error { color: var(--error); font-size: 13px; margin: 0; }
.muted { color: var(--muted); font-size: 13px; }

/* ===== 搜索栏 ===== */
.search-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}
.search-wrap input {
  padding-right: 34px;
}
.search-wrap .search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px !important;
  height: 20px !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 50% !important;
  background: #dfe6f5;
  color: var(--text);
  font-size: 14px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none !important;
}
.search-wrap .search-clear:hover { background: #c7d2ea; transform: translateY(-50%); }
.search-wrap .search-clear[hidden] { display: none; }
.home-intro { text-align: center; margin-bottom: 22px; }
.home-intro h1 {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 900;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.home-intro p { margin: 0; color: var(--muted); font-size: 14px; }
.site-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 auto 20px;
  max-width: 720px;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 8px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
.stat-label { color: var(--muted); font-size: 12px; }
.stat strong {
  font-size: 20px;
  line-height: 1;
  color: var(--accent);
  font-weight: 900;
}
.search-bar { display: flex; gap: 12px; margin-bottom: 22px; }
.search-bar input { flex: 1; border-radius: 999px; padding-left: 20px; }
.search-bar button { border-radius: 999px; padding: 12px 26px; }

/* ===== 瀑布流卡片 ===== */
.waterfall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
  align-items: start;
}
.waterfall-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-top: 4px solid transparent;
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.waterfall-card:hover {
  transform: translateY(-4px);
  border-top-color: var(--accent);
  box-shadow: var(--shadow-md);
  cursor: pointer;
}
.card-address { font-size: 15px; font-weight: 700; line-height: 1.5; }
.card-price {
  margin-top: 10px;
  line-height: 1.2;
  white-space: nowrap;
}
.card-price-value {
  font-size: 22px;
  font-weight: 900;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.card-price-unit {
  display: inline-block;
  margin-left: 5px;
  font-size: 13px;
  line-height: 1;
  font-weight: 600;
  color: var(--muted);
  vertical-align: baseline;
}
.card-time { color: var(--muted); font-size: 12px; margin-top: 10px; }
#load-more { text-align: center; color: var(--muted); padding: 18px 0 46px; }

/* ===== 联系方式弹窗 ===== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  align-items: center;
  justify-content: center;
  background: rgba(15, 25, 50, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.modal-overlay.show { display: flex; }
.modal {
  position: relative;
  width: 360px;
  max-width: 90vw;
  background: #fff;
  border-radius: 22px;
  padding: 36px 30px 28px;
  text-align: center;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.3);
  animation: modal-in .2s ease;
}
@keyframes modal-in {
  from { transform: scale(.9) translateY(10px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}
.modal-close {
  position: absolute;
  top: 14px; right: 16px;
  border: none;
  background: none;
  padding: 0;
  font-size: 24px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  box-shadow: none;
}
.modal-close:hover { color: var(--text); }
.modal-title { margin: 0 0 12px; font-size: 21px; font-weight: 900; color: var(--accent); }
.modal-line { margin: 0 0 20px; color: var(--text); font-size: 15px; }
.modal-wechat {
  display: inline-block;
  background: linear-gradient(120deg, #eef3ff, #e6fbff);
  color: var(--accent-dark);
  border: 1px solid rgba(47, 107, 255, 0.25);
  border-radius: 999px;
  padding: 12px 26px;
  font-size: 15px;
  margin-bottom: 26px;
  box-shadow: var(--shadow-sm);
}
.modal-wechat strong { font-weight: 900; }
.modal-btn { width: 100%; padding: 13px; border-radius: 12px; font-size: 15px; }

/* 企业微信二维码（联系方式弹窗） */
.wechat-qr {
  display: block;
  width: 180px;
  height: 180px;
  object-fit: contain;
  margin: 0 auto 22px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
}

/* 宣传图放大弹窗 */
.modal.promo-modal { width: min(680px, 92vw); padding: 26px; }
.promo-modal .modal-title { margin-bottom: 16px; }
.promo-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

/* 可拖拽宣传缩略图 */
.promo-thumb {
  position: fixed;
  right: 18px;
  bottom: calc(var(--footer-h, 0px) + 16px);
  z-index: 60;
  width: 132px;
  cursor: grab;
  text-align: center;
  user-select: none;
  touch-action: none;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 6px;
  box-shadow: var(--shadow-md);
  transition: box-shadow .2s ease;
}
.promo-thumb:active { cursor: grabbing; }
.promo-thumb img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  pointer-events: none;
}
.promo-drag-hint {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

/* ===== 卡片 / 表格 ===== */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.card h2 { margin: 0 0 16px; font-size: 18px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 11px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; }
.empty { color: var(--muted); text-align: center; padding: 24px; }

.filters { display: flex; gap: 10px; margin-bottom: 16px; align-items: center; flex-wrap: wrap; }
.filters input { flex: 1; min-width: 180px; }
.filters select { width: auto; }

/* ===== 我的信息 ===== */
.info-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.info-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.info-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.badge { font-size: 12px; padding: 3px 10px; border-radius: 999px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.badge-active { background: #e3f8ec; color: #128a4b; }
.badge-expired { background: #f1f3f8; color: #7a86a3; }

/* ===== 移动端适配 ===== */
@media (max-width: 900px) {
  .waterfall { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
}
@media (max-width: 600px) {
  .topbar { padding: 10px 16px; }
  .brand-title { font-size: 18px; }
  .brand-sub { font-size: 10px; letter-spacing: 3px; }
  .nav-links { gap: 6px 12px; width: 100%; }
  .nav-links a { font-size: 13px; }
  .search-bar { flex-direction: column; gap: 8px; }
  .site-stats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .search-bar button { width: 100%; }
  .filters { flex-direction: column; align-items: stretch; }
  .filters input, .filters select { width: 100%; min-width: 0; }
  .form-row { flex-direction: column; }
  .card, .waterfall-card { padding: 14px; }
  .container { margin: 16px auto; }
  .card table, table { display: block; overflow-x: auto; white-space: nowrap; }
  .nav-user { font-size: 13px; }
}
@media (max-width: 640px) {
  .waterfall { grid-template-columns: 1fr; gap: 12px; }
}

/* ===== 页脚 ===== */
.site-footer {
  margin-top: auto; /* 内容不足一屏时贴底，内容超长时紧随后续（流式，不遮挡） */
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 26px 24px 20px;
}
.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  justify-items: center;
  gap: 18px 28px;
  text-align: center;
}
.footer-brand {
  display: inline-flex;
  flex-direction: column;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}
.footer-brand .brand-title { font-size: 18px; }
.footer-brand .brand-sub { font-size: 10px; letter-spacing: 3px; }
.footer-qr {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.footer-qr-label {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 1px;
}
.footer-qr img {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 3px;
  background: #fff;
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}
.footer-links span:first-child { color: var(--text); font-weight: 600; }
@media (max-width: 600px) {
  .footer-inner { grid-template-columns: 1fr; }
}

/* 首页页脚悬浮条：页脚不可见时固定在浏览器底部 */
.footer-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  display: none;
}
.footer-dock.show { display: block; }
.footer-dock-bar {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 0 16px;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  box-shadow: 0 -3px 12px rgba(31, 45, 75, 0.08);
}
.footer-dock-bar::-webkit-scrollbar { display: none; }
.footer-dock-bar span { flex: none; }
.footer-dock-panel {
  display: none;
  max-height: 60vh;
  overflow-y: auto;
  border-top: 1px solid var(--border);
  background: var(--card);
  box-shadow: 0 -10px 28px rgba(31, 45, 75, 0.14);
}
.footer-dock.open .footer-dock-bar { display: none; }
.footer-dock.open .footer-dock-panel { display: block; }
.footer-dock-panel .footer-inner { padding: 24px; }

/* ===== 统一对话框 ===== */
.dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 25, 50, 0.5);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.dialog-overlay[hidden] { display: none; }
.dialog {
  width: 360px;
  max-width: 92vw;
  background: #fff;
  border-radius: 18px;
  padding: 30px 26px 22px;
  text-align: center;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.3);
  animation: modal-in .18s ease;
}
.dialog-icon {
  width: 48px; height: 48px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
}
.dialog-icon.info { background: var(--grad); }
.dialog-icon.warn { background: linear-gradient(120deg, #f59e0b, #f97316); }
.dialog-icon.error { background: linear-gradient(120deg, #ef4444, #dc2626); }
.dialog-icon.success { background: linear-gradient(120deg, #22c55e, #16a34a); }
.dialog-title { margin: 0 0 8px; font-size: 18px; font-weight: 800; }
.dialog-text { margin: 0 0 18px; color: var(--muted); font-size: 14px; line-height: 1.6; word-break: break-all; }
.dialog-text-nowrap {
  white-space: nowrap;
  overflow-x: auto;
  word-break: normal;
  text-align: left;
}
.dialog-text-nowrap::-webkit-scrollbar { height: 4px; }
.dialog-text-nowrap::-webkit-scrollbar-thumb { background: rgba(47, 107, 255, 0.35); border-radius: 999px; }
.dialog-text-lines {
  white-space: pre;
  overflow-x: auto;
  word-break: normal;
  text-align: left;
}
.dialog-text-lines::-webkit-scrollbar { height: 4px; }
.dialog-text-lines::-webkit-scrollbar-thumb { background: rgba(47, 107, 255, 0.35); border-radius: 999px; }
.dialog-danger {
  margin: 0 0 18px;
  color: var(--error);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.dialog-danger[hidden] { display: none; }
.dialog-wide { width: 460px; max-width: 92vw; }
.dialog-input-wrap { margin-bottom: 14px; }
.dialog-actions { display: flex; gap: 10px; }
.dialog-actions button { flex: 1; }

/* ===== 轻提示 toast ===== */
.ui-toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%) translateY(20px);
  z-index: 300;
  background: rgba(22, 34, 59, 0.92);
  color: #fff;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 14px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.ui-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.ui-toast.error { background: rgba(220, 38, 38, 0.92); }
.ui-toast.success { background: rgba(22, 163, 74, 0.92); }

/* ===== 首页回到顶部 ===== */
.back-top {
  position: fixed;
  right: 20px;
  bottom: 70px;
  z-index: 80;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px rgba(47, 107, 255, 0.38);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease, box-shadow .2s ease;
}
.back-top.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-top:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(47, 107, 255, 0.48);
}
.back-top svg { width: 21px; height: 21px; }

/* ===== 宣传图：固定缩略与放大居中 ===== */
.promo-thumb {
  position: fixed;
  right: 18px;
  bottom: calc(var(--footer-h, 0px) + 16px);
  z-index: 60;
  width: 120px;
  cursor: grab;
  text-align: center;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 5px;
  box-shadow: var(--shadow-md);
}
.promo-thumb:active { cursor: grabbing; }
.promo-thumb img {
  display: block;
  width: 100%;
  height: 86px;
  object-fit: cover;
  border-radius: 10px;
  pointer-events: none;
}
.promo-drag-hint { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; }

.modal.promo-modal { width: auto; min-width: 40vw; padding: 24px; }
.promo-image {
  display: block;
  max-width: 84vw;
  max-height: 78vh;
  width: auto;
  height: auto;
  margin: 0 auto;
  border-radius: 12px;
}

/* 页脚二维码放大 */
.footer-qr img { cursor: zoom-in; }
.footer-qr-modal { width: auto; min-width: 280px; padding: 26px; }
.footer-qr-large {
  display: block;
  width: 260px;
  max-width: 80vw;
  height: auto;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
}

/* ===== 地区树形多选 ===== */
#region-tree-wrap { padding: 8px; }
.rt-scroll {
  max-height: 340px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}
.rt-list { padding: 6px; }
.rt-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 8px;
  transition: background .12s ease;
}
.rt-row:hover { background: #f4f8ff; }
.rt-caret {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  border-radius: 5px;
  user-select: none;
  flex: none;
}
.rt-caret:hover { background: #e8efff; color: var(--accent); }
.rt-caret-empty { cursor: default; }
.rt-caret-empty:hover { background: transparent; color: var(--muted); }
.rt-label {
  display: flex;
  flex: 1;
  min-width: 0;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}
.rt-label input {
  width: 16px;
  height: 16px;
  padding: 0;
  accent-color: var(--accent);
  cursor: pointer;
  flex: none;
}
.rt-name { color: var(--text); white-space: nowrap; }
.rt-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--grad);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  flex: none;
}
.rt-hint:empty { display: none; }
.rt-count {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted) !important;
  font-size: 11px;
  font-weight: 400;
}
.rt-row.rt-child .rt-label { font-weight: 400; }
.rt-child[hidden] { display: none; }
/* 已选地区右侧抽屉：默认窄条竖向显示摘要，悬停后展开详情 */
.region-drawer {
  position: fixed;
  right: 0;
  top: 50%;
  z-index: 70;
  width: 30px;
  height: min(62vh, 460px);
  transform: translateY(-50%);
  overflow: hidden;
  border: 1px solid rgba(47, 107, 255, 0.28);
  border-right: none;
  border-radius: 14px 0 0 14px;
  background: var(--grad);
  box-shadow: var(--shadow-md);
  transition: width .22s ease;
}
.region-drawer:hover { width: 320px; }
.region-drawer-brief {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 100%;
  padding: 14px 6px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  line-height: 1.5;
  writing-mode: vertical-rl;
  text-orientation: upright;
  white-space: nowrap;
}
.region-drawer:hover .region-drawer-brief { display: none; }
.region-drawer-body {
  display: none;
  flex-direction: column;
  height: 100%;
  padding: 14px;
  overflow: hidden;
  background: var(--card);
  color: var(--text);
}
.region-drawer:hover .region-drawer-body { display: flex; }
.region-drawer-body .region-summary-count {
  flex: none;
  margin-bottom: 10px;
  color: var(--accent);
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.region-drawer-body .region-summary-list { flex: 1; min-height: 0; max-height: none; }
@media (max-width: 700px) and (min-width: 561px) {
  .region-drawer {
    width: 26px;
    height: min(70vh, 400px);
  }
  .region-drawer:hover { width: min(86vw, 300px); }
  .region-drawer-brief {
    width: 26px;
    padding-left: 4px;
    padding-right: 4px;
    font-size: 12px;
    letter-spacing: 1px;
  }
}
@media (max-width: 560px) {
  .region-drawer {
    position: static;
    width: 100%;
    height: auto;
    transform: none;
    margin-top: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card);
    box-shadow: var(--shadow-sm);
  }
  .region-drawer-brief { display: none; }
  .region-drawer-body,
  .region-drawer:hover .region-drawer-body {
    display: flex;
    height: auto;
    max-height: 220px;
    padding: 10px;
  }
  .region-drawer-body .region-summary-list { max-height: 180px; }
}

.region-summary-count { font-weight: 700; margin-bottom: 8px; }
.region-summary-list {
  max-height: 150px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.region-province {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}
.region-province-name {
  font-weight: 700;
  color: var(--text);
}
.region-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 999px;
  background: #eef3ff;
  border: 1px solid rgba(47, 107, 255, 0.25);
  color: var(--text);
  font-size: 12px;
}
.region-chip em {
  font-style: normal;
  font-weight: 800;
  color: var(--accent);
}
.region-readonly {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px 4px;
}
.region-readonly-value {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
}
.region-readonly .muted { display: block; }

/* ===== 我的信息：搜索/全选/批量删除 ===== */
.mine-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.mine-heading h1 { margin: 0 0 4px; font-size: 22px; }
.mine-heading .muted { margin: 0; }
.mine-toolbar { display: flex; flex-direction: column; gap: 12px; }
.mine-search { display: flex; gap: 10px; }
.mine-search input { flex: 1; }
.mine-bulkbar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  border-top: 1px dashed var(--border);
  padding-top: 12px;
}
.select-all-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
}
.select-all-label input, .info-check {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}
.info-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
}
.info-select { display: inline-flex; }
.info-select input { margin: 0; }
@media (max-width: 600px) {
  .mine-search { flex-direction: column; }
  .mine-search button { width: 100%; }
  .info-head { grid-template-columns: 1fr; }
  .info-select { order: -1; }
}

/* 发布/保存 loading 态 */
#submit-btn:disabled {
  opacity: .7;
  cursor: not-allowed;
  transform: none;
  filter: none;
}

/* 首页加载提示 */
#load-more.is-loading::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  vertical-align: -2px;
  border: 2px solid rgba(47, 107, 255, 0.25);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== 我的信息：紧凑布局 + 分页 ===== */
.info-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}
.info-select input { margin: 0; width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.info-main { flex: 1; min-width: 0; }
.info-head { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; }
.info-head strong { font-size: 15px; flex: 1; min-width: 0; }
.info-head .badge { flex: none; align-self: center; }
/* 地区过多时限制高度，超出显示垂直滚动条 */
.info-regions {
  max-height: 96px;
  overflow-y: auto;
  line-height: 1.6;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(47, 107, 255, 0.4) transparent;
}
.info-regions::-webkit-scrollbar { width: 8px; }
.info-regions::-webkit-scrollbar-thumb {
  background: rgba(47, 107, 255, 0.35);
  border-radius: 4px;
}
.info-regions::-webkit-scrollbar-thumb:hover { background: rgba(47, 107, 255, 0.55); }
.info-regions::-webkit-scrollbar-track { background: transparent; }
.info-head { position: relative; }
.info-head.has-more::after {
  content: "▾ 滚动查看全部";
  position: absolute;
  right: 6px;
  bottom: 0;
  font-size: 11px;
  color: var(--accent);
  opacity: 0.95;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.75), var(--card) 45%);
  padding-left: 22px;
  padding-bottom: 2px;
  pointer-events: none;
}
.info-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 6px;
  font-size: 13px;
}
.info-price { font-size: 18px; font-weight: 800; color: var(--accent); }
.info-countdown { font-variant-numeric: tabular-nums; white-space: nowrap; }
.info-meta .info-expiry {
  margin-left: auto;
  flex: none;
  min-width: 158px;
  justify-content: center;
}
.info-status { flex: none; align-self: center; margin-left: auto; }
.info-actions { display: flex; gap: 8px; flex-shrink: 0; }
.info-actions button { padding: 8px 14px; }

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 18px;
}
.pager button { padding: 9px 20px; }
#page-info { min-width: 170px; text-align: center; }

@media (max-width: 600px) {
  .info-item { flex-wrap: wrap; align-items: flex-start; }
  .info-select { align-self: center; }
  .info-main { flex: 1 1 auto; }
  .info-actions { flex-basis: 100%; justify-content: flex-end; }
  .info-meta { flex-direction: column; align-items: flex-start; gap: 4px; }
  .info-meta .info-expiry { margin-left: 0; min-width: 0; padding-left: 0; }
}

/* 多行/长列表提示（如覆盖地区列表） */
.dialog-text {
  white-space: pre-line;
  max-height: 46vh;
  overflow-y: auto;
  text-align: left;
}

/* 地区树操作栏（全选/清空） */
.region-search { margin-bottom: 10px; }
.region-search input { background: #fff; }
.region-tree-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}
.region-tree-actions > div { display: flex; gap: 8px; }
.region-tree-actions button { padding: 8px 14px; }
@media (max-width: 600px) {
  .region-tree-actions { flex-direction: column; align-items: stretch; }
  .region-tree-actions > div { width: 100%; }
  .region-tree-actions button { flex: 1; }
}

/* 发布/编辑批量任务进度弹窗 */
.progress-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.progress-overlay.show { display: flex; }
.progress-dialog {
  width: min(420px, 92vw);
  padding: 24px;
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow-md);
}
.progress-title { font-size: 17px; font-weight: 800; margin-bottom: 18px; }
.progress-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9eef9;
}
.progress-bar {
  height: 100%;
  border-radius: inherit;
  background: var(--grad);
  transition: width .18s ease;
}
.progress-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}
.progress-pct { color: var(--accent); font-weight: 800; }

/* 页脚管理后台链接 */
.footer-admin {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.footer-admin:hover { text-decoration: underline; }

/* ===== 开放平台文档页 ===== */
.open-docs { max-width: 860px; }
.open-hero { padding: 30px 28px; }
.open-kicker {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 8px;
}
.open-hero h1 { margin: 0 0 10px; font-size: 26px; }
.open-hero p { margin: 0 0 16px; color: var(--muted); }
.open-notice {
  background: linear-gradient(120deg, #fff7e6, #fff3d6);
  border: 1px solid #f5d9a0;
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
}
.open-notice strong { color: #b45309; }
.doc-section { padding: 22px 24px; }
.doc-section h2 { margin: 0 0 12px; font-size: 18px; }
.doc-section p { margin: 8px 0; color: var(--text); line-height: 1.7; }
.doc-section pre {
  background: #0f172a;
  color: #e6f0ff;
  border-radius: 10px;
  padding: 14px 16px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.6;
  margin: 10px 0;
}
.doc-section code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.endpoint {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 6px 0 4px;
  font-weight: 600;
}
.method {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  border-radius: 6px;
  padding: 3px 8px;
  letter-spacing: 1px;
}
.method-post { background: #22c55e; }
.method-get { background: #2f6bff; }
.method-patch { background: #f59e0b; }
.method-delete { background: #ef4444; }
.doc-list { padding-left: 20px; color: var(--text); line-height: 1.9; }
.open-contact .nav-cta { display: inline-block; margin-top: 8px; }

/* ===== 开放平台管理页 ===== */
.tab-btn {
  background: #fff;
  color: var(--accent);
  border: 1px solid rgba(47, 107, 255, 0.35);
  box-shadow: none;
}
.tab-btn.active {
  background: var(--grad);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(47, 107, 255, 0.28);
}
.token-result {
  background: #0f172a;
  color: #7ee787;
  border-radius: 10px;
  padding: 12px 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  word-break: break-all;
  margin-bottom: 14px;
  user-select: all;
}
.open-apply-card { padding: 30px 28px; }
.open-apply-card h1 { margin: 0 0 6px; font-size: 24px; }

/* ===== 后台用户管理 ===== */
.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.user-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  margin-bottom: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .15s ease, transform .15s ease;
}
.user-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.user-avatar {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.user-info { flex: 1; min-width: 0; }
.user-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.user-name { font-size: 15px; }
.platform-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #eef3ff;
  border: 1px solid rgba(47, 107, 255, 0.25);
  color: var(--accent);
}
.platform-tag.platform-none {
  background: #f3f4f6;
  border-color: #e5e7eb;
  color: var(--muted);
}
.badge-lifetime { background: #eef3ff; color: var(--accent); }
.user-actions { display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }
.user-actions button { padding: 8px 14px; }
@media (max-width: 600px) {
  .user-card { flex-wrap: wrap; }
  .user-actions { flex-basis: 100%; justify-content: flex-end; }
}

/* ===== 后台信息管理（卡片） ===== */
.ia-card {
  position: relative;
  padding: 16px;
  margin-bottom: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .15s ease, transform .15s ease;
}
.ia-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.ia-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding-right: 64px;
}
.ia-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.ia-region {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ia-price {
  flex: none;
  font-size: 20px;
  font-weight: 800;
  color: var(--accent);
}
.ia-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-size: 13px;
  color: var(--muted);
  padding-right: 40px;
}
.ia-meta b { color: var(--text); font-weight: 600; margin-right: 4px; }
.ia-del {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 8px;
}
@media (max-width: 600px) {
  .ia-meta { padding-right: 0; }
}
