/* ===== 瑞苎体检 H5 预约系统 样式 ===== */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f5f7fa;
  color: #1a1a1a;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
}

/* 颜色变量 */
:root {
  --primary: #1976d2;
  --primary-dark: #1565c0;
  --primary-light: #e3f2fd;
  --success: #2e7d32;
  --warning: #f57c00;
  --danger: #d32f2f;
  --text: #1a1a1a;
  --text-light: #666;
  --text-mute: #999;
  --border: #e0e4e8;
  --bg: #f5f7fa;
  --card: #fff;
  --radius: 12px;
}

/* 顶部品牌区 */
.brand-bar {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 32px 20px 24px;
  text-align: center;
  position: relative;
}
.brand-bar .logo {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  backdrop-filter: blur(8px);
}
.brand-bar h1 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 600;
}
.brand-bar .slogan {
  font-size: 13px;
  opacity: 0.9;
}

/* 容器 */
.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
}

/* 卡片 */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.card-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 14px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.card-title::before {
  content: '';
  width: 3px;
  height: 14px;
  background: var(--primary);
  border-radius: 2px;
}

/* 提示 */
.notice {
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 14px;
}
.notice.info { background: var(--primary-light); color: #0d47a1; }
.notice.warn { background: #fff3e0; color: #e65100; }
.notice.success { background: #e8f5e9; color: #1b5e20; }

/* 字段 */
.field {
  margin-bottom: 14px;
}
.field label {
  display: block;
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 6px;
}
.field label .req { color: var(--danger); }
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 11px 12px;
  font-size: 15px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--primary);
}
.field input[readonly] {
  background: #f5f7fa;
  color: var(--text-light);
}
.field .hint {
  font-size: 12px;
  color: var(--text-mute);
  margin-top: 4px;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 13px 16px;
  font-size: 15px;
  font-weight: 500;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:disabled { background: #b0bec5; cursor: not-allowed; }
.btn-ghost { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: #f5f7fa; }
.btn-success { background: var(--success); color: #fff; }
.btn-text { background: transparent; color: var(--primary); padding: 6px 0; }
.btn-text:hover { background: var(--primary-light); }
.btn-row { display: flex; gap: 10px; }
.btn-row .btn { flex: 1; }

/* 人员信息卡 */
.person-card {
  background: var(--primary-light);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.person-card .avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  flex-shrink: 0;
}
.person-card .info { flex: 1; min-width: 0; }
.person-card .name { font-size: 16px; font-weight: 600; color: #0d47a1; }
.person-card .meta { font-size: 12px; color: #1976d2; opacity: 0.85; margin-top: 2px; }

/* 单选按钮组 */
.radio-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 4px 0;
}
.radio-item {
  flex: 1;
  min-width: 80px;
  position: relative;
  cursor: pointer;
}
.radio-item input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.radio-item span {
  display: block;
  text-align: center;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  color: var(--text-light);
  background: #fff;
  transition: all 0.2s;
  user-select: none;
}
.radio-item:hover span {
  border-color: var(--primary);
  color: var(--primary);
}
.radio-item input[type="radio"]:checked + span {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(25,118,210,0.25);
}
.radio-item input[type="radio"]:checked + span::before {
  content: '✓';
  display: inline-block;
  margin-right: 4px;
  font-size: 13px;
}

/* 限流提示 */
.limit-tip {
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f5f7fa;
  color: var(--text-light);
  margin-bottom: 14px;
}
.limit-tip.full { background: #ffebee; color: var(--danger); }
.limit-tip .count { font-weight: 600; color: var(--warning); }
.limit-tip.full .count { color: var(--danger); }

/* 套餐列表 */
.pkg-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 280px;
  overflow-y: auto;
}
.pkg-item {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.pkg-item:active { transform: scale(0.99); }
.pkg-item.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}
.pkg-item .pkg-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
}
.pkg-item.selected .pkg-name { color: #0d47a1; }
.pkg-item .pkg-meta {
  font-size: 12px;
  color: var(--text-mute);
}
.pkg-item .pkg-price {
  position: absolute;
  right: 14px;
  top: 12px;
  font-size: 16px;
  font-weight: 600;
  color: var(--warning);
}
.pkg-item .pkg-price small {
  font-size: 11px;
  color: var(--text-mute);
  text-decoration: line-through;
  margin-left: 4px;
  font-weight: 400;
}

/* 成功页 */
.success-box {
  text-align: center;
  padding: 36px 20px 24px;
}
.success-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  background: #e8f5e9;
  color: var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  animation: pop 0.4s ease;
}
@keyframes pop {
  0% { transform: scale(0); }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); }
}
.success-title { font-size: 20px; font-weight: 600; color: var(--success); margin: 0 0 6px; }
.success-sub { font-size: 13px; color: var(--text-mute); margin: 0; }

.book-info { margin: 18px 0; }
.book-info-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 14px;
}
.book-info-row:last-child { border-bottom: none; }
.book-info-row .label { color: var(--text-mute); flex-shrink: 0; }
.book-info-row .value { color: var(--text); font-weight: 500; text-align: right; max-width: 65%; word-break: break-all; }

.book-code {
  background: #fff3e0;
  color: #e65100;
  border-radius: 8px;
  padding: 10px;
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  letter-spacing: 1px;
  margin-bottom: 14px;
}

/* 预约列表 */
.booking-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.booking-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  background: #fff;
}
.booking-item.clickable { cursor: pointer; transition: box-shadow .15s; }
.booking-item.clickable:hover { box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.booking-item .head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.booking-item .head .title { font-size: 15px; font-weight: 600; }
.booking-item .body { font-size: 13px; color: var(--text-light); line-height: 1.8; }
.booking-item .body .row { display: flex; gap: 6px; }
.booking-item .body .label { color: var(--text-mute); flex-shrink: 0; }

/* 状态标签 */
.tag {
  display: inline-block;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 500;
}
.tag-pending { background: #fff3e0; color: #e65100; }
.tag-registered { background: #e8f5e9; color: #1b5e20; }
.tag-cancelled { background: #ffebee; color: var(--danger); }
.tag-gray { background: #eceff1; color: #546e7a; }

/* 空状态 */
.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-mute);
}
.empty .icon { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }
.empty .text { font-size: 14px; }

/* 底部安全区 */
.safe-bottom { height: 24px; }

/* 加载 */
.loading {
  text-align: center;
  padding: 24px;
  color: var(--text-mute);
  font-size: 14px;
}
.loading::after {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--primary);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 8px;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== 预约页：左右两栏布局（左客户信息 / 右体检中心） ===== */
.container-wide {
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px;
}
.booking-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 16px;
  align-items: start;
}
.side-col { position: sticky; top: 16px; }

/* 信息明细行（参考客户信息列表样式） */
.info-list {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 12px;
}
.info-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid #eef1f4;
  font-size: 13px;
  background: #fafbfc;
}
.info-row:last-child { border-bottom: none; }
.info-row .label { color: var(--text-mute); flex-shrink: 0; width: 60px; }
.info-row .value { color: var(--text); word-break: break-all; font-weight: 500; }

/* 套餐小卡（左栏内） */
.pkg-mini {
  background: var(--primary-light);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

/* 城市筛选标签 */
.city-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.city-tab {
  padding: 7px 14px;
  font-size: 13px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: #fff;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.15s;
}
.city-tab:hover { border-color: var(--primary); color: var(--primary); }
.city-tab.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

/* 门店列表（独立滚动区域，滚动条始终可见） */
.branch-list-wrap {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fafbfc;
  margin-top: 4px;
}
.branch-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 420px;
  overflow-y: scroll; /* 始终保留滚动条轨道 */
  padding: 10px;
  scrollbar-gutter: stable;
  /* Firefox */
  scrollbar-width: thin;
  scrollbar-color: #b0b8c1 transparent;
}
/* WebKit / Chromium：定制滚动条样式，让它明显可见 */
.branch-list::-webkit-scrollbar { width: 10px; }
.branch-list::-webkit-scrollbar-track { background: #eef1f4; border-radius: 5px; }
.branch-list::-webkit-scrollbar-thumb {
  background: #b0b8c1;
  border-radius: 5px;
  border: 2px solid #eef1f4;
}
.branch-list::-webkit-scrollbar-thumb:hover { background: #8a96a3; }
.branch-list-hint {
  text-align: center;
  font-size: 12px;
  color: var(--text-mute);
  padding: 4px 0 6px;
  background: #fafbfc;
  border-top: 1px solid #eef1f4;
  border-radius: 0 0 10px 10px;
}
.branch-item {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.15s;
  background: #fff;
}
.branch-item:hover { border-color: var(--primary); box-shadow: 0 2px 8px rgba(25,118,210,0.10); }
.branch-item.selected {
  border-color: var(--primary);
  background: var(--primary-light);
}
.branch-item .b-main { flex: 1; min-width: 0; }
.branch-item .b-name { font-size: 15px; font-weight: 600; color: #0d47a1; }
.branch-item .b-addr { font-size: 13px; color: var(--text-light); margin-top: 4px; }
.branch-item .b-meta { font-size: 12px; color: var(--text-mute); margin-top: 4px; }
.branch-item .b-choose {
  flex-shrink: 0;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 500;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}
.branch-item .b-choose:hover { background: var(--primary-dark); }
.branch-item .b-choose.chosen { background: var(--success); }

/* 手机端：两栏自动上下堆叠，门店列表恢复为整页滚动 */
@media (max-width: 900px) {
  .booking-layout { grid-template-columns: 1fr; }
  .side-col { position: static; }
  .branch-list-wrap { border: none; background: transparent; }
  .branch-list {
    max-height: none;
    overflow-y: visible;
    padding: 0;
  }
  .branch-list::-webkit-scrollbar { width: 0; }
  .branch-list-hint { display: none; }
  .branch-item { flex-wrap: wrap; }
  .branch-item .b-choose { width: 100%; }
}

/* 工具 */
.text-mute { color: var(--text-mute); }
.text-light { color: var(--text-light); }
.text-primary { color: var(--primary); }
.text-warn { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.mb-8 { margin-bottom: 8px; }
.mb-14 { margin-bottom: 14px; }
.mb-20 { margin-bottom: 20px; }
.mt-14 { margin-top: 14px; }
.row { display: flex; align-items: center; gap: 6px; }
.row.between { justify-content: space-between; }

/* ===== 登录页：去品牌后的紧凑头部 ===== */
.brand-bar.compact { padding: 30px 20px 22px; }
.brand-bar.compact h1 { font-size: 22px; letter-spacing: 0.5px; }
.brand-bar.compact .slogan { font-size: 13px; opacity: 0.92; }

/* 登录方式 Tab */
.login-tabs {
  display: flex;
  gap: 6px;
  background: #f1f4f8;
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 16px;
}
.login-tab {
  flex: 1;
  padding: 9px 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-light);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s;
}
.login-tab.active {
  background: #fff;
  color: var(--primary);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.login-pane .btn { margin-top: 4px; }
.hint.center {
  text-align: center;
  font-size: 12px;
  color: var(--text-mute);
  margin-top: 10px;
  line-height: 1.6;
}

/* 帮助 / 员工入口 */
.help-line {
  text-align: center;
  font-size: 12.5px;
  color: var(--text-mute);
  padding: 14px 0 4px;
}
.staff-entry {
  text-align: center;
  font-size: 11.5px;
  color: #c3c9d1;
  padding: 12px 0 0;
  cursor: pointer;
}
.staff-entry span { border-bottom: 1px dotted #d5dae1; padding-bottom: 1px; }

/* ===== 预约页：可约范围提示 ===== */
.qualify-hint {
  margin-top: 10px;
  background: #f0f7ff;
  border: 1px solid #d6e6fb;
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 12.5px;
  line-height: 1.6;
  color: #0d47a1;
}

/* 单门店锁定卡 */
.lock-box {
  border: 1.5px solid var(--primary);
  background: var(--primary-light);
  border-radius: 12px;
  padding: 14px 16px;
}
.lock-head { font-size: 13px; color: #1565c0; font-weight: 600; margin-bottom: 8px; }
.lock-item {
  background: #fff;
  border-radius: 10px;
  padding: 12px 14px;
}
.lock-name { font-size: 15px; font-weight: 600; color: #0d47a1; }
.lock-addr { font-size: 13px; color: var(--text-light); margin-top: 4px; }
.lock-meta { font-size: 12px; color: var(--text-mute); margin-top: 4px; }
.lock-tip { font-size: 12px; color: #1565c0; margin-top: 8px; opacity: 0.85; }

/* ===== 加项 ===== */
.opt-tag {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-mute);
  background: #f1f4f8;
  padding: 2px 8px;
  border-radius: 999px;
}
.addon-list { display: flex; flex-direction: column; gap: 8px; }
.addon-item {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 11px 13px;
  cursor: pointer;
  transition: all 0.15s;
  background: #fff;
}
.addon-item:hover { border-color: #90b8e8; }
.addon-item.checked { border-color: var(--primary); background: var(--primary-light); }
.addon-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--primary);
  margin: 0;
  pointer-events: none;   /* 点击统一由整个卡片处理，避免勾选框原生行为导致重复触发 */
}
.addon-item .a-main { flex: 1; min-width: 0; }
.addon-item .a-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.addon-item .a-tag {
  font-size: 10.5px;
  font-weight: 400;
  color: #1565c0;
  background: #e3f2fd;
  padding: 1px 6px;
  border-radius: 4px;
}
.addon-item .a-tag.generic { color: #6a4c93; background: #f3edf9; }
.addon-item .a-desc { font-size: 12px; color: var(--text-mute); margin-top: 3px; line-height: 1.5; }
.addon-item .a-price {
  font-size: 15px;
  font-weight: 600;
  color: var(--warning);
  flex-shrink: 0;
}
.addon-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  font-size: 13.5px;
  color: var(--text-light);
}
.addon-summary b { color: var(--text); }
.addon-summary .amt { color: var(--warning); font-size: 17px; }

/* ===== 取消预约按钮（我的预约页） ===== */
.btn-cancel {
  margin-top: 10px;
  width: 100%;
  padding: 9px 0;
  border: 1px solid #f3c1c1;
  border-radius: 9px;
  background: #fff5f5;
  color: var(--danger);
  font-size: 13.5px;
  cursor: pointer;
}
.btn-cancel:disabled { opacity: .55; }

/* ===== ICP 备案页脚 ===== */
.icp-footer {
  padding: 18px 0 26px;
  text-align: center;
  font-size: 12px;
}
.icp-footer a {
  color: #9aa3ad;
  text-decoration: none;
}
