/* ========================================================================
 * 行唐康德医院 · 体检运营后台 设计系统
 * 与前端 H5 同源：康德蓝 #0F6FBB / 8pt 间距 / Material3 克制投影 / 弹簧动效
 * ===================================================================== */
:root {
  /* 品牌（与主程序 H5 同源蓝色系，加深一档避免发灰） */
  --brand: #0F6FBB;
  --brand-l: #2E8FD8;
  --brand-2: #1B7FD0;
  --brand-d: #0A4E86;
  --brand-soft: #D9EBFA;
  --brand-line: #9CC9EE;

  /* 语义色 */
  --green: #2FBF71;
  --red: #FF5252;
  --orange: #FF8A3D;
  --gold: #FFB020;
  --blue: #3E8CFF;
  --indigo: #5B6BF5;
  --purple: #8B6BFF;
  --teal: #14B8B4;
  --cyan: #28C2D8;
  --rose: #FF5A8A;

  /* 中性（文字/底色加深一档，整体更清晰） */
  --bg: #EDF2F8;
  --card: #FFFFFF;
  --card-soft: #F2F7FC;
  --ink: #22262F;
  --text: #454B58;
  --muted: #78808F;
  --line: #E2E7EE;
  --line-d: #D4DBE4;

  /* 间距（8pt） */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px;
  --s5: 20px; --s6: 24px; --s7: 32px; --s8: 40px;

  /* 圆角 */
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 20px;

  /* 投影 */
  --elev-1: 0 1px 2px rgba(51,51,62,.04), 0 2px 8px rgba(51,51,62,.05);
  --elev-2: 0 2px 6px rgba(51,51,62,.05), 0 10px 26px rgba(51,51,62,.07);
  --elev-brand: 0 4px 14px rgba(15,111,187,.26);

  /* 动效 */
  --ease: cubic-bezier(.4,0,.2,1);
  --ease-spring: cubic-bezier(.34,1.56,.64,1);

  /* 旧变量兼容映射 */
  --primary: var(--brand);
  --primary-d: var(--brand-d);
  --price: var(--brand);
  --celadon: #E9F8F1;
  --celadon-d: var(--green);
  --danger: var(--red);
  --warn: var(--orange);
  --shadow: var(--elev-1);
  --nav-bg: var(--card);
  --nav-active: var(--brand);
  --nav-active-bg: var(--brand-soft);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ===================== 登录页 ===================== */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s6);
  background:
    radial-gradient(900px 420px at 12% 8%, rgba(47,143,216,.20), transparent 60%),
    radial-gradient(760px 380px at 88% 96%, rgba(20,184,180,.14), transparent 60%),
    linear-gradient(140deg, #F2F8FE 0%, #E9F2FC 52%, #F5F7FB 100%);
}
.login-card {
  width: 400px;
  max-width: 100%;
  background: var(--card);
  border-radius: var(--r-xl);
  padding: var(--s8) var(--s7) var(--s7);
  box-shadow: var(--elev-2);
  border: 1px solid var(--line);
}
.login-logo { text-align: center; margin-bottom: var(--s7); }
.login-logo svg { margin: 0 auto; }
.login-logo .mark {
  width: 62px; height: 62px; border-radius: 18px;
  background: linear-gradient(140deg, var(--brand-l), var(--brand-d));
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--elev-brand);
}
.login-logo h1 { font-size: 21px; color: var(--ink); margin-top: var(--s4); font-weight: 700; letter-spacing: .5px; }
.login-logo p { font-size: 12.5px; color: var(--muted); margin-top: var(--s2); letter-spacing: .3px; }
.login-card input {
  width: 100%; height: 46px;
  border: 1.5px solid var(--line-d); border-radius: var(--r-md);
  padding: 0 var(--s4) 0 42px;
  font-size: 14px; margin-bottom: var(--s3);
  background: var(--card-soft); color: var(--ink);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
  font-family: inherit;
}
.login-card input:focus {
  outline: none; border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(15,111,187,.12);
}
/* 登录输入位：左侧图标 + 聚焦联动 */
.login-field { position: relative; margin-bottom: var(--s3); }
.login-card .btn-primary { width: 100%; margin-top: var(--s2); }
.login-field .fi {
  position: absolute; left: 14px; top: 23px; transform: translateY(-50%);
  color: var(--muted); display: flex; align-items: center; pointer-events: none;
  transition: color .18s var(--ease);
}
.login-field:focus-within .fi { color: var(--brand); }
.login-field input { margin-bottom: 0; }

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  height: 44px; padding: 0 var(--s6);
  background: linear-gradient(135deg, #1E82CE, #0F6FBB);
  color: #fff; border: none;
  border-radius: var(--r-md);
  font-size: 15px; font-weight: 600; letter-spacing: 2px;
  cursor: pointer;
  box-shadow: var(--elev-brand);
  transition: transform .16s var(--ease-spring), filter .18s var(--ease), box-shadow .2s var(--ease);
  font-family: inherit;
}
.btn-primary:hover { filter: brightness(1.06); box-shadow: 0 6px 18px rgba(15,111,187,.32); }
.btn-primary:active { transform: scale(.985); }
.btn-primary:focus-visible { outline: 3px solid rgba(15,111,187,.35); outline-offset: 2px; }
.login-err { color: var(--danger); font-size: 13px; text-align: center; min-height: 20px; margin-bottom: var(--s2); }
.tip { font-size: 12px; color: var(--muted); margin-top: var(--s2); line-height: 1.7; }

/* ===================== 主框架 ===================== */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 228px;
  background: var(--card);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  position: fixed; top: 0; bottom: 0; left: 0;
  z-index: 10;
}
.sidebar .brand {
  padding: var(--s5) var(--s5);
  display: flex; align-items: center; gap: var(--s3);
  border-bottom: 1px solid var(--line);
}
.sidebar .brand .bt { display: flex; flex-direction: column; min-width: 0; }
.sidebar .brand b { color: var(--ink); font-size: 15.5px; letter-spacing: .5px; font-weight: 700; line-height: 1.25; }
.sidebar .brand small { display: block; font-size: 11px; color: var(--muted); font-weight: 400; letter-spacing: 0; margin-top: 1px; }
.sidebar nav { padding: var(--s3) var(--s3); flex: 1; overflow-y: auto; }
.sidebar nav::-webkit-scrollbar { width: 5px; }
.sidebar nav::-webkit-scrollbar-thumb { background: var(--line-d); border-radius: 4px; }

.nav-item {
  display: flex; align-items: center; gap: var(--s3);
  padding: 10px var(--s3); border-radius: var(--r-md);
  color: var(--text); cursor: pointer;
  margin-bottom: var(--s1);
  font-size: 13.5px;
  transition: background .16s var(--ease), color .16s var(--ease), transform .16s var(--ease);
}
.nav-item:hover { background: var(--brand-soft); color: var(--brand-d); }
.nav-item.active {
  background: linear-gradient(135deg, #1E82CE, #0F6FBB);
  color: #fff; font-weight: 600;
  box-shadow: var(--elev-brand);
}
.nav-item .ic, .nav-item .ic-svg {
  width: 20px; height: 20px; flex: 0 0 20px;
  display: inline-flex; align-items: center; justify-content: center;
  opacity: .95;
}
.nav-item.active .ic-svg { color: #fff !important; }
.nav-item.active .ic-svg svg { filter: brightness(3); }

.sidebar .foot {
  padding: var(--s4) var(--s5);
  border-top: 1px solid var(--line);
  font-size: 11.5px; color: var(--muted); line-height: 1.7;
}
.sidebar .foot b { color: var(--brand); font-weight: 600; }

.main { margin-left: 228px; flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
  height: 62px;
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--s6);
  position: sticky; top: 0; z-index: 5;
}
.topbar .title {
  font-size: 17px; color: var(--ink); font-weight: 700;
  display: flex; align-items: center; gap: var(--s3);
}
.topbar .title::before {
  content: ''; width: 4px; height: 17px; border-radius: 3px;
  background: linear-gradient(180deg, #2E8FD8, #0F6FBB);
}
.topbar .title .crumb {
  font-size: 12.5px; color: var(--muted); font-weight: 400;
  padding-left: var(--s3); margin-left: var(--s1); border-left: 1px solid var(--line-d);
}
.topbar .user { display: flex; align-items: center; gap: var(--s3); font-size: 13px; color: var(--text); }
.topbar .user .uname { font-weight: 600; color: var(--ink); }
.topbar .user .avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-l), var(--brand-d));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(15,111,187,.28);
}

.content { padding: var(--s6); }

/* ===================== 通用组件 ===================== */
.page-head { display: flex; align-items: center; justify-content: flex-end; margin-bottom: var(--s5); gap: var(--s4); }
.page-head h2 { font-size: 19px; color: var(--ink); font-weight: 700; letter-spacing: .3px; }
.page-head h2:empty { display: none; }
.page-head { min-height: 38px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s5) var(--s5);
  margin-bottom: var(--s5);
  box-shadow: var(--elev-1);
  transition: box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.card:hover { box-shadow: var(--elev-2); border-color: var(--line-d); }
.card > h3, .card .card-title {
  font-size: 15px; color: var(--ink); font-weight: 700;
  margin-bottom: var(--s4);
  display: flex; align-items: center; gap: var(--s3);
}

.ic-box {
  width: 30px; height: 30px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 30px;
}

.row { display: flex; gap: var(--s4); flex-wrap: wrap; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 var(--s4);
  border-radius: var(--r-md);
  border: 1.5px solid var(--line-d);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  font-size: 13px; font-weight: 500;
  font-family: inherit;
  transition: all .16s var(--ease);
  white-space: nowrap;
}
.btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.btn:active { transform: scale(.97); }
.btn:focus-visible { outline: 3px solid rgba(15,111,187,.28); outline-offset: 2px; }
.btn.sm { height: 30px; padding: 0 var(--s3); font-size: 12px; border-radius: var(--r-sm); }
.btn-primary { background: linear-gradient(135deg, #1E82CE, #0F6FBB) !important; color: #fff !important; border-color: transparent !important; box-shadow: var(--elev-brand); }
.btn-primary:hover { filter: brightness(1.08); color: #fff !important; background: linear-gradient(135deg, #1E82CE, #0F6FBB) !important; }
.btn-danger { color: var(--red); border-color: #FFD3D3; }
.btn-danger:hover { background: var(--red); color: #fff !important; border-color: var(--red); }
.btn svg { flex: 0 0 auto; }

/* ---------- 表格 ---------- */
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
th, td { padding: 12px var(--s3); text-align: left; border-bottom: 1px solid var(--line); }
th {
  color: var(--brand-d); font-weight: 700; font-size: 12.5px;
  background: #E3EFFA;
  white-space: nowrap;
  border-bottom: 2px solid var(--brand-line);
}
th:first-child { border-top-left-radius: var(--r-sm); }
th:last-child { border-top-right-radius: var(--r-sm); }
tbody tr { transition: background .14s var(--ease); }
tbody tr:hover { background: #E8F3FC; }
tbody tr:last-child td { border-bottom: none; }
td .price { color: var(--price); font-weight: 700; }

/* ---------- 徽标 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.badge.waitpay { background: #FFE9C2; color: #A96C0A; }
.badge.waitbook { background: #DCE6FF; color: #3D4FD4; }
.badge.booked { background: #D2F0E0; color: #157A48; }
.badge.verified { background: #C9E4F8; color: var(--brand-d); }
.badge.refund { background: #FFD9D9; color: #D93A3A; }
.badge.off { background: #E7EAEF; color: #78808F; }

/* ---------- 表单 ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4) var(--s5); }
.form-item { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.form-item.full { grid-column: 1 / -1; }
.form-item label { font-size: 12.5px; color: var(--text); font-weight: 600; }
.form-item input, .form-item select, .form-item textarea {
  height: 40px; border: 1.5px solid var(--line-d);
  border-radius: var(--r-md); padding: 0 var(--s3);
  font-size: 13.5px; background: var(--card-soft); color: var(--ink);
  font-family: inherit;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
}
.form-item input:focus, .form-item select:focus, .form-item textarea:focus {
  outline: none; border-color: var(--brand); background: #fff;
  box-shadow: 0 0 0 4px rgba(15,111,187,.12);
}
.form-item textarea { height: 84px; padding: 10px var(--s3); resize: vertical; line-height: 1.6; }
.form-item input:read-only { background: #F4F5F8; color: var(--muted); }

.actions { display: flex; justify-content: flex-end; gap: var(--s3); margin-top: var(--s5); flex-wrap: wrap; }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(51,51,62,.38);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  z-index: 50;
  animation: fadeIn .18s var(--ease);
}
.modal {
  width: 580px; max-width: 92vw;
  background: var(--card); border-radius: var(--r-xl);
  padding: var(--s6);
  max-height: 86vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(51,51,62,.24);
  animation: popIn .24s var(--ease-spring);
}
.modal h3 {
  font-size: 16.5px; color: var(--ink); margin-bottom: var(--s5);
  display: flex; align-items: center; gap: var(--s3);
}
.modal .actions { display: flex; justify-content: flex-end; gap: var(--s3); margin-top: var(--s5); }

@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes popIn { from { opacity: 0; transform: scale(.96) translateY(8px) } to { opacity: 1; transform: none } }

/* ---------- KPI 卡 ---------- */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s4); }
.kpi {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s5);
  box-shadow: var(--elev-1);
  display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s3);
  transition: transform .18s var(--ease-spring), box-shadow .2s var(--ease);
}
.kpi:hover { transform: translateY(-2px); box-shadow: var(--elev-2); }
.kpi .label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.kpi .value { font-size: 27px; color: var(--ink); font-weight: 700; margin-top: var(--s2); line-height: 1.2; letter-spacing: -.5px; }
.kpi .value.price { color: var(--price); }
.kpi .sub { font-size: 11.5px; color: var(--muted); margin-top: var(--s1); }
.kpi .kt { min-width: 0; flex: 1; }
.kpi .ic-box { width: 42px; height: 42px; border-radius: 13px; flex: 0 0 42px; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: var(--s2); border-bottom: 1px solid var(--line); margin-bottom: var(--s4); }
.tabs .tab {
  padding: 9px var(--s4); cursor: pointer; font-size: 14px; color: var(--muted);
  border-bottom: 2px solid transparent; font-weight: 500;
  transition: color .16s var(--ease), border-color .16s var(--ease);
}
.tabs .tab:hover { color: var(--brand); }
.tabs .tab.active { color: var(--brand-d); border-bottom-color: var(--brand); font-weight: 700; }

/* ---------- 筛选栏 ---------- */
.filter-bar { display: flex; gap: var(--s3); flex-wrap: wrap; align-items: center; margin-bottom: var(--s4); }
.filter-bar input, .filter-bar select {
  height: 36px; border: 1.5px solid var(--line-d); border-radius: var(--r-md);
  padding: 0 var(--s3); font-size: 13px; background: var(--card-soft); color: var(--ink);
  font-family: inherit;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.filter-bar input:focus, .filter-bar select:focus {
  outline: none; border-color: var(--brand); background: #fff;
  box-shadow: 0 0 0 4px rgba(15,111,187,.12);
}
.filter-bar .grow { flex: 1; }

/* ---------- 其他 ---------- */
.empty {
  text-align: center; color: var(--muted); padding: var(--s8) 0; font-size: 13.5px;
}
.empty::before {
  content: ''; display: block; width: 68px; height: 68px; margin: 0 auto var(--s4);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect x='9' y='20' width='46' height='32' rx='9' fill='%23E9F3FC'/%3E%3Cpath d='M9 31h46' stroke='%23B9DCF7' stroke-width='2.4'/%3E%3Cpath d='M22 40h20M22 47h11' stroke='%238FC8EE' stroke-width='3' stroke-linecap='round'/%3E%3Cpath d='M32 5v7M17 9l3.4 5.6M47 9l-3.4 5.6' stroke='%23B9DCF7' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat;
}
.qr-img {
  width: 220px; height: 220px; border: 1px solid var(--line); border-radius: var(--r-md);
  display: block; margin: 0 auto; background: #fff;
}
.qr-preview { min-height: 60px; display: flex; align-items: center; justify-content: center; margin-top: var(--s2); }
.link-box {
  background: var(--card-soft); border: 1px dashed var(--line-d); border-radius: var(--r-md);
  padding: var(--s3) var(--s4); font-size: 13px; word-break: break-all; color: var(--ink);
  margin: var(--s2) 0;
}
.muted { color: var(--muted); }

/* ===================== 家人核验 ===================== */
.fam-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--s4); }
.fam-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; display: flex; flex-direction: column;
  box-shadow: var(--elev-1);
  transition: transform .18s var(--ease-spring), box-shadow .2s var(--ease);
}
.fam-card:hover { transform: translateY(-2px); box-shadow: var(--elev-2); }
.fam-photo { width: 100%; height: 180px; object-fit: cover; background: var(--card-soft); display: block; }
.fam-photo.empty-photo { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; }
.fam-body { padding: var(--s4) var(--s5) var(--s5); flex: 1; display: flex; flex-direction: column; }
.fam-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--s3); }
.fam-head b { font-size: 16px; color: var(--ink); }
.fam-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 6px var(--s3); font-size: 13px; }
.fam-meta > div { display: flex; gap: 6px; align-items: baseline; }
.fam-meta .lbl { color: var(--muted); flex: 0 0 auto; }
.fam-meta b { color: var(--ink); font-weight: 600; word-break: break-all; }
.fam-meta .uid { font-size: 11px; color: var(--muted); }
.fam-actions { margin-top: var(--s4); display: flex; gap: var(--s2); }
.fam-actions.muted { color: var(--muted); font-size: 12px; line-height: 1.6; }

/* ===================== 订单详情抽屉 ===================== */
.drawer-mask {
  position: fixed; inset: 0;
  background: rgba(51,51,62,.35);
  z-index: 60; opacity: 0;
  transition: opacity .25s var(--ease);
  display: flex; justify-content: flex-end;
}
.drawer-mask.show { opacity: 1; }
.drawer {
  width: 440px; max-width: 94vw; height: 100%;
  background: var(--card);
  box-shadow: -8px 0 30px rgba(51,51,62,.18);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .26s var(--ease);
}
.drawer-mask.show .drawer { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: var(--s5) var(--s6); border-bottom: 1px solid var(--line); }
.drawer-title { font-size: 17px; color: var(--ink); font-weight: 700; }
.drawer-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.drawer-close {
  width: 32px; height: 32px; border: none; background: var(--card-soft);
  border-radius: var(--r-sm); font-size: 18px; color: var(--muted);
  cursor: pointer; line-height: 1; transition: all .16s var(--ease);
}
.drawer-close:hover { background: #FFECEC; color: var(--red); }
.drawer-body { flex: 1; overflow-y: auto; padding: var(--s5) var(--s6); }
.drawer-foot { padding: var(--s4) var(--s6); border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: var(--s2); }
.drawer-body td.op { white-space: nowrap; }
.drawer-body td.op .btn { margin-right: 6px; }

.od-banner { padding: 12px var(--s4); border-radius: var(--r-md); font-size: 15px; font-weight: 700; color: #fff; margin-bottom: var(--s4); text-align: center; }
.od-banner.waitpay { background: linear-gradient(135deg, #FFC15E, #F0A020); }
.od-banner.waitbook { background: linear-gradient(135deg, #7A97FF, var(--indigo)); }
.od-banner.booked { background: linear-gradient(135deg, #4BD09A, #1F9E63); }
.od-banner.verified { background: linear-gradient(135deg, var(--brand-l), var(--brand-d)); }
.od-banner.refund { background: linear-gradient(135deg, #FF7A7A, var(--red)); }
.od-banner.off { background: linear-gradient(135deg, #B9BFCB, #98A0B0); }
.od-sec {
  background: var(--card-soft); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: var(--s4) var(--s4); margin-bottom: var(--s3);
}
.od-sec-t { font-size: 14px; color: var(--ink); font-weight: 700; margin-bottom: var(--s3); }
.od-kv { display: flex; justify-content: space-between; gap: var(--s3); padding: 5px 0; font-size: 13px; }
.od-kv span { color: var(--muted); }
.od-kv b { color: var(--ink); font-weight: 600; text-align: right; }
.od-price { color: var(--price) !important; font-size: 16px; }
.od-note { font-size: 12px; color: var(--muted); margin-top: var(--s2); line-height: 1.7; }
.od-person { border-top: 1px dashed var(--line); padding: var(--s3) 0; }
.od-person:first-of-type { border-top: none; padding-top: 0; }
.od-person-h { display: flex; align-items: baseline; gap: var(--s2); margin-bottom: 4px; }
.od-person-h b { font-size: 14px; color: var(--ink); }

/* ===================== 响应式 ===================== */
@media (max-width: 1100px) {
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .sidebar { width: 64px; }
  .sidebar .brand { padding: var(--s4) var(--s3); justify-content: center; }
  .sidebar .brand b, .sidebar .foot, .nav-item span.txt { display: none; }
  .nav-item { justify-content: center; padding: 12px 0; }
  .main { margin-left: 64px; }
  .content { padding: var(--s4); }
  .topbar { padding: 0 var(--s4); }
}

/* ---------- 表格缩略图占位 ---------- */
.thumb-empty {
  display: inline-flex; width: 104px; height: 50px;
  align-items: center; justify-content: center;
  border-radius: 8px; background: var(--brand-soft);
  color: var(--muted); font-size: 12px;
}

/* ---------- 原生文件选择器美化 ---------- */
.form-item input[type="file"] {
  height: auto; padding: 7px 10px; font-size: 12.5px;
  background: var(--card-soft); cursor: pointer; color: var(--muted);
}
.form-item input[type="file"]::file-selector-button {
  height: 27px; padding: 0 13px; margin-right: 10px;
  border: none; border-radius: 8px;
  background: var(--brand-soft); color: var(--brand-d);
  font-weight: 600; font-size: 12.5px; cursor: pointer;
  font-family: inherit;
  transition: background .16s var(--ease);
}
.form-item input[type="file"]::file-selector-button:hover { background: #D3E8FA; }

/* ===================== 设置开关（统一美化） ===================== */
.aixk-sw{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:2px var(--s6)}
.sw-row{display:flex;align-items:center;gap:var(--s4);padding:13px 12px;border-bottom:1px dashed var(--line);border-radius:12px;transition:background .16s var(--ease)}
.sw-row:hover{background:#F3F8FD}
.sw-row:last-child{border-bottom:none}
.sw-tx,.sw-row>div:first-child{min-width:0;flex:1}
.sw-t,.sw-lab{font-size:13.5px;font-weight:600;color:var(--ink);line-height:1.45;letter-spacing:.2px}
.sw-d,.sw-desc{font-size:11.5px;color:var(--muted);margin-top:3px;line-height:1.55}
.pos-wrap{display:inline-flex;align-items:center;gap:6px;flex:0 0 auto}
.pos-wrap .muted{font-size:11.5px;color:var(--muted);white-space:nowrap}

/* —— 轨道（兼容 label>span 与 div>i 两种写法，视觉统一）—— */
.sw{
  flex:0 0 auto;position:relative;display:inline-block;
  width:52px;height:28px;margin:0;cursor:pointer;vertical-align:middle;
  border-radius:999px;border:none;user-select:none;-webkit-tap-highlight-color:transparent;
  background:linear-gradient(180deg,#D8DEE6,#C0C9D5);
  box-shadow:inset 0 2px 4px rgba(28,40,60,.20), inset 0 0 0 1px rgba(255,255,255,.28);
  transition:background .22s var(--ease), box-shadow .22s var(--ease);
}
.sw:hover{background:linear-gradient(180deg,#CFD7E1,#B4BECB)}
.sw input{position:absolute;opacity:0;width:0;height:0;pointer-events:none}
/* span 铺满轨道：关闭态透明（露出 .sw 底轨），开启态覆盖品牌渐变 */
.sw span{
  position:absolute;inset:0;border-radius:999px;background:transparent;
  transition:background .22s var(--ease), box-shadow .22s var(--ease);
}
/* —— 滑块（span::after 与 i 两种形态共用）—— */
.sw span::after{content:''}
.sw span::after,.sw i{
  position:absolute;top:3px;left:3px;width:22px;height:22px;border-radius:50%;
  background:linear-gradient(180deg,#FFFFFF,#EEF2F7);
  box-shadow:0 2px 6px rgba(22,32,50,.30), 0 0 0 .5px rgba(22,32,50,.06), inset 0 -1px 0 rgba(0,0,0,.05);
  transition:transform .24s var(--ease-spring), box-shadow .2s var(--ease), width .14s var(--ease);
}
.sw:active span::after,.sw:active i{width:26px;box-shadow:0 1px 4px rgba(22,32,50,.28), 0 0 0 .5px rgba(22,32,50,.06)}
.sw.on:active span::after,.sw.on:active i{transform:translateX(20px)}
.sw input:active + span::after{width:26px}
.sw input:active:checked + span::after{transform:translateX(20px)}

/* —— 开启态：品牌渐变 + 光晕（与主程序按钮同色系）—— */
.sw.on,.sw input:checked + span{
  background:linear-gradient(135deg,#2E8FD8,#0F6FBB);
  box-shadow:inset 0 2px 4px rgba(10,60,110,.32), 0 0 0 3px rgba(15,111,187,.16);
}
.sw.on:hover,.sw input:checked:hover + span{
  background:linear-gradient(135deg,#3A9AE0,#1279C7);
  box-shadow:inset 0 2px 4px rgba(10,60,110,.32), 0 0 0 4px rgba(15,111,187,.20);
}
.sw.on i,.sw input:checked + span::after{transform:translateX(24px)}
.sw.on i{background:linear-gradient(180deg,#FFFFFF,#F5F9FD)}

/* 键盘可达 */
.sw input:focus-visible + span,.sw:focus-visible{
  box-shadow:inset 0 2px 4px rgba(10,60,110,.32), 0 0 0 4px rgba(46,143,216,.35);
}
textarea.form-item textarea,.form-item textarea{width:100%;border:1px solid var(--line);border-radius:10px;
  padding:9px 11px;font:inherit;font-size:13.5px;color:var(--ink);background:var(--card);resize:vertical;line-height:1.6}
.form-item textarea:focus{outline:none;border-color:var(--brand-2);box-shadow:0 0 0 4px var(--brand-soft)}


/* ===================== 侧边栏分组 ===================== */
.nav-group {
  font-size: 11px; font-weight: 700; letter-spacing: 1.2px;
  color: var(--muted); padding: 12px 12px 6px;
  text-transform: none;
}
.nav-group:first-child { padding-top: 4px; }

/* ===================== 页头（标题 + 说明 + 操作） ===================== */
.page-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s4); margin-bottom: var(--s5); min-height: 38px; flex-wrap: wrap;
}
.page-head .ph-l { min-width: 0; }
.page-head .ph-l h2 {
  font-size: 18px; color: var(--ink); font-weight: 700; letter-spacing: .3px;
  display: flex; align-items: center; gap: 10px;
}
.page-head .ph-l h2::before {
  content: ''; width: 4px; height: 16px; border-radius: 3px;
  background: linear-gradient(180deg, #2E8FD8, #0F6FBB); flex: 0 0 4px;
}
.page-head .ph-l .ph-d { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.page-head .ph-r { display: flex; gap: var(--s2); flex-wrap: wrap; }

/* ===================== 医院数据调取 ===================== */
.btn-sync {
  border-color: var(--brand-line); color: var(--brand-d);
  background: linear-gradient(180deg, #F4FAFF, var(--brand-soft));
  font-weight: 600;
}
.btn-sync:hover {
  border-color: var(--brand); color: var(--brand-d);
  background: var(--brand-soft);
}
.sync-result {
  border: 1.5px dashed var(--brand-line); background: var(--brand-soft);
  border-radius: var(--r-md); padding: var(--s4); margin: var(--s3) 0 0;
  font-size: 13px; color: var(--brand-d); line-height: 1.7;
}
.sync-result b { color: var(--ink); }

/* ===================== 检查项勾选组包 ===================== */
.item-picker {
  border: 1.5px solid var(--line-d); border-radius: var(--r-md);
  background: var(--card-soft); padding: var(--s3); max-height: 260px; overflow-y: auto;
}
.item-picker .ip-group { margin-bottom: var(--s3); }
.item-picker .ip-group:last-child { margin-bottom: 0; }
.item-picker .ip-gt {
  font-size: 12.5px; font-weight: 700; color: var(--brand-d);
  padding: 4px 2px 8px; display: flex; align-items: center; gap: 6px;
}
.item-picker .ip-gt .cnt {
  font-size: 11px; color: var(--brand-d); background: #C9E4F8;
  border-radius: 999px; padding: 1px 8px; font-weight: 600;
}
.item-picker .ip-items { display: flex; flex-wrap: wrap; gap: 8px; }
.ip-chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1.5px solid var(--line-d); background: #fff; color: var(--text);
  border-radius: 999px; padding: 5px 12px; font-size: 12.5px; cursor: pointer;
  transition: all .15s var(--ease); user-select: none;
}
.ip-chip:hover { border-color: var(--brand); color: var(--brand-d); }
.ip-chip.on {
  background: linear-gradient(135deg, #1E82CE, #0F6FBB); border-color: transparent;
  color: #fff; font-weight: 600; box-shadow: 0 3px 10px rgba(15,111,187,.28);
}
.ip-chip input { display: none; }
.ip-bar {
  display: flex; align-items: center; gap: var(--s3);
  margin: var(--s2) 0 var(--s3); flex-wrap: wrap;
}
.ip-bar .n { font-size: 12.5px; color: var(--muted); }
.ip-bar .n b { color: var(--brand-d); font-size: 14px; }

/* ===================== 分类管理 ===================== */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s3); }
.cat-card {
  background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r-md);
  padding: var(--s3) var(--s4); display: flex; align-items: center; justify-content: space-between;
  gap: var(--s2); transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.cat-card:hover { border-color: var(--brand-line); box-shadow: var(--elev-1); }
.cat-card .nm { font-size: 14px; color: var(--ink); font-weight: 600; }
.cat-card .ct { font-size: 11.5px; color: var(--muted); margin-top: 2px; }


/* ---------- 标签 ---------- */
.tag {
  display: inline-block; padding: 2px 9px; border-radius: 6px;
  background: var(--brand-soft); color: var(--brand-d);
  font-size: 11.5px; font-weight: 600; margin: 1px 2px;
}

/* ===== 富文本编辑器（详细文案 / 预约须知） ===== */
.rich-bar{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:7px 10px;border:1.5px solid var(--line-d,#d7e0ee);border-bottom:none;border-radius:10px 10px 0 0;background:#F5F9FF}
.rich-bar button{min-width:30px;height:28px;padding:0 9px;border:1px solid var(--line,#d7e0ee);border-radius:7px;background:#fff;cursor:pointer;font-size:12.5px;font-weight:700;color:#3d4d63;line-height:1}
.rich-bar button:hover{background:#EAF2FF;border-color:#2E7CF6;color:#2E7CF6}
.rich-bar .rich-red{color:#E5484D}.rich-bar .rich-orange{color:#E8590C}.rich-bar .rich-blue{color:#2E7CF6}.rich-bar .rich-green{color:#1B9E56}
.rich-bar .rich-sep{width:1px;height:18px;background:#d7e0ee;margin:0 3px}
.rich-edit{border:1.5px solid var(--line-d,#d7e0ee);border-radius:0 0 10px 10px;padding:12px 13px;font-size:13.5px;line-height:1.9;background:#fff;outline:none;white-space:pre-wrap;min-height:90px}
.rich-edit:focus{border-color:#2E7CF6;box-shadow:0 0 0 3px rgba(46,124,246,.12)}
.rich-edit b,.rich-edit strong{font-weight:800}
/* 项目气泡价格小标 */
.item-picker .ip-chip .ip-p{margin-left:5px;font-style:normal;font-size:11px;opacity:.75;font-weight:600}
