/* ========================================
   Authentication Pages (Login & 2FA)
   ======================================== */

.auth-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg-page);
  padding: 24px;
}

.auth-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 40px 36px;
  width: 100%;
  max-width: 400px;
  animation: auth-card-in 0.2s ease;
}

@keyframes auth-card-in {
  from { transform: translateY(-8px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.auth-title {
  font-size: 1.375rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 4px;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.auth-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8125rem;
  margin-bottom: 28px;
}

/* Error banner */
.auth-error {
  background: var(--priority-emergency);
  color: #fff;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  margin-bottom: 16px;
  line-height: 1.4;
}

/* Form fields */
.auth-field {
  margin-bottom: 16px;
}

.auth-field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.auth-field input {
  width: 100%;
  padding: 10px 12px;
  font-size: 0.9375rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-primary);
  font-family: inherit;
  transition: border-color 0.12s, box-shadow 0.12s;
}

.auth-field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-light);
}

/* Submit button */
.auth-submit {
  width: 100%;
  padding: 10px;
  font-size: 0.9375rem;
  margin-top: 8px;
}

.auth-submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* 2FA code input — monospaced, centered, larger */
.auth-field input.code-input {
  text-align: center;
  font-family: "Cascadia Code", "Fira Code", "Consolas", monospace;
  font-size: 1.5rem;
  letter-spacing: 0.3em;
  padding: 12px;
}

/* Back link */
.auth-back-link {
  display: block;
  text-align: center;
  margin-top: 16px;
  font-size: 0.8125rem;
  color: var(--accent-text);
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
}

.auth-back-link:hover {
  text-decoration: underline;
}

/* Theme switcher at bottom */
.auth-footer {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* High contrast tweaks */
.theme-high-contrast .auth-card {
  border-width: 2px;
}

.theme-high-contrast .auth-field input {
  border-width: 2px;
}

.theme-high-contrast .auth-submit {
  border-width: 2px;
}

/* Mobile */
@media (max-width: 768px) {
  .auth-card {
    padding: 28px 24px;
  }
}
