/**
 * Login F1 — Neural Noir split shell (draft 0d9fe341…)
 * Warm gold accent #b8956c; no purple / neon cyan.
 * Fonts: loaded via <link> in login.html (avoid CSS @import render-block / FOUT jump).
 */

html.i18n-switching body {
  visibility: hidden;
}

.auth-page--login {
  font-family: 'Manrope', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  -webkit-font-smoothing: antialiased;
  /* Right panel RB2 Soft Stage — vertical gradient + gold glow (draft 00cad17b…) */
  --auth-panel-bg: #0f1724;
  --auth-panel-bg-end: #1b2436;
  --auth-card-bg: #273041;
  --auth-card-border: rgba(255, 255, 255, 0.08);
  background: var(--auth-panel-bg);
  /* Prevent layout jump when vertical scrollbar appears/disappears */
  scrollbar-gutter: stable;
}

.auth-page--login .auth-shell--login {
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: stretch;
}

/* —— Left brand panel —— */
.auth-page--login .auth-brand--f1 {
  padding: clamp(2rem, 4vh, 3rem) clamp(2rem, 3vw, 3.5rem);
  align-items: center;
  justify-content: flex-start;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.auth-page--login .auth-brand-bg {
  background:
    radial-gradient(ellipse 80% 60% at 20% 20%, rgba(59, 130, 246, 0.2) 0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(34, 197, 94, 0.1) 0%, transparent 50%),
    #0b1220;
}

.auth-page--login .auth-brand-glow--1 {
  top: 18%;
  right: 18%;
  width: 280px;
  height: 280px;
  background: rgba(59, 130, 246, 0.18);
}

.auth-page--login .auth-brand-glow--2 {
  bottom: 18%;
  left: 18%;
  width: 200px;
  height: 200px;
  background: rgba(34, 197, 94, 0.1);
}

.auth-page--login .auth-brand-content--f1 {
  max-width: 520px;
  width: 100%;
  min-width: 0;
  min-height: 0;
  margin-block: auto;
}

.auth-page--login .auth-logo--brand {
  margin-bottom: 2.75rem;
}

.auth-page--login .auth-logo-tagline {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
  color: #94a3b8;
}

.auth-page--login .auth-brand-title {
  /* Manrope for all scripts — Syne distorts extended Latin (PT/ES/ID/…). */
  font-family: 'Manrope', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  font-size: clamp(2.25rem, 3.4vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0 0 1.5rem;
  max-width: 100%;
  min-width: 0;
  white-space: normal;
  overflow-wrap: break-word;
  text-wrap: balance;
}

.auth-page--login .auth-brand-title-accent {
  color: #b8956c;
}

.auth-page--login .auth-capability-list {
  list-style: none;
  margin: 0 0 2.75rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.auth-page--login .auth-capability-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.auth-page--login .auth-capability-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #b8956c;
}

.auth-page--login .auth-capability-icon--danger {
  color: #f87171;
}

.auth-page--login .auth-capability-title {
  margin: 0 0 0.25rem;
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
}

.auth-page--login .auth-capability-desc {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: #94a3b8;
}

/* Latin UI (ui-script-latin from i18n.js) — Syne stretches extended Latin copy */
html.ui-script-latin .auth-page--login .auth-brand-title,
html.ui-script-latin .auth-page--login .auth-brand-title-accent {
  font-family: 'Manrope', 'PingFang SC', sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: clamp(1.85rem, 2.5vw, 2.65rem);
  line-height: 1.18;
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: auto;
}

html.ui-script-latin .auth-page--login .auth-logo-tagline {
  letter-spacing: 0.04em;
  text-transform: none;
  font-size: 0.75rem;
  line-height: 1.35;
}

html.ui-script-latin .auth-page--login .auth-capability-item > div {
  min-width: 0;
}

html.ui-script-latin .auth-page--login .auth-capability-title {
  text-transform: none;
  letter-spacing: 0.015em;
  font-size: 0.8125rem;
  line-height: 1.35;
  overflow-wrap: break-word;
}

html.ui-script-latin .auth-page--login .auth-capability-desc {
  font-size: 0.8125rem;
  line-height: 1.5;
  overflow-wrap: break-word;
}

html.ui-script-latin .auth-page--login .auth-capability-list {
  gap: 1.15rem;
  margin-bottom: 2.25rem;
}

html.ui-script-latin .auth-page--login .auth-logo--brand {
  margin-bottom: 2.25rem;
}

/* Equity preview card */
.auth-page--login .auth-equity-wrap {
  position: relative;
  max-width: 440px;
}

.auth-page--login .auth-equity-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 1.35rem 1.35rem 1.15rem;
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(184, 149, 108, 0.18);
  backdrop-filter: blur(8px);
  animation: auth-equity-float 6s ease-in-out infinite;
}

@keyframes auth-equity-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@media (prefers-reduced-motion: reduce) {
  .auth-page--login .auth-equity-card {
    animation: none;
  }

  .auth-page--login .auth-equity-chart-path,
  .auth-page--login .auth-equity-live-dot,
  .auth-page--login .auth-equity-chart-dot {
    animation: none;
  }
}

/* Same WebKit modal stall as list-mobile status dots: captcha uses modal-blur
   over the floating equity card. Pause while Bootstrap modal is open. */
body.modal-open.auth-page--login .auth-equity-card,
body.modal-open.auth-page--login .auth-equity-chart-path,
body.modal-open.auth-page--login .auth-equity-live-dot,
body.modal-open.auth-page--login .auth-equity-chart-dot {
  animation-play-state: paused;
}

.auth-page--login .auth-equity-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.15rem;
}

.auth-page--login .auth-equity-live {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.auth-page--login .auth-equity-live-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #b8956c;
  flex-shrink: 0;
  animation: auth-equity-pulse 1.6s ease-in-out infinite;
}

@keyframes auth-equity-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

.auth-page--login .auth-equity-live-label {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-page--login .auth-equity-badge {
  flex-shrink: 0;
  padding: 0.15rem 0.45rem;
  border-radius: 0.25rem;
  background: rgba(184, 149, 108, 0.12);
  color: #b8956c;
  font-size: 0.625rem;
  font-weight: 700;
}

.auth-page--login .auth-equity-value {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.85rem;
  letter-spacing: -0.02em;
}

.auth-page--login .auth-equity-chart {
  height: 4rem;
  width: 100%;
  margin-bottom: 0.85rem;
}

.auth-page--login .auth-equity-chart svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  display: block;
}

.auth-page--login .auth-equity-chart-path {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: auth-equity-dash 2s ease-out forwards;
}

.auth-page--login .auth-equity-chart-fill {
  opacity: 0.12;
}

.auth-page--login .auth-equity-chart-dot {
  animation: auth-equity-pulse 1.6s ease-in-out infinite;
}

@keyframes auth-equity-dash {
  to { stroke-dashoffset: 0; }
}

.auth-page--login .auth-equity-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.auth-page--login .auth-equity-meta-accent {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 700;
  color: #b8956c;
  letter-spacing: 0.04em;
}

.auth-page--login .auth-equity-alert {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.625rem;
  color: #94a3b8;
}

.auth-page--login .auth-equity-alert svg {
  color: #f87171;
  flex-shrink: 0;
}

/* —— Right form panel (RB2 Soft Stage atmosphere) —— */
.auth-page--login .auth-form-panel--login {
  position: relative;
  isolation: isolate;
  /* visible so lang dropdown can escape topbar; glow stays soft via radial size */
  overflow: visible;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;
  padding: 0;
  /* Vertical stage: #0f1724 → #1b2436 (no grid) */
  background: linear-gradient(
    180deg,
    var(--auth-panel-bg, #0f1724) 0%,
    var(--auth-panel-bg-end, #1b2436) 100%
  );
}

/* Soft warm-gold bloom behind form card (draft: #b8956c/5 + blur) */
.auth-page--login .auth-form-panel--login::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 0;
  width: min(600px, 140%);
  height: min(600px, 140%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(184, 149, 108, 0.09) 0%,
    rgba(184, 149, 108, 0.04) 32%,
    transparent 62%
  );
  filter: blur(48px);
}

.auth-page--login .auth-form-panel--login > * {
  position: relative;
  z-index: 1;
}

.auth-page--login .auth-form-panel--login > .auth-mobile-brand,
.auth-page--login .auth-form-panel--login > .auth-form-topbar,
.auth-page--login .auth-form-panel--login > .auth-form-body {
  width: 100%;
}

/* Beat `> * { z-index: 1 }` so the open lang menu stacks above the form card */
.auth-page--login .auth-form-panel--login > .auth-form-topbar {
  z-index: 40;
}

.auth-page--login .auth-form-topbar {
  position: relative;
  padding: 1.5rem 1.5rem 0;
  width: 100%;
  max-width: none;
  overflow: visible;
}

.auth-page--login [data-lang-switch] {
  position: relative;
  z-index: 1;
  pointer-events: auto;
  cursor: pointer;
}

.auth-page--login [data-lang-switch] svg {
  pointer-events: none;
}

@media (min-width: 992px) {
  .auth-page--login .auth-form-topbar {
    padding: 2.25rem 2.5rem 0;
  }
}

.auth-page--login .auth-back-home {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #64748b;
  font-size: 0.875rem;
}

.auth-page--login .auth-back-home:hover {
  color: #cbd5e1;
}

.auth-page--login .auth-back-home svg {
  width: 1rem;
  height: 1rem;
  opacity: 0.9;
}

.auth-page--login .auth-lang-switch--inline {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(30, 41, 59, 0.5);
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 650;
}

.auth-page--login .auth-lang-switch--inline:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(30, 41, 59, 0.75);
  color: #fff;
}

.auth-page--login .auth-lang-switch--inline[aria-expanded="true"] {
  border-color: rgba(184, 149, 108, 0.45);
  background: rgba(39, 48, 65, 0.92);
  color: #f1f5f9;
}

/* —— Auth language dropdown (LO1 Clean Rows) ——
   login.html does not load mobile-nav.css; styles live here.
   Draft: eaee7291… — solid card panel, restrained gold selected state. */
.auth-page--login .lang-switch-wrap--auth {
  position: relative;
  z-index: 50;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}

.auth-page--login .lang-switch-wrap--auth .lang-switch-menu {
  position: absolute;
  top: calc(100% + 0.4rem);
  inset-inline-end: 0;
  inset-inline-start: auto;
  bottom: auto;
  z-index: 60;
  direction: ltr;
  text-align: left;
  /* Grid (not flex): flex column + max-height + item overflow:hidden zeros min-size and
     squashes every row into the viewport. minmax keeps natural row height + scroll. */
  display: grid;
  grid-auto-flow: row;
  grid-auto-rows: minmax(2.4rem, max-content);
  align-content: start;
  gap: 0.2rem;
  /* Do NOT use max-width:100% — wrap is only as wide as the pill (~60px). */
  box-sizing: border-box;
  width: 12.75rem; /* ~204px */
  min-width: 12.75rem;
  max-width: min(14rem, calc(100vw - 1.5rem));
  max-height: min(18rem, 55vh);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0.45rem;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  /* Match login form card — opaque, no glass gradient */
  background: #273041;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.42);
  -webkit-overflow-scrolling: touch;
}

.auth-page--login .lang-switch-wrap--auth .lang-switch-menu[hidden],
.auth-page--login .lang-switch-wrap--auth .lang-switch-menu:not(.is-open) {
  display: none !important;
  overflow: hidden;
  max-height: 0;
  padding: 0;
  border-width: 0;
  box-shadow: none;
  visibility: hidden;
  pointer-events: none;
}

.auth-page--login .lang-switch-wrap--auth .lang-switch-menu-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: left;
  flex-shrink: 0;
  box-sizing: border-box;
  width: 100%;
  min-height: 2.4rem;
  height: auto;
  margin: 0;
  padding-block: 0.65rem;
  padding-inline: 1.05rem 0.95rem;
  border: 0;
  border-radius: 0.4rem;
  background: transparent;
  color: #e2e8f0;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4;
  direction: ltr;
  unicode-bidi: isolate;
  text-align: left;
  white-space: nowrap;
  /* Do not set overflow:hidden here — with flex/grid + max-height it zeros min-size
     and vertically flattens labels. Menu panel already clips via overflow-x. */
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.auth-page--login .lang-switch-wrap--auth .lang-switch-menu-item-label {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  direction: ltr;
  unicode-bidi: isolate;
  text-align: left;
}

.auth-page--login .lang-switch-wrap--auth .lang-switch-menu-item:hover,
.auth-page--login .lang-switch-wrap--auth .lang-switch-menu-item:focus-visible {
  background: rgba(255, 255, 255, 0.045);
  color: #fff;
  outline: none;
}

/* Selected: gold text + whisper tint + straight 2px bar (not curved inset on rounded chip) */
.auth-page--login .lang-switch-wrap--auth .lang-switch-menu-item[aria-selected="true"] {
  padding-inline-start: 1.15rem;
  background: rgba(184, 149, 108, 0.07);
  color: #d4c0a5;
  font-weight: 600;
  box-shadow: none;
}

.auth-page--login .lang-switch-wrap--auth .lang-switch-menu-item[aria-selected="true"]::before {
  content: '';
  position: absolute;
  inset-inline-start: 0.35rem;
  top: 0.45rem;
  bottom: 0.45rem;
  width: 2px;
  border-radius: 1px;
  background: #b8956c;
  pointer-events: none;
}

.auth-page--login .auth-form-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1.5rem 2rem;
  gap: 1.75rem;
}

.auth-page--login .auth-form-wrap {
  width: min(420px, 100%);
}

.auth-page--login .auth-form-card {
  background: var(--auth-card-bg, #273041);
  border: 1px solid var(--auth-card-border, rgba(255, 255, 255, 0.08));
  border-radius: 1.125rem;
  padding: 2rem 1.85rem 1.65rem;
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  backdrop-filter: none;
}

.auth-page--login .auth-form-intro {
  text-align: left;
  margin-bottom: 1.6rem;
}

.auth-page--login .auth-form-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: #f8fafc;
  margin: 0 0 0.45rem;
}

.auth-page--login .auth-form-subtitle {
  color: #8b97a8;
  font-size: 0.9375rem;
  line-height: 1.5;
  margin: 0;
}

.auth-page--login .auth-form-card .form-label {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: #9aa6b5;
}

.auth-page--login .auth-form-card .form-control-lg,
.auth-page--login .auth-form-card .input-icon .form-control-lg {
  min-height: 3rem;
  background: rgba(11, 18, 32, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.625rem;
  color: #f1f5f9;
  font-size: 0.9375rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.auth-page--login .auth-form-card .form-control-lg::placeholder,
.auth-page--login .auth-form-card .input-icon .form-control-lg::placeholder {
  color: #64748b;
}

.auth-page--login .auth-form-card .form-control-lg:focus,
.auth-page--login .auth-form-card .input-icon .form-control-lg:focus {
  border-color: rgba(184, 149, 108, 0.55);
  box-shadow: 0 0 0 2px rgba(184, 149, 108, 0.16);
  background: rgba(11, 18, 32, 0.88);
}

.auth-page--login .auth-form-card .input-icon-addon {
  color: #7b8797;
}

/* Password show/hide — right-side icon button inside Tabler .input-icon */
.auth-page--login .auth-form-card .auth-password-toggle {
  pointer-events: auto;
  cursor: pointer;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  color: #7b8797;
  transition: color 0.15s ease;
}

.auth-page--login .auth-form-card .auth-password-toggle:hover,
.auth-page--login .auth-form-card .auth-password-toggle:focus-visible {
  color: #c5a070;
  outline: none;
}

.auth-page--login .auth-form-card .auth-password-toggle.is-revealed {
  color: #9aa6b5;
}

.auth-page--login .auth-form-card .auth-password-toggle svg {
  display: block;
}

.auth-page--login .auth-inline-link,
.auth-page--login .auth-switch-link {
  color: #c5a070;
  font-weight: 600;
  font-size: 0.8125rem;
}

.auth-page--login .auth-inline-link:hover,
.auth-page--login .auth-switch-link:hover {
  color: #d4c0a5;
  text-decoration: none;
}

.auth-page--login .auth-field-label .auth-inline-link {
  color: #c5a070;
}

/* Primary CTA: solid warm gold + dark text (ref: 登录系统 >) */
.auth-page--login .auth-submit-btn.btn-primary,
.auth-page--login .auth-form-card .auth-submit-btn.btn-primary {
  --tblr-btn-color: #0b1220;
  --tblr-btn-bg: #b8956c;
  --tblr-btn-border-color: #b8956c;
  --tblr-btn-hover-bg: #c5a070;
  --tblr-btn-hover-border-color: #c5a070;
  --tblr-btn-hover-color: #0b1220;
  min-height: 3.05rem;
  margin-top: 0.35rem;
  border-radius: 0.625rem;
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
  color: #0b1220 !important;
  background: #b8956c !important;
  border-color: #b8956c !important;
  box-shadow: 0 6px 18px rgba(184, 149, 108, 0.28);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.auth-page--login .auth-submit-btn.btn-primary:hover:not(:disabled),
.auth-page--login .auth-form-card .auth-submit-btn.btn-primary:hover:not(:disabled) {
  background: #c5a070 !important;
  border-color: #c5a070 !important;
  color: #0b1220 !important;
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(184, 149, 108, 0.34);
}

.auth-page--login .auth-submit-btn.btn-primary:disabled {
  color: rgba(11, 18, 32, 0.55) !important;
  opacity: 0.75;
}

/* OR divider + outline secondary (email code login) */
.auth-page--login .auth-or-divider {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 1.05rem 0 0.95rem;
  color: #6b7787;
  font-size: 0.6875rem;
  font-weight: 650;
  letter-spacing: 0.14em;
}

html:not(.ui-script-latin) .auth-page--login .auth-or-divider {
  letter-spacing: 0.04em;
  text-transform: none;
}

.auth-page--login .auth-or-divider::before,
.auth-page--login .auth-or-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.auth-page--login .auth-mode-toggle-btn {
  min-height: 2.85rem;
  border-radius: 0.625rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  color: #e8eef6;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.auth-page--login .auth-mode-toggle-btn:hover:not(:disabled) {
  border-color: rgba(197, 160, 112, 0.55);
  background: rgba(184, 149, 108, 0.08);
  color: #f8fafc;
}

.auth-page--login .auth-mode-toggle-btn:disabled {
  opacity: 0.45;
}

.auth-page--login .auth-mode-toggle-btn.hidden,
.auth-page--login .auth-or-divider.hidden {
  display: none !important;
}

.auth-page--login #login-form:has(#login-mode-toggle.hidden) .auth-or-divider {
  display: none;
}

/* Keep credential row height stable when swapping password ↔ email code */
.auth-page--login #login-password-block,
.auth-page--login #login-code-block {
  min-height: 5.75rem;
}

.auth-page--login .auth-workspace-select-item:has(input:checked) {
  border-color: rgba(184, 149, 108, 0.55);
  background: rgba(184, 149, 108, 0.1);
}

.auth-page--login .auth-code-row .btn-outline-primary {
  --tblr-btn-color: #c5a070;
  --tblr-btn-border-color: rgba(197, 160, 112, 0.45);
  color: #c5a070;
  border-color: rgba(197, 160, 112, 0.45);
  background: transparent;
}

.auth-page--login .auth-code-row .btn-outline-primary:hover {
  background: rgba(184, 149, 108, 0.12);
  color: #d4c0a5;
  border-color: #b8956c;
}

.auth-page--login .auth-oauth-btn.btn-outline-primary {
  --tblr-btn-color: #e2e8f0;
  --tblr-btn-border-color: rgba(255, 255, 255, 0.18);
  color: #e2e8f0;
  border-color: rgba(255, 255, 255, 0.18);
  background: transparent;
}

.auth-page--login .auth-oauth-section .auth-divider {
  color: #6b7787;
  letter-spacing: 0.12em;
  font-size: 0.6875rem;
  font-weight: 650;
}

.auth-page--login .auth-switch {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  color: #8b97a8;
  margin-top: 1.25rem;
  padding-top: 1.15rem;
  justify-content: flex-start;
}

.auth-page--login .auth-switch-link {
  color: #c5a070;
  font-weight: 700;
  font-size: 0.875rem;
}

.auth-page--login .auth-form-alt .auth-inline-link {
  color: #c5a070;
}

/* Footer under card */
.auth-page--login .auth-form-footer {
  width: min(420px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #475569;
  text-align: center;
}

.auth-page--login .auth-form-footer-links {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
}

.auth-page--login .auth-form-footer-links a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

.auth-page--login .auth-form-footer-links a:hover {
  color: #94a3b8;
}

.auth-page--login .auth-form-footer-sep {
  opacity: 0.35;
}

.auth-page--login .auth-form-footer-copy {
  margin: 0;
  letter-spacing: 0.1em;
}

/* Mobile: single-column gate (same layout pattern as register; keep Soft Stage panel) */
@media (max-width: 991px) {
  /* Must beat desktop `.auth-shell--login { … 1.08fr / 0.92fr }` or the form stays half-width */
  .auth-page--login .auth-shell--login {
    position: relative;
    grid-template-columns: 1fr;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .auth-page--login .auth-brand--f1 {
    display: none !important;
  }

  .auth-page--login .auth-mobile-brand {
    display: none !important;
  }

  .auth-page--login .auth-form-panel--login {
    min-height: 100vh;
    min-height: 100dvh;
  }

  .auth-page--login .auth-form-topbar {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 1.5rem 1.5rem 0;
  }

  .auth-page--login .auth-form-body {
    position: relative;
    z-index: 1;
    gap: 1.35rem;
    padding-top: 0.5rem;
    padding-bottom: max(2.5rem, env(safe-area-inset-bottom));
    justify-content: flex-start;
  }

  .auth-page--login .auth-gate-brand {
    display: flex;
    justify-content: center;
    width: min(440px, 100%);
    margin-bottom: 0.35rem;
  }

  .auth-page--login .auth-logo--gate {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.85rem;
    margin: 0;
    text-decoration: none;
  }

  .auth-page--login .auth-logo-mark--gate {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
  }

  .auth-page--login .auth-logo-text-wrap--gate {
    align-items: center;
    text-align: center;
  }

  .auth-page--login .auth-logo-text-wrap--gate .auth-logo-text {
    font-family: 'Syne', 'Sora', 'PingFang SC', sans-serif;
    font-size: 1.5rem;
  }

  .auth-page--login .auth-form-wrap {
    width: min(440px, 100%);
  }

  .auth-page--login .auth-form-intro {
    text-align: center;
  }

  .auth-page--login .auth-switch {
    justify-content: center;
  }

  .auth-page--login .auth-form-footer {
    width: min(440px, 100%);
    margin-top: 0.5rem;
  }
}

@media (max-width: 480px) {
  .auth-page--login .auth-form-card {
    padding: 1.5rem 1.25rem;
  }

  .auth-page--login .auth-form-title {
    font-size: 1.35rem;
  }

  .auth-page--login .auth-form-body {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .auth-page--login .auth-form-topbar {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* —— Terms checkbox (register) —— */
.auth-page--login .auth-terms {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0.15rem 0 1rem;
  cursor: pointer;
  user-select: none;
}

.auth-page--login .auth-terms-input {
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  margin: 0.15rem 0 0;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 0.2rem;
  background: rgba(11, 18, 32, 0.65);
  cursor: pointer;
  position: relative;
}

.auth-page--login .auth-terms-input:checked {
  background: #b8956c;
  border-color: #b8956c;
}

.auth-page--login .auth-terms-input:checked::after {
  content: "";
  position: absolute;
  left: 0.28rem;
  top: 0.08rem;
  width: 0.28rem;
  height: 0.5rem;
  border: solid #0b1220;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.auth-page--login .auth-terms-input:focus-visible {
  outline: 2px solid rgba(184, 149, 108, 0.55);
  outline-offset: 2px;
}

.auth-page--login .auth-terms-text {
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #9aa6b5;
}

.auth-page--login .auth-terms-link {
  color: #c5a070;
  font-weight: 650;
  text-decoration: none;
}

.auth-page--login .auth-terms-link:hover {
  color: #d4c0a5;
  text-decoration: underline;
}

/* —— R1 register: centered gate (hide F1 left column) —— */
.auth-page--login .auth-gate-atmosphere,
.auth-page--login .auth-gate-brand {
  display: none;
}

.auth-page--login.auth-tab--register {
  --auth-panel-bg: #151b26;
  --auth-card-bg: #1f2836;
}

.auth-page--login.auth-tab--register .auth-shell--login {
  position: relative;
  grid-template-columns: 1fr;
  min-height: 100vh;
  min-height: 100dvh;
}

.auth-page--login.auth-tab--register .auth-brand--f1 {
  display: none !important;
}

.auth-page--login.auth-tab--register .auth-mobile-brand {
  display: none !important;
}

.auth-page--login.auth-tab--register .auth-gate-atmosphere {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: #0b1220;
}

.auth-page--login.auth-tab--register .auth-gate-grid {
  position: absolute;
  inset: 0;
  opacity: 0.4;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 40%, rgba(0, 0, 0, 1) 0%, transparent 78%);
}

.auth-page--login.auth-tab--register .auth-gate-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
}

.auth-page--login.auth-tab--register .auth-gate-glow--1 {
  top: -10%;
  left: -10%;
  width: 50%;
  height: 50%;
  background: rgba(59, 130, 246, 0.1);
}

.auth-page--login.auth-tab--register .auth-gate-glow--2 {
  bottom: -10%;
  right: -10%;
  width: 50%;
  height: 50%;
  background: rgba(184, 149, 108, 0.05);
}

.auth-page--login.auth-tab--register .auth-form-panel--login {
  position: relative;
  z-index: 1;
  background: transparent;
  min-height: 100vh;
  min-height: 100dvh;
}

.auth-page--login.auth-tab--register .auth-form-topbar {
  position: relative;
  z-index: 2;
  max-width: none;
  width: 100%;
  padding: 1.5rem 1.5rem 0;
}

@media (min-width: 992px) {
  .auth-page--login.auth-tab--register .auth-form-topbar {
    padding: 2.25rem 2.5rem 0;
  }
}

.auth-page--login.auth-tab--register .auth-form-body {
  position: relative;
  z-index: 1;
  gap: 1.35rem;
  padding-top: 0.5rem;
  padding-bottom: 2.5rem;
}

.auth-page--login.auth-tab--register .auth-gate-brand {
  display: flex;
  justify-content: center;
  width: min(440px, 100%);
  margin-bottom: 0.35rem;
}

.auth-page--login.auth-tab--register .auth-logo--gate {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  margin: 0;
  text-decoration: none;
}

.auth-page--login.auth-tab--register .auth-logo-mark--gate {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
}

.auth-page--login.auth-tab--register .auth-logo-text-wrap--gate {
  align-items: center;
  text-align: center;
}

.auth-page--login.auth-tab--register .auth-logo-text-wrap--gate .auth-logo-text {
  font-family: 'Syne', 'Sora', 'PingFang SC', sans-serif;
  font-size: 1.5rem;
}

.auth-page--login.auth-tab--register .auth-form-wrap {
  width: min(440px, 100%);
}

.auth-page--login.auth-tab--register .auth-form-intro {
  text-align: center;
}

.auth-page--login.auth-tab--register .auth-switch {
  justify-content: center;
}

.auth-page--login.auth-tab--register .auth-form-footer {
  width: min(440px, 100%);
  margin-top: 0.5rem;
}

/* —— RTL (Arabic) —— */
html[dir="rtl"] .auth-page--login .auth-form-intro {
  text-align: right;
}

html[dir="rtl"] .auth-page--login .auth-form-card .form-label {
  text-align: right;
}

html[dir="rtl"] .auth-page--login .auth-field-label {
  flex-direction: row-reverse;
}

html[dir="rtl"] .auth-page--login .auth-back-home svg {
  transform: scaleX(-1);
}

html[dir="rtl"] .auth-page--login .auth-switch {
  justify-content: flex-start;
}

html[dir="rtl"] .auth-page--login .lang-switch-wrap--auth .lang-switch-menu {
  inset-inline-start: 0;
  inset-inline-end: auto;
}

@media (max-width: 991px) {
  html[dir="rtl"] .auth-page--login .auth-form-intro {
    text-align: center;
  }
}
