/* ============================================================
   管理后台样式
   ============================================================ */
:root {
  --primary: #0a9f7b;
  --primary-dark: #067a61;
  --primary-light: #e8f8f3;
  --sidebar: #10372f;
  --sidebar-hover: #1a4a40;
  --bg: #f3f7f6;
  --card: #ffffff;
  --text: #243431;
  --muted: #6f808c;
  --line: #e6eeec;
  --danger: #e5533d;
  --warning: #f5a623;
  --radius: 16px;
  --shadow: 0 7px 26px rgba(20, 48, 41, .055);
  --control-bg: #ffffff;
  --control-border: #dfeae6;
  --control-focus: #74c9b3;
  --control-radius: 10px;
  --control-height: 38px;
  --control-pad-y: 8px;
  --control-pad-x: 12px;
  --control-font: 13px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.layout { display: flex; min-height: 100vh; }

/* ---------- 侧边栏 ---------- */
.sidebar {
  width: 216px;
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(255, 255, 255, .07) 0%, rgba(255, 255, 255, 0) 62%),
    linear-gradient(180deg, #123f35 0%, var(--sidebar) 100%);
  color: #cfe0dc;
  position: fixed;
  top: 0; bottom: 0; left: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform .25s;
  border-right: 1px solid rgba(255, 255, 255, .06);
}
.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 16px 15px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  white-space: nowrap;
  overflow: hidden;
}
.sidebar .brand .logo {
  width: 40px; height: 40px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  padding: 4px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}
.sidebar .brand .logo img { width: 100%; height: 100%; object-fit: contain; }
.sidebar .brand .brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}
.sidebar .brand .brand-text b {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  letter-spacing: .1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar .brand .brand-text small {
  font-size: 11.5px;
  color: #8fb0a9;
  letter-spacing: .5px;
  margin-top: 2px;
}
.sidebar .menu { flex: 1; overflow-y: auto; padding: 10px 10px 12px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }
.sidebar .menu::-webkit-scrollbar { width: 5px; }
.sidebar .menu::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 99px; }
.sidebar .menu .group {
  font-size: 10.5px;
  font-weight: 600;
  color: #7f9e96;
  padding: 14px 10px 5px;
  letter-spacing: 1.15px;
  margin-top: 2px;
  border-top: 1px solid rgba(255,255,255,.055);
}
.sidebar .menu > .menu-group:first-child > summary.group {
  padding-top: 4px;
  border-top: 0;
}
.sidebar .menu-group { display:block; }
.sidebar .menu-group > summary.group {
  list-style: none;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sidebar .menu-group > summary.group::-webkit-details-marker { display: none; }
.sidebar .menu-group > summary.group::after {
  content: "⌄";
  font-size: 13px;
  line-height: 1;
  color: #6f8c85;
  transition: transform .16s;
}
.sidebar .menu-group:not([open]) > summary.group::after { transform: rotate(-90deg); }
.sidebar .menu-group-items { padding-bottom: 2px; }
.sidebar .menu a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  margin: 2px 0;
  font-size: 13px;
  color: #bcd2cd;
  border-radius: 10px;
  transition: background .16s, color .16s, box-shadow .16s;
  white-space: nowrap;
  position: relative;
}
.sidebar .menu a:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar .menu a.active {
  background: linear-gradient(90deg, rgba(10,163,127,.3), rgba(10,163,127,.1));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(78,205,170,.16);
}
.sidebar .menu a.active::before {
  content: "";
  width: 3px;
  height: 17px;
  border-radius: 99px;
  background: #36d3aa;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}
.sidebar .menu a svg { flex-shrink: 0; opacity: .72; }
.sidebar .menu a.active svg { opacity: 1; }
.sidebar .menu a .badge-num {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 10.5px;
  border-radius: 99px;
  padding: 1px 7px;
}
.sidebar .me {
  padding: 13px 16px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: 12.5px;
  display: flex;
  align-items: center;
  gap: 9px;
  background: rgba(255, 255, 255, .035);
}
.sidebar .me .avatar {
  width: 34px; height: 34px; border-radius: 11px;
  background: linear-gradient(135deg, #14b891, #078868);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,.16);
}
.sidebar .me .info { flex: 1; min-width: 0; }
.sidebar .me .info b { display: block; color: #fff; font-weight: 500; }
.sidebar .me .info span { color: #8fb0a9; font-size: 11px; }
.sidebar .me a { color: #8fb0a9; }
.sidebar .me a:hover { color: #fff; }

/* ---------- 主内容区 ---------- */
.main {
  flex: 1;
  margin-left: 216px;
  min-width: 0;
}
.topbar {
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(230, 238, 236, .9);
  padding: 14px 26px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 0 rgba(20, 48, 41, .02);
}
.topbar h1 { font-size: 18px; font-weight: 600; letter-spacing: .2px; flex: 1; }
.topbar .crumb { font-size: 12px; color: var(--muted); }
.topbar .toggle {
  display: none;
  border: 0; background: var(--bg);
  width: 34px; height: 34px; border-radius: 9px;
  align-items: center; justify-content: center;
  cursor: pointer; color: var(--text);
}
.content { padding: 22px 26px 44px; }

/* ---------- 统计卡片 ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--card);
  border: 1px solid #edf3f1;
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 14px;
  transition: transform .18s, box-shadow .18s;
}
.stat-card .icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .65);
}
.stat-card .num { font-size: 24px; font-weight: 700; line-height: 1.15; letter-spacing: -.3px; }
.stat-card .lab { font-size: 12.5px; color: var(--muted); }
@media (hover: hover) {
  .stat-card:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(20, 48, 41, .09); }
}

/* ---------- 面板/表格 ---------- */
.panel {
  background: var(--card);
  border: 1px solid #edf3f1;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  overflow: hidden;
}
.panel .panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid #eef4f2;
}
.panel .panel-head h2 { font-size: 16px; font-weight: 600; flex: 1; letter-spacing: .2px; }
.panel .panel-body { padding: 20px; }
.panel .panel-body.flush { padding: 0; }
.panel-sub { font-size: 12px; color: var(--muted); }

.trend-chart {
  display: flex;
  gap: 14px;
  align-items: flex-end;
  height: 174px;
  padding-top: 22px;
}
.trend-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
  justify-content: flex-end;
}
.trend-num { font-size: 12px; color: var(--muted); }
.trend-bar {
  width: 70%;
  max-width: 44px;
  min-height: 4px;
  background: linear-gradient(180deg, #0aa37f, #0bb88d);
  border-radius: 7px 7px 3px 3px;
  box-shadow: 0 4px 10px rgba(10, 163, 127, .14);
}
.trend-label { font-size: 11.5px; color: var(--muted); }
.trend-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 36px 20px 42px;
  text-align: center;
  color: var(--muted);
}
.trend-empty svg { color: #b9d9cf; margin-bottom: 2px; }
.trend-empty b { font-size: 14px; font-weight: 600; color: #455b55; }
.trend-empty span { font-size: 12px; color: var(--muted); }

.report-chart { padding: 10px 6px 2px; }
.report-chart svg { display: block; width: 100%; height: auto; overflow: visible; }

.settings-nav {
  position: sticky;
  top: 66px;
  z-index: 30;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 0 12px;
  margin: -2px 0 4px;
  background: linear-gradient(180deg, var(--bg) 74%, rgba(243, 247, 246, 0));
  scrollbar-width: none;
}
.settings-nav::-webkit-scrollbar { display: none; }
.settings-nav a {
  flex-shrink: 0;
  padding: 7px 13px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e3eeea;
  color: #5a6e68;
  font-size: 12.5px;
  box-shadow: 0 2px 6px rgba(20, 48, 41, .035);
  transition: background .16s, color .16s, border-color .16s;
}
.settings-nav a:hover,
.settings-nav a.active {
  background: var(--primary-light);
  border-color: #cfe9e1;
  color: var(--primary-dark);
}
.panel[id^="settings-"] { scroll-margin-top: 128px; }

.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.table th {
  text-align: left;
  background: #f8fbfa;
  color: var(--muted);
  font-weight: 500;
  font-size: 12.5px;
  letter-spacing: .2px;
  padding: 11px 16px;
  white-space: nowrap;
  border-bottom: 1px solid #eaf1ef;
}
table.table td {
  padding: 12px 16px;
  border-bottom: 1px solid #eff4f2;
  vertical-align: middle;
}
table.table tr:last-child td { border-bottom: 0; }
table.table tbody tr:hover td { background: #f7fbf9; }
.table .actions { white-space: nowrap; }
.table .actions a, .table .actions button {
  margin-right: 6px;
}

code {
  background: #f2f8f6;
  color: #0a7f66;
  border-radius: 5px;
  padding: 1px 5px;
  font-size: 12px;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 0;
  border-radius: 9px;
  padding: 8px 14px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
  transition: opacity .15s, transform .15s, box-shadow .15s;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: 0 2px 7px rgba(10, 163, 127, .13);
}
.btn:hover { opacity: .88; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 7px; box-shadow: none; }
.btn-block { display: flex; width: 100%; padding: 11px; font-size: 14.5px; }
.btn-outline { background: #fff; color: var(--primary-dark); border: 1px solid #bfe3d8; box-shadow: none; }
.btn-ghost { background: var(--primary-light); color: var(--primary-dark); box-shadow: none; }
.btn-gray { background: #eef1f5; color: #5b6b7d; }
.btn-danger { background: #fdecea; color: var(--danger); }
.btn-warning { background: #fdf3e3; color: #b57a0a; }
.btn-wecom { background: #2b7de9; color: #fff; }
.btn-gray, .btn-danger, .btn-warning { box-shadow: none; }
.wecom-login { margin-top: 18px; }
.wecom-login .or-line { text-align: center; position: relative; margin-bottom: 14px; }
.wecom-login .or-line::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--line); }
.wecom-login .or-line span { position: relative; background: #fff; padding: 0 12px; color: var(--muted); font-size: 12px; }

/* ---------- 表单 ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-group { margin-bottom: 15px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 7px;
  color: #30473f;
}
.form-group label .label-hint {
  margin-left: 8px;
  font-size: 11.5px;
  font-weight: 400;
  color: var(--muted);
}
.form-group label .req { color: var(--danger); }
.form-group input[type=text], .form-group input[type=password], .form-group input[type=number],
.form-group input[type=tel], .form-group input[type=date], .form-group select, .form-group textarea {
  width: 100%;
  border: 1px solid var(--control-border);
  border-radius: var(--control-radius);
  padding: var(--control-pad-y) var(--control-pad-x);
  min-height: var(--control-height);
  font-size: var(--control-font);
  font-family: inherit;
  background: var(--control-bg);
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
  box-shadow: 0 1px 2px rgba(20, 48, 41, .025);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--control-focus);
  box-shadow: 0 0 0 3px rgba(10, 163, 127, .11);
}
.form-group textarea { resize: vertical; min-height: 110px; font-family: inherit; font-size: var(--control-font); line-height: 1.75; }
.form-group .tip { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.form-actions { display: flex; gap: 10px; margin-top: 6px; }

.form-panel { overflow: visible; }
.form-section + .form-section {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid #eef4f2;
}
.form-section-head { margin-bottom: 14px; }
.form-section-head h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 600;
  color: #2c403b;
}
.form-section-head h3::before {
  content: "";
  width: 3px;
  height: 14px;
  border-radius: 99px;
  background: linear-gradient(180deg, #22c8a1, var(--primary));
}
.form-section-head p { font-size: 11.5px; color: var(--muted); margin: 3px 0 0 11px; }
.form-sticky-actions {
  position: sticky;
  bottom: 16px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 22px -20px -20px;
  padding: 13px 20px;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(10px);
  border-top: 1px solid #eef4f2;
  border-radius: 0 0 16px 16px;
  box-shadow: 0 -8px 24px rgba(20, 48, 41, .04);
}

.schedule-template-form {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}
.schedule-template-form .form-group { margin-bottom: 0; }
.schedule-template-form .field-weekdays { grid-column: span 12; }
.schedule-template-form .form-group:not(.field-weekdays) { grid-column: span 2; }
.schedule-template-form .field-submit { grid-column: span 2; min-height: 40px; }
.schedule-template-form .weekday-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.schedule-template-form .weekday-pills label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  padding: 7px 10px;
  border: 1px solid #dfeae6;
  border-radius: 8px;
  background: #fff;
  color: #526762;
  font-size: 12.5px;
  font-weight: 400;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.schedule-template-form .weekday-pills label:has(input:checked) {
  border-color: #bfe3d8;
  background: var(--primary-light);
  color: var(--primary-dark);
}
.schedule-template-form .weekday-pills input { accent-color: var(--primary); }

/* ---------- 图片上传(拖拽 + 预览) ---------- */
.upload-shell { position: relative; }
.upload-preview[hidden], .upload-remove[hidden], .upload-error[hidden] { display: none !important; }
.upload-shell .upload-input {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.upload-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid #e4efeb;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, #fbfdfc);
  box-shadow: 0 2px 8px rgba(20, 48, 41, .035);
}
.upload-thumb {
  width: 58px; height: 58px;
  border-radius: 10px;
  object-fit: cover;
  background: #f1f8f5;
  border: 1px solid #e6f0ec;
  flex-shrink: 0;
}
.upload-shell[data-thumb="wide"] .upload-thumb { width: 104px; height: 52px; border-radius: 8px; }
.upload-shell[data-thumb="cover"] .upload-thumb { width: 84px; height: 56px; border-radius: 8px; }
.upload-fileinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.upload-fileinfo b {
  font-size: 12.5px; font-weight: 500; color: #2c403b;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.upload-fileinfo small { font-size: 11px; color: var(--muted); }
.upload-file-badge {
  width: 46px; height: 46px;
  border-radius: 10px;
  background: #eef4ff;
  color: #2b7de9;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .4px;
}
.upload-remove {
  border: 0;
  border-radius: 7px;
  background: #fff1ee;
  color: #d9533d;
  font-family: inherit;
  font-size: 11.5px;
  padding: 5px 9px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s;
}
.upload-remove:hover { background: #ffe7e2; }
.upload-dropzone {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1.5px dashed #cfe3dc;
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfefd, #f4fbf8);
  cursor: pointer;
  transition: border-color .18s, background .18s, box-shadow .18s, transform .15s;
  outline: none;
}
.form-group label.upload-dropzone { display: flex; margin-bottom: 0; font-weight: 400; }
.upload-dropzone:hover,
.upload-dropzone:focus-visible,
.upload-dropzone.is-dragover {
  border-color: #43c5a2;
  background: #edfaf5;
  box-shadow: inset 0 0 0 3px rgba(10, 159, 123, .06);
}
.upload-dropzone.is-dragover { transform: scale(1.005); }
.upload-dropzone.is-error { border-color: #f0b7ae; background: #fff8f6; }
.upload-icon {
  width: 46px; height: 46px;
  border-radius: 13px;
  background: #e5f8f2;
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .65);
}
.upload-icon svg { width: 22px; height: 22px; }
.upload-icon-file { background: #eef4ff; color: #2b7de9; }
.upload-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.upload-copy b { font-size: 13px; font-weight: 600; color: #2c403b; }
.upload-copy small { font-size: 11px; color: #7a8a95; line-height: 1.5; }
.upload-browse {
  flex-shrink: 0;
  padding: 6px 10px;
  border-radius: 8px;
  background: #e8f8f3;
  border: 1px solid #d5efe7;
  color: var(--primary-dark);
  font-size: 11.5px;
  font-weight: 500;
}
.upload-error {
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--danger);
}

/* ---------- 文章正文编辑器 ---------- */
.rich-source { display: none !important; }
.rich-editor-wrap {
  border: 1px solid #dfeae6;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 2px rgba(20, 48, 41, .025);
  transition: border-color .15s, box-shadow .15s;
}
.rich-editor-wrap:focus-within {
  border-color: #74c9b3;
  box-shadow: 0 0 0 3px rgba(10, 163, 127, .1);
}
.rich-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 8px 10px;
  background: linear-gradient(180deg, #fbfefd, #f5fbf8);
  border-bottom: 1px solid #eef4f2;
}
.rich-tool-group { display: flex; align-items: center; gap: 2px; }
.rich-tool-sep { width: 1px; height: 20px; background: #e4eeea; margin: 0 4px; }
.rich-toolbar button {
  border: 0;
  border-radius: 6px;
  min-width: 28px;
  height: 28px;
  padding: 0 7px;
  background: transparent;
  color: #536762;
  font-family: inherit;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: background .15s, color .15s;
}
.rich-toolbar button:hover { background: #e8f8f3; color: var(--primary-dark); }
.rich-toolbar button.active { background: #dff5ee; color: var(--primary-dark); }
.rich-toolbar button b,
.rich-toolbar button i,
.rich-toolbar button u,
.rich-toolbar button s { font-size: 12.5px; }
.rich-editor {
  min-height: 430px;
  padding: 20px 22px;
  outline: none;
  font-size: 15px;
  line-height: 1.85;
  color: #2b3a36;
  overflow-wrap: anywhere;
}
.rich-editor.is-dragover {
  background: #f2fbf7;
  box-shadow: inset 0 0 0 2px #74c9b3;
}
.rich-editor:empty::before {
  content: attr(data-placeholder);
  color: #9aa8a5;
  pointer-events: none;
}
.rich-editor p { margin: 0 0 12px; }
.rich-editor h2 { font-size: 20px; line-height: 1.45; margin: 20px 0 10px; font-weight: 600; color: #1f302c; }
.rich-editor h3 { font-size: 17px; line-height: 1.5; margin: 16px 0 8px; font-weight: 600; color: #263a35; }
.rich-editor ul, .rich-editor ol { margin: 8px 0 12px; padding-left: 1.6em; }
.rich-editor ul { list-style: disc; }
.rich-editor ol { list-style: decimal; }
.rich-editor li { margin: 4px 0; }
.rich-editor blockquote {
  margin: 14px 0;
  padding: 10px 14px;
  border-left: 3px solid #bfe3d8;
  border-radius: 0 8px 8px 0;
  background: #f5fbf8;
  color: #526762;
}
.rich-editor img { max-width: 100%; height: auto; border-radius: 10px; margin: 10px 0; }
.rich-editor a { color: var(--primary-dark); text-decoration: underline; }
.rich-editor hr { border: 0; border-top: 1px solid #e4eeea; margin: 18px 0; }
.rich-editor-status {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-top: 1px solid #eef4f2;
  background: #fbfdfc;
  font-size: 11px;
  color: var(--muted);
}
.rich-editor-status .status-msg { min-height: 16px; }
.rich-editor-status .status-msg.is-error { color: var(--danger); }
.rich-editor-status .count { margin-left: auto; white-space: nowrap; }

/* ---------- 徽章 ---------- */
.badge {
  display: inline-block;
  font-size: 12px;
  padding: 3px 9px;
  border-radius: 99px;
  font-weight: 500;
  white-space: nowrap;
}
.badge-success { background: #e6f7f2; color: var(--primary-dark); }
.badge-warning { background: #fdf3e3; color: #b57a0a; }
.badge-danger { background: #fdecea; color: var(--danger); }
.badge-info { background: #eaf2fd; color: #2b7de9; }
.badge-gray { background: #eef1f5; color: #7c8a9c; }

/* ---------- 提示条 ---------- */
.alert {
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 13.5px;
  margin-bottom: 16px;
  border: 1px solid;
}
.alert-success { background: #e6f7f2; color: var(--primary-dark); border-color: #b8e6d8; }
.alert-danger { background: #fdecea; color: var(--danger); border-color: #f5c6c0; }
.alert-info { background: #eaf2fd; color: #2b7de9; border-color: #c4dbf7; }
.alert-warning { background: #fffaf0; color: #96670b; border-color: #f0dfb3; }

/* ---------- 登录页 ---------- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(80% 100% at 100% 0%, rgba(255, 255, 255, .12), transparent 60%),
    linear-gradient(135deg, #0a9f7b 0%, #077b60 58%, #10372f 100%);
  padding: 24px;
}
.login-shell {
  width: 100%;
  max-width: 1040px;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  border-radius: 24px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 30px 80px rgba(3, 35, 27, .26);
}
.login-visual {
  position: relative;
  overflow: hidden;
  padding: 52px 46px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
  background:
    radial-gradient(80% 100% at 100% 0%, rgba(255, 255, 255, .09), transparent 60%),
    linear-gradient(145deg, #0d5c49 0%, #0a3c31 100%);
}
.login-visual::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -100px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .07);
}
.login-brand-logo { position: relative; z-index: 1; width: 230px; max-width: 100%; height: auto; margin-bottom: 34px; }
.login-kicker {
  position: relative;
  z-index: 1;
  font-size: 11.5px;
  letter-spacing: 1.6px;
  color: rgba(255, 255, 255, .6);
  margin-bottom: 10px;
}
.login-visual h2 {
  position: relative;
  z-index: 1;
  font-size: 28px;
  line-height: 1.38;
  font-weight: 600;
  letter-spacing: .2px;
  margin-bottom: 14px;
}
.login-lead {
  position: relative;
  z-index: 1;
  max-width: 360px;
  font-size: 13px;
  line-height: 1.9;
  color: rgba(255, 255, 255, .72);
}
.login-points {
  position: relative;
  z-index: 1;
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, .78);
}
.login-points li { display: flex; align-items: center; gap: 9px; }
.login-points li::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #5ee0bd;
  box-shadow: 0 0 0 4px rgba(94, 224, 189, .12);
  flex-shrink: 0;
}
.login-visual small { position: relative; z-index: 1; margin-top: 34px; font-size: 11px; color: rgba(255, 255, 255, .46); }

.login-shell .login-box {
  max-width: none;
  width: auto;
  border-radius: 0;
  box-shadow: none;
  padding: 46px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-shell .login-box .logo { display: none; }
.login-shell .login-box h1 { text-align: left; font-size: 22px; font-weight: 600; letter-spacing: .2px; }
.login-shell .login-box .sub { text-align: left; margin: 4px 0 22px; }
.login-shell .login-box > p:last-child { text-align: left !important; }

@media (max-width: 860px) {
  .login-shell { grid-template-columns: 1fr; max-width: 420px; }
  .login-visual { display: none; }
  .login-shell .login-box { padding: 34px 30px 30px; }
  .login-shell .login-box .logo { display: flex; }
  .login-shell .login-box h1 { text-align: center; }
  .login-shell .login-box .sub { text-align: center; }
  .login-shell .login-box > p:last-child { text-align: center !important; }
}
.login-box {
  background: #fff;
  border-radius: 20px;
  padding: 38px 34px 32px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 24px 60px rgba(3, 35, 27, .22);
}
.login-box .logo {
  width: 100%;
  background: none;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  padding: 0;
}
.login-box .logo img { width: 210px; max-width: 100%; height: auto; display: block; margin: 0 auto; }
.login-box h1 { text-align: center; font-size: 19px; font-weight: 600; }
.login-box .sub { text-align: center; font-size: 12.5px; color: var(--muted); margin: 2px 0 24px; }

/* ---------- 二维码/推广 ---------- */
.promo-grid { display: grid; grid-template-columns: 240px 1fr; gap: 20px; align-items: start; }
.qr-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}
.qr-box img, .qr-box canvas { margin: 0 auto; display: block; }
.qr-box .qr-tip { font-size: 12px; color: var(--muted); margin-top: 8px; }
.copy-link {
  display: flex;
  gap: 8px;
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  word-break: break-all;
}
.copy-link code { flex: 1; color: var(--primary-dark); }

/* ---------- 企业微信通讯录映射 ---------- */
.wecom-sync-hero {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 20px;
  padding: 26px 28px;
  margin-bottom: 18px;
  border: 1px solid #cfe9df;
  border-radius: 20px;
  background:
    radial-gradient(circle at 92% 12%, rgba(10,159,123,.14), transparent 28%),
    linear-gradient(135deg, #f4fbf8 0%, #ffffff 58%, #eef8f4 100%);
  box-shadow: 0 14px 36px rgba(8, 82, 64, .07);
}
.sync-hero-icon {
  width: 72px; height: 72px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(145deg, #0a9f7b, #067a61);
  box-shadow: 0 12px 26px rgba(10, 159, 123, .28);
}
.sync-hero-copy .eyebrow {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--primary-dark);
  margin-bottom: 6px;
}
.sync-hero-copy h2 { margin: 0 0 8px; font-size: 22px; line-height: 1.3; color: #16362f; }
.sync-hero-copy p { margin: 0; font-size: 13px; line-height: 1.8; color: #536b65; max-width: 920px; }
.sync-points { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.sync-points span {
  padding: 5px 10px;
  border: 1px solid #d5ebe4;
  border-radius: 999px;
  background: rgba(255,255,255,.76);
  font-size: 11.5px;
  color: #386158;
}
.sync-result { border-color: #cfe9df; }
.sync-result-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.sync-result-grid > div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fbfa;
}
.sync-result-grid b { display: block; font-size: 23px; color: #183b33; line-height: 1.1; }
.sync-result-grid span { display: block; margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.sync-warnings { margin-top: 14px; font-size: 12.5px; color: #865f13; }
.sync-warnings summary { cursor: pointer; font-weight: 600; }
.sync-warnings ul { margin: 9px 0 0; padding-left: 20px; line-height: 1.8; }
.sync-stat-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.sync-stat {
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 52, 43, .04);
}
.sync-stat span { display: block; font-size: 12px; color: var(--muted); }
.sync-stat b { display: block; margin-top: 5px; font-size: 25px; color: #173b33; }
.sync-stat small { display: block; margin-top: 3px; font-size: 10.5px; color: #96a39f; }
.sync-stat.warning { background: #fffaf0; border-color: #f1dfb3; }
.sync-stat.warning b { color: #b37a0b; }
.sync-action-form { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.sync-action-copy { flex: 1 1 420px; min-width: 260px; }
.sync-action-copy b { display: block; font-size: 14px; color: #1b382f; }
.sync-action-copy span { display: block; margin-top: 3px; font-size: 11.5px; line-height: 1.7; color: var(--muted); }
.sync-check { font-size: 12px; color: #53615d; white-space: nowrap; }
.sync-check input { accent-color: var(--primary); vertical-align: -2px; }
.sync-guide { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); font-size: 12.5px; color: #52635f; }
.sync-guide summary { cursor: pointer; color: var(--primary-dark); font-weight: 600; }
.sync-guide ol { margin: 10px 0 0; padding-left: 21px; line-height: 1.9; }
.sync-guide code { padding: 2px 5px; border-radius: 5px; background: #f1f6f4; color: #0b715a; word-break: break-all; }
.sync-filter-bar { padding-bottom: 12px; }
.sync-filter-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sync-filter-form input[type=search] { min-width: 280px; flex: 1 1 300px; }
.sync-filter-form select { min-width: 150px; }
.sync-table th { white-space: nowrap; }
.sync-table td { vertical-align: middle; }
.sync-table .row-inactive { opacity: .58; background: #fafbfb; }
.sync-person { display: flex; align-items: center; gap: 10px; min-width: 170px; }
.sync-person img, .sync-avatar {
  width: 38px; height: 38px;
  flex: 0 0 38px;
  border-radius: 12px;
  object-fit: cover;
  background: #e9f5f1;
  color: var(--primary-dark);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.sync-person b { display: block; font-size: 13px; color: #1e342e; }
.sync-person small, .cell-sub { display: block; margin-top: 2px; font-size: 10.5px; color: #93a09c; word-break: break-all; }
.match-note { font-size: 11.5px; color: #6f7f7a; white-space: nowrap; }
.sync-map-col { min-width: 300px; }
.sync-map-form { display: flex; align-items: center; gap: 6px; }
.sync-map-form select { min-width: 210px; max-width: 280px; padding: 7px 9px; font-size: 12px; }
.sync-map-form .btn { flex: 0 0 auto; }
.sync-empty { padding: 54px 20px; text-align: center; color: #92a09c; }
.sync-empty svg { color: #b7cbc5; margin-bottom: 10px; }
.sync-empty b { display: block; font-size: 14px; color: #4f625d; }
.sync-empty span { display: block; margin-top: 5px; font-size: 12px; }
.sync-footnote { display: flex; align-items: flex-start; gap: 8px; margin-top: 14px; padding: 0 4px; font-size: 11.5px; line-height: 1.8; color: #85948f; }
.sync-footnote svg { flex: 0 0 auto; margin-top: 2px; color: var(--primary); }
.pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; padding: 18px 16px 22px; }
.pagination a { min-width: 34px; padding: 7px 10px; text-align: center; border: 1px solid var(--line); border-radius: 9px; color: #61736e; background: #fff; font-size: 12px; }
.pagination a.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- 员工待办中心 ---------- */
.task-head-card { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; padding:24px 26px; margin-bottom:16px; border:1px solid #d7ebe5; border-radius:20px; background:radial-gradient(circle at 92% 15%,rgba(10,159,123,.12),transparent 25%),linear-gradient(135deg,#f5fbf9,#fff); }
.task-head-card h2 { margin:4px 0 6px; font-size:22px; color:#183b31; }
.task-head-card p { margin:0; font-size:12.5px; line-height:1.8; color:#647771; max-width:760px; }
.task-eyebrow { font-size:11px; letter-spacing:.13em; font-weight:700; color:var(--primary-dark); }
.task-sync-form { flex:0 0 auto; }
.task-stat-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:16px; }
.task-stat { padding:16px 18px; background:#fff; border:1px solid var(--line); border-radius:15px; box-shadow:0 6px 18px rgba(15,52,43,.04); }
.task-stat span { display:block; font-size:12px; color:var(--muted); }
.task-stat b { display:block; margin-top:5px; font-size:25px; color:#183b31; }
.task-stat small { display:block; margin-top:3px; font-size:10.5px; color:#9aa8a4; }
.task-stat.danger { background:#fff7f6; border-color:#f1d3ce; }
.task-stat.danger b { color:#c0392b; }
.task-stat.warning { background:#fffbf0; border-color:#f0e0b9; }
.task-stat.warning b { color:#b37a0b; }
.task-stat.success { background:#f4fcf8; border-color:#d6ebdf; }
.task-stat.success b { color:#0a8d67; }
.task-filter-bar { display:flex; justify-content:space-between; gap:14px; align-items:center; flex-wrap:wrap; border-bottom:1px solid var(--line); }
.task-tabs { display:flex; gap:5px; flex-wrap:wrap; }
.task-tabs a { padding:7px 12px; border-radius:999px; font-size:12px; color:#6b7d78; background:#f5f8f7; }
.task-tabs a.active { background:var(--primary); color:#fff; }
.task-search-form { display:flex; gap:7px; align-items:center; }
.task-search-form input { min-width:240px; }
.task-list { padding:0 20px; }
.task-item { display:flex; justify-content:space-between; gap:18px; padding:17px 0; border-bottom:1px solid var(--line); }
.task-item:last-child { border-bottom:0; }
.task-item.focus { margin:0 -20px; padding:17px 20px; background:#f8fcfb; box-shadow:inset 3px 0 0 var(--primary); }
.task-item.overdue .task-meta span:first-child { color:#c0392b; font-weight:600; }
.task-main { min-width:0; flex:1; }
.task-line { display:flex; align-items:center; gap:7px; flex-wrap:wrap; margin-bottom:4px; }
.task-type { font-size:10.5px; color:var(--primary-dark); background:var(--primary-light); border-radius:999px; padding:2px 8px; }
.task-prio { font-size:10px; border-radius:999px; padding:2px 7px; background:#f1f4f3; color:#7a8985; }
.task-prio.high { background:#fff3df; color:#b36b00; }
.task-prio.critical { background:#fdecea; color:#c0392b; }
.task-main h3 { margin:4px 0 5px; font-size:14px; line-height:1.45; color:#1c3730; }
.task-main p { margin:0; font-size:12px; line-height:1.7; color:#697b75; }
.task-meta { display:flex; gap:12px; flex-wrap:wrap; margin-top:7px; font-size:10.5px; color:#96a39f; }
.task-meta span { display:inline-flex; align-items:center; gap:4px; }
.task-actions { flex:0 0 auto; display:flex; align-items:flex-start; gap:6px; flex-wrap:wrap; }
.task-actions form { display:inline-flex; }
.task-empty { padding:52px 20px; text-align:center; color:#93a29d; }
.task-empty svg { color:#b5cac3; margin-bottom:10px; }
.task-empty b { display:block; font-size:14px; color:#4c625b; }
.task-empty span { display:block; margin-top:4px; font-size:12px; }
.task-dashboard-list { padding:4px 20px 12px; }
.task-dashboard-item { display:grid; grid-template-columns:78px minmax(0,1fr) 92px auto; gap:10px; align-items:center; padding:11px 0; border-bottom:1px solid var(--line); font-size:12px; }
.task-dashboard-item:last-child { border-bottom:0; }
.task-dashboard-item.overdue .task-dashboard-due { color:#c0392b; }
.task-dashboard-type { color:var(--primary-dark); font-size:11px; }
.task-dashboard-title { color:#31443f; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.task-dashboard-due { color:#8b9a95; text-align:right; }
.notice-hero { display:flex; justify-content:space-between; align-items:center; gap:18px; padding:24px 26px; margin-bottom:16px; border:1px solid #d7ebe5; border-radius:20px; background:linear-gradient(135deg,#f5fbf9,#fff 65%,#eef8f4); }
.notice-hero h2 { margin:4px 0 6px; font-size:22px; color:#183b31; }
.notice-hero p { margin:0; font-size:12.5px; line-height:1.8; color:#687b75; max-width:760px; }
.notice-hero-count { flex:0 0 auto; min-width:82px; text-align:center; padding:10px 14px; border-radius:14px; background:#fff; border:1px solid #e1eee9; }
.notice-hero-count b { display:block; font-size:25px; color:var(--primary-dark); }
.notice-hero-count span { display:block; font-size:10.5px; color:#8b9a95; }
.notice-item { display:flex; gap:18px; justify-content:space-between; padding:18px 20px; border-bottom:1px solid var(--line); }
.notice-item:last-child { border-bottom:0; }
.notice-item.unread { background:#fffdf8; }
.notice-item.urgent { box-shadow:inset 3px 0 0 #e67e22; }
.notice-item-main { min-width:0; flex:1; }
.notice-item h3 { margin:5px 0 6px; font-size:15px; color:#1c3730; }
.notice-content { font-size:12.5px; line-height:1.8; color:#5f726c; white-space:normal; }
.notice-item-actions { flex:0 0 auto; display:flex; flex-direction:column; gap:6px; align-items:stretch; }
.notice-item-actions form { display:flex; }
.notice-item-actions .btn { width:100%; text-align:center; }
.notice-readers { margin-top:8px; font-size:11px; color:#8b9a95; }
.notice-readers summary { cursor:pointer; color:#60756e; }
.notice-readers div { display:flex; flex-wrap:wrap; gap:5px; margin-top:6px; }
.notice-readers span { padding:3px 7px; background:#f3f8f6; border-radius:999px; }
.assistant-hero { display:flex; align-items:center; gap:18px; padding:26px 28px; margin-bottom:16px; border:1px solid #d7ebe5; border-radius:20px; background:radial-gradient(circle at 88% 16%,rgba(10,159,123,.13),transparent 28%),linear-gradient(135deg,#f4fbf8,#fff); }
.assistant-orb { width:66px; height:66px; flex:0 0 66px; display:flex; align-items:center; justify-content:center; border-radius:21px; color:#fff; background:linear-gradient(145deg,#0a9f7b,#067a61); box-shadow:0 12px 28px rgba(10,159,123,.24); }
.assistant-hero h2 { margin:3px 0 6px; font-size:23px; color:#183b31; }
.assistant-hero p { margin:0; font-size:12.5px; line-height:1.8; color:#687c75; max-width:850px; }
.assistant-search { display:flex; gap:8px; margin-bottom:10px; padding:8px; background:#fff; border:1px solid var(--line); border-radius:15px; box-shadow:0 8px 22px rgba(15,52,43,.05); }
.assistant-search input { flex:1; border:0; box-shadow:none; padding:12px 14px; font-size:14px; background:transparent; }
.assistant-search input:focus { box-shadow:none; }
.assistant-chips { display:flex; flex-wrap:wrap; gap:7px; margin-bottom:18px; }
.assistant-chips a { padding:6px 10px; border:1px solid #dbe9e4; border-radius:999px; background:#fff; color:#527067; font-size:11.5px; }
.assistant-chips a:hover { background:var(--primary-light); border-color:#bfe3d8; color:var(--primary-dark); }
.assistant-results { max-width:920px; }
.assistant-question { margin-bottom:10px; font-size:12px; color:#8b9a95; }
.assistant-answer { padding:18px 20px; margin-bottom:12px; border:1px solid var(--line); border-radius:16px; background:#fff; box-shadow:0 6px 18px rgba(15,52,43,.04); }
.assistant-answer h3 { margin:0 0 10px; font-size:15px; color:#19382f; }
.assistant-line { padding:7px 0; border-top:1px solid #f0f4f2; font-size:12.5px; line-height:1.75; color:#53665f; }
.assistant-line:first-of-type { border-top:0; padding-top:0; }
.assistant-muted { color:#99a6a1; font-size:11px; }
.assistant-answer .btn { margin-top:6px; }

/* ---------- 渠道与集成总览 ---------- */
.channel-hero { display:flex; gap:18px; align-items:flex-start; padding:24px 26px; margin-bottom:16px; border:1px solid #d7ebe5; border-radius:20px; background:radial-gradient(circle at 90% 15%,rgba(43,125,233,.1),transparent 25%),linear-gradient(135deg,#f5fbf9,#fff); }
.channel-hero-icon { width:64px; height:64px; flex:0 0 64px; display:flex; align-items:center; justify-content:center; border-radius:20px; color:#fff; background:linear-gradient(145deg,#0a9f7b,#067a61); box-shadow:0 12px 26px rgba(10,159,123,.24); }
.channel-hero h2 { margin:4px 0 6px; font-size:22px; color:#183b31; }
.channel-hero p { margin:0; max-width:900px; font-size:12.5px; line-height:1.8; color:#687b75; }
.channel-main-site { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:14px 18px; margin-bottom:16px; border:1px solid #dbe9e4; border-radius:14px; background:#fff; }
.channel-main-site > div:first-child { min-width:0; }
.channel-main-kicker { display:block; font-size:10px; letter-spacing:.8px; color:var(--primary-dark); font-weight:700; }
.channel-main-site b { display:block; margin:2px 0; font-size:14px; color:#1b382f; }
.channel-main-site small { display:block; font-size:11px; line-height:1.6; color:#879792; }
.channel-flow { display:grid; grid-template-columns:1fr 30px 1.2fr 30px 1fr; align-items:stretch; gap:8px; margin-bottom:16px; }
.channel-flow-node { padding:14px 16px; border:1px solid var(--line); border-radius:15px; background:#fff; text-align:center; }
.channel-flow-node.patient { background:#f5f8ff; border-color:#dbe6ff; }
.channel-flow-node.core { background:#f3fcf8; border-color:#cfe9df; }
.channel-flow-node.staff { background:#f7f5ff; border-color:#e1dbf7; }
.channel-flow-node span { display:block; font-size:10px; color:var(--muted); letter-spacing:.6px; }
.channel-flow-node b { display:block; margin:4px 0 2px; font-size:13px; color:#1d3a32; }
.channel-flow-node small { font-size:10.5px; color:#879792; }
.channel-flow-arrow { display:flex; align-items:center; justify-content:center; color:#8aaba2; font-size:20px; }
.channel-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin-bottom:16px; }
.channel-card { padding:20px; border:1px solid var(--line); border-radius:18px; background:#fff; box-shadow:0 6px 18px rgba(15,52,43,.04); }
.channel-card-head { display:flex; align-items:center; gap:10px; }
.channel-card-head > div { flex:1; min-width:0; }
.channel-card-head h3 { margin:0; font-size:15px; color:#1b372f; }
.channel-card-head small { display:block; margin-top:3px; font-size:10.5px; color:#99a6a1; }
.channel-icon { width:42px; height:42px; flex:0 0 42px; border-radius:13px; display:flex; align-items:center; justify-content:center; }
.channel-icon.wx { background:#e9f8ef; color:#1e9e57; }
.channel-icon.mp { background:#eaf2fd; color:#2b7de9; }
.channel-icon.wecom { background:#f1edff; color:#7157d8; }
.channel-card > p { min-height:66px; margin:14px 0; font-size:12px; line-height:1.75; color:#61736c; }
.channel-metrics { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:14px; }
.channel-metrics span { padding:6px 9px; border-radius:8px; background:#f5f9f7; font-size:10.5px; color:#6d8079; }
.channel-metrics b { color:#1b3d32; }
.channel-actions { display:flex; gap:6px; flex-wrap:wrap; }
.channel-boundary { margin-bottom:0; }
.channel-boundary-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; padding:0 20px 20px; }
.channel-boundary-grid > div { padding:12px 14px; border:1px solid #e8f0ed; border-radius:12px; background:#fbfdfc; }
.channel-boundary-grid b { display:block; margin-bottom:4px; font-size:12.5px; color:#1c3c32; }
.channel-boundary-grid span { font-size:11.5px; line-height:1.7; color:#71827c; }

/* ---------- 渠道中心 ---------- */
.channel-hero-compact { padding:20px 24px; }
.channel-hero-compact h2 { font-size:20px; }
.channel-tabs { display:flex; gap:4px; align-items:flex-end; margin:0 0 16px; padding:0 4px; border-bottom:1px solid #dfeae6; overflow-x:auto; }
.channel-tabs a { flex:0 0 auto; padding:10px 17px; border:1px solid transparent; border-bottom:0; border-radius:10px 10px 0 0; color:#6f817a; font-size:12.5px; font-weight:500; }
.channel-tabs a:hover { color:var(--primary-dark); background:#f4faf7; }
.channel-tabs a.active { margin-bottom:-1px; border-color:#dfeae6; background:#fff; color:var(--primary-dark); font-weight:700; }
.channel-overview-lower { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(320px,.8fr); gap:14px; margin-bottom:16px; }
.channel-overview-lower .panel { margin:0; }
.channel-inline-form { display:inline-flex; margin:0; }
.channel-switch-row { display:flex; gap:10px; flex-wrap:wrap; }
.channel-switch-row label { display:flex; align-items:center; gap:8px; padding:11px 14px; border:1px solid #e1ece8; border-radius:10px; background:#fbfdfc; font-size:12.5px; color:#35584c; cursor:pointer; }
.channel-message-stats, .channel-message-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.channel-message-summary { grid-template-columns:repeat(4,minmax(0,1fr)); margin-bottom:16px; }
.channel-message-stats > div, .channel-message-summary > div { padding:15px 16px; border:1px solid #e4eeea; border-radius:13px; background:#fbfdfc; }
.channel-message-stats b, .channel-message-summary b { display:block; font-size:27px; line-height:1; color:#23453a; letter-spacing:-.5px; }
.channel-message-stats span, .channel-message-summary span { display:block; margin-top:6px; font-size:11px; color:#83938d; }
.channel-message-stats .ok b, .channel-message-summary .ok b { color:#0a9f7b; }
.channel-message-stats .bad b, .channel-message-summary .bad b { color:var(--danger); }
.channel-tab-head { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-bottom:16px; padding:20px 24px; border:1px solid #dfeae6; border-radius:18px; background:linear-gradient(135deg,#f7fcfa,#fff); }
.channel-tab-head > div { min-width:0; }
.channel-tab-head h2 { margin:3px 0 4px; font-size:21px; color:#183b31; }
.channel-tab-head p { margin:0; font-size:12px; line-height:1.7; color:#75867f; }
.channel-action-bar { display:flex; align-items:center; gap:8px; flex-wrap:wrap; padding:14px 20px; }
.channel-action-bar form { display:inline-flex; margin:0; }
.channel-clear-check { display:flex !important; align-items:center; gap:6px; margin-top:5px !important; font-size:10.5px !important; font-weight:400 !important; color:#8a9893; cursor:pointer; }
.channel-clear-check input { width:14px; height:14px; margin:0; }
.channel-config-note { margin:12px 0 16px; padding:11px 14px; border-left:3px solid #91cdb9; border-radius:0 9px 9px 0; background:#f6fbf9; color:#6f827b; font-size:11.5px; line-height:1.8; }
.channel-config-note code { color:#2b6655; word-break:break-all; }
.channel-diagnostic-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin-bottom:16px; }
.channel-endpoint-list > div { display:grid; grid-template-columns:150px minmax(0,1fr); gap:10px; align-items:start; padding:10px 0; border-bottom:1px dashed #e7eeeb; }
.channel-endpoint-list > div:last-child { border-bottom:0; }
.channel-endpoint-list span { font-size:11.5px; color:#81918b; }
.channel-endpoint-list code { padding:4px 7px; border-radius:6px; background:#f1f7f4; color:#266451; font-size:10.5px; word-break:break-all; }
.channel-check-list > div { padding:10px 0; border-bottom:1px dashed #e7eeeb; }
.channel-check-list > div:last-child { border-bottom:0; }
.channel-check-list b { display:block; margin-bottom:3px; font-size:12px; color:#2a4a3f; }
.channel-check-list span { display:block; font-size:11.5px; line-height:1.7; color:#75867f; }

/* ---------- 到院核销扫码 ---------- */
body.scan-open { overflow:hidden; }
.scan-launch { border-color:#0b8268 !important; background:linear-gradient(135deg,#0a9f7b,#08765e) !important; color:#fff !important; box-shadow:0 4px 14px rgba(8,118,94,.18); }
.scan-launch:hover { background:linear-gradient(135deg,#087f64,#065c4a) !important; }
.scan-modal { position:fixed; inset:0; z-index:10000; display:flex; align-items:center; justify-content:center; padding:20px; background:rgba(7,22,18,.72); backdrop-filter:blur(4px); }
.scan-modal[hidden] { display:none !important; }
.scan-dialog { width:min(540px,100%); max-height:calc(100vh - 40px); overflow:auto; padding:20px; border:1px solid rgba(255,255,255,.16); border-radius:20px; background:#fff; box-shadow:0 24px 80px rgba(3,18,14,.32); }
.scan-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:14px; }
.scan-head h2 { margin:3px 0 0; font-size:20px; color:#173b31; }
.scan-close { width:36px; height:36px; flex:0 0 36px; border:1px solid #e1ebe7; border-radius:50%; background:#f7fbf9; color:#668078; font-size:24px; line-height:1; cursor:pointer; }
.scan-close:hover { background:#eef7f3; color:#1d5b49; }
.scan-stage { position:relative; min-height:290px; display:flex; align-items:center; justify-content:center; overflow:hidden; border-radius:16px; background:radial-gradient(circle at 50% 40%,#163b32,#081b16 70%); }
#scan-video { display:none; width:100%; max-height:55vh; object-fit:cover; }
.scan-stage.is-camera #scan-video { display:block; }
.scan-stage.is-camera .scan-stage-hint { display:none; }
.scan-stage-hint { position:relative; z-index:2; max-width:85%; padding:26px; color:#b9d5cb; font-size:13px; line-height:1.8; text-align:center; }
.scan-reticle { position:absolute; z-index:1; width:min(58%,230px); aspect-ratio:1; border:2px solid rgba(72,235,180,.92); border-radius:18px; box-shadow:0 0 0 999px rgba(4,17,13,.22); pointer-events:none; }
.scan-status { min-height:22px; margin:12px 2px 0; color:#73867e; font-size:12px; line-height:1.7; text-align:center; }
.scan-status.bad { color:#b9604f; }
.scan-actions { display:flex; justify-content:center; gap:8px; margin-top:14px; }

/* ---------- 客户时间线 ---------- */
.customer-timeline { position:relative; margin-left:8px; padding-left:22px; border-left:1px solid #dcebe5; }
.customer-event { position:relative; padding:0 0 18px 0; }
.customer-event:last-child { padding-bottom:0; }
.customer-event-dot { position:absolute; left:-28px; top:4px; width:11px; height:11px; border:2px solid #fff; border-radius:50%; background:#0a9f7b; box-shadow:0 0 0 1px #b9dfd2; }
.customer-event-head { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.customer-event-head b { font-size:12.5px; color:#21483c; }
.customer-event-head time { margin-left:auto; font-size:10.5px; color:#98a8a1; }
.customer-event-desc { margin-top:4px; font-size:11.5px; line-height:1.7; color:#7a8b84; }
@media (max-width:600px) {
  .scan-modal { padding:12px; }
  .scan-dialog { padding:16px; border-radius:16px; }
  .scan-stage { min-height:240px; }
  .scan-actions .btn { flex:1; }
}

/* ---------- AI 导诊配置 ---------- */
.ai-config-note { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin-bottom:18px; }
.ai-step { padding:11px 12px; border:1px solid #e3efeb; border-radius:11px; background:#f7fbf9; }
.ai-step i { float:left; width:20px; height:20px; margin-right:7px; display:flex; align-items:center; justify-content:center; border-radius:50%; background:var(--primary); color:#fff; font-size:10px; font-style:normal; font-weight:700; }
.ai-step b { display:block; font-size:11.5px; color:#25463c; }
.ai-step span { display:block; margin-top:2px; font-size:10px; line-height:1.55; color:#8b9b95; }
.ai-key-row, .ai-model-row { display:flex; align-items:center; gap:8px; }
.ai-key-row input { flex:1; }
.ai-key-row .btn { flex:0 0 auto; }
.ai-model-row input { flex:1 1 auto; }
.ai-model-row select { flex:0 0 220px; min-width:0; }
.ai-model-row .btn { flex:0 0 auto; }
.ai-check { display:inline-flex; align-items:center; gap:6px; margin-top:7px; font-size:11.5px; font-weight:400; color:#7b8b85; }
.ai-check input { width:15px; height:15px; margin:0; }
.ai-model-status { min-height:18px; }
.ai-usage-card { background:#f7fbf9; border:1px solid #e3efeb; border-radius:11px; padding:10px 13px; }
.ai-usage-inline { display:flex; gap:8px; flex-wrap:wrap; margin:3px 0 5px; }
.ai-usage-inline span { font-size:10.5px; color:#84958e; }
.ai-usage-inline b { color:#173e32; font-size:14px; margin-left:2px; }
.ai-help-box { margin-top:14px; padding:13px 15px; border-left:3px solid var(--primary); border-radius:0 10px 10px 0; background:#f4fbf8; }
.ai-help-box b { display:block; font-size:12px; color:#204a3d; }
.ai-help-box span { display:block; margin-top:3px; font-size:11.5px; line-height:1.75; color:#71847b; }
.ai-recent-log { margin-top:16px; border-top:1px dashed var(--line); padding-top:12px; }
.ai-recent-log summary { cursor:pointer; font-size:12px; color:var(--primary-dark); }
.ai-recent-log .table-wrap { margin-top:9px; border:1px solid var(--line); border-radius:10px; }
.perm-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.perm-check { display:flex; align-items:flex-start; gap:8px; padding:10px 11px; border:1px solid var(--line); border-radius:10px; background:#fbfdfc; font-weight:400; margin:0 !important; cursor:pointer; }
.perm-check input { margin-top:3px; flex:0 0 auto; }
.perm-check b { display:block; font-size:12px; color:#28483d; font-weight:500; }
.perm-check:hover { border-color:#bfe3d8; background:var(--primary-light); }

/* ---------- 表单控件统一基线（后台所有页面） ---------- */
.content :where(input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=file]):not([type=submit]):not([type=button]):not([type=reset])),
.content select,
.content textarea {
  min-height: var(--control-height);
  padding: var(--control-pad-y) var(--control-pad-x) !important;
  border: 1px solid var(--control-border) !important;
  border-radius: var(--control-radius) !important;
  background-color: var(--control-bg) !important;
  color: var(--text);
  font-family: inherit;
  font-size: var(--control-font) !important;
  line-height: 1.45 !important;
  box-shadow: 0 1px 2px rgba(20, 48, 41, .025);
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.content :where(input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=file]):not([type=submit]):not([type=button]):not([type=reset])),
.content select { height: var(--control-height); }
.content textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.75 !important;
}
.content select {
  appearance: none;
  padding-right: 34px !important;
  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 6 6.5l5-5' fill='none' stroke='%2370827c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 12px 8px !important;
}
.content input:not([type=checkbox]):not([type=radio]):not([type=file]):focus,
.content select:focus,
.content textarea:focus {
  outline: none !important;
  border-color: var(--control-focus) !important;
  box-shadow: 0 0 0 3px rgba(10, 163, 127, .11) !important;
}
.content input::placeholder,
.content textarea::placeholder { color: #9aa8a4; }
.content input[type=checkbox],
.content input[type=radio] { width: 16px; height: 16px; accent-color: var(--primary); vertical-align: -2px; }
.content input:disabled,
.content select:disabled,
.content textarea:disabled { background-color: #f4f7f6 !important; color: #95a49f; cursor: not-allowed; }
.content .form-group input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=file]):not([type=submit]):not([type=button]):not([type=reset]),
.content .form-group select,
.content .form-group textarea { width: 100%; }
.content .form-group .ai-model-row select { width: 220px; max-width: 220px; flex: 0 0 220px; }
.content .form-group .ai-model-row input,
.content .form-group .ai-key-row input { width: auto; min-width: 0; flex: 1 1 auto; }

/* 表格里的内联小控件保持紧凑，但视觉规则与主表单一致 */
.content .table input:not([type=checkbox]):not([type=radio]):not([type=file]),
.content .table select {
  min-height: 30px !important;
  height: 30px !important;
  padding: 5px 8px !important;
  border-radius: 7px !important;
  font-size: 12px !important;
}
.content .table select { padding-right: 28px !important; background-position: right 9px center !important; }
.content .btn { min-height: var(--control-height); }
.content .btn-sm { min-height: 30px; }
.content form.panel[method="get"] .btn-sm,
.content .sync-filter-form .btn-sm,
.content .task-search-form .btn-sm {
  min-height: var(--control-height);
  padding: var(--control-pad-y) 14px;
  border-radius: var(--control-radius);
  font-size: var(--control-font);
}

/* 工作助手搜索框与其他页面输入框共用同一套基线 */
.assistant-search {
  gap: 10px;
  align-items: stretch;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.assistant-search input { flex: 1; width: 100%; background-color: var(--control-bg) !important; }
.assistant-search .btn { min-height: var(--control-height); }
.content .sync-filter-form,
.content .task-search-form { gap: 10px; }
.content form.panel[method="get"] { gap: 10px !important; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  body.admin-nav-open { overflow: hidden; }
  body.admin-nav-open::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 99;
    background: rgba(8, 32, 26, .32);
    backdrop-filter: blur(2px);
  }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: 18px 0 44px rgba(0, 0, 0, .2); }
  .main { margin-left: 0; }
  .topbar .toggle { display: flex; }
  .content { padding: 16px 14px 30px; }
  .form-grid { grid-template-columns: 1fr; }
  .promo-grid { grid-template-columns: 1fr; }
  .schedule-template-form { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .schedule-template-form .field-weekdays { grid-column: span 6; }
  .schedule-template-form .form-group:not(.field-weekdays) { grid-column: span 2; }
  .schedule-template-form .field-submit { grid-column: span 2; }
  .sync-result-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sync-stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sync-map-form { min-width: 260px; }
  .task-stat-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .channel-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .channel-boundary-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .ai-config-note { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .perm-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

@media (max-width: 600px) {
  .schedule-template-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .schedule-template-form .field-weekdays { grid-column: span 2; }
  .schedule-template-form .form-group:not(.field-weekdays),
  .schedule-template-form .field-submit { grid-column: span 2; }
  .wecom-sync-hero { grid-template-columns: 1fr; padding: 20px; }
  .sync-hero-icon { width: 56px; height: 56px; border-radius: 17px; }
  .sync-hero-copy h2 { font-size: 19px; }
  .sync-result-grid, .sync-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sync-action-form { align-items: flex-start; flex-direction: column; }
  .sync-filter-form input[type=search] { min-width: 0; width: 100%; }
  .sync-filter-form select { flex: 1 1 150px; }
  .task-head-card { flex-direction:column; padding:20px; }
  .task-filter-bar { align-items:stretch; }
  .task-search-form input { min-width:0; flex:1; }
  .task-item { flex-direction:column; gap:10px; }
  .task-actions { justify-content:flex-end; }
  .task-dashboard-item { grid-template-columns:1fr auto; }
  .task-dashboard-type, .task-dashboard-due { font-size:10px; }
  .task-dashboard-title { grid-column:1 / -1; grid-row:1; white-space:normal; }
  .notice-hero { flex-direction:column; align-items:flex-start; padding:20px; }
  .notice-hero-count { width:100%; display:flex; align-items:center; justify-content:space-between; }
  .notice-item { flex-direction:column; gap:10px; }
  .notice-item-actions { flex-direction:row; flex-wrap:wrap; }
  .notice-item-actions .btn { width:auto; }
  .assistant-hero { align-items:flex-start; padding:20px; }
  .assistant-orb { width:52px; height:52px; flex-basis:52px; border-radius:17px; }
  .assistant-search { flex-direction:column; }
  .assistant-search .btn { width:100%; }
  .channel-hero { flex-direction:column; padding:20px; }
  .channel-hero-icon { width:54px; height:54px; flex-basis:54px; border-radius:17px; }
  .channel-flow { grid-template-columns:1fr; }
  .channel-flow-arrow { transform:rotate(90deg); }
  .channel-grid, .channel-boundary-grid { grid-template-columns:1fr; }
  .channel-main-site { flex-direction:column; align-items:flex-start; }
  .ai-config-note { grid-template-columns:1fr; }
  .ai-key-row, .ai-model-row { flex-direction:column; align-items:stretch; }
  .content .form-group .ai-model-row select { flex:1 1 auto; width:100%; max-width:none; }
  .ai-key-row .btn, .ai-model-row .btn { width:100%; }
  .perm-grid { grid-template-columns:1fr; }
}

@media (max-width: 900px) {
  .channel-overview-lower { grid-template-columns:1fr; }
  .channel-diagnostic-grid { grid-template-columns:1fr; }
  .channel-message-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

@media (max-width: 600px) {
  .channel-tabs { margin-left:-2px; margin-right:-2px; }
  .channel-tabs a { padding:9px 13px; }
  .channel-tab-head { flex-direction:column; align-items:flex-start; padding:18px 20px; }
  .channel-hero-compact { padding:18px 20px; }
  .channel-switch-row { flex-direction:column; }
  .channel-switch-row label { width:100%; }
  .channel-message-stats, .channel-message-summary { grid-template-columns:1fr 1fr; }
  .channel-endpoint-list > div { grid-template-columns:1fr; gap:4px; }
  .channel-action-bar { align-items:stretch; flex-direction:column; }
  .channel-action-bar .btn, .channel-action-bar form { width:100%; }
  .channel-action-bar form .btn { width:100%; }
}
