/* Auth Pro Max — login / register surface. Scoped to the auth shell so it does
   not affect the marketing pages. */

body.auth-page .ai-root,
body.auth-page .ai-fab,
body.auth-page .ai-panel,
body.auth-page #mobile-tabbar,
body:has(.auth-shell) .ai-root,
body:has(.auth-shell) .ai-fab,
body:has(.auth-shell) .ai-panel,
body:has(.auth-shell) #mobile-tabbar {
  display: none !important;
}

body.auth-page,
body:has(.auth-shell) {
  background: #eef2f9;
}

.auth-shell {
  --auth-brand: #2f5bff;
  --auth-teal: #0f9f96;
  --auth-ink: #071527;
  --auth-muted: #5d6b82;
  grid-template-columns: minmax(0, 1.08fr) minmax(480px, .92fr);
  min-height: 100dvh;
}

.auth-side {
  background:
    radial-gradient(900px 600px at 12% 8%, rgba(47, 91, 255, .34), transparent 55%),
    radial-gradient(700px 540px at 92% 92%, rgba(15, 159, 150, .22), transparent 60%),
    linear-gradient(145deg, #071527 0%, #0b1e3a 58%, #07121f 100%);
}

.auth-side-inner {
  padding: clamp(30px, 4vw, 68px);
}

.auth-brand-word {
  font-size: clamp(1.55rem, 2.4vw, 2rem);
  letter-spacing: -.055em;
}

.auth-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .06);
  color: #dbe5ff;
  font-size: 11.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.auth-quote {
  font-size: clamp(2.2rem, 3.2vw, 3.15rem);
  line-height: 1.06;
  max-width: 640px;
  letter-spacing: -.055em;
}

.auth-shell [hidden] { display: none !important; }

.auth-lede {
  max-width: 38ch;
  color: rgba(220, 232, 248, .82);
  font-size: 15px;
}

.auth-bullets li {
  padding: 6px 0;
}

/* Right column ------------------------------------------------------------ */
.auth-form-wrap {
  position: relative;
  display: block;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(22px, 4vh, 44px) clamp(16px, 3vw, 40px);
  background:
    radial-gradient(900px 500px at 92% 0%, rgba(47, 91, 255, .09), transparent 64%),
    radial-gradient(700px 500px at 0% 100%, rgba(15, 159, 150, .07), transparent 62%),
    #f4f6fb;
  scrollbar-width: thin;
}

.auth-topbar {
  width: 100%;
  max-width: 488px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  color: var(--auth-muted);
}

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #334155;
  font-weight: 650;
  text-decoration: none;
}

.auth-back:hover { color: var(--auth-brand); }

.auth-secure {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #0f766e;
  font-weight: 650;
}

.auth-secure::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, .14);
}

.auth-panel,
.auth-card {
  width: 100%;
  max-width: 488px;
  margin: 0 auto;
  padding: clamp(24px, 3vw, 36px);
  border-radius: 26px;
  border: 1px solid rgba(15, 23, 42, .08);
  background: rgba(255, 255, 255, .96);
  box-shadow:
    0 40px 90px -48px rgba(7, 21, 39, .45),
    0 2px 8px rgba(7, 21, 39, .04);
  animation: auth-rise .55s var(--ease-out) both;
}

.auth-tabs {
  background: #eef1f7;
  border-radius: 15px;
  padding: 5px;
}

.auth-tab {
  height: 44px;
  font-size: 14px;
  border-radius: 11px;
  color: #64748b;
}

.auth-tab.active { color: var(--auth-ink); }

.auth-tab-ink {
  background: #fff;
  border-radius: 11px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, .08), 0 0 0 1px rgba(15, 23, 42, .05);
}

.auth-card-head {
  margin-top: 24px;
}

.auth-eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--auth-brand);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.auth-card-head h1 {
  font-size: clamp(1.75rem, 2.4vw, 2.15rem);
  letter-spacing: -.045em;
}

.auth-card-head p {
  margin-top: 7px;
  font-size: 14px;
}

.auth-form {
  gap: 13px;
  margin-top: 20px;
}

.auth-input .input {
  height: 52px;
  border-radius: 14px;
  border-color: #d7dfe9;
  font-size: 14px;
}

.auth-input .input:focus {
  border-color: var(--auth-brand);
  box-shadow: 0 0 0 4px rgba(47, 91, 255, .13);
}

.auth-submit {
  height: 54px;
  border-radius: 15px;
  background: linear-gradient(115deg, #2f5bff 0%, #0f9f96 115%) !important;
  box-shadow: 0 18px 38px -18px rgba(47, 91, 255, .76);
  font-size: 14.5px;
}

.auth-submit:hover:not(:disabled) {
  box-shadow: 0 22px 46px -18px rgba(47, 91, 255, .86);
}

.auth-switch {
  margin-top: 18px;
  font-size: 13px;
}

.auth-switch a { color: var(--auth-brand); }

.auth-divider {
  margin: 20px 0 14px;
  color: #94a3b8;
}

.auth-divider::before,
.auth-divider::after { background: #e2e8f0; }

.auth-shell .oauth-grid {
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.auth-shell .oauth-btn {
  min-height: 46px;
  border-radius: 13px;
  border-color: #dbe2ea;
  font-size: 12.5px;
  background: #fff;
}

.auth-shell .oauth-btn:hover {
  border-color: rgba(47, 91, 255, .45);
  box-shadow: 0 8px 22px -16px rgba(47, 91, 255, .7);
}

.auth-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #edf1f6;
  color: #748399;
  font-size: 11.5px;
}

.auth-trust span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.auth-trust .icon { width: 13px; height: 13px; color: #0f9f96; }

.auth-link { color: var(--auth-brand); }

.auth-role-card {
  border-radius: 15px;
  border-color: #dbe2ea;
}

.auth-role input:checked + .auth-role-card {
  border-color: var(--auth-brand);
  background: rgba(47, 91, 255, .045);
  box-shadow: 0 0 0 3px rgba(47, 91, 255, .11);
}

.auth-role-ico {
  color: var(--auth-brand);
  background: rgba(47, 91, 255, .09);
}

.auth-qr .btn,
.auth-form .btn-outline {
  border-color: #dbe2ea;
}

@media (max-width: 1100px) {
  .auth-shell { grid-template-columns: minmax(0, 1fr) minmax(440px, .95fr); }
  .auth-shell .oauth-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto;
    min-height: 100dvh;
  }
  .auth-shell > .auth-side { min-height: 0; }
  .auth-side-inner {
    min-height: 0;
    padding: 16px 18px 14px;
    gap: 0;
  }
  .auth-side-copy,
  .auth-side-meta,
  .auth-stage { display: none; }
  .auth-brand-word { font-size: 1.45rem; }
  .auth-form-wrap {
    display: block;
    padding: 10px 12px 40px;
    overflow: visible;
  }
  .auth-topbar { max-width: 100%; margin-bottom: 10px; }
  .auth-panel, .auth-card {
    max-width: 100%;
    padding: 20px 16px;
    border-radius: 20px;
  }
  .auth-card-head { margin-top: 18px; }
  .auth-card-head h1 { font-size: 1.55rem; }
  .auth-form { gap: 11px; margin-top: 16px; }
  .auth-submit { height: 50px; }
  .auth-shell .oauth-grid { grid-template-columns: 1fr 1fr; }
  .auth-qr { margin: 8px 0 !important; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-panel, .auth-card { animation: none; }
}
