/* ============================================================
   厅店通 · 营业厅工作台
   设计语言：清爽蓝 + 深色导航，移动优先
   ============================================================ */

:root {
  --bg: #f2f5fa;
  --bg-soft: #f7f9fc;
  --card: #ffffff;
  --ink: #0e1a2f;
  --text: #1f2a3d;
  --muted: #6b7a90;
  --muted-2: #93a0b4;
  --line: #e6ebf2;
  --line-2: #eef2f7;
  --brand: #2457f5;
  --brand-deep: #1a41c9;
  --brand-soft: #eef3ff;
  --teal: #0ea5a0;
  --green: #12a15f;
  --green-soft: #e8f8f0;
  --amber: #e08600;
  --amber-soft: #fff6e6;
  --red: #e5484d;
  --red-soft: #fdeeee;
  --violet: #7c5cf0;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04);
  --shadow: 0 2px 6px rgba(16, 24, 40, .04), 0 12px 28px -12px rgba(16, 24, 40, .12);
  --shadow-lg: 0 24px 60px -20px rgba(16, 24, 40, .28);
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 18px;
  --r-xl: 24px;
  --sidebar-w: 236px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, h4, p { margin: 0; }
a { color: var(--brand); text-decoration: none; }
button { font-family: inherit; }
img, svg { display: block; }
::selection { background: rgba(36, 87, 245, .16); }

.ic {
  width: 20px; height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.ic-sm { width: 16px; height: 16px; }
.ic-lg { width: 24px; height: 24px; }

/* ---------- 启动 ---------- */
.boot {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
}
.boot-mark, .logo-mark {
  display: grid; place-items: center;
  width: 46px; height: 46px;
  border-radius: 13px;
  background: linear-gradient(145deg, #2f66ff, #1a41c9);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
  box-shadow: 0 10px 24px -10px rgba(36, 87, 245, .8);
  flex: none;
}
.boot-text { color: var(--muted); font-size: 13px; }

/* ---------- 通用 ---------- */
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.strong { font-weight: 700; }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.center { text-align: center; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 20px; }
.card-hd {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-2);
}
.card-hd h3 { font-size: 14.5px; font-weight: 700; letter-spacing: .2px; }
.card-hd .more { font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 2px; }
.card-hd .more:hover { color: var(--brand); }

.section-title {
  display: flex; align-items: center; justify-content: space-between;
  margin: 22px 2px 10px;
}
.section-title h2 { font-size: 15px; font-weight: 700; letter-spacing: .2px; }
.section-title a { font-size: 12.5px; color: var(--muted); }
.section-title a:hover { color: var(--brand); }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; font-weight: 800; letter-spacing: -.3px; }
.page-head p { color: var(--muted); font-size: 13px; margin-top: 3px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- 按钮 ---------- */
.btn {
  --btn-bg: #fff; --btn-ink: var(--text); --btn-bd: var(--line);
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; padding: 0 16px;
  border-radius: 11px;
  border: 1px solid var(--btn-bd);
  background: var(--btn-bg);
  color: var(--btn-ink);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .15s ease, background .15s ease, border-color .15s;
  white-space: nowrap;
  user-select: none;
}
.btn:hover { border-color: #cfd8e6; }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid rgba(36, 87, 245, .28); outline-offset: 1px; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary {
  --btn-bg: linear-gradient(180deg, #2f64ff, #2457f5); --btn-ink: #fff; --btn-bd: transparent;
  box-shadow: 0 6px 16px -8px rgba(36, 87, 245, .85);
}
.btn-primary:hover { --btn-bg: linear-gradient(180deg, #2457f5, #1e4be0); border-color: transparent; }
.btn-dark { --btn-bg: #12203c; --btn-ink: #fff; --btn-bd: transparent; }
.btn-soft { --btn-bg: var(--brand-soft); --btn-ink: var(--brand); --btn-bd: transparent; }
.btn-soft:hover { --btn-bg: #e3ebff; border-color: transparent; }
.btn-ghost { --btn-bg: transparent; --btn-ink: var(--muted); --btn-bd: transparent; }
.btn-ghost:hover { --btn-bg: #f0f3f9; border-color: transparent; color: var(--text); }
.btn-danger { --btn-bg: var(--red-soft); --btn-ink: var(--red); --btn-bd: transparent; }
.btn-danger:hover { --btn-bg: #fbe0e0; border-color: transparent; }
.btn-sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 9px; gap: 5px; }
.btn-xs { height: 27px; padding: 0 9px; font-size: 11.5px; border-radius: 8px; gap: 4px; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 15px; border-radius: 13px; }
.btn-block { width: 100%; }
.btn-icon { width: 38px; padding: 0; }
.btn-icon.btn-sm { width: 32px; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  transition: .15s;
  flex: none;
}
.icon-btn:hover { color: var(--brand); border-color: #c9d6ff; background: var(--brand-soft); }
.icon-btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.icon-btn.primary:hover { background: var(--brand-deep); }

/* ---------- 表单 ---------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label, .label { font-size: 12.5px; font-weight: 600; color: #46536a; }
.field .hint { font-size: 11.5px; color: var(--muted-2); line-height: 1.45; }
.input, .select, .textarea {
  width: 100%;
  border: 1px solid #d9e0ea;
  background: #fff;
  border-radius: 11px;
  padding: 0 13px;
  height: 44px;
  font-size: 14px;
  color: var(--text);
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
  appearance: none;
}
.textarea { height: auto; min-height: 88px; padding: 11px 13px; line-height: 1.6; resize: vertical; }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3.5px rgba(36, 87, 245, .13);
}
.input::placeholder, .textarea::placeholder { color: #a7b2c4; }
.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1.5 5 5 5-5' fill='none' stroke='%236b7a90' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 34px;
}
.input-sm, .select-sm { height: 36px; font-size: 13px; border-radius: 9px; }
.input[type="date"], .input[type="month"], .input[type="datetime-local"] { min-height: 44px; }
.input-wrap { position: relative; }
.input-wrap .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted-2); pointer-events: none; }
.input-wrap .input { padding-left: 38px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-error {
  display: none;
  background: var(--red-soft); color: #b42318;
  border-radius: 10px; padding: 9px 12px; font-size: 12.5px;
}
.form-error.show { display: block; }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track {
  width: 42px; height: 24px; border-radius: 99px; background: #d5dce8;
  position: relative; transition: background .2s; flex: none;
}
.switch .track::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .25); transition: transform .2s;
}
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 3px solid rgba(36, 87, 245, .25); }

/* ---------- 徽标 / 标签 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 8px;
  border-radius: 7px;
  font-size: 11px; font-weight: 600;
  background: #f0f3f8; color: #5a677c;
  white-space: nowrap;
}
.badge .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge.blue { background: #ebf1ff; color: #2457f5; }
.badge.green { background: var(--green-soft); color: #0b7d4a; }
.badge.amber { background: var(--amber-soft); color: #a86200; }
.badge.red { background: var(--red-soft); color: #c02b31; }
.badge.gray { background: #f1f4f8; color: #64748b; }
.badge.violet { background: #f2edff; color: #6a45e8; }
.badge.outline { background: transparent; border: 1px solid var(--line); color: var(--muted); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 11px;
  border-radius: 9px;
  background: #fff; border: 1px solid var(--line);
  font-size: 12px; color: var(--muted);
  cursor: pointer; transition: .15s;
  white-space: nowrap;
}
.chip:hover { border-color: #cdd8ea; color: var(--text); }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip .n { font-size: 11px; opacity: .7; font-variant-numeric: tabular-nums; }

/* ---------- 进度条 ---------- */
.progress { height: 6px; border-radius: 99px; background: #edf1f7; overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #4b7dff, #2457f5); transition: width .4s ease; }
.progress.green > i { background: linear-gradient(90deg, #2ec27e, #12a15f); }
.progress.thin { height: 4px; }
.progress-row { display: flex; align-items: center; gap: 10px; }
.progress-row .progress { flex: 1; }
.progress-row .pct { font-size: 11.5px; color: var(--muted); width: 34px; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- 布局 ---------- */
.shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: #0b1530;
  color: #aab7d4;
  display: flex; flex-direction: column;
  z-index: 40;
}
.sidebar::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(360px 240px at 10% -5%, rgba(64, 110, 255, .28), transparent 70%),
    radial-gradient(300px 240px at 110% 105%, rgba(14, 165, 160, .14), transparent 70%);
  pointer-events: none;
}
.sb-logo {
  display: flex; align-items: center; gap: 11px;
  padding: 22px 18px 18px;
  position: relative; z-index: 1;
}
.sb-logo .logo-mark { width: 38px; height: 38px; font-size: 19px; border-radius: 11px; }
.sb-logo .name { color: #fff; font-size: 15.5px; font-weight: 700; letter-spacing: .4px; line-height: 1.2; }
.sb-logo .sub { color: #7f8fb4; font-size: 10.5px; letter-spacing: 1.2px; text-transform: uppercase; margin-top: 2px; }
.sb-nav { padding: 8px 12px; display: flex; flex-direction: column; gap: 3px; position: relative; z-index: 1; overflow-y: auto; }
.sb-label { font-size: 10.5px; letter-spacing: 1.4px; color: #5f6f92; padding: 16px 10px 6px; text-transform: uppercase; }
.sb-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #aab7d4;
  font-size: 13.5px;
  font-weight: 500;
  transition: .15s;
  position: relative;
}
.sb-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.sb-item.active { background: var(--brand); color: #fff; box-shadow: 0 8px 20px -8px rgba(36, 87, 245, .9); }
.sb-item .ic { width: 19px; height: 19px; opacity: .9; }
.sb-item .count {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 6px; background: rgba(255, 255, 255, .14); color: #fff;
  font-size: 10.5px; display: grid; place-items: center; font-weight: 600;
}
.sb-item.active .count { background: rgba(255, 255, 255, .22); }
.sb-foot {
  margin-top: auto; padding: 14px 14px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, .07);
  position: relative; z-index: 1;
}
.sb-user { display: flex; align-items: center; gap: 10px; padding: 4px 2px 10px; }
.sb-user .avatar { width: 34px; height: 34px; font-size: 13px; background: rgba(255, 255, 255, .12); color: #fff; }
.sb-user .nm { color: #fff; font-size: 13px; font-weight: 600; line-height: 1.3; }
.sb-user .rl { color: #7f8fb4; font-size: 10.5px; }
.sb-user .out { margin-left: auto; color: #7f8fb4; }
.sb-user .out:hover { color: #fff; }
.sb-set { display: flex; align-items: center; gap: 8px; color: #7f8fb4; font-size: 12px; padding: 6px 4px; }
.sb-set:hover { color: #fff; }

.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  height: 62px;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px;
  padding: 0 28px;
  position: sticky; top: 0; z-index: 30;
}
.topbar .crumb { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.topbar .crumb b { color: var(--text); font-weight: 600; }
.topbar .spacer { flex: 1; }
.topbar .today { font-size: 12.5px; color: var(--muted); }
.topbar .user-chip {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 4px 4px 4px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: #fff;
}
.topbar .user-chip .avatar { width: 28px; height: 28px; font-size: 11px; }
.topbar .user-chip .nm { font-size: 12.5px; font-weight: 600; padding-right: 8px; }

.content { width: 100%; max-width: 1240px; margin: 0 auto; padding: 24px 28px 72px; flex: 1; }

.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand);
  font-size: 14px; font-weight: 700; letter-spacing: .5px;
  flex: none;
  overflow: hidden;
}
.avatar.lg { width: 54px; height: 54px; font-size: 18px; }
.avatar.admin { background: #eef7f4; color: #0b7d4a; }

.tabbar { display: none; }
.mobile-only { display: none; }

/* ---------- 登录 / 注册 ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; background: #fff; }
.auth-side {
  position: relative; overflow: hidden;
  background: #0b1530;
  color: #fff;
  padding: 46px 54px;
  display: flex; flex-direction: column;
}
.auth-side::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(700px 520px at 12% 0%, rgba(64, 110, 255, .5), transparent 62%),
    radial-gradient(620px 520px at 100% 100%, rgba(14, 165, 160, .28), transparent 62%);
}
.auth-side::after {
  content: ""; position: absolute; right: -140px; top: 16%;
  width: 420px; height: 420px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 0 0 60px rgba(255, 255, 255, .018), 0 0 0 130px rgba(255, 255, 255, .014);
}
.auth-side > * { position: relative; z-index: 1; }
.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-brand .name { font-size: 17px; font-weight: 700; letter-spacing: .5px; }
.auth-brand .sub { font-size: 10.5px; color: #93a4c9; letter-spacing: 1.6px; margin-top: 1px; }
.auth-hero { margin: auto 0; padding: 40px 0; max-width: 470px; }
.auth-hero .kicker {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11.5px; letter-spacing: 1px; color: #a9c2ff;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12);
  padding: 5px 10px; border-radius: 99px; margin-bottom: 18px;
}
.auth-hero h1 { font-size: 38px; line-height: 1.25; font-weight: 800; letter-spacing: -.8px; }
.auth-hero h1 em { font-style: normal; color: #8fb2ff; }
.auth-hero p { color: #aab7d4; font-size: 14px; margin-top: 14px; line-height: 1.7; max-width: 400px; }
.auth-points { margin-top: 30px; display: grid; gap: 13px; }
.auth-point { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: #c9d4ea; }
.auth-point .tick {
  width: 20px; height: 20px; border-radius: 6px; flex: none;
  background: rgba(46, 194, 126, .16); color: #5ee0a3;
  display: grid; place-items: center; margin-top: 1px;
}
.auth-foot { display: flex; gap: 18px; font-size: 11.5px; color: #7f8fb4; }
.auth-main { display: grid; place-items: center; padding: 40px 28px; background: #fff; }
.auth-card { width: 100%; max-width: 380px; }
.auth-card h2 { font-size: 25px; font-weight: 800; letter-spacing: -.4px; }
.auth-card .lead { color: var(--muted); font-size: 13px; margin: 6px 0 26px; }
.auth-form { display: flex; flex-direction: column; gap: 15px; }
.auth-form .btn { margin-top: 4px; }
.auth-alt { text-align: center; font-size: 12.5px; color: var(--muted); margin-top: 22px; }
.auth-alt a { font-weight: 600; }
.auth-note {
  margin-top: 20px; background: var(--bg-soft); border: 1px solid var(--line-2);
  border-radius: 12px; padding: 11px 13px; color: var(--muted); font-size: 11.5px; line-height: 1.6;
}
.auth-mobile-brand { display: none; }

/* ---------- 员工首页 ---------- */
.greet { margin-bottom: 18px; }
.greet h1 { font-size: 22px; font-weight: 800; letter-spacing: -.3px; }
.greet p { color: var(--muted); font-size: 12.5px; margin-top: 3px; }

.clock-card {
  position: relative; overflow: hidden;
  border-radius: 20px;
  background: linear-gradient(135deg, #16295c 0%, #1c3ea8 52%, #2f66ff 100%);
  color: #fff;
  padding: 20px;
  box-shadow: 0 18px 40px -18px rgba(28, 62, 168, .75);
}
.clock-card::before {
  content: ""; position: absolute; right: -70px; top: -90px;
  width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .22), transparent 62%);
}
.clock-card::after {
  content: ""; position: absolute; right: 52px; bottom: -110px;
  width: 240px; height: 240px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .13);
  box-shadow: 0 0 0 42px rgba(255, 255, 255, .035);
}
.clock-card > * { position: relative; z-index: 1; }
.clock-top { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: #c6d6ff; }
.clock-top .badge { background: rgba(255, 255, 255, .14); color: #fff; height: 23px; }
.clock-top .badge.green { background: rgba(46, 194, 126, .22); color: #7df0b8; }
.clock-top .badge.amber { background: rgba(255, 183, 61, .18); color: #ffd48a; }
.clock-time { font-size: 40px; font-weight: 700; letter-spacing: -1.2px; line-height: 1.1; margin-top: 14px; font-variant-numeric: tabular-nums; }
.clock-date { font-size: 12px; color: #b9cbf3; margin-top: 2px; }
.clock-times { display: flex; gap: 22px; margin-top: 16px; }
.clock-time-item .k { font-size: 10.5px; color: #a9bdec; letter-spacing: .5px; }
.clock-time-item .v { font-size: 17px; font-weight: 700; margin-top: 1px; font-variant-numeric: tabular-nums; }
.clock-loc { display: flex; align-items: center; gap: 5px; font-size: 11px; color: #a9bdec; margin-top: 13px; }
.clock-loc.warn { color: #ffd48a; }
.clock-actions { margin-top: 18px; }
.clock-actions .btn {
  width: 100%; height: 46px; border-radius: 12px;
  background: #fff; color: #16307a; border: none;
  font-size: 14.5px; font-weight: 700;
}
.clock-actions .btn:hover { background: #f2f6ff; }
.clock-actions .btn.out { background: rgba(255, 255, 255, .14); color: #fff; border: 1px solid rgba(255, 255, 255, .28); }
.clock-actions .btn.done { background: rgba(255, 255, 255, .1); color: #c6d6ff; border: 1px solid rgba(255, 255, 255, .16); }

.notice {
  display: flex; gap: 10px; align-items: flex-start;
  background: #fffaf0; border: 1px solid #f7e3b8;
  color: #7a5410; border-radius: 12px; padding: 10px 13px;
  font-size: 12.5px; line-height: 1.55;
  margin-bottom: 14px;
}
.notice .ic { color: #d79a1e; width: 17px; height: 17px; margin-top: 1px; }
.notice.blue { background: var(--brand-soft); border-color: #d7e2ff; color: #27438f; }
.notice.blue .ic { color: var(--brand); }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px 15px;
  box-shadow: var(--shadow-sm);
}
.stat .k { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.stat .v { font-size: 24px; font-weight: 800; letter-spacing: -.6px; margin-top: 5px; font-variant-numeric: tabular-nums; line-height: 1.15; }
.stat .v small { font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 3px; letter-spacing: 0; }
.stat .s { font-size: 11px; color: var(--muted-2); margin-top: 3px; }
.stat.accent { background: linear-gradient(180deg, #f5f8ff, #fff); border-color: #dfe8ff; }
.stat.accent .v { color: var(--brand); }
.stat.green .v { color: var(--green); }

/* 任务卡片 */
.tasks { display: flex; flex-direction: column; gap: 10px; }
.task-card {
  display: block;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px 16px;
  color: inherit;
  transition: .15s;
  box-shadow: var(--shadow-sm);
}
.task-card:hover { border-color: #c9d6ff; transform: translateY(-1px); box-shadow: var(--shadow); }
.task-card .t1 { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.task-card .tt { font-size: 14.5px; font-weight: 700; letter-spacing: .1px; }
.task-card .t2 { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11.5px; margin-top: 4px; flex-wrap: wrap; }
.task-card .t3 { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.task-card .t3 .progress { flex: 1; }
.task-card .t3 .nums { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.task-card .go { display: inline-flex; align-items: center; gap: 2px; color: var(--brand); font-size: 12.5px; font-weight: 600; }

.follow-list { display: flex; flex-direction: column; }
.follow-row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line-2);
}
.follow-row:last-child { border-bottom: none; }
.follow-row .when { width: 52px; text-align: center; flex: none; }
.follow-row .when .d { font-size: 15px; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.follow-row .when .m { font-size: 10px; color: var(--muted-2); }
.follow-row .when.overdue .d { color: var(--red); }
.follow-row .who { flex: 1; min-width: 0; }
.follow-row .who .n { font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.follow-row .who .s { font-size: 11.5px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 任务详情 / 线索 ---------- */
.task-hero {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 18px 20px; box-shadow: var(--shadow-sm);
}
.task-hero .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.task-hero h1 { font-size: 19px; font-weight: 800; letter-spacing: -.3px; line-height: 1.35; }
.task-hero .meta { display: flex; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 11.5px; margin-top: 6px; }
.task-hero .stat-line { display: flex; gap: 20px; margin-top: 14px; flex-wrap: wrap; }
.task-hero .stat-line .it .k { font-size: 10.5px; color: var(--muted-2); }
.task-hero .stat-line .it .v { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }

.filter-bar { display: flex; gap: 8px; align-items: center; margin: 16px 0 12px; flex-wrap: wrap; }
.filter-bar .search { flex: 1; min-width: 180px; }
.seg {
  display: inline-flex; gap: 2px; padding: 3px;
  background: #e9eef7; border-radius: 10px;
}
.seg button {
  border: 0; background: transparent; color: var(--muted);
  height: 30px; padding: 0 12px; border-radius: 8px;
  font-size: 12px; font-weight: 600; cursor: pointer;
  transition: .15s; white-space: nowrap;
}
.seg button.active { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(16, 24, 40, .12); }

.lead-list { display: flex; flex-direction: column; gap: 9px; }
.lead-list .lead {
  display: flex; gap: 12px; align-items: stretch;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  padding: 13px 14px;
  position: relative;
  transition: .15s;
}
.lead-list .lead.todo { border-left: 3px solid #c9d6ff; }
.lead-list .lead.todo:hover { border-color: #b9c9f5; border-left-color: var(--brand); }
.lead-list .lead.done-row { background: #fbfcfe; }
.lead .l-main { flex: 1; min-width: 0; }
.lead .l-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lead .phone { font-size: 15.5px; font-weight: 700; letter-spacing: .3px; font-variant-numeric: tabular-nums; }
.lead .l-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.lead .l-sub b { color: #c2410c; font-weight: 600; }
.lead .l-note {
  font-size: 11.5px; color: #7a6a4f; background: #fdf9f0;
  border: 1px solid #f5ead2; border-radius: 7px; padding: 4px 7px;
  margin-top: 7px; display: inline-block; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lead .l-last { font-size: 11px; color: var(--muted-2); margin-top: 6px; display: flex; align-items: center; gap: 5px; }
.lead .l-last b { color: var(--muted); font-weight: 600; }
.lead .l-actions { display: flex; flex-direction: column; gap: 7px; justify-content: center; flex: none; }
.lead .l-actions .btn { min-width: 76px; }
.lead .call-ico {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px;
  background: var(--green-soft); color: var(--green);
}
.lead .call-ico:hover { background: #d8f3e5; }
.lead.flash { animation: flash 1.4s ease; }
@keyframes flash {
  0%, 100% { box-shadow: none; }
  25% { box-shadow: 0 0 0 3px rgba(36, 87, 245, .22); }
}

.sticky-bar {
  position: sticky; bottom: 12px; z-index: 20;
  margin-top: 16px;
  background: rgba(14, 26, 47, .94);
  backdrop-filter: blur(8px);
  color: #fff; border-radius: 14px;
  padding: 10px 12px 10px 16px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow-lg);
}
.sticky-bar .txt { font-size: 12px; color: #c3cee4; flex: 1; }
.sticky-bar .txt b { color: #fff; font-size: 14px; margin-right: 3px; }
.sticky-bar .btn { background: #fff; color: #12203c; border: none; }

/* ---------- 结果选择 ---------- */
.result-group + .result-group { margin-top: 14px; }
.result-label { font-size: 11px; color: var(--muted-2); letter-spacing: .6px; margin-bottom: 7px; }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.result-opt {
  display: flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 11px;
  background: #fff; cursor: pointer; font-size: 13px; font-weight: 500;
  transition: .14s; color: var(--text);
}
.result-opt .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); flex: none; }
.result-opt:hover { border-color: #c6d3ea; }
.result-opt.selected { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-deep); font-weight: 600; box-shadow: 0 0 0 3px rgba(36, 87, 245, .08); }
.result-opt.selected .dot { background: var(--brand); }
.result-opt[data-tone="green"] .dot { background: var(--green); }
.result-opt[data-tone="blue"] .dot { background: var(--brand); }
.result-opt[data-tone="amber"] .dot { background: var(--amber); }
.result-opt[data-tone="red"] .dot { background: var(--red); }
.result-opt[data-tone="gray"] .dot { background: #98a4b7; }

/* ---------- 弹层 ---------- */
.sheet-mask {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(10, 18, 35, .48);
  backdrop-filter: blur(3px);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fade .18s ease;
}
.sheet {
  background: #fff; width: 100%; max-width: 520px;
  border-radius: 22px 22px 0 0;
  max-height: 92vh; display: flex; flex-direction: column;
  animation: up .24s cubic-bezier(.2, .9, .25, 1);
  box-shadow: var(--shadow-lg);
}
.sheet-grab { width: 40px; height: 4px; border-radius: 99px; background: #dbe2ee; margin: 8px auto 0; flex: none; }
.sheet-hd { display: flex; align-items: flex-start; gap: 12px; padding: 14px 20px 12px; flex: none; }
.sheet-hd .phone { font-size: 18px; font-weight: 800; letter-spacing: .4px; font-variant-numeric: tabular-nums; }
.sheet-hd .who { font-size: 12px; color: var(--muted); margin-top: 1px; }
.sheet-hd .x { margin-left: auto; }
.sheet-body { padding: 4px 20px calc(22px + env(safe-area-inset-bottom)); overflow-y: auto; }
.sheet-ft { padding: 12px 20px calc(18px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-2); flex: none; display: flex; gap: 8px; }
.sheet-ft .btn { flex: 1; }

.modal-mask {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(10, 18, 35, .46);
  backdrop-filter: blur(3px);
  display: grid; place-items: center;
  padding: 20px;
  animation: fade .16s ease;
}
.modal {
  background: #fff; border-radius: 18px;
  width: 100%; max-width: 440px;
  max-height: 90vh; display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: pop .2s cubic-bezier(.2, .9, .25, 1);
}
.modal-hd { display: flex; align-items: center; gap: 10px; padding: 18px 20px 6px; }
.modal-hd h3 { font-size: 16px; font-weight: 700; }
.modal-hd .x { margin-left: auto; }
.modal-bd { padding: 12px 20px; overflow-y: auto; }
.modal-ft { padding: 10px 20px 18px; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.modal-ft .btn { min-width: 84px; }

@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(28px); opacity: .6; } }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: .6; } }

/* ---------- 提示 ---------- */
.toasts {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  z-index: 120; display: flex; flex-direction: column; gap: 8px;
  align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px);
}
.toast {
  display: flex; align-items: center; gap: 9px;
  background: #101b30; color: #fff;
  border-radius: 12px; padding: 10px 15px;
  font-size: 12.5px; font-weight: 500;
  box-shadow: 0 14px 30px -12px rgba(10, 18, 35, .55);
  animation: toast-in .22s cubic-bezier(.2, .9, .25, 1);
  pointer-events: auto;
  max-width: 100%;
}
.toast .ic { width: 17px; height: 17px; flex: none; }
.toast.ok .ic { color: #5ee0a3; }
.toast.err .ic { color: #ff8b8f; }
.toast.out { animation: toast-out .2s ease forwards; }
@keyframes toast-in { from { transform: translateY(-10px); opacity: 0; } }
@keyframes toast-out { to { transform: translateY(-8px); opacity: 0; } }

.loading-bar {
  position: fixed; top: 0; left: 0; height: 2.5px; width: 0;
  background: linear-gradient(90deg, #4b7dff, #0ea5a0);
  z-index: 200; opacity: 0; transition: width .25s ease, opacity .3s;
  box-shadow: 0 0 8px rgba(36, 87, 245, .7);
}
.loading-bar.on { opacity: 1; }

/* ---------- 表格 ---------- */
.tbl-wrap { width: 100%; overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: left; font-size: 11px; font-weight: 600;
  color: var(--muted-2); letter-spacing: .4px;
  padding: 10px 12px; background: #fafbfd;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.tbl th:first-child { border-radius: 10px 0 0 10px; }
.tbl th:last-child { border-radius: 0 10px 10px 0; }
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover { background: #fafcff; }
.tbl .r { text-align: right; }
.tbl .num { font-variant-numeric: tabular-nums; }
.tbl .name-cell { font-weight: 600; }
.tbl .sub-cell { font-size: 11px; color: var(--muted-2); margin-top: 1px; }
.tbl .actions { display: flex; gap: 5px; justify-content: flex-end; flex-wrap: wrap; }

/* ---------- 员工 / 设置 ---------- */
.profile-hero {
  background: linear-gradient(135deg, #16295c, #2457f5);
  color: #fff; border-radius: 20px; padding: 22px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: 0 16px 36px -18px rgba(28, 62, 168, .7);
  position: relative; overflow: hidden;
}
.profile-hero::after {
  content: ""; position: absolute; right: -50px; top: -70px;
  width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .2), transparent 65%);
}
.profile-hero .avatar { background: rgba(255, 255, 255, .16); color: #fff; width: 52px; height: 52px; font-size: 18px; }
.profile-hero .nm { font-size: 19px; font-weight: 800; letter-spacing: .2px; }
.profile-hero .rl { font-size: 11.5px; color: #c6d6ff; margin-top: 2px; }
.profile-hero .hall { font-size: 11px; color: #a9bdec; margin-top: 6px; display: flex; align-items: center; gap: 4px; }

.menu { display: flex; flex-direction: column; }
.menu-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--line-2);
  color: var(--text); cursor: pointer; background: none; border-left: 0; border-right: 0; border-top: 0;
  width: 100%; text-align: left; font-size: 13.5px;
}
.menu-item:last-child { border-bottom: none; }
.menu-item:hover { background: #fafcff; }
.menu-item .m-ico {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); flex: none;
}
.menu-item .m-ico.green { background: var(--green-soft); color: var(--green); }
.menu-item .m-ico.amber { background: var(--amber-soft); color: var(--amber); }
.menu-item .m-ico.red { background: var(--red-soft); color: var(--red); }
.menu-item .m-ico.gray { background: #f1f4f8; color: #64748b; }
.menu-item .chev { margin-left: auto; color: #b6c1d2; }
.menu-item.danger { color: var(--red); }

.settings-sec { padding: 18px 20px; border-bottom: 1px solid var(--line-2); }
.settings-sec:last-child { border-bottom: none; }
.settings-sec h3 { font-size: 13.5px; font-weight: 700; margin-bottom: 14px; display: flex; align-items: center; gap: 7px; }
.settings-sec h3 .ic { color: var(--brand); width: 17px; height: 17px; }
.form-rows { display: flex; flex-direction: column; gap: 14px; }
.form-row { display: grid; grid-template-columns: 150px 1fr; gap: 14px; align-items: start; }
.form-row > .label { padding-top: 11px; }
.form-row .hint { margin-top: 5px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; gap: 7px; } .form-row > .label { padding-top: 0; } }

.kv-list { display: flex; flex-direction: column; }
.kv { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 12.5px; }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--muted); }
.kv .v { font-weight: 600; }

/* ---------- 导入 ---------- */
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  border: 1.5px dashed #c7d3e6; border-radius: var(--r-lg);
  background: #fbfcff; padding: 36px 20px;
  cursor: pointer; transition: .18s; text-align: center;
}
.dropzone:hover, .dropzone.over { border-color: var(--brand); background: var(--brand-soft); }
.dropzone .dz-ico {
  width: 52px; height: 52px; border-radius: 15px;
  background: #fff; border: 1px solid var(--line);
  display: grid; place-items: center; color: var(--brand);
  box-shadow: var(--shadow-sm);
}
.dropzone .dz-t { font-size: 14px; font-weight: 600; margin-top: 4px; }
.dropzone .dz-s { font-size: 11.5px; color: var(--muted); }
.dropzone .dz-f { font-size: 11px; color: var(--muted-2); }

.map-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 720px) { .map-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .map-grid { grid-template-columns: 1fr; } }

.summary-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.sum-chip {
  display: flex; align-items: baseline; gap: 6px;
  background: #f7f9fd; border: 1px solid var(--line);
  padding: 7px 12px; border-radius: 10px;
  font-size: 11.5px; color: var(--muted);
}
.sum-chip b { font-size: 16px; color: var(--text); font-variant-numeric: tabular-nums; }
.sum-chip.ok b { color: var(--green); }
.sum-chip.warn b { color: var(--amber); }
.sum-chip.bad b { color: var(--red); }

.preview-tbl td { white-space: nowrap; }
.preview-tbl .existing { color: var(--amber); font-size: 11px; }

/* ---------- 图表 ---------- */
.trend { display: flex; align-items: flex-end; gap: 8px; height: 168px; padding-top: 8px; }
.trend .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.trend .bar-area { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.trend .bar {
  width: 100%; max-width: 34px; border-radius: 7px 7px 3px 3px;
  background: #e8eefb; position: relative; min-height: 3px;
  transition: height .4s ease;
}
.trend .bar > i {
  position: absolute; left: 0; right: 0; bottom: 0;
  border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, #5b8bff, #2457f5);
  min-height: 2px;
}
.trend .bar .bubble {
  position: absolute; top: -20px; left: 50%; transform: translateX(-50%);
  font-size: 10px; color: var(--muted); font-weight: 600; opacity: 0; transition: .15s;
}
.trend .col:hover .bubble { opacity: 1; }
.trend .d { font-size: 10.5px; color: var(--muted-2); }
.trend .d.today { color: var(--brand); font-weight: 700; }
.legend { display: flex; gap: 14px; font-size: 11px; color: var(--muted); }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 3px; margin-right: 5px; }

.batch-line { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.batch-line:last-child { border-bottom: none; }
.batch-line .bl-main { flex: 1; min-width: 0; }
.batch-line .bl-t { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.batch-line .bl-s { font-size: 11px; color: var(--muted-2); margin-top: 1px; }
.batch-line .bl-p { width: 90px; flex: none; }

.rank-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.rank-row:last-child { border-bottom: none; }
.rank-row .no {
  width: 22px; height: 22px; border-radius: 7px; flex: none;
  display: grid; place-items: center; font-size: 11px; font-weight: 700;
  background: #f1f4f8; color: var(--muted);
}
.rank-row .no.top1 { background: #fff4d6; color: #b7791f; }
.rank-row .no.top2 { background: #eef1f6; color: #5a677c; }
.rank-row .no.top3 { background: #fbeee4; color: #b46a3c; }
.rank-row .rn { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; }
.rank-row .rv { font-size: 12px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.rank-row .rv b { color: var(--text); font-size: 14px; }
.rank-row .avatar { width: 28px; height: 28px; font-size: 11px; }

/* ---------- 空状态 / 加载 ---------- */
.empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 46px 20px; text-align: center; color: var(--muted);
}
.empty .e-ico {
  width: 60px; height: 60px; border-radius: 18px;
  background: #f1f5fb; color: #9db0cc;
  display: grid; place-items: center; margin-bottom: 12px;
}
.empty .e-t { font-size: 14px; font-weight: 600; color: var(--text); }
.empty .e-s { font-size: 12px; color: var(--muted); margin-top: 4px; max-width: 320px; line-height: 1.6; }
.empty .btn { margin-top: 16px; }

.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(36, 87, 245, .2); border-top-color: var(--brand);
  animation: spin .7s linear infinite;
}
.btn .spinner { border-color: rgba(255, 255, 255, .35); border-top-color: #fff; }
.spinner.dark { border-color: rgba(36, 87, 245, .18); border-top-color: var(--brand); }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-block { display: grid; place-items: center; padding: 60px; }

.skeleton { background: linear-gradient(90deg, #eef2f8 25%, #f6f8fc 37%, #eef2f8 63%); background-size: 400% 100%; animation: sk 1.3s ease infinite; border-radius: 10px; }
@keyframes sk { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 960px) {
  .sidebar { display: none; }
  .main { margin-left: 0; }
  .topbar { display: none; }
  .content { padding: 14px 14px 96px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
    padding: 6px 4px calc(4px + env(safe-area-inset-bottom));
  }
  .tabbar a, .tabbar button {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    color: #94a1b5; font-size: 10px; font-weight: 500;
    padding: 6px 2px; border-radius: 10px; background: none; border: 0;
    position: relative; min-height: 46px;
  }
  .tabbar .ic { width: 21px; height: 21px; stroke-width: 1.9; }
  .tabbar a.active, .tabbar button.active { color: var(--brand); }
  .tabbar a.active .ic, .tabbar button.active .ic { stroke-width: 2.2; }
  .tabbar .badge-dot {
    position: absolute; top: 5px; right: calc(50% - 15px);
    min-width: 15px; height: 15px; padding: 0 4px;
    border-radius: 99px; background: var(--red); color: #fff;
    font-size: 9px; display: grid; place-items: center; font-weight: 700;
    border: 2px solid #fff;
  }
  .topbar-mobile {
    display: flex; align-items: center; gap: 10px;
    position: sticky; top: 0; z-index: 30;
    background: rgba(246, 248, 252, .92);
    backdrop-filter: blur(10px);
    padding: 10px 14px 8px;
    border-bottom: 1px solid rgba(230, 235, 242, .7);
  }
  .topbar-mobile .tm-t { font-size: 17px; font-weight: 800; letter-spacing: -.2px; flex: 1; }
  .topbar-mobile .avatar { width: 32px; height: 32px; font-size: 12px; border: 2px solid #fff; box-shadow: var(--shadow-sm); }
  .mobile-only { display: block; }
  .desktop-only { display: none !important; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 13px 13px; }
  .stat .v { font-size: 22px; }
  .card-pad { padding: 16px; }
  .card-hd { padding: 14px 16px; }
  .page-head h1 { font-size: 20px; }
  .page-head { margin-bottom: 14px; }
  .form-grid { grid-template-columns: 1fr; }
  .lead .l-actions { flex-direction: row; align-items: center; }
  .lead .l-actions .btn { min-width: 68px; height: 34px; }
  .lead .call-ico { width: 34px; height: 34px; }
  .sheet-mask { align-items: flex-end; }
  .sheet { max-height: 94vh; }
  .modal-mask { align-items: flex-end; padding: 0; }
  .modal { max-width: 100%; border-radius: 20px 20px 0 0; max-height: 92vh; }
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-main { padding: 0 20px 32px; align-items: start; min-height: 100vh; }
  .auth-card { max-width: 420px; margin: 0 auto; width: 100%; }
  .auth-mobile-brand {
    display: flex; align-items: center; gap: 11px;
    padding: 28px 2px 30px;
  }
  .auth-mobile-brand .logo-mark { width: 42px; height: 42px; }
  .auth-mobile-brand .name { font-size: 17px; font-weight: 800; }
  .auth-mobile-brand .sub { font-size: 10.5px; color: var(--muted); letter-spacing: 1px; }
  .auth-card h2 { font-size: 22px; }
  .auth-card .lead { margin-bottom: 22px; }
  .clock-time { font-size: 36px; }
  .trend { height: 140px; }
  .sticky-bar { bottom: 78px; }
  .toasts { top: 12px; width: calc(100vw - 28px); }
  .toast { max-width: 100%; }
}
@media (min-width: 961px) {
  .topbar-mobile { display: none; }
  .sheet-mask { align-items: center; padding: 24px; }
  .sheet { border-radius: 20px; max-height: 88vh; }
  .sheet-grab { display: none; }
  .sheet-hd { padding-top: 22px; }
}
@media (max-width: 480px) {
  .content { padding: 12px 12px 92px; }
  .stat-grid { gap: 8px; }
  .stat .v { font-size: 20px; }
  .stat .k { font-size: 11px; }
  .clock-card { padding: 17px; border-radius: 18px; }
  .clock-time { font-size: 34px; }
  .task-hero { padding: 15px 16px; }
  .task-hero .stat-line { gap: 14px; }
  .result-grid { grid-template-columns: 1fr 1fr; gap: 7px; }
  .result-opt { height: 42px; padding: 0 10px; font-size: 12.5px; }
  .lead-list .lead { padding: 12px; }
  .lead-list .lead .phone { font-size: 15px; }
  .filter-bar .search { min-width: 100%; order: -1; }
  .auth-main { padding: 0 18px 30px; }
  .tbl { font-size: 12px; }
  .tbl th, .tbl td { padding: 9px 9px; }
}

/* ---------- 补充组件：引导 / 迷你指标 / 双栏 / 选择器 ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }

.mini-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); padding: 4px 2px; }
.mini { padding: 12px 18px; border-left: 1px solid var(--line); min-width: 0; }
.mini:first-child { border-left: 0; }
.mini .k { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini .v { font-size: 21px; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; color: var(--ink); }
.mini .v .sub { font-size: 12.5px; font-weight: 500; color: var(--muted-2); margin-left: 1px; }
.mini .v.warn { color: var(--amber); }
.mini .v.blue { color: var(--brand); }
.mini .s { font-size: 11px; color: var(--muted-2); margin-top: 1px; }

.onboard { text-align: center; padding: 38px 26px 34px; }
.onboard-ico {
  width: 58px; height: 58px; margin: 0 auto 14px;
  display: grid; place-items: center; border-radius: 18px;
  background: var(--brand-soft); color: var(--brand);
}
.onboard h3 { font-size: 17px; font-weight: 800; color: var(--ink); }
.onboard p { max-width: 460px; margin: 7px auto 16px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.onboard .btn { margin-top: 18px; }
.steps { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 18px; }
.steps span { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); }
.steps b {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--bg); color: var(--brand);
  font-size: 11px; font-weight: 800; display: grid; place-items: center;
}

.pick-list { display: grid; gap: 8px; max-height: 46vh; overflow: auto; margin-top: 4px; padding: 2px; }
.pick {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm);
  cursor: pointer; transition: .15s; background: var(--card);
}
.pick:hover { border-color: #cfd9ea; }
.pick:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.pick input { width: 17px; height: 17px; accent-color: var(--brand); flex: none; }
.pick-n { display: block; font-weight: 700; font-size: 13.5px; color: var(--ink); }
.pick-s { display: block; font-size: 11.5px; color: var(--muted); margin-top: 1px; }

.copy-box {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 9px 7px 12px;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r-sm);
}
.copy-box code {
  flex: 1; min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px; color: var(--ink); overflow-wrap: anywhere;
}

.sheet-hd-title { font-size: 17px; font-weight: 800; color: var(--ink); }

.rec-filters { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 960px) {
  .grid-2 { grid-template-columns: 1fr; }
  .mini-grid { grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)); }
  .mini { padding: 10px 12px; }
  .rec-filters { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .rec-filters { grid-template-columns: 1fr; }
  .onboard { padding: 30px 18px; }
}

/* 打印 */
/* 多时段考勤 */
.slot-list { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.slot-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 10px;
  background: rgba(255, 255, 255, .075);
  border: 1px solid rgba(255, 255, 255, .08);
}
.slot-row.current { background: rgba(255, 255, 255, .15); border-color: rgba(255, 255, 255, .32); }
.slot-time { width: 50px; flex: none; display: flex; flex-direction: column; line-height: 1.25; }
.slot-time b { font-size: 14px; font-variant-numeric: tabular-nums; }
.slot-time span { font-size: 10.5px; color: #a9bdec; }
.slot-main { flex: 1; min-width: 0; }
.slot-main .n { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.slot-main .s { font-size: 11px; color: #a9bdec; margin-top: 1px; }
.slot-act { flex: none; }
.slot-row .btn {
  background: rgba(255, 255, 255, .16); color: #fff;
  border: 1px solid rgba(255, 255, 255, .26);
}
.slot-row .btn:hover { background: rgba(255, 255, 255, .24); }
.slot-row .btn-primary { background: #fff; color: #16307a; border-color: #fff; }
.slot-row .btn-primary:hover { background: #eef4ff; }
.slot-row .badge { background: rgba(255, 255, 255, .14); color: #fff; }
.slot-row .badge.green { background: rgba(46, 194, 126, .25); color: #8ff2c3; }
.slot-row .badge.blue { background: rgba(120, 170, 255, .25); color: #cfe0ff; }
.slot-row .badge.amber { background: rgba(255, 183, 61, .22); color: #ffd48a; }

.slot-editor { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; max-width: 620px; }
.slot-edit { display: flex; align-items: center; gap: 8px; }
.slot-edit .slot-name { width: 220px; flex: none; }
.slot-edit .slot-start, .slot-edit .slot-end { width: 120px; flex: none; }
.slot-edit .icon-btn { flex: none; }
.slot-edit .input { min-width: 0; }
.slot-edit .icon-btn { color: var(--muted); }
.slot-edit .icon-btn:hover { color: var(--red); background: var(--red-soft); }
@media (max-width: 560px) {
  .slot-edit { flex-wrap: wrap; }
  .slot-edit .slot-name { width: calc(100% - 42px); }
  .slot-edit .slot-start, .slot-edit .slot-end { width: calc(50% - 30px); }
  .slot-edit .muted { display: none; }
  .slot-row { gap: 7px; padding: 8px; }
  .slot-time { width: 44px; }
}

@media print {
  .sidebar, .topbar, .tabbar, .topbar-mobile, .btn { display: none !important; }
  .main { margin: 0; }
  body { background: #fff; }
}
