* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif; background: linear-gradient(180deg, #f0f7ff 0%, #f8fafc 100%); color: #1e293b; -webkit-tap-highlight-color: transparent; min-height: 100vh; }

.loading-dots::after { content: ''; animation: dots 1.5s steps(4, end) infinite; }
@keyframes dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } 100% { content: ''; } }

/* ============================================================
   健康管理页样式（替代原 Tailwind 工具类）
   ============================================================ */

/* 患者信息四格 */
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; font-size: 16px; }
.stat-box { background: #f8fafc; border-radius: 0.75rem; padding: 0.75rem; }
.stat-box--blue { background: #eff6ff; }
.stat-label { display: block; font-size: 14px; color: #94a3b8; margin-bottom: 0.25rem; }
.stat-label--blue { color: #60a5fa; }
.stat-value { color: #334155; font-weight: 600; }
.stat-value--blue { color: #2563eb; }

/* 智能处方推荐按钮 */
.generate-btn { width: 100%; padding: 0.875rem 0; background: linear-gradient(90deg, #2563eb 0%, #6366f1 50%, #8b5cf6 100%); color: #fff; border: none; border-radius: 0.75rem; font-size: 16px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin-top: 1rem; transition: all 0.15s ease; box-shadow: 0 6px 20px -6px rgba(99, 102, 241, 0.5); }
.generate-btn:hover { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1); }
.generate-btn.btn-disabled { opacity: 0.6; cursor: not-allowed; }
.card-subtitle { display: none; }

/* 处方结果区 */
.result-area { margin-top: 1.25rem; }

/* 日期选择条 */
.date-strip { display: flex; gap: 0.5rem; overflow-x: auto; padding-bottom: 0.25rem; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.date-strip::-webkit-scrollbar { display: none; }
.date-pill { flex: none; padding: 0.375rem 0.75rem; border-radius: 9999px; font-size: 14px; font-weight: 500; white-space: nowrap; cursor: pointer; user-select: none; transition: all 0.15s ease; background: #f1f5f9; color: #475569; }
.date-pill:hover { background: #e2e8f0; }
.date-pill.selected { background: #2563eb; color: #fff; box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1); }

/* 处方时间行 */
.rx-time-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.rx-time-icon { font-size: 14px; }
.rx-time { font-size: 14px; font-weight: 600; color: #64748b; }
.rx-time--today { color: #2563eb; }
.rx-today-badge { font-size: 14px; background: #dbeafe; color: #2563eb; border-radius: 9999px; padding: 0.125rem 0.5rem; font-weight: 500; }

/* 处方卡片（5 类，按颜色区分） */
.rx-card { border-radius: 1rem; padding: 1.25rem; }
.rx-card-head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.rx-icon { font-size: 1.5rem; }
.rx-title { font-size: 1.125rem; font-weight: 700; }
.rx-subtitle { font-size: 16px; color: #94a3b8; }
.rx-list { display: flex; flex-direction: column; gap: 0.25rem; }
.rx-list li { display: flex; align-items: flex-start; gap: 0.75rem; font-size: 1rem; line-height: 1.625; color: #475569; margin-bottom: 0.625rem; }
.rx-list li:last-child { margin-bottom: 0; }
.rx-dot { margin-top: 0.375rem; width: 0.5rem; height: 0.5rem; border-radius: 50%; flex: none; }
.rx-card--rose { background: #fff1f2; }
.rx-card--rose .rx-title { color: #be123c; }
.rx-card--rose .rx-dot { background: #fda4af; }
.rx-card--blue { background: #eff6ff; }
.rx-card--blue .rx-title { color: #1d4ed8; }
.rx-card--blue .rx-dot { background: #93c5fd; }
.rx-card--amber { background: #fffbeb; }
.rx-card--amber .rx-title { color: #b45309; }
.rx-card--amber .rx-dot { background: #fcd34d; }
.rx-card--violet { background: #f5f3ff; }
.rx-card--violet .rx-title { color: #6d28d9; }
.rx-card--violet .rx-dot { background: #c4b5fd; }
.rx-card--cyan { background: #ecfeff; }
.rx-card--cyan .rx-title { color: #0e7490; }
.rx-card--cyan .rx-dot { background: #67e8f9; }
.rx-card--slate { background: #f8fafc; }
.rx-card--slate .rx-title { color: #334155; }
.rx-card--slate .rx-dot { background: #cbd5e1; }
.rx-gap { height: 0.75rem; }

/* 生成中加载动画 */
.rx-loading { background: #f8fafc; border-radius: 1rem; padding: 2rem; text-align: center; }
.rx-loading-icon { font-size: 2.25rem; margin-bottom: 0.75rem; animation: rx-bounce 1s infinite; }
@keyframes rx-bounce { 0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(0.8, 0, 1, 1); } 50% { transform: none; animation-timing-function: cubic-bezier(0, 0, 0.2, 1); } }
.rx-loading-text { font-size: 16px; font-weight: 500; color: #475569; }
.rx-loading-hint { font-size: 14px; color: #94a3b8; margin-top: 0.5rem; }
.rx-progress-row { margin-top: 1rem; display: flex; align-items: center; gap: 0.75rem; }
.rx-progress-track { flex: 1; width: 100%; background: #fff; border-radius: 9999px; height: 0.5rem; overflow: hidden; }
.rx-progress-fill { height: 100%; background: linear-gradient(90deg, #4ade80, #34d399, #14b8a6); border-radius: 9999px; }
.rx-progress-text { font-size: 14px; font-weight: 700; color: #94a3b8; width: 2.5rem; text-align: right; font-variant-numeric: tabular-nums; }

/* 错误 / 空状态 */
.rx-error { color: #d97706; font-size: 16px; background: #fffbeb; border-radius: 1rem; padding: 1.25rem; }
.rx-empty { font-size: 16px; color: #94a3b8; text-align: center; padding: 1.5rem 0; }
