/* 统一设计系统：对齐 ruiqi-ic.app.workbuddy.host 视觉风格 */
[hidden] { display: none !important; }

:root {
  --brand: #1554f0;
  --brand-dark: #0e3fbe;
  --brand-soft: #eaf0ff;
  --accent: #ff5a1f;
  --ink: #171b22;
  --ink-2: #4a5464;
  --ink-3: #8b95a5;
  --line: #e6e9ef;
  --bg: #f4f6f9;
  --card: #ffffff;
  --ok: #1a7f37;
  --ok-soft: #f2faf4;
  --ok-line: #bfe3c9;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(20, 30, 60, .06);
  --shadow-lg: 0 12px 34px rgba(20, 30, 60, .12);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { margin: 0; }

.wrap { width: min(1240px, 100% - 32px); margin: 0 auto; }

/* ---------- 通用按钮 ---------- */
.btn-primary {
  height: 38px; padding: 0 18px; border: none; border-radius: 8px;
  background: var(--brand); color: #fff; font-size: 13px; font-weight: 600;
}
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost {
  height: 38px; padding: 0 12px; border-radius: 8px;
  border: 1.5px solid var(--brand); background: #fff; color: var(--brand); font-size: 13px; font-weight: 600;
}
.btn-ghost:hover { background: var(--brand-soft); }
.btn-wechat {
  height: 38px; padding: 0 18px; border-radius: 8px; border: 1.5px solid var(--ok-line);
  background: var(--ok-soft); color: var(--ok); font-size: 13px; font-weight: 600;
}
.btn-wechat:hover { border-color: var(--ok); }
.block { display: block; width: 100%; }

/* ---------- topbar ---------- */
.topbar { position: sticky; top: 0; z-index: 60; background: #fff; border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; gap: 22px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; flex: none; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), #4f8bff);
  color: #fff; font-weight: 700; font-size: 15px; display: grid; place-items: center;
}
.logo-text { font-size: 17px; font-weight: 700; }
.logo-text em { font-style: normal; font-weight: 500; color: var(--ink-3); font-size: 13px; margin-left: 6px; }

.nav { display: flex; gap: 20px; flex: none; }
.nav a { color: var(--ink-2); font-size: 14px; padding: 6px 0; }
.nav a:hover { color: var(--brand); }

.topbar .search { flex: 1; display: flex; max-width: 420px; margin-left: auto; }
.topbar .search input {
  flex: 1; height: 38px; padding: 0 14px;
  border: 1.5px solid var(--line); border-right: none;
  border-radius: 8px 0 0 8px; background: #fbfcfe; font-size: 13px; outline: none;
}
.topbar .search input:focus { border-color: var(--brand); }
.topbar .search button {
  height: 38px; padding: 0 18px; border: none;
  background: var(--brand); color: #fff; font-size: 13px; font-weight: 600; border-radius: 0 8px 8px 0;
}
.topbar .search button:hover { background: var(--brand-dark); }
.topbar-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; flex: none; }

/* 汉堡菜单按钮：桌面隐藏，移动端（≤1100px）显示，由 nav.js 控制开合 */
.nav-toggle {
  display: none;
  align-items: center; justify-content: center;
  width: 40px; height: 40px; flex: none;
  border: 1.5px solid var(--line); background: #fff; border-radius: 8px;
  font-size: 22px; line-height: 1; color: var(--ink-2);
}
.nav-toggle:hover { border-color: var(--brand); color: var(--brand); }
.nav-toggle[aria-expanded="true"] { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }

/* ---------- hero / slider ---------- */
.hero { display: grid; grid-template-columns: 1fr 300px; gap: 16px; padding: 18px 0 6px; }
.slider {
  position: relative; height: 380px; border-radius: var(--radius);
  overflow: hidden; background: #101a33; box-shadow: var(--shadow);
}
.slides { position: relative; height: 100%; }
.slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity .5s ease;
  display: flex; align-items: center; padding: 0 56px; background-size: cover; background-position: center;
}
.slide.on { opacity: 1; }
.slide::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(8, 14, 30, .72), rgba(8, 14, 30, .18));
}
.slide-fallback::before { background: linear-gradient(120deg, #0b1a3c, #1554f0); }
.slide-copy { position: relative; max-width: 62%; }
.slide-badge {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .2); color: #fff; font-size: 12px; margin-bottom: 14px; backdrop-filter: blur(4px);
}
.slide-copy h2 { margin: 0 0 10px; font-size: 32px; line-height: 1.25; font-weight: 800; color: #fff; }
.slide-copy p { margin: 0 0 20px; font-size: 15px; color: rgba(255, 255, 255, .88); }

.arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: rgba(0, 0, 0, .28); color: #fff; font-size: 26px; line-height: 1;
  display: grid; place-items: center; opacity: 0; transition: opacity .2s;
}
.slider:hover .arrow { opacity: 1; }
.arrow.prev { left: 14px; } .arrow.next { right: 14px; }
.dots { position: absolute; left: 56px; bottom: 22px; display: flex; gap: 8px; }
.dot { width: 26px; height: 4px; border-radius: 2px; border: none; padding: 0; background: rgba(255, 255, 255, .4); transition: background .2s; }
.dot.on { background: #fff; }

.hero-side { display: flex; flex-direction: column; gap: 12px; }
.side-card { background: var(--card); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
#hotCard { display: none; }
.side-title { color: var(--ink-3); font-size: 12px; }
.side-num { font-size: 28px; font-weight: 800; color: var(--brand); line-height: 1.2; }
.side-sub { color: var(--ink-3); font-size: 12px; }
.side-list li { display: flex; justify-content: space-between; padding: 5px 0; font-size: 13px; color: var(--ink-2); }
.side-list li em { font-style: normal; color: var(--accent); font-weight: 700; }
.side-contact { background: linear-gradient(135deg, #eef3ff, #e3ecff); }
.side-mail { font-size: 13px; font-weight: 600; color: var(--brand-dark); margin: 6px 0 10px; word-break: break-all; }
.side-line { font-size: 13px; color: var(--ink-2); margin: 6px 0; word-break: break-all; }
.side-line a { color: var(--brand-dark); text-decoration: none; }
.side-copy { margin-left: 6px; border: 1px solid var(--line); background: #fff; color: var(--brand); border-radius: 6px; font-size: 12px; padding: 1px 8px; cursor: pointer; }
.side-copy:hover { border-color: var(--brand); }

/* ---------- section ---------- */
.section { padding: 26px 0 8px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 16px; flex-wrap: wrap; }
.section-head h2 { margin: 0; font-size: 21px; font-weight: 800; }
.section-head h2::before {
  content: ""; display: inline-block; width: 4px; height: 18px; border-radius: 2px;
  background: var(--brand); margin-right: 9px; vertical-align: -2px;
}
.section-sub { color: var(--ink-3); font-size: 13px; }
.section-more { margin-left: auto; color: var(--brand); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; padding: 4px 2px; }
.section-more:hover { text-decoration: underline; }
.head-right { display: flex; align-items: center; gap: 14px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tab { border: 1px solid var(--line); background: #fff; color: var(--ink-2); border-radius: 999px; padding: 6px 16px; font-size: 13px; cursor: pointer; transition: all .15s; white-space: nowrap; }
.tab:hover { border-color: var(--brand); color: var(--brand); }
.tab.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }

/* ---------- categories / 品牌 ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.cat-card {
  background: var(--card); border-radius: var(--radius); padding: 20px 10px 18px;
  text-align: center; box-shadow: var(--shadow); border: 1px solid transparent;
  transition: transform .18s, border-color .18s, box-shadow .18s; color: inherit; text-decoration: none;
}
.cat-card:hover { transform: translateY(-3px); border-color: var(--brand); box-shadow: var(--shadow-lg); }
.cat-ico { width: 64px; height: 64px; display: block; margin: 0 auto 10px; object-fit: contain; }
.cat-name { font-size: 14px; font-weight: 600; }
.cat-meta { color: var(--ink-3); font-size: 12px; }

/* ---------- products ---------- */
.prod-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.prod-card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid transparent; display: flex; flex-direction: column;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.prod-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #d7e1ff; }
.prod-img { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; background: #f7f9fc; overflow: hidden; }
.prod-img img { width: 64%; height: 64%; object-fit: contain; display: block; }
.prod-tag {
  position: absolute; left: 10px; top: 10px; padding: 3px 8px; border-radius: 4px;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 700;
}
.prod-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.prod-model { color: var(--ink-3); font-size: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.prod-name { font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--ink); }
.prod-name:hover { color: var(--brand); }
.prod-meta { color: var(--ink-3); font-size: 12px; }
.prod-meta b { color: var(--accent); font-weight: 700; }
.prod-sum { margin: 0; color: var(--ink-2); font-size: 12.5px; line-height: 1.5; min-height: 38px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
/* 站点不再展示价格/库存，卡片底部改为规格书下载入口 + 询价按钮 */
.prod-ds { margin-top: auto; padding-top: 4px; }
.btn-ds {
  display: inline-block; padding: 5px 10px; border-radius: 6px; font-size: 12px; font-weight: 600;
  background: #eef3ff; color: var(--brand); border: 1px solid #d7e1ff; text-decoration: none;
}
.btn-ds:hover { background: var(--brand); color: #fff; }
.ds-none { color: var(--ink-3); font-size: 11.5px; }
.prod-actions { display: flex; gap: 8px; margin-top: 10px; }
.btn-ask { flex: 1; height: 34px; padding: 0 8px; font-size: 12.5px; }
.empty { padding: 40px; text-align: center; color: var(--ink-3); }
.btn-more { display: block; margin: 20px auto 0; padding: 10px 26px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--brand); font-size: 13px; font-weight: 600; cursor: pointer; transition: background .15s, border-color .15s; }
.btn-more:hover { background: #f3f7ff; border-color: var(--brand); }

/* ---------- service ---------- */
.service-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  background: var(--card); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
}
.service-strip div { text-align: center; }
.service-strip b { display: block; font-size: 15px; }
.service-strip span { color: var(--ink-3); font-size: 12px; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.contact-card {
  background: var(--card); border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px;
}
.contact-ico { font-size: 22px; }
.contact-label { font-size: 15px; font-weight: 700; }
.contact-value { font-size: 15px; font-weight: 700; color: var(--brand-dark); word-break: break-all; }
.contact-note { color: var(--ink-3); font-size: 12.5px; min-height: 19px; }
.contact-btns { display: flex; gap: 8px; margin-top: 10px; }
.contact-btns button { flex: 1; padding: 0 8px; font-size: 12.5px; }

/* ---------- product detail ---------- */
.detail { display: grid; grid-template-columns: 308px 1fr; gap: 28px; padding: 20px 0 8px; align-items: start; }
.detail-img { position: relative; border-radius: var(--radius); overflow: hidden; background: #f7f9fc; box-shadow: var(--shadow); aspect-ratio: 1 / 1; }
.detail-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.detail-info h1 { font-size: 26px; font-weight: 800; line-height: 1.3; }
.detail-brand { color: var(--ink-3); font-size: 14px; margin: 8px 0 16px; }
.detail-brand b { color: var(--brand); font-weight: 700; }
.detail-brand .brand-link { color: var(--brand); font-weight: 700; text-decoration: none; border-bottom: 1px dashed var(--brand); }
.detail-brand .brand-link:hover { color: var(--brand-dark); border-bottom-color: var(--brand-dark); }
.detail-specs { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 16px; }
.quote-banner { display: flex; align-items: baseline; gap: 10px; background: #fff4ec; border: 1px solid #ffd9bf; border-radius: 10px; padding: 10px 14px; margin: 6px 0 16px; }
.quote-banner .qb-title { color: #f5791f; font-weight: 800; font-size: 16px; white-space: nowrap; }
.quote-banner .qb-sub { color: #a8642f; font-size: 13px; }
.detail-specs .spec-item { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); background: #f1f5fb; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; }
.detail-specs .spec-item b { color: var(--brand-dark); font-weight: 700; }

/* ---------- brand hero (品牌详情页) ---------- */
.brand-hero { display: flex; gap: 24px; align-items: center; background: var(--card); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); margin: 16px 0 8px; }
.brand-hero-logo { width: 120px; height: 120px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.brand-hero-logo svg { width: 100%; height: 100%; margin: 0; }
.brand-hero-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.brand-hero-info { flex: 1; }
.brand-hero-info h1 { font-size: 24px; margin: 0 0 8px; }
.brand-hero-desc { color: var(--ink-2); line-height: 1.7; margin: 0 0 12px; }
.brand-hero-note { font-size: 13px; color: var(--ink-3); }
@media (max-width: 600px) { .brand-hero { flex-direction: column; text-align: center; } }
.detail-desc { color: var(--ink-2); font-size: 14px; line-height: 1.8; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.detail-back { display: inline-flex; align-items: center; gap: 6px; color: var(--brand); font-size: 14px; margin: 16px 0 0; }
.detail-back:hover { color: var(--brand-dark); }
.detail-ds { margin-top: 16px; background: var(--card); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.detail-ds .contact-label { font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.btn-ds { display: inline-block; padding: 6px 14px; border-radius: 8px; font-size: 13px; font-weight: 600; background: var(--brand-soft); color: var(--brand-dark); border: 1px solid #d7e1ff; text-decoration: none; }
.btn-ds:hover { background: var(--brand); color: #fff; }
.ds-none { color: var(--ink-3); font-size: 12.5px; }
.ds-img { display: block; max-width: 100%; height: auto; margin-top: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
@media (max-width: 820px) { .detail { grid-template-columns: 1fr; } .detail-img { aspect-ratio: 4 / 3; width: 70%; margin: 0 auto; } }

/* ---------- footer ---------- */
.footer { margin-top: 30px; background: #101a33; color: #9aa6bd; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; padding: 24px 0; font-size: 13px; flex-wrap: wrap; gap: 10px; }
.footer-links { display: flex; gap: 18px; }
.footer-links a:hover { color: #fff; }

/* ---------- modal / toast ---------- */
.modal-mask { position: fixed; inset: 0; background: rgba(12, 18, 32, .5); display: none; place-items: center; z-index: 100; padding: 24px; }
.modal-mask.show { display: grid; }
.modal { position: relative; background: #fff; border-radius: 16px; width: 460px; max-width: 100%; max-height: calc(100vh - 48px); padding: 26px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; }
.modal-body { overflow-y: auto; min-height: 0; flex: 1; }
.modal-x { position: absolute; top: 12px; right: 14px; width: 30px; height: 30px; border: none; background: transparent; border-radius: 8px; font-size: 22px; line-height: 1; color: var(--ink-3); cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 5; }
.modal-x:hover { background: #f1f3f7; color: var(--ink); }
.modal-body h4 { position: sticky; top: 0; background: #fff; z-index: 2; padding-right: 36px; font-size: 19px; margin-bottom: 6px; }
.modal-desc { margin: 0 0 16px; color: var(--ink-3); font-size: 12.5px; }
.modal-actions { position: sticky; bottom: 0; background: #fff; z-index: 2; display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.qr-box { width: 208px; height: 208px; margin: 0 auto 12px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.qr-box img { width: 100%; height: 100%; display: block; object-fit: contain; }
.qr-id { text-align: center; font-size: 14px; margin-bottom: 12px; }
.qr-id b { color: var(--brand-dark); }
.toast {
  position: fixed; left: 50%; bottom: 60px; transform: translateX(-50%);
  background: rgba(16, 22, 38, .92); color: #fff; padding: 10px 20px; border-radius: 999px;
  font-size: 13px; z-index: 120; box-shadow: var(--shadow-lg); opacity: 0; transition: opacity .3s;
}
.toast.show { opacity: 1; }

/* ============ 后台 ============ */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand), #4f8bff); }
.auth-card { background: #fff; border-radius: 16px; padding: 40px; width: 360px; box-shadow: var(--shadow-lg); }
.auth-card h2 { margin: 0 0 6px; color: var(--brand); }
.auth-card p { color: var(--ink-3); margin: 0 0 22px; font-size: 14px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; margin-bottom: 6px; color: var(--ink-3); }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 8px; font-size: 14px; font-family: inherit; outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); }
.field textarea { resize: vertical; min-height: 70px; }

.admin-shell { display: none; }
.admin-header { background: #101a33; color: #fff; padding: 12px 24px; display: flex; justify-content: space-between; align-items: center; }
.admin-header .brand { font-weight: 800; }
.admin-body { display: flex; min-height: calc(100vh - 54px); }
.sidebar { width: 200px; background: #112c41; color: #cbd5e1; padding: 20px 0; }
.sidebar a { display: block; padding: 12px 24px; cursor: pointer; font-size: 14px; border-left: 3px solid transparent; }
.sidebar a:hover, .sidebar a.active { background: #16394f; border-left-color: var(--accent); color: #fff; }
.admin-main { flex: 1; padding: 28px; overflow: auto; background: var(--bg); }
.panel { display: none; }
.panel.active { display: block; }
.panel h3 { margin: 0 0 18px; color: var(--brand); }

.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); font-size: 13px; }
.table th { background: #eef2f7; color: var(--ink-2); font-weight: 600; }
.table img { width: 46px; height: 46px; object-fit: cover; border-radius: 6px; }

.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.admin-search { padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 8px; width: 260px; outline: none; }
.admin-search:focus { border-color: var(--brand); }
.pill { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 11px; background: var(--brand-soft); color: var(--brand-dark); }
.pill.on { background: var(--ok-soft); color: var(--ok); }

.pager { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.pager-info { font-size: 13px; color: var(--ink-3); margin-right: 8px; }
.pager-btn { border: 1px solid var(--line); background: #fff; color: var(--ink-2); border-radius: 8px; padding: 6px 11px; font-size: 13px; cursor: pointer; transition: border-color .15s, color .15s; }
.pager-btn:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.pager-btn.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager-btn:disabled { opacity: .45; cursor: not-allowed; }
.pager-ellipsis { color: var(--ink-3); padding: 0 4px; }
.preview-img { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.err { color: #d64545; font-size: 13px; margin-top: 10px; min-height: 18px; }

/* ---------- 数据看板 ---------- */
.dash-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 22px; }
.dash-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.dash-card .num { font-size: 26px; font-weight: 800; color: var(--brand); line-height: 1.2; }
.dash-card .lab { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.dash-card .sub { font-size: 11.5px; color: var(--ink-3); margin-top: 3px; }
.dash-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.dash-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.dash-box h4 { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 14px; font-size: 15px; color: var(--ink); }
.box-sub { font-size: 12px; color: var(--ink-3); font-weight: 400; white-space: nowrap; }
.dash-sub { color: var(--ink-3); font-size: 13px; margin: -4px 0 16px; }
.bar-row { display: grid; grid-template-columns: 170px 1fr 54px; align-items: center; gap: 10px; margin-bottom: 10px; }
.bar-row .bl { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { background: #eef2f7; border-radius: 6px; height: 12px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--brand), #4f8bff); }
.bar-row .bv { font-size: 12.5px; color: var(--ink); text-align: right; font-weight: 600; }
.trend { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding-top: 10px; }
.trend-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; }
.trend-bar { width: 100%; max-width: 26px; background: linear-gradient(180deg, #4f8bff, var(--brand)); border-radius: 5px 5px 0 0; min-height: 2px; transition: height .3s; }
.trend-x { font-size: 10.5px; color: var(--ink-3); transform: rotate(-32deg); white-space: nowrap; transform-origin: top center; }
.trend-empty { color: var(--ink-3); font-size: 13px; padding: 20px 0; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--ink-3); flex: none; }
.kv .v { color: var(--ink); font-weight: 600; word-break: break-all; text-align: right; }
.todo-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.todo-row:last-child { border-bottom: none; }
.todo-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.todo-model { font-size: 14px; font-weight: 600; color: var(--ink); }
.todo-brand { font-size: 12px; color: var(--ink-3); }
.todo-tags { display: flex; gap: 6px; flex: none; }
.todo-tag { font-size: 12px; padding: 2px 9px; border-radius: 999px; font-weight: 600; }
.tag-spec { background: #fff4ec; color: #f5791f; border: 1px solid #ffd9bf; }
.tag-seo { background: var(--brand-soft); color: var(--brand-dark); border: 1px solid #d7e1ff; }

/* ---------- 时间范围分段控件 ---------- */
.seg { display: inline-flex; border: 1.5px solid var(--brand); border-radius: 8px; overflow: hidden; }
.seg button { border: none; background: #fff; color: var(--brand); font-size: 13px; font-weight: 600; padding: 7px 14px; cursor: pointer; border-right: 1px solid var(--brand-soft); }
.seg button:last-child { border-right: none; }
.seg button.on { background: var(--brand); color: #fff; }
.seg button:hover:not(.on) { background: var(--brand-soft); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
  .prod-grid { grid-template-columns: repeat(3, 1fr); }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-toggle { display: flex; }
  /* 导航收进下拉面板，点击汉堡展开 */
  .nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0; z-index: 59;
    flex-direction: column; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg); padding: 6px 0;
  }
  .nav.open { display: flex; }
  .nav a { padding: 13px 16px; border-bottom: 1px solid var(--line); }
  .nav a:last-child { border-bottom: none; }
}
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; }
  .hero-side { flex-direction: row; flex-wrap: wrap; }
  .hero-side .side-card { flex: 1; min-width: 150px; }
  .slider { height: 260px; }
  .slide { padding: 0 26px; }
  .slide-copy { max-width: 84%; }
  .slide-copy h2 { font-size: 22px; }
  .dots { left: 26px; }
  .prod-grid { grid-template-columns: repeat(2, 1fr); }
  .service-strip { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 520px) {
  .service-strip { grid-template-columns: 1fr; }
  .admin-body { flex-direction: column; }
  .sidebar { width: 100%; display: flex; overflow-x: auto; }
  .sidebar a { border-left: none; border-bottom: 3px solid transparent; white-space: nowrap; }
}
@media (max-width: 1100px) {
  .dash-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .bar-row { grid-template-columns: 108px 1fr 44px; }
}

/* ---------- 移动端后台修正 ---------- */
/* 登录卡片：手机窄屏不能固定 360px，否则横向溢出 */
@media (max-width: 420px) {
  .auth-card { width: 100%; max-width: calc(100% - 32px); padding: 28px 22px; }
}
/* 商品/品牌工具栏内层 flex 不换行会导致横向溢出，手机端允许换行并让搜索框占满一行 */
@media (max-width: 820px) {
  .toolbar > div[style] { flex-wrap: wrap; }
  .admin-search { width: 100%; min-width: 0; }
  /* 后台数据表格在窄屏允许横向滚动，避免列被压扁溢出 */
  .admin-main { overflow-x: auto; }
  .table { min-width: 620px; }
}
