/* 扶苏健康 · 账号门户 —— 临床克制风：青蓝主色、大留白、无花哨。 */
:root {
  --brand: #0f766e;
  --brand-d: #0b5750;
  --ink: #1b2733;
  --ink-2: #51606e;
  --muted: #8a97a4;
  --line: #e6ebf0;
  --bg: #f4f7f9;
  --card: #ffffff;
  --ok: #0f766e;
  --warn: #b7791f;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16,32,48,.04), 0 8px 24px rgba(16,32,48,.06);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}
a { color: var(--brand); text-decoration: none; }
.hidden { display: none !important; }

.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; background: rgba(255,255,255,.92);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; letter-spacing: .3px; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.brand small { color: var(--muted); font-weight: 500; }
.top-user { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); }
.top-user .avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff;
  display: grid; place-items: center; font-weight: 600; font-size: 13px; overflow: hidden; }
.top-user .avatar img { width: 100%; height: 100%; object-fit: cover; }

.wrap { max-width: 480px; margin: 0 auto; padding: 24px 18px 64px; }

/* ---------- 通用块 ---------- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px; margin-bottom: 16px;
}
.card h2 { margin: 0 0 4px; font-size: 18px; }
.card h3 { margin: 0 0 10px; font-size: 15px; }
.muted { color: var(--muted); font-size: 13px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: none; }
.row .k { color: var(--ink-2); font-size: 14px; }
.row .v { color: var(--ink); font-size: 14px; font-weight: 500; text-align: right; }

/* ---------- 表单 ---------- */
label.field { display: block; margin: 12px 0 6px; font-size: 13px; color: var(--ink-2); }
input, select {
  width: 100%; padding: 12px 14px; font-size: 15px; color: var(--ink);
  background: #fbfdfe; border: 1px solid var(--line); border-radius: 10px; outline: none;
}
input:focus, select:focus { border-color: var(--brand); background: #fff; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important; overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.profile-avatar-editor { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 16px;
  align-items: center; padding: 16px 0 6px; }
.profile-avatar-preview { width: 88px; height: 88px; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; background: #e8f3f1; color: var(--brand);
  border: 1px solid #d8e9e5; font-size: 30px; font-weight: 700; }
.profile-avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar-controls { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.profile-avatar-controls small { flex-basis: 100%; color: var(--muted); font-size: 11.5px; line-height: 1.55; }
.avatar-select { display: inline-flex; align-items: center; min-height: 38px; padding: 8px 13px;
  border-radius: 9px; background: var(--brand); color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; }
.profile-avatar-controls button.link { min-height: 38px; padding: 8px 2px; }
.code-row { display: grid; grid-template-columns: minmax(0, 1fr) 118px; gap: 10px; width: 100%; min-width: 0; }
.code-row input { width: 100%; min-width: 0; }
.code-row button { width: 100%; min-width: 0; white-space: nowrap; padding-left: 10px; padding-right: 10px; }
.auth-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  padding: 4px; margin: 14px 0 6px; border-radius: 12px;
  background: #f0f6f5; border: 1px solid #dcebe8;
}
.auth-tabs button {
  margin: 0; padding: 9px 8px; border-radius: 9px; background: transparent;
  color: var(--ink-2); border: 0; font-size: 13px;
}
.auth-tabs button.active { background: #fff; color: var(--brand); box-shadow: 0 2px 8px rgba(16,32,48,.06); }

button {
  appearance: none; cursor: pointer; font-size: 15px; font-weight: 600;
  padding: 12px 16px; border-radius: 10px; border: 1px solid transparent;
  background: var(--brand); color: #fff; transition: background .15s, opacity .15s;
}
button:hover { background: var(--brand-d); }
button:disabled { opacity: .5; cursor: not-allowed; }
button.block { width: 100%; margin-top: 14px; }
button.ghost { background: transparent; color: var(--brand); border-color: var(--line); }
button.ghost:hover { background: #f0f6f5; }
button.link { background: none; border: none; color: var(--brand); padding: 0; font-weight: 500; }

/* ---------- 着陆页 ---------- */
.hero { text-align: center; padding: 28px 8px 8px; }
.hero h1 { font-size: 24px; margin: 14px 0 8px; }
.hero p { color: var(--ink-2); margin: 0 auto; max-width: 360px; }
.hero .logo { width: 60px; height: 60px; border-radius: 16px; box-shadow: var(--shadow); }
.product-card { display: flex; gap: 14px; align-items: flex-start; }
.product-card .ic { width: 44px; height: 44px; border-radius: 12px; background: #e8f3f1;
  display: grid; place-items: center; font-size: 20px; flex: none; }
.product-card .body b { display: block; }
.product-card .body span { color: var(--ink-2); font-size: 13px; }
.platform-section { margin: 4px 0 16px; }
.platform-section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 0 2px 10px; }
.platform-section-head span { display: block; color: var(--muted); font-size: 11px; font-weight: 700; }
.platform-section-head h2 { margin: 1px 0 0; font-size: 18px; }
.platform-section-head > a { flex: none; font-size: 12px; font-weight: 600; }
.platform-entry-grid { display: grid; gap: 10px; }
.landing-platforms { margin: 16px 0 10px; }
.platform-entry {
  min-width: 0; min-height: 78px; display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 18px; align-items: center; gap: 12px;
  padding: 14px; color: var(--ink); background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: var(--shadow); transition: border-color .15s, background .15s;
}
.platform-entry:hover { border-color: #b9d8d2; background: #fbfefd; }
.platform-entry:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.platform-entry-icon { width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 9px; background: #e8f3f1; color: var(--brand); font-size: 22px; }
.platform-entry.community .platform-entry-icon { background: #edf4fb; color: #0c447c; }
.platform-entry-copy { min-width: 0; }
.platform-entry-copy b { display: block; font-size: 15px; }
.platform-entry-copy small { display: block; margin-top: 2px; color: var(--ink-2); font-size: 12px; line-height: 1.5; }
.platform-entry-arrow { color: var(--muted); font-size: 17px; }
.platform-secondary-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 10px 2px 2px; }
.platform-secondary-links a { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-2); font-size: 12.5px; font-weight: 600; }
.platform-secondary-links a:hover { color: var(--brand); }
.landing-platforms + .platform-secondary-links { margin-bottom: 16px; }

/* ---------- 徽章 ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600;
  padding: 3px 9px; border-radius: 999px; }
.badge.basic { background: #eef1f4; color: #6b7886; }
.badge.attested_pro { background: #eaf3ff; color: #1d6fd0; }
.badge.verified_doctor { background: #e6f6f1; color: var(--brand); }
.badge.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-size: 12px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.note { background: #f0f6f5; border: 1px solid #dcebe8; color: #3a5a55;
  padding: 10px 12px; border-radius: 10px; font-size: 12.5px; margin-top: 12px; }
.terms { color: var(--muted); font-size: 12px; margin-top: 12px; text-align: center; }
.register-steps {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
  margin: 14px 0 4px; padding: 8px; border-radius: 12px;
  background: #f0f6f5; border: 1px solid #dcebe8;
}
.register-steps span {
  text-align: center; color: #3a5a55; font-size: 12px; font-weight: 600;
}
.consent {
  display: flex; align-items: flex-start; gap: 8px; margin-top: 12px;
  color: var(--ink-2); font-size: 12.5px; line-height: 1.5;
}
.consent input { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.onboarding-banner {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px;
  padding: 5px 9px; border-radius: 999px; background: #e6f6f1;
  color: var(--brand); font-size: 12px; font-weight: 700;
}

.footer { text-align: center; color: var(--muted); font-size: 12px; padding: 24px 0; }
.footer a { color: var(--muted); margin: 0 8px; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  background: #1b2733; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px;
  box-shadow: var(--shadow); opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }

/* ---------- 引导弹层 ---------- */
.modal { position: fixed; inset: 0; background: rgba(16,32,48,.45); display: grid; place-items: center;
  padding: 20px; z-index: 50; }
.modal .box { background: #fff; border-radius: 16px; padding: 22px; width: 100%; max-width: 420px; box-shadow: var(--shadow); }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.choices button { background: #fbfdfe; color: var(--ink); border: 1px solid var(--line); font-weight: 500; }
.choices button.sel { border-color: var(--brand); background: #eef6f4; color: var(--brand); }

@media (max-width: 360px) {
  .profile-avatar-editor { grid-template-columns: 72px minmax(0, 1fr); gap: 12px; }
  .profile-avatar-preview { width: 72px; height: 72px; }
}
