/* ============================================================
   cardhub 前台 + 后台样式  v3
   主题：橙（品牌/按钮）+ 蓝（分类头）
   ============================================================ */

:root {
  --orange: #ff7800;
  --orange-2: #ff5500;
  --orange-soft: #fff4e8;
  --blue: #4a8fe2;
  --blue-2: #2c6fbe;
  --indigo: #3b4fc7;
  --indigo-2: #2b3aa0;
  --indigo-soft: #eef0fb;
  --text: #2c3e50;
  --muted: #6b7a90;
  --muted-3: #a8b4c5;
  --bg: #f4f5f7;
  --bg-2: #eef0f5;
  --card: #ffffff;
  --border: #e8ebf0;
  --border-2: #d4d9e0;
  --err: #e24b4a;
  --ok: #1d9e75;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--text);
  font: 14px/1.6 -apple-system, BlinkMacSystemFont, "Microsoft YaHei", "PingFang SC", sans-serif;
  background: var(--bg);
  min-height: 100vh;
}

a { color: var(--text); text-decoration: none; }

.wrap { max-width: 1260px; margin: 0 auto; padding: 0 18px; }
.wrap.main { padding: 18px 14px 40px; }

/* ===== Topbar ===== */
.topbar {
  background: #f7f8fa;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}
.topbar-wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; height: 40px;
}
.topbar-logo {
  display: inline-flex; align-items: center; gap: 7px;
  color: var(--orange); font-weight: 700; font-size: 14px;
}
.topbar-ico { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; }
.topbar-ico svg { display: block; }
.topbar-r { display: flex; align-items: center; gap: 2px; }
.topbar-search { display: flex; margin-right: 8px; }
.topbar-search input {
  width: 200px; padding: 5px 10px;
  border: 1px solid var(--border); border-right: 0;
  border-radius: 4px 0 0 4px;
  background: #fff; font-size: 12px; color: var(--text);
  transition: border-color .15s;
}
.topbar-search input:focus { outline: 0; border-color: var(--orange); }
.topbar-search input::placeholder { color: var(--muted-3); }
.topbar-search button {
  padding: 0 12px; border: 0;
  background: var(--orange); color: #fff;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.topbar-search button:hover { background: var(--orange-2); }
.navbtn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 10px;
  color: var(--muted);
  border-radius: 4px;
  font-size: 12px;
  transition: background .15s, color .15s;
}
.navbtn svg { display: block; }
.navbtn:hover { background: var(--orange-soft); color: var(--orange); }

/* ===== Brandbar ===== */
.brandbar {
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-2) 100%);
  padding: 24px 0;
  box-shadow: 0 4px 14px rgba(255,120,0,.20);
  position: relative;
  overflow: hidden;
}
.brandbar::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(600px 240px at 88% -20%, rgba(255,255,255,.22), transparent 60%),
    radial-gradient(440px 240px at 4% 120%, rgba(255,255,255,.12), transparent 60%);
  pointer-events: none;
}
.brandbar .wrap { position: relative; }
a.brand {
  display: inline-flex; align-items: center; gap: 14px;
  color: #fff; text-decoration: none;
  cursor: pointer;
  padding: 4px 12px 4px 4px;
  border-radius: 12px;
  transition: transform .15s, background .2s;
  position: relative;
}
a.brand:hover { background: rgba(255,255,255,.12); transform: translateX(2px); }
a.brand:hover .brand-go { opacity: 1; transform: translateX(0); }
a.brand:focus-visible { outline: 2px solid rgba(255,255,255,.7); outline-offset: 4px; }
.brand-icon {
  width: 50px; height: 50px;
  background: rgba(255,255,255,.18);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.22);
  transition: background .2s;
}
a.brand:hover .brand-icon { background: rgba(255,255,255,.28); }
.brand-icon svg { display: block; }
.brand-text {
  font-size: 28px; font-weight: 700; letter-spacing: 3px;
  text-shadow: 0 2px 6px rgba(0,0,0,.14);
}
.brand-go {
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity .18s, transform .18s;
  margin-left: 6px;
}

/* ===== Notices grid (4-col) ===== */
.notices {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 10px; margin-bottom: 16px;
}
.notice-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 14px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
  text-align: center;
  transition: border-color .15s, box-shadow .15s, color .15s;
}
.notice-item:hover {
  border-color: var(--orange);
  box-shadow: 0 4px 10px rgba(255,120,0,.10);
  color: var(--text);
}

/* ===== Chips ===== */
.chips {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 16px;
}
.chip {
  padding: 7px 18px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  transition: all .15s;
}
.chip:hover { color: var(--orange); border-color: var(--orange); }
.chip.on {
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  border-color: var(--blue);
  color: #fff;
  box-shadow: 0 4px 10px rgba(74,143,226,.28);
}

/* ===== Sections ===== */
.section { margin-bottom: 20px; scroll-margin-top: 12px; }
.section-head {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-2) 100%);
  color: #fff;
  padding: 14px 26px;
  font-size: 16px; font-weight: 600;
  text-align: center;
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: 0 4px 10px rgba(74,143,226,.22);
}
.section-head small { font-size: 13px; opacity: .9; font-weight: 400; margin-left: 4px; }
.section-body {
  background: var(--card);
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
}

/* ===== Rows ===== */
.row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px;
  border-bottom: 1px dashed var(--border);
  color: inherit;
  transition: background .15s;
  gap: 12px;
}
.row:last-child { border-bottom: 0; }
.row:hover { background: var(--orange-soft); }
.row-l { flex: 1; min-width: 0; }
.row-name {
  font-size: 14px; color: var(--text); font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.row-desc {
  font-size: 12px; color: var(--muted);
  margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.row-r {
  display: flex; align-items: center; gap: 12px; flex-shrink: 0;
}
.row-price {
  color: var(--err); font-size: 17px; font-weight: 700;
  min-width: 64px; text-align: right;
}
.row-btn {
  padding: 6px 14px;
  background: linear-gradient(135deg, var(--orange), var(--orange-2));
  color: #fff;
  border-radius: 6px;
  font-size: 13px; font-weight: 500;
  box-shadow: 0 3px 8px rgba(255,120,0,.28);
  transition: transform .15s, box-shadow .15s;
}
.row:hover .row-btn { transform: translateX(2px); box-shadow: 0 4px 12px rgba(255,120,0,.38); }
.row-btn.off { background: #c9d2dc; box-shadow: none; }

/* ===== Row thumbnail (index.php 商品卡片缩略图) ===== */
.row-thumb {
  width: 44px; height: 44px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-2);
}
.row-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.row-thumb.noimg {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-2) 100%);
  color: #fff; font-size: 16px; font-weight: 700;
}

/* ===== Cards (sub-pages) ===== */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
}
.card h1 { margin: 0 0 12px; font-size: 18px; font-weight: 600; color: var(--orange); }
.card h3 { margin: 0 0 12px; font-size: 15px; font-weight: 600; color: var(--text); }

label.f { display: block; margin-bottom: 12px; }
label.f > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
input[type=text], input[type=number] {
  width: 100%; padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
input:focus {
  outline: 0;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255,120,0,.14);
}

/* ===== Btn (orange) ===== */
.btn {
  display: block; width: 100%;
  padding: 13px; border: 0; border-radius: 10px;
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-2) 100%);
  color: #fff;
  font-size: 15px; font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(255,120,0,.28);
  transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(255,120,0,.38); }
.btn.ghost {
  background: #fff; color: var(--orange);
  border: 1px solid var(--border-2); box-shadow: none;
}
.btn:disabled { background: #c9d2dc; box-shadow: none; cursor: not-allowed; transform: none; }

/* ===== Price & stock ===== */
.price { color: var(--err); font-size: 19px; font-weight: 700; display: inline-flex; align-items: baseline; gap: 1px; }
.price small { font-size: 12px; font-weight: 500; }
.stock { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.stock::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--muted-3); }
.stock.hot::before { background: var(--ok); box-shadow: 0 0 0 3px rgba(29,158,117,.18); }
.stock.zero::before { background: var(--muted-3); }

/* ===== Tags ===== */
.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 500; background: #eef1f5; color: var(--muted); }
.tag.kaka { background: linear-gradient(135deg, #ede4ff, #f4eaff); color: #7c3aed; }
.tag.no { background: #f1efe8; color: var(--muted-3); }

/* ===== KM ===== */
.km-list { margin-top: 16px; text-align: left; }
.km {
  background: linear-gradient(135deg, #fafcff, #f4f8ff);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px; margin-bottom: 8px;
  font-size: 13px; word-break: break-all; line-height: 1.85;
}
.km b { color: var(--blue-2); }

/* ===== Goods detail (buy.php 商品详情，上游富文本净化后渲染) ===== */
.goods-detail {
  font-size: 13px; color: var(--text); line-height: 1.95; word-break: break-word;
}
.goods-detail p { margin: 0 0 10px; }
.goods-detail div { margin: 0 0 6px; }
.goods-detail a { color: var(--orange); font-weight: 500; word-break: break-all; }
.goods-detail a:hover { color: var(--orange-2); text-decoration: underline; }
.goods-detail strong, .goods-detail b { color: var(--err); font-weight: 600; }
.goods-detail ul, .goods-detail ol { margin: 4px 0 10px; padding-left: 22px; }
.goods-detail li { margin-bottom: 3px; }
.goods-detail h1, .goods-detail h2, .goods-detail h3, .goods-detail h4 {
  margin: 12px 0 6px; font-size: 14px; font-weight: 600; color: var(--text);
}

/* ===== Goods hero (buy.php 主图) ===== */
.goods-hero {
  margin: 0 0 16px;
  text-align: center;
}
.goods-hero a { display: inline-block; }
.goods-hero img {
  max-width: min(100%, 260px);
  height: auto;
  border-radius: var(--radius);
  display: block;
  margin: 0 auto;
}
.goods-detail img {
  max-width: min(100%, 420px);
  height: auto;
  display: block;
  margin: 8px auto;
}
.goods-detail table {
  max-width: 100%;
}
.goods-detail pre {
  overflow-x: auto;
  max-width: 100%;
}

/* ===== Result (order.php) ===== */
.result { text-align: center; padding: 28px 0 12px; }
.result .ico {
  width: 60px; height: 60px; border-radius: 50%;
  margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; color: #fff;
  box-shadow: 0 8px 20px rgba(0,0,0,.10);
}
.result.ok .ico { background: linear-gradient(135deg, #1d9e75, #22c55e); }
.result.err .ico { background: linear-gradient(135deg, var(--orange), var(--orange-2)); }
.result .t { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.result .s { font-size: 13px; color: var(--muted); }

/* ===== Notice (singular, query.php messages) ===== */
.notice {
  position: relative;
  padding: 11px 14px 11px 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, #fff4e8, #fff8f0);
  border: 1px solid rgba(255,120,0,.18);
  color: #8a4500;
  font-size: 13px;
  margin-bottom: 14px;
}
.notice::before {
  content: '!';
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--orange); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}

/* ===== Empty & footer ===== */
.empty { text-align: center; padding: 70px 20px; color: var(--muted-3); font-size: 14px; }
footer { text-align: center; font-size: 12px; color: var(--muted-3); padding: 22px 0; }

/* ===== Safety net: 隐藏残留旧 header 元素 ===== */
header { display: none; }
.logo, .hd-link { display: none; }

/* ===== Nav active ===== */
.navbtn.on { background: var(--orange-soft); color: var(--orange); }

/* ===== Footer ===== */
footer.footer {
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 22px 0 28px;
  text-align: left;
}
footer.footer .wrap { color: var(--muted); font-size: 12px; line-height: 1.9; }
.copyright { margin-top: 8px; }
.disclaimer { color: var(--muted-3); margin-top: 4px; max-width: 900px; }

/* ===== Info tip (light blue stacked box) ===== */
.info-tip {
  background: #f0f6ff;
  border: 1px solid #d6e6fb;
  border-radius: 8px;
  padding: 11px 16px;
  font-size: 13px;
  color: #2c5d92;
  margin-bottom: 8px;
  line-height: 1.7;
}
.info-tip .lbl { font-weight: 600; color: #1e4a7a; margin-right: 4px; }

/* ===== Search bar (query.php) ===== */
.search-bar {
  display: flex; align-items: stretch;
  max-width: 620px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  margin-top: 12px;
}
.search-bar select {
  width: auto; flex: 0 0 auto;
  border: 0; border-right: 1px solid var(--border);
  background: #f7f8fa;
  padding: 0 14px;
  font-size: 13px; color: var(--text);
  cursor: pointer;
  min-width: 110px;
  outline: none;
}
.search-bar input {
  flex: 1; min-width: 0;
  border: 0; padding: 12px 14px;
  font-size: 13px; outline: none;
}
.search-bar button {
  padding: 0 28px;
  background: linear-gradient(135deg, var(--orange), var(--orange-2));
  color: #fff; border: 0;
  font-size: 14px; font-weight: 500;
  cursor: pointer;
  transition: opacity .15s;
}
.search-bar button:hover { opacity: .92; }

/* ===== Tip warn (kf.php yellow box) ===== */
.tip-warn {
  background: #fffbe6;
  border: 1px solid #ffe58f;
  border-radius: 8px;
  padding: 11px 16px 11px 42px;
  font-size: 13px;
  color: #ad6800;
  position: relative;
  margin-bottom: 14px;
}
.tip-warn::before {
  content: '!';
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; border-radius: 50%;
  background: #faad14; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}

/* ===== Note info (light blue, with i icon) ===== */
.note-info {
  background: #f0f6ff;
  border: 1px solid #d6e6fb;
  border-radius: 8px;
  padding: 11px 16px 11px 42px;
  font-size: 13px;
  color: #2c5d92;
  position: relative;
  margin-bottom: 14px;
}
.note-info::before {
  content: 'i';
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; font-style: italic;
  font-family: Georgia, serif;
}

/* ===== Card grid 2 (kf.php self-help) ===== */
.card-grid-2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 22px;
}
.icon-card {
  text-align: center;
  padding: 22px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: all .15s;
  cursor: pointer;
  display: block;
}
.icon-card:hover { border-color: var(--blue); box-shadow: 0 4px 14px rgba(74,143,226,.15); }
.icon-card .ic {
  width: 44px; height: 44px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e8f1ff, #d6e6fb);
  color: var(--blue);
  display: flex; align-items: center; justify-content: center;
}
.icon-card .ic svg { display: block; }
.icon-card .t { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.icon-card .s { font-size: 12px; color: var(--muted); line-height: 1.5; }

/* ===== Contact grid (kf.php) ===== */
.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 26px 22px;
}
.contact-cell { text-align: center; }
.contact-cell .label { font-size: 13px; color: var(--text); font-weight: 600; margin-bottom: 14px; }
.contact-cell .qq { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 20px; letter-spacing: 1px; }
.contact-cell .qr {
  width: 132px; height: 132px;
  margin: 0 auto 16px;
  background: #fff;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted-3);
  font-size: 12px;
}
.contact-cell .btn-orange {
  display: inline-block;
  padding: 9px 22px;
  background: linear-gradient(135deg, var(--orange), var(--orange-2));
  color: #fff; border-radius: 6px;
  font-size: 13px;
  box-shadow: 0 3px 8px rgba(255,120,0,.25);
  transition: transform .15s;
}
.contact-cell .btn-orange:hover { transform: translateY(-1px); }
.contact-cell .btn-gray {
  display: inline-block;
  padding: 9px 22px;
  background: #fff;
  border: 1px solid var(--border-2);
  color: var(--muted); border-radius: 6px;
  font-size: 13px;
  cursor: default;
}

/* ===== User center layout ===== */
.user-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 14px;
  margin-top: 16px;
}
.user-sidebar {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 0;
  align-self: start;
}
.user-profile {
  text-align: center;
  padding: 0 16px 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}
.user-avatar {
  width: 56px; height: 56px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  color: #fff;
  font-size: 22px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(74,143,226,.25);
}
.user-name { font-size: 13px; color: var(--text); font-weight: 600; margin-bottom: 4px; }
.user-bal-mini {
  font-size: 18px; font-weight: 700;
  color: var(--err);
}
.user-bal-mini small { font-size: 11px; }
.user-menu { list-style: none; padding: 0; margin: 8px 0 0; }
.user-menu li a {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  font-size: 13px;
  color: var(--muted);
  transition: all .15s;
  border-left: 3px solid transparent;
}
.user-menu li a:hover { background: var(--orange-soft); color: var(--orange); }
.user-menu li a.on { background: var(--orange-soft); color: var(--orange); border-left-color: var(--orange); }
.user-menu li a svg { display: block; opacity: .8; }

.user-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.user-balance-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
}
.user-balance-card .lbl { font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.user-balance-card .amt { font-size: 32px; font-weight: 700; color: var(--err); line-height: 1.2; }
.user-balance-card .amt small { font-size: 16px; font-weight: 500; }

.quick-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.quick-item {
  background: var(--card);
  padding: 22px 14px;
  text-align: center;
  transition: background .15s;
  cursor: pointer;
  display: block;
}
.quick-item:hover { background: var(--orange-soft); }
.quick-item .ic {
  width: 40px; height: 40px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e8f1ff, #d6e6fb);
  color: var(--blue);
  display: flex; align-items: center; justify-content: center;
}
.quick-item .ic svg { display: block; }
.quick-item .t { font-size: 13px; color: var(--text); }

/* ===== Toast（全局轻提示） ===== */
.toast {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(.92);
  background: rgba(0,0,0,.82); color: #fff;
  padding: 11px 22px; border-radius: 8px;
  font-size: 14px; font-weight: 500;
  opacity: 0; pointer-events: none;
  transition: opacity .18s, transform .18s;
  z-index: 200;
  box-shadow: 0 6px 24px rgba(0,0,0,.25);
  white-space: nowrap;
  letter-spacing: .5px;
}
.toast.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* ===== 占位按钮（功能开发中） ===== */
a.soon {
  cursor: help !important;
  opacity: .6;
  transition: opacity .15s;
}
a.soon:hover { opacity: .85; }
.user-menu li a.soon:hover {
  background: transparent;
  color: var(--muted);
  border-left-color: transparent;
}

/* ===== Auth Pages (login / register) ===== */
.auth-wrap {
  min-height: calc(100vh - 56px);
  display: flex; align-items: center; justify-content: center;
  padding: 36px 16px 48px;
  background:
    radial-gradient(circle at 18% 12%, rgba(75,143,226,.18), transparent 38%),
    radial-gradient(circle at 86% 88%, rgba(255,120,0,.14), transparent 42%),
    linear-gradient(180deg, #f0f3f9 0%, #e9ecf3 100%);
}
.auth-card {
  width: 100%; max-width: 460px;
  background: var(--card);
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(43,58,160,.12), 0 4px 12px rgba(43,58,160,.06);
  overflow: hidden;
  position: relative;
}
.auth-card::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: linear-gradient(90deg, var(--indigo) 0%, var(--blue) 50%, var(--orange) 100%);
}
.auth-head {
  padding: 32px 36px 18px;
  text-align: center;
}
.auth-head .auth-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--indigo) 0%, var(--blue) 100%);
  color: #fff;
  border-radius: 16px;
  margin-bottom: 14px;
  box-shadow: 0 8px 22px rgba(59,79,199,.32);
}
.auth-head .auth-ico svg { display: block; }
.auth-head h1 {
  margin: 0 0 6px; font-size: 22px; font-weight: 700; color: var(--text);
  letter-spacing: .5px;
}
.auth-head .auth-tag {
  font-size: 13px; color: var(--muted); margin: 0;
}
.auth-form {
  padding: 8px 36px 8px;
}
.auth-form .f {
  position: relative;
  display: block;
  margin-bottom: 18px;
}
.auth-form .f > span {
  display: block; font-size: 12px; color: var(--muted);
  margin-bottom: 8px; font-weight: 500;
  letter-spacing: .3px;
}
.auth-form .f-input {
  position: relative;
  display: flex; align-items: center;
  background: #f7f9fc;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.auth-form .f-input:focus-within {
  border-color: var(--indigo);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(59,79,199,.12);
}
.auth-form .f-input svg {
  flex-shrink: 0;
  width: 18px; height: 18px;
  margin-left: 14px;
  color: var(--muted-3);
  transition: color .18s;
}
.auth-form .f-input:focus-within svg { color: var(--indigo); }
.auth-form .f-input input {
  flex: 1; min-width: 0;
  width: 100%;
  padding: 14px 14px 14px 10px;
  border: 0; outline: 0; background: transparent;
  font-size: 14px; color: var(--text);
  border-radius: 12px;
}
.auth-form .f-input input::placeholder { color: var(--muted-3); }
.auth-form .f-input .f-eye {
  flex-shrink: 0;
  padding: 0 14px;
  background: transparent; border: 0; cursor: pointer;
  color: var(--muted-3);
  display: flex; align-items: center; justify-content: center;
  height: 38px;
}
.auth-form .f-input .f-eye:hover { color: var(--indigo); }
.auth-form .f-error {
  display: none;
  font-size: 12px; color: var(--err);
  margin-top: 6px; padding-left: 4px;
}
.auth-form .f.error > span { color: var(--err); }
.auth-form .f.error .f-input { border-color: var(--err); box-shadow: 0 0 0 4px rgba(226,75,74,.1); }
.auth-form .f.error .f-error { display: block; }
.auth-form .auth-tip {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 11px 14px;
  background: var(--indigo-soft);
  border-radius: 10px;
  font-size: 12px; color: #4a5aa8;
  line-height: 1.7;
  margin-bottom: 18px;
}
.auth-form .auth-tip svg { flex-shrink: 0; color: var(--indigo); margin-top: 2px; }
.auth-form .auth-tip b { color: var(--indigo-2); }
.auth-form .auth-rules {
  font-size: 12px; color: var(--muted);
  text-align: center;
  margin: 14px 0 4px;
  line-height: 1.7;
}
.auth-form .auth-rules a { color: var(--indigo); font-weight: 500; }
.auth-form .auth-rules a:hover { text-decoration: underline; }
.auth-form .btn {
  width: 100%;
  padding: 14px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 1px;
  background: linear-gradient(135deg, var(--indigo) 0%, var(--indigo-2) 100%);
  box-shadow: 0 8px 22px rgba(59,79,199,.32);
  border-radius: 12px;
}
.auth-form .btn:hover {
  box-shadow: 0 12px 28px rgba(59,79,199,.42);
  transform: translateY(-1px);
}
.auth-form .btn.ghost {
  background: #fff;
  color: var(--indigo);
  border: 1.5px solid var(--border);
  box-shadow: none;
}
.auth-form .btn.ghost:hover {
  border-color: var(--indigo);
  box-shadow: 0 4px 12px rgba(59,79,199,.1);
}
.auth-foot {
  margin-top: 26px;
  padding: 22px 28px;
  border-top: 1px solid var(--border);
  background: #fafbfd;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.auth-foot .foot-cell {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.auth-foot .foot-cell svg {
  display: block; margin: 0 auto 6px;
  color: var(--indigo);
}
.auth-foot .foot-cell b {
  display: block; color: var(--text);
  font-size: 13px; font-weight: 600; margin-bottom: 2px;
}
.auth-bottom-link {
  text-align: center;
  margin-top: 22px;
  font-size: 13px;
  color: var(--muted);
}
.auth-bottom-link a {
  color: var(--indigo); font-weight: 600; margin-left: 6px;
}
.auth-bottom-link a:hover { text-decoration: underline; }
.auth-bottom-link .auth-arrow {
  display: inline-block; margin-left: 4px;
  transition: transform .18s;
}
.auth-bottom-link a:hover .auth-arrow { transform: translateX(3px); }

/* ===== Query page compact cards ===== */
.page-query .card {
  padding: 12px;
  margin-bottom: 10px;
}
.page-query .card h1 {
  font-size: 15px;
  margin-bottom: 8px;
}
.page-query .card h1 .tag {
  font-size: 10px;
  padding: 1px 6px;
  margin-left: 6px;
}
.page-query .order-info {
  width: 100%;
  font-size: 12px;
  line-height: 1.45;
}
.page-query .order-info th,
.page-query .order-info td {
  padding: 2px 0;
  vertical-align: top;
}
.page-query .order-info th {
  width: 68px;
  text-align: left;
  color: var(--muted);
  font-weight: 400;
  padding-right: 8px;
  white-space: nowrap;
}
.page-query .order-info td {
  color: var(--text);
}
.page-query .order-info td.break {
  word-break: break-all;
}
.page-query .km-list {
  margin-top: 10px;
}
.page-query .km-list h3 {
  font-size: 13px;
  margin-bottom: 6px;
}
.page-query .km {
  padding: 8px 10px;
  margin-bottom: 6px;
  font-size: 12px;
  line-height: 1.6;
}
.page-query .card form {
  margin-top: 10px;
}
.page-query .card .btn.ghost {
  display: inline-block;
  width: auto;
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 6px;
}

/* ===== Mobile ===== */
@media (max-width: 720px) {
  .topbar-wrap { height: auto; padding: 8px 0; flex-wrap: wrap; gap: 8px; }
  .topbar-search input { width: 140px; }
  .navbtn span { display: none; }
  .navbtn { padding: 4px 8px; }
  .brand-text { font-size: 22px; letter-spacing: 2px; }
  .brand-icon { width: 42px; height: 42px; }
  .notices { grid-template-columns: repeat(2, 1fr); }
  .row { padding: 12px 12px; gap: 10px; }
  .row-r { gap: 10px; }
  .row-price { font-size: 15px; min-width: 56px; }
  .row-btn { padding: 6px 12px; font-size: 12px; }
  .section-head { padding: 10px 14px; font-size: 14px; }
  .chip { padding: 6px 14px; font-size: 12px; }
  .user-layout { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid-2, .contact-grid { grid-template-columns: 1fr; }
  .search-bar { flex-wrap: wrap; }
  .search-bar select { width: 100%; border-right: 0; border-bottom: 1px solid var(--border); padding: 10px 14px; }
  .search-bar input { width: 100%; }
  .search-bar button { width: 100%; padding: 12px; }
  .contact-cell .qr { width: 110px; height: 110px; }
}
/* ===== 会员价标签（index 列表 + buy 详情，2026-09-11）===== */
.row-price .mp-tag {
  display: block;
  font-size: 10px; font-weight: 600; line-height: 1.5;
  padding: 1px 6px; border-radius: 4px; margin-top: 2px;
  background: linear-gradient(135deg, #ff8a00, #ff6200);
  color: #fff; text-align: center;
}
.row-price .mp-tag.mp-on { background: linear-gradient(135deg, #22b14c, #16a34a); }
.tag.tag-mp { background: #fff3e6; color: #ff6a00; border: 1px solid #ffc79a; }

/* ===== 顶栏加大（仅桌面端，手机保持原紧凑布局）+ 品牌横幅缩小（2026-09-11 用户反馈）===== */
@media (min-width: 721px) {
  .topbar { font-size: 14px; }
  .topbar-wrap { height: 50px; }
  .topbar-logo { font-size: 17px; gap: 8px; }
  .topbar-ico { width: 24px; height: 24px; }
  .navbtn { font-size: 14px; padding: 7px 14px; gap: 6px; border-radius: 6px; }
  .navbtn svg { width: 17px; height: 17px; }
  .topbar-search input { font-size: 13px; }
}
.brandbar { padding: 12px 0; }
a.brand { gap: 10px; }
.brand-icon { width: 34px; height: 34px; border-radius: 9px; }
.brand-icon svg { width: 20px; height: 20px; }
.brand-text { font-size: 19px; letter-spacing: 1px; }

/* ===== 详情里上游按钮样式（上游用 Bootstrap 的 btn/btn-warning，本站无 Bootstrap，本地补齐）
   ⚠️ 全局 .btn 是下单按钮样式（display:block; width:100%），这里必须重置宽度和布局，
   否则详情里的按钮会被拉满整行（2026-09-11 用户反馈踩坑）===== */
.goods-detail .btn,
.goods-detail .btn-warning {
  display: inline-block;
  width: auto !important;
  max-width: 100%;
  padding: 8px 22px;
  border: 0;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff !important;
  background: linear-gradient(135deg, #ff8a00, #ff6200);
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(255,110,0,.30);
  transition: transform .15s, box-shadow .15s;
}
.goods-detail .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255,110,0,.40);
}

/* ===== Select：与输入框同款（自定义箭头，原生的太丑） ===== */
select {
  width: 100%; padding: 11px 36px 11px 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%23999999' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 13px center;
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
  cursor: pointer;
}
select:focus {
  outline: 0;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255,120,0,.14);
}
select:invalid { color: var(--text); }


/* ===== 数量步进器（− 输入 +） ===== */
.qty-box { display: flex; align-items: stretch; }
.qty-box input[type=number] {
  flex: 1; text-align: center;
  border-radius: 0; border-left: 0; border-right: 0;
  -moz-appearance: textfield; appearance: textfield;
}
.qty-box input::-webkit-outer-spin-button,
.qty-box input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-btn {
  width: 48px; flex: none;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, var(--orange), var(--orange-2));
  color: #fff; font-size: 20px; font-weight: 700; line-height: 1;
  cursor: pointer; transition: opacity .15s;
}
.qty-btn:hover { opacity: .9; }
.qty-btn:active { opacity: .8; }
#qtyMinus { border-radius: 8px 0 0 8px; }
#qtyPlus  { border-radius: 0 8px 8px 0; }

/* ===== 品牌条右侧：在线客服入口 ===== */
.brandbar-flex { display: flex; align-items: center; justify-content: space-between; }
a.brand-kf {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 999px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.35);
  color: #fff; text-decoration: none;
  transition: background .15s, transform .15s;
}
a.brand-kf:hover { background: rgba(255,255,255,.28); transform: translateY(-1px); }
.brand-kf-t { display: flex; flex-direction: column; line-height: 1.25; }
.brand-kf-t b { font-size: 13px; font-weight: 700; }
.brand-kf-t i { font-style: normal; font-size: 11px; opacity: .85; }
@media (max-width: 480px) { .brand-kf-t i { display: none; } }

/* 两个客服胶囊并排一行 */
.brand-kf-group { display: flex; align-items: center; gap: 8px; }

/* 品牌条整行：logo 左，客服组右，强制一行不换行 */
.brandbar-flex { flex-wrap: nowrap; }
.brandbar .brand-kf { white-space: nowrap; }
@media (max-width: 480px) {
  .brand-kf-group { gap: 6px; }
  a.brand-kf { padding: 6px 10px; }
  .brand-kf-t i { display: none; }
  .brand-text { font-size: 15px; }
}

/* 顶栏「点击返回主页」小提示（橙色系，配浅底顶栏） */
.topbar-back{font-size:11px;color:#f60;margin-left:8px;padding:2px 9px;border:1px solid rgba(255,120,0,.45);background:rgba(255,120,0,.07);border-radius:999px;white-space:nowrap;font-weight:400;}
@media(max-width:720px){.topbar-back{display:none;}}

/* 橙色横幅内「点击返回主页」小提示（手机端也显示） */
.brand-back{font-size:11px;color:rgba(255,255,255,.9);margin-left:12px;padding:3px 10px;border:1px solid rgba(255,255,255,.5);background:rgba(255,255,255,.15);border-radius:999px;white-space:nowrap;font-weight:400;flex-shrink:0;}

/* 手机端橙色横幅：站名+小字一行横排，客服按钮落到第二行 */
@media (max-width: 720px) {
  .brandbar-flex { flex-wrap: wrap; row-gap: 8px; }
  .brand { flex: 1 1 100%; min-width: 0; }
  .brand-text { font-size: 14px; letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
  .brand-back { font-size: 10px; padding: 2px 7px; margin-left: 8px; flex-shrink: 0; }
  .brand-go { display: none; }
  .brand-kf-group { flex: 1 1 100%; justify-content: flex-end; }
}

/* 表格横向滚动容器（手机防撑爆） */
.tbl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl-scroll table { min-width: 620px; }
