/* 汉脉堂中医馆 · 患者端样式（现代中医：米白 / 墨绿 / 暖木） */
:root {
  --bg: #F6F1E7;
  --card: #FFFFFF;
  --primary: #21513B;
  --primary-dark: #173E2C;
  --primary-soft: #E7EFE9;
  --accent: #A67B52;
  --accent-soft: #F0E4D6;
  --text: #22342B;
  --text-sub: #7A7A6E;
  --line: #EAE3D4;
  --danger: #B5483A;
  --danger-soft: #F7E5E1;
  --radius: 16px;
  --shadow: 0 2px 10px rgba(34, 52, 43, 0.06);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: 76px;
}

/* 顶部品牌 */
.brand-header {
  padding: 26px 20px 8px;
  text-align: center;
}
.brand-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.brand-logo .logo-main {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 2px;
}
.brand-logo .logo-sub {
  font-size: 12px;
  color: var(--text-sub);
  letter-spacing: 4px;
  margin-top: -2px;
}
.brand-title {
  margin-top: 12px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

/* 卡片 */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  margin: 12px 16px;
  box-shadow: var(--shadow);
}

/* 日期卡片 */
.date-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: transform .08s ease;
  border: 1.5px solid transparent;
}
.date-card:active { transform: scale(.985); }
.date-card .date-main { font-size: 19px; font-weight: 600; }
.date-card .date-week { font-size: 13px; color: var(--text-sub); margin-top: 2px; }
.date-card .date-doctor { font-size: 13px; color: var(--accent); margin-top: 4px; }
.date-card .arrow { color: var(--text-sub); font-size: 20px; }

.badge {
  display: inline-block;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 600;
}
.badge-open { background: var(--primary-soft); color: var(--primary); }
.badge-closed { background: #EFEFEA; color: #8B8B80; }

.not-seating-box {
  text-align: center;
  padding: 30px 16px;
}
.not-seating-box .big {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.not-seating-box .sub { font-size: 14px; color: var(--text-sub); }

/* 时间段网格 */
.slot-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.slot {
  padding: 13px 6px;
  text-align: center;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  border: 1.5px solid var(--line);
  background: #FBF9F4;
  color: var(--primary);
  cursor: pointer;
  transition: transform .08s ease;
}
.slot:active { transform: scale(.95); }
.slot.booked {
  background: #EFEFEA;
  color: #A8A89C;
  border-color: #E3E1D8;
  cursor: not-allowed;
  text-decoration: line-through;
}
.slot.closed {
  background: #F4F1EA;
  color: #B9B2A4;
  border-color: var(--line);
  cursor: not-allowed;
}
.slot-label {
  display: block;
  font-size: 11px;
  font-weight: 400;
  margin-top: 3px;
  color: inherit;
  opacity: .75;
}

/* 表单 */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 14px; color: var(--text-sub); margin-bottom: 6px; }
.field input {
  width: 100%;
  padding: 13px 14px;
  font-size: 17px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #FDFCF8;
  color: var(--text);
  outline: none;
}
.field input:focus { border-color: var(--primary); }
.field select {
  width: 100%;
  padding: 13px 14px;
  font-size: 17px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: #FDFCF8;
  color: var(--text);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}
.field select:focus { border-color: var(--primary); }

/* 按钮 */
.btn {
  display: block;
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 14px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:active { background: var(--primary-dark); }
.btn-outline {
  background: #fff;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-danger { background: #fff; color: var(--danger); border: 1.5px solid var(--danger); }
.btn-ghost { background: transparent; color: var(--text-sub); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* 信息行 */
.info-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
}
.info-row:last-child { border-bottom: none; }
.info-row .k { color: var(--text-sub); }
.info-row .v { font-weight: 600; }

/* 提示 */
.tip {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.7;
  margin: 12px 4px;
}

/* 成功页 */
.success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 8px auto 12px;
}

/* 底部导航 */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  background: #fff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -2px 12px rgba(34,52,43,.06);
}
.bottom-nav button {
  flex: 1;
  padding: 13px 0;
  background: none;
  border: none;
  font-size: 15px;
  color: var(--text-sub);
  cursor: pointer;
  font-weight: 600;
}
.bottom-nav button.active { color: var(--primary); }

/* toast */
#toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(30, 45, 37, .94);
  color: #fff;
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 14px;
  max-width: 86%;
  text-align: center;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
#toast.show { opacity: 1; }

/* 弹窗 */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 20px;
}
.modal {
  background: #fff;
  border-radius: 18px;
  padding: 22px;
  width: 100%;
  max-width: 400px;
}
.modal h3 { margin: 0 0 14px; font-size: 18px; color: var(--text); }
.modal .modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.modal .modal-actions .btn { flex: 1; padding: 12px; font-size: 16px; }

/* 签到码 */
.checkin-box {
  background: var(--accent-soft);
  border-radius: 14px;
  padding: 18px;
  text-align: center;
  margin-bottom: 16px;
}
.checkin-box .checkin-label { font-size: 14px; color: var(--accent); }
.checkin-box .checkin-num {
  font-size: 44px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 6px;
  margin: 6px 0;
}
.checkin-box .checkin-hint { font-size: 13px; color: var(--text-sub); }

.checkin-line {
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--accent-soft);
  border-radius: 10px;
  font-size: 14px;
  color: var(--text-sub);
}
.checkin-line b {
  color: var(--accent);
  font-size: 18px;
  letter-spacing: 3px;
  margin-left: 6px;
}

/* 预约成功页：扫码签到说明 */
.checkin-scan {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  margin: 8px 0;
}

/* 我的预约：已签到显示号码 */
.checkin-done { background: var(--primary-soft); color: var(--primary); }
.checkin-done b {
  color: var(--primary);
  font-size: 26px;
  letter-spacing: 0;
}
.checkin-wait {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-sub);
}
