/* Auth Pages Styles - Login & Account */

/* Login Page */
.login-page {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem;
  padding-top: 100px;
  padding-bottom: 4rem;
}

.login-container {
  width: 100%;
  max-width: 420px;
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
}

.login-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.login-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.5rem 0;
}

.login-header p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* Google button */
.social-login {
  margin-bottom: 1.5rem;
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.875rem 1.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-google:hover {
  background: var(--surface-hover);
  border-color: var(--text-muted);
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

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

.auth-divider span {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Auth tabs */
.auth-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding: 0.25rem;
  background: var(--bg);
  border-radius: 8px;
}

.auth-tab {
  flex: 1;
  padding: 0.625rem 1rem;
  background: transparent;
  border: 2px solid transparent;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.auth-tab:hover {
  color: var(--text-primary);
}

.auth-tab.active {
  background: var(--surface);
  color: var(--text-primary);
  border-color: var(--orchid);
}

/* Auth form */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

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

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

.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.auth-form .form-input {
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  color: var(--text-primary);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-form .form-input:focus {
  outline: none;
  border-color: var(--orchid);
  box-shadow: 0 0 0 3px rgba(217, 70, 239, 0.1);
}

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

.btn-submit {
  padding: 0.875rem 1.5rem;
  background: var(--gradient-button);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}

.btn-submit:hover {
  opacity: 0.9;
}

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

.login-footer {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.login-footer p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.6;
  margin: 0;
}

.login-footer a {
  color: var(--orchid);
  text-decoration: none;
}

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

/* Account Page */
.account-page {
  padding: 2rem;
  padding-top: 100px;
  padding-bottom: 4rem;
  max-width: 600px;
  margin: 0 auto;
}

.account-header {
  margin-bottom: 2rem;
}

.account-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.account-header p {
  color: var(--text-secondary);
}

.account-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.account-card h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.account-card h2 svg {
  color: var(--text-secondary);
}

.profile-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}

.profile-avatar-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--gradient-button);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  font-weight: 600;
}

.profile-details h3 {
  font-size: 1.125rem;
  font-weight: 600;
}

.profile-details p {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.account-page .form-group {
  margin-bottom: 1rem;
}

.account-page .form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.account-page .form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  color: var(--text-primary);
  transition: border-color 0.2s;
}

.account-page .form-input:focus {
  outline: none;
  border-color: var(--orchid);
}

.btn-save {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--gradient-button);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-save:hover {
  opacity: 0.9;
}

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

.password-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-remove-password {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-remove-password:hover {
  border-color: #ef4444;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.btn-remove-password:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.stat-item {
  text-align: center;
  padding: 1rem;
  background: var(--bg);
  border-radius: 8px;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--orchid);
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.auth-method {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border-radius: 8px;
  font-size: 0.875rem;
}

.auth-method svg {
  flex-shrink: 0;
}

/* Account Modal - Delete Confirmation */
.account-body #deleteModal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.account-body #deleteModal.active {
  display: flex;
}

.account-body #deleteModal .modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  max-width: 400px;
  width: 100%;
  text-align: center;
}

.account-body #deleteModal .modal h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--error);
  margin: 0 0 0.75rem 0;
}

.account-body #deleteModal .modal p {
  color: var(--text-secondary);
  margin: 0 0 1.5rem 0;
  line-height: 1.5;
}

.account-body #deleteModal .modal-actions {
  display: flex;
  gap: 0.75rem;
}

.account-body #deleteModal .modal-actions button {
  flex: 1;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.account-body #deleteModal .btn-cancel {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.account-body #deleteModal .btn-cancel:hover {
  background: var(--surface-hover);
}

.account-body #deleteModal .btn-danger {
  background: var(--error);
  border: none;
  color: white;
}

.account-body #deleteModal .btn-danger:hover {
  opacity: 0.9;
}

.account-page .modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  max-width: 400px;
  width: 90%;
}

.account-page .modal h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--error);
}

.account-page .modal p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.btn-cancel {
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.9375rem;
  cursor: pointer;
}

/* Danger zone */
.danger-zone {
  border-color: rgba(248, 113, 113, 0.3);
}

.danger-zone h2 {
  color: var(--error);
}

.danger-zone p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin: 0 0 1rem 0;
  line-height: 1.5;
}

.btn-danger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: transparent;
  border: 1px solid var(--error);
  border-radius: 8px;
  color: var(--error);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-danger:hover {
  background: rgba(248, 113, 113, 0.1);
}

/* User info display */
.user-info-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg);
  border-radius: 12px;
  margin-bottom: 1rem;
}

.user-info-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}

.user-info-avatar-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--gradient-button);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  font-weight: 600;
}

.user-info-details {
  flex: 1;
}

.user-info-name {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.user-info-email {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.user-info-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  background: rgba(138, 99, 210, 0.1);
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--orchid);
  margin-top: 0.5rem;
}

/* Account action buttons */
.account-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.btn-logout {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-logout:hover {
  background: var(--surface-hover);
  border-color: var(--orchid);
  color: var(--orchid);
}

/* Delete confirmation modal */
.delete-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
}

.delete-modal-overlay.active {
  display: flex;
}

.delete-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  max-width: 400px;
  width: 100%;
  text-align: center;
}

.delete-modal-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  background: rgba(248, 113, 113, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--error);
}

.delete-modal h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.5rem 0;
}

.delete-modal p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 1.5rem 0;
}

.delete-modal-actions {
  display: flex;
  gap: 0.75rem;
}

.delete-modal-actions button {
  flex: 1;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.delete-modal-actions .btn-cancel {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.delete-modal-actions .btn-cancel:hover {
  background: var(--surface-hover);
}

.delete-modal-actions .btn-confirm-delete {
  background: var(--error);
  border: none;
  color: white;
}

.delete-modal-actions .btn-confirm-delete:hover {
  opacity: 0.9;
}

/* Password hint */
.password-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

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

  .login-card,
  .account-section {
    padding: 1.25rem;
  }

  .user-info-card {
    flex-direction: column;
    text-align: center;
  }

  .account-actions {
    flex-direction: column;
  }

  .delete-modal-actions {
    flex-direction: column;
  }
}
