#view-auth {
  --auth-text: #f4f4f5;
  --auth-text-muted: #a1a1aa;
  --auth-text-dim: #52525b;
  --auth-border: rgba(255, 255, 255, 0.08);
  --auth-card-shadow:
    0 40px 80px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(255, 255, 255, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);

  flex: 1;
  min-height: 0;
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow: hidden;
  position: relative;
  background: #000000;
}

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

/* Soft gray base — no corner tiles */
.auth-bg__base {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(165deg, #121212 0%, #0a0a0a 45%, #0e0e0e 100%);
}

/* Soft light circles — scattered, not corner-anchored */
.auth-bg__mesh {
  position: absolute;
  inset: -8%;
  background:
    radial-gradient(circle at 24% 30%, rgba(255, 255, 255, 0.08) 0%, transparent 38%),
    radial-gradient(circle at 76% 24%, rgba(255, 255, 255, 0.055) 0%, transparent 34%),
    radial-gradient(circle at 62% 70%, rgba(255, 255, 255, 0.045) 0%, transparent 36%),
    radial-gradient(circle at 50% 48%, rgba(255, 255, 255, 0.02) 0%, transparent 48%);
  animation: authMeshDrift 28s ease-in-out infinite alternate;
}

.auth-bg__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.5;
  will-change: transform, opacity;
}

.auth-bg__glow--a {
  width: min(46vw, 460px);
  height: min(46vw, 460px);
  top: 12%;
  left: 14%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 70%);
  animation: authGlowA 22s ease-in-out infinite alternate;
}

.auth-bg__glow--b {
  width: min(40vw, 400px);
  height: min(40vw, 400px);
  bottom: 12%;
  right: 16%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.09) 0%, transparent 70%);
  animation: authGlowB 26s ease-in-out infinite alternate;
}

.auth-bg__glow--c {
  width: min(34vw, 340px);
  height: min(34vw, 340px);
  top: 42%;
  left: 40%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, transparent 72%);
  animation: authGlowC 30s ease-in-out infinite alternate;
  opacity: 0.38;
}

/* Grid removed — square mesh looked like corner tiles */
.auth-bg__grid {
  display: none;
}

.auth-bg__vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 65% at 50% 45%, transparent 40%, rgba(0, 0, 0, 0.4) 100%);
}

.auth-bg__noise {
  position: absolute;
  inset: 0;
  opacity: 0.045;
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.4) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.22) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 5px);
  mix-blend-mode: soft-light;
}

@keyframes authMeshDrift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(1.5%, -1.2%, 0) scale(1.04); }
}

@keyframes authGlowA {
  0% { transform: translate3d(0, 0, 0); opacity: 0.5; }
  100% { transform: translate3d(6%, 8%, 0); opacity: 0.7; }
}

@keyframes authGlowB {
  0% { transform: translate3d(0, 0, 0); opacity: 0.45; }
  100% { transform: translate3d(-7%, -5%, 0); opacity: 0.65; }
}

@keyframes authGlowC {
  0% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.35; }
  100% { transform: translate3d(-4%, 6%, 0) scale(1.12); opacity: 0.5; }
}

.auth-layout {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  height: min(620px, calc(100% - 0.5rem));
  min-height: min(480px, 100%);
  max-height: calc(100% - 0.5rem);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: rgba(10, 10, 10, 0.82);
  border: 1px solid var(--glass-border);
  box-shadow: var(--auth-card-shadow);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  animation: authLayoutIn 0.55s var(--ease-out) both;
}

@keyframes authLayoutIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.auth-side {
  padding: 2.5rem 2.15rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.035) 0%, transparent 42%),
    rgba(8, 8, 8, 0.72);
  border-right: 1px solid var(--glass-border);
}

.auth-logo {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.65rem;
  overflow: hidden;
  margin-bottom: 1rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.auth-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.auth-brand {
  margin: 0 0 1.15rem;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--auth-text);
}

.auth-brand span {
  color: var(--auth-text-dim);
  font-weight: 500;
}

.auth-side-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--auth-text-muted);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--auth-border);
  width: fit-content;
  margin-bottom: 1.35rem;
}

.auth-side-badge span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.45);
  animation: authPulse 2.4s ease-in-out infinite;
}

@keyframes authPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.85); }
}

.auth-side h1 {
  margin: 0 0 0.85rem;
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.12;
  color: var(--auth-text);
  animation: fadeUp 0.5s var(--ease-out) both;
}

.auth-side-lead {
  margin: 0 0 1.85rem;
  font-size: 0.9rem;
  color: var(--auth-text-muted);
  line-height: 1.55;
  max-width: 34ch;
  animation: fadeUp 0.5s var(--ease-out) 0.05s both;
}

.auth-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.auth-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--auth-text-muted);
  line-height: 1.4;
  animation: fadeUp 0.45s var(--ease-out) backwards;
}

.auth-features li:nth-child(1) { animation-delay: 0.1s; }
.auth-features li:nth-child(2) { animation-delay: 0.16s; }
.auth-features li:nth-child(3) { animation-delay: 0.22s; }

.auth-features strong {
  display: block;
  color: var(--auth-text);
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 0.12rem;
  letter-spacing: -0.01em;
}

.auth-feature-icon {
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 0.45rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-top: 0.1rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--auth-text);
  border: 1px solid var(--auth-border);
}

.auth-feature-icon svg {
  width: 0.72rem;
  height: 0.72rem;
}

.auth-panel {
  position: relative;
  padding: 2.5rem 2.15rem 1.95rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 28%),
    rgba(12, 12, 12, 0.92);
  animation: authPanelIn 0.6s var(--ease-out) 0.08s both;
}

@keyframes authPanelIn {
  from {
    opacity: 0;
    transform: translateX(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.auth-panel-glow {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.07), transparent 70%);
  pointer-events: none;
  filter: blur(8px);
}

.auth-panel-head {
  position: relative;
  margin-bottom: 1.45rem;
}

.auth-panel-kicker {
  margin: 0 0 0.45rem;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--auth-text-dim);
}

.auth-panel-head h2 {
  margin: 0 0 0.4rem;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--auth-text);
}

.auth-panel-head p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--auth-text-muted);
  line-height: 1.45;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.auth-field label {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--auth-text-muted);
  letter-spacing: 0.02em;
}

.auth-input-row {
  display: flex;
  align-items: stretch;
  border-radius: var(--radius-sm);
  border: 1px solid var(--auth-border);
  background: rgba(0, 0, 0, 0.45);
  transition: border-color var(--duration), box-shadow var(--duration), background var(--duration);
}

.auth-input-row:focus-within {
  border-color: var(--glass-border-strong);
  background: rgba(0, 0, 0, 0.62);
  box-shadow: 0 0 0 3px var(--input-focus-ring);
}

.auth-input-shell {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}

.auth-input-row input {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
  width: 100%;
  border: none;
  background: transparent;
  color: var(--auth-text);
  padding: 0.9rem 1rem;
  font-size: 0.92rem;
  font-family: var(--mono);
  letter-spacing: 0.06em;
}

.auth-input-row input:focus { outline: none; }
.auth-input-row input::placeholder { color: transparent; }

.auth-typewriter {
  position: absolute;
  left: 1rem;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 1px;
  pointer-events: none;
  z-index: 0;
  color: var(--auth-text-dim);
  font-size: 0.92rem;
  font-family: var(--mono);
  letter-spacing: 0.06em;
  white-space: nowrap;
  overflow: hidden;
  transition: opacity 0.18s var(--ease);
}

.auth-typewriter.is-hidden {
  opacity: 0;
}

.auth-typewriter__text {
  display: inline-block;
  min-height: 1.1em;
}

.auth-typewriter__caret {
  display: inline-block;
  width: 1.5px;
  height: 1.05em;
  margin-left: 1px;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 1px;
  animation: authCaret 1s steps(1) infinite;
}

@keyframes authCaret {
  0%, 45% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.auth-toggle-key {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: 2.85rem;
  border: none;
  border-left: 1px solid var(--auth-border);
  background: transparent;
  color: var(--auth-text-dim);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: color var(--duration-fast), background var(--duration-fast);
}

.auth-toggle-key:hover {
  color: var(--auth-text);
  background: var(--bg-hover);
}

.auth-toggle-key svg {
  width: 1rem;
  height: 1rem;
}

.auth-error {
  min-height: 1.2rem;
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  color: var(--danger);
}

.auth-submit {
  width: 100%;
  padding: 0.95rem 1.25rem;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 650;
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--accent-btn-text);
  background: var(--accent-btn);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.35) inset,
    0 8px 24px rgba(255, 255, 255, 0.08);
  transition: transform var(--duration-fast), box-shadow var(--duration), background var(--duration);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
}

.auth-submit svg {
  width: 1rem;
  height: 1rem;
  transition: transform var(--duration-fast);
}

.auth-submit:hover:not(:disabled) {
  background: var(--accent-btn-hover);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.4) inset,
    0 12px 32px rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.auth-submit:hover:not(:disabled) svg {
  transform: translateX(2px);
}

.auth-submit:active:not(:disabled) { transform: scale(0.985); }
.auth-submit:disabled { opacity: 0.45; cursor: wait; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.2rem 0;
  font-size: 0.65rem;
  color: var(--auth-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--auth-border);
}

.auth-foot {
  margin: 0;
  font-size: 0.7rem;
  color: var(--auth-text-dim);
  text-align: center;
}

.auth-auto-hint {
  margin: 0.35rem 0 1rem;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--auth-text-muted, var(--auth-text-dim));
}

.auth-manual {
  margin: 0.5rem 0 1rem;
  border: 1px solid var(--auth-border);
  border-radius: 12px;
  padding: 0.55rem 0.75rem;
  background: rgba(255, 255, 255, 0.02);
}

.auth-manual summary {
  cursor: pointer;
  color: var(--auth-text-dim);
  font-size: 0.8rem;
  list-style: none;
}

.auth-manual summary::-webkit-details-marker { display: none; }

.auth-manual[open] summary {
  color: var(--auth-text-muted, #a3a3a3);
  margin-bottom: 0.25rem;
}

@media (max-width: 720px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-panel { padding: 2rem 1.5rem; }
}

@media (max-height: 740px) {
  .auth-side,
  .auth-panel { padding: 1.55rem 1.4rem; }
  .auth-side h1 { font-size: 1.45rem; }
  .auth-side-lead { margin-bottom: 1.25rem; }
}
