.auth-page {
  min-height: 100vh;
  position: relative;
}

.auth-topbar {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0.9rem 1rem;
}

.auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  width: fit-content;
  margin: 0 auto 1.65rem;
  text-decoration: none;
  color: var(--text);
}

.auth-brand .logo-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  line-height: 1.1;
}

.auth-brand .logo-eyebrow {
  font-size: 0.58rem;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.auth-brand .logo-product {
  font-size: 1.45rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--primary);
  text-shadow: none;
  transition: color var(--transition-fast);
}

.auth-brand:hover .logo-product {
  color: var(--primary-hover);
}

html[data-theme="light"] .auth-brand .logo-product,
html[data-theme="light"] .auth-links a {
  color: #047857;
}

.logo-radar {
  position: relative;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}

.logo-radar-glow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.14);
  filter: blur(6px);
  animation: pulse 2s ease-in-out infinite;
}

.logo-radar svg {
  position: relative;
  animation: spin 8s linear infinite;
}

.auth-controls {
  display: flex;
  align-items: center;
  gap: 3px;
}

.auth-controls-compact {
  padding: 3px;
  border: 1px solid color-mix(in srgb, var(--border) 82%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 76%, transparent);
  box-shadow: 0 6px 20px color-mix(in srgb, #000 10%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 1;
  transition: opacity var(--transition-fast), border-color var(--transition-fast);
}

.auth-controls-compact:hover,
.auth-controls-compact:focus-within {
  opacity: 1;
  border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
}

.auth-controls-compact .theme-toggle {
  gap: 1px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.auth-controls-compact .theme-btn {
  min-width: 25px;
  height: 25px;
  padding: 4px 5px;
  border-radius: 999px;
  font-size: 0.62rem;
  letter-spacing: 0.35px;
  color: var(--text-muted);
}

.auth-controls-compact .theme-btn .theme-icon {
  width: 12px;
  height: 12px;
}

.auth-controls-compact .theme-btn.active {
  color: var(--primary-hover);
  background: color-mix(in srgb, var(--primary) 14%, transparent);
  box-shadow: none;
}

html[data-theme="light"] .auth-controls-compact .theme-btn.active {
  color: #065f46;
}

.auth-controls-compact .rocket-btn {
  min-width: 25px;
  margin-left: 1px;
  padding: 4px;
  border-color: transparent;
  background: transparent;
  color: var(--text-dim);
  opacity: 0.58;
}

.auth-controls-compact .rocket-btn:hover,
.auth-controls-compact .rocket-btn:focus-visible,
.auth-controls-compact .rocket-btn.active {
  border-color: transparent;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  box-shadow: none;
  opacity: 0.92;
}

.auth-controls-compact .rocket-btn .rocket-icon {
  width: 12px;
  height: 12px;
  stroke-width: 1.7;
}

.auth-controls-compact .rocket-btn.animating .rocket-icon {
  animation: none;
  color: currentColor;
}

.auth-main {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4.75rem 1.25rem 2.5rem;
}

.auth-shell {
  width: 100%;
  max-width: 430px;
}

.auth-card {
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  padding: 2rem;
}

.auth-card-head {
  margin-bottom: 1.6rem;
  text-align: center;
}

.auth-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.065em;
  text-transform: uppercase;
  color: var(--text);
  text-shadow: none;
}

.auth-subtitle {
  margin: 0.5rem 0 0;
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.5;
  letter-spacing: 0.15px;
}

.auth-description {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.auth-hint {
  margin: 0.5rem 0 0;
  color: var(--text-dim);
  font-size: 0.78rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.auth-form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: 1;
}

.auth-input {
  width: 100%;
  padding: 0.8rem 0.9rem;
  font-size: 0.9rem;
  font-family: var(--font-sans);
  letter-spacing: 0.2px;
  color: var(--text);
  background: var(--surface-section);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

[data-theme="light"] .auth-input {
  background: rgba(255, 255, 255, 0.9);
}

.auth-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.auth-input::placeholder {
  color: var(--text-dim);
}

.captcha-container {
  min-height: 88px;
}

#altcha-widget {
  margin-top: 0.5rem;
}

.btn-block {
  width: 100%;
}

.auth-links {
  margin-top: 1rem;
  text-align: right;
  font-size: 0.8rem;
}

.auth-links a {
  color: var(--primary);
  text-decoration: none;
}

.auth-links a:hover {
  text-decoration: underline;
}

.auth-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}

.auth-icon.success {
  color: var(--success);
  background: var(--success-glow);
}

.auth-icon.error {
  color: var(--danger);
  background: var(--danger-glow);
}

.auth-list {
  margin: 0.75rem 0 1.25rem;
  padding-left: 1rem;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.auth-list li {
  margin-bottom: 0.45rem;
}

.password-requirements {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
}

.password-requirements p {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
}

.password-requirements ul {
  margin: 0;
  padding-left: 1rem;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.password-requirements li {
  margin: 0.3rem 0;
}

.password-requirements li.valid {
  color: var(--success);
}

.password-requirements li.valid::before {
  content: "\2713 ";
}

.auth-shell .alert {
  margin-bottom: 1rem;
  display: block;
}

.auth-shell .alert p {
  margin: 0;
}

.auth-shell .alert p + p {
  margin-top: 0.5rem;
}

@media (max-width: 640px) {
  .auth-topbar {
    padding: 0.65rem;
  }

  .auth-controls {
    width: 100%;
  }

  .auth-controls-compact {
    width: auto;
  }

  .auth-main {
    align-items: flex-start;
    padding: 5.8rem 1rem 2rem;
  }

  .auth-brand {
    margin-bottom: 1.35rem;
  }

  .auth-card {
    padding: 1.5rem;
  }
}

/* Official AITalon symbol colors from logo/logo.html (2026-10-08). */
:root { --aitalon-logo-color: #216E44; }
html.dark, html[data-theme="dark"], body[data-theme="dark"], [data-theme="dark"] { --aitalon-logo-color: #2FE1A1; }
html.light, html[data-theme="light"], body[data-theme="light"], [data-theme="light"] { --aitalon-logo-color: #216E44; }
svg[data-aitalon-logo] { color: var(--aitalon-logo-color, #216E44); }

svg[data-aitalon-logo] path { fill: currentColor !important; stroke: none !important; }
