/* 生化演示版 H5 设计系统 —— 现代科技医疗风
   深海军蓝渐变主视觉 + 医疗青点缀 + 白卡片 + 柔和投影 */

:root {
  --primary: #1668dc;
  --primary-600: #0f56bd;
  --navy: #0a2a5e;
  --teal: #00b8a9;
  --bg: #f3f7fc;
  --card: #ffffff;
  --line: #e4eaf3;
  --text: #1c2b3a;
  --muted: #7a8aa0;
  --danger: #e5484d;
  --warn: #f5a524;
  --info: #3b82f6;
  --ok: #22a06b;
  --radius: 16px;
  --shadow: 0 8px 28px rgba(13, 58, 124, 0.09);
  --grad: linear-gradient(135deg, #0a2a5e 0%, #1257c4 62%, #0aa8a0 135%);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, "PingFang SC", "MiSans", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--text); background: var(--bg);
  font-size: 15px; line-height: 1.55;
}
body { padding-bottom: env(safe-area-inset-bottom); }

.app { max-width: 540px; margin: 0 auto; min-height: 100vh; padding-bottom: 32px; }
.app.wide { max-width: 960px; }

/* ---------- 顶部主视觉 ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--grad); color: #fff;
  padding: 26px 22px 30px;
  border-radius: 0 0 26px 26px;
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background:
    radial-gradient(420px 200px at 88% -10%, rgba(0, 184, 169, .45), transparent 60%),
    radial-gradient(300px 180px at -8% 110%, rgba(255, 255, 255, .16), transparent 60%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 44px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 44px);
}
.hero .row { display: flex; align-items: center; gap: 12px; position: relative; }
.hero h1 { font-size: 20px; font-weight: 700; letter-spacing: 1px; margin: 0; }
.hero .sub { font-size: 12.5px; opacity: .82; margin-top: 2px; position: relative; }
.hero .chip {
  position: relative; margin-left: auto; font-size: 12px;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .28);
  padding: 4px 10px; border-radius: 999px; backdrop-filter: blur(4px);
}
.hero .back {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .28);
  color: #fff; text-decoration: none; font-size: 16px; cursor: pointer;
}

.logo-mark {
  width: 46px; height: 46px; flex: none; border-radius: 13px;
  background: linear-gradient(150deg, #ffffff, #eef3fb);
  border: 1px solid rgba(255, 255, 255, .55);
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5);
}
.logo-mark img { width: 36px; height: 36px; object-fit: contain; }

/* ---------- 卡片与表单 ---------- */
.wrap { padding: 18px 16px 0; }
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px 18px; margin-bottom: 16px;
  border: 1px solid rgba(228, 234, 243, .7);
}
.card-title { font-size: 16.5px; font-weight: 700; margin: 0 0 4px; }
.card-sub { font-size: 12.5px; color: var(--muted); margin: 0 0 14px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.input {
  width: 100%; padding: 11px 13px; font-size: 15px; color: var(--text);
  background: #f8fafd; border: 1px solid var(--line); border-radius: 11px; outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.input:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(22, 104, 220, .12); }
.input::placeholder { color: #a8b4c6; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
select.input { appearance: none; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; cursor: pointer; user-select: none;
  font-size: 15px; font-weight: 600; font-family: inherit;
  padding: 12px 18px; border-radius: 12px; transition: transform .12s, filter .15s, box-shadow .15s;
}
.btn:active { transform: scale(.97); }
.btn.primary { color: #fff; background: linear-gradient(135deg, #1257c4, #0f7fd0 70%, #00b8a9 160%); box-shadow: 0 6px 18px rgba(18, 87, 196, .32); }
.btn.primary:disabled { filter: grayscale(.5) opacity(.6); cursor: not-allowed; }
.btn.ghost { color: var(--primary); background: #eef4fd; }
.btn.plain { color: var(--muted); background: #f1f4f9; }
.btn.block { width: 100%; }
.btn.sm { padding: 8px 14px; font-size: 13.5px; border-radius: 10px; }

/* ---------- 表格操作按钮（胶囊描边，与 tag/chip/mini-btn 同语言） ---------- */
.link-btn {
  display: inline-block; border: 1px solid var(--line); cursor: pointer; user-select: none;
  font-family: inherit; font-size: 12.5px; font-weight: 600; line-height: 1.5;
  color: var(--primary); background: #f6f9fe;
  padding: 3px 13px; border-radius: 999px; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .12s;
}
.link-btn:hover { background: #eaf2fd; border-color: #c9dcf5; }
.link-btn:active { transform: scale(.95); }
.link-btn + .link-btn { margin-left: 6px; }
.link-btn.danger { color: var(--danger); background: #fdf4f4; border-color: #f3d4d5; }
.link-btn.danger:hover { background: #fbe9e9; border-color: #eec3c4; }
.link-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------- 列表 ---------- */
.list-item {
  display: flex; align-items: center; gap: 12px; text-align: left;
  background: var(--card); border: 1px solid rgba(228, 234, 243, .7);
  border-radius: 14px; padding: 14px; margin-bottom: 10px;
  box-shadow: 0 3px 14px rgba(13, 58, 124, .06);
  cursor: pointer; transition: transform .12s, box-shadow .15s;
  width: 100%; font-family: inherit; font-size: inherit; color: inherit;
}
.list-item:active { transform: scale(.985); }
.icon-dot {
  width: 40px; height: 40px; flex: none; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; color: #fff;
  background: linear-gradient(135deg, #1257c4, #0aa8a0 150%);
}
.list-item .li-main { flex: 1; min-width: 0; }
.list-item .li-title { font-weight: 700; font-size: 15px; }
.list-item .li-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.list-item .chevron { color: #b6c2d4; flex: none; }

/* ---------- 徽标 ---------- */
.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; color: #fff; white-space: nowrap; }
.tag.danger { background: var(--danger); } .tag.warn { background: var(--warn); }
.tag.info { background: var(--info); } .tag.ok { background: var(--ok); }
.tag.muted { background: var(--muted); }
.tag.soft { background: #eef4fd; color: var(--primary); }

/* ---------- 元信息网格 ---------- */
.meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.meta-grid .k { font-size: 12px; color: var(--muted); }
.meta-grid .v { font-size: 14px; font-weight: 600; margin-top: 1px; word-break: break-all; }

/* ---------- 检测进度步骤 ---------- */
.steps { display: flex; align-items: flex-start; margin: 14px 0 4px; }
.step { flex: 1; text-align: center; position: relative; }
.step .dot {
  width: 22px; height: 22px; border-radius: 50%; margin: 0 auto 6px;
  background: #e6edf7; border: 2px solid #dbe4f0; color: #9fb0c8;
  font-size: 12px; display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 1; transition: all .25s;
}
.step:not(:last-child)::after {
  content: ""; position: absolute; top: 11px; left: 50%; width: 100%; height: 2px;
  background: #e2eaf5; z-index: 0;
}
.step.done .dot, .step.active .dot { background: var(--primary); border-color: var(--primary); color: #fff; }
.step.active .dot { box-shadow: 0 0 0 4px rgba(22, 104, 220, .16); animation: pulse 1.4s infinite; }
.step.done:not(:last-child)::after, .step.active:not(:last-child)::after { background: var(--primary); }
.step .lbl { font-size: 11.5px; color: var(--muted); }
.step.active .lbl { color: var(--primary); font-weight: 700; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 3px rgba(22, 104, 220, .14); } 50% { box-shadow: 0 0 0 7px rgba(22, 104, 220, .05); } }

/* ---------- 初始密码提示 ---------- */
.pwd-note {
  display: flex; gap: 12px; align-items: center;
  background: linear-gradient(135deg, #fff8ec, #fffdfd);
  border: 1px solid #f6dfae; border-radius: 14px; padding: 12px 14px; margin-bottom: 14px;
}
.pwd-note .code { font-size: 24px; font-weight: 800; letter-spacing: 5px; color: #b7791f; font-family: "Consolas", monospace; }

/* ---------- 空态 / 提示 ---------- */
.empty { text-align: center; color: var(--muted); padding: 42px 0 30px; }
.empty .big { font-size: 34px; margin-bottom: 8px; }
.hint { font-size: 12.5px; color: var(--muted); margin: 10px 0 0; }
.banner {
  font-size: 13px; border-radius: 12px; padding: 10px 13px; margin-bottom: 14px;
  background: #fdf3f3; color: #b3383c; border: 1px solid #f3c9ca;
}
.banner.ok { background: #effaf4; color: #197a4c; border-color: #c4e8d4; }
.banner.info { background: #eff5fd; color: #1d5cb0; border-color: #c9dcf5; }

/* ---------- 底部导航 / 页脚 ---------- */
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 540px;
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line); display: flex; z-index: 5; }
.tabbar button { flex: 1; background: none; border: none; padding: 10px 0 12px; color: var(--muted); font-size: 12px; cursor: pointer; font-family: inherit; }
.tabbar button.active { color: var(--primary); font-weight: 700; }
.tabbar button .t-ico { display: block; font-size: 18px; margin-bottom: 1px; }
.foot { text-align: center; color: #a8b4c6; font-size: 11.5px; padding: 22px 0 8px; }

/* ---------- 弹层（报告查看 / 对话框） ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 150; display: flex; flex-direction: column;
  background: rgba(9, 24, 48, .55); backdrop-filter: blur(3px);
}
.overlay .ov-head {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  background: var(--grad); color: #fff;
}
.overlay .ov-head .t { font-weight: 700; font-size: 15px; flex: 1; }
.overlay .ov-body { flex: 1; margin: 12px; border-radius: 14px; overflow: hidden; background: #fff; }
.overlay iframe { width: 100%; height: 100%; border: none; display: block; }
.x-btn { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3); color: #fff;
  width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: 14px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%) translateY(-8px);
  z-index: 300; max-width: 82vw; padding: 10px 16px; border-radius: 12px;
  background: rgba(17, 32, 58, .92); color: #fff; font-size: 13.5px;
  opacity: 0; pointer-events: none; transition: all .22s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.warn { background: rgba(180, 110, 10, .95); }
.toast.err { background: rgba(180, 40, 44, .95); }
.toast.ok { background: rgba(18, 128, 84, .95); }

/* ---------- 筛选 chips（检测人过滤等） ---------- */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.chip-btn {
  border: 1px solid var(--line); background: #f8fafd; color: var(--muted);
  border-radius: 999px; padding: 5px 14px; font-size: 13px; cursor: pointer; font-family: inherit;
}
.chip-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }

/* ---------- 动效 / 工具 ---------- */
.fade { animation: fadeUp .3s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.hidden { display: none !important; }
.spin { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff;
  border-radius: 50%; animation: rot .8s linear infinite; display: inline-block; }
@keyframes rot { to { transform: rotate(360deg); } }
.muted { color: var(--muted); }
.right { margin-left: auto; }
.mt { margin-top: 14px; }
