/* ==========================================================================
   颌顺医疗 · 基础设计系统
   参考：智齿科技官网（zhichi.com）+ Sobot 客服工作台 / 会话监控界面 + 齿科 B2B 官网
   主色取自品牌 logo 深蓝 #2E4C86，青绿 #19B5B0 作强调，深墨 #1A2233 作标题/深色区块
   ========================================================================== */

:root {
  /* 品牌 */
  --brand: #2e4c86;
  --brand-strong: #243c6b;
  --brand-deep: #182c52;
  --brand-soft: #edf2fa;
  --brand-line: #d6e0f0;
  --brand-glow: rgba(46, 76, 134, 0.14);

  --teal: #19b5b0;
  --teal-strong: #0e9c98;
  --teal-deep: #0b7f7c;
  --teal-soft: #e8f8f7;
  --teal-line: #c7edea;

  --blue: #4dbbff;
  --blue-soft: #eef9ff;
  --amber: #ffbc00;
  --amber-ink: #8a6100;
  --amber-soft: #fffded;
  --amber-line: #f6d98a;
  --green: #12b76a;
  --green-ink: #087443;
  --green-soft: #e7f8ee;
  --red: #e5484d;
  --red-ink: #b42318;
  --red-soft: #ffecec;
  --violet: #6d4aff;
  --violet-soft: #f1edff;

  /* 中性 */
  --ink: #1a2233;
  --ink-2: #363636;
  --ink-3: #5b6675;
  --ink-4: #7b8390;
  --ink-5: #98a2b3;
  --bg: #ffffff;
  --bg-soft: #f7f9fa;
  --bg-page: #f4f6f8;
  --bg-ink: #1a2233;
  --line: #eff1f4;
  --line-2: #e4e7ec;
  --line-3: #d8dee6;

  /* 圆角 */
  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-pill: 999px;

  /* 阴影 */
  --shadow-1: 0 2px 12px rgba(26, 34, 51, 0.06);
  --shadow-2: 0 8px 24px rgba(26, 34, 51, 0.08);
  --shadow-3: 0 20px 60px rgba(26, 34, 51, 0.12);
  --shadow-4: 0 32px 80px rgba(26, 34, 51, 0.18);

  /* 字体 */
  --font: "MiSans", "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system,
    sans-serif;
  --font-num: "DIN Alternate", "Bahnschrift", "MiSans", "PingFang SC", var(--font);

  /* 布局 */
  --container: 1110px;
  --container-wide: 1280px;
  --nav-h: 64px;
  --sidebar-w: 216px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
html,
body {
  min-height: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
dl,
dd {
  margin: 0;
}
ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
img,
svg {
  display: block;
  max-width: 100%;
}
table {
  border-collapse: collapse;
  width: 100%;
}
::selection {
  background: #cfe6ff;
  color: #123;
}
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}
[hidden] {
  display: none !important;
}
svg.icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
svg.icon.fill {
  fill: currentColor;
  stroke: none;
}

/* 滚动条 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-thumb {
  background: #d3dae3;
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
  background: #b8c2cf;
}
::-webkit-scrollbar-track {
  background: transparent;
}

/* ============================ 工具类 ============================ */
.container {
  width: min(var(--container), calc(100% - 48px));
  margin: 0 auto;
}
.container-wide {
  width: min(var(--container-wide), calc(100% - 48px));
  margin: 0 auto;
}
.row {
  display: flex;
  align-items: center;
}
.col {
  display: flex;
  flex-direction: column;
}
.between {
  justify-content: space-between;
}
.center {
  justify-content: center;
}
.gap-2 {
  gap: 2px;
}
.gap-4 {
  gap: 4px;
}
.gap-6 {
  gap: 6px;
}
.gap-8 {
  gap: 8px;
}
.gap-10 {
  gap: 10px;
}
.gap-12 {
  gap: 12px;
}
.gap-16 {
  gap: 16px;
}
.gap-20 {
  gap: 20px;
}
.gap-24 {
  gap: 24px;
}
.grow {
  flex: 1;
  min-width: 0;
}
.muted {
  color: var(--ink-4);
}
.faint {
  color: var(--ink-5);
}
.strong {
  font-weight: 600;
}
.tnum {
  font-variant-numeric: tabular-nums;
  font-family: var(--font-num);
}
.nowrap {
  white-space: nowrap;
}
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mt-4 {
  margin-top: 4px;
}
.mt-8 {
  margin-top: 8px;
}
.mt-12 {
  margin-top: 12px;
}
.mt-16 {
  margin-top: 16px;
}
.mt-24 {
  margin-top: 24px;
}
.mb-8 {
  margin-bottom: 8px;
}
.mb-16 {
  margin-bottom: 16px;
}
.mb-24 {
  margin-bottom: 24px;
}
.text-center {
  text-align: center;
}
.text-right {
  text-align: right;
}
.hide {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: var(--ink-5);
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--teal);
  border-radius: 2px;
}
.eyebrow.light {
  color: rgba(255, 255, 255, 0.55);
}
.eyebrow.light::before {
  background: var(--teal);
}

/* ============================ 按钮 ============================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 20px;
  border-radius: var(--r-xs);
  border: 1px solid var(--line-3);
  background: #fff;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.16s, border-color 0.16s, color 0.16s, box-shadow 0.16s, transform 0.06s;
  user-select: none;
}
.btn:hover {
  background: #f8fafc;
  border-color: #c3ced9;
  color: var(--ink);
}
.btn:active {
  transform: translateY(0.5px);
}
.btn .icon {
  width: 16px;
  height: 16px;
}
.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 1px 2px rgba(46, 76, 134, 0.22);
}
.btn-primary:hover {
  background: var(--brand-strong);
  border-color: var(--brand-strong);
  color: #fff;
}
.btn-teal {
  background: var(--teal-strong);
  border-color: var(--teal-strong);
  color: #fff;
}
.btn-teal:hover {
  background: var(--teal-deep);
  border-color: var(--teal-deep);
  color: #fff;
}
.btn-dark {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.btn-dark:hover {
  background: #2a3448;
  border-color: #2a3448;
  color: #fff;
}
.btn-outline {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.btn-outline:hover {
  background: var(--ink);
  color: #fff;
}
.btn-ghost {
  border-color: transparent;
  background: transparent;
  color: var(--ink-3);
}
.btn-ghost:hover {
  background: #eef2f6;
  color: var(--ink);
}
.btn-danger {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.btn-danger:hover {
  background: #d13b40;
  border-color: #d13b40;
  color: #fff;
}
.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: var(--r-xs);
}
.btn-sm .icon {
  width: 14px;
  height: 14px;
}
.btn-xs {
  height: 26px;
  padding: 0 9px;
  font-size: 12px;
  border-radius: var(--r-xs);
}
.btn-lg {
  height: 48px;
  padding: 0 28px;
  font-size: 15px;
}
.btn-block {
  width: 100%;
}
.btn[disabled],
.btn.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}
.btn.loading {
  pointer-events: none;
  opacity: 0.75;
}
.btn.loading::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.icon-btn {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  color: var(--ink-4);
  transition: background 0.16s, color 0.16s;
}
.icon-btn:hover {
  background: #eef2f6;
  color: var(--ink);
}
.icon-btn.active {
  background: var(--brand-soft);
  color: var(--brand);
}
.link {
  color: var(--teal-deep);
  font-weight: 500;
}
.link:hover {
  text-decoration: underline;
}
.text-link {
  color: var(--brand);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.text-link:hover {
  color: var(--teal-deep);
}
.text-link .icon {
  width: 14px;
  height: 14px;
  transition: transform 0.16s;
}
.text-link:hover .icon {
  transform: translateX(2px);
}

/* ============================ 表单 ============================ */
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.field > label,
.field-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
}
.field-label .req {
  color: var(--red);
  margin-left: 2px;
}
.field-hint {
  font-size: 12px;
  color: var(--ink-4);
  line-height: 1.5;
}
.field-error {
  font-size: 12px;
  color: var(--red-ink);
  min-height: 16px;
}
.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: #fff;
  padding: 0 12px;
  height: 40px;
  font-size: 14px;
  color: var(--ink);
  transition: border-color 0.16s, box-shadow 0.16s;
}
.textarea {
  height: auto;
  min-height: 96px;
  padding: 10px 12px;
  line-height: 1.6;
  resize: vertical;
}
.input::placeholder,
.textarea::placeholder {
  color: var(--ink-5);
}
.input:hover,
.select:hover,
.textarea:hover {
  border-color: var(--line-3);
}
.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(25, 181, 176, 0.16);
}
.input.error,
.textarea.error,
.select.error {
  border-color: var(--red);
}
.input:disabled,
.select:disabled {
  background: var(--bg-soft);
  color: var(--ink-4);
  cursor: not-allowed;
}
.select {
  appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237b8390' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9.5 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-wrap > .icon {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  color: var(--ink-5);
  pointer-events: none;
}
.input-wrap .input {
  padding-left: 36px;
}
.input-wrap .input-action {
  position: absolute;
  right: 6px;
  height: 28px;
  padding: 0 10px;
  border-radius: var(--r-xs);
  color: var(--teal-deep);
  font-size: 13px;
  font-weight: 500;
  background: var(--teal-soft);
}
.input-wrap .input-action:hover {
  background: #d9f3f1;
}
.input-wrap .input-action[disabled] {
  color: var(--ink-5);
  background: #eef2f6;
  pointer-events: none;
}
.input-wrap .input.with-action {
  padding-right: 96px;
}
.checkbox,
.radio {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
  user-select: none;
}
.checkbox input,
.radio input {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--teal-strong);
  cursor: pointer;
}
.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
}
.switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.switch .track {
  width: 44px;
  height: 24px;
  border-radius: var(--r-pill);
  background: #d5dbe3;
  transition: background 0.18s;
  position: relative;
  flex: none;
}
.switch .track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.2);
  transition: transform 0.18s var(--ease);
}
.switch input:checked + .track {
  background: var(--teal-strong);
}
.switch input:checked + .track::after {
  transform: translateX(20px);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.form-grid .span-2 {
  grid-column: 1 / -1;
}
@media (max-width: 720px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

/* 组合框（医院联想） */
.combo {
  position: relative;
}
.combo-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-2);
  max-height: 280px;
  overflow: auto;
  z-index: 60;
  padding: 6px;
}
.combo-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--r-sm);
  cursor: pointer;
}
.combo-item:hover,
.combo-item.active {
  background: var(--teal-soft);
}
.combo-item .ci-main {
  min-width: 0;
}
.combo-item .ci-name {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.combo-item .ci-sub {
  font-size: 12px;
  color: var(--ink-4);
}
.combo-empty {
  padding: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-4);
}

/* ============================ 卡片 / 面板 ============================ */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 20px;
}
.panel-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}
.panel-desc {
  font-size: 12.5px;
  color: var(--ink-4);
  margin-top: 4px;
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}
.divider {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 18px 0;
}

/* ============================ 徽标 ============================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 7px;
  border-radius: var(--r-xs);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}
.badge-blue {
  background: var(--brand-soft);
  color: var(--brand);
}
.badge-teal {
  background: var(--teal-soft);
  color: var(--teal-deep);
}
.badge-green {
  background: var(--green-soft);
  color: var(--green-ink);
}
.badge-amber {
  background: var(--amber-soft);
  color: var(--amber-ink);
  border: 1px solid var(--amber-line);
}
.badge-red {
  background: var(--red-soft);
  color: var(--red-ink);
}
.badge-gray {
  background: #f2f4f7;
  color: var(--ink-3);
}
.badge-violet {
  background: var(--violet-soft);
  color: var(--violet);
}
.badge-dot::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  background: var(--ink-5);
}
.dot.online {
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(18, 183, 106, 0.15);
}
.dot.warning {
  background: var(--amber);
}
.dot.danger {
  background: var(--red);
}

/* ============================ 表格 ============================ */
.table-wrap {
  width: 100%;
  overflow: auto;
  border-radius: var(--r-md);
}
.table {
  width: 100%;
  font-size: 13.5px;
}
.table th {
  height: 44px;
  padding: 0 14px;
  background: #f0fbfb;
  color: var(--ink-3);
  font-weight: 600;
  font-size: 13px;
  text-align: left;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 2;
}
.table th:first-child {
  border-top-left-radius: var(--r-md);
}
.table th:last-child {
  border-top-right-radius: var(--r-md);
}
.table td {
  height: 56px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  vertical-align: middle;
}
.table tbody tr {
  transition: background 0.12s;
}
.table tbody tr:hover {
  background: #f9fbfc;
}
.table tbody tr:last-child td {
  border-bottom: 0;
}
.table .cell-main {
  font-weight: 500;
  color: var(--ink);
}
.table .cell-sub {
  font-size: 12px;
  color: var(--ink-4);
  margin-top: 2px;
}
.table .col-right {
  text-align: right;
}
.table .actions {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}
.table .actions a,
.table .actions button {
  font-size: 12.5px;
  color: var(--brand);
  font-weight: 500;
}
.table .actions a:hover,
.table .actions button:hover {
  color: var(--teal-deep);
  text-decoration: underline;
}
.table.compact td {
  height: 44px;
}
.table.compact th {
  height: 38px;
}

/* ============================ 分页 ============================ */
.pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 0 0;
  font-size: 13px;
  color: var(--ink-4);
}
.pager .pager-total {
  margin-right: auto;
  font-size: 12.5px;
  color: var(--ink-4);
}
.pager button {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: #fff;
  font-size: 13px;
  color: var(--ink-2);
}
.pager button:hover:not([disabled]) {
  border-color: var(--teal);
  color: var(--teal-deep);
}
.pager button.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.pager button[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}
.pager .pager-ellipsis {
  color: var(--ink-5);
  padding: 0 2px;
}

/* ============================ 标签页 ============================ */
.tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  border-bottom: 1px solid var(--line);
}
.tab {
  position: relative;
  height: 42px;
  padding: 0 14px;
  font-size: 14px;
  color: var(--ink-3);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tab:hover {
  color: var(--ink);
}
.tab.active {
  color: var(--brand);
  font-weight: 600;
}
.tab.active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -1px;
  height: 2px;
  background: var(--brand);
  border-radius: 2px;
}
.tab .count {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--r-pill);
  background: #f2f4f7;
  color: var(--ink-4);
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.tab.active .count {
  background: var(--brand-soft);
  color: var(--brand);
}
.segmented {
  display: inline-flex;
  padding: 3px;
  background: #f2f5f8;
  border-radius: var(--r-sm);
  gap: 2px;
}
.segmented button {
  height: 28px;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--ink-3);
}
.segmented button.active {
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  box-shadow: var(--shadow-1);
}

/* ============================ 弹窗 / 抽屉 ============================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.46);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fade-in 0.16s var(--ease);
  backdrop-filter: blur(2px);
}
.modal {
  width: min(560px, 100%);
  max-height: calc(100vh - 48px);
  background: #fff;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-4);
  display: flex;
  flex-direction: column;
  animation: pop-in 0.18s var(--ease);
  overflow: hidden;
}
.modal.lg {
  width: min(760px, 100%);
}
.modal.xl {
  width: min(980px, 100%);
}
.modal.sm {
  width: min(420px, 100%);
}
.modal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.modal-head .modal-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  flex: 1;
}
.modal-body {
  padding: 22px;
  overflow: auto;
  flex: 1;
}
.modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 22px;
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
}
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  z-index: 1000;
  animation: fade-in 0.16s var(--ease);
}
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(620px, 94vw);
  background: #fff;
  z-index: 1001;
  box-shadow: var(--shadow-4);
  display: flex;
  flex-direction: column;
  animation: slide-left 0.22s var(--ease);
}
.drawer-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
}
.drawer-head .drawer-title {
  font-size: 16px;
  font-weight: 600;
  flex: 1;
}
.drawer-body {
  flex: 1;
  overflow: auto;
  padding: 20px 22px;
}
.drawer-foot {
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  background: var(--bg-soft);
}

/* ============================ Toast ============================ */
.toast-wrap {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 9px 16px;
  border-radius: var(--r-sm);
  background: var(--ink);
  color: #fff;
  font-size: 13.5px;
  box-shadow: var(--shadow-3);
  animation: toast-in 0.2s var(--ease);
  max-width: min(520px, 90vw);
  pointer-events: auto;
}
.toast .icon {
  width: 16px;
  height: 16px;
}
.toast.success {
  background: #0d7a4f;
}
.toast.error {
  background: #b42318;
}
.toast.warning {
  background: #8a6100;
}
.toast.info {
  background: var(--brand);
}
.toast.leaving {
  animation: toast-out 0.18s var(--ease) forwards;
}

/* ============================ 空状态 / 骨架 ============================ */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 54px 24px;
  gap: 6px;
}
.empty .empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-5);
  margin-bottom: 6px;
}
.empty .empty-icon .icon {
  width: 28px;
  height: 28px;
}
.empty .empty-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
}
.empty .empty-desc {
  font-size: 12.5px;
  color: var(--ink-4);
  max-width: 340px;
  line-height: 1.7;
}
.empty .btn {
  margin-top: 10px;
}
.skel {
  background: linear-gradient(90deg, #eef2f6 25%, #f6f8fa 37%, #eef2f6 63%);
  background-size: 400% 100%;
  animation: shimmer 1.2s ease infinite;
  border-radius: 6px;
}
.skel-line {
  height: 12px;
  margin: 8px 0;
}
.skel-block {
  height: 120px;
}

/* ============================ 头像 ============================ */
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  flex: none;
  background: var(--brand);
  user-select: none;
  letter-spacing: 0.5px;
}
.avatar.sm {
  width: 28px;
  height: 28px;
  font-size: 12px;
}
.avatar.lg {
  width: 44px;
  height: 44px;
  font-size: 15px;
}
.avatar.teal {
  background: var(--teal-strong);
}
.avatar.amber {
  background: #b78100;
}
.avatar.violet {
  background: var(--violet);
}

/* ============================ 提示条 ============================ */
.alert {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  font-size: 13px;
  line-height: 1.6;
  border: 1px solid transparent;
}
.alert .icon {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex: none;
}
.alert-info {
  background: var(--blue-soft);
  border-color: #d3ecfc;
  color: #175cd3;
}
.alert-warning {
  background: var(--amber-soft);
  border-color: var(--amber-line);
  color: var(--amber-ink);
}
.alert-error {
  background: var(--red-soft);
  border-color: #f9cfcf;
  color: var(--red-ink);
}
.alert-success {
  background: var(--green-soft);
  border-color: #c7eed8;
  color: var(--green-ink);
}

/* ============================ 动画 ============================ */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes slide-left {
  from {
    transform: translateX(24px);
    opacity: 0.6;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(-8px);
  }
}
@keyframes shimmer {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0 50%;
  }
}
.fade-up {
  animation: fade-up 0.5s var(--ease) both;
}
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* 减少动态偏好 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* 打印 */
@media print {
  .no-print,
  .site-header,
  .site-footer,
  .chat-widget,
  .drawer-foot,
  .modal-foot {
    display: none !important;
  }
  body {
    background: #fff;
  }
}
