/* Ruiante Design System — 企业级 UI */
:root {
  --primary: #3CB371;
  --primary-hover: #35a066;
  --primary-active: #2d8f58;
  --primary-light: #eaf7f0;
  --primary-ring: rgba(60, 179, 113, 0.22);
  --primary-gradient: linear-gradient(135deg, #5ec98a 0%, #3CB371 50%, #35a066 100%);

  --bg-page: #f0f2f5;
  --bg-elevated: #ffffff;
  --bg-subtle: #fafafa;
  --bg-muted: #f5f5f5;

  --text-primary: #141414;
  --text-secondary: #434343;
  --text-tertiary: #8c8c8c;
  --text-quaternary: #bfbfbf;

  --border: #f0f0f0;
  --border-strong: #d9d9d9;
  --divider: rgba(5, 5, 5, 0.06);

  --danger: #ff4d4f;
  --danger-bg: #fff2f0;
  --warning: #faad14;
  --warning-bg: #fffbe6;
  --info: #1677ff;
  --info-bg: #e6f4ff;
  --success: #52c41a;
  --success-bg: #f6ffed;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.03), 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
  --shadow-nav: 0 1px 0 var(--divider), 0 2px 8px rgba(0, 0, 0, 0.04);

  --radius-sm: 10px;
  --radius-input: 6px;
  --control-h: 36px;
  --radius-md: 12px;
  --radius-lg: 14px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  --nav-h: 56px;
  --sidebar-w: 240px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;
  --transition: 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5715;
  color: var(--text-secondary);
  background: var(--bg-page);
}

/* 后台/会员中心：表单控件统一小圆角、紧凑高度 */
.admin-layout input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
.admin-layout textarea,
.admin-layout select,
.member-layout input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
.member-layout textarea,
.member-layout select,
.admin-layout .btn,
.member-layout .btn {
  border-radius: var(--radius-input) !important;
}

.admin-layout textarea,
.member-layout textarea {
  resize: none !important;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--primary-hover); }

::selection {
  background: var(--primary-light);
  color: var(--primary-active);
}

/* ── 会员中心：侧栏布局 ── */
.member-layout {
  display: flex;
  min-height: 100vh;
  background: var(--bg-page);
}

.member-sidebar {
  width: var(--sidebar-w);
  background: var(--bg-elevated);
  border-right: 1px solid var(--divider);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 300;
  overflow-y: auto;
  box-shadow: var(--shadow-sm);
}

.member-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 15px;
}
.member-brand:hover { color: var(--text-primary); opacity: 0.9; }
.member-brand-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.member-nav { flex: 1; padding: 8px 10px; }
.member-nav-section {
  padding: 14px 12px 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-quaternary);
  text-transform: uppercase;
}
.member-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin: 2px 0;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition);
}
.member-nav-link .nav-icon { opacity: 0.55; width: 18px; height: 18px; }
.member-nav-link:hover { background: var(--bg-subtle); color: var(--primary); }
.member-nav-link:hover .nav-icon { opacity: 1; }
.member-nav-link.active {
  background: var(--primary-light);
  color: var(--primary-active);
  font-weight: 600;
}
.member-nav-link.active .nav-icon { opacity: 1; }

.member-sidebar-foot {
  padding: 12px 10px 16px;
  border-top: 1px solid var(--border);
}

.member-main {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.member-topbar {
  height: var(--nav-h);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--divider);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-xs);
}

.member-menu-btn { display: none; }

.member-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  flex: 1;
  min-width: 0;
}
.member-breadcrumb-root { color: var(--text-tertiary); }
.member-breadcrumb-sep { color: var(--text-quaternary); }
.member-breadcrumb-current { color: var(--text-primary); font-weight: 600; }

.member-content {
  flex: 1;
  padding: 24px 28px 40px;
}

.member-content .page-header {
  margin-bottom: 20px;
}

.member-content .page-title {
  font-size: 20px;
  margin-bottom: 4px;
}

.member-content .page-sub {
  font-size: 13px;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 299;
}
.member-layout.sidebar-open .sidebar-backdrop { display: block; }

/* 旧顶栏布局保留给兼容 */
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }

/* 产品库页：内容多高就多高，页面整体滚动；底栏紧跟内容，不留中间空白 */
.app-shell:has(> .page-wrap--product-full) {
  height: auto;
  min-height: 100vh;
  max-height: none;
  overflow: visible;
}
.app-shell:has(> .page-wrap--product-full) > .member-app-footer {
  flex-shrink: 0;
  /* 不要 margin-top:auto，否则内容少时版本号被顶到底、中间又空一大截 */
}

.app-shell:has(.quote-workspace) {
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

.app-shell:has(.quote-workspace) > .page-wrap--workspace {
  flex: 1;
  min-height: 0;
  height: auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.app-shell:has(.quote-workspace) #viewRoot {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
}

.app-shell:has(.quote-workspace) .quote-workspace-host {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  height: var(--nav-h);
  background: #fff;
  border-bottom: 1px solid var(--divider);
  box-shadow: var(--shadow-nav);
  position: sticky;
  top: 0;
  z-index: 200;
  overflow: visible;
}

.top-nav .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 16px;
  color: var(--text-primary);
  white-space: nowrap;
  flex-shrink: 0;
}
.top-nav a.brand:hover { color: var(--text-primary); opacity: 0.92; }

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
  flex-shrink: 0;
}
.brand-logo-img,
.admin-brand-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  padding: 2px;
  flex-shrink: 0;
}

.top-nav .nav-links {
  display: flex;
  flex: 1;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 4px 0;
}
.top-nav .nav-links::-webkit-scrollbar { display: none; }

.top-nav .nav-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: all var(--transition);
  position: relative;
}

.top-nav .nav-links a .nav-icon {
  width: 16px;
  height: 16px;
  opacity: 0.65;
  flex-shrink: 0;
}

.top-nav .nav-links a:hover {
  color: var(--primary);
  background: var(--primary-light);
}
.top-nav .nav-links a:hover .nav-icon { opacity: 1; }

.top-nav .nav-links a.active {
  color: var(--primary);
  background: var(--primary-light);
}
.top-nav .nav-links a.active .nav-icon { opacity: 1; }
.top-nav .nav-links a.active::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  border-radius: var(--radius-full);
  background: var(--primary);
}

.top-nav .user-area {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  overflow: visible;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 13px;
  color: var(--text-secondary);
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logout-link {
  font-size: 13px;
  color: var(--text-tertiary);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.logout-link:hover {
  color: var(--danger);
  background: var(--danger-bg);
}

/* ── 页面容器（全宽） ── */
.page-wrap {
  flex: 1;
  padding: 20px 28px 40px;
  width: 100%;
  max-width: none;
  margin: 0;
  box-sizing: border-box;
}

.page-header {
  margin-bottom: 14px;
}

.page-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.page-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 6px;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.page-sub {
  color: var(--text-tertiary);
  margin: 0;
  font-size: 14px;
  max-width: 640px;
}

.page-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

/* ── 卡片 ── */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--transition);
}

.card:hover { box-shadow: var(--shadow-sm); }

.card-heading {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-heading.with-icon::before { display: none; }

.card-heading::before {
  content: "";
  width: 3px;
  height: 16px;
  background: var(--primary-gradient);
  border-radius: var(--radius-full);
}

.card-inner {
  background: var(--bg-subtle);
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-strong);
}

.card-inner--flat {
  background: transparent;
  border: none;
  padding: 0;
  margin-top: 0;
}

.card-flush { padding: 0; overflow: hidden; }
.card-body-pad { padding: 0 16px 12px; }
.card-body-pad--subtle {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
}
.card-flush .toolbar,
.card-flush .card-toolbar {
  padding: 12px 16px;
  margin: 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
}

.card-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 0;
}

/* ── 统计卡片 ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 20px 20px 24px;
  box-shadow: var(--shadow-xs);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.stat-box:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-box::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--primary-gradient);
  border-radius: 4px 0 0 4px;
}

.stat-box.stat-info::before { background: linear-gradient(180deg, #69b1ff, #1677ff); }
.stat-box.stat-success::before { background: linear-gradient(180deg, #95de64, #52c41a); }
.stat-box.stat-warning::before { background: linear-gradient(180deg, #ffd666, #faad14); }
.stat-box.stat-purple::before { background: linear-gradient(180deg, #b37feb, #722ed1); }

.stat-box-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.stat-box .num {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.stat-box .lbl {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--primary-light);
  color: var(--primary);
}

.stat-info .stat-icon { background: var(--info-bg); color: var(--info); }
.stat-success .stat-icon { background: var(--success-bg); color: var(--success); }
.stat-warning .stat-icon { background: var(--warning-bg); color: var(--warning); }
.stat-purple .stat-icon { background: #f9f0ff; color: #722ed1; }

/* ── 工具栏 / 表单 ── */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 16px;
  align-items: start;
}
.form-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.form-field > label:not(.btn):not(.form-check) {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: var(--control-h);
}

.form-field > label.form-check,
.form-field > label:has(> input[type="checkbox"]),
.form-field > label:has(> input[type="radio"]) {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
  min-height: var(--control-h);
  cursor: pointer;
  font-weight: 400;
  width: fit-content;
  max-width: 100%;
}

.form-field--check {
  display: flex;
  align-items: center;
  min-height: var(--control-h);
}

.form-field.switch-row {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg-subtle);
  border-radius: var(--radius-input);
  margin-bottom: 0;
  min-height: var(--control-h);
  width: fit-content;
  max-width: 100%;
}

.form-field.switch-row > label:not(.btn) {
  margin-bottom: 0;
  flex: 0 1 auto;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
}

.admin-layout input[type="checkbox"],
.admin-layout input[type="radio"],
.member-layout input[type="checkbox"],
.member-layout input[type="radio"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  max-width: 16px;
  min-height: 0;
  margin: 0;
  padding: 0;
  flex: 0 0 16px;
  accent-color: var(--primary);
  cursor: pointer;
  vertical-align: middle;
}

.admin-layout input[type="file"],
.member-layout input[type="file"] {
  display: block;
  width: 100%;
  min-height: var(--control-h);
  padding: 5px 10px;
  font-size: 13px;
  line-height: 1.35;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-input);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  cursor: pointer;
}

.admin-layout input[type="file"]::file-selector-button,
.member-layout input[type="file"]::file-selector-button {
  margin: 0 10px 0 0;
  padding: 4px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: var(--bg-muted);
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}

.admin-layout input[type="file"]::file-selector-button:hover,
.member-layout input[type="file"]::file-selector-button:hover {
  background: var(--bg-subtle);
  border-color: var(--primary);
}

.form-field textarea { min-height: 80px; resize: none; }

.form-field--action {
  display: flex;
  align-items: flex-end;
  padding-top: 28px;
}

.form-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.form-actions-bar {
  margin-top: 4px;
  padding-top: 4px;
}
.form-actions-bar .btn { min-height: var(--control-h); }

.req { color: var(--danger); }

.quote-create-import-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(0, 1.4fr);
  gap: 24px;
  align-items: start;
}

.quote-create-preview-head {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.quote-create-preview .table-wrap {
  max-height: 320px;
  overflow: auto;
}

.upload-btn {
  position: relative;
  cursor: pointer;
}

.upload-btn input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

@media (max-width: 960px) {
  .quote-create-import-grid { grid-template-columns: 1fr; }
}

/* 全局输入框尺寸（工具栏、表格内联表单通用） */
.input-xs { width: 72px; min-width: 72px; max-width: 72px; flex: 0 0 72px; text-align: center; }
.input-sm { width: 96px; min-width: 96px; max-width: 96px; flex: 0 0 96px; text-align: center; }
.input-md { min-width: 160px; flex: 1 1 180px; }
.input-lg { min-width: 240px; flex: 1 1 280px; }
.input-full { width: 100%; flex: 1 1 100%; }

.input-group {
  display: flex;
  align-items: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.input-group:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-ring);
}

.input-group .input-prefix {
  padding: 0 12px;
  color: var(--text-tertiary);
  background: var(--bg-subtle);
  border-right: 1px solid var(--border);
  align-self: stretch;
  display: flex;
  align-items: center;
}

.input-group input {
  border: none !important;
  box-shadow: none !important;
  flex: 1;
  min-width: 0;
}

.input-group--search {
  min-width: 220px;
  max-width: 320px;
  flex: 1 1 220px;
}

.input-group--wide {
  min-width: 280px;
  max-width: 420px;
  flex: 1 1 280px;
}

input[type=text],
input[type=password],
input[type=number],
input[type=date],
input[type=email],
select,
textarea {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-input);
  padding: 0 12px;
  min-height: var(--control-h);
  font-size: 14px;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--bg-elevated);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  line-height: 1.4;
}

textarea {
  padding: 8px 12px;
  min-height: 80px;
  resize: none;
}

select {
  padding-right: 32px;
  cursor: pointer;
  appearance: auto;
}

/* 工具栏内控件：统一最小宽度，避免挤成一条缝 */
.toolbar input[type=text],
.toolbar input[type=password],
.toolbar input[type=number],
.toolbar input[type=date],
.toolbar select {
  min-width: 200px;
  flex: 0 1 220px;
}

.toolbar .input-group--search,
.toolbar .input-group--wide {
  min-width: 0;
}

.toolbar .input-group--search input,
.toolbar .input-group--wide input {
  min-width: 0;
}

.toolbar input.input-xs {
  min-width: 72px;
  flex: 0 0 72px;
}

.toolbar input.input-sm,
.toolbar input[type=number].input-sm {
  min-width: 96px;
  flex: 0 0 96px;
  text-align: center;
}

.toolbar input.input-md {
  min-width: 160px;
  flex: 1 1 180px;
}

.toolbar input.input-lg {
  min-width: 240px;
  flex: 1 1 280px;
}

.toolbar select.input-sm-select {
  min-width: 120px;
  flex: 0 0 130px;
}

.card-toolbar select {
  min-width: 140px;
}

.card-toolbar input.input-md {
  min-width: 140px;
  flex: 0 1 180px;
}

.card-toolbar input.input-sm {
  min-width: 96px;
  flex: 0 0 96px;
}

.card-toolbar .toolbar {
  flex: 1;
  margin: 0;
  min-width: 0;
}

.add-item-form {
  gap: 8px;
}

.add-item-form input.input-md {
  min-width: 140px;
  flex: 1 1 160px;
}

.row-editing .add-item-form {
  padding: 4px 0;
}

.table-actions-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}
.table-actions-form input[type=password],
.table-actions-form input[type=text] {
  min-width: 168px;
  width: 168px;
  flex-shrink: 0;
}

.user-profile-form__row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}
.user-profile-form__row input[type=text] {
  min-width: 0;
  flex: 1 1 100px;
  max-width: 140px;
  height: 32px;
  font-size: 13px;
}
.user-profile-form__row .btn-xs {
  flex-shrink: 0;
}

input:hover:not(:disabled),
select:hover:not(:disabled),
textarea:hover:not(:disabled) {
  border-color: var(--primary);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-ring);
}

input::placeholder,
textarea::placeholder { color: var(--text-quaternary); }

/* ── 按钮 ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  line-height: 1.4;
  white-space: nowrap;
  transition: all var(--transition);
  outline: none;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.35);
}

.btn-primary:hover:not(:disabled) {
  filter: brightness(1.05);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
  transform: translateY(-1px);
  color: #fff;
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
  filter: brightness(0.95);
}

.btn-default {
  background: var(--bg-elevated);
  border-color: var(--border-strong);
  color: var(--text-secondary);
}

.btn-default:hover:not(:disabled) {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-light);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--bg-muted);
  color: var(--primary);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 2px 6px rgba(255, 77, 79, 0.3);
}

.btn-danger:hover:not(:disabled) { filter: brightness(1.08); color: #fff; }

.btn-lg { padding: 10px 24px; font-size: 15px; border-radius: var(--radius-md); }
.btn-xs { padding: 2px 10px; font-size: 12px; height: 24px; }
.btn-icon { padding: 8px; width: 36px; height: 36px; }

/* ── 表格 ── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th,
.data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  background: var(--bg-subtle);
  font-weight: 600;
  color: var(--text-primary);
  font-size: 13px;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}

.data-table tbody tr {
  transition: background var(--transition);
}

.data-table tbody tr:hover td {
  background: #fafafa;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table code {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 2px 8px;
  background: var(--bg-muted);
  border-radius: 4px;
  color: var(--primary-active);
  border: 1px solid var(--border);
}

/* ── 徽章 ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  line-height: 20px;
  border: 1px solid transparent;
}

.badge-open { background: var(--info-bg); color: var(--info); border-color: #91caff; }
.badge-done { background: var(--success-bg); color: var(--success); border-color: #b7eb8f; }
.badge-warn { background: var(--warning-bg); color: #d48806; border-color: #ffe58f; }

/* ── 提示 ── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-size: 14px;
  animation: slideDown 0.3s ease;
  border: 1px solid transparent;
}

.alert-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}

.alert-body { flex: 1; }
.alert-actions { flex-shrink: 0; }

.alert-error {
  background: var(--danger-bg);
  border-color: #ffccc7;
  color: #cf1322;
}

.alert-success {
  background: var(--success-bg);
  border-color: #b7eb8f;
  color: #389e0d;
}

.alert-warning {
  background: var(--warning-bg);
  border-color: #ffe58f;
  color: #d48806;
}

.alert-info {
  background: var(--info-bg);
  border-color: #91caff;
  color: #0958d9;
}

.alert-banner {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.legacy-spa-banner {
  margin-bottom: 16px;
}

.legacy-spa-banner p {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.5;
}

.legacy-spa-banner__actions {
  margin: 10px 0 0;
}

.legacy-spa-banner code {
  font-size: 12px;
}

/* ── 顶栏通知下拉（不占页面位置） ── */
.notice-dropdown {
  position: relative;
  flex-shrink: 0;
  z-index: 300;
}

.notice-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  font-family: inherit;
}

.notice-dropdown-trigger:hover,
.notice-dropdown-trigger[aria-expanded="true"] {
  border-color: var(--primary);
  color: var(--text-primary);
  background: var(--bg-subtle);
}

.notice-dropdown-trigger--warn {
  border-color: #ffe58f;
  background: var(--warning-bg);
  color: #d48806;
}

.notice-dropdown-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
}

.notice-dropdown-trigger--warn .notice-dropdown-badge {
  background: #d48806;
}

.notice-dropdown-panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1200;
  width: min(360px, calc(100vw - 24px));
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.notice-dropdown-panel.is-open {
  display: block;
}

.notice-dropdown-head {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
}

.notice-dropdown-list {
  list-style: none;
  margin: 0;
  padding: 8px 0;
  max-height: 320px;
  overflow-y: auto;
}

.notice-dropdown-item {
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}

.notice-dropdown-dismiss {
  flex-shrink: 0;
  margin-left: auto;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 20px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.notice-dropdown-dismiss:hover {
  border-color: #ffa39e;
  color: #cf1322;
  background: #fff1f0;
}

.notice-dropdown-item.is-dismissed {
  display: none;
}

.notice-dropdown-item:last-child {
  border-bottom: none;
}

.notice-dropdown-item-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.notice-dropdown-item-body {
  flex: 1;
  min-width: 0;
  font-size: 13px;
}

.notice-dropdown-item-body strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.notice-dropdown-item-body p {
  margin: 0 0 8px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.notice-dropdown-item--warning .notice-dropdown-item-icon { color: #d48806; }
.notice-dropdown-item--error .notice-dropdown-item-icon { color: #cf1322; }
.notice-dropdown-item--success .notice-dropdown-item-icon { color: #389e0d; }

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

/* Toast */
.toast-stack {
  position: fixed;
  top: calc(var(--nav-h) + 12px);
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: 360px;
}

.toast-stack .alert {
  pointer-events: auto;
  margin: 0;
  box-shadow: var(--shadow-lg);
}

/* ── 空状态 ── */
.empty-cell {
  text-align: center;
  padding: 48px 24px !important;
  color: var(--text-tertiary);
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--bg-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-quaternary);
}

.empty-state-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 8px;
}

.empty-state-desc {
  font-size: 14px;
  color: var(--text-tertiary);
  margin: 0 0 16px;
}

/* ── 分页 ── */
.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.pager .btn.active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
}

.quote-pager {
  padding: 16px 20px;
  margin: 0;
  border-top: 1px solid var(--border);
}

.quote-filter-form .input-date {
  min-width: 140px;
  flex: 0 0 140px;
}

.quote-toolbar-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* 询价表顶栏：操作 + 统计一行紧凑 */
.page-wrap--quote .page-header {
  margin-bottom: 10px;
}

.page-wrap--quote .page-title {
  font-size: 20px;
  margin-bottom: 0;
}

.quote-list-table tbody tr {
  content-visibility: auto;
  contain-intrinsic-size: auto 48px;
}

.quote-list-toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  width: 100%;
  overflow: visible;
}

.quote-list-toolbar .quote-action-btn {
  min-width: max-content;
  flex-shrink: 0;
  overflow: visible;
}

.quote-list-toolbar .quote-metric {
  min-width: 0;
}

.quote-metric--neutral .quote-metric-val {
  color: var(--text-secondary);
}

.quote-metric-sub {
  display: block;
  font-size: 11px;
  color: var(--primary);
  margin-top: 2px;
}

.quote-customer-cell--click {
  cursor: pointer;
}

.quote-customer-cell--click:hover .quote-customer-name {
  color: var(--primary);
}

.quote-customer-detail {
  display: grid;
  gap: 10px;
}

.quote-detail-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 10px;
  font-size: 13px;
}

.quote-detail-label {
  color: var(--text-secondary);
}

.quote-detail-value {
  color: var(--text-primary);
  word-break: break-word;
}

.quote-settle-flow {
  font-weight: 600;
  color: #0f172a;
  font-size: 13px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  line-height: 1.4;
}

.quote-settle-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: start;
}

.quote-settle-col {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  min-width: 0;
}

.quote-settle-col-title {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 4px;
}

.quote-settle-desc {
  font-size: 12px;
  color: #64748b;
  margin: 0 0 8px;
  line-height: 1.45;
}

.quote-settle-group {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px;
  margin-bottom: 6px;
  background: #fff;
}

.quote-settle-group:last-child {
  margin-bottom: 0;
}

.quote-settle-group-label {
  font-size: 12px;
  color: #475569;
  margin-bottom: 6px;
  font-weight: 500;
}

.quote-settle-select {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  background: #fff;
}

.quote-settle-checks {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.quote-settle-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #374151;
  cursor: pointer;
}

.quote-settle-check input {
  margin: 0;
}

.quote-settle-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 180px;
  height: 88px;
  margin: 0 auto 4px;
  border-radius: 8px;
  text-decoration: none;
}

.quote-settle-thumb--empty {
  border: 1px dashed #cbd5e1;
  background: #f8fafc;
  color: #94a3b8;
  font-size: 12px;
  text-align: center;
  padding: 6px;
}

.quote-settle-thumb--has {
  border: 1px solid #e2e8f0;
  background: #fff;
  padding: 2px;
  overflow: hidden;
}

.quote-settle-thumb--has img {
  max-width: 100%;
  max-height: 84px;
  object-fit: contain;
  display: block;
}

.quote-settle-thumb-hint {
  text-align: center;
  font-size: 11px;
  color: #64748b;
  margin: 0 0 6px;
}

.quote-settle-thumb-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.quote-settle-thumb-actions .btn {
  flex: 1 1 auto;
  min-width: 96px;
}

.quote-settle-inline-form {
  display: inline;
  margin: 0;
}

.quote-settle-alert {
  color: #b45309;
  background: #fffbeb;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #fcd34d;
  font-size: 12px;
  margin-bottom: 10px;
  line-height: 1.5;
}

.btn-settle-cn {
  background: #0d9488;
  color: #fff;
  border: none;
  font-weight: 600;
  font-size: 12px;
}

.btn-settle-cn:hover:not(:disabled) {
  background: #0f766e;
  color: #fff;
}

.btn-settle-en {
  background: #0e7490;
  color: #fff;
  border: none;
  font-weight: 600;
  font-size: 12px;
}

.btn-settle-en:hover:not(:disabled) {
  background: #155e75;
  color: #fff;
}

.quote-settle-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.quote-settle-actions .btn {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  white-space: normal;
  text-align: center;
  line-height: 1.35;
  min-height: 34px;
  padding: 7px 8px;
  font-size: 12px;
}

.quote-settle-upload-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.quote-settle-col .btn-block + .btn-block {
  margin-top: 0;
}

.quote-settle-upload-list {
  margin-top: 6px;
}

.quote-settle-upload-empty {
  margin: 6px 0 0;
  font-size: 12px;
}

.modal-backdrop > .modal.modal--settle .modal-body.quote-settle-body,
.quote-action-body.quote-settle-body {
  padding: 12px 16px;
  overflow: visible;
}

.modal-backdrop > .modal.modal--settle {
  max-height: none;
  overflow: visible;
}

.quote-settle-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  background: var(--bg-subtle);
}

.quote-settle-panel h4 {
  margin: 0 0 8px;
  font-size: 14px;
}

.quote-receipt-preview img {
  max-width: 100%;
  max-height: 120px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 8px;
}

.quote-export-grid {
  display: grid;
  gap: 8px;
}

.quote-export-panel {
  min-width: 0;
}

.quote-export-title {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--text-primary);
}

.quote-export-hint {
  margin: 0 0 14px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.quote-export-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.quote-export-col {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  min-width: 0;
}

.quote-export-col-head {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  text-align: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
}

.quote-export-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 40px;
  margin-bottom: 8px;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  color: #0f172a;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.quote-export-link:last-child {
  margin-bottom: 0;
}

.quote-export-link:hover {
  border-color: #0d9488;
  background: #ecfdf5;
  color: #0f766e;
}

.quote-export-col:last-child .quote-export-col-head {
  color: #0e7490;
}

.quote-export-col:last-child .quote-export-link:hover {
  border-color: #0e7490;
  background: #ecfeff;
  color: #155e75;
}

.quote-export-btn {
  text-align: center;
}

/* 导出询价 v2：双列配置弹窗 */
.modal--export,
#quoteActionDialog.modal--export {
  width: min(820px, 100%);
  max-height: none;
  overflow: visible;
}

.modal--export.modal--export-unified,
#quoteExportDialog.modal--export-unified {
  width: min(1080px, calc(100vw - 24px));
  max-height: calc(100vh - 36px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 14px;
}
.modal--export-unified .modal-body.quote-action-body--export {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  max-height: none;
  padding: 16px 18px 8px;
  background: linear-gradient(180deg, #f1f5f9 0%, #f8fafc 48%, #fff 100%);
}
.quote-export-hd {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.quote-export-hd h3 {
  margin: 0;
}
.quote-export-hd-no {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.quote-export-unified-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.92fr) minmax(360px, 1.18fr);
  gap: 16px;
  align-items: start;
}
.quote-export-unified-grid.is-quote-only {
  grid-template-columns: minmax(0, 1fr);
  max-width: 520px;
  margin: 0 auto;
}
#quoteExportDialog.is-quote-only.modal--export-unified {
  width: min(560px, calc(100vw - 24px));
  max-width: 560px;
}
.quote-export-panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  min-width: 0;
}
.quote-export-panel-hd {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
  color: #fff;
}
.quote-export-panel--flow .quote-export-panel-hd {
  background: linear-gradient(135deg, #0e7490 0%, #0891b2 100%);
}
.quote-export-panel-badge {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}
.quote-export-panel-hd h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}
.quote-export-panel-hd p {
  margin: 2px 0 0;
  font-size: 12px;
  opacity: 0.88;
  line-height: 1.4;
}
.quote-export-panel-bd {
  padding: 14px 16px 16px;
  display: grid;
  gap: 12px;
}
.quote-export-callout {
  border: 1px solid #cce7e3;
  background: #f0fdfa;
  border-radius: 10px;
  padding: 10px 12px;
}
.quote-export-callout strong {
  display: block;
  font-size: 12px;
  color: #0f766e;
  margin-bottom: 4px;
}
.quote-export-callout p {
  margin: 0;
  font-size: 12px;
  color: #475569;
  line-height: 1.5;
}
.quote-export-callout-sum {
  margin-top: 8px !important;
  padding-top: 8px;
  border-top: 1px dashed #99f6e4;
  color: #0f172a !important;
  font-weight: 500;
}
.quote-export-block-label {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  margin: 0 0 8px;
}
.quote-export-select {
  width: 100%;
  height: 36px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 13px;
  background: #fff;
  color: #0f172a;
}
.quote-export-select:focus {
  outline: none;
  border-color: #14b8a6;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.18);
}
.quote-export-checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.quote-export-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  font-size: 13px;
  color: #334155;
  cursor: pointer;
  user-select: none;
}
.quote-export-chip:has(input:checked) {
  border-color: #5eead4;
  background: #ecfdf5;
  color: #0f766e;
}
.quote-export-chip input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: #0d9488;
}
.quote-export-block--actions {
  display: grid;
  gap: 10px;
  padding-top: 4px;
}
.quote-export-btn-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.quote-export-btn-pair .btn,
.quote-export-block--actions .btn-export-save {
  width: 100%;
  min-height: 38px;
  border-radius: 9px;
  font-weight: 600;
}
.quote-export-steps {
  list-style: none;
  margin: 0;
  padding: 10px 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: #f0f9ff;
  border-bottom: 1px solid #e0f2fe;
}
.quote-export-steps li {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
}
.quote-export-steps li span {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e2e8f0;
  color: #475569;
  font-size: 11px;
}
.quote-export-steps li.is-on {
  color: #0e7490;
}
.quote-export-steps li.is-on span {
  background: #0e7490;
  color: #fff;
}
.quote-export-flow-bd {
  gap: 10px;
}
.quote-export-step-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 12px 14px;
  background: #f8fafc;
}
.quote-export-step-hd {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.quote-export-step-num {
  color: #0e7490;
  font-weight: 700;
  font-size: 14px;
}
.quote-export-step-hd strong {
  font-size: 13px;
  color: #0f172a;
}
.quote-export-step-desc {
  margin: 0 0 10px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.45;
}
.quote-export-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.quote-export-field {
  display: grid;
  gap: 4px;
  margin: 0;
  font-size: 12px;
  color: #475569;
}
.quote-export-field input {
  height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 13px;
  background: #fff;
  box-sizing: border-box;
}
.quote-export-field input:focus {
  outline: none;
  border-color: #22d3ee;
  box-shadow: 0 0 0 3px rgba(14, 116, 144, 0.14);
}
.quote-export-proof {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.quote-export-proof .quote-settle-thumb {
  width: 120px;
  height: 90px;
  margin: 0;
}
.quote-export-proof-side {
  display: grid;
  gap: 10px;
  min-width: 0;
}
.quote-export-attach {
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
}
.quote-export-settle-done {
  margin-top: 8px;
}
.quote-export-panel .btn-settle-cn,
.quote-export-panel .btn-export-cn {
  background: #0d9488;
  color: #fff;
  border-color: #0f766e;
}
.quote-export-panel .btn-settle-cn:hover:not(:disabled),
.quote-export-panel .btn-export-cn:hover:not(:disabled) {
  background: #0f766e;
  color: #fff;
}
.quote-export-panel .btn-export-en {
  background: #2563eb;
  color: #fff;
  border-color: #1d4ed8;
}
.quote-export-panel .btn-export-en:hover:not(:disabled) {
  background: #1d4ed8;
  color: #fff;
}
.quote-export-panel .btn-export-save {
  background: #fff;
  color: #0f766e;
  border: 1px solid #99f6e4;
}
.quote-export-panel .btn-export-save:hover:not(:disabled) {
  background: #ecfdf5;
  color: #0f766e;
}
@media (max-width: 900px) {
  .quote-export-unified-grid {
    grid-template-columns: 1fr;
  }
  .quote-export-meta-grid,
  .quote-export-checks,
  .quote-export-btn-pair {
    grid-template-columns: 1fr;
  }
  .quote-export-proof {
    grid-template-columns: 1fr;
  }
}

/* 兼容旧类名（其它入口若仍引用） */
.quote-export-unified-col {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  min-width: 0;
}
.quote-settle-field {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  font-size: 13px;
  color: #475569;
}
.quote-settle-field > span {
  flex: 0 0 72px;
  white-space: nowrap;
}
.quote-settle-field input {
  flex: 1 1 auto;
  min-width: 0;
  height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 13px;
  background: #fff;
  box-sizing: border-box;
}

.modal--contract,
.modal-backdrop > .modal.modal--contract,
#quoteContractDialog.modal--contract {
  width: min(1360px, calc(100vw - 24px)) !important;
  max-width: calc(100vw - 24px) !important;
  max-height: calc(100vh - 32px) !important;
  height: auto !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}
#modalQuoteContract.modal-backdrop.is-open {
  align-items: center !important;
  overflow: hidden !important;
  padding: 16px 12px;
}
.modal--contract .modal-body,
.modal--contract .quote-contract-body,
.modal--contract .quote-action-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  padding: 14px 18px 10px;
}
.modal--contract .modal-footer.quote-contract-footer,
.quote-contract-footer {
  flex: 0 0 auto !important;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
  padding: 12px 18px;
  border-top: 1px solid #e8e8e8;
  background: #fff;
}
.modal-header--amber {
  background: linear-gradient(90deg, #d48806, #faad14);
  border-bottom: none;
  color: #fff;
  padding-right: 56px;
  min-height: 52px;
  flex-shrink: 0;
}
.modal-header--amber h3 {
  color: #fff;
  margin: 0;
}
.quote-contract-form {
  min-width: 0;
}
.quote-contract-banner {
  margin: 0 0 12px;
  padding: 10px 14px;
  background: #fff7e6;
  border: 1px solid #ffd591;
  border-radius: 8px;
  color: #ad6800;
  font-size: 13px;
  line-height: 1.5;
}
.quote-contract-split {
  display: grid !important;
  grid-template-columns: 340px minmax(0, 1fr) !important;
  gap: 14px;
  align-items: start;
  min-width: 0;
  width: 100%;
}
.quote-contract-side--left {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.quote-contract-side--right {
  min-width: 0;
}
.quote-contract-quote {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0;
  padding: 0 2px;
  font-size: 13px;
  color: #595959;
}
.quote-contract-quote strong {
  color: #262626;
}
.quote-contract-card {
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 12px 14px;
  background: #fafafa;
  min-width: 0;
  box-sizing: border-box;
}
.quote-contract-card--items {
  background: #fff;
  padding: 12px 14px 14px;
}
.quote-contract-section-label {
  font-size: 13px;
  font-weight: 700;
  color: #262626;
  margin: 0 0 8px;
}
.quote-contract-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
}
.quote-contract-field {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  font-size: 13px;
  color: #595959;
  min-width: 0;
}
.quote-contract-field > span {
  flex: 0 0 88px;
  white-space: nowrap;
}
.quote-contract-input {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  max-width: none;
  height: 34px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  padding: 0 10px;
  text-align: right;
  background: #fff;
  box-sizing: border-box;
}
.quote-contract-input:disabled {
  background: #f5f5f5;
  color: #bfbfbf;
}
.quote-contract-hint {
  margin: 0 0 8px;
  font-size: 12px;
  color: #8c8c8c;
  line-height: 1.5;
}
.quote-contract-receipt-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.quote-contract-receipt-link {
  color: #0f766e;
  text-decoration: underline;
}
.quote-contract-upload-btn {
  cursor: pointer;
  margin: 0;
}
.quote-contract-receipt-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.quote-contract-receipt-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 12px;
}
.quote-contract-receipt-list .quote-contract-receipt-link {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quote-contract-share {
  border: 1px solid #dbeafe;
  border-radius: 10px;
  padding: 10px 12px;
  background: #f8fbff;
}
.quote-contract-share-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 8px 0;
}
.quote-contract-share-row .form-control {
  flex: 1;
  min-width: 0;
  font-size: 12px;
}
.quote-contract-share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.btn-contract-share {
  background: #1d4ed8;
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: 8px 14px;
  cursor: pointer;
}
.btn-contract-share:hover { background: #2563eb; }
.btn-contract-email {
  background: #2563eb;
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: 8px 14px;
  cursor: pointer;
  margin-right: auto;
}
.btn-contract-email:hover { background: #1d4ed8; }
.btn-contract-email:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}
.quote-contract-card--email .quote-contract-email-body {
  min-height: 110px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.5;
}
.btn-contract-save {
  background: #d48806;
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: 8px 14px;
  cursor: pointer;
}
.btn-contract-save:hover { background: #faad14; }
.btn-contract-view {
  background: #0f766e;
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: 8px 14px;
  cursor: pointer;
}
.btn-contract-view:hover { background: #14b8a6; }
.quote-contract-items-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.quote-contract-items-head .quote-contract-section-label {
  margin: 0;
}
.quote-contract-items-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #595959;
}
.quote-contract-items-meta strong {
  color: #262626;
}
.btn-xs {
  padding: 2px 10px;
  font-size: 12px;
  line-height: 1.7;
}
.quote-contract-items-table {
  border: 1px solid #f0f0f0;
  border-radius: 8px;
  overflow: hidden;
}
.quote-contract-items-thead,
.quote-contract-item {
  display: grid;
  grid-template-columns: 36px 48px 120px minmax(0, 1.8fr) 56px 72px 96px;
  align-items: center;
  gap: 8px;
  min-width: 0;
  box-sizing: border-box;
}
.quote-contract-items-thead {
  padding: 9px 12px;
  background: #f5f5f5;
  font-size: 12px;
  font-weight: 600;
  color: #8c8c8c;
}
.quote-contract-item {
  margin: 0;
  padding: 10px 12px;
  background: #fff;
  border-top: 1px solid #f0f0f0;
  font-size: 13px;
  color: #262626;
  cursor: pointer;
}
.quote-contract-item:hover {
  background: #fffbe6;
}
.qc-col-check {
  display: flex;
  align-items: center;
  justify-content: center;
}
.qc-col-seq {
  text-align: center;
  color: #8c8c8c;
}
.qc-col-code,
.qc-col-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.qc-col-code {
  font-family: Consolas, "Courier New", monospace;
  color: #595959;
}
.qc-col-unit {
  text-align: center;
  color: #8c8c8c;
}
.qc-col-qty,
.qc-col-price {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.quote-contract-loading { padding: 24px 0; text-align: center; }

#quoteActionDialog.modal--export .quote-action-body,
.quote-action-body.quote-action-body--export {
  max-height: none;
  overflow: visible;
  padding: 0 0 12px;
}

.quote-export-v2-banner {
  margin: 0;
  padding: 12px 20px;
  background: linear-gradient(90deg, #0d9488, #14b8a6);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.quote-export-v2-card--hint {
  background: #f8fafc;
}
.quote-export-v2-terms-sum,
.quote-contract-terms-sum {
  margin: 8px 0 0;
  font-size: 12px;
  color: #334155;
  line-height: 1.5;
  word-break: break-word;
}

.quote-export-v2-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-width: 0;
}

.quote-export-v2-left,
.quote-export-v2-right {
  padding: 16px 18px;
  min-width: 0;
}

.quote-export-v2-card {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px 14px 12px;
  background: #fff;
}

.quote-export-v2-extra {
  display: block;
  width: 100%;
  margin-bottom: 8px;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
}

.quote-export-v2-extra::placeholder {
  color: #94a3b8;
}

.quote-export-v2-extra:focus {
  outline: none;
  border-color: #14b8a6;
  box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.2);
}

.quote-export-v2-row input,
.quote-export-v2-text {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
  text-align: center;
  background: #fff;
  appearance: none;
  -webkit-appearance: none;
}

.quote-export-v2-row input:focus,
.quote-export-v2-text:focus {
  outline: none;
  border-color: #14b8a6;
  box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.2);
}

.quote-export-v2-note {
  margin: 0 0 12px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
}

.quote-export-v2-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 13px;
  color: #0f172a;
}

.btn-export-save {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 10px 12px;
  border: none;
  border-radius: 6px;
  background: #0d9488;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.btn-export-save:hover {
  background: #0f766e;
}

.quote-export-v2-section {
  margin-bottom: 14px;
}

.quote-export-v2-section-label {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 8px;
}

.quote-export-v2-select {
  display: block;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
  color: #0f172a;
  background: #fff;
}

.quote-export-v2-box {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px 14px;
  background: #fff;
}

.quote-export-v2-box--checks {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quote-export-v2-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #0f172a;
  cursor: pointer;
  user-select: none;
}

.quote-export-v2-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #0d9488;
  cursor: pointer;
}

.quote-export-v2-box--actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quote-export-v2-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-export-cn,
.btn-export-en {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 40px;
  padding: 10px 12px;
  border: none;
  border-radius: 6px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.btn-export-cn {
  background: #0d9488;
}

.btn-export-en {
  background: #0d9488;
}

.btn-export-cn:hover:not(:disabled),
.btn-export-en:hover:not(:disabled) {
  filter: brightness(1.05);
}

.btn-export-trigger {
  margin: 0 0 12px;
  background: linear-gradient(90deg, #0d9488, #14b8a6);
  border: none;
  color: #fff;
}

.btn-export-trigger:hover {
  filter: brightness(1.05);
  color: #fff;
}

@media (max-width: 720px) {
  .quote-export-v2-grid {
    grid-template-columns: 1fr;
  }
  .quote-export-v2-left {
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
  }
}

/* 询价标注弹窗 */
.quote-annotate-hint {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.quote-annotate-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quote-ann-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

.quote-ann-btn:hover:not(:disabled) {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.quote-ann-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.quote-ann-btn--done {
  background: #475569;
}

.quote-ann-btn--purchase {
  background: #0d9488;
}

.quote-ann-btn--settle {
  background: #2563eb;
}

.quote-annotate-pay {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #eff6ff;
}
.quote-annotate-pay__title {
  font-weight: 600;
  font-size: 13px;
  color: #1e3a8a;
  margin-bottom: 6px;
}
.quote-annotate-pay__status {
  margin: 0 0 8px;
  font-size: 13px;
  color: #1e40af;
}
.quote-annotate-pay__total {
  margin: 0 0 10px;
  font-size: 13px;
  color: #334155;
}
.quote-annotate-pay__radios {
  display: flex;
  gap: 16px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.quote-annotate-pay__radio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #0f172a;
  cursor: pointer;
}
.quote-annotate-pay__row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.quote-annotate-pay__row label {
  font-size: 13px;
  color: #475569;
  min-width: 64px;
}
.quote-annotate-pay__row input {
  flex: 1;
  min-width: 140px;
  max-width: 220px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
}
.quote-annotate-pay__remain {
  margin: 0 0 10px;
  font-size: 13px;
  color: #b45309;
}
.quote-annotate-pay__remain.is-full {
  color: #047857;
}
.quote-annotate-pay__remain strong {
  font-size: 14px;
}
.quote-annotate-pay__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.quote-annotate-pay__tip {
  font-size: 12px;
  color: #b45309;
}

.quote-ann-btn--invoice {
  background: #7c3aed;
}

.quote-ann-btn--invoice.is-active {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.65);
}

.quote-annotate-invoice {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.quote-annotate-invoice-title {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 10px;
}

.quote-annotate-invoice-form {
  gap: 10px;
}

.quote-annotate-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
}

/* 详情弹窗内嵌导出 */
.quote-detail-export {
  margin: 12px 0 14px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.quote-detail-export-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  margin-bottom: 10px;
}

.quote-detail-export-label {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
}

.quote-detail-export-hint {
  font-size: 12px;
  color: #64748b;
}

.quote-detail-export .quote-export-split {
  gap: 10px;
}

.quote-detail-export .quote-export-col {
  padding: 10px;
  background: #fff;
}

.quote-detail-export .quote-export-link {
  min-height: 36px;
  margin-bottom: 6px;
  font-size: 12px;
}

@media (max-width: 560px) {
  .quote-export-split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1200px) {
  .quote-settle-grid {
    grid-template-columns: 1fr;
  }
}

.quote-action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  min-width: max-content;
  flex-shrink: 0;
  padding: 8px 14px;
  overflow: visible;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-primary);
  text-decoration: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-xs);
}

.quote-action-btn:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
  color: var(--text-primary);
}

.quote-action-btn strong {
  display: inline;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
}

.quote-action-btn small {
  display: block;
  font-size: 10px;
  color: var(--text-tertiary);
  line-height: 1.25;
  margin-top: 1px;
}

.quote-action-btn--create {
  border-color: rgba(16, 185, 129, 0.45);
  background: linear-gradient(180deg, #ecfdf5 0%, #d1fae5 100%);
}

.quote-action-btn--create svg { color: #059669; flex-shrink: 0; }

.quote-action-btn--smart {
  border-color: rgba(79, 70, 229, 0.35);
  background: linear-gradient(180deg, #eef2ff 0%, #e0e7ff 100%);
}

.quote-action-btn--smart svg { color: #4f46e5; flex-shrink: 0; }

.quote-action-btn--email {
  border-color: rgba(14, 165, 233, 0.35);
  background: linear-gradient(180deg, #f0f9ff 0%, #e0f2fe 100%);
}

.quote-action-btn--email svg { color: #0284c7; flex-shrink: 0; }

.quote-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 0;
  padding: 3px 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.quote-metric-val {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

.quote-metric-lbl {
  font-size: 11px;
  color: var(--text-tertiary);
  white-space: nowrap;
  margin-top: 2px;
}

.quote-metric--info { border-left: 3px solid #1677ff; }
.quote-metric--success { border-left: 3px solid #52c41a; }
.quote-metric--warn { border-left: 3px solid #faad14; }
.quote-metric--purple { border-left: 3px solid #722ed1; }

.list-table-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 14px;
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
  font-size: 13px;
}

.list-table-foot-stats {
  margin-left: 16px;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  color: var(--text-secondary, #4b5563);
}

.list-table-foot-stats strong {
  font-weight: 600;
  color: var(--text, #1f2937);
}

.list-table-foot-stats-sub {
  margin-left: 2px;
  font-size: 12px;
  color: var(--text-muted, #9ca3af);
}

.page-wrap--quote {
  padding-top: 12px;
}

.page-wrap--quote .card-flush .card-toolbar,
.page-wrap--quote .card-flush .toolbar {
  padding: 10px 14px;
}

@media (max-width: 960px) {
  .quote-list-toolbar {
    flex-wrap: wrap;
  }
  .quote-metric { min-height: 40px; }
}

@media (max-width: 480px) {
  .quote-list-toolbar {
    flex-wrap: wrap;
  }
}

/* 旧大卡片入口（保留兼容） */
.quote-entry-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.quote-entry-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-primary);
  text-decoration: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-xs);
}

.quote-entry-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
  color: var(--text-primary);
}

.quote-entry-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.quote-entry-card--create .quote-entry-card-icon {
  background: var(--primary-light);
  color: var(--primary);
}

.quote-entry-card--smart .quote-entry-card-icon {
  background: #f0f5ff;
  color: #4f46e5;
}

.quote-entry-card-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 4px;
}

.quote-entry-card-desc {
  font-size: 13px;
  color: var(--text-tertiary);
  margin: 0;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .quote-entry-bar { grid-template-columns: 1fr; }
  .page-wrap { padding: 16px; }
}

.quote-list-table .quote-no {
  font-size: 13px;
  background: var(--bg-subtle);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.quote-list-table-wrap {
  overflow-x: auto;
}

.quote-list-table {
  table-layout: fixed;
  width: 100%;
  min-width: 1696px;
  font-size: 13px;
  margin: 0;
}

.quote-list-table col.w-id { width: 48px; }
.quote-list-table col.w-customer { width: 140px; }
.quote-list-table col.w-quote-no { width: 190px; }
.quote-list-table col.w-created { width: 116px; }
.quote-list-table col.w-completion { width: 100px; }
.quote-list-table col.w-amount { width: 120px; }
.quote-list-table col.w-follow { width: 240px; }
.quote-list-table col.w-sales { width: 100px; }
.quote-list-table col.w-ops { width: 642px; }

.quote-list-table tbody tr:nth-child(even) {
  background: #fafafa;
}

.quote-list-table tbody tr:hover {
  background: #f5f5f5;
}

/* 覆盖 .data-table 默认 padding / 对齐，表头与表体左右居中一致 */
.data-table.quote-list-table th,
.data-table.quote-list-table td {
  padding: 8px 10px !important;
  text-align: center !important;
  vertical-align: middle;
  line-height: 1.35;
  box-sizing: border-box;
}

.data-table.quote-list-table th {
  position: static;
  white-space: nowrap;
}

.data-table.quote-list-table td.col-id {
  color: var(--text-tertiary);
}

.data-table.quote-list-table td.col-created {
  font-size: 12px;
  white-space: nowrap;
}

.data-table.quote-list-table td.col-sales {
  font-size: 12px;
}

.data-table.quote-list-table .quote-customer-cell,
.data-table.quote-list-table .quote-customer-name {
  text-align: center;
}

.data-table.quote-list-table .quote-no-link {
  display: inline-block;
}

.data-table.quote-list-table td.col-follow .quote-follow-tags {
  justify-content: center;
  width: 100%;
  margin: 0;
}

.data-table.quote-list-table td.col-completion .completion-badge {
  margin: 0 auto;
}

.data-table.quote-list-table td.col-ops {
  text-align: center !important;
}

.data-table.quote-list-table td.col-ops .quote-ops-bar {
  display: inline-flex;
  justify-content: center;
  vertical-align: middle;
}

.data-table.quote-list-table .col-ops {
  padding-right: 10px !important;
  overflow: visible;
}

.quote-no-link {
  color: #389e0d;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
}

.quote-no-link:hover {
  color: #237804;
  text-decoration: underline;
}

.quote-customer-cell {
  display: block;
  min-width: 0;
}

.quote-customer-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
  color: var(--text-primary);
}

.quote-amount-ex {
  color: #389e0d;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}

.completion-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 22px;
  padding: 0;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  border: 1px solid #d9d9d9;
  box-sizing: border-box;
}

.completion-badge--empty {
  background: #fafafa;
  color: #8c8c8c;
  border-color: #d9d9d9;
}

.completion-badge--partial {
  background: #fff7e6;
  color: #d46b08;
  border-color: #ffd591;
}

.completion-badge--done {
  background: #f6ffed;
  color: #389e0d;
  border-color: #b7eb8f;
}

.quote-follow-tags {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
}

.quote-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 7px;
  border-radius: 11px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  flex-shrink: 0;
}

.quote-tag--neutral {
  background: #f5f5f5;
  color: #595959;
}

.quote-tag--success {
  background: #f6ffed;
  color: #389e0d;
}

.quote-tag--warn {
  background: #fff7e6;
  color: #d46b08;
}

.quote-tag--teal {
  background: #e6fffb;
  color: #08979c;
}

.quote-ops-bar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 3px;
}

.quote-op-form {
  display: inline-flex;
  margin: 0;
  padding: 0;
}

.quote-op-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 24px;
  padding: 0 4px;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  line-height: 1;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.quote-op-btn:hover {
  filter: brightness(1.08);
  color: #fff;
}

.quote-op-btn:active {
  transform: translateY(1px);
}

.quote-op-btn--green { background: #3cb371; }
.quote-op-btn--green:hover { background: #4fd082; }
.quote-op-btn--green2 { background: #2fa364; }
.quote-op-btn--green2:hover { background: #3cb371; }
.quote-op-btn--purple { background: #722ed1; }
.quote-op-btn--purple:hover { background: #9254de; }
.quote-op-btn--blue { background: #2f54eb; }
.quote-op-btn--blue:hover { background: #597ef7; }
.quote-op-btn--pink { background: #eb2f96; }
.quote-op-btn--pink:hover { background: #f759ab; }
.quote-op-btn--cyan { background: #13c2c2; }
.quote-op-btn--cyan:hover { background: #36cfc9; }
.quote-op-btn--teal { background: #08979c; }
.quote-op-btn--teal:hover { background: #13c2c2; }
.quote-op-btn--orange { background: #fa8c16; }
.quote-op-btn--orange:hover { background: #ffa940; }
.quote-op-btn--amber { background: #d48806; }
.quote-op-btn--amber:hover { background: #faad14; }
.quote-op-btn--red { background: #ff4d4f; }
.quote-op-btn--red:hover { background: #ff7875; }

@media (max-width: 1200px) {
  .quote-list-table col.w-ops { width: 420px; }
  .quote-ops-bar {
    flex-wrap: wrap;
    max-width: 420px;
  }
  .quote-op-btn {
    width: auto;
    min-width: 56px;
    padding: 0 8px;
    font-size: 11px;
  }
}

@media (max-width: 768px) {
  .quote-list-table col.w-ops { width: 100%; }
  .data-table.quote-list-table td.col-ops .quote-ops-bar {
    max-width: none;
    gap: 6px;
  }
  .quote-op-btn {
    flex: 1 1 calc(33.33% - 6px);
    min-width: 0;
    height: 28px;
  }
}

.modal-header--green {
  background: #3cb371;
  border-bottom: none;
  color: #fff;
  padding-right: 56px;
  min-height: 52px;
}

.modal-header--green h3 {
  color: #fff;
}

.modal-header--purple {
  background: linear-gradient(180deg, #7c3aed 0%, #6d28d9 100%);
  border-bottom: none;
  color: #fff;
  padding-right: 56px;
  min-height: 52px;
}

.modal-header--purple h3 {
  color: #fff;
}

.modal-header--danger {
  background: #dc2626;
  border-bottom: none;
  color: #fff;
  padding-right: 56px;
  min-height: 52px;
}

.modal-header--danger h3 {
  color: #fff;
}

.modal-header--danger .modal-close {
  color: #ef4444;
}

/* 弹窗右上角关闭：统一线性红色 × */
.modal-backdrop > .modal {
  position: relative;
}

.modal-x,
.quote-modal-x,
.modal-backdrop > .modal .modal-header .modal-close,
.modal-backdrop > .modal .modal-header-actions .modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 30;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #ef4444;
  font-size: 0;
  line-height: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  opacity: 1;
  transform: none;
  transition: color 0.15s ease, background 0.15s ease;
}

.modal-x__icon {
  width: 22px;
  height: 22px;
  display: block;
}

.modal-x:hover,
.quote-modal-x:hover,
.modal-backdrop > .modal .modal-header .modal-close:hover,
.modal-backdrop > .modal .modal-header-actions .modal-close:hover {
  color: #dc2626;
  background: rgba(239, 68, 68, 0.1);
  transform: none;
  box-shadow: none;
}

.modal-x:focus-visible,
.quote-modal-x:focus-visible,
.modal-backdrop > .modal .modal-header .modal-close:focus-visible {
  outline: 2px solid rgba(239, 68, 68, 0.45);
  outline-offset: 2px;
}

.quote-modal-x > span,
.modal-backdrop > .modal .modal-header .modal-close > span {
  display: none;
}

.modal-backdrop > .modal .modal-header .modal-close::before,
.modal-backdrop > .modal .modal-header .modal-close::after,
.quote-modal-x::before,
.quote-modal-x::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

.modal-backdrop > .modal .modal-header .modal-close::before,
.quote-modal-x::before {
  transform: rotate(45deg);
}

.modal-backdrop > .modal .modal-header .modal-close::after,
.quote-modal-x::after {
  transform: rotate(-45deg);
}

.modal-header--green,
.modal-header--teal,
.modal-header--purple,
.modal-header--danger {
  padding-right: 48px;
}

.modal-header--green .modal-close,
.modal-header--green .btn-close,
.modal-header--teal .modal-close,
.modal-header--purple .modal-close,
.modal-header--danger .modal-close {
  background: transparent;
  color: #ef4444;
  --tblr-btn-close-color: #ef4444;
  opacity: 1;
}

.modal-header--green .modal-close:hover,
.modal-header--green .btn-close:hover,
.modal-header--teal .modal-close:hover,
.modal-header--purple .modal-close:hover,
.modal-header--danger .modal-close:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  opacity: 1;
}

.modal--quote-action {
  width: min(420px, 100%);
}

.quote-action-body {
  padding: 16px 18px;
  max-height: min(65vh, 480px);
  overflow: auto;
}

.quote-action-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-bottom: 12px;
  padding: 10px 12px;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  font-size: 13px;
}

.quote-detail-edit-form {
  margin-bottom: 12px;
}

.quote-detail-edit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 12px;
}

.quote-detail-edit-grid .form-field {
  margin: 0;
}

.quote-detail-edit-grid .form-field label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--text-muted, #64748b);
}

.quote-detail-edit-grid .form-field input,
.quote-detail-edit-grid .form-field select {
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 720px) {
  .quote-detail-edit-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.quote-action-table {
  max-height: min(58vh, 560px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.quote-action-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.quote-action-form .form-field:last-child {
  grid-column: 1 / -1;
}

.quote-email-lang-block {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-subtle, #f8fafc);
}

.quote-email-lang-block + .quote-email-lang-block {
  margin-top: 4px;
}

.quote-email-lang-title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary, #475467);
}

.quote-email-attach-hint {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.5;
  color: #475467;
  background: #f8fafc;
  border: 1px solid #e4e7ec;
}

.quote-email-attach-hint--ok {
  color: #0f766e;
  background: #ecfdf5;
  border-color: #99f6e4;
}

.quote-email-attach-hint--warn {
  color: #b45309;
  background: #fffbeb;
  border-color: #fde68a;
}

/* 邮箱配置弹窗 */
.modal--email-settings {
  width: min(1280px, 100%);
}

.modal-header--teal {
  background: linear-gradient(135deg, #20b2aa 0%, #17a89f 100%);
  border-bottom: none;
  color: #fff;
}

.modal-header--teal h3 {
  color: #fff;
}

.email-settings-body {
  padding: 0 !important;
  background: #f4f7f9;
}

.email-settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 0;
  min-height: 520px;
}

.email-settings-main {
  padding: 18px 20px 20px;
  overflow: auto;
}

.email-settings-section {
  background: #fff;
  border: 1px solid var(--border, #e4e7ec);
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.email-settings-section + .email-settings-section {
  margin-top: 14px;
}

.email-settings-section__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.email-settings-section__head h4 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
}

.email-settings-section__head p {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted, #667085);
  line-height: 1.45;
}

.email-settings-section__head p code {
  font-size: 11px;
  padding: 1px 5px;
  border-radius: 4px;
  background: #f2f4f7;
}

.email-settings-section__icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e6fffb;
  color: #0d9488;
  flex-shrink: 0;
}

.email-settings-badge {
  margin-left: auto;
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  color: #667085;
  background: #f2f4f7;
}

.email-settings-badge--ok {
  color: #0f766e;
  background: #d1fae5;
}

.email-settings-badge--warn {
  color: #b45309;
  background: #fef3c7;
}

.email-settings-grid .form-field label {
  font-size: 12px;
}

.email-settings-checks {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.email-template-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.email-template-tab {
  border: 1px solid var(--border, #e4e7ec);
  background: #fff;
  color: #475467;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.email-template-tab.is-active {
  border-color: #20b2aa;
  background: #e6fffb;
  color: #0f766e;
}

.email-template-panel .form-field + .form-field {
  margin-top: 10px;
}

.email-settings-preview {
  padding: 18px 18px 20px;
  border-left: 1px solid var(--border, #e4e7ec);
  background: linear-gradient(180deg, #eef7f7 0%, #f8fafb 100%);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.email-settings-preview__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.email-settings-preview__head h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.email-preview-lang {
  display: inline-flex;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.email-preview-lang-btn {
  border: 0;
  background: transparent;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #667085;
  cursor: pointer;
}

.email-preview-lang-btn.is-active {
  background: #20b2aa;
  color: #fff;
}

.email-preview-card {
  background: #fff;
  border: 1px solid #dbe4ea;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.email-preview-meta {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 8px;
  font-size: 12px;
  margin-bottom: 8px;
}

.email-preview-meta__label {
  color: #98a2b3;
}

.email-preview-meta__val {
  color: #344054;
  word-break: break-word;
}

.email-preview-meta__val--subject {
  font-weight: 600;
}

.email-preview-body {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #e4e7ec;
  font-size: 13px;
  line-height: 1.65;
  color: #475467;
  min-height: 120px;
  white-space: normal;
}

.email-preview-attach {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  color: #0f766e;
  font-size: 12px;
  font-weight: 600;
}

.email-preview-attach[hidden] {
  display: none !important;
}

.email-settings-preview__hint {
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .email-settings-layout {
    grid-template-columns: 1fr;
  }

  .email-settings-preview {
    border-left: 0;
    border-top: 1px solid var(--border, #e4e7ec);
  }
}

/* 编辑询价单：双列紧凑布局，不出现滚动条 */
.modal--edit,
#quoteActionDialog.modal--edit {
  width: min(700px, 100%);
  max-height: none;
  overflow: visible;
}

#quoteActionDialog.modal--edit .quote-action-body,
.quote-action-body.quote-action-body--edit {
  max-height: none;
  overflow: visible;
  padding: 14px 20px 8px;
}

.quote-action-form--edit-grid {
  grid-template-columns: 1fr 1fr;
  gap: 10px 24px;
}

.quote-action-form--edit-grid .form-field {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin: 0;
}

.quote-action-form--edit-grid .form-field label {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.quote-action-form--edit-grid .form-field input,
.quote-action-form--edit-grid .form-field textarea {
  width: 100%;
  min-height: 34px;
  padding: 6px 10px;
  font-size: 13px;
}

.quote-action-form--edit-grid .form-field--check {
  grid-column: 1 / -1;
  grid-template-columns: auto;
  padding-left: 72px;
}

.quote-action-form--edit-grid .form-field--check label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.quote-action-form--edit-grid .form-field--remark {
  grid-column: 1 / -1;
  align-items: start;
}

.quote-action-form--edit-grid .form-field--remark textarea {
  min-height: 48px;
  resize: none;
  line-height: 1.4;
}

#quoteActionDialog.modal--edit .modal-footer {
  padding: 10px 20px 16px;
  border-top: 1px solid var(--border-light);
}

@media (max-width: 640px) {
  .quote-action-form--edit-grid {
    grid-template-columns: 1fr;
  }
  .quote-action-form--edit-grid .form-field--check {
    padding-left: 0;
  }
}

.quote-action-hint {
  margin: 0 0 12px;
}

.quote-action-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quote-action-stack .btn-block {
  width: 100%;
  justify-content: center;
}

.quote-action-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 14px 0;
}

.btn-teal { background: #0d9488; color: #fff; border-color: transparent; }
.btn-teal:hover:not(:disabled) { background: #0f766e; color: #fff; }

.quote-workspace-bar .btn.ws-btn-smart {
  background: linear-gradient(180deg, #7c3aed 0%, #6d28d9 100%);
  color: #fff;
  border-color: #6d28d9;
}
.quote-workspace-bar .btn.ws-btn-smart:hover:not(:disabled),
.quote-workspace-bar .btn.ws-btn-smart:active:not(:disabled),
.quote-workspace-bar .btn.ws-btn-smart:focus-visible:not(:disabled) {
  background: linear-gradient(180deg, #6d28d9 0%, #5b21b6 100%);
  color: #fff;
  border-color: #5b21b6;
}
.btn-cyan { background: #0891b2; color: #fff; border-color: transparent; }
.btn-cyan:hover:not(:disabled) { background: #0e7490; color: #fff; }

.quote-chat-box {
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px;
  margin-bottom: 10px;
  background: #fafafa;
}

.quote-chat-msg {
  margin-bottom: 8px;
  font-size: 13px;
  line-height: 1.5;
}

.quote-chat-msg small {
  display: block;
  color: var(--text-tertiary);
  font-size: 11px;
}

.quote-chat-sender {
  font-weight: 600;
  color: var(--primary);
}

.quote-chat-form {
  display: flex;
  gap: 8px;
}

.quote-chat-form input {
  flex: 1;
  min-height: 36px;
}

.quote-upload-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.quote-upload-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quote-upload-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 13px;
}

.quote-upload-item small {
  color: var(--text-tertiary);
  font-size: 11px;
}

@media (max-width: 768px) {
  .quote-action-form {
    grid-template-columns: 1fr;
  }
}

.quote-remark-hint {
  font-size: 12px;
  color: var(--text-quaternary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}

.completion-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 100px;
}

.completion-bar {
  height: 6px;
  background: var(--bg-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.completion-bar span {
  display: block;
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.completion-bar--empty span { width: 0 !important; background: var(--text-quaternary); }
.completion-bar--partial span { background: var(--warning); }
.completion-bar--done span { background: var(--success); }

.completion-text {
  font-size: 11px;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.quote-actions-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.quote-actions-cell .inline-form {
  display: inline-flex;
  margin: 0;
}

.text-danger { color: var(--danger) !important; }

/* ── 杂项 ── */
.text-muted { color: var(--text-tertiary); font-size: 13px; }
.actions-cell { white-space: nowrap; }
.actions-cell a { margin-right: 10px; font-weight: 500; }

.data-table.customers-table th,
.data-table.customers-table td {
  text-align: center;
  vertical-align: middle;
}

.data-table.customers-table td.col-ops {
  text-align: center;
}

.customer-ops-bar {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.customer-ops-form {
  display: inline-flex;
  margin: 0;
}

.customer-ops-bar .quote-op-btn {
  min-width: 64px;
  padding: 5px 12px;
  font-size: 12px;
}
.row-editing td { background: var(--primary-light) !important; }
.lookup-hit { border-color: var(--primary) !important; box-shadow: 0 0 0 3px var(--primary-ring) !important; }
mark { background: #fff566; padding: 1px 4px; border-radius: 3px; }
.plain-list { margin: 0; padding-left: 20px; line-height: 2; }

.progress-wrap { width: 100%; }
.progress-bar {
  height: 6px;
  background: var(--bg-muted);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0;
  background: var(--primary-gradient);
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}

/* ── 登录页 ── */
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.login-hero {
  background: var(--primary-gradient);
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.login-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(255,255,255,0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.1) 0%, transparent 40%);
}

.login-hero-inner { position: relative; z-index: 1; max-width: 420px; }

.login-hero .brand-mark {
  width: 56px;
  height: 56px;
  font-size: 24px;
  margin-bottom: 32px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.login-hero h1 {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 16px;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.login-hero p {
  font-size: 16px;
  opacity: 0.9;
  line-height: 1.7;
  margin: 0;
}

.login-features {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  opacity: 0.95;
}

.login-feature-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.8);
  flex-shrink: 0;
}

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  background: var(--bg-page);
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-elevated);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.login-card h2 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
}

.login-card .login-desc {
  color: var(--text-tertiary);
  margin: 0 0 32px;
  font-size: 14px;
}

.login-card .form-row { margin-bottom: 20px; }
.login-card label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}
.login-card input { width: 100%; padding: 10px 14px; }

/* ── 管理后台 ── */
.admin-layout {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  min-height: 100vh;
  width: 100%;
  background: var(--bg-page);
}

.admin-sidebar {
  width: 220px;
  flex: 0 0 220px;
  background: linear-gradient(180deg, #001529 0%, #002140 100%);
  color: #fff;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 4px 0 16px rgba(0, 0, 0, 0.08);
  margin: 0;
  padding: 0;
}

.admin-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0;
  min-width: 0;
}

.admin-brand {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-brand-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  color: #fff;
}

.admin-brand-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 6px;
  padding-left: 42px;
}
.admin-brand-sub--has-logo {
  padding-left: 0;
}

.admin-nav-section {
  padding: 10px 12px 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.35);
}

.admin-nav-top {
  margin-bottom: 4px;
}

.admin-nav-group {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-nav-group__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background var(--transition), color var(--transition);
}

.admin-nav-group__toggle:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.admin-nav-group__label {
  flex: 1;
  min-width: 0;
}

.admin-nav-group__chevron {
  flex-shrink: 0;
  opacity: 0.7;
  transition: transform 0.2s ease;
}

.admin-nav-group.is-open .admin-nav-group__chevron {
  transform: rotate(180deg);
}

.admin-nav-group__panel {
  display: none;
  padding-bottom: 4px;
}

.admin-nav-group.is-open .admin-nav-group__panel {
  display: block;
}

.admin-nav-group__panel a {
  padding-left: 22px;
  font-size: 13px;
}

.admin-sidebar a,
.admin-sidebar a.admin-nav-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  margin: 0;
  border-radius: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  transition: all var(--transition);
  text-decoration: none;
  box-sizing: border-box;
  width: 100%;
}

.admin-sidebar a span {
  flex: 1;
  min-width: 0;
}

.admin-sidebar a .nav-icon,
.admin-sidebar a svg.nav-icon {
  width: 18px;
  height: 18px;
  min-width: 18px;
  flex-shrink: 0;
  opacity: 0.85;
}

.admin-sidebar a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.admin-sidebar a.active {
  background: var(--primary);
  color: #fff;
  box-shadow: none;
}

.admin-sidebar a.active .nav-icon,
.admin-sidebar a.active svg.nav-icon { opacity: 1; }

.admin-sidebar-footer {
  margin-top: auto;
  padding: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-sidebar-footer a {
  padding: 12px 14px;
}

.admin-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.admin-topbar {
  height: var(--nav-h);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--divider);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-xs);
}

.admin-topbar .admin-breadcrumb {
  flex: 1;
  min-width: 0;
}

.admin-topbar .user-chip {
  margin-left: auto;
  flex-shrink: 0;
}

.admin-topbar-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.admin-content {
  flex: 1;
  padding: 12px 20px 24px;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

.admin-page-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.admin-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.admin-breadcrumb-root { color: var(--text-tertiary); }
.admin-breadcrumb-sep { color: var(--text-quaternary); }
.admin-breadcrumb-current { color: var(--text-primary); font-weight: 600; }

.admin-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-right: 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-input);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  cursor: pointer;
  flex-shrink: 0;
}

.admin-nav-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.admin-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 350;
}

.admin-sidebar-backdrop.is-visible { display: block; }

/* 设置页分栏面板 */
.settings-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.settings-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  background: var(--bg-subtle);
}

.settings-panel .card-heading {
  margin-bottom: 10px;
  font-size: 14px;
}

.settings-panel .form-grid {
  gap: 10px 12px;
}

.site-seo-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.media-preview-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.media-preview-thumb {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff;
  flex-shrink: 0;
}

.media-preview-thumb--wide {
  width: 80px;
  height: 48px;
  object-fit: cover;
}

/* 仪表盘快捷入口 */
.admin-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.admin-quick-link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  color: var(--text-primary);
  text-decoration: none;
  transition: border-color var(--transition), box-shadow var(--transition), transform 0.15s;
  min-height: 72px;
}

.admin-quick-link:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
  color: var(--primary);
  transform: translateY(-1px);
}

.admin-quick-link__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--primary-light);
  color: var(--primary);
}

.admin-quick-link__label {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
}

.admin-quick-link__badge {
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: var(--danger);
  border-radius: 999px;
  padding: 1px 7px;
  margin-left: auto;
}

.admin-dash-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.admin-dash-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.admin-dash-list li:last-child { border-bottom: none; padding-bottom: 0; }
.admin-dash-list li:first-child { padding-top: 0; }

.admin-dash-list a {
  color: var(--text-primary);
  font-weight: 500;
}

.admin-dash-list a:hover { color: var(--primary); }

.role-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.role-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  background: var(--bg-subtle);
}

.role-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.role-card__icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  color: var(--primary);
}

.role-card__title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.role-card__code {
  font-size: 12px;
  color: var(--text-tertiary);
}

.role-card__desc {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

@media (max-width: 980px) {
  .settings-panel-grid,
  .site-seo-two-col,
  .role-cards {
    grid-template-columns: 1fr;
  }
}

/* 后台页面组件 */
.admin-grid-2 {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 16px;
  align-items: start;
}

.settings-split-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
  max-width: 100%;
}

@media (max-width: 960px) {
  .settings-split-layout,
  .admin-grid-2 {
    grid-template-columns: 1fr;
  }
}

.admin-stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.admin-stat-mini {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-xs);
}

.admin-stat-mini-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.admin-stat-mini-val {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.admin-stat-mini-lbl {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.upload-zone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 36px 24px;
  text-align: center;
  background: linear-gradient(180deg, #fafafa 0%, #fff 100%);
  transition: all var(--transition);
  cursor: pointer;
  position: relative;
}

.upload-zone:hover,
.upload-zone.is-dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.upload-zone input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.upload-zone-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-zone-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 6px;
}

.upload-zone-hint {
  font-size: 13px;
  color: var(--text-tertiary);
  margin: 0;
}

.upload-filename {
  margin-top: 12px;
  font-size: 13px;
  color: var(--primary);
  font-weight: 500;
}

.settings-section {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.settings-section:first-child { padding-top: 0; }
.settings-section:last-child { border-bottom: none; padding-bottom: 0; }

.settings-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-section-desc {
  font-size: 13px;
  color: var(--text-tertiary);
  margin: -8px 0 16px;
}

.switch-row {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  width: fit-content;
  max-width: 100%;
  cursor: pointer;
}

.switch-row label,
.switch-row > span {
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  flex: 0 1 auto;
}

.info-panel {
  background: linear-gradient(135deg, #f6ffed 0%, #fff 100%);
  border: 1px solid #b7eb8f;
  border-radius: var(--radius-lg);
  padding: 20px;
}

.info-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 12px;
}

.info-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.info-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  font-size: 13px;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(0,0,0,0.04);
}
.info-list li:last-child { border-bottom: none; }

.info-list li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  margin-top: 7px;
  flex-shrink: 0;
}

.code-block {
  display: block;
  padding: 12px 16px;
  background: #1e1e1e;
  color: #d4d4d4;
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  overflow-x: auto;
  margin: 12px 0;
}

.nav-toggle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.nav-toggle-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  transition: all var(--transition);
  cursor: pointer;
}

.nav-toggle-item:hover { border-color: var(--primary); background: var(--primary-light); }
.nav-toggle-item.is-checked { border-color: var(--primary); background: var(--primary-light); }
.switch-row input[type="checkbox"],
.switch-row input[type="radio"] {
  width: 16px;
  height: 16px;
  min-height: 0;
  flex: 0 0 16px;
}
.nav-toggle-item input { width: 16px; height: 16px; min-height: 0; flex: 0 0 16px; accent-color: var(--primary); }
.nav-toggle-item span { font-size: 14px; color: var(--text-primary); font-weight: 500; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
}
.status-pill.ok { background: var(--success-bg); color: var(--success); border: 1px solid #b7eb8f; }
.status-pill.err { background: var(--danger-bg); color: var(--danger); border: 1px solid #ffccc7; }

.license-key-input {
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.05em;
  padding: 12px 16px !important;
}

.form-actions-bar {
  display: flex;
  gap: 10px;
  padding-top: 20px;
  margin-top: 8px;
  border-top: 1px solid var(--border);
}

/* 会员页扩展 */
.import-panel {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
}
.import-panel summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--text-secondary);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.import-panel summary::-webkit-details-marker { display: none; }
.import-panel[open] summary { color: var(--primary); margin-bottom: 12px; }
.import-panel--inline {
  flex: 0 1 auto;
  border-bottom: none;
}
.import-panel-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
}
.import-panel-bar--alert-only {
  justify-content: flex-start;
}
.member-stock-alert {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: min(520px, 100%);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.member-stock-alert:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #991b1b;
}
.product-row--low-stock {
  background: #fff7ed;
}
.product-low-stock-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #ffedd5;
  color: #c2410c;
  font-size: 10px;
  font-weight: 700;
}

.quote-total-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 20px;
  background: linear-gradient(90deg, var(--primary-light) 0%, #fff 100%);
  border-bottom: 1px solid var(--border);
}
.quote-total-bar .total-label { font-size: 13px; color: var(--text-tertiary); }
.quote-total-bar .total-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-active);
  letter-spacing: -0.02em;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.feature-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--transition), transform var(--transition);
}
.feature-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.feature-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.feature-card h4 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}
.feature-card p {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-tertiary);
  line-height: 1.6;
}

.menu-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}
.menu-status-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.menu-status-item code {
  font-size: 11px;
  color: var(--text-tertiary);
}

.smart-panel {
  border: 1px solid var(--border);
  margin-bottom: 16px;
}

.smart-panel-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
  list-style: none;
  user-select: none;
}

.smart-panel-summary::-webkit-details-marker { display: none; }

.smart-panel-summary .text-muted {
  font-weight: 400;
  font-size: 13px;
}

.smart-panel[open] .smart-panel-summary {
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
}

.smart-panel-body {
  padding: 16px 20px 20px;
}

.quote-edit-smart-card {
  padding: 20px;
  margin-bottom: 16px;
}

.quote-edit-smart-card .smart-modal-body {
  padding: 0;
}

.quote-edit-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.quote-edit-stat {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  text-align: center;
}

.quote-edit-stat-val {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.quote-edit-stat-lbl {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

.quote-edit-stat--amount .quote-edit-stat-val {
  color: var(--primary-active);
}

.quote-add-row-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.quote-items-table .row-unquoted {
  background: #fffbeb;
}

.quote-items-table .row-unquoted:hover td {
  background: #fef3c7;
}

.quote-items-foot td {
  background: var(--bg-subtle);
  font-weight: 500;
  border-top: 2px solid var(--border);
}

.quote-edit-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  background: #fff;
}

.quote-edit-footer__form {
  margin: 0;
  display: inline-flex;
}

@media (max-width: 640px) {
  .quote-edit-footer {
    justify-content: stretch;
  }
  .quote-edit-footer .btn {
    flex: 1 1 auto;
    min-width: 0;
  }
}

@media (max-width: 768px) {
  .quote-edit-stats { grid-template-columns: 1fr 1fr; }
}

.search-hero {
  padding: 32px 24px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-subtle) 0%, #fff 100%);
}
.search-hero .input-group {
  max-width: 520px;
  margin: 16px auto 0;
}
.search-hero-title {
  font-size: 15px;
  color: var(--text-secondary);
  margin: 0;
}

/* ── Modal ── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 5000;
  padding: 16px;
  animation: fadeIn 0.2s ease;
}

.modal-backdrop.is-open {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: center;
  overflow: hidden;
  padding: 20px 16px;
}

.modal-backdrop.modal-backdrop--stack {
  z-index: 5100;
}

.modal-backdrop.is-open:has(> .modal.modal--sm:not(.modal--settle)),
.modal-backdrop.is-open:has(> .modal.modal--md),
.modal-backdrop.is-open:has(> .modal.modal--lg:not(.modal--settle)) {
  align-items: center !important;
  overflow-y: hidden;
}

body.modal-open {
  overflow: hidden;
}

.modal {
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  width: min(520px, 100%);
  max-height: none;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}

.modal--sm {
  width: min(420px, 100%);
}

.modal--md {
  width: min(560px, 100%);
}

.modal--lg {
  width: min(720px, 100%);
}

.modal--xl {
  width: min(1180px, 100%);
}

.modal--wide {
  width: min(920px, 100%);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg-elevated);
  z-index: 1;
}

.modal-header h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

/* 必须写在 .modal-header 之后，否则绿/紫等底色会被上面的 elevated 白底盖掉，标题白字变「空白」 */
.modal-header.modal-header--green {
  background: #3cb371;
  border-bottom: none;
  color: #fff;
}
.modal-header.modal-header--green h3 {
  color: #fff;
}
.modal-header.modal-header--teal {
  background: #0d9488;
  border-bottom: none;
  color: #fff;
}
.modal-header.modal-header--teal h3 {
  color: #fff;
}
.modal-header.modal-header--purple {
  background: linear-gradient(180deg, #7c3aed 0%, #6d28d9 100%);
  border-bottom: none;
  color: #fff;
}
.modal-header.modal-header--purple h3 {
  color: #fff;
}
.modal-header.modal-header--danger {
  background: #dc2626;
  border-bottom: none;
  color: #fff;
}
.modal-header.modal-header--danger h3 {
  color: #fff;
}
.modal-header.modal-header--amber {
  background: #d97706;
  border-bottom: none;
  color: #fff;
}
.modal-header.modal-header--amber h3 {
  color: #fff;
}

.modal-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}

.modal-header-actions .modal-close {
  margin-left: 0;
}

.btn-sq-background {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid #20B2AA;
  border-radius: var(--radius-md);
  background: #fff;
  color: #20B2AA;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn-sq-background:hover:not(:disabled) {
  background: #20B2AA;
  color: #fff;
}

.btn-sq-background:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.sq-bg-toast {
  position: relative;
  padding: 12px 36px 12px 14px;
  animation: slideDown 0.25s ease;
}

.sq-bg-toast-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.sq-bg-toast-body {
  font-size: 13px;
  line-height: 1.5;
}

.sq-bg-toast-link {
  border: none;
  background: none;
  padding: 0;
  color: #20B2AA;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.sq-bg-toast-link:hover {
  color: #1a9a93;
}

.sq-bg-toast-close {
  position: absolute;
  top: 8px;
  right: 8px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
}

.sq-bg-toast.alert-info {
  background: #ecfeff;
  border-color: #a5f3fc;
  color: #0e7490;
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 20px 16px;
  margin-top: 0;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.smart-modal-footer {
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 14px;
  padding-top: 16px;
  padding-bottom: 20px;
}

.smart-modal-footer__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.smart-import-type {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
}

.smart-import-type__label {
  font-size: 13px;
  color: var(--text-secondary, #606266);
  white-space: nowrap;
}

.smart-import-type__opts {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.smart-import-type__btn {
  min-width: 72px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border-strong, #d9d9d9);
  border-radius: 6px;
  background: #fff;
  color: var(--text, #303133);
  font-size: 13px;
  cursor: pointer;
  line-height: 1;
}

.smart-import-type__btn:hover {
  border-color: #20B2AA;
  color: #20B2AA;
}

.smart-import-type__btn.is-active {
  border-color: #20B2AA;
  background: rgba(32, 178, 170, 0.12);
  color: #178f88;
  font-weight: 600;
}

.smart-import-type__hint {
  width: 100%;
  text-align: center;
  font-size: 12px;
  line-height: 1.4;
}

.btn-smart-teal {
  min-width: 140px;
  min-height: 40px;
  padding: 0 20px;
  border: none;
  border-radius: var(--radius-md);
  background: #20B2AA;
  color: #fff;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.btn-smart-teal:hover:not(:disabled) {
  background: #1a9a93;
  color: #fff;
}

.btn-smart-teal:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* 新建询价单弹窗 */
.quote-create-form .modal-form-block {
  margin-bottom: 16px;
}

.quote-create-form .field-label,
.smart-modal-body .field-label {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 20px;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.4;
}

.modal-form-row--split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
  align-items: start;
}

.modal-field-remark {
  margin-bottom: 14px;
}

.modal-field-remark textarea {
  min-height: 64px;
  height: 64px;
  resize: vertical;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}

.modal-field-import {
  margin-bottom: 4px;
}

.modal-import-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.modal-import-head .field-label {
  margin-bottom: 0;
}

.modal-import-tpl {
  border: 0;
  background: transparent;
  color: var(--info, #1677ff);
  font-size: 12px;
  padding: 0;
  cursor: pointer;
  line-height: 1.4;
  white-space: nowrap;
}

.modal-import-tpl:hover {
  text-decoration: underline;
}

.modal-import-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  background: #fff;
}

.modal-import-types {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.modal-import-type {
  border: 1px solid var(--border-strong, #d9d9d9);
  background: #fafafa;
  color: var(--text, #303133);
  border-radius: 6px;
  padding: 10px 8px;
  font-size: 13px;
  cursor: pointer;
  line-height: 1.3;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

.modal-import-type:hover {
  border-color: var(--info, #1677ff);
  color: var(--info, #1677ff);
  background: #f5f9ff;
}

.modal-import-type.is-active {
  border-color: var(--info, #1677ff);
  color: var(--info, #1677ff);
  background: var(--info-bg, #e6f4ff);
  font-weight: 600;
}

.modal-import-type-hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
}

.modal-import-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding-top: 2px;
  border-top: 1px solid var(--border, #f0f0f0);
}

.modal-import-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.modal-import-actions .btn,
.modal-import-actions a.btn,
.modal-import-actions label.btn {
  margin: 0;
  height: 36px;
  min-height: 36px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  line-height: 1;
  vertical-align: middle;
  text-decoration: none;
}

.modal-file-input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.modal-import-filename {
  margin: 0;
  flex: 1 1 180px;
  min-width: 0;
  font-size: 12px;
  line-height: 1.5;
}

.modal-import-clear {
  height: auto !important;
  min-height: 0 !important;
  padding: 0 4px !important;
  font-size: 12px;
  color: #f56c6c;
}

.modal-import-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.modal-import-option input {
  margin: 0;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .modal-import-types {
    grid-template-columns: 1fr;
  }
}

.modal-preview-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.modal-preview-head {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0 0 10px;
  line-height: 1.4;
}

.modal-preview-table {
  max-height: 220px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: auto;
  background: #fff;
}

.modal-preview-table .data-table {
  margin: 0;
}

.modal-preview-table .preview-empty td {
  padding: 28px 16px;
  text-align: center;
}

/* 智能报价弹窗 */
.smart-modal-body {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.modal-hint {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 16px;
  padding: 10px 14px;
  background: var(--info-bg, #e6f4ff);
  border: 1px solid rgba(22, 119, 255, 0.15);
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-secondary);
}

.modal-hint svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--info, #1677ff);
}

.excel-sync-field {
  margin-bottom: 14px;
}

.excel-sync-copy-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.excel-sync-input {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.platform-order-fields {
  gap: 12px 16px;
}

.platform-shipping-history-select {
  width: 100%;
  margin-bottom: 8px;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--border, #dbe3ee);
  border-radius: var(--radius-md, 8px);
  background: #fff;
  font-size: 13px;
  color: var(--text-primary, #1e293b);
}

.platform-shipping-history-select:focus {
  outline: none;
  border-color: var(--primary, #3CB371);
  box-shadow: 0 0 0 2px rgba(60, 179, 113, 0.15);
}

.platform-order-summary {
  margin: 12px 0 0;
  font-size: 13px;
}

/* 平台采购弹窗：正文可滚动，底部「取消 / 确认提交」始终可见 */
.modal-backdrop > .modal > form.platform-order-submit-form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.platform-order-submit-form .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.platform-order-submit-form .modal-footer {
  flex-shrink: 0;
  background: var(--bg-elevated, #fff);
}

.platform-order-submit-form .modal-body textarea {
  min-height: 72px;
  resize: none;
}

.platform-marks-field {
  margin-top: 4px;
}

.platform-marks-upload {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px dashed rgba(60, 179, 113, 0.45);
  background: linear-gradient(180deg, #f6fffb 0%, #fff 100%);
}

.platform-marks-upload__label {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary, #1e293b);
}

.platform-marks-upload__hint {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.5;
}

.platform-marks-upload__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.platform-marks-upload__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.platform-marks-upload__pick {
  cursor: pointer;
  margin: 0;
}

.platform-marks-upload__status {
  margin: 8px 0 0;
  font-size: 12px;
  min-height: 18px;
}

.platform-marks-upload__preview {
  margin-top: 10px;
}

.platform-marks-upload__img {
  display: block;
  max-width: 100%;
  max-height: 160px;
  border-radius: 8px;
  border: 1px solid var(--border, #dbe3ee);
  background: #fff;
}

.platform-marks-upload__file-link {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 8px;
  background: #ecfdf5;
  color: #047857;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.platform-orders-card {
  margin-bottom: 16px;
  padding: 16px 20px;
}

.platform-orders-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

/* 采购单抽屉内：四按钮 + 提示，节省主列表空间 */
.platform-orders-inline--in-po {
  padding: 0 12px 8px;
  border-bottom: 1px solid var(--border, #e6e8ec);
  flex-shrink: 0;
}

.platform-orders-inline--in-po .platform-orders-actions {
  margin: 0 0 8px;
  gap: 8px;
}

.platform-orders-inline--in-po .platform-action-btn {
  min-height: 40px;
  padding: 8px 6px;
  border-radius: 6px;
  flex-direction: row;
  gap: 0;
}

.platform-orders-inline--in-po .platform-action-btn__label {
  font-size: 12px;
}

.platform-orders-po-hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: #9ca3af;
}

.platform-orders-po-slot {
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .platform-orders-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.platform-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 72px;
  padding: 10px 8px;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  font: inherit;
  color: #1f2937;
}

.platform-action-btn:hover:not(:disabled):not(.is-disabled) {
  border-color: #93c5fd;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
}

.platform-action-btn--slip:not(:disabled):not(.is-disabled) {
  background: linear-gradient(180deg, #ecfdf5 0%, #fff 100%);
  border-color: #6ee7b7;
  color: #047857;
}

.platform-action-btn__label {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
}

.platform-action-btn__badge {
  position: absolute;
  top: 6px;
  right: 8px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.platform-action-btn--list {
  position: relative;
}

.platform-orders-card__tip {
  margin: 0;
  font-size: 12px;
  color: #9ca3af;
}

.platform-order-list--hidden {
  display: none !important;
}

.platform-action-btn.is-disabled,
.platform-action-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  background: #f9fafb;
}

.platform-order-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 2px;
}

.platform-order-item {
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fafafa;
}

.platform-order-item__head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
  padding: 0;
  margin: 0 0 6px;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}

.platform-order-item__head:hover .platform-order-item__id {
  color: #2563eb;
}

.platform-order-item__id {
  font-weight: 700;
  font-size: 14px;
}

.platform-order-item__amount {
  font-weight: 600;
  color: #2563eb;
}

.platform-order-item__hint {
  margin: 0 0 8px;
  font-size: 12px;
  color: #6b7280;
  line-height: 1.45;
}

.platform-order-item__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.platform-order-item__actions .btn.is-muted,
.platform-order-item__actions .btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.platform-detail-grid p {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.5;
}

.platform-order-list-modal .platform-order-list {
  max-height: none;
  overflow: visible;
}

.platform-orders-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.platform-orders-card__head-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.platform-orders-refresh-btn {
  flex-shrink: 0;
  padding: 6px 12px;
  font-size: 13px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #374151;
  cursor: pointer;
  min-height: 36px;
}
.platform-orders-refresh-btn:hover {
  background: #f9fafb;
}
.platform-orders-export-btn {
  flex-shrink: 0;
  padding: 6px 10px;
  font-size: 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #2563eb;
  text-decoration: none;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}
.platform-orders-export-btn:hover {
  background: #eff6ff;
}
.platform-orders-refresh-btn.is-loading {
  opacity: 0.65;
  pointer-events: none;
}
.platform-order-list--hidden,
#platformOrderList.platform-order-list--hidden {
  display: none !important;
  max-height: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
}
.platform-orders-card__empty--hint {
  margin: 0;
  padding: 0;
  font-size: 12px;
  text-align: center;
}
.platform-order-list-modal .platform-order-list {
  max-height: min(70vh, 520px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.platform-orders-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.platform-orders-toolbar .platform-toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  white-space: nowrap;
}

.platform-orders-toolbar .platform-toolbar-btn.is-disabled,
.platform-orders-toolbar .platform-toolbar-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.platform-orders-card__alert {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 13px;
  line-height: 1.5;
}

.platform-orders-card__head-main {
  min-width: 0;
}

.platform-orders-card__desc {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--text-muted, #6b7280);
}

.platform-orders-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.platform-orders-filter {
  border: 1px solid var(--border, #e5e7eb);
  background: #fff;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  cursor: pointer;
  color: #374151;
}

.platform-orders-filter.is-active {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.platform-order-sub {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 2px;
  font-weight: 400;
}

.platform-order-tag {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  margin-right: 4px;
}

.platform-order-tag--ok { background: #d1fae5; color: #047857; }
.platform-order-tag--warn { background: #fef3c7; color: #b45309; }
.platform-order-tag--muted { background: #f3f4f6; color: #6b7280; }

.platform-bill-amount {
  font-size: 16px;
  margin-top: 0;
}

.platform-bill-footnote {
  font-size: 12px;
  color: #6b7280;
  margin-top: 12px;
}

.platform-slip-hint {
  margin-top: 0;
  font-size: 13px;
}

.platform-slip-msg {
  font-size: 12px;
  min-height: 1.2em;
}

.platform-shipment-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.platform-shipment-table th,
.platform-shipment-table td {
  border-bottom: 1px solid var(--border, #e5e7eb);
  padding: 8px 6px;
  text-align: left;
}

.platform-shipment-table code {
  font-size: 12px;
  word-break: break-all;
}

.platform-orders-card__title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.platform-orders-card__count {
  font-size: 12px;
  color: var(--text-muted, #6b7280);
}

.platform-orders-card__empty {
  margin: 0;
  font-size: 13px;
  padding: 8px 0;
}

.platform-orders-table-wrap {
  border: none;
}

.platform-order-status {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.platform-order-status--pending { background: #fef3c7; color: #b45309; }
.platform-order-status--assigned { background: #e0e7ff; color: #4338ca; }
.platform-order-status--shipped { background: #d1fae5; color: #047857; }
.platform-order-status--completed { background: #f3f4f6; color: #374151; }
.platform-order-status--cancelled { background: #fee2e2; color: #b91c1c; }
.platform-order-status--default { background: #f3f4f6; color: #6b7280; }

.platform-order-logistics {
  font-size: 12px;
  line-height: 1.4;
}

.platform-order-logistics__co {
  display: block;
  color: var(--text-muted, #6b7280);
}

.platform-order-logistics__no {
  font-size: 12px;
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 4px;
}

.platform-order-notify {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #93c5fd;
  border-radius: 10px;
  font-size: 13px;
  color: #1e40af;
  line-height: 1.5;
}

.platform-order-notify--corner {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top, 0px));
  right: 12px;
  z-index: 1200;
  margin: 0;
  max-width: min(340px, calc(100vw - 24px));
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.18);
}

@media (max-width: 768px) {
  .platform-order-notify--corner {
    top: auto;
    bottom: calc(68px + env(safe-area-inset-bottom, 0px));
    right: 10px;
    left: 10px;
    max-width: none;
  }
}

.platform-order-notify__dot {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 50%;
  background: #2563eb;
  flex-shrink: 0;
  animation: platform-notify-pulse 1.5s ease infinite;
}

@keyframes platform-notify-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.platform-order-status--awaiting { background: #fef9c3; color: #a16207; }
.platform-order-status--payment { background: #fce7f3; color: #be185d; }

.platform-order-hint-cell {
  font-size: 12px;
  max-width: 200px;
  color: var(--text-muted, #6b7280);
}

.platform-order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.platform-order-tracking {
  font-size: 11px;
  color: #059669;
}

.platform-bill-section {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border, #e5e7eb);
}

.platform-bill-section h4 {
  margin: 0 0 8px;
  font-size: 14px;
}

.platform-bill-qr {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.platform-bill-qr img {
  max-width: 140px;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border, #e5e7eb);
}

.platform-contract-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.platform-contract-table th,
.platform-contract-table td {
  border: 1px solid var(--border, #e5e7eb);
  padding: 6px 8px;
  text-align: left;
}

.product-stock-layout,
.platform-products-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 0;
}

.product-stock-layout--no-sidebar,
.platform-products-layout.product-stock-layout--no-sidebar {
  display: block;
  grid-template-columns: none;
}

.product-stock-layout__main,
.platform-products-layout__main {
  min-width: 0;
}

.product-category-sidebar {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border, #e5e7eb);
  background: #f8fafc;
  padding: 12px 0 0;
  min-width: 0;
  /* 分类按内容撑开；过多时列表区滚动，避免 flex:1+min-height:0 把条目压没 */
  max-height: calc(100vh - 148px);
  align-self: start;
  position: sticky;
  top: 0;
  overflow: hidden;
}

.product-category-sidebar__head {
  flex-shrink: 0;
  padding: 8px 14px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted, #6b7280);
}

.product-category-sidebar__hint {
  flex-shrink: 0;
  margin: 0;
  padding: 10px 14px 12px;
  font-size: 11px;
  line-height: 1.45;
  border-top: 1px solid var(--border, #e5e7eb);
  background: #f8fafc;
}

.product-category-list {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 0 1 auto;
  max-height: min(60vh, calc(100vh - 220px));
  min-height: auto;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

.product-category-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.product-category-item a {
  flex: 1;
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  color: #374151;
  text-decoration: none;
}

.product-category-slug {
  flex-shrink: 0;
  min-width: 1.6em;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #2563eb;
}

.product-category-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-category-item.is-active a,
.product-category-item a:hover {
  background: #eff6ff;
  color: #1d4ed8;
}

.product-category-item.is-active .product-category-slug,
.product-category-item a:hover .product-category-slug {
  color: #1d4ed8;
}

.product-category-count {
  font-size: 11px;
  color: #9ca3af;
  padding-right: 10px;
}

@media (max-width: 900px) {
  .product-stock-layout,
  .platform-products-layout {
    grid-template-columns: 1fr;
  }
  .product-category-sidebar {
    max-height: 220px;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border, #e5e7eb);
  }
  .product-category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 0 10px 10px;
  }
  .product-category-item {
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 999px;
    background: #fff;
  }
  .product-category-item a {
    padding: 6px 12px;
  }
  .product-category-count {
    display: none;
  }
}

.platform-page .platform-hero {
  position: relative;
}

.smart-modal-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.smart-modal-fields {
  flex: 1 1 520px;
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) minmax(140px, 1fr);
  gap: 12px 14px;
  align-items: end;
  min-width: 0;
}

.smart-modal-fields--meta {
  grid-template-columns: repeat(3, minmax(120px, 1fr));
}

.smart-modal-fields--meta .smart-field-remark {
  grid-column: 1 / -1;
}

.smart-modal-fields--meta .smart-field-file {
  grid-column: 1 / -1;
}

.smart-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.smart-modal-fields .form-field input[type="number"],
.smart-modal-fields .form-field input[type="text"],
.smart-modal-fields .form-field input[type="date"],
.smart-modal-fields .form-field input[type="datetime-local"] {
  min-height: 40px;
  margin: 0;
}

.smart-modal-actions {
  flex: 0 0 auto;
  padding-bottom: 1px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.smart-modal-actions .btn {
  min-height: 40px;
  min-width: 120px;
  padding-left: 18px;
  padding-right: 18px;
}

.smart-file-field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.smart-file-field:hover,
.smart-file-field:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light);
}

.smart-file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.smart-file-btn {
  flex-shrink: 0;
  padding: 5px 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  pointer-events: none;
}

.smart-file-name {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.smart-file-name.has-file {
  color: var(--text-primary);
}

.smart-file-list {
  margin: 8px 0 0;
  padding: 0 0 0 18px;
  font-size: 13px;
  color: var(--text-muted);
  max-height: 96px;
  overflow-y: auto;
}

.smart-file-list li {
  margin: 2px 0;
}

.sq-preview-table .sq-edit-inp {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  margin: 0;
}

.smart-modal-progress {
  margin-top: 16px;
}

.smart-modal-progress.is-busy .sq-progress-bar .progress-fill {
  animation: sq-progress-pulse 1.6s ease-in-out infinite;
}

@keyframes sq-progress-pulse {
  0% { width: 12%; opacity: 0.65; }
  50% { width: 72%; opacity: 1; }
  100% { width: 12%; opacity: 0.65; }
}

.smart-progress-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  font-size: 14px;
  color: var(--text-muted);
}

.sq-loading-row {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #20B2AA;
  font-weight: 500;
}

.sq-loading-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 2px;
}

.sq-loading-dots i {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #20B2AA;
  animation: sq-dot-bounce 1.2s infinite ease-in-out;
}

.sq-loading-dots i:nth-child(2) {
  animation-delay: 0.15s;
}

.sq-loading-dots i:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes sq-dot-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.35; }
  40% { transform: translateY(-5px); opacity: 1; }
}

.smart-modal-progress:not(.is-busy) .sq-loading-dots i {
  animation: none;
  opacity: 0.5;
}

.sq-progress-detail:empty {
  display: none;
}

.smart-modal-preview {
  margin-top: 16px;
  min-height: 0;
}

.smart-modal-preview:empty {
  display: none;
}

.smart-modal-preview .data-table {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

@media (max-width: 768px) {
  .modal-form-row--split {
    grid-template-columns: 1fr;
  }

  .smart-modal-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .smart-modal-fields {
    grid-template-columns: 1fr;
  }

  .smart-modal-actions .btn {
    width: 100%;
  }
}

.modal-section-title {
  margin: 16px 0 10px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.modal-import-section .quote-create-import-grid {
  grid-template-columns: 1fr;
}

button.quote-action-btn {
  font: inherit;
  cursor: pointer;
  text-align: left;
  width: auto;
}

.quote-list-toolbar button.quote-action-btn {
  width: auto;
  flex: 0 0 auto;
}

/* ── 报价工作台（shipmro 三栏） ── */
.page-wrap--workspace {
  padding: 12px 16px 16px;
  max-width: none;
  height: calc(100vh - var(--nav-h, 56px));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.page-head--compact {
  margin-bottom: 10px;
}

.page-head--compact .page-title {
  font-size: 18px;
  margin: 0;
}

.quote-workspace {
  --ws-accent: #20B2AA;
  --ws-accent-hover: #1a9690;
  --ws-accent-light: rgba(32, 178, 170, 0.12);
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

/* 工作台内搜索按钮、添加按钮、表头统一 #2E8B57 */
.quote-workspace .ws-search-box-btn {
  background: var(--ws-accent);
}

.quote-workspace .ws-search-box-btn:hover {
  background: var(--ws-accent-hover);
}

.quote-workspace .ws-search-row .btn-primary.ws-add-product-btn {
  background: var(--ws-accent);
  border-color: var(--ws-accent);
  box-shadow: none;
}

.quote-workspace .ws-search-row .btn-primary.ws-add-product-btn:hover:not(:disabled) {
  background: var(--ws-accent-hover);
  border-color: var(--ws-accent-hover);
  filter: none;
  transform: none;
  box-shadow: none;
}

.quote-workspace .ws-search-box input:focus,
.quote-workspace .ws-search-box .ws-material-select:focus {
  border-color: var(--ws-accent);
  box-shadow: 0 0 0 2px var(--ws-accent-light);
}

.quote-workspace .ws-grid-products.ws-grid-head,
.quote-workspace .ws-grid-history.ws-grid-head {
  background: var(--ws-accent);
}

.quote-workspace .ws-impa-catalog-table thead tr {
  background: var(--ws-accent);
}

.quote-workspace .ws-impa-pick-btn {
  background: var(--ws-accent);
}

.quote-workspace .ws-impa-pick-btn:hover {
  background: var(--ws-accent-hover);
}

.quote-workspace .ws-impa-catalog-table tbody tr:hover,
.quote-workspace .ws-impa-catalog-table tbody tr.is-active {
  background: var(--ws-accent-light);
}

/* 询价明细编码字号（原 15px，加大一号为 17px） */
.quote-workspace .ws-inquiry-code {
  font-size: 17px;
  line-height: 1.25;
  padding: 5px 7px;
  color: var(--ws-accent);
  background: var(--ws-accent-light);
}

.quote-workspace .ws-inquiry-code:hover {
  color: var(--ws-accent-hover);
  background: rgba(32, 178, 170, 0.2);
}

.quote-workspace-bar {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 28px;
  padding: 8px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: visible;
  font-size: 13px;
  color: var(--text-secondary);
  min-height: 44px;
}

.ws-bar-left,
.ws-bar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ws-purchase-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
}

.ws-purchase-badge.is-done {
  color: #08979c;
  background: #e6fffb;
  border-color: #87e8de;
}

.ws-bar-center {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 22px;
  min-width: 0;
  overflow-x: auto;
  padding: 2px 0;
}

.quote-workspace-bar .ws-bar-btn {
  flex-shrink: 0;
  white-space: nowrap;
}

.ws-stat-item {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1;
}

.quote-workspace-bar strong {
  color: var(--text-primary);
  font-weight: 600;
}

.quote-workspace-toolbar {
  display: none;
}

.quote-workspace-stats {
  display: contents;
}

.quote-workspace-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.ws-inquiry-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-left: 12px;
  padding-right: 12px;
}

.ws-inquiry-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.ws-impa-scroll {
  display: block;
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  background: #fff;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.ws-impa-scroll::-webkit-scrollbar {
  width: 8px;
}

.ws-impa-scroll::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.ws-impa-scroll::-webkit-scrollbar-thumb {
  background: #b8b8b8;
  border-radius: 4px;
}

.ws-impa-scroll::-webkit-scrollbar-thumb:hover {
  background: #999;
}

/* 报价工作台搜索框（布局参照 shipmro，配色沿用本站变量） */
.ws-search-box {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.ws-search-box--grow {
  flex: 1;
  min-width: 0;
}

.ws-search-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.ws-search-row > .ws-search-box {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
}

.ws-search-box input {
  flex: 1;
  min-width: 0;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: #fff;
  min-height: var(--control-h, 36px);
  height: var(--control-h, 36px);
  box-sizing: border-box;
}

.ws-search-box input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 2px var(--primary-ring);
}

.ws-search-box .ws-material-select {
  flex: 0 0 88px;
  min-width: 88px;
  padding: 0 8px;
  min-height: var(--control-h, 36px);
  height: var(--control-h, 36px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: #fff;
  box-sizing: border-box;
}

.ws-search-box-btn {
  flex-shrink: 0;
  padding: 0 18px;
  min-width: 52px;
  height: var(--control-h, 36px);
  min-height: var(--control-h, 36px);
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.ws-search-box-btn:hover {
  background: var(--primary-hover);
}

.ws-search-row .ws-add-product-btn.btn {
  flex-shrink: 0;
  height: var(--control-h, 36px);
  min-height: var(--control-h, 36px);
  margin: 0;
  padding: 0 14px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  box-sizing: border-box;
}

.ws-impa-empty,
.ws-panel-empty {
  text-align: center;
  padding: 48px 20px;
  color: #999;
}

.ws-impa-empty-icon {
  font-size: 48px;
  line-height: 1;
  margin-bottom: 12px;
}

.ws-impa-empty-text {
  font-size: 14px;
}

.ws-panel-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 36px 16px;
  color: #6b7280;
  font-size: 13px;
}

.ws-panel-loading--compact {
  padding: 24px 12px;
}

.ws-panel-loading-spin {
  width: 16px;
  height: 16px;
  border: 2px solid #e5e7eb;
  border-top-color: var(--ws-accent, #20B2AA);
  border-radius: 50%;
  animation: ws-spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes ws-spin {
  to { transform: rotate(360deg); }
}

.ws-panel-empty-title {
  font-size: 16px;
  font-weight: 600;
  color: #666;
}

.ws-impa-section {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  padding: 15px;
  margin-bottom: 15px;
}

.ws-impa-thumb {
  text-align: center;
}

.ws-impa-thumb img {
  max-width: 100%;
  max-height: 280px;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.ws-impa-thumb img:hover,
.ws-impa-content-img:hover,
.ws-impa-content-html img:hover {
  opacity: 0.92;
}

.ws-impa-thumb--empty {
  text-align: center;
  padding: 40px;
  color: #999;
  border: 1px dashed #ddd;
  border-radius: 4px;
}

.ws-impa-section--content {
  padding: 12px 15px 15px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.ws-impa-content-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.ws-impa-content-title {
  font-size: 14px;
  color: #1f2937;
}

.ws-impa-content-hint {
  font-size: 12px;
  color: #6b7280;
  font-style: italic;
  line-height: 1.4;
}

.ws-impa-content-body {
  min-height: 120px;
  max-height: none;
  overflow: visible;
}

.ws-impa-content-body::-webkit-scrollbar {
  width: 8px;
}

.ws-impa-content-body::-webkit-scrollbar-thumb {
  background: #b8b8b8;
  border-radius: 4px;
}

.ws-impa-content-img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  cursor: pointer;
}

.ws-impa-content-html {
  text-align: left;
  color: #333;
  line-height: 1.7;
  min-height: 80px;
  word-break: break-word;
}

.ws-impa-content-html img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 8px auto;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

/* 图片灯箱：对齐 impamro content_detail */
.lightbox {
  display: none;
  position: fixed;
  z-index: 99999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.92);
  cursor: pointer;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  pointer-events: none;
}

.lightbox.lightbox-visible {
  display: block;
  pointer-events: auto;
}

.lightbox-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 24px 24px;
  min-height: 100%;
  box-sizing: border-box;
  cursor: default;
  touch-action: none;
}

.lightbox-content img {
  max-width: 90vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  border-radius: 8px;
  display: block;
  pointer-events: auto;
  cursor: grab;
  object-fit: contain;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
  transition: transform 0.08s ease-out;
  transform-origin: center center;
}

.lightbox-content img:active {
  cursor: grabbing;
}

.lightbox-close {
  position: fixed;
  top: 16px;
  right: 16px;
  color: #fff;
  font-size: 28px;
  font-weight: 300;
  cursor: pointer;
  z-index: 100002;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: background 0.2s, border-color 0.2s;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.4);
}

.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100002;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox-nav--prev { left: 16px; }
.lightbox-nav--next { right: 16px; }

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.25);
}

.lightbox-counter {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 100002;
  padding: 4px 12px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 13px;
  display: none;
}

.product-thumb-wrap {
  position: relative;
  display: inline-block;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  vertical-align: middle;
}

.product-thumb-badge {
  position: absolute;
  right: -6px;
  top: -6px;
  min-width: 18px;
  height: 18px;
  line-height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #20b2aa;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}

body.lightbox-open {
  overflow: hidden !important;
}

html.lightbox-open {
  overflow: hidden !important;
}

.platform-products-page {
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

.platform-page {
  margin: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.platform-hero {
  margin-bottom: 16px;
  padding: 20px 22px 18px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ecfdf5 0%, #f0f9ff 48%, #ffffff 100%);
  border: 1px solid rgba(16, 185, 129, 0.18);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.platform-hero__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.platform-hero__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #64748b;
  text-decoration: none;
}

.platform-hero__back:hover {
  color: #0f766e;
}

.platform-hero__cart {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #0f766e;
  font-size: 13px;
  text-decoration: none;
}

.platform-hero__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.platform-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  font-size: 12px;
  font-weight: 600;
}

.platform-hero__title {
  margin: 0;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.platform-hero__desc {
  margin: 0;
  max-width: 720px;
  font-size: 14px;
  line-height: 1.6;
  color: #64748b;
}

.platform-workspace-card {
  border-radius: 12px;
  overflow: hidden;
}

.platform-products-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 0;
  padding: 12px 16px;
  align-items: center;
  border-bottom: 1px solid var(--border, #e6e8ec);
  background: var(--bg-subtle, #fafbfc);
}

.platform-products-back {
  flex-shrink: 0;
}

.platform-products-cat {
  min-width: 140px;
  max-width: 240px;
}

.platform-products-search {
  position: relative;
  flex: 1;
  min-width: 0;
}

.platform-products-search__icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}

.platform-products-kw {
  width: 100%;
  min-width: 0;
  padding: 10px 12px 10px 38px;
  border: 1px solid #dbe3ee;
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.platform-products-kw:focus {
  outline: none;
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

.platform-products-table-wrap {
  max-height: 52vh;
  overflow: auto;
  border: 1px solid #e8edf3;
  border-radius: 10px;
}

.platform-products-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-transform: none;
  letter-spacing: 0;
  border-bottom: 1px solid #e8edf3;
}

.platform-products-table td,
.platform-products-table th {
  font-size: 13px;
  padding: 11px 12px !important;
}

.platform-products-table tbody tr:hover {
  background: #f8fffb;
}

.platform-products-empty td {
  text-align: center;
  color: #6b7280;
  padding: 36px 12px !important;
}

.platform-products-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
}

.platform-products-pager .btn.active {
  background: var(--primary, #10b981);
  color: #fff;
  border-color: var(--primary, #10b981);
}

.platform-products-hint {
  margin: 0 0 12px;
  font-size: 13px;
}

.ws-impa-content-empty {
  text-align: center;
  padding: 48px 16px;
  color: #6b7280;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  font-size: 14px;
}

.ws-impa-catalog-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f0f0f0;
}

.ws-impa-catalog-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.ws-impa-catalog-table thead tr {
  background: var(--teal, #0d9488);
  color: #fff;
}

.ws-impa-catalog-table th,
.ws-impa-catalog-table td {
  padding: 8px;
  border: 1px solid #e0e0e0;
  text-align: left;
}

.ws-impa-catalog-table tbody tr {
  cursor: pointer;
}

.ws-impa-catalog-table tbody tr:hover,
.ws-impa-catalog-table tbody tr.is-active {
  background: var(--primary-light);
}

.ws-impa-pick-btn {
  padding: 4px 10px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12px;
}

.ws-impa-pick-btn:hover {
  background: var(--primary-hover);
}

.ws-impa-info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.ws-impa-info-table td {
  padding: 8px;
  border: 1px solid #e0e0e0;
  vertical-align: top;
}

.ws-impa-info-table td:nth-child(odd) {
  width: 100px;
  background: #f5f5f5;
  font-weight: 700;
  white-space: nowrap;
}

.ws-row-impa.is-active {
  background: var(--primary-light);
}

.ws-row-impa:hover {
  background: var(--bg-subtle);
}

.quote-workspace-main {
  flex: 1;
  display: flex;
  gap: 12px;
  min-height: 0;
  overflow: hidden;
}

.quote-workspace-panel {
  flex: 3;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  box-shadow: var(--shadow-xs);
}

.quote-workspace-panel:first-child {
  flex: 3.5;
}

.quote-workspace-panel--master {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.quote-workspace-panel--master > .ws-search-box {
  flex-shrink: 0;
}

.quote-workspace-panel--inquiry {
  flex: 3.5;
  padding-left: 0;
  padding-right: 0;
  min-height: 0;
  overflow: hidden;
}

.quote-workspace-panel--inquiry .quote-workspace-panel-head,
.quote-workspace-panel--inquiry .quote-workspace-search {
  padding-left: 12px;
  padding-right: 12px;
}

.quote-workspace-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: nowrap;
  margin-bottom: 8px;
  padding-bottom: 0;
  border-bottom: none;
}

.ws-panel-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.quote-workspace-panel-head--inline {
  gap: 12px;
}

.quote-workspace-panel-head--inline .ws-panel-title {
  flex-shrink: 0;
  white-space: nowrap;
}

.quote-workspace-search--inline {
  flex: 1 1 auto;
  min-width: 0;
  margin-bottom: 0;
}

.quote-workspace-search {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.quote-workspace-search input {
  flex: 1;
  min-width: 0;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.quote-workspace-search .ws-material-select {
  flex: 0 0 88px;
  min-width: 88px;
  min-height: 36px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: #fff;
}

.quote-workspace-search .ws-search-btn {
  flex: 0 0 36px;
  width: 36px;
  min-width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.quote-workspace-search .ws-add-product-btn {
  flex-shrink: 0;
  min-height: 36px;
  padding: 0 12px;
  white-space: nowrap;
  font-size: 13px;
}

.quote-workspace-scroll {
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 0;
}

/* 左侧 IMPA 栏：后写规则覆盖通用 scroll，保证可纵向滚动 */
.quote-workspace-panel--master > .ws-impa-scroll.quote-workspace-scroll {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

.ws-empty {
  text-align: center;
  padding: 32px 12px;
  margin: 0;
  font-size: 13px;
}

.ws-grid-head,
.ws-row {
  display: grid;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.quote-workspace-panel--catalog {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.quote-workspace-catalog-top {
  flex: 3;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.quote-workspace-catalog-bottom {
  flex: 2;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
  margin-top: 6px;
  padding-top: 6px;
}

.ws-panel-divider {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 4px 0 8px;
}

.quote-workspace-scroll--products {
  flex: 1;
  min-height: 120px;
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: #fff;
}

.quote-workspace-scroll--history {
  flex: 1;
  min-height: 100px;
}

.ws-grid-products,
.ws-row.ws-grid-products {
  grid-template-columns: 1fr 2fr 1fr 1fr 1.5fr auto;
  column-gap: 10px;
  padding: 10px;
}

.ws-grid-impa,
.ws-row.ws-grid-impa {
  grid-template-columns: 46px 76px minmax(0, 1.8fr) 40px;
  column-gap: 6px;
  padding-left: 8px;
  padding-right: 8px;
}

.ws-grid-impa.ws-grid-head {
  padding: 8px;
  background: var(--ws-accent, #20B2AA);
  color: #fff;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  margin-bottom: 0;
  border-bottom: none;
}

.ws-grid-impa.ws-grid-head span {
  text-align: center;
}

.ws-grid-impa.ws-grid-head span:nth-child(3) {
  text-align: left;
}

.ws-row.ws-grid-impa {
  padding: 8px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  align-items: center;
}

.ws-row.ws-grid-impa code {
  display: inline-block;
  max-width: 100%;
  padding: 2px 6px;
  font-size: 12px;
  font-family: inherit;
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ws-row.ws-grid-impa .ws-type {
  font-size: 11px;
  color: var(--text-secondary);
  text-align: center;
}

.ws-row.ws-grid-impa .ws-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.ws-row.ws-grid-impa .ws-unit {
  text-align: center;
  font-size: 12px;
  color: var(--text-secondary);
}

.ws-grid-history,
.ws-row.ws-grid-history {
  grid-template-columns: 1.2fr 1.2fr 0.7fr 0.6fr 0.8fr;
  padding: 0 4px;
}

.ws-grid-history.ws-grid-head {
  background: var(--ws-accent, #20B2AA);
  color: #fff;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  margin-bottom: 0;
  padding: 8px 4px;
}

.ws-history-row {
  border-bottom: 1px solid var(--border);
  padding: 6px 4px;
}

.ws-history-quote-link {
  color: #0a6e6a;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.ws-history-quote-link:hover {
  color: #08615d;
  border-bottom-color: currentColor;
}

.ws-match-coef-row {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  vertical-align: middle;
}

.ws-match-coef {
  width: 72px;
  flex: 0 0 72px;
  padding: 2px 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  text-align: center;
}

.ws-match-coef-row .ws-coef-btn {
  padding: 1px 4px;
  font-size: 10px;
  line-height: 1.2;
  min-width: 0;
}

.ws-coef-row {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
}

.ws-coef-row input[type="number"] {
  width: 72px;
  flex: 0 0 72px;
  min-width: 0;
  text-align: center;
  padding: 6px 4px;
}

.modal--price-calc .form-field--coef .ws-coef-row input[type="number"] {
  width: 96px;
  flex: 0 0 96px;
  font-size: 17px;
  font-weight: 600;
  padding: 10px 6px;
}

.modal--price-calc .form-field--coef .ws-coef-btn,
.modal--price-calc .form-field--coef .btn-xs {
  padding: 8px 10px;
  font-size: 13px;
  min-width: 52px;
}

.modal--price-calc .form-field--coef label {
  font-size: 15px;
}

.modal--price-calc .modal-body,
.modal--price-calc .form-field label,
.modal--price-calc .form-field input,
.modal--price-calc .form-field textarea {
  font-size: 14px;
}

.modal--price-calc .form-field label {
  font-size: 13px;
  font-weight: 600;
}

.modal--price-calc .form-field input,
.modal--price-calc .form-field textarea {
  font-size: 15px;
  padding: 8px 10px;
}

.modal--price-calc #wsPriceCalcSale {
  font-size: 16px;
  font-weight: 700;
}

.ws-grid-inquiry,
.ws-row.ws-grid-inquiry {
  grid-template-columns: 1fr 2fr 0.6fr 0.7fr 0.8fr 40px;
  padding: 0 12px;
}

.ws-grid-head {
  padding: 8px 0;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
  margin-bottom: 4px;
}

.ws-grid-products.ws-grid-head {
  padding: 8px 10px;
  background: var(--ws-accent, #20B2AA);
  color: #fff;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  margin-bottom: 0;
  font-size: 13px;
  font-weight: 600;
}

.ws-grid-products.ws-grid-head span {
  text-align: left;
}

.ws-row.ws-grid-products code {
  display: inline-block;
  max-width: 100%;
  padding: 2px 6px;
  font-size: 12px;
  font-family: inherit;
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ws-row.ws-grid-products .ws-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
  color: var(--text-primary);
}

.ws-row.ws-grid-products > span:nth-child(3),
.ws-row.ws-grid-products > span:nth-child(4),
.ws-row.ws-grid-products .ws-price {
  text-align: center;
}

.ws-row.ws-grid-products .ws-supplier {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: var(--text-secondary);
}

.ws-row {
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.ws-row-impa {
  cursor: pointer;
}

.ws-inp {
  width: 100%;
  min-height: 28px;
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.ws-inp:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 2px var(--primary-light);
}

.ws-price {
  color: #389e0d;
  font-weight: 600;
}

.ws-material-select {
  width: 88px;
  min-height: 36px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  background: var(--bg-elevated);
}

.ws-tax-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  white-space: nowrap;
  line-height: 1;
}

.ws-tax-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  margin: 0;
  line-height: 1;
}

.ws-tax-label input[type="checkbox"] {
  width: 15px;
  height: 15px;
  margin: 0;
  flex-shrink: 0;
  cursor: pointer;
  vertical-align: middle;
}

.ws-tax-input {
  width: 48px;
  height: 32px;
  padding: 0 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 30px;
  box-sizing: border-box;
  background: #fff;
  color: var(--text-primary);
  text-align: center;
  -moz-appearance: textfield;
}

.ws-tax-input::-webkit-outer-spin-button,
.ws-tax-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.ws-tax-input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 2px var(--primary-light);
}

.ws-tax-pct {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1;
  flex-shrink: 0;
}

.ws-type-badge {
  display: none !important;
}

.ws-inquiry-col-code .ws-type-badge {
  display: none !important;
}

.ws-impa-detail {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.ws-impa-detail-head {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.ws-impa-detail-code {
  font-size: 13px;
  margin-bottom: 4px;
}

.ws-impa-detail-name {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 4px;
}

.ws-impa-detail-meta,
.ws-impa-detail-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.ws-grid-inquiry.ws-grid-head {
  grid-template-columns: 1.1fr 2.2fr 0.6fr 0.7fr 0.8fr;
  padding: 8px 12px;
}

.ws-grid-inquiry.ws-grid-head span:first-child {
  text-align: center;
}

.ws-product-ops {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-self: center;
  gap: 4px;
  font-size: 12px;
  width: 100%;
}

.product-shared-badge,
.product-source-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 600;
  border-radius: 999px;
  vertical-align: middle;
}

.product-shared-badge,
.product-source-badge--platform {
  color: #0369a1;
  background: #e0f2fe;
}

.product-source-badge--cloud {
  color: #0f766e;
  background: #ccfbf1;
}

.product-source-badge--supplier {
  color: #7c3aed;
  background: #ede9fe;
}

.product-source-badge--stock {
  color: #b45309;
  background: #fef3c7;
}

.ws-add-product-hint {
  margin: 0 0 12px;
}

.ws-product-ops-main {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.ws-product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
}

.ws-op {
  cursor: pointer;
  font-size: 12px;
  padding: 0 2px;
  user-select: none;
}

.ws-op-select { color: #9c27b0; }
.ws-op-add { color: #4caf50; }
.ws-op-edit { color: #2196f3; }
.ws-op-del { color: #f44336; }
.ws-op-toggle { color: #666; }

.ws-inquiry-item {
  display: grid;
  grid-template-columns: 88px minmax(0, 2.4fr) 52px 72px 88px;
  gap: 10px;
  padding: 10px 12px 6px;
  margin: 0 8px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  align-items: center;
  font-size: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ws-inquiry-item.is-active {
  border-color: var(--primary, #3cb371);
  box-shadow: 0 0 0 2px rgba(60, 179, 113, 0.2);
  background: #f8fdf9;
}

.ws-inquiry-item:hover {
  border-color: rgba(60, 179, 113, 0.35);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

#wsInquiryList {
  padding: 8px 4px 12px;
}

.ws-inquiry-col-code {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.ws-inquiry-code {
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
  font-size: 17px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  background: rgba(60, 179, 113, 0.08);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-inquiry-code:hover {
  background: rgba(60, 179, 113, 0.16);
  text-decoration: none;
}

.ws-inquiry-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  word-break: break-word;
  color: var(--text-primary);
}

.ws-inquiry-meta-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 5px;
  min-width: 0;
}

.ws-inquiry-meta-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  width: 100%;
}

.ws-inquiry-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 11px;
  color: var(--text-secondary);
}

.ws-inquiry-tag em {
  font-style: normal;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
  width: 28px;
  font-size: 12px;
  text-align: right;
  line-height: 32px;
}

.ws-inquiry-meta-row--remark,
.ws-inquiry-meta-row--param {
  align-items: stretch;
}

.ws-inquiry-tag--remark,
.ws-inquiry-tag--param {
  flex: 1 1 100%;
  width: 100%;
  min-height: 32px;
  align-items: flex-start;
}

.ws-inquiry-remark-text,
.ws-inquiry-tag--param .ws-inp-param {
  flex: 1;
  min-width: 0;
  min-height: 32px;
  height: auto;
  padding: 4px 8px;
  font-size: 12px;
  line-height: 1.5;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.ws-inquiry-remark-text {
  display: block;
  background: #f8fafc;
}

.ws-inquiry-tag--param textarea.ws-inp-param {
  resize: vertical;
  overflow: auto;
  display: block;
  width: 100%;
  font-family: inherit;
  background: #fff;
  pointer-events: auto;
  cursor: text;
}

.ws-inquiry-tag--param textarea.ws-inp-param:disabled {
  background: #f8fafc;
  cursor: not-allowed;
  color: var(--text-secondary);
}

.ws-inquiry-col-unit {
  text-align: center;
  color: var(--text-secondary);
  font-weight: 500;
}

.ws-inquiry-col-qty .ws-inp,
.ws-inquiry-col-price .ws-inp {
  width: 100%;
  height: 32px;
  text-align: center;
  font-weight: 600;
  pointer-events: auto;
  background: #fff;
  cursor: text;
  -webkit-user-select: text;
  user-select: text;
}
.ws-inquiry-col-qty .ws-inp:focus,
.ws-inquiry-col-price .ws-inp:focus {
  border-color: var(--primary, #3cb371);
  box-shadow: 0 0 0 2px rgba(60, 179, 113, 0.2);
  outline: none;
}
/* 不要再用 :read-only 灰底暗示不可改；Petite-Vue 曾把 readonly="false" 误写成仍只读 */
.ws-inquiry-col-qty .ws-inp:read-only,
.ws-inquiry-col-price .ws-inp:read-only {
  background: #fff;
  color: inherit;
  cursor: text;
}

.ws-inquiry-btns {
  display: flex;
  gap: 4px;
  justify-content: center;
}

.ws-inquiry-btns .btn-xs {
  min-width: 28px;
  padding: 2px 6px;
  font-size: 11px;
}

.ws-inquiry-match {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  line-height: 1.5;
  background: #f8fafc;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.ws-inquiry-match strong {
  color: var(--text-primary);
}

.ws-inquiry-match--high {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.ws-inquiry-match--mid {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.ws-inquiry-match--low {
  background: #fffbeb;
  border-color: #fde68a;
}

.ws-inquiry-match--none {
  background: #f8fafc;
  border-color: var(--border);
}

.ws-match-label {
  color: var(--text-tertiary);
}

.ws-match-prod {
  color: var(--text-primary);
  font-weight: 500;
}

.ws-inquiry-head-title {
  flex-shrink: 0;
  white-space: nowrap;
  font-weight: 600;
}

.form-hint {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.45;
}

.ws-inquiry-param-hint {
  font-size: 11px;
  font-weight: 400;
  margin-left: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1 1 auto;
  min-width: 0;
  text-align: right;
}

.ws-inquiry-remark {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.ws-inquiry-remark-label {
  flex-shrink: 0;
  font-weight: 500;
}

.ws-inquiry-remark-text {
  word-break: break-word;
}

.ws-inquiry-param-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.member-page-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-bottom: 14px;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}

.member-page-bar__main {
  flex: 0 1 auto;
  min-width: 180px;
}

.member-page-bar__main .page-title {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
}

.member-page-bar__main .page-sub {
  margin: 2px 0 0;
  font-size: 13px;
}

.member-page-bar__stat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  background: var(--primary-light, rgba(60, 179, 113, 0.1));
  font-size: 14px;
  white-space: nowrap;
}

.member-page-bar__stat-icon {
  color: var(--primary);
  display: inline-flex;
}

.member-page-bar__search {
  flex: 1 1 220px;
  margin: 0;
  min-width: 200px;
}

.member-page-bar__actions {
  flex: 0 0 auto;
  margin-left: auto;
}

.cq-modal-body {
  padding-top: 8px;
}

.cq-summary {
  margin: 0 0 12px;
  font-size: 14px;
}

.cq-table-wrap {
  max-height: min(58vh, 560px);
  overflow: auto;
  margin-bottom: 12px;
}

.cq-quote-table .cq-col-check {
  width: 48px;
  text-align: center;
}

.cq-completion {
  color: #ea580c;
  font-weight: 600;
}

.cq-open-link {
  color: #0d9488;
  font-weight: 600;
  text-decoration: none;
}

.cq-open-link:hover {
  text-decoration: underline;
}

.cq-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.cq-toolbar-left,
.cq-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cq-export-opt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-left: 4px;
}

.cq-pager-info {
  font-size: 13px;
  white-space: nowrap;
}

.ws-inquiry-note-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.ws-inquiry-note-label {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
}

.ws-inp-note {
  flex: 1;
  min-width: 0;
  height: 30px;
  padding: 4px 8px;
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
}

.ws-inp-note:focus {
  border-color: var(--primary);
  outline: none;
}

.ws-inquiry-param {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.ws-inquiry-param-label {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
  white-space: nowrap;
}

.ws-inp-param {
  flex: 1;
  min-width: 0;
  height: 30px;
  padding: 4px 8px;
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
}

.ws-inp-param:focus {
  border-color: var(--primary);
  outline: none;
}

.ws-inquiry-note {
  margin-top: 4px;
  padding: 4px 6px;
  background: var(--bg-subtle);
  border-radius: 4px;
  font-size: 11px;
  color: var(--text-secondary);
}

.ws-inquiry-col-unit,
.ws-inquiry-col-qty,
.ws-inquiry-col-price {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ws-inquiry-col-unit {
  text-align: center;
}

.ws-smart-price-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.ws-smart-price-row input {
  flex: 1;
}

.btn-smart-price {
  padding: 6px 12px;
  background: linear-gradient(135deg, #9c27b0, #7b1fa2);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.btn-smart-price:hover {
  filter: brightness(1.05);
}

.ws-smart-tips {
  margin: 6px 0 0;
  font-size: 12px;
}

.input-readonly {
  background: var(--bg-subtle) !important;
  color: var(--text-secondary);
}

.form-field--full {
  grid-column: 1 / -1;
}

.btn-xs {
  min-height: 24px;
  padding: 2px 8px;
  font-size: 11px;
}

.btn-danger {
  background: #f44336;
  color: #fff;
  border: none;
}

.btn-danger:hover {
  background: #d32f2f;
}

.ws-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: #444;
  color: #fff;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 13px;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}

.ws-toast.is-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.ws-toast--error {
  background: #f44336;
}

.btn-sm {
  min-height: 32px;
  padding: 4px 12px;
  font-size: 13px;
}

@media (max-width: 1200px) {
  .quote-workspace-main {
    flex-direction: column;
  }
  .quote-workspace-panel {
    min-height: 280px;
  }
  .quote-workspace-bar {
    grid-template-columns: 1fr;
    row-gap: 10px;
    padding: 12px;
  }
  .ws-bar-center {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 10px 16px;
  }
  .ws-bar-right {
    flex-wrap: wrap;
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── 响应式 ── */
@media (max-width: 960px) {
  .login-page { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .login-panel { min-height: 100vh; }

  .member-sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }
  .member-layout.sidebar-open .member-sidebar {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }
  .member-main { margin-left: 0; }
  .member-menu-btn { display: inline-flex; }
  .member-content { padding: 16px; }
  .form-grid, .form-grid-2, .form-grid-3, .form-grid-4 { grid-template-columns: 1fr; }
  .form-field--action { padding-top: 0; }
}

@media (max-width: 768px) {
  .top-nav {
    flex-wrap: wrap;
    height: auto;
    padding: 12px 16px;
    gap: 10px;
  }
  .top-nav .brand { width: 100%; }
  .top-nav .user-area { margin-left: 0; width: 100%; justify-content: flex-end; }
  .top-nav .nav-links {
    order: 3;
    width: 100%;
    padding-bottom: 4px;
  }
  .top-nav .nav-links a.active::after { display: none; }
  .page-wrap { padding: 16px; }
  .page-title { font-size: 20px; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .admin-layout { flex-direction: row; }
  .admin-nav-toggle { display: inline-flex; }
  .admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 260px;
    max-width: 85vw;
    height: 100vh;
    z-index: 400;
    flex-direction: column;
    flex-wrap: nowrap;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    padding: 0;
  }
  .admin-sidebar.is-open { transform: translateX(0); }
  .admin-nav-section { display: block; }
  .admin-sidebar a { margin: 0; padding: 8px 14px; }
  .admin-sidebar-footer { width: 100%; margin-top: auto; }
  .admin-content { padding: 12px 14px 20px; }
  .card { padding: 14px 16px; }
  .data-table th, .data-table td { padding: 10px 12px; }
  .admin-grid-2 { grid-template-columns: 1fr; }
  .nav-toggle-grid { grid-template-columns: 1fr; }
  .admin-topbar { padding: 0 14px; }
  body.admin-nav-open { overflow: hidden; }
}

@media (max-width: 480px) {
  .stats-row { grid-template-columns: 1fr; }
}

/* 会员产品列表 */
.product-stock-card {
  margin-top: 0;
}
.product-stock-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.product-stock-search-form--inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.product-stock-kw {
  min-width: 160px;
  flex: 1 1 180px;
  max-width: 280px;
}
.product-po-inline-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted, #667085);
  white-space: nowrap;
}
.product-po-panel {
  margin: 0;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border, #e6e8ec);
  background: linear-gradient(180deg, rgba(60, 179, 113, 0.06) 0%, rgba(60, 179, 113, 0.02) 100%);
}
.product-po-panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-bottom: 12px;
}
.product-po-panel__title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}
.product-po-panel__meta {
  font-size: 13px;
  color: var(--text-muted, #667085);
}
.product-po-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.product-po-table tfoot td {
  border-top: 2px solid var(--border, #e6e8ec);
  background: var(--bg-subtle, #fafbfc);
}
.product-po-jump {
  text-decoration: none;
  color: var(--primary, #3CB371);
  font-size: 13px;
  white-space: nowrap;
}
.product-po-jump:hover {
  text-decoration: underline;
}
.product-row--in-po {
  background: rgba(60, 179, 113, 0.05);
}
.product-in-po-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(60, 179, 113, 0.15);
  color: var(--primary, #3CB371);
  font-size: 11px;
  font-weight: 600;
  vertical-align: middle;
}
.product-po-clear-form {
  flex-shrink: 0;
}
.product-row-po-btn {
  white-space: nowrap;
}
.product-sub-link {
  font-size: 13px;
  color: var(--primary, #3CB371);
  text-decoration: none;
}
.product-sub-link:hover {
  text-decoration: underline;
}
.product-po-download-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  width: 100%;
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(60, 179, 113, 0.08);
  font-size: 13px;
}
.product-po-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px 16px;
  padding: 14px 20px;
  border-top: 1px solid var(--border, #e6e8ec);
  background: var(--bg-subtle, #fafbfc);
}

/* 采购单全屏分栏：左 2 / 右 1，两栏独立面板 */
/* 产品库列表：高度跟内容走，去掉表格区被撑开的空白；分类侧栏单独滚动 */
.page-wrap--product-po:has(.product-stock-card--workspace) {
  padding: 0;
  max-width: none;
  flex: 0 1 auto;
  min-height: 0;
  height: auto;
  overflow: visible;
  display: flex;
  flex-direction: column;
}

.product-stock-card--workspace > .product-stock-layout {
  flex: 0 1 auto;
  min-height: 0;
}

.product-stock-card--workspace {
  flex: 0 1 auto;
  display: flex;
  flex-direction: column;
  margin: 0;
  min-height: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.product-po-workspace {
  flex: 1;
  display: flex;
  align-items: stretch;
  gap: 12px;
  min-height: 0;
  width: 100%;
  padding: 12px;
  box-sizing: border-box;
  background: var(--bg-page, #eef1f4);
}

.product-po-workspace__left {
  flex: 2 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border, #dde1e6);
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

.product-po-workspace__right {
  flex: 1 1 0;
  min-width: 320px;
  max-width: none;
  display: flex;
  flex-direction: column;
  padding: 14px 12px;
  background: #fff;
  border: 1px solid rgba(60, 179, 113, 0.45);
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(60, 179, 113, 0.12);
  overflow: hidden;
}
.product-po-workspace__left .product-stock-toolbar {
  flex-shrink: 0;
  border-bottom: 1px solid var(--border, #e6e8ec);
  background: var(--bg-subtle, #fafbfc);
}

.product-po-workspace__right .product-po-panel__title {
  font-size: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(60, 179, 113, 0.35);
  margin-bottom: 4px;
}

.product-po-workspace__right .product-po-panel__head {
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
}

.product-po-workspace__right .product-po-panel__meta {
  font-size: 12px;
}

.product-po-workspace__right .product-po-panel__form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.product-po-workspace__right .product-po-table-wrap {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  border: none;
  border-radius: 0;
  margin: 0;
}
.product-po-workspace__right .product-po-table {
  font-size: 12px;
  table-layout: fixed;
  width: 100%;
}
.product-po-workspace__right .product-po-table th,
.product-po-workspace__right .product-po-table td {
  padding: 6px 4px;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
}
.product-po-workspace__right .product-po-table th {
  white-space: nowrap;
  font-size: 11px;
}
.product-po-workspace__right .product-po-table td {
  white-space: normal;
  word-break: break-word;
}
.product-po-workspace__right .product-po-col-code { width: 15%; }
.product-po-workspace__right .product-po-col-name { width: 18%; }
.product-po-workspace__right .product-po-col-unit { width: 7%; }
.product-po-workspace__right .product-po-col-price { width: 11%; }
.product-po-workspace__right .product-po-col-qty { width: 12%; }
.product-po-workspace__right .product-po-col-sub { width: 11%; }
.product-po-workspace__right .product-po-col-wh { width: 8%; }
.product-po-workspace__right .product-po-col-act { width: 10%; }
.product-po-workspace__right .product-po-table td:nth-child(5),
.product-po-workspace__right .product-po-table th:nth-child(5) {
  overflow: visible;
  white-space: nowrap;
  text-overflow: clip;
}
.product-po-workspace__right .product-po-table code {
  font-size: 11px;
  word-break: break-all;
}
.product-po-workspace__right .product-po-table .badge {
  display: inline-block;
  margin-top: 2px;
  padding: 0 4px;
  font-size: 10px;
  line-height: 1.4;
}
.product-po-workspace__right .product-po-name {
  max-width: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
}
.product-po-workspace__right .product-po-table .col-act,
.product-po-workspace__right .product-po-table td.actions-cell,
.product-po-workspace__right .product-po-table th:last-child,
.product-po-workspace__right .product-po-table td:last-child {
  white-space: nowrap;
  text-align: center;
  overflow: visible;
}
.product-po-workspace__right .product-po-table .warehouse-tag {
  display: inline-block;
  max-width: 100%;
  padding: 1px 5px;
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.product-po-workspace__right .product-qty-input {
  display: block;
  width: 54px;
  min-width: 54px;
  max-width: 100%;
  min-height: 28px;
  padding: 2px 6px;
  box-sizing: border-box;
  text-align: center;
  overflow: visible;
}
.product-po-workspace__right .product-qty-input::-webkit-outer-spin-button,
.product-po-workspace__right .product-qty-input::-webkit-inner-spin-button {
  margin: 0;
}
.product-po-workspace__right .product-po-table .btn-xs {
  padding: 2px 6px;
  font-size: 11px;
}
.product-po-workspace__right .product-po-panel__actions {
  margin-top: 10px;
  flex-wrap: wrap;
}
.product-po-workspace__right .product-po-export-hint {
  margin: 8px 0 0;
  font-size: 11px;
  line-height: 1.4;
}
.product-po-workspace__left .product-table-wrap {
  flex: 1;
  overflow: auto;
}

.product-stock-layout {
  flex: 0 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  grid-template-rows: auto;
  align-items: start;
  overflow: visible;
}

.product-stock-layout--no-sidebar {
  display: block;
  grid-template-columns: none;
}

.product-stock-layout__main {
  flex: 0 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.product-stock-main--solo {
  flex: 0 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border, #dde1e6);
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  margin: 12px;
}

.product-stock-layout--no-sidebar .product-stock-main--solo {
  margin: 12px 0 0;
}

/* 表格区不撑高，避免「只有几行却留大片空白」 */
.product-stock-main--solo .product-table-wrap {
  flex: 0 1 auto;
  min-height: 0;
  max-height: none;
  overflow: visible;
}

.product-stock-layout__main .product-stock-main--solo {
  flex: 0 1 auto;
  min-height: 0;
}
.product-stock-layout__main .product-po-workspace {
  flex: 1;
  min-height: 0;
}

.product-po-tfoot-label {
  text-align: right;
  font-weight: 600;
  color: var(--text-muted, #667085);
}
.product-po-panel__empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
}
@media (max-width: 960px) {
  .page-wrap--product-po:has(.product-stock-card--workspace) {
    height: auto;
    overflow: auto;
  }
  .product-po-workspace {
    flex-direction: column;
    min-height: 0;
    padding: 8px;
  }
  .product-po-workspace__left {
    border-right: none;
    min-height: 50vh;
  }
  .product-po-workspace__right {
    max-width: none;
    min-width: 0;
    min-height: 320px;
  }
}

.supplier-edit-wrap {
  padding: 12px 14px;
}
.supplier-edit-form {
  margin: 0;
}
.supplier-edit-form--upload {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border, #e6e8ec);
}
.supplier-edit-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px 12px;
}
.supplier-edit-field {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0 6px;
  margin: 0;
}
.supplier-edit-field > span {
  font-size: 12px;
  color: var(--text-secondary, #667085);
  white-space: nowrap;
}
.supplier-edit-field > input {
  width: 132px;
  max-width: 100%;
  min-height: 32px;
  padding: 4px 8px;
  font-size: 13px;
}
.supplier-edit-field:first-child > input {
  width: 148px;
}
.supplier-edit-field--file > input {
  width: 180px;
}
.supplier-edit-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.supplier-edit-hint {
  margin: 6px 0 0;
  font-size: 11px;
}

.product-page-tabs .btn.active {
  background: var(--primary, #3CB371);
  border-color: var(--primary, #3CB371);
  color: #fff;
}
.product-stock-toolbar .product-stock-search-form {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.product-stock-desc {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted, #667085);
  white-space: nowrap;
  flex-shrink: 0;
}
.product-stock-search-controls {
  display: contents;
}
.product-sort-select {
  min-width: 140px;
}
.product-stock-table .col-check {
  width: 44px;
  text-align: center;
}
.product-qty-input {
  width: 72px;
  min-height: 32px;
  padding: 4px 8px;
}
.warehouse-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--bg-subtle, #f5f7fa);
  font-size: 12px;
  color: var(--text-muted, #667085);
}
.product-cart-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px 16px;
  padding: 14px 20px;
  border-top: 1px solid var(--border, #e6e8ec);
  background: var(--bg-subtle, #fafbfc);
}
.product-edit-image-row__line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  width: 100%;
}
.product-edit-image-row__label {
  flex: 0 0 auto;
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
}
.product-edit-image-row__url {
  flex: 1 1 auto;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
}
.product-edit-image-row__upload {
  flex: 0 0 auto;
  margin: 0;
  white-space: nowrap;
}
.product-edit-image-row__save {
  flex: 0 0 auto;
  white-space: nowrap;
}
.product-edit-image-row__preview {
  margin-top: 8px;
}
.product-edit-image-row__preview img {
  max-width: 120px;
  max-height: 80px;
  border-radius: 6px;
  border: 1px solid var(--border);
}
.product-row--hoverable {
  cursor: default;
}
.product-row--hoverable:hover {
  background: rgba(60, 179, 113, 0.04);
}
.product-image-preview {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  width: 200px;
  padding: 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border, #e6e8ec);
  background: #fff;
}
.product-image-preview__inner img {
  display: block;
  width: 200px;
  height: 200px;
  object-fit: cover;
  background: #f0f2f5;
}
.product-image-preview__cap {
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text, #1a1a1a);
  border-top: 1px solid var(--border, #e6e8ec);
  max-height: 48px;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 768px) {
  .product-stock-search-controls {
    width: 100%;
  }
  .product-stock-search-controls .input-group {
    flex: 1;
    min-width: 0;
  }
}

.member-app-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 6px 16px 8px;
  font-size: 12px;
  color: #9ca3af;
  border-top: 1px solid var(--border, #e6e8ec);
  background: #fff;
}
.member-app-footer__version {
  color: #b0b7c3;
  letter-spacing: 0.03em;
}
body.theme-tabler-ws .member-app-footer {
  display: none;
}
