/*
 * Orqit auth UI — cinematic dark shell (aligned with product marketing pages).
 * Loaded after orqit-auth.css.
 */

:root {
  --auth-cin-bg: #070b14;
  --auth-cin-ink: #f8fafc;
  --auth-cin-muted: rgba(226, 232, 240, 0.78);
  --auth-cin-line: rgba(148, 163, 184, 0.18);
  --auth-cin-card: rgba(15, 23, 42, 0.72);
  --auth-cin-cyan: #67e8f9;
  --auth-cin-teal: #34d399;
  --auth-cin-cta: linear-gradient(125deg, #67e8f9 0%, #22d3ee 42%, #34d399 100%);
  --auth-cin-shadow: 0 22px 48px rgba(0, 0, 0, 0.45);
}

body.orqit-auth-page,
body.orqit-auth-page--cinematic {
  font-family: "Plus Jakarta Sans", "Outfit", system-ui, sans-serif;
  color: var(--auth-cin-ink);
  background: var(--auth-cin-bg);
}

/* Dark-shell logos: show the light-on-dark mark */
body.orqit-auth-page .pub-nav__logo .pub-nav__logo-img--light {
  display: none !important;
}

body.orqit-auth-page .pub-nav__logo .pub-nav__logo-img--dark {
  display: block !important;
}

body.orqit-auth-page .pub-footer__brand .pub-footer__brand-img--light {
  display: none !important;
}

body.orqit-auth-page .pub-footer__brand .pub-footer__brand-img--dark {
  display: block !important;
}

body.orqit-auth-page .pub-nav,
body.orqit-auth-page .pub-nav__link,
body.orqit-auth-page .pub-nav__mega-trigger {
  color: rgba(248, 250, 252, 0.92);
}

body.orqit-auth-page .pub-nav::before {
  background: rgba(7, 11, 20, 0.78) !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

body.orqit-auth-page .pub-nav.is-scrolled::before {
  background: rgba(7, 11, 20, 0.92) !important;
}

body.orqit-auth-page .pub-nav__burger span {
  background: #e2e8f0;
}

.auth-scope-premium {
  position: relative;
  isolation: auto;
  overflow-x: visible;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 70% 55% at 88% 0%, rgba(34, 211, 238, 0.16), transparent 55%),
    radial-gradient(ellipse 50% 40% at 8% 30%, rgba(52, 211, 153, 0.1), transparent 50%),
    linear-gradient(180deg, #0a101c 0%, #070b14 100%);
}

.auth-atmosphere {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.auth-atmosphere__grid {
  position: absolute;
  inset: -1px;
  background-image: radial-gradient(rgba(148, 163, 184, 0.14) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 88%);
  opacity: 0.35;
}

.auth-atmosphere__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.45;
  animation: authOrbFloat 18s ease-in-out infinite;
}

.auth-atmosphere__orb--a {
  width: min(46vw, 420px);
  height: min(46vw, 420px);
  background: rgba(34, 211, 238, 0.35);
  top: -12%;
  right: -6%;
}

.auth-atmosphere__orb--b {
  width: min(40vw, 360px);
  height: min(40vw, 360px);
  background: rgba(52, 211, 153, 0.22);
  bottom: -10%;
  left: -8%;
  animation-delay: -8s;
}

/* Keep old blob class names from breaking if reused */
.auth-atmosphere__blob {
  display: none;
}

@keyframes authOrbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(2%, 3%) scale(1.05); }
}

.auth-scope-premium .pub-nav {
  position: relative;
  z-index: 8000;
  flex-shrink: 0;
}

.auth-scope-premium .auth-global-wrap {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  width: 100%;
  /* Extra room under sticky nav so the slug step sits fully in view */
  padding:
    clamp(3.25rem, 7vw, 5.5rem)
    clamp(16px, 4vw, 28px)
    clamp(3.5rem, 8vw, 5.75rem);
  background: transparent;
  overflow-x: clip;
}

.auth-scope-premium .auth-global-stage {
  align-items: center;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  gap: clamp(1.75rem, 4vw, 3.25rem);
}

.auth-scope-premium .auth-global-content {
  min-width: 0;
  position: relative;
  z-index: 2;
  padding: 0;
  animation: authFadeUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

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

.auth-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--auth-cin-cyan);
}

.auth-eyebrow__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--auth-cin-cyan);
  box-shadow: 0 0 12px rgba(103, 232, 249, 0.7);
}

.auth-scope-premium .auth-global-title {
  margin: 0 0 0.75rem;
  font-family: "Outfit", "Plus Jakarta Sans", system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #f8fafc !important;
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
}

.auth-scope-premium .auth-global-copy {
  margin: 0 0 1.35rem;
  max-width: 34rem;
  color: var(--auth-cin-muted);
  font-size: clamp(0.98rem, 1.2vw, 1.08rem);
  line-height: 1.55;
}

.auth-field-label {
  display: block;
  margin: 0 0 0.45rem;
  font-size: 0.82rem;
  font-weight: 650;
  color: rgba(226, 232, 240, 0.88);
}

.auth-scope-premium .workspace-input-wrap,
.auth-scope-premium .auth-input {
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: none;
  color: #f8fafc;
}

.auth-scope-premium .workspace-input-wrap input {
  color: #f8fafc;
  background: transparent;
}

.auth-scope-premium .workspace-input-wrap input::placeholder {
  color: rgba(148, 163, 184, 0.75);
}

.auth-scope-premium .workspace-input-wrap:focus-within,
.auth-scope-premium .auth-input:focus {
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.18);
  outline: none;
}

.auth-scope-premium .workspace-suffix {
  background: rgba(30, 41, 59, 0.9);
  color: rgba(226, 232, 240, 0.75);
  border-left: 1px solid rgba(148, 163, 184, 0.22);
}

.auth-scope-premium .btn-primary {
  border: none;
  color: #042f2e;
  font-weight: 750;
  background-image: var(--auth-cin-cta);
  box-shadow: 0 12px 28px rgba(34, 211, 238, 0.22);
  transition: transform 0.2s ease, box-shadow 0.25s ease, filter 0.2s ease;
}

.auth-scope-premium .btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
  box-shadow: 0 16px 34px rgba(34, 211, 238, 0.3);
}

.auth-scope-premium .btn-google {
  background: rgba(15, 23, 42, 0.8);
  color: #f8fafc;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(148, 163, 184, 0.28);
}

.auth-scope-premium .btn-google:hover {
  border-color: rgba(34, 211, 238, 0.4);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  transform: translateY(-2px);
}

.auth-scope-premium .auth-link {
  color: var(--auth-cin-cyan);
}

.auth-scope-premium .auth-link:hover {
  color: #a5f3fc;
}

.auth-scope-premium .auth-muted-link {
  color: rgba(226, 232, 240, 0.65);
}

.auth-scope-premium .auth-muted-link:hover {
  color: #f8fafc;
}

.auth-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 1.5rem 0 0.35rem;
  padding: 0;
}

.auth-trust-row li {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: rgba(226, 232, 240, 0.9);
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 999px;
  padding: 0.38rem 0.75rem;
}

.auth-scope-premium .auth-link-row {
  margin-top: 1.85rem;
  margin-bottom: 2.25rem;
  gap: 1.15rem;
  justify-content: flex-start;
}

.auth-scope-premium .auth-alert--error {
  background: rgba(127, 29, 29, 0.35);
  border-color: rgba(248, 113, 113, 0.35);
  color: #fecaca;
}

.auth-scope-premium .auth-alert--success {
  background: rgba(6, 78, 59, 0.35);
  border-color: rgba(52, 211, 153, 0.35);
  color: #a7f3d0;
}

/* Clean product device preview */
.auth-scope-premium .auth-hero-visual {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow: visible;
  position: relative;
  z-index: 1;
  align-self: center;
  border-radius: 0;
  padding: 0;
  margin: 0;
  background: transparent;
}

.auth-login-device {
  width: 100%;
  max-width: 520px;
  margin-left: auto;
  margin-bottom: 0.35rem;
  border-radius: 18px;
  overflow: hidden;
  background: #0f172a;
  border: 1px solid rgba(34, 211, 238, 0.28);
  box-shadow:
    var(--auth-cin-shadow),
    0 0 36px rgba(14, 165, 233, 0.14);
  transform: perspective(1200px) rotateY(-5deg) rotateX(2deg);
  animation: authFadeUp 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}

.auth-login-device__chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.7rem 1rem 0.65rem;
  background: linear-gradient(180deg, #1e293b, #0f172a);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.auth-login-device__chrome span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #64748b;
}

.auth-login-device__chrome span:nth-child(1) { background: #f87171; }
.auth-login-device__chrome span:nth-child(2) { background: #fbbf24; }
.auth-login-device__chrome span:nth-child(3) { background: #34d399; }

.auth-login-device__chrome em {
  margin-left: 0.4rem;
  font-style: normal;
  font-size: 0.72rem;
  color: #94a3b8;
}

.auth-login-device__viewport {
  height: clamp(210px, 28vw, 300px);
  overflow: hidden;
  background: #0b1220;
}

.auth-login-device__viewport img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  object-fit: cover;
  object-position: top center;
}

.auth-login-device__caption {
  margin: 1.15rem 0 2.25rem;
  text-align: right;
  font-size: 0.78rem;
  color: rgba(148, 163, 184, 0.8);
}

/* Tenant credential login — centered sign-in card */
.auth-tenant-stage {
  --login-accent: #67e8f9;
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1rem, 4vw, 1.75rem);
}

.auth-tenant-card {
  width: 100%;
  max-width: 440px;
  padding: clamp(1.6rem, 3vw, 2rem);
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--auth-cin-shadow);
  animation: authFadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-tenant-card__brand {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.auth-tenant-logo-plate {
  width: 84px;
  height: 84px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.28);
  background:
    radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--login-accent) 35%, transparent), transparent 55%),
    rgba(2, 6, 23, 0.85);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.auth-tenant-logo-plate--image {
  padding: 0.65rem;
  background: #ffffff;
  border-color: rgba(226, 232, 240, 0.55);
}

.auth-tenant-logo {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.auth-tenant-monogram {
  font-family: "Outfit", "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #f8fafc;
}

.auth-tenant-card__meta {
  display: grid;
  gap: 0.35rem;
  justify-items: center;
}

.auth-tenant-workspace {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(34, 211, 238, 0.22);
  font-size: 0.72rem;
  color: rgba(226, 232, 240, 0.75);
}

.auth-tenant-workspace strong {
  color: #f8fafc;
  font-weight: 700;
}

.auth-tenant-card h1 {
  margin: 0.25rem 0 0;
  font-family: "Outfit", "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #f8fafc;
  line-height: 1.15;
}

.auth-tenant-card__lead {
  margin: 0;
  max-width: 28rem;
  font-size: 0.92rem;
  line-height: 1.5;
  color: rgba(226, 232, 240, 0.72);
}

.auth-tenant-form {
  display: grid;
  gap: 0.15rem;
}

.auth-tenant-form .auth-field label,
.auth-tenant-form .checkbox-label {
  color: rgba(226, 232, 240, 0.78);
}

.auth-tenant-form .auth-input {
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.55);
  border-color: rgba(148, 163, 184, 0.28);
  color: #f8fafc;
}

.auth-tenant-form .password-toggle {
  color: rgba(226, 232, 240, 0.7);
}

.auth-tenant-form .btn-primary {
  margin-top: 0.35rem;
  width: 100%;
}

.auth-tenant-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.35rem;
  font-size: 0.9rem;
}

.auth-flow-card .auth-flow-icon-plate {
  color: #67e8f9;
}

.auth-flow-card .auth-flow-svg {
  display: block;
}

.auth-flow-card .auth-eyebrow {
  margin-bottom: 0.15rem;
}

.auth-flow-card .btn-primary {
  width: 100%;
  margin-top: 0.5rem;
}

.auth-tenant-stage .or-divider span {
  background: rgba(15, 23, 42, 0.95);
  color: rgba(148, 163, 184, 0.85);
}

.auth-tenant-stage .or-divider::before,
.auth-tenant-stage .or-divider::after {
  background: rgba(148, 163, 184, 0.25);
}

@media (max-width: 520px) {
  .auth-tenant-card {
    padding: 1.35rem 1.15rem;
  }

  .auth-tenant-logo-plate {
    width: 72px;
    height: 72px;
    border-radius: 18px;
  }
}

/* Tenant credential split */
.auth-split--premium {
  min-height: 100dvh;
}

.auth-split--premium .auth-brand-panel {
  position: relative;
  color: #f8fafc;
  background:
    radial-gradient(80% 60% at 0% 0%, rgba(34, 211, 238, 0.18) 0%, transparent 55%),
    radial-gradient(70% 50% at 100% 20%, rgba(52, 211, 153, 0.12) 0%, transparent 50%),
    linear-gradient(165deg, #0a101c 0%, #070b14 100%);
  border-right: 1px solid var(--auth-cin-line);
}

.auth-split--premium .auth-brand-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(148, 163, 184, 0.12) 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0.4;
  pointer-events: none;
}

.auth-brand-kicker {
  margin: 1rem 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--auth-cin-cyan);
}

.auth-split--premium .auth-brand-panel h1 {
  margin-top: 0.35rem;
  font-family: "Outfit", "Plus Jakarta Sans", system-ui, sans-serif;
  font-weight: 800;
  color: #f8fafc;
}

.auth-brand-lead,
.auth-split--premium .auth-brand-panel p {
  color: var(--auth-cin-muted);
}

.auth-split--premium .auth-feature-list {
  gap: 0.75rem;
}

.auth-split--premium .auth-feature-list li {
  display: grid;
  gap: 0.15rem;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 14px;
  padding: 0.85rem 1rem;
}

.auth-split--premium .auth-feature-list strong {
  font-size: 0.9rem;
  color: #f8fafc;
}

.auth-split--premium .auth-feature-list span {
  font-size: 0.8rem;
  color: rgba(226, 232, 240, 0.7);
}

.auth-split--premium .auth-tenant-logo {
  background: rgba(255, 255, 255, 0.08);
}

.auth-split--premium .auth-logo {
  font-family: "Outfit", system-ui, sans-serif;
  font-size: clamp(1.5rem, 3vw, 1.95rem);
  font-weight: 800;
  color: #f8fafc;
  background: none;
}

.auth-split--premium .auth-form-panel {
  background: transparent;
}

.auth-split--premium .auth-card {
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--auth-cin-shadow);
  color: #f8fafc;
}

.auth-split--premium .auth-card h2 {
  font-family: "Outfit", system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #f8fafc;
}

.auth-split--premium .auth-card-lead,
.auth-split--premium .auth-field label,
.auth-split--premium .checkbox-label {
  color: rgba(226, 232, 240, 0.78);
}

.auth-split--premium .auth-input {
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.55);
  border-color: rgba(148, 163, 184, 0.28);
  color: #f8fafc;
}

.auth-split--premium .password-toggle {
  color: rgba(226, 232, 240, 0.7);
}

.auth-split--premium .or-divider span {
  background: rgba(15, 23, 42, 0.95);
  color: rgba(148, 163, 184, 0.85);
}

.auth-split--premium .or-divider::before {
  background: rgba(148, 163, 184, 0.25);
}

.auth-scope-premium .auth-split--premium {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: clip;
}

.auth-scope-premium > .auth-global-wrap,
.auth-scope-premium > .pub-footer,
.auth-scope-premium > .pub-scripts {
  position: relative;
  z-index: 1;
}

.auth-scope-premium > .pub-footer {
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 1.5rem;
}

@media (max-width: 980px) {
  .auth-login-device {
    margin: 0.5rem auto 0;
    transform: none;
    max-width: 440px;
  }

  .auth-login-device__caption {
    text-align: center;
  }

  .auth-scope-premium .auth-global-stage {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-atmosphere__orb,
  .auth-login-device,
  .auth-scope-premium .auth-global-content {
    animation: none;
  }
}

@media (min-width: 901px) {
  body.orqit-auth-page .pub-mega-menu {
    filter: none !important;
  }
}
