/* ==========================================================================
   众汇物流 · 客户管理系统 (Zhonghui Logistics CRM)
   样式表 — 浅色主题 / 专业 CRM 风格
   ========================================================================== */

:root {
  /* 主色板 —— 物流蓝 + 缅甸金 */
  --brand: #1a4d8f;
  --brand-dark: #123a6b;
  --brand-light: #e8f0fa;
  --accent: #c9922c;
  --accent-light: #fdf6e7;

  /* 语义色 */
  --ok: #1f9254;
  --ok-bg: #e7f6ee;
  --warn: #b7791f;
  --warn-bg: #fdf3e0;
  --danger: #c0392b;
  --danger-bg: #fdecea;
  --info: #2563eb;
  --info-bg: #e8f0fe;
  --muted-bg: #f1f3f6;

  /* 中性色 */
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --text: #1f2937;
  --text-2: #5b6675;
  --text-3: #94a0b0;
  --border: #e3e8ef;
  --border-strong: #cfd7e3;

  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(16, 30, 54, .06);
  --shadow: 0 2px 8px rgba(16, 30, 54, .08);
  --shadow-lg: 0 12px 32px rgba(16, 30, 54, .16);

  --sidebar-w: 216px;
  --topbar-h: 58px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
a { color: var(--brand); text-decoration: none; }
ul { list-style: none; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #cbd3de; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #aeb9c8; }
::-webkit-scrollbar-track { background: transparent; }

/* ============================ 布局 ============================ */

.app { display: flex; min-height: 100vh; }

/* ---------- 侧边栏 ---------- */
.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: linear-gradient(178deg, #16365f 0%, #1a4d8f 100%);
  color: #dbe6f5;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; bottom: 0; left: 0;
  z-index: 40;
}

.brand {
  padding: 16px 18px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.brand-logo-img {
  height: 26px; width: auto;
  display: block;
}
.brand-text b { display: block; color: #fff; font-size: 14px; letter-spacing: .3px; }
.brand-text span { display: block; font-size: 10.5px; color: #9fb6d6; letter-spacing: .6px; }

.nav { flex: 1; overflow-y: auto; padding: 10px 8px; }
.nav-group-label {
  font-size: 10.5px; letter-spacing: 1.2px; color: #7f9ac0;
  padding: 12px 10px 6px; text-transform: uppercase;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; margin-bottom: 2px;
  border-radius: 7px; cursor: pointer;
  color: #c8d8ee; font-size: 13.5px;
  transition: background .15s, color .15s;
  user-select: none;
}
.nav-item:hover { background: rgba(255, 255, 255, .09); color: #fff; }
.nav-item.active { background: rgba(255, 255, 255, .16); color: #fff; font-weight: 600; }
.nav-item .ico { width: 18px; text-align: center; font-size: 15px; flex: 0 0 18px; }
.nav-item .badge {
  margin-left: auto;
  background: var(--accent); color: #fff;
  font-size: 10.5px; font-weight: 700;
  padding: 1px 6px; border-radius: 9px; min-width: 18px; text-align: center;
}
.nav-item .badge.hollow { background: rgba(255, 255, 255, .18); color: #dbe6f5; }

.sidebar-foot {
  padding: 10px 16px 14px;
  font-size: 11px; color: #7f9ac0;
  border-top: 1px solid rgba(255, 255, 255, .1);
}
.sidebar-foot .dot { color: #46c07a; }
.nav-item.admin-only { display: none; }
body.is-admin .nav-item.admin-only { display: flex; }

/* ---------- 当前登录用户 ---------- */
.user-chip {
  display: flex; align-items: center; gap: 8px;
  margin: -2px 0 8px; padding: 7px 8px;
  border-radius: 8px; cursor: pointer;
  background: rgba(255, 255, 255, .06);
  transition: background .15s;
}
.user-chip:hover { background: rgba(255, 255, 255, .12); }
.user-chip .avatar {
  width: 26px; height: 26px; flex: 0 0 26px; border-radius: 50%;
  background: linear-gradient(140deg, #f0b429, #dd9a1c);
  color: #3b2b00; font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.user-chip .who { min-width: 0; }
.user-chip .who b { display: block; color: #fff; font-size: 12.5px; line-height: 1.3; }
.user-chip .who span { display: block; font-size: 10.5px; color: #9fb6d6; }
.user-chip .out { margin-left: auto; font-size: 11px; color: #9fb6d6; }
.user-chip .out:hover { color: #fff; }

/* ---------- 登录门禁 ---------- */
body.locked .app { display: none; }
.login-screen {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(155deg, #0d2340 0%, #1a4d8f 55%, #2f6db8 100%);
  padding: 20px;
}
.login-card {
  width: 100%; max-width: 372px;
  background: #fff; border-radius: 16px;
  padding: 26px 26px 20px;
  box-shadow: 0 26px 60px rgba(4, 16, 34, .42);
}
.login-brand { text-align: center; margin-bottom: 18px; }
.login-brand h2 { font-size: 18px; color: var(--text); margin-top: 12px; letter-spacing: .5px; }
.login-brand .login-sub { font-size: 12.5px; color: var(--text-3); margin-top: 5px; line-height: 1.6; }
.login-card .field { margin-bottom: 12px; }
.login-card .input { height: 38px; }
.login-err { color: #c0392b; font-size: 12.5px; min-height: 18px; margin: 2px 0 6px; }
.login-submit { width: 100%; height: 40px; font-size: 14px; letter-spacing: 2px; }
.login-foot {
  margin-top: 16px; padding-top: 13px;
  border-top: 1px solid var(--border);
  font-size: 11.5px; color: var(--text-3); line-height: 1.7; text-align: center;
}
.login-card .field label { font-size: 12.5px; color: var(--text-2); }

/* 表单里的小节标题 */
.form-section-title {
  font-size: 12px; font-weight: 600; color: var(--text-2);
  letter-spacing: .5px; margin: 4px 0 10px;
  padding-bottom: 6px; border-bottom: 1px solid var(--border);
}

/* ---------- 主区 ---------- */
.main {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px;
  padding: 0 20px;
  position: sticky; top: 0; z-index: 30;
}
.topbar h1 { font-size: 17px; font-weight: 600; letter-spacing: .2px; }
.topbar .sub { font-size: 12px; color: var(--text-3); padding-left: 10px; border-left: 1px solid var(--border); }
.topbar .spacer { flex: 1; }

.global-search {
  position: relative; width: 260px;
}
.global-search input {
  width: 100%; height: 34px;
  padding: 0 12px 0 32px;
  border: 1px solid var(--border-strong); border-radius: 17px;
  background: var(--surface-2); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.global-search input:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px var(--brand-light); }
.global-search::before {
  content: "🔍"; position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  font-size: 12px; opacity: .55; pointer-events: none;
}

.content { padding: 20px; flex: 1; }

/* ============================ 通用组件 ============================ */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.card-head {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.card-head h3 { font-size: 14.5px; font-weight: 600; }
.card-head .spacer { flex: 1; }
.card-body { padding: 16px; }
.card-body.tight { padding: 0; }

.btn {
  height: 34px; padding: 0 14px;
  border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text);
  border-radius: 7px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; white-space: nowrap;
  transition: all .15s;
}
.btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-light); }
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 500;
}
.btn.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--muted-bg); color: var(--text); }
.btn.danger { color: var(--danger); border-color: #efc9c4; }
.btn.danger:hover { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn.xs { height: 24px; padding: 0 8px; font-size: 11.5px; border-radius: 6px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-icon {
  width: 30px; height: 30px; padding: 0; justify-content: center;
  border: none; background: transparent; border-radius: 6px;
  cursor: pointer; color: var(--text-2); font-size: 15px;
}
.btn-icon:hover { background: var(--muted-bg); color: var(--brand); }

/* 表单 */
.field { margin-bottom: 13px; }
.field > label {
  display: block; font-size: 12.5px; color: var(--text-2);
  margin-bottom: 5px; font-weight: 500;
}
.field > label .req { color: var(--danger); margin-left: 2px; }
.input, .select, .textarea {
  width: 100%; min-height: 34px; padding: 6px 10px;
  border: 1px solid var(--border-strong); border-radius: 7px;
  background: #fff; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-light);
}
.textarea { min-height: 78px; resize: vertical; line-height: 1.55; }
.select { cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M0 0l5 6 5-6z' fill='%235b6675'/></svg>");
  background-repeat: no-repeat; background-position: right 11px center; padding-right: 28px;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }
.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 0 14px; }
.col-span-2 { grid-column: span 2; }
.form-note { font-size: 11.5px; color: var(--text-3); margin-top: 4px; }

/* 表格 */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th {
  text-align: left; font-weight: 600; color: var(--text-2);
  font-size: 12px; letter-spacing: .2px;
  padding: 10px 12px; background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap; position: sticky; top: 0; z-index: 1;
}
table.tbl td {
  padding: 10px 12px; border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
table.tbl tbody tr { transition: background .12s; }
table.tbl tbody tr:hover { background: #f7fafd; }
table.tbl tbody tr.clickable { cursor: pointer; }
table.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
table.tbl .nowrap { white-space: nowrap; }
.td-actions { white-space: nowrap; text-align: right; }
.td-actions .btn-icon { opacity: .45; }
tr:hover .td-actions .btn-icon { opacity: 1; }

.empty {
  padding: 46px 20px; text-align: center; color: var(--text-3);
}
.empty .big { font-size: 34px; opacity: .5; margin-bottom: 8px; }
.empty p { font-size: 13px; }

/* 徽标 */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 5px;
  font-size: 11.5px; font-weight: 600;
  background: var(--muted-bg); color: var(--text-2);
  white-space: nowrap;
}
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.tag.danger { background: var(--danger-bg); color: var(--danger); }
.tag.info { background: var(--info-bg); color: var(--info); }
.tag.brand { background: var(--brand-light); color: var(--brand); }
.tag.accent { background: var(--accent-light); color: #9a6f16; }
.tag.dot::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; display: inline-block;
}
.lvl { display: inline-flex; width: 20px; height: 20px; border-radius: 5px;
  align-items: center; justify-content: center; font-size: 11.5px;
  font-weight: 800; color: #fff; }
.lvl.S { background: #c0392b; }
.lvl.A { background: #d97706; }
.lvl.B { background: #2563eb; }
.lvl.C { background: #8494a8; }

/* 统计卡 */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 15px 16px;
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.stat::after {
  content: ""; position: absolute; right: -20px; top: -20px;
  width: 74px; height: 74px; border-radius: 50%; background: var(--brand-light); opacity: .55;
}
.stat .lbl { font-size: 12.5px; color: var(--text-2); position: relative; }
.stat .val {
  font-size: 25px; font-weight: 700; margin-top: 4px;
  font-variant-numeric: tabular-nums; position: relative; letter-spacing: -.5px;
}
.stat .sub { font-size: 11.5px; color: var(--text-3); margin-top: 2px; position: relative; }
.stat.g .val { color: var(--ok); }
.stat.b .val { color: var(--brand); }
.stat.a .val { color: #b7791f; }

/* 工具栏 */
.toolbar {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.toolbar .spacer { flex: 1; }
.toolbar .input, .toolbar .select { width: auto; min-width: 128px; }
.toolbar .search-input { min-width: 210px; }

.pager {
  display: flex; align-items: center; gap: 8px; justify-content: flex-end;
  padding: 11px 14px; font-size: 12.5px; color: var(--text-2);
  border-top: 1px solid var(--border);
}
.pager .btn-icon { border: 1px solid var(--border); }
.pager .btn-icon:disabled { opacity: .35; }

/* ============================ 弹窗 ============================ */

.overlay {
  position: fixed; inset: 0; background: rgba(18, 30, 48, .48);
  backdrop-filter: blur(2px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 42px 20px; z-index: 100;
  overflow-y: auto;
  animation: fade .16s ease;
}
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes pop { from { opacity: 0; transform: translateY(-12px) scale(.99) } to { opacity: 1; transform: none } }

.modal {
  background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 620px;
  animation: pop .18s ease;
  margin: auto 0;
}
.modal.wide { max-width: 880px; }
.modal.narrow { max-width: 440px; }
.modal-head {
  padding: 15px 18px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.modal-head h3 { font-size: 15.5px; font-weight: 600; }
.modal-head .spacer { flex: 1; }
.modal-body { padding: 18px; max-height: calc(100vh - 220px); overflow-y: auto; }
.modal-foot {
  padding: 13px 18px; border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 9px; justify-content: flex-end;
  background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.modal-foot .left { margin-right: auto; }

.section-title {
  font-size: 12px; font-weight: 700; color: var(--brand);
  letter-spacing: .6px; text-transform: uppercase;
  padding: 4px 0 9px; margin-top: 6px;
  border-bottom: 1px dashed var(--border); margin-bottom: 13px;
}
.section-title:first-child { margin-top: 0; }

/* ============================ 详情抽屉 ============================ */

.drawer-mask {
  position: fixed; inset: 0; background: rgba(18, 30, 48, .4);
  z-index: 90; animation: fade .16s ease;
}
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(700px, 94vw);
  background: var(--bg);
  box-shadow: -8px 0 32px rgba(16, 30, 54, .18);
  z-index: 95; display: flex; flex-direction: column;
  animation: slideIn .22s cubic-bezier(.22, .61, .36, 1);
}
@keyframes slideIn { from { transform: translateX(100%) } to { transform: none } }
.drawer-head {
  padding: 15px 20px; background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: flex-start; gap: 12px;
}
.drawer-head .spacer { flex: 1; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px 30px; }

/* 选项卡 */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 15px; }
.tab {
  padding: 9px 14px; font-size: 13.5px; cursor: pointer; color: var(--text-2);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .15s, border-color .15s; white-space: nowrap;
}
.tab:hover { color: var(--brand); }
.tab.active { color: var(--brand); font-weight: 600; border-bottom-color: var(--brand); }
.tab .cnt {
  font-size: 11px; background: var(--muted-bg); color: var(--text-2);
  padding: 0 6px; border-radius: 8px; margin-left: 5px;
}

/* 信息栅格 */
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 11px 20px; }
.info-grid.one { grid-template-columns: 1fr; }
.info-item .k { font-size: 11.5px; color: var(--text-3); }
.info-item .v { font-size: 13.5px; margin-top: 1px; word-break: break-all; }
.info-item.full { grid-column: 1 / -1; }

/* 时间轴 */
.timeline { position: relative; padding-left: 22px; }
.timeline::before {
  content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px;
  width: 2px; background: var(--border);
}
.tl-item { position: relative; padding-bottom: 16px; }
.tl-item::before {
  content: ""; position: absolute; left: -21px; top: 5px;
  width: 10px; height: 10px; border-radius: 50%;
  background: #fff; border: 2.5px solid var(--brand);
}
.tl-item.type-ok::before { border-color: var(--ok); }
.tl-item.type-warn::before { border-color: var(--warn); }
.tl-item.type-mute::before { border-color: var(--border-strong); }
.tl-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-head .when { font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.tl-body {
  margin-top: 5px; font-size: 13px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 9px 11px;
}
.tl-meta { margin-top: 5px; font-size: 12px; color: var(--text-3); }

/* ============================ 漏斗看板 ============================ */

.funnel {
  display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px; align-items: flex-start;
}
.funnel-col {
  flex: 0 0 236px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  display: flex; flex-direction: column; max-height: calc(100vh - 220px);
}
.funnel-col-head {
  padding: 11px 13px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 600;
}
.funnel-col-head .spacer { flex: 1; }
.funnel-col-head .cnt {
  font-size: 11.5px; color: var(--text-2); background: var(--surface);
  border: 1px solid var(--border); padding: 0 7px; border-radius: 9px;
}
.funnel-col-body { padding: 9px; overflow-y: auto; flex: 1; min-height: 80px; transition: background .15s; }
.funnel-col-body.drag-over { background: var(--brand-light); }
.funnel-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 11px; margin-bottom: 8px;
  cursor: grab; box-shadow: var(--shadow-sm);
  transition: box-shadow .15s, transform .1s;
}
.funnel-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.funnel-card:active { cursor: grabbing; }
.funnel-card.dragging { opacity: .4; }
.funnel-card .nm { font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.funnel-card .mt { font-size: 11.5px; color: var(--text-3); display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.funnel-bar {
  height: 4px; border-radius: 2px; background: var(--border); margin-top: 8px; overflow: hidden;
}
.funnel-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), #3d7cc9); }

/* ============================ 看板 / 首页 ============================ */

.dash-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; }
@media (max-width: 1080px) { .dash-grid { grid-template-columns: 1fr; } }

.list-row {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 16px; border-bottom: 1px solid var(--border);
  font-size: 13px; cursor: pointer; transition: background .12s;
}
.list-row:last-child { border-bottom: none; }
.list-row:hover { background: #f7fafd; }
.list-row .t { flex: 1; min-width: 0; }
.list-row .t b { font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .t span { font-size: 11.5px; color: var(--text-3); }
.list-row .r { text-align: right; font-size: 12px; color: var(--text-2); white-space: nowrap; }

.mini-ship {
  display: flex; align-items: center; gap: 0; padding: 12px 14px;
  border-bottom: 1px solid var(--border); cursor: pointer; transition: background .12s;
}
.mini-ship:hover { background: #f7fafd; }
.mini-ship .no { font-size: 12.5px; font-weight: 600; color: var(--brand); width: 118px; flex: 0 0 118px; }
.mini-ship .route { flex: 1; min-width: 0; font-size: 12.5px; }
.mini-ship .route small { color: var(--text-3); display: block; font-size: 11px; }

.progress-steps { display: flex; align-items: center; gap: 0; margin: 6px 0 2px; }
.ps-node { display: flex; flex-direction: column; align-items: center; gap: 3px; flex: 0 0 auto; }
.ps-dot {
  width: 22px; height: 22px; border-radius: 50%; background: var(--muted-bg);
  border: 2px solid var(--border-strong); color: var(--text-3);
  font-size: 10.5px; display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.ps-dot.done { background: var(--ok); border-color: var(--ok); color: #fff; }
.ps-dot.cur { background: var(--brand); border-color: var(--brand); color: #fff;
  box-shadow: 0 0 0 4px var(--brand-light); }
.ps-lbl { font-size: 10.5px; color: var(--text-3); white-space: nowrap; }
.ps-dot.cur + .ps-lbl, .ps-dot.done + .ps-lbl { color: var(--text); font-weight: 600; }
.ps-line { flex: 1; height: 2px; background: var(--border-strong); margin: 0 2px; margin-bottom: 16px; min-width: 12px; }
.ps-line.done { background: var(--ok); }

/* 阶段推进条（运单横向） */
.flow-strip { display: flex; align-items: stretch; gap: 6px; overflow-x: auto; padding: 4px 0 8px; }
.flow-item {
  flex: 1 0 92px; text-align: center; padding: 8px 6px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface-2);
  font-size: 11.5px; color: var(--text-3); cursor: pointer; transition: all .15s;
}
.flow-item:hover { border-color: var(--brand); color: var(--brand); }
.flow-item.done { background: var(--ok-bg); border-color: #b6e0c9; color: var(--ok); font-weight: 600; }
.flow-item.cur { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.flow-item .fi-ico { font-size: 15px; display: block; margin-bottom: 2px; }

/* ============================ 报价单打印 ============================ */

.quote-doc {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 30px; font-size: 13px; color: #1f2937;
}
.quote-doc .qd-head {
  display: flex; align-items: flex-start; gap: 14px;
  border-bottom: 2px solid var(--brand); padding-bottom: 13px; margin-bottom: 18px;
}
.quote-doc h2 { font-size: 19px; color: var(--brand); letter-spacing: 1px; }
.quote-doc .qd-head .r { margin-left: auto; text-align: right; font-size: 12px; color: var(--text-2); line-height: 1.9; }
.quote-doc .qd-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px 20px; margin-bottom: 16px; }
.quote-doc .qd-grid .k { color: var(--text-3); font-size: 12px; display: inline-block; min-width: 74px; }
.quote-doc table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 12.5px; }
.quote-doc table th, .quote-doc table td { border: 1px solid var(--border-strong); padding: 7px 9px; }
.quote-doc table th { background: var(--brand-light); color: var(--brand-dark); font-weight: 600; text-align: left; }
.quote-doc table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.quote-doc .qd-total { text-align: right; font-size: 15px; font-weight: 700; color: var(--danger); margin: 10px 0 16px; }
.quote-doc .qd-foot { border-top: 1px dashed var(--border-strong); padding-top: 12px; font-size: 11.5px; color: var(--text-2); line-height: 1.9; }

/* ============================ 提示 / 工具 ============================ */

.toast-wrap {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none;
}
.toast {
  background: #22304a; color: #fff; padding: 9px 18px; border-radius: 20px;
  font-size: 13px; box-shadow: var(--shadow-lg);
  animation: pop .18s ease; display: flex; align-items: center; gap: 8px;
}
.toast.ok { background: #17683f; }
.toast.err { background: #a02f22; }

.hint-bar {
  display: flex; align-items: flex-start; gap: 9px;
  background: var(--brand-light); border: 1px solid #cfe0f5;
  border-radius: 9px; padding: 10px 13px; font-size: 12.5px; color: #1c4f8f;
  margin-bottom: 14px;
}
.hint-bar.warn { background: var(--warn-bg); border-color: #f0dbb0; color: #8a6415; }

.kbd {
  font-family: Consolas, Monaco, monospace; font-size: 11.5px;
  background: var(--surface-2); border: 1px solid var(--border-strong);
  border-bottom-width: 2px; border-radius: 5px; padding: 1px 5px; color: var(--text-2);
}

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.flex { display: flex; align-items: center; gap: 8px; }
.flex-wrap { flex-wrap: wrap; }
.mt-8 { margin-top: 8px; } .mt-14 { margin-top: 14px; } .mt-20 { margin-top: 20px; }
.mb-8 { margin-bottom: 8px; } .mb-14 { margin-bottom: 14px; }
.text-2 { color: var(--text-2); } .text-3 { color: var(--text-3); }
.fs-12 { font-size: 12px; } .fs-13 { font-size: 13px; }
.bold { font-weight: 600; }
.mono { font-family: Consolas, Monaco, monospace; }

/* 打印 */
@media print {
  body { background: #fff; }
  .sidebar, .topbar, .toast-wrap, .modal-foot, .no-print { display: none !important; }
  .main { margin-left: 0; }
  .overlay { position: static; background: none; padding: 0; overflow: visible; }
  .modal { box-shadow: none; max-width: none; }
  .modal-body { max-height: none; overflow: visible; padding: 0; }
}

@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); transition: transform .22s; }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; }
  .grid-2, .grid-3, .grid-2-1 { grid-template-columns: 1fr; }
  .col-span-2 { grid-column: span 1; }
  .info-grid { grid-template-columns: 1fr; }
}

/* ==================================================================
   多语言（v2.1）：语言切换按钮 + 缅文字体
   ================================================================== */
.lang-toggle {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 8px;
}
.lang-toggle .lang-btn {
  border: 1px solid var(--line, #d8dde6);
  background: transparent;
  color: var(--text-2, #5a6478);
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  cursor: pointer;
  line-height: 1.4;
  transition: all .15s;
}
.lang-toggle .lang-btn:hover { border-color: var(--brand, #1d4ed8); color: var(--brand, #1d4ed8); }
.lang-toggle .lang-btn.on {
  background: var(--brand, #1d4ed8);
  border-color: var(--brand, #1d4ed8);
  color: #fff;
}
/* 登录页里的切换按钮（浅色卡片上同样适用） */
.login-foot .lang-toggle { justify-content: center; margin-top: 4px; }

/* 缅文模式：追加缅甸字体栈（Myanmar Text = Windows 自带；Noto Sans Myanmar / Padauk = 安卓/浏览器） */
body.lang-my,
body.lang-my button, body.lang-my input, body.lang-my select, body.lang-my textarea,
body.lang-my .tag, body.lang-my .badge, body.lang-my .tbl, body.lang-my .modal {
  font-family: 'Padauk', 'Noto Sans Myanmar', 'Myanmar Text', 'Myanmar3',
               -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}
body.lang-my .nav-item, body.lang-my .stat .lbl, body.lang-my th, body.lang-my label { letter-spacing: 0; }
