/* login.css 专属样式（设计变量见 tokens.css） */
  body {
    margin: 0; min-height: 100vh; display: grid; place-items: center;
    overflow-y: auto;
    background:
      radial-gradient(900px 520px at 88% -8%, rgba(58,141,255,.16), transparent 60%),
      radial-gradient(760px 460px at 4% 108%, rgba(86,200,245,.14), transparent 60%),
      var(--bg);
    color: var(--text);
    font: 14px/1.6 "Inter", "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  }
  .box {
    width: min(400px, calc(100vw - 32px)); padding: 28px 26px;
    background: var(--panel); border: 1px solid var(--line); border-radius: 18px;
    box-shadow: 0 24px 60px rgba(31,80,145,.14);
  }
  .brand { display: flex; align-items: center; gap: 11px; margin-bottom: 6px; }
  .logo {
    width: 34px; height: 34px; border-radius: 11px; flex: none;
    background: linear-gradient(135deg, #6fc4ff, #3a8dff);
    display: grid; place-items: center; overflow: hidden;
    box-shadow: 0 6px 16px rgba(58,141,255,.34);
  }
  .logo svg { width: 18px; height: 18px; }
  .logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
  h1 { margin: 0; font-size: 17px; font-weight: 650; }
  .sub { margin: 2px 0 20px; font-size: 12px; color: var(--muted); }
  .tabs { display: flex; gap: 6px; margin-bottom: 16px; }
  .tab {
    flex: 1; padding: 8px; text-align: center; border-radius: 10px; cursor: pointer;
    border: 1px solid transparent; color: var(--muted); user-select: none; font-size: 13px;
  }
  .tab.active { background: #eef6ff; border-color: var(--line2); color: #2168cc; }
  label { display: block; font-size: 12px; color: var(--muted); margin: 12px 0 6px; }
  input {
    width: 100%; padding: 10px 12px; border-radius: 10px; font: inherit;
    border: 1px solid var(--line2); background: #fff; color: var(--text); outline: none;
  }
  input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(58,141,255,.16); }
  button {
    width: 100%; margin-top: 18px; padding: 10px 14px; border-radius: 11px; cursor: pointer;
    border: 1px solid #3a8dff; color: #fff; font: inherit;
    background: linear-gradient(180deg, #4b9bff, #2f7ded);
    box-shadow: 0 8px 18px rgba(58,141,255,.26);
  }
  button:disabled { opacity: .55; cursor: not-allowed; }
  .msg { min-height: 20px; margin-top: 12px; font-size: 12px; color: var(--red); }
  .msg.ok { color: var(--green); }
  .hint { margin-top: 16px; font-size: 11px; color: var(--dim); line-height: 1.7; }
  details.risk { margin-top: 12px; font-size: 11px; color: var(--dim); line-height: 1.7; }
  details.risk summary { cursor: pointer; font-size: 12px; color: var(--muted); }
  details.risk p { margin: 8px 0 0; }
  label.agree { display: flex; align-items: flex-start; gap: 6px; margin-top: 10px;
    line-height: 1.6; color: var(--muted); }
  label.agree input { margin: 2px 0 0; }
  .theme-row { display: flex; justify-content: flex-end; margin: -10px 0 10px; }
  .theme-toggle {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12px; color: var(--muted); cursor: pointer; user-select: none;
  }
  .theme-toggle input {
    width: auto; margin: 0; padding: 0; border: 0; background: none;
    accent-color: var(--accent);
  }
  html[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0c141f; --panel: #141f2d; --line: #24364a; --line2: #2d4258;
    --text: #e4edf7; --muted: #9fb2c8; --dim: #6f8399;
    --accent: #5aa8ff; --green: #3fc98a; --red: #ef6b7c;
  }
  html[data-theme="dark"] body {
    background:
      radial-gradient(900px 520px at 88% -8%, rgba(58,141,255,.20), transparent 60%),
      radial-gradient(760px 460px at 4% 108%, rgba(86,200,245,.12), transparent 60%),
      var(--bg);
  }
  html[data-theme="dark"] .box { box-shadow: 0 24px 60px rgba(0,0,0,.55); }
  html[data-theme="dark"] .tab.active { background: #1e2c3c; color: var(--accent); }
  html[data-theme="dark"] input { background: #101a26; }

  /* 手机/平板：输入框 16px 避免 iOS 自动放大，按钮加高更好点按 */
  label.remember {
    display: flex; align-items: center; gap: 8px;
    margin: 12px 0 0; color: var(--muted); font-size: 12px;
  }
  label.remember input { width: auto; margin: 0; accent-color: var(--accent); }
  @media (max-width: 600px) {
    body { padding: max(16px, env(safe-area-inset-top)) 12px
                   max(24px, env(safe-area-inset-bottom)); }
    .box { width: 100%; padding: 22px 18px; border-radius: 16px; }
    input { font-size: 16px; padding: 12px 12px; min-height: 46px; }
    button { min-height: 48px; font-size: 15px; }
    .tab { padding: 10px; }
  }
  /* 横屏/小高度：从顶部排，保证表单能滚到底部 */
  @media (max-height: 700px) {
    body { place-items: start center; padding-top: 14px; padding-bottom: 24px; }
  }
