/* Mind Map Minion - Auth Page Styles */

:root {
  --primary-color: #FA790E;
  --secondary-color: #9D34D4;
  --background-color: #0f0f0f;
  --card-background: #1a1a1a;
  --border-color: #2a2a2a;
  --text-color: #ffffff;
  --text-muted: #888888;
  --text-light: #cccccc;
  --success-color: #10b981;
  --error-color: #ef4444;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--secondary-color);
}

/* Auth Container */
.auth-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--card-background);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  padding: 48px;
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 32px;
}

.auth-logo img {
  width: 72px;
  height: 72px;
}

.auth-logo span {
  font-size: 1.5rem;
  font-weight: 600;
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-header h1 {
  font-size: 1.75rem;
  margin-bottom: 8px;
}

.auth-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Form Styles */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-light);
}

.form-group input {
  padding: 14px 16px;
  background: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-color);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus {
  border-color: var(--primary-color);
}

.form-group input::placeholder {
  color: var(--text-muted);
}

.form-group input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-group .error-text {
  color: var(--error-color);
  font-size: 0.85rem;
}

.form-group .help-text {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Password Input */
.password-input-wrapper {
  position: relative;
}

.password-input-wrapper input {
  width: 100%;
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

.password-toggle:hover {
  color: var(--text-light);
}

/* Checkbox */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--primary-color);
  cursor: pointer;
}

.checkbox-group label {
  font-size: 0.9rem;
  color: var(--text-light);
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

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

.btn-primary {
  background: var(--primary-color);
  color: #000;
}

.btn-primary:hover:not(:disabled) {
  background: #e56e00;
  color: #000;
}

.btn-secondary {
  background: transparent;
  color: var(--text-light);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.btn-full {
  width: 100%;
}

.btn-loading {
  position: relative;
  color: transparent !important;
}

.btn-loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Links */
.auth-links {
  text-align: center;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.auth-links p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.forgot-link {
  display: block;
  text-align: right;
  font-size: 0.85rem;
  margin-top: -8px;
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

/* Alert Messages */
.alert {
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid var(--error-color);
  color: var(--error-color);
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid var(--success-color);
  color: var(--success-color);
}

.alert-info {
  background: rgba(250, 121, 14, 0.1);
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
}

/* 2FA Styles */
.totp-setup {
  text-align: center;
}

.totp-qr {
  background: white;
  padding: 16px;
  border-radius: 8px;
  display: inline-block;
  margin: 16px 0;
}

.totp-qr img {
  width: 200px;
  height: 200px;
}

.totp-secret {
  background: var(--background-color);
  padding: 12px 16px;
  border-radius: 8px;
  font-family: monospace;
  font-size: 0.9rem;
  word-break: break-all;
  margin: 16px 0;
}

.totp-input {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 24px 0;
}

.totp-input input {
  width: 48px;
  height: 56px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  background: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-color);
  outline: none;
}

.totp-input input:focus {
  border-color: var(--primary-color);
}

/* Backup Codes */
.backup-codes {
  background: var(--background-color);
  padding: 24px;
  border-radius: 8px;
  margin: 16px 0;
}

.backup-codes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.backup-codes-grid code {
  font-family: monospace;
  font-size: 0.9rem;
  padding: 8px;
  background: var(--card-background);
  border-radius: 4px;
  text-align: center;
}

/* Verification Page */
.verification-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  background: rgba(250, 121, 14, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.verification-icon svg {
  width: 40px;
  height: 40px;
  color: var(--primary-color);
}

/* Footer */
.auth-footer {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.auth-footer a {
  color: var(--text-muted);
}

.auth-footer a:hover {
  color: var(--primary-color);
}

/* Responsive */
@media (max-width: 480px) {
  .auth-card {
    padding: 32px 24px;
  }

  .auth-header h1 {
    font-size: 1.5rem;
  }

  .totp-input input {
    width: 40px;
    height: 48px;
    font-size: 1.25rem;
  }
}
