/* 产康科预约系统 · 原型公共样式 */
:root {
  --primary: #E05B7F;
  --primary-dark: #C94A6C;
  --primary-light: #FBEEF2;
  --teal: #2BAE9E;
  --green: #2FA968;
  --green-light: #E7F6EE;
  --orange: #E8833A;
  --orange-light: #FDF1E7;
  --red: #E0533D;
  --red-light: #FDEBE8;
  --blue: #4A7FD4;
  --blue-light: #ECF2FB;
  --purple: #8A6FD8;
  --purple-light: #F1EDFB;
  --ink: #2B2B3A;
  --ink-2: #5A5A6E;
  --ink-3: #9A9AAC;
  --line: #ECECF2;
  --bg: #F7F4F5;
  --card: #FFFFFF;
  --radius: 14px;
  --shadow: 0 2px 12px rgba(43, 43, 58, .06);
  --shadow-lg: 0 8px 30px rgba(43, 43, 58, .12);
}
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  color: var(--ink); background: var(--bg); line-height: 1.6;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; font-size: 1rem; }
input, select, textarea { font-family: inherit; font-size: 1rem; color: var(--ink); }
i[class^="ri-"], i[class*=" ri-"] { vertical-align: middle; }

/* ---------- 按钮（大按钮 + 明确点击反馈） ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px; padding: 0 22px; border-radius: 12px;
  font-size: 1rem; font-weight: 600; color: #fff; background: var(--primary);
  box-shadow: 0 4px 12px rgba(224, 91, 127, .3);
  transition: transform .12s ease, box-shadow .12s ease, background .15s ease;
  user-select: none;
}
.btn:hover { background: var(--primary-dark); box-shadow: 0 6px 16px rgba(224, 91, 127, .4); }
.btn:active { transform: scale(.96); box-shadow: 0 2px 6px rgba(224, 91, 127, .3); }
.btn.secondary { background: #fff; color: var(--primary); border: 1.5px solid var(--primary); box-shadow: none; }
.btn.secondary:hover { background: var(--primary-light); }
.btn.ghost { background: var(--bg); color: var(--ink-2); box-shadow: none; }
.btn.ghost:hover { background: #ECE7EA; }
.btn.success { background: var(--green); box-shadow: 0 4px 12px rgba(47, 169, 104, .3); }
.btn.success:hover { background: #27955B; }
.btn.danger { background: #fff; color: var(--red); border: 1.5px solid var(--red); box-shadow: none; }
.btn.danger:hover { background: var(--red-light); }
.btn.small { min-height: 36px; padding: 0 14px; font-size: .88rem; border-radius: 9px; }
.btn:disabled { background: #D8D8E0; color: #fff; box-shadow: none; cursor: not-allowed; transform: none; }
.btn-block { width: 100%; min-height: 52px; font-size: 1.06rem; }

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

/* ---------- 标签 ---------- */
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.tag.green { background: var(--green-light); color: var(--green); }
.tag.orange { background: var(--orange-light); color: var(--orange); }
.tag.red { background: var(--red-light); color: var(--red); }
.tag.blue { background: var(--blue-light); color: var(--blue); }
.tag.purple { background: var(--purple-light); color: var(--purple); }
.tag.pink { background: var(--primary-light); color: var(--primary); }
.tag.gray { background: #EFEFF4; color: var(--ink-2); }

/* ---------- Toast ---------- */
#toast-wrap { position: fixed; left: 50%; top: 24px; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 12px;
  background: rgba(43, 43, 58, .92); color: #fff; font-size: .95rem; box-shadow: var(--shadow-lg);
  animation: toast-in .28s cubic-bezier(.2, .9, .3, 1.2); max-width: 84vw;
}
.toast.success { background: var(--green); }
.toast.error { background: var(--red); }
.toast.warn { background: var(--orange); }
.toast.out { animation: toast-out .25s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-16px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-12px) scale(.96); } }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(30, 30, 45, .45); z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: fade-in .18s ease; backdrop-filter: blur(2px);
}
.modal-mask.sheet { align-items: flex-end; padding: 0; }
.modal { background: #fff; border-radius: 18px; width: 100%; max-width: 420px; max-height: 86vh; overflow-y: auto; animation: pop-in .22s cubic-bezier(.2, .9, .3, 1.15); box-shadow: var(--shadow-lg); }
.sheet .modal { border-radius: 20px 20px 0 0; max-width: 100%; animation: slide-up .26s cubic-bezier(.2, .8, .3, 1); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 12px; }
.modal-head h3 { font-size: 1.1rem; }
.modal-close { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--bg); color: var(--ink-2); font-size: 1.2rem; transition: all .15s; }
.modal-close:hover { background: #EAE5E8; transform: rotate(90deg); }
.modal-body { padding: 4px 20px 20px; }
.modal-foot { display: flex; gap: 12px; padding: 0 20px 20px; }
.modal-foot .btn { flex: 1; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: scale(.92) translateY(10px); } }
@keyframes slide-up { from { transform: translateY(60%); } to { transform: none; } }

/* ---------- 表单 ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: .88rem; color: var(--ink-2); margin-bottom: 6px; font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 10px;
  background: #FBFAFB; outline: none; transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 84px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(224, 91, 127, .12); background: #fff; }

/* ---------- 时间轴 ---------- */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ''; position: absolute; left: 8px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding-bottom: 20px; }
.tl-item::before {
  content: ''; position: absolute; left: -24px; top: 6px; width: 12px; height: 12px; border-radius: 50%;
  background: #fff; border: 3px solid var(--primary);
}
.tl-item.done::before { border-color: var(--green); background: var(--green); }
.tl-item.cancel::before { border-color: var(--ink-3); }

/* ---------- 空状态 ---------- */
.empty { text-align: center; padding: 48px 20px; color: var(--ink-3); }
.empty i { font-size: 3rem; display: block; margin-bottom: 10px; opacity: .5; }

/* ---------- 徽标 ---------- */
.badge-dot { display: inline-flex; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: .7rem; align-items: center; justify-content: center; font-weight: 700; }

/* ---------- 通用工具 ---------- */
.flex { display: flex; align-items: center; }
.between { justify-content: space-between; }
.gap8 { gap: 8px; } .gap12 { gap: 12px; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; } .mt20 { margin-top: 20px; }
.muted { color: var(--ink-3); font-size: .85rem; }
.strong { font-weight: 700; }
.price { color: var(--primary); font-weight: 800; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }
.icon-circle { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.35rem; flex-shrink: 0; }

/* 脉冲动画（签到/候补提示） */
.pulse { animation: pulse 1.6s ease infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(224, 91, 127, .35); } 50% { box-shadow: 0 0 0 8px rgba(224, 91, 127, 0); } }

/* 页内视图淡入 */
.view { animation: view-in .22s ease; }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } }

/* 打印隐藏 */
@media print { .no-print { display: none !important; } }

/* ---------- 两端共用：筛选标签 / 时段格 / 人员选择 ---------- */
.filter-tabs { display: flex; gap: 6px; background: #fff; padding: 5px; border-radius: 12px; box-shadow: var(--shadow); margin-bottom: 12px; }
.filter-tab { flex: 1; text-align: center; padding: 8px 2px; border-radius: 9px; font-size: .85rem; color: var(--ink-2); font-weight: 600; transition: all .15s; white-space: nowrap; }
.filter-tab:hover { background: var(--bg); }
.filter-tab.active { background: var(--primary); color: #fff; box-shadow: 0 3px 8px rgba(224, 91, 127, .3); }
.slot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.slot-cell { padding: 12px 4px; border-radius: 12px; text-align: center; border: 1.5px solid var(--green); background: var(--green-light); color: var(--green); transition: all .15s; }
.slot-cell:hover { transform: translateY(-2px); }
.slot-cell b { display: block; font-size: 1rem; }
.slot-cell span { font-size: .72rem; }
.slot-cell.active { background: var(--green); color: #fff; box-shadow: 0 4px 10px rgba(47, 169, 104, .35); }
.slot-cell.active span { color: rgba(255, 255, 255, .9); }
.slot-cell.full { border-color: var(--line); background: #EFEFF4; color: var(--ink-3); }
.slot-cell.full:hover { transform: none; }
.doc-cell { display: flex; align-items: center; gap: 10px; padding: 12px; background: #fff; border-radius: 12px; border: 1.5px solid var(--line); margin-bottom: 8px; transition: all .15s; }
.doc-cell:hover { border-color: var(--primary); }
.doc-cell.active { border-color: var(--primary); background: var(--primary-light); }
