/* =============================================
   Sign In Page — wabs.ai
   Deep navy SaaS design matching homepage
   ============================================= */

/* ---------- Signin Color Overrides ---------- */
.sp-page {
  --hp-bg:           #080B18;
  --hp-bg2:          #0C1020;
  --hp-surface:      #0F1529;
  --hp-surface2:     #141A30;
  --hp-border:       rgba(139,92,246,0.14);
  --hp-border-soft:  rgba(255,255,255,0.06);
  --hp-purple:       #8B5CF6;
  --hp-purple-deep:  #6D28D9;
  --hp-purple-light: #A78BFA;
  --hp-purple-glow:  rgba(139,92,246,0.22);
  --hp-violet:       #7C3AED;
  --hp-white:        #FFFFFF;
  --hp-text:         #E8EAFF;
  --hp-muted:        #6B7BA4;
  --hp-muted2:       #4A5578;
  --hp-radius:       14px;
}

/* ---------- Page-level base ---------- */
.sp-page {
  background: var(--hp-bg) !important;
  color: var(--hp-text);
  font-family: 'Manrope', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}

/* Noise texture overlay — same as homepage */
.sp-page::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
  opacity: 0.45;
}

.sp-page h1, .sp-page h2, .sp-page h3, .sp-page h4, .sp-page strong {
  font-family: 'Outfit', sans-serif;
  line-height: 1.1;
}

/* ---------- Animations ---------- */
@keyframes sp-fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes sp-blink {
  0%, 100% { opacity: 1; }
  55% { opacity: 0.2; }
}

@keyframes sp-loader {
  0%   { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}

/* ==========================================
   AUTH SECTION
   ========================================== */
.sp-auth {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 28px;
  position: relative;
  overflow: hidden;
}

/* Glow orbs — same style as hp-hg1/hg2/hg3 */
.sp-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.sp-glow--one {
  width: 800px;
  height: 600px;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 40%, rgba(109,40,217,0.22) 0%, rgba(139,92,246,0.07) 45%, transparent 70%);
}

.sp-glow--two {
  width: 400px;
  height: 400px;
  bottom: -5%;
  right: 10%;
  background: radial-gradient(circle, rgba(167,139,250,0.07), transparent 70%);
}

/* Dot grid — same as hp-dots */
.sp-auth::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(139,92,246,0.25) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 0%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 0%, transparent 100%);
  opacity: 0.5;
}

/* ---------- Layout ---------- */
.signbody {
  position: relative;
  z-index: 2;
  width: 100%;
}

.form-container {
  max-width: 520px;
  margin: 0 auto;
}

/* ==========================================
   CARD — same surface style as hp-tab-shell / hp-fc
   ========================================== */
.card-sign {
  position: relative;
  padding: 36px 32px 40px;
  border-radius: 22px;
  border: 1px solid var(--hp-border-soft);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0)),
    rgba(12,16,32,0.78);
  box-shadow: 0 26px 80px rgba(3,6,17,0.45);
  animation: sp-fadeUp 0.55s ease both;
}

/* Hover gradient line at top — same as hp-tc::before */
.card-sign::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139,92,246,0.6), transparent);
  border-radius: 22px 22px 0 0;
}

/* ---------- Top bar ---------- */
.sign-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 28px;
}

/* Tag — same as hp-tag */
.sp-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'Manrope', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hp-purple-light);
  border: 1px solid rgba(139,92,246,0.35);
  background: rgba(139,92,246,0.08);
  border-radius: 100px;
  padding: 5px 14px;
}

/* Dot — same as hp-dot */
.sp-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--hp-purple);
  flex-shrink: 0;
  box-shadow: 0 0 8px var(--hp-purple);
  animation: sp-blink 2.2s infinite;
}

.sp-home-link {
  color: var(--hp-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sp-home-link:hover {
  color: var(--hp-text);
}

/* ---------- Logo ---------- */
.sign-header {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}

.sp-logo-link {
  display: block;
  text-decoration: none;
  transition: transform 0.25s;
}

.sp-logo-link:hover {
  transform: translateY(-2px);
}

.mainlg-rgst {
  height: 64px;
  width: auto;
  display: block;
  filter: brightness(1.1);
}

/* ---------- Heading ---------- */
.heading-tittle {
  text-align: center;
  margin: 0 auto 28px;
}

.heading-tittle h3 {
  margin: 0 0 8px;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--hp-white);
}

.heading-tittle p {
  margin: 0;
  font-size: 16px;
  line-height: 1.65;
  color: var(--hp-muted);
}

/* ==========================================
   FORM
   ========================================== */
.sign-upbody {
  margin: 0 auto;
}

#uLogin,
#trdReg,
#uforget {
  display: grid;
  gap: 18px;
}

.form-field {
  display: grid;
  gap: 7px;
}

.form-field label {
  color: var(--hp-purple-light);
  font-family: 'Manrope', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.form-field-password {
  position: relative;
}

/* Input — matches homepage surface card styling */
.sp-input {
  width: 100%;
  height: 52px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid var(--hp-border-soft);
  background: var(--hp-surface);
  color: var(--hp-white);
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  font-weight: 500;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}

.sp-input::placeholder {
  color: var(--hp-muted2);
}

.sp-input:focus {
  border-color: rgba(139,92,246,0.4);
  box-shadow: 0 0 0 4px rgba(139,92,246,0.08);
  background: var(--hp-surface2);
}

.form-field-password .sp-input {
  padding-right: 50px;
}

/* Eye toggle */
.sp-toggle-eye {
  position: absolute;
  right: 18px;
  bottom: 36px;
  color: var(--hp-muted);
  cursor: pointer;
  transition: color 0.2s;
}

.sp-toggle-eye:hover {
  color: var(--hp-purple-light);
}

/* Error text */
.sp-error {
  min-height: 16px;
  color: #fb7185;
  font-size: 12px;
  font-weight: 500;
}

/* ---------- Submit Button — same as hp-btn-p ---------- */
.form-btn {
  margin-top: 4px;
}

.sp-submit {
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--hp-violet), var(--hp-purple));
  color: #fff;
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 32px rgba(109,40,217,0.45);
  transition: all 0.25s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.sp-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 44px rgba(109,40,217,0.65);
  color: #fff;
}

/* Shine overlay on hover — same as hp-btn-p::after */
.sp-submit::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.14), transparent);
  opacity: 0;
  transition: opacity 0.25s;
}

.sp-submit:hover::after {
  opacity: 1;
}

/* ==========================================
   CHECKBOX & TERMS LINK (signup)
   ========================================== */
.sp-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.sp-checkbox-input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--hp-purple);
  cursor: pointer;
}

.sp-checkbox-label {
  color: var(--hp-muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
}

.sp-terms-link {
  color: var(--hp-purple-light);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}

.sp-terms-link:hover {
  color: var(--hp-white);
}

/* ==========================================
   TERMS OF SERVICE MODAL
   ========================================== */
.sp-tos-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8,11,24,0.84);
  backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.sp-tos-overlay.active {
  opacity: 1;
  visibility: visible;
}

.sp-tos-modal {
  width: min(94vw, 640px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  border: 1px solid var(--hp-border-soft);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0)),
    rgba(12,16,32,0.96);
  box-shadow: 0 26px 80px rgba(3,6,17,0.55);
  animation: sp-fadeUp 0.35s ease both;
}

.sp-tos-header {
  padding: 28px 28px 0;
  text-align: center;
}

.sp-tos-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--hp-white);
  margin: 0 0 6px;
}

.sp-tos-header p {
  color: var(--hp-muted);
  font-size: 14px;
  margin: 0;
}

.sp-tos-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px;
  scrollbar-width: thin;
  scrollbar-color: rgba(139,92,246,0.3) transparent;
}

.sp-tos-body::-webkit-scrollbar {
  width: 5px;
}

.sp-tos-body::-webkit-scrollbar-track {
  background: transparent;
}

.sp-tos-body::-webkit-scrollbar-thumb {
  background: rgba(139,92,246,0.3);
  border-radius: 10px;
}

.sp-tos-content {
  margin-bottom: 24px;
}

.sp-tos-content h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--hp-white);
  margin: 20px 0 8px;
}

.sp-tos-content h3:first-child {
  margin-top: 0;
}

.sp-tos-content p {
  color: var(--hp-muted);
  font-size: 13px;
  line-height: 1.65;
  margin: 0 0 8px;
}

.sp-tos-content ul {
  padding-left: 20px;
  margin: 0 0 8px;
}

.sp-tos-content li {
  color: var(--hp-muted);
  font-size: 13px;
  line-height: 1.65;
  margin-bottom: 4px;
}

.sp-tos-checks {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
  padding: 18px;
  border-radius: var(--hp-radius);
  background: var(--hp-surface);
  border: 1px solid var(--hp-border-soft);
}

.sp-tos-check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.sp-tos-check-item input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--hp-purple);
  cursor: pointer;
}

.sp-tos-check-item span {
  color: var(--hp-text);
  font-size: 13px;
  line-height: 1.5;
}

.sp-tos-warning {
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(251,113,133,0.06);
  border: 1px solid rgba(251,113,133,0.15);
  color: #fda4af;
  font-size: 12px;
  line-height: 1.6;
}

.sp-tos-warning strong {
  font-family: 'Manrope', sans-serif;
  color: #fb7185;
}

.sp-tos-footer {
  display: flex;
  gap: 12px;
  padding: 20px 28px 24px;
  border-top: 1px solid var(--hp-border-soft);
}

.sp-tos-btn {
  flex: 1;
  height: 46px;
  border-radius: 12px;
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s;
  border: none;
}

.sp-tos-btn--decline {
  background: transparent;
  border: 1px solid var(--hp-border-soft);
  color: var(--hp-muted);
}

.sp-tos-btn--decline:hover {
  border-color: rgba(139,92,246,0.3);
  color: var(--hp-text);
}

.sp-tos-btn--accept {
  background: linear-gradient(135deg, var(--hp-violet), var(--hp-purple));
  color: #fff;
  box-shadow: 0 4px 32px rgba(109,40,217,0.45);
  opacity: 0.4;
  pointer-events: none;
}

.sp-tos-btn--accept.enabled {
  opacity: 1;
  pointer-events: auto;
}

.sp-tos-btn--accept.enabled:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 44px rgba(109,40,217,0.65);
}

/* ==========================================
   FOOTER LINKS
   ========================================== */
.sign-footer {
  margin-top: 24px;
}

.divider-Sign {
  text-align: center;
  margin-bottom: 14px;
}

.divider-Sign span {
  color: var(--hp-muted);
  font-size: 13px;
  font-weight: 600;
}

.allredy-visitBtn {
  display: flex;
  gap: 12px;
}

/* Link buttons — same style as hp-btn-o */
.sp-link-btn {
  flex: 1;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  text-decoration: none;
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--hp-text);
  background: transparent;
  border: 1px solid rgba(139,92,246,0.3);
  transition: all 0.25s;
}

.sp-link-btn:hover {
  color: var(--hp-text);
  background: rgba(139,92,246,0.08);
  border-color: var(--hp-purple);
}

.sp-link-btn--ghost {
  color: var(--hp-muted);
  border-color: var(--hp-border-soft);
}

.sp-link-btn--ghost:hover {
  color: var(--hp-text);
  border-color: rgba(139,92,246,0.3);
}

/* ==========================================
   LOADING OVERLAY
   ========================================== */
.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(8,11,24,0.84);
  backdrop-filter: blur(14px);
}

.loading-container {
  width: min(92vw, 480px);
  padding: 34px 30px;
  border-radius: 22px;
  border: 1px solid var(--hp-border-soft);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0)),
    rgba(12,16,32,0.96);
  box-shadow: 0 26px 80px rgba(3,6,17,0.45);
  text-align: center;
}

.loading-container h1 {
  margin: 0 0 18px;
  font-size: 28px;
  font-weight: 800;
  color: var(--hp-white);
}

.progress-container {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--hp-surface);
}

.progress-bar {
  width: 40%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--hp-violet), var(--hp-purple));
  animation: sp-loader 1.25s ease-in-out infinite;
}

.status-text {
  margin: 16px 0 0;
  color: var(--hp-muted);
  font-size: 14px;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 600px) {
  .sp-auth {
    padding: 40px 16px;
  }

  .card-sign {
    padding: 28px 20px 32px;
    border-radius: 18px;
  }

  .card-sign::before {
    border-radius: 18px 18px 0 0;
  }

  .sign-topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .heading-tittle h3 {
    font-size: 30px;
  }

  .allredy-visitBtn {
    flex-direction: column;
  }

  .sp-toggle-eye {
    bottom: 36px;
  }
}
