/* ==========================================================================
   DSA DOCTOR - USER PROFILE & CLOUD SYNC CSS
   ========================================================================== */

/* --- Profile Navbar Button --- */
.profile-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px 0 6px;
  border-radius: 999px;
  border: 1px solid rgba(21, 84, 232, 0.22);
  background: rgba(21, 84, 232, 0.06);
  color: #0f172a;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
  white-space: nowrap;
  outline: none;
}

body.dark-mode .profile-nav-btn {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
  color: #f1f5f9;
}

.profile-nav-btn:hover {
  background: rgba(21, 84, 232, 0.12);
  border-color: rgba(21, 84, 232, 0.45);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(21, 84, 232, 0.16);
}

body.dark-mode .profile-nav-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(96, 165, 250, 0.5);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.profile-nav-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1554e8, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(21, 84, 232, 0.3);
}

.profile-nav-label {
  font-weight: 600;
  letter-spacing: -0.01em;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-nav-badge {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3b82f6;
  flex-shrink: 0;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.profile-nav-badge.synced {
  background: #10b981;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.7);
}

.profile-nav-badge.syncing {
  background: #f59e0b;
  animation: pulseSync 1s infinite alternate;
}

@keyframes pulseSync {
  from { opacity: 0.5; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1.2); }
}

@media (max-width: 640px) {
  .profile-nav-btn {
    width: 38px;
    height: 38px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }
  .profile-nav-label {
    display: none;
  }
  .profile-nav-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    border: 2px solid #fff;
  }
  body.dark-mode .profile-nav-badge {
    border-color: #0b1120;
  }
}

/* --- Profile Modal Overlay & Container --- */
.dsa-profile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.dsa-profile-overlay.open {
  opacity: 1;
  visibility: visible;
}

.dsa-profile-modal {
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  color: #0f172a;
}

body.dark-mode .dsa-profile-modal {
  background: #0f172a;
  border-color: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7);
}

.dsa-profile-overlay.open .dsa-profile-modal {
  transform: translateY(0) scale(1);
}

/* --- Modal Header --- */
.profile-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  background: rgba(248, 250, 252, 0.75);
}

body.dark-mode .profile-modal-header {
  background: rgba(15, 23, 42, 0.8);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.profile-modal-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-modal-title h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.profile-sync-pill {
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.profile-sync-pill.local {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.profile-sync-pill.cloud {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

body.dark-mode .profile-sync-pill.local {
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.35);
}

body.dark-mode .profile-sync-pill.cloud {
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.35);
}

.profile-close-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(226, 232, 240, 0.8);
  background: transparent;
  color: inherit;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

body.dark-mode .profile-close-btn {
  border-color: rgba(255, 255, 255, 0.12);
}

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

/* --- Profile Tabs --- */
.profile-tabs {
  display: flex;
  gap: 4px;
  padding: 10px 24px 0;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  background: rgba(248, 250, 252, 0.4);
}

body.dark-mode .profile-tabs {
  background: rgba(15, 23, 42, 0.4);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.profile-tab {
  padding: 10px 16px;
  font-size: 13.5px;
  font-weight: 700;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

body.dark-mode .profile-tab {
  color: #94a3b8;
}

.profile-tab:hover {
  color: #0f172a;
}

body.dark-mode .profile-tab:hover {
  color: #f8fafc;
}

.profile-tab.active {
  color: #1554e8;
  border-bottom-color: #1554e8;
}

body.dark-mode .profile-tab.active {
  color: #60a5fa;
  border-bottom-color: #60a5fa;
}

/* --- Modal Body & Content Panels --- */
.profile-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.profile-panel {
  display: none;
  flex-direction: column;
  gap: 20px;
}

.profile-panel.active {
  display: flex;
}

/* --- User Hero Banner Inside Modal --- */
.profile-hero-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(21, 84, 232, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
  border: 1px solid rgba(21, 84, 232, 0.16);
  position: relative;
}

body.dark-mode .profile-hero-card {
  background: linear-gradient(135deg, rgba(21, 84, 232, 0.16) 0%, rgba(139, 92, 246, 0.16) 100%);
  border-color: rgba(255, 255, 255, 0.1);
}

.profile-big-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1554e8, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 8px 18px rgba(21, 84, 232, 0.25);
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.profile-big-avatar:hover {
  transform: scale(1.08);
}

.profile-identity {
  flex: 1;
  min-width: 0;
  padding-right: 110px;
}

.profile-identity-name {
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 4px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-identity-email {
  font-size: 12.5px;
  color: #64748b;
  margin: 0;
}

body.dark-mode .profile-identity-email {
  color: #94a3b8;
}

/* --- Hero Right-Corner Sign-In Action --- */
.profile-hero-action {
  position: absolute;
  top: 18px;
  right: 20px;
  display: flex;
  align-items: center;
  z-index: 5;
}

.btn-hero-signin {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: #ffffff;
  background: linear-gradient(135deg, #1554e8 0%, #7c3aed 100%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 14px rgba(21, 84, 232, 0.35);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  white-space: nowrap;
  font-family: inherit;
  outline: none;
}

.btn-hero-signin:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(21, 84, 232, 0.5);
  background: linear-gradient(135deg, #0d46d7 0%, #6d28d9 100%);
}

.btn-hero-signin:active {
  transform: translateY(0) scale(0.97);
}

.btn-hero-signin svg {
  transition: transform 0.2s ease;
}

.btn-hero-signin:hover svg {
  transform: translateX(2px);
}

/* Signed in state pill */
.btn-hero-signin.signed-in {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  color: #059669;
  box-shadow: none;
}

body.dark-mode .btn-hero-signin.signed-in {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.btn-hero-signin.signed-in:hover {
  background: rgba(16, 185, 129, 0.22);
  border-color: rgba(16, 185, 129, 0.5);
  transform: translateY(-1px);
}

@media (max-width: 580px) {
  .profile-hero-card {
    flex-wrap: wrap;
    padding-bottom: 18px;
  }
  .profile-identity {
    padding-right: 0;
  }
  .profile-hero-action {
    position: static;
    width: 100%;
    margin-top: 12px;
  }
  .btn-hero-signin {
    width: 100%;
    justify-content: center;
    padding: 10px 16px;
  }
}

/* --- Avatar Picker Dropdown --- */
.avatar-picker-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.avatar-choice {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(226, 232, 240, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.15s ease;
}

body.dark-mode .avatar-choice {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.avatar-choice:hover, .avatar-choice.selected {
  transform: scale(1.15);
  border-color: #1554e8;
  box-shadow: 0 2px 8px rgba(21, 84, 232, 0.3);
}

/* --- Stats Grid --- */
.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

@media (max-width: 600px) {
  .profile-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.profile-stat-box {
  background: #f8fafc;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

body.dark-mode .profile-stat-box {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}

.profile-stat-box .stat-num {
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, #1554e8 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.profile-stat-box .stat-label {
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

body.dark-mode .profile-stat-box .stat-label {
  color: #94a3b8;
}

/* --- Target Setup Section --- */
.profile-target-card {
  background: #f8fafc;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body.dark-mode .profile-target-card {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}

.profile-target-title {
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.company-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.company-pill {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: #fff;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

body.dark-mode .company-pill {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
}

.company-pill:hover {
  border-color: #1554e8;
  color: #1554e8;
}

.company-pill.active {
  background: #1554e8;
  color: #fff;
  border-color: #1554e8;
  box-shadow: 0 4px 12px rgba(21, 84, 232, 0.3);
}

/* --- Badges Row --- */
.profile-badges-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-badge-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(226, 232, 240, 0.9);
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  opacity: 0.55;
  transition: all 0.2s ease;
}

body.dark-mode .profile-badge-item {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

.profile-badge-item.unlocked {
  opacity: 1;
  background: linear-gradient(135deg, rgba(21, 84, 232, 0.08), rgba(139, 92, 246, 0.08));
  border-color: rgba(21, 84, 232, 0.25);
  color: #1554e8;
}

body.dark-mode .profile-badge-item.unlocked {
  background: linear-gradient(135deg, rgba(21, 84, 232, 0.2), rgba(139, 92, 246, 0.2));
  border-color: rgba(96, 165, 250, 0.35);
  color: #93c5fd;
}

/* --- Cloud Sync Panel --- */
.sync-status-box {
  padding: 16px 18px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid rgba(226, 232, 240, 0.9);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body.dark-mode .sync-status-box {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}

.sync-status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sync-status-text {
  font-size: 13.5px;
  color: #475569;
}

body.dark-mode .sync-status-text {
  color: #cbd5e1;
}

.sync-status-text strong {
  color: #0f172a;
}

body.dark-mode .sync-status-text strong {
  color: #f8fafc;
}

.sync-actions-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-sync-now {
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 700;
  background: linear-gradient(135deg, #1554e8, #7c3aed);
  color: #fff;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(21, 84, 232, 0.25);
}

.btn-sync-now:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(21, 84, 232, 0.35);
}

.btn-secondary {
  padding: 9px 15px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  background: transparent;
  color: inherit;
  border: 1px solid rgba(226, 232, 240, 0.9);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

body.dark-mode .btn-secondary {
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-secondary:hover {
  background: rgba(0, 0, 0, 0.04);
}

body.dark-mode .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* --- Auth Forms Inside Modal (Luxury Redesign) --- */
.profile-auth-box {
  padding: 24px;
  border-radius: 22px;
  border: 1px solid rgba(21, 84, 232, 0.2);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 250, 255, 0.95) 100%);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 45px -15px rgba(21, 84, 232, 0.12), 0 0 0 1px rgba(21, 84, 232, 0.05);
}

body.dark-mode .profile-auth-box {
  background: linear-gradient(180deg, rgba(26, 36, 56, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%);
  border-color: rgba(96, 165, 250, 0.2);
  box-shadow: 0 20px 45px -15px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.profile-auth-box::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(21, 84, 232, 0.15) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

body.dark-mode .profile-auth-box::before {
  background: radial-gradient(circle, rgba(96, 165, 250, 0.2) 0%, transparent 70%);
}

.auth-header-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  z-index: 1;
}

.auth-badge-top {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(21, 84, 232, 0.08);
  color: #1554e8;
  border: 1px solid rgba(21, 84, 232, 0.2);
}

body.dark-mode .auth-badge-top {
  background: rgba(96, 165, 250, 0.15);
  color: #93c5fd;
  border-color: rgba(96, 165, 250, 0.3);
}

.auth-form-title {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

body.dark-mode .auth-form-title {
  color: #f8fafc;
}

.auth-form-desc {
  font-size: 13px;
  color: #64748b;
  margin: 0;
  line-height: 1.45;
}

body.dark-mode .auth-form-desc {
  color: #94a3b8;
}

/* --- Segmented Mode Switcher --- */
.auth-mode-toggle {
  display: flex;
  background: rgba(226, 232, 240, 0.7);
  border-radius: 14px;
  padding: 4px;
  gap: 4px;
  position: relative;
  z-index: 1;
  border: 1px solid rgba(203, 213, 225, 0.6);
}

body.dark-mode .auth-mode-toggle {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(255, 255, 255, 0.1);
}

.auth-mode-btn {
  flex: 1;
  padding: 10px 14px;
  font-size: 13.5px;
  font-weight: 700;
  border: none;
  border-radius: 11px;
  cursor: pointer;
  background: transparent;
  color: #64748b;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  outline: none;
}

body.dark-mode .auth-mode-btn {
  color: #94a3b8;
}

.auth-mode-btn.active {
  background: #ffffff;
  color: #1554e8;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

body.dark-mode .auth-mode-btn.active {
  background: #1e293b;
  color: #60a5fa;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

/* --- Input Groups & Wrappers with Icons --- */
.auth-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  z-index: 1;
}

.auth-input-group label {
  font-size: 12.5px;
  font-weight: 700;
  color: #334155;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

body.dark-mode .auth-input-group label {
  color: #cbd5e1;
}

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-icon {
  position: absolute;
  left: 14px;
  color: #94a3b8;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.auth-input-field {
  width: 100%;
  height: 48px;
  padding: 0 44px 0 44px;
  border-radius: 13px;
  border: 1.5px solid rgba(203, 213, 225, 0.85);
  background: #ffffff;
  color: #0f172a;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

body.dark-mode .auth-input-field {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(255, 255, 255, 0.14);
  color: #f8fafc;
}

.auth-input-field:focus {
  border-color: #1554e8;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(21, 84, 232, 0.14);
}

body.dark-mode .auth-input-field:focus {
  background: rgba(15, 23, 42, 0.85);
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.2);
}

.auth-input-wrap:focus-within .auth-input-icon {
  color: #1554e8;
}

body.dark-mode .auth-input-wrap:focus-within .auth-input-icon {
  color: #60a5fa;
}

.auth-pw-toggle {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.auth-pw-toggle:hover {
  color: #1554e8;
  background: rgba(21, 84, 232, 0.08);
}

body.dark-mode .auth-pw-toggle:hover {
  color: #60a5fa;
  background: rgba(255, 255, 255, 0.08);
}

/* --- Submit Button (Vibrant & Animated) --- */
.btn-auth-submit {
  width: 100%;
  height: 48px;
  border-radius: 13px;
  font-size: 14.5px;
  font-weight: 700;
  background: linear-gradient(135deg, #1554e8 0%, #7c3aed 100%);
  color: #ffffff;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 24px -4px rgba(21, 84, 232, 0.42);
  margin-top: 6px;
  font-family: inherit;
  letter-spacing: -0.01em;
}

.btn-auth-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -4px rgba(21, 84, 232, 0.55);
  filter: brightness(1.04);
}

.btn-auth-submit:active {
  transform: translateY(0);
}

/* --- Divider --- */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 6px 0;
  position: relative;
  z-index: 1;
}

.auth-divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(203, 213, 225, 0.9), transparent);
}

body.dark-mode .auth-divider-line {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}

.auth-divider-text {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* --- Google Button (Clean & Elevated) --- */
.btn-auth-google {
  width: 100%;
  height: 46px;
  border-radius: 13px;
  background: #ffffff;
  color: #0f172a;
  border: 1.5px solid rgba(203, 213, 225, 0.85);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  font-family: inherit;
  position: relative;
  z-index: 1;
}

.btn-auth-google:hover {
  background: #f8fafc;
  border-color: rgba(148, 163, 184, 0.9);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

body.dark-mode .btn-auth-google {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  color: #f8fafc;
}

body.dark-mode .btn-auth-google:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

/* --- Security & Feature Badges --- */
.auth-security-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 11.5px;
  color: #94a3b8;
  font-weight: 600;
  margin-top: 4px;
  flex-wrap: wrap;
}

/* --- Connected State View (Luxury Profile Card) --- */
.connected-user-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(59, 130, 246, 0.08) 100%);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

body.dark-mode .connected-user-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(59, 130, 246, 0.15) 100%);
  border-color: rgba(16, 185, 129, 0.35);
}

.connected-avatar-ring {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #3b82f6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.connected-info {
  flex: 1;
  min-width: 0;
}

.connected-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #059669;
  background: rgba(16, 185, 129, 0.12);
  padding: 2px 8px;
  border-radius: 999px;
  margin-bottom: 4px;
}

body.dark-mode .connected-status-pill {
  color: #34d399;
  background: rgba(16, 185, 129, 0.2);
}

.connected-email-text {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.dark-mode .connected-email-text {
  color: #f8fafc;
}

.connected-subtext {
  margin: 2px 0 0 0;
  font-size: 12px;
  color: #64748b;
}

body.dark-mode .connected-subtext {
  color: #94a3b8;
}

/* --- Toast Feedback --- */
.dsa-profile-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  color: #fff;
  padding: 12px 20px;
  border-radius: 14px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  z-index: 1000000;
  transform: translateY(80px);
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

body.dark-mode .dsa-profile-toast {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.dsa-profile-toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* --- SQL Snippet Box inside Settings --- */
.sql-snippet-box {
  background: #0b1120;
  color: #94a3b8;
  padding: 14px 16px;
  border-radius: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11.5px;
  line-height: 1.5;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}
