/* =========================================================
   通信助手 · 设计系统
   ========================================================= */
:root {
  --navy: #0b1f3a;
  --navy-2: #102a4d;
  --navy-3: #173a68;
  --brand: #2f6bff;
  --brand-2: #4b83ff;
  --brand-soft: #eaf1ff;
  --teal: #00a389;
  --amber: #f5a623;
  --red: #e05252;
  --purple: #7c5cff;
  --bg: #f4f7fc;
  --card: #ffffff;
  --text: #152238;
  --muted: #6d7c91;
  --line: #e6ebf4;
  --line-2: #eef2f8;
  --radius: 16px;
  --shadow: 0 8px 30px rgba(15, 35, 70, .06);
  --shadow-lg: 0 24px 70px rgba(15, 35, 70, .18);
  --sidebar-w: 236px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.35; }
::selection { background: rgba(47, 107, 255, .18); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #cfd9e8; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.flex { display: flex; align-items: center; gap: 10px; }
.flex-col { display: flex; flex-direction: column; gap: 10px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.gap-4 { gap: 4px; }
.gap-16 { gap: 16px; }
.icon { flex: 0 0 auto; vertical-align: -3px; }

/* ---------- 启动画面 ---------- */
.boot-splash {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
  background: radial-gradient(120% 120% at 50% 0%, #163d6e 0%, #0b1f3a 55%, #071528 100%);
  color: #fff;
}
.boot-logo { width: 64px; height: 64px; border-radius: 18px; box-shadow: 0 16px 40px rgba(0,0,0,.35); }
.boot-title { font-size: 24px; font-weight: 700; letter-spacing: 2px; margin-top: 10px; }
.boot-sub { color: #93aecd; font-size: 12px; letter-spacing: 2px; }

/* =========================================================
   登录页
   ========================================================= */
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(420px, .9fr);
  background: #fff;
}
.login-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  padding: 40px 56px 34px;
  background: radial-gradient(120% 140% at 88% 6%, #1d508f 0%, #102c55 42%, #0a1d36 72%, #071528 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
}
.login-hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.10) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: .35;
  mask-image: linear-gradient(135deg, #000 0%, transparent 62%);
  pointer-events: none;
}
.login-brand { display: flex; align-items: center; gap: 12px; position: relative; z-index: 2; }
.login-brand img { width: 42px; height: 42px; border-radius: 12px; box-shadow: 0 10px 24px rgba(0,0,0,.3); }
.login-brand .name { font-size: 22px; font-weight: 700; letter-spacing: 2px; }
.login-brand .sub { font-size: 11px; color: #9db6d4; letter-spacing: 3px; }
.login-copy { position: relative; z-index: 2; margin: 26px 0 auto; max-width: 620px; padding-top: 7vh; }
.login-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 99px; font-size: 11px; letter-spacing: 1.5px;
  color: #b7d2f4; background: rgba(90, 150, 240, .12); border: 1px solid rgba(120, 180, 255, .22);
}
.login-copy h1 { font-size: 46px; line-height: 1.28; margin: 20px 0 18px; font-weight: 700; letter-spacing: 1px; }
.login-copy h1 span { color: #7eb3ff; }
.login-copy p { color: #a9c0db; font-size: 15px; max-width: 480px; margin: 0; }
.login-points { list-style: none; margin: 30px 0 0; padding: 0; display: grid; gap: 12px; }
.login-points li { display: flex; align-items: center; gap: 10px; color: #c8d8ec; font-size: 13px; }
.login-points .pt-icon {
  width: 26px; height: 26px; border-radius: 8px; display: inline-flex;
  align-items: center; justify-content: center; color: #8fc2ff;
  background: rgba(80, 140, 230, .14); border: 1px solid rgba(110, 170, 255, .18);
}
.login-foot { position: relative; z-index: 2; font-size: 11px; color: #7d97b5; display: flex; gap: 8px; align-items: center; padding-top: 4vh; }
.login-globe { position: absolute; right: -90px; bottom: -70px; width: 480px; height: 480px; opacity: .95; pointer-events: none; }
.globe-sphere {
  position: absolute; inset: 78px; border-radius: 50%;
  background: radial-gradient(circle at 36% 30%, #4f9bff 0%, #1560bf 42%, #0b3a7a 68%, #061c3c 100%);
  box-shadow: 0 0 90px rgba(63, 140, 255, .3), inset -34px -46px 90px rgba(0, 0, 0, .45);
}
.globe-sphere::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background-image: radial-gradient(rgba(180, 220, 255, .55) 1.1px, transparent 1.1px);
  background-size: 15px 15px;
  opacity: .28;
  mask-image: radial-gradient(circle at 40% 35%, #000 55%, transparent 78%);
}
.globe-ring {
  position: absolute; inset: 44px; border-radius: 50%;
  border: 1px solid rgba(120, 180, 255, .38);
  transform: rotate(-20deg) scaleY(.42);
}
.globe-ring.r2 { inset: 22px; transform: rotate(26deg) scaleY(.5); border-color: rgba(120, 180, 255, .18); }
.globe-ring.r3 { inset: 4px; transform: rotate(78deg) scaleY(.38); border-color: rgba(120, 180, 255, .12); }
.globe-dot { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: #9fd0ff; box-shadow: 0 0 14px rgba(159, 208, 255, .9); }
.globe-dot.d1 { top: 24%; left: 62%; }
.globe-dot.d2 { top: 58%; left: 30%; background: #ffd166; box-shadow: 0 0 14px rgba(255, 209, 102, .9); }
.globe-dot.d3 { top: 70%; left: 70%; }
.globe-dot.d4 { top: 40%; left: 78%; background: #6ee7d8; box-shadow: 0 0 14px rgba(110, 231, 216, .9); }

.login-panel { display: flex; align-items: center; justify-content: center; padding: 48px 40px; background: #f7f9fd; }
.login-card { width: min(430px, 100%); background: #fff; border: 1px solid #eef2f8; border-radius: 22px; padding: 32px; box-shadow: 0 24px 70px rgba(15, 35, 70, .10); }
.login-card h2 { margin: 0 0 4px; font-size: 24px; }
.login-card .login-sub { color: var(--muted); font-size: 13px; margin: 0 0 22px; }
.login-tabs { display: flex; gap: 6px; background: #f1f5fb; padding: 4px; border-radius: 12px; margin-bottom: 22px; }
.login-tabs button {
  flex: 1; height: 36px; border: 0; background: transparent; border-radius: 9px;
  color: #64748b; font-size: 13px; font-weight: 600; transition: .15s;
}
.login-tabs button.active { background: #fff; color: var(--navy); box-shadow: 0 2px 8px rgba(20, 45, 80, .08); }
.login-form .field { margin-bottom: 14px; }
.login-form .input { height: 46px; background: #fbfcff; }
.login-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 18px; font-size: 12px; color: var(--muted); }
.checkbox { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font-size: 12px; color: #52627a; }
.checkbox input { width: 15px; height: 15px; accent-color: var(--brand); }
.login-submit { width: 100%; height: 46px; font-size: 15px; }
.demo-box { margin-top: 24px; border-top: 1px dashed var(--line); padding-top: 18px; }
.demo-box .demo-title { font-size: 11px; color: var(--muted); letter-spacing: 1px; margin-bottom: 10px; }
.demo-chip {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px;
  margin-bottom: 8px; cursor: pointer; background: #fbfcff; transition: .15s;
}
.demo-chip:hover { border-color: #b9cdf5; background: #f5f9ff; }
.demo-chip .who { font-size: 12px; font-weight: 600; }
.demo-chip .acct { font-size: 11px; color: var(--muted); font-family: Consolas, monospace; }
.login-tip { margin-top: 18px; font-size: 11px; line-height: 1.7; color: #93a2b8; }
.login-install { display: flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 11px; color: var(--muted); }

/* =========================================================
   应用框架
   ========================================================= */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
  position: sticky; top: 0; height: 100vh;
  background: linear-gradient(180deg, #091b33 0%, #0d2748 52%, #0a1e39 100%);
  color: #fff; padding: 20px 14px 16px;
  display: flex; flex-direction: column; gap: 18px;
  overflow-y: auto;
}
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 8px; }
.sidebar-brand img { width: 38px; height: 38px; border-radius: 11px; box-shadow: 0 8px 20px rgba(0,0,0,.28); }
.sidebar-brand .name { font-size: 17px; font-weight: 700; letter-spacing: 1.5px; line-height: 1.2; }
.sidebar-brand .sub { font-size: 9px; color: #7f9cbe; letter-spacing: 2px; margin-top: 2px; }
.nav-group { display: flex; flex-direction: column; gap: 3px; }
.nav-label { font-size: 10px; letter-spacing: 2px; color: #607d9e; padding: 10px 12px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  height: 42px; padding: 0 12px; border-radius: 10px;
  color: #a9bfd9; font-size: 13px; text-decoration: none;
  transition: background .15s, color .15s; position: relative;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active {
  background: linear-gradient(100deg, #2f6bff, #4b83ff);
  color: #fff; box-shadow: 0 8px 20px rgba(25, 80, 190, .35);
}
.nav-item .nav-icon { width: 20px; display: flex; justify-content: center; opacity: .95; }
.nav-item .nav-badge {
  margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: #ff5d5d; color: #fff; font-size: 10px; display: inline-flex; align-items: center; justify-content: center;
}
.sidebar-spacer { flex: 1; }
.sidebar-foot { border-top: 1px solid rgba(255,255,255,.09); padding-top: 12px; }
.user-mini { display: flex; align-items: center; gap: 10px; padding: 8px 8px; border-radius: 12px; cursor: pointer; transition: .15s; }
.user-mini:hover { background: rgba(255,255,255,.06); }
.user-mini .meta { flex: 1; min-width: 0; }
.user-mini .meta .n { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-mini .meta .r { font-size: 10px; color: #7f9cbe; }
.user-mini .logout { color: #7f9cbe; display: flex; padding: 4px; }
.user-mini .logout:hover { color: #fff; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 70;
  height: 64px; display: flex; align-items: center; gap: 16px;
  padding: 0 28px;
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.topbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar-mobile-title { font-size: 16px; font-weight: 700; white-space: nowrap; }
.topbar-search { position: relative; width: min(360px, 34vw); }
.topbar-search .input { padding-left: 36px; height: 38px; background: #f6f8fc; border-color: transparent; }
.topbar-search .input:focus { background: #fff; border-color: var(--brand); }
.topbar-search .search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #8b9bb0; pointer-events: none; display: flex; }
.search-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px);
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-lg); padding: 6px; z-index: 90;
  max-height: 360px; overflow: auto;
}
.search-result {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; cursor: pointer;
}
.search-result:hover { background: #f4f8ff; }
.search-result .sr-name { font-size: 13px; font-weight: 600; }
.search-result .sr-sub { font-size: 11px; color: var(--muted); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.date-chip { font-size: 11px; color: var(--muted); padding: 0 10px; white-space: nowrap; }
.topbar-avatar { cursor: pointer; border-radius: 50%; overflow: hidden; display: flex; }
.topbar .mobile-only { flex: 0 0 auto; }
.has-dot { position: relative; }
.has-dot::after { content: ""; position: absolute; right: 7px; top: 6px; width: 7px; height: 7px; border-radius: 50%; background: #ff5d5d; border: 2px solid #fff; }

.view { width: 100%; max-width: 1480px; margin: 0 auto; padding: 26px 32px 64px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; margin: 0 0 4px; letter-spacing: .3px; }
.page-head p { margin: 0; color: var(--muted); font-size: 13px; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.page-actions .btn { height: 38px; }

.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 95; display: none;
  background: rgba(255,255,255,.97); backdrop-filter: blur(18px);
  border-top: 1px solid var(--line);
  padding: 5px 6px calc(5px + env(safe-area-inset-bottom));
}
.bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 0 4px; font-size: 10px; color: #8a99ad; text-decoration: none; border-radius: 10px;
}
.bottom-nav a.active { color: var(--brand); }
.bottom-nav a .bn-icon { height: 22px; display: flex; align-items: center; justify-content: center; }
.bottom-nav .dial-tab { position: relative; }
.bottom-nav .dial-fab {
  width: 50px; height: 50px; margin-top: -30px; border-radius: 50%;
  background: linear-gradient(135deg, #2f6bff, #1f56e0); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px rgba(47,107,255,.4); border: 4px solid #fff;
}
.bottom-nav .dial-tab span.label { margin-top: 1px; }
.bottom-nav .dial-tab.active { color: var(--brand); }

/* 移动端全功能菜单 */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 210; background: rgba(8, 18, 34, .5);
  display: flex; align-items: flex-end; justify-content: center; opacity: 0; transition: .18s;
}
.sheet-backdrop.show { opacity: 1; }
.sheet {
  width: 100%; max-width: 560px; background: #fff; border-radius: 20px 20px 0 0;
  padding: 14px 16px calc(22px + env(safe-area-inset-bottom));
  transform: translateY(20px); transition: .2s; max-height: 86vh; overflow: auto;
}
.sheet-backdrop.show .sheet { transform: none; }
.sheet-handle { width: 38px; height: 4px; background: #dfe6f1; border-radius: 4px; margin: 0 auto 14px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 0 4px 10px; }
.sheet-head h3 { margin: 0; font-size: 16px; }
.sheet-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-bottom: 8px; }
.sheet-link {
  display: flex; align-items: center; gap: 10px; padding: 12px 12px;
  border: 1px solid var(--line); border-radius: 12px; color: #33475e; font-size: 13px; background: #fbfcff;
}
.sheet-link.active { border-color: #bcd2ff; background: #f0f5ff; color: var(--brand); }

/* =========================================================
   通用组件
   ========================================================= */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.card-head h3 { margin: 0; font-size: 15px; }
.card-head .sub { font-size: 11px; color: var(--muted); margin-top: 1px; }
.card-body { padding: 20px; }
.card-foot { padding: 12px 20px; border-top: 1px solid var(--line-2); }
.grid { display: grid; gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(320px, .9fr); gap: 18px; align-items: start; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 24px 0 12px; }
.section-title h2 { font-size: 16px; margin: 0; }
.section-title a { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 3px; }
.section-title a:hover { color: var(--brand); }
.divider { height: 1px; background: var(--line-2); margin: 16px 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent;
  background: #eef3fb; color: #243b5a; font-size: 13px; font-weight: 600;
  transition: transform .12s, box-shadow .15s, background .15s, color .15s;
  white-space: nowrap; text-decoration: none;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn.primary { background: linear-gradient(135deg, #2f6bff, #1f56e0); color: #fff; box-shadow: 0 6px 16px rgba(47,107,255,.24); }
.btn.primary:hover { box-shadow: 0 10px 22px rgba(47,107,255,.32); }
.btn.ghost { background: #fff; border-color: var(--line); color: #334a68; }
.btn.ghost:hover { border-color: #c8d6ea; background: #fafcff; }
.btn.soft { background: var(--brand-soft); color: var(--brand); }
.btn.success { background: linear-gradient(135deg, #00b894, #009e7f); color: #fff; box-shadow: 0 6px 16px rgba(0,163,137,.24); }
.btn.danger { background: #fff0f0; color: #d33; border-color: #ffd9d9; }
.btn.warn { background: #fff7e8; color: #b26a00; border-color: #ffe6bd; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 12px; border-radius: 8px; gap: 5px; }
.btn.lg { height: 46px; padding: 0 24px; font-size: 15px; border-radius: 12px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.icon-btn {
  width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; border: 1px solid transparent; background: transparent; color: #526480;
  transition: .15s; text-decoration: none;
}
.icon-btn:hover { background: #eef3fb; color: #1d3557; }
.icon-btn.sm { width: 30px; height: 30px; border-radius: 8px; }
.icon-btn.danger:hover { background: #fff0f0; color: #d33; }
.link-btn { border: 0; background: none; color: var(--brand); font-size: 12px; padding: 0; display: inline-flex; align-items: center; gap: 4px; }

/* 表单 */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.field > label { font-size: 12px; font-weight: 600; color: #42546d; display: flex; align-items: center; gap: 6px; }
.field .req { color: var(--red); }
.input, .select, .textarea {
  width: 100%; border: 1px solid #dfe6f1; background: #fbfcff; border-radius: 10px;
  padding: 9px 12px; font-size: 13px; color: var(--text); outline: none; transition: .15s; min-height: 40px;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(47,107,255,.12); background: #fff; }
.input::placeholder, .textarea::placeholder { color: #a4b1c2; }
.textarea { min-height: 88px; resize: vertical; line-height: 1.65; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b9bb0' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }
.hint { font-size: 11px; color: var(--muted); line-height: 1.6; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form .input { flex: 1; min-width: 140px; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13px; color: #42546d; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { width: 40px; height: 23px; border-radius: 99px; background: #d9e2ef; transition: .18s; position: relative; flex: 0 0 auto; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.2); transition: .18s; }
.switch input:checked + .track { background: linear-gradient(135deg, #2f6bff, #1f56e0); }
.switch input:checked + .track::after { transform: translateX(17px); }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 7px 0; color: #33475e; }

/* 徽章 / 头像 / 表格 */
.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px;
  border-radius: 6px; font-size: 11px; font-weight: 600; background: #eef3fb; color: #51637f; white-space: nowrap;
}
.badge.level-A { background: #fff0ed; color: #d9480f; }
.badge.level-B { background: #eaf1ff; color: #1f56e0; }
.badge.level-C { background: #e8f8f3; color: #00806c; }
.badge.level-D { background: #eef1f6; color: #6b7a90; }
.badge.green { background: #e7f8f1; color: #00806c; }
.badge.blue { background: #eaf1ff; color: #1f56e0; }
.badge.amber { background: #fff6e6; color: #b26a00; }
.badge.red { background: #fff0f0; color: #d33; }
.badge.purple { background: #f1edff; color: #6246d8; }
.badge.gray { background: #eef1f6; color: #6b7a90; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.tag {
  display: inline-flex; align-items: center; height: 21px; padding: 0 7px; border-radius: 5px;
  background: #f1f5fa; color: #5b6c83; font-size: 10.5px; white-space: nowrap;
}
.tag-list { display: flex; gap: 4px; flex-wrap: wrap; }
.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; font-weight: 600; flex: 0 0 auto; letter-spacing: .5px; user-select: none; }
.user-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.user-cell .name { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-cell .sub { font-size: 11px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge-stack { display: inline-flex; gap: 5px; flex-wrap: wrap; align-items: center; }

.table-wrap { width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; font-size: 11px; color: var(--muted); font-weight: 600;
  padding: 10px 14px; background: #f8fafd; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; font-size: 13px; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: #f8faff; }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .actions { display: flex; align-items: center; gap: 4px; justify-content: flex-end; }
.table .num { color: #33475e; }
.table-empty { padding: 50px 20px; text-align: center; color: var(--muted); font-size: 13px; }

/* 空状态 / 加载 */
.empty-state { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty-icon {
  width: 54px; height: 54px; border-radius: 16px; background: #f0f4fb; color: #91a4bd;
  display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px;
}
.empty-state h4 { margin: 0 0 4px; color: #42546d; font-size: 14px; }
.empty-state p { margin: 0 0 14px; font-size: 12px; }
.loading-box { padding: 70px 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; }
.spinner {
  width: 28px; height: 28px; border-radius: 50%;
  border: 3px solid #e3ebf7; border-top-color: var(--brand); animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.error-state { padding: 60px 24px; text-align: center; color: var(--muted); }
.error-state h3 { color: #42546d; }
.skeleton {
  background: linear-gradient(90deg, #eef2f8 25%, #f7f9fd 37%, #eef2f8 63%);
  background-size: 400% 100%; animation: shine 1.3s ease infinite; border-radius: 8px;
}
@keyframes shine { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* 分页 */
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.pagination .info { font-size: 12px; color: var(--muted); }
.pager { display: flex; gap: 5px; align-items: center; }
.pager button {
  min-width: 30px; height: 30px; padding: 0 7px; border: 1px solid var(--line);
  background: #fff; border-radius: 7px; font-size: 12px; color: #52627a;
}
.pager button.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager button:disabled { opacity: .4; cursor: not-allowed; }

/* =========================================================
   工作台
   ========================================================= */
.hero {
  position: relative; overflow: hidden; color: #fff; border-radius: 20px;
  padding: 26px 30px; margin-bottom: 18px;
  background: radial-gradient(130% 160% at 92% 4%, #1c4f8f 0%, #102c52 48%, #0a1d36 100%);
  box-shadow: 0 18px 44px rgba(10, 29, 56, .24);
  display: flex; justify-content: space-between; gap: 24px; align-items: flex-end;
}
.hero::after {
  content: ""; position: absolute; right: -80px; top: -110px; width: 360px; height: 360px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.13);
  box-shadow: 0 0 0 42px rgba(255,255,255,.035), 0 0 0 96px rgba(255,255,255,.02);
  pointer-events: none;
}
.hero-main { position: relative; z-index: 2; }
.hero-eyebrow { font-size: 11px; color: #9db6d4; letter-spacing: 1px; display: flex; align-items: center; gap: 8px; }
.hero h2 { font-size: 27px; margin: 8px 0 7px; font-weight: 700; letter-spacing: .5px; }
.hero p { color: #b5c9e1; margin: 0; font-size: 13px; }
.hero-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.hero-actions .btn.ghost { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); color: #eaf2ff; }
.hero-actions .btn.ghost:hover { background: rgba(255,255,255,.14); }
.hero-actions .btn.primary { background: #fff; color: #153a72; box-shadow: 0 10px 24px rgba(0,0,0,.18); }
.hero-stats { position: relative; z-index: 2; display: flex; gap: 26px; text-align: right; }
.hero-stats div { display: flex; flex-direction: column; gap: 3px; }
.hero-stats span { font-size: 11px; color: #9db6d4; }
.hero-stats strong { font-size: 27px; font-weight: 700; letter-spacing: .5px; }
.hero-stats em { font-style: normal; font-size: 11px; color: #8fe3cd; }
.hero-progress { margin-top: 14px; width: 230px; max-width: 48vw; }
.hero-progress .bar { height: 6px; border-radius: 99px; background: rgba(255,255,255,.14); overflow: hidden; }
.hero-progress .bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #6ea8ff, #8fe3cd); }
.hero-progress .lbl { font-size: 10px; color: #9db6d4; display: flex; justify-content: space-between; margin-bottom: 6px; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi {
  background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: 16px;
  box-shadow: var(--shadow); display: flex; gap: 13px; align-items: flex-start; position: relative; overflow: hidden;
}
.kpi::after { content: ""; position: absolute; right: -28px; bottom: -38px; width: 92px; height: 92px; border-radius: 50%; background: currentColor; opacity: .045; }
.kpi-icon { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.kpi .label { font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
.kpi .value { font-size: 25px; font-weight: 700; line-height: 1.15; letter-spacing: -.4px; }
.kpi .value small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.kpi .foot { font-size: 10.5px; color: var(--muted); margin-top: 5px; }
.kpi .foot .up { color: var(--teal); }
.kpi .foot .down { color: var(--red); }
.kpi.blue { color: var(--brand); }
.kpi.blue .kpi-icon { background: #eaf1ff; color: var(--brand); }
.kpi.teal { color: var(--teal); }
.kpi.teal .kpi-icon { background: #e7f8f1; color: var(--teal); }
.kpi.amber { color: var(--amber); }
.kpi.amber .kpi-icon { background: #fff6e6; color: #cf8500; }
.kpi.purple { color: var(--purple); }
.kpi.purple .kpi-icon { background: #f1edff; color: var(--purple); }

.panel-list { display: flex; flex-direction: column; }
.list-row { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.list-row:last-child { border-bottom: 0; }
.list-row .grow { min-width: 0; }
.list-row .title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .sub { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .end { margin-left: auto; text-align: right; flex: 0 0 auto; }
.list-row .end .time { font-size: 11px; color: var(--muted); }
.list-row.clickable { cursor: pointer; border-radius: 8px; padding-left: 6px; padding-right: 6px; margin: 0 -6px; }
.list-row.clickable:hover { background: #f8faff; }

.task-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.task-row:last-child { border-bottom: 0; }
.task-check {
  width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid #cdd8e8; background: #fff;
  display: inline-flex; align-items: center; justify-content: center; color: #fff; flex: 0 0 auto; margin-top: 2px;
}
.task-check.done { background: var(--teal); border-color: var(--teal); }
.task-row .t-title { font-size: 13px; line-height: 1.5; }
.task-row.done .t-title { color: #9aa8ba; text-decoration: line-through; }
.task-row .t-meta { font-size: 11px; color: var(--muted); margin-top: 2px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.priority-high { color: #d9480f; }

.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.quick-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 13px 6px;
  border-radius: 12px; background: #f8fafd; border: 1px solid var(--line-2);
  color: #46607e; font-size: 11px; text-decoration: none; transition: .15s;
}
.quick-item:hover { background: #f1f6ff; border-color: #d7e4fb; color: var(--brand); transform: translateY(-1px); }
.quick-item .qi-icon { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: #fff; color: var(--brand); box-shadow: 0 2px 8px rgba(20,45,80,.06); }

/* 筛选栏 */
.filter-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.filter-bar .input, .filter-bar .select { width: auto; min-width: 132px; height: 38px; background: #fff; }
.filter-bar .search-input { min-width: 220px; flex: 1; max-width: 340px; }
.filter-bar .spacer { flex: 1; }
.summary-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px;
  border-radius: 9px; background: #fff; border: 1px solid var(--line);
  font-size: 11.5px; color: var(--muted);
}
.chip strong { color: var(--text); font-size: 13px; }
.chip .dot { width: 6px; height: 6px; }

.mobile-list { display: flex; flex-direction: column; gap: 9px; }
.m-card { background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 13px; box-shadow: 0 2px 8px rgba(15,35,70,.03); }
.m-card.clickable { cursor: pointer; }
.m-card .m-top { display: flex; align-items: center; gap: 10px; }
.m-card .m-name { font-size: 14px; font-weight: 600; }
.m-card .m-sub { font-size: 11px; color: var(--muted); }
.m-card .m-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 9px; font-size: 11px; color: var(--muted); }
.m-card .m-actions { display: flex; gap: 6px; margin-top: 10px; }
.m-card .m-actions .btn { flex: 1; }

/* =========================================================
   弹窗 / 抽屉 / Toast
   ========================================================= */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 400; background: rgba(9, 20, 38, .52);
  backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center;
  padding: 20px; opacity: 0; transition: opacity .18s;
}
.modal-backdrop.show { opacity: 1; }
.modal {
  background: #fff; border-radius: 18px; width: 100%; max-width: 540px; max-height: 90vh;
  display: flex; flex-direction: column; box-shadow: var(--shadow-lg);
  transform: translateY(12px) scale(.99); transition: transform .18s;
}
.modal-backdrop.show .modal { transform: none; }
.modal.modal-lg { max-width: 820px; }
.modal.modal-xl { max-width: 980px; }
.modal-head { padding: 19px 22px; border-bottom: 1px solid var(--line-2); display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-head .sub { margin: 3px 0 0; font-size: 11.5px; color: var(--muted); }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--line-2); display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.modal-foot .left { margin-right: auto; }
.modal-close { flex: 0 0 auto; }

.toast-root { position: fixed; top: 76px; right: 22px; z-index: 900; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
  min-width: 220px; max-width: 380px; background: #fff; border: 1px solid var(--line);
  border-left: 3px solid var(--teal); border-radius: 10px; padding: 11px 14px;
  box-shadow: 0 14px 36px rgba(15,35,70,.16); font-size: 12.5px; color: #33475e;
  display: flex; align-items: flex-start; gap: 9px; pointer-events: auto;
  animation: toastIn .22s ease;
}
.toast.error { border-left-color: var(--red); }
.toast.info { border-left-color: var(--brand); }
.toast .t-icon { flex: 0 0 auto; margin-top: 1px; }
.toast.success .t-icon { color: var(--teal); }
.toast.error .t-icon { color: var(--red); }
.toast.info .t-icon { color: var(--brand); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* =========================================================
   拨号工作台
   ========================================================= */
.dialer-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.dialer-main { display: flex; flex-direction: column; gap: 16px; }
.dial-card { background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 22px; }
.dialer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.dialer-head h2 { margin: 0; font-size: 18px; }
.dialer-head p { margin: 2px 0 0; font-size: 11.5px; color: var(--muted); }
.segmented { display: inline-flex; padding: 3px; background: #eef3fa; border-radius: 10px; gap: 2px; }
.segmented button {
  border: 0; background: transparent; height: 32px; padding: 0 13px; border-radius: 8px;
  font-size: 12px; font-weight: 600; color: #64748b; transition: .15s; white-space: nowrap;
}
.segmented button.active { background: #fff; color: var(--navy); box-shadow: 0 2px 8px rgba(20,45,80,.09); }
.dialer-status { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #a8b6c8; }
.status-dot.ok { background: var(--teal); box-shadow: 0 0 0 3px rgba(0,163,137,.13); }
.status-dot.bad { background: var(--red); box-shadow: 0 0 0 3px rgba(224,82,82,.12); }
.status-dot.warn { background: var(--amber); }

.dial-number-wrap { position: relative; max-width: 420px; margin: 6px auto 0; }
.dial-number {
  width: 100%; border: 0; border-bottom: 2px solid #dbe5f3; background: transparent;
  text-align: center; font-size: 32px; font-weight: 700; letter-spacing: 2px;
  color: #102542; padding: 10px 36px 10px 10px; outline: none; min-height: 62px;
}
.dial-number:focus { border-bottom-color: var(--brand); }
.dial-backspace { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); color: #8b9bb0; }
.dial-hint { text-align: center; font-size: 11px; color: var(--muted); min-height: 20px; margin-top: 7px; }
.dial-hint.danger { color: var(--red); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 330px; margin: 16px auto 20px; }
.key {
  height: 56px; border-radius: 14px; border: 1px solid #e2e9f4; background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 600; color: #17324f; line-height: 1.05;
  box-shadow: 0 2px 6px rgba(20,45,80,.04); transition: .1s; user-select: none;
}
.key small { font-size: 8.5px; font-weight: 500; color: #93a2b8; letter-spacing: 1.5px; margin-top: 2px; }
.key:hover { background: #f8fbff; border-color: #cfdef4; }
.key:active { transform: scale(.96); background: #eef4ff; }
.dial-actions { display: flex; align-items: center; justify-content: center; gap: 18px; }
.call-btn {
  width: 68px; height: 68px; border-radius: 50%; border: 0; color: #fff;
  background: linear-gradient(135deg, #00b894, #009e7f);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 26px rgba(0,163,137,.34); transition: .15s;
}
.call-btn:hover { transform: translateY(-2px); }
.call-btn:disabled { opacity: .45; transform: none; box-shadow: none; }
.call-btn.secondary { width: 48px; height: 48px; background: #eef3fb; color: #52627a; box-shadow: none; }
.call-btn.secondary:hover { background: #e4ecf8; }
.dialer-usage { max-width: 330px; margin: 16px auto 0; }
.dialer-usage .bar { height: 6px; border-radius: 99px; background: #edf1f8; overflow: hidden; }
.dialer-usage .bar i { display: block; height: 100%; background: linear-gradient(90deg, #2f6bff, #6ea8ff); border-radius: 99px; }
.dialer-usage .lbl { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); margin-bottom: 5px; }

.customer-panel { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 16px; }
.customer-select-card .card-body { padding-top: 15px; }
.selected-customer { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 8px 0 4px; }
.selected-customer .name { font-size: 17px; font-weight: 700; margin-top: 9px; }
.selected-customer .co { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.selected-customer .badge-stack { margin-top: 9px; justify-content: center; }
.customer-kv { display: grid; grid-template-columns: auto 1fr; gap: 7px 12px; margin-top: 15px; font-size: 12px; }
.customer-kv .k { color: var(--muted); }
.customer-kv .v { color: #33475e; text-align: right; word-break: break-all; }
.queue-list { max-height: 430px; overflow-y: auto; margin: 0 -6px; }
.queue-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.queue-toolbar .segmented { padding: 2px; }
.queue-toolbar .segmented button { height: 28px; padding: 0 9px; font-size: 11px; }
.queue-toolbar .segmented button span { opacity: .62; margin-left: 2px; }
.queue-item { display: flex; align-items: center; gap: 9px; padding: 9px 6px; border-radius: 9px; cursor: pointer; }
.queue-item:hover { background: #f7faff; }
.queue-item .queue-remove { color: var(--muted); flex: 0 0 auto; }
.queue-item .queue-remove:hover { color: var(--red); background: #fff1f1; }
.queue-item .qi-name { font-size: 12.5px; font-weight: 600; }
.queue-item .qi-sub { font-size: 10.5px; color: var(--muted); }
.queue-item .end { margin-left: auto; flex: 0 0 auto; }
.customer-search { position: relative; }
.customer-search .search-drop {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line);
  border-radius: 11px; box-shadow: var(--shadow-lg); z-index: 40; max-height: 260px; overflow-y: auto; padding: 5px;
}
.customer-search .search-drop .item { display: flex; align-items: center; gap: 9px; padding: 8px; border-radius: 8px; cursor: pointer; }
.customer-search .search-drop .item:hover { background: #f4f8ff; }
.customer-search .search-drop .n { font-size: 12.5px; font-weight: 600; }
.customer-search .search-drop .s { font-size: 10.5px; color: var(--muted); }

/* 通话浮层 */
.call-overlay {
  position: fixed; inset: 0; z-index: 500; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 32px; text-align: center; color: #fff;
  background: radial-gradient(100% 100% at 50% 0%, #163f70 0%, #0a1d36 58%, #061424 100%);
}
.call-overlay::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.09) 1px, transparent 1px);
  background-size: 30px 30px; opacity: .3; mask-image: radial-gradient(circle at 50% 30%, #000 10%, transparent 65%);
  pointer-events: none;
}
.call-avatar { width: 92px; height: 92px; font-size: 32px; margin-bottom: 18px; box-shadow: 0 0 0 12px rgba(255,255,255,.06), 0 0 0 26px rgba(255,255,255,.03); position: relative; z-index: 2; }
.call-name { font-size: 24px; font-weight: 700; position: relative; z-index: 2; }
.call-phone { font-size: 13px; color: #9fb6d3; margin-top: 3px; letter-spacing: .5px; position: relative; z-index: 2; }
.call-status { margin-top: 18px; font-size: 12.5px; letter-spacing: 1px; color: #9fb6d3; position: relative; z-index: 2; display: flex; align-items: center; gap: 7px; }
.call-status .pulse { width: 8px; height: 8px; border-radius: 50%; background: #7ee6c7; animation: pulse 1.4s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(126,230,199,.5); } 50% { opacity: .6; box-shadow: 0 0 0 7px rgba(126,230,199,0); } }
.call-timer { font-size: 40px; font-weight: 300; font-variant-numeric: tabular-nums; margin: 10px 0 42px; letter-spacing: 2px; position: relative; z-index: 2; }
.call-controls { display: flex; gap: 22px; position: relative; z-index: 2; flex-wrap: wrap; justify-content: center; }
.call-control {
  width: 64px; height: 64px; border-radius: 50%; border: 0; color: #fff;
  background: rgba(255,255,255,.1); display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; font-size: 10px; backdrop-filter: blur(8px); transition: .15s;
}
.call-control:hover { background: rgba(255,255,255,.18); }
.call-control.on { background: #fff; color: #0b1f3a; }
.call-control.hangup { background: linear-gradient(135deg, #ff5d5d, #e03b3b); box-shadow: 0 10px 26px rgba(224,59,59,.35); }
.call-control.answer { background: linear-gradient(135deg, #00b894, #009e7f); box-shadow: 0 10px 26px rgba(0,163,137,.35); }
.call-control:disabled { opacity: .4; }
.call-overlay.incoming .call-avatar { animation: incomingPulse 1.7s ease-in-out infinite; }
@keyframes incomingPulse {
  0%, 100% { box-shadow: 0 0 0 12px rgba(255,255,255,.06), 0 0 0 26px rgba(255,255,255,.03); }
  50% { box-shadow: 0 0 0 18px rgba(0,163,137,.18), 0 0 0 36px rgba(0,163,137,.05); }
}
.call-overlay .mode-tag { position: absolute; top: 26px; left: 50%; transform: translateX(-50%); font-size: 11px; color: #8fa9c9; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); border-radius: 99px; padding: 5px 14px; letter-spacing: 1px; }
.call-overlay .call-note { margin-top: 34px; font-size: 11px; color: #7d97b5; max-width: 420px; line-height: 1.7; position: relative; z-index: 2; }
.auto-dial-banner {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 420;
  display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 16px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 14px 36px rgba(15,35,70,.18); font-size: 12px; color: #33475e;
  max-width: calc(100vw - 24px);
}
.auto-dial-banner b { color: var(--brand); }
@media (max-width: 1024px) {
  .auto-dial-banner { bottom: calc(78px + env(safe-area-inset-bottom)); }
}
.call-recording {
  position: absolute; top: 62px; right: 24px; z-index: 3;
  display: flex; align-items: center; gap: 4px; padding: 4px 9px;
  border-radius: 99px; background: rgba(224,82,82,.15); border: 1px solid rgba(224,82,82,.35);
  color: #ffb3b3; font-size: 10px; letter-spacing: .5px;
}
@media (max-width: 600px) {
  .call-recording { top: 52px; right: 14px; }
}

/* 批量分配 */
.bulk-list { max-height: 42vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; padding: 5px; background: #fbfcff; }
.bulk-row { display: flex; align-items: center; gap: 9px; padding: 8px 9px; border-radius: 8px; cursor: pointer; }
.bulk-row:hover { background: #f4f8ff; }
.bulk-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--brand); flex: 0 0 auto; }
.bulk-row .bulk-name { font-size: 12.5px; font-weight: 600; display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.bulk-row .bulk-sub { font-size: 10.5px; color: var(--muted); margin-top: 1px; }

/* 话术库 */
.script-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.script-card {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px;
  box-shadow: var(--shadow); cursor: pointer; display: flex; flex-direction: column; gap: 8px;
  transition: border-color .15s, transform .15s;
}
.script-card:hover { border-color: #cfe0ff; transform: translateY(-1px); }
.script-card h3 { font-size: 15px; margin: 0; }
.script-preview {
  font-size: 12px; color: #5a6d85; line-height: 1.8; white-space: pre-wrap;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 69px;
}
.script-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 10.5px; color: var(--muted); flex-wrap: wrap; }
.script-meta .tag { margin-right: 3px; }
.script-foot { display: flex; gap: 8px; margin-top: auto; padding-top: 4px; }
.script-actions { margin-left: auto; display: flex; gap: 2px; }
.script-content {
  white-space: pre-wrap; font-size: 13px; line-height: 1.95; background: #f8fafd;
  border: 1px solid var(--line-2); border-radius: 12px; padding: 16px; color: #33475e;
  max-height: 56vh; overflow: auto;
}
.script-picker { display: flex; flex-direction: column; gap: 10px; max-height: 62vh; overflow: auto; }
.script-item { background: #f8fafd; border: 1px solid var(--line-2); border-radius: 11px; padding: 11px 13px; }
.script-item h4 { margin: 0 0 2px; font-size: 13px; }
.script-item .script-preview { display: block; min-height: 0; -webkit-line-clamp: unset; overflow: visible; font-size: 11.5px; }
.script-item .row { display: flex; align-items: center; gap: 6px; }
.script-item .row .badge { flex: 0 0 auto; }
.script-item .row .btn { margin-left: auto; }
.modal-backdrop.above-call { z-index: 650; }
@media (max-width: 900px) {
  .script-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   通话记录 / 详情 / AI
   ========================================================= */
.summary-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.summary-item { background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 13px 16px; box-shadow: var(--shadow); }
.summary-item .l { font-size: 11px; color: var(--muted); }
.summary-item .v { font-size: 20px; font-weight: 700; margin-top: 2px; }
.summary-item .v small { font-size: 11px; color: var(--muted); font-weight: 500; }

.detail-head { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.detail-head .main { flex: 1; min-width: 0; }
.detail-head h3 { margin: 0; font-size: 19px; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.detail-head .sub { color: var(--muted); font-size: 11.5px; margin-top: 4px; display: flex; gap: 10px; flex-wrap: wrap; }
.detail-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 16px 0; }
.detail-kpi { background: #f8fafd; border: 1px solid var(--line-2); border-radius: 11px; padding: 11px 12px; }
.detail-kpi .l { font-size: 10.5px; color: var(--muted); }
.detail-kpi .v { font-size: 17px; font-weight: 700; margin-top: 1px; }
.section-label { font-size: 12px; font-weight: 600; color: #42546d; margin: 18px 0 8px; display: flex; align-items: center; gap: 6px; }
.audio-box { display: flex; align-items: center; gap: 12px; background: #f8fafd; border: 1px solid var(--line-2); border-radius: 12px; padding: 12px; flex-wrap: wrap; }
.audio-box audio { flex: 1; min-width: 220px; height: 38px; }
.audio-empty { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.analysis-card { border: 1px solid #e3ecfd; background: linear-gradient(180deg, #f8fbff, #ffffff); border-radius: 14px; padding: 16px; }
.analysis-top { display: flex; gap: 16px; align-items: center; }
.analysis-summary { flex: 1; font-size: 12.5px; line-height: 1.75; color: #3c4f66; }
.analysis-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.keyword { display: inline-flex; align-items: center; height: 23px; padding: 0 8px; border-radius: 6px; background: #eef4ff; color: #2f6bff; font-size: 10.5px; }
.next-action { margin-top: 12px; background: #fff; border: 1px dashed #d7e4fb; border-radius: 10px; padding: 10px 12px; font-size: 12px; color: #33475e; display: flex; gap: 8px; align-items: flex-start; }
.next-action strong { color: var(--brand); font-weight: 600; }
.score-ring { position: relative; flex: 0 0 auto; }
.score-ring svg { display: block; }
.score-num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; }
.score-num small { font-size: 9px; font-weight: 500; margin-left: 1px; margin-top: 6px; color: var(--muted); }
.analysis-empty { text-align: center; padding: 22px 14px; color: var(--muted); font-size: 12px; }
.analysis-empty .btn { margin-top: 10px; }
.analysis-note { font-size: 10px; color: #93a2b8; margin-top: 10px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tab { border: 0; background: none; padding: 10px 14px; font-size: 13px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }

.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding-bottom: 18px; }
.tl-item::before { content: ""; position: absolute; left: -22px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid var(--brand); }
.tl-item.call::before { border-color: var(--teal); }
.tl-item.task::before { border-color: var(--amber); }
.tl-item .tl-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-item .tl-title { font-size: 12.5px; font-weight: 600; }
.tl-item .tl-time { font-size: 10.5px; color: var(--muted); }
.tl-item .tl-body { font-size: 12px; color: #4b5f76; margin-top: 3px; line-height: 1.65; }
.tl-item .tl-tags { display: flex; gap: 5px; margin-top: 5px; flex-wrap: wrap; }

.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; }
.info-item { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; padding: 7px 0; border-bottom: 1px dashed var(--line-2); }
.info-item .k { color: var(--muted); flex: 0 0 auto; }
.info-item .v { text-align: right; word-break: break-all; }
.remark-box { background: #f8fafd; border: 1px solid var(--line-2); border-radius: 10px; padding: 11px 13px; font-size: 12.5px; color: #44586f; line-height: 1.7; }

/* =========================================================
   图表
   ========================================================= */
.chart { position: relative; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 11px; color: var(--muted); margin-top: 6px; align-items: center; }
.legend-dot { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-right: 5px; vertical-align: 0; }
.chart-empty { height: 200px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; }
.donut-wrap { position: relative; width: 172px; height: 172px; flex: 0 0 auto; margin: 0 auto; }
.donut-wrap svg { display: block; }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut-center strong { font-size: 24px; line-height: 1.1; }
.donut-center span { font-size: 10px; color: var(--muted); }
.legend-list { display: flex; flex-direction: column; gap: 9px; flex: 1; min-width: 0; }
.legend-row { display: flex; align-items: center; gap: 8px; font-size: 11.5px; }
.legend-row .nm { color: #52627a; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legend-row .vl { color: var(--muted); font-variant-numeric: tabular-nums; }
.legend-row .pc { color: #33475e; font-weight: 600; width: 38px; text-align: right; }
.donut-flex { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.hbar { height: 6px; border-radius: 99px; background: #eef2f8; overflow: hidden; flex: 1; min-width: 40px; }
.hbar i { display: block; height: 100%; border-radius: 99px; }
.leader-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: 12px; }
.leader-row:last-child { border-bottom: 0; }
.leader-row .rank { width: 20px; height: 20px; border-radius: 6px; background: #f0f4fa; color: #64748b; font-size: 10px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex: 0 0 auto; }
.leader-row .rank.top { background: #fff3df; color: #b26a00; }
.leader-row .nm { width: 66px; flex: 0 0 auto; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leader-row .met { width: 76px; flex: 0 0 auto; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.leader-row .bar-cell { flex: 1; min-width: 30px; display: flex; align-items: center; }
.report-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 18px; align-items: start; }

/* =========================================================
   日历提醒
   ========================================================= */
.calendar-card { padding: 18px; }
.calendar-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.calendar-head h3 { margin: 0; font-size: 16px; }
.calendar-head .nav { display: flex; gap: 4px; align-items: center; }
.calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-head { text-align: center; font-size: 10.5px; color: var(--muted); padding: 4px 0; }
.cal-cell {
  min-height: 66px; border-radius: 10px; background: #f8fafd; border: 1px solid transparent;
  padding: 6px 7px; font-size: 11.5px; cursor: pointer; transition: .12s; position: relative;
}
.cal-cell:hover { background: #f1f6ff; }
.cal-cell.other { opacity: .35; }
.cal-cell.today { border-color: #bcd2ff; background: #eef4ff; }
.cal-cell.selected { background: linear-gradient(135deg, #2f6bff, #1f56e0); border-color: #2f6bff; color: #fff; }
.cal-cell.selected .cal-dot { background: #fff; }
.cal-cell .day-num { font-weight: 600; }
.cal-dots { display: flex; gap: 3px; margin-top: 5px; flex-wrap: wrap; }
.cal-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--brand); }
.cal-count { position: absolute; right: 6px; top: 5px; font-size: 9px; color: var(--brand); }
.cal-cell.selected .cal-count { color: #fff; }
.task-detail-list { display: flex; flex-direction: column; }
.task-item { display: flex; align-items: flex-start; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.task-item:last-child { border-bottom: 0; }
.task-item .body { flex: 1; min-width: 0; }
.task-item .title { font-size: 13px; font-weight: 600; }
.task-item .desc { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.task-item.done .title { color: #9aa8ba; text-decoration: line-through; }
.task-item .task-actions { display: flex; gap: 2px; flex: 0 0 auto; }

/* =========================================================
   外勤打卡
   ========================================================= */
.checkin-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, .9fr); gap: 18px; align-items: start; }
.checkin-hero { background: radial-gradient(120% 140% at 90% 0%, #1c518f 0%, #102c52 50%, #0a1d36 100%); color: #fff; border-radius: 18px; padding: 22px; position: relative; overflow: hidden; }
.checkin-hero h3 { margin: 0 0 4px; font-size: 18px; }
.checkin-hero p { margin: 0; color: #a9c0db; font-size: 12px; }
.checkin-hero .loc { display: flex; align-items: center; gap: 7px; margin-top: 14px; font-size: 12px; color: #d7e6f7; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); padding: 9px 12px; border-radius: 10px; }
.checkin-form-card { margin-top: 16px; }
.checkin-list .checkin-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.checkin-item:last-child { border-bottom: 0; }
.checkin-item .c-icon { width: 34px; height: 34px; border-radius: 10px; background: #eaf1ff; color: var(--brand); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.checkin-item .c-body { flex: 1; min-width: 0; }
.checkin-item .c-title { font-size: 12.5px; font-weight: 600; display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.checkin-item .c-addr { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.checkin-item .c-time { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.trail-box { background: #f8fafd; border: 1px solid var(--line-2); border-radius: 12px; padding: 12px; margin-top: 10px; }
.trail-box svg { display: block; width: 100%; height: auto; }
.checkin-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.checkin-stat { background: #fff; border: 1px solid var(--line-2); border-radius: 10px; padding: 10px; text-align: center; }
.checkin-stat .v { font-size: 18px; font-weight: 700; }
.checkin-stat .l { font-size: 10px; color: var(--muted); }

/* =========================================================
   企业名片
   ========================================================= */
.card-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.biz-card {
  position: relative; overflow: hidden; border-radius: 22px; color: #fff;
  background: radial-gradient(120% 140% at 88% 0%, #1c518f 0%, #102c52 48%, #0a1d36 100%);
  padding: 30px; box-shadow: 0 22px 50px rgba(10,29,56,.22);
}
.biz-card::after { content: ""; position: absolute; right: -70px; top: -100px; width: 300px; height: 300px; border-radius: 50%; border: 1px solid rgba(255,255,255,.13); box-shadow: 0 0 0 36px rgba(255,255,255,.03), 0 0 0 80px rgba(255,255,255,.018); }
.biz-brand { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #b7cfe9; letter-spacing: 1px; position: relative; z-index: 2; }
.biz-brand img { width: 30px; height: 30px; border-radius: 9px; }
.biz-person { display: flex; align-items: center; gap: 18px; margin: 30px 0 22px; position: relative; z-index: 2; }
.biz-avatar { width: 78px; height: 78px; font-size: 28px; border: 3px solid rgba(255,255,255,.2); box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.biz-person .n { font-size: 26px; font-weight: 700; letter-spacing: 1px; }
.biz-person .t { font-size: 12px; color: #a9c0db; margin-top: 2px; }
.biz-info { display: flex; flex-direction: column; gap: 10px; position: relative; z-index: 2; }
.biz-info-row { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: #d6e5f6; }
.biz-info-row .ic { width: 26px; height: 26px; border-radius: 8px; background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; color: #9fc6f5; flex: 0 0 auto; }
.biz-foot { margin-top: 26px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.12); font-size: 10.5px; color: #7f9cbe; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; position: relative; z-index: 2; }
.qr-box { text-align: center; padding: 16px; }
.qr-canvas { display: inline-flex; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.qr-canvas img, .qr-canvas canvas { display: block; max-width: 100%; }
.company-box .intro { font-size: 12.5px; color: #4b5f76; line-height: 1.8; }
.copy-link { display: flex; gap: 8px; margin-top: 12px; }
.copy-link .input { font-size: 11px; color: var(--muted); }

/* =========================================================
   设置
   ========================================================= */
.settings-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; align-items: start; }
.settings-nav { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 8px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 3px; position: sticky; top: 84px; }
.settings-nav button {
  display: flex; align-items: center; gap: 9px; height: 40px; padding: 0 11px; border: 0; border-radius: 9px;
  background: transparent; color: #52627a; font-size: 12.5px; text-align: left;
}
.settings-nav button:hover { background: #f6f9fe; }
.settings-nav button.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.settings-panel { min-width: 0; }
.form-section { padding: 20px; }
.form-section + .form-section { border-top: 1px solid var(--line-2); }
.form-section h3 { margin: 0 0 4px; font-size: 15px; }
.form-section .desc { color: var(--muted); font-size: 11.5px; margin: 0 0 16px; }
.settings-tip { background: #f8fafd; border: 1px solid var(--line-2); border-radius: 10px; padding: 11px 13px; font-size: 11.5px; color: #5a6d85; line-height: 1.7; }
.blacklist-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.blacklist-row:last-child { border-bottom: 0; }
.blacklist-row .ph { font-family: Consolas, monospace; font-size: 13px; font-weight: 600; }
.blacklist-row .rs { font-size: 11px; color: var(--muted); }
.blacklist-row .end { margin-left: auto; }
.tag-manager { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-manager .tag { height: 28px; padding: 0 8px 0 11px; font-size: 12px; gap: 5px; }
.tag-manager .tag button { border: 0; background: none; color: #93a2b8; display: flex; padding: 0; }
.tag-manager .tag button:hover { color: var(--red); }
.storage-path { font-family: Consolas, monospace; font-size: 11px; background: #f4f7fc; padding: 8px 10px; border-radius: 8px; color: #52627a; word-break: break-all; }

/* =========================================================
   个人中心
   ========================================================= */
.profile-hero {
  position: relative; overflow: hidden; border-radius: 20px; color: #fff; padding: 26px;
  background: radial-gradient(120% 150% at 90% 0%, #1c518f 0%, #102c52 48%, #0a1d36 100%);
  display: flex; align-items: center; gap: 18px; box-shadow: 0 18px 44px rgba(10,29,56,.22);
}
.profile-hero::after { content: ""; position: absolute; right: -60px; top: -90px; width: 260px; height: 260px; border-radius: 50%; border: 1px solid rgba(255,255,255,.13); box-shadow: 0 0 0 34px rgba(255,255,255,.03); }
.profile-hero .info { position: relative; z-index: 2; min-width: 0; }
.profile-hero .n { font-size: 24px; font-weight: 700; }
.profile-hero .t { font-size: 12px; color: #a9c0db; margin-top: 2px; }
.profile-hero .c { font-size: 11px; color: #7f9cbe; margin-top: 6px; }
.profile-hero .edit { position: relative; z-index: 2; margin-left: auto; }
.profile-hero .edit .btn { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.18); color: #fff; }
.menu-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.menu-item {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 13px; color: #33475e;
  font-size: 12px; text-decoration: none; box-shadow: 0 2px 8px rgba(15,35,70,.03); transition: .15s;
}
.menu-item:hover { border-color: #c9d9f3; background: #fbfdff; transform: translateY(-1px); }
.menu-item .mi-icon { width: 40px; height: 40px; border-radius: 12px; background: #eef4ff; color: var(--brand); display: flex; align-items: center; justify-content: center; }
.menu-item.teal .mi-icon { background: #e7f8f1; color: var(--teal); }
.menu-item.amber .mi-icon { background: #fff6e6; color: #cf8500; }
.menu-item.purple .mi-icon { background: #f1edff; color: var(--purple); }
.profile-actions { display: flex; flex-direction: column; }
.profile-actions .pr-row { display: flex; align-items: center; gap: 12px; padding: 13px 4px; border-bottom: 1px solid var(--line-2); color: #33475e; cursor: pointer; font-size: 13px; }
.profile-actions .pr-row:last-child { border-bottom: 0; }
.profile-actions .pr-row:hover { color: var(--brand); }
.profile-actions .pr-row .end { margin-left: auto; color: #93a2b8; display: flex; align-items: center; }

/* 安装提示 */
.install-banner { display: flex; align-items: center; gap: 14px; background: linear-gradient(135deg, #eef4ff, #f8fbff); border: 1px solid #dbe8ff; border-radius: 14px; padding: 14px 16px; }
.install-banner .ib-icon { width: 38px; height: 38px; border-radius: 11px; background: #fff; color: var(--brand); display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.install-banner .ib-title { font-size: 12.5px; font-weight: 600; }
.install-banner .ib-sub { font-size: 11px; color: var(--muted); }
.install-banner .btn { margin-left: auto; flex: 0 0 auto; }

/* 标签选择器 */
.tag-picker { display: flex; flex-wrap: wrap; gap: 7px; padding: 8px; background: #fbfcff; border: 1px dashed #dfe6f1; border-radius: 10px; min-height: 42px; }
.tag-check { position: relative; cursor: pointer; font-size: 11.5px; }
.tag-check input { position: absolute; opacity: 0; pointer-events: none; }
.tag-check span { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 7px; background: #f1f5fa; color: #5b6c83; border: 1px solid transparent; transition: .12s; }
.tag-check input:checked + span { background: #eaf1ff; color: var(--brand); border-color: #cfe0ff; }
.tag-check:hover span { border-color: #cfe0ff; }

.summary-strip.six { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 1024px) { .summary-strip.six { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .summary-strip.six { grid-template-columns: repeat(2, 1fr); } }

.call-overlay .keypad .key { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.15); color: #fff; }
.call-overlay .keypad .key small { color: #9fb6d3; }
.call-overlay .keypad .key:hover { background: rgba(255,255,255,.16); }
.call-overlay .call-control svg { width: 20px; height: 20px; }

/* 公开名片页 */
.public-page { min-height: 100vh; background: radial-gradient(120% 130% at 50% 0%, #163d6e 0%, #0b1f3a 55%, #071528 100%); padding: 30px 16px 48px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.public-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 18px; font-weight: 700; letter-spacing: 1.5px; padding: 4px 0 8px; }
.public-brand img { width: 34px; height: 34px; border-radius: 10px; }
.public-card { width: min(460px, 100%); }
.public-company { width: min(460px, 100%); background: #fff; border-radius: 18px; padding: 20px; box-shadow: 0 20px 50px rgba(0,0,0,.2); }
.public-company h3 { margin: 0 0 6px; font-size: 15px; }
.public-company p { margin: 0; font-size: 12.5px; color: #4b5f76; line-height: 1.8; }
.public-company .pub-rows { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; font-size: 12px; color: #52627a; }
.public-company .pub-rows div { display: flex; gap: 8px; align-items: flex-start; }
.public-actions { display: flex; gap: 10px; width: min(460px, 100%); }
.public-actions .btn { flex: 1; }
.public-foot { color: #7d97b5; font-size: 11px; text-align: center; margin-top: 4px; }
.public-foot a { color: #9fc6f5; }
.public-empty { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #c8d8ec; gap: 10px; padding: 24px; text-align: center; }

/* 打印 */
@media print {
  .sidebar, .topbar, .bottom-nav, .page-actions, .filter-bar { display: none !important; }
  .view { padding: 0; }
  .app { display: block; }
}

/* =========================================================
   响应式
   ========================================================= */
@media (max-width: 1200px) {
  .dialer-layout { grid-template-columns: minmax(0, 1fr) 320px; }
  .report-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 18px; }
}
@media (max-width: 1100px) {
  .dash-grid { grid-template-columns: 1fr; }
  .card-layout { grid-template-columns: 1fr; }
  .checkin-grid { grid-template-columns: 1fr; }
}
@media (min-width: 1025px) {
  .mobile-only { display: none !important; }
}
@media (max-width: 1024px) {
  .sidebar { display: none; }
  .app { display: block; }
  .topbar { padding: 0 16px; height: 58px; gap: 8px; }
  .topbar-search { display: none; }
  .date-chip { display: none; }
  .view { padding: 16px 16px calc(92px + env(safe-area-inset-bottom)); max-width: 100%; }
  .bottom-nav { display: flex; }
  .mobile-only { display: initial; }
  .desktop-only { display: none !important; }
  .page-head { margin-bottom: 16px; }
  .page-head h1 { font-size: 21px; }
  .page-actions { width: 100%; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .summary-strip { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .hero { flex-direction: column; align-items: stretch; padding: 22px; gap: 18px; }
  .hero h2 { font-size: 23px; }
  .hero-stats { text-align: left; justify-content: space-between; }
  .hero-stats strong { font-size: 22px; }
  .hero-progress { width: 100%; max-width: none; }
  .dash-grid, .dialer-layout, .card-layout, .checkin-grid, .report-grid { grid-template-columns: 1fr; }
  .dialer-layout { display: flex; flex-direction: column; }
  .dialer-main { display: contents; }
  .dial-card { order: 1; }
  .customer-panel { order: 2; }
  .queue-card { order: 3; }
  .customer-panel { position: static; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { position: static; flex-direction: row; overflow-x: auto; padding: 6px; gap: 4px; }
  .settings-nav button { white-space: nowrap; padding: 0 12px; }
  .menu-grid { grid-template-columns: repeat(4, 1fr); }
  .quick-grid { grid-template-columns: repeat(4, 1fr); }
  .login-page { grid-template-columns: 1fr; }
  .login-hero { min-height: 250px; padding: 26px 24px; }
  .login-copy { padding-top: 10px; }
  .login-copy h1 { font-size: 30px; margin: 12px 0 10px; }
  .login-copy p { font-size: 12px; max-width: 320px; }
  .login-points, .login-foot { display: none; }
  .login-globe { width: 280px; height: 280px; right: -70px; bottom: -90px; opacity: .55; }
  .login-panel { padding: 24px 18px 40px; background: #fff; margin-top: -22px; position: relative; z-index: 3; border-radius: 22px 22px 0 0; }
  .login-card { box-shadow: none; border: 0; padding: 8px 4px; width: 100%; max-width: 460px; }
  .modal-backdrop { padding: 0; align-items: flex-end; }
  .modal { max-width: 100%; max-height: 92vh; border-radius: 18px 18px 0 0; }
  .modal.modal-lg, .modal.modal-xl { max-width: 100%; }
  .toast-root { top: 12px; left: 12px; right: 12px; }
  .toast { max-width: none; width: 100%; }
  .call-overlay { padding: 24px 18px; }
  .call-timer { font-size: 34px; margin-bottom: 34px; }
  .call-controls { gap: 16px; }
  .call-control { width: 58px; height: 58px; }
  .detail-kpis { grid-template-columns: repeat(2, 1fr); }
  .info-grid { grid-template-columns: 1fr; }
  .biz-card { padding: 24px; }
}
@media (max-width: 600px) {
  .topbar-mobile-title { font-size: 15px; }
  .hero { border-radius: 16px; }
  .hero-actions .btn { flex: 1; }
  .kpi { padding: 13px; gap: 10px; }
  .kpi .value { font-size: 21px; }
  .kpi-icon { width: 36px; height: 36px; border-radius: 10px; }
  .quick-grid { grid-template-columns: repeat(4, 1fr); gap: 7px; }
  .quick-item { padding: 10px 4px; font-size: 10.5px; }
  .menu-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .menu-item { padding: 13px 5px; font-size: 11px; }
  .menu-item .mi-icon { width: 36px; height: 36px; }
  .form-grid { grid-template-columns: 1fr; }
  .filter-bar { gap: 7px; }
  .filter-bar .search-input { max-width: none; width: 100%; flex: 1 0 100% !important; }
  .filter-bar .input, .filter-bar .select { flex: 1; min-width: 0; font-size: 12px; padding-left: 9px; padding-right: 24px; }
  .filter-bar select.select, .filter-bar input[type="date"] { flex: 1 1 calc(50% - 4px); }
  .filter-bar .icon-btn { flex: 0 0 36px; }
  .filter-bar .btn { flex: 0 0 auto; }
  .segmented { width: 100%; }
  .segmented button { flex: 1; padding: 0 8px; }
  .dialer-head { align-items: flex-start; }
  .dial-card { padding: 16px 14px; }
  .dial-number { font-size: 29px; }
  .keypad { max-width: 300px; gap: 8px; }
  .key { height: 52px; }
  .call-btn { width: 64px; height: 64px; }
  .call-overlay .mode-tag { top: 18px; }
  .call-avatar { width: 82px; height: 82px; }
  .call-name { font-size: 21px; }
  .call-controls { gap: 14px; }
  .call-control { width: 56px; height: 56px; font-size: 9px; }
  .call-timer { font-size: 31px; }
  .summary-strip { gap: 8px; }
  .summary-item { padding: 10px 12px; }
  .summary-item .v { font-size: 17px; }
  .detail-kpis { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .analysis-top { flex-direction: column; text-align: left; align-items: flex-start; }
  .score-ring { margin: 0 auto; }
  .checkin-stats { gap: 7px; }
  .cal-cell { min-height: 52px; padding: 4px 5px; font-size: 10.5px; }
  .cal-head { font-size: 9.5px; }
  .profile-hero { padding: 20px; }
  .profile-hero .n { font-size: 20px; }
  .profile-hero .edit { position: absolute; right: 16px; top: 16px; margin: 0; }
  .profile-hero .edit .btn span { display: none; }
  .install-banner { align-items: flex-start; flex-wrap: wrap; }
  .install-banner .btn { width: 100%; }
  .settings-nav { margin: 0 -2px; }
  .biz-person { gap: 14px; }
  .biz-person .n { font-size: 22px; }
  .biz-avatar { width: 66px; height: 66px; font-size: 24px; }
  .modal-head, .modal-body, .modal-foot { padding-left: 16px; padding-right: 16px; }
  .stat-inline { grid-template-columns: 1fr 1fr; }
}
