.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.auth-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.auth-card {
  width: 100%;
  max-width: 380px;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
}

.auth-title {
  margin: 0 0 0.25rem;
  font-size: 1.5rem;
  font-weight: 600;
  color: #f8fafc;
  letter-spacing: -0.02em;
}

.auth-subtitle {
  margin: 0 0 1.5rem;
  font-size: 0.9rem;
  color: #94a3b8;
}

.auth-error {
  margin-bottom: 1rem;
  padding: 0.6rem 0.75rem;
  font-size: 0.85rem;
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  display: none;
}

.auth-error:not(:empty) {
  display: block;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0;
}

.auth-form input {
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-family: inherit;
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-form input::placeholder {
  color: #64748b;
}

.auth-form input:focus {
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2);
}

.auth-btn {
  padding: 0.75rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: inherit;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.auth-btn:active {
  transform: scale(0.98);
}

.auth-btn-primary {
  background: #16a34a;
  color: white;
}

.auth-btn-primary:hover {
  background: #15803d;
}

.auth-panel.is-hidden {
  display: none !important;
}

.auth-mfa-step {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.auth-mfa-heading {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: #f8fafc;
}

.auth-mfa-hint {
  margin: 0;
  font-size: 0.9rem;
  color: #cbd5e1;
  line-height: 1.4;
}

.auth-mfa-sms-note {
  margin: 0 0 0.25rem;
  font-size: 0.8rem;
  color: #64748b;
}

.auth-mfa-send-btn {
  margin-top: 0.25rem;
}

.auth-mfa-code-row {
  margin: 0;
}

.auth-mfa-code-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-family: inherit;
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-mfa-code-input::placeholder {
  color: #64748b;
}

.auth-mfa-code-input:focus {
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2);
}

.auth-btn-ghost {
  margin-top: 0.25rem;
  background: transparent;
  color: #94a3b8;
  border: 1px solid transparent;
}

.auth-btn-ghost:hover {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.06);
}
