/* =========================================================
   Auth modal polish — 2026-06-06
   Clean Sky Hub-style card for the login / signup popup:
   white panel, hairline border, soft shadow, segmented tabs,
   roomy 44px inputs with a proper focus ring, brand CTA.
   Pairs with the main.js fix that stops the modal from
   closing when a drag ends on the backdrop.
   ========================================================= */

/* Backdrop: light scrim, cheap blur (perf.css caps it anyway) */
#auth-overlay.modal-overlay {
  background: rgba(15, 23, 42, 0.32) !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
}

/* Panel */
#auth-overlay .auth-modal {
  width: min(420px, calc(100vw - 32px)) !important;
  background: #ffffff !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  border-radius: 20px !important;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.05),
    0 24px 60px -16px rgba(15, 23, 42, 0.25) !important;
  padding: 24px !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Close button — quiet, top-right */
#auth-overlay .modal-close {
  width: 32px !important;
  height: 32px !important;
  border-radius: 10px !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  color: rgba(100, 116, 139, 0.8) !important;
  font-size: 20px !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background 0.15s ease, color 0.15s ease !important;
}
#auth-overlay .modal-close:hover {
  background: rgba(15, 23, 42, 0.05) !important;
  color: rgba(15, 23, 42, 0.9) !important;
}

/* Tabs — SkyHub segmented control: soft track, slate-900 active pill */
#auth-overlay .auth-tabs {
  display: flex !important;
  gap: 4px !important;
  padding: 4px !important;
  background: rgba(15, 23, 42, 0.04) !important;
  border: 1px solid rgba(15, 23, 42, 0.06) !important;
  border-radius: 12px !important;
  margin-bottom: 18px !important;
}
#auth-overlay .auth-tab {
  flex: 1 !important;
  height: 36px !important;
  border: 0 !important;
  border-radius: 9px !important;
  background: transparent !important;
  font-family: var(--font-body) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: rgba(100, 116, 139, 0.9) !important;
  cursor: pointer !important;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease !important;
}
#auth-overlay .auth-tab:hover { color: rgba(15, 23, 42, 0.9) !important; }
#auth-overlay .auth-tab.active {
  background: #0F172A !important;
  color: #fff !important;
  box-shadow: 0 4px 12px -4px rgba(15, 23, 42, 0.4) !important;
}

/* Headings */
#auth-overlay .auth-form h3 {
  font-family: var(--font-display) !important;
  font-size: 22px !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em !important;
  color: rgba(15, 23, 42, 0.94) !important;
  margin: 0 0 4px !important;
}
#auth-overlay .auth-subtext {
  font-size: 13px !important;
  color: rgba(100, 116, 139, 0.9) !important;
  margin: 0 0 16px !important;
}

/* Inputs — 44px, calm borders, visible focus ring */
#auth-overlay .input-group { margin-bottom: 12px !important; }
#auth-overlay .input-group label {
  display: block !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: rgba(51, 65, 85, 0.9) !important;
  margin-bottom: 5px !important;
}
#auth-overlay .input-group input[type="email"],
#auth-overlay .input-group input[type="password"],
#auth-overlay .input-group input[type="text"] {
  width: 100% !important;
  height: 44px !important;
  padding: 0 14px !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  border-radius: 12px !important;
  background: #fff !important;
  font-family: var(--font-body) !important;
  font-size: 14px !important;
  color: rgba(15, 23, 42, 0.94) !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
  box-shadow: none !important;
}
#auth-overlay .input-group input:focus {
  outline: none !important;
  border-color: rgba(34, 189, 255, 0.6) !important;
  box-shadow: 0 0 0 3px rgba(34, 189, 255, 0.18) !important;
  background: #fff !important;
}
#auth-overlay .input-group input::placeholder {
  color: rgba(148, 163, 184, 0.85) !important;
}

/* Primary CTA — brand cyan pill */
#auth-overlay .btn-primary.full-width {
  width: 100% !important;
  height: 44px !important;
  margin-top: 6px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: linear-gradient(180deg, #22BDFF, #0AA1E7) !important;
  color: #fff !important;
  font-family: var(--font-body) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  letter-spacing: -0.01em !important;
  box-shadow: 0 10px 24px -10px rgba(34, 189, 255, 0.55) !important;
  cursor: pointer !important;
  transition: filter 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease !important;
}
#auth-overlay .btn-primary.full-width:hover {
  filter: brightness(1.06) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 14px 30px -10px rgba(34, 189, 255, 0.6) !important;
}
#auth-overlay .btn-primary.full-width:active {
  transform: translateY(0) scale(0.99) !important;
}

/* Forgot-password link */
#auth-overlay .auth-forgot-link {
  display: block !important;
  margin: 12px auto 0 !important;
  background: transparent !important;
  border: 0 !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  color: rgba(2, 132, 199, 0.92) !important;
  cursor: pointer !important;
}
#auth-overlay .auth-forgot-link:hover { text-decoration: underline !important; }

/* Helper text */
#auth-overlay .auth-helper {
  font-size: 11.5px !important;
  color: rgba(100, 116, 139, 0.8) !important;
}

/* Gentle entrance — one-shot, cheap */
@keyframes authPopIn {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
#auth-overlay:not(.hidden) .auth-modal {
  animation: authPopIn 0.22s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
