/* ═══════════════════════════════════════════════════════════════════════════
   EdgePath — Authentication Design System (single source of truth)
   Linked last in every auth page's <head>. Replaces the old auth.css,
   auth-theme.css, and the legacy per-page inline override blocks.

   Layout summary:
   • Desktop (≥1024px): two-column CSS grid. Left = dark EdgePath brand
     panel (~47%). Right = clean white form panel, content centered,
     max 440px, min-width 0.
   • Tablet (768–1023px) & Mobile (<768px): single centered column on a
     white canvas, brand panel hidden, form always fully visible.
   • Fundamental rule: min-heights in dvh (with vh fallback), natural page
     scrolling, no 100vw, no absolute positioning of the form, no negative
     margins, no inner scrollbars hiding layout.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Reset / safety net ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  min-height: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  background: #ffffff;
  color: #0B1F16;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

img, svg, canvas, video, embed, object { max-width: 100%; }
input, button, textarea, select { max-width: 100%; box-sizing: border-box; }

/* ── CSS variables (also feed the small per-page inline styles) ─────────── */
:root {
  --primary:         #3C2080;
  --primary-hover:   #261353;
  --primary-light:   #6650C0;
  --accent:          #6650C0;
  --accent-bright:   #A090D8;
  --accent-glow:     rgba(102, 80, 192, 0.15);
  --bg-main:         #FFFFFF;
  --card-bg:         #FFFFFF;
  --text-main:       #180838;
  --text-secondary:  #5D6E66;
  --border-color:    #D9E2DD;
  --border-focus:    #6650C0;
  --success:         #22C55E;
  --danger:          #EF4444;
  --warning:         #F59E0B;
  --radius-card:     20px;
  --radius-input:    12px;
  --radius-btn:      12px;
  --transition:      all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --font-sans:       'Poppins', sans-serif;
}

/* ═════════════════════════════════════════════════════════════════════════
   BASE LAYOUT — single centered column (mobile & tablet)
   ═════════════════════════════════════════════════════════════════════════ */
.auth-container {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: #ffffff;
}

.auth-card {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: #ffffff;
  display: block;
}

/* Brand hero panel never leaks into the single-column layout */
.auth-left { display: none; }

/* White form panel: flex column, safe centering via auto margins so tall
   forms still scroll naturally from the top instead of clipping */
.auth-right {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 40px 24px;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #ffffff;
}

.auth-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  margin: auto;
  background: #ffffff;
}

/* Trust footer pinned to the bottom of the form column */
.auth-foot {
  width: 100%;
  max-width: 440px;
  margin: 28px auto 0;
  padding-top: 16px;
  border-top: 1px solid #EEF2F0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #8A9A92;
}
.auth-foot a { color: #3C2080; text-decoration: none; font-weight: 600; transition: color 0.2s ease; }
.auth-foot a:hover { color: #261353; text-decoration: underline; }

/* Decorative bits from legacy markup are hidden on the clean canvas */
.auth-leaf,
.auth-leaf img,
.auth-right > img[aria-hidden="true"],
.auth-visual { display: none !important; }

/* ── "Back to home" link pinned top-left of the form panel ── */
.auth-goback {
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #8A9A92;
  text-decoration: none;
  transition: color 0.2s ease;
}
.auth-goback:hover { color: #180838; }
.auth-goback i, .auth-goback svg { width: 16px; height: 16px; }

/* ═════════════════════════════════════════════════════════════════════════
   RIGHT PANEL — shared auth components
   ═════════════════════════════════════════════════════════════════════════ */

/* Centered logo */
.auth-form-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 22px;
}
.auth-form-logo img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

/* Header */
.auth-header { text-align: center; margin-bottom: 26px; }
.auth-header h1 {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 5.2vw, 2.1rem);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.02em;
  color: var(--text-main);
  overflow-wrap: anywhere;
}
.auth-header p {
  margin: 0;
  font-size: clamp(0.9rem, 2.8vw, 1rem);
  line-height: 1.55;
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}
.auth-header-em { font-size: 0.75rem; color: var(--text-secondary); margin-top: 10px; }
.email-highlight { font-weight: 700; color: #6650C0; }

/* Page icon badge (verify / reset / forgot) */
.page-icon-badge {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: rgba(102, 80, 192, 0.12);
  border: 1.5px solid rgba(102, 80, 192, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6650C0;
}
.page-icon-badge svg { width: 28px; height: 28px; }

/* ── Sign In | Sign Up navigation — modern underline tabs ── */
.auth-tabs {
  position: relative;
  display: flex;
  width: 100%;
  gap: 2px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 0;
  padding: 0;
  margin: 0 0 26px;
}
.auth-tabs .tab-btn {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 11px 12px 13px;
  border-radius: 10px 10px 0 0;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-secondary);
  z-index: 2;
  text-align: center;
  white-space: nowrap;
  transition: color 0.18s ease, background-color 0.18s ease;
}
.auth-tabs .tab-btn::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: -1px;
  height: 2.5px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(90deg, #6650C0, #A090D8);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.24s cubic-bezier(0.4, 0, 0.2, 1);
}
.auth-tabs .tab-btn:hover { color: var(--text-main); background: rgba(102, 80, 192, 0.08); }
.auth-tabs .tab-btn.active { color: var(--text-main); }
.auth-tabs .tab-btn.active::after { transform: scaleX(1); }
/* legacy sliding pill is retired by the underline design */
.auth-tabs .tab-slider { display: none !important; }
html.dark .auth-tabs { border-bottom-color: rgba(255, 255, 255, 0.12); }
html.dark .auth-tabs .tab-btn { color: #94a3b8; }
html.dark .auth-tabs .tab-btn:hover,
html.dark .auth-tabs .tab-btn.active { color: #6ee7b7; }
html.dark .auth-tabs .tab-btn:hover { background: rgba(20, 184, 134, 0.12); }
@media (prefers-reduced-motion: reduce) {
  .auth-tabs .tab-btn, .auth-tabs .tab-btn::after { transition: none; }
}

/* ── Error / success alerts — always INSIDE the form container ── */
#alertBox,
#alert-container { width: 100%; }
.auth-right .ep-alert {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #FECACA;
  background: #FEF2F2;
  color: #9A1B1B;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.auth-right .ep-alert i,
.auth-right .ep-alert svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: 1px; }
.auth-right .ep-alert-danger {
  background: #FEF2F2;
  border-color: #FECACA;
  color: #9A1B1B;
}
.auth-right .ep-alert-success {
  background: #F0FDF4;
  border-color: #BBF7D0;
  color: #166534;
}

/* ── Forms ── */
.form-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  min-width: 0;
}
.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: 0.01em;
}

.input-container {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  background: #ffffff;
  border: 1.5px solid #D9E2DD;
  border-radius: 12px;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.input-container:focus-within {
  border-color: #18C964;
  box-shadow: 0 0 0 4px rgba(24, 201, 100, 0.12);
}

/* High specificity + !important to beat ep-interface.css's site-wide
   `main input` rule (which loads before this file) */
main.auth-right .input-container input,
main.auth-right .input-container select {
  width: 100%;
  min-width: 0;
  height: 52px;
  min-height: 52px;
  padding: 0 2.9rem;
  background: transparent !important;
  border: none !important;
  border-radius: 12px;
  box-shadow: none !important;
  outline: none;
  font-family: inherit;
  font-size: 1rem;
  color: #180838 !important;
  -webkit-appearance: none;
  appearance: none;
}
main.auth-right .input-container input::placeholder,
main.auth-right .input-container select::placeholder {
  color: #9AA8A0 !important;
  opacity: 1;
}
main.auth-right .input-container input:focus,
main.auth-right .input-container select:focus {
  background: transparent !important;
  border-color: #6650C0 !important;
  box-shadow: none !important;
}
main.auth-right .input-container input:-webkit-autofill,
main.auth-right .input-container input:-webkit-autofill:hover,
main.auth-right .input-container input:-webkit-autofill:focus,
main.auth-right .input-container input:autofill {
  -webkit-text-fill-color: #180838 !important;
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
  box-shadow: 0 0 0 1000px #ffffff inset !important;
  background: #ffffff !important;
  caret-color: #180838 !important;
}
.auth-right input { caret-color: #6650C0; }

.input-container .input-icon {
  position: absolute;
  left: 1rem;
  color: #9AA8A0;
  width: 18px;
  height: 18px;
  pointer-events: none;
  z-index: 3;
  transition: color 0.2s ease;
}
.input-container:focus-within .input-icon { color: #6650C0; }

.password-toggle {
  position: absolute;
  right: 0.7rem;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  background: none;
  border: none;
  color: #9AA8A0;
  cursor: pointer;
  border-radius: 8px;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.password-toggle:hover { color: #3C2080; background: #F3F0FA; }
.password-toggle svg { width: 18px; height: 18px; }

/* Two-per-row fields (register / reset) */
.name-row,
.field-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  min-width: 0;
}
.name-row .form-group,
.field-row-2 .form-group { margin-bottom: 14px; }

#pwd-strength {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: #E4EBE7;
  margin-top: 6px;
  transition: all 0.3s ease;
}

/* OTP-style inputs keep their large spaced characters */
input[name="otp_code"] { text-align: center; }

/* Remember-me / forgot row */
.form-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 22px;
  font-size: 0.86rem;
}
.checkbox-container {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  user-select: none;
  position: relative;
}
.checkbox-container input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.checkbox-custom {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1.5px solid #C7D4CC;
  background: #ffffff;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.checkbox-custom::after {
  content: "";
  width: 5px;
  height: 9px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-top: -2px;
  display: none;
}
.checkbox-container input:checked ~ .checkbox-custom { background: #6650C0; border-color: #6650C0; }
.checkbox-container input:checked ~ .checkbox-custom::after { display: block; }
.checkbox-label { color: var(--text-secondary); font-size: 0.86rem; }

.forgot-link {
  color: #3C2080;
  font-weight: 600;
  font-size: 0.86rem;
  text-decoration: none;
  transition: color 0.2s ease;
}
.forgot-link:hover { color: #261353; text-decoration: underline; }

/* ── Primary button ── */
main.auth-right .btn-primary {
  width: 100%;
  min-width: 0;
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
  background: #6650C0;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
main.auth-right .btn-primary:hover:not(:disabled) {
  background: #4D2EB3;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -12px rgba(102, 80, 192, 0.55);
}
main.auth-right .btn-primary:active:not(:disabled) { transform: translateY(0) scale(0.99); }
main.auth-right .btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn-primary .btn-arrow { width: 17px; height: 17px; flex-shrink: 0; transition: transform 0.25s ease; }
.btn-primary:hover:not(:disabled) .btn-arrow { transform: translateX(4px); }

.btn-primary .spinner {
  display: none;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.25);
  border-top-color: #ffffff;
  animation: epAuthSpin 0.8s linear infinite;
}
@keyframes epAuthSpin { to { transform: rotate(360deg); } }

/* ── Divider / Google ── */
.or-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 16px;
}
.or-divider::before,
.or-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #E4EBE7;
}
.or-divider span {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  color: #8A9A92;
  white-space: nowrap;
}

.social-top { display: flex; }
main.auth-right .btn-google,
main.auth-right .btn-social {
  width: 100%;
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #ffffff;
  border: 1.5px solid #D9E2DD;
  border-radius: 12px;
  color: #180838;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
main.auth-right .btn-google:hover,
main.auth-right .btn-social:hover {
  border-color: #B8C9BF;
  background: #F7FAF8;
  transform: translateY(-1px);
}
main.auth-right .btn-google:disabled,
main.auth-right .btn-social:disabled { cursor: not-allowed; opacity: 0.6; }
.btn-google svg, .btn-social svg { width: 19px; height: 19px; flex-shrink: 0; }

/* ── Secondary link (Back to Sign In etc.) ── */
.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 24px auto 0;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}
.back-link:hover { color: var(--text-main); }
.back-link i, .back-link svg { width: 16px; height: 16px; }

/* ── Resend ── */
.resend-row { text-align: center; margin-top: 18px; }
.resend-btn {
  background: none;
  border: none;
  padding: 0;
  color: #3C2080;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
}
.resend-btn:hover { text-decoration: underline; }
.resend-btn:disabled { opacity: 0.5; cursor: default; text-decoration: none; }

/* ── Dev reset-link card (forgot-password) ── */
.dev-link-card {
  margin-top: 14px;
  background: #F7FAF8;
  border: 1px solid #E4EBE7;
  border-radius: 14px;
  padding: 16px 18px;
}
.dev-link-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: #6650C0;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.dev-link-card p { margin: 0 0 10px; font-size: 0.85rem; color: var(--text-secondary); }
.dev-link-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px dashed rgba(102, 80, 192, 0.4);
  border-radius: 10px;
  padding: 8px 10px;
}
.dev-link-row a {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.8rem;
  color: var(--text-main);
  text-decoration: none;
  font-family: 'Courier New', monospace;
}
.dev-link-row a:hover { text-decoration: underline; }
.dev-copy-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #6650C0;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}
.dev-copy-btn:hover { filter: brightness(1.05); }
.dev-copy-btn svg { width: 13px; height: 13px; }

/* ── QR setup (reset-password-link) ── */
.qr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: #F7FAF8;
  border: 1px solid #E4EBE7;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 18px;
}
#qrcode { line-height: 0; }
#qrcode img, #qrcode canvas {
  border-radius: 8px;
  background: #ffffff;
  padding: 6px;
  max-width: 100%;
  height: auto;
}
.secret-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: #ffffff;
  border: 1px dashed #DED8F0;
  border-radius: 10px;
  padding: 8px 8px 8px 12px;
}
.secret-row span {
  flex: 1;
  min-width: 0;
  word-break: break-all;
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: #3C2080;
}
.secret-copy-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #6650C0;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}
.secret-copy-btn:hover { filter: brightness(1.05); }
.secret-copy-btn svg { width: 13px; height: 13px; }
.qr-copy-hint { font-size: 0.72rem; color: var(--text-secondary); }
.setup-steps {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: left;
  margin: 0 0 20px;
  padding-left: 1.2rem;
}
.setup-steps li { margin-bottom: 4px; }

/* ── Switch text (register/login) ── */
.auth-switch-text {
  text-align: center;
  margin-top: 20px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.auth-switch-text a { color: #3C2080; font-weight: 700; text-decoration: none; }
.auth-switch-text a:hover { text-decoration: underline; color: #261353; }

/* ═════════════════════════════════════════════════════════════════════════
   DESKTOP — two-column split (≥1024px)
   ═════════════════════════════════════════════════════════════════════════ */
@media (min-width: 1024px) {
  .auth-card {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    align-items: stretch;
  }

  .auth-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    position: relative;
    overflow: hidden;
    padding: 48px;
    background:
      radial-gradient(110% 90% at 18% 0%, rgba(102, 80, 192, 0.25) 0%, transparent 55%),
      radial-gradient(90% 80% at 92% 100%, rgba(60, 32, 128, 0.35) 0%, transparent 60%),
      linear-gradient(165deg, #24104c 0%, #180838 100%);
  }

  /* subtle trading-chart grid */
  .auth-left::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
      linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 46px 46px;
    -webkit-mask-image: radial-gradient(120% 100% at 30% 20%, #000 30%, transparent 78%);
    mask-image: radial-gradient(120% 100% at 30% 20%, #000 30%, transparent 78%);
  }
  /* soft candle glow */
  .auth-left::after {
    content: '';
    position: absolute;
    right: -90px;
    bottom: -90px;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
    background: radial-gradient(circle, rgba(102, 80, 192, 0.25) 0%, transparent 65%);
  }

  .auth-logo,
  .auth-hero-text,
  .auth-hero-stats {
    position: relative;
    z-index: 1;
  }

  .auth-logo {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: -0.3px;
  }
  .auth-logo img { width: 34px; height: 34px; object-fit: contain; }
  .auth-logo span { color: #ffffff; }

  .auth-hero-text {
    margin: auto 0;
    padding: 32px 0 24px;
    text-align: center;
  }
  .auth-hero-text h2 {
    margin: 0 0 20px;
    font-size: clamp(2.6rem, 4vw, 3.8rem);
    font-weight: 900;
    line-height: 1.04;
    letter-spacing: -0.04em;
    color: #ffffff;
    text-shadow: 0 2px 20px rgba(0,0,0,.25);
  }
  .auth-hero-text h2 span {
    color: #A090D8;
    display: inline-block;
    background: linear-gradient(90deg, #A090D8, #DED8F0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
  .auth-hero-text p {
    margin: 0 auto;
    max-width: 380px;
    font-size: 1rem;
    line-height: 1.65;
    color: rgba(233, 246, 239, 0.80);
    overflow-wrap: anywhere;
    font-weight: 500;
    text-align: center;
  }

  .auth-hero-stats {
    flex-shrink: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
  }
  .auth-hero-stats .stat {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
  }
  .auth-hero-stats .stat i {
    width: 16px;
    height: 16px;
    color: #34D399;
    flex-shrink: 0;
  }
  .auth-hero-stats .stat span {
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.35;
    color: rgba(233, 246, 239, 0.9);
  }

  .auth-right {
    min-width: 0;
    padding: 48px 40px;
  }

  .auth-goback { top: 28px; left: 36px; }
}

/* ═════════════════════════════════════════════════════════════════════════
   TABLET (768–1023px)
   The reduced-width split would clip a 440px form, so the brand panel hides
   and the form takes the whole column — centered, fully visible.
   ═════════════════════════════════════════════════════════════════════════ */
@media (min-width: 768px) and (max-width: 1023px) {
  .auth-right { padding: 48px 32px; }
  .auth-form-logo img { width: 54px; height: 54px; }
}

/* ═════════════════════════════════════════════════════════════════════════
   MOBILE (<768px)
   ═════════════════════════════════════════════════════════════════════════ */
@media (max-width: 767px) {
  .auth-right { padding: 28px 20px; }
  .auth-header h1 { font-size: clamp(1.45rem, 6.4vw, 1.85rem); }
  .auth-goback { top: 18px; left: 18px; }
  .auth-form-logo img { width: 44px; height: 44px; }
  .name-row,
  .field-row-2 { grid-template-columns: 1fr; }
}

/* ═════════════════════════════════════════════════════════════════════════
   VERY SMALL MOBILE (≤360px)
   ═════════════════════════════════════════════════════════════════════════ */
@media (max-width: 360px) {
  .auth-right { padding: 16px; }
  main.auth-right .input-container input { height: 48px; min-height: 48px; }
  main.auth-right .btn-primary { min-height: 48px; }
  main.auth-right .btn-google,
  main.auth-right .btn-social { min-height: 48px; }
  .auth-header h1 { font-size: 1.45rem; }
  .auth-wrap { max-width: 100%; }
  .form-group { margin-bottom: 16px; }
  .form-actions-row { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* ── Landscape phones / very short viewports ─────────────────────────────── */
@media (max-height: 560px) and (orientation: landscape) {
  .auth-right { padding-top: 24px; padding-bottom: 24px; }
  main.auth-right .input-container input { height: 48px; min-height: 48px; }
  main.auth-right .btn-primary { min-height: 48px; }
  .auth-form-logo { margin-bottom: 14px; }
  .form-group { margin-bottom: 14px; }
}

/* ── Reduced motion ──────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}