/* ==========================================================================
   LevelUp CGPA - Authentication Styles
   Theme: Midnight Indigo & Modern Glassmorphism
   Matches: main.css design system
   ========================================================================== */

/* Navbar User Menu & Auth Actions */
.nav-auth-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-card);
  padding: 0.35rem 0.85rem 0.35rem 0.45rem;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  backdrop-filter: blur(10px);
  transition: all 0.2s ease;
}

.user-profile-chip:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(99, 102, 241, 0.35);
}

.user-avatar-circle {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  box-shadow: 0 2px 8px var(--primary-glow);
}

.user-display-name {
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-nav-logout {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem 0.4rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  transition: color 0.2s, background 0.2s;
}

.btn-nav-logout:hover {
  color: var(--rose);
  background: rgba(244, 63, 94, 0.1);
}

/* Auth Modal Specifics */
.auth-modal-box {
  max-width: 480px;
  width: 100%;
  position: relative;
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 40px rgba(99, 102, 241, 0.15);
  border-radius: var(--radius-xl);
  padding: 2.25rem;
  overflow: hidden;
}

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

.auth-brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary-light);
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.auth-modal-title {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 0.4rem;
}

.auth-modal-subtitle {
  font-size: 0.92rem;
  color: var(--text-secondary);
}

/* Tabs */
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.25rem;
  margin-bottom: 1.5rem;
}

.auth-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.auth-tab-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: 0 4px 14px var(--primary-glow);
}

/* Alert Banners */
.auth-alert {
  display: none;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  line-height: 1.45;
  margin-bottom: 1.25rem;
  animation: fadeIn 0.2s ease;
}

.auth-alert.active {
  display: flex;
}

.auth-alert-error {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #fca5a5;
}

.auth-alert-success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
}

.auth-alert-info {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #c7d2fe;
}

/* Form Helper Rows */
.auth-form-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  margin-top: -0.25rem;
  margin-bottom: 1.25rem;
}

.auth-link {
  color: var(--primary-light);
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s;
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  font-family: inherit;
}

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

/* Form Footer */
.auth-footer-text {
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-top: 1.25rem;
}

.auth-submit-btn {
  width: 100%;
  position: relative;
  overflow: hidden;
}

/* Loading spinner */
.btn-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}

.btn.loading .btn-text {
  opacity: 0.5;
}

.btn.loading .btn-spinner {
  display: inline-block;
}

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

/* Modal Close Button */
.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .auth-modal-box {
    padding: 1.75rem 1.25rem;
  }
  .user-display-name {
    display: none;
  }
  .nav-auth-group {
    gap: 0.4rem;
  }
}
