/* =========================================================================
   Login — dedicated styling for the sign-in page.
   Shares the app's color tokens from portal.css (loaded first) but adds
   its own signature: print registration marks — the real alignment
   symbol printers use to check plates line up — drifting into perfect
   alignment on load. "In register" is literally the term for what a
   proof check confirms before a job runs, so the animation isn't just
   decoration, it's the one thing this login screen is actually about.
   ========================================================================= */

.page:has(> .login-stage) {
  max-width: none; margin: 0; padding: 0;
}

.login-stage {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(380px, 1fr);
}

/* ---- Atmosphere panel: the brand moment. Deliberately a fixed dark
   panel regardless of the app's own light/dark toggle — same reasoning
   a lot of professional SaaS logins use a fixed hero side independent
   of the product's own theme setting. ---- */
.login-atmosphere {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px 68px;
  background:
    radial-gradient(900px 520px at 12% 8%, rgba(109,93,247,0.38), transparent 60%),
    radial-gradient(760px 480px at 102% 100%, rgba(22,199,184,0.22), transparent 55%),
    #0A0B12;
  color: #F1F1FA;
}
.atmo-halftone {
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.10) 1px, transparent 1.6px);
  background-size: 16px 16px;
  -webkit-mask-image: radial-gradient(ellipse 62% 55% at 18% 28%, black 0%, transparent 72%);
          mask-image: radial-gradient(ellipse 62% 55% at 18% 28%, black 0%, transparent 72%);
  pointer-events: none;
}
.atmo-content { position: relative; max-width: 460px; }

.regmark-cluster { position: relative; width: 60px; height: 60px; margin-bottom: 34px; }
.regmark { position: absolute; inset: 0; width: 60px; height: 60px; }
.regmark circle, .regmark line { fill: none; stroke: currentColor; stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.regmark-c { color: #00B8D4; }
.regmark-m { color: #E91E8C; }
.regmark-y { color: #F0C020; }
.regmark-k { color: #F1F1FA; }

@keyframes regConverge {
  from { transform: translate(var(--dx), var(--dy)) scale(1.18); opacity: 0; filter: blur(1.5px); }
  55%  { opacity: 1; }
  to   { transform: translate(0, 0) scale(1); opacity: 1; filter: blur(0); }
}
@keyframes regPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.8; } }

.regmark-c { --dx: -10px; --dy: -6px;  animation: regConverge 880ms cubic-bezier(0.22,1,0.36,1) 60ms both; }
.regmark-m { --dx: 9px;   --dy: -8px;  animation: regConverge 880ms cubic-bezier(0.22,1,0.36,1) 160ms both; }
.regmark-y { --dx: -8px;  --dy: 9px;   animation: regConverge 880ms cubic-bezier(0.22,1,0.36,1) 260ms both; }
.regmark-k { --dx: 10px;  --dy: 7px;
  animation: regConverge 880ms cubic-bezier(0.22,1,0.36,1) 360ms both,
             regPulse 3600ms ease-in-out 1300ms infinite;
}

.atmo-eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(241,241,250,0.62); margin-bottom: 16px;
}
.atmo-headline {
  font-size: 39px; font-weight: 800; line-height: 1.14; letter-spacing: -0.02em;
  margin-bottom: 18px;
}
.atmo-sub {
  font-size: 15.5px; line-height: 1.62; color: rgba(241,241,250,0.72);
  max-width: 420px; margin-bottom: 30px;
}
.atmo-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.atmo-tags span {
  font-size: 12.5px; font-weight: 600; color: rgba(241,241,250,0.8);
  border: 1px solid rgba(241,241,250,0.18); border-radius: 999px;
  padding: 6px 14px;
}

/* ---- Form panel: the workspace. Respects the app's own theme, since
   this is where you're about to land after signing in. ---- */
.login-panel {
  display: flex; align-items: center; justify-content: center;
  padding: 40px 30px;
  background: var(--canvas);
}
.login-card2 { width: 100%; max-width: 372px; }
.login-card2 .brand-login-logo { display: flex; justify-content: center; margin-bottom: 24px; }
.login-mark-fallback { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 22px; }
.login-mark-fallback .brand-mark { width: 34px; height: 34px; border-radius: 10px; }
.login-card2 h1 { font-size: 21px; font-weight: 800; text-align: center; letter-spacing: -0.01em; }
.login-card2 .page-sub { text-align: center; margin: 5px 0 26px; }
.login-card2 form { display: flex; flex-direction: column; }
.login-card2 .btn-primary { height: 44px; font-size: 14.5px; }

@media (max-width: 900px) {
  .login-stage { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .login-atmosphere { padding: 34px 24px 28px; }
  .regmark-cluster { width: 42px; height: 42px; margin-bottom: 16px; }
  .regmark { width: 42px; height: 42px; }
  .atmo-headline { font-size: 24px; margin-bottom: 8px; }
  .atmo-sub { font-size: 13.5px; margin-bottom: 0; line-height: 1.5; }
  .atmo-tags { display: none; }   /* keeps the mobile band compact so the form stays near the top of the viewport */
  .login-panel { padding: 30px 22px 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .regmark { animation: none !important; opacity: 1 !important; transform: none !important; filter: none !important; }
}
