/* ═══════════════════════════════════════════════════════════
   Auth Pages Shared CSS — Register / Forgot Password / Login
   Apple HIG: clarity, deference, depth. Utility surface = restrained.
   Light-first, one accent, type+space carries hierarchy.
   ═══════════════════════════════════════════════════════════ */

/* ── 0. CSS Variables — 深色认证页面（与工作台浅色刻意区分，营造聚焦感） ── */
:root {
  --auth-accent: #0071e3;
  --auth-accent-hover: #0077ed;
  --auth-text: #f5f5f7;
  --auth-text-secondary: #86868b;
  --auth-text-tertiary: #6e6e73;
  --auth-bg-surface: rgba(255,255,255,0.05);
  --auth-bg-surface-hover: rgba(255,255,255,0.08);
  --auth-bg-input: rgba(255,255,255,0.05);
  --auth-border: rgba(255,255,255,0.1);
  --auth-border-focus: var(--auth-accent);
  --auth-error: #ff3b30;
  --auth-error-text: #ff453a;
  --auth-success: #34c759;
  --auth-warning: #ff9f0a;
  --auth-divider: rgba(255,255,255,0.1);
}

/* ── 1. Layout ── */
.auth-page {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #1d1d1f 0%, #000000 100%);
  overflow-y: auto;
  padding: 40px 20px;
}

.auth-card {
  width: 400px;
  max-width: 100%;
  text-align: center;
}

/* ── 2. Branding ── */
.auth-card .logo {
  display: inline-block;
  width: 80px;
  height: 80px;
  border-radius: 20px;
  margin-bottom: 20px;
  object-fit: cover;
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.auth-card h1 {
  color: var(--auth-text);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.auth-card .subtitle {
  color: var(--auth-text-secondary);
  font-size: 14px;
  font-weight: 400;
  margin-bottom: 28px;
}

/* ── 3. Step Indicator (D47: 带文字标注) ── */
.step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 24px;
}

/* 旧版圆点（兼容） */
.step-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  transition: all 0.3s cubic-bezier(0.25,0.1,0.25,1);
}

.step-dot.active {
  width: 20px;
  border-radius: 3px;
  background: var(--auth-accent);
}

.step-dot.done {
  background: var(--auth-success);
}

/* D47: 文字版步骤指示器 */
.step-items {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 24px;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--auth-text-tertiary);
  transition: color 0.3s;
}

.step-item-circle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  background: var(--auth-divider);
  color: var(--auth-text-tertiary);
  transition: all 0.3s cubic-bezier(0.25,0.1,0.25,1);
  flex-shrink: 0;
}

.step-item.active {
  color: var(--auth-text);
}

.step-item.active .step-item-circle {
  background: var(--auth-accent);
  color: #ffffff;
}

.step-item.done {
  color: var(--auth-text-secondary);
}

.step-item.done .step-item-circle {
  background: var(--auth-success);
  color: #ffffff;
}

.step-item.done .step-item-circle::after {
  content: '✓';
  font-size: 12px;
}

.step-item.done .step-item-circle {
  font-size: 0;  /* 隐藏数字 */
}

.step-line {
  width: 32px;
  height: 1px;
  background: var(--auth-divider);
  margin: 0 8px;
  transition: background 0.3s;
}

.step-line.done {
  background: var(--auth-success);
}

/* ── 4. Form Fields ── */
.field-group {
  margin-bottom: 14px;
  text-align: left;
}

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--auth-text-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}

.field-input-wrap {
  position: relative;
}

.field-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--auth-border);
  background: var(--auth-bg-surface);
  color: var(--auth-text);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.field-input::placeholder {
  color: var(--auth-text-tertiary);
}

.field-input:focus {
  border-color: var(--auth-accent);
  box-shadow: 0 0 0 4px rgba(0,113,227,0.12);
  background: var(--auth-bg-surface-hover);
}

.field-input:focus-visible {
  outline: 2px solid var(--auth-accent);
  outline-offset: 2px;
}

/* Error state */
.field-input[aria-invalid="true"] {
  border-color: var(--auth-error);
  box-shadow: 0 0 0 4px rgba(255,59,48,0.1);
}

.field-input[aria-invalid="true"]:focus {
  border-color: var(--auth-error);
  box-shadow: 0 0 0 4px rgba(255,59,48,0.15);
}

.field-input[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── 5. Field Hints & Errors ── */
.field-hint {
  font-size: 12px;
  color: var(--auth-text-tertiary);
  margin: 4px 0 0;
  line-height: 1.4;
}

/* P2-9: 删除 .field-error[role="alert"] 冗余规则
   显隐由 JS style.display 控制，CSS 不需要 role 选择器 */
.field-error {
  font-size: 12px;
  color: var(--auth-error-text);
  margin: 4px 0 0;
  display: none;
  line-height: 1.4;
}

/* ── 6. Password Visibility Toggle ── */
.pwd-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--auth-text-tertiary);
  cursor: pointer;
  font-size: 18px;
  padding: 8px;
  line-height: 1;
  border-radius: 6px;
  transition: color 0.15s;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pwd-toggle:hover {
  color: var(--auth-text);
}

.pwd-toggle svg {
  width: 18px;
  height: 18px;
  opacity: 0.6;
}

.pwd-toggle:hover svg {
  opacity: 1;
}

/* ── 7. Password Strength Meter ── */
/* P-UX: 默认隐藏，聚焦密码字段时展开，失焦后如果有错误或密码太弱保持展开 */
.pwd-strength {
  margin: 6px 0 0;
  display: none;
}

.pwd-strength.visible {
  display: block;
}

/* 聚焦密码字段时展开强度+要求 — 通过 .field-input:focus ~ .pwd-strength */
.field-input:focus ~ .pwd-strength,
.field-input:focus ~ .pwd-reqs {
  display: block !important;
}

/* pwd-strength-focus: 密码字段聚焦时自动展开（JS oninput 也控制 visible 类） */
.pwd-strength-focus {
  display: none;
}

.field-group:focus-within .pwd-strength-focus {
  display: block;
}

.pwd-reqs-focus {
  display: none;
}

.field-group:focus-within .pwd-reqs-focus {
  display: block;
}

.pwd-strength-bar {
  height: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,0.1);
  overflow: hidden;
  transition: background 0.3s;
}

.pwd-strength-fill {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  transition: width 0.3s cubic-bezier(0.25,0.1,0.25,1), background 0.3s;
}

.pwd-strength-fill.weak    { width: 33%; background: var(--auth-error); }
.pwd-strength-fill.medium  { width: 66%; background: var(--auth-warning); }
.pwd-strength-fill.strong  { width: 100%; background: var(--auth-success); }

.pwd-strength-label {
  font-size: 11px;
  color: var(--auth-text-tertiary);
  margin-top: 4px;
}

.pwd-strength-label.weak    { color: var(--auth-error-text); }
.pwd-strength-label.medium  { color: var(--auth-warning); }
.pwd-strength-label.strong  { color: var(--auth-success); }

/* Password requirements checklist */
.pwd-reqs {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  display: none;
}

.pwd-reqs.visible {
  display: block;
}

.pwd-reqs li {
  font-size: 11px;
  color: var(--auth-text-tertiary);
  padding: 2px 0;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}

.pwd-reqs li::before {
  content: '';
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e6e73' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3C/svg%3E") no-repeat center / contain;
  transition: background 0.2s;
}

.pwd-reqs li.met {
  color: var(--auth-success);
}

.pwd-reqs li.met::before {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2334c759' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 11.08V12a10 10 0 1 1-5.93-9.14'/%3E%3Cpolyline points='22 4 12 14.01 9 11.01'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* ── 8. Verification Code Row ── */
.code-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.code-row .field-input {
  flex: 1;
  text-align: center;
  letter-spacing: 4px;
  font-size: 17px;
}

.code-row .send-code-btn {
  flex-shrink: 0;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--auth-border);
  background: rgba(255,255,255,0.06);
  color: var(--auth-text);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  min-height: 44px;
}

.code-row .send-code-btn:hover:not(:disabled) {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.15);
}

.code-row .send-code-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── 9. Primary Button (Apple pill) ── */
.auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  border-radius: 980px;
  border: none;
  background: var(--auth-accent);
  color: #ffffff;
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25,0.1,0.25,1);
  margin-bottom: 16px;
  min-height: 44px;
}

.auth-btn:hover:not(:disabled) {
  background: var(--auth-accent-hover);
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(0,113,227,0.3);
}

.auth-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.auth-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.auth-btn .spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── 10. Secondary / Text Button ── */
.auth-btn-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px;
  border-radius: 980px;
  border: none;
  background: transparent;
  color: var(--auth-text-secondary);
  font-size: 14px;
  font-weight: 400;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.15s;
  min-height: 44px;
}

.auth-btn-secondary:hover {
  color: var(--auth-text);
}

/* ── 11. Panel Transitions ── */
.auth-panel {
  animation: panelFadeIn 0.35s cubic-bezier(0.25,0.1,0.25,1);
}

@keyframes panelFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── 12. Success State ── */
.auth-success {
  text-align: center;
  padding: 20px 0;
  animation: panelFadeIn 0.4s cubic-bezier(0.25,0.1,0.25,1);
}

.auth-success .success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(52,199,89,0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.auth-success .success-icon svg {
  width: 28px;
  height: 28px;
  color: var(--auth-success);
}

.auth-success .success-title {
  color: var(--auth-text);
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 4px;
}

.auth-success .success-msg {
  color: var(--auth-text-secondary);
  font-size: 13px;
}

/* ── 13. Links Row ── */
.auth-links {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  font-size: 13px;
}

.auth-links span {
  color: var(--auth-text-tertiary);
}

.auth-links .dot {
  color: #424245;
  margin: 0 8px;
}

.auth-links a {
  color: var(--auth-accent);
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s;
}

.auth-links a:hover {
  color: var(--auth-accent-hover);
  text-decoration: underline;
}

/* ── 14. OAuth Tabs ── */
.oauth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 3px;
}

.oauth-tab {
  flex: 1;
  text-align: center;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--auth-text-tertiary);
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.25s cubic-bezier(0.25,0.1,0.25,1);
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.oauth-tab:hover:not(.active) {
  color: var(--auth-text-secondary);
}

.oauth-tab.active {
  background: rgba(255,255,255,0.12);
  color: var(--auth-text);
}

.oauth-info {
  background: rgba(0,113,227,0.08);
  border: 1px solid rgba(0,113,227,0.15);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--auth-text-secondary);
  text-align: left;
}

.oauth-info b {
  color: var(--auth-accent);
  font-weight: 600;
}

/* D102-K: gitee 风格"其他方式登录"——纯 logo 圆形图标横排（icon-only），
   hover 提亮+微浮，title 提示平台名；未配置仍走 aria-disabled 置灰 + 下方 hint */
.oauth-btn.icon-only {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  min-height: 46px;
  padding: 0;
  border-radius: 50%;
  gap: 0;
}
/* D105-5 用户裁定（2026-11-09）：取消品牌实底——中性圆标 + 品牌色图标。
   品牌色经 --brand 变量只作用于图标，不再做按钮底色。 */
.oauth-btn.icon-only {
  background: rgba(255,255,255,0.08);
  border-color: transparent;
}
.oauth-btn.icon-only svg {
  color: var(--brand, #fff);
}
.oauth-btn.icon-only:hover {
  background: rgba(255,255,255,0.14);
  border-color: transparent;
}
.oauth-btn.icon-only[aria-disabled="true"] {
  opacity: 0.45;
  border-color: transparent;
}
.oauth-btn.icon-only[aria-disabled="true"] svg {
  color: #fff;
}
.oauth-btn.icon-only[aria-disabled="true"]:hover {
  filter: none;
  transform: none;
}
/* 间距保障：容器 gap + 按钮间最小间距双保险（防 join('') 渲染挤压） */
#oauthBtns { justify-content: space-evenly; gap: 14px !important; }
/* 统一 logo 视觉尺寸（含 gitee 满圆镂空——不再 30px 突出，2026-11-08 用户反馈） */
.oauth-btn.icon-only svg { width: 22px; height: 22px; }
/* D105-5 用户裁定：gitee 同步取消实底特例——镂空 G 改品牌橙直接描画
   （不再依赖白 G+红底），与其余渠道统一中性圆标。 */
/* D105-13（2026-11-10）：gitee 与华为同款——官方双色在 SVG path 级
   （红圆 #C71D23 + 白 G #FFFFFF），currentColor 染色置空 */
.oauth-btn.icon-only[onclick*="oauthLogin('gitee')"] svg {
  color: transparent !important;
  fill: transparent !important;
  width: 26px !important;
  height: 26px !important;
}
/* 2026-11-12 修复（用户实弹，仅动 github 不碰其他渠道）：github 品牌色只有
   黑/白两态——#24292f 近黑（深底隐没、浅底显灰，用户裁定不要），#0969DA 蓝
   亦被否。github 图标恒白（章鱼猫白标，与红系渠道同等醒目）；!important 压过
   light 模式的 var(--brand) 染色规则。brand_color=#24292f 保留在卡上供
   其他消费点（引导页平台卡等）用正确品牌色。 */
.oauth-btn.icon-only[onclick*="oauthLogin('github')"] svg {
  color: #fff !important;
}




/* P1-7: OAuth 按钮类 — 替代 inline style */
.oauth-btn {
  flex: 1;
  padding: 12px 14px;
  border-radius: 980px;
  border: 1px solid var(--auth-border);
  background: rgba(255,255,255,0.06);
  color: var(--auth-text);
  font-weight: 500;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.oauth-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.15);
}

/* B+（Issue #535）：OAuth 未配置置灰态——不用真 disabled（保留点击可解释），
   aria-disabled + 视觉弱化；说明常显在按钮组下方（.oauth-unconfigured-hint） */
.oauth-btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
}
.oauth-btn[aria-disabled="true"]:hover {
  background: rgba(255,255,255,0.06);
  border-color: var(--auth-border);
}
/* FOUC 修复（#535，注册页同模式）：服务端在 <html> 注入按平台粒度的
   oauth-<provider>-not-configured 类，CSS 在首帧（defer JS 运行前）即弱化
   对应按钮——消除「先常亮后置灰」闪动，且单平台配置时已配置按钮不误灰。
   app.js 同步块随后补 aria-disabled（视觉不变，仅语义补充）。 */
html[class*="oauth-gitcode-not-configured"] #oauthBtns .oauth-btn[onclick*="oauthLogin('gitcode')"],
html[class*="oauth-github-not-configured"] #oauthBtns .oauth-btn[onclick*="oauthLogin('github')"] {
  opacity: 0.45;
  cursor: not-allowed;
}
html[class*="oauth-gitcode-not-configured"] #oauthBtns .oauth-btn[onclick*="oauthLogin('gitcode')"]:hover,
html[class*="oauth-github-not-configured"] #oauthBtns .oauth-btn[onclick*="oauthLogin('github')"]:hover {
  background: rgba(255,255,255,0.06);
  border-color: var(--auth-border);
}
/* 说明行同样 CSS 驱动：预置 DOM + 注入类首帧显示（内联 style display:none 被
   类规则覆盖）；全部已配置（无任何 oauth-*-not-configured 类）时保持隐藏 */
html[class*="oauth-gitcode-not-configured"] #oauthUnconfiguredHint,
html[class*="oauth-github-not-configured"] #oauthUnconfiguredHint {
  display: block !important;
}
html.oauth-configured #oauthUnconfiguredHint {
  display: none !important;
}
.oauth-unconfigured-hint {
  margin-top: 10px;
  font-size: 11px;
  line-height: 1.6;
  /* 用主题次级文字色（登录卡片为浅色背景），不用 rgba(255,255,255,*)——浅底白字不可见 */
  color: var(--auth-text-tertiary, #6e6e73);
  text-align: center;
}
.oauth-unconfigured-hint a {
  color: var(--a, #7ab8ff);
  text-decoration: underline;
  cursor: pointer;
}
.oauth-unconfigured-hint a:hover {
  color: var(--a, #7ab8ff);
  filter: brightness(1.15);
}

.oauth-btn svg {
  /* 品牌色做图标 tint，但深色品牌色在深色背景上不可见，用 color-mix 提亮 */
  color: color-mix(in srgb, var(--brand, rgba(255,255,255,0.7)) 60%, rgba(255,255,255,0.7));
}

/* ── 15. Toast ── */
.toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 14px;
  z-index: 10000;
  background: rgba(30,30,32,0.95);
  color: var(--auth-text);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  animation: toastIn 0.3s cubic-bezier(0.25,0.1,0.25,1);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-12px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.toast.fade-out {
  opacity: 0;
  transition: opacity 0.3s;
}

/* ── 16. Mobile ── */
@media (max-width: 420px) {
  .auth-card {
    width: 100%;
    max-width: 360px;
  }

  .auth-card .logo {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    margin-bottom: 16px;
  }

  .auth-card h1 {
    font-size: 21px;
  }

  .auth-card .subtitle {
    font-size: 13px;
    margin-bottom: 24px;
  }

  .code-row {
    flex-direction: column;
    gap: 8px;
  }

  .code-row .send-code-btn {
    width: 100%;
  }
}

/* ── 17. Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  .auth-panel,
  .auth-success,
  .toast {
    animation: none;
  }

  .auth-btn,
  .auth-btn:hover:not(:disabled),
  .auth-btn:active:not(:disabled),
  .field-input,
  .step-dot,
  .pwd-strength-fill {
    transition: none;
  }
}

/* ── 18. Coarse Pointer (Touch) ── */
@media (pointer: coarse) {
  .pwd-toggle {
    padding: 10px;
  }

  .field-input {
    font-size: 16px; /* prevent iOS zoom on focus */
  }
}

/* ── 19. Language Switch ── */
.lang-switch {
  position: fixed;
  bottom: 16px;
  right: 16px;
  padding: 6px 14px;
  border-radius: 980px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 12px;
  font-weight: 500;
  color: #86868b;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 100;
  user-select: none;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.lang-switch:hover {
  background: rgba(255, 255, 255, 1);
  color: var(--auth-accent, #0071e3);
}

.lang-switch:active {
  transform: scale(0.95);
}

/* ═══ 口径 v9（2026-11-09 用户采纳 gitee.com/login 口径）：裸品牌图标——
   无圆底无边框（transparent），图标 28px 取各渠道品牌色（--brand，深色页浅色变体），
   hover 完全不变（无 transform/box-shadow/背景变化）。 ═══ */
#oauthBtns { justify-content: center; gap: 24px !important; }
.oauth-btn.icon-only {
  width: auto;
  height: auto;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 0;
  border: none;
  gap: 0;
}
/* 键盘焦点环（HIG）：hover 零变化 ≠ focus 零变化——可访问性底线，
   苹果式 accent 描边 ring，与输入框 focus 同语言。 */
.oauth-btn.icon-only:focus-visible,
.oauth-btn.has-label:focus-visible {
  outline: none;
  border-radius: 8px;
  box-shadow: 0 0 0 3px var(--auth-border-focus, #0071e3);
}
.oauth-btn.icon-only,
.oauth-btn.icon-only:hover,
.oauth-btn.icon-only[onclick*="gitee"],
.oauth-btn.icon-only[onclick*="gitee"]:hover {
  background: transparent;
  border-color: transparent;
  filter: none;
}
.oauth-btn.icon-only svg {
  width: 28px;
  height: 28px;
  /* 深色卡片：暗品牌色（gitee #C71D23 / huawei #C7000B）原值对比不足显黑，
     白色提亮混合保色相；github 浅色变体 (#f0f6fc) 混白几乎不变。 */
  color: color-mix(in srgb, var(--brand, #fff) 75%, #fff);
}
html[data-theme-mode="light"] .oauth-btn.icon-only svg {
  color: var(--brand, #111);
}
/* 华为：图标 + 下方 huawei 小字（gitee.com/login 形态） */
.oauth-btn.has-label {
  width: auto;
  min-width: 64px;
  height: auto;
  min-height: 58px;
  padding: 5px 8px 4px;
  border-radius: 0;
  gap: 5px;
  flex-direction: column;
  background: transparent;
  border: none;
}
.oauth-btn.has-label:hover { background: transparent; }
.oauth-btn.has-label .ob-ic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 0;
  background: transparent;
}
.oauth-btn.has-label .ob-ic svg { width: 28px; height: 28px; }
.oauth-btn.has-label .ob-tt {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--t2, #86868b);
}

/* ═══ hover 零变化（用户终裁）：hover 不允许任何 transform / box-shadow /
   背景变化；此处显式置 none，覆盖前段可能残留的 hover 效果。 ═══ */
.oauth-btn.icon-only:hover,
.oauth-btn.has-label:hover,
#oauthBtns .oauth-btn:hover {
  background: transparent;
  border-color: transparent;
  filter: none;
  transform: none;
  box-shadow: none;
}
/* huawei logo: 深红在深卡上明度不足显黑（用户定版）——深色卡纯白；浅色卡保持品牌红 */
.oauth-btn.icon-only svg[data-brand="huawei"] {
  color: #fff;
}
html[data-theme-mode="light"] .oauth-btn.icon-only svg[data-brand="huawei"] {
  color: var(--brand, #C7000B);
}

/* ═══ D105-8（2026-11-10 用户对齐 Gitee 官方登录页口径）：全部第三方登录按钮统一
   「裸品牌色图标」——无底无边框无字标（gitee.com/login .git-other-login-icon 形态）。
   华为 = 纯红花瓣 iconfont 色 rgb(239,72,75)；gitee = 红 G；对齐既有 v9 裸图标层。 ═══ */
.oauth-btn.icon-only[onclick*="oauthLogin('huawei')"] svg {
  color: #EF484B;
  fill: #EF484B;
}
.oauth-btn.icon-only[onclick*="oauthLogin('huawei')"][aria-disabled="true"] svg {
  color: #EF484B;
  fill: #EF484B;
  opacity: .45;
}

/* ═══ D105-12（2026-11-10 用户拍板）：华为按钮回归 icon-only 裸图标形态——
   双色（红圈+白花瓣）在 SVG path 级自带，圈内的 HUAWEI 字形已在花瓣 path 里，
   外部不再加字标 span。仅保留尺寸对齐（与 v9 层 22px 统一）。═══ */
.oauth-btn.icon-only[onclick*="oauthLogin('huawei')"] svg {
  width: 26px !important;
  height: 26px !important;
  color: transparent !important;
  fill: transparent !important;
}
