/* =====================
   Auth Modal & Forms
   ===================== */

#modal-auth {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: none !important;
  justify-content: center;
  align-items: center;
  z-index: 100000;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease;
}

#modal-auth.active {
  display: flex !important;
}

.auth-modal-content {
  background: white;
  width: 90%;
  max-width: 420px;
  padding: 0;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  animation: slideUp 0.3s ease;
}

.auth-modal-header {
  background: linear-gradient(135deg, #00241E 0%, #006747 100%);
  color: white;
  padding: 24px;
  text-align: center;
}

.auth-modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
}

.auth-modal-header p {
  margin: 8px 0 0 0;
  font-size: 0.9rem;
  opacity: 0.9;
}

.auth-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: white;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}

.auth-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Tabs */
.auth-tabs {
  display: flex;
  border-bottom: 1px solid #e0e0e0;
  background: #f8f9fa;
}

.auth-tab {
  flex: 1;
  padding: 16px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  color: #666;
  transition: all 0.2s;
  position: relative;
}

.auth-tab:hover {
  color: #00241E;
  background: #f0f0f0;
}

.auth-tab.active {
  color: #006747;
}

.auth-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 3px;
  background: #006747;
}

/* Forms */
.auth-modal-body {
  padding: 32px 24px;
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  color: #333;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #006747;
  box-shadow: 0 0 0 3px rgba(0, 103, 71, 0.1);
}

.form-group input::placeholder {
  color: #999;
}

.btn-submit {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #006747 0%, #00241E 100%);
  color: white;
  border: none;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 8px;
}

.btn-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 103, 71, 0.2);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Google Sign-In Button */
.btn-google-signin {
  width: 100%;
  padding: 12px;
  background: white;
  border: 1px solid #ddd;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

/* previously used a placeholder emoji for the Google logo; actual SVG inserted in markup now */


.btn-google-signin:hover:not(:disabled) {
  background: #f8f9fa;
  border-color: #006747;
  box-shadow: 0 4px 12px rgba(0, 103, 71, 0.1);
}

.btn-google-signin:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}


/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  margin: 20px 0;
  color: #999;
  font-size: 0.9rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #ddd;
}

.auth-divider span {
  margin: 0 12px;
}

/* Signup specific */
.investor-types {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.investor-type-option {
  padding: 10px;
  border: 1px solid #ddd;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
  background: white;
}

.investor-type-option:hover {
  border-color: #006747;
  background: #f0f8f5;
}

.investor-type-option.selected {
  background: #006747;
  color: white;
  border-color: #006747;
}

/* User Menu (when logged in) */
#user-menu {
  display: none;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

#user-menu.visible {
  display: flex;
}

.user-info {
  text-align: right;
}

.user-name-display {
  font-size: 0.95rem;
  color: #333;
}

.user-email-display {
  font-size: 0.85rem;
  color: #666;
}

.btn-signout {
  padding: 8px 16px;
  background: #f0f0f0;
  border: 1px solid #ddd;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-signout:hover {
  background: #e0e0e0;
  border-color: #999;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Mobile responsive */
@media (max-width: 640px) {
  .auth-modal-content {
    width: 95%;
    max-width: none;
  }

  .auth-modal-body {
    padding: 24px 20px;
  }

  .investor-types {
    grid-template-columns: 1fr;
  }

  #user-menu {
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
    margin-left: 0;
  }

  .user-info {
    text-align: right;
  }
}
/* Google Sign-In Button with Icon */
.btn-google-signin {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  background: white;
  border: 1px solid #e5e7eb;
  font-size: 0.95rem;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-google-signin:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.btn-google-signin svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Forgot Password Link Button */
.link-btn {
  background: none;
  border: none;
  color: #0066cc;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 4px 0;
  text-decoration: none;
  transition: color 0.2s;
}

.link-btn:hover {
  color: #004999;
  text-decoration: underline;
}

```