* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #6e7cef;
  --primary-dark: #4f5dd7;
  --warn: #f59e0b;
  --success: #10b981;
  --danger: #ef4444;
  --bg: #eef3f9;
  --card: rgba(255, 255, 255, 0.66);
  --border: rgba(15, 40, 70, 0.08);
  --glass-edge: rgba(255, 255, 255, 0.85);
  --text: #1f2937;
  --text-light: #64748b;
  --radius: 14px;
  --shadow: 0 8px 28px rgba(60, 80, 145, 0.08);
  --btn-primary: #6e7cef;
  --focus-ring: rgba(110, 124, 239, 0.18);
  --glass-blur: blur(22px) saturate(1.55);
}

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background:
    radial-gradient(1100px 620px at 88% -12%, rgba(195, 203, 251, 0.20), transparent 62%),
    radial-gradient(900px 540px at -12% 18%, rgba(96, 165, 250, 0.18), transparent 60%),
    radial-gradient(760px 520px at 55% 112%, rgba(160, 172, 247, 0.12), transparent 62%),
    linear-gradient(160deg, #f0f5fb 0%, #ecf0fb 52%, #eff4fa 100%);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.55;
  padding-bottom: 60px;
}

.hidden { display: none !important; }

/* ---------- 登录页 ---------- */
#login-page {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background:
    radial-gradient(900px 560px at 12% -8%, rgba(195, 203, 251, 0.35), transparent 60%),
    radial-gradient(820px 520px at 105% 12%, rgba(96, 165, 250, 0.32), transparent 60%),
    radial-gradient(700px 520px at 50% 115%, rgba(160, 172, 247, 0.25), transparent 60%),
    linear-gradient(160deg, #eaf2fb 0%, #eaeffc 50%, #edf0fc 100%);
  z-index: 1000;
}
.login-card {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(28px) saturate(1.6);
  -webkit-backdrop-filter: blur(28px) saturate(1.6);
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(60, 80, 145, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  width: 100%;
  max-width: 400px;
  padding: 36px 32px 26px;
  animation: fadeIn .4s ease;
}
.login-logo {
  font-size: 24px;
  font-weight: 800;
  text-align: center;
  color: var(--primary-dark);
  letter-spacing: 1px;
}
.login-logo span { color: var(--warn); }
.login-sub {
  text-align: center;
  font-size: 13px;
  color: var(--text-light);
  margin: 6px 0 26px;
  letter-spacing: 1px;
}
.login-btn { width: 100%; margin-top: 8px; padding: 12px; font-size: 16px; }
.login-err { color: var(--danger); font-size: 13px; text-align: center; margin-top: 10px; min-height: 18px; }
.login-hint { text-align: center; font-size: 12px; color: var(--text-light); margin-top: 14px; }

/* ---------- 侧边导航布局 ---------- */
.app-shell { display: flex; min-height: 100vh; align-items: stretch; }
.sidebar {
  width: 232px;
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.80), rgba(255, 255, 255, 0.60));
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  color: #55657a;
  border-right: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 12px 0 44px rgba(60, 80, 145, 0.06);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar::-webkit-scrollbar { width: 0; }
.brand { display: flex; align-items: center; gap: 10px; padding: 20px 18px 18px; border-bottom: 1px solid rgba(15, 40, 70, 0.07); }
.brand-logo {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, #a0acf7, #2563eb);
  box-shadow: 0 6px 16px rgba(110, 124, 239, 0.30);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 15px;
}
.brand-name { font-size: 15px; font-weight: 700; color: #1e2b3d; letter-spacing: .5px; line-height: 1.2; }
.brand-sub { font-size: 11px; color: #93a3b5; margin-top: 2px; }

/* 顶部工作条 */
.topbar {
  height: 58px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid rgba(255, 255, 255, 0.80);
  box-shadow: 0 4px 22px rgba(60, 80, 145, 0.05);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.main-area { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar-title { font-size: 16px; font-weight: 800; color: var(--text); }
.topbar-title::before { content: ""; display: inline-block; width: 4px; height: 15px; border-radius: 2px; background: linear-gradient(180deg, #a0acf7, #6e7cef); margin-right: 9px; vertical-align: -2px; }
.topbar-sub { font-size: 12px; color: var(--text-light); }
.topbar-version {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  color: #4f5dd7;
  background: linear-gradient(135deg, rgba(160, 172, 247, 0.16), rgba(110, 124, 239, 0.22));
  border: 1px solid rgba(110, 124, 239, 0.28);
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.5px;
  user-select: none;
  flex-shrink: 0;
}
/* 手机端专用版本徽章（放在品牌行内，桌面端隐藏） */
.brand-version-m { display: none; }

/* 主导航（侧栏） */
.tabs { display: flex; flex-direction: column; gap: 3px; padding: 14px 12px 8px; flex: 1; }
/* 导航分组间隔（原分组文字标签已移除，仅保留细分割线） */
.tab.group-start {
  margin-top: 10px;
  position: relative;
}
.tab.group-start::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 12px;
  right: 12px;
  height: 1px;
  background: linear-gradient(90deg, rgba(110, 124, 239, 0.22), rgba(110, 124, 239, 0.02));
  pointer-events: none;
}
.tab {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #5d6d81;
  font-size: 13.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background .2s, color .2s, box-shadow .2s;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}
.tab svg { display: block; width: 17px; height: 17px; flex-shrink: 0; }
.tab span { display: inline; }
.tab:not(.active):hover { background: rgba(110, 124, 239, 0.08); color: var(--primary-dark); }
.tab:not(.active):active { background: rgba(110, 124, 239, 0.13); }
.tab.active {
  background: linear-gradient(135deg, rgba(110, 124, 239, 0.88), rgba(160, 172, 247, 0.76));
  backdrop-filter: blur(10px) saturate(1.4);
  -webkit-backdrop-filter: blur(10px) saturate(1.4);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.40),
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    0 3px 10px rgba(110, 124, 239, 0.22);
}
.tab.active::before { display: none; }
.side-user {
  margin: 12px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 16px rgba(60, 80, 145, 0.06);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.user-info { font-size: 13px; color: #475569; }
.user-info b { font-weight: 700; color: #1e2b3d; }
.role-tag { font-size: 11px; background: rgba(245, 158, 11, 0.12); color: #b45309; border: 1px solid rgba(245, 158, 11, 0.30); padding: 1px 7px; border-radius: 10px; margin-left: 5px; font-weight: 600; }
.btn.ghost-light { background: rgba(255, 255, 255, 0.85); border: 1px solid rgba(15, 40, 70, 0.12); color: #55657a; }
.btn.ghost-light:hover { background: #ffffff; }

/* ---------- 主内容 ---------- */
main { max-width: 1180px; margin: 20px auto 0; padding: 0 24px; width: 100%; }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px);} to { opacity: 1; transform: none;} }

/* ---------- 产品管理二级菜单（分段式玻璃控件，与「我的报价」二级导航同一语言） ---------- */
.sub-layout { display: flex; flex-direction: column; gap: 14px; align-items: stretch; }
.sub-nav {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  padding: 5px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 14px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 70px;
  z-index: 20;
  overflow-x: auto;
}
.sub-nav::-webkit-scrollbar { display: none; height: 0; }
.sub-nav-item {
  flex: 0 0 auto;
  display: block;
  padding: 9px 20px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #5d6d81;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  text-align: center;
  cursor: pointer;
  transition: background .2s, color .2s, box-shadow .2s;
  -webkit-tap-highlight-color: transparent;
}
.sub-nav-item:hover { background: rgba(110, 124, 239, 0.08); color: var(--primary-dark); }
.sub-nav-item.active {
  background: linear-gradient(135deg, rgba(110, 124, 239, 0.86), rgba(160, 172, 247, 0.74));
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.40),
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    0 3px 9px rgba(110, 124, 239, 0.20);
}
.sub-content { flex: 1; min-width: 0; }
.sub-panel { display: none; }
.sub-panel.active { display: block; animation: fadeIn .25s ease; }

.card {
  background: var(--card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.85);
  padding: 18px;
  margin-bottom: 16px;
}
.card h2 { font-size: 17px; margin-bottom: 14px; display: flex; align-items: center; gap: 6px; }
.card h2::before { content: ""; width: 4px; height: 18px; background: var(--primary); border-radius: 3px; }

/* ---------- 表单 ---------- */
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.field label { display: block; font-size: 13px; color: var(--text-light); margin-bottom: 5px; }
.field label em { color: var(--danger); font-style: normal; }
.field input[type=text],
.field input[type=number],
.field input[type=password] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(0, 0, 0, 0.10);
  border-radius: 9px;
  font-size: 15px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  background: #ffffff;
}
.field input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--focus-ring); background: #fff; }
.field input[type=file] { width: 100%; padding: 9px; border: 1px dashed rgba(0, 0, 0, 0.15); border-radius: 9px; font-size: 14px; background: #ffffff; }
.field-full { grid-column: 1 / -1; }
.field-2 { grid-column: span 2; }
.form-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.excel-import { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--border); }
.excel-import-tip { font-size: 13px; color: var(--text-light, #7a8499); margin-bottom: 10px; }
.excel-import-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.excel-drop-zone {
  margin-top: 12px;
  padding: 26px 16px;
  border: 2px dashed var(--border, #d7dce5);
  border-radius: 12px;
  text-align: center;
  color: var(--text-light, #7a8499);
  font-size: 14px;
  line-height: 1.7;
  transition: border-color .2s, background .2s, color .2s;
  -webkit-tap-highlight-color: transparent;
}
.excel-drop-zone.dragover {
  border-color: var(--primary, #2f6bff);
  background: rgba(47, 107, 255, 0.06);
  color: var(--primary, #2f6bff);
}
.excel-drop-hint { font-size: 12px; opacity: .8; }
.photo-preview { margin-top: 8px; }
.photo-preview img { width: 100px; height: 100px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); }

/* ---------- 按钮 ---------- */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .1s, box-shadow .2s, background .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--btn-primary); color: #fff; box-shadow: 0 3px 10px rgba(110, 124, 239, 0.28); }
.btn.primary:hover { background: #4f5dd7; box-shadow: 0 5px 14px rgba(110, 124, 239, 0.34); }
.btn.warn { background: var(--warn); color: #fff; box-shadow: 0 3px 10px rgba(245, 158, 11, 0.28); }
.btn.warn:hover { background: #d97706; }
.btn.ghost { background: #ffffff; border: 1px solid var(--border); color: #374151; }
.btn.ghost:hover { background: #f1f5f9; }
.btn.small { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn.danger { background: #fee2e2; color: #dc2626; }
.btn.danger:hover { background: #fecaca; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- 搜索 ---------- */
.list-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
/* 产品库标题行：标题居左，批量删除 + 总数徽章固定居右，不换行；h2 去掉下边距保证与徽章同一中轴线 */
.lib-header-row { flex-wrap: nowrap; }
.lib-header-row h2 { margin-bottom: 0; }
.lh-right { display: flex; align-items: center; gap: 10px; margin-left: auto; flex: 0 0 auto; }
.lib-total-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff);
  color: #4f46e5;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.6;
  white-space: nowrap;
  border: 1px solid rgba(79, 70, 229, 0.14);
}
.search-input {
  flex: 1;
  min-width: 220px;
  max-width: 380px;
  padding: 9px 14px;
  border: 1px solid rgba(0, 0, 0, 0.10);
  border-radius: 9px;
  font-size: 14px;
  outline: none;
  background: #ffffff;
}
.search-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--focus-ring); }
.product-count { font-size: 13px; color: var(--text-light); margin-bottom: 10px; }
.empty-tip { text-align: center; color: var(--text-light); padding: 36px 0; font-size: 14px; }

/* ---------- 产品卡片 ---------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.product-grid.mini { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.p-card {
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: box-shadow .2s, transform .2s;
}
.p-card:hover { box-shadow: 0 12px 30px rgba(60, 80, 145, 0.16); transform: translateY(-2px); }
.p-card.has-check { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(110, 124, 239, 0.20); }
.p-check { position: absolute; top: 10px; left: 10px; width: 18px; height: 18px; cursor: pointer; accent-color: var(--primary); z-index: 2; }
/* 全选做成与重置按钮一致的填充样式（同高、同圆角、带背景与边框） */
.select-all {
  display: inline-flex; align-items: center; gap: 5px;
  height: 38px; box-sizing: border-box; padding: 0 12px;
  font-size: 13px; color: #374151; cursor: pointer; white-space: nowrap;
  background: rgba(255, 255, 255, 0.9); border: 1px solid var(--border); border-radius: 8px;
}
.select-all:hover { background: #ffffff; }
.select-all input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.p-photo { width: 100%; height: 140px; object-fit: cover; background: #f8fafc; display: flex; align-items: center; justify-content: center; color: var(--text-light); font-size: 13px; }
.p-body { padding: 12px 14px; flex: 1; }
.p-name { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.p-meta { font-size: 12.5px; color: var(--text-light); margin-bottom: 3px; display: flex; flex-wrap: wrap; gap: 4px; }
.p-tag { background: #eef3ff; color: var(--primary-dark); border-radius: 5px; padding: 1px 7px; font-size: 12px; }
.p-tag-brand { background: #e5f6ef; color: #0c8a5f; font-weight: 600; }
.p-price-row { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; flex-wrap: wrap; gap: 4px; }
.p-price { color: var(--danger); font-weight: 700; font-size: 15px; }
.p-price small { color: var(--text-light); font-weight: 400; font-size: 12px; margin-right: 6px; }
.p-actions { display: flex; gap: 8px; padding: 10px 14px; border-top: 1px solid rgba(0, 0, 0, 0.06); }
.p-actions .btn { flex: 1; }
.added-flag { color: var(--success); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 3px; }

/* ---------- 报价单 ---------- */
.quote-items { display: flex; flex-direction: column; gap: 10px; }
.q-item {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.62);
  flex-wrap: wrap;
}
.q-item img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; background: rgba(255, 255, 255, 0.7); }
.q-info { flex: 1; min-width: 160px; }
.q-info .q-name { font-weight: 700; font-size: 14.5px; }
.q-info .q-meta { font-size: 12px; color: var(--text-light); margin-top: 2px; }
.q-price { font-weight: 700; color: var(--danger); font-size: 14px; white-space: nowrap; }
.q-qty { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.q-qty input {
  width: 58px;
  padding: 5px 6px;
  border: 1px solid var(--border);
  border-radius: 7px;
  text-align: center;
  font-size: 14px;
}
.q-sum-item { display: flex; justify-content: space-between; padding: 4px 0; font-size: 14px; }
.q-sum-item.total { font-weight: 700; font-size: 16px; color: var(--danger); border-top: 1px dashed var(--border); margin-top: 6px; padding-top: 8px; }
.quote-summary { margin: 12px 0; background: rgba(255, 255, 255, 0.60); border: 1px solid rgba(255, 255, 255, 0.8); border-radius: 12px; padding: 10px 14px; max-width: 380px; }
.quote-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

/* ---------- 筛选下拉 ---------- */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; align-items: center; }
/* 筛选区所有控件统一高度（搜索框 / 下拉 / 日期 / 按钮） */
.filter-bar .search-input,
.filter-bar .filter-select,
.filter-bar .filter-date,
.filter-bar .btn {
  height: 38px;
  box-sizing: border-box;
  padding-top: 0;
  padding-bottom: 0;
}
.filter-bar .search-input { line-height: 36px; }
.filter-bar .btn { display: inline-flex; align-items: center; line-height: 1; }
/* 宽屏时产品库筛选排成一行：搜索框 / 下拉 / 重置 / 全选（控件可压缩，窄窗口时文字截断） */
@media (min-width: 1000px) {
  #filter-bar-products { flex-wrap: nowrap; gap: 8px; }
  #filter-bar-products .search-input { flex: 1 1 90px; min-width: 90px; max-width: 240px; padding: 9px 10px; }
  #filter-bar-products .filter-select { flex: 1 1 118px; min-width: 0; max-width: 150px; padding-left: 8px; padding-right: 20px; font-size: 13px; }
  #filter-bar-products #filter-name { flex: 1 1 100px; max-width: 142px; }
  #filter-bar-products .btn.small { flex: 0 0 auto; }
  #filter-bar-products .select-all { flex: 0 0 auto; margin-left: 2px; white-space: nowrap; }
}
.doc-tpl-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; margin-bottom: 12px; background: rgba(255, 255, 255, 0.60); border: 1px solid rgba(255, 255, 255, 0.8); border-radius: 12px; }
.doc-tpl-label { font-size: 13px; font-weight: 700; color: var(--primary-dark); }
.doc-tpl-item { display: inline-flex; align-items: center; gap: 8px; }
.doc-tpl-state { font-size: 12px; color: var(--text-light); margin-right: 4px; }
.doc-tpl-state a { color: var(--danger); cursor: pointer; margin-left: 6px; text-decoration: underline; }
.doc-tpl-state em.tpl-tag { font-style: normal; font-size: 11px; font-weight: 700; color: var(--primary-dark); background: rgba(64,122,255,0.12); border: 1px solid rgba(64,122,255,0.25); border-radius: 4px; padding: 0 5px; margin-right: 6px; }
.doc-tpl-hint { flex-basis: 100%; font-size: 12px; color: var(--text-light); line-height: 1.5; }
.filter-bar .search-input { flex: 1 1 220px; max-width: 340px; }
.filter-select {
  padding: 8px 10px;
  border: 1px solid rgba(0, 0, 0, 0.10);
  border-radius: 9px;
  font-size: 14px;
  background: #ffffff;
  color: var(--text);
  min-width: 150px;
  max-width: 240px;
  outline: none;
  cursor: pointer;
  -webkit-appearance: auto;
  appearance: auto;
}
.filter-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--focus-ring); }

/* ---------- 比价 ---------- */
.compare-form { margin-bottom: 6px; }
.cmp-status { margin-top: 14px; padding: 10px 14px; border-radius: 10px; font-size: 13px; display: none; }
.cmp-status.loading { display: block; background: #eef2ff; color: var(--primary-dark); }
.cmp-status.error { display: block; background: #fee2e2; color: #dc2626; }
.cmp-status.ok { display: block; background: #eaf1fc; color: #047857; }
.cmp-platform { margin-top: 16px; }
.cmp-platform h3 { font-size: 15px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.cmp-platform h3 .badge { font-size: 12px; background: #eef1f6; color: var(--text-light); border-radius: 10px; padding: 1px 9px; font-weight: 600; }
.cmp-list { display: flex; flex-direction: column; gap: 8px; }
.cmp-item {
  display: flex;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 10px;
  padding: 10px 12px;
  text-decoration: none;
  color: var(--text);
  background: rgba(255, 255, 255, 0.62);
  transition: box-shadow .15s, border-color .15s;
}
.cmp-item:hover { border-color: var(--primary); box-shadow: 0 3px 12px rgba(60, 80, 145, 0.12); }
.cmp-item .ci-title { flex: 1; font-size: 14px; font-weight: 600; }
.cmp-item .ci-title small { display: block; font-weight: 400; color: var(--text-light); font-size: 12px; margin-top: 2px; }
.cmp-item .ci-price { font-weight: 800; color: var(--danger); font-size: 15px; white-space: nowrap; }
.cmp-item .ci-price small { font-size: 11px; color: var(--text-light); font-weight: 400; }
.cmp-item .ci-go { font-size: 12px; color: var(--primary); white-space: nowrap; }
.cmp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; margin-top: 16px; }
.cmp-card {
  display: block;
  text-decoration: none;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  color: var(--text);
  background: rgba(255, 255, 255, 0.66);
  transition: transform .15s, box-shadow .2s, border-color .2s;
}
.cmp-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(60, 80, 145, 0.14); border-color: var(--primary); }
.cmp-card .cmp-name { font-weight: 700; font-size: 15px; color: var(--primary-dark); }
.cmp-card .cmp-desc { font-size: 12px; color: var(--text-light); margin-top: 4px; }
.cmp-keyword { margin-top: 14px; font-size: 13px; color: var(--text-light); word-break: break-all; background: #f8fafc; border-radius: 8px; padding: 8px 12px; }

/* ---------- 用户管理 ---------- */
.user-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.user-table th, .user-table td { border: 1px solid rgba(0, 0, 0, 0.06); padding: 9px 12px; text-align: left; }
.user-table td { border-top: none; }
.user-table th + th, .user-table th + td, .user-table td + th, .user-table td + td { border-left: none; }
.user-table thead th {
  background: linear-gradient(135deg, rgba(110, 124, 239, 0.16), rgba(160, 172, 247, 0.09)), rgba(255, 255, 255, 0.78);
  color: #4f5dd7;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.3px;
  border-bottom: 2px solid rgba(110, 124, 239, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 2px 8px rgba(110, 124, 239, 0.10);
}
.user-table thead th:first-child { border-top-left-radius: 12px; }
.user-table thead th:last-child { border-top-right-radius: 12px; }
.user-table tbody tr:last-child td:first-child { border-bottom-left-radius: 12px; }
.user-table tbody tr:last-child td:last-child { border-bottom-right-radius: 12px; }
.user-table tbody tr:nth-child(even) { background: #f6f8fb; }
.user-table tbody tr:hover { background: rgba(110, 124, 239, 0.06); }
.user-table .role-admin { color: var(--primary-dark); font-weight: 700; }
.user-table .role-staff { color: var(--warn); font-weight: 600; }
.user-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- 弹窗 ---------- */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(30, 41, 59, 0.40);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal.show { display: flex; }
.modal-box {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: 18px;
  width: 100%;
  max-width: 460px;
  padding: 22px;
  box-shadow: 0 24px 70px rgba(40, 55, 110, 0.25);
  max-height: 86vh;
  overflow-y: auto;
  animation: popIn .22s ease;
}
@keyframes popIn { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-box h3 { font-size: 18px; margin-bottom: 14px; }
.modal-box .field { margin-bottom: 12px; }
.modal-actions { display: flex; gap: 10px; margin-top: 18px; justify-content: flex-end; }
.modal-box .rate-tip { font-size: 12px; color: var(--text-light); margin-top: 2px; }

/* ---------- 我的报价：二级导航（与产品管理二级导航同一分段式玻璃控件语言） ---------- */
.quote-nav {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  padding: 5px;
  margin: 0 0 14px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow-x: auto;
  position: relative;
  z-index: 2;
}
.quote-nav::-webkit-scrollbar { display: none; height: 0; }
.quote-nav-item {
  position: relative;
  flex: 0 0 auto;
  padding: 9px 20px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #5d6d81;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background .2s, color .2s, box-shadow .2s;
  -webkit-tap-highlight-color: transparent;
  text-align: center;
}
.quote-nav-item:hover { background: rgba(110, 124, 239, 0.08); color: var(--primary-dark); }
.quote-nav-item.active {
  background: linear-gradient(135deg, rgba(110, 124, 239, 0.86), rgba(160, 172, 247, 0.74));
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.40),
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    0 3px 9px rgba(110, 124, 239, 0.20);
}
.quote-sub-panel { display: none; }
.quote-sub-panel.active { display: block; animation: fadeIn .25s ease; }
.manage-ops { display: flex; gap: 6px; flex-wrap: wrap; }
.manage-ops .btn { white-space: nowrap; }

/* ---------- 合同 / 验收单预览弹窗 ---------- */
.modal-box.doc-modal-box { max-width: 780px; }
.doc-modal-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.doc-modal-bar h3 { margin-bottom: 0; }
.doc-modal-actions { margin-top: 0; }
.doc-preview-wrap {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 28px 30px;
  max-height: 60vh;
  overflow-y: auto;
}
.doc-preview { font-size: 14px; color: #1f2937; line-height: 1.7; }
.doc-preview .doc-firm { text-align: center; font-size: 13px; color: #4b5563; letter-spacing: 2px; margin-bottom: 4px; }
.doc-preview .doc-title { text-align: center; font-size: 24px; font-weight: 700; letter-spacing: 8px; margin: 10px 0 6px; color: #111827; }
.doc-preview .doc-sub { text-align: center; font-size: 12px; color: var(--text-light); margin-bottom: 16px; }
.doc-preview .doc-info { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 24px; font-size: 13px; margin-bottom: 14px; }
.doc-preview .doc-info div { display: flex; }
.doc-preview .doc-info b { font-weight: 600; margin-right: 6px; white-space: nowrap; }
.doc-preview table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 12px; }
.doc-preview table th, .doc-preview table td { border: 1px solid #d1d5db; padding: 7px 10px; text-align: left; }
.doc-preview table thead th { background: #f3f4f6; font-weight: 600; }
.doc-preview .doc-total { text-align: right; font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.doc-preview .doc-total .money { color: #dc2626; }
.doc-preview .doc-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; margin-top: 26px; font-size: 13px; }
.doc-preview .doc-sign div { display: flex; flex-direction: column; gap: 4px; }
.doc-preview .doc-sign .line { border-bottom: 1px solid #9ca3af; height: 28px; }
.doc-preview .doc-note { font-size: 12px; color: var(--text-light); margin-top: 14px; }

.tip { font-size: 13px; color: var(--text-light); margin-top: 8px; }
.card .tip { margin-bottom: 8px; }

/* ---------- 响应式（手机） ---------- */
@media (max-width: 768px) {
  .form-grid { grid-template-columns: 1fr; }
  .field-2 { grid-column: auto; }
  .list-header { flex-direction: column; align-items: stretch; }
  .list-header.lib-header-row { flex-direction: row; align-items: center; margin-bottom: 8px; }
  .list-header.lib-header-row h2 { font-size: 16px; margin-bottom: 0; }
  #filter-bar-products { margin-bottom: 8px; gap: 6px; }
  #filter-bar-products .search-input { flex: 1 1 100%; }
  /* 手机端筛选两排：第一排 产品名称+品牌厂家（名称略长）；第二排 产品分类+重置+全选 */
  #filter-bar-products #filter-name { flex: 1 1 calc(56% - 6px); min-width: 0; max-width: none; padding-left: 8px; padding-right: 22px; font-size: 12.5px; }
  #filter-bar-products #filter-brand { flex: 1 1 calc(44% - 6px); min-width: 0; max-width: none; padding-left: 8px; padding-right: 22px; font-size: 12.5px; }
  #filter-bar-products #filter-category { flex: 1 1 0; min-width: 0; max-width: none; padding-left: 8px; padding-right: 22px; font-size: 12.5px; }
  #filter-bar-products #btn-reset-filter-products { flex: 0 0 auto; }
  #filter-bar-products #select-all-wrap { flex: 0 0 auto; margin-left: 0; min-height: 44px; }
  .search-input { max-width: none; }
  .filter-bar { gap: 8px; }
  .doc-tpl-bar { flex-direction: column; align-items: stretch; gap: 8px; }
  .doc-tpl-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 44px; }
  .doc-tpl-item .btn { flex: 0 0 auto; min-height: 40px; }
  .doc-tpl-state { flex: 1 1 auto; min-width: 0; margin-right: 0; line-height: 1.45; text-align: justify; text-align-last: left; }
  .doc-tpl-hint { flex-basis: auto; width: 100%; text-align: justify; text-align-last: left; }
  .filter-select { flex: 1 1 calc(50% - 4px); min-width: 0; max-width: none; }
  .product-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .p-photo { height: 110px; }
  .p-body { padding: 10px; }
  .p-name { font-size: 14px; }
  .p-actions { padding: 8px 10px; }
  .p-actions .btn { font-size: 12.5px; padding: 7px 6px; }
  .q-item { gap: 8px; }
  .quote-actions .btn { flex: 1 1 100%; }
  .modal-box { padding: 18px; }
  .card { padding: 14px; }
  .login-card { padding: 28px 22px 20px; }
  .user-table { font-size: 13px; }
  .user-table th, .user-table td { padding: 7px 8px; }
  .cmp-item { flex-wrap: wrap; }
  .sub-layout { flex-direction: column; gap: 10px; }
  .sub-nav { flex-direction: row; flex: none; width: 100%; overflow-x: auto; position: static; }
  .sub-nav-item { flex: 1; min-width: max-content; text-align: center; padding: 9px 12px; }
}
@media (max-width: 420px) {
  .product-grid { grid-template-columns: 1fr; }
}

/* ---------- 利润对比 & 数据看板 ---------- */
.filter-date {
  padding: 8px 10px;
  border: 1px solid rgba(0, 0, 0, 0.10);
  border-radius: 9px;
  font-size: 14px;
  background: #ffffff;
  color: var(--text);
  outline: none;
  cursor: pointer;
  min-width: 138px;
  max-width: 160px;
}
.filter-date:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--focus-ring); }
.category-edit-input {
  width: 100%;
  max-width: 280px;
  padding: 7px 10px;
  border: 1px solid rgba(0, 0, 0, 0.10);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
  background: #ffffff;
  outline: none;
}
.category-edit-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--focus-ring); }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 10px; }
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; min-width: 720px; }
.data-table th, .data-table td { border: 1px solid rgba(0, 0, 0, 0.06); padding: 9px 12px; text-align: left; white-space: nowrap; }
.data-table td { border-top: none; }
.data-table th + th, .data-table th + td, .data-table td + th, .data-table td + td { border-left: none; }
.data-table thead th {
  background: linear-gradient(135deg, rgba(110, 124, 239, 0.16), rgba(160, 172, 247, 0.09)), rgba(255, 255, 255, 0.78);
  color: #4f5dd7;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.3px;
  border-bottom: 2px solid rgba(110, 124, 239, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 2px 8px rgba(110, 124, 239, 0.10);
}
.data-table thead th:first-child { border-top-left-radius: 12px; }
.data-table thead th:last-child { border-top-right-radius: 12px; }
.data-table tbody tr:last-child td:first-child { border-bottom-left-radius: 12px; }
.data-table tbody tr:last-child td:last-child { border-bottom-right-radius: 12px; }
/* 利润对比页：固定布局，窄屏由外层 .table-wrap 横向滚动；平衡列宽：报价单号不占过大、利润率列加宽保证完整显示 */
.data-table.profit-table { table-layout: fixed; width: 100%; min-width: 920px; }
.data-table.profit-table th, .data-table.profit-table td { overflow: hidden; text-overflow: ellipsis; }
.data-table.profit-table thead th:nth-child(1) { width: 16.5%; }
.data-table.profit-table thead th:nth-child(2) { width: 10.5%; }
.data-table.profit-table thead th:nth-child(3) { width: 16%; }
.data-table.profit-table thead th:nth-child(4) { width: 12%; }
.data-table.profit-table thead th:nth-child(5) { width: 12%; }
.data-table.profit-table thead th:nth-child(6) { width: 12%; }
.data-table.profit-table thead th:nth-child(7) { width: 10.5%; }
.data-table.profit-table thead th:nth-child(8) { width: 10.5%; }
.data-table.profit-table td:nth-child(1) { font-size: 12.5px; }
.profit-pos { color: var(--success); font-weight: 700; }
.profit-neg { color: var(--danger); font-weight: 700; }
.no-cost-tip { font-size: 11px; color: var(--warn); font-weight: 400; margin-top: 2px; }
.deal-badge { display: inline-block; background: #eaf7ef; color: #1e7e46; border-radius: 8px; padding: 2px 10px; font-size: 12px; font-weight: 600; }
.undone-badge { display: inline-block; background: #eef1f6; color: var(--text-light); border-radius: 8px; padding: 2px 10px; font-size: 12px; font-weight: 600; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat-card {
  background: rgba(255, 255, 255, 0.66);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: var(--shadow);
}
.stat-card .stat-label { font-size: 12.5px; color: var(--text-light); }
.stat-card .stat-value { font-size: 22px; font-weight: 800; color: var(--primary-dark); margin-top: 4px; }
.stat-card .stat-sub { font-size: 12px; color: var(--text-light); margin-top: 2px; }

.dash-block { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--border); }
.dash-block h3 { font-size: 15px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.dash-block h3::before { content: ""; width: 4px; height: 15px; background: var(--primary); border-radius: 3px; }

.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.bar-label { flex: 0 0 140px; font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { flex: 1; height: 18px; background: rgba(0, 0, 0, 0.05); border-radius: 9px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, #6e7cef, #a0acf7); border-radius: 9px; min-width: 2px; transition: width .3s; }
.bar-val { flex: 0 0 150px; font-size: 13px; font-weight: 700; text-align: right; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.rank-list { display: flex; flex-direction: column; gap: 8px; }
.rank-item { display: flex; align-items: center; gap: 10px; background: rgba(255, 255, 255, 0.62); border: 1px solid rgba(255, 255, 255, 0.8); border-radius: 10px; padding: 8px 12px; }
.rank-index { width: 22px; height: 22px; border-radius: 50%; background: rgba(110, 124, 239, 0.12); color: var(--primary-dark); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; }
.rank-index.top { background: var(--primary); color: #fff; }
.rank-name { flex: 1; font-size: 14px; font-weight: 600; }
.rank-info { font-size: 12.5px; color: var(--text-light); text-align: right; }

.decline-item { display: flex; align-items: center; gap: 10px; background: #fff7f5; border: 1px solid #fadcdc; border-radius: 10px; padding: 8px 12px; margin-bottom: 8px; }
.decline-name { flex: 1; font-size: 14px; font-weight: 600; }
.decline-info { font-size: 12.5px; color: var(--danger); text-align: right; }

.empty-hint { font-size: 13px; color: var(--text-light); padding: 12px 0; }

@media (max-width: 768px) {
  .filter-date { flex: 1 1 40%; min-width: 0; max-width: none; }
  .bar-label { flex-basis: 92px; font-size: 12.5px; }
  .bar-val { flex-basis: 96px; font-size: 12.5px; }
  .stat-card .stat-value { font-size: 19px; }
}

/* ============================================================
 * 数据看板 · 深蓝科技风仪表盘（仅作用于 #tab-dashboard）
 * ============================================================ */
#tab-dashboard .db-shell {
  position: relative;
  border-radius: 20px;
  padding: 20px 20px 22px;
  color: #1f2937;
  background:
    radial-gradient(900px 420px at 12% -10%, rgba(110, 124, 239, 0.16), transparent 60%),
    radial-gradient(800px 380px at 108% 6%, rgba(195, 203, 251, 0.14), transparent 60%),
    linear-gradient(160deg, rgba(240, 244, 255, 0.86) 0%, rgba(219, 228, 252, 0.88) 52%, rgba(203, 213, 246, 0.88) 100%);
  border: 1px solid var(--border);
  box-shadow: 0 16px 46px rgba(60, 80, 145, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow: hidden;
}
#tab-dashboard .db-shell::before {
  content: "";
  position: absolute;
  left: 0; top: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, #6e7cef, #c3cbfb, transparent);
  opacity: 0.9;
}
#tab-dashboard .db-header { position: relative; z-index: 1; }
#tab-dashboard .db-header h2 {
  font-size: 20px; font-weight: 800; letter-spacing: 1px;
  background: linear-gradient(90deg, #4f5dd7, #4f5dd7);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  display: inline-block;
}
#tab-dashboard .db-header h2::after {
  content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  margin-left: 10px; vertical-align: middle;
  background: #6e7cef; box-shadow: 0 0 10px rgba(110, 124, 239, 0.8); animation: dbPulse 1.8s ease-in-out infinite;
}
@keyframes dbPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
#tab-dashboard .db-tip { color: rgba(75, 85, 99, 0.78); font-size: 12.5px; margin: 6px 0 14px; }
#tab-dashboard .db-filter-bar { position: relative; z-index: 1; margin-bottom: 16px; }
#tab-dashboard .filter-select {
  background: #ffffff; color: #1f2937; border: 1px solid rgba(110, 124, 239, 0.35);
  border-radius: 8px; padding: 6px 10px; font-size: 13px; outline: none;
}
#tab-dashboard .filter-select option { color: #1f2733; }

/* 大屏布局：KPI 概览 / 地图主视觉 + 右列 / 底部图表行 */
#tab-dashboard .db-grid {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; gap: 14px;
}
#tab-dashboard .db-kpi-strip {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px;
}
#tab-dashboard .db-main {
  display: grid; grid-template-columns: 6fr 3fr; gap: 14px; align-items: stretch;
}
#tab-dashboard .db-map-col { min-width: 0; display: flex; }
#tab-dashboard .db-map-module { flex: 1; display: flex; flex-direction: column; }
#tab-dashboard .db-map-module .db-module-body { flex: 1; display: flex; flex-direction: column; }
#tab-dashboard .db-map-wrap { flex: 1; display: flex; flex-direction: column; min-height: 0; }
#tab-dashboard #db-map-chart { width: 100%; height: 420px; min-height: 300px; flex: 1 1 auto; max-height: 560px; }
#tab-dashboard .db-map-detail {
  margin-top: 10px; padding: 10px 12px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.60);
  border: 1px solid rgba(110, 124, 239, 0.16);
}
#tab-dashboard .db-map-detail-title { font-size: 12.5px; font-weight: 700; color: #4f5dd7; margin-bottom: 6px; }
#tab-dashboard .db-map-detail-kpis { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 11px; color: rgba(75, 85, 99, 0.85); }
#tab-dashboard .db-map-detail-kpis b { color: #1f2937; font-weight: 700; }
#tab-dashboard .db-map-detail-custs { font-size: 11px; color: rgba(75, 85, 99, 0.75); margin-top: 6px; line-height: 1.65; }
#tab-dashboard .db-side-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
#tab-dashboard .db-bottom {
  /* v13.4：固定三列两行（趋势/客户/状态 一排，分类金额+近期记录(span2) 一排）。
     原规则 1.6fr 1.2fr 1.1fr 1.1fr 1fr 1fr 会在窗口>1400px 时五卡挤成一排被拉长，弃用 */
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
#tab-dashboard .db-module.db-span2 { grid-column: span 2; }
#tab-dashboard .db-module {
  position: relative;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  padding: 13px 14px 14px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 6px 18px rgba(60, 80, 145, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.65);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  min-width: 0;
}
#tab-dashboard .db-module:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(110, 124, 239, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.70);
}
#tab-dashboard .db-module-title {
  display: flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 700; color: #374151; letter-spacing: 0.4px; margin-bottom: 10px;
}
#tab-dashboard .db-title-bar {
  width: 3px; height: 13px; border-radius: 2px;
  background: linear-gradient(180deg, #6e7cef, #c3cbfb);
  box-shadow: 0 0 8px rgba(110, 124, 239, 0.6);
}

/* KPI 指标卡（大数字 + 环形图） */
#tab-dashboard .db-kpi { display: flex; align-items: center; gap: 12px; }
#tab-dashboard .db-kpi .db-ring { flex: 0 0 auto; filter: drop-shadow(0 0 6px rgba(110, 124, 239, 0.35)); }
#tab-dashboard .db-kpi-info { min-width: 0; }
#tab-dashboard .db-kpi-label { font-size: 11px; color: rgba(75, 85, 99, 0.78); }
#tab-dashboard .db-kpi-value { font-size: 19px; font-weight: 800; line-height: 1.25; color: #1f2937; letter-spacing: 0.5px; white-space: nowrap; }
#tab-dashboard .db-kpi-sub { font-size: 10.5px; color: rgba(107, 114, 128, 0.75); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 图表文本 */
#tab-dashboard .db-axis { fill: rgba(75, 85, 99, 0.72); font-size: 9px; }
#tab-dashboard .db-axis-y { fill: rgba(75, 85, 99, 0.78); font-size: 8.5px; }
#tab-dashboard .db-axis-val { fill: rgba(55, 65, 81, 0.92); font-size: 9px; font-weight: 600; }
#tab-dashboard .db-grid-line { stroke: rgba(75, 85, 99, 0.12); stroke-width: 1; stroke-dasharray: 3 3; }
#tab-dashboard .db-hval { fill: #374151; font-size: 10px; font-weight: 600; }
#tab-dashboard .db-chart { display: block; width: 100%; height: auto; }
#tab-dashboard .db-donut { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; max-width: 170px; margin: 0 auto; }

/* 图例 */
#tab-dashboard .db-legend { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-top: 8px; }
#tab-dashboard .db-legend-item { font-size: 10.5px; color: rgba(55, 65, 81, 0.85); display: inline-flex; align-items: center; gap: 4px; }
#tab-dashboard .db-legend-item i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }

/* 横向条形排行（地区/分类）：HTML 紧凑列表，自适应容器宽度 */
#tab-dashboard .db-hlist { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
#tab-dashboard .db-hlist-item { min-width: 0; }
#tab-dashboard .db-hlist-top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; min-width: 0; }
#tab-dashboard .db-hlist-name { flex: 1 1 auto; min-width: 0; font-size: 11.5px; font-weight: 600; color: #4f5dd7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#tab-dashboard .db-hlist-val { flex: 0 0 auto; font-size: 10.5px; font-weight: 700; color: #404fca; white-space: nowrap; }
#tab-dashboard .db-hlist-track { height: 6px; border-radius: 3px; background: rgba(110, 124, 239, 0.10); overflow: hidden; }
#tab-dashboard .db-hlist-fill { display: block; height: 100%; border-radius: 3px; box-shadow: 0 0 6px rgba(195, 203, 251, 0.35); }

/* 产品销量榜：HTML 紧凑列表 */
#tab-dashboard .db-prod-list { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
#tab-dashboard .db-prod-item { min-width: 0; }
#tab-dashboard .db-prod-top { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
#tab-dashboard .db-prod-name { flex: 1 1 auto; min-width: 0; font-size: 11px; color: #374151; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#tab-dashboard .db-prod-val { flex: 0 0 auto; font-size: 10.5px; font-weight: 700; color: #0e7490; }
#tab-dashboard .db-prod-track { height: 6px; border-radius: 3px; background: rgba(110, 124, 239, 0.10); overflow: hidden; }
#tab-dashboard .db-prod-fill { display: block; height: 100%; border-radius: 3px; }

/* 近期成交记录：列表卡片式（客户名省略号 + 金额大数字 + 利润徽标 + 金额占比条） */
#tab-dashboard .db-recent-list {
  display: flex; flex-direction: column; gap: 7px; min-width: 0;
  max-height: 356px; overflow-y: auto; overflow-x: hidden; padding-right: 2px;
}
#tab-dashboard .db-recent-item {
  position: relative; border-radius: 10px; padding: 7px 10px 8px;
  background: #ffffff;
  border: 1px solid rgba(110, 124, 239, 0.10);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
#tab-dashboard .db-recent-item:hover {
  background: #ffffff; border-color: rgba(110, 124, 239, 0.30); transform: translateX(2px);
}
#tab-dashboard .db-recent-top { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
#tab-dashboard .db-recent-cust {
  flex: 1 1 auto; min-width: 0; font-size: 12px; font-weight: 600; color: #1f2937;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#tab-dashboard .db-recent-date { flex: 0 0 auto; font-size: 10.5px; color: rgba(107, 114, 128, 0.75); white-space: nowrap; }
#tab-dashboard .db-recent-bottom { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 2px; min-width: 0; }
#tab-dashboard .db-recent-amt { font-size: 14px; font-weight: 800; color: #1f2937; letter-spacing: 0.3px; white-space: nowrap; }
#tab-dashboard .db-recent-profit { flex: 0 0 auto; font-size: 10.5px; font-weight: 700; padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
#tab-dashboard .db-recent-profit.pos { color: #047857; background: rgba(16, 185, 129, 0.13); }
#tab-dashboard .db-recent-profit.neg { color: #be123c; background: rgba(244, 63, 94, 0.13); }
#tab-dashboard .db-recent-track { height: 4px; border-radius: 2px; background: rgba(110, 124, 239, 0.08); overflow: hidden; margin-top: 6px; }
#tab-dashboard .db-recent-fill { display: block; height: 100%; border-radius: 2px; background: linear-gradient(90deg, rgba(110, 124, 239, 0.45), #6e7cef); }

/* 成交率环形模块（中心大数字） */
#tab-dashboard .db-rate { position: relative; width: 100%; max-width: 170px; margin: 0 auto; }
#tab-dashboard .db-rate .db-ring { display: block; margin: 0 auto; }
#tab-dashboard .db-rate-num {
  position: absolute; top: 0; left: 0; right: 0; height: 132px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #1f2937; font-size: 22px; font-weight: 800; letter-spacing: 0.5px; line-height: 1.1; pointer-events: none;
}
#tab-dashboard .db-rate-sub { font-size: 10.5px; color: rgba(107, 114, 128, 0.75); font-weight: 400; margin-top: 3px; letter-spacing: 0.3px; }
#tab-dashboard .db-rate-legend { display: flex; justify-content: center; gap: 14px; margin-top: 8px; font-size: 10.5px; color: rgba(55, 65, 81, 0.85); }
#tab-dashboard .db-rate-legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-right: 4px; }

/* 空态 */
#tab-dashboard .db-empty {
  position: relative; z-index: 1;
  text-align: center; color: rgba(75, 85, 99, 0.85);
  padding: 60px 0; font-size: 14px;
}
#tab-dashboard .db-empty-mini { color: rgba(107, 114, 128, 0.75); font-size: 12px; text-align: center; padding: 26px 0; }

/* 移动端 / 窄屏降级：KPI 5列 → 3列 → 1列；地图+右列 → 单列；底部 5列 → 3列 → 2列 → 1列 */
@media (max-width: 1400px) {
  /* KPI 条在 1201–1400px 保持 5 列单排（不再降 3 列），更窄时由下方断点降级 */
  #tab-dashboard .db-bottom { grid-template-columns: repeat(3, 1fr); }
  #tab-dashboard #db-map-chart { height: 340px; }
}
@media (max-width: 1200px) {
  #tab-dashboard .db-main { grid-template-columns: 1fr; }
  #tab-dashboard .db-bottom { grid-template-columns: repeat(2, 1fr); }
  #tab-dashboard .db-kpi-strip { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 620px) {
  #tab-dashboard .db-kpi-strip { grid-template-columns: 1fr; }
  section#tab-dashboard div.db-grid div.db-bottom { display: flex !important; flex-direction: column !important; }
  #tab-dashboard .db-kpi-value { font-size: 18px; }
  #tab-dashboard .db-shell { padding: 14px; }
  #tab-dashboard #db-map-chart { height: 300px; }
}

/* ============================================================
 * 移动端整体微调（手机版：好用、好看、好操作）
 * 仅作用于窄屏；桌面端样式保持不变
 * ============================================================ */
@media (max-width: 768px) {
  /* ---- 全局触控尺寸：按钮 / 输入 / 下拉 高度达标 ---- */
  .btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .btn.small { min-height: 40px; padding: 8px 14px; }
  .filter-bar .btn.small { min-height: 44px; }
  .filter-select, .filter-date, .search-input {
    min-height: 44px;
    padding: 10px 12px;
    font-size: 14px;  }
  .field input[type=text],
  .field input[type=number],
  .field input[type=password] {
    min-height: 44px;
    font-size: 16px; /* 防止 iOS 聚焦自动缩放 */
  }
  .field input[type=file] { min-height: 44px; padding: 10px; }
  .field label { font-size: 13px; margin-bottom: 6px; }

  /* ---- 顶部 header 紧凑毛玻璃，不占屏；一级导航移入底部悬浮胶囊栏 ---- */
  .app-shell { display: block; }
  .sidebar {
    width: auto;
    height: auto;
    min-height: 0;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    position: sticky;
    top: 0;
    z-index: 100;
    overflow: visible;
    background: rgba(255, 255, 255, 0.72);
    /* 必须显式关闭：backdrop-filter 会让子元素 fixed 定位以侧栏为包含块，底部悬浮导航会被锁进侧栏 */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 24px rgba(60, 80, 145, 0.08);
  }
  .brand { flex: 1; min-width: 0; padding: 0; border-bottom: none; }
  .brand-name { font-size: 14px; }
  .brand-sub { display: none; }
  /* 顶部合并为一排：logo + 系统名 …… 版本号 + 退出登录靠右；页面标题条在手机端隐藏（底部导航已标明当前页面） */
  .topbar { display: none; }
  .brand-version-m { display: inline-flex; align-items: center; margin-left: auto; }
  .side-user { margin: 0 0 0 6px; padding: 0; background: transparent; flex-shrink: 0; }
  /* 退出按钮紧凑化（覆盖通用 .btn 的 44px 触控高度） */
  .side-user #btn-logout { min-height: 30px; padding: 4px 11px; font-size: 12px; border-radius: 8px; }
  .side-user .user-info { display: none; }
  .tab.group-start::before { display: none; }
  /* 手机端底部导航为横向一排，去掉桌面端分组用的上边距，保证所有按钮同一水平线 */
  .tab.group-start { margin-top: 0; }

  /* 主导航：贴底悬浮玻璃胶囊栏（图标 + 文字，毛玻璃与全局同语言） */
  .tabs {
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: calc(9px + env(safe-area-inset-bottom, 0px));
    margin: 0;
    display: flex;
    flex-direction: row;
    flex: none;
    gap: 3px;
    padding: 6px 5px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.78);
    box-shadow: 0 10px 32px rgba(70, 90, 160, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(24px) saturate(1.6);
    -webkit-backdrop-filter: blur(24px) saturate(1.6);
    z-index: 200;
    overflow: hidden;
    flex-wrap: nowrap;
  }
  .tabs::-webkit-scrollbar { display: none; height: 0; }
  .tab {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 7px 1px 6px;
    border: none;
    border-radius: 17px;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    color: #7c86a2;
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    transition: background .2s, color .2s;
  }
  .tab svg { display: block; width: 21px; height: 21px; }
  .tab span { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .tab.active {
    background: linear-gradient(135deg, rgba(110, 124, 239, 0.17), rgba(160, 172, 247, 0.13));
    color: #4f5dd7;
    box-shadow: inset 0 0 0 1px rgba(110, 124, 239, 0.16);
  }
  .tab:not(.active):active { background: rgba(110, 124, 239, 0.08); }
  /* 用户信息在手机端隐藏，仅保留退出登录按钮，避免挤压 */

  /* 下拉框移动端统一自定义箭头，避免原生箭头被毛玻璃背景挤压 */
  .filter-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 10px 6px;
    padding-right: 26px;
  }

  /* ---- 主内容 / 卡片间距 ---- */
  main { margin-top: 12px; padding: 0 10px 108px; }
  .card { padding: 13px; margin-bottom: 12px; border-radius: 14px; }
  .card h2 { font-size: 16px; margin-bottom: 12px; }
  .tip { font-size: 12.5px; }

  /* ---- 表单 / 按钮行 ---- */
  .form-grid { gap: 10px; }
  .form-actions { gap: 8px; }
  .form-actions .btn { flex: 1 1 auto; min-width: 130px; }
  .field-full, .field-2 { grid-column: auto; }

  /* ---- 筛选区 ---- */
  .filter-bar { gap: 8px; }
  .filter-select { flex: 1 1 calc(50% - 4px); min-width: 0; max-width: none; }

  /* ---- 产品卡片 ---- */
  .product-grid { gap: 10px; }
  .p-body { padding: 11px 12px; }
  .p-actions { padding: 9px 10px; gap: 8px; }
  .p-actions .btn { min-height: 40px; font-size: 13px; }
  .p-meta { font-size: 12px; }

  /* ---- 报价单 ---- */
  .q-item { padding: 12px; gap: 10px; }
  .q-info { min-width: 130px; }
  .q-qty input { min-height: 40px; width: 64px; font-size: 15px; }
  .quote-actions .btn { min-height: 44px; }
  .quote-summary { max-width: none; }

  /* ---- 比价页 ---- */
  .cmp-item { padding: 12px; gap: 10px; }
  .cmp-item .ci-title { font-size: 13.5px; }
  .cmp-item .ci-price { font-size: 14px; }
  .compare-form .form-actions .btn { flex: 1 1 100%; }

  /* ---- 利润对比 ---- */
  .bar-label { flex-basis: 78px; font-size: 12px; }
  .bar-val { flex-basis: 80px; font-size: 12px; }
  .bar-row { gap: 8px; }
  .rank-item, .decline-item { padding: 10px 12px; }
  .rank-info, .decline-info { font-size: 12px; }

  /* ---- 表格：横向滚动容器 + 隐藏滚动条，行高加大 ---- */
  .table-wrap { -webkit-overflow-scrolling: touch; }
  .table-wrap::-webkit-scrollbar,
  .sub-nav::-webkit-scrollbar,
  .db-recent-list::-webkit-scrollbar { display: none; height: 0; }
  .data-table th, .data-table td { padding: 10px 10px; }
  #user-list { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .user-table { min-width: 520px; font-size: 13px; }
  .user-table th, .user-table td { padding: 10px 8px; }
  .user-actions .btn { min-height: 40px; padding: 8px 12px; font-size: 12.5px; }

  /* ---- 二级导航（分段式玻璃控件）：手机上通栏横滑 + 等分触控 ---- */
  .sub-nav { position: sticky; top: 62px; z-index: 20; width: 100%; gap: 3px; padding: 4px; }
  .sub-nav-item { flex: 1 1 0; min-width: max-content; min-height: 40px; padding: 9px 14px; font-size: 13px; }
  .quote-nav { margin: 0 0 12px; padding: 4px; gap: 3px; }
  .quote-nav-item { flex: 1 1 0; min-width: max-content; min-height: 40px; padding: 9px 14px; font-size: 12.5px; }

  /* ---- 弹窗：接近全屏、可滚动、按钮易点 ---- */
  .modal { padding: 10px; }
  .modal-box {
    max-width: none;
    width: 100%;
    max-height: 92vh;
    border-radius: 16px;
    padding: 18px 16px;
  }
  .modal-box h3 { font-size: 17px; margin-bottom: 12px; }
  .modal-actions { gap: 8px; margin-top: 16px; }
  .modal-actions .btn { flex: 1; min-height: 44px; }

  /* ---- 登录页 ---- */
  .login-card { padding: 26px 20px 18px; border-radius: 18px; }
  .login-logo { font-size: 21px; }
  .login-sub { font-size: 12px; margin: 5px 0 20px; }
  .login-btn { min-height: 48px; }

  /* ---- 数据看板 ---- */
  #tab-dashboard .db-shell { padding: 13px 11px; border-radius: 16px; }
  #tab-dashboard .db-header h2 { font-size: 17px; }
  #tab-dashboard .db-tip { font-size: 11.5px; margin: 5px 0 12px; line-height: 1.6; }
  #tab-dashboard .db-filter-bar { gap: 8px; margin-bottom: 12px; }
  #tab-dashboard .db-filter-bar .filter-select { flex: 1 1 30%; min-width: 0; max-width: none; min-height: 42px; font-size: 13px; padding: 9px 24px 9px 8px; background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; background-size: 10px 6px; }
  #tab-dashboard .db-module { padding: 11px 12px; border-radius: 13px; }
  #tab-dashboard .db-module-title { font-size: 12px; margin-bottom: 9px; }
  #tab-dashboard .db-recent-list { max-height: 300px; }
  #tab-dashboard .db-map-chart { height: 260px; min-height: 240px; }
  #tab-dashboard .db-kpi { gap: 10px; }
  #tab-dashboard .db-kpi-label { font-size: 10.5px; }
  #tab-dashboard .db-kpi-value { font-size: 17px; }
  #tab-dashboard .db-rate-num { height: 110px; font-size: 19px; }
}

/* ============================================================
 * 手机版数据表格卡片化（≤768px）
 * 方案：CSS 卡片化 + td data-label（隐藏表头、tr 变圆角卡片、
 * td 变 flex 行：灰色小字标签在左、值在右允许换行）
 * 仅作用于窄屏；桌面端(>768px) 样式保持原样
 * ============================================================ */
@media (max-width: 768px) {
  /* ---- 表格容器：取消横向滚动、取消强制最小宽度 ---- */
  .table-wrap { overflow: visible; margin-bottom: 8px; }
  #user-list { overflow: visible; }
  .data-table,
  .data-table tbody,
  .user-table,
  .user-table tbody { display: block; width: 100%; }
  .data-table,
  .data-table.profit-table,
  .user-table { min-width: 0; }
  .data-table.profit-table { table-layout: auto; }

  /* ---- 隐藏表头 ---- */
  .data-table thead,
  .user-table thead { display: none; }

  /* ---- tr → 独立圆角卡片（毛玻璃白底 + 细边框） ---- */
  .data-table tbody tr,
  .user-table tbody tr {
    display: block;
    margin: 0 0 12px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(60, 80, 145, 0.06);
  }
  .data-table tbody tr:last-child,
  .user-table tbody tr:last-child { margin-bottom: 0; }
  .user-table tbody tr:nth-child(even),
  .data-table tbody tr:nth-child(even),
  .user-table tbody tr:hover,
  .data-table tbody tr:hover { background: #ffffff; }

  /* ---- td → flex 行：data-label 灰色小字在左、值在右，允许换行 ---- */
  .data-table td,
  .user-table td {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 4px 10px;
    padding: 7px 0;
    border: none;
    white-space: normal;
  }
  .data-table td::before,
  .user-table td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    color: #8a93a6;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.2px;
    white-space: nowrap;
    padding-right: 10px;
  }
  /* 利润对比：覆盖固定布局 / ellipsis / nowrap，恢复正常换行 */
  .data-table.profit-table td {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }
  /* 客户名称下的无进货价提示：独占整行，避免挤压内容 */
  .no-cost-tip { flex-basis: 100%; width: 100%; margin: 2px 0 0; text-align: left; }

  /* ---- 操作列：按钮组同行右对齐、自动换行、保持可点 ---- */
  .data-table td .manage-ops,
  .user-table td .user-actions {
    flex: 1 1 auto;
    min-width: 0;
    justify-content: flex-end;
  }
  .data-table td .manage-ops .btn,
  .user-table td .user-actions .btn { min-height: 40px; }

  /* ---- 报价单管理操作列：「操作」标题独占一行，按钮整行等分一排 ---- */
  .data-table td.ops-cell {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 6px;
  }
  .data-table td.ops-cell::before { padding-right: 0; }
  .data-table td.ops-cell .manage-ops {
    width: 100%;
    flex: none;
    justify-content: stretch;
    flex-wrap: nowrap;
  }
  .data-table td.ops-cell .manage-ops .btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 8px 2px;
    font-size: 12px;
    text-align: center;
  }

  /* ---- 分类管理：内容左排（避免多个按钮被两端撑开），编辑框可用 ---- */
  #category-manage-list .data-table td { justify-content: flex-start; }
  .data-table .category-edit-input {
    flex: 1 1 auto;
    width: auto;
    max-width: none;
    min-width: 0;
    min-height: 40px;
  }

  /* ---- 利润对比筛选区：日期与下拉统一两列、自然换行不溢出 ---- */
  .filter-date { flex: 1 1 calc(50% - 4px); min-width: 0; max-width: none; }
}

/* 极窄屏(≤420px)：利润筛选日期与下拉一致单列全宽 */
@media (max-width: 420px) {
  .filter-date { flex: 1 1 100%; max-width: none; }
}
@media (max-width: 420px) {
  /* 极窄屏：筛选下拉单列，避免两列拥挤 */
  .filter-select { flex: 1 1 100%; }
  #tab-dashboard .db-filter-bar .filter-select { flex: 1 1 100%; }
  .form-actions .btn { min-width: 100%; }
  .btn.small { min-height: 40px; padding: 9px 14px; font-size: 12.5px; }
  .tabs { gap: 2px; padding: 6px 4px; }
  .tab { flex: 1 1 0; min-width: 0; font-size: 10px; padding: 7px 1px 6px; }
  .tab svg { width: 19px; height: 19px; }
  .login-card { padding: 22px 16px 16px; }
}

/* ---------- 全局轻量 Toast（移动端替代原生 alert，保证反馈可见） ---------- */
.app-toast {
  position: fixed;
  left: 50%;
  bottom: 120px;
  transform: translateX(-50%) translateY(20px);
  max-width: 86%;
  padding: 12px 22px;
  border-radius: 12px;
  background: rgba(20, 24, 40, 0.88);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.app-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.app-toast.error { background: rgba(198, 58, 58, 0.94); }
.app-toast.success { background: rgba(18, 116, 78, 0.94); }

/* ---------- 存储降级提示条（IndexedDB 不可用时置顶展示） ---------- */
.storage-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1500;
  padding: 10px 16px;
  background: linear-gradient(90deg, #b45309, #d97706);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  box-shadow: 0 4px 16px rgba(180, 83, 9, 0.35);
}
body.has-storage-banner { padding-top: 0; }

/* ---------- 我的报价 / 文档弹窗：移动端适配 ---------- */
@media (max-width: 768px) {
  .doc-preview-wrap { padding: 18px 14px; max-height: 72vh; }
  .doc-preview .doc-info { grid-template-columns: 1fr; gap: 2px; }
  .doc-preview .doc-sign { grid-template-columns: 1fr; }
  .doc-preview .doc-title { font-size: 20px; letter-spacing: 5px; }
}

/* ---------- 合同 / 验收单打印样式 ---------- */
@media print {
  body * { visibility: hidden; }
  #doc-modal, #doc-modal * { visibility: visible; }
  #doc-modal {
    position: absolute;
    inset: 0;
    display: block !important;
    background: #fff;
    padding: 0;
    z-index: 9999;
  }
  #doc-modal .modal-box { box-shadow: none; max-width: 100%; border-radius: 0; max-height: none; overflow: visible; padding: 0; }
  #doc-modal .doc-modal-bar { display: none !important; }
  #doc-modal .doc-preview-wrap { border: none; max-height: none; overflow: visible; padding: 0; }
}

/* ---------- 合同 / 验收单在线编辑 & 电子公章 ---------- */
.doc-edit-tip { font-size: 12px; color: #6b7280; background: rgba(64,122,255,0.06); border: 1px solid rgba(64,122,255,0.18); border-radius: 6px; padding: 6px 10px; margin-bottom: 12px; line-height: 1.6; }
.doc-preview[contenteditable="true"] { min-height: 320px; outline: none; cursor: text; }
.doc-preview[contenteditable="true"]:focus { outline: none; box-shadow: 0 0 0 1px rgba(64,122,255,0.28); border-radius: 4px; }
.doc-preview .doc-sign-cell { position: relative; min-height: 30px; }
.doc-preview .doc-sign-cell .doc-seal { position: absolute; left: 118px; top: -14px; width: 88px; height: 88px; object-fit: contain; pointer-events: none; z-index: 2; opacity: 0.95; }
.doc-seal-toggle { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: #4b5563; cursor: pointer; margin: 0 6px 0 0; white-space: nowrap; }
.doc-seal-toggle input { accent-color: var(--primary); }
.field .chk-field { display: flex; align-items: flex-start; gap: 6px; font-size: 13px; color: #4b5563; line-height: 1.5; cursor: pointer; }
.field .chk-field input { margin-top: 2px; accent-color: var(--primary); }
@media print {
  .doc-edit-tip { display: none !important; }
  .doc-seal-toggle { display: none !important; }
}

/* ---------- 产品库 V4：KPI 概览行 + 两栏布局（浅紫主题） ---------- */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}
.kpi-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--shadow);
  min-width: 0;
}
.kpi-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.kpi-icon svg { width: 21px; height: 21px; }
.ki-purple { background: rgba(110, 124, 239, 0.13); color: #6e7cef; }
.ki-blue   { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.ki-amber  { background: rgba(245, 158, 11, 0.14); color: #f59e0b; }
.ki-red    { background: rgba(239, 68, 68, 0.11); color: #ef4444; }
.kpi-meta { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.kpi-label { font-size: 12px; color: var(--text-light); font-weight: 600; }
.kpi-num { font-size: 21px; font-weight: 800; color: var(--text); line-height: 1.25; white-space: nowrap; }
.kpi-num i { font-style: normal; font-size: 12px; font-weight: 600; color: var(--text-light); margin-left: 1px; }
.kpi-money { font-size: 18px; }
.kpi-sub { font-size: 11.5px; color: var(--text-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 两栏：主列表 + 右侧栏 */
.lib-layout { display: flex; gap: 16px; align-items: flex-start; }
.lib-main { flex: 1; min-width: 0; }
.lib-main .card { margin-bottom: 0; }
.lib-side { flex: 0 0 236px; display: flex; flex-direction: column; gap: 14px; position: sticky; top: 76px; }
.side-card {
  background: var(--card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-edge);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 15px 14px;
}
.side-title { font-size: 13.5px; font-weight: 800; color: var(--text); display: flex; align-items: center; gap: 7px; margin-bottom: 11px; }
.side-title::before { content: ""; width: 4px; height: 13px; border-radius: 2px; background: linear-gradient(180deg, #a0acf7, #6e7cef); }
.side-title-row { display: flex; align-items: center; justify-content: space-between; }

/* 快捷操作 */
.quick-action {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 10px 10px;
  border: none; border-radius: 12px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background .18s, transform .18s;
  -webkit-tap-highlight-color: transparent;
}
.quick-action:hover { background: rgba(110, 124, 239, 0.09); }
.quick-action:active { transform: scale(0.98); }
.quick-action + .quick-action { margin-top: 2px; }
.qa-icon {
  width: 34px; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.qa-icon svg { width: 16px; height: 16px; }
.qa-purple { background: rgba(110, 124, 239, 0.13); color: #6e7cef; }
.qa-blue   { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.qa-amber  { background: rgba(245, 158, 11, 0.14); color: #f59e0b; }
.qa-green  { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.qa-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.qa-text b { font-size: 13px; font-weight: 700; color: var(--text); }
.qa-text i { font-style: normal; font-size: 11px; color: var(--text-light); margin-top: 1px; }
.qa-arrow { font-size: 17px; color: #c3cbfb; font-weight: 600; }

/* 产品分类列表 */
.cat-list { display: flex; flex-direction: column; gap: 2px; }
.cat-item {
  display: flex; align-items: center; gap: 9px;
  width: 100%;
  padding: 8px 9px;
  border: none; border-radius: 10px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background .18s;
  -webkit-tap-highlight-color: transparent;
}
.cat-item:hover { background: rgba(110, 124, 239, 0.09); }
.cat-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.cat-name { flex: 1; min-width: 0; font-size: 13px; color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-count { font-size: 12px; color: var(--text-light); font-weight: 600; }
.cat-empty { font-size: 12.5px; color: var(--text-light); padding: 6px 2px; }

/* ---------- 产品库两栏布局：移动端 ---------- */
@media (max-width: 1080px) {
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .lib-side { flex: 0 0 210px; }
}
@media (max-width: 768px) {
  .kpi-row { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 12px; }
  .kpi-card { padding: 12px 13px; gap: 10px; border-radius: 14px; }
  .kpi-icon { width: 38px; height: 38px; border-radius: 10px; }
  .kpi-icon svg { width: 18px; height: 18px; }
  .kpi-num { font-size: 17px; }
  .kpi-money { font-size: 15px; }
  .kpi-sub { font-size: 10.5px; }
  .lib-layout { flex-direction: column; gap: 12px; }
  .lib-side { position: static; flex: none; width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .side-card { padding: 13px 12px; }
  .qa-text i { display: none; }
  .qa-text b { font-size: 12.5px; }
  .quick-action { padding: 8px 7px; }
  .qa-icon { width: 30px; height: 30px; }
}
@media (max-width: 480px) {
  .lib-side { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .kpi-sub { max-width: 100%; }
}

/* ---------- 首页（工作台） ---------- */
.home-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  margin-bottom: 16px;
  border-radius: 18px;
  background: linear-gradient(120deg, rgba(110, 124, 239, 0.14), rgba(160, 172, 247, 0.07) 55%, rgba(255, 255, 255, 0));
  border: 1px solid var(--glass-edge);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.home-hero-info h2 {
  font-size: 21px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 5px;
  letter-spacing: .3px;
}
.home-hero-date { font-size: 12.5px; color: var(--text-light); font-weight: 600; margin: 0 0 7px; }
.home-hero-tip { font-size: 12px; color: var(--text-light); margin: 0; }
.home-hero-deco { flex: 0 0 84px; opacity: .9; }
.home-hero-deco svg { width: 84px; height: 84px; display: block; }

/* KPI 卡片可点击 */
.kpi-click { cursor: pointer; transition: transform .18s, box-shadow .18s; -webkit-tap-highlight-color: transparent; }
.kpi-click:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(110, 124, 239, 0.18); }
.kpi-click:active { transform: translateY(0) scale(.99); }

/* 首页两栏 */
.home-layout { display: flex; gap: 16px; align-items: flex-start; }
.home-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.home-main .card { margin-bottom: 0; }
.home-side { flex: 0 0 236px; position: sticky; top: 76px; }

/* 快捷入口宫格 */
.home-quick-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.home-quick {
  display: flex; align-items: center; gap: 11px;
  padding: 13px 14px;
  border: 1px solid var(--glass-edge);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  text-align: left;
  transition: background .18s, transform .18s, box-shadow .18s;
  -webkit-tap-highlight-color: transparent;
}
.home-quick:hover { background: rgba(110, 124, 239, 0.09); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(110, 124, 239, 0.14); }
.home-quick:active { transform: scale(.98); }
.home-quick .qa-icon { width: 38px; height: 38px; border-radius: 11px; }
.home-quick .qa-icon svg { width: 18px; height: 18px; }

/* 最近报价单 */
.home-recent { display: flex; flex-direction: column; gap: 8px; }
.hq-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 13px;
  border: 1px solid var(--glass-edge);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.5);
}
.hq-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.hq-deal { background: #10b981; box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15); }
.hq-undone { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15); }
.hq-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hq-main b { font-size: 13.5px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hq-main i { font-style: normal; font-size: 11.5px; color: var(--text-light); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hq-right { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.hq-right b { font-size: 14px; font-weight: 800; color: var(--text); }

/* 首页响应式 */
@media (max-width: 1080px) {
  .home-side { flex: 0 0 210px; }
}
@media (max-width: 768px) {
  .home-hero { padding: 16px; border-radius: 15px; margin-bottom: 12px; }
  .home-hero-info h2 { font-size: 18px; }
  .home-hero-deco { flex: 0 0 62px; }
  .home-hero-deco svg { width: 62px; height: 62px; }
  .home-layout { flex-direction: column; gap: 12px; }
  .home-main { gap: 12px; }
  .home-side { position: static; flex: none; width: 100%; }
  .home-quick-grid { gap: 8px; }
  .home-quick { padding: 11px 12px; }
  .hq-item { padding: 10px 11px; }
}
@media (max-width: 480px) {
  .home-quick-grid { grid-template-columns: 1fr; }
}

/* ============================================================
 * v13.0 新增：供应商工作台 / 审核 / 物流运单 / 弹窗
 * ============================================================ */
.toggle-row { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-light); cursor: pointer; }
.toggle-row input { width: 16px; height: 16px; accent-color: var(--primary); }

/* 状态徽标（供应商产品） */
.sup-chip { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.7; white-space: nowrap; }
.chip-pending { background: #fef3c7; color: #b45309; }
.chip-active { background: #d1fae5; color: #047857; }
.chip-rejected { background: #fee2e2; color: #b91c1c; }
.chip-draft { background: #e5e7eb; color: #4b5563; }
.chip-edit { background: #e0e7ff; color: #4338ca; }
.sup-reason { margin-top: 6px; font-size: 12.5px; color: #b91c1c; background: #fff5f5; border: 1px solid #fecaca; border-radius: 8px; padding: 6px 10px; line-height: 1.6; }

/* 供应商产品卡片/行 */
.sp-card { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; background: #fff; display: flex; gap: 12px; align-items: flex-start; }
.sp-photo { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: #f1f5f9; flex: 0 0 auto; border: 1px solid #eef2f7; }
.sp-photo-none { width: 64px; height: 64px; border-radius: 10px; background: #f1f5f9; display: flex; align-items: center; justify-content: center; color: #9ca3af; font-size: 11px; flex: 0 0 auto; }
.sp-main { flex: 1 1 auto; min-width: 0; }
.sp-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.sp-title b { font-size: 15px; color: var(--text-main); }
.sp-meta { font-size: 12.5px; color: var(--text-light); line-height: 1.7; word-break: break-all; }
.sp-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.sp-actions .btn { min-height: 32px; padding: 5px 10px; font-size: 12.5px; }
.sp-state-note { font-size: 12px; color: var(--text-light); margin-top: 4px; }

/* 供应商审核卡片 */
.rev-item { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; background: #fff; }
.rev-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.rev-supplier { font-size: 12.5px; color: var(--text-light); }
.rev-fields { font-size: 13px; line-height: 1.8; color: #334155; background: #f8fafc; border-radius: 8px; padding: 8px 12px; margin: 6px 0; word-break: break-all; }
.rev-fields b { color: var(--text-main); }
.rev-note { font-size: 12.5px; color: #475569; background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 6px 10px; margin: 6px 0; line-height: 1.6; }
.rev-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.rev-empty { color: var(--text-light); font-size: 13px; padding: 14px 4px; line-height: 1.7; }

/* 弹窗标题栏（含关闭按钮） */
.modal-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.modal-bar h3 { margin: 0; }
.ship-modal-box { max-width: 860px; width: 94vw; max-height: 88vh; overflow: auto; }

/* 发货管理 */
.ship-snap { font-size: 13px; color: var(--text-light); background: #f8fafc; border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; line-height: 1.7; }
.ship-add-bar { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.ship-card { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; background: #fff; }
.ship-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ship-no { font-size: 15px; font-weight: 600; color: var(--text-main); }
.ship-no small { font-weight: 400; color: var(--text-light); font-size: 12px; margin-left: 6px; }
.ship-state { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.ship-st-deliv { background: #e0e7ff; color: #4338ca; }
.ship-st-sign { background: #d1fae5; color: #047857; }
.ship-st-err { background: #fee2e2; color: #b91c1c; }
.ship-st-other { background: #fef3c7; color: #b45309; }
.ship-info { font-size: 12.5px; color: var(--text-light); margin-top: 6px; line-height: 1.7; }
.ship-info b { color: #475569; }
.ship-prods { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.ship-prod-chip { background: #f1f5f9; border-radius: 8px; padding: 4px 9px; font-size: 12px; color: #334155; border: 1px solid #e2e8f0; }
.ship-ops { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.ship-ops .btn { min-height: 32px; padding: 5px 10px; font-size: 12.5px; }
.ship-traces { margin-top: 10px; border-top: 1px dashed #e2e8f0; padding-top: 8px; max-height: 220px; overflow: auto; }
.ship-trace { font-size: 12.5px; color: #334155; padding: 5px 0; border-bottom: 1px dashed #eef2f7; display: flex; gap: 8px; }
.ship-trace b { color: var(--text-light); font-weight: 500; white-space: nowrap; }
.ship-trace:last-child { border-bottom: none; }
.ship-last { font-size: 12.5px; margin-top: 6px; color: #047857; }
.ship-err-line { font-size: 12.5px; margin-top: 6px; color: #b91c1c; }

/* 新增运单表单（弹窗内） */
.ship-form { background: #f8fafc; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.ship-form .form-grid { gap: 10px; }
.ship-pick-list { display: flex; flex-direction: column; gap: 6px; max-height: 200px; overflow: auto; }
.ship-pick-item { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 10px; font-size: 13px; cursor: pointer; }
.ship-pick-item input { accent-color: var(--primary); }
.ship-pick-item.disabled { opacity: .55; cursor: not-allowed; background: #f1f5f9; }

/* 供应商 tab 按钮切换用 */
[data-app-role="supplier"] .tab:not(.supplier-only) { display: none !important; }
[data-app-role="supplier"] .supplier-only { display: inline-flex !important; }
@media (max-width: 768px) {
  .sp-card { flex-direction: column; }
  .ship-modal-box { max-width: 96vw; }
  .modal-bar { align-items: flex-start; }
}

/* ===== v13.1：新增账号表单 2 列布局（姓名/类型一排，账号/密码一排） ===== */
.form-grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 768px) {
  .form-grid-2 { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

/* ===== v13.2：按钮等高 / 弹窗标题中轴 / 侧栏用户徽标 ===== */
/* ① small 档按钮统一高度：ghost 有 1px 边框而 primary/danger 无，补透明边框使总高一致；flex 垂直居中 */
.btn.small { display: inline-flex; align-items: center; justify-content: center; line-height: 1; padding: 7px 12px; }
.btn.small.primary, .btn.small.danger, .btn.small.warn { border: 1px solid transparent; }
/* ② 弹窗标题与右侧按钮同一中轴线 */
.modal-bar { align-items: center; }
.modal-bar h3 { margin: 0; line-height: 1.3; }
.modal-bar .btn { flex-shrink: 0; }
/* ③ 侧边栏当前用户：公司名过长时徽标不折行、不错位 */
.user-info { display: inline-flex; align-items: center; gap: 5px; min-width: 0; max-width: 100%; }
.user-info b { word-break: break-all; }
.user-info .role-tag { white-space: nowrap; flex-shrink: 0; margin-left: 0; }

/* v13.6 备案号页脚 */
.login-icp { margin: 10px 0 0; font-size: 11px; text-align: center; }
.login-icp a { color: #9aa3b2; text-decoration: none; }
.icp-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; text-align: center; font-size: 11px; line-height: 20px; padding: 1px 0; background: rgba(245,247,250,.9); color: #9aa3b2; }
.icp-bar a { color: #9aa3b2; text-decoration: none; }
