/* Auth pages - Dark, intimate aesthetic matching KAT */

.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 50%, #0f0f0f 100%);
  padding: 1rem;
}

.auth-container {
  width: 100%;
  max-width: 400px;
}

.auth-card {
  background: rgba(30, 30, 35, 0.95);
  border: 1px solid rgba(155, 114, 207, 0.2);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.4),
    0 0 60px rgba(155, 114, 207, 0.05);
}

/* Logo */
.auth-logo {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  padding-left: 0.3em; /* Compensate for letter-spacing */
}

.logo-k { color: #9b72cf; }
.logo-a { color: #c75b9b; }
.logo-t { color: #e8e0d5; }

/* Typography */
.auth-title {
  color: #e8e0d5;
  font-size: 1.75rem;
  font-weight: 600;
  text-align: center;
  margin: 0 0 0.5rem 0;
}

.auth-subtitle {
  color: rgba(232, 224, 213, 0.6);
  font-size: 0.95rem;
  text-align: center;
  margin: 0 0 2rem 0;
  line-height: 1.5;
}

/* Form elements */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  color: rgba(232, 224, 213, 0.8);
  font-size: 0.85rem;
  font-weight: 500;
}

.form-group input {
  background: rgba(15, 15, 15, 0.8);
  border: 1px solid rgba(155, 114, 207, 0.3);
  border-radius: 8px;
  padding: 0.875rem 1rem;
  color: #e8e0d5;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: #9b72cf;
  box-shadow: 0 0 0 3px rgba(155, 114, 207, 0.2);
}

.form-group input::placeholder {
  color: rgba(232, 224, 213, 0.3);
}

.form-hint {
  color: rgba(232, 224, 213, 0.4);
  font-size: 0.8rem;
}

/* Error message */
.error-message {
  background: rgba(199, 91, 155, 0.15);
  border: 1px solid rgba(199, 91, 155, 0.4);
  border-radius: 8px;
  padding: 0.875rem 1rem;
  color: #c75b9b;
  font-size: 0.9rem;
  text-align: center;
}

.error-message.hidden {
  display: none;
}

/* Button */
.auth-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, #9b72cf 0%, #c75b9b 100%);
  border: none;
  border-radius: 10px;
  padding: 1rem 1.5rem;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
  margin-top: 0.5rem;
}

.auth-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(155, 114, 207, 0.4);
}

.auth-button:active:not(:disabled) {
  transform: translateY(0);
}

.auth-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-button[data-loading="true"] {
  opacity: 0.7;
}

.auth-button[data-loading="true"]::after {
  content: "...";
  animation: loading 1s infinite;
}

@keyframes loading {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

.auth-button.secondary {
  background: transparent;
  border: 1px solid rgba(155, 114, 207, 0.5);
  color: #9b72cf;
}

.auth-button.secondary:hover:not(:disabled) {
  background: rgba(155, 114, 207, 0.1);
  box-shadow: none;
}

.button-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.button-icon svg {
  width: 20px;
  height: 20px;
}

/* Footer */
.auth-footer {
  margin-top: 2rem;
  text-align: center;
}

.security-note {
  color: rgba(232, 224, 213, 0.4);
  font-size: 0.8rem;
  line-height: 1.5;
  margin: 0;
}

.back-link {
  color: rgba(155, 114, 207, 0.8);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.back-link:hover {
  color: #9b72cf;
}

/* Passkeys list */
.passkeys-list .auth-title {
  margin-bottom: 1.5rem;
}

.passkeys {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.passkey-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: rgba(15, 15, 15, 0.6);
  border: 1px solid rgba(155, 114, 207, 0.15);
  border-radius: 10px;
}

.passkey-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.passkey-label {
  color: #e8e0d5;
  font-weight: 500;
}

.passkey-meta {
  color: rgba(232, 224, 213, 0.4);
  font-size: 0.8rem;
}

.passkey-remove {
  background: transparent;
  border: 1px solid rgba(199, 91, 155, 0.4);
  border-radius: 6px;
  padding: 0.4rem 0.75rem;
  color: rgba(199, 91, 155, 0.8);
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.passkey-remove:hover {
  background: rgba(199, 91, 155, 0.15);
  border-color: #c75b9b;
}

.passkey-actions {
  margin-top: 1rem;
}

/* Flash messages */
.flash-notice,
.flash-alert {
  padding: 0.875rem 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  text-align: center;
}

.flash-notice {
  background: rgba(155, 114, 207, 0.15);
  border: 1px solid rgba(155, 114, 207, 0.3);
  color: #9b72cf;
}

.flash-alert {
  background: rgba(199, 91, 155, 0.15);
  border: 1px solid rgba(199, 91, 155, 0.3);
  color: #c75b9b;
}
