/* 装机店管理系统 · 样式 */
:root {
  --ink: #16233a;
  --ink2: #46536b;
  --ink3: #8b95a7;
  --line: #e4e9f2;
  --bg: #ffffff;
  --bg2: #f7f9fc;
  --accent: #2f6df6;
  --warn: #c2740a;
  --ok: #157f5c;
  --danger: #c0392b;
}

* { box-sizing: border-box; }

html, body, #app { height: 100%; margin: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg2);
  -webkit-font-smoothing: antialiased;
}

/* ---------------- 登录 ---------------- */
.login-wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #eef3fd 0%, #f7f9fc 55%, #eaf1fe 100%);
}
.login-card {
  width: 380px;
  background: #fff;
  padding: 36px 34px 28px;
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: 0 12px 40px rgba(22, 35, 58, 0.08);
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}
.logo {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 42px;
}
.logo.sm { width: 26px; height: 26px; font-size: 13px; flex: 0 0 26px; border-radius: 7px; }
.brand-name { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.brand-sub { font-size: 12px; color: var(--ink3); margin-top: 2px; }
.login-tip {
  margin-top: 18px;
  text-align: center;
  font-size: 12px;
  color: var(--ink3);
}

/* ---------------- 图标 ---------------- */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ni {
  width: 17px; height: 17px;
  fill: none; stroke: currentColor;
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
  flex: 0 0 auto;
}

/* ---------------- 布局 ---------------- */
.layout { height: 100vh; }

.aside {
  background: #fbfcff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transition: width 0.16s ease;
}
.aside-brand {
  height: 52px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 16px;
  font-size: 13.5px;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
  overflow: hidden;
  white-space: nowrap;
}

/* 分组导航 */
.nav { flex: 1; overflow-y: auto; padding: 8px 8px 14px; }
.nav-group { position: relative; }
.nav-head {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  height: 38px;
  padding: 0 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}
.nav-head:hover { background: #eef2fa; }
.nav-head .ni { color: var(--ink2); }
.nav-head.on { color: var(--accent); }
.nav-head.on .ni { color: var(--accent); }
.nav-head-txt { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.nav-head .chev {
  width: 14px; height: 14px; color: #aab4c6;
  transition: transform 0.16s ease;
}
.nav-group.open .nav-head .chev { transform: rotate(180deg); }

.nav-sub { display: none; padding: 2px 0 6px; }
.nav-group.open .nav-sub { display: block; }
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 33px;
  padding: 0 9px 0 30px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink2);
  font-family: inherit;
  font-size: 13px;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}
.nav-item .ni { width: 15px; height: 15px; opacity: 0.72; }
.nav-item span { overflow: hidden; text-overflow: ellipsis; }
.nav-item:hover { background: #eef2fa; color: var(--ink); }
.nav-item.on { background: #e8f0ff; color: var(--accent); font-weight: 500; }
.nav-item.on .ni { opacity: 1; }
.nav-item.on::before {
  content: "";
  position: absolute;
  left: 12px; top: 9px; bottom: 9px;
  width: 3px; border-radius: 2px;
  background: var(--accent);
}

/* 收成图标条：hover 分组时右侧浮出子菜单 */
.aside.mini { overflow: visible; }
.aside.mini .aside-brand { padding: 0 18px; }
.aside.mini .brand-txt { display: none; }
.aside.mini .nav { padding: 8px 6px 14px; overflow: visible; }
.aside.mini .nav-head { justify-content: center; padding: 0; height: 40px; }
.aside.mini .nav-head-txt,
.aside.mini .nav-head .chev { display: none; }
.aside.mini .nav-sub {
  display: block;
  position: absolute;
  left: 54px;
  top: 0;
  z-index: 30;
  min-width: 152px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(22, 35, 58, 0.13);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-4px);
  /* 离开后先保持 180ms 再淡出，给鼠标穿过图标与浮层之间的缝隙留时间 */
  transition: opacity .12s ease .18s, transform .12s ease .18s, visibility 0s linear .3s;
}
/* 透明桥接区：把图标和浮层之间那条缝补上，鼠标扫过去不会断 */
.aside.mini .nav-sub::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 0;
  bottom: 0;
  width: 14px;
}
.aside.mini .nav-group:hover .nav-sub {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  transition: opacity .12s ease, transform .12s ease, visibility 0s;
}
.aside.mini .nav-head.on { background: #e8f0ff; }
.aside.mini .nav-group:hover .nav-item { padding-left: 10px; }
.aside.mini .nav-group:hover .nav-item.on::before { left: 4px; }

.aside-foot {
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  flex: 0 0 auto;
  overflow: hidden;
  white-space: nowrap;
}
.aside.mini .aside-foot { padding: 12px 10px; align-items: center; }
.aside.mini .aside-foot .tenant,
.aside.mini .aside-foot .who { display: none; }
.tenant { font-size: 12px; color: var(--ink3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--ink3);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
}
.logout .ni { width: 14px; height: 14px; opacity: 0.75; }
.logout:hover { color: var(--danger); }
.aside.mini .logout { width: 100%; justify-content: center; padding: 6px 0; }
.aside.mini .logout-txt { display: none; }

.header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  flex: 0 0 auto;
}
.header-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.icon-btn {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 7px;
  background: transparent; color: var(--ink2);
  cursor: pointer;
}
.icon-btn:hover { background: #f0f4fb; color: var(--ink); }
.crumb { display: flex; align-items: center; gap: 7px; font-size: 13.5px; min-width: 0; }
.crumb-g { color: var(--ink3); white-space: nowrap; }
.crumb-sep { color: #ccd4e1; }
.crumb-cur { font-size: 15px; font-weight: 600; white-space: nowrap; }
.page-title { font-size: 16px; font-weight: 600; }
.header-right { display: flex; align-items: center; gap: 14px; }
.who-mini { font-size: 13px; color: var(--ink2); }
.user { font-size: 13px; color: var(--ink2); }

/* 演示账号只读提示条 */
.demo-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 8px 16px;
  font-size: 13px;
  line-height: 1.5;
  color: #8a5a00;
  background: #fff8e6;
  border-bottom: 1px solid #ffe0a3;
}
.demo-bar .ni {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: currentColor;
}

/* 页签栏 */
.tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 38px;
  padding: 0 16px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  flex: 0 0 auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { height: 0; }
.tab {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 29px;
  padding: 0 7px 0 12px;
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--ink2);
  white-space: nowrap;
  cursor: pointer;
}
.tab:hover { background: #f2f5fb; }
.tab.on { background: #eaf1ff; color: var(--accent); font-weight: 500; }
.tab-x {
  border: 0;
  padding: 0 2px;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font-size: 15px;
  line-height: 1;
  opacity: 0.45;
  cursor: pointer;
}
.tab-x:hover { opacity: 1; background: rgba(22, 35, 58, 0.07); }

.main { padding: 18px 24px 40px; background: var(--bg2); overflow-y: auto; }

/* ---------------- 数据卡片 ---------------- */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
  box-shadow: 0 1px 2px rgba(22, 35, 58, 0.04);
}
.stat-label { font-size: 12px; color: var(--ink3); margin-bottom: 8px; }
.stat-value {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.stat-value.accent { color: var(--accent); }
.stat-value.warn { color: var(--warn); }
.stat-sub {
  font-size: 11.5px; color: var(--ink3); margin-top: 7px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---------------- 面板 ---------------- */
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px 18px;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(22, 35, 58, 0.04);
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 12px;
}

/* ---------------- 工具栏 ---------------- */
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.toolbar-spacer { flex: 1; }
.muted { font-size: 12.5px; color: var(--ink3); }

.text-warn { color: var(--warn); font-weight: 500; }
.text-ok { color: var(--ok); font-weight: 500; }

/* ---------------- 表单行 ---------------- */
.form-row {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}
.field { display: flex; flex-direction: column; gap: 5px; }
.field > label { font-size: 12px; color: var(--ink3); }

.outstanding { margin-top: 18px; }
.outstanding-title {
  font-size: 12.5px;
  color: var(--ink2);
  margin-bottom: 8px;
}

/* ---------------- 单据编辑 ---------------- */
.bill-head {
  display: flex;
  gap: 20px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--line);
}
.bill-items { margin-bottom: 10px; }
.bill-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.bill-total { font-size: 13px; color: var(--ink2); }
.bill-total b { color: var(--ink); font-variant-numeric: tabular-nums; }
.total-amount { color: var(--accent) !important; font-size: 17px; }

.option-sub {
  float: right;
  color: var(--ink3);
  font-size: 12px;
  margin-left: 12px;
}

.detail-head {
  display: flex;
  gap: 26px;
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.detail-head .muted { margin-right: 4px; }
.detail-foot {
  margin-top: 14px;
  text-align: right;
  font-size: 14px;
  font-weight: 500;
}

/* ---------------- 弹窗适配 ----------------
   固定宽度（开单弹窗 1020px、明细 820px）在窄屏会顶出视口，
   底部按钮直接看不到。统一用 max-width / max-height 兜住，
   内容超高时在弹窗内部滚动，按钮始终可达。 */
.el-dialog {
  max-width: 94vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}
.el-dialog__body {
  min-height: 0;
  overflow: auto;
}

/* ---------------- 套餐与续费 ---------------- */
.billing-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 22px;
  margin-bottom: 16px;
}
.billing-name {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.02em;
}
.billing-usage { display: flex; gap: 28px; flex-wrap: wrap; align-items: center; }
.bu-item { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--ink3); }
.bu-item b { font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }
.plan-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.plan-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
}
.plan-card.on { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(47, 109, 246, .12); }
.plan-head { display: flex; align-items: center; justify-content: space-between; font-size: 15px; }
.plan-price { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.plan-price span { margin-left: 2px; font-size: 12px; font-weight: 400; color: var(--ink3); }
.plan-features {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 12.5px;
  color: var(--ink2);
}
.plan-actions { display: flex; gap: 8px; }

@media (max-width: 1100px) {
  .plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .plan-grid { grid-template-columns: 1fr; }
  .billing-usage { gap: 16px; }
}

/* ---------------- 线上订单查询 ---------------- */
.order-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 18px;
  margin-bottom: 16px;
}
.order-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.order-no { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.order-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--ink2);
}
.order-repairs { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.repair-line {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--ink2);
  padding: 4px 0;
}
.sn-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12.5px; line-height: 1.7; }
.order-code { margin-left: 8px; font-size: 12px; }
.warranty-cell { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* ---------------- 表格微调 ---------------- */
.el-table th.el-table__cell {
  background: var(--bg2) !important;
  font-weight: 600;
  color: var(--ink);
}
.el-table {
  font-variant-numeric: tabular-nums;
  --el-table-row-hover-bg-color: #f4f8ff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 0 1px #dde4f0, 0 1px 2px rgba(22, 35, 58, 0.04);
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 1100px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .board-grid { grid-template-columns: 1fr; }
}
@media (max-width: 780px) {
  .stat-row { grid-template-columns: 1fr; }
  .header { padding: 0 12px; }
  .main { padding: 14px 14px 32px; }
  .crumb-g { display: none; }
}

/* ---------------- 配置单 ---------------- */
.cfg-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
}
.cfg-item { display: flex; flex-direction: column; gap: 6px; }
.cfg-item > label { font-size: 12px; color: var(--ink3); }
.cfg-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding: 12px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13px;
  color: var(--ink2);
}
.cfg-total { font-size: 18px; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }
.cfg-result { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.cfg-msg { font-size: 13px; line-height: 1.9; }

/* ---------------- 序列号 ---------------- */
.sn-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.sn-code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--bg2);
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.sn-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  font-size: 13px;
  padding: 14px 16px;
  background: var(--bg2);
  border-radius: 8px;
}
.sn-grid .muted { font-size: 11.5px; }
.sn-hint { font-size: 11px; color: var(--ink3); margin-top: 3px; }

/* ---------------- 导入结果 ---------------- */
.import-sum {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.import-stat { background: #fff; padding: 14px 12px; text-align: center; }
.import-stat span { display: block; font-size: 11.5px; color: var(--ink3); margin-bottom: 6px; }
.import-stat b { font-size: 20px; font-weight: 600; color: var(--ink); }
.note-inline {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--ink2);
  background: var(--bg2);
  padding: 10px 14px;
  border-radius: 6px;
}

@media (max-width: 1100px) {
  .cfg-grid { grid-template-columns: repeat(2, 1fr); }
  .sn-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 窄屏开单：字段各占一行，扫码框换行，明细表在弹窗内部横向滚动 */
@media (max-width: 820px) {
  .bill-head { gap: 12px; }
  .bill-head .field { width: 100%; }
  .bill-head .field .el-input,
  .bill-head .field .el-select,
  .bill-head .field .el-date-editor { width: 100% !important; }
  .scan-bar { flex-wrap: wrap; }
  .scan-input { flex: 1 1 100%; }
  .scan-side { flex: 1 1 100%; }
}

/* ---------------- 配置单：数量选择 + 规则设置 ---------------- */
.cfg-pick { display: flex; gap: 8px; align-items: center; }
.rule-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rule-form .el-input, .rule-form .el-select { flex: 0 0 auto; }

/* ---------------- 配置单（纵向报价单） ---------------- */
.sheet { background:#fff; border:1px solid var(--line); border-radius:10px; overflow:hidden; }
.sheet-head, .sheet-row {
  display: grid;
  grid-template-columns: 96px minmax(0,1fr) 104px 104px 116px;
  align-items: center; gap: 12px; padding: 7px 16px;
}
.sheet-head {
  background: var(--bg2); font-size: 12px; color: var(--ink3);
  border-bottom: 1px solid var(--line); padding-top: 10px; padding-bottom: 10px;
}
.sheet-row { border-bottom: 1px solid var(--line2); min-height: 44px; }
.sheet-row:last-child { border-bottom: none; }
.sheet-row.filled { background: #fbfcff; }
.sheet-row.filled .sc-cat { color: var(--accent); font-weight: 500; }
.sc-cat { font-size: 13px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-price, .sc-sub { font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink2); }
.sc-sub { color: var(--ink); font-weight: 500; }

.sheet-remark {
  margin-top: 16px; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; padding: 14px 16px;
}
.sheet-remark > label { display: block; font-size: 12px; color: var(--ink3); margin-bottom: 8px; }

.quote {
  margin-top: 16px; background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 18px 20px; display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.quote-left { display: flex; flex-direction: column; gap: 10px; }
.qrow { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--ink2); }
.qrow > span:first-child { width: 72px; color: var(--ink3); flex: 0 0 72px; }
.qrow b { font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }
.qinline { display: flex; align-items: center; gap: 8px; }
.quote-right { text-align: right; }
.quote-right .formula { font-size: 12px; color: var(--ink3); font-variant-numeric: tabular-nums; margin-bottom: 6px; }
.quote-right .total { font-size: 14px; color: var(--ink2); }
.quote-right .total b {
  font-size: 26px; color: var(--accent); font-weight: 600;
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin-left: 6px;
}

.formula-box { background: var(--bg2); border-radius: 8px; padding: 14px 16px; font-size: 13px; color: var(--ink2); }
.formula-box .f-line { font-family: var(--mono); color: var(--ink); font-size: 13px; }
.formula-box .f-demo { margin-top: 8px; color: var(--ink2); }

@media (max-width: 1100px) {
  .sheet-head, .sheet-row { grid-template-columns: 80px minmax(0,1fr) 90px 92px 100px; gap: 8px; padding-left: 12px; padding-right: 12px; }
  .quote { flex-direction: column; align-items: stretch; }
  .quote-right { text-align: left; }
}

/* ---------------- 侧边栏用户信息 ---------------- */
.who {
  font-size: 12px;
  color: var(--ink2);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
}
.who > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
}
.who .el-tag {
  flex: 0 0 auto;
  transform: scale(0.92);
  transform-origin: left center;
}

/* ---------------- 报价单预览 ---------------- */
.quote-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12.5px;
  color: var(--ink2);
  padding: 0 2px 12px;
  flex-wrap: wrap;
}
.quote-meta a { color: var(--accent); text-decoration: none; font-size: 12px; }
.quote-meta a:hover { text-decoration: underline; }
.quote-preview {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #eef1f6;
  max-height: 62vh;
  overflow-y: auto;
  padding: 12px;
}
.quote-preview svg {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 1px 6px rgba(31, 39, 51, 0.08);
}

/* ---------------- 版本与权限 ---------------- */
.ver-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.ver-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 22px;
}
.ver-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.ver-name { font-size: 16px; font-weight: 600; color: var(--ink); }
.ver-sub { font-size: 12px; color: var(--ink3); margin-bottom: 14px; }
.ver-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.ver-list li {
  font-size: 13px; color: var(--ink2); line-height: 1.6;
  padding-left: 16px; position: relative;
}
.ver-list li::before {
  content: '';
  position: absolute; left: 0; top: 8px;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
}
.ver-list li.off { color: var(--ink3); }
.ver-list li.off::before { background: var(--ink3); }

.perm-hint {
  font-size: 12.5px; color: var(--ink2); line-height: 1.7;
  background: var(--bg2); padding: 11px 14px; border-radius: 8px; margin-bottom: 18px;
}
.perm-hint code {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 11.5px; background: #fff; padding: 1px 5px;
  border-radius: 4px; border: 1px solid var(--line);
}
.perm-sec { margin-bottom: 22px; }
.perm-sec:last-child { margin-bottom: 0; }
.perm-sec-title {
  font-size: 13px; font-weight: 600; color: var(--ink);
  margin-bottom: 6px; padding-left: 2px;
}
.perm-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 60px 60px 186px;
  gap: 14px;
  align-items: center;
  padding: 9px 12px;
  font-size: 13px;
  border-bottom: 1px solid var(--line);
}
.perm-row:last-child { border-bottom: none; }
.perm-head-row {
  background: var(--bg2);
  font-size: 11.5px;
  color: var(--ink3);
  border-radius: 6px;
  border-bottom: none;
}
.pr-name { color: var(--ink); font-weight: 500; }
.pr-desc { color: var(--ink2); font-size: 12.5px; }
.pr-flag { text-align: center; font-size: 12px; }
.pr-flag .yes { color: var(--ok); font-weight: 600; }
.pr-flag .no { color: var(--ink3); }
.pr-note { font-size: 11.5px; color: var(--ink3); line-height: 1.5; }

@media (max-width: 1200px) {
  .ver-row { grid-template-columns: 1fr; }
  .perm-row { grid-template-columns: 130px minmax(0, 1fr) 52px 52px; }
  .pr-note { display: none; }
}

/* ---------------- 邀请码开通 ---------------- */
.login-switch { text-align: center; margin-top: 14px; }
.join-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.join-form .el-form-item { margin-bottom: 14px; }
.join-info {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 12px 14px;
  margin-bottom: 16px;
}
.join-info.bad { background: #fdf4f3; border-color: #f2d8d4; }
.join-shop { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.join-perms { font-size: 12.5px; color: var(--ink2); line-height: 1.6; }
.join-perms b { color: var(--accent); }
.join-bad { font-size: 12.5px; color: var(--danger); line-height: 1.6; }

.invite-intro {
  font-size: 12.5px;
  color: var(--ink2);
  line-height: 1.8;
  background: var(--bg2);
  padding: 11px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
}
.grant-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 10px; }
.grant-hint { font-size: 11.5px; color: var(--ink3); margin-top: 5px; }
.invite-mini {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent);
}
.invite-done { text-align: center; padding: 10px 0 2px; }
.invite-label { font-size: 12px; color: var(--ink3); margin-bottom: 8px; }
.invite-big {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--accent);
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 0 14px 10px;
}
.invite-meta { font-size: 12px; color: var(--ink2); margin-top: 12px; }

.perm-note {
  font-size: 12.5px;
  color: var(--ink2);
  line-height: 1.8;
  background: var(--bg2);
  padding: 11px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
}
.grant-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; }
.grant-item { display: flex; flex-direction: column; gap: 2px; }
.grant-desc { font-size: 11.5px; color: var(--ink3); line-height: 1.5; padding-left: 24px; }

@media (max-width: 700px) {
  .grant-grid { grid-template-columns: 1fr; }
  .grant-list { grid-template-columns: repeat(2, 1fr); }
}

/* ---------------- 数据看板 ---------------- */
.stat-row.auto { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 1560px) { .stat-row.auto { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 820px) { .stat-row.auto { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .stat-row.auto { grid-template-columns: 1fr; } }
.delta { font-weight: 500; margin-right: 6px; }
.delta.up { color: var(--ok); }
.delta.down { color: var(--danger); }

.board-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.board-grid .panel { margin-bottom: 0; }
.span2 { grid-column: 1 / -1; }

/* 趋势图 */
.chart-trend { width: 100%; height: 240px; display: block; }
.grid-line { stroke: #eef2f9; stroke-width: 1; }
.axis-text { font-size: 10px; fill: var(--ink3); font-variant-numeric: tabular-nums; }
.bar { fill: #cfe0ff; }
.bar.zero { fill: #f2f5fa; }
.profit-line {
  fill: none;
  stroke: var(--warn);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.chart-legend { display: flex; gap: 18px; font-size: 12px; color: var(--ink2); margin-top: 8px; }
.chart-legend .dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.bar-dot { background: #cfe0ff; }
.line-dot { background: var(--warn); height: 2px; margin-bottom: 2px; }

/* 环形图 */
.donut-wrap { display: flex; align-items: center; gap: 18px; }
.donut { width: 148px; height: 148px; flex: 0 0 148px; }
.donut-label { font-size: 10px; fill: var(--ink3); }
.donut-value { font-size: 13px; font-weight: 600; fill: var(--ink); }
.legend-list { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.legend-item { display: flex; align-items: center; font-size: 12.5px; color: var(--ink2); }
.legend-item .dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; flex: 0 0 8px; }
.lg-name { flex: 1; min-width: 0; margin-left: 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-val { color: var(--ink); font-variant-numeric: tabular-nums; }

/* 排行榜 */
.rank-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px dashed #eef2f9; }
.rank-row:last-child { border-bottom: none; padding-bottom: 0; }
.rank-idx {
  width: 18px; height: 18px; flex: 0 0 18px;
  border-radius: 5px; background: #f0f4fc; color: var(--ink3);
  font-size: 11px; display: flex; align-items: center; justify-content: center;
}
.rank-row.top1 .rank-idx { background: var(--accent); color: #fff; }
.rank-main { flex: 1; min-width: 0; }
.rank-name { font-size: 12.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-bar { height: 4px; background: #f1f4fa; border-radius: 2px; margin-top: 5px; overflow: hidden; }
.rank-bar i { display: block; height: 100%; border-radius: 2px; background: linear-gradient(90deg, #a8c8fb, #2f6df6); }
.rank-val { font-size: 12.5px; color: var(--ink); font-variant-numeric: tabular-nums; text-align: right; }
.rank-sub { font-size: 11px; color: var(--ink3); text-align: right; }

/* 账龄 */
.age-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: #f1f4fa; margin: 8px 0 16px; }
.age-seg { height: 100%; transition: width .3s; }
.age-seg.b0 { background: #2f6df6; }
.age-seg.b30 { background: #7aa7f5; }
.age-seg.b60 { background: #c2740a; }
.age-seg.b90 { background: #c0392b; }
.age-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 18px; }
.age-item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink2); }
.age-item .dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; flex: 0 0 8px; }
.age-item .dot.b0 { background: #2f6df6; }
.age-item .dot.b30 { background: #7aa7f5; }
.age-item .dot.b60 { background: #c2740a; }
.age-item .dot.b90 { background: #c0392b; }
.age-item b { margin-left: auto; color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 500; }
.age-foot { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink3); }

.empty-hint { color: var(--ink3); font-size: 12.5px; text-align: center; padding: 40px 0; }
.profit-axis { fill: var(--warn); }
/* 排行右侧数值列定宽，保证每根进度条的分母一致 */
.rank-right { flex: 0 0 86px; text-align: right; }

/* ---------------- 看板：待办 / 保修 / 自定义 ---------------- */
.todo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.todo-item {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.todo-item:hover { border-color: var(--accent); background: #f3f7ff; }
.todo-num {
  font-size: 22px; font-weight: 600; line-height: 1.1;
  font-variant-numeric: tabular-nums; color: var(--ink3);
}
.todo-num.hot { color: var(--accent); }
.todo-label { font-size: 12px; color: var(--ink2); margin-top: 4px; }

.war-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.war-cell { background: var(--bg2); border-radius: 8px; padding: 10px 8px; text-align: center; }
.war-cell b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; }
.war-cell span { font-size: 11px; color: var(--ink3); }
.war-list { display: flex; flex-direction: column; gap: 7px; }
.war-item { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink2); }
.war-sn { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink); font-size: 11.5px; }
.war-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.war-left { color: var(--warn); white-space: nowrap; }

.cfg-tip { font-size: 12px; color: var(--ink3); line-height: 1.7; margin-bottom: 18px; }
.cfg-sec { margin-bottom: 18px; }
.cfg-sec-title { font-size: 12px; color: var(--ink3); margin-bottom: 4px; }
.cfg-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 0; border-bottom: 1px dashed #eef2f9;
}
.cfg-row:last-child { border-bottom: none; }
.cfg-actions { display: flex; align-items: center; gap: 2px; }
.cfg-foot { display: flex; align-items: center; width: 100%; }

/* ---------------- 扫码录入 ---------------- */
.scan-bar { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.scan-input { flex: 0 0 320px; }
.scan-input .el-input__wrapper { box-shadow: 0 0 0 1px var(--accent) inset; }
.scan-side { flex: 1; min-width: 0; }
.scan-target { font-size: 12px; color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scan-log { display: flex; gap: 6px; margin-top: 5px; min-height: 18px; flex-wrap: wrap; }
.scan-chip {
  font-size: 11px; color: var(--ink2); background: var(--bg2);
  border-radius: 4px; padding: 1px 6px;
  max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.scan-chip.bad { color: var(--danger); background: #fdf0ee; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }

/* ---------------- 行业选择 ---------------- */
.industry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(212px, 1fr));
  gap: 12px;
}
.industry-card {
  text-align: left;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease;
}
.industry-card:hover { border-color: #b9cdf7; background: #fbfcff; }
.industry-card.on {
  border-color: var(--accent);
  background: #f5f9ff;
  box-shadow: inset 0 0 0 1px var(--accent);
}
.industry-card:disabled { cursor: default; opacity: 0.7; }
.ic-top { display: flex; align-items: center; justify-content: space-between; }
.ic-name { font-size: 14px; font-weight: 600; color: var(--ink); }
.ic-cur {
  font-size: 11px;
  color: var(--accent);
  background: #e8f0ff;
  border-radius: 999px;
  padding: 1px 8px;
}
.ic-desc { font-size: 12.5px; color: var(--ink2); line-height: 1.65; margin-top: 8px; min-height: 42px; }
.ic-meta { font-size: 11.5px; color: var(--ink3); margin-top: 6px; }
