.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: #f8fafc;
}

.login {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.login h1 {
  font-size: 1.8rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.login h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.login p {
  color: #6b7280;
  margin-bottom: 2rem;
  line-height: 1.5;
}

/* Auth Steps */
.auth-step {
  animation: fadeIn 0.3s ease-in;
}

.auth-step.hidden {
  display: none;
}

/* Username Step */
.input-group {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

#username-input {
  flex: 1;
  padding: 0.75rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

#username-input:focus {
  outline: none;
  border-color: #10b981;
}

.primary-btn {
  padding: 0.75rem 1.5rem;
  background: #10b981;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s;
}

.primary-btn:hover {
  background: #059669;
}

.primary-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

/* Passkey Step */
.user-welcome {
  margin-bottom: 2rem;
}

.passkey-auth-section {
  margin-bottom: 2rem;
}

.passkey-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 1rem;
  background: #10b981;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 1rem;
  transition: background-color 0.2s;
}

.passkey-btn:hover {
  background: #059669;
}

.passkey-btn.secondary {
  background: #6b7280;
}

.passkey-btn.secondary:hover {
  background: #4b5563;
}

.passkey-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

.passkey-icon {
  font-size: 1.2rem;
}

.back-btn {
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  padding: 0.5rem;
}

.back-btn:hover {
  color: #374151;
}

/* Loading and Error States */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  color: #0369a1;
  margin-bottom: 1rem;
}

.error-message {
  padding: 1rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #dc2626;
  margin-bottom: 1rem;
}

.error-message p {
  margin: 0;
  font-size: 0.9rem;
}

/* Passkey Info */
.passkey-info {
  background: #f9fafb;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.passkey-description {
  color: #6b7280;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.supported-methods {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.supported-methods span {
  background: white;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  font-size: 0.8rem;
  color: #374151;
  border: 1px solid #e5e7eb;
}

/* Login Footer */
.login-footer {
  font-size: 0.9rem;
  color: #6b7280;
  margin: 0;
}

.login-footer a {
  color: #10b981;
  text-decoration: none;
}

.login-footer a:hover {
  text-decoration: underline;
}

/* Utility */
.hidden {
  display: none !important;
}

/* Simple Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Mobile Responsive */
@media (max-width: 480px) {
  .login-page {
    padding: 1rem;
  }

  .login {
    padding: 1.5rem;
  }

  .input-group {
    flex-direction: column;
  }

  .primary-btn {
    width: 100%;
  }
}

@keyframes gradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.login h1 {
  font-size: 32px;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.01em;
}

.login p {
  font-size: 16px;
  color: #718096;
  margin-bottom: 8px;
  line-height: 1.5;
}

.learn-more {
  color: #667eea;
  text-decoration: underline;
  font-size: 14px;
  margin-bottom: 40px;
  display: inline-block;
  transition: color 0.2s ease;
}

.learn-more:hover {
  color: #764ba2;
}

.form-group {
  margin-bottom: 24px;
}

label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 8px;
  text-align: left;
}

input[type="text"] {
  width: 100%;
  padding: 16px 20px;
  box-sizing: border-box;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 16px;
  transition: all 0.2s ease;
  background: #f7fafc;
}

input[type="text"]:focus {
  outline: none;
  border-color: #667eea;
  background: white;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

input[type="text"]:hover {
  border-color: #cbd5e0;
}

.primary-btn {
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.primary-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.primary-btn:focus {
  outline: 2px solid #10b981;
  outline-offset: 2px;
}

.primary-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.secondary-btn {
  width: 100%;
  padding: 16px 24px;
  background: #4a5568;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.secondary-btn:hover:not(:disabled) {
  background: #2d3748;
  transform: translateY(-1px);
}

.secondary-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.divider {
  display: flex;
  align-items: center;
  margin: 24px 0;
  color: #a0aec0;
  font-size: 14px;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.divider span {
  padding: 0 16px;
  background: white;
}

.error-message {
  background: #fed7d7;
  border: 1px solid #fc8181;
  border-radius: 8px;
  padding: 12px 16px;
  margin-top: 16px;
  color: #c53030;
  font-size: 14px;
  text-align: left;
}

.hidden {
  display: none;
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #667eea;
  font-weight: 500;
  margin: 20px 0;
}

.loading::before {
  content: '';
  width: 20px;
  height: 20px;
  border: 2px solid #e2e8f0;
  border-top: 2px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.passkey-info {
  background: #f7fafc;
  border-radius: 12px;
  padding: 20px;
  margin-top: 24px;
  text-align: left;
}

.passkey-description {
  font-size: 14px;
  color: #4a5568;
  margin-bottom: 12px;
  line-height: 1.4;
}

.supported-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.supported-methods span {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  color: #4a5568;
  font-weight: 500;
}

.login-footer {
  margin-top: 32px;
  font-size: 14px;
  color: #718096;
}

.login-footer a {
  color: #667eea;
  text-decoration: none;
}

.login-footer a:hover {
  text-decoration: underline;
}