/* ============================================================
   报价云 · 产品报价管理平台  —  设计系统
   ============================================================ */

:root {
  --c-bg:        #eef2f7;
  --c-surface:   #ffffff;
  --c-surface-2: #f7f9fc;
  --c-line:      #e2e8f2;
  --c-line-soft: #eef2f8;

  --c-text:      #0f1b2d;
  --c-text-2:    #4a5a72;
  --c-text-3:    #8496ad;

  --c-primary:   #2f5df5;
  --c-primary-d: #1e46d0;
  --c-primary-l: #eaf0ff;
  --c-dark:      #16233a;
  --c-dark-d:    #0d1728;
  --c-accent:    #0c8f6f;
  --c-accent-l:  #e6f7f2;
  --c-warn:      #d97706;
  --c-danger:    #dc2626;
  --c-danger-l:  #fdecec;

  --r-sm: 8px;
  --r:    12px;
  --r-lg: 16px;

  --sh-1: 0 1px 2px rgba(15,27,45,.06), 0 1px 3px rgba(15,27,45,.04);
  --sh-2: 0 2px 6px rgba(15,27,45,.06), 0 8px 24px rgba(15,27,45,.07);
  --sh-3: 0 12px 40px rgba(15,27,45,.18);

  --sidebar-w: 236px;
  --topbar-h: 74px;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

/* 作者样式里的 display（flex/grid/inline-flex…）会盖掉 UA 的 [hidden]{display:none}，
   这里统一兜底，避免 .nav-item / .btn / .sum-row 等元素设了 hidden 仍然可见。 */
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p { margin: 0; }
button { font-family: inherit; font-size: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
a { color: var(--c-primary); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #c6d1e0; border-radius: 8px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #a9b8cc; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ============================== 布局 ============================== */

.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: linear-gradient(168deg, #17253d 0%, #0e1728 60%, #0b1322 100%);
  color: #cfd9e8;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 30;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 20px 18px 18px;
}
.brand-logo {
  width: 38px; height: 38px;
  flex: 0 0 38px;
  border-radius: 11px;
  display: grid; place-items: center;
  font-weight: 800; font-size: 19px; color: #fff;
  background: linear-gradient(140deg, #4f7bff, #2f5df5 55%, #7a4ff5);
  box-shadow: 0 6px 18px rgba(47,93,245,.45);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { color: #fff; font-size: 15.5px; letter-spacing: .06em; }
.brand-text span { font-size: 10.5px; color: #7c8da8; letter-spacing: .045em; text-transform: uppercase; }

.nav { display: flex; flex-direction: column; gap: 3px; padding: 6px 12px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border: 0; border-radius: 10px;
  background: transparent; color: #b3c1d6;
  cursor: pointer; text-align: left;
  font-size: 14px; font-weight: 500;
  transition: background .16s, color .16s, transform .16s;
  position: relative;
}
.nav-item .ico {
  width: 20px; text-align: center;
  font-style: normal; font-size: 14px; opacity: .8;
}
.nav-item > span { flex: 1; }
.nav-item:hover { background: rgba(255,255,255,.07); color: #eaf0fa; }
.nav-item.active {
  background: linear-gradient(100deg, rgba(79,123,255,.30), rgba(79,123,255,.10));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(120,155,255,.28);
}
.nav-item.active .ico { opacity: 1; color: #8babff; }

.badge {
  font-style: normal; font-size: 11px; font-weight: 700;
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 10px;
  background: #2f5df5; color: #fff;
  display: grid; place-items: center;
}
.badge.ghost { background: rgba(255,255,255,.14); color: #cbd7e8; }

.sidebar-foot { padding: 14px; border-top: 1px solid rgba(255,255,255,.07); }
.sidebar-foot .hint { font-size: 11.5px; color: #6c7d97; margin-bottom: 10px; line-height: 1.5; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: var(--topbar-h);
  flex: 0 0 var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 26px;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--c-line);
  position: sticky; top: 0; z-index: 20;
}
.topbar h1 { font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.topbar .sub { font-size: 12.5px; color: var(--c-text-3); margin-top: 1px; }

.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 13px;
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: 999px; font-size: 12.5px; color: var(--c-text-2);
  box-shadow: var(--sh-1);
  max-width: 320px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.pill::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--c-accent); flex: 0 0 7px;
  box-shadow: 0 0 0 3px var(--c-accent-l);
}

.content { padding: 22px 26px 60px; flex: 1; }

.view { display: none; animation: fade .22s ease; }
.view.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ============================== 卡片 / 表格 ============================== */

.card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r);
  box-shadow: var(--sh-1);
  margin-bottom: 18px;
  overflow: hidden;
}

.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--c-line-soft);
  background: linear-gradient(180deg, #fcfdff, #f8fafd);
}
.card-head h2 { font-size: 14.5px; font-weight: 700; display: flex; align-items: center; gap: 9px; }
.card-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.card-foot {
  padding: 14px 18px;
  border-top: 1px solid var(--c-line-soft);
  background: var(--c-surface-2);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.card > p.muted { padding: 16px 18px 0; }
.card > .table-wrap { border: 0; border-radius: 0; }
.card > .empty { border: 0; }

.table-wrap { overflow-x: auto; }

.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table thead th {
  text-align: left;
  padding: 10px 14px;
  font-size: 12px; font-weight: 600; letter-spacing: .04em;
  color: var(--c-text-3); text-transform: uppercase;
  background: var(--c-surface-2);
  border-bottom: 1px solid var(--c-line);
  white-space: nowrap;
}
.table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--c-line-soft);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafcff; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .muted { color: var(--c-text-3); }

.empty {
  padding: 46px 20px; text-align: center; color: var(--c-text-3);
  border: 1px dashed var(--c-line); border-radius: var(--r);
  background: var(--c-surface);
}
.empty .empty-ico { font-size: 30px; opacity: .38; margin-bottom: 6px; }
.empty p { font-size: 14px; color: var(--c-text-2); font-weight: 600; }
.empty span { font-size: 12.5px; }

/* ============================== 工具栏 ============================== */

.toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.toolbar-info { margin-left: auto; font-size: 12.5px; color: var(--c-text-3); white-space: nowrap; }
.grow { flex: 1 1 240px; min-width: 200px; }

.search {
  display: flex; align-items: center; gap: 8px;
  background: var(--c-surface); border: 1px solid var(--c-line);
  border-radius: 10px; padding: 0 12px;
  box-shadow: var(--sh-1);
  transition: border-color .15s, box-shadow .15s;
}
.search:focus-within { border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--c-primary-l); }
.search i { font-style: normal; color: var(--c-text-3); font-size: 15px; }
.search input {
  flex: 1; border: 0; outline: 0; background: transparent;
  padding: 9px 0; min-width: 0;
}
.search input::-webkit-search-cancel-button { cursor: pointer; }

.select {
  appearance: none;
  background: var(--c-surface) url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5L6 8l3.5-3.5' fill='none' stroke='%238496ad' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 11px center;
  border: 1px solid var(--c-line); border-radius: 10px;
  padding: 9px 32px 9px 12px;
  box-shadow: var(--sh-1); cursor: pointer; outline: 0;
  transition: border-color .15s, box-shadow .15s;
}
.select:focus { border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--c-primary-l); }

.seg {
  display: inline-flex; background: var(--c-surface);
  border: 1px solid var(--c-line); border-radius: 10px;
  padding: 3px; gap: 3px; box-shadow: var(--sh-1);
}
.seg-btn {
  border: 0; background: transparent; color: var(--c-text-2);
  padding: 6px 14px; border-radius: 7px; cursor: pointer;
  font-size: 13px; font-weight: 500; transition: background .15s, color .15s;
}
.seg-btn:hover { background: var(--c-surface-2); }
.seg-btn.active { background: var(--c-primary); color: #fff; box-shadow: 0 2px 6px rgba(47,93,245,.32); }

/* ============================== 按钮 ============================== */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid transparent; border-radius: 10px;
  padding: 9px 16px;
  font-size: 13.5px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--c-primary); outline-offset: 2px; }

.btn-primary { background: var(--c-primary); color: #fff; box-shadow: 0 2px 8px rgba(47,93,245,.32); }
.btn-primary:hover { background: var(--c-primary-d); }

.btn-dark { background: var(--c-dark); color: #fff; }
.btn-dark:hover { background: var(--c-dark-d); }

.btn-light { background: var(--c-surface); color: var(--c-text-2); border-color: var(--c-line); }
.btn-light:hover { background: var(--c-surface-2); color: var(--c-text); border-color: #cdd8e8; }

.btn-outline { background: rgba(255,255,255,.06); color: #dbe4f2; border-color: rgba(255,255,255,.18); }
.btn-outline:hover { background: rgba(255,255,255,.14); color: #fff; }

.btn-danger { background: var(--c-danger-l); color: var(--c-danger); border-color: #f7c9c9; }
.btn-danger:hover { background: #fbdcdc; }

.btn-ghost { background: transparent; color: var(--c-text-2); }
.btn-ghost:hover { background: var(--c-surface-2); }

.btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: 8px; }
.btn-xs { padding: 4px 8px; font-size: 11.5px; border-radius: 7px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.icon-btn {
  width: 28px; height: 28px; border-radius: 7px;
  display: grid; place-items: center;
  border: 1px solid var(--c-line); background: var(--c-surface);
  color: var(--c-text-3); cursor: pointer;
  transition: all .15s;
}
.icon-btn:hover { color: var(--c-danger); border-color: #f0b8b8; background: var(--c-danger-l); }

/* ============================== 表单 ============================== */

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px 18px;
  padding: 18px;
}
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 12px; font-weight: 600; color: var(--c-text-2); letter-spacing: .01em; }
.field.span-2 { grid-column: span 2; }
@media (max-width: 620px) { .field.span-2 { grid-column: span 1; } }

.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--c-line);
  border-radius: 9px;
  padding: 9px 12px;
  background: var(--c-surface);
  outline: 0;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; line-height: 1.6; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px var(--c-primary-l);
}
.field input::placeholder, .field textarea::placeholder { color: #b3c0d1; }
.field select { appearance: none; background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5L6 8l3.5-3.5' fill='none' stroke='%238496ad' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; padding-right: 32px; }

/* ============================== 产品卡片 ============================== */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 16px;
}

.pcard {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r);
  box-shadow: var(--sh-1);
  padding: 16px;
  display: flex; flex-direction: column; gap: 11px;
  transition: box-shadow .18s, transform .18s, border-color .18s;
  position: relative;
}
.pcard:hover { box-shadow: var(--sh-2); transform: translateY(-2px); border-color: #cfdcf2; }

.pcard-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.pcard-sku { font-family: var(--mono); font-size: 11px; color: var(--c-text-3); letter-spacing: .02em; }
.pcard-name { font-size: 14.5px; font-weight: 650; line-height: 1.4; margin-top: 3px; }
.pcard-spec { font-size: 12px; color: var(--c-text-3); margin-top: 3px; }

.tag {
  display: inline-block; padding: 3px 9px; border-radius: 6px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
  background: var(--c-primary-l); color: var(--c-primary-d);
}
.tag.gray { background: #eef2f8; color: var(--c-text-3); }

.tiers { display: flex; flex-direction: column; gap: 3px; border-top: 1px dashed var(--c-line); padding-top: 10px; }
.tier-row {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 12.5px; color: var(--c-text-2);
  padding: 2px 0;
}
.tier-row.best { color: var(--c-accent); font-weight: 650; }
.tier-row .q { font-variant-numeric: tabular-nums; }
.tier-row .p { font-weight: 650; font-variant-numeric: tabular-nums; font-family: var(--mono); font-size: 12.5px; }

.pcard-foot {
  display: flex; align-items: center; gap: 8px;
  margin-top: auto; padding-top: 12px; border-top: 1px solid var(--c-line-soft);
}
.qty-input {
  width: 62px; text-align: center;
  border: 1px solid var(--c-line); border-radius: 8px;
  padding: 7px 4px; outline: 0;
  font-variant-numeric: tabular-nums;
}
.qty-input:focus { border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--c-primary-l); }
.pcard-foot .btn { flex: 1; }
.pcard-price { font-size: 12.5px; color: var(--c-text-3); }
.pcard-price b { font-size: 15px; color: var(--c-accent); font-family: var(--mono); }

/* ============================== 报价单 ============================== */

.quote-table td { padding: 8px 10px; }
.quote-table input, .quote-table select {
  width: 100%; border: 1px solid transparent; border-radius: 7px;
  padding: 6px 8px; background: transparent; outline: 0;
  transition: border-color .15s, background .15s;
  font-variant-numeric: tabular-nums;
}
.quote-table input:hover { background: var(--c-surface-2); }
.quote-table input:focus, .quote-table select:focus {
  background: var(--c-surface); border-color: var(--c-primary);
  box-shadow: 0 0 0 3px var(--c-primary-l);
}
.quote-table .num input { text-align: right; }
.quote-table .line-name { font-weight: 600; font-size: 13.5px; }
.quote-table .line-sub { font-size: 11.5px; color: var(--c-text-3); font-family: var(--mono); }
.quote-table .amount { font-weight: 650; font-variant-numeric: tabular-nums; font-family: var(--mono); }
.tier-hint { font-size: 11px; color: var(--c-accent); margin-top: 2px; }

.quote-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 348px;
  gap: 18px;
  align-items: start;
}
@media (max-width: 1080px) { .quote-bottom { grid-template-columns: 1fr; } }

.summary { position: sticky; top: calc(var(--topbar-h) + 22px); }
.summary .card-head { background: linear-gradient(180deg, #fbfcff, #f5f8ff); }
.sum-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 18px;
  font-size: 13.5px; color: var(--c-text-2);
  border-bottom: 1px solid var(--c-line-soft);
}
.sum-row b { font-variant-numeric: tabular-nums; font-family: var(--mono); font-size: 14px; color: var(--c-text); }
.sum-row .neg { color: var(--c-danger); }
.sum-row em { font-style: normal; font-size: 11.5px; }
.sum-row.total {
  padding: 14px 18px;
  background: linear-gradient(100deg, #f0f5ff, #f7f9ff);
  border-bottom: 0;
}
.sum-row.total span { font-weight: 700; color: var(--c-text); font-size: 14px; }
.sum-row.total b { font-size: 21px; color: var(--c-primary-d); font-weight: 750; letter-spacing: -.02em; }
.sum-row.sub { font-size: 12.5px; background: var(--c-surface-2); }

.sum-actions { padding: 16px 18px; display: flex; flex-direction: column; gap: 9px; }
.sum-actions-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }

.row-actions { display: flex; gap: 10px; flex-wrap: wrap; padding: 16px 18px; }

/* ============================== 统计 ============================== */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  padding: 16px 18px;
}
.stat {
  background: var(--c-surface-2);
  border: 1px solid var(--c-line-soft);
  border-radius: 10px;
  padding: 13px 15px;
}
.stat .k { font-size: 11.5px; color: var(--c-text-3); letter-spacing: .02em; }
.stat .v { font-size: 20px; font-weight: 700; margin-top: 3px; font-variant-numeric: tabular-nums; }
.stat .v.small { font-size: 15px; }

/* ============================== 阶梯价编辑 ============================== */

.tier-editor { display: flex; flex-direction: column; gap: 8px; }
.tier-edit-row { display: grid; grid-template-columns: 1fr 1fr 32px; gap: 8px; align-items: center; }
.tier-edit-row input {
  border: 1px solid var(--c-line); border-radius: 8px;
  padding: 7px 10px; outline: 0; width: 100%;
  font-variant-numeric: tabular-nums;
}
.tier-edit-row input:focus { border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--c-primary-l); }
.tier-head { display: grid; grid-template-columns: 1fr 1fr 32px; gap: 8px; font-size: 11.5px; color: var(--c-text-3); font-weight: 600; }

/* 复选行 */
.field.check-row {
  flex-direction: row;
  align-items: center;
  gap: 9px;
  padding-top: 2px;
}
.field.check-row input[type="checkbox"] {
  width: 16px; height: 16px; flex: 0 0 16px;
  accent-color: var(--c-primary);
  cursor: pointer;
  margin: 0;
}
.field.check-row > span {
  font-size: 13px; font-weight: 500; color: var(--c-text-2);
  letter-spacing: 0; cursor: pointer;
}

/* ============================== Toast ============================== */

.toast-wrap {
  position: fixed; right: 22px; bottom: 22px; z-index: 999;
  display: flex; flex-direction: column; gap: 10px; align-items: flex-end;
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  background: var(--c-dark); color: #fff;
  padding: 11px 17px; border-radius: 10px;
  box-shadow: var(--sh-3);
  font-size: 13.5px; font-weight: 500;
  animation: toastIn .26s cubic-bezier(.2,.9,.3,1.2);
  max-width: 380px;
}
.toast.out { animation: toastOut .22s ease forwards; }
.toast.ok::before   { content: "✓"; color: #4ade80; font-weight: 800; }
.toast.err::before  { content: "!"; color: #f87171; font-weight: 800; }
.toast.info::before { content: "i"; color: #7dabff; font-weight: 800; font-style: italic; }
@keyframes toastIn  { from { opacity: 0; transform: translateX(24px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(24px) scale(.96); } }

/* ============================== Modal ============================== */

.modal-backdrop {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(13,23,40,.52);
  backdrop-filter: blur(3px);
  display: grid; place-items: center;
  padding: 24px;
  animation: fade .18s ease;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  background: var(--c-surface);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-3);
  width: min(620px, 100%);
  max-height: min(86vh, 900px);
  display: flex; flex-direction: column;
  animation: modalIn .24s cubic-bezier(.2,.9,.3,1.1);
  overflow: hidden;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 17px 20px; border-bottom: 1px solid var(--c-line-soft);
}
.modal-head h3 { font-size: 15.5px; font-weight: 700; }
.modal-close {
  border: 0; background: transparent; color: var(--c-text-3);
  font-size: 20px; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 6px;
}
.modal-close:hover { background: var(--c-surface-2); color: var(--c-text); }
.modal-body { padding: 20px; overflow: auto; }
.modal-foot {
  padding: 14px 20px; border-top: 1px solid var(--c-line-soft);
  background: var(--c-surface-2);
  display: flex; justify-content: flex-end; gap: 10px;
}
.modal-body .form-grid { padding: 0; }
.modal p.dialog-text { font-size: 14px; color: var(--c-text-2); line-height: 1.7; }

/* 客户选择列表 */
.pick-list { display: flex; flex-direction: column; gap: 7px; }
.pick-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 14px; border: 1px solid var(--c-line); border-radius: 10px;
  background: var(--c-surface); cursor: pointer; text-align: left; width: 100%;
  transition: all .15s;
}
.pick-item:hover { border-color: var(--c-primary); background: var(--c-primary-l); }
.pick-item .pi-main { font-weight: 600; font-size: 13.5px; }
.pick-item .pi-sub { font-size: 12px; color: var(--c-text-3); margin-top: 2px; }
.pick-item .pi-meta { font-size: 12px; color: var(--c-text-3); text-align: right; white-space: nowrap; }

/* ============================== 响应式 ============================== */

@media (max-width: 860px) {
  :root { --sidebar-w: 64px; }
  .brand-text, .nav-item > span, .sidebar-foot .hint, .nav-item .badge { display: none; }
  .brand { justify-content: center; padding: 16px 8px; }
  .nav-item { justify-content: center; padding: 12px 0; }
  .sidebar-foot { padding: 10px; }
  .sidebar-foot .btn { padding: 8px 0; font-size: 0; }
  .sidebar-foot .btn::before { content: "＋"; font-size: 16px; }
  .content { padding: 16px 14px 50px; }
  .topbar { padding: 0 14px; }
  .topbar .sub { display: none; }
  .grid { grid-template-columns: 1fr; }
}

.row-actions .btn, .card-foot .btn { flex: 0 0 auto; }

/* ============================== 首页 · Hero ============================== */

.hero {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: linear-gradient(118deg, #16233a 0%, #1d3157 46%, #23407a 100%);
  box-shadow: 0 18px 44px rgba(15,27,45,.22);
  margin-bottom: 18px;
}
.hero-glow {
  position: absolute; inset: 0;
  background:
    radial-gradient(720px 320px at 88% -12%, rgba(79,123,255,.55), transparent 62%),
    radial-gradient(520px 300px at 6% 110%, rgba(122,79,245,.42), transparent 60%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 62% 28%, #000, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 62% 28%, #000, transparent 78%);
  pointer-events: none;
}
.hero-inner {
  position: relative; z-index: 2;
  padding: 44px 44px 40px;
  max-width: 880px;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 13px; border-radius: 999px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
  color: #d8e4ff; font-size: 12px; font-weight: 600; letter-spacing: .03em;
  backdrop-filter: blur(6px);
}
.hero-badge::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: #67e8b0; box-shadow: 0 0 0 3px rgba(103,232,176,.22);
}
.hero h1 {
  margin: 16px 0 0;
  font-size: 34px; line-height: 1.24; font-weight: 750;
  letter-spacing: -.015em; color: #fff;
}
.hero p {
  margin-top: 12px;
  font-size: 14.5px; line-height: 1.72; color: #a9bcd8;
  max-width: 640px;
}
.hero-search {
  display: flex; align-items: center; gap: 10px;
  margin-top: 26px;
  background: rgba(255,255,255,.97);
  border-radius: 13px;
  padding: 7px 7px 7px 16px;
  max-width: 620px;
  box-shadow: 0 10px 30px rgba(6,14,30,.32);
}
.hero-search i { font-style: normal; font-size: 16px; color: var(--c-text-3); }
.hero-search input {
  flex: 1; min-width: 0;
  border: 0; outline: 0; background: transparent;
  padding: 9px 0; font-size: 14.5px;
}
.hero-note {
  margin-top: 16px;
  font-size: 12.5px; color: #8ba1c2; letter-spacing: .02em;
}

/* ============================== 首页 · 数据条 ============================== */

.home-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.hstat {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r);
  padding: 15px 17px;
  box-shadow: var(--sh-1);
  display: flex; align-items: center; gap: 13px;
}
.hstat-ico {
  width: 40px; height: 40px; flex: 0 0 40px;
  border-radius: 11px; display: grid; place-items: center;
  font-size: 17px;
  background: var(--c-primary-l); color: var(--c-primary-d);
}
.hstat-ico.teal  { background: var(--c-accent-l); color: var(--c-accent); }
.hstat-ico.amber { background: #fef4e6; color: #b45309; }
.hstat-ico.violet{ background: #f2edff; color: #6d28d9; }
.hstat .k { font-size: 11.5px; color: var(--c-text-3); letter-spacing: .02em; }
.hstat .v { font-size: 19px; font-weight: 750; letter-spacing: -.01em; margin-top: 1px; }
.hstat .v small { font-size: 12px; font-weight: 600; color: var(--c-text-3); margin-left: 2px; }

/* ============================== 首页 · 工具条 ============================== */

.home-toolbar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.chips { display: flex; gap: 8px; flex-wrap: wrap; flex: 1 1 auto; min-width: 0; }
.chip {
  border: 1px solid var(--c-line);
  background: var(--c-surface);
  color: var(--c-text-2);
  border-radius: 999px;
  padding: 7px 15px;
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  box-shadow: var(--sh-1);
  white-space: nowrap;
}
.chip:hover { border-color: #cfdcf2; color: var(--c-text); transform: translateY(-1px); }
.chip.active {
  background: var(--c-dark); border-color: var(--c-dark); color: #fff;
  box-shadow: 0 4px 12px rgba(22,35,58,.28);
}
.chip em { font-style: normal; opacity: .6; margin-left: 5px; font-size: 11.5px; }

.switch {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--c-text-2); cursor: pointer;
  user-select: none; white-space: nowrap;
}
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track {
  width: 36px; height: 20px; border-radius: 999px;
  background: #cdd7e5; position: relative;
  transition: background .18s;
  flex: 0 0 36px;
}
.switch-dot {
  position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(15,27,45,.3);
  transition: transform .18s;
}
.switch input:checked + .switch-track { background: var(--c-primary); }
.switch input:checked + .switch-track .switch-dot { transform: translateX(16px); }
.switch input:focus-visible + .switch-track { box-shadow: 0 0 0 3px var(--c-primary-l); }

/* ============================== 首页 · 产品展示卡 ============================== */

.showcase {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(252px, 1fr));
  gap: 18px;
}

.scard {
  position: relative;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--sh-1);
  display: flex; flex-direction: column;
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.scard:hover { box-shadow: var(--sh-2); transform: translateY(-3px); border-color: #cfdcf2; }

.scard-thumb {
  position: relative;
  height: 138px;
  display: grid; place-items: center;
  color: rgba(255,255,255,.92);
  overflow: hidden;
}
.scard-thumb img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.scard-thumb svg { width: 54px; height: 54px; filter: drop-shadow(0 3px 8px rgba(0,0,0,.28)); }
.scard-thumb::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 78% 12%, rgba(255,255,255,.28), transparent 55%);
  pointer-events: none;
}
.scard-badge {
  position: absolute; top: 10px; left: 10px; z-index: 3;
  padding: 3px 9px; border-radius: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: .02em;
  background: rgba(255,255,255,.94); color: #b91c1c;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.scard-badge.rec { color: var(--c-primary-d); }
.scard-cat {
  position: absolute; top: 10px; right: 10px; z-index: 3;
  padding: 3px 9px; border-radius: 6px;
  font-size: 11px; font-weight: 600;
  background: rgba(12,20,36,.42); color: #eaf1ff;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.2);
}

.scard-body { padding: 14px 15px 10px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.scard-name {
  font-size: 14.5px; font-weight: 650; line-height: 1.42;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 41px;
  cursor: pointer;
}
.scard-name:hover { color: var(--c-primary); }
.scard-spec {
  font-size: 12px; color: var(--c-text-3); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 37px;
}
.scard-price { display: flex; align-items: baseline; gap: 5px; margin-top: 2px; }
.scard-price .label { font-size: 11.5px; color: var(--c-text-3); }
.scard-price .val { font-size: 20px; font-weight: 750; color: var(--c-accent); font-family: var(--mono); letter-spacing: -.02em; }
.scard-price .unit { font-size: 11.5px; color: var(--c-text-3); }
.scard-price .batch { margin-left: auto; font-size: 11px; color: var(--c-text-3); }

.scard-tiers { display: flex; flex-wrap: wrap; gap: 4px; }
.scard-tiers .tag { font-size: 10.5px; padding: 2px 7px; }
.scard-foot {
  display: flex; gap: 8px; align-items: center;
  padding: 10px 15px 15px; margin-top: auto;
}
.scard-foot .qty-input { width: 56px; flex: 0 0 56px; }
.scard-foot .btn { flex: 1; }
.scard-noprice { font-size: 12.5px; color: var(--c-text-3); }

/* ============================== 首页 · CTA ============================== */

.cta {
  margin-top: 26px;
  border-radius: var(--r-lg);
  padding: 26px 30px;
  background: linear-gradient(112deg, #f2f6ff 0%, #eef4ff 52%, #eaf7f3 100%);
  border: 1px solid #dbe6fb;
  display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap;
}
.cta-text h3 { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.cta-text p { margin-top: 6px; font-size: 13.5px; color: var(--c-text-2); }
.cta-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cta-actions .btn { text-decoration: none; }

/* ============================== 首页 · 详情弹窗 ============================== */

.detail-thumb {
  height: 132px; border-radius: 10px;
  display: grid; place-items: center;
  background: #f6f7f9; color: #c4cad3;
  margin-bottom: 16px; position: relative; overflow: hidden;
}
.detail-thumb svg { width: 40px; height: 40px; }
.detail-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.detail-title { font-size: 17px; font-weight: 700; line-height: 1.4; }
.detail-sku { font-family: var(--mono); font-size: 12px; color: var(--c-text-3); margin-top: 4px; }
.detail-spec { margin-top: 12px; font-size: 13px; line-height: 1.75; color: var(--c-text-2); }
.detail-table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 13px; }
.detail-table th {
  background: var(--c-surface-2); color: var(--c-text-3);
  font-size: 11.5px; font-weight: 600; letter-spacing: .03em;
  padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--c-line);
}
.detail-table td { padding: 8px 12px; border-bottom: 1px solid var(--c-line-soft); }
.detail-table .num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--mono); }
.detail-table tr:last-child td { border-bottom: 0; }
.detail-actions { display: flex; gap: 10px; align-items: center; margin-top: 18px; }
.detail-actions .l-qty { width: 76px; flex: 0 0 76px; }

@media (max-width: 860px) {
  .hero-inner { padding: 30px 22px 28px; }
  .hero h1 { font-size: 25px; }
  .hero-search { flex-wrap: wrap; padding: 10px; }
  .hero-search input { padding: 6px 0; flex-basis: 100%; }
  .hero-search .btn { width: 100%; }
  .showcase { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 13px; }
  .cta { padding: 20px; }
  .home-toolbar { gap: 10px; }
}

/* ============================================================
   账号 / 登录
   ============================================================ */

.topbar-actions { display: flex; align-items: center; gap: 10px; }

/* 顶栏 AI 助手入口 */
.ai-entry {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px;
  border: 0; border-radius: 999px;
  background: linear-gradient(120deg, #4f7bff 0%, #6a5cf5 55%, #8a4ff2 100%);
  background-size: 160% 100%;
  background-position: 0 0;
  color: #fff;
  font-size: 13.5px; font-weight: 600;
  font-family: inherit; cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(88,96,245,.32);
  transition: box-shadow .2s, background-position .35s, transform .12s;
}
.ai-entry i { font-style: normal; font-size: 13px; line-height: 1; }
.ai-entry:hover {
  background-position: 100% 0;
  box-shadow: 0 6px 20px rgba(88,96,245,.44);
}
.ai-entry:active { transform: translateY(1px); }
.ai-entry.active {
  box-shadow: 0 0 0 3px var(--c-primary-l), 0 6px 20px rgba(88,96,245,.44);
}
.ai-entry[hidden] { display: none; }

.user-chip-wrap { position: relative; }

.user-chip {
  display: flex; align-items: center; gap: 9px;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: 999px;
  padding: 4px 12px 4px 4px;
  cursor: pointer;
  box-shadow: var(--sh-1);
  transition: border-color .15s, box-shadow .15s;
  max-width: 210px;
}
.user-chip:hover { border-color: #cfdcf2; box-shadow: var(--sh-2); }
.user-chip .uc-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; text-align: left; }
.user-chip .uc-text > span:first-child {
  font-size: 13px; font-weight: 650; color: var(--c-text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.user-chip .uc-text > span:last-child {
  font-size: 10.5px; color: var(--c-text-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.user-chip .uc-caret { font-style: normal; font-size: 10px; color: var(--c-text-3); }

.ua {
  width: 30px; height: 30px; flex: 0 0 30px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: #fff; font-size: 13px; font-weight: 700;
  letter-spacing: .02em;
  user-select: none;
}
.ua.sm { width: 28px; height: 28px; flex: 0 0 28px; font-size: 12.5px; }
.ua.lg { width: 46px; height: 46px; flex: 0 0 46px; font-size: 19px; }
.ua.off { filter: grayscale(1); opacity: .55; }

.user-menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 160px;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: 11px;
  box-shadow: var(--sh-3);
  padding: 6px;
  z-index: 60;
  animation: fade .14s ease;
}
.user-menu[hidden] { display: none; }
.user-menu button {
  display: block; width: 100%;
  text-align: left;
  border: 0; background: transparent;
  padding: 9px 11px; border-radius: 7px;
  font-size: 13.5px; color: var(--c-text-2);
  cursor: pointer;
}
.user-menu button:hover { background: var(--c-surface-2); color: var(--c-text); }
.user-menu button.danger { color: var(--c-danger); }
.user-menu button.danger:hover { background: var(--c-danger-l); }

/* ---------- 登录页 ---------- */

body.auth-locked { overflow: hidden; }

.login-overlay {
  position: fixed; inset: 0; z-index: 900;
  display: grid; place-items: center;
  padding: 24px;
  background:
    radial-gradient(900px 520px at 82% -10%, rgba(79,123,255,.42), transparent 62%),
    radial-gradient(700px 460px at 8% 108%, rgba(122,79,245,.34), transparent 60%),
    linear-gradient(150deg, #16233a 0%, #0e1728 62%, #0b1322 100%);
  overflow: auto;
}
.login-overlay[hidden] { display: none; }

.login-card {
  width: min(432px, 100%);
  background: var(--c-surface);
  border-radius: 18px;
  box-shadow: 0 28px 70px rgba(4,10,22,.5);
  padding: 30px 30px 24px;
  animation: modalIn .3s cubic-bezier(.2,.9,.3,1.05);
}
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.login-brand .brand-text strong { color: var(--c-text); font-size: 17px; }
.login-brand .brand-text span { color: var(--c-text-3); font-size: 10px; }
.login-reason {
  font-size: 12.5px; color: var(--c-text-3);
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--c-line-soft);
  min-height: 18px;
}
.login-heading { font-size: 16.5px; font-weight: 700; margin-bottom: 6px; }
.login-tip { font-size: 12.5px; color: var(--c-text-3); line-height: 1.65; margin-bottom: 16px; }
/* 站点用 data.js 数据包发布时的说明块：强调"这里建的账号只管本浏览器" */
.login-tip-pack {
  background: #fff8e6; border: 1px solid #f2d999; border-radius: 6px;
  padding: 10px 12px; color: #7a5b12;
}
.login-tip-pack code { background: rgba(0,0,0,.06); padding: 1px 4px; border-radius: 3px; font-size: 12px; }
.login-tip-pack strong { color: #6b4d06; }
.login-form { display: flex; flex-direction: column; gap: 13px; }
.login-form .field > span { font-size: 12px; font-weight: 600; color: var(--c-text-2); }
.login-form .btn { margin-top: 4px; }
.login-error {
  font-size: 12.5px; color: var(--c-danger);
  background: var(--c-danger-l);
  border: 1px solid #f7c9c9;
  border-radius: 8px;
  padding: 8px 11px;
  margin: 0;
}
.login-error[hidden] { display: none; }
.login-help {
  margin-top: 20px; padding-top: 16px;
  border-top: 1px solid var(--c-line-soft);
  font-size: 11.5px; color: var(--c-text-3); line-height: 1.65;
}
.login-help[hidden] { display: none; }

/* ============================================================
   用户管理
   ============================================================ */

.nav-item .lock { font-style: normal; font-size: 11px; opacity: .75; }
.nav-item .lock[hidden] { display: none; }
.nav-item.locked { opacity: .62; }
.nav-item.locked:hover { opacity: 1; }

.tabs {
  display: flex; gap: 4px;
  border-bottom: 1px solid var(--c-line);
  margin-bottom: 18px;
}
.tab {
  border: 0; background: transparent;
  padding: 10px 16px 11px;
  font-size: 14px; font-weight: 600; color: var(--c-text-3);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .15s, border-color .15s;
}
.tab:hover { color: var(--c-text); }
.tab.active { color: var(--c-primary); border-bottom-color: var(--c-primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fade .2s ease; }

.user-cell { display: flex; align-items: center; gap: 11px; }
.user-name { font-weight: 650; font-size: 13.5px; display: block; }
.user-acc { font-family: var(--mono); font-size: 11.5px; color: var(--c-text-3); display: block; margin-top: 1px; }

.dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  margin-right: 6px; vertical-align: 1px;
}
.dot.ok  { background: var(--c-accent); box-shadow: 0 0 0 3px var(--c-accent-l); }
.dot.off { background: #b6c2d2; box-shadow: 0 0 0 3px #eef2f8; }

.profile-head { display: flex; align-items: center; gap: 14px; }
.profile-name { font-size: 17px; font-weight: 700; }

/* ---------- 角色卡片 ---------- */

.role-list { display: flex; flex-direction: column; gap: 16px; }
.role-card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r);
  box-shadow: var(--sh-1);
  overflow: hidden;
}
.role-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--c-line-soft);
  background: linear-gradient(180deg, #fcfdff, #f8fafd);
}
.role-name { font-size: 14.5px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.role-desc { font-size: 12.5px; color: var(--c-text-3); margin-top: 4px; line-height: 1.6; }
.role-meta { white-space: nowrap; font-size: 12px; }

.perm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px 22px;
  padding: 16px 18px;
}
.perm-group-title {
  font-size: 11.5px; font-weight: 700; letter-spacing: .06em;
  color: var(--c-text-3); text-transform: uppercase;
  margin-bottom: 8px;
}
.perm-item {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 0;
  font-size: 13px; color: var(--c-text-2);
  cursor: pointer;
}
.perm-item input {
  width: 15px; height: 15px; flex: 0 0 15px;
  accent-color: var(--c-primary);
  cursor: pointer; margin: 0;
}
.perm-item:hover { color: var(--c-text); }
.perm-item.locked { cursor: default; opacity: .72; }
.perm-item.locked input { cursor: default; }

.role-foot {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 13px 18px;
  border-top: 1px solid var(--c-line-soft);
  background: var(--c-surface-2);
}
.role-foot .muted { margin-right: auto; font-size: 12.5px; }

/* ---------- 操作日志 ---------- */

.log-table td { font-size: 13px; }
.log-table .log-time {
  font-family: var(--mono); font-size: 11.5px; color: var(--c-text-2);
  white-space: nowrap;
}
.log-tag { font-weight: 600; }
.log-tag.ok     { background: var(--c-accent-l); color: var(--c-accent); }
.log-tag.blue   { background: var(--c-primary-l); color: var(--c-primary-d); }
.log-tag.warn   { background: #fef4e6; color: #b45309; }
.log-tag.danger { background: var(--c-danger-l); color: var(--c-danger); }
.log-tag.gray   { background: #eef2f8; color: var(--c-text-3); }

.form-note {
  margin-top: 12px; padding: 10px 13px;
  background: var(--c-surface-2);
  border: 1px solid var(--c-line-soft);
  border-radius: 9px;
  font-size: 12.5px; color: var(--c-text-3); line-height: 1.65;
}

@media (max-width: 860px) {
  .login-card { padding: 24px 20px 20px; }
  .tabs { overflow-x: auto; }
  .role-head { flex-direction: column; }
  .perm-grid { grid-template-columns: 1fr; }
  .user-chip .uc-text { display: none; }
  .user-chip { padding: 4px; }
  .ai-entry span { display: none; }
  .ai-entry { padding: 9px 11px; }
  .topbar-actions { gap: 7px; }
  .topbar .pill { display: none; }
}

/* ============================================================
   官网首页 · 独立落地页（目录门户风格）
   ------------------------------------------------------------
   与后台完全分离：白底、发丝线、大留白。
   居中 Hero + 盒式搜索、分类卡片、产品网格、询价区、多栏页脚。
   ============================================================ */

.landing {
  /* 深色：正文、深色块、需要白字的按钮 */
  --l-fg:    #212f3d;
  --l-fg2:   #4d5f72;
  --l-fg3:   #8b98a8;
  --l-line:  #e0e6ec;
  --l-line2: #eef1f5;
  --l-soft:  #f4f7f9;
  --l-band:  #fafcfd;
  --l-dark:  #15181c;   /* 备用深色（页脚底栏曾用过，现改为浅灰） */

  /* 主色 = 行动按钮色：#4e6cfa
     #4e6cfa 明度偏低：白字压上去 4.3:1（略低于 AA 正文的 4.5），深藏青字只有 3.2:1。
     所以主色上的文字用白色；要严格达标可把主色压到 #4260e8（白字 5.2:1）。
     悬停加深到 #3b57db（白字 5.9:1）。
     白底上的蓝色文字用 --l-brand-ink（6.0:1），不要直接用主色。 */
  --l-brand:      #4e6cfa;
  --l-brand-d:    #3b57db;
  --l-brand-soft: #edf0fe;
  --l-brand-line: #cbd5fd;
  --l-brand-ink:  #3a55d9;
  --l-ink-on-brand: #ffffff;

  /* 行动按钮（获取报价 / 加入报价）目前与主色一致；
     保留独立变量是为了以后想区分时改一处即可。 */
  --l-cta:     #4e6cfa;
  --l-cta-d:   #3b57db;
  --l-cta-ink: #ffffff;

  display: none;
  background: #fff;
  color: var(--l-fg);
  min-height: 100vh;
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}
body.mode-landing .landing { display: block; }
body.mode-landing .app { display: none; }

.l-wrap { max-width: 1200px; margin: 0 auto; padding: 0 32px; }

/* ---------- 顶栏 ---------- */

.l-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.9);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--l-line);
}
.l-header-inner { height: 68px; display: flex; align-items: center; gap: 36px; }

.l-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--l-fg); cursor: pointer; }
.l-brand:hover .l-brand-name { color: var(--l-brand-ink); }
.l-brand-name { transition: color .15s; }
.l-mark {
  width: 28px; height: 28px; flex: 0 0 28px;
  border-radius: 8px;
  background: var(--l-brand); color: var(--l-ink-on-brand);
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700;
}
.l-brand-name { font-size: 15px; font-weight: 600; letter-spacing: .01em; }

.l-nav { display: flex; gap: 30px; }
.l-nav a {
  font-size: 13.5px; color: var(--l-fg2);
  text-decoration: none; padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color .15s, border-color .15s;
}
.l-nav a:hover { color: var(--l-brand-ink); border-bottom-color: var(--l-brand); }

.l-header-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }

/* 语言切换：下拉框 */
.l-lang-wrap { position: relative; }

.l-lang-btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--l-line);
  background: #fff;
  border-radius: 999px;
  padding: 7px 13px 7px 11px;
  font-size: 13px; font-weight: 500;
  color: var(--l-fg2);
  cursor: pointer; font-family: inherit;
  white-space: nowrap;
  transition: border-color .15s, color .15s, box-shadow .15s;
}
.l-lang-btn:hover { border-color: var(--l-brand); color: var(--l-brand-ink); }
.l-lang-wrap.open .l-lang-btn {
  border-color: var(--l-brand);
  color: var(--l-brand-ink);
  box-shadow: 0 0 0 3px var(--l-brand-soft);
}
.l-lang-globe { display: block; width: 15px; height: 15px; color: var(--l-brand-ink); }
.l-lang-globe svg { width: 15px; height: 15px; display: block; }
.l-lang-caret {
  font-style: normal; font-size: 9px; opacity: .55;
  transition: transform .18s;
}
.l-lang-wrap.open .l-lang-caret { transform: rotate(180deg); }

.l-lang-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 172px;
  background: #fff;
  border: 1px solid var(--l-line);
  border-radius: 12px;
  box-shadow: 0 14px 36px rgba(15,18,22,.15);
  padding: 6px;
  z-index: 60;
}
.l-lang-menu[hidden] { display: none; }

.l-lang-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left;
  border: 0; background: transparent;
  border-radius: 8px; padding: 9px 10px;
  font-size: 13.5px; color: var(--l-fg2);
  cursor: pointer; font-family: inherit;
  transition: background .15s, color .15s;
}
.l-lang-item:hover { background: var(--l-brand-soft); color: var(--l-brand-ink); }
.l-lang-item.active { color: var(--l-fg); font-weight: 600; }

.l-lang-tag {
  width: 28px; height: 20px; flex: 0 0 28px;
  display: grid; place-items: center;
  border-radius: 5px;
  background: var(--l-soft);
  font-size: 10.5px; font-weight: 700; letter-spacing: .02em;
  color: var(--l-fg3);
  transition: background .15s, color .15s;
}
.l-lang-item.active .l-lang-tag { background: var(--l-brand); color: var(--l-ink-on-brand); }
.l-lang-name { flex: 1; min-width: 0; }
.l-lang-tick {
  font-style: normal; font-size: 12px;
  color: var(--l-brand-ink); opacity: 0;
}
.l-lang-item.active .l-lang-tick { opacity: 1; }

/* 设置页里的翻译语言选项卡 */
.lang-tabs { display: inline-flex; gap: 6px; }
.lang-tabs button {
  border: 1px solid var(--c-line); background: var(--c-surface);
  border-radius: 8px; padding: 7px 14px;
  font-size: 13px; color: var(--c-text-2);
  cursor: pointer; font-family: inherit;
  transition: all .15s;
}
.lang-tabs button:hover { border-color: var(--c-primary); color: var(--c-primary-d); }
.lang-tabs button.active {
  background: var(--c-primary); border-color: var(--c-primary); color: #fff;
}
.l-tel {
  font-size: 13.5px; color: var(--l-fg2); text-decoration: none;
  font-variant-numeric: tabular-nums;
}
.l-tel:hover { color: var(--l-brand-ink); }

.l-btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--l-brand); color: var(--l-ink-on-brand);
  border: 1px solid var(--l-brand);
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 13.5px; font-weight: 600;
  cursor: pointer; text-decoration: none; font-family: inherit;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.l-btn-primary:hover {
  background: var(--l-brand-d);
  border-color: var(--l-brand-d);
  box-shadow: 0 4px 14px rgba(78,108,250,.38);
}
.l-btn-primary b { font-weight: 600; }
.l-dot { font-style: normal; opacity: .5; }

/* 行动按钮：获取报价 / 加入报价单 —— 中性石板灰 + 白字 */
.l-btn-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--l-cta); color: var(--l-cta-ink);
  border: 1px solid var(--l-cta);
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 13.5px; font-weight: 600;
  cursor: pointer; text-decoration: none; font-family: inherit;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.l-btn-cta:hover {
  background: var(--l-cta-d);
  border-color: var(--l-cta-d);
  box-shadow: 0 4px 14px rgba(78,108,250,.34);
}
.l-btn-cta b { font-weight: 600; }

.l-btn-line {
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--l-fg);
  border: 1px solid var(--l-line);
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 13.5px; font-weight: 500;
  cursor: pointer; text-decoration: none; font-family: inherit;
  transition: border-color .15s, background .15s, color .15s;
}
.l-btn-line:hover {
  border-color: var(--l-brand);
  background: var(--l-brand-soft);
  color: var(--l-brand-ink);
}

/* ---------- Hero：居中标题 + 盒式搜索 ---------- */

.l-hero {
  padding: 92px 0 44px;
  background: linear-gradient(180deg, var(--l-brand-soft) 0%, rgba(237,240,254,0) 100%);
}
.l-hero-inner { text-align: center; }

.l-eyebrow {
  display: inline-block;
  font-size: 11.5px; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--l-brand-ink);
}
.l-hero h1 {
  margin: 22px auto 0;
  font-size: 52px; line-height: 1.14;
  font-weight: 600; letter-spacing: -.032em;
  max-width: 820px;
}
.l-lead {
  margin: 20px auto 0;
  font-size: 16.5px; line-height: 1.7;
  color: var(--l-fg2); max-width: 620px;
}

.l-search {
  margin: 40px auto 0;
  max-width: 640px;
  display: flex; align-items: center; gap: 12px;
  background: #fff;
  border: 1px solid var(--l-brand-line);
  border-radius: 12px;
  padding: 7px 7px 7px 18px;
  box-shadow: 0 1px 2px rgba(15,18,22,.04), 0 10px 30px rgba(78,108,250,.12);
  transition: border-color .15s, box-shadow .15s;
}
.l-search:focus-within {
  border-color: var(--l-brand);
  box-shadow: 0 0 0 3px var(--l-brand-soft), 0 12px 34px rgba(78,108,250,.18);
}
.l-search-ico { font-style: normal; font-size: 16px; color: var(--l-brand-ink); }
.l-search input {
  flex: 1; min-width: 0;
  border: 0; outline: 0; background: transparent;
  font-size: 15.5px; padding: 10px 0;
  font-family: inherit;
}
.l-search input::placeholder { color: var(--l-fg3); }
.l-search .l-btn-primary { padding: 10px 22px; }

.l-note { margin-top: 26px; font-size: 13px; color: var(--l-fg3); letter-spacing: .01em; }

/* ---------- 数据条（行内文字） ---------- */

.l-stats {
  margin-top: 30px;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 40px;
  font-size: 13.5px; color: var(--l-fg2);
}
.l-stats .l-stat b {
  color: var(--l-brand-ink); font-weight: 600;
  font-variant-numeric: tabular-nums;
  margin-right: 6px;
}

/* ---------- 区块 ---------- */

.l-section { padding: 88px 0 0; }
.l-section-title { font-size: 23px; font-weight: 600; letter-spacing: -.018em; }
.l-section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px;
  margin-bottom: 26px;
}
.l-section-tools { display: flex; align-items: center; gap: 22px; }
.l-section-count { font-size: 13px; color: var(--l-fg3); font-variant-numeric: tabular-nums; }

.l-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--l-fg2);
  cursor: pointer; user-select: none; white-space: nowrap;
}
.l-toggle input {
  width: 15px; height: 15px; margin: 0;
  accent-color: var(--l-brand); cursor: pointer;
}

.l-active {
  display: flex; align-items: center; gap: 12px;
  margin: -10px 0 20px;
  font-size: 13px; color: var(--l-fg2);
}
.l-active[hidden] { display: none; }
.l-active-clear {
  border: 1px solid var(--l-brand-line); background: var(--l-brand-soft);
  border-radius: 999px; padding: 4px 12px;
  font-size: 12.5px; color: var(--l-brand-ink);
  cursor: pointer; font-family: inherit;
  transition: border-color .15s, color .15s, background .15s;
}
.l-active-clear:hover { border-color: var(--l-brand); background: #fff; }

/* ---------- 分类卡片 ---------- */

.l-cats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
  gap: 14px;
}
.l-cat {
  display: flex; align-items: center; gap: 14px;
  text-align: left;
  background: #fff;
  border: 1px solid var(--l-line);
  border-radius: 12px;
  padding: 20px;
  cursor: pointer; font-family: inherit;
  transition: border-color .16s, box-shadow .16s, transform .16s;
}
.l-cat:hover {
  border-color: var(--l-brand);
  box-shadow: 0 6px 20px rgba(78,108,250,.14);
  transform: translateY(-2px);
}
.l-cat.active { border-color: var(--l-brand); box-shadow: 0 0 0 1px var(--l-brand); }
.l-cat-ico {
  width: 40px; height: 40px; flex: 0 0 40px;
  border-radius: 10px;
  background: var(--l-brand-soft); color: var(--l-brand-ink);
  display: grid; place-items: center;
}
.l-cat-ico svg { width: 21px; height: 21px; }
.l-cat-body { min-width: 0; flex: 1; }
.l-cat-name { display: block; font-size: 14.5px; font-weight: 600; letter-spacing: -.005em; }
.l-cat-count { display: block; font-size: 12.5px; color: var(--l-fg3); margin-top: 3px; }
.l-cat-arrow { color: var(--l-fg3); font-size: 15px; transition: transform .16s, color .16s; }
.l-cat:hover .l-cat-arrow { transform: translateX(3px); color: var(--l-brand-ink); }

/* ---------- 产品网格 ---------- */

.l-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(262px, 1fr));
  gap: 16px;
}

.l-card {
  background: #fff;
  border: 1px solid var(--l-line);
  border-radius: 12px;
  padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
  transition: border-color .16s, box-shadow .16s, transform .16s;
}
.l-card:hover {
  border-color: #cfd5de;
  box-shadow: 0 8px 24px rgba(15,18,22,.08);
  transform: translateY(-2px);
}
.l-card-media { cursor: pointer; }

.l-thumb {
  height: 140px;
  border-radius: 9px;
  background: var(--l-brand-soft);
  display: grid; place-items: center;
  color: var(--l-brand-ink);
  position: relative; overflow: hidden;
}
.l-thumb svg { width: 40px; height: 40px; opacity: .75; }
.l-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.l-card-meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; color: var(--l-fg3);
  letter-spacing: .02em;
}
.l-card-meta .l-flag { color: var(--l-brand-ink); font-weight: 600; }
.l-card-meta .l-flag::after { content: "·"; margin-left: 8px; color: var(--l-fg3); font-weight: 400; }

.l-card-name {
  font-size: 15px; font-weight: 600; line-height: 1.45;
  letter-spacing: -.005em; cursor: pointer;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 43px;
  transition: color .15s;
}
.l-card-name:hover { color: var(--l-brand-ink); text-decoration: underline; text-underline-offset: 3px; }
.l-card-spec {
  font-size: 12.5px; color: var(--l-fg3); line-height: 1.65;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 41px;
}

.l-card-price {
  margin-top: 4px; padding-top: 13px;
  border-top: 1px solid var(--l-line2);
  display: flex; align-items: baseline; gap: 8px;
}
.l-card-price .v {
  font-size: 21px; font-weight: 600; letter-spacing: -.02em;
  color: var(--l-brand-ink);
  font-variant-numeric: tabular-nums;
}
.l-card-price .u { font-size: 12px; color: var(--l-fg3); }
.l-card-batch { font-size: 12px; color: var(--l-fg3); margin-top: -3px; }
.l-noprice {
  font-size: 12.5px; color: var(--l-brand-ink);
  padding-top: 13px; border-top: 1px solid var(--l-line2);
}

.l-card-foot { display: flex; gap: 8px; align-items: center; margin-top: auto; padding-top: 12px; }
.l-qty {
  width: 58px; flex: 0 0 58px;
  border: 1px solid var(--l-line);
  border-radius: 8px;
  padding: 8px 6px; text-align: center;
  font-size: 13.5px; font-variant-numeric: tabular-nums;
  outline: 0; font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.l-qty:focus { border-color: var(--l-brand); box-shadow: 0 0 0 3px var(--l-brand-soft); }
.l-card-foot .l-btn-primary,
.l-card-foot .l-btn-cta,
.l-card-foot .l-btn-line { flex: 1; }

.l-empty {
  border: 1px solid var(--l-line); border-radius: 12px;
  padding: 64px 24px; text-align: center;
  color: var(--l-fg3);
}
.l-empty p { font-size: 14.5px; color: var(--l-fg2); font-weight: 500; }
.l-empty span { font-size: 13px; display: block; margin-top: 6px; }

/* ---------- 询价区 ---------- */

.l-quote {
  margin-top: 96px;
  background: linear-gradient(180deg, var(--l-brand-soft) 0%, rgba(237,240,254,.35) 100%);
  border-top: 1px solid var(--l-brand-line);
  /* 不设 border-bottom：下方紧接页脚，由页脚的 border-top 提供唯一的分隔线，
     否则两条不同色的 1px 线并排会叠成一道 2px 色缝 */
}
.l-quote-inner {
  padding: 64px 32px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
  gap: 56px; align-items: start;
}
.l-quote-text h3 { font-size: 27px; font-weight: 600; letter-spacing: -.022em; line-height: 1.3; }
.l-quote-text p { margin-top: 14px; font-size: 14.5px; color: var(--l-fg2); line-height: 1.75; max-width: 460px; }
.l-quote-tel {
  display: inline-block; margin-top: 22px;
  font-size: 14px; color: var(--l-brand-ink); text-decoration: none;
  border-bottom: 1px solid var(--l-brand); padding-bottom: 2px;
  font-variant-numeric: tabular-nums;
}
.l-quote-tel:hover { color: var(--l-brand-ink); }
.l-quote-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.l-field { display: flex; flex-direction: column; gap: 7px; }
.l-field span { font-size: 12px; font-weight: 600; color: var(--l-fg2); }
/* 必填标记 */
.l-field .req { color: #d64545; font-style: normal; margin-left: 3px; }
.l-inq-req {
  grid-column: 1 / -1;
  margin: -4px 0 2px;
  font-size: 12px; color: var(--l-fg3);
}
.l-inq-req i { color: #d64545; font-style: normal; }
/* 校验失败：输入框描红，提交后由脚本加 .is-invalid */
.l-field input.is-invalid,
.l-field textarea.is-invalid {
  border-color: #d64545 !important;
  box-shadow: 0 0 0 3px rgba(214,69,69,.12) !important;
}
.l-field input {
  border: 1px solid var(--l-line);
  border-radius: 9px;
  background: #fff;
  padding: 10px 13px;
  font-size: 14px; font-family: inherit; outline: 0;
  transition: border-color .15s, box-shadow .15s;
}
.l-field input:focus { border-color: var(--l-brand); box-shadow: 0 0 0 3px var(--l-brand-soft); }
.l-field input::placeholder { color: #b6bdc7; }
.l-quote-submit { grid-column: span 2; padding: 12px 20px; font-size: 14px; }
.l-quote-hint { grid-column: span 2; font-size: 12px; color: var(--l-fg3); margin: 0; min-height: 16px; }
.l-quote-hint.err { color: #c0392b; }

/* ---------- 最近添加的产品 ---------- */

.l-section-recent { padding-top: 64px; }
.l-section-recent[hidden] { display: none; }

.l-recent {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 26px 20px;
}

.l-rcard {
  display: flex; flex-direction: column; gap: 12px;
  border: 0; background: transparent;
  padding: 0; cursor: pointer; font-family: inherit; text-align: left;
}

.l-rcard-thumb {
  width: 100%; aspect-ratio: 4 / 3;
  border-radius: 10px;
  background: var(--l-soft);
  border: 1px solid var(--l-line);
  display: grid; place-items: center;
  color: var(--l-brand-ink);
  position: relative; overflow: hidden;
  transition: border-color .16s, box-shadow .16s, transform .16s;
}
.l-rcard-thumb svg { width: 40px; height: 40px; opacity: .7; }
.l-rcard-thumb img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.l-rcard:hover .l-rcard-thumb {
  border-color: var(--l-brand);
  box-shadow: 0 10px 26px rgba(78,108,250,.15);
  transform: translateY(-3px);
}

.l-rcard-name {
  font-size: 13.5px; font-weight: 500; line-height: 1.5; color: var(--l-fg2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 40px;
  transition: color .15s;
}
.l-rcard:hover .l-rcard-name { color: var(--l-brand-ink); }
.l-rcard-meta {
  font-size: 11.5px; color: var(--l-fg3);
  display: flex; align-items: center; gap: 6px;
}
.l-rcard-meta i { font-style: normal; opacity: .55; }

@media (max-width: 1024px) {
  .l-recent { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .l-section-recent { padding-top: 48px; }
  .l-recent { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 栏目底部的居中按钮 */
.l-section-foot { margin-top: 34px; text-align: center; }
.l-section-foot .l-btn-line { padding: 11px 30px; }

/* ---------- 页脚 ---------- */

.l-footer {
  background: var(--l-soft);
  border-top: 1px solid var(--l-line);
}
.l-footer-inner {
  padding: 56px 32px 48px;
  display: grid;
  /* 品牌区 1.6 : 探索 1 : 联系方式 1.2 —— 保持原有的三栏位置 */
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 40px 56px;
  align-items: start;
}
.l-footer-brand { max-width: 400px; }
.l-footer-brand .l-brand { margin-bottom: 16px; }
.l-footer-brand .l-brand-name { font-size: 16px; line-height: 1.4; }
.l-footer-copy {
  font-size: 13px; color: var(--l-fg2);
  line-height: 1.85; margin: 0;
}
.l-footer-copy:empty { display: none; }

.l-footer-col .l-k {
  font-size: 11.5px; font-weight: 700; letter-spacing: .06em;
  color: var(--l-fg); margin-bottom: 16px;
}
.l-footer-links,
.l-footer-lines { display: flex; flex-direction: column; gap: 11px; }

.l-footer-links a,
.l-footer-line > a,
.l-footer-line > span {
  font-size: 13.5px; color: var(--l-fg2);
  text-decoration: none; line-height: 1.6;
  transition: color .15s;
}
.l-footer-links a:hover,
.l-footer-line > a:hover { color: var(--l-brand-ink); }

/* 联系方式行：前置线性图标 */
.l-footer-line { display: flex; align-items: flex-start; gap: 9px; }
i.l-line-ico {
  display: block;
  width: 15px; height: 15px; flex: 0 0 15px;
  margin-top: 3px;
  color: var(--l-brand-ink); opacity: .8;
}
i.l-line-ico svg { width: 15px; height: 15px; display: block; }

.l-footer-bar {
  /* 浅灰底 + 一条发丝线；想换回深色把 background 改成 var(--l-dark) 并去掉 border-top */
  background: var(--l-line2);
  border-top: 1px solid var(--l-line);
}
.l-footer-bar-inner {
  padding: 14px 32px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px 24px; flex-wrap: wrap;
  min-height: 58px;
  font-size: 12.5px; color: var(--l-fg2);
  line-height: 1.6;
}
.l-footer-bar-left {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 4px 16px; min-width: 0;
}
.l-footer-bar-inner a { color: var(--l-fg2); text-decoration: none; }
.l-footer-bar-inner a:hover { color: var(--l-brand-ink); text-decoration: underline; }
.l-footer-bar-inner span:empty { display: none; }

/* 页脚里的语言切换：透明底，菜单向上展开 */
.l-lang-up .l-lang-btn { background: transparent; padding: 6px 12px 6px 10px; }
.l-lang-up .l-lang-btn:hover { background: #fff; }
.l-lang-up.open .l-lang-btn { background: #fff; }
.l-lang-up .l-lang-menu { top: auto; bottom: calc(100% + 8px); }

@media (max-width: 1024px) {
  .l-footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 36px 48px;
    padding: 48px 32px 42px;
  }
  .l-footer-brand { grid-column: 1 / -1; max-width: 520px; }
}
@media (max-width: 640px) {
  .l-footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 40px 24px 34px;
  }
  .l-footer-bar-inner {
    padding: 16px 24px;
    flex-direction: column; align-items: flex-start;
  }
}

/* ---------- 返回顶部 ---------- */

.l-top {
  position: fixed;
  right: 26px; bottom: 26px;
  width: 44px; height: 44px;
  border: 0; border-radius: 50%;
  background: var(--l-brand);
  color: var(--l-ink-on-brand);
  display: grid; place-items: center;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(78,108,250,.34);
  z-index: 80;
  transition: transform .16s, box-shadow .16s, opacity .2s;
}
.l-top svg { width: 20px; height: 20px; display: block; }
.l-top:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(78,108,250,.46);
}
.l-top:active { transform: translateY(0); }
.l-top[hidden] { display: none; }

/* 落地页上把 Toast 抬高，免得盖住返回顶部按钮 */
body.mode-landing .toast-wrap { bottom: 86px; }

@media (max-width: 640px) {
  .l-top { right: 16px; bottom: 16px; width: 40px; height: 40px; }
  body.mode-landing .toast-wrap { bottom: 70px; }
}

/* ---------- 后台：设置页分组与小型编辑器 ---------- */

.form-section { padding: 4px 18px 18px; border-bottom: 1px solid var(--c-line-soft); }
.form-section:last-of-type { border-bottom: 0; }
.form-section-title {
  padding: 18px 0 0;
  font-size: 11.5px; font-weight: 700; letter-spacing: .07em;
  color: var(--c-text-3); text-transform: uppercase;
}
.form-section .form-grid { padding: 12px 0 0; }

.mini-editor { display: flex; flex-direction: column; gap: 8px; }
.mini-editor:empty { display: none; }
.mini-editor-empty { font-size: 12.5px; color: var(--c-text-3); }
.navlink-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) 32px;
  gap: 8px; align-items: center;
}
.navlink-row input {
  border: 1px solid var(--c-line); border-radius: 8px;
  padding: 8px 11px; outline: 0; width: 100%;
  font-size: 13.5px; font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.navlink-row input:focus { border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--c-primary-l); }

/* ---------- 响应式 ---------- */

@media (max-width: 1024px) {
  .l-quote-inner { grid-template-columns: 1fr; gap: 34px; padding: 52px 32px; }
  .l-footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .l-wrap { padding: 0 20px; }
  .l-header-inner { gap: 16px; }
  .l-nav { display: none; }
  .l-hero { padding: 56px 0 0; }
  .l-hero h1 { font-size: 34px; }
  .l-lead { font-size: 15px; }
  .l-section { padding: 60px 0 0; }
  .l-cats { grid-template-columns: 1fr 1fr; }
  .l-grid { grid-template-columns: 1fr; }
  .l-quote { margin-top: 64px; }
  .l-quote-text h3 { font-size: 22px; }
  .l-footer-inner { grid-template-columns: 1fr; padding: 40px 20px 34px; gap: 30px; }
  .l-footer-bar-inner { padding: 18px 20px; flex-direction: column; align-items: flex-start; gap: 6px; }
  .l-tel { display: none; }
}
@media (max-width: 560px) {
  .l-header-inner { height: 60px; }
  .l-brand-name { font-size: 14px; }
  .l-cats { grid-template-columns: 1fr; }
  .l-search { flex-wrap: wrap; padding: 10px; }
  .l-search input { flex-basis: 100%; padding: 6px 0; }
  .l-search .l-btn-primary { width: 100%; }
  .l-section-head { flex-direction: column; align-items: flex-start; gap: 14px; }
  .l-quote-form { grid-template-columns: 1fr; }
  .l-quote-submit, .l-quote-hint { grid-column: span 1; }
}

/* ============================================================
   询价页（获取报价）
   ============================================================ */

.l-page { padding: 40px 0 76px; }
.landing.is-inquiry .l-nav { display: none; }

.l-back {
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; background: transparent; padding: 0;
  font-size: 13.5px; color: var(--l-fg2);
  cursor: pointer; font-family: inherit;
  margin-bottom: 30px;
  transition: color .15s;
}
.l-back:hover { color: var(--l-brand-ink); }

.l-inq-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 320px);
  gap: 56px; align-items: start;
}

.l-inq-title { font-size: 34px; font-weight: 600; letter-spacing: -.028em; line-height: 1.2; }
.l-inq-sub {
  margin-top: 14px; font-size: 15px; color: var(--l-fg2);
  line-height: 1.7; max-width: 560px;
}

.l-inq-product {
  display: flex; align-items: center; gap: 16px;
  margin-top: 28px;
  border: 1px solid var(--l-line); border-radius: 12px;
  padding: 14px; background: #fff;
}
.l-inq-product[hidden] { display: none; }
.l-inq-thumb {
  width: 84px; height: 84px; flex: 0 0 84px;
  border-radius: 9px; background: var(--l-brand-soft);
  display: grid; place-items: center; color: var(--l-brand-ink);
  position: relative; overflow: hidden;
}
.l-inq-thumb svg { width: 32px; height: 32px; opacity: .75; }
.l-inq-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.l-inq-prod-body { min-width: 0; }
.l-inq-prod-name { font-size: 15px; font-weight: 600; }
.l-inq-prod-sku { font-family: var(--mono); font-size: 12px; color: var(--l-fg3); margin-top: 4px; }
.l-inq-prod-price {
  font-size: 16px; font-weight: 600; margin-top: 6px;
  color: var(--l-brand-ink);
  font-variant-numeric: tabular-nums;
}
.l-inq-prod-price span { font-size: 12px; font-weight: 400; color: var(--l-fg3); }

.l-inq-form {
  margin-top: 30px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.l-inq-form[hidden] { display: none; }
.l-field-full { grid-column: span 2; }
.l-inq-form .l-field textarea {
  border: 1px solid var(--l-line); border-radius: 9px;
  background: #fff; padding: 11px 13px;
  font-size: 14px; font-family: inherit; outline: 0;
  resize: vertical; line-height: 1.6;
  transition: border-color .15s, box-shadow .15s;
}
.l-inq-form .l-field textarea:focus {
  border-color: var(--l-brand);
  box-shadow: 0 0 0 3px var(--l-brand-soft);
}
.l-inq-form .l-field textarea::placeholder { color: #b6bdc7; }
.l-inq-submit { grid-column: span 2; padding: 13px 20px; font-size: 14.5px; }
.l-inq-privacy { grid-column: span 2; font-size: 12px; color: var(--l-fg3); margin: 0; }

.l-inq-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 92px; }
.l-inq-card {
  border: 1px solid var(--l-line); border-radius: 12px;
  padding: 20px; background: #fff;
}
.l-inq-card[hidden] { display: none; }
.l-inq-card-title {
  font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--l-fg3); margin-bottom: 14px;
}
.l-inq-lines { display: flex; flex-direction: column; gap: 10px; }
.l-inq-lines a, .l-inq-lines span {
  font-size: 13.5px; color: var(--l-fg2);
  text-decoration: none; line-height: 1.6; word-break: break-word;
}
.l-inq-lines a:hover { color: var(--l-brand-ink); }
.l-inq-qr { width: 100%; max-width: 180px; display: block; border-radius: 8px; }

.l-inq-success { padding: 12px 0; }
.l-inq-success[hidden] { display: none; }
.l-inq-ok {
  width: 44px; height: 44px; border-radius: 50%;
  background: #e8f6ef; color: #0c8f6f;
  display: grid; place-items: center;
  font-size: 22px; font-weight: 700; margin-bottom: 18px;
}
.l-inq-success h2 { font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.l-inq-success p {
  margin-top: 12px; font-size: 14.5px; color: var(--l-fg2);
  line-height: 1.75; max-width: 480px;
}
.l-inq-no {
  margin-top: 18px; display: inline-block;
  font-family: var(--mono); font-size: 13px; color: var(--l-fg);
  background: var(--l-soft); border-radius: 8px; padding: 8px 14px;
}
.l-inq-success-actions { margin-top: 26px; display: flex; gap: 12px; flex-wrap: wrap; }

@media (max-width: 1024px) {
  .l-inq-grid { grid-template-columns: 1fr; gap: 34px; }
  .l-inq-side { position: static; }
}
@media (max-width: 560px) {
  .l-inq-title { font-size: 26px; }
  .l-inq-form { grid-template-columns: 1fr; }
  .l-field-full, .l-inq-submit, .l-inq-privacy { grid-column: span 1; }
}

/* ============================================================
   后台：询价详情（可编辑 + 跟进记录）
   ============================================================ */

.inq-product-line {
  display: flex; align-items: center; gap: 14px;
  margin-top: 16px; padding: 12px;
  border: 1px solid var(--c-line-soft); border-radius: 10px;
  background: var(--c-surface-2);
}

.inq-notes { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.inq-note {
  border: 1px solid var(--c-line-soft);
  border-left: 3px solid var(--c-primary-l);
  border-radius: 8px;
  padding: 10px 13px;
  background: var(--c-surface-2);
}
.inq-note-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  font-size: 12px; color: var(--c-text-3); margin-bottom: 5px;
}
.inq-note-head b { color: var(--c-text-2); font-weight: 600; }
.inq-note-head a { color: var(--c-danger); text-decoration: none; }
.inq-note-head a:hover { text-decoration: underline; }
.inq-note-text {
  font-size: 13.5px; color: var(--c-text); line-height: 1.65;
  white-space: pre-wrap; word-break: break-word;
}

.inq-note-add { display: flex; gap: 8px; margin-top: 12px; }
.inq-note-add input {
  flex: 1; min-width: 0;
  border: 1px solid var(--c-line); border-radius: 8px;
  padding: 8px 11px; outline: 0;
  font-size: 13.5px; font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.inq-note-add input:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px var(--c-primary-l);
}
.inq-note-add .btn { flex: 0 0 auto; }

/* 服务器来源询价的只读详情（键值网格） */
.kv-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px; background: var(--c-line); border: 1px solid var(--c-line);
  border-radius: 6px; overflow: hidden;
}
.kv {
  display: flex; align-items: baseline; gap: 8px;
  padding: 7px 10px; background: var(--c-bg);
  font-size: 12.5px;
}
.kv > span { flex: 0 0 68px; color: var(--c-text-3); }
.kv > b { flex: 1; min-width: 0; color: var(--c-text); font-weight: 600; word-break: break-all; }
@media (max-width: 520px) { .kv-grid { grid-template-columns: minmax(0, 1fr); } }

.inq-flag {
  display: inline-block; margin-left: 6px;
  font-size: 10.5px; font-weight: 600;
  color: var(--c-primary-d); background: var(--c-primary-l);
  border-radius: 5px; padding: 1px 6px;
}

/* ============================================================
   官网产品页（左侧分类树）
   ============================================================ */

.l-shop {
  display: grid;
  grid-template-columns: 234px minmax(0, 1fr);
  gap: 50px; align-items: start;
  padding-top: 44px; padding-bottom: 84px;
}

.l-shop-side { position: sticky; top: 92px; }
.l-shop-side-title {
  font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--l-fg3); margin-bottom: 12px; padding-left: 12px;
}
.l-shop-cats { display: flex; flex-direction: column; gap: 2px; }

.l-shop-cat {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left;
  border: 0; background: transparent;
  border-radius: 9px;
  padding: 10px 12px;
  font-size: 13.5px; color: var(--l-fg2);
  cursor: pointer; font-family: inherit;
  transition: background .15s, color .15s;
}
.l-shop-cat:hover { background: var(--l-brand-soft); color: var(--l-brand-ink); }
.l-shop-cat.active { background: var(--l-brand); color: var(--l-ink-on-brand); font-weight: 600; }
.l-shop-cat.active:hover { background: var(--l-brand-d); color: var(--l-ink-on-brand); }
.l-shop-cat.active .l-shop-cat-num { color: rgba(33,47,61,.6); }

.l-shop-cat-ico {
  width: 18px; height: 18px; flex: 0 0 18px;
  display: grid; place-items: center;
  color: inherit; opacity: .82;
}
.l-shop-cat-ico svg { width: 16px; height: 16px; }
.l-shop-cat-name {
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.l-shop-cat-num {
  font-size: 12px; color: var(--l-fg3);
  font-variant-numeric: tabular-nums;
}

.l-shop-main { min-width: 0; }

.l-breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--l-fg3); margin-bottom: 20px;
}
.l-breadcrumb a { color: var(--l-fg3); text-decoration: none; }
.l-breadcrumb a:hover { color: var(--l-brand-ink); }

.l-shop-title { font-size: 30px; font-weight: 600; letter-spacing: -.026em; line-height: 1.2; }
.l-shop-count { margin-top: 9px; font-size: 13.5px; color: var(--l-fg3); }

.l-shop-search {
  margin: 26px 0 28px;
  max-width: 560px;
  display: flex; align-items: center; gap: 10px;
  background: #fff;
  border: 1px solid var(--l-line);
  border-radius: 10px;
  padding: 6px 6px 6px 16px;
  transition: border-color .15s, box-shadow .15s;
}
.l-shop-search:focus-within {
  border-color: var(--l-brand);
  box-shadow: 0 0 0 3px var(--l-brand-soft);
}
.l-shop-search input {
  flex: 1; min-width: 0;
  border: 0; outline: 0; background: transparent;
  font-size: 14.5px; padding: 9px 0;
  font-family: inherit;
}
.l-shop-search input::placeholder { color: var(--l-fg3); }

.l-grid-shop { grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); }

.l-section-link {
  font-size: 13px; color: var(--l-brand-ink);
  text-decoration: none; white-space: nowrap;
  transition: color .15s;
}
.l-section-link:hover { color: var(--l-brand-ink); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 1024px) {
  .l-shop { grid-template-columns: 1fr; gap: 26px; padding-top: 32px; }
  .l-shop-side { position: static; }
  .l-shop-side-title { padding-left: 0; }
  .l-shop-cats {
    flex-direction: row; flex-wrap: nowrap;
    overflow-x: auto; padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }
  .l-shop-cat { width: auto; flex: 0 0 auto; padding: 8px 14px; }
  .l-shop-cat-name { flex: 0 0 auto; }
}
@media (max-width: 560px) {
  .l-shop-title { font-size: 24px; }
  .l-shop-search { flex-wrap: wrap; padding: 10px; }
  .l-shop-search input { flex-basis: 100%; padding: 6px 0; }
  .l-shop-search .l-btn-primary { width: 100%; }
}

/* ============================================================
   后台：AI 助手（数据分析）
   ============================================================ */

.ai-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; margin-bottom: 18px;
}
.ai-title { font-size: 18px; font-weight: 700; letter-spacing: -.012em; }
.ai-sub { margin-top: 5px; font-size: 13px; color: var(--c-text-3); }
.ai-head-actions { display: flex; gap: 9px; }

.ai-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.ai-kpi {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r);
  padding: 15px 17px;
  box-shadow: var(--sh-1);
}
.ai-kpi-k { font-size: 11.5px; color: var(--c-text-3); letter-spacing: .02em; }
.ai-kpi-v {
  font-size: 22px; font-weight: 750; letter-spacing: -.02em;
  margin-top: 4px; font-variant-numeric: tabular-nums;
}
.ai-kpi-s { font-size: 11.5px; color: var(--c-text-3); margin-top: 4px; }
.ai-kpi.good { background: linear-gradient(180deg, #fbfffd, #fff); border-color: #cdeee0; }
.ai-kpi.good .ai-kpi-v { color: var(--c-accent); }
.ai-kpi.warn { background: linear-gradient(180deg, #fffdf8, #fff); border-color: #f6e2c0; }
.ai-kpi.warn .ai-kpi-v { color: #b45309; }

.ai-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
@media (max-width: 1080px) { .ai-grid { grid-template-columns: 1fr; } }

.ai-card {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r);
  box-shadow: var(--sh-1);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.ai-card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--c-line-soft);
  background: linear-gradient(180deg, #fcfdff, #f8fafd);
}
.ai-card-head h3 { font-size: 14px; font-weight: 700; }
.ai-badge {
  font-size: 11px; font-weight: 600;
  color: var(--c-text-3); background: #eef2f8;
  border-radius: 999px; padding: 3px 10px;
  white-space: nowrap;
}
.ai-badge.ok { color: var(--c-primary-d); background: var(--c-primary-l); }

/* ---------- 洞察 ---------- */

.ai-insights { padding: 14px; display: flex; flex-direction: column; gap: 10px; }

.ai-insight {
  border: 1px solid var(--c-line);
  border-left: 3px solid var(--c-text-3);
  border-radius: 9px;
  padding: 12px 14px;
  background: var(--c-surface);
}
.ai-insight.good { border-left-color: var(--c-accent); background: linear-gradient(90deg, var(--c-accent-l), #fff 42%); }
.ai-insight.info { border-left-color: var(--c-primary); background: linear-gradient(90deg, var(--c-primary-l), #fff 42%); }
.ai-insight.warn { border-left-color: var(--c-warn); background: linear-gradient(90deg, #fef4e6, #fff 42%); }

.ai-insight-head { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.ai-level {
  font-size: 10.5px; font-weight: 700; letter-spacing: .02em;
  border-radius: 5px; padding: 1px 7px;
  background: #eef2f8; color: var(--c-text-3);
}
.ai-insight.good .ai-level { background: var(--c-accent-l); color: var(--c-accent); }
.ai-insight.info .ai-level { background: var(--c-primary-l); color: var(--c-primary-d); }
.ai-insight.warn .ai-level { background: #fbe8ce; color: #b45309; }
.ai-insight-title { font-size: 13.5px; font-weight: 650; }
.ai-insight-text {
  font-size: 12.5px; color: var(--c-text-2); line-height: 1.7;
  white-space: pre-wrap; word-break: break-word;
}
.ai-insight .btn { margin-top: 9px; }

/* ---------- 对话 ---------- */

.ai-thread {
  padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  min-height: 220px; max-height: 460px; overflow-y: auto;
}
.ai-empty { font-size: 12.5px; color: var(--c-text-3); line-height: 1.7; }

.ai-msg { display: flex; flex-direction: column; max-width: 92%; }
.ai-msg.user { align-self: flex-end; align-items: flex-end; }
.ai-msg.assistant { align-self: flex-start; }
.ai-msg-body {
  font-size: 13.5px; line-height: 1.75;
  padding: 10px 13px; border-radius: 11px;
  white-space: pre-wrap; word-break: break-word;
}
.ai-msg.user .ai-msg-body {
  background: var(--c-primary); color: #fff;
  border-bottom-right-radius: 4px;
}
.ai-msg.assistant .ai-msg-body {
  background: var(--c-surface-2); color: var(--c-text);
  border: 1px solid var(--c-line-soft);
  border-bottom-left-radius: 4px;
}
.ai-msg-meta { font-size: 10.5px; color: var(--c-text-3); margin-top: 5px; padding: 0 3px; }

.ai-suggest {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 0 16px 12px;
}
.ai-chip {
  border: 1px solid var(--c-line); background: var(--c-surface);
  border-radius: 999px; padding: 5px 12px;
  font-size: 12px; color: var(--c-text-2);
  cursor: pointer; font-family: inherit;
  transition: all .15s;
}
.ai-chip:hover {
  border-color: var(--c-primary); color: var(--c-primary-d);
  background: var(--c-primary-l);
}

.ai-input {
  display: flex; gap: 9px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--c-line-soft);
}
.ai-input input {
  flex: 1; min-width: 0;
  border: 1px solid var(--c-line); border-radius: 9px;
  padding: 9px 12px; outline: 0;
  font-size: 13.5px; font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.ai-input input:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px var(--c-primary-l);
}
.ai-input .btn { flex: 0 0 auto; }

/* ============================================================
   官网产品详情页
   ============================================================ */

.l-pdp {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 330px);
  gap: 54px; align-items: start;
  padding-top: 36px; padding-bottom: 84px;
}
.l-pdp-main { min-width: 0; }
.l-pdp-side { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 16px; }

/* ---------- 图库 ---------- */

.l-pdp-gallery { margin-bottom: 26px; }

.l-pdp-stage {
  height: 400px;
  border: 1px solid var(--l-line);
  border-radius: 14px;
  background: var(--l-brand-soft);
  display: grid; place-items: center;
  color: var(--l-brand-ink);
  position: relative; overflow: hidden;
}
.l-pdp-stage svg { width: 64px; height: 64px; opacity: .55; }
.l-pdp-stage img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: contain;
  background: #fff;
}

.l-pdp-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.l-pdp-thumbs[hidden] { display: none; }
.l-pdp-thumb {
  width: 68px; height: 68px; flex: 0 0 68px;
  border: 1px solid var(--l-line);
  border-radius: 9px;
  background: var(--l-brand-soft);
  padding: 0; cursor: pointer;
  overflow: hidden; position: relative;
  transition: border-color .15s, box-shadow .15s;
}
.l-pdp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.l-pdp-thumb:hover { border-color: var(--l-brand-line); }
.l-pdp-thumb.active {
  border-color: var(--l-brand);
  box-shadow: 0 0 0 2px var(--l-brand-soft);
}

/* ---------- 标题 / 说明 / 规格 ---------- */

.l-pdp-title {
  font-size: 27px; font-weight: 600;
  line-height: 1.3; letter-spacing: -.024em;
}
.l-pdp-meta {
  display: flex; flex-wrap: wrap; gap: 8px 16px;
  margin-top: 12px;
  font-size: 12.5px; color: var(--l-fg3);
}
.l-pdp-meta-item { display: inline-flex; align-items: center; gap: 8px; }
.l-pdp-meta-item + .l-pdp-meta-item::before {
  content: ""; width: 3px; height: 3px; border-radius: 50%;
  background: #cbd2db; margin-right: 8px;
}
.l-pdp-flag { color: var(--l-brand-ink); font-weight: 600; }

.l-pdp-block { margin-top: 40px; }
.l-pdp-block h2 {
  font-size: 16px; font-weight: 600;
  padding-bottom: 12px; margin-bottom: 16px;
  border-bottom: 1px solid var(--l-line);
}
.l-pdp-desc {
  font-size: 14px; line-height: 1.85; color: var(--l-fg2);
  max-width: 720px; white-space: pre-wrap;
}

.l-pdp-specs { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.l-pdp-specs th,
.l-pdp-specs td {
  text-align: left; padding: 11px 16px;
  border-bottom: 1px solid var(--l-line2);
  vertical-align: top; line-height: 1.65;
}
.l-pdp-specs th {
  width: 180px; font-weight: 500; color: var(--l-fg2);
  background: var(--l-soft);
}
.l-pdp-specs tbody tr:first-child th,
.l-pdp-specs tbody tr:first-child td { border-top: 1px solid var(--l-line2); }

/* ---------- 侧栏 ---------- */

.l-pdp-card {
  border: 1px solid var(--l-line);
  border-radius: 12px;
  padding: 20px;
  background: #fff;
}
.l-pdp-card[hidden] { display: none; }
.l-pdp-card-title {
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--l-fg3); margin-bottom: 12px;
}
.l-pdp-card-text { font-size: 12.5px; color: var(--l-fg2); line-height: 1.7; }

.l-pdp-qty { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.l-pdp-qty span { font-size: 12px; font-weight: 600; color: var(--l-fg2); }
.l-pdp-qty input {
  flex: 1; min-width: 0;
  border: 1px solid var(--l-line); border-radius: 9px;
  padding: 9px 12px; outline: 0;
  font-size: 14px; font-family: inherit;
  font-variant-numeric: tabular-nums;
  transition: border-color .15s, box-shadow .15s;
}
.l-pdp-qty input:focus {
  border-color: var(--l-brand);
  box-shadow: 0 0 0 3px var(--l-brand-soft);
}

.l-pdp-price {
  display: flex; align-items: baseline; gap: 6px;
  margin-top: 14px; min-height: 26px;
}
.l-pdp-price .v {
  font-size: 22px; font-weight: 600; color: var(--l-brand-ink);
  letter-spacing: -.02em; font-variant-numeric: tabular-nums;
}
.l-pdp-price .u { font-size: 12px; color: var(--l-fg3); }
.l-pdp-price .off {
  font-size: 11.5px; font-weight: 600; color: #0c8f6f;
  background: var(--c-accent-l); border-radius: 999px; padding: 2px 8px;
  margin-left: auto;
}

.l-pdp-cta { width: 100%; margin-top: 14px; padding: 12px 18px; font-size: 14px; }
.l-pdp-add { width: 100%; margin-top: 9px; padding: 10px 18px; font-size: 13.5px; }
.l-pdp-add[hidden] { display: none; }

.l-pdp-related { display: flex; flex-direction: column; gap: 2px; }
.l-pdp-rel {
  display: flex; flex-direction: column; gap: 3px;
  text-align: left; border: 0; background: transparent;
  border-radius: 8px; padding: 10px 11px;
  cursor: pointer; font-family: inherit;
  transition: background .15s;
}
.l-pdp-rel:hover { background: var(--l-brand-soft); }
.l-pdp-rel-name { font-size: 13.5px; font-weight: 500; color: var(--l-fg); line-height: 1.45; }
.l-pdp-rel:hover .l-pdp-rel-name { color: var(--l-brand-ink); }
.l-pdp-rel-sku { font-family: var(--mono); font-size: 11px; color: var(--l-fg3); }

@media (max-width: 1024px) {
  .l-pdp { grid-template-columns: 1fr; gap: 32px; padding-top: 28px; }
  .l-pdp-side { position: static; }
  .l-pdp-stage { height: 300px; }
}
@media (max-width: 560px) {
  .l-pdp-title { font-size: 22px; }
  .l-pdp-stage { height: 230px; }
  .l-pdp-specs th { width: 110px; padding: 9px 11px; }
  .l-pdp-specs td { padding: 9px 11px; }
}

/* 产品编辑弹窗里的图片 / 参数行 */
.pair-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) 32px;
  gap: 8px; align-items: center;
}
.pair-row-wide {
  grid-template-columns: 44px minmax(0, 1fr) auto 32px;
}
.pair-row input {
  border: 1px solid var(--c-line); border-radius: 8px;
  padding: 8px 11px; outline: 0; width: 100%;
  font-size: 13.5px; font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.pair-row input:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px var(--c-primary-l);
}
/* 本地图片的 data URL 很长，缩小字号，避免输入框看起来像坏了 */
.pair-row input.is-local {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--c-text-3);
  letter-spacing: -.02em;
}

.pair-prev {
  width: 44px; height: 44px;
  border: 1px solid var(--c-line); border-radius: 7px;
  background: var(--c-surface-2);
  display: grid; place-items: center;
  overflow: hidden;
}
.pair-prev img { width: 100%; height: 100%; object-fit: cover; display: block; }

.pair-pick { white-space: nowrap; }

/* 编辑器下方的按钮条：不能被 .field 的 flex 拉伸成整行 */
.pair-tools {
  display: flex; align-items: center; flex-wrap: wrap; gap: 9px;
  margin-top: 10px;
}
.pair-hint { font-size: 11.5px; color: var(--c-text-3); line-height: 1.5; }

/* 产品编辑弹窗里的多语言文字段 */
.i18n-fields { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.i18n-field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--c-line-soft);
  border-radius: 9px;
  background: var(--c-surface-2);
}
.i18n-row-head {
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-size: 11.5px; font-weight: 700; color: var(--c-text-2);
  letter-spacing: .02em;
}
.i18n-row-head .btn[disabled] { opacity: .6; cursor: default; }
.i18n-field-row .field span { font-size: 11px; }
.i18n-field-row input {
  width: 100%;
  border: 1px solid var(--c-line); border-radius: 8px;
  padding: 8px 11px; outline: 0;
  font-size: 13px; font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.i18n-field-row input:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px var(--c-primary-l);
}
@media (max-width: 640px) {
  .i18n-field-row { grid-template-columns: 1fr; }
}

/* 产品维护：翻译完成度 */
.trans-dot {
  display: inline-block;
  margin-right: 4px;
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 10px; font-weight: 700; letter-spacing: .04em;
  background: #eef2f8; color: #a7b2c1;
}
.trans-dot.ok { background: var(--c-accent-l); color: var(--c-accent); }
.trans-summary { margin-top: 12px; font-size: 12.5px; }

.mini-editor:empty { display: none; }


/* ---------------- 分页控件（访问记录等列表用） ----------------
   只做视觉：上一页 / 页码 / 下一页 / 跳转。逻辑在 visits.js 里。 */
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 14px 0 4px;
}
.pager button {
  min-width: 34px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--c-line, #e2e8f0);
  background: #fff;
  color: var(--c-text, #0f172a);
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: all .15s;
}
.pager button:hover:not(:disabled) { border-color: var(--c-accent, #2f5df5); color: var(--c-accent, #2f5df5); }
.pager button.active {
  background: var(--c-accent, #2f5df5);
  border-color: var(--c-accent, #2f5df5);
  color: #fff;
  font-weight: 600;
}
.pager button:disabled { opacity: .4; cursor: not-allowed; }
.pager .pager-info { font-size: 12.5px; color: var(--c-muted, #64748b); margin: 0 6px; }
.pager .pager-gap { color: var(--c-muted, #64748b); padding: 0 2px; }
/* 询价记录里的邮箱：可点击直接发邮件 */
.mail-link {
  color: var(--c-accent, #2f5df5);
  text-decoration: none;
  border-bottom: 1px dashed currentColor;
}
.mail-link:hover { color: var(--c-accent-d, #1d4ed8); }
/* 询价记录里不能发邮件的邮箱（状态不是「已报价」）：保持纯文本、不引导点击 */
.mail-off { color: var(--c-muted, #64748b); }