/* ============================================================
   线索流 LeadFlow · 渠道数据协同平台
   原生 CSS 设计系统 · 无第三方依赖
   ============================================================ */

:root {
  --ink: #101828;
  --ink-2: #344054;
  --muted: #667085;
  --soft: #98a2b3;
  --line: #e7ebf2;
  --line-2: #eef1f6;
  --bg: #f5f7fb;
  --card: #ffffff;
  --brand: #4f46e5;
  --brand-2: #6366f1;
  --brand-deep: #3730a3;
  --brand-soft: #eef2ff;
  --accent: #10b981;
  --accent-soft: #ecfdf5;
  --amber: #f59e0b;
  --amber-soft: #fffbeb;
  --red: #e5484d;
  --red-soft: #fef2f2;
  --blue: #2e90fa;
  --blue-soft: #eff8ff;
  --purple: #8b5cf6;
  --cyan: #06b6d4;
  --sidebar: #0b1220;
  --radius: 14px;
  --radius-lg: 18px;
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-sm: 0 2px 8px rgba(16, 24, 40, .05);
  --shadow-md: 0 12px 32px rgba(16, 24, 40, .09);
  --shadow-lg: 0 24px 72px rgba(16, 24, 40, .16);
  --font: "Inter", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
svg { display: inline-block; flex: none; }
[hidden] { display: none !important; }
::selection { background: #c7d2fe; color: #1e1b4b; }

/* 滚动条 */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #cdd5e0; border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #aeb9c8; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ============================================================
   通用元素
   ============================================================ */
.ico { vertical-align: -3px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 39px; padding: 0 15px;
  border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--ink-2);
  font-size: 13.5px; font-weight: 600; white-space: nowrap;
  box-shadow: var(--shadow-xs);
  transition: background .16s, border-color .16s, box-shadow .16s, transform .08s, color .16s;
}
.btn:hover { background: #f8fafc; border-color: #d5dbe5; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn.primary {
  color: #fff; border-color: transparent;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  box-shadow: 0 6px 18px rgba(79, 70, 229, .24);
}
.btn.primary:hover { filter: brightness(1.05); box-shadow: 0 8px 24px rgba(79, 70, 229, .3); }
.btn.accent { color: #fff; border-color: transparent; background: linear-gradient(135deg, #059669, #10b981); box-shadow: 0 6px 18px rgba(16, 185, 129, .22); }
.btn.ghost { background: #f8fafc; border-color: transparent; box-shadow: none; }
.btn.ghost:hover { background: #f1f5f9; }
.btn.danger { color: #b42318; background: #fff; border-color: #fecaca; }
.btn.danger:hover { background: #fef2f2; }
.btn.danger-solid { color: #fff; background: var(--red); border-color: var(--red); }
.btn.small { min-height: 31px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; gap: 5px; }
.btn.tiny { min-height: 27px; padding: 0 9px; font-size: 12px; border-radius: 7px; gap: 4px; }
.btn.block { width: 100%; }
.btn.loading { pointer-events: none; opacity: .82; }
.btn.loading::after {
  content: ""; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff;
  animation: spin .7s linear infinite;
}
.btn.loading span { opacity: .8; }

.icon-btn {
  width: 36px; height: 36px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent; border-radius: 9px;
  background: transparent; color: var(--muted);
  transition: background .16s, color .16s, border-color .16s;
}
.icon-btn:hover { background: #f2f5f9; color: var(--ink); }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.icon-btn.sm { width: 30px; height: 30px; }
.icon-btn.danger:hover { background: var(--red-soft); color: var(--red); }

.avatar {
  --avatar-h: 220;
  width: 38px; height: 38px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: hsl(var(--avatar-h) 68% 94%);
  color: hsl(var(--avatar-h) 58% 38%);
  font-weight: 700; font-size: 14px; letter-spacing: .02em;
  border: 1px solid hsl(var(--avatar-h) 55% 88%);
}
.avatar-xs { width: 26px; height: 26px; border-radius: 8px; font-size: 11px; }
.avatar-sm { width: 32px; height: 32px; border-radius: 9px; font-size: 12px; }
.avatar-lg { width: 48px; height: 48px; border-radius: 14px; font-size: 17px; }
.avatar-xl { width: 62px; height: 62px; border-radius: 18px; font-size: 22px; }

.status {
  display: inline-flex; align-items: center; gap: 5px;
  height: 24px; padding: 0 9px;
  border-radius: 999px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
  background: #f2f4f7; color: #475467;
  border: 1px solid transparent;
}
.status i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-pending_accept { color: #b54708; background: #fffaeb; border-color: #fef0c7; }
.status-pending_assign { color: #175cd3; background: #eff8ff; border-color: #d1e9ff; }
.status-pending_followup { color: #3538cd; background: #eef4ff; border-color: #dbe6ff; }
.status-contacted { color: #0e7090; background: #ecfdff; border-color: #cff9fe; }
.status-wechat { color: #6941c6; background: #f4f3ff; border-color: #e9d7fe; }
.status-converted { color: #067647; background: #ecfdf3; border-color: #d1fadf; }
.status-invalid { color: #667085; background: #f2f4f7; border-color: #eaecf0; }

.role-chip {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px;
  border-radius: 6px; font-size: 11px; font-weight: 600; white-space: nowrap;
}
.role-admin { color: #3538cd; background: #eef4ff; }
.role-merchant { color: #b54708; background: #fffaeb; }
.role-channel { color: #0e7090; background: #ecfdff; }
.role-agent { color: #6941c6; background: #f4f3ff; }

.status-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; background: #12b76a; }
.muted { color: var(--muted); }
.soft { color: var(--soft); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.text-right { text-align: right; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.gap-6 { gap: 6px; }
.gap-8 { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-12 { gap: 12px; }
.spacer { flex: 1; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============================================================
   登录
   ============================================================ */
.login-body { background: #f7f8fc; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(520px, 1.08fr) minmax(460px, .92fr); }
.login-hero {
  position: relative; overflow: hidden;
  padding: 42px clamp(36px, 5vw, 76px) 30px;
  display: flex; flex-direction: column;
  color: #fff;
  background:
    radial-gradient(70% 80% at 15% 8%, rgba(79, 70, 229, .4), transparent 60%),
    radial-gradient(60% 60% at 86% 72%, rgba(14, 165, 233, .22), transparent 62%),
    linear-gradient(145deg, #080e1b 0%, #0c1426 55%, #0d1730 100%);
}
.hero-grid {
  position: absolute; inset: 0; opacity: .22;
  background-image: linear-gradient(rgba(148, 163, 184, .14) 1px, transparent 1px), linear-gradient(90deg, rgba(148, 163, 184, .14) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(75% 65% at 40% 35%, #000 20%, transparent 100%);
}
.hero-orb { position: absolute; border-radius: 50%; filter: blur(2px); pointer-events: none; }
.orb-a { width: 420px; height: 420px; right: -160px; top: 60px; background: radial-gradient(circle, rgba(99, 102, 241, .32), transparent 68%); }
.orb-b { width: 360px; height: 360px; left: -130px; bottom: 30px; background: radial-gradient(circle, rgba(16, 185, 129, .16), transparent 68%); }
.brand { display: inline-flex; align-items: center; gap: 11px; width: fit-content; }
.brand-light { color: #fff; }
.brand-mark {
  width: 38px; height: 38px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px; color: #fff;
  background: linear-gradient(140deg, #6366f1, #4f46e5 60%, #4338ca);
  box-shadow: 0 8px 20px rgba(79, 70, 229, .38), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.brand-name { font-size: 18px; font-weight: 750; letter-spacing: .02em; }
.brand-name em { font-style: normal; font-size: 10px; font-weight: 600; letter-spacing: .18em; color: #a5b4fc; margin-left: 4px; vertical-align: 2px; }
.login-hero > .brand { position: relative; z-index: 2; }
.hero-copy { position: relative; z-index: 2; margin-top: auto; padding-top: 54px; max-width: 640px; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 10.5px; font-weight: 700; letter-spacing: .2em; color: #a5b4fc; }
.hero-eyebrow i { width: 22px; height: 1px; background: #818cf8; }
.hero-copy h1 { margin: 20px 0 18px; font-size: clamp(36px, 4vw, 56px); line-height: 1.16; letter-spacing: -.03em; font-weight: 730; }
.hero-copy h1 span { color: #a7f3d0; position: relative; white-space: nowrap; }
.hero-copy h1 span::after { content: ""; position: absolute; left: 2%; right: 2%; bottom: 4px; height: 8px; background: rgba(52, 211, 153, .18); z-index: -1; border-radius: 4px; }
.hero-desc { max-width: 510px; color: #aebbd0; font-size: 14px; line-height: 1.9; margin: 0; }
.flow-card {
  position: relative; z-index: 2;
  margin-top: 40px; padding: 20px 22px;
  display: flex; align-items: center; gap: 12px;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .025));
  backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}
.flow-item { display: flex; align-items: center; gap: 11px; min-width: 0; }
.flow-no { width: 28px; height: 28px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; background: rgba(99, 102, 241, .18); color: #c7d2fe; font-size: 10.5px; font-weight: 700; font-family: var(--mono); }
.flow-item b { display: block; font-size: 12.5px; font-weight: 650; white-space: nowrap; }
.flow-item small { display: block; color: #8794aa; font-size: 10.5px; margin-top: 2px; white-space: nowrap; }
.flow-line { flex: 1; min-width: 12px; height: 1px; background: linear-gradient(90deg, rgba(148, 163, 184, .28), rgba(148, 163, 184, .08)); }
.hero-metrics { position: relative; z-index: 2; display: flex; gap: 44px; margin-top: 34px; }
.hero-metrics b { display: block; font-size: 21px; font-weight: 700; letter-spacing: -.02em; }
.hero-metrics span { color: #8794aa; font-size: 11px; }
.hero-foot { position: relative; z-index: 2; margin-top: auto; padding-top: 40px; display: flex; align-items: center; gap: 8px; color: #718096; font-size: 11px; }

.login-panel { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 34px 40px 26px; background: radial-gradient(80% 60% at 90% 0%, #eef2ff 0, transparent 60%), #f8f9fc; }
.login-card { width: min(432px, 100%); padding: 36px 34px 26px; background: #fff; border: 1px solid #e9edf5; border-radius: 24px; box-shadow: 0 28px 80px rgba(16, 24, 40, .1), 0 2px 6px rgba(16, 24, 40, .03); }
.mobile-brand { display: none; margin-bottom: 26px; }
.mobile-brand .brand-name { color: var(--ink); }
.login-head { margin-bottom: 24px; }
.login-kicker { font-size: 9.5px; font-weight: 750; letter-spacing: .19em; color: var(--brand); }
.login-head h2 { margin: 7px 0 6px; font-size: 26px; font-weight: 720; letter-spacing: -.02em; }
.login-head p { margin: 0; color: var(--muted); font-size: 13px; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 15px; }
.field > span { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.field .hint { font-size: 11px; color: var(--soft); font-weight: 400; margin-left: auto; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > svg { position: absolute; left: 13px; color: #98a2b3; pointer-events: none; }
.input-wrap input { width: 100%; height: 45px; padding: 0 42px 0 40px; border: 1px solid #dfe4ec; border-radius: 11px; background: #fbfcfe; font-size: 13.5px; outline: none; transition: border-color .16s, box-shadow .16s, background .16s; }
.input-wrap input::placeholder { color: #aeb7c4; }
.input-wrap input:focus { border-color: #a5b4fc; background: #fff; box-shadow: 0 0 0 4px rgba(99, 102, 241, .1); }
.reveal-btn { position: absolute; right: 7px; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 8px; background: transparent; color: #98a2b3; }
.reveal-btn:hover { background: #f2f4f7; color: var(--ink-2); }
.reveal-btn.on { color: var(--brand); }
.login-error { min-height: 18px; margin: -2px 0 8px; font-size: 12px; color: var(--red); opacity: 0; transition: opacity .18s; }
.login-error.show { opacity: 1; }
.login-submit { width: 100%; height: 46px; border-radius: 11px; font-size: 14px; margin-top: 2px; }
.demo-divider { display: flex; align-items: center; gap: 12px; margin: 24px 0 13px; color: #98a2b3; font-size: 10.5px; white-space: nowrap; }
.demo-divider::before, .demo-divider::after { content: ""; flex: 1; height: 1px; background: #edf0f5; }
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.demo-account {
  display: flex; align-items: center; gap: 9px; min-width: 0;
  padding: 9px 10px; border: 1px solid #edf0f5; border-radius: 11px; background: #fbfcfe;
  text-align: left; transition: border-color .16s, background .16s, box-shadow .16s;
}
.demo-account:hover, .demo-account.active { border-color: #c7d2fe; background: #f8f9ff; box-shadow: 0 0 0 3px rgba(99, 102, 241, .06); }
.demo-account > span:nth-child(2) { flex: 1; min-width: 0; }
.demo-account b { display: block; font-size: 11.5px; font-weight: 650; color: var(--ink-2); }
.demo-account small { display: block; font-size: 10px; color: #98a2b3; font-family: var(--mono); margin-top: 1px; }
.demo-account > svg { color: #c0c7d2; }
.demo-icon { width: 29px; height: 29px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; font-size: 11.5px; font-weight: 700; }
.login-privacy { margin: 20px 0 0; padding-top: 15px; border-top: 1px solid #f0f2f6; font-size: 10.5px; line-height: 1.7; color: #98a2b3; }
.login-copyright { margin-top: 20px; color: #aab2bf; font-size: 10.5px; }
.shake { animation: shake .36s ease; }

/* ============================================================
   应用骨架
   ============================================================ */
.app-body { background: var(--bg); overflow-x: hidden; }
.app-body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(50% 40% at 82% 0%, rgba(99, 102, 241, .055), transparent 65%),
    radial-gradient(40% 35% at 20% 100%, rgba(16, 185, 129, .035), transparent 70%);
}
.boot-loader { position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: #f7f8fc; transition: opacity .3s; }
.boot-loader.done { opacity: 0; pointer-events: none; }
.boot-logo { width: 54px; height: 54px; display: flex; align-items: center; justify-content: center; border-radius: 17px; color: #fff; background: linear-gradient(140deg, #6366f1, #4338ca); box-shadow: 0 12px 30px rgba(79, 70, 229, .28); }
.boot-text { color: var(--muted); font-size: 12px; letter-spacing: .03em; }
.app-shell { position: relative; z-index: 1; min-height: 100vh; }

.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; z-index: 50;
  width: 252px; padding: 23px 17px 16px;
  display: flex; flex-direction: column;
  color: #c7d0df;
  background:
    radial-gradient(60% 30% at 30% 0%, rgba(79, 70, 229, .2), transparent 65%),
    linear-gradient(180deg, #0a1120 0%, #0c1527 50%, #0a1220 100%);
  border-right: 1px solid rgba(148, 163, 184, .08);
  transition: transform .24s cubic-bezier(.2, .8, .2, 1);
}
.sidebar-brand { padding: 0 6px; margin-bottom: 22px; }
.sidebar-brand .brand-mark { width: 36px; height: 36px; border-radius: 11px; }
.sidebar-brand .brand-name { font-size: 17px; }
.workspace-pill {
  display: flex; align-items: center; gap: 9px;
  margin: 0 2px 20px; padding: 10px 11px;
  border: 1px solid rgba(148, 163, 184, .13); border-radius: 11px;
  background: rgba(255, 255, 255, .035);
  min-width: 0;
}
.workspace-pill .ws-icon { width: 27px; height: 27px; flex: none; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: rgba(99, 102, 241, .17); color: #c7d2fe; }
.workspace-pill .ws-copy { min-width: 0; flex: 1; }
.workspace-pill b { display: block; color: #e6ebf3; font-size: 11.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-pill small { display: flex; align-items: center; gap: 5px; color: #748298; font-size: 10px; margin-top: 2px; }
.workspace-pill .online-dot { width: 5px; height: 5px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 3px rgba(52, 211, 153, .1); }
.side-nav { display: flex; flex-direction: column; gap: 3px; }
.nav-label { margin: 14px 10px 7px; color: #58667d; font-size: 9.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 11px;
  height: 41px; padding: 0 11px; border-radius: 9px;
  color: #93a1b5; font-size: 13px; font-weight: 500;
  transition: background .16s, color .16s;
}
.nav-item:hover { background: rgba(148, 163, 184, .07); color: #e2e8f0; }
.nav-item.active { color: #fff; background: linear-gradient(90deg, rgba(79, 70, 229, .3), rgba(79, 70, 229, .12)); box-shadow: inset 0 0 0 1px rgba(129, 140, 248, .16); }
.nav-item.active::before { content: ""; position: absolute; left: -17px; width: 3px; height: 20px; border-radius: 0 3px 3px 0; background: #818cf8; box-shadow: 0 0 12px rgba(129, 140, 248, .7); }
.nav-item .ico { opacity: .85; }
.nav-item.active .ico { color: #c7d2fe; opacity: 1; }
.nav-badge { margin-left: auto; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 6px; background: rgba(245, 158, 11, .17); color: #fbbf24; font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.sidebar-bottom { margin-top: auto; }
.sidebar-tip { display: flex; align-items: flex-start; gap: 9px; padding: 11px; margin-bottom: 12px; border-radius: 10px; background: rgba(16, 185, 129, .055); border: 1px solid rgba(16, 185, 129, .1); }
.sidebar-tip .tip-icon { color: #34d399; margin-top: 1px; }
.sidebar-tip b { display: block; color: #a7b5c8; font-size: 10.5px; font-weight: 600; }
.sidebar-tip small { display: block; color: #64748b; font-size: 9.5px; margin-top: 2px; }
.sidebar-user { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 8px; border: 0; border-radius: 10px; background: transparent; color: #cbd5e1; text-align: left; transition: background .16s; }
.sidebar-user:hover { background: rgba(148, 163, 184, .07); }
.sidebar-user .su-copy { flex: 1; min-width: 0; }
.sidebar-user b { display: block; color: #e2e8f0; font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user small { display: block; color: #66758b; font-size: 10px; margin-top: 1px; }
.sidebar-user .ico { color: #58667d; }

.app-main { margin-left: 252px; min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 40;
  height: 74px; padding: 0 clamp(18px, 2.4vw, 34px);
  display: flex; align-items: center; gap: 18px;
  background: rgba(247, 249, 252, .86);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(231, 235, 242, .9);
}
.page-heading { min-width: 0; }
.page-eyebrow { color: #98a2b3; font-size: 9px; font-weight: 700; letter-spacing: .16em; line-height: 1.2; }
.page-heading h1 { margin: 3px 0 0; font-size: 19px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; }
.topbar-search {
  margin-left: auto; width: clamp(220px, 26vw, 340px); height: 39px;
  display: flex; align-items: center; gap: 9px; padding: 0 11px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  color: #98a2b3; transition: border-color .16s, box-shadow .16s;
}
.topbar-search:focus-within { border-color: #c7d2fe; box-shadow: 0 0 0 3px rgba(99, 102, 241, .08); }
.topbar-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 12.5px; color: var(--ink); }
.topbar-search input::placeholder { color: #aeb7c4; }
.topbar-search kbd { font-family: var(--font); font-size: 9px; color: #98a2b3; background: #f4f6f9; border: 1px solid #e9edf3; border-radius: 5px; padding: 2px 5px; }
.topbar-actions { display: flex; align-items: center; gap: 4px; margin-left: 4px; }
.topbar-bell { position: relative; border-color: transparent; }
.bell-dot { position: absolute; top: 7px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: #f04438; border: 1.5px solid #f7f9fc; }
.bell-count { position: absolute; top: 1px; right: 1px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #f04438; color: #fff; font-size: 9px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; border: 1.5px solid #f7f9fc; }
.topbar-sep { width: 1px; height: 25px; background: var(--line); margin: 0 7px; }
.user-trigger { display: flex; align-items: center; gap: 9px; padding: 4px 6px 4px 4px; border: 0; border-radius: 10px; background: transparent; text-align: left; }
.user-trigger:hover { background: #eef1f6; }
.user-trigger-copy b { display: block; font-size: 11.5px; font-weight: 650; line-height: 1.35; }
.user-trigger-copy small { display: block; color: #98a2b3; font-size: 9.5px; margin-top: 1px; }
.user-trigger > svg { color: #98a2b3; }
.user-menu {
  position: absolute; top: 63px; right: 28px; z-index: 70; width: 190px;
  padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-md);
  animation: pop .16s ease;
}
.user-menu-head { padding: 9px 10px 10px; border-bottom: 1px solid #f0f2f6; margin-bottom: 5px; }
.user-menu-head b { display: block; font-size: 12.5px; }
.user-menu-head small { color: var(--muted); font-size: 10.5px; }
.user-menu button { display: flex; width: 100%; align-items: center; gap: 8px; padding: 8px 10px; border: 0; border-radius: 7px; background: transparent; font-size: 12.5px; text-align: left; color: var(--ink-2); }
.user-menu button:hover { background: #f6f8fb; }
.user-menu button.danger-text { color: #b42318; }
.mobile-menu-btn { display: none; }

.page-content { position: relative; z-index: 1; padding: 24px clamp(18px, 2.4vw, 34px) 54px; max-width: 1560px; width: 100%; margin: 0 auto; flex: 1; }
.mobile-nav { display: none; }

/* ============================================================
   页面头部 / 卡片 / 网格
   ============================================================ */
.page-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 20px; flex-wrap: wrap; }
.page-intro h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.025em; }
.page-intro p { margin: 5px 0 0; color: var(--muted); font-size: 12.5px; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.hero-banner {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 24px;
  padding: 24px 28px; margin-bottom: 20px;
  border: 1px solid #e4e8f2; border-radius: var(--radius-lg);
  background:
    radial-gradient(55% 160% at 92% 0%, rgba(99, 102, 241, .16), transparent 65%),
    radial-gradient(45% 120% at 70% 100%, rgba(16, 185, 129, .08), transparent 65%),
    linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
  box-shadow: var(--shadow-xs);
}
.hero-banner::after {
  content: ""; position: absolute; right: -50px; top: -80px; width: 260px; height: 260px;
  border: 1px solid rgba(99, 102, 241, .11); border-radius: 50%;
  box-shadow: 0 0 0 34px rgba(99, 102, 241, .035), 0 0 0 68px rgba(99, 102, 241, .025);
}
.hero-banner .hero-main { position: relative; z-index: 1; flex: 1; min-width: 0; }
.hero-banner .hero-kicker { display: inline-flex; align-items: center; gap: 6px; color: var(--brand); font-size: 9.5px; font-weight: 750; letter-spacing: .12em; margin-bottom: 7px; }
.hero-banner h2 { margin: 0; font-size: clamp(20px, 2vw, 26px); font-weight: 720; letter-spacing: -.03em; }
.hero-banner h2 .name { color: var(--brand); }
.hero-banner p { margin: 6px 0 0; color: var(--muted); font-size: 12.5px; max-width: 690px; }
.hero-banner p b { color: var(--ink-2); font-weight: 650; }
.hero-banner .hero-actions { position: relative; z-index: 2; display: flex; gap: 8px; flex-wrap: wrap; }
.hero-date { display: inline-flex; align-items: center; gap: 6px; color: #98a2b3; font-size: 10.5px; margin-left: 12px; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi-card { position: relative; overflow: hidden; padding: 17px 18px 15px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-xs); transition: transform .18s, box-shadow .18s; }
.kpi-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.kpi-top { display: flex; align-items: center; gap: 9px; }
.kpi-icon { width: 32px; height: 32px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; }
.kpi-icon.indigo { background: #eef2ff; color: #4f46e5; }
.kpi-icon.amber { background: #fffaeb; color: #dc6803; }
.kpi-icon.green { background: #ecfdf3; color: #079455; }
.kpi-icon.blue { background: #eff8ff; color: #1570ef; }
.kpi-icon.purple { background: #f4f3ff; color: #7a5af8; }
.kpi-label { color: var(--muted); font-size: 11.5px; font-weight: 550; }
.kpi-value { margin: 9px 0 4px; font-size: 30px; line-height: 1.1; font-weight: 720; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.kpi-value small { font-size: 13px; font-weight: 600; color: var(--soft); margin-left: 2px; letter-spacing: 0; }
.kpi-foot { display: flex; align-items: center; gap: 7px; color: var(--soft); font-size: 10.5px; min-height: 18px; }
.trend-up { display: inline-flex; align-items: center; gap: 2px; color: #079455; font-weight: 650; }
.trend-down { color: #d92d20; font-weight: 650; }
.kpi-spark { position: absolute; right: 13px; bottom: 12px; opacity: .7; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.72fr) minmax(300px, 1fr); gap: 16px; margin-bottom: 16px; }
.dashboard-grid.even { grid-template-columns: 1fr 1fr; }
.dashboard-grid.one { grid-template-columns: 1fr; }
.span-2 { min-width: 0; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-xs); min-width: 0; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 18px 0; }
.panel-title { min-width: 0; }
.panel-title h3 { margin: 0; font-size: 13.5px; font-weight: 680; letter-spacing: -.01em; display: flex; align-items: center; gap: 7px; }
.panel-title p { margin: 4px 0 0; color: var(--soft); font-size: 10.5px; }
.panel-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.panel-body { padding: 15px 18px 18px; }
.panel-body.tight { padding: 10px 0 4px; }
.panel-body.flush { padding: 0; }
.panel-link { display: inline-flex; align-items: center; gap: 3px; color: var(--brand); font-size: 11.5px; font-weight: 600; }
.panel-link:hover { text-decoration: underline; }
.segmented { display: inline-flex; align-items: center; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafc; }
.segmented button { height: 26px; padding: 0 9px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 10.5px; font-weight: 600; }
.segmented button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(16, 24, 40, .08); }

/* 图表 */
.trend-chart { position: relative; width: 100%; }
.trend-chart svg { width: 100%; height: auto; display: block; }
.chart-legend { display: flex; align-items: center; gap: 15px; color: var(--muted); font-size: 10.5px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.chart-legend i { width: 7px; height: 7px; border-radius: 2px; }
.chart-empty { padding: 50px 0; text-align: center; color: var(--soft); font-size: 12px; }

.donut-wrap { display: flex; align-items: center; gap: 18px; padding: 6px 0 2px; }
.donut { position: relative; width: 142px; height: 142px; flex: none; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut-center b { font-size: 26px; font-weight: 720; letter-spacing: -.03em; line-height: 1.1; }
.donut-center span { color: var(--soft); font-size: 9.5px; margin-top: 2px; }
.donut-legend { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.donut-legend-row { display: flex; align-items: center; gap: 7px; font-size: 10.5px; color: var(--muted); }
.donut-legend-row i { width: 6px; height: 6px; border-radius: 2px; flex: none; }
.donut-legend-row b { margin-left: auto; color: var(--ink-2); font-weight: 650; font-variant-numeric: tabular-nums; }
.donut-legend-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.funnel { display: flex; flex-direction: column; gap: 12px; padding-top: 3px; }
.funnel-row { display: grid; grid-template-columns: 58px minmax(0, 1fr) 43px; align-items: center; gap: 9px; }
.funnel-label { color: var(--muted); font-size: 10.5px; white-space: nowrap; }
.funnel-track { height: 8px; border-radius: 99px; background: #f2f4f7; overflow: hidden; }
.funnel-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, #6366f1, #818cf8); transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.funnel-row:nth-child(2) .funnel-fill { background: linear-gradient(90deg, #0ea5e9, #38bdf8); }
.funnel-row:nth-child(3) .funnel-fill { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.funnel-row:nth-child(4) .funnel-fill { background: linear-gradient(90deg, #06b6d4, #22d3ee); }
.funnel-row:nth-child(5) .funnel-fill { background: linear-gradient(90deg, #10b981, #34d399); }
.funnel-count { text-align: right; font-size: 11px; font-weight: 650; font-variant-numeric: tabular-nums; }
.funnel-count small { display: block; font-size: 9px; color: var(--soft); font-weight: 500; }

/* 商家处理表 */
.merchant-row { display: flex; align-items: center; gap: 10px; }
.merchant-row .merchant-name { min-width: 0; }
.merchant-row b { display: block; font-size: 12px; font-weight: 620; }
.merchant-row small { display: block; color: var(--soft); font-size: 9.5px; margin-top: 1px; }
.mini-progress { display: flex; align-items: center; gap: 7px; min-width: 92px; }
.mini-progress .track { flex: 1; height: 5px; border-radius: 99px; background: #f2f4f7; overflow: hidden; }
.mini-progress .fill { height: 100%; border-radius: 99px; background: #12b76a; }
.mini-progress b { font-size: 10.5px; font-weight: 650; color: var(--ink-2); font-variant-numeric: tabular-nums; min-width: 30px; text-align: right; }
.queue-list { display: flex; flex-direction: column; }
.queue-item { display: flex; align-items: center; gap: 10px; padding: 10px 18px; border-top: 1px solid #f4f6f9; transition: background .15s; }
.queue-item:first-child { border-top: 0; }
.queue-item:hover { background: #fbfcfe; }
.queue-main { flex: 1; min-width: 0; }
.queue-main b { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 620; }
.queue-main b em { font-style: normal; color: var(--soft); font-weight: 500; font-size: 10.5px; }
.queue-main small { display: block; margin-top: 2px; color: var(--soft); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-actions { display: flex; align-items: center; gap: 5px; }
.queue-empty { padding: 24px 18px; text-align: center; color: var(--soft); font-size: 11.5px; }
.queue-more { padding: 10px 18px; border-top: 1px solid #f4f6f9; text-align: center; }

/* 空状态 / 加载 */
.empty-state { padding: 46px 20px; text-align: center; }
.empty-ico { width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 14px; background: #f5f7fb; color: #98a2b3; display: flex; align-items: center; justify-content: center; border: 1px solid #edf0f5; }
.empty-state h4 { margin: 0; font-size: 13px; font-weight: 650; }
.empty-state p { margin: 5px auto 0; color: var(--soft); font-size: 11.5px; max-width: 360px; }
.empty-state .btn { margin-top: 14px; }
.skeleton { background: linear-gradient(90deg, #f0f3f8 25%, #f7f9fc 37%, #f0f3f8 63%); background-size: 400% 100%; animation: shimmer 1.3s infinite; border-radius: 6px; }
.skeleton-line { height: 12px; margin-bottom: 9px; }
.skeleton-card { height: 106px; border-radius: var(--radius); }

/* ============================================================
   筛选 / 表格 / 分页
   ============================================================ */
.filter-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 14px; margin-bottom: 13px; box-shadow: var(--shadow-xs); }
.filter-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-search { position: relative; flex: 1 1 230px; min-width: 190px; }
.filter-search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: #98a2b3; pointer-events: none; }
.filter-search input { width: 100%; height: 36px; padding: 0 11px 0 34px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfe; outline: none; font-size: 12.5px; }
.filter-search input:focus { border-color: #c7d2fe; background: #fff; box-shadow: 0 0 0 3px rgba(99, 102, 241, .07); }
.select-wrap { position: relative; display: inline-flex; align-items: center; }
.select-wrap select { height: 36px; min-width: 118px; padding: 0 30px 0 10px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfe; font-size: 12px; color: var(--ink-2); outline: none; appearance: none; cursor: pointer; }
.select-wrap select:focus { border-color: #c7d2fe; box-shadow: 0 0 0 3px rgba(99, 102, 241, .07); }
.select-wrap > svg { position: absolute; right: 9px; color: #98a2b3; pointer-events: none; }
.date-input { height: 36px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfe; font-size: 11.5px; color: var(--ink-2); outline: none; }
.date-input:focus { border-color: #c7d2fe; box-shadow: 0 0 0 3px rgba(99, 102, 241, .07); }
.filter-divider { width: 1px; height: 24px; background: var(--line); margin: 0 2px; }
.filter-more { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px dashed #eef1f6; }
.status-tabs { display: flex; align-items: center; gap: 4px; padding: 4px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; overflow-x: auto; box-shadow: var(--shadow-xs); }
.status-tabs button { height: 30px; padding: 0 11px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 11.5px; font-weight: 550; white-space: nowrap; }
.status-tabs button:hover { background: #f7f9fc; color: var(--ink); }
.status-tabs button.on { background: var(--brand-soft); color: var(--brand); font-weight: 650; }
.status-tabs .tab-count { margin-left: 4px; font-size: 10px; color: var(--soft); }
.status-tabs button.on .tab-count { color: #6366f1; }

.table-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-xs); overflow: hidden; }
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; white-space: nowrap; }
.data-table th { height: 41px; padding: 0 12px; text-align: left; font-size: 10.5px; font-weight: 600; color: #98a2b3; background: #fbfcfe; border-bottom: 1px solid #edf0f5; letter-spacing: .02em; }
.data-table th:first-child, .data-table td:first-child { padding-left: 17px; }
.data-table th:last-child, .data-table td:last-child { padding-right: 17px; }
.data-table td { height: 56px; padding: 7px 12px; border-bottom: 1px solid #f2f4f8; vertical-align: middle; }
.data-table tbody tr { transition: background .13s; }
.data-table tbody tr:hover { background: #fbfcff; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table .check-col { width: 34px; padding-right: 0; }
.data-table .actions-col { text-align: right; }
.data-table .num { font-variant-numeric: tabular-nums; }
.data-table .strong { font-weight: 600; color: var(--ink); }
.data-table .sub { color: var(--soft); font-size: 10px; margin-top: 2px; }
.cell-user { display: flex; align-items: center; gap: 9px; min-width: 0; }
.cell-user .cu-copy { min-width: 0; }
.cell-user b { display: block; font-size: 12px; font-weight: 620; max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
.cell-user small { display: block; color: var(--soft); font-size: 9.5px; margin-top: 1px; font-variant-numeric: tabular-nums; }
.cell-stack b { display: block; font-size: 11.5px; font-weight: 550; }
.cell-stack small { display: block; color: var(--soft); font-size: 9.5px; margin-top: 1px; }
.cell-chips { display: flex; align-items: center; gap: 5px; flex-wrap: nowrap; }
.soft-chip { display: inline-flex; align-items: center; height: 21px; padding: 0 7px; border-radius: 5px; background: #f5f7fb; color: #667085; font-size: 9.5px; font-weight: 550; }
.soft-chip.brand { background: #eef2ff; color: #4f46e5; }
.soft-chip.green { background: #ecfdf3; color: #067647; }
.row-actions { display: inline-flex; align-items: center; gap: 3px; justify-content: flex-end; }
.checkbox { width: 15px; height: 15px; border: 1.5px solid #cdd5e0; border-radius: 4px; background: #fff; appearance: none; vertical-align: middle; cursor: pointer; position: relative; }
.checkbox:checked { background: var(--brand); border-color: var(--brand); }
.checkbox:checked::after { content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px; border: solid #fff; border-width: 0 1.8px 1.8px 0; transform: rotate(43deg); }
.checkbox:focus-visible { outline: 2px solid #c7d2fe; outline-offset: 1px; }
.bulk-bar {
  position: sticky; bottom: 14px; z-index: 20;
  display: none; align-items: center; gap: 10px;
  margin: 12px auto 0; padding: 9px 12px;
  width: fit-content; max-width: calc(100% - 20px);
  border: 1px solid #dbe1ea; border-radius: 12px;
  background: rgba(255, 255, 255, .95); backdrop-filter: blur(14px);
  box-shadow: 0 14px 40px rgba(16, 24, 40, .16);
}
.bulk-bar.show { display: flex; }
.bulk-bar b { color: var(--brand); font-size: 12px; }
.bulk-bar .bulk-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid #f0f2f6; color: var(--soft); font-size: 10.5px; }
.pager b { color: var(--ink-2); font-weight: 650; }
.pager-btns { display: flex; align-items: center; gap: 5px; }
.pager-page { color: var(--muted); font-size: 10.5px; font-variant-numeric: tabular-nums; min-width: 42px; text-align: center; }

/* ============================================================
   线路 / 客服 / 账号
   ============================================================ */
.line-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.line-card { position: relative; overflow: hidden; padding: 17px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-xs); transition: transform .18s, box-shadow .18s; }
.line-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.line-card::before { content: ""; position: absolute; left: 0; top: 0; width: 3px; height: 100%; background: #e4e7ec; }
.line-card.active::before { background: linear-gradient(180deg, #6366f1, #a5b4fc); }
.line-card.pending_accept::before { background: linear-gradient(180deg, #f59e0b, #fcd34d); }
.line-card.paused::before, .line-card.declined::before { background: linear-gradient(180deg, #98a2b3, #d0d5dd); }
.line-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 11px; }
.line-top h3 { margin: 0; font-size: 13.5px; font-weight: 680; letter-spacing: -.01em; }
.line-code { margin-top: 3px; color: var(--soft); font-size: 9.5px; font-family: var(--mono); letter-spacing: .04em; }
.line-desc { min-height: 34px; color: var(--muted); font-size: 11px; line-height: 1.55; margin: 0 0 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.line-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 0 -4px 13px; border: 1px solid #f0f2f6; border-radius: 9px; overflow: hidden; background: #f0f2f6; }
.line-stat { padding: 8px 9px; background: #fbfcfe; }
.line-stat span { display: block; color: var(--soft); font-size: 9px; }
.line-stat b { display: block; font-size: 15px; font-weight: 680; margin-top: 1px; font-variant-numeric: tabular-nums; }
.line-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.line-channels { display: flex; align-items: center; gap: 3px; }
.line-channels .avatar { margin-left: -5px; border: 2px solid #fff; }
.line-channels .avatar:first-child { margin-left: 0; }
.line-actions { display: flex; gap: 5px; }
.line-invite { border-color: #fde68a; background: linear-gradient(135deg, #fffdf5, #fffaeb); }
.line-invite .line-top h3 { color: #93370d; }
.invite-banner { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border: 1px solid #fde68a; border-radius: 12px; background: #fffaeb; margin-bottom: 14px; }
.invite-banner .i-icon { width: 35px; height: 35px; border-radius: 10px; background: #fef0c7; color: #b54708; display: flex; align-items: center; justify-content: center; flex: none; }
.invite-banner b { display: block; font-size: 12px; }
.invite-banner p { margin: 2px 0 0; color: #b54708; font-size: 10.5px; }

.agent-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.agent-card { padding: 17px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-xs); }
.agent-head { display: flex; align-items: center; gap: 11px; }
.agent-head .ag-copy { min-width: 0; flex: 1; }
.agent-head b { display: block; font-size: 13px; font-weight: 650; }
.agent-head small { display: block; color: var(--soft); font-size: 10px; margin-top: 2px; }
.agent-stats { display: flex; gap: 0; margin: 15px 0 12px; padding: 10px 0; border-top: 1px solid #f0f2f6; border-bottom: 1px solid #f0f2f6; }
.agent-stats > div { flex: 1; text-align: center; border-left: 1px solid #f0f2f6; }
.agent-stats > div:first-child { border-left: 0; }
.agent-stats b { display: block; font-size: 17px; font-weight: 690; font-variant-numeric: tabular-nums; }
.agent-stats span { display: block; color: var(--soft); font-size: 9px; margin-top: 1px; }
.agent-foot { display: flex; align-items: center; justify-content: space-between; }
.last-active { color: var(--soft); font-size: 9.5px; }

.user-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.summary-card { display: flex; align-items: center; gap: 11px; padding: 14px 15px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-xs); }
.summary-card .s-icon { width: 34px; height: 34px; flex: none; border-radius: 9px; display: flex; align-items: center; justify-content: center; }
.summary-card b { display: block; font-size: 20px; line-height: 1.15; font-weight: 700; font-variant-numeric: tabular-nums; }
.summary-card span { display: block; color: var(--soft); font-size: 10px; margin-top: 1px; }

/* 审计 */
.audit-list { display: flex; flex-direction: column; }
.audit-row { display: grid; grid-template-columns: 132px 190px minmax(0, 1fr) 100px; gap: 12px; align-items: center; padding: 12px 18px; border-top: 1px solid #f2f4f8; font-size: 11.5px; }
.audit-row:first-child { border-top: 0; }
.audit-row:hover { background: #fbfcff; }
.audit-time { color: var(--soft); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.audit-actor { display: flex; align-items: center; gap: 7px; min-width: 0; }
.audit-actor b { font-weight: 600; font-size: 11.5px; }
.audit-detail { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; }
.audit-ip { color: var(--soft); font-size: 9.5px; font-family: var(--mono); text-align: right; }

/* ============================================================
   表单 / 提交页
   ============================================================ */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-grid .full { grid-column: 1 / -1; }
.field-label { display: flex; align-items: center; gap: 4px; margin-bottom: 7px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.field-label .req { color: #f04438; }
.field-label .optional { margin-left: auto; color: var(--soft); font-size: 10px; font-weight: 400; }
.input, .select, .textarea {
  width: 100%; border: 1px solid #dfe4ec; border-radius: 10px; background: #fbfcfe;
  padding: 0 12px; height: 42px; font-size: 13px; color: var(--ink); outline: none;
  transition: border-color .16s, box-shadow .16s, background .16s;
}
.textarea { height: auto; min-height: 94px; padding: 10px 12px; resize: vertical; line-height: 1.7; }
.input::placeholder, .textarea::placeholder { color: #aeb7c4; }
.input:focus, .select:focus, .textarea:focus { border-color: #a5b4fc; background: #fff; box-shadow: 0 0 0 4px rgba(99, 102, 241, .09); }
.select { appearance: none; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, #98a2b3 50%), linear-gradient(135deg, #98a2b3 50%, transparent 50%); background-position: calc(100% - 16px) 18px, calc(100% - 11px) 18px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.input-icon { position: relative; }
.input-icon > svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #98a2b3; }
.input-icon .input { padding-left: 36px; }
.help-text { margin-top: 6px; color: var(--soft); font-size: 10px; line-height: 1.55; }
.form-error { margin-top: 6px; color: #d92d20; font-size: 10.5px; }
.form-section-title { display: flex; align-items: center; gap: 8px; margin: 22px 0 13px; font-size: 12px; font-weight: 680; }
.form-section-title::after { content: ""; flex: 1; height: 1px; background: #f0f2f6; }
.check-line { display: flex; align-items: flex-start; gap: 8px; font-size: 10.5px; color: var(--muted); line-height: 1.6; cursor: pointer; }
.check-line input { margin-top: 2px; }
.check-line a { color: var(--brand); }

.submit-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(290px, .75fr); gap: 16px; align-items: start; }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-xs); }
.form-card-head { padding: 18px 20px 0; }
.form-card-head h3 { margin: 0; font-size: 14px; font-weight: 680; }
.form-card-head p { margin: 4px 0 0; color: var(--soft); font-size: 10.5px; }
.form-card-body { padding: 18px 20px 20px; }
.form-card-foot { padding: 14px 20px; border-top: 1px solid #f0f2f6; background: #fcfdff; display: flex; align-items: center; gap: 10px; border-radius: 0 0 var(--radius) var(--radius); }
.form-card-foot .hint { flex: 1; color: var(--soft); font-size: 10px; }
.submit-side { display: flex; flex-direction: column; gap: 14px; }
.side-card { padding: 17px 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-xs); }
.side-card h4 { margin: 0 0 11px; font-size: 12px; font-weight: 680; display: flex; align-items: center; gap: 7px; }
.side-card p { margin: 0; color: var(--muted); font-size: 10.5px; line-height: 1.75; }
.guide-list { display: flex; flex-direction: column; gap: 10px; }
.guide-item { display: flex; gap: 9px; align-items: flex-start; }
.guide-no { width: 19px; height: 19px; flex: none; border-radius: 6px; background: #eef2ff; color: #4f46e5; font-size: 9px; font-weight: 700; display: flex; align-items: center; justify-content: center; font-family: var(--mono); }
.guide-item b { display: block; font-size: 10.5px; font-weight: 600; }
.guide-item small { display: block; color: var(--soft); font-size: 9.5px; margin-top: 1px; line-height: 1.55; }

/* 上传区 */
.upload-zone {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 168px; padding: 22px;
  border: 1.5px dashed #cfd7e3; border-radius: 12px;
  background: linear-gradient(180deg, #fbfcfe, #f8fafc);
  text-align: center; cursor: pointer; outline: none;
  transition: border-color .16s, background .16s, box-shadow .16s;
}
.upload-zone:hover, .upload-zone:focus-visible, .upload-zone.dragover { border-color: #818cf8; background: #f5f6ff; box-shadow: 0 0 0 4px rgba(99, 102, 241, .06); }
.upload-zone.has-image { padding: 0; min-height: 0; overflow: hidden; border-style: solid; border-color: #e4e7ec; background: #fff; }
.upload-zone input[type=file] { display: none; }
.upload-icon { width: 42px; height: 42px; margin-bottom: 9px; border-radius: 12px; background: #fff; border: 1px solid #e9edf3; color: #6366f1; display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-xs); }
.upload-zone b { font-size: 12px; font-weight: 650; }
.upload-zone p { margin: 4px 0 0; color: var(--soft); font-size: 10.5px; }
.upload-zone .upload-types { margin-top: 9px; display: flex; gap: 5px; }
.upload-zone .upload-types span { padding: 2px 6px; border-radius: 4px; background: #fff; border: 1px solid #edf0f5; color: #98a2b3; font-size: 8.5px; font-weight: 600; }
.upload-preview { position: relative; width: 100%; background: #0f172a; }
.upload-preview img { width: 100%; max-height: 340px; object-fit: contain; margin: 0 auto; }
.upload-preview-bar { position: absolute; left: 0; right: 0; bottom: 0; padding: 9px 12px; background: linear-gradient(transparent, rgba(0, 0, 0, .72)); display: flex; align-items: center; gap: 8px; color: #fff; font-size: 10px; }
.upload-preview-bar .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-remove { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border: 0; border-radius: 50%; background: rgba(15, 23, 42, .62); color: #fff; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px); }
.upload-remove:hover { background: rgba(15, 23, 42, .85); }
.upload-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px; background: rgba(255, 255, 255, .88); color: var(--muted); font-size: 10.5px; }
.spinner { width: 24px; height: 24px; border-radius: 50%; border: 2.5px solid #e0e7ff; border-top-color: #6366f1; animation: spin .75s linear infinite; }

.submit-success { display: flex; gap: 11px; align-items: flex-start; padding: 14px 15px; border: 1px solid #a6f4c5; background: #f0fdf4; border-radius: 11px; margin-bottom: 15px; animation: pop .22s ease; }
.submit-success .success-icon { width: 30px; height: 30px; flex: none; border-radius: 50%; background: #d1fadf; color: #079455; display: flex; align-items: center; justify-content: center; }
.submit-success b { display: block; font-size: 11.5px; color: #05603a; }
.submit-success p { margin: 2px 0 0; font-size: 10px; color: #067647; }

/* ============================================================
   详情抽屉 / 时间线 / 截图
   ============================================================ */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(10, 17, 30, .46); backdrop-filter: blur(3px); }
.overlay.closing { animation: fadeOut .16s ease forwards; }
.drawer-overlay { display: flex; justify-content: flex-end; animation: fadeIn .18s ease; }
.drawer { width: min(540px, 94vw); height: 100%; display: flex; flex-direction: column; background: #fff; box-shadow: -20px 0 70px rgba(10, 17, 30, .22); transform: translateX(28px); opacity: .4; transition: transform .24s cubic-bezier(.2, .8, .2, 1), opacity .2s; }
.drawer.in { transform: translateX(0); opacity: 1; }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 15px; border-bottom: 1px solid #f0f2f6; }
.drawer-head h3 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -.02em; }
.drawer-head p { margin: 4px 0 0; color: var(--soft); font-size: 10px; font-family: var(--mono); }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 22px 24px; background: #fcfdff; }
.drawer-foot { padding: 13px 22px; border-top: 1px solid #eef1f6; background: #fff; display: flex; gap: 8px; align-items: center; }
.drawer-foot .spacer { flex: 1; }
.detail-hero { display: flex; align-items: center; gap: 13px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #fff; margin-bottom: 14px; }
.detail-hero .dh-main { flex: 1; min-width: 0; }
.detail-hero h4 { margin: 0; font-size: 17px; font-weight: 720; letter-spacing: -.02em; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.detail-hero .dh-sub { margin-top: 3px; color: var(--soft); font-size: 10.5px; }
.detail-hero-actions { display: flex; gap: 4px; }
.detail-call { display: inline-flex; align-items: center; gap: 5px; height: 31px; padding: 0 10px; border: 1px solid #d1e9ff; border-radius: 8px; background: #eff8ff; color: #175cd3; font-size: 11px; font-weight: 650; }
.detail-call:hover { background: #e0f2fe; }
.detail-section { margin-bottom: 15px; }
.detail-section-title { display: flex; align-items: center; gap: 7px; margin: 0 0 9px; font-size: 11px; font-weight: 680; color: var(--ink-2); }
.detail-section-title .count { color: var(--soft); font-weight: 500; }
.detail-section-title::after { content: ""; flex: 1; height: 1px; background: #f0f2f6; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--line); }
.info-cell { padding: 10px 12px; background: #fff; min-width: 0; }
.info-cell.full { grid-column: 1 / -1; }
.info-cell span { display: block; color: var(--soft); font-size: 9px; margin-bottom: 2px; }
.info-cell b { display: block; font-size: 11.5px; font-weight: 550; color: var(--ink-2); overflow-wrap: anywhere; }
.info-cell b.mono { font-size: 12px; }
.note-box { padding: 11px 13px; border-left: 3px solid #c7d2fe; border-radius: 0 8px 8px 0; background: #f8f9ff; color: var(--ink-2); font-size: 11px; line-height: 1.7; white-space: pre-wrap; }
.shot-box { position: relative; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: #f8fafc; }
.shot-box img { width: 100%; max-height: 360px; object-fit: contain; cursor: zoom-in; background: #fff; }
.shot-meta { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-top: 1px solid #eef1f6; background: #fff; color: var(--soft); font-size: 9.5px; }
.shot-empty { padding: 26px; text-align: center; color: var(--soft); font-size: 10.5px; border: 1px dashed #dfe4ec; border-radius: 10px; background: #fbfcfe; }
.timeline { position: relative; padding-left: 16px; }
.timeline::before { content: ""; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 1px; background: #e9edf3; }
.timeline-item { position: relative; padding: 0 0 15px 12px; }
.timeline-item:last-child { padding-bottom: 2px; }
.timeline-dot { position: absolute; left: -16px; top: 4px; width: 9px; height: 9px; border-radius: 50%; background: #cbd5e1; border: 2px solid #fff; box-shadow: 0 0 0 1px #e2e8f0; }
.timeline-item.submit .timeline-dot { background: #38bdf8; box-shadow: 0 0 0 1px #bae6fd; }
.timeline-item.accept .timeline-dot { background: #f59e0b; box-shadow: 0 0 0 1px #fde68a; }
.timeline-item.assign .timeline-dot { background: #818cf8; box-shadow: 0 0 0 1px #c7d2fe; }
.timeline-item.status .timeline-dot { background: #34d399; box-shadow: 0 0 0 1px #a7f3d0; }
.timeline-item.note .timeline-dot { background: #94a3b8; }
.timeline-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.timeline-head b { font-size: 11px; font-weight: 650; }
.timeline-head span { color: var(--soft); font-size: 9.5px; }
.timeline-text { margin-top: 3px; color: var(--muted); font-size: 10.5px; line-height: 1.65; }
.detail-action-card { padding: 14px; border: 1px solid #e4e8f2; border-radius: 12px; background: #fff; margin-bottom: 14px; }
.detail-action-card h4 { margin: 0 0 10px; font-size: 11px; font-weight: 680; display: flex; align-items: center; gap: 6px; }
.detail-action-row { display: flex; gap: 8px; align-items: center; }
.detail-action-row .select-wrap { flex: 1; }
.detail-action-row .select-wrap select { width: 100%; }
.status-picker { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 10px; }
.status-picker button { height: 27px; padding: 0 9px; border: 1px solid #e7ebf2; border-radius: 7px; background: #fff; color: var(--muted); font-size: 10.5px; font-weight: 550; }
.status-picker button:hover { border-color: #c7d2fe; color: var(--brand); }
.status-picker button.on { border-color: #c7d2fe; background: #eef2ff; color: var(--brand); font-weight: 650; }
.note-input { min-height: 60px; margin-bottom: 8px; }
.inline-actions { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }

/* 图片查看器 */
.lightbox { position: fixed; inset: 0; z-index: 150; background: rgba(6, 10, 18, .92); display: flex; align-items: center; justify-content: center; padding: 30px; animation: fadeIn .16s; }
.lightbox img { max-width: 94vw; max-height: 90vh; object-fit: contain; border-radius: 6px; box-shadow: 0 20px 80px rgba(0, 0, 0, .5); }
.lightbox-close { position: absolute; top: 20px; right: 22px; width: 38px; height: 38px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 50%; background: rgba(255, 255, 255, .08); color: #fff; display: flex; align-items: center; justify-content: center; }
.lightbox-close:hover { background: rgba(255, 255, 255, .15); }

/* ============================================================
   弹窗 / Toast
   ============================================================ */
.modal-overlay { display: flex; align-items: center; justify-content: center; padding: 20px; animation: fadeIn .16s; }
.modal { width: min(520px, 96vw); max-height: 90vh; display: flex; flex-direction: column; background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; animation: modalIn .2s cubic-bezier(.2, .8, .2, 1); }
.modal-sm { width: min(400px, 94vw); }
.modal-lg { width: min(680px, 96vw); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 19px 21px 13px; border-bottom: 1px solid #f0f2f6; }
.modal-head h3 { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: -.02em; }
.modal-head p { margin: 4px 0 0; color: var(--soft); font-size: 10.5px; }
.modal-body { padding: 18px 21px; overflow-y: auto; }
.modal-foot { padding: 13px 21px; border-top: 1px solid #f0f2f6; display: flex; justify-content: flex-end; gap: 8px; background: #fcfdff; }
.confirm-text { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-2); }
.confirm-text > svg { color: #f79009; margin-top: 1px; }
.confirm-text p { margin: 0; font-size: 12.5px; line-height: 1.7; }
.toast-wrap, #toast-root { position: fixed; z-index: 200; left: 50%; bottom: 30px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; width: min(90vw, 420px); }
.toast { display: flex; align-items: center; gap: 9px; max-width: 100%; padding: 11px 15px; border-radius: 10px; background: #101828; color: #f8fafc; font-size: 12px; box-shadow: 0 14px 40px rgba(16, 24, 40, .28); opacity: 0; transform: translateY(10px) scale(.98); transition: opacity .2s, transform .2s; }
.toast-in { opacity: 1; transform: translateY(0) scale(1); }
.toast-ok { background: #054f31; }
.toast-err { background: #7a271a; }
.toast-info { background: #1d2939; }
.toast svg { flex: none; }
.modal .form-grid { gap: 13px; }
.modal .field-label { margin-bottom: 6px; }
.modal .input, .modal .select { height: 39px; }
.modal .textarea { min-height: 76px; }
.line-form-channels { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; max-height: 160px; overflow-y: auto; padding: 8px; border: 1px solid #edf0f5; border-radius: 9px; background: #fbfcfe; }
.check-tile { display: flex; align-items: center; gap: 7px; padding: 7px 8px; border: 1px solid transparent; border-radius: 7px; font-size: 10.5px; cursor: pointer; }
.check-tile:hover { background: #f5f7fb; }
.check-tile:has(input:checked) { border-color: #c7d2fe; background: #eef2ff; color: var(--brand); }
.check-tile input { width: 13px; height: 13px; accent-color: var(--brand); }
.generated-password { padding: 10px 12px; border: 1px solid #d1fadf; border-radius: 9px; background: #ecfdf3; color: #05603a; font-size: 11px; line-height: 1.65; }
.generated-password code { font-family: var(--mono); font-size: 14px; font-weight: 700; letter-spacing: .08em; }
.role-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 14px; }
.role-picker button { padding: 8px 6px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--muted); font-size: 10.5px; font-weight: 600; }
.role-picker button.on { border-color: #c7d2fe; background: #eef2ff; color: var(--brand); }
.password-row { display: flex; align-items: center; gap: 7px; }
.password-row .input { flex: 1; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 15px; }

/* ============================================================
   动画
   ============================================================ */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@keyframes pop { from { opacity: 0; transform: translateY(4px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1280px) {
  .line-grid, .agent-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-grid { gap: 12px; }
  .login-shell { grid-template-columns: minmax(470px, 1fr) minmax(430px, .92fr); }
  .flow-card { gap: 8px; padding: 16px 17px; }
  .flow-item { gap: 8px; }
  .flow-item small { display: none; }
  .hero-metrics { gap: 30px; }
}

@media (max-width: 1120px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); }
  .topbar-search { width: 220px; }
  .user-trigger-copy { display: none; }
}

@media (max-width: 980px) {
  .sidebar { transform: translateX(-100%); box-shadow: 20px 0 60px rgba(0, 0, 0, .25); }
  .sidebar.mobile-open { transform: translateX(0); }
  .app-main { margin-left: 0; }
  .mobile-menu-btn { display: inline-flex; }
  .topbar { height: 64px; }
  .page-content { padding-bottom: 92px; }
  .mobile-nav {
    position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 80;
    display: flex; align-items: center; justify-content: space-around; gap: 2px;
    padding: 6px 8px; border: 1px solid rgba(226, 232, 240, .9); border-radius: 16px;
    background: rgba(255, 255, 255, .94); backdrop-filter: blur(18px);
    box-shadow: 0 12px 32px rgba(16, 24, 40, .14);
  }
  .mobile-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 54px; padding: 5px 4px; border-radius: 10px; color: #98a2b3; font-size: 9px; font-weight: 600; }
  .mobile-nav a.active { color: var(--brand); background: #eef2ff; }
  .mobile-nav .nav-badge { position: absolute; transform: translate(14px, -6px); min-width: 15px; height: 15px; font-size: 8px; }
  .mobile-nav a { position: relative; }
  .login-shell { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .login-panel { min-height: 100vh; padding: 24px 18px; justify-content: center; }
  .login-card { box-shadow: 0 18px 60px rgba(16, 24, 40, .08); }
  .mobile-brand { display: flex; }
  .submit-layout { grid-template-columns: 1fr; }
  .submit-side { display: grid; grid-template-columns: 1fr 1fr; }
  .user-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .audit-row { grid-template-columns: 108px 150px minmax(0, 1fr); }
  .audit-ip { display: none; }
  .drawer { width: min(520px, 96vw); }
}

@media (max-width: 760px) {
  .page-content { padding: 17px 14px 92px; }
  .topbar { padding: 0 14px; gap: 8px; }
  .topbar-search { display: none; }
  .page-heading h1 { font-size: 17px; }
  .page-eyebrow { font-size: 8px; }
  .topbar-sep { display: none; }
  .topbar-actions { margin-left: auto; }
  .user-trigger { padding: 3px; }
  .user-trigger > svg { display: none; }
  .user-menu { right: 12px; top: 57px; }
  .kpi-grid { gap: 9px; }
  .kpi-card { padding: 13px; }
  .kpi-value { font-size: 25px; }
  .kpi-label { font-size: 10.5px; }
  .kpi-foot { font-size: 9.5px; }
  .kpi-icon { width: 28px; height: 28px; }
  .dashboard-grid, .dashboard-grid.even { grid-template-columns: 1fr; gap: 12px; }
  .hero-banner { padding: 18px; flex-direction: column; align-items: flex-start; gap: 14px; }
  .hero-banner h2 { font-size: 20px; }
  .hero-actions { width: 100%; }
  .hero-actions .btn { flex: 1; }
  .hero-date { display: block; margin: 6px 0 0; }
  .line-grid, .agent-grid { grid-template-columns: 1fr; }
  .user-summary { grid-template-columns: 1fr 1fr; gap: 9px; }
  .summary-card { padding: 11px; }
  .submit-side { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .form-card-body { padding: 15px; }
  .form-card-head { padding: 15px 15px 0; }
  .form-card-foot { padding: 12px 15px; flex-wrap: wrap; }
  .form-card-foot .hint { flex: 1 0 100%; order: 2; }
  .form-card-foot .btn { flex: 1; }
  .field-label { font-size: 11.5px; }
  .status-tabs { margin-left: -14px; margin-right: -14px; border-radius: 0; border-left: 0; border-right: 0; padding: 4px 14px; }
  .filter-panel { padding: 10px; }
  .filter-row > .select-wrap { flex: 1; }
  .filter-row > .select-wrap select { width: 100%; }
  .filter-more { display: none; }
  .filter-more.show { display: flex; }
  .data-table th, .data-table td { padding-left: 9px; padding-right: 9px; }
  .data-table th:first-child, .data-table td:first-child { padding-left: 13px; }
  .data-table th:last-child, .data-table td:last-child { padding-right: 13px; }
  .data-table { min-width: 760px; }
  .data-table.min-sm { min-width: 640px; }
  .pager { padding: 10px 12px; }
  .modal-overlay { padding: 10px; align-items: flex-end; }
  .modal { width: 100%; max-height: 92vh; border-radius: 18px 18px 0 0; animation: sheetIn .22s cubic-bezier(.2, .8, .2, 1); }
  .modal-sm { width: 100%; }
  .modal-head { padding: 16px 17px 12px; }
  .modal-body { padding: 15px 17px; }
  .modal-foot { padding: 12px 17px calc(12px + env(safe-area-inset-bottom)); }
  .drawer { width: 100%; }
  .drawer-head { padding: 16px 17px 12px; }
  .drawer-body { padding: 15px 17px 22px; }
  .drawer-foot { padding: 12px 17px calc(12px + env(safe-area-inset-bottom)); }
  .info-grid { grid-template-columns: 1fr 1fr; }
  .audit-row { grid-template-columns: 1fr; gap: 3px; padding: 11px 15px; }
  .audit-actor { display: none; }
  .audit-time { order: -1; }
  .donut-wrap { gap: 13px; }
  .donut { width: 122px; height: 122px; }
  .donut-center b { font-size: 22px; }
  .merchant-row .merchant-name b { max-width: 105px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .queue-item { padding: 10px 14px; }
  .panel-head { padding: 14px 14px 0; }
  .panel-body { padding: 13px 14px 15px; }
  .toast-wrap, #toast-root { bottom: 84px; }
  .login-panel { padding: 16px 12px; }
  .login-card { padding: 25px 20px 20px; border-radius: 20px; }
  .login-head h2 { font-size: 23px; }
  .demo-grid { gap: 6px; }
  .demo-account { padding: 8px; }
  .login-privacy { font-size: 9.5px; }
}

@media (max-width: 460px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .kpi-value { font-size: 23px; }
  .kpi-spark { display: none; }
  .user-summary { grid-template-columns: 1fr 1fr; }
  .status-picker button { flex: 1 0 30%; }
  .detail-action-row { flex-direction: column; align-items: stretch; }
  .line-stats { margin-left: 0; margin-right: 0; }
  .flow-card { padding: 14px; }
  .flow-item b { font-size: 11px; }
  .demo-account b { font-size: 10.5px; }
  .demo-account small { font-size: 9px; }
}

@keyframes sheetIn { from { transform: translateY(30px); opacity: .6; } to { transform: translateY(0); opacity: 1; } }
