* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: -apple-system, "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f4f5f7;
  color: #1a1d23;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* ---------- 顶栏 ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; background: #fff; border-bottom: 1px solid #e6e8ec;
  flex: 0 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; }
.logo {
  width: 34px; height: 34px; border-radius: 9px; background: #1f6feb; color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px;
}
.logo-img { height: 30px; width: auto; display: block; flex: 0 0 auto; }
.logo-full { display: block; width: 100%; max-width: 238px; height: auto; margin: 0 auto 12px; }
.title { font-size: 15px; font-weight: 600; line-height: 1.2; }
.site-tag { font-size: 11px; color: #6b7280; margin-top: 2px; }
.top-right { display: flex; align-items: center; gap: 10px; }
.site-select {
  border: 1px solid #d6dae0; background: #fff; border-radius: 8px;
  padding: 6px 10px; font-size: 13px; color: #1a1d23; outline: none;
}
.clock { font-size: 12px; color: #8b93a1; font-variant-numeric: tabular-nums; }

/* ---------- 标签页 ---------- */
.tabs {
  display: flex; gap: 4px; padding: 0 12px; background: #fff;
  border-bottom: 1px solid #e6e8ec; flex: 0 0 auto; overflow-x: auto;
}
.tab {
  border: none; background: transparent; padding: 11px 14px; font-size: 13px;
  color: #6b7280; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap;
}
.tab.active { color: #1f6feb; border-bottom-color: #1f6feb; font-weight: 600; }

main { flex: 1 1 auto; overflow: hidden; position: relative; }
.view { display: none; height: 100%; overflow: auto; padding: 14px; }
.view.active { display: block; }
#view-issue.active { display: flex; padding: 0; }

/* ---------- 领用台布局 ---------- */
.issue-layout { display: flex; width: 100%; height: 100%; overflow: hidden; }
.pick-side { flex: 1 1 auto; display: flex; flex-direction: column; overflow: hidden; padding: 12px; }
.pick-toolbar { flex: 0 0 auto; margin-bottom: 10px; }
.search {
  width: 100%; border: 1px solid #d6dae0; border-radius: 9px; padding: 9px 12px;
  font-size: 14px; outline: none; background: #fff;
}
.search:focus { border-color: #1f6feb; }
.cat-chips { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid #d6dae0; background: #fff; border-radius: 999px;
  padding: 5px 12px; font-size: 12px; color: #4b5563; cursor: pointer;
}
.chip.active { background: #1f6feb; border-color: #1f6feb; color: #fff; }

.card-grid {
  flex: 1 1 auto; overflow-y: auto; padding-bottom: 20px;
}
.group-title {
  font-size: 12px; font-weight: 600; color: #6b7280;
  padding: 12px 2px 7px; display: flex; align-items: center; gap: 7px;
}
.group-title:first-child { padding-top: 2px; }
.group-count { font-weight: 400; color: #a3aab6; font-size: 11px; }
.card-row {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
}
.empty-hint { color: #a3aab6; padding: 30px 20px; text-align: center; }
.cart-chevron { display: none; }
.pcard {
  background: #fff; border: 1px solid #e6e8ec; border-radius: 12px; padding: 11px 12px;
  cursor: pointer; position: relative; transition: transform .08s, box-shadow .15s;
  border-left: 4px solid #16a34a;
}
.pcard:active { transform: scale(.97); }
.pcard.low { border-left-color: #d97706; }
.pcard.out { border-left-color: #dc2626; opacity: .62; }
.pcard-code { font-size: 11px; color: #8b93a1; font-variant-numeric: tabular-nums; }
.pcard-name { font-size: 14px; font-weight: 600; margin: 3px 0 2px; }
.pcard-spec { font-size: 11px; color: #8b93a1; margin-bottom: 7px; min-height: 15px; }
.pcard-qty { font-size: 13px; font-weight: 700; color: #16a34a; font-variant-numeric: tabular-nums; }
.pcard-qty.low { color: #d97706; }
.pcard-qty.out { color: #dc2626; }
.pcard-qty small { font-weight: 400; color: #8b93a1; font-size: 11px; }
.pcard-badge {
  position: absolute; top: 8px; right: 8px; font-size: 10px; padding: 2px 6px;
  border-radius: 5px; background: #fee2e2; color: #dc2626; font-weight: 600;
}
.pcard-badge.warn { background: #fef3c7; color: #b45309; }

/* ---------- 购物车 ---------- */
.cart-side {
  flex: 0 0 330px; background: #fff; border-left: 1px solid #e6e8ec;
  display: flex; flex-direction: column; overflow: hidden;
}
.cart-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px; border-bottom: 1px solid #eef0f3; font-weight: 600; font-size: 14px;
}
.cart-count { font-size: 12px; color: #1f6feb; font-weight: 500; }
.cart-body { flex: 1 1 auto; overflow-y: auto; padding: 8px 10px; }
.cart-empty { color: #a3aab6; font-size: 13px; text-align: center; padding: 34px 10px; }
.cart-item {
  display: flex; align-items: center; gap: 8px; padding: 9px 8px;
  border-radius: 9px; background: #f8f9fb; margin-bottom: 7px;
}
.cart-item-main { flex: 1 1 auto; min-width: 0; }
.cart-item-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item-code { font-size: 11px; color: #8b93a1; }
.qty-box { display: flex; align-items: center; gap: 0; flex: 0 0 auto; }
.qty-btn {
  width: 26px; height: 26px; border: 1px solid #d6dae0; background: #fff;
  border-radius: 7px; font-size: 15px; line-height: 1; color: #4b5563; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.qty-input {
  width: 46px; height: 26px; text-align: center; border: 1px solid #d6dae0;
  border-radius: 7px; margin: 0 4px; font-size: 13px; font-variant-numeric: tabular-nums;
  outline: none;
}
.cart-del { border: none; background: transparent; color: #c0c5cf; font-size: 17px; cursor: pointer; padding: 0 2px; }

.cart-foot { flex: 0 0 auto; padding: 12px 14px 14px; border-top: 1px solid #eef0f3; }
.field-label { display: block; font-size: 12px; color: #6b7280; margin: 9px 0 5px; }
.field-label:first-child { margin-top: 0; }
.staff-picker { position: relative; }
.staff-drop {
  position: absolute; left: 0; right: 0; bottom: 100%; margin-bottom: 4px;
  background: #fff; border: 1px solid #e6e8ec; border-radius: 10px;
  box-shadow: 0 -6px 22px rgba(0,0,0,.10); max-height: 210px; overflow-y: auto;
  display: none; z-index: 30;
}
.staff-drop.show { display: block; }
.staff-opt { padding: 9px 12px; font-size: 13px; cursor: pointer; display: flex; justify-content: space-between; }
.staff-opt:hover, .staff-opt.sel { background: #eef4ff; }
.staff-opt .no { color: #8b93a1; font-variant-numeric: tabular-nums; font-size: 12px; }
.purpose { width: 100%; border: 1px solid #d6dae0; border-radius: 9px; padding: 9px 10px; font-size: 14px; background: #fff; outline: none; }

.btn-primary {
  width: 100%; border: none; background: #1f6feb; color: #fff; border-radius: 10px;
  padding: 12px; font-size: 15px; font-weight: 600; cursor: pointer; margin-top: 13px;
}
.btn-primary:disabled { background: #c3d4f5; cursor: not-allowed; }
.btn-primary:active:not(:disabled) { background: #1a5fd0; }
.btn-ghost {
  width: 100%; border: 1px solid #d6dae0; background: #fff; color: #4b5563;
  border-radius: 10px; padding: 9px; font-size: 13px; cursor: pointer; margin-top: 8px;
}

/* ---------- 看板 ---------- */
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 14px; }
.kpi { background: #fff; border-radius: 12px; padding: 14px; border: 1px solid #e6e8ec; }
.kpi-num { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi-label { font-size: 12px; color: #6b7280; margin-top: 4px; }
.kpi.ok .kpi-num { color: #16a34a; }
.kpi.low .kpi-num { color: #d97706; }
.kpi.out .kpi-num { color: #dc2626; }

.panel { background: #fff; border-radius: 12px; border: 1px solid #e6e8ec; margin-bottom: 14px; overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid #eef0f3; }
.panel-head h3 { margin: 0; font-size: 14px; font-weight: 600; }
.hint { font-size: 12px; color: #8b93a1; }
.btn-small {
  border: 1px solid #1f6feb; background: #fff; color: #1f6feb; border-radius: 8px;
  padding: 5px 11px; font-size: 12px; cursor: pointer;
}
.muted-btn { border-color: #d6dae0; color: #8b93a1; }
.muted-btn:hover { border-color: #b9c0ca; color: #6b7280; }
.row-undo {
  border: none; background: transparent; color: #b9c0ca; font-size: 11px;
  padding: 2px 0; cursor: pointer; margin-top: 4px;
  text-decoration: underline; text-underline-offset: 2px;
}
.row-undo:hover { color: #dc2626; }
.row-restore {
  border: none; background: transparent; color: #86c39a; font-size: 11px;
  padding: 2px 0; cursor: pointer; margin-top: 4px;
  text-decoration: underline; text-underline-offset: 2px;
}
.row-restore:hover { color: #16a34a; }

/* 领用记录里的产品与数量，放大显示 */
.rec-lines { display: flex; flex-wrap: wrap; gap: 7px 16px; margin-top: 8px; }
.rec-line { display: inline-flex; align-items: baseline; gap: 5px; }
.rec-name { font-size: 14px; font-weight: 600; color: #1a1d23; }
.rec-code { font-size: 11px; color: #a3aab6; font-variant-numeric: tabular-nums; }
.rec-qty { font-size: 17px; font-weight: 700; color: #1f6feb; font-variant-numeric: tabular-nums; }
.rec-unit { font-size: 12px; color: #6b7280; }
.rec-total { font-size: 15px; font-weight: 600; color: #1a1d23; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rec-total b { font-size: 18px; color: #1f6feb; }

/* 类目管理弹窗 */
.cat-list { max-height: 260px; overflow-y: auto; margin-bottom: 6px; }
.cat-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 10px; border-radius: 8px;
}
.cat-row:nth-child(odd) { background: #fafbfc; }
.cat-row-main { min-width: 0; }
.cat-name { font-size: 14px; font-weight: 600; }
.cat-count { font-size: 11px; color: #8b93a1; margin-top: 2px; }
.cat-acts { display: flex; gap: 6px; flex: 0 0 auto; }
.btn-tiny {
  border: 1px solid #d6dae0; background: #fff; color: #4b5563;
  border-radius: 7px; padding: 4px 9px; font-size: 12px; cursor: pointer;
}
.btn-tiny:hover { border-color: #1f6feb; color: #1f6feb; }
.btn-tiny.danger:hover { border-color: #dc2626; color: #dc2626; }
.cat-empty { color: #a3aab6; font-size: 13px; padding: 16px 10px; text-align: center; }
.list { padding: 6px 8px; }
.row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 10px; border-radius: 8px;
}
.row:nth-child(odd) { background: #fafbfc; }
.row-main { min-width: 0; }
.row-title { font-size: 13px; font-weight: 600; }
.row-sub { font-size: 11px; color: #8b93a1; margin-top: 2px; }
.row-right { text-align: right; flex: 0 0 auto; }
.tag { font-size: 11px; padding: 2px 7px; border-radius: 5px; font-weight: 600; }
.tag.low { background: #fef3c7; color: #b45309; }
.tag.out { background: #fee2e2; color: #dc2626; }
.tag.ok { background: #dcfce7; color: #15803d; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: left; padding: 9px 12px; background: #f8f9fb; color: #6b7280;
  font-weight: 500; font-size: 12px; white-space: nowrap; border-bottom: 1px solid #eef0f3;
}
.tbl td { padding: 9px 12px; border-bottom: 1px solid #f4f5f7; white-space: nowrap; }
.tbl tr:hover td { background: #fafbfc; }
.mono { font-variant-numeric: tabular-nums; }
.best { background: #dcfce7 !important; font-weight: 600; }
.stale { background: #fef3c7 !important; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%) translateY(16px);
  background: rgba(26,29,35,.94); color: #fff; padding: 11px 20px; border-radius: 10px;
  font-size: 13px; opacity: 0; pointer-events: none; transition: all .22s; z-index: 200;
  max-width: 84vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: rgba(185,28,28,.96); }

/* ---------- 弹窗 ---------- */
.modal { position: fixed; inset: 0; background: rgba(16,18,22,.42); display: flex; align-items: center; justify-content: center; z-index: 300; padding: 18px; }
.modal.hidden { display: none; }
.modal-box { background: #fff; border-radius: 14px; width: 100%; max-width: 460px; max-height: 86vh; display: flex; flex-direction: column; overflow: hidden; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid #eef0f3; font-weight: 600; }
.btn-x { border: none; background: transparent; font-size: 21px; line-height: 1; color: #9aa1ad; cursor: pointer; }
.modal-body { padding: 14px 16px; overflow-y: auto; }
.modal-body label { display: block; font-size: 12px; color: #6b7280; margin: 10px 0 5px; }
.modal-body label:first-child { margin-top: 0; }
.modal-body input, .modal-body select {
  width: 100%; border: 1px solid #d6dae0; border-radius: 9px; padding: 9px 11px; font-size: 14px; outline: none;
}
.modal-foot { display: flex; gap: 9px; padding: 12px 16px; border-top: 1px solid #eef0f3; }
.modal-foot .btn-primary, .modal-foot .btn-ghost { margin-top: 0; }

/* ---------- 移动端 ---------- */
@media (max-width: 820px) {
  .issue-layout { flex-direction: column; }
  .pick-side { padding: 10px 10px 78px; }
  .card-row { grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .clock { display: none; }
  .view { padding: 10px; }
  .group-title { padding: 11px 2px 6px; }

  /* 底部抽屉式领用清单，收起时只露一条，不挡卡片 */
  .cart-side {
    position: fixed; left: 0; right: 0; bottom: 0;
    border-left: none; max-height: 86vh;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -6px 26px rgba(0, 0, 0, .16);
    transform: translateY(calc(100% - 60px));
    transition: transform .24s cubic-bezier(.2, .7, .3, 1);
    z-index: 100;
  }
  .cart-side.open { transform: translateY(0); }
  .cart-head { padding: 17px 16px 15px; cursor: pointer; }
  .cart-chevron { display: inline; font-size: 12px; color: #8b93a1; transition: transform .2s; }
  .cart-side.open .cart-chevron { transform: rotate(180deg); }

  /* 卡片在手机上放大，数量优先看得清 */
  .pcard { padding: 10px 11px; }
  .pcard-name { font-size: 14px; margin: 4px 0 2px; }
  .pcard-spec { font-size: 10px; margin-bottom: 6px; min-height: 13px; }
  .pcard-qty { font-size: 17px; }
  .pcard-qty small { font-size: 10px; }
}

/* ---------- 入库登记 ---------- */
.inbound-form { padding: 14px 16px 16px; }
.ib-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.ib-field label { display: block; font-size: 12px; color: #6b7280; margin-bottom: 5px; }
.ib-lines-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 18px 0 8px; font-size: 13px; font-weight: 600;
}
.ib-lines { display: flex; flex-direction: column; gap: 8px; }
.ib-empty {
  color: #a3aab6; font-size: 13px; padding: 20px 0; text-align: center;
  background: #fafbfc; border-radius: 10px; border: 1px dashed #e6e8ec;
}
.ib-line {
  display: flex; align-items: center; gap: 10px;
  background: #f8f9fb; border-radius: 10px; padding: 10px;
}
.ib-line .ib-item {
  flex: 1 1 200px; min-width: 0; border: 1px solid #d6dae0; border-radius: 8px;
  padding: 8px 10px; font-size: 13px; background: #fff; outline: none; color: #1a1d23;
}
.ib-nums { display: flex; gap: 8px; flex: 0 0 auto; }
.ib-num-field { display: flex; flex-direction: column; gap: 2px; }
.ib-num-field span, .ib-amount span { font-size: 10px; color: #9aa1ad; }
.ib-num-field input {
  width: 76px; border: 1px solid #d6dae0; border-radius: 8px; padding: 7px 8px;
  font-size: 13px; outline: none; background: #fff; font-variant-numeric: tabular-nums;
}
.ib-num-field input:focus { border-color: #1f6feb; }
.ib-amount { display: flex; flex-direction: column; gap: 2px; align-items: flex-end; min-width: 68px; }
.ib-amount strong { font-size: 14px; color: #1f6feb; font-variant-numeric: tabular-nums; }
.ib-del { border: none; background: transparent; color: #c0c5cf; font-size: 18px; cursor: pointer; padding: 0 2px; }
.ib-total {
  display: flex; align-items: baseline; justify-content: flex-end; gap: 10px;
  margin: 16px 0 4px; font-size: 13px; color: #6b7280;
}
.ib-total strong { font-size: 22px; color: #1a1d23; font-variant-numeric: tabular-nums; }

@media (max-width: 820px) {
  .inbound-form { padding: 12px; }
  .ib-row { grid-template-columns: 1fr; gap: 8px; }
  .ib-line { flex-wrap: wrap; padding: 10px; }
  .ib-line .ib-item { flex: 1 1 100%; font-size: 14px; }
  .ib-nums { flex: 1 1 auto; justify-content: space-between; }
  .ib-num-field { flex: 1 1 0; }
  .ib-num-field input { width: 100%; }
  .ib-amount { flex: 0 0 auto; }
  .ib-del { flex: 0 0 auto; font-size: 20px; }
}

/* ---------- 供应商档案 ---------- */
.hidden { display: none !important; }
.chk-inline {
  display: flex; align-items: center; gap: 5px;
  font-size: 12px; color: #6b7280; cursor: pointer; white-space: nowrap;
}
.chk-inline input { width: auto; margin: 0; }
.btn-mini {
  border: 1px solid #d6dae0; background: #fff; color: #4b5563;
  border-radius: 6px; padding: 3px 9px; font-size: 12px; cursor: pointer;
  margin-right: 4px; white-space: nowrap;
}
.btn-mini:hover { border-color: #1f6feb; color: #1f6feb; }
.btn-mini.danger { color: #dc2626; border-color: #f3c9c9; }
.btn-mini.danger:hover { background: #fef2f2; border-color: #dc2626; }
.row-actions { white-space: nowrap; }
.cell-sub { font-size: 11px; color: #8b93a1; margin-top: 2px; }
.modal-body select { width: 100%; border: 1px solid #d6dae0; border-radius: 9px; padding: 9px 11px; font-size: 14px; outline: none; background: #fff; }

/* ---------- 客户管理 ---------- */
.bind-tag {
  display: inline-block; font-size: 11px; padding: 2px 7px; margin: 2px 4px 2px 0;
  border-radius: 5px; background: #eef4ff; color: #1f6feb; white-space: nowrap;
}
.pick-list {
  max-height: 210px; overflow-y: auto; border: 1px solid #e6e8ec;
  border-radius: 9px; padding: 4px; background: #fbfcfd;
}
.pick-row {
  display: flex; align-items: center; gap: 8px; padding: 6px 8px;
  border-radius: 6px; font-size: 12px; cursor: pointer; margin: 0 !important;
}
.pick-row:hover { background: #eef4ff; }
.pick-row input { width: auto !important; margin: 0; flex: 0 0 auto; }
.pick-code { font-variant-numeric: tabular-nums; color: #4b5563; min-width: 92px; }
.pick-name { flex: 1 1 auto; color: #1a1d23; }
.pick-spec { color: #8b93a1; font-size: 11px; white-space: nowrap; }
.pick-count { font-size: 12px; color: #1f6feb; margin-top: 6px; text-align: right; }

/* ---------- 顶栏：站点选择（国旗+中英文）与用户 ---------- */
.site-select { display: none; }
.site-picker { position: relative; }
.site-btn {
  display: flex; align-items: center; gap: 9px;
  border: 1px solid #d6dae0; background: #fff; border-radius: 11px;
  padding: 8px 13px; font-size: 16px; font-weight: 600; color: #1a1d23;
  cursor: pointer; line-height: 1;
}
.site-btn:hover { border-color: #1f6feb; }
.site-btn .flag { width: 30px; height: 21px; border-radius: 4px; overflow: hidden; display: block; box-shadow: 0 0 0 1px rgba(0,0,0,.08) inset; }
.site-btn .flag svg { width: 100%; height: 100%; display: block; }
.site-btn .site-code { font-size: 13px; font-weight: 500; color: #6b7280; letter-spacing: .5px; }
.site-btn .caret { width: 12px; height: 12px; fill: #8b93a1; }
.site-btn.locked { cursor: default; }
.site-btn.locked:hover { border-color: #d6dae0; }
.site-menu {
  position: absolute; right: 0; top: calc(100% + 7px); z-index: 120;
  background: #fff; border: 1px solid #e6e8ec; border-radius: 12px;
  box-shadow: 0 10px 30px rgba(16,18,22,.14); min-width: 208px;
  padding: 5px; display: none;
}
.site-menu.show { display: block; }
.site-opt {
  display: flex; align-items: center; gap: 10px; width: 100%;
  border: none; background: transparent; border-radius: 9px;
  padding: 9px 11px; font-size: 16px; font-weight: 600; color: #1a1d23;
  cursor: pointer; text-align: left;
}
.site-opt:hover { background: #eef4ff; }
.site-opt.cur { background: #eef4ff; color: #1f6feb; }
.site-opt .flag { width: 30px; height: 21px; border-radius: 4px; overflow: hidden; display: block; }
.site-opt .flag svg { width: 100%; height: 100%; display: block; }
.site-opt .site-code { margin-left: auto; font-size: 13px; font-weight: 500; color: #8b93a1; }
.site-opt .off { margin-left: auto; font-size: 11px; color: #b45309; font-weight: 500; }
.user-chip {
  font-size: 13px; color: #4b5563; background: #f1f3f6; border-radius: 999px;
  padding: 5px 12px; max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.btn-mini.quiet { border: 1px solid #d6dae0; color: #6b7280; background: #fff; }

/* ---------- 登录遮罩 ---------- */
.login-mask {
  position: fixed; inset: 0; z-index: 900; background: linear-gradient(160deg,#17335f,#0d1b32 65%);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.login-mask.hidden { display: none; }
.login-card {
  background: #fff; border-radius: 18px; padding: 30px 28px 26px;
  width: 100%; max-width: 360px; box-shadow: 0 24px 60px rgba(0,0,0,.35);
}
.login-head { text-align: center; margin-bottom: 20px; }
.logo.big { width: 46px; height: 46px; border-radius: 13px; font-size: 21px; margin: 0 auto 10px; }
.login-title { font-size: 18px; font-weight: 700; }
.login-sub { font-size: 12px; color: #8b93a1; margin-top: 4px; }
.login-input {
  width: 100%; border: 1px solid #d6dae0; border-radius: 10px;
  padding: 11px 13px; font-size: 15px; outline: none; margin-bottom: 11px; background: #fbfcfd;
}
.login-input:focus { border-color: #1f6feb; background: #fff; }
.login-err { font-size: 12px; color: #dc2626; min-height: 16px; margin: 2px 0 8px; }
.login-card .btn-primary { margin-top: 0; font-size: 15px; }

/* ---------- 包材启用状态 ---------- */
.tag.off { background: #eef0f3; color: #6b7280; }
.row-off td { color: #9aa1ad; }
.row-off td strong { color: #6b7280; }
.btn-mini.ok { border-color: #16a34a; color: #16a34a; }
.cell-sub { font-size: 11px; color: #8b93a1; margin-top: 2px; }

/* ---------- 比价清单（矩阵） ---------- */
.mx-tbl { font-size: 13px; }
.mx-tbl th, .mx-tbl td { padding: 8px 10px; border-right: 1px solid #f4f5f7; }
.mx-tbl th.mx-sup {
  min-width: 108px; max-width: 150px; text-align: center;
  white-space: normal; line-height: 1.25; vertical-align: bottom;
}
.mx-cell { text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mx-none { color: #c9ced6; }
.mx-best {
  background: #dcfce7 !important; font-weight: 700; color: #15803d;
}
.mx-stale { box-shadow: inset 0 0 0 2px #fde68a; }
.mx-crown {
  display: block; font-size: 10px; font-weight: 600; color: #15803d; margin-top: 1px;
}
.mx-spec { font-size: 11px; color: #8b93a1; white-space: nowrap; }
.mx-best-cell { font-weight: 700; color: #15803d; }

@media (max-width: 820px) {
  .mx-tbl th, .mx-tbl td { padding: 7px 8px; font-size: 12px; }
  .mx-tbl th.mx-sup { min-width: 88px; font-size: 11px; }
  .mx-spec { display: none; }
}

/* ---------- 包材档案：分类卡片格子 ---------- */
.item-cards { padding: 2px 14px 18px; }
.item-cards .group-title:first-child { margin-top: 4px; }
.acard { border-left-color: #1f6feb; cursor: default; display: flex; flex-direction: column; }
.acard .pcard-spec { margin-bottom: 7px; }
.acard-meta {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 6px; margin-bottom: 8px;
}
.acard-stock {
  font-size: 13px; font-weight: 700; color: #16a34a;
  font-variant-numeric: tabular-nums;
}
.acard-quote { font-size: 11px; color: #8b93a1; }
.acard-actions { display: flex; gap: 6px; margin-top: auto; }
.acard-btn {
  flex: 1 1 auto; border: 1px solid #d6dae0; background: #fff; color: #4b5563;
  border-radius: 8px; padding: 7px 0; font-size: 12px; cursor: pointer;
  font-weight: 600; line-height: 1.2;
}
.acard-btn:active { transform: scale(.97); }
.acard-btn.on { background: #dcfce7; border-color: #86efac; color: #15803d; }
.acard-btn.off { background: #f3f4f6; border-color: #d6dae0; color: #8b93a1; }
.acard-btn.ghost { flex: 0 0 auto; padding: 7px 11px; font-weight: 400; }
.acard-off { border-left-color: #cbd5e1 !important; background: #fafbfc; }
.acard-off .pcard-code, .acard-off .pcard-name, .acard-off .pcard-spec { color: #a3aab6; }
.acard-off .acard-stock { color: #a3aab6; font-weight: 500; font-size: 12px; }

@media (max-width: 820px) {
  .item-cards { padding: 2px 10px 16px; }
  .acard-btn { padding: 8px 0; font-size: 12px; }
}

/* ---------- 包装规格折算（一包/一箱含多少个） ---------- */
.pcard-pack { font-size: 11px; color: #8b93a1; margin-top: 2px; font-variant-numeric: tabular-nums; }
.cart-item-pack { font-size: 11px; color: #1f6feb; margin-top: 2px; font-variant-numeric: tabular-nums; }
.mx-tier {
  display: inline-block; margin-left: 5px; font-size: 10px; padding: 1px 4px;
  border-radius: 4px; background: #eef4ff; color: #1f6feb; font-weight: 600; vertical-align: middle;
}
/* 阶梯价合并单元格：同型号同供应商的多档顶部对齐 */
.tbl td[rowspan] { vertical-align: top; }
