/* Variables: active variables stylesheet selected by the master layout. */
/* =============================================
   Split Panel Auth — Demo site (navy / gold)
   Light + html.dark, scoped under .auth-shell.
   ============================================= */

.auth-shell,
.auth-shell *,
.auth-shell *::before,
.auth-shell *::after {
  box-sizing: border-box;
}

.auth-shell {
  margin-top: 30px;
  position: relative;
  width: 100%;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Poppins, "Segoe UI", system-ui, sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

html.dark .auth-shell {
  color: var(--c-text);
}

/* --- Ambient background --- */
.auth-shell .bg-ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.auth-shell .bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  animation: authOrbDrift 18s ease-in-out infinite alternate;
}

.auth-shell .bg-orb--1 {
  width: 520px;
  height: 520px;
  top: -12%;
  left: -8%;
  background: radial-gradient(circle, var(--c-glow-navy) 0%, transparent 70%);
}

.auth-shell .bg-orb--2 {
  width: 440px;
  height: 440px;
  bottom: -10%;
  right: -6%;
  background: radial-gradient(circle, var(--c-glow-gold) 0%, transparent 70%);
  animation-delay: -6s;
  animation-duration: 22s;
}

.auth-shell .bg-orb--3 {
  width: 360px;
  height: 360px;
  top: 40%;
  left: 55%;
  background: radial-gradient(circle, rgba(0, 31, 91, 0.16) 0%, transparent 70%);
  animation-delay: -12s;
  animation-duration: 16s;
}

html.dark .auth-shell .bg-orb--3 {
  background: radial-gradient(circle, rgba(255, 209, 0, 0.12) 0%, transparent 70%);
}

.auth-shell .bg-grain {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

@keyframes authOrbDrift {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, -24px) scale(1.08); }
}

/* --- Auth container --- */
.auth-shell .auth-container {
  position: relative;
  z-index: 1;
  width: var(--container-w);
  max-width: 100%;
  height: var(--container-h);
  min-height: var(--container-h);
  margin: 0 auto;
  border-radius: var(--r-container);
  border: 1px solid var(--c-border) !important;
  background: var(--c-surface) !important;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  overflow: hidden;
  transition: box-shadow var(--dur-switch) var(--ease-main);
}

html.dark .auth-shell .auth-container {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 24px 80px rgba(0, 0, 0, 0.45),
    0 0 50px var(--c-glow-navy);
}

.auth-shell .auth-container.active {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.4) inset,
    0 24px 80px rgba(0, 31, 91, 0.14),
    0 0 60px var(--c-glow-gold);
}

/* Light sweep */
.auth-shell .light-sweep {
  position: absolute;
  top: 0;
  left: -30%;
  width: 28%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.08) 40%,
    rgba(255, 209, 0, 0.22) 50%,
    rgba(255, 255, 255, 0.08) 60%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 20;
  opacity: 0;
  transform: translateX(0);
}

@keyframes authLightSweep {
  0%   { opacity: 0; transform: translateX(0); }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { opacity: 0; transform: translateX(430%); }
}

/* --- Form panels --- */
.auth-shell .form-panel {
  position: absolute;
  top: 0;
  width: var(--panel-w);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl) var(--space-lg);
  z-index: 2;
  pointer-events: none;
  transition:
    opacity calc(var(--dur-switch) * 0.55) var(--ease-main) 0ms,
    transform calc(var(--dur-switch) * 0.65) var(--ease-main) 0ms,
    filter calc(var(--dur-switch) * 0.5) var(--ease-main) 0ms;
}

.auth-shell .form-panel .auth-form {
  pointer-events: auto;
}

/* Only the panel currently on screen may accept clicks/typing. The panels
   overlap completely in the stacked mobile layout, and the register markup
   comes later in the DOM (so paints on top) - without this, the hidden
   "create account" form stole every tap meant for the sign-in fields. */
.auth-shell .form-panel--register .auth-form {
  pointer-events: none;
}
.auth-shell .auth-container.active .form-panel--register .auth-form {
  pointer-events: auto;
}
.auth-shell .auth-container.active .form-panel--login .auth-form {
  pointer-events: none;
}

.auth-shell .form-panel--login {
  left: 0;
  opacity: 1;
  transform: translateX(0);
  filter: blur(0);
}

.auth-shell .auth-container:not(.active) .form-panel--login {
  transition-delay: calc(var(--dur-switch) * 0.35), calc(var(--dur-switch) * 0.35), calc(var(--dur-switch) * 0.35);
}

.auth-shell .auth-container.active .form-panel--login {
  opacity: 0;
  transform: translateX(-80px);
  filter: blur(6px);
  pointer-events: none;
  transition-delay: 0ms, 0ms, 0ms;
}

.auth-shell .form-panel--register {
  right: 0;
  opacity: 0;
  transform: translateX(80px);
  filter: blur(6px);
  pointer-events: none;
}

.auth-shell .auth-container.active .form-panel--register {
  opacity: 1;
  transform: translateX(0);
  filter: blur(0);
  pointer-events: auto;
  transition-delay: calc(var(--dur-switch) * 0.35), calc(var(--dur-switch) * 0.35), calc(var(--dur-switch) * 0.35);
}

.auth-shell .auth-container:not(.active) .form-panel--register {
  transition-delay: 0ms, 0ms, 0ms;
}

.auth-shell .auth-form {
  width: 100%;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.auth-shell .auth-form[hidden],
.auth-shell .form-panel--register .auth-form--forgot {
  display: none !important;
}

.auth-shell .auth-container.forgot .form-panel--register .auth-form--register {
  display: none !important;
}

.auth-shell .auth-container.forgot .form-panel--register .auth-form--forgot {
  display: flex !important;
}

.auth-shell .form-header {
  margin-bottom: var(--space-sm);
  background: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.auth-shell .form-eyebrow {
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--site-accent-hover) !important;
  margin-bottom: var(--space-xs);
  text-transform: uppercase;
}

html.dark .auth-shell .form-eyebrow {
  color: var(--site-accent) !important;
}

.auth-shell .form-title,
html.dark .center.position-ref.full-height .auth-shell .form-title {
  font-size: 2.7rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: var(--space-xs);
  color: var(--c-text) !important;
}

.auth-shell .form-sub,
html.dark .center.position-ref.full-height .auth-shell .form-sub {
  font-size: 1.2rem;
  color: var(--c-muted) !important;
  font-weight: 400;
  line-height: 1.5;
}

.auth-shell .field--stagger {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity var(--dur-field) var(--ease-main),
    transform var(--dur-field) var(--ease-main);
}

.auth-shell .form-panel--register .field--stagger {
  opacity: 0;
  transform: translateY(16px);
}

.auth-shell .auth-container.active .form-panel--register .field--stagger {
  opacity: 1;
  transform: translateY(0);
  transition-delay: calc(var(--stagger-base) + var(--i) * var(--stagger-step));
}

/* --- Input fields --- */
.auth-shell .field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-shell .field-label,
html.dark .center.position-ref.full-height .auth-shell .field-label {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--c-muted) !important;
  letter-spacing: 0.02em;
}

.auth-shell .field-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-shell .field-icon {
  position: absolute;
  left: 18px;
  width: 24px;
  height: 24px;
  color: var(--c-muted) !important;
  pointer-events: none;
  transition: color 0.25s ease;
  opacity: 0.55;
}

.auth-shell input.field-input,
.auth-shell .field-input {
  width: 100%;
  padding: 16px 18px 16px 56px;
  font-family: inherit;
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--c-text) !important;
  background: var(--c-input-bg) !important;
  border: 1px solid var(--c-input-border) !important;
  border-radius: var(--r-input);
  outline: none;
  box-shadow: none;
  transition:
    border-color 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease;
}

.auth-shell .field-input::placeholder {
  color: var(--c-muted) !important;
  opacity: 0.7;
}

.auth-shell .field-input:hover {
  border-color: rgba(0, 31, 91, 0.35) !important;
}

html.dark .auth-shell .field-input:hover {
  border-color: #475569 !important;
}

.auth-shell .field-input:focus {
  border-color: var(--site-brand-navy) !important;
  box-shadow:
    0 0 0 3px rgba(0, 31, 91, 0.12),
    0 0 16px var(--c-glow-gold);
}

html.dark .auth-shell .field-input:focus {
  border-color: var(--site-accent) !important;
  box-shadow:
    0 0 0 3px rgba(255, 209, 0, 0.18),
    0 0 16px var(--c-glow-gold);
}

.auth-shell .field-wrap:focus-within .field-icon {
  color: var(--site-brand-navy) !important;
  opacity: 1;
}

html.dark .auth-shell .field-wrap:focus-within .field-icon {
  color: var(--site-accent) !important;
}

.auth-shell .form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.auth-shell .checkbox-label,
html.dark .center.position-ref.full-height .auth-shell .checkbox-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.1rem;
  color: var(--c-muted) !important;
  cursor: pointer;
  user-select: none;
}

.auth-shell .checkbox-label input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.auth-shell .checkbox-box {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid var(--c-input-border) !important;
  background: var(--c-input-bg) !important;
  flex-shrink: 0;
  position: relative;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.auth-shell .checkbox-label input:checked + .checkbox-box {
  background: var(--site-brand-navy) !important;
  border-color: var(--site-brand-navy) !important;
  box-shadow: 0 0 12px var(--c-glow-gold);
}

html.dark .auth-shell .checkbox-label input:checked + .checkbox-box {
  background: var(--site-accent) !important;
  border-color: var(--site-accent) !important;
}

.auth-shell .checkbox-label input:checked + .checkbox-box::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 3px;
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

html.dark .auth-shell .checkbox-label input:checked + .checkbox-box::after {
  border-color: var(--site-brand-navy-deep);
}

.auth-shell .checkbox-label input:focus-visible + .checkbox-box {
  outline: 2px solid var(--site-accent);
  outline-offset: 2px;
}

.auth-shell a.form-link,
.auth-shell button.form-link,
html.dark .center.position-ref.full-height .auth-shell a.form-link,
html.dark .center.position-ref.full-height .auth-shell button.form-link {
  font-size: 1.1rem;
  color: var(--site-brand-navy) !important;
  text-decoration: none;
  transition: color 0.2s;
}

.auth-shell button.form-link {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-weight: inherit;
  line-height: inherit;
  cursor: pointer;
  width: auto !important;
}

html.dark .center.position-ref.full-height .auth-shell a.form-link,
html.dark .center.position-ref.full-height .auth-shell button.form-link {
  color: #e5b800 !important;
}

.auth-shell a.form-link:hover,
.auth-shell a.form-link:focus-visible,
.auth-shell button.form-link:hover,
.auth-shell button.form-link:focus-visible,
html.dark .center.position-ref.full-height .auth-shell a.form-link:hover,
html.dark .center.position-ref.full-height .auth-shell a.form-link:focus-visible,
html.dark .center.position-ref.full-height .auth-shell button.form-link:hover,
html.dark .center.position-ref.full-height .auth-shell button.form-link:focus-visible {
  color: var(--site-accent-hover) !important;
  outline: none;
}

html.dark .center.position-ref.full-height .auth-shell a.form-link:hover,
html.dark .center.position-ref.full-height .auth-shell button.form-link:hover {
  color: var(--site-accent) !important;
}

/* --- Buttons --- */
.auth-shell .btn,
.auth-shell button.btn {
  font-family: inherit;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  border-radius: var(--r-btn);
  transition:
    transform 0.22s var(--ease-main),
    box-shadow 0.22s ease,
    background 0.22s ease,
    opacity 0.22s ease,
    border-color 0.22s ease;
}

.auth-shell .btn:focus-visible {
  outline: 2px solid var(--site-accent);
  outline-offset: 3px;
}

.auth-shell button.btn.btn--primary,
.auth-shell .btn--primary {
  position: relative;
  width: 100%;
  padding: 18px 32px;
  margin-top: 8px;
  color: #ffffff !important;
  background: linear-gradient(135deg, var(--site-brand-navy) 0%, var(--site-brand-navy-dark) 100%) !important;
  box-shadow: 0 4px 24px rgba(0, 31, 91, 0.28);
  overflow: hidden;
  border: none !important;
}

.auth-shell button.btn.btn--primary:hover,
.auth-shell .btn--primary:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #0A2F70 0%, var(--site-brand-navy) 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 8px 32px rgba(0, 31, 91, 0.35), 0 0 24px var(--c-glow-gold);
}

.auth-shell .btn--primary:active {
  transform: translateY(0) scale(0.98);
}

html.dark .auth-shell button.btn.btn--primary,
html.dark .auth-shell .btn--primary {
  background: linear-gradient(135deg, var(--site-accent) 0%, var(--site-accent-hover) 100%) !important;
  color: var(--site-brand-navy-deep) !important;
  box-shadow: 0 4px 24px rgba(255, 209, 0, 0.22);
}

html.dark .auth-shell button.btn.btn--primary:hover,
html.dark .auth-shell .btn--primary:hover {
  background: linear-gradient(135deg, #ffe566 0%, var(--site-accent) 100%) !important;
  color: var(--site-brand-navy-deep) !important;
}

.auth-shell button.btn.btn--outline,
.auth-shell .btn--outline {
  padding: 16px 44px;
  color: #ffffff !important;
  background: transparent !important;
  border: 1.5px solid rgba(255, 255, 255, 0.55) !important;
  letter-spacing: 0.02em;
}

.auth-shell button.btn.btn--outline:hover,
.auth-shell .btn--outline:hover {
  background: rgba(255, 209, 0, 0.16) !important;
  border-color: var(--site-accent) !important;
  color: #ffffff !important;
  transform: translateY(-2px);
}

.auth-shell .btn--outline:active {
  transform: translateY(0) scale(0.98);
}

.auth-shell .social-divider,
html.dark .center.position-ref.full-height .auth-shell .social-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
  font-size: 1rem;
  color: var(--c-muted) !important;
  text-transform: lowercase;
}

.auth-shell .social-divider::before,
.auth-shell .social-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--c-border);
}

.auth-shell .social-row {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.auth-shell a.btn.btn--social,
.auth-shell .btn--social {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-input-bg) !important;
  border: 1px solid var(--c-input-border) !important;
  border-radius: 12px;
  color: var(--c-muted) !important;
  text-decoration: none;
}

.auth-shell .btn--social svg {
  width: 24px;
  height: 24px;
}

.auth-shell a.btn.btn--social:hover,
.auth-shell .btn--social:hover,
html.dark .center.position-ref.full-height .auth-shell a.btn.btn--social:hover {
  background: var(--site-brand-navy) !important;
  border-color: var(--site-brand-navy) !important;
  color: #ffffff !important;
  transform: translateY(-2px);
}

html.dark .center.position-ref.full-height .auth-shell a.btn.btn--social {
  color: var(--c-muted) !important;
}

html.dark .auth-shell a.btn.btn--social:hover {
  background: var(--site-accent) !important;
  border-color: var(--site-accent) !important;
  color: var(--site-brand-navy-deep) !important;
}

/* --- Gradient overlay panel --- */
.auth-shell .overlay-panel {
  position: absolute;
  top: 0;
  left: 50%;
  width: var(--panel-w);
  height: 100%;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl) var(--space-lg);
  background: linear-gradient(
    145deg,
    var(--site-brand-navy) 0%,
    var(--site-brand-navy-dark) 48%,
    var(--site-brand-navy-deep) 100%
  );
  background-size: 200% 200%;
  animation: authGradientShift 12s ease-in-out infinite alternate;
  color: #ffffff;
  clip-path: polygon(14% 0, 100% 0, 100% 100%, 0 100%);
  transition:
    transform var(--dur-switch) var(--ease-main) calc(var(--dur-switch) * 0.08),
    clip-path var(--dur-switch) var(--ease-main);
}

.auth-shell .auth-container.active .overlay-panel {
  transform: translateX(-100%);
  clip-path: polygon(0 0, 86% 0, 100% 100%, 0 100%);
}

@keyframes authGradientShift {
  0%   { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

.auth-shell .overlay-decor {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.auth-shell .decor-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.55;
}

.auth-shell .decor-orb--1 {
  width: 200px;
  height: 200px;
  top: -20%;
  right: -10%;
  background: rgba(255, 209, 0, 0.35);
  animation: authDecorFloat 8s ease-in-out infinite alternate;
}

.auth-shell .decor-orb--2 {
  width: 160px;
  height: 160px;
  bottom: 10%;
  left: -15%;
  background: rgba(255, 255, 255, 0.18);
  animation: authDecorFloat 10s ease-in-out infinite alternate-reverse;
}

.auth-shell .decor-orb--3 {
  width: 120px;
  height: 120px;
  top: 50%;
  right: 20%;
  background: rgba(255, 209, 0, 0.22);
  animation: authDecorFloat 7s ease-in-out infinite alternate;
  animation-delay: -3s;
}

@keyframes authDecorFloat {
  0%   { transform: translate(0, 0) scale(1); }
  100% { transform: translate(12px, -18px) scale(1.1); }
}

.auth-shell .decor-orbit {
  position: absolute;
  top: 8%;
  right: 12%;
  width: 90px;
  height: 90px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  animation: authOrbitSpin 20s linear infinite;
}

.auth-shell .decor-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--site-accent);
  box-shadow: 0 0 8px var(--site-accent);
}

.auth-shell .decor-dot--1 { top: -3px; left: 50%; transform: translateX(-50%); }
.auth-shell .decor-dot--2 { bottom: 20%; right: -3px; }
.auth-shell .decor-dot--3 { bottom: -3px; left: 30%; }

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

.auth-shell .decor-streak {
  position: absolute;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 209, 0, 0.55), transparent);
  transform-origin: left center;
}

.auth-shell .decor-streak--1 {
  width: 140px;
  top: 35%;
  left: 5%;
  transform: rotate(-18deg);
  animation: authStreakPulse 4s ease-in-out infinite;
}

.auth-shell .decor-streak--2 {
  width: 100px;
  bottom: 28%;
  right: 8%;
  transform: rotate(12deg);
  animation: authStreakPulse2 5s ease-in-out infinite;
}

@keyframes authStreakPulse {
  0%, 100% { opacity: 0.2; transform: rotate(-18deg) scaleX(0.8); }
  50%      { opacity: 0.7; transform: rotate(-18deg) scaleX(1.1); }
}

@keyframes authStreakPulse2 {
  0%, 100% { opacity: 0.15; transform: rotate(12deg) scaleX(0.7); }
  50%      { opacity: 0.6; transform: rotate(12deg) scaleX(1.15); }
}

.auth-shell .decor-grain {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 120px;
  animation: authGrainMove 6s steps(4) infinite;
}

@keyframes authGrainMove {
  0%, 100% { transform: translate(0, 0); }
  25%      { transform: translate(-3%, 2%); }
  50%      { transform: translate(2%, -2%); }
  75%      { transform: translate(-1%, -3%); }
}

.auth-shell .overlay-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 400px;
  transition: opacity calc(var(--dur-switch) * 0.35) var(--ease-main);
}

.auth-shell .overlay-title,
html.dark .center.position-ref.full-height .auth-shell .overlay-title {
  font-size: 2.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
  color: #ffffff !important;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.25);
}

.auth-shell .overlay-sub,
html.dark .center.position-ref.full-height .auth-shell .overlay-sub {
  font-size: 1.2rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.86) !important;
  margin-bottom: var(--space-lg);
}

.auth-shell .overlay-content--signup {
  opacity: 1;
  pointer-events: auto;
}

.auth-shell .overlay-content--signin,
.auth-shell .overlay-content--forgot {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition-delay: 0ms;
}

.auth-shell .auth-container.active .overlay-content--signup {
  opacity: 0;
  pointer-events: none;
  transition-delay: 0ms;
}

.auth-shell .overlay-content--signin {
  max-width: none;
  padding: 40px max(10%, 24px);
  margin-left:-10%;
}

.auth-shell .trade-account-card {
  width: 100%;
  max-width: 380px;
  margin-top: 15%;
  padding: 20px;
  border: 1px solid rgba(255, 209, 0, 0.65);
  border-radius: 16px;
  background: rgba(255, 209, 0, 0.09);
}

.auth-shell .trade-account-card__title,
html.dark .center.position-ref.full-height .auth-shell .trade-account-card__title {
  margin: 0 0 10px;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.35;
  color: #ffffff !important;
}

.auth-shell .trade-account-card__text,
html.dark .center.position-ref.full-height .auth-shell .trade-account-card__text {
  margin: 0 0 8px;
  font-size: 1.05rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.86) !important;
}

.auth-shell .trade-account-card__phone,
html.dark .center.position-ref.full-height .auth-shell .trade-account-card__phone {
  display: inline-block;
  padding: 8px 4px;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--site-accent) !important;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.auth-shell .trade-account-card__phone:hover {
  text-decoration-thickness: 2px;
}

.auth-shell .trade-account-card__phone:focus-visible {
  outline: 2px solid var(--site-accent);
  outline-offset: 4px;
  border-radius: 4px;
}

.auth-shell .auth-container.active:not(.forgot) .overlay-content--signin {
  opacity: 1;
  pointer-events: auto;
  transition-delay: calc(var(--dur-switch) * 0.42);
}

.auth-shell .auth-container.active.forgot .overlay-content--forgot {
  opacity: 1;
  pointer-events: auto;
  transition-delay: calc(var(--dur-switch) * 0.42);
}

/* --- Alerts --- */
.auth-shell .auth-alerts {
  margin-bottom: var(--space-sm);
}

.auth-shell .auth-alert {
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 1.1rem;
  line-height: 1.45;
  margin-bottom: 8px;
}

.auth-shell .auth-alert:last-child {
  margin-bottom: 0;
}

.auth-shell .auth-alert--error {
  background: rgba(220, 38, 38, 0.1) !important;
  border: 1px solid rgba(220, 38, 38, 0.35) !important;
  color: #b91c1c !important;
}

html.dark .auth-shell .auth-alert--error {
  background: rgba(255, 45, 45, 0.12) !important;
  color: #ff9d9d !important;
}

.auth-shell .auth-alert--success {
  background: rgba(22, 163, 74, 0.1) !important;
  border: 1px solid rgba(22, 163, 74, 0.35) !important;
  color: #15803d !important;
}

html.dark .auth-shell .auth-alert--success {
  background: rgba(46, 204, 113, 0.12) !important;
  color: #7ee2a8 !important;
}

@media (max-width: 980px) {
  .auth-shell {
    width: 980px;

    /* Tighter rhythm so the card reads phone-sized, not shrunken desktop */

    padding: 18px 14px;
    min-height: 0;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .auth-shell .auth-container {
    width: min(100%, 560px);
    margin: 0 auto;
    height: auto;
    min-height: calc(var(--mobile-overlay-h) + var(--mobile-form-h));
  }

  .auth-shell .overlay-panel {
    left: 0;
    width: 100%;
    height: var(--mobile-overlay-h);
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
    transform: translateY(0) translateX(0);
    transition:
      transform var(--dur-switch) var(--ease-main) calc(var(--dur-switch) * 0.08),
      clip-path var(--dur-switch) var(--ease-main);
  }

  .auth-shell .auth-container.active .overlay-panel {
    transform: translateY(var(--mobile-form-h)) translateX(0);
    clip-path: polygon(0 10%, 100% 0, 100% 100%, 0 100%);
  }

  .auth-shell .form-panel {
    width: 100%;
    top: var(--mobile-overlay-h);
    height: var(--mobile-form-h);
    padding: var(--space-lg) var(--space-md);
    align-items: flex-start;
    overflow-y: auto;
  }

  .auth-shell .form-panel--login {
    left: 0;
    transform: translateX(0);
  }

  .auth-shell .auth-container.active .form-panel--login {
    transform: translateX(0) translateY(-40px);
  }

  .auth-shell .form-panel--register {
    right: 0;
    transform: translateX(0) translateY(40px);
  }

  .auth-shell .auth-container.active .form-panel--register {
    top: 0;
    transform: translateX(0) translateY(0);
  }

  .auth-shell .decor-orbit {
    width: 60px;
    height: 60px;
    top: 5%;
    right: 8%;
  }

  .auth-shell .decor-orb--1 { width: 120px; height: 120px; }
  .auth-shell .decor-orb--2 { width: 90px; height: 90px; }

  .auth-shell .light-sweep {
    width: 100%;
    height: 28%;
    left: 0;
    top: -30%;
    background: linear-gradient(
      180deg,
      transparent 0%,
      rgba(255, 255, 255, 0.08) 40%,
      rgba(255, 209, 0, 0.22) 50%,
      rgba(255, 255, 255, 0.08) 60%,
      transparent 100%
    );
    animation-name: authLightSweepMobile;
  }

  /* Belt-and-braces: nothing inside the shell may push the page wider */
  .auth-shell .bg-ambient,
  .auth-shell .overlay-decor {
    max-width: 100%;
  }

  .auth-shell .overlay-content--signin {
    margin-left:auto;
  }

  @keyframes authLightSweepMobile {
    0%   { opacity: 0; transform: translateY(0); }
    15%  { opacity: 1; }
    85%  { opacity: 1; }
    100% { opacity: 0; transform: translateY(430%); }
  }
}

/* --- Phone --- */
@media (max-width: 560px) {
  .auth-shell {
    width: 560px;

    padding: 14px 10px;
  }

  .auth-shell .auth-container {
    border-radius: var(--r-container);
  }

  .auth-shell .auth-form {
    gap: 12px;
  }

  .auth-shell .field-label,
  .auth-shell .checkbox-label,
  .auth-shell a.form-link,
  .auth-shell button.form-link,
  .auth-shell .social-divider {
    font-size: 1rem;
  }

  .auth-shell input.field-input,
  .auth-shell .field-input {
    font-size: 16px; /* stops iOS Safari zooming the field on focus */
    height: 46px;
  }

  .auth-shell .btn--primary,
  .auth-shell button.btn,
  .auth-shell .btn {
    width: 100%;
  }

  .auth-shell .btn--social {
    width: 48px !important;
    height: 48px !important;
  }

  .auth-shell .btn--social svg {
    width: 20px;
    height: 20px;
  }

  .auth-shell .social-row {
    gap: 10px;
  }
}

@media (max-width: 400px) {
  .auth-shell .form-title { font-size: 2rem; }
  .auth-shell .overlay-title { font-size: 1.7rem; }
  .auth-shell .auth-form { max-width: 100%; }
  .auth-shell .form-panel { padding-left: 14px; padding-right: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-shell *, .auth-shell *::before, .auth-shell *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.2s !important;
  }

  .auth-shell .form-panel--register .field--stagger {
    opacity: 1;
    transform: none;
  }

  .auth-shell .auth-container.active .form-panel--register .field--stagger {
    transition-delay: 0ms !important;
  }

  .auth-shell .form-panel--login,
  .auth-shell .form-panel--register {
    filter: none !important;
  }

  .auth-shell .light-sweep.is-active {
    display: none;
  }

  .auth-shell .bg-orb,
  .auth-shell .decor-orb,
  .auth-shell .decor-orbit,
  .auth-shell .decor-streak,
  .auth-shell .decor-grain,
  .auth-shell .bg-grain {
    animation: none !important;
  }
}
