/* ============================================================
   重庆天迈广告报价系统 — 设计系统 v2
   风格：简约商务 · 浅色 · 侧边栏布局
   ============================================================ */

/* ===== 1. 设计令牌 ===== */
:root {
  --bg:            #f4f6f9;
  --surface:       #ffffff;
  --surface-2:     #fafbfc;
  --surface-3:     #f3f4f7;
  --border:        #e7eaf0;
  --border-strong: #d6dae3;

  --text:    #0f172a;
  --text-2:  #556072;
  --text-3:  #98a2b3;

  --primary:      #4f46e5;
  --primary-hover:#4338ca;
  --primary-soft: #eef2ff;
  --primary-soft2:#e0e7ff;
  --primary-ring: rgba(79,70,229,.14);

  --success:#059669; --success-bg:#ecfdf5; --success-bd:#a7f3d0;
  --warning:#b45309; --warning-bg:#fffbeb; --warning-bd:#fde68a;
  --danger: #dc2626; --danger-bg: #fef2f2; --danger-bd: #fecaca;
  --info:   #2563eb; --info-bg:   #eff6ff; --info-bd:   #bfdbfe;

  --radius:    14px;
  --radius-sm: 9px;
  --radius-xs: 7px;

  --shadow-xs: 0 1px 2px rgba(16,24,40,.05);
  --shadow-sm: 0 1px 2px rgba(16,24,40,.04), 0 2px 6px rgba(16,24,40,.05);
  --shadow-md: 0 6px 18px rgba(16,24,40,.08);
  --shadow-lg: 0 18px 48px rgba(16,24,40,.14);

  --sidebar-w: 240px;
  --topbar-h:  62px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
}

/* ===== 2. 基础重置 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; }
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -.01em; }
::selection { background: var(--primary-soft2); }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #d5d9e2; border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #bcc2cf; background-clip: content-box; border: 3px solid transparent; }
::-webkit-scrollbar-track { background: transparent; }

/* ===== 3. 应用外壳 ===== */
.app { display: flex; min-height: 100vh; }

/* --- 侧边栏 --- */
.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 60;
}
.sidebar-brand {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 18px;
  border-bottom: 1px solid var(--border);
  flex: 0 0 auto;
}
.brand-logo {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 15px;
  box-shadow: 0 4px 10px rgba(79,70,229,.32);
  flex: 0 0 auto;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; overflow: hidden; }
.brand-text b { font-size: 14.5px; color: var(--text); white-space: nowrap; }
.brand-text span { font-size: 11px; color: var(--text-3); letter-spacing: .04em; }

.sidebar-nav { flex: 1 1 auto; overflow-y: auto; padding: 14px 12px; }
.nav-group {
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  color: var(--text-3); text-transform: uppercase;
  padding: 14px 10px 6px;
}
.nav-group:first-child { padding-top: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 11px; border-radius: var(--radius-sm);
  color: var(--text-2); font-size: 13.5px; font-weight: 500;
  margin-bottom: 2px; transition: background .14s, color .14s;
  position: relative;
}
.nav-item svg { width: 18px; height: 18px; flex: 0 0 auto; opacity: .85; }
.nav-item:hover { background: var(--surface-3); color: var(--text); }
.nav-item.active {
  background: var(--primary-soft); color: var(--primary); font-weight: 600;
}
.nav-item.active svg { opacity: 1; }
.nav-item.active::before {
  content: ""; position: absolute; left: -12px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 18px; border-radius: 0 3px 3px 0; background: var(--primary);
}
.nav-badge {
  margin-left: auto; font-size: 11px; font-weight: 700;
  background: var(--primary-soft2); color: var(--primary);
  padding: 1px 7px; border-radius: 99px;
}

.sidebar-foot { flex: 0 0 auto; border-top: 1px solid var(--border); padding: 12px; }
.sidebar-foot-link {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  margin-bottom: 10px; padding: 8px; border-radius: var(--radius-xs);
  font-size: 12.5px; color: var(--text-2); background: var(--surface-2);
  border: 1px solid var(--border); transition: .16s;
}
.sidebar-foot-link:hover { color: var(--primary); background: var(--primary-soft); border-color: var(--primary-soft2); }
.sidebar-foot-link svg { width: 15px; height: 15px; }
.user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 8px; border-radius: var(--radius-sm);
}
.user-chip:hover { background: var(--surface-3); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-soft2); color: var(--primary);
  font-weight: 700; font-size: 14px;
}
.user-meta { min-width: 0; flex: 1; }
.user-meta b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta span { font-size: 11px; color: var(--text-3); }
.icon-btn-mini {
  border: none; background: none; color: var(--text-3);
  padding: 6px; border-radius: 7px; display: flex; transition: all .14s;
}
.icon-btn-mini:hover { background: var(--surface-3); color: var(--danger); }
.icon-btn-mini svg { width: 17px; height: 17px; }

/* --- 主区域 --- */
.main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: var(--topbar-h); flex: 0 0 auto;
  background: rgba(255,255,255,.85); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px;
  padding: 0 26px; position: sticky; top: 0; z-index: 50;
}
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-3); }
.breadcrumb b { color: var(--text); font-weight: 600; }
.breadcrumb svg { width: 15px; height: 15px; opacity: .6; }
.topbar-spacer { flex: 1; }
.hamburger {
  display: none; border: 1px solid var(--border); background: var(--surface);
  border-radius: 8px; padding: 7px; color: var(--text-2); align-items: center;
}
.hamburger svg { width: 18px; height: 18px; display: block; }

.content { padding: 26px; max-width: 1440px; width: 100%; margin: 0 auto; flex: 1 1 auto; }

/* ===== 4. 页头 ===== */
.page-header {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 16px; margin-bottom: 22px; flex-wrap: wrap;
}
.page-title { font-size: 23px; font-weight: 700; color: var(--text); letter-spacing: -.02em; }
.page-desc { font-size: 13px; color: var(--text-3); margin-top: 5px; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ===== 5. 卡片 ===== */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-xs);
  padding: 22px; margin-bottom: 20px;
}
.card-flush { padding: 0; overflow: hidden; }
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--border);
  background: var(--surface-2); flex-wrap: wrap;
}
.card-head h3 { font-size: 15px; font-weight: 700; }
.card-head .sub { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.card-body { padding: 22px; }

/* ===== 6. 按钮 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 16px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font-size: 13.5px; font-weight: 600; color: var(--text-2);
  background: var(--surface); transition: all .15s; white-space: nowrap;
  line-height: 1.2;
}
.btn svg { width: 16px; height: 16px; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(79,70,229,.3); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--surface); color: var(--text-2); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-3); color: var(--text); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #047857; }
.btn-danger { background: var(--surface); color: var(--danger); border-color: var(--danger-bd); }
.btn-danger:hover { background: var(--danger-bg); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: var(--radius-xs); }
.btn-sm svg { width: 14px; height: 14px; }
.btn-icon { padding: 8px; border-radius: var(--radius-xs); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ===== 7. 表单 ===== */
.form-row { display: flex; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.form-row:last-child { margin-bottom: 0; }
.form-group { flex: 1; min-width: 190px; }
.form-group > label {
  display: block; font-size: 12.5px; font-weight: 600;
  color: var(--text-2); margin-bottom: 7px;
}
.form-group .req { color: var(--danger); }
.form-hint { font-size: 11.5px; color: var(--text-3); margin-top: 5px; }
.form-control {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); background: var(--surface); color: var(--text);
  transition: border-color .14s, box-shadow .14s;
}
.form-control::placeholder { color: var(--text-3); }
.form-control:hover { border-color: #c2c8d4; }
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
textarea.form-control { resize: vertical; min-height: 68px; line-height: 1.6; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2398a2b3' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; padding-right: 34px; }

/* ===== 8. 搜索 / 筛选栏 ===== */
.search-bar { margin-bottom: 16px; }
.search-form {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow-xs);
}
.search-form .form-control { width: auto; }
.search-input { position: relative; display: flex; align-items: center; width: 260px; max-width: 100%; }
.search-input svg { position: absolute; left: 11px; width: 16px; height: 16px; color: var(--text-3); pointer-events: none; }
.search-input .form-control { padding-left: 34px; width: 100%; }
.search-form .spacer { flex: 1; }

/* ===== 9. 表格 ===== */
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; background: var(--surface); }
.data-table thead th {
  background: var(--surface-2); color: var(--text-3);
  font-size: 11.5px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; text-align: left;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table tbody td { padding: 13px 16px; border-bottom: 1px solid var(--border); }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background .12s; }
.data-table tbody tr:hover { background: var(--surface-2); }
.data-table .text-right { text-align: right; }
.data-table .text-center { text-align: center; }
.data-table .num { font-variant-numeric: tabular-nums; }
.data-table .row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.cell-strong { font-weight: 600; color: var(--text); }
.cell-muted { color: var(--text-3); font-size: 12.5px; }
.cell-amount { font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; }

/* 空状态 */
.empty { text-align: center; padding: 56px 20px; color: var(--text-3); }
.empty svg { width: 40px; height: 40px; opacity: .4; margin-bottom: 12px; }
.empty b { display: block; color: var(--text-2); font-size: 14px; margin-bottom: 4px; }
.empty span { font-size: 12.5px; }

/* ===== 10. 徽章 ===== */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 99px;
  font-size: 11.5px; font-weight: 600; line-height: 1.7;
  background: var(--surface-3); color: var(--text-2);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
.badge-plain::before { display: none; }
.badge-draft  { background: #f1f3f7; color: #64748b; }
.badge-sent   { background: var(--info-bg); color: var(--info); }
.badge-signed { background: var(--success-bg); color: var(--success); }
.badge-void   { background: var(--danger-bg); color: var(--danger); }
.badge-active { background: var(--success-bg); color: var(--success); }
.badge-inactive { background: #f1f3f7; color: var(--text-3); }
.badge-admin  { background: var(--primary-soft); color: var(--primary); }
.badge-staff  { background: var(--info-bg); color: var(--info); }

/* 状态切换按钮（后台启用/停用） */
.badge-toggle { border: none; cursor: pointer; font-family: inherit; }

/* ===== 11. 提示条 ===== */
.alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 13px 16px; border-radius: var(--radius-sm);
  border: 1px solid transparent; margin-bottom: 18px; font-size: 13.5px;
}
.alert svg { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 1px; }
.alert-success { background: var(--success-bg); color: #065f46; border-color: var(--success-bd); }
.alert-error   { background: var(--danger-bg);  color: #991b1b; border-color: var(--danger-bd); }
.alert-info    { background: var(--info-bg);    color: #1e40af; border-color: var(--info-bd); }

/* ===== 12. 分页 ===== */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 22px; flex-wrap: wrap; }
.page-link {
  min-width: 34px; height: 34px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-xs); border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text-2);
  font-size: 13px; font-weight: 600; transition: all .14s;
}
.page-link:hover { background: var(--surface-3); color: var(--text); }
.page-link.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ===== 13. 报价单编辑（表格） ===== */
.quote-toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.quote-toolbar .spacer { flex: 1; }
.rowcount { font-size: 12.5px; color: var(--text-3); }
.rowcount b { color: var(--primary); }

.quote-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.quote-table thead th {
  position: sticky; top: 0; z-index: 5;
  background: var(--surface-2); color: var(--text-3);
  font-size: 11px; font-weight: 700; letter-spacing: .03em;
  padding: 10px 6px; text-align: center; white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
.quote-table tbody td { padding: 5px 4px; border-bottom: 1px solid var(--border); text-align: center; }
.quote-table tbody tr:last-child td { border-bottom: none; }
.quote-table tbody tr:hover { background: var(--surface-2); }
.quote-table input, .quote-table select {
  width: 100%; padding: 8px 8px; border: 1px solid transparent;
  border-radius: var(--radius-xs); background: var(--surface-3);
  color: var(--text); text-align: center; font-size: 13px;
  transition: all .13s;
}
.quote-table input:hover, .quote-table select:hover { background: #eceef3; }
.quote-table input:focus, .quote-table select:focus {
  outline: none; background: var(--surface);
  border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring);
}
.quote-table input[type="number"] { -moz-appearance: textfield; }
.quote-table input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; }
.quote-table .sn { color: var(--text-3); font-weight: 600; font-variant-numeric: tabular-nums; }
.quote-table .formula-hint {
  margin-top: 3px; font-size: 10px; line-height: 1.3;
  color: var(--text-3); text-align: center;
  font-family: var(--font-mono, Consolas, monospace);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.col-result { background: var(--success-bg) !important; font-weight: 700; color: var(--success); font-variant-numeric: tabular-nums; }
.col-amount { background: #fff7ed !important; font-weight: 700; color: var(--warning); font-variant-numeric: tabular-nums; }
.col-error { color: var(--danger); font-size: 11.5px; font-weight: 600; }
.btn-del {
  border: none; background: none; color: var(--text-3);
  padding: 6px; border-radius: var(--radius-xs); display: inline-flex; transition: all .14s;
}
.btn-del:hover { background: var(--danger-bg); color: var(--danger); }
.btn-del svg { width: 16px; height: 16px; }

/* 汇总条 */
.summary {
  margin-top: 16px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 24px; box-shadow: var(--shadow-xs);
  display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap;
}
.summary-label { font-size: 12.5px; color: var(--text-3); margin-bottom: 4px; }
.summary-amount { font-size: 30px; font-weight: 800; color: var(--primary); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.summary-cn { font-size: 14px; color: var(--text-2); text-align: right; font-weight: 600; }

/* ===== 14. 分类树（管理侧栏） ===== */
.admin-split { display: flex; gap: 16px; align-items: flex-start; }
.admin-split > .main-col { flex: 1; min-width: 0; }
.cat-panel {
  flex: 0 0 242px; width: 242px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow-xs);
}
.cat-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12.5px; font-weight: 700; color: var(--text-2);
  padding: 0 6px 10px; border-bottom: 1px solid var(--border); margin-bottom: 8px;
}
.cat-panel-head a { font-size: 11.5px; color: var(--text-3); text-decoration: none; font-weight: 500; }
.cat-panel-head a:hover { color: var(--primary); }
.cat-tree, .cat-tree ul { list-style: none; margin: 0; padding: 0; }
.cat-tree ul { padding-left: 13px; margin-left: 7px; border-left: 1px dashed var(--border); }
.cat-node {
  display: flex; align-items: center; justify-content: space-between; gap: 2px;
  border-radius: 8px; padding: 4px 6px; margin: 1px 0; font-size: 13px;
}
.cat-node:hover { background: var(--surface-2); }
.cat-node.active { background: var(--primary-soft); }
.cat-node.active a { color: var(--primary); font-weight: 700; }
.cat-node a {
  flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between;
  gap: 6px; color: var(--text); text-decoration: none; padding: 1px 2px;
}
.cat-node a > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-count {
  font-size: 10.5px; color: var(--text-3); background: var(--surface-3);
  border-radius: 8px; padding: 0 6px; line-height: 16px; flex: 0 0 auto;
}
.cat-node.active .cat-count { color: var(--primary); background: var(--surface); }
.cat-ops { display: none; gap: 1px; flex: 0 0 auto; }
.cat-node:hover .cat-ops { display: flex; }
.cat-ops button {
  border: none; background: none; color: var(--text-3); cursor: pointer;
  padding: 2px; border-radius: 4px; display: flex;
}
.cat-ops button:hover { color: var(--primary); background: var(--surface-3); }
.cat-ops svg { width: 12px; height: 12px; }
.cat-add { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; }
.cat-add select, .cat-add input {
  font-size: 12.5px; padding: 6px 8px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--surface-3); color: var(--text); width: 100%;
}
.cat-add select:focus, .cat-add input:focus { outline: none; border-color: var(--primary); background: var(--surface); }

/* ===== 15. 树状选择器弹窗 ===== */
.tp-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(15, 23, 42, .45);
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 9vh;
}
.tp-modal {
  width: 480px; max-width: 94vw; max-height: 74vh;
  background: var(--surface); border-radius: 14px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .3);
  display: flex; flex-direction: column; overflow: hidden;
  animation: tpIn .16s ease;
}
@keyframes tpIn { from { transform: translateY(-12px); opacity: 0; } }
.tp-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 18px; border-bottom: 1px solid var(--border);
}
.tp-title { font-size: 14.5px; font-weight: 700; }
.tp-close {
  border: none; background: none; font-size: 22px; line-height: 1;
  color: var(--text-3); cursor: pointer; padding: 0 2px;
}
.tp-close:hover { color: var(--danger); }
.tp-search { padding: 10px 14px; border-bottom: 1px solid var(--border); }
.tp-search input {
  width: 100%; padding: 8px 12px; border: 1px solid var(--border);
  border-radius: 9px; font-size: 13px; background: var(--surface-3); color: var(--text);
  box-sizing: border-box;
}
.tp-search input:focus { outline: none; border-color: var(--primary); background: var(--surface); }
.tp-body { overflow: auto; padding: 8px 10px 12px; flex: 1; min-height: 160px; }
.tp-tree, .tp-tree ul { list-style: none; margin: 0; padding: 0; }
.tp-tree ul { padding-left: 15px; }
.tp-cat-row {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 8px; border-radius: 8px; cursor: pointer; user-select: none;
  font-size: 13px; font-weight: 600; color: var(--text-2);
}
.tp-cat-row:hover { background: var(--surface-2); }
.tp-cat-row .tw { color: var(--text-3); transition: transform .15s; flex: 0 0 auto; }
.tp-cat.open > .tp-cat-row .tw { transform: rotate(90deg); }
.tp-cat > ul { display: none; }
.tp-cat.open > ul { display: block; }
.tp-cat-row .cat-count { margin-left: auto; }
.tp-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 8px 6px 21px; border-radius: 8px; cursor: pointer; font-size: 13px;
}
.tp-item:hover { background: var(--primary-soft); }
.tp-item:hover .tp-item-name { color: var(--primary); }
.tp-item .tp-item-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-item .path { font-size: 10.5px; color: var(--text-3); }
.tp-item .meta { font-size: 11px; color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tp-empty { text-align: center; color: var(--text-3); font-size: 12.5px; padding: 30px 0; }
.tp-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; border-top: 1px solid var(--border);
  background: var(--surface-2); font-size: 11.5px; color: var(--text-3);
}
.tp-manual {
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  border-radius: 8px; padding: 5px 10px; font-size: 12px; cursor: pointer; flex: 0 0 auto;
}
.tp-manual:hover { border-color: var(--primary); color: var(--primary); }

/* 报价单行内：产品/工艺选择输入 */
.pick-input { cursor: pointer; }
.btn-tree {
  border: none; background: none; color: var(--text-3); cursor: pointer;
  padding: 3px; border-radius: 5px; display: flex; flex: 0 0 auto;
}
.btn-tree:hover { color: var(--primary); background: var(--primary-soft); }
.btn-tree svg { width: 13px; height: 13px; }

@media (max-width: 900px) {
  .admin-split { flex-direction: column; }
  .cat-panel { width: 100%; flex: auto; }
}
.summary-right { text-align: right; }

/* ===== 14. 登录页（品牌标识，布局见第 21 节） ===== */
.auth-logo {
  width: 56px; height: 56px; border-radius: 16px;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 22px; font-weight: 800;
  box-shadow: 0 10px 24px rgba(79,70,229,.32);
}

/* ===== 15. 报价单预览 / 打印 ===== */
.doc-paper {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 34px 40px; box-shadow: var(--shadow-sm);
}
.doc-head {
  display: flex; justify-content: space-between; gap: 24px;
  padding-bottom: 20px; border-bottom: 2px solid var(--primary); margin-bottom: 22px; flex-wrap: wrap;
}
.doc-company h2 { font-size: 21px; color: var(--text); }
.doc-company p { font-size: 12.5px; color: var(--text-3); margin-top: 5px; }
.doc-title { font-size: 13px; font-weight: 700; letter-spacing: .3em; color: var(--primary); margin-bottom: 8px; text-align: right; }
.doc-meta { text-align: right; font-size: 12.5px; color: var(--text-2); line-height: 1.9; }
.doc-meta b { color: var(--text); }
.doc-customer {
  display: flex; flex-wrap: wrap; gap: 6px 26px;
  font-size: 13.5px; color: var(--text-2); margin-bottom: 18px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 13px 16px;
}
.doc-customer b { color: var(--text); }
.doc-customer .grow { flex: 1; }

.view-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.view-table thead th {
  background: var(--surface-2); color: var(--text-2); font-weight: 700;
  padding: 10px 8px; border: 1px solid var(--border); text-align: center; white-space: nowrap;
}
.view-table tbody td { padding: 9px 8px; border: 1px solid var(--border); text-align: center; }
.view-table tbody tr:nth-child(even) { background: var(--surface-2); }
.view-table .text-left { text-align: left; }
.view-table .num { font-variant-numeric: tabular-nums; }

.view-total {
  display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap;
  margin-top: 18px; padding: 18px 24px; border-radius: var(--radius);
  background: var(--primary-soft); border: 1px solid var(--primary-soft2);
}
.view-total-amount { font-size: 28px; font-weight: 800; color: var(--primary); font-variant-numeric: tabular-nums; }
.view-total-cn { font-size: 14px; color: var(--text-2); font-weight: 600; }
.view-footer { margin-top: 26px; font-size: 12px; color: var(--text-3); border-top: 1px dashed var(--border-strong); padding-top: 14px; }
.view-actions { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }

/* ===== 16. 安装页 ===== */
.install-wrap { max-width: 620px; margin: 48px auto; padding: 0 24px; }
.install-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 34px; box-shadow: var(--shadow-md); }
.install-card h1 { font-size: 22px; color: var(--text); display: flex; align-items: center; gap: 10px; }
.install-steps { list-style: none; margin: 20px 0 24px; }
.install-steps li { display: flex; gap: 12px; align-items: flex-start; padding: 9px 0; font-size: 13.5px; color: var(--text-2); }
.install-steps .n {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary);
  font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.install-steps code, .install-card code { background: var(--surface-3); padding: 2px 7px; border-radius: 5px; font-size: 12.5px; color: var(--primary); }

/* ===== 17. 工具类 ===== */
.text-muted { color: var(--text-3); }
.text-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 16px; }
.flex { display: flex; } .items-center { align-items: center; } .gap-2 { gap: 16px; }
.formula-expr { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; color: var(--primary); background: var(--primary-soft); padding: 2px 8px; border-radius: 6px; display: inline-block; }
.formula-test { background: var(--success-bg); color: var(--success); padding: 3px 9px; border-radius: 6px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ===== 18. 响应式 ===== */
.sidebar-scrim { display: none; }

@media (max-width: 1000px) {
  .sidebar {
    position: fixed; left: 0; top: 0; transform: translateX(-100%);
    transition: transform .22s ease; box-shadow: var(--shadow-lg);
  }
  body.nav-open .sidebar { transform: translateX(0); }
  body.nav-open .sidebar-scrim {
    display: block; position: fixed; inset: 0; background: rgba(15,23,42,.4);
    z-index: 55; animation: fade .18s ease;
  }
  .hamburger { display: inline-flex; }
  .content { padding: 18px; }
  .topbar { padding: 0 18px; }
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 640px) {
  .page-header { align-items: flex-start; }
  .search-input { width: 100%; }
  .search-form .form-control { width: 100%; }
  .doc-paper { padding: 20px; }
  .summary-amount { font-size: 24px; }
}

/* ===== 19. 打印 ===== */
@media print {
  .sidebar, .topbar, .view-actions, .sidebar-scrim, .no-print { display: none !important; }
  body { background: #fff; }
  .content { padding: 0; max-width: none; }
  .card, .doc-paper { box-shadow: none; border: none; padding: 0; margin: 0; border-radius: 0; }
  .view-table thead th { background: #f1f3f7 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .view-total { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ===== 20. 官网首页（home.php） ===== */
.btn-lg { padding: 12px 24px; font-size: 14.5px; border-radius: 11px; }

.lp-body { background: #fff; }
.lp-nav {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255,255,255,.88);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.lp-nav-inner {
  max-width: 1160px; margin: 0 auto; padding: 0 24px; height: 68px;
  display: flex; align-items: center; gap: 26px;
}
.lp-brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.lp-brand .brand-logo { width: 38px; height: 38px; font-size: 15px; border-radius: 11px; }
.lp-brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.lp-brand-text b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-brand-text i { font-style: normal; font-size: 10px; letter-spacing: .13em; color: var(--text-3); }
.lp-links { display: flex; gap: 22px; margin-left: auto; font-size: 13.5px; color: var(--text-2); }
.lp-links a { transition: color .15s; }
.lp-links a:hover { color: var(--primary); }

.lp-hero {
  padding: 68px 24px 78px;
  background: radial-gradient(900px 480px at 8% -10%, #eef2ff 0%, transparent 62%),
              radial-gradient(700px 460px at 100% 6%, #f5f3ff 0%, transparent 58%),
              #fff;
}
.lp-hero-inner {
  max-width: 1160px; margin: 0 auto;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center;
}
.lp-tag {
  display: inline-block; font-size: 12.5px; font-weight: 700; color: var(--primary);
  background: var(--primary-soft); border: 1px solid var(--primary-soft2);
  padding: 5px 12px; border-radius: 99px;
}
.lp-hero-copy h1 { font-size: 44px; line-height: 1.2; margin: 18px 0 16px; letter-spacing: -.02em; }
.lp-hero-copy > p { font-size: 15px; color: var(--text-2); max-width: 530px; }
.lp-hero-actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.lp-facts { display: flex; gap: 40px; margin-top: 38px; padding-top: 24px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.lp-facts div { display: flex; flex-direction: column; }
.lp-facts b { font-size: 22px; color: var(--text); font-variant-numeric: tabular-nums; }
.lp-facts span { font-size: 12.5px; color: var(--text-3); }

.lp-card-stack { display: flex; flex-direction: column; gap: 14px; }
.lp-mini-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 18px 20px; box-shadow: var(--shadow-md);
}
.lp-mini-card-2 { margin-left: 34px; }
.lp-mini-head {
  display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-3);
  font-weight: 600; padding-bottom: 10px; border-bottom: 1px dashed var(--border); margin-bottom: 8px;
}
.lp-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.lp-dot-ok { background: var(--success); }
.lp-mini-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-2); padding: 5px 0; }
.lp-mini-row b { color: var(--text); font-variant-numeric: tabular-nums; }
.lp-mini-total {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 10px; padding: 10px 12px; border-radius: 10px;
  background: var(--primary-soft); font-size: 13px; color: var(--text-2);
}
.lp-mini-total b { color: var(--primary); font-size: 17px; font-variant-numeric: tabular-nums; }
.lp-mini-note { font-size: 12.5px; color: var(--text-2); line-height: 1.75; }

.lp-section { padding: 66px 24px; }
.lp-section-alt { background: var(--surface-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.lp-section-head { max-width: 1160px; margin: 0 auto 34px; text-align: center; }
.lp-section-head h2 { font-size: 28px; }
.lp-section-head p { font-size: 14px; color: var(--text-3); margin-top: 8px; }
.lp-grid { max-width: 1160px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.lp-grid-3 { grid-template-columns: repeat(3, 1fr); }
.lp-service {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px 20px; box-shadow: var(--shadow-xs); transition: .18s;
}
.lp-service:hover { border-color: var(--primary-soft2); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.lp-service-ic {
  display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center;
  border-radius: 10px; background: var(--primary-soft); color: var(--primary);
  font-size: 13px; margin-bottom: 12px;
}
.lp-service b { display: block; font-size: 15px; }
.lp-service > span:last-child { display: block; font-size: 12.5px; color: var(--text-3); margin-top: 6px; }
.lp-why { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.lp-why b { display: block; font-size: 16px; margin-bottom: 8px; }
.lp-why span { font-size: 13px; color: var(--text-2); line-height: 1.8; }

.lp-contact {
  max-width: 1160px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr auto; gap: 40px; align-items: center;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  border-radius: 20px; padding: 42px 44px; color: #fff; box-shadow: var(--shadow-lg);
}
.lp-contact h2 { font-size: 26px; }
.lp-contact-desc { font-size: 13.5px; opacity: .88; margin-top: 10px; max-width: 380px; }
.lp-contact-list { list-style: none; }
.lp-contact-list li { display: flex; gap: 14px; padding: 7px 0; font-size: 13.5px; }
.lp-contact-list span { opacity: .75; flex: 0 0 42px; }
.lp-contact-list b { font-weight: 600; }
.lp-contact .btn-primary { background: #fff; color: var(--primary); box-shadow: var(--shadow-md); }
.lp-contact .btn-primary:hover { background: #f7f8ff; color: var(--primary-hover); }

/* --- 导航右侧电话 --- */
.lp-nav-tel {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--text-2); white-space: nowrap;
}
.lp-nav-tel svg { width: 15px; height: 15px; color: var(--primary); }

/* --- 首屏增强 --- */
.lp-hero-copy h1 { font-size: 48px; }
.lp-bars { display: flex; flex-direction: column; gap: 7px; margin-top: 16px; }
.lp-bars span { display: block; height: 7px; border-radius: 99px; opacity: .8;
  background: linear-gradient(90deg, var(--primary), var(--primary-soft2)); }

/* --- 数据信任条 --- */
.lp-stats {
  background: var(--surface-2); border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border); padding: 28px 24px;
}
.lp-stats-inner { max-width: 1160px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); }
.lp-stat { text-align: center; padding: 4px 12px; border-right: 1px solid var(--border); }
.lp-stat:last-child { border-right: 0; }
.lp-stat b { display: block; font-size: 30px; color: var(--primary);
  font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1.2; }
.lp-stat-unit { font-size: 15px; margin-left: 2px; font-weight: 700; }
.lp-stat span { font-size: 12.5px; color: var(--text-3); }

/* --- 小节标签 --- */
.lp-kicker {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .16em;
  color: var(--primary); text-transform: uppercase; margin-bottom: 10px;
}

/* --- 产品展示 --- */
.lp-products { max-width: 1160px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.lp-product {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow-xs); transition: .18s;
  display: flex; flex-direction: column; gap: 7px;
}
.lp-product:hover { border-color: var(--primary-soft2); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.lp-product-cat {
  display: inline-block; font-size: 11px; font-weight: 700; color: var(--primary);
  background: var(--primary-soft); border: 1px solid var(--primary-soft2);
  border-radius: 6px; padding: 3px 9px;
}
.lp-product-name { font-size: 15.5px; margin-top: 3px; }
.lp-product-craft { font-size: 12.5px; color: var(--text-3); line-height: 1.65; }
.lp-product-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--border);
}
.lp-product-unit { font-size: 12px; color: var(--text-3); }
.lp-product-price { font-size: 15.5px; color: var(--primary); font-variant-numeric: tabular-nums; }
.lp-product-price-ask { font-size: 13px; color: var(--text-2); }

/* --- 服务流程 --- */
.lp-steps { max-width: 1160px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.lp-step {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 16px; text-align: center; box-shadow: var(--shadow-xs);
}
.lp-step::after {
  content: ''; position: absolute; top: 46px; right: -14px; width: 14px; height: 2px;
  background: var(--primary-soft2);
}
.lp-step:last-child::after { display: none; }
.lp-step-no { font-size: 11.5px; font-weight: 800; color: var(--primary); letter-spacing: .12em; }
.lp-step-ic {
  display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center;
  border-radius: 13px; background: var(--primary-soft); color: var(--primary); margin: 10px 0 12px;
}
.lp-step-ic svg { width: 22px; height: 22px; }
.lp-step b { display: block; font-size: 14.5px; margin-bottom: 6px; }
.lp-step > span:last-child { font-size: 12.5px; color: var(--text-3); line-height: 1.7; }

/* --- 业务/优势图标 --- */
.lp-service-ic svg { width: 18px; height: 18px; }
.lp-why { transition: .18s; }
.lp-why:hover { border-color: var(--primary-soft2); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.lp-why-ic {
  display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center;
  border-radius: 12px; background: var(--primary-soft); color: var(--primary); margin-bottom: 14px;
}
.lp-why-ic svg { width: 20px; height: 20px; }

/* --- 常见问题 --- */
.lp-faq { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.lp-faq-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden; transition: border-color .18s, box-shadow .18s;
}
.lp-faq-item[open] { border-color: var(--primary-soft2); box-shadow: var(--shadow-sm); }
.lp-faq-item summary {
  list-style: none; cursor: pointer; padding: 16px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  font-size: 14.5px; font-weight: 600;
}
.lp-faq-item summary::-webkit-details-marker { display: none; }
.lp-faq-item summary i {
  font-style: normal; flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; line-height: 1; transition: transform .2s;
}
.lp-faq-item[open] summary i { transform: rotate(45deg); }
.lp-faq-item > p { padding: 0 20px 18px; font-size: 13.5px; color: var(--text-2); line-height: 1.85; }

/* --- 联系我们：图标 --- */
.lp-contact-list li { align-items: center; }
.lp-contact-list li svg { width: 16px; height: 16px; flex: 0 0 16px; opacity: .85; }
.lp-contact-list span { flex: 0 0 40px; }
.lp-contact .btn svg { width: 15px; height: 15px; }

/* --- 页脚 --- */
.lp-footer { background: #0f172a; color: #cbd5e1; padding: 48px 24px 0; }
.lp-footer-inner {
  max-width: 1160px; margin: 0 auto;
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 40px;
  padding-bottom: 38px;
}
.lp-footer-brand { display: flex; gap: 12px; align-items: flex-start; }
.lp-footer-brand .brand-logo { width: 40px; height: 40px; font-size: 15px; }
.lp-footer-brand b { color: #fff; font-size: 15px; display: block; }
.lp-footer-brand p { font-size: 12.5px; color: #94a3b8; margin-top: 7px; max-width: 250px; line-height: 1.7; }
.lp-footer-col { display: flex; flex-direction: column; gap: 10px; }
.lp-footer-col h4 { color: #fff; font-size: 13.5px; margin-bottom: 3px; }
.lp-footer-col a, .lp-footer-col span { font-size: 13px; color: #94a3b8; transition: color .15s; line-height: 1.6; }
.lp-footer-col a:hover { color: #fff; }
.lp-footer-bar {
  max-width: 1160px; margin: 0 auto; border-top: 1px solid rgba(255,255,255,.1);
  padding: 18px 0; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: 12.5px; color: #64748b;
}

@media (max-width: 1000px) {
  .lp-products { grid-template-columns: repeat(3, 1fr); }
  .lp-steps { grid-template-columns: repeat(3, 1fr); }
  .lp-step::after { display: none; }
  .lp-footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .lp-links { gap: 16px; font-size: 13px; }
  .lp-nav-tel { display: none; }
}
@media (max-width: 900px) {
  .lp-hero-inner { grid-template-columns: 1fr; gap: 38px; }
  .lp-hero-copy h1 { font-size: 34px; }
  .lp-grid, .lp-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .lp-products { grid-template-columns: repeat(2, 1fr); }
  .lp-steps { grid-template-columns: repeat(2, 1fr); }
  .lp-stats-inner { grid-template-columns: repeat(2, 1fr); row-gap: 18px; }
  .lp-stat:nth-child(2) { border-right: 0; }
  .lp-contact { grid-template-columns: 1fr; padding: 32px 26px; gap: 24px; }
  .lp-links { display: none; }
  .lp-nav-inner > .btn { margin-left: auto; }
}
@media (max-width: 560px) {
  .lp-grid, .lp-grid-3 { grid-template-columns: 1fr; }
  .lp-products, .lp-steps { grid-template-columns: 1fr; }
  .lp-hero { padding: 44px 20px 54px; }
  .lp-facts { gap: 24px; }
  .lp-stat { border-right: 0; }
  .lp-stat b { font-size: 26px; }
  .lp-footer-inner { grid-template-columns: 1fr; gap: 26px; padding-bottom: 30px; }
  .lp-faq-item summary { font-size: 14px; padding: 14px 16px; }
  .lp-faq-item > p { padding: 0 16px 16px; }
}

/* ===== 21. 登录页（左右分栏） ===== */
.auth-split { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; background: var(--bg); }
.auth-hero {
  position: relative; overflow: hidden; padding: 52px 58px;
  display: flex; flex-direction: column; justify-content: space-between;
  color: #fff;
  background: linear-gradient(150deg, #4338ca 0%, #4f46e5 42%, #6366f1 78%, #818cf8 100%);
}
.auth-hero::after {
  content: ""; position: absolute; right: -130px; bottom: -150px;
  width: 430px; height: 430px; border-radius: 50%; background: rgba(255,255,255,.12);
}
.auth-hero::before {
  content: ""; position: absolute; left: -100px; top: -120px;
  width: 310px; height: 310px; border-radius: 50%; background: rgba(255,255,255,.10);
}
.auth-hero > * { position: relative; z-index: 2; }
.auth-hero-top { display: flex; align-items: center; gap: 12px; }
.auth-hero-top .auth-logo {
  margin: 0; width: 44px; height: 44px; font-size: 17px; border-radius: 13px;
  background: rgba(255,255,255,.18); box-shadow: none;
}
.auth-hero-top b { font-size: 16px; display: block; }
.auth-hero-top i { font-style: normal; font-size: 10.5px; opacity: .8; letter-spacing: .14em; }
.auth-hero-mid h2 { font-size: 32px; line-height: 1.3; letter-spacing: -.02em; }
.auth-hero-mid p { font-size: 14px; opacity: .92; margin-top: 14px; max-width: 430px; line-height: 1.85; }
.auth-hero-list { list-style: none; display: flex; flex-direction: column; gap: 11px; margin-top: 28px; }
.auth-hero-list li { font-size: 13px; display: flex; align-items: center; gap: 10px; opacity: .95; }
.auth-hero-list li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; opacity: .9; }
.auth-hero-foot { font-size: 12px; opacity: .72; }

.auth-panel { display: flex; align-items: center; justify-content: center; padding: 48px 28px; }
.auth-box { width: 100%; max-width: 392px; }
.auth-box-brand { display: none; align-items: center; gap: 11px; margin-bottom: 26px; }
.auth-box-brand .auth-logo { margin: 0; width: 42px; height: 42px; font-size: 16px; border-radius: 12px; }
.auth-box-brand b { font-size: 15px; display: block; }
.auth-box-brand i { font-style: normal; font-size: 10.5px; color: var(--text-3); letter-spacing: .13em; }
.auth-box h1 { font-size: 24px; }
.auth-sub { font-size: 13.5px; color: var(--text-3); margin: 8px 0 26px; }
.auth-field { position: relative; margin-bottom: 16px; }
.auth-field > svg {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; color: var(--text-3); pointer-events: none;
}
.auth-field .form-control { padding-left: 40px; height: 46px; }
.auth-back { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-3); margin-top: 26px; }
.auth-back:hover { color: var(--primary); }
@media (max-width: 900px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .auth-box-brand { display: flex; }
}

/* ===== 22. 工作台首页（dashboard.php） ===== */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; display: flex; gap: 14px; align-items: flex-start; box-shadow: var(--shadow-xs);
}
.stat-ic { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.stat-ic svg { width: 19px; height: 19px; }
.stat-ic-primary { background: var(--primary-soft); color: var(--primary); }
.stat-ic-warning { background: var(--warning-bg); color: var(--warning); }
.stat-ic-info    { background: var(--info-bg);    color: var(--info); }
.stat-ic-success { background: var(--success-bg); color: var(--success); }
.stat-body { min-width: 0; display: flex; flex-direction: column; }
.stat-label { font-size: 12.5px; color: var(--text-3); }
.stat-value { font-size: 23px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin: 2px 0; }
.stat-value i { font-style: normal; color: var(--text-3); font-size: 15px; font-weight: 600; margin: 0 3px; }
.stat-foot { font-size: 12px; color: var(--text-3); }

.dash-split { display: flex; gap: 16px; align-items: flex-start; }
.dash-main { flex: 1 1 auto; min-width: 0; }
.dash-side { flex: 0 0 320px; display: flex; flex-direction: column; gap: 16px; }

.status-list { display: flex; flex-direction: column; gap: 14px; }
.status-row-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 7px; }
.status-row-head b { font-size: 13.5px; font-variant-numeric: tabular-nums; }
.status-row-head b i { font-style: normal; font-size: 11.5px; color: var(--text-3); font-weight: 500; }
.status-bar { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.status-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #6366f1, #4f46e5); }

.quick-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.quick-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 16px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-2); font-size: 12.5px; color: var(--text-2); text-align: center; transition: .16s;
}
.quick-item:hover { border-color: var(--primary-soft2); background: var(--primary-soft); color: var(--primary); transform: translateY(-1px); }
.quick-item svg { width: 19px; height: 19px; }

@media (max-width: 1180px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-split { flex-direction: column; }
  .dash-side { flex: 1 1 auto; width: 100%; }
}
@media (max-width: 640px) {
  .stat-grid { grid-template-columns: 1fr; }
}

/* ===== 23. 通用弹窗（Modal） ===== */
.modal-mask {
  position: fixed; inset: 0; z-index: 3000;
  background: rgba(15, 23, 42, .48);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 6vh 16px 40px;
  overflow-y: auto;
  animation: modalFade .14s ease;
}
@keyframes modalFade { from { opacity: 0; } }
.modal-mask[hidden] { display: none; }

.modal-box {
  width: 640px; max-width: 100%;
  background: var(--surface); border-radius: var(--radius);
  box-shadow: 0 24px 64px rgba(15, 23, 42, .3);
  display: flex; flex-direction: column; overflow: hidden;
  animation: modalIn .16s ease;
}
.modal-lg { width: 820px; }
@keyframes modalIn { from { transform: translateY(-14px); opacity: 0; } }

.modal-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.modal-title { font-size: 15px; font-weight: 700; color: var(--text); }
.modal-sub { font-size: 12.5px; color: var(--text-3); margin-top: 3px; }
.modal-x {
  border: none; background: none; color: var(--text-3);
  width: 30px; height: 30px; border-radius: var(--radius-xs);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; line-height: 1; flex: 0 0 auto; transition: .14s;
}
.modal-x:hover { background: var(--danger-bg); color: var(--danger); }

.modal-body { padding: 20px; }
.modal-foot {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  padding: 14px 20px; border-top: 1px solid var(--border);
  background: var(--surface-2);
}
.modal-foot .spacer { flex: 1; }
.modal-note { font-size: 12px; color: var(--text-3); margin-right: auto; }

/* 报价关联列表（客户管理弹窗内） */
.quote-mini { width: 100%; border-collapse: collapse; font-size: 13px; }
.quote-mini thead th {
  background: var(--surface-2); color: var(--text-3);
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; text-align: left; white-space: nowrap;
  padding: 9px 12px; border-bottom: 1px solid var(--border);
}
.quote-mini tbody td { padding: 11px 12px; border-bottom: 1px solid var(--border); }
.quote-mini tbody tr:last-child td { border-bottom: none; }
.quote-mini tbody tr:hover { background: var(--surface-2); }
.quote-mini .num { font-variant-numeric: tabular-nums; }

/* 客户列表内「报价单」徽章按钮 */
.quote-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 99px; border: 1px solid transparent;
  font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
  background: var(--info-bg); color: var(--info); transition: .14s;
  cursor: pointer; white-space: nowrap;
}
.quote-chip svg { width: 13px; height: 13px; }
.quote-chip:hover { background: var(--info); color: #fff; }
.quote-chip.is-empty { background: var(--surface-3); color: var(--text-3); font-weight: 500; }
.quote-chip.is-empty:hover { background: var(--border-strong); color: var(--text-2); }

/* 报价单状态小选择器（客户弹窗内直接改） */
.status-pick {
  font-size: 12px; padding: 4px 8px; border-radius: 7px;
  border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text-2); width: auto;
}
.status-pick:focus { outline: none; border-color: var(--primary); }

/* ============================================================
   24. 批量导入（预览 / 弹窗说明）
   ============================================================ */
.imp-guide {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 16px;
}
.imp-guide-title {
  display: flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 700; color: var(--text-2); margin-bottom: 7px;
}
.imp-guide-title svg { width: 14px; height: 14px; }
.imp-cols {
  font-size: 12.5px; color: var(--text-2); line-height: 1.7;
  background: var(--surface); border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm); padding: 8px 10px; margin-bottom: 9px;
  word-break: break-all;
}
.imp-guide code {
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px;
  background: var(--surface-3); border-radius: 5px; padding: 1px 5px; color: var(--primary);
}
.imp-guide ul { margin: 0; padding-left: 17px; }
.imp-guide li { font-size: 12px; color: var(--text-3); line-height: 1.85; }

/* 预览区块 */
.imp-card { padding: 0; overflow: hidden; }
.imp-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  padding: 15px 20px; border-bottom: 1px solid var(--border); background: var(--surface-2);
}
.imp-title {
  display: flex; align-items: center; gap: 7px;
  font-size: 14.5px; font-weight: 700; color: var(--text-1);
}
.imp-title svg { width: 16px; height: 16px; color: var(--primary); }
.imp-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.imp-chip {
  display: inline-flex; align-items: center; padding: 3px 10px;
  border-radius: 99px; font-size: 12px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.imp-chip.is-ok  { background: var(--success-bg);  color: var(--success); }
.imp-chip.is-dup { background: var(--warning-bg);  color: var(--warning); }
.imp-chip.is-err { background: var(--danger-bg);   color: var(--danger); }

.imp-note {
  display: flex; gap: 8px; align-items: flex-start;
  margin: 14px 20px 0; padding: 10px 13px; border-radius: var(--radius-sm);
  font-size: 12.5px; line-height: 1.75;
}
.imp-note svg { width: 15px; height: 15px; flex: 0 0 auto; margin-top: 1px; }
.imp-note.is-info { background: var(--info-bg); color: var(--info); }
.imp-note.is-warn { background: var(--warning-bg); color: var(--warning); }

.imp-scroll { margin: 14px 20px 0; max-height: 420px; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.imp-table { margin: 0; }
.imp-table thead th { position: sticky; top: 0; z-index: 1; }
.imp-table td { font-size: 12.5px; }

.imp-badge {
  display: inline-flex; align-items: center; padding: 2px 8px;
  border-radius: 99px; font-size: 11.5px; font-weight: 700; white-space: nowrap;
}
.imp-badge.is-ok  { background: var(--success-bg); color: var(--success); }
.imp-badge.is-dup { background: var(--warning-bg); color: var(--warning); }
.imp-badge.is-err { background: var(--danger-bg);  color: var(--danger); }

.imp-trunc { font-size: 12px; color: var(--text-3); padding: 9px 22px 0; }

.imp-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  padding: 14px 20px; margin-top: 16px;
  border-top: 1px solid var(--border); background: var(--surface-2);
}
.imp-foot-info { font-size: 13px; color: var(--text-2); }
.imp-foot-info b { color: var(--primary); font-size: 15px; }
.imp-foot-btns { display: flex; align-items: center; gap: 10px; }
