/* ModelsBlock User Authentication & Profile Stylesheet */

.auth-page-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem 1rem;
  min-height: calc(100vh - 180px);
  background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.05), transparent 40%),
              radial-gradient(circle at bottom left, rgba(59, 130, 246, 0.05), transparent 40%);
}

.auth-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
  width: 100%;
  max-width: 440px;
  padding: 2.5rem 2rem;
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-logo-badge {
  width: 52px;
  height: 52px;
  background: #eff6ff;
  color: #2563eb;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem auto;
}

.auth-logo-badge svg {
  width: 28px;
  height: 28px;
}

.auth-title {
  font-size: 1.65rem;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

.auth-subtitle {
  font-size: 0.9rem;
  color: #6b7280;
  line-height: 1.4;
}

/* Alert Boxes */
.auth-alert, .profile-alert {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

.alert-error {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
}

.alert-success {
  background-color: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #059669;
}

.auth-alert svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

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

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

.form-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 0.95rem;
  color: #111827;
  background-color: #ffffff;
  transition: all 0.2s ease;
  outline: none;
}

.form-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-input:disabled {
  background-color: #f3f4f6;
  color: #6b7280;
  cursor: not-allowed;
}

.form-hint {
  font-size: 0.75rem;
  color: #6b7280;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.25rem;
  background-color: #2563eb;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 10px;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background-color: #1d4ed8;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.1rem;
  background-color: #f3f4f6;
  color: #374151;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 10px;
  transition: all 0.2s ease;
  border: 1px solid #e5e7eb;
  cursor: pointer;
}

.btn-secondary:hover {
  background-color: #e5e7eb;
  color: #111827;
}

.auth-submit-btn {
  width: 100%;
  margin-top: 0.5rem;
}

.auth-footer {
  margin-top: 1.75rem;
  text-align: center;
  font-size: 0.9rem;
  color: #6b7280;
}

.auth-link {
  color: #2563eb;
  font-weight: 600;
}

.auth-link:hover {
  text-decoration: underline;
}

/* ==========================================
   User Profile & Dashboard Styles
   ========================================== */
.profile-container {
  max-width: 1100px;
  margin: 2.5rem auto;
  padding: 0 1.25rem;
}

.profile-header-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.profile-avatar-wrapper {
  flex-shrink: 0;
}

.profile-avatar-img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #eff6ff;
}

.profile-avatar-initials {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #ffffff;
  font-size: 1.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.profile-user-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.2rem;
}

.profile-user-email {
  font-size: 0.95rem;
  color: #6b7280;
  margin-bottom: 0.6rem;
}

.profile-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-provider {
  background-color: #f3f4f6;
  color: #374151;
}

.badge-provider svg {
  width: 14px;
  height: 14px;
}

.badge-verified {
  background-color: #d1fae5;
  color: #065f46;
}

.profile-actions {
  flex-shrink: 0;
}

.btn-logout {
  color: #dc2626;
  background-color: #fef2f2;
  border-color: #fecaca;
}

.btn-logout:hover {
  background-color: #fee2e2;
  color: #b91c1c;
}

/* Dashboard Grid */
.profile-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}

@media (max-width: 868px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }
  .profile-header-card {
    flex-direction: column;
    text-align: center;
  }
  .profile-badges {
    justify-content: center;
  }
}

.profile-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 1.75rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03);
}

.profile-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #f3f4f6;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #111827;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-title svg {
  width: 22px;
  height: 22px;
  color: #2563eb;
}

.downloads-count {
  font-size: 0.85rem;
  font-weight: 600;
  background: #eff6ff;
  color: #2563eb;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
}

/* Downloads List */
.downloads-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.download-item {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem;
  border: 1px solid #f3f4f6;
  border-radius: 12px;
  transition: all 0.2s ease;
  background: #fafafa;
}

.download-item:hover {
  background: #ffffff;
  border-color: #d1d5db;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.download-item-img {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  background: #e5e7eb;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.download-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.download-placeholder-icon {
  font-weight: 700;
  color: #9ca3af;
  font-size: 0.9rem;
}

.download-item-details {
  flex: 1;
}

.download-item-title {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.25rem;
}

.download-item-title a:hover {
  color: #2563eb;
}

.download-item-meta {
  font-size: 0.8rem;
  color: #6b7280;
}

.download-item-action {
  flex-shrink: 0;
}

.btn-download {
  padding: 0.5rem 0.9rem;
  font-size: 0.85rem;
}

.btn-disabled {
  font-size: 0.8rem;
  color: #9ca3af;
  padding: 0.5rem 0.8rem;
}

.empty-downloads {
  text-align: center;
  padding: 3rem 1.5rem;
}

.empty-downloads svg {
  width: 54px;
  height: 54px;
  color: #9ca3af;
  margin-bottom: 1rem;
}

.empty-downloads h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.5rem;
}

.empty-downloads p {
  font-size: 0.9rem;
  color: #6b7280;
  margin-bottom: 1.5rem;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

.profile-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.btn-save {
  width: 100%;
}

/* Navbar Auth Extensions */
.nav-auth-buttons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: 0.5rem;
}

/* Primary Modern Login Button */
.nav-login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.45rem 1.15rem;
  background-color: #4f46e5;
  color: #ffffff !important;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid transparent;
  box-shadow: 0 1px 2px 0 rgba(79, 70, 229, 0.2);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  white-space: nowrap;
}

.nav-login-btn:hover {
  background-color: #4338ca;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.28);
}

.nav-login-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(79, 70, 229, 0.15);
}

.nav-login-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke-width: 2;
}

/* Dual Auth Button Variations */
.nav-login-link {
  color: #4b5563;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
}

.nav-login-link:hover {
  color: #4f46e5;
  background-color: #f5f3ff;
}

.nav-signup-btn {
  background-color: #4f46e5;
  color: #ffffff !important;
  padding: 0.45rem 1.1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 1px 3px rgba(79, 70, 229, 0.25);
  transition: all 0.2s ease;
  text-decoration: none;
}

.nav-signup-btn:hover {
  background-color: #4338ca;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.35);
  transform: translateY(-1px);
}

.nav-user-profile-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  background-color: #f3f4f6;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.875rem;
  color: #374151;
  transition: all 0.2s ease;
  margin-left: 0.5rem;
}

.nav-user-profile-btn:hover {
  background-color: #e5e7eb;
  color: #111827;
}

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

.nav-user-avatar-initial {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #4f46e5;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-user-section, .mobile-auth-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

.mobile-login-btn,
.mobile-login-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: #4f46e5;
  color: #ffffff !important;
  text-align: center;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9375rem;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(79, 70, 229, 0.2);
  text-decoration: none;
}

.mobile-login-btn:hover,
.mobile-login-link:hover {
  background-color: #4338ca;
}

.mobile-login-btn svg,
.mobile-login-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.mobile-signup-link {
  background: #4f46e5;
  color: #ffffff !important;
  text-align: center;
  padding: 0.75rem;
  border-radius: 8px;
  font-weight: 600;
}

/* ==========================================
   Terms & Conditions Checkbox & Profession Select
   ========================================== */
.form-checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0.35rem 0;
  text-align: left;
}

.custom-checkbox {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: #2563eb;
  flex-shrink: 0;
  border-radius: 4px;
}

.checkbox-label {
  font-size: 0.85rem;
  color: #4b5563;
  line-height: 1.4;
  cursor: pointer;
}

.checkbox-label a {
  color: #2563eb;
  font-weight: 600;
  text-decoration: underline;
}

.checkbox-label a:hover {
  color: #1d4ed8;
}

.checkbox-pulse {
  outline: 3px solid #ef4444;
  outline-offset: 2px;
  animation: pulse-border 1.5s ease-in-out;
}

@keyframes pulse-border {
  0%, 100% { outline-color: #ef4444; }
  50% { outline-color: transparent; }
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1.1em;
  padding-right: 2.25rem;
  cursor: pointer;
}

.badge-profession {
  background-color: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.badge-country {
  background-color: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

/* ==========================================================================
   Google OAuth & Profile Completion Styles
   ========================================================================== */

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1.25rem;
  background-color: #ffffff;
  color: #374151;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  box-sizing: border-box;
}

.btn-google:hover {
  background-color: #f9fafb;
  border-color: #9ca3af;
  color: #111827;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
}

.btn-google:active {
  background-color: #f3f4f6;
  transform: translateY(0);
}

.btn-google .google-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.5rem 0;
  color: #9ca3af;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid #e5e7eb;
}

.auth-divider span {
  padding: 0 0.85rem;
}

.auth-card--complete {
  max-width: 500px;
}

.auth-google-badge {
  width: 56px;
  height: 56px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem auto;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.google-user-connected-badge {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

.google-user-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.google-user-avatar-placeholder {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.15rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.google-user-details {
  flex: 1;
  min-width: 0;
}

.google-user-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.google-user-email {
  font-size: 0.825rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.google-verified-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background-color: #ecfdf5;
  color: #059669;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  border: 1px solid #a7f3d0;
}

.input-readonly-wrapper {
  position: relative;
}

.form-input--readonly {
  background-color: #f9fafb !important;
  color: #4b5563 !important;
  cursor: not-allowed;
  padding-right: 5.5rem !important;
}

.readonly-badge {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.725rem;
  font-weight: 600;
  background: #dcfce7;
  color: #166534;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  pointer-events: none;
}

.required-star {
  color: #dc2626;
  font-weight: 700;
}


