/* 一对一线上培训运营后台 · 样式 */
:root {
  --bg: #f4f6fb;
  --panel: #ffffff;
  --panel-2: #fafbfe;
  --line: #e6e9f2;
  --line-2: #eef1f7;
  --text: #1b2130;
  --text-2: #3f4859;
  --muted: #6b7688;
  --muted-2: #98a2b3;
  --primary: #4054d6;
  --primary-2: #3346c0;
  --primary-soft: #eef1ff;
  --green: #0f9960;
  --green-soft: #e6f7ee;
  --red: #d64545;
  --red-soft: #fdecec;
  --amber: #b97600;
  --amber-soft: #fff4e0;
  --blue: #1f7ae0;
  --blue-soft: #e9f3ff;
  --purple: #7c3aed;
  --purple-soft: #f2ecff;
  --teal: #0d9488;
  --teal-soft: #e6f7f5;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .04);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .12), 0 2px 8px rgba(16, 24, 40, .06);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 13px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
button { font-family: inherit; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #ccd3e0; border-radius: 6px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 布局 ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 216px; flex: 0 0 216px; background: #fff; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.brand { padding: 18px 18px 14px; border-bottom: 1px solid var(--line-2); }
.brand-row { display: flex; align-items: center; gap: 9px; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; flex: 0 0 30px;
  background: linear-gradient(135deg, #4054d6, #6d7bf0);
  color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px;
  box-shadow: 0 4px 10px rgba(64, 84, 214, .28);
}
.brand-name { font-size: 14px; font-weight: 700; letter-spacing: .2px; }
.brand-sub { font-size: 11px; color: var(--muted-2); margin-top: 6px; }
.side-nav { flex: 1; overflow-y: auto; padding: 10px 10px 16px; }
.nav-group { font-size: 10.5px; color: var(--muted-2); padding: 12px 10px 6px; letter-spacing: .6px; }
.nav-item {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 8px;
  color: var(--text-2); font-size: 13px; cursor: pointer; margin-bottom: 1px; user-select: none;
}
.nav-item:hover { background: #f4f6fb; color: var(--text); }
.nav-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.nav-item .ico { width: 16px; text-align: center; font-size: 13px; opacity: .85; }
.nav-item .nav-count { margin-left: auto; font-size: 11px; color: var(--muted-2); }
.nav-item.active .nav-count { color: var(--primary); }
.side-foot { padding: 10px 14px 14px; border-top: 1px solid var(--line-2); font-size: 11px; color: var(--muted-2); }
.storage-warn { color: var(--red); margin-top: 4px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 56px; display: flex; align-items: center; gap: 12px; padding: 0 22px;
  background: rgba(255, 255, 255, .82); backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30;
}
.crumb { font-size: 14px; font-weight: 650; }
.crumb-sub { font-size: 12px; color: var(--muted); margin-left: 10px; font-weight: 400; }
.topbar-spacer { flex: 1; }
.topbar-date { font-size: 12px; color: var(--muted); }

.view { padding: 18px 22px 40px; max-width: 1560px; width: 100%; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); margin-bottom: 14px; overflow: hidden;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--line-2);
}
.card-title-wrap { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.card-title { font-size: 13.5px; font-weight: 650; }
.card-sub { font-size: 11.5px; color: var(--muted-2); }
.card-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.card-body { padding: 14px 16px; }
.card-body.flush { padding: 0; }
.card-body.tight { padding: 10px 12px; }

/* ---------- 网格 ---------- */
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.g23 { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.g32 { grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr); }

/* ---------- KPI ---------- */
.kpi {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 13px 15px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.kpi-label { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.kpi-value { font-size: 23px; font-weight: 700; letter-spacing: -.4px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi-foot { font-size: 11.5px; color: var(--muted-2); margin-top: 3px; }
.kpi-hero { background: linear-gradient(135deg, #3c4fce 0%, #5566e0 55%, #6f7ef0 100%); border: none; color: #fff; }
.kpi-hero .kpi-label, .kpi-hero .kpi-foot { color: rgba(255, 255, 255, .78); }
.kpi-hero .kpi-value { color: #fff; }
.kpi-warn .kpi-value { color: var(--amber); }
.kpi-danger .kpi-value { color: var(--red); }
.kpi-ok .kpi-value { color: var(--green); }
.kpi .hint {
  width: 13px; height: 13px; border-radius: 50%; background: #e9ecf5; color: var(--muted);
  font-size: 9.5px; display: inline-grid; place-items: center; cursor: help;
}
.kpi-hero .hint { background: rgba(255, 255, 255, .22); color: #fff; }

/* ---------- 表格 ---------- */
.tbl-wrap { overflow: auto; }
.tbl-wrap.scroll-y { max-height: 420px; overflow-y: auto; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
.tbl thead th {
  position: sticky; top: 0; z-index: 2; background: #f8f9fd; color: var(--muted);
  font-weight: 600; font-size: 11.5px; text-align: left; padding: 9px 12px;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.tbl tbody td { padding: 9px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tbody tr:hover td { background: #fafbff; }
.tbl tbody tr:last-child td { border-bottom: none; }
/* 停用 / 注销的号码：整行文字淡化，状态徽章保留自己的配色 */
.tbl tbody tr.row-dim td { color: var(--muted-2); }
.tbl tbody tr.row-dim .cell-main { color: var(--muted); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .nowrap { white-space: nowrap; }
.tbl .muted { color: var(--muted); }
.tbl .strong { font-weight: 600; }
.tbl-compact tbody td { padding: 7px 12px; }
.row-click { cursor: pointer; }
.cell-main { font-weight: 600; }
.cell-sub { font-size: 11px; color: var(--muted-2); margin-top: 1px; }
.link-like { color: var(--primary); cursor: pointer; }
.link-like:hover { text-decoration: underline; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 5px; justify-content: center;
  height: 30px; padding: 0 12px; border-radius: 7px; border: 1px solid var(--line);
  background: #fff; color: var(--text-2); font-size: 12.5px; cursor: pointer;
  transition: .14s ease; white-space: nowrap;
}
.btn:hover { border-color: #ccd4e6; background: #fbfcff; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.btn.primary:hover { background: var(--primary-2); border-color: var(--primary-2); }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.danger:hover { filter: brightness(.95); }
.btn.soft { background: var(--primary-soft); border-color: #dfe4ff; color: var(--primary); font-weight: 600; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: #f2f4fa; color: var(--text); }
.btn.sm { height: 25px; padding: 0 9px; font-size: 11.5px; border-radius: 6px; }
.btn.xs { height: 22px; padding: 0 7px; font-size: 11px; border-radius: 5px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-row { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.icon-btn {
  width: 26px; height: 26px; border-radius: 7px; border: none; background: transparent;
  color: var(--muted); cursor: pointer; font-size: 13px;
}
.icon-btn:hover { background: #f1f3f9; color: var(--text); }

/* ---------- 徽标 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 19px; padding: 0 7px;
  border-radius: 5px; font-size: 11px; font-weight: 600; white-space: nowrap;
}
.badge-gray { background: #f1f3f8; color: #5f6b7d; }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-purple { background: var(--purple-soft); color: var(--purple); }
.badge-indigo { background: var(--primary-soft); color: var(--primary); }
.badge-teal { background: var(--teal-soft); color: var(--teal); }
.dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; display: inline-block; }
/* 已注销：灰色 + 删除线（手机号状态专用） */
.void-text { text-decoration: line-through; text-decoration-thickness: 1px; opacity: .85; }

/* ---------- 表单 ---------- */
.field { display: flex; flex-direction: column; gap: 4px; }
.field-label { font-size: 11.5px; color: var(--muted); font-weight: 550; }
/* 必填标记：跟在标签后面，红色星号 */
.req { font-style: normal; color: var(--red); font-weight: 700; margin-left: 2px; }
.field-hint { font-size: 11px; color: var(--muted-2); }
.input, select.input, textarea.input {
  width: 100%; height: 32px; padding: 0 9px; border-radius: 7px; border: 1px solid var(--line);
  background: #fff; color: var(--text); font-size: 12.5px; outline: none; transition: .14s;
  font-family: inherit;
}
textarea.input { height: auto; padding: 7px 9px; resize: vertical; min-height: 60px; line-height: 1.5; }
select.input { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M0 0l5 6 5-6z' fill='%2398a2b3'/></svg>"); background-repeat: no-repeat; background-position: right 9px center; padding-right: 24px; }
.input:focus, select.input:focus, textarea.input:focus { border-color: #9aa6f0; box-shadow: 0 0 0 3px rgba(64, 84, 214, .1); }
.input:disabled { background: #f7f8fc; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px 14px; }
.form-grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid .span-2 { grid-column: span 2; }
.form-grid .span-3 { grid-column: span 3; }
.form-section-title { font-size: 11px; color: var(--muted-2); letter-spacing: .5px; margin: 4px 0 2px; grid-column: 1 / -1; border-top: 1px dashed var(--line); padding-top: 10px; }
.form-section-title:first-child { border-top: none; padding-top: 0; }

/* ---------- 工具条 ---------- */
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 11px 16px; border-bottom: 1px solid var(--line-2); background: var(--panel-2); }
.toolbar .input { height: 30px; }
.toolbar select.input { width: auto; min-width: 104px; }
.toolbar .search { width: 200px; }
.toolbar-spacer { flex: 1; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; background: #fff; }
.seg button { border: none; background: transparent; height: 28px; padding: 0 11px; font-size: 12px; color: var(--muted); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line-2); }
.seg button.on { background: var(--primary-soft); color: var(--primary); font-weight: 600; }

/* ---------- 进度 ---------- */
.prog { display: inline-block; width: 66px; height: 5px; background: #eef1f7; border-radius: 4px; overflow: hidden; vertical-align: middle; }
.prog-bar { height: 100%; border-radius: 4px; }
.prog-green { background: var(--green); }
.prog-amber { background: #e2a336; }
.prog-red { background: #e06464; }
.prog-txt { font-size: 11px; color: var(--muted-2); margin-left: 6px; vertical-align: middle; font-variant-numeric: tabular-nums; }

/* ---------- 空态 ---------- */
.empty { text-align: center; padding: 28px 10px; color: var(--muted-2); }
.empty-ico { font-size: 20px; opacity: .35; }
.empty-t { font-size: 12.5px; margin-top: 6px; }
.empty-s { font-size: 11.5px; color: var(--muted-2); margin-top: 3px; }

/* ---------- 列表 ---------- */
.list { display: flex; flex-direction: column; }
.list-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 2px;
  border-bottom: 1px solid var(--line-2); font-size: 12.5px;
}
.list-row:last-child { border-bottom: none; }
.list-row .lr-main { min-width: 0; flex: 1; }
.list-row .lr-title { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .lr-sub { font-size: 11px; color: var(--muted-2); margin-top: 1px; }
.list-row .lr-right { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- 弹窗 ---------- */
body.modal-open { overflow: hidden; }
.mask {
  position: fixed; inset: 0; background: rgba(20, 26, 40, .38); z-index: 100;
  display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto;
  backdrop-filter: blur(2px);
}
.modal {
  background: #fff; border-radius: 14px; width: 620px; max-width: 100%;
  box-shadow: var(--shadow-lg); animation: pop .16s ease-out; display: flex; flex-direction: column;
  max-height: calc(100vh - 80px);
}
@keyframes pop { from { transform: translateY(6px) scale(.995); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-lg { width: 820px; }
.modal-xl { width: 1000px; }
.modal-sm { width: 420px; }
.modal-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 15px 18px 12px; border-bottom: 1px solid var(--line-2);
}
.modal-head h3 { font-size: 15px; font-weight: 680; }
.modal-sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.modal-body { padding: 16px 18px; overflow-y: auto; flex: 1; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 8px; padding: 11px 18px;
  border-top: 1px solid var(--line-2); background: #fcfcfe; border-radius: 0 0 14px 14px;
}
.confirm-text { font-size: 13px; color: var(--text-2); line-height: 1.7; }
/* 弹窗底部快捷键提示（左对齐，靠 margin-right:auto 顶到左边） */
.foot-hint { margin-right: auto; align-self: center; font-size: 13px; color: #a8b0be; letter-spacing: .2px; }

/* ---------- Toast ---------- */
#toast-root { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 200; }
.toast {
  padding: 9px 16px; border-radius: 9px; font-size: 12.5px; box-shadow: var(--shadow-lg);
  animation: toastIn .18s ease-out; max-width: 520px;
}
@keyframes toastIn { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.toast-ok { background: #16202f; color: #fff; }
.toast-err { background: #b52d2d; color: #fff; }
.toast-warn { background: #8a5a00; color: #fff; }

/* ---------- 详情区块 ---------- */
.section { margin-bottom: 16px; }
.section:last-child { margin-bottom: 0; }
.section-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 12px; font-weight: 650; color: var(--text-2); margin-bottom: 7px;
}
.kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px 14px; }
.kv.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kv-item .k { font-size: 11px; color: var(--muted-2); }
.kv-item .v { font-size: 12.5px; margin-top: 1px; word-break: break-all; }
.alert {
  border-radius: 9px; padding: 9px 12px; font-size: 12px; line-height: 1.6;
  background: var(--blue-soft); color: #1a5aa8; margin-bottom: 12px;
}
.alert-amber { background: var(--amber-soft); color: #8a5a00; }
.alert-red { background: var(--red-soft); color: #a82f2f; }
.alert-green { background: var(--green-soft); color: #0b6f46; }
.alert b { font-weight: 700; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 14px; flex-wrap: wrap; }
.tabs button {
  border: none; background: transparent; padding: 7px 12px; font-size: 12.5px; color: var(--muted);
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs button.on { color: var(--primary); border-bottom-color: var(--primary); font-weight: 650; }

/* ---------- 日历 ---------- */
.cal { border-top: 1px solid var(--line-2); }
.cal-head { display: grid; grid-template-columns: 52px repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--line); background: var(--panel-2); }
.cal-day-head { padding: 7px 6px; text-align: center; font-size: 11.5px; color: var(--muted); border-left: 1px solid var(--line-2); }
.cal-day-head .d { font-size: 15px; font-weight: 650; color: var(--text); line-height: 1.2; }
.cal-day-head.weekend { background: #fbfbfe; }
.cal-day-head.today, .cal-day-head.today.weekend { background: var(--primary-soft); }
.cal-day-head.today .d { color: var(--primary); }
.cal-body { display: grid; grid-template-columns: 52px repeat(7, minmax(0, 1fr)); }
.cal-gutter { position: relative; }
.cal-gutter span { position: absolute; right: 7px; font-size: 10.5px; color: var(--muted-2); transform: translateY(-50%); }
.cal-col { position: relative; border-left: 1px solid var(--line-2); min-height: 100%; }
.cal-col.weekend { background: #fcfcff; }
.cal-slots { position: absolute; inset: 0; }
.cal-line { position: absolute; left: 0; right: 0; border-top: 1px dashed #f0f2f8; }
.cal-block {
  position: absolute; left: 3px; right: 3px; border-radius: 6px; padding: 4px 6px;
  font-size: 11px; line-height: 1.3; overflow: hidden; cursor: pointer;
  background: var(--primary-soft); border-left: 3px solid var(--primary); color: #27337f;
}
.cal-block:hover { filter: brightness(.97); box-shadow: 0 2px 8px rgba(30, 40, 90, .12); }
.cal-block .b-time { font-size: 10px; opacity: .8; }
.cal-block .b-name { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-block .b-teacher { font-size: 10px; opacity: .75; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-block.st-trial { background: var(--teal-soft); border-left-color: var(--teal); color: #0b5f58; }
.cal-block.st-done { background: var(--green-soft); border-left-color: var(--green); color: #0b6f46; }
.cal-block.st-noshow { background: var(--red-soft); border-left-color: var(--red); color: #a82f2f; }
.cal-block.st-cancelled, .cal-block.st-rescheduled { background: #f2f4f8; border-left-color: #b9c1d0; color: #6b7688; text-decoration: line-through; }

/* ---------- 迷你条形 ---------- */
.bars { display: flex; flex-direction: column; gap: 9px; }
.bar-row { display: grid; grid-template-columns: 52px 1fr 92px; gap: 9px; align-items: center; font-size: 12px; }
.bar-track { height: 8px; background: #f0f2f8; border-radius: 5px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 5px; background: var(--primary); }
.bar-val { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); }

/* ---------- 时间轴 ---------- */
.timeline { position: relative; padding-left: 14px; }
.timeline::before { content: ''; position: absolute; left: 3px; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.tl-item { position: relative; padding: 0 0 11px 0; font-size: 12px; }
.tl-item::before { content: ''; position: absolute; left: -14px; top: 5px; width: 7px; height: 7px; border-radius: 50%; background: #cfd6e6; border: 2px solid #fff; }
.tl-item.ok::before { background: var(--green); }
.tl-item.warn::before { background: #e2a336; }
.tl-item.bad::before { background: var(--red); }

/* ---------- 其他 ---------- */
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11.5px; }
.t-current { color: var(--primary); font-weight: 650; }
.t-muted { color: var(--muted); }
.t-danger { color: var(--red); }
.t-ok { color: var(--green); }
.t-warn { color: var(--amber); }
.t-sm { font-size: 11.5px; }
.t-right { text-align: right; }
.flex { display: flex; align-items: center; gap: 8px; }
.flex-wrap { flex-wrap: wrap; }
.mt6 { margin-top: 6px; } .mt10 { margin-top: 10px; } .mt14 { margin-top: 14px; }
.mb0 { margin-bottom: 0; }
.divider { height: 1px; background: var(--line-2); margin: 10px 0; }
.pill-tabs { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
/* 按钮形式的筛选胶囊（常见问题等页面），label 形式的仍走 .pill */
.pill-tabs > button {
  display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 13px;
  font: inherit; font-size: 12.5px; line-height: 1; color: var(--text-2);
  background: #fff; border: 1px solid var(--line); border-radius: 999px; cursor: pointer;
  box-shadow: 0 1px 1px rgba(16, 24, 40, .03);
  transition: color .16s, background .16s, border-color .16s, box-shadow .16s, transform .16s;
}
.pill-tabs > button:hover {
  color: var(--primary); background: #f8f9ff; border-color: #cdd5f8;
  transform: translateY(-1px); box-shadow: 0 3px 10px rgba(64, 84, 214, .10);
}
.pill-tabs > button.on {
  color: #fff; font-weight: 600; border-color: transparent;
  background: linear-gradient(135deg, #5064e2 0%, #3346c0 100%);
  box-shadow: 0 4px 12px rgba(64, 84, 214, .26);
}
.pill-tabs > button.on:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 5px 14px rgba(64, 84, 214, .30); }
.pill-tabs > button:focus-visible { outline: 2px solid rgba(64, 84, 214, .35); outline-offset: 2px; }
.pill-n {
  font-style: normal; font-size: 11px; font-variant-numeric: tabular-nums; line-height: 1;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  display: inline-grid; place-items: center;
  color: var(--muted); background: #f0f2f8;
}
.pill-tabs > button:hover .pill-n { color: var(--primary); background: #e8ecff; }
.pill-tabs > button.on .pill-n { color: #fff; background: rgba(255, 255, 255, .22); }
.pill {
  padding: 3px 9px; border-radius: 20px; font-size: 11.5px; background: #f2f4fa; color: var(--muted);
  cursor: pointer; border: 1px solid transparent;
}
.pill.on { background: var(--primary-soft); color: var(--primary); border-color: #dfe4ff; font-weight: 600; }
.tag-line { display: flex; gap: 4px; flex-wrap: wrap; }

.teacher-pick { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.tp-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; padding: 9px; background: var(--panel-2); border-bottom: 1px solid var(--line-2); }
.tp-list { max-height: 190px; overflow-y: auto; }
.tp-item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-bottom: 1px solid var(--line-2); cursor: pointer; font-size: 12px; }
.tp-item:hover { background: #f7f9ff; }
.tp-item.on { background: var(--primary-soft); }
.tp-item .tp-name { font-weight: 600; }
.tp-item .tp-meta { color: var(--muted-2); font-size: 11px; }
.tp-item .tp-tag { margin-left: auto; }

.avatar {
  width: 26px; height: 26px; border-radius: 7px; background: #eef1f9; color: var(--primary);
  display: inline-grid; place-items: center; font-size: 11px; font-weight: 650; flex: 0 0 26px;
}
.legend { display: flex; gap: 12px; font-size: 11px; color: var(--muted); flex-wrap: wrap; }
.legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-right: 4px; }

@media (max-width: 1240px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g23, .g32, .g3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .sidebar { display: none; }
  .g2 { grid-template-columns: minmax(0, 1fr); }
  .form-grid, .form-grid.g3 { grid-template-columns: minmax(0, 1fr); }
  .kv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- 启动遮罩 ---------- */
.boot-mask {
  position: fixed; inset: 0; z-index: 9000; background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
}
.boot-spin {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2.5px solid #dfe3f0; border-top-color: var(--primary);
  animation: bootSpin .7s linear infinite;
}
@keyframes bootSpin { to { transform: rotate(360deg); } }
.boot-text { font-size: 12.5px; color: var(--muted); }
.boot-err {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 30px; box-shadow: var(--shadow-lg); max-width: 420px; text-align: center;
}
.be-title { font-size: 15px; font-weight: 650; color: var(--text); }
.be-msg { font-size: 12.5px; color: var(--red); margin: 8px 0 4px; word-break: break-all; }
.be-tip { font-size: 12px; color: var(--muted); margin-bottom: 16px; line-height: 1.6; }

/* ---------- 登录页 ---------- */
.auth-body {
  min-height: 100vh;
  background: #f5f6fa;
  font-family: -apple-system, "SF Pro SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}
.auth-shell {
  display: flex; min-height: 100vh;
}

/* 左侧品牌区：深蓝紫渐变 + 光晕 + 底部节拍条 */
.auth-hero {
  position: relative; overflow: hidden;
  flex: 0 0 54%; max-width: 54%;
  padding: 46px 56px 0;
  display: flex; flex-direction: column;
  background:
    radial-gradient(720px 420px at 88% 6%, rgba(94, 84, 232, .55) 0%, rgba(94, 84, 232, 0) 62%),
    radial-gradient(640px 380px at 68% 92%, rgba(58, 52, 150, .5) 0%, rgba(58, 52, 150, 0) 60%),
    linear-gradient(150deg, #171a35 0%, #1d2044 46%, #232859 100%);
  color: #fff;
}
.hero-glow {
  position: absolute; right: -180px; top: -170px; width: 460px; height: 460px;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(120, 108, 255, .38) 0%, rgba(120, 108, 255, 0) 68%);
}
.hero-brand { position: relative; display: flex; align-items: center; gap: 11px; }
.hero-mark {
  width: 34px; height: 34px; border-radius: 10px; flex: 0 0 34px;
  display: grid; place-items: center; font-size: 16px; font-weight: 700; color: #fff;
  background: linear-gradient(140deg, #6f63f5, #4f47d8);
  box-shadow: 0 6px 16px rgba(84, 74, 210, .45);
}
.hero-name { font-size: 14px; font-weight: 650; letter-spacing: .3px; }
.hero-tag { font-size: 10.5px; color: rgba(255, 255, 255, .5); margin-top: 3px; letter-spacing: .4px; }

.hero-title {
  position: relative; margin: 46px 0 0;
  font-size: clamp(26px, 2.5vw, 36px); line-height: 1.42; font-weight: 700;
  letter-spacing: .4px; color: #fff;
}
.hero-desc {
  position: relative; margin: 18px 0 0; max-width: 470px;
  font-size: 12.5px; line-height: 1.95; color: rgba(255, 255, 255, .56);
  text-wrap: pretty;
}
.hero-list { position: relative; list-style: none; margin: 34px 0 0; padding: 0; display: flex; flex-direction: column; gap: 15px; }
.hero-list li { display: flex; align-items: flex-start; gap: 9px; font-size: 11.5px; color: rgba(255, 255, 255, .62); line-height: 1.5; }
.hero-list b { color: rgba(255, 255, 255, .92); font-weight: 600; }
.hl-ico {
  flex: 0 0 17px; width: 17px; height: 17px; margin-top: -1px; border-radius: 50%;
  display: grid; place-items: center; color: rgba(255, 255, 255, .72);
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16);
}

/* 底部节拍条：呼应经营节奏，替代插图 */
.hero-keys {
  position: relative; margin-top: auto; height: 100px;
  display: flex; align-items: flex-end; gap: 5px;
  padding: 0 0 0 2px; opacity: .9;
  mask-image: linear-gradient(to right, rgba(0,0,0,.35), #000 30%, #000 100%);
  -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,.35), #000 30%, #000 100%);
}
.hero-keys i {
  flex: 1 1 0; display: block; border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, .82) 0%, rgba(255, 255, 255, .42) 58%, rgba(255, 255, 255, .16) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}

/* 右侧登录卡 */
.auth-panel {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 40px 28px; background: #f5f6fa;
}
.auth-card {
  width: 100%; max-width: 314px;
  background: #fff; border-radius: 16px; padding: 30px 26px 24px;
  box-shadow: 0 18px 44px rgba(20, 24, 60, .1), 0 2px 6px rgba(20, 24, 60, .05);
  text-align: center;
}
.auth-logo {
  width: 44px; height: 44px; margin: 0 auto 14px; border-radius: 12px;
  display: grid; place-items: center; font-size: 19px; font-weight: 700; color: #fff;
  background: linear-gradient(140deg, #7b6cf8, #5b52ef);
  box-shadow: 0 10px 22px rgba(91, 82, 239, .32);
}
.auth-card h2 { font-size: 16.5px; font-weight: 650; letter-spacing: -.1px; color: #1b1f2e; }
.card-sub { font-size: 11.5px; color: #98a0b3; margin: 6px 0 20px; }

.auth-label {
  display: block; text-align: left; font-size: 11.5px; color: #8b93a7;
  margin: 0 0 5px; font-weight: 550;
}
.auth-input {
  width: 100%; height: 38px; font-size: 13px; margin-bottom: 13px;
  background: #eef1fb; border: 1px solid #eef1fb; border-radius: 9px; color: #1b1f2e;
  padding: 0 12px; transition: .16s;
}
.auth-input::placeholder { color: #a9b1c6; }
.auth-input:focus {
  background: #fff; border-color: #b3aeff; box-shadow: 0 0 0 3px rgba(91, 82, 239, .12);
}
.auth-btn {
  width: 100%; height: 40px; margin-top: 4px; border: none; border-radius: 9px;
  font-size: 13px; font-weight: 600; letter-spacing: 2px; color: #fff; cursor: pointer;
  background: linear-gradient(120deg, #6b62f7, #5348ea);
  box-shadow: 0 10px 20px rgba(83, 72, 234, .28);
  transition: .16s;
}
.auth-btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.auth-btn:active { transform: none; }
.auth-btn:disabled { opacity: .62; cursor: default; transform: none; }
.auth-err {
  text-align: left; background: #fdecec; color: #c93b3b; border: 1px solid #f7d4d4;
  border-radius: 8px; padding: 8px 10px; font-size: 11.5px;
  margin: -2px 0 12px; line-height: 1.55;
}
.auth-meta { margin-top: 14px; font-size: 10.5px; color: #a6adbd; line-height: 1.6; }

/* 入场：左区文字依次浮现，卡片轻微上浮 */
@keyframes authUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes authRise { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: none; } }
.hero-brand { animation: authUp .5s ease-out both; }
.hero-title { animation: authUp .6s ease-out .06s both; }
.hero-desc { animation: authUp .6s ease-out .14s both; }
.hero-list { animation: authUp .6s ease-out .22s both; }
.hero-keys i { animation: authUp .7s cubic-bezier(.2, .8, .3, 1) both; }
.hero-keys i:nth-child(1) { animation-delay: .10s; } .hero-keys i:nth-child(2) { animation-delay: .14s; }
.hero-keys i:nth-child(3) { animation-delay: .18s; } .hero-keys i:nth-child(4) { animation-delay: .22s; }
.hero-keys i:nth-child(5) { animation-delay: .26s; } .hero-keys i:nth-child(6) { animation-delay: .30s; }
.hero-keys i:nth-child(7) { animation-delay: .34s; } .hero-keys i:nth-child(8) { animation-delay: .38s; }
.hero-keys i:nth-child(9) { animation-delay: .42s; } .hero-keys i:nth-child(10) { animation-delay: .46s; }
.hero-keys i:nth-child(11) { animation-delay: .50s; } .hero-keys i:nth-child(12) { animation-delay: .54s; }
.auth-card { animation: authRise .55s cubic-bezier(.2, .8, .3, 1) .1s both; }
@media (prefers-reduced-motion: reduce) {
  .hero-brand, .hero-title, .hero-desc, .hero-list, .auth-card, .hero-keys i { animation: none; }
}

@media (max-width: 900px) {
  .auth-shell { flex-direction: column; }
  .auth-hero { flex: none; max-width: none; padding: 30px 26px 34px; }
  .hero-title { margin-top: 26px; }
  .hero-desc br { display: none; }
  .hero-desc { max-width: 520px; }
  .hero-keys { display: none; }
  .auth-panel { padding: 30px 20px 44px; }
  .auth-card { max-width: 360px; }
}

/* ---------- 顶栏用户区 ---------- */
.user-chip {
  display: flex; align-items: center; gap: 7px;
  padding: 3px 4px 3px 4px; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; margin-left: 4px;
}
.user-avatar {
  width: 24px; height: 24px; border-radius: 50%; flex: 0 0 24px;
  background: linear-gradient(135deg, #4054d6, #6d7bf0); color: #fff;
  display: grid; place-items: center; font-size: 11px; font-weight: 650;
}
.user-name { font-size: 12px; color: var(--text-2); max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip .btn { margin-right: 2px; }

/* ---------- 同步状态 ---------- */
.sync-line { display: flex; align-items: center; gap: 5px; margin-top: 5px; font-size: 11px; }
.sync-line .dot-ok { color: var(--green); }
.sync-line .dot-wait { color: var(--amber); animation: syncPulse 1s ease-in-out infinite; }
.sync-line .dot-err { color: var(--red); }
@keyframes syncPulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.mode-tag {
  display: inline-block; font-size: 10px; padding: 0 5px; border-radius: 4px;
  background: var(--amber-soft); color: var(--amber); margin-left: 4px;
}


/* ---------- 资源总览 ---------- */
.sys-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.sys-stamp { font-size: 11.5px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.sys-bar { height: 8px; border-radius: 6px; background: #eef1f7; overflow: hidden; }
.sys-bar.thin { height: 4px; border-radius: 3px; margin-top: 4px; }
.sys-bar i { display: block; height: 100%; border-radius: inherit; transition: width .45s ease, background .45s ease; }
.sys-lines { display: flex; flex-direction: column; }
.sys-line + .sys-line { margin-top: 12px; }
.sl-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 11.5px; color: var(--muted); margin-bottom: 5px; }
.sl-head b { font-size: 11.5px; color: var(--text-2); font-weight: 650; font-variant-numeric: tabular-nums; }
.sys-core-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.sys-core { background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 8px 7px; }
.sys-core .sc-top { display: flex; align-items: baseline; justify-content: space-between; font-size: 10.5px; color: var(--muted-2); }
.sys-core .sc-top b { font-size: 11.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.sys-kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; }
.sys-kvi { min-width: 0; }
.sys-kvi .k { font-size: 11px; color: var(--muted-2); }
.sys-kvi .v { font-size: 12.5px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; margin-top: 1px; word-break: break-word; }
.sys-note { margin-top: 11px; font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.spark { display: block; }
@media (max-width: 900px) {
  .sys-kv { grid-template-columns: minmax(0, 1fr); }
  .sys-toolbar { flex-wrap: wrap; }
}
.kpi-unit { font-size: 13px; font-weight: 600; margin-left: 3px; color: var(--muted); letter-spacing: 0; }
.sys-spark { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 11px; color: var(--muted-2); }
.sys-spark .spark { flex: 0 0 auto; }

/* ---------- 分页 ---------- */
.pager {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 9px 14px; border-top: 1px solid var(--line-2); background: var(--panel-2);
}
.pager-info { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pager-info b { color: var(--text-2); font-weight: 650; }
.pager-nav { display: flex; align-items: center; gap: 4px; }
.pager-size {
  width: auto; height: 26px; font-size: 11.5px; padding: 0 22px 0 8px; margin-right: 4px;
}
.pg {
  min-width: 26px; height: 26px; padding: 0 6px; border-radius: 6px; border: 1px solid var(--line);
  background: #fff; color: var(--text-2); font-size: 12px; cursor: pointer; line-height: 1;
  font-variant-numeric: tabular-nums; transition: .14s ease;
}
.pg:hover:not(:disabled) { border-color: #ccd4e6; background: #fbfcff; }
.pg.on { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 650; }
.pg:disabled { opacity: .38; cursor: not-allowed; }
.pg-nav { font-size: 13px; color: var(--muted); }
.pg-gap { color: var(--muted-2); font-size: 12px; padding: 0 1px; }

/* ---------- 常见问题回答库 ---------- */
.faq-rules { padding: 0; overflow: hidden; margin-bottom: 14px; }
.faq-rules-head {
  display: flex; align-items: center; gap: 10px; padding: 11px 16px; cursor: pointer;
  background: linear-gradient(90deg, #fff8ec, #fff); border-bottom: 1px dashed var(--line-2);
}
.faq-rules-head b { color: var(--amber, #b7791f); font-size: 13px; }
.faq-arrow { margin-left: auto; font-size: 11.5px; color: var(--muted-2); }
.faq-rule-list { margin: 10px 0; padding: 0 16px 12px 32px; }
.faq-rule-list li { font-size: 12.5px; color: var(--text-2); line-height: 1.9; }
.faq-item { padding: 13px 16px; margin-bottom: 10px; }
.faq-item-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.faq-q { font-size: 13.5px; font-weight: 650; }
.faq-answer {
  margin-top: 9px; font-size: 13px; line-height: 1.85; color: var(--text-1);
  background: var(--panel-2); border-left: 3px solid var(--accent, #5b5bff);
  border-radius: 6px; padding: 9px 12px;
}
.faq-note {
  margin-top: 8px; font-size: 11.5px; color: var(--muted-2); line-height: 1.7;
  padding-left: 10px; border-left: 2px solid var(--line-2);
}
.faq-note b {
  display: inline-block; margin-right: 6px; color: var(--amber, #b7791f);
  font-size: 10.5px; border: 1px solid currentColor; border-radius: 4px; padding: 0 4px;
}

/* ---------- 手机号管理 ---------- */
.carrier {
  display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 8px;
  border-radius: 5px; font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.carrier-cm { background: #e7f4ff; color: #0b6cb8; }
.carrier-cu { background: #ffeded; color: #c0392b; }
.carrier-ct { background: #eaf0ff; color: #2f4fbf; }
.carrier-cb { background: #fff1e4; color: #b4610a; }
.carrier-mvno { background: var(--purple-soft); color: var(--purple); }
.carrier-unk { background: #f1f3f8; color: var(--muted); }
.carrier .dot { width: 5px; height: 5px; }

.chip-line { display: flex; flex-wrap: wrap; gap: 4px; }
.chip-mini {
  display: inline-block; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  height: 19px; line-height: 19px; padding: 0 7px; border-radius: 5px;
  font-size: 11px; color: var(--text-2); background: #f3f5fa; border: 1px solid var(--line-2);
}
/* 号码 / 账号表单里的实时识别提示 */
.phone-detect {
  font-size: 11.5px; line-height: 1.6; color: var(--muted);
  background: var(--panel-2); border: 1px dashed var(--line); border-radius: 7px;
  padding: 6px 9px; margin-top: 2px;
}
.phone-detect b { color: var(--text-2); font-weight: 600; }
.phone-detect + .field-hint { margin-top: 0; }
.tbl .mono { letter-spacing: .2px; }

/* ---------- 账号与权限 ---------- */
/* 顶栏的角色 / 数据范围标签 */
.role-tag {
  display: inline-flex; align-items: center; height: 18px; padding: 0 6px;
  border-radius: 5px; font-size: 10.5px; font-weight: 600; white-space: nowrap;
}
.role-admin { background: var(--primary-soft); color: var(--primary); }
.role-staff { background: var(--blue-soft); color: var(--blue); }
.role-readonly { background: #f1f3f8; color: #5f6b7d; }
.role-self { background: var(--amber-soft); color: var(--amber); }

.me-tag {
  display: inline-block; height: 16px; line-height: 16px; padding: 0 5px; margin-left: 3px;
  border-radius: 4px; background: var(--primary-soft); color: var(--primary);
  font-size: 10px; font-weight: 600; vertical-align: 1px;
}
.nav-empty { padding: 10px 12px; font-size: 11.5px; color: var(--muted-2); line-height: 1.6; }

/* 可访问页面勾选 */
.perm-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px;
}
.perm-item {
  display: flex; align-items: center; gap: 6px; padding: 6px 9px;
  border: 1px solid var(--line); border-radius: 7px; background: #fff;
  font-size: 12px; color: var(--text-2); cursor: pointer; transition: .12s;
}
.perm-item:hover { border-color: #cfd6e6; }
.perm-item.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.perm-item.disabled { opacity: .65; cursor: default; }
.perm-item input { accent-color: var(--primary); margin: 0; }

/* 数据范围二选一 */
.scope-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.scope-opt {
  display: flex; align-items: flex-start; gap: 9px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; transition: .12s;
}
.scope-opt:hover { border-color: #cfd6e6; }
.scope-opt input { margin: 2px 0 0; accent-color: var(--primary); }
.scope-opt b { display: block; font-size: 12.5px; color: var(--text); }
.scope-opt span { display: block; font-size: 11px; line-height: 1.5; color: var(--muted); margin-top: 1px; }
.scope-opt:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.scope-grid.is-disabled { opacity: .6; }

.link-btn {
  border: none; background: none; padding: 0 5px; margin-left: 4px;
  color: var(--primary); font-size: 11px; font-family: inherit; cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }
.tbl .danger-text { color: var(--red); }
.tbl .danger-text:hover { background: var(--red-soft); }

@media (max-width: 900px) {
  .perm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scope-grid { grid-template-columns: 1fr; }
}
