/* 润凌云 ERP · 视觉体系照 2026-08 「友好界面原型」(erp-friendly-ui) 移植 */
:root {
  --navy: #17243f;
  --navy-2: #223252;
  --gold: #bd9653;
  --gold-soft: #f1eadc;
  --bg: #f7f8fa;      /* paper */
  --card: #ffffff;
  --line: #e3e7ee;
  --text: #17243f;
  --muted: #69738a;
  --green: #2d8665;
  --red: #b95151;
  --blue: #356fba;
  --orange: #c77736;
  --radius: 16px;
  --num-font: "IBM Plex Sans", -apple-system, "PingFang SC", sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px;
  min-width: 320px; overflow-x: hidden;
}
.hidden { display: none !important; }
button, input, select, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #bd965366; outline-offset: 2px; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- 登录 ---------- */
.login-wrap {
  position: fixed; inset: 0; background: linear-gradient(160deg, #121c33, var(--navy-2));
  display: flex; align-items: center; justify-content: center; z-index: 100;
}
.login-card {
  background: #fff; border-radius: 20px; padding: 40px 36px; width: 330px; text-align: center;
  box-shadow: 0 28px 90px #0b132352; animation: rise .22s ease;
}
.login-logo {
  width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 16px;
  background: var(--gold); color: var(--navy); font-weight: 700; font-size: 22px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--num-font); letter-spacing: .02em;
}
.login-brand { font-size: 21px; font-weight: 700; letter-spacing: .1em; color: var(--navy); margin-bottom: 4px; }
.login-card h1 { font-size: 13px; font-weight: 500; margin-bottom: 24px; color: var(--muted); letter-spacing: .12em; }
.login-card input {
  width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 11px;
  font-size: 15px; margin-bottom: 12px; outline: none; background: #f9fafc;
}
.login-card input:focus { border-color: #bd965388; background: #fff; box-shadow: 0 0 0 4px #bd965312; }
.login-err { color: var(--red); font-size: 13px; margin-top: 10px; min-height: 18px; }

/* ---------- 布局 ---------- */
#app { display: flex; min-height: 100vh; }
.sidebar {
  width: 224px; background: var(--navy); color: #eef2fa; flex-shrink: 0;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
  padding: 22px 12px 14px;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 18px; }
.brand-mark {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px;
  background: var(--gold); color: var(--navy); font: 700 16px/1 var(--num-font); flex-shrink: 0;
}
.brand-copy { min-width: 0; }
.brand-name { display: block; font-size: 18px; font-weight: 700; letter-spacing: .06em; color: #fff; }
.brand-sub { display: block; margin-top: 3px; color: #98a4bc; font-size: 10.5px; font-weight: 500; letter-spacing: .18em; }
.ws-card {
  margin: 0 2px 10px; background: #ffffff0a; border: 1px solid #ffffff17; border-radius: 13px;
  padding: 10px 12px; display: flex; gap: 10px; align-items: center;
}
.ws-ico {
  width: 30px; height: 30px; border-radius: 9px; background: var(--gold); color: var(--navy);
  font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ws-card b { font-size: 13px; color: #fff; display: block; line-height: 1.3; }
.ws-sub { font-size: 10.5px; color: #8f9ab1; }
#nav { flex: 1; padding: 4px 0; overflow-y: auto; scrollbar-width: thin; }
#nav a {
  display: flex; align-items: center; gap: 11px; min-height: 42px; padding: 0 12px;
  color: #bec7d8; text-decoration: none; border-radius: 11px; margin-bottom: 4px; font-size: 13.5px;
  transition: .18s ease;
}
#nav a .ico { width: 19px; height: 19px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; opacity: .9; }
#nav a .ico svg { width: 19px; height: 19px; stroke-width: 1.8; }
#nav a:hover { color: #fff; background: #ffffff0c; transform: translateX(2px); }
#nav a.active { color: #fff; background: #ffffff15; box-shadow: inset 3px 0 var(--gold); }
.nav-sec { padding: 12px 12px 5px; font-size: 10.5px; font-weight: 600; color: #78859e; letter-spacing: .22em; }
.wh-cur { margin: 12px 2px; background: #ffffff0a; border: 1px solid #ffffff17; border-radius: 13px; padding: 12px; }
.wh-cur b { color: #fff; font-size: 14px; display: block; margin: 3px 0; }
.logout {
  margin: 10px 2px 0; padding: 9px; background: transparent; border: 1px solid #ffffff22;
  color: #98a3bd; border-radius: 10px; cursor: pointer; font-size: 13px; transition: .16s ease;
}
.logout:hover { color: #fff; border-color: #ffffff44; }
.main-col { flex: 1; display: flex; flex-direction: column; min-width: 0; }

/* ---------- 顶栏 ---------- */
#topbar {
  min-height: 52px; display: flex; align-items: center; gap: 10px; padding: 6px clamp(12px, 2vw, 26px);
  background: #ffffffea; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 15; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.co-switch { display: flex; gap: 4px; background: #edf0f5; border-radius: 12px; padding: 4px; }
.co-switch button {
  border: 0; background: transparent; color: var(--muted); min-height: 30px; padding: 0 11px;
  border-radius: 9px; font-size: 13px; cursor: pointer; font-weight: 600; white-space: nowrap; transition: .16s ease;
}
.co-switch button:hover { color: var(--text); }
.co-switch button.active { background: #fff; color: var(--text); box-shadow: 0 2px 8px #1f2c4214; }
#topbar .tb-co { background: #fff; border: 1px solid var(--line); }
#topbar .tb-co button.active { background: var(--gold-soft); color: #715623; box-shadow: none; }
.global-search { flex: 1; min-width: 140px; max-width: 420px; position: relative; margin-left: auto; }
.global-search svg { position: absolute; top: 50%; left: 13px; width: 17px; height: 17px; transform: translateY(-50%); color: #7c879c; pointer-events: none; }
.global-search input {
  width: 100%; height: 36px; padding: 0 12px 0 38px; border: 1px solid var(--line); border-radius: 12px;
  background: #f9fafc; color: var(--text); outline: none; font-size: 13px;
}
.global-search input:focus { border-color: #bd965388; background: #fff; box-shadow: 0 0 0 4px #bd965312; }
#main { flex: 1; padding: 14px clamp(12px, 2vw, 26px) 60px; max-width: 1400px; width: 100%; margin: 0 auto; }

/* ---------- 页头 ---------- */
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; flex-wrap: wrap; gap: 8px; }
.page-head h2 { font-size: clamp(18px, 1.6vw, 22px); color: var(--navy); letter-spacing: -.02em; line-height: 1.25; }
.eyebrow { display: block; color: var(--gold); font-size: 11.5px; font-weight: 700; letter-spacing: .12em; margin-bottom: 5px; }
.page-sub { color: var(--muted); font-size: 13.5px; margin-top: 6px; }
.head-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- 按钮 / 输入 ---------- */
.btn {
  border: 1px solid var(--line); border-radius: 10px; padding: 7px 12px; font-size: 13px;
  cursor: pointer; background: #fff; color: #48546b; white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: .16s ease;
}
.btn:hover { border-color: #bd965366; background: #fcfaf6; }
.btn-primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-2); border-color: var(--navy-2); }
.btn-gold {
  background: var(--gold); border-color: var(--gold); color: var(--navy); font-weight: 700;
  box-shadow: 0 6px 18px #bd96532b;
}
.btn-gold:hover { filter: brightness(.96); transform: translateY(-1px); background: var(--gold); }
.btn-sm { padding: 5px 10px; font-size: 12.5px; border-radius: 8px; }
.btn-danger { background: #fbe9e7; border-color: #f5d9d5; color: var(--red); }
.btn-danger:hover { border-color: var(--red); background: #fbe9e7; }
.btn-block { width: 100%; }
.btn:active { transform: scale(.97); }
.btn svg { width: 15px; height: 15px; stroke-width: 1.9; }
input, select, textarea {
  font-family: inherit; font-size: 13.5px; padding: 6px 10px; border: 1px solid var(--line);
  border-radius: 10px; outline: none; background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus { border-color: #bd965388; box-shadow: 0 0 0 4px #bd965312; }
.search-input { width: 180px; }

/* ---------- 卡片 / 表格 ---------- */
.card { background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); padding: 18px; }
.card h3 { font-size: 15px; color: var(--navy); margin-bottom: 13px; }
.table-wrap { overflow-x: auto; background: var(--card); border-radius: var(--radius); border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; min-width: 640px; }
.o-fsel { padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; font-size: 12.5px; background: #fff; color: var(--text); }
th, td { padding: 10px 10px; text-align: left; border-bottom: 1px solid #edf0f4; white-space: nowrap; }
th { background: #f9fafc; color: var(--muted); font-weight: 600; font-size: 12px; letter-spacing: .02em; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .12s ease; }
tbody tr:hover { background: #fafbfd; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.empty { padding: 46px 0; text-align: center; color: var(--muted); }

.tag { display: inline-block; padding: 3px 9px; border-radius: 7px; font-size: 11px; font-weight: 700; }
.tag-green { background: #e9f4ef; color: #2d745a; }
.tag-red { background: #f9e9e9; color: var(--red); }
.tag-gray { background: #eef0f5; color: var(--muted); }
.tag-blue { background: #eaf1f9; color: #35679e; }
.tag-gold { background: #f4f0e7; color: #80612b; }

/* ---------- 指标卡（仪表盘/作业台） ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(196px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 17px 18px; transition: .18s ease; min-width: 0;
}
.kpi:hover { border-color: #cbd2de; transform: translateY(-2px); box-shadow: 0 8px 28px #1e2c4410; }
.kpi .k-label { font-size: 12px; color: var(--muted); margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi .k-value {
  font-family: var(--num-font); font-size: clamp(22px, 2vw, 27px); font-weight: 600;
  color: var(--navy); font-variant-numeric: tabular-nums; letter-spacing: -.03em; line-height: 1.1;
}
.kpi .k-sub { font-size: 11.5px; color: var(--muted); margin-top: 8px; }
.kpi.warn .k-value { color: var(--red); }
.k-ico {
  width: 30px; height: 30px; display: inline-grid; place-items: center; border-radius: 9px;
  background: #eef3f9; color: var(--blue); flex-shrink: 0;
}
.k-ico svg { width: 16px; height: 16px; stroke-width: 1.9; }
.k-ico.green { background: #ebf5f1; color: var(--green); }
.k-ico.gold { background: #f6f0e4; color: #967139; }
.k-ico.orange { background: #fcf0e8; color: var(--orange); }

/* 今日待处理条（attention strip） */
.attention-strip {
  border: 1px solid #eadfc9 !important; background: #fffcf5 !important; border-radius: 14px !important;
}

.dash-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dash-cols .card { min-width: 0; }
.chart-box { height: 260px; }
.trend-bars { display: flex; align-items: flex-end; gap: 10px; height: 140px; padding-top: 8px; }
.trend-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.trend-bar { width: 100%; max-width: 44px; background: linear-gradient(180deg, #33487a, var(--navy)); border-radius: 6px 6px 2px 2px; min-height: 3px; }
.trend-lb { font-size: 11px; color: var(--muted); }
.trend-val { font-size: 11px; color: var(--navy); font-weight: 600; }
.recent-list { display: flex; flex-direction: column; }
.recent-item { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid #edf0f4; gap: 8px; font-size: 13px; align-items: center; flex-wrap: wrap; }
.recent-item:last-child { border-bottom: 0; }

/* 仓库作业台 */
.wh-cols { display: flex; gap: 16px; align-items: flex-start; }
.wh-main { flex: 1; min-width: 0; }
.wh-side { width: 300px; flex-shrink: 0; }
@media (max-width: 900px) { .wh-cols { flex-direction: column; } .wh-side { width: 100%; } }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: #0c1424a8; z-index: 50;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .18s ease;
}
.modal {
  background: #fff; border-radius: 20px; width: 100%; max-width: 720px; max-height: 90vh;
  display: flex; flex-direction: column; box-shadow: 0 28px 90px #0b132352; animation: rise .22s ease;
}
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 17px 22px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 17px; color: var(--navy); }
.modal-close {
  border: 0; background: #f3f5f8; width: 34px; height: 34px; border-radius: 10px;
  font-size: 17px; cursor: pointer; color: var(--muted); display: grid; place-items: center;
}
.modal-close:hover { color: var(--text); }
.modal-body { padding: 18px 22px; overflow-y: auto; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; }

.item-rows { margin-top: 6px; }
.item-row { display: grid; grid-template-columns: minmax(180px,1.5fr) 85px 90px 95px 85px 34px; gap: 8px; margin-bottom: 8px; align-items: center; }
.item-row.with-alias { grid-template-columns: minmax(150px,1.3fr) 95px 75px 85px 90px 80px 32px; }
.item-row.with-alias.with-spec { grid-template-columns: minmax(150px,1.2fr) 90px 90px 70px 80px 70px 28px; }
.item-row.mat { grid-template-columns: minmax(180px,1.6fr) 95px 1fr 40px 34px; } /* 组装/配方行：原料+用量+库存提示 */
.item-row .row-amt { text-align: right; font-variant-numeric: tabular-nums; font-size: 13px; color: var(--navy); font-family: var(--num-font); }
.row-del { border: 0; background: #fbe9e7; color: var(--red); border-radius: 8px; height: 34px; cursor: pointer; }
.items-total { text-align: right; font-weight: 700; color: var(--navy); padding: 8px 4px; font-family: var(--num-font); }

/* ---------- Toast ---------- */
#toast {
  position: fixed; right: 22px; bottom: 22px; z-index: 99;
  display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none;
}
.toast-msg {
  background: var(--navy); color: #fff; padding: 12px 16px; border-radius: 12px; font-size: 13px;
  box-shadow: 0 14px 36px #17243f3b; animation: rise .2s ease;
  display: flex; align-items: center; gap: 9px; max-width: 82vw;
}
.toast-msg::before { content: '✓'; color: #7bd4a9; font-weight: 700; }
.toast-msg.err { background: var(--red); }
.toast-msg.err::before { content: '✕'; color: #ffd9d4; }

/* ---------- 手机适配 ---------- */
#mobile-nav { display: none; }
@media (max-width: 760px) {
  #app { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; padding: 12px 10px 4px; }
  .brand { padding: 0 6px 10px; }
  .ws-card { display: none; }
  #nav { display: flex; overflow-x: auto; padding: 0 2px 10px; scrollbar-width: none; }
  #nav::-webkit-scrollbar { display: none; }
  #nav a { flex-shrink: 0; min-height: 38px; padding: 0 12px; margin-bottom: 0; margin-right: 2px; }
  #nav a:hover { transform: none; }
  .nav-sec { display: none; }
  .wh-cur { display: none; }
  .logout { display: none; }
  #topbar { flex-wrap: wrap; gap: 8px; padding: 9px 12px; }
  .global-search { max-width: none; width: 100%; order: 3; margin-left: 0; flex-basis: 100%; }
  .co-switch button { padding: 0 10px; font-size: 12px; }
  #main { padding: 16px 14px 96px; }
  .dash-cols { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .item-row { grid-template-columns: 1fr 60px 72px 66px 64px 28px; }
  .item-row.with-alias { grid-template-columns: 1fr 78px 56px 66px 60px 60px 26px; }
  .item-row.with-spec { grid-template-columns: 1fr 70px 64px 56px 64px 56px 26px; }
  .item-row.mat { grid-template-columns: 1fr 70px 1fr 20px 28px; }
  .search-input { width: 130px; }
  /* 底部快捷导航（照原型 mobile-nav） */
  #mobile-nav {
    position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 30;
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 6px;
    border: 1px solid #ffffff22; border-radius: 17px; background: #17243ff2;
    box-shadow: 0 10px 40px #17243f3b; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  }
  #mobile-nav.hidden { display: none; }
  #mobile-nav a {
    min-height: 48px; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; border-radius: 11px; color: #95a1b8; font-size: 10px; text-decoration: none;
  }
  #mobile-nav a.active { background: #ffffff13; color: #fff; }
  #mobile-nav a svg { width: 18px; height: 18px; stroke-width: 1.8; }
}
@media (max-width: 560px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 14px; }
}

/* ---------- 打印预览弹窗 ---------- */
#print-preview .pv-mask { position: fixed; inset: 0; background: rgba(12,20,36,.62); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 24px; backdrop-filter: blur(6px); }
#print-preview .pv-box { background: #fff; border-radius: 18px; width: min(1000px, 96vw); height: min(92vh, 1000px); display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 12px 48px rgba(0,0,0,.3); }
#print-preview .pv-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; border-bottom: 1px solid var(--line); font-weight: 600; color: var(--navy); }
#print-preview .pv-head > div { display: flex; gap: 8px; }
#print-preview #pv-frame { flex: 1; width: 100%; border: 0; background: #e9ebf0; }

/* ---------- 极简中性桶签（标签打印用，勿动） ---------- */
.lab.min { justify-content: center; }
.lab.min .lab-md { font-size: 64px; margin: 0 0 8mm; }
.lab.min .lab-ln { font-size: 30px; }

/* ---------- 可搜索下拉（单框自动完成） ---------- */
.sel-ac { position: relative; min-width: 0; }
.sel-ac-inp { width: 100%; box-sizing: border-box; }
.sel-ac-hidden { display: none !important; }
.sel-ac-list { display: none; position: absolute; z-index: 60; left: 0; right: 0; top: 100%; margin-top: 3px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px #1e2c4422;
  max-height: 260px; overflow-y: auto; }
.sel-ac-list.open { display: block; }
.sel-ac-item { padding: 8px 11px; font-size: 13.5px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sel-ac-item:hover, .sel-ac-item.hi { background: var(--gold-soft); }
.sel-ac-empty { padding: 10px 11px; font-size: 12.5px; color: var(--muted); }

/* 9-29 表头拖动调列宽 */
th.rz-th { position: relative; }
.col-rz { position: absolute; top: 0; right: -4px; width: 9px; height: 100%; cursor: col-resize; z-index: 2; }
.col-rz::after { content: ''; position: absolute; top: 22%; bottom: 22%; left: 4px; width: 1px; background: #d3d9e3; }
.col-rz:hover::after, body.rz-dragging .col-rz::after { background: var(--gold); width: 2px; top: 0; bottom: 0; }
body.rz-dragging { cursor: col-resize; user-select: none; }
td.wrap { white-space: normal; } td.wrap .tag, td.wrap .btn { margin: 1px 0; }
#rz-orders tr > :last-child { position: sticky; right: 0; background: #fff; box-shadow: -8px 0 10px -8px #1f2c4233; z-index: 1; }
#rz-orders th:last-child { background: #f9fafc; }
#rz-orders tbody tr:hover > :last-child { background: #fafbfd; }
#rz-orders td.empty { position: static; box-shadow: none; }
/* 9-29 行首图标按钮 */
.btn-icon { padding: 5px 7px; margin-right: 4px; }
.btn-icon svg { width: 15px; height: 15px; }

/* 常用操作优先；筛选和打印偏好按需展开。 */
.logistics-cell { border:0; background:transparent; color:inherit; text-align:left; cursor:pointer; padding:3px 5px; margin:-3px -5px; border-radius:6px; line-height:1.6; }
.logistics-cell b { display:block; font-weight:600; }
.logistics-cell .muted { display:block; font-size:11px; }
.logistics-cell:hover { background:#edf3fa; }
.order-filters { margin:0 0 10px; border-bottom:1px solid var(--line); padding-bottom:10px; }
.order-filters summary, .order-options summary { cursor:pointer; color:var(--muted); font-size:12.5px; width:fit-content; }
.order-filters[open] summary { margin-bottom:10px; }
.order-filters #o-filters { gap:8px; }
.order-actions { margin-bottom:12px; }
.order-options { position:relative; }
.order-options summary { padding:7px 10px; border:1px solid var(--line); border-radius:8px; background:white; }
.order-options-body { position:absolute; right:0; top:calc(100% + 6px); z-index:20; padding:14px; min-width:240px; background:white; border:1px solid var(--line); border-radius:10px; box-shadow:0 8px 24px #17243f18; display:flex; flex-direction:column; align-items:flex-start; gap:12px; }
@media (min-width:769px) {
  #nav a { min-height:36px; margin-bottom:2px; border-radius:7px; }
  #nav .nav-sec { padding-top:10px; letter-spacing:.06em; }
}

.order-carrier { width:100%; min-width:90px; max-width:145px; padding:4px 22px 4px 6px; border:1px solid var(--line); border-radius:6px; background:white; color:var(--text); font-size:12px; cursor:pointer; }
.order-freight { display:block; border:0; background:transparent; padding:3px 0 0; color:var(--muted); font-size:11px; cursor:pointer; }
.order-freight:hover { color:var(--blue); text-decoration:underline; }
.invoice-state { border:1px solid currentColor; cursor:pointer; }
.invoice-state:disabled { cursor:default; }

.compact-sub { color:var(--muted); font-size:11px; line-height:1.7; }
.compact-link { background:none; border:0; padding:0; font-size:11px; color:var(--blue); cursor:pointer; text-align:left; }
.compact-link:hover { text-decoration:underline; }
.compact-actions { white-space:nowrap; }
.row-more { display:inline-block; position:relative; vertical-align:middle; margin:3px 0; }
.row-more summary { cursor:pointer; padding:5px 8px; font-size:12px; color:var(--muted); }
.row-more-menu { position:absolute; right:0; top:100%; min-width:165px; padding:8px; z-index:30; background:white; border:1px solid var(--line); border-radius:8px; box-shadow:0 6px 20px #17243f20; display:flex; flex-direction:column; gap:5px; }
.row-more-menu .btn { text-align:left; white-space:nowrap; }

.sale-summary-item { display:inline-block; margin-right:24px; padding:6px 0; }
.sale-summary-item b { color:var(--text); margin-left:5px; }
.sale-summary-detail { font-size:11px; margin:4px 0; }
.sale-summary-detail summary { cursor:pointer; width:fit-content; }
.sale-summary-detail div { padding-top:6px; }

#rz-sales-compact .compact-actions { overflow:visible !important; }

/* Native popover paints above table clipping and row backgrounds. */
.row-more-menu[popover] { position:fixed; inset:auto; margin:0; max-height:calc(100vh - 16px); overflow-y:auto; }
.row-more-menu[popover]:not(:popover-open) { display:none; }
.row-more-menu[popover]:popover-open { display:flex; }

/* 表格列标题统一居中，数据行保留原有对齐。 */
.table-wrap table thead th, .table-wrap table thead th.num { text-align:center; }
