/* Ops auth stage — login / register / force password / 2FA */
/* ── Auth stage (login / register) ─────────────────────────────────── */
.auth-stage {
  position: relative;
  max-width: 26rem;
  margin: 1.25rem auto 2rem;
  padding: 0 0.25rem;
}
.auth-stage-glow {
  position: absolute;
  inset: -2rem -1rem auto;
  height: 14rem;
  background:
    radial-gradient(ellipse 70% 60% at 50% 20%,
      color-mix(in srgb, var(--color-accent) 22%, transparent),
      transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.auth-mesh {
  position: absolute;
  top: -0.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(100%, 22rem);
  height: 9.5rem;
  opacity: 0.9;
  pointer-events: none;
  z-index: 0;
}
.auth-mesh-svg {
  width: 100%;
  height: 100%;
  display: block;
}
.auth-mesh-link {
  stroke: color-mix(in srgb, var(--color-border) 70%, var(--color-accent));
  stroke-width: 1.25;
  fill: none;
  opacity: 0.55;
}
.auth-mesh-pulse {
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 1.5;
  stroke-dasharray: 8 48;
  stroke-linecap: round;
  animation: auth-mesh-flow 3.4s linear infinite;
  opacity: 0.85;
}
.auth-mesh-pulse--d { animation-delay: -1.1s; }
.auth-mesh-pulse--d2 { animation-delay: -2.2s; }
@keyframes auth-mesh-flow {
  to { stroke-dashoffset: -56; }
}
.auth-node {
  fill: color-mix(in srgb, var(--color-surface) 40%, var(--color-border));
  stroke: color-mix(in srgb, var(--color-accent) 35%, var(--color-border));
  stroke-width: 1.2;
}
.auth-node--hub {
  fill: color-mix(in srgb, var(--color-accent) 18%, var(--color-surface));
  stroke: var(--color-accent);
  animation: auth-hub-breathe 3s ease-in-out infinite;
}
.auth-node--inet {
  stroke: var(--color-primary);
}
.auth-node-core {
  fill: var(--color-muted);
}
.auth-node-core--hub {
  fill: var(--color-accent);
}
@keyframes auth-hub-breathe {
  0%, 100% { filter: drop-shadow(0 0 0 transparent); }
  50% { filter: drop-shadow(0 0 8px color-mix(in srgb, var(--color-accent) 40%, transparent)); }
}
.auth-card {
  position: relative;
  z-index: 1;
  margin-top: 5.5rem;
  padding: 1.5rem 1.35rem 1.6rem;
  border-radius: 16px;
  box-shadow:
    0 1px 0 color-mix(in srgb, var(--color-border) 80%, transparent),
    0 18px 40px -24px color-mix(in srgb, var(--color-text) 28%, transparent);
  background:
    linear-gradient(165deg,
      color-mix(in srgb, var(--color-surface) 96%, var(--color-accent)) 0%,
      var(--color-surface) 40%,
      var(--color-bg) 100%);
  border: 1px solid color-mix(in srgb, var(--color-border) 85%, var(--color-accent));
}
@media (min-width: 480px) {
  .auth-card {
    padding: 1.75rem 1.75rem 1.85rem;
  }
}
.auth-card-brand {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}
.auth-brand-mark {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: conic-gradient(
    from 200deg,
    var(--color-primary) 0 40%,
    var(--color-accent) 40% 100%
  );
  padding: 0.22rem;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--color-border) 50%, transparent);
}
.auth-brand-dot {
  width: 100%;
  height: 100%;
  border-radius: 9px;
  background: var(--color-surface);
  box-shadow: inset 0 0 0 1px var(--color-border);
  position: relative;
}
.auth-brand-dot::after {
  content: "";
  position: absolute;
  inset: 28%;
  border-radius: 999px;
  background: var(--color-accent);
  animation: dash-pulse-glow 2.8s ease-in-out infinite;
}
.auth-title {
  font-size: 1.55rem;
  font-weight: 650;
  letter-spacing: -0.04em;
  line-height: 1.15;
  margin: 0.05rem 0 0;
  color: var(--color-text);
}
.auth-sub {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
  color: var(--color-muted);
  line-height: 1.35;
}

/* Login / register: brand logo (transparent mark — no plate) */
.auth-logo {
  width: 3.25rem;
  height: 3.25rem;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.auth-brand-wordmark {
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin: 0;
}
.auth-brand-wordmark .ph-brand {
  font-size: inherit;
  font-weight: inherit;
}

/* Unauthenticated chrome: logo + wordmark only (no nav links / login button) */
body.is-auth-chrome .nav-header-inner {
  justify-content: center;
}
body.is-auth-chrome .header-brand {
  margin: 0 auto;
}
body.is-auth-chrome .header-actions {
  display: none;
}
body.is-auth-chrome .header-brand-sub {
  display: none;
}
body.is-auth-chrome footer {
  margin-top: 2rem;
}

@media (prefers-reduced-motion: reduce) {
  .auth-mesh-pulse,
  .auth-node--hub,
  .auth-brand-dot::after {
    animation: none;
  }
}

