* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #f5f6f8; --card: #fff; --ink: #1c2330; --sub: #6b7484;
  --line: #e6e9ef; --teal: #0f766e; --blue: #0a7af5; --green: #22a06b;
}
body {
  font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--ink); min-height: 100vh; line-height: 1.5;
}
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center;
  justify-content: space-between; padding: 14px 16px; background: var(--card);
  border-bottom: 1px solid var(--line);
}
.topbar .title { font-size: 17px; font-weight: 700; }
.topbar .back { color: var(--blue); text-decoration: none; font-size: 14px; }

#drawerBody label { display: block; font-size: 13px; color: var(--sub); margin-bottom: 12px; }
#drawerBody input {
  width: 100%; margin-top: 5px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 10px; font-size: 15px;
}
.auth-msg { color: #d94b3b; font-size: 13px; min-height: 18px; margin-bottom: 6px; }
.btn { display: block; width: 100%; text-align: center; padding: 11px; border-radius: 10px;
  font-size: 15px; font-weight: 600; text-decoration: none; border: 0; cursor: pointer; }
.btn.primary { background: var(--teal); color: #fff; }
.auth-switch { margin-top: 12px; text-align: center; font-size: 13px; color: var(--sub); }
.auth-switch a { color: var(--blue); text-decoration: none; }

.wrap { max-width: 560px; margin: 0 auto; padding: 20px 16px 40px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px; margin-bottom: 14px; box-shadow: 0 1px 3px rgba(16,24,40,.05); }

/* 右上角圆形头像 */
.avatar-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; overflow: hidden; cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; }
.avatar-fallback {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: #eef1f5; color: var(--sub); font-size: 16px; font-weight: 600;
}

/* 右侧抽屉 */
.drawer-mask {
  position: fixed; inset: 0; background: rgba(15,20,28,.4); z-index: 40;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.drawer-mask.show { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: 300px; max-width: 82vw;
  background: #fff; z-index: 41; transform: translateX(100%); transition: transform .28s ease;
  display: flex; flex-direction: column; box-shadow: -6px 0 24px rgba(16,24,40,.15);
}
.drawer.open { transform: translateX(0); }
.drawer-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 18px; border-bottom: 1px solid var(--line);
}
.drawer-head span { font-size: 16px; font-weight: 700; }
.drawer-close { border: 0; background: none; font-size: 22px; cursor: pointer; color: var(--sub); }
#drawerBody { padding: 18px; flex: 1; overflow-y: auto; }
.drawer-profile { display: flex; flex-direction: column; align-items: center; text-align: center; }
.drawer-avatar {
  width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: #eef1f5;
  display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; color: var(--sub);
}
.drawer-name { font-size: 17px; font-weight: 700; margin-top: 12px; }
.drawer-code { color: var(--sub); font-size: 13px; margin-top: 4px; }
.drawer-email { color: #98a1b0; font-size: 12px; margin-top: 4px; }
