/* ============================================================
   管理后台样式
   ============================================================ */
:root {
  --primary: #0a9f7b;
  --primary-dark: #067a61;
  --primary-light: #e8f8f3;
  --sidebar: #10372f;
  --sidebar-hover: #1a4a40;
  --bg: #f4f8f7;
  --card: #ffffff;
  --text: #243431;
  --muted: #6f808c;
  --line: #e8efed;
  --danger: #e5533d;
  --warning: #f5a623;
  --radius: 18px;
  --shadow: 0 6px 24px rgba(20, 48, 41, 0.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; }

/* ---------- 侧边栏 ---------- */
[hidden] { display: none !important; }

.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-grid.stat-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat-grid.stat-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.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); }
.stat-card .sub { display: block; margin-top: 3px; font-size: 11.5px; line-height: 1.5; color: #93a19d; }
@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;
  flex-wrap: wrap;
  padding: 16px 20px;
  border-bottom: 1px solid #eef4f2;
}
.panel .panel-head h2 { font-size: 16px; font-weight: 600; flex: 1; min-width: 0; 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;
}

/* 列表表格：短字段不拆字；窄屏隐藏次要列，避免横向滚动把操作列挤出去 */
.table .nowrap { white-space: nowrap; }
.table td.actions { text-align: right; }
.truncate-id { display: inline-block; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.btn-icon { padding-left: 8px; padding-right: 8px; line-height: 1; }
.btn-icon svg { vertical-align: -2px; }
details.panel > summary.panel-head { cursor: pointer; }
details.panel > summary.panel-head::-webkit-details-marker { display: none; }
@media (max-width: 1366px) {
  .table .col-optional { display: none; }
  .sync-map-form select { min-width: 0 !important; max-width: 100% !important; }
  .sync-map-col .hh-select { width: 220px; min-width: 0 !important; max-width: 100%; }
  .sync-map-col .hh-select-btn { width: 100%; }
  table.table th,
  table.table td { padding-left: 12px; padding-right: 12px; }
}

.appt-filter { display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.appt-filter-dates { display:flex; align-items:center; gap:6px; }
.appt-filter-actions { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.appt-filter-search { width:180px; }
.appt-batch-bar { display:flex; gap:10px; align-items:center; flex-wrap:wrap; border-bottom:1px solid var(--line); }
.appt-batch-select { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.appt-batch-actions { display:flex; gap:8px; flex-wrap:wrap; }
.appt-table { width:100%; }
.appt-table th, .appt-table td { white-space:nowrap; }
.appt-table-wrap { overflow-x:auto; }

@media (max-width: 720px) {
  .appt-filter { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
  .appt-filter select, .appt-filter input[type="date"], .appt-filter input[type="text"] { width:100%; }
  .appt-filter-dates { grid-column:1 / -1; display:grid; grid-template-columns:1fr auto 1fr; gap:6px; }
  .appt-filter-dates input { width:100%; }
  .appt-filter-search { grid-column:1 / -1; width:100% !important; }
  .appt-filter-actions { grid-column:1 / -1; display:flex; gap:8px; flex-wrap:wrap; }
  .appt-filter-actions .btn { flex:1 1 auto; justify-content:center; }
  .appt-batch-bar { display:grid; grid-template-columns:1fr auto; gap:10px; align-items:center; }
  .appt-batch-select { grid-column:1 / -1; display:flex; justify-content:space-between; gap:10px; }
  .appt-batch-actions { grid-column:1 / -1; display:flex; gap:8px; flex-wrap:wrap; }
  .appt-batch-actions .btn { flex:1 1 30%; justify-content:center; }
  .appt-batch-bar .batch-hint { grid-column:1 / -1; margin-left:0 !important; white-space:normal; }
  .appt-table { min-width:920px; }
  .content { padding-bottom:96px !important; }
}

/* 手机端：预约/客户等列表改成卡片，不再横向拖动表格 */
@media (max-width: 720px) {
  .table-cards-wrap { overflow-x: visible; }
  table.table.table-cards { font-size: 14px; min-width: 0 !important; }
  .table-cards thead { display: none; }
  .table-cards,
  .table-cards tbody,
  .table-cards tr,
  .table-cards td { display: block; width: 100%; }
  .table-cards tr {
    margin: 0 0 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
  }
  .table-cards tr:last-child { margin-bottom: 0; }
  .table-cards td {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 5px 0;
    border: 0;
    text-align: left !important;
  }
  .table-cards td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
  }
  .table-cards td[data-label=""] { display: block; padding: 0 0 4px; }
  .table-cards td[data-label=""]::before { display: none; }
  .table-cards td.actions { display: flex; justify-content: flex-end; gap: 6px; }
  .table-cards td.actions::before { flex: 0 0 auto; }
  .table-cards td[colspan] { display: block; text-align: center !important; }
  .table-cards td[colspan]::before { display: none; }
  /* 字段内容不再被 grid 拉成整行（状态标签等），操作按钮允许换行不挤出卡片 */
  .table-cards td > * { justify-self: start; max-width: 100%; }
  .table-cards td .badge { justify-self: start; }
  .table-cards td.actions { flex-wrap: wrap; justify-content: flex-start; }
  .table-cards td.actions::before { flex: 0 0 64px; }
  .table-cards td.actions .row-actions { display: inline-flex; flex-wrap: wrap; gap: 6px; }
  /* 主内容底部留白，避免右下角悬浮工具压住最后一张卡片的操作按钮 */
  .content { padding-bottom: 96px !important; }
  .batch-hint { flex: 1 1 100%; margin-left: 0 !important; white-space: normal; }
}

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-wrap.is-compact .rich-editor { min-height: 120px; padding: 14px 16px; }
.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, var(--primary) 0%, var(--primary-dark) 58%, var(--sidebar) 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, var(--primary-dark) 0%, var(--sidebar) 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: repeat(auto-fit, minmax(0, 260px)); justify-content: center; max-width: 860px; margin: 0 auto 18px; gap: 20px; align-items: start; }
.promo-grid .qr-box { width: 100%; max-width: 280px; }
.promo-info { width: 100%; }
.promo-info .form-group { margin-bottom: 16px; }
.promo-info .form-group:last-child { margin-bottom: 0; }
.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(auto-fit, minmax(168px, 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; }
/* 企微回调日志：时间 + 中文说明 + 结果徽章，一屏能看多条 */
.event-feed { padding: 4px 0; }
.event-feed-head {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid #eaf1ef;
  background: #f8fbfa;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: .1px;
}
.event-item {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  padding: 13px 16px;
  border-bottom: 1px solid #eff4f2;
  transition: background .15s;
}
.event-item:last-child { border-bottom: 0; }
.event-item:hover { background: #f7fbf9; }
.event-time { padding-top: 2px; font-size: 13px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.event-line { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; }
.event-line .badge { flex: 0 0 auto; margin-top: 1px; }
.event-text { font-size: 14.5px; line-height: 1.55; color: var(--text); }
.event-note { margin-top: 3px; font-size: 13px; color: var(--muted); line-height: 1.5; }
@media (max-width: 720px) {
  .event-feed-head { display: none; }
  .event-item { display: block; padding: 12px 14px; }
  .event-time { margin-bottom: 5px; padding-top: 0; }
}
.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: 14px; color: #1e342e; }
.sync-person small, .cell-sub { display: block; margin-top: 2px; font-size: 12px; color: #93a09c; word-break: break-all; }
.match-note { font-size: 12.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:13px; letter-spacing:.04em; 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; flex-direction:column; align-items:flex-start; gap:6px; margin-top:8px; font-size:10.5px; color:#96a39f; line-height:1.7; }
.task-meta span { display:inline-flex; align-items:center; gap:4px; }
.task-meta .task-due { display:inline-flex; align-items:center; gap:5px; padding:3px 10px; border-radius:999px; border:1px solid #e3ebe8; background:#f5f7f6; color:#6f808c; }
.task-meta .task-due.due-today { border-color:#f0dfb3; background:#fff7e6; color:#a86b00; font-weight:600; }
.task-meta .task-due.due-overdue { border-color:#f1d3ce; background:#fff7f6; color:#c0392b; font-weight:600; }
.task-meta .task-meta-extra { display:flex; align-items:center; flex-wrap:wrap; gap:6px; color:#96a39f; }
.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; }
.customer-facts { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.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; flex-wrap:wrap; gap:4px; row-gap:4px; align-items:flex-end; margin:0 0 16px; padding:0 4px; border-bottom:1px solid #dfeae6; }
.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-groups { display:flex; flex-direction:column; gap:14px; }
.perm-group { border:1px solid var(--line); border-radius:12px; padding:12px; background:#fff; }
.perm-group-head { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:10px; }
.perm-group-head b { font-size:13px; color:#28483d; font-weight:500; }
.perm-group-head span { font-size:11.5px; color:var(--muted); }
.perm-group-head .btn { margin-left:auto; padding:4px 10px; font-size:11.5px; }
.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); }
.form-group label.perm-check { display:flex; align-items:center; margin-bottom:0; }
.form-group label.perm-check input { margin-top:0; }
.form-group label.tag-chip,
.form-group label.pick-item,
.form-group label.ai-check { display:inline-flex; align-items:center; }
.perm-check:has(input:checked) { border-color:#9fd9c8; background:#f0fbf7; }
.perm-check:has(input:checked) b { color:var(--primary-dark); }
.perm-check:has(input:disabled) { opacity:.55; cursor:not-allowed; }

/* 复选框/单选框不要继承文本输入框的高度和内边距 */
.form-group input[type=checkbox],
.form-group input[type=radio],
.form-grid input[type=checkbox],
.form-grid input[type=radio] {
  width: 16px !important;
  height: 16px !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0;
  flex: 0 0 auto;
  vertical-align: -2px;
}

/* ---------- 表单控件统一基线（后台所有页面） ---------- */
.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: 1180px) {
  .stat-grid.stat-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@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; }
  .table-wrap table.table { min-width: 720px; }
  .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)); }
  .stat-grid.stat-grid-3 { 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; }
  .stat-grid.stat-grid-3,
  .stat-grid.stat-grid-4 { grid-template-columns: 1fr; }
  .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-action-copy { flex: 0 0 auto; min-width: 0; }
  .sync-check { white-space: normal; }
  .sync-action-form .btn { width: 100%; }
  .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%; }
}

/* ---------- 企微客户详情：子卡片 / 内联表单 / 标签选择 ---------- */
.sub-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdfc;
  padding: 16px 18px;
}
.sub-card + .sub-card { margin-top: 14px; }
.sub-card-title {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.inline-form {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.inline-form .form-group { margin-bottom: 0; min-width: 220px; }
.inline-form .btn { height: var(--control-height); }

.tag-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  max-height: 168px;
  overflow: auto;
}
.tag-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 6px 13px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
  user-select: none;
}
.tag-chip:hover { border-color: var(--primary); color: var(--primary-dark); }
.tag-chip input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.tag-chip:has(input:checked) {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary-dark);
}
.tag-chip:has(input:checked) span::before {
  content: "✓ ";
  font-weight: 700;
}
.tag-chip:has(input:focus-visible) {
  box-shadow: 0 0 0 3px rgba(10, 159, 123, .18);
}

/* 四列信息块（企微客户详情顶部） */
.channel-boundary-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1180px) {
  .channel-boundary-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .channel-boundary-grid.cols-4 { grid-template-columns: 1fr; }
}

/* 表格与下方子卡片之间留出呼吸 */
.table-wrap + .sub-card { margin-top: 16px; }

/* 成员多选（替换原生 multiple listbox） */
.pick-box {
  border: 1px solid var(--control-border);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}
.pick-search {
  width: 100% !important;
  border: 0 !important;
  border-bottom: 1px solid var(--line) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 10px 14px !important;
  font-size: 12.5px !important;
  background: #fbfdfc !important;
}
.pick-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 12px;
  max-height: 208px;
  overflow: auto;
}
.pick-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 6px 12px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  user-select: none;
  transition: border-color .15s, background .15s, color .15s;
}
.pick-item:hover { border-color: var(--primary); color: var(--primary-dark); }
.pick-item input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.pick-item i { font-style: normal; margin-left: 6px; font-size: 11px; color: var(--muted); font-weight: 400; }
.pick-item:has(input:checked) {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary-dark);
}
.pick-item:has(input:checked) span::before { content: "✓ "; font-weight: 700; }
.pick-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-top: 1px solid var(--line);
  background: #fbfdfc;
  font-size: 12px;
  color: var(--muted);
}
.pick-clear {
  border: 0;
  background: none;
  padding: 0;
  color: var(--primary-dark);
  font-size: 12px;
  cursor: pointer;
}

/* 群发页说明卡：不再用刺眼的红色告警块 */
.notice-card {
  border: 1px solid #f1e3cd;
  border-left: 3px solid #e3b264;
  border-radius: 14px;
  background: linear-gradient(180deg, #fffdf8, #fffaf1);
  padding: 16px 20px;
  margin-bottom: 18px;
  font-size: 12.8px;
  line-height: 2;
  color: #6b5a3e;
}
.notice-card strong { color: #8a6a2f; }
.notice-card a { color: var(--primary-dark); text-decoration: underline; }

/* ---------- 自定义下拉（替代原生 select 弹出层） ---------- */
.hh-select { position: relative; display: inline-block; vertical-align: middle; }
.hh-select.hh-select-block { display: block; width: 100%; }
.hh-select-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.hh-select-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid #e2ece8;
  border-radius: 11px;
  background: #fff;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(20, 48, 41, .04);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.hh-select-btn > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hh-select-btn:hover { border-color: #bfe3d8; background: #fcfffe; }
.hh-select.open .hh-select-btn {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(10, 159, 123, .12);
}
.hh-select-btn::after {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  margin-top: -3px;
  border-right: 1.6px solid #7b8c86;
  border-bottom: 1.6px solid #7b8c86;
  transform: rotate(45deg);
  transition: transform .18s ease, margin .18s ease;
}
.hh-select.open .hh-select-btn::after {
  margin-top: 2px;
  transform: rotate(-135deg);
}
.hh-select-panel {
  position: absolute;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  top: calc(100% + 6px);
  left: 0;
  min-width: 100%;
  max-height: 340px;
  overflow: hidden;
  padding: 0;
  border: 1px solid #e6eeec;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(12, 45, 36, .16);
  animation: hhSelectIn .14s ease-out;
}
.hh-select-panel-fixed { position: fixed; min-width: 0; max-width: none; }
.hh-select-search {
  display: block;
  width: 100% !important;
  min-height: 0 !important;
  padding: 11px 14px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--line) !important;
  border-radius: 0 !important;
  background: #fbfdfc !important;
  box-shadow: none !important;
  font-size: 13px !important;
  outline: none;
}
.hh-select-search:focus { background: #f6fbf9 !important; }
.hh-select-opts {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding: 6px;
}
.hh-select.hh-select-up .hh-select-panel { top: auto; bottom: calc(100% + 6px); }
@keyframes hhSelectIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hh-select-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  white-space: normal;
  overflow-wrap: anywhere;
  transition: background .12s, color .12s;
}
.hh-select-opt:hover { background: #f2faf7; }
.hh-select-opt.active {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 600;
}
.hh-select-opt.active::after { content: "✓"; font-size: 12px; }

/* ---------- 适老化：整体字号上调一档，保证中老年用户可读 ---------- */
:root {
  --control-font: 14px;
  --control-height: 42px;
  --control-pad-y: 10px;
}
body { font-size: 15px; }
table.table { font-size: 14.5px; }
table.table th {
  font-size: 13.5px;
  padding: 12px 16px;
  letter-spacing: .1px;
}
table.table td { padding: 13px 16px; }
.form-group label { font-size: 13.5px; }
.form-group .tip,
.form-group label .label-hint { font-size: 12.5px; }
.panel-sub { font-size: 13px; }
.stat-card .lab,
.sync-stat small { font-size: 13px; }
.btn { font-size: 14px; }
.btn-sm { font-size: 13px; padding: 6px 11px; }
.badge { font-size: 12.5px; }
.pick-item, .tag-chip { font-size: 13.5px; }
.hh-select-btn, .hh-select-opt { font-size: 14px; }
.hh-select-btn { min-height: 42px; }
.hh-select-search { font-size: 14px !important; }
small, .muted { font-size: 12.5px; }

/* 排班模板表单：让日期/号源字段按可用宽度自动换行，避免日期被截成 2026/11/0 */
.schedule-template-form { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.schedule-template-form .field-weekdays { grid-column: 1 / -1; }
.schedule-template-form .form-group:not(.field-weekdays) { grid-column: auto; }
.schedule-template-form .field-submit { grid-column: auto; justify-self: start; }
@media (max-width: 900px) {
  .schedule-template-form .field-submit { grid-column: 1 / -1; width: 100%; }
}

/* 员工编辑弹窗里的企微只读资料 */
.wecom-profile-card {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdfc;
}
.wecom-profile-head { display: flex; align-items: center; gap: 12px; }
.wecom-profile-avatar {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 700;
}
.wecom-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.wecom-profile-head > div { flex: 1; min-width: 0; }
.wecom-profile-head b { display: block; font-size: 15px; color: var(--text); }
.wecom-profile-head small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); word-break: break-all; }
.wecom-profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px 18px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.wecom-profile-grid > div { min-width: 0; }
.wecom-profile-grid span { display: block; font-size: 12.5px; color: var(--muted); }
.wecom-profile-grid b { display: block; margin-top: 2px; font-size: 14px; font-weight: 500; color: var(--text); overflow-wrap: anywhere; }
.readonly-value {
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f7faf9;
  color: #5b6b7d;
  font-size: 14px;
}

/* 员工列表：卡片行 + 自适应栅格，信息跟着内容走，不再用固定百分列 */
.staff-panel .panel-head { gap: 12px; }
.staff-panel .panel-head h2 { flex: 1 1 auto; }
.staff-toolbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fbfdfc, #fff);
}
.staff-filter { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.staff-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 300px;
  min-width: 220px;
  padding: 0 12px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  transition: border-color .16s, box-shadow .16s;
}
.staff-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(10, 163, 127, .1); }
.staff-search svg { flex: 0 0 auto; }
.staff-search input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0 !important;
  height: auto !important;
  padding: 10px 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--text);
  font-size: 14px !important;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
}
.staff-search input:focus { border: 0 !important; box-shadow: none !important; }
.staff-search input::-webkit-search-decoration,
.staff-search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.staff-select { min-width: 132px; padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 9px; font-size: 14px; }
.staff-hint { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.6; }
/* 员工列表：列标题分开显示，表格列宽随内容自适应 */
.staff-table { table-layout: auto; }
.staff-table th { padding: 10px 14px; white-space: nowrap; }
.staff-table th:first-child { width: 26%; }
.staff-table th.staff-col-phone { width: 10%; }
.staff-table th.staff-col-position { width: 10%; }
.staff-table th.actions { text-align: right; }
.staff-table td { padding: 9px 14px; vertical-align: middle; }
.staff-table td.actions { text-align: right; white-space: nowrap; }
.staff-table .staff-person { display: flex; align-items: center; gap: 10px; min-width: 210px; }
.staff-table .staff-name b { font-size: 14.5px; }
.staff-table .staff-meta { margin-top: 2px; }
.staff-table .staff-chip { white-space: nowrap; }
.staff-table .staff-avatar { flex-basis: 36px; width: 36px; height: 36px; font-size: 14px; }
.staff-empty-cell { color: #aab5b1; }
.staff-dept { color: #3f5560; }
.staff-pos-inline { display: none; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.staff-meta-phone { display: none; }
.staff-person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.staff-avatar {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, #e7f8f2, #cdeee3);
  color: #0a7f66;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  user-select: none;
}
.staff-avatar.has-photo { background: #eef4f2; }
.staff-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.staff-avatar.is-off { filter: grayscale(1); opacity: .55; }
.staff-person-main { min-width: 0; }
.staff-name { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; min-width: 0; line-height: 1.35; }
.staff-name b { font-size: 14.5px; font-weight: 600; color: #183b31; overflow-wrap: anywhere; }
.staff-account { font-size: 13px; color: #82928d; overflow-wrap: anywhere; }
.staff-account.truncate-id { max-width: 190px; overflow-wrap: normal; }
.staff-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 3px; font-size: 13px; color: var(--muted); line-height: 1.4; }
.staff-meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #e9f8f2;
  color: #0a8d67;
  font-size: 12.5px;
}
.staff-meta-badge.is-muted { background: #f2f4f5; color: #8b969c; }
.staff-meta-item { min-width: 0; }
.staff-meta-item.is-warn { color: #c0392b; }
.staff-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 4px 9px;
  border-radius: 999px;
  background: #f4f7f6;
  border: 1px solid transparent;
  color: #4d635d;
  font-size: 13px;
  line-height: 1.35;
}
.staff-chip svg { flex: 0 0 auto; opacity: .72; }
.staff-chip em { margin-left: 2px; font-style: normal; font-size: 12px; color: #8aa09a; }
.staff-chip.is-role { background: var(--primary-light); color: var(--primary-dark); }
.staff-chip.is-super { background: #fdecea; color: #c0392b; }
.staff-chip.is-dept { background: #eef4ff; color: #43679f; }
.staff-chip.is-muted { background: #f5f6f7; color: #8a949b; }
.staff-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.staff-actions form { margin: 0; }
.staff-empty { padding: 54px 20px; text-align: center; color: var(--muted); }
.staff-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary-dark);
}
.staff-empty b { display: block; font-size: 16px; color: #30473f; }
.staff-empty p { margin: 6px 0 0; font-size: 13.5px; }
.staff-pagination { padding: 16px 18px 20px; align-items: center; }
.staff-pagination .page-nav { min-width: 0; padding: 7px 12px; }
.staff-pagination .page-gap { min-width: 22px; text-align: center; color: var(--muted); font-size: 13px; align-self: center; }
.staff-pagination .page-total { margin-left: 6px; font-size: 13px; color: var(--muted); }
@media (max-width: 1180px) {
  .staff-col-position { display: none !important; }
  .staff-pos-inline { display: block; }
}
@media (max-width: 1080px) {
  .staff-col-phone { display: none !important; }
  .staff-meta-phone { display: inline; }
}
@media (max-width: 900px) {
  .staff-table-wrap { overflow-x: visible; }
  .staff-table { min-width: 0 !important; width: 100%; font-size: 14px; }
  .staff-table thead { display: none; }
  .staff-table, .staff-table tbody, .staff-table tr, .staff-table td { display: block; width: 100%; }
  .staff-table tr { margin: 0 0 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
  .staff-table tr:last-child { margin-bottom: 0; }
  table.table.staff-table td { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 10px; align-items: start; padding: 5px 0; border: 0; text-align: left !important; white-space: normal; }
  table.table.staff-table td.is-empty { display: none; }
  table.table.staff-table td .staff-chip { justify-self: start; }
  table.table.staff-table td::before { content: attr(data-label); color: var(--muted); font-size: 12px; line-height: 1.55; }
  table.table.staff-table td[data-label="员工"] { display: block; padding: 0 0 6px; }
  table.table.staff-table td[data-label="员工"]::before { display: none; }
  table.table.staff-table td.actions { display: flex; justify-content: flex-end; gap: 6px; padding-top: 8px; }
  table.table.staff-table td.actions::before { content: ""; margin-right: auto; }
  .staff-table .staff-person { min-width: 0; }
}
@media (max-width: 720px) {
  .staff-toolbar { padding: 12px 14px 10px; }
  .staff-filter { gap: 8px; }
  .staff-search { flex-basis: 100%; }
  .staff-select { flex: 1 1 0; min-width: 0; }
  .staff-filter > .btn { flex: 1 1 100%; }
  table.table.staff-table td { grid-template-columns: 70px minmax(0, 1fr); }
  table.table.staff-table td.actions .btn { flex: 1 1 auto; }
  table.table.staff-table td.actions form { flex: 1 1 auto; display: flex; }
  table.table.staff-table td.actions form .btn { width: 100%; }
  .staff-avatar { flex-basis: 36px; width: 36px; height: 36px; font-size: 14px; }
  .staff-pagination { gap: 5px; }
  .staff-pagination .page-total { flex-basis: 100%; text-align: center; margin: 4px 0 0; }
}

/* 通用编辑弹窗：列表页直接编辑，不再把长表单堆在页面顶部 */
dialog.hh-modal {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(920px, calc(100vw - 32px));
  max-height: 90vh;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}
dialog.hh-modal::backdrop {
  background: rgba(8, 32, 26, .42);
  backdrop-filter: blur(3px);
}
.hh-modal-shell {
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(10, 40, 31, .28);
}
.hh-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
}
.hh-modal-head h2 { margin: 0; font-size: 18px; color: var(--text); }
.hh-modal-close {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f1f7f4;
  color: #557069;
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
}
.hh-modal-close:hover { background: #e5f2ec; color: var(--primary-dark); }
.hh-modal-body { overflow: auto; min-height: 0; }
.hh-modal-body > .panel { margin: 0; border: 0; border-radius: 0; box-shadow: none; }
.hh-modal-body > .panel > .panel-head { display: none; }
.hh-modal .rich-editor { min-height: 220px; max-height: 42vh; overflow-y: auto; }
.hh-confirm .hh-modal-head { padding: 14px 20px; }
.hh-confirm .hh-modal-head h2 { font-size: 16px; }
.hh-confirm-body {
  padding: 22px 24px;
  font-size: 15px;
  color: var(--text);
  line-height: 1.8;
  white-space: pre-line;
}
.hh-confirm .hh-modal-footer { gap: 18px; padding: 16px 24px; }
.hh-confirm .hh-modal-footer .btn { min-width: 88px; }
.hh-modal-footer {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 0;
  padding: 14px 22px;
  background: #fff;
  border-top: 1px solid var(--line);
}
@media (max-width: 720px) {
  dialog.hh-modal { width: calc(100vw - 16px); max-height: 94vh; }
  .hh-modal-head { padding: 14px 16px; }
  .hh-modal-footer { padding: 12px 16px; }
}

.queue-notice-form .hh-select.hh-select-block { display:inline-block; width:auto; min-width:140px; }

/* 排队叫号页：手机端按到院核销页的面板/表单节奏重排 */
@media (max-width: 720px) {
  .queue-panel .panel-head { align-items: flex-start; }
  .queue-panel .panel-head h2,
  .queue-panel .panel-head h3 { flex: 1 1 100%; min-width: 0; }
  .queue-panel .panel-head .panel-sub { flex: 1 1 100%; line-height: 1.6; }
  .queue-panel .panel-head form { width: 100%; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
  .queue-panel .panel-head form input[type="date"] { flex: 1 1 160px; min-width: 0; width: auto; }

  .queue-panel .panel-body > div[style*="minmax(320px"] { grid-template-columns: 1fr !important; }

  .queue-group-actions { display: grid !important; grid-template-columns: 1fr 1fr; gap: 8px; }
  .queue-group-actions .btn { width: 100%; }
  .queue-group-actions .btn:first-child { grid-column: 1 / -1; }

  .queue-notice-form { display: grid !important; grid-template-columns: 1fr 1fr; gap: 8px; align-items: center; }
  .queue-notice-form input[name="content"] { grid-column: 1 / -1; min-width: 0 !important; width: 100%; }
  .queue-notice-form select[name="level"] { grid-column: 1 / -1; width: 100%; }
  .queue-notice-form .hh-select.hh-select-block { display: block; width: 100%; min-width: 0; grid-column: 1 / -1; }
  .queue-notice-form input[name="duration_value"] { width: 100% !important; }
  .queue-notice-form select[name="duration_unit"] { width: 100%; }
  .queue-notice-form button[type="submit"] { grid-column: 1 / -1; width: 100%; }

  .queue-notice-item { align-items: flex-start !important; }
  .queue-notice-item > span[style*="flex:1"] { flex: 1 1 100% !important; min-width: 0 !important; }
  .queue-notice-item > span[style*="font-size:11.5px"] { flex: 1 1 100% !important; }

  .queue-voice-form { display: grid !important; grid-template-columns: 1fr 1fr; gap: 8px; align-items: center; }
  .queue-voice-form input[name="content"] { grid-column: 1 / -1; min-width: 0 !important; width: 100%; }
  .queue-voice-form label { grid-column: 1 / 2; }
  .queue-voice-form button[type="submit"] { grid-column: 2 / 3; width: 100%; }

  .queue-voice-log { flex-wrap: wrap; }
  .queue-voice-log > span:nth-child(2) { flex: 1 1 100% !important; min-width: 0; white-space: normal; word-break: break-word; }

  .queue-voice-demo-wrap { display: block !important; }
  .queue-voice-demo { display: flex !important; flex-direction: column; align-items: stretch !important; width: 100%; margin-top: 8px; }
  .queue-voice-demo audio { width: 100% !important; height: 38px !important; }

  .queue-panel .panel-body > div[style*="background:#fbfdfc"] { flex-direction: column; align-items: flex-start; }
  .queue-panel .panel-body > div[style*="background:#fbfdfc"] code { width: 100%; word-break: break-all; }

  .content { padding-bottom: 96px !important; }
}

/* 客户管理：手机端按到院核销页的查询/列表节奏重排，表格保持横向滚动（既定规范） */
.users-filter { display:flex; gap:9px; align-items:center; flex-wrap:wrap; }
.users-filter-dates { display:flex; align-items:center; gap:6px; }
.users-filter-actions { display:flex; gap:9px; flex-wrap:wrap; align-items:center; }
.users-filter-search { width:190px; }
.customer-table-fluid { width:100%; }
.customer-table-fluid th, .customer-table-fluid td { white-space:nowrap; }
.customer-table-fluid-wrap { overflow-x:auto; }
/* 横向滚动就是为了看全所有列：取消 1366px 以下对「可选列」的隐藏 */
.table.customer-table-fluid th.col-optional,
.table.customer-table-fluid td.col-optional { display: table-cell; }

@media (max-width: 720px) {
  .users-filter { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
  .users-filter .hh-select { width:100%; }
  .users-filter .hh-select .hh-select-btn { width:100%; }
  .users-filter input[type="text"], .users-filter input[type="date"], .users-filter select { width:100%; }
  .users-filter-search { grid-column:1 / -1; width:100% !important; }
  .users-filter-dates { grid-column:1 / -1; display:grid; grid-template-columns:1fr auto 1fr; gap:6px; }
  .users-filter-dates input { width:100%; }
  .users-filter-actions { grid-column:1 / -1; display:flex; gap:8px; flex-wrap:wrap; }
  .users-filter-actions .btn { flex:1 1 auto; justify-content:center; }
  .customer-table-fluid { min-width:760px; }
  .customer-table-fluid-wrap { overflow-x:auto; }
  .content { padding-bottom:96px !important; }
}

/* 评价管理：手机端按到院核销页的查询/列表节奏重排 */
.reviews-filter { display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.reviews-filter-doctor { display:flex; }
.reviews-filter-actions { display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.reviews-table { width:100%; }
.reviews-table th, .reviews-table td { white-space:nowrap; }

@media (max-width: 720px) {
  .reviews-stat-grid { grid-template-columns:1fr 1fr !important; gap:10px; }
  .reviews-stat-grid .stat-card { padding:14px; }
  .reviews-stat-grid .stat-card .num { font-size:22px; }

  .reviews-filter { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
  .reviews-filter .hh-select { width:100%; }
  .reviews-filter .hh-select .hh-select-btn { width:100%; }
  .reviews-filter select { width:100%; }
  .reviews-filter-doctor { grid-column:1 / -1; }
  .reviews-filter-doctor .hh-select { width:100%; }
  .reviews-filter-actions { grid-column:1 / -1; display:flex; gap:8px; flex-wrap:wrap; }
  .reviews-filter-actions .btn { flex:1 1 auto; justify-content:center; }

  .reviews-table { min-width:1100px; }
  .content { padding-bottom:96px !important; }
}

/* 报告管理：手机端标题与搜索分行，报告表格横向滚动 */
@media (max-width: 720px) {
  .lab-reports-panel .panel-head h2 { flex: 1 1 100%; }
  .lab-reports-panel .panel-head form { width: 100%; display: flex; gap: 8px; align-items: center; }
  .lab-reports-panel .panel-head form input[type="text"] { flex: 1 1 auto; min-width: 0; width: auto !important; }
  .lab-reports-panel .panel-head form .btn { flex: 0 0 auto; }
  .lab-reports-table { min-width: 1000px; }
  .lab-reports-table th, .lab-reports-table td { white-space: nowrap; }
  .content { padding-bottom: 96px !important; }
}

/* ---------- 设置类页面通用：分类卡片菜单（与渠道中心卡片同一套视觉） ---------- */
.admin-cat-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; margin:0 0 18px; }
.admin-cat-card { position:relative; display:flex; align-items:flex-start; gap:13px; padding:19px 20px; border:1px solid var(--line); border-radius:18px; background:#fff; box-shadow:0 6px 18px rgba(15,52,43,.04); text-decoration:none; color:inherit; transition:transform .16s,border-color .16s,box-shadow .16s; }
.admin-cat-card:hover { transform:translateY(-2px); border-color:#bfe4d8; box-shadow:0 14px 30px rgba(20,48,41,.09); }
.admin-cat-card.is-current { border-color:var(--primary); box-shadow:0 8px 22px rgba(10,159,123,.14); }
.admin-cat-icon { width:44px; height:44px; flex:0 0 44px; display:flex; align-items:center; justify-content:center; border-radius:13px; background:#e6f7f2; color:#0a9f7b; }
.admin-cat-icon.t-blue { background:#eaf2fd; color:#2b7de9; }
.admin-cat-icon.t-amber { background:#fdf3e3; color:#d9930f; }
.admin-cat-icon.t-violet { background:#f1edff; color:#7157d8; }
.admin-cat-icon.t-rose { background:#fdeef1; color:#d05a72; }
.admin-cat-copy { flex:1; min-width:0; }
.admin-cat-copy b { display:block; font-size:16px; color:#1b372f; }
.admin-cat-copy > span { display:block; margin-top:5px; font-size:13.5px; line-height:1.65; color:#75867f; }
.admin-cat-badge { display:inline-block; margin-top:10px; padding:4px 10px; border-radius:999px; background:#f2f8f5; font-size:12.5px; font-style:normal; color:#5d7a6f; }
.admin-cat-card.is-current .admin-cat-badge { background:#e6f7f2; color:#0a7f63; }
.admin-cat-arrow { flex:0 0 auto; margin-top:12px; color:#b6c8c0; }
.channel-tabs a.cat-back { display:inline-flex; align-items:center; gap:4px; }
.channel-tabs a.cat-back svg { vertical-align:middle; }
@media (max-width:980px) { .admin-cat-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:600px) { .admin-cat-grid { grid-template-columns:1fr; } .admin-cat-card { padding:15px 16px; } }


/* hero 说明文字：桌面与手机统一 14px（适老化，不再 12.5px） */
.channel-hero p { font-size: 14px; }

/* ============================================================
   全站窄屏统一适配（2026-11-15）
   一处定义，所有后台 / 渠道 tab 共用；不再各页各写一套 @media。
   新增渠道 tab 直接继承，无需再补样式。改前已 grep 全站同类元素。
   ============================================================ */
@media (max-width: 720px) {
  /* 适老化：说明、统计卡、分组标题不小于 14px（modern.css 全局口径） */
  .stat-card .lab,
  .channel-tabs-grouped .channel-tabs-label { font-size: 14px; }

  /* hero 在手机上不留大留白 */
  .channel-hero { gap: 12px; padding: 16px; margin-bottom: 12px; border-radius: 16px; }
  .channel-hero-icon { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 14px; }
  .channel-hero h2 { font-size: 18px; }
  .channel-hero p { line-height: 1.7; }

  /* 三行分组：组名独占一行，标签自然换行（不隐藏、不横向藏起） */
  .channel-tabs-grouped .channel-tabs-label { flex-basis: 100%; margin-bottom: 2px; }
  .channel-tabs-grouped a { padding: 7px 12px; }

  /* 统计卡 4/3 列 -> 2 列 */
  .content .stat-grid,
  .content .stat-grid.stat-grid-3,
  .content .stat-grid.stat-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .content .stat-card { padding: 12px; gap: 10px; }
  .content .stat-card .icon { width: 34px; height: 34px; flex: 0 0 34px; }
  .content .stat-card .num { font-size: 20px; }

  /* 表单两列 -> 单列；控件撑满、字号 16px 防 iOS 自动缩放 */
  .content .form-grid { grid-template-columns: minmax(0, 1fr); gap: 0 12px; }
  .content .form-group,
  .content .form-grid > div { min-width: 0; }
  .content input:not([type=checkbox]):not([type=radio]),
  .content select,
  .content textarea { max-width: 100%; }
  .content .hh-select { width: 100%; min-width: 0; }
  .content .hh-select-btn { width: 100%; }

  /* 面板标题、按钮行允许换行，按钮等宽好点 */
  .content .panel-head { flex-wrap: wrap; gap: 6px 10px; padding: 14px 16px; }
  .content .panel-head h2 { flex: 1 1 100%; min-width: 0; }
  .content .panel-head .panel-sub { flex: 1 1 100%; line-height: 1.6; }
  .content .panel-body { padding: 14px 16px; }
  .content .form-actions { flex-wrap: wrap; }
  .content .form-actions .btn { flex: 1 1 auto; justify-content: center; }
  .content form.panel,
  .content .panel form,
  .content .inline-form { flex-wrap: wrap; }

  /* 右下角悬浮按钮会压住最后一行内容，全站统一留白（此前只有个别页各写一次） */
  .content { padding-bottom: 96px !important; }

  /* 表格沿用既有「横向滚动、不卡片化」口径，只补触摸顺滑，不改宽度 */
  .content .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }

  /* 顶部提示卡在手机上不挤成一坨；!important 用于压掉历史内联小字 */
  .content .alert { font-size: 14px !important; line-height: 1.8; }

  /* 全站字号统一（第二批）：说明/注释类辅助文字窄屏不低于 13px。
     只列说明类，不用通配，避免撑大徽章、按钮、表格紧凑列；一处定义全后台共inherit。 */
  .content .channel-config-note,
  .content .channel-message-stats span,
  .content .channel-message-summary span,
  .content .channel-endpoint-list span,
  .content .channel-check-list span,
  .content .channel-boundary-grid span,
  .content .channel-main-site small,
  .content .assistant-muted,
  .content .notice-readers,
  .content .upload-fileinfo small,
  .content .upload-copy small,
  .content .rich-editor-status,
  .content .appt .meta,
  .content p.muted,
  .content td small,
  .content .form-group .hint,
  .content .panel-sub { font-size: 13px; line-height: 1.75; }
}
@media (max-width: 380px) {
  .content .stat-grid,
  .content .stat-grid.stat-grid-3,
  .content .stat-grid.stat-grid-4 { grid-template-columns: minmax(0, 1fr); }
}

/* 全站字号统一（2026-11-15 第二批）：侧栏账号小字不再用 11.5px */
.sidebar .me .info span{font-size:13px}


/* ============================================================
   全站字号统一（第三批，180 页逐页渲染后收口）：辅助文字 13px 下限。
   桌面与手机同一口径；用 !important 压掉散落在 7 个页面里的历史内联小字，
   不在各页各写一次。只覆盖说明 / 编号 / 提示类，不撑大按钮与表格紧凑列。
   ============================================================ */
.sidebar .brand .brand-text small,
.sidebar .menu .group,
.stat-card .sub,
.trend-label,
.upload-browse,
.scope-item .sd,
.scope-item .sa,
.perm-group-head span,
.perm-group-head .btn {
  font-size: 13px;
  letter-spacing: 0;
}
.content small[style*="font-size:11"],
.content small[style*="font-size: 11"],
.content div[style*="font-size:11"],
.content div[style*="font-size: 11"],
.content span[style*="font-size:11"],
.content span[style*="font-size: 11"],
.content p[style*="font-size:11"],
.content p[style*="font-size: 11"],
.content small[style*="font-size:10"],
.content div[style*="font-size:10"],
.content span[style*="font-size:10"] {
  font-size: 13px !important;
  letter-spacing: 0;
}


/* ============================================================
   全站字号统一（第四批，180 页复验后收口）：页面内 <style> 定义的辅助小字。
   这些类分散在 19 个页面里，逐页改会形成 19 套规则；这里一处列清，
   用 !important 压过页面内 <style>，桌面与手机同口径 13px。
   ============================================================ */
.scope-item .sd,
.scope-item .sa,
.perm-group-head span,
.bind-stat .k,
.bind-sub,
.bind-badge,
.channel-metrics span,
.ai-step b,
.ai-step span,
.wmenu-phone-hint,
.wmenu-mini,
.wmenu-field .tip,
.upload-copy small,
.rich-editor-status,
.rich-editor-status .status-msg,
.rich-editor-status .count,
.upload-file-badge,
.hub-kicker,
.hub-tags span,
.back-admin,
.meta a.back-admin,
.task-eyebrow {
  font-size: 13px !important;
  letter-spacing: 0;
}


/* ============================================================
   全站字号统一（第五批，180 页最终验收）：剩余 11 页的辅助小字。
   这些是没有独立类名的容器后代（统计徽标、话术胶囊、关系图节点、说明文字），
   用父容器后代选择器一处收口，不改 11 个页面。
   ============================================================ */
.assistant-chips a,
.ai-usage-inline span,
.ai-help-box span,
.task-stat small,
.bind-inline-note,
.wmenu-note,
.notice-hero-count span,
.sync-action-copy span,
.hub-kicker,
.hub-tags span,
.hub-tags,
.meta .back-admin,
.node-label,
.map-node text {
  font-size: 13px !important;
  letter-spacing: 0;
}

/* 全站字号统一（第六批）：表单分区说明文字 */
.form-section-head p { font-size: 13px !important; letter-spacing: 0; }

/* ============================================================
   排班管理：逐日卡片（把「出诊 / 号源 / 分段」拆成可读的半天卡片）
   ============================================================ */
.schedule-board { overflow: hidden; }
.schedule-board-head { align-items: flex-start; gap: 14px; }
.schedule-board-title { min-width: 0; flex: 1; }
.schedule-board-title h2 { line-height: 1.35; }
.schedule-board-side { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.schedule-summary { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.schedule-help {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 10px 20px;
  background: #f7fbf9;
  border-bottom: 1px solid #eef4f2;
  font-size: 12.5px;
  color: var(--muted);
}
.schedule-help span { display: inline-flex; align-items: center; gap: 6px; }
.schedule-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.schedule-dot.is-on { background: var(--primary); }
.schedule-dot.is-off { background: #c7d4d0; }
.schedule-day-list { display: flex; flex-direction: column; gap: 10px; padding: 16px 20px 20px; }
.schedule-day {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 14px;
  padding: 12px;
  border: 1px solid #e6efec;
  border-radius: 14px;
  background: #fff;
}
.schedule-day.is-weekend { background: #fcfdfd; }
.schedule-day.is-today {
  border-color: #9dd8c8;
  box-shadow: inset 3px 0 0 var(--primary), 0 2px 12px rgba(10, 159, 123, .08);
}
.schedule-date {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-right: 12px;
  border-right: 1px dashed #e3eeea;
}
.schedule-week { font-size: 13px; font-weight: 600; color: var(--text); }
.schedule-today {
  display: inline-block;
  margin-left: 5px;
  padding: 1px 6px;
  border-radius: 5px;
  background: #e7f7f1;
  color: #087b60;
  font-size: 11px;
  font-weight: 500;
  vertical-align: 1px;
}
.schedule-date strong { font-size: 16px; line-height: 1.5; color: var(--text); }
.schedule-year { font-size: 11.5px; color: var(--muted); }
.schedule-day-state { margin-top: 7px; }
.schedule-shifts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; min-width: 0; }
.schedule-shift {
  min-width: 0;
  padding: 10px;
  border: 1px solid #e8f0ed;
  border-radius: 12px;
  background: #fbfdfc;
}
.schedule-shift.is-on { border-color: #bfe6da; background: #f8fcfb; }
.schedule-shift.is-off { background: #fafbfb; }
.schedule-shift-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.schedule-toggle { display: inline-flex; align-items: center; gap: 8px; min-width: 0; cursor: pointer; user-select: none; }
.schedule-toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.schedule-toggle-track {
  position: relative;
  flex: 0 0 auto;
  width: 32px;
  height: 19px;
  border-radius: 20px;
  background: #d6e2de;
  transition: background .18s;
}
.schedule-toggle-track > span {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .16);
  transition: transform .18s;
}
.schedule-toggle input:checked + .schedule-toggle-track { background: var(--primary); }
.schedule-toggle input:checked + .schedule-toggle-track > span { transform: translateX(13px); }
.schedule-toggle input:focus-visible + .schedule-toggle-track { outline: 2px solid rgba(10, 159, 123, .35); outline-offset: 2px; }
.schedule-toggle-copy { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.schedule-toggle-copy b { font-size: 14px; font-weight: 600; color: var(--text); }
.schedule-toggle-copy small { margin-top: 2px; font-size: 11.5px; color: var(--muted); }
.schedule-shift-fields { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.schedule-field { display: flex; flex-direction: column; gap: 3px; font-size: 11.5px; color: var(--muted); }
.schedule-field input, .schedule-field select {
  box-sizing: border-box;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  font: inherit;
  font-size: 12.5px;
  color: var(--text);
}
.schedule-field input { width: 66px; }
.schedule-field input:disabled, .schedule-field select:disabled { opacity: .58; cursor: not-allowed; background: #f3f6f5; }
.schedule-booked { margin-left: auto; font-size: 11.5px; color: #087b60; white-space: nowrap; }
.schedule-booked.is-quiet { color: var(--muted); }
.schedule-slots { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.schedule-slots-label { font-size: 11.5px; color: var(--muted); }
.schedule-slot {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 5px;
  background: #eef4f2;
  color: #3c6258;
  font-size: 11.5px;
}
.schedule-slot small { color: var(--muted); font-size: 10.5px; }
.schedule-slots-note { font-size: 11.5px; color: var(--muted); }
.schedule-save-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: #fbfdfc;
}
.schedule-save-bar span { font-size: 12.5px; line-height: 1.7; color: var(--muted); }
@media (max-width: 900px) {
  .schedule-day { grid-template-columns: 1fr; gap: 10px; }
  .schedule-date {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 0 9px;
    border-right: 0;
    border-bottom: 1px dashed #e3eeea;
  }
  .schedule-date strong { font-size: 15px; }
  .schedule-day-state { margin-top: 0; margin-left: auto; }
  .schedule-shifts { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .schedule-board-head { display: block; }
  .schedule-board-side { margin-top: 10px; justify-content: space-between; }
  .schedule-help { padding: 9px 14px; gap: 8px 14px; }
  .schedule-day-list { padding: 12px; }
  .schedule-day { padding: 10px; }
  .schedule-shift { padding: 9px; }
  .schedule-save-bar { padding: 12px 14px; }
}

