/* ============ 中医多诊仪 · 科技感主题 ============ */
:root {
  --bg: #070b16;
  --bg2: #0c1326;
  --panel: rgba(20, 32, 58, 0.55);
  --panel-solid: #0f1830;
  --border: rgba(0, 229, 255, 0.18);
  --border-soft: rgba(255, 255, 255, 0.08);
  --text: #e7f1ff;
  --muted: #8aa0c4;
  --cyan: #00e5ff;
  --purple: #9d7bff;
  --green: #00e676;
  --gold: #ffcb6b;
  --red: #ff5c7a;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --radius: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(0, 229, 255, 0.12), transparent 60%),
    radial-gradient(900px 500px at 0% 10%, rgba(157, 123, 255, 0.12), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

/* 网格背景 */
.grid-bg::before {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 75%);
}

.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* 顶部导航 */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(7, 11, 22, 0.72);
  border-bottom: 1px solid var(--border-soft);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 18px; letter-spacing: 1px; }
.brand .logo {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  display: grid; place-items: center; font-size: 18px; box-shadow: 0 0 18px rgba(0, 229, 255, 0.5);
}
.brand small { color: var(--muted); font-weight: 400; font-size: 12px; letter-spacing: 2px; }
.nav-links { display: flex; gap: 22px; align-items: center; font-size: 14px; }
.nav-links a { color: var(--muted); }
.nav-links a:hover, .nav-links a.active { color: var(--text); text-decoration: none; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 18px;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.16), rgba(157, 123, 255, 0.16));
  color: var(--text); font-size: 14px; transition: .2s; font-weight: 600;
}
.btn:hover { box-shadow: 0 0 22px rgba(0, 229, 255, 0.35); transform: translateY(-1px); text-decoration: none; }
.btn-primary { background: linear-gradient(135deg, var(--cyan), var(--purple)); border: none; color: #04121f; }
.btn-ghost { background: transparent; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

/* Hero */
.hero { padding: 70px 0 40px; text-align: center; }
.hero h1 { font-size: clamp(28px, 5vw, 46px); margin: 0 0 14px; line-height: 1.2; }
.hero h1 .hl { background: linear-gradient(135deg, var(--cyan), var(--purple)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); max-width: 640px; margin: 0 auto 26px; font-size: 16px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* 卡片 */
.card {
  background: var(--panel); backdrop-filter: blur(10px);
  border: 1px solid var(--border-soft); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.card.glow { border-color: var(--border); }

.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.feature { text-align: left; }
.feature .ic { font-size: 26px; margin-bottom: 10px; display: inline-block; }
.feature h3 { margin: 0 0 6px; font-size: 17px; }
.feature p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.6; }

.section { padding: 36px 0; }
.section-title { font-size: 24px; margin: 0 0 6px; }
.section-sub { color: var(--muted); margin: 0 0 22px; }

/* 表单 */
label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 6px; }
input[type=text], input[type=number], input[type=password], textarea, select {
  width: 100%; padding: 11px 13px; border-radius: 10px;
  background: rgba(0, 0, 0, 0.25); border: 1px solid var(--border-soft);
  color: var(--text); font-size: 14px; outline: none; transition: .2s;
}
input:focus, textarea:focus, select:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.15); }
textarea { resize: vertical; min-height: 90px; }
.radio-row { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-row label {
  margin: 0; flex: 1 1 0; min-width: 96px; text-align: center; cursor: pointer;
  border: 1px solid var(--border-soft); border-radius: 10px; padding: 9px 6px; color: var(--text);
  background: rgba(0, 0, 0, 0.2); font-size: 13px; transition: .15s;
}
.radio-row input { display: none; }
.radio-row label:has(input:checked) {
  border-color: var(--cyan); background: rgba(0, 229, 255, 0.16); color: #fff;
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.25);
}

/* 步骤向导 */
.steps { display: flex; gap: 8px; margin-bottom: 22px; flex-wrap: wrap; }
.step {
  flex: 1 1 0; min-width: 120px; display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--border-soft); border-radius: 12px; padding: 12px 14px; background: rgba(0,0,0,.2);
}
.step .num {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.08); font-size: 13px; color: var(--muted);
}
.step.active { border-color: var(--cyan); }
.step.active .num { background: var(--cyan); color: #04121f; font-weight: 700; }
.step.done .num { background: var(--green); color: #04121f; }
.step .t { font-size: 13px; }
.step .t small { display: block; color: var(--muted); font-size: 11px; }

.panel-step { display: none; }
.panel-step.active { display: block; animation: fade .3s; }
@keyframes fade { from { opacity: 0; transform: translateY(8px);} to {opacity:1; transform:none;} }

.wizard-actions { display: flex; justify-content: space-between; margin-top: 22px; }

/* 四诊采集卡片 */
.dx-card { border: 1px solid var(--border-soft); border-radius: 14px; padding: 16px; background: rgba(0,0,0,.2); }
.dx-card h4 { margin: 0 0 4px; font-size: 15px; }
.dx-card .desc { color: var(--muted); font-size: 12px; margin-bottom: 12px; }
.dx-video, .dx-preview { width: 100%; aspect-ratio: 4/3; border-radius: 10px; background: #05080f; object-fit: cover; display: none; }
.dx-preview.show, .dx-video.show { display: block; }
.dx-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.tag { display: inline-block; font-size: 11px; padding: 3px 9px; border-radius: 999px; background: rgba(0,229,255,.14); color: var(--cyan); margin: 3px 3px 0 0; }

/* 报告 */
.report-head { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 12px; }
.badge { font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); color: var(--cyan); }
.badge.ai { background: rgba(157,123,255,.18); border-color: rgba(157,123,255,.4); color: var(--purple); }
.metric { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed var(--border-soft); }
.metric:last-child { border-bottom: none; }
.metric .v { font-weight: 700; }
.bar { height: 8px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; margin-top: 4px; }
.bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--purple)); }

.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; margin: 2px; }
.pill.is { background: rgba(0,230,118,.16); color: var(--green); }
.pill.tend { background: rgba(255,203,107,.16); color: var(--gold); }
.pill.no { background: rgba(255,255,255,.06); color: var(--muted); }

.img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.img-grid img { width: 100%; border-radius: 10px; border: 1px solid var(--border-soft); }
.img-grid .cap { font-size: 12px; color: var(--muted); margin-top: 4px; }

.advice li { margin: 6px 0; line-height: 1.7; }
.advice b { color: var(--cyan); }

/* 表格 */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 12px 10px; border-bottom: 1px solid var(--border-soft); text-align: left; }
.table th { color: var(--muted); font-weight: 600; font-size: 12.5px; }
.table tr:hover td { background: rgba(255,255,255,.02); }

/* 提示 */
.note { font-size: 12.5px; color: var(--muted); background: rgba(255,203,107,.08); border: 1px solid rgba(255,203,107,.2); padding: 10px 12px; border-radius: 10px; }

/* 响应式 */
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .nav-links { gap: 12px; font-size: 13px; }
  .hero { padding: 40px 0 20px; }
}
.footer { padding: 30px 0; color: var(--muted); font-size: 12.5px; text-align: center; border-top: 1px solid var(--border-soft); margin-top: 40px; }

/* ===== 报告页 / 打印 ===== */
.report-page { max-width: 980px; margin: 0 auto; }
.report-toolbar { display: flex; justify-content: space-between; align-items: center; margin: 18px 0 12px; gap: 10px; flex-wrap: wrap; }
.rt-right { display: flex; gap: 10px; }
.btn-ghost { background: rgba(14,116,144,.06); border: 1px solid rgba(14,116,144,.25); color: #0e7490; }
.btn-ghost:hover { background: rgba(14,116,144,.12); }
.btn-primary { background: linear-gradient(135deg,#0891b2,#0e7490); color: #fff; border: none; }
.btn-primary:hover { filter: brightness(1.06); }

.report-doc, .report-page { color: #1f2937; font-family: -apple-system,"Microsoft YaHei",sans-serif; line-height: 1.7; }
.rep-hd { display: flex; align-items: center; gap: 14px; border-bottom: 3px solid #0e7490; padding-bottom: 12px; margin-bottom: 18px; }
.rep-logo { display: inline-flex; align-items: center; justify-content: center; width: 54px; height: 54px; border-radius: 12px; background: linear-gradient(135deg,#0891b2,#0e7490); color: #fff; font-weight: 700; font-size: 15px; }
.rep-hd h1 { font-size: 22px; margin: 0; color: #0e7490; }
.rep-sub { font-size: 12.5px; color: #64748b; margin-top: 2px; }
.rep-sec { margin: 18px 0; }
.rep-sec h3 { color: #0e7490; border-left: 4px solid #22d3ee; padding-left: 10px; margin: 14px 0 8px; font-size: 16px; }
.rep-card { border: 1px solid #e5e7eb; border-radius: 10px; padding: 14px 16px; background: #fff; margin: 10px 0; }
.rep-img { max-width: 280px; border-radius: 8px; border: 1px solid #e5e7eb; }
.rep-note { background: #f8fafc; border: 1px dashed #cbd5e1; border-radius: 8px; padding: 10px 14px; color: #475569; }
.rep-tbl { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 13.5px; }
.rep-tbl th, .rep-tbl td { border: 1px solid #e5e7eb; padding: 8px 10px; vertical-align: top; text-align: left; }
.rep-tbl th { background: #f0fdff; color: #0e7490; font-weight: 600; }
.rep-foot { margin-top: 24px; padding-top: 12px; border-top: 1px solid #e5e7eb; font-size: 12px; color: #94a3b8; text-align: center; }

@media print {
  body { background: #fff !important; }
  .grid-bg { background: #fff !important; }
  .no-print, .nav, .footer, .report-toolbar { display: none !important; }
  .report-page { max-width: 100%; margin: 0; }
  .rep-card, .rep-tbl th, .rep-tbl td { border-color: #cbd5e1 !important; }
  .rep-hd, .rep-sec h3 { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  @page { margin: 14mm; }
}
/* LOGO 展示 */
.logo-img { height: 40px; width: auto; border-radius: 8px; }
.foot-logo { height: 30px; width: auto; vertical-align: middle; margin-bottom: 4px; opacity: .9; }

/* ===== 报告新增板块：健康参考 / 异常告警 / 指标 / 推荐 ===== */
.rep-ref { background:#f0fdff; border:1px solid #bae6fd; border-radius:10px; padding:12px 14px; color:#0c4a6e; font-size:14px; line-height:1.75; }
.rep-ref .rt { font-weight:700; color:#0e7490; margin-right:6px; }
.rep-alerts { display:flex; flex-direction:column; gap:8px; }
.rep-alert { display:flex; gap:10px; align-items:flex-start; border-radius:10px; padding:10px 12px; font-size:14px; line-height:1.6; }
.rep-alert .ic { font-size:16px; line-height:1.4; flex:0 0 auto; }
.rep-alert.warn { background:#fffbeb; border:1px solid #fde68a; color:#92400e; }
.rep-alert.danger { background:#fef2f2; border:1px solid #fecaca; color:#991b1b; }
.rep-alert.ok { background:#f0fdf4; border:1px solid #bbf7d0; color:#166534; }
.rep-metrics { display:flex; flex-wrap:wrap; gap:8px; }
.rep-metric-chip { background:#f8fafc; border:1px solid #e2e8f0; border-radius:999px; padding:5px 12px; font-size:13px; color:#334155; }
.rep-metric-chip b { color:#0e7490; }
.rep-recs { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; }
.rep-rec { border:1px solid #e2e8f0; border-radius:10px; padding:12px 14px; background:#fff; }
.rep-rec .rt { font-weight:700; color:#0e7490; font-size:14.5px; }
.rep-rec .rs { color:#475569; font-size:13px; margin:6px 0; line-height:1.6; }
.rep-rec .rd { color:#64748b; font-size:12.5px; margin:6px 0; line-height:1.65; }
.rep-rec .rtags { margin-top:6px; }
.rep-rec .rtag { display:inline-block; font-size:11px; padding:2px 8px; border-radius:999px; background:#e0f2fe; color:#0369a1; margin:2px 4px 0 0; }
.rep-rec .rprice { color:#b45309; font-weight:700; font-size:13px; margin-top:6px; }
.rep-kbadge { font-size:11px; padding:2px 8px; border-radius:999px; background:#ede9fe; color:#6d28d9; margin-left:6px; }
.rep-empty { color:#64748b; font-size:13.5px; background:#f8fafc; border:1px dashed #cbd5e1; border-radius:8px; padding:10px 14px; }
@media (max-width:560px) { .rep-recs { grid-template-columns:1fr; } }
@media print { .rep-alert, .rep-ref { -webkit-print-color-adjust:exact; print-color-adjust:exact; } }
/* 报告中心 */
.rep-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 6px 0; }
.rep-chip { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid rgba(14,116,144,.2); border-radius: 10px; text-decoration: none; color: #0e7490; background: rgba(14,116,144,.04); transition: .15s; }
.rep-chip:hover { background: rgba(14,116,144,.1); transform: translateY(-1px); }
.rc-ic { font-size: 20px; }
.rep-chip small { color: #64748b; }