* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f4f6f9; color: #1f2d3d; line-height: 1.5;
}
.app { max-width: 480px; margin: 0 auto; background: #fff; min-height: 100vh; padding-bottom: 40px; }
.header {
  background:
    linear-gradient(160deg, rgba(10,77,204,.55), rgba(6,40,110,.78)),
    url('/img/hospital.jpg') center top / cover no-repeat;
  color: #fff;
  padding: 24px 16px; text-align: center;
}
.header h1 { font-size: 20px; font-weight: 600; text-shadow: 0 1px 4px rgba(0,0,0,.4); }
.header p { font-size: 12px; opacity: .92; margin-top: 4px; text-shadow: 0 1px 3px rgba(0,0,0,.4); }
.section { padding: 16px; }
.card { background: #fafbfc; border: 1px solid #eef1f5; border-radius: 12px; padding: 16px; margin-bottom: 14px; }
label { display: block; font-size: 13px; color: #5a6b7b; margin: 10px 0 6px; }
input, select, textarea {
  width: 100%; padding: 11px 12px; border: 1px solid #d8dee6; border-radius: 8px;
  font-size: 15px; background: #fff; outline: none;
}
input:focus, select:focus { border-color: #0a6cff; }
.btn {
  width: 100%; padding: 13px; border: none; border-radius: 8px; background: #0a6cff; color: #fff;
  font-size: 16px; font-weight: 600; cursor: pointer; margin-top: 12px;
}
.btn:active { background: #0a4fcc; }
.btn.ghost { background: #eef3fb; color: #0a4fcc; }
.btn.danger { background: #ffecec; color: #d4380d; }
.btn.sm { width: auto; padding: 6px 12px; font-size: 13px; margin: 0; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
.hint { background: #fff7e6; border: 1px solid #ffd591; color: #ad6800; padding: 10px; border-radius: 8px; font-size: 13px; margin-top: 10px; }
.err { color: #d4380d; font-size: 13px; margin-top: 8px; min-height: 16px; }
.ok { color: #237804; font-size: 13px; margin-top: 8px; }
.appt { border: 1px solid #eef1f5; border-radius: 10px; padding: 12px; margin-bottom: 10px; font-size: 14px; }
.appt .top { display: flex; justify-content: space-between; align-items: center; }
.tag { font-size: 12px; padding: 2px 8px; border-radius: 20px; }
.tag.pending { background: #fff7e6; color: #ad6800; }
.tag.confirmed { background: #e6f7ff; color: #0958d9; }
.tag.completed { background: #f6ffed; color: #389e0d; }
.tag.cancelled, .tag.noshow { background: #fff1f0; color: #cf1322; }
.muted { color: #8a99a8; font-size: 12px; }
.title { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.hidden { display: none !important; }
.logout { text-align: center; margin-top: 16px; }
.logout a { color: #8a99a8; font-size: 13px; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { border: 1px solid #eef1f5; padding: 8px 6px; text-align: left; }
.table th { background: #fafbfc; color: #5a6b7b; font-weight: 600; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: #fafbfc; border: 1px solid #eef1f5; border-radius: 10px; padding: 12px; text-align: center; }
.stat .n { font-size: 22px; font-weight: 700; color: #0a4fcc; }
.stat .l { font-size: 12px; color: #8a99a8; margin-top: 2px; }
.filter { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.filter input, .filter select { flex: 1; min-width: 120px; }
.slot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.slot {
  padding: 10px 0; text-align: center; font-size: 14px; border-radius: 8px;
  border: 1px solid #d8dee6; background: #fff; color: #1f2d3d;
  cursor: pointer; user-select: none; -webkit-user-select: none;
}
.slot.active { border-color: #0a6cff; background: #e8f1ff; color: #0a4fcc; font-weight: 600; }
.slot.taken { background: #f2f3f5; color: #b7c0ca; border-color: #eef1f5; cursor: not-allowed; }
.slot.taken::after { content: " 已满"; font-size: 11px; }
