/* ============================================================
   物流派单结算 SaaS —— Web 管理后台样式
   设计语言：2026 主流 SaaS（Indigo Aurora）
             · 靛紫渐变强调色 #6366f1 → #8b5cf6
             · 暗色侧边栏 + 亮/暗双主题（localStorage 持久化）
             · Bento 大圆角卡片 / 染色柔影 / 微动效
             · 命令面板（⌘K）/ 快捷键体系
   零依赖、离线可用；所有既有 class 名保持不变，仅视觉层替换
   ============================================================ */
:root {
  /* 品牌色 —— Indigo / Violet 渐变 */
  --primary: #4f46e5;
  --primary-hover: #6366f1;
  --primary-active: #4338ca;
  --primary-soft: #eef2ff;
  --primary-ghost: rgba(99, 102, 241, .12);
  --grad-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --grad-primary-strong: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  /* 语义色（Tailwind 色板，2026 主流） */
  --success: #059669;
  --success-hover: #10b981;
  --success-soft: #ecfdf5;
  --warning: #d97706;
  --warning-soft: #fffbeb;
  --danger: #e11d48;
  --danger-hover: #f43f5e;
  --danger-soft: #fff1f2;
  --info: #64748b;
  --purple: #7c3aed;
  --purple-soft: #f5f3ff;
  /* 中性色 */
  --bg: #f6f7fb;
  --bg-secondary: #eef1f8;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  /* 侧边栏：固定暗色（Linear / Vercel 标志性特征） */
  --sidebar-bg: #0b1220;
  --sidebar-border: rgba(148, 163, 184, .12);
  --sidebar-text: #cbd5e1;
  --sidebar-text-strong: #f1f5f9;
  --sidebar-muted: #64748b;
  --sidebar-hover: rgba(148, 163, 184, .1);
  --sidebar-active-bg: linear-gradient(135deg, rgba(99, 102, 241, .22), rgba(139, 92, 246, .16));
  --text: #0f172a;
  --text-primary: #0f172a;
  --text-main: #0f172a;
  --text-secondary: #64748b;
  --border: rgba(15, 23, 42, .08);
  --border-strong: #cbd5e1;
  /* 阴影 —— 带 Indigo 染色的多层柔影 */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 12px -2px rgba(79, 70, 229, .07);
  --shadow-md: 0 1px 3px rgba(15, 23, 42, .05), 0 12px 28px -6px rgba(79, 70, 229, .14);
  --shadow-lg: 0 2px 6px rgba(15, 23, 42, .05), 0 24px 56px -12px rgba(79, 70, 229, .22);
  --ring: 0 0 0 4px rgba(99, 102, 241, .16);
  /* 圆角 */
  --radius-sm: 10px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  /* 动效 —— 主流标准缓动 */
  --ease: cubic-bezier(.4, 0, .2, 1);
  --dur: .15s;
  /* 顶栏毛玻璃 */
  --glass: saturate(1.8) blur(20px);
}

/* ================= 暗色主题 ================= */
[data-theme="dark"] {
  --primary: #818cf8;
  --primary-hover: #a5b4fc;
  --primary-active: #6366f1;
  --primary-soft: rgba(99, 102, 241, .18);
  --primary-ghost: rgba(129, 140, 248, .14);
  --grad-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  --grad-primary-strong: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  --success: #34d399;
  --success-hover: #6ee7b7;
  --success-soft: rgba(16, 185, 129, .16);
  --warning: #fbbf24;
  --warning-soft: rgba(245, 158, 11, .16);
  --danger: #fb7185;
  --danger-hover: #fda4af;
  --danger-soft: rgba(225, 29, 72, .18);
  --info: #94a3b8;
  --purple: #a78bfa;
  --purple-soft: rgba(124, 58, 237, .2);
  --bg: #0b1220;
  --bg-secondary: #101a2e;
  --surface: #131c31;
  --surface-2: #17223b;
  --sidebar-bg: #0d1526;
  --sidebar-border: rgba(148, 163, 184, .1);
  --sidebar-hover: rgba(148, 163, 184, .09);
  --text: #e2e8f0;
  --text-primary: #e2e8f0;
  --text-main: #e2e8f0;
  --text-secondary: #94a3b8;
  --border: rgba(148, 163, 184, .14);
  --border-strong: #334155;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .28), 0 4px 12px -2px rgba(0, 0, 0, .34);
  --shadow-md: 0 1px 3px rgba(0, 0, 0, .3), 0 12px 28px -6px rgba(0, 0, 0, .45);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .32), 0 24px 56px -12px rgba(0, 0, 0, .6);
  --ring: 0 0 0 4px rgba(129, 140, 248, .22);
  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "PingFang SC", "Helvetica Neue", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: .01em;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

/* 原生控件着色 */
input, select, textarea, button { font-family: inherit; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--primary); }

/* 细滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(100, 116, 139, .35); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(100, 116, 139, .55); }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-corner { background: transparent; }

::selection { background: rgba(99, 102, 241, .26); }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ---------- 登录页 · 左图右表单 ---------- */
.login-wrap {
  position: fixed; inset: 0;
  display: flex;
  background: var(--bg);
  overflow: auto;
}

/* ---- 左侧品牌视觉 ---- */
.login-hero {
  position: relative; isolation: isolate;
  flex: 1 1 auto; min-width: 0;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 56px; overflow: hidden;
}
.login-hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    linear-gradient(160deg, #2a1f72 0%, #1d1a5c 55%, #14123f 100%)
    url("images/login-hero.jpg") center / cover no-repeat;
}
.login-hero-veil {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(135deg, rgba(10, 12, 46, .06) 0%, rgba(10, 12, 46, .48) 46%, rgba(10, 12, 46, .92) 100%),
    radial-gradient(760px 520px at 6% 104%, rgba(139, 92, 246, .26), transparent 62%);
}
.login-hero-top, .login-hero-copy, .login-hero-foot { position: relative; z-index: 2; }

.login-hero-top { display: flex; align-items: center; gap: 12px; }
.login-hero-logo {
  width: 44px; height: 44px; border-radius: 14px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .3);
  backdrop-filter: var(--glass); -webkit-backdrop-filter: var(--glass);
}
.login-hero-logo svg { width: 24px; height: 24px; }
.login-hero-name { color: #fff; font-size: 18px; font-weight: 500; letter-spacing: .02em; }

.login-hero-copy { max-width: 620px; }
.login-hero-eyebrow {
  color: rgba(255, 255, 255, .72); font-size: 13px;
  letter-spacing: .18em; margin-bottom: 18px;
}
.login-hero-title {
  color: #fff; font-size: 42px; line-height: 1.34; font-weight: 700;
  letter-spacing: .01em; margin-bottom: 16px;
}
.login-hero-desc {
  color: rgba(255, 255, 255, .78); font-size: 15px;
  line-height: 1.8; max-width: 520px;
}
.login-hero-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.hero-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 999px;
  font-size: 13px; color: #fff;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .22);
}
.hero-chip svg { width: 14px; height: 14px; flex: 0 0 auto; }
.login-hero-foot { color: rgba(255, 255, 255, .42); font-size: 12px; }

/* ---- 右侧登录表单 ---- */
.login-panel {
  flex: 0 0 680px;
  display: flex; align-items: center; justify-content: center;
  padding: 48px;
  background: var(--surface);
  border-left: 1px solid var(--border);
}
.login-form { width: 384px; max-width: 100%; }
.login-head { margin-bottom: 26px; }
.login-badge {
  width: 52px; height: 52px; border-radius: 16px; margin-bottom: 16px;
  display: flex; align-items: center; justify-content: center;
  background: var(--grad-primary); color: #fff;
  box-shadow: 0 10px 22px -6px rgba(79, 70, 229, .55);
  overflow: hidden;
}
.login-badge svg { width: 24px; height: 24px; }
.login-badge img { width: 52px; height: 52px; border-radius: 16px; object-fit: cover; display: block; }
.login-head h1 { font-size: 26px; font-weight: 700; letter-spacing: .01em; }
.login-head .sub { color: var(--text-secondary); font-size: 14px; margin-top: 6px; }

.login-field { margin-bottom: 16px; }
.login-field > label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 500; }
.login-input {
  display: flex; align-items: center; gap: 10px;
  height: 46px; padding: 0 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}
.login-input:focus-within { background: var(--surface); border-color: var(--primary); box-shadow: var(--ring); }
.login-input > svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--text-secondary); }
.login-input input {
  flex: 1 1 auto; min-width: 0; margin: 0; padding: 0;
  border: 0; background: transparent; outline: none;
  font-size: 14px; color: var(--text);
}
.login-input input::placeholder { color: var(--text-secondary); opacity: .85; }
.login-eye {
  flex: 0 0 auto; display: flex; padding: 2px; border: 0; border-radius: 6px;
  background: transparent; color: var(--text-secondary); cursor: pointer;
}
.login-eye:hover { color: var(--primary); }
.login-eye svg { width: 18px; height: 18px; }

.login-opts {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin: 6px 0 22px; font-size: 13px;
}
.login-remember {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text-secondary); cursor: pointer; user-select: none;
}
.login-remember input { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); cursor: pointer; }
.login-forgot { color: var(--primary); text-decoration: none; cursor: pointer; }
.login-forgot:hover { text-decoration: underline; }

.login-submit {
  width: 100%; justify-content: center; height: 48px;
  font-size: 15px; letter-spacing: .08em;
  box-shadow: 0 10px 24px -6px rgba(79, 70, 229, .45);
}
.login-submit:hover { box-shadow: 0 14px 30px -8px rgba(79, 70, 229, .55); }

.login-hint { margin-top: 20px; }
.login-secure {
  display: flex; align-items: center; gap: 8px;
  color: var(--text-secondary); font-size: 12px;
}
.login-secure svg { width: 14px; height: 14px; flex: 0 0 auto; }
.login-hint .login-backend { color: var(--border-strong); font-size: 11.5px; margin-top: 6px; word-break: break-all; }

/* ---- 登录页响应式 ---- */
@media (max-width: 1180px) { .login-panel { flex: 0 0 560px; } }
@media (max-width: 980px) {
  .login-wrap { flex-direction: column; }
  .login-hero { flex: 0 0 auto; min-height: 280px; padding: 34px 28px; }
  .login-hero-title { font-size: 30px; }
  .login-hero-desc, .login-hero-chips { display: none; }
  .login-panel { flex: 0 0 auto; padding: 40px 24px; border-left: 0; border-top: 1px solid var(--border); }
}
@media (max-width: 560px) {
  .login-hero { min-height: 210px; }
  .login-hero-foot { display: none; }
}

/* ---------- 布局 ---------- */
.layout { display: flex; height: 100vh; }
/* 全屏模式下让布局撑满全屏区域 */
:-webkit-full-screen .layout, :fullscreen .layout { height: 100%; }
.sidebar {
  width: 236px; color: var(--sidebar-text);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  flex-shrink: 0; display: flex; flex-direction: column;
  position: relative;
}
/* 侧边栏顶部极光渐变饰带 */
.sidebar::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 180px;
  background: linear-gradient(180deg, rgba(99, 102, 241, .14), transparent);
  pointer-events: none;
}
.sidebar .brand {
  height: 60px; display: flex; align-items: center; gap: 10px;
  padding: 0 18px; color: var(--sidebar-text-strong); font-weight: 700; font-size: 15.5px;
  letter-spacing: .02em;
  border-bottom: 1px solid var(--sidebar-border);
  position: relative;
}
.sidebar .brand .logo {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--grad-primary); display: flex; align-items: center;
  justify-content: center; font-size: 15px; color: #fff;
  box-shadow: 0 4px 10px -2px rgba(99, 102, 241, .6);
}
.sidebar .menu { flex: 1; overflow-y: auto; padding: 10px 10px 16px; position: relative; }
.menu-group-title {
  padding: 14px 10px 6px; font-size: 11px; font-weight: 600;
  color: var(--sidebar-muted); letter-spacing: .08em;
}
.menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; cursor: pointer; color: var(--sidebar-text);
  font-size: 13.5px; border-radius: var(--radius-sm);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
  margin-bottom: 2px;
}
.menu-item:hover { background: var(--sidebar-hover); color: var(--sidebar-text-strong); }
.menu-item.active {
  background: var(--sidebar-active-bg); color: #fff; font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(129, 140, 248, .22);
}
.menu-item .ico { width: 18px; text-align: center; opacity: .95; font-size: 15px; }

.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.topbar {
  height: 60px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  -webkit-backdrop-filter: var(--glass);
  backdrop-filter: var(--glass);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; flex-shrink: 0; gap: 12px;
}
.topbar .crumb { color: var(--text-secondary); font-size: 13.5px; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .crumb b { color: var(--text); font-weight: 600; }
.topbar .actions { display: flex; align-items: center; gap: 8px; }
.topbar .user { display: flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 6px 10px; border-radius: 980px; transition: background var(--dur) var(--ease); }
.topbar .user:hover { background: var(--primary-ghost); }
.topbar .avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--grad-primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 13px;
  box-shadow: 0 3px 8px -2px rgba(99, 102, 241, .5);
}
.content { flex: 1; overflow-y: auto; padding: 24px 28px 40px; scroll-behavior: smooth; }

/* ---------- 顶栏图标按钮 / 快捷键提示 ---------- */
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; min-width: 34px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text-secondary);
  font-size: 14px; cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.icon-btn:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); }
.icon-btn:active { transform: scale(.96); }
.kbd {
  display: inline-flex; align-items: center; gap: 2px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px; color: var(--text-secondary);
  border: 1px solid var(--border); border-bottom-width: 2px;
  border-radius: 6px; padding: 1px 6px; background: var(--surface-2);
  line-height: 1.6;
}

/* ---------- 命令面板（⌘K，Linear / Vercel 标配） ---------- */
.cmd-mask {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(15, 23, 42, .42);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 14vh; animation: maskIn .14s var(--ease);
}
.cmd-box {
  width: 560px; max-width: 92vw; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); overflow: hidden;
  animation: cmdIn .18s var(--ease);
}
@keyframes cmdIn {
  from { opacity: 0; transform: scale(.98) translateY(-8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.cmd-input-row { display: flex; align-items: center; gap: 10px; padding: 14px 18px;
  border-bottom: 1px solid var(--border); }
.cmd-input-row .cmd-ico { color: var(--text-secondary); font-size: 15px; }
.cmd-input {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: 15px; color: var(--text);
}
.cmd-input::placeholder { color: var(--text-secondary); }
.cmd-list { max-height: 46vh; overflow-y: auto; padding: 8px; }
.cmd-group { padding: 8px 12px 4px; font-size: 11px; font-weight: 700;
  color: var(--text-secondary); letter-spacing: .08em; }
.cmd-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--radius-sm); cursor: pointer;
  font-size: 13.5px; color: var(--text);
}
.cmd-item .ci-ico {
  width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
  background: var(--primary-soft); color: var(--primary);
}
.cmd-item .ci-body { flex: 1; min-width: 0; }
.cmd-item .ci-title { font-weight: 500; }
.cmd-item .ci-sub { font-size: 12px; color: var(--text-secondary); margin-top: 1px; }
.cmd-item .ci-enter { color: var(--text-secondary); opacity: 0; flex-shrink: 0; }
.cmd-item.active { background: var(--grad-primary); color: #fff; }
.cmd-item.active .ci-ico { background: rgba(255, 255, 255, .2); color: #fff; }
.cmd-item.active .ci-sub { color: rgba(255, 255, 255, .75); }
.cmd-item.active .ci-enter { opacity: .85; color: #fff; }
.cmd-foot {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 18px; border-top: 1px solid var(--border);
  font-size: 12px; color: var(--text-secondary);
}
.cmd-empty { padding: 36px 20px; text-align: center; color: var(--text-secondary); font-size: 13px; }

/* ---------- 骨架屏（加载态） ---------- */
.skeleton {
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--surface-2) 50%, var(--bg-secondary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite linear;
  color: transparent !important;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- 通用组件 ---------- */
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 4px; letter-spacing: .02em; }
.page-desc { color: var(--text-secondary); margin-bottom: 18px; font-size: 13px; }
.card {
  background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); padding: 22px; margin-bottom: 18px;
  border: 1px solid var(--border);
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.card-title { font-size: 15px; font-weight: 700; margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px; letter-spacing: .02em; }
.card-title .bar { width: 4px; height: 15px; border-radius: 2px; background: var(--grad-primary); }

.kv-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 18px; }
.kv-grid > div { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.kv-grid .muted { font-size: 12px; }

/* Bento 统计卡片 */
.grid-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
.stat {
  background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); padding: 20px;
  position: relative; overflow: hidden;
  border: 1px solid var(--border);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat .label { color: var(--text-secondary); font-size: 12.5px; }
.stat .value { font-size: 27px; font-weight: 700; margin-top: 8px;
  font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.stat .delta { font-size: 12px; margin-top: 6px; }
.stat .icon {
  position: absolute; right: 16px; top: 16px; width: 42px; height: 42px;
  border-radius: var(--radius); display: flex; align-items: center;
  justify-content: center; font-size: 19px;
}
.stat.blue .icon { background: var(--grad-primary); color: #fff; box-shadow: 0 6px 14px -4px rgba(99, 102, 241, .5); }
.stat.green .icon { background: linear-gradient(135deg, #34d399, #059669); color: #fff; box-shadow: 0 6px 14px -4px rgba(5, 150, 105, .45); }
.stat.orange .icon { background: linear-gradient(135deg, #fbbf24, #d97706); color: #fff; box-shadow: 0 6px 14px -4px rgba(217, 119, 6, .45); }
.stat.red .icon { background: linear-gradient(135deg, #fb7185, #e11d48); color: #fff; box-shadow: 0 6px 14px -4px rgba(225, 29, 72, .45); }
.stat.purple .icon { background: linear-gradient(135deg, #a78bfa, #7c3aed); color: #fff; box-shadow: 0 6px 14px -4px rgba(124, 58, 237, .45); }
.stat.gray .icon { background: linear-gradient(135deg, #94a3b8, #64748b); color: #fff; }
.stat.blue .value { color: var(--primary); }
.stat.green .value { color: var(--success); }
.stat.orange .value { color: var(--warning); }
.stat.red .value { color: var(--danger); }
.stat.purple .value { color: var(--purple); }
.stat.gray .value { color: var(--info); }
.up { color: var(--success); }
.down { color: var(--danger); }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  padding: 8px 16px; border-radius: var(--radius-sm); cursor: pointer;
  font-size: 13.5px; font-weight: 500; line-height: 1.35;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
    border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
    transform var(--dur) var(--ease), filter var(--dur) var(--ease);
  box-shadow: var(--shadow-xs);
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--grad-primary); border-color: transparent; color: #fff; }
.btn.primary:hover { filter: brightness(1.08); box-shadow: 0 6px 16px -4px rgba(99, 102, 241, .5); color: #fff; }
.btn.success { background: var(--success); border-color: var(--success); color: #fff; }
.btn.success:hover { filter: brightness(1.08); box-shadow: 0 6px 16px -4px rgba(5, 150, 105, .4); color: #fff; }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger:hover { filter: brightness(1.08); box-shadow: 0 6px 16px -4px rgba(225, 29, 72, .4); color: #fff; }
.btn.sm { padding: 5px 12px; font-size: 12.5px; border-radius: 9px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* ---------- 表格行「更多 ▾」操作菜单 ----------
 * 行内操作超过 3 个时，把低频/危险操作收进下拉，保持操作列紧凑；
 * 下拉绝对定位（.card/.table 均无 overflow 裁剪），点菜单外或 Esc 关闭 */
.row-more { position: relative; display: inline-block; }
.row-more > .btn .caret { font-size: 9px; line-height: 1; }
.row-more-menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 200;
  min-width: 128px; padding: 4px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-md);
  display: flex; flex-direction: column;
  animation: modalIn .16s var(--ease);
}
.row-more-menu[hidden] { display: none; }
.row-more-menu .rmi {
  padding: 7px 10px; font-size: 12.5px; line-height: 1.4; text-align: left;
  border: none; border-radius: 7px; background: transparent; color: var(--text);
  cursor: pointer; white-space: nowrap;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.row-more-menu .rmi:hover { background: var(--primary-ghost); color: var(--primary); }
.row-more-menu .rmi.danger { color: var(--danger); }
.row-more-menu .rmi.danger:hover { background: var(--danger-soft); color: var(--danger); }
.row-more-menu .rmi-sep { height: 1px; margin: 4px 6px; background: var(--border); flex: none; }

.input, select, textarea {
  width: 100%; border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 9px 12px; font-size: 14px; color: var(--text);
  background: var(--bg-secondary); outline: none;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}
.input:hover, select:hover, textarea:hover { border-color: var(--border-strong); }
.input:focus, select:focus, textarea:focus {
  background: var(--surface); border-color: var(--primary);
  box-shadow: var(--ring);
}
.input::placeholder, textarea::placeholder { color: var(--text-secondary); opacity: .8; }
.input:disabled, select:disabled, textarea:disabled { opacity: .55; }
select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2364748b' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 32px; cursor: pointer;
}
textarea { resize: vertical; min-height: 80px; }

.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th, .table td { padding: 11px 14px; text-align: left;
  border-bottom: 1px solid var(--border); }
.table th { color: var(--text-secondary); font-weight: 600; white-space: nowrap; font-size: 12.5px; }
.table tbody tr { transition: background var(--dur) var(--ease); }
.table tbody tr:hover { background: var(--primary-ghost); }
/* 待审核行（小程序新注册司机）——左侧琥珀色标记条 + 浅底色 */
.table tbody tr.row-pending { background: color-mix(in srgb, var(--warning) 7%, transparent); }
.table tbody tr.row-pending:hover { background: color-mix(in srgb, var(--warning) 12%, transparent); }
.table tbody tr.row-pending td:first-child { box-shadow: inset 3px 0 0 var(--warning); }
/* 表格合计行（司机管理：未结算 / 已结算金额） */
.table tbody tr.row-total td {
  background: var(--bg-soft, #FAFBFC);
  font-weight: 600;
  border-top: 2px solid var(--border);
}
.table tbody tr.row-total:hover td { background: var(--bg-soft, #FAFBFC); }
/* 新司机注册弹窗「去审核」跳转后：目标行高亮闪烁几下 */
@keyframes rowFlash {
  0%, 100% { background-color: transparent; }
  50% { background-color: color-mix(in srgb, var(--primary) 22%, transparent); }
}
.table tbody tr.row-flash { animation: rowFlash 0.7s ease-in-out 3; }
.table tbody tr.row-flash td:first-child { box-shadow: inset 3px 0 0 var(--primary); }
.table tbody tr:last-child td { border-bottom: none; }
.table .num { font-variant-numeric: tabular-nums; text-align: right; }

.tag {
  display: inline-block; padding: 2px 10px; border-radius: 980px;
  font-size: 11.5px; font-weight: 600; line-height: 1.7;
  letter-spacing: .02em;
}
.tag.primary { background: var(--primary-soft); color: var(--primary); }
.tag.success { background: var(--success-soft); color: var(--success); }
.tag.warning { background: var(--warning-soft); color: var(--warning); }
.tag.danger  { background: var(--danger-soft); color: var(--danger); }
.tag.info    { background: var(--bg-secondary); color: var(--info); }
.tag.gray    { background: var(--bg-secondary); color: var(--info); }
.tag.purple  { background: var(--purple-soft); color: var(--purple); }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; align-items: center; }
.toolbar .input, .toolbar select { width: auto; min-width: 140px; }
.toolbar .spacer { flex: 1; }

.row { display: flex; gap: 16px; flex-wrap: wrap; }
.col { flex: 1; min-width: 240px; }

.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 6px; color: var(--text-secondary); font-size: 12.5px; font-weight: 500; }
.field-hint { margin: -2px 0 0; font-size: 12px; line-height: 1.5; color: var(--text-secondary); }
.req::before { content: "*"; color: var(--danger); margin-right: 4px; }
/* 弹窗表单两列栅格（经营收支等新增/编辑弹窗复用） */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }

.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .42);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; z-index: 1000;
  animation: maskIn .16s var(--ease);
}
@keyframes maskIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn {
  from { opacity: 0; transform: scale(.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal {
  background: var(--surface); border-radius: var(--radius-lg); width: 620px; max-width: 92vw;
  max-height: 88vh; overflow: auto; box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  animation: modalIn .22s var(--ease);
}
.modal-head { padding: 18px 22px; border-bottom: 1px solid var(--border);
  font-size: 16px; font-weight: 700; letter-spacing: .02em; }
.modal-body { padding: 22px; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 10px; }

/* 新司机注册弹窗：司机信息速览 */
.drv-reg-info { display: flex; flex-direction: column; gap: 8px; }
.drv-reg-row { display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px; background: var(--bg-secondary); border-radius: var(--radius-sm); font-size: 14px; }
.drv-reg-row span { color: var(--text-secondary); }
.drv-reg-row b { color: var(--text-main); }

.checkbox { display: flex; align-items: center; gap: 8px; padding: 8px 0; cursor: pointer; }
.checkbox input { width: 16px; height: 16px; }

.dispatch-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.order-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow-xs);
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease),
    border-color var(--dur) var(--ease);
}
.order-card:hover { border-color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.order-card .oc-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.order-card .oc-no { font-weight: 700; font-size: 14.5px; }
.order-card .oc-row { display: flex; justify-content: space-between; color: var(--text-secondary); font-size: 12.5px; padding: 3px 0; }
.order-card .oc-actions { margin-top: 12px; }

.money { font-variant-numeric: tabular-nums; }
.money.pos { color: var(--success); font-weight: 600; }
.money.neg { color: var(--danger); font-weight: 600; }

.dl { display: grid; grid-template-columns: 130px 1fr; gap: 10px 16px; }
.dl dt { color: var(--text-secondary); }
.dl dd { font-weight: 600; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.tab { padding: 10px 18px; cursor: pointer; color: var(--text-secondary);
  border-bottom: 2px solid transparent; font-size: 13.5px;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

.empty { text-align: center; color: var(--text-secondary); padding: 44px 40px; font-size: 13.5px; }
.bar-chart { display: flex; align-items: flex-end; gap: 14px; height: 200px; padding: 10px 0; }
.bar-chart .bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.bar-chart .bar { width: 62%; border-radius: 8px 8px 2px 2px; background: var(--grad-primary); }
.bar-chart .bar-label { font-size: 12px; color: var(--text-secondary); }
.bar-chart .bar-val { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }

.flex-between { display: flex; justify-content: space-between; align-items: center; }
.mt { margin-top: 16px; }
.mb { margin-bottom: 16px; }
.muted { color: var(--text-secondary); }
.right { text-align: right; }

/* ---- 等宽字体 / 单元格不换行 ---- */
.mono { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace; font-size: 13px; }
.nowrap { white-space: nowrap; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
td.money, th.money { text-align: right; }

.driver-opt:hover { border-color: var(--primary) !important; background: var(--primary-ghost) !important; }
.driver-opt input { margin-top: 3px; }

/* ---- 后端离线引导面板 ---- */
.offline-panel {
  margin-top: 14px; padding: 14px 16px; border: 1px solid var(--danger); border-radius: var(--radius);
  background: var(--danger-soft); text-align: left; animation: toastIn .22s ease;
}
.offline-panel .offline-icon { font-size: 22px; color: var(--danger); }
.offline-panel h3 { margin: 4px 0 6px; font-size: 14px; color: var(--danger); }
.offline-panel p { margin: 0 0 8px; font-size: 12px; }
.offline-panel .mono { font-size: 11px; word-break: break-all; }
.offline-steps { margin: 0 0 10px; padding-left: 18px; font-size: 12px; color: var(--text-secondary); line-height: 2; }
.offline-actions { display: flex; gap: 8px; }
.offline-actions .btn { flex: 1; justify-content: center; padding: 8px; font-size: 12px; }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- 批量新建托运单 ---- */
.batch-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; max-width: 980px; margin-bottom: 14px;
  padding: 12px 16px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
}
.batch-bar-info { font-size: 14px; color: var(--text-secondary); }
.batch-bar-info b { color: var(--text-main); font-size: 16px; }
.batch-bar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.batch-bar-actions .btn { white-space: nowrap; }
/* 批量新增：数量输入框 */
.batch-qty { display: flex; align-items: center; gap: 6px; }
.batch-qty-label { font-size: 14px; color: var(--text-secondary); white-space: nowrap; }
.batch-qty .input {
  width: 64px; text-align: center; padding: 7px 6px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface); color: var(--text-main); font-size: 14px;
}
/* 每张卡片底部操作区（右下角）：新增一张 + 提交全部 */
.waybill-card-foot {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  flex-wrap: wrap; margin-top: 16px; padding-top: 14px;
  border-top: 1px dashed var(--border-strong);
}
/* 提交是主操作：给它一点视觉重量，避免和「新增一张」混成一片 */
.waybill-card-foot .btn.primary { min-width: 132px; justify-content: center; }

/* ===== 运单附件（随车资料）===== */
.att-box {
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface-2);
}
.att-empty { color: var(--text-secondary); font-size: 13px; padding: 2px 0 8px; }
.att-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.att-item + .att-item { margin-top: 6px; }
/* 图标用固定宽度色块，长文件名才不会把按钮挤出去 */
.att-icon {
  flex: 0 0 auto; width: 34px; height: 24px; border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; letter-spacing: .2px;
  color: #fff; background: var(--text-secondary);
}
.att-icon.pdf   { background: #dc2626; }
.att-icon.doc   { background: #2563eb; }
.att-icon.xls   { background: #16a34a; }
.att-icon.ppt   { background: #ea580c; }
.att-icon.img   { background: #7c3aed; }
.att-icon.other { background: #64748b; }
/* 文件名占满剩余空间并省略号截断，避免长名把「查看/删除」顶到换行 */
.att-name {
  flex: 1 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 13px; color: var(--text-primary);
}
.att-size { flex: 0 0 auto; font-size: 12px; color: var(--text-secondary); }
.att-item .btn { flex: 0 0 auto; }
.att-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.att-tip { font-size: 12px; color: var(--text-secondary); }
.att-hint { font-size: 12px; color: var(--text-secondary); margin-top: 6px; }
/* 多卡片时下拉卡片间距；单张时不额外加留白 */
#batch-cards .waybill-card + .waybill-card { margin-top: 18px; }
.waybill-card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: -6px 0 12px;
}
.waybill-card-no {
  font-size: 13px; font-weight: 600; color: var(--surface);
  background: var(--primary, #2f6fed); border-radius: 999px; padding: 2px 12px;
}
.btn.danger-ghost {
  color: var(--danger); border-color: var(--danger); background: transparent;
}
.btn.danger-ghost:hover { background: var(--danger); color: #fff; }

/* ---- 托运单表单样式 ---- */
.waybill-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 22px 24px; box-shadow: var(--shadow-sm); max-width: 980px;
}
.waybill-title {
  text-align: center; font-size: 24px; font-weight: 700; letter-spacing: 8px;
  margin-bottom: 20px; padding-bottom: 12px; border-bottom: 2px solid var(--text-main);
}
.wb-row { display: flex; gap: 16px; margin-bottom: 14px; align-items: flex-end; }
.wb-field { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.wb-half { flex: 0 0 calc(50% - 8px); }
.wb-2col .wb-field { flex: 0 0 calc(50% - 8px); }
.wb-3col .wb-field { flex: 0 0 calc(33.333% - 11px); }
.wb-4col .wb-field { flex: 0 0 calc(25% - 12px); }
.wb-field label { font-size: 13px; color: var(--text-secondary); font-weight: 500; }
.wb-field label.req::after { content: " *"; color: var(--danger); }
.wb-field .input, .wb-field select, .wb-field textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; background: var(--surface); color: var(--text-main);
}
.wb-field textarea { resize: vertical; font-family: inherit; }
.wb-field .input:disabled { background: var(--bg-secondary); color: var(--text-secondary); }
.wb-val { padding: 8px 0; font-size: 14px; color: var(--text-main); font-weight: 600; min-height: 34px; }
.wb-notes { padding: 10px 12px; background: var(--bg-secondary); border-radius: var(--radius-sm);
  font-size: 13px; line-height: 1.7; color: var(--text-secondary); min-height: 48px; }
.waybill-table { width: 100%; border-collapse: collapse; margin: 6px 0 18px; }
.waybill-table th, .waybill-table td { border: 1px solid var(--border); padding: 6px; text-align: center; }
.waybill-table th { background: var(--bg-secondary); font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.waybill-table td .input { border: none; padding: 7px 4px; text-align: center; background: transparent; }
.waybill-table td select.input { appearance: auto; padding-right: 20px; }
.wb-meta { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 18px; padding-top: 14px;
  border-top: 1px dashed var(--border-strong); font-size: 12px; color: var(--text-secondary); }
.waybill-edit { padding: 4px 8px !important; font-size: 13px !important; }
@media (max-width: 860px) {
  .wb-row { flex-direction: column; gap: 10px; align-items: stretch; }
  .wb-half, .wb-2col .wb-field, .wb-3col .wb-field, .wb-4col .wb-field { flex: 1 1 auto; }
  .wb-4col { display: grid; grid-template-columns: 1fr 1fr; }
}

/* ---------- 组合框：下拉选择 + 手工输入 + 新建按钮 ---------- */
.combo { display: flex; align-items: stretch; gap: 8px; }
.combo .input { flex: 1 1 auto; min-width: 0; }
.combo .btn.sm {
  flex: 0 0 auto; white-space: nowrap; padding: 0 12px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
}
.wb-field .combo .input { height: 38px; }

/* ---------- 人工附加费列表 ---------- */
.fee-list { margin-top: 4px; }
.fee-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 8px; background: var(--bg-secondary);
}
.fee-main { display: flex; flex-direction: column; gap: 2px; }
.fee-main .money { font-size: 14px; }
.fee-side { display: flex; align-items: center; gap: 8px; }

/* ---------- 路线进度条 ---------- */
.route-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 4px 18px; border-bottom: 1px solid var(--border); margin-bottom: 16px;
}
.route-end {
  font-weight: 600; font-size: 13px; padding: 6px 12px; border-radius: 980px;
  background: var(--primary-soft); color: var(--primary); white-space: nowrap;
  max-width: 220px; overflow: hidden; text-overflow: ellipsis;
}
.route-steps { display: flex; align-items: center; flex: 1 1 auto; }
.route-node { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 56px; }
.route-dot {
  width: 28px; height: 28px; border-radius: 50%; background: var(--bg-secondary); color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700;
  transition: background var(--dur) var(--ease);
}
.route-node.on .route-dot { background: var(--grad-primary); color: #fff; }
.route-label { font-size: 12px; color: var(--text-secondary); }
.route-node.on .route-label { color: var(--primary); font-weight: 600; }
.route-line { flex: 1 1 auto; height: 3px; background: var(--bg-secondary); min-width: 24px; border-radius: 2px; }
.route-line.on { background: var(--primary); }

/* ---------- 轨迹时间轴 ---------- */
.timeline { position: relative; padding-left: 8px; }
.tl-item { display: flex; gap: 14px; padding: 10px 0; position: relative; }
.tl-item::before {
  content: ""; position: absolute; left: 19px; top: 40px; bottom: -10px;
  width: 2px; background: var(--border);
}
.tl-item:last-child::before { display: none; }
.tl-ico {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 17px;
  background: var(--primary-soft); z-index: 1;
}
.tl-ico.blue, .tl-ico.primary { background: var(--primary-soft); }
.tl-ico.info { background: var(--primary-ghost); }
.tl-ico.success { background: var(--success-soft); }
.tl-ico.orange { background: var(--warning-soft); }
.tl-ico.purple { background: var(--purple-soft); }
.tl-ico.gray { background: var(--bg-secondary); }
.tl-body { flex: 1 1 auto; padding-top: 2px; }
.tl-title { font-weight: 700; font-size: 13.5px; display: flex; justify-content: space-between; gap: 12px; }
.tl-time { font-weight: 400; font-size: 12px; color: var(--text-secondary); white-space: nowrap; }
.tl-loc { font-size: 13px; margin-top: 2px; }
.tl-note { font-size: 13px; margin-top: 2px; }

/* ---------- 通用网格：日期区间 + 分页 ---------- */
.gf-date { display: inline-flex; align-items: center; gap: 6px; }
.gf-date label { font-size: 13px; color: var(--text-secondary); }
.gf-date .input { width: auto; padding: 7px 10px; }
.gf-quick { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.gf-quick .btn.ghost { padding: 6px 10px; font-size: 13px; }
/* 结算 / 报表页：整年快捷下拉（与快捷按钮同排，宽度自适应） */
.fin-year { width: auto; padding: 6px 8px; font-size: 13px; }
.grid-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 4px 2px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-secondary); }
.grid-pager .pager-btns { display: inline-flex; gap: 8px; }
.grid-pager .btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- 单据子页签（明细表 / 汇总表） ---------- */
.tabbar { display: inline-flex; gap: 4px; margin: 2px 0 12px; background: var(--bg-secondary);
  padding: 4px; border-radius: 12px; }
.tabbar .tab { border: none; background: transparent; color: var(--text-secondary);
  padding: 7px 16px; border-radius: 9px; cursor: pointer; font-size: 13px; font-weight: 500;
  transition: all var(--dur) var(--ease); }
.tabbar .tab:hover { color: var(--text); }
.tabbar .tab.active { background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-xs); font-weight: 600; }
.table .total-row { background: var(--bg-secondary); font-weight: 700; }
.table .total-row td { border-top: 2px solid var(--border-strong); }

/* 应收账目：未录客户运费的提示条 / 行高亮 / 补录弹窗输入框 */
.recv-alert {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  margin-top: 12px; padding: 12px 16px; border-radius: var(--radius-md, 10px);
  background: var(--warning-soft); border: 1px solid var(--warning);
}
.recv-alert-main { display: flex; align-items: flex-start; gap: 10px; }
.recv-alert-ico { font-size: 18px; line-height: 1.2; color: var(--warning); }
.recv-alert-sub { margin-top: 3px; font-size: 12.5px; line-height: 1.55; color: var(--text-secondary); }
.recv-alert-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.table tr.row-warn td { background: var(--warning-soft); }
.wbf-tip { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--bg-secondary);
  font-size: 12.5px; line-height: 1.6; color: var(--text-secondary); }
.wbf-input { max-width: 130px; text-align: right; }
.danger-text { color: var(--danger); }

/* ---------- 经营分析报表 ---------- */
.page-desc { color: var(--text-secondary); font-size: 13px; margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* 数据查询范围提示条：后台按角色限制运单可查月数时，在列表上方告知口径 */
.scope-tip {
  margin: -6px 0 16px; padding: 10px 14px; border-radius: 10px;
  background: var(--warning-soft); border: 1px solid rgba(217, 119, 6, .28);
  color: #92400e; font-size: 12.5px; line-height: 1.6;
  display: flex; align-items: flex-start; gap: 8px;
}
.scope-tip::before { content: "!"; flex: 0 0 16px; height: 16px; margin-top: 1px;
  border-radius: 50%; background: var(--warning); color: #fff; font-weight: 700;
  font-size: 11px; line-height: 16px; text-align: center; }
.page-desc .spacer { flex: 1; }
.legend { display: flex; gap: 18px; margin-top: 12px; flex-wrap: wrap; }
.lg-item { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-secondary); }
.lg-item i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.donut-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.donut { flex-shrink: 0; }
.donut-legend { display: flex; flex-direction: column; gap: 8px; }
.sub-title { font-size: 12.5px; font-weight: 700; color: var(--text-secondary);
  margin: 14px 0 10px; letter-spacing: .03em; }
.hbar-list { display: flex; flex-direction: column; gap: 10px; }
.hbar-row { display: flex; align-items: center; gap: 10px; }
.hbar-label { width: 64px; font-size: 13px; color: var(--text); flex-shrink: 0; }
.hbar-track { flex: 1; height: 12px; background: var(--bg-secondary); border-radius: 980px; overflow: hidden; }
.hbar-fill { height: 100%; border-radius: 980px; transition: width .3s var(--ease); }
.hbar-val { width: 110px; text-align: right; font-size: 13px;
  font-variant-numeric: tabular-nums; color: var(--text-secondary); flex-shrink: 0; }
.table.compact th, .table.compact td { padding: 8px 10px; font-size: 13px; }

/* ---------- 订单列表勾选列 ---------- */
.col-sel { width: 38px; text-align: center; }
.table td.col-sel { text-align: center; }
.table th.col-sel input, .table td.col-sel input { width: 16px; height: 16px; cursor: pointer; }

/* ---------- 运单打印 ---------- */
.print-toolbar {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 16px; position: sticky; top: 0; z-index: 5;
  box-shadow: var(--shadow-xs);
}
.print-toolbar .spacer { flex: 1; }
.print-area { background: var(--surface); }
.print-sheet {
  width: 210mm; max-width: 100%; margin: 0 auto 14px; padding: 12mm 14mm;
  background: #ffffff; box-shadow: var(--shadow-sm); box-sizing: border-box;
  font-size: 12.5px; color: #1e293b; line-height: 1.5;
}
.ps-head { text-align: center; border-bottom: 2px solid #1e293b; padding-bottom: 10px; margin-bottom: 12px; }
.ps-company { font-size: 16px; font-weight: 700; letter-spacing: 1px; }
.ps-title { font-size: 19px; font-weight: 700; margin: 4px 0 8px; letter-spacing: 6px; }
.ps-meta { display: flex; justify-content: space-between; font-size: 12px; color: #475569; }
.ps-table { width: 100%; border-collapse: collapse; margin-bottom: 10px; }
.ps-table th, .ps-table td { border: 1px solid #cbd5e1; padding: 5px 8px; text-align: left; vertical-align: middle; }
.ps-table th { background: #f1f5f9; font-weight: 600; width: 76px; white-space: nowrap; color: #334155; }
.ps-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.ps-table.ps-fee th, .ps-table.ps-fee td { padding: 4px 8px; }
.ps-strong td { background: #eff6ff; font-weight: 700; }
.ps-sub { font-size: 13px; font-weight: 700; color: #1e293b; margin: 6px 0 6px;
  padding-left: 8px; border-left: 3px solid #4f46e5; }
.ps-notes { border: 1px dashed #cbd5e1; border-radius: 6px; padding: 8px 10px;
  min-height: 34px; margin-bottom: 10px; white-space: pre-wrap; }
.ps-sign { width: 100%; border-collapse: collapse; margin-top: 12px; }
.ps-sign td { border: 1px solid #cbd5e1; height: 64px; padding: 8px;
  vertical-align: bottom; font-size: 12px; color: #475569; width: 33.33%; }
.ps-foot { margin-top: 14px; text-align: center; font-size: 11px; color: #94a3b8;
  border-top: 1px solid #e2e8f0; padding-top: 6px; }
.print-page-break { page-break-after: always; }

/* 打印工具栏：格式选择 + 内容模块选择 */
.print-toolbar { flex-wrap: wrap; }
.pf-label { font-size: 12.5px; color: var(--muted, #64748b); }
.pf-modules { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center;
  border: 1px solid var(--border); border-radius: 10px; padding: 6px 10px; }
.ck-inline { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px;
  cursor: pointer; white-space: nowrap; color: var(--text); }
.ck-inline input { width: 14px; height: 14px; }

/* 纸张格式：屏幕预览宽度（打印尺寸由动态 @page 决定） */
.print-area.pf-a4 .print-sheet { width: 210mm; }
.print-area.pf-a4l .print-sheet { width: 297mm; }
.print-area.pf-a5 .print-sheet { width: 148mm; }
.print-area.pf-dot .print-sheet { width: 241mm; font-size: 11px; padding: 4mm 6mm; }
.print-area.pf-dot .ps-title { font-size: 15px; letter-spacing: 3px; }
.print-area.pf-dot .ps-table th, .print-area.pf-dot .ps-table td { padding: 2px 5px; }
.print-area.pf-dot .ps-sign td { height: 46px; }

/* 打印时：只隐藏界面外壳（侧边栏 / 顶栏 / 标签栏 / 工具栏 / 弹窗），但「必须保留」内容区。
   注意：绝不能把 .layout 设为 display:none —— 打印纸（.main > .content > .print-area）全部位于
   .layout 内部，一旦 .layout 被隐藏会连同打印纸一起消失，导致打印 / 打印预览空白。 */
@media print {
  @page { size: A4; margin: 0; }
  body { background: #fff; }
  .sidebar, .topbar, .tabsbar, .no-print, .modal-mask, .dtp-mask, .print-toolbar, .cmd-mask { display: none !important; }
  .layout { display: block !important; height: auto !important; overflow: visible !important; }
  .main { display: block !important; overflow: visible !important; margin: 0 !important; padding: 0 !important; }
  .content { display: block !important; overflow: visible !important; margin: 0 !important; padding: 0 !important; box-shadow: none !important; }
  .print-sheet { box-shadow: none; margin: 0; width: 100%; max-width: none; background: #fff; color: #1e293b; }
  .print-page-break { page-break-after: always; }
}
/* 屏幕预览：让打印纸在内容区可横向滚动（A4 横向 / 针式三等分较宽），避免被裁剪 */
.print-area { overflow-x: auto; padding: 8px 0 24px; }


/* ---------- 公司 Logo（登录页 / 顶部品牌） ---------- */
.brand-logo-img { width: 30px; height: 30px; border-radius: 9px; object-fit: cover; display: block; }
.ps-logo { max-height: 38px; max-width: 160px; vertical-align: middle; margin-right: 10px; }

/* ---------- 公司资料页 ---------- */
.company-head {
  display: flex; align-items: center; gap: 16px;
  padding: 16px; background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 16px;
}
.company-logo-preview {
  width: 64px; height: 64px; border-radius: var(--radius); overflow: hidden; flex-shrink: 0;
  background: var(--bg-secondary); display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); font-size: 12px; text-align: center;
}
.company-logo-preview.empty { border: 1px dashed var(--border-strong); }
.company-logo-preview img { width: 100%; height: 100%; object-fit: cover; }
.company-meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.company-name { font-size: 18px; font-weight: 700; color: var(--text); }

/* ---------- 角色权限多选 / 数据清除勾选 ---------- */
.perm-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 14px; }
.perm-item { display: flex; align-items: center; gap: 7px; font-size: 13px; cursor: pointer; }
.perm-item input { width: 15px; height: 15px; }
.ck { display: flex; align-items: center; gap: 9px; padding: 9px 4px; font-size: 14px;
  cursor: pointer; border-bottom: 1px dashed var(--border); }
.ck:last-child { border-bottom: none; }
.ck input { width: 16px; height: 16px; }

/* ---------- 双端细分权限矩阵 ---------- */
.perm-matrix { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.pm-row { display: flex; align-items: center; gap: 14px; padding: 9px 12px;
  border-bottom: 1px solid var(--border); }
.pm-row:last-child { border-bottom: none; }
.pm-row:nth-child(odd) { background: var(--primary-ghost, rgba(0,0,0,.015)); }
.pm-res { flex: 0 0 132px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.pm-res .pm-all { font-size: 11px; color: var(--primary); text-decoration: none; }
.pm-acts { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.pm-act { display: flex; align-items: center; gap: 5px; font-size: 12.5px; cursor: pointer;
  color: var(--text); white-space: nowrap; }
.pm-act input { width: 14px; height: 14px; }

/* ---------- 顶部多标签页签 ---------- */
.tabsbar {
  height: 42px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  -webkit-backdrop-filter: var(--glass);
  backdrop-filter: var(--glass);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 12px; flex-shrink: 0; gap: 8px;
}
.tabsbar .tabs-strip {
  flex: 1; display: flex; align-items: center; gap: 6px;
  overflow-x: auto; min-width: 0; scrollbar-width: none;
}
.tabsbar .tabs-strip::-webkit-scrollbar { height: 0; }
.tabsbar .tabs-empty { font-size: 12px; color: var(--text-secondary); }
.tab-item {
  display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 8px 0 14px;
  font-size: 13px; color: var(--text-secondary); background: var(--bg-secondary);
  border: 1px solid transparent; border-radius: 980px; cursor: pointer; white-space: nowrap;
  user-select: none; max-width: 210px; flex-shrink: 0;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}
.tab-item:hover { background: var(--primary-ghost); color: var(--text); }
.tab-item.active { background: var(--surface); color: var(--text); font-weight: 600;
  box-shadow: var(--shadow-xs); border-color: var(--border); }
.tab-item .tab-label { overflow: hidden; text-overflow: ellipsis; }
.tab-item .tab-close {
  width: 17px; height: 17px; line-height: 15px; text-align: center; border-radius: 50%;
  font-size: 13px; color: var(--text-secondary); flex-shrink: 0; transition: all var(--dur) var(--ease);
}
.tab-item .tab-close:hover { background: var(--danger-soft); color: var(--danger); }
.tabsbar .tabs-actions { display: flex; align-items: center; gap: 2px; }
.tabsbar .icon-btn {
  width: 26px; height: 26px; border: none; border-radius: 8px; background: transparent;
  color: var(--text-secondary); font-size: 15px; cursor: pointer; line-height: 1;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.tabsbar .icon-btn:hover { background: var(--primary-ghost); color: var(--primary); }
.tab-ctx-menu {
  position: fixed; z-index: 3000; background: var(--surface);
  -webkit-backdrop-filter: var(--glass);
  backdrop-filter: var(--glass);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-md); padding: 4px; min-width: 132px;
  animation: modalIn .16s var(--ease);
}
.tab-ctx-menu .mi { padding: 7px 12px; font-size: 13px; border-radius: var(--radius-sm);
  cursor: pointer; color: var(--text); }
.tab-ctx-menu .mi:hover { background: var(--grad-primary); color: #fff; }

/* ============== 日期时间弹窗选择器 ============== */
.dtp-mask { position: fixed; inset: 0; background: rgba(15, 23, 42, .42); z-index: 960;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  animation: maskIn .16s var(--ease); }
.dtp-box { background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); width: 300px; padding: 16px;
  border: 1px solid var(--border);
  animation: modalIn .22s var(--ease); }
.dtp-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.dtp-head b { font-size: 15px; color: var(--text); font-weight: 700; }
.dtp-weeks, .dtp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.dtp-weeks span { text-align: center; font-size: 12px; color: var(--text-secondary); padding: 4px 0; }
.dtp-cell { text-align: center; padding: 7px 0; font-size: 13px; border-radius: var(--radius-sm);
  cursor: pointer; color: var(--text); user-select: none;
  transition: background var(--dur) var(--ease); }
.dtp-cell:hover { background: var(--bg-secondary); }
.dtp-cell.blank { cursor: default; }
.dtp-cell.blank:hover { background: none; }
.dtp-cell.today { color: var(--primary); font-weight: 700; }
.dtp-cell.sel { background: var(--grad-primary); color: #fff; font-weight: 600; }
.dtp-time { display: flex; align-items: center; gap: 6px; margin-top: 10px;
  padding-top: 10px; border-top: 1px dashed var(--border-strong); }
.dtp-time label { font-size: 13px; color: var(--text-secondary); }
.dtp-time .input { width: 58px; text-align: center; }
.dtp-actions { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.dtp-actions .spacer { flex: 1; }

/* ---- 司机档案详情（只读） ---- */
.ro-sub {
  margin: 18px 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
}
.ro-sub:first-child { margin-top: 0; }
.field.ro-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.field.ro-field label { margin: 0; }
.ro-val {
  font-size: 13px;
  color: var(--text);
  text-align: right;
  word-break: break-all;
}

/* ---- 运单详情：驾驶凭证照片（司机端上传） ---- */
.photo-group { margin-top: 14px; }
.photo-group:first-of-type { margin-top: 6px; }
.photo-group-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.photo-group-label { font-size: 13px; font-weight: 600; color: var(--text); }
.photo-group-hint { font-size: 11.5px; }
.photo-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.photo-thumb {
  position: relative; width: 92px; height: 92px; border-radius: var(--radius);
  overflow: hidden; cursor: zoom-in; border: 1px solid var(--border);
  background: var(--bg-soft, var(--surface)); transition: transform .14s var(--ease), box-shadow .14s var(--ease);
}
.photo-thumb:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--primary); }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-idx {
  position: absolute; right: 4px; bottom: 4px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; background: rgba(15,23,42,.62); color: #fff; font-size: 10.5px;
  line-height: 16px; text-align: center; font-weight: 600;
}

/* 照片灯箱 */
.photo-lightbox {
  position: fixed; inset: 0; z-index: 1200; background: rgba(15,23,42,.82);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  animation: maskIn .16s var(--ease);
}
.photo-lightbox .plb-img {
  max-width: 90vw; max-height: 84vh; object-fit: contain;
  border-radius: var(--radius); box-shadow: var(--shadow-lg); background: #fff;
}
.photo-lightbox .plb-close {
  position: absolute; top: 18px; right: 24px; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.16); color: #fff; font-size: 26px; line-height: 38px;
  text-align: center; cursor: pointer; user-select: none; transition: background .14s var(--ease);
}
.photo-lightbox .plb-close:hover { background: rgba(255,255,255,.3); }
.photo-lightbox .plb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 72px;
  display: flex; align-items: center; justify-content: center; cursor: pointer; user-select: none;
  color: #fff; font-size: 42px; line-height: 1; background: rgba(255,255,255,.12); border-radius: 10px;
  transition: background .14s var(--ease);
}
.photo-lightbox .plb-nav:hover { background: rgba(255,255,255,.28); }
.photo-lightbox .plb-prev { left: 22px; }
.photo-lightbox .plb-next { right: 22px; }
.photo-lightbox .plb-bar {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 16px; color: rgba(255,255,255,.92); font-size: 13px;
  background: rgba(15,23,42,.5); padding: 8px 16px; border-radius: 999px;
}
.photo-lightbox .plb-link { color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.4); }
.photo-lightbox .plb-link:hover { border-bottom-color: #fff; }

/* ================= 运单微信分享 ================= */
.share-row { display: flex; gap: 20px; align-items: flex-start; }
.share-qr { flex: 0 0 auto; text-align: center; }
.share-qr svg { border: 1px solid var(--border); border-radius: 8px; display: block; background: #fff; }
.share-side { flex: 1; min-width: 0; }
.share-steps { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.share-steps > div { font-size: 13px; color: var(--text); line-height: 1.5; }
.share-steps b { display: inline-block; width: 18px; height: 18px; line-height: 18px; text-align: center;
  border-radius: 50%; background: var(--primary); color: #fff; font-size: 11px; margin-right: 4px; }

/* 公开分享页（客户在微信中打开，不依赖后台主题变量） */
.share-page { min-height: 100vh; background: #f2f4f7; padding: 16px 12px; color: #1f2937;
  display: flex; justify-content: center; align-items: flex-start; }
.share-loading, .share-error { margin: 60px auto; text-align: center; color: #6b7280; font-size: 15px; }
.share-error { color: #d70015; }
.share-card { width: 100%; max-width: 480px; background: #fff; border-radius: 14px; padding: 18px 16px;
  box-shadow: 0 6px 24px rgba(0,0,0,.08); }
.share-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; color: #111827; }
.share-brand img { width: 32px; height: 32px; border-radius: 8px; object-fit: contain; }
.share-brand .logo { width: 32px; height: 32px; border-radius: 8px; background: var(--primary, #2563eb);
  color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; }
.share-no { margin: 12px 0 14px; font-size: 18px; font-weight: 700; color: #111827;
  display: flex; align-items: center; gap: 10px; }
.share-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.sf { background: #f7f8fa; border-radius: 8px; padding: 8px 10px; }
.sf-label { font-size: 11px; color: #9ca3af; margin-bottom: 2px; }
.sf-val { font-size: 13px; color: #111827; word-break: break-all; }
.share-notes { margin-top: 12px; font-size: 13px; color: #374151; line-height: 1.6;
  background: #fff8e6; border-radius: 8px; padding: 10px 12px; border: 1px solid #fde68a; }
.share-track { margin-top: 16px; }
.share-track-title { font-weight: 700; color: #111827; margin-bottom: 10px; font-size: 15px; }
.share-foot { margin-top: 18px; text-align: center; font-size: 11px; color: #9ca3af; }
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 16px 20px; }
.timeline li .tl-dot { position: absolute; left: 2px; top: 4px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--primary, #2563eb); }
.timeline li.warn .tl-dot { background: #d97706; }
.timeline li:not(:last-child)::before { content: ""; position: absolute; left: 6px; top: 14px; bottom: 0;
  width: 2px; background: #e5e7eb; }
.timeline .tl-title { font-size: 13px; font-weight: 600; color: #111827; }
.timeline .tl-meta { font-size: 11px; color: #9ca3af; margin-top: 2px; }
.timeline .tl-note { font-size: 12px; color: #4b5563; margin-top: 3px; line-height: 1.5; }
.timeline .tl-empty { color: #9ca3af; font-size: 13px; padding-left: 0; }
.timeline .tl-empty::before, .timeline .tl-empty .tl-dot { display: none; }


/* ==========================================================================
 * comboSearch — 带下拉联想的模糊搜索面板
 * 替代原生 <datalist>：原生在中文场景下只做前缀匹配，等于没有模糊查找
 * ========================================================================== */
.combo-panel {
  display: none;
  position: fixed;
  z-index: 9999;
  max-height: 280px;
  overflow-y: auto;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14);
  padding: 4px 0;
}
.combo-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-primary);
  line-height: 1.5;
}
.combo-item:hover,
.combo-item.active {
  background: var(--primary-light, #E3F2FD);
}
/* 暗色主题：面板用深色底，避免「浅字白底」看不清 */
[data-theme="dark"] .combo-panel {
  background: var(--surface-2);
  box-shadow: var(--shadow-lg);
}
[data-theme="dark"] .combo-item:hover,
[data-theme="dark"] .combo-item.active {
  background: var(--primary-soft);
}
.combo-item-label {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.combo-item-desc {
  font-size: 12px;
  color: var(--text-secondary, #757575);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.combo-more {
  padding: 7px 14px;
  margin-top: 3px;
  border-top: 1px dashed var(--border);
  font-size: 12px;
  color: var(--text-secondary, #757575);
}
