/* 登录页共享样式：全屏分栏 = 深色品牌区（左 46%）+ 表单区（右 54%）。
   开放平台 /open/login 与内部视觉平台 /login 共用这一套布局、控件与视觉令牌；
   身份差异由各页自己的 kicker、标题与表单内容承担，避免两份样式各自漂移。
   依赖：tokens.css（令牌）+ 页面级样式（重置/工具类）。 */

.auth-page { min-height: 100vh; }

.auth-shell {
  min-height: 100vh; min-height: 100dvh;
  display: grid; grid-template-columns: minmax(0, 46%) minmax(0, 54%);
  background: var(--panel); overflow: hidden;
}

/* ---------- 品牌区 ---------- */
.auth-visual {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; justify-content: space-between; gap: 48px;
  padding: clamp(32px, 4.2vw, 64px);
  color: #effbf5;
  background:
    radial-gradient(120% 90% at 4% 0%, #78d9ad36 0, transparent 56%),
    radial-gradient(90% 70% at 100% 94%, #2f6fed2e 0, transparent 60%),
    linear-gradient(145deg, #06150d 0%, #0d2c1d 48%, #07130c 100%);
}
.auth-visual::before {
  content: ""; position: absolute; z-index: -1; width: min(44vw, 620px); aspect-ratio: 1;
  right: -17%; top: 16%; border: 1px solid #78d9ad2e; border-radius: 50%;
  box-shadow: 0 0 0 42px #78d9ad0b, 0 0 0 86px #78d9ad08, 0 0 90px #78d9ad1c;
}
.auth-visual::after {
  content: ""; position: absolute; z-index: -1; right: 22%; top: 31%; width: 7px; height: 7px;
  border-radius: 50%; background: #78d9ad; box-shadow: 0 0 0 7px #78d9ad22, 0 0 34px #78d9adcc;
}
.auth-visual-grid {
  position: absolute; z-index: -2; inset: 0; opacity: .5;
  background-image:
    linear-gradient(#ffffff0b 1px, transparent 1px),
    linear-gradient(90deg, #ffffff0b 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, #000 0%, #000 62%, transparent 100%);
}
.auth-visual-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.auth-brand { display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; width: fit-content; }
.auth-brand b { display: block; font-size: 16px; line-height: 1.15; letter-spacing: -.03em; }
.auth-brand b span { color: #78d9ad; }
.auth-brand small { display: block; margin-top: 2px; color: #b4d6c4b8; font: 10px/1.3 var(--mono); letter-spacing: .1em; }
.auth-logo-vertical { display: block; width: auto; height: 56px; }
.auth-logo-color { display: block; width: auto; height: 22px; }
.auth-visual-copy { max-width: 520px; }
.auth-kicker { margin: 0; color: #78d9ad; font: 600 10px/1.5 var(--mono); letter-spacing: .16em; text-transform: uppercase; }
.auth-visual h1 { margin: 16px 0 20px; color: #f4fff9; font-size: clamp(38px, 4.4vw, 60px); line-height: 1.12; letter-spacing: -.055em; font-weight: 650; }
.auth-visual h1 em { color: #78d9ad; font-style: normal; }
.auth-lead { max-width: 460px; margin: 0; color: #b9d9c8d9; font-size: 15px; line-height: 1.85; }
.auth-points { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.auth-points span { padding: 6px 10px; border: 1px solid #ffffff1c; border-radius: 99px; color: #d6eee0; font-size: 12px; }
.auth-visual-foot { display: flex; justify-content: space-between; gap: 16px; color: #8db5a0; font: 11px/1.5 var(--mono); }

/* ---------- 表单区 ---------- */
.auth-pane {
  position: relative; min-width: 0; display: flex; flex-direction: column; justify-content: center;
  padding: 52px clamp(32px, 7vw, 116px); background: #fbfdfc;
}
.auth-form-wrap { width: min(400px, 100%); margin: 0 auto; }
.auth-mobile-brand { display: none; margin-bottom: 42px; color: var(--ink); }
.auth-mobile-brand .auth-brand { color: var(--ink); }
.auth-form-wrap h2 { margin: 10px 0 10px; font-size: clamp(30px, 3vw, 42px); line-height: 1.15; letter-spacing: -.055em; color: var(--ink); }
.auth-sub { margin: 0; color: var(--sub); font-size: 14px; line-height: 1.75; }
.auth-form-wrap form { display: grid; gap: 18px; margin-top: 34px; }
.auth-panels { display: grid; }
.auth-panels > [data-panel] { grid-area: 1 / 1; }
/* 隐藏面板保留占位：切换「账号登录 / API Key 登录」时表单高度不跳动 */
.auth-panels > [data-panel][hidden] { display: block !important; visibility: hidden; }
.auth-panels form { display: grid; gap: 18px; margin-top: 28px; }
/* 表单内有提示行时收紧主按钮上方间距，与开放平台登录一致 */
.auth-panels .auth-submit { margin-top: 6px; }
.auth-pane .tabs { margin-top: 26px; }
.auth-field label { display: block; margin-bottom: 8px; color: var(--sub); font-size: 12px; font-weight: 650; letter-spacing: .03em; }
.auth-field input {
  width: 100%; height: 52px; padding: 0 16px; border: 1px solid #dbe5df; border-radius: 12px;
  background: #fff; color: var(--ink); font-size: 15px;
  transition: border-color .18s var(--ease-out), box-shadow .18s var(--ease-out);
}
.auth-field input::placeholder { color: #9bac9f; }
.auth-field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px #16755517; }
.auth-password { position: relative; }
.auth-password input { padding-right: 64px; }
.auth-peek {
  position: absolute; top: 50%; right: 8px; transform: translateY(-50%);
  border: 0; border-radius: 7px; padding: 7px 8px; background: transparent;
  color: var(--sub); font-size: 12px;
}
.auth-peek:hover { background: var(--wash); color: var(--accent-dark); }
.auth-password .eye {
  position: absolute; top: 50%; right: 8px; transform: translateY(-50%);
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 0; border-radius: 8px; background: transparent; color: var(--sub);
}
.auth-password .eye:hover { background: var(--wash); color: var(--accent-dark); }
.auth-hint { margin: 8px 0 0; color: var(--sub); font-size: 12px; }
.auth-submit {
  width: 100%; height: 52px; margin-top: 26px; border: 0; border-radius: 12px;
  background: #10251a; color: #fff; font-size: 15px; font-weight: 650; letter-spacing: .01em;
  transition: background .18s var(--ease-out), transform .18s var(--ease-out);
}
.auth-submit:hover { background: #173e2a; }
.auth-submit:focus-visible, .auth-peek:focus-visible, .auth-password .eye:focus-visible { outline: 3px solid #78d9ad; outline-offset: 3px; }
.auth-submit:active { transform: translateY(1px); }
.auth-submit:disabled { cursor: not-allowed; opacity: .7; }
.auth-error {
  margin: -4px 0 0; padding: 10px 12px; border-radius: 10px;
  background: #fff1ef; border: 1px solid #f3d6d2; color: #b03830; font-size: 13px;
}
.auth-help { margin: 24px 0 0; color: var(--sub); font-size: 13px; text-align: center; }
.auth-note { margin: 14px 0 0; color: #93a69a; font-size: 11.5px; line-height: 1.7; text-align: center; }
.auth-note a { color: var(--accent); font-weight: 600; text-decoration: none; }
.auth-note a:hover { text-decoration: underline; }
.auth-wechat { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 14px 0 0; font-size: 12px; color: var(--sub); }
.auth-wechat a { color: var(--accent); font-weight: 600; text-decoration: none; }
.auth-wechat a:hover { text-decoration: underline; }
.auth-pane-foot {
  position: absolute; left: clamp(32px, 7vw, 116px); right: clamp(32px, 7vw, 116px); bottom: 26px;
  display: flex; justify-content: space-between; gap: 16px; color: #9bac9f; font-size: 11px;
}
.auth-pane-foot a { color: #7c9183; text-decoration: none; }
.auth-pane-foot a:hover { color: var(--accent); }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .auth-shell { display: block; min-height: 100dvh; overflow: visible; }
  .auth-visual { display: none; }
  .auth-pane { min-height: 100dvh; padding: 32px 22px 76px; justify-content: center; }
  .auth-mobile-brand { display: block; }
  .auth-form-wrap { width: min(400px, 100%); }
  .auth-pane-foot { left: 22px; right: 22px; bottom: 20px; }
}
@media (max-width: 560px) {
  .auth-shell { min-height: 100dvh; }
  .auth-pane { padding: 26px 18px 72px; }
  .auth-form-wrap h2 { font-size: 34px; }
  .auth-panels form { margin-top: 24px; gap: 16px; }
  .auth-mobile-brand { margin-bottom: 34px; }
  .auth-pane-foot { left: 18px; right: 18px; bottom: 16px; }
  .auth-pane-foot span { display: none; }
  .auth-pane .tabs { gap: 20px; }
}
@media (max-height: 760px) and (min-width: 901px) {
  .auth-visual { gap: 28px; padding: 32px 44px; }
  .auth-visual h1 { font-size: 46px; margin: 12px 0 14px; }
  .auth-pane { padding-top: 32px; padding-bottom: 66px; }
  .auth-panels form { margin-top: 22px; gap: 14px; }
  .auth-pane-foot { bottom: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-field input, .auth-submit { transition: none; }
}

/* 第三方登录：分隔线 + 白底按钮 + 品牌图标，比一行文字更像一个入口 */
.auth-third { margin-top: 22px; }
.auth-third-divider { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; color: #93a69a; font-size: 11.5px; }
.auth-third-divider::before, .auth-third-divider::after { content: ''; flex: 1; height: 1px; background: rgba(24, 56, 43, .12); }
.auth-third-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; border: 1px solid rgba(24, 56, 43, .18); border-radius: 10px;
  background: #fff; color: #18382b; font-size: 14px; font-weight: 600; text-decoration: none;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.auth-third-btn:hover { border-color: #07c160; background: #f3fbf6; box-shadow: 0 2px 10px rgba(7, 193, 96, .12); }
.auth-third-btn:focus-visible { outline: 2px solid #07c160; outline-offset: 2px; }
.auth-third-icon { width: 22px; height: 22px; flex: none; }
.auth-third-hint { margin: 10px 0 0; color: #93a69a; font-size: 11.5px; text-align: center; }
