/* ==========================================================================
   FUNDBRIDGE AUTHENTICATION STYLESHEET
   Fixed Viewport Height (Strict 100vh - NO Window/Panel Scrolling)
   "One View" Presentation with Clean Adaptive Scaling
   ========================================================================== */

:root {
  --navy: #0b2948;
  --navy-deep: #06182b;
  --navy-dark: #0a2540;
  --blue: #226496;
  --blue-bright: #0284c7;
  --blue-soft: #eaf3f9;
  --ink: #0f2742;
  --text-muted: #5e7388;
  --border: #e2eaf0;
  --border-focus: #226496;
  --success: #10b981;
  --danger: #ef4444;
  --danger-soft: #fef2f2;
  --danger-border: #fecaca;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-full: 9999px;
  --shadow-sm: 0 2px 8px rgba(11, 41, 72, 0.05);
  --shadow-md: 0 10px 25px -4px rgba(11, 41, 72, 0.08);
  --shadow-lg: 0 20px 40px -8px rgba(11, 41, 72, 0.12);
  --transition-fast: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100vh !important;
  max-height: 100vh !important;
  overflow: hidden !important; /* STRICT: NO SCROLLBAR ANYWHERE */
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: #f8fbfe;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

button, input {
  font-family: inherit;
  font-size: inherit;
}

/* ==========================================================================
   SPLIT CONTAINER (LOCKED VIEWPORT - NO SCROLL)
   ========================================================================== */

.auth-page {
  display: flex;
  width: 100%;
  height: 100vh !important;
  max-height: 100vh !important;
  overflow: hidden !important;
}

/* ==========================================================================
   LEFT PANEL: BRAND SHOWCASE
   ========================================================================== */

.auth-showcase {
  flex: 1.15;
  height: 100vh !important;
  max-height: 100vh !important;
  background: 
    radial-gradient(circle at 15% 20%, rgba(34, 100, 150, 0.4) 0%, transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(2, 132, 199, 0.25) 0%, transparent 55%),
    linear-gradient(145deg, #06182b 0%, #0a2744 50%, #061729 100%);
  color: #ffffff;
  padding: clamp(20px, 3.5vh, 36px) clamp(24px, 3.5vw, 44px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden !important;
}

.auth-showcase::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1.2px, transparent 1.2px);
  background-size: 24px 24px;
  pointer-events: none;
}

/* Showcase Header */
.showcase-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.showcase-logo {
  display: inline-flex;
  align-items: center;
}

.showcase-logo-img {
  height: 36px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.96;
}

.showcase-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7dd3fc;
  background: rgba(125, 211, 252, 0.12);
  border: 1px solid rgba(125, 211, 252, 0.22);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.badge-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
}

/* Showcase Body */
.showcase-body {
  position: relative;
  z-index: 2;
  margin: clamp(10px, 2vh, 20px) 0;
  max-width: 520px;
}

.showcase-body h1 {
  font-size: clamp(22px, 2.6vh, 32px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: #ffffff;
  margin: 0 0 8px;
}

.showcase-accent {
  background: linear-gradient(135deg, #7dd3fc 0%, #38bdf8 50%, #60a5fa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.showcase-desc {
  font-size: 13px;
  line-height: 1.58;
  color: #b3c9dd;
  margin: 0 0 clamp(8px, 1.6vh, 16px);
}

/* Feature Highlights */
.showcase-features {
  display: flex;
  flex-direction: column;
  gap: clamp(6px, 1.2vh, 10px);
}

.feature-pill-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.feature-pill-card:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateX(3px);
}

.pill-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: rgba(2, 132, 199, 0.2);
  border: 1px solid rgba(56, 189, 248, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #38bdf8;
  flex-shrink: 0;
}

.pill-content strong {
  display: block;
  font-size: 12.5px;
  color: #ffffff;
  margin-bottom: 1px;
}

.pill-content span {
  display: block;
  font-size: 11px;
  color: #92b0c9;
}

/* Showcase Footer */
.showcase-footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: clamp(8px, 1.5vh, 14px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.social-proof {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stars {
  color: #fbbf24;
  letter-spacing: 2px;
  font-size: 11px;
}

.proof-text {
  font-size: 11.5px;
  color: #9cb8d0;
  font-weight: 600;
}

.footer-privacy-note {
  font-size: 11px;
  color: #7995ae;
}

/* ==========================================================================
   RIGHT PANEL: FORM CONTAINER (STRICT ONE VIEW - NO SCROLL)
   ========================================================================== */

.auth-form-panel {
  flex: 1;
  height: 100vh !important;
  max-height: 100vh !important;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  padding: clamp(16px, 2.5vh, 28px) clamp(24px, 4vw, 44px);
  overflow: hidden !important; /* NO SCROLLBAR */
  position: relative;
}

/* Form Top Bar */
.form-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 400px;
  margin-bottom: clamp(6px, 1.5vh, 14px);
  flex-shrink: 0;
}

.back-home-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.back-home-link:hover {
  color: var(--blue);
  transform: translateX(-3px);
}

.mobile-logo-link {
  display: none;
}

.mobile-logo-img {
  height: 30px;
  width: auto;
}

/* Form Card Wrapper */
.auth-form-wrapper {
  width: 100%;
  max-width: 400px;
  margin: auto 0; /* Centered without pushing overflow */
  display: flex;
  flex-direction: column;
}

.form-header {
  margin-bottom: clamp(8px, 1.8vh, 16px);
}

.form-header h2 {
  font-size: clamp(20px, 2.8vh, 26px);
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--navy);
  margin: 0 0 3px;
}

.form-header p {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
}

/* Alert Boxes */
.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: var(--danger-soft);
  border: 1px solid var(--danger-border);
  color: #991b1b;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 12px;
  line-height: 1.4;
  margin-bottom: 12px;
}

.auth-alert svg {
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--danger);
}

/* Form Elements */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: clamp(7px, 1.4vh, 12px);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

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

.form-label {
  font-size: 12px;
  font-weight: 700;
  color: #334e68;
}

.form-sublabel {
  font-size: 11px;
  color: #829ab1;
  font-weight: 500;
}

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

.input-icon {
  position: absolute;
  left: 12px;
  color: #829ab1;
  pointer-events: none;
  display: flex;
  align-items: center;
  transition: color var(--transition-fast);
}

.input-icon svg {
  width: 16px;
  height: 16px;
}

.form-input {
  width: 100%;
  padding: 8.5px 12px 8.5px 36px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--navy);
  background: #fdfefe;
  outline: none;
  transition: all var(--transition-fast);
}

.form-input::placeholder {
  color: #a0aec0;
}

.form-input:focus {
  border-color: var(--blue);
  background: #ffffff;
  box-shadow: 0 0 0 2.5px rgba(34, 100, 150, 0.12);
}

.form-input:focus + .input-icon,
.input-container:focus-within .input-icon {
  color: var(--blue);
}

/* Password Toggle */
.password-toggle-btn {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: #829ab1;
  cursor: pointer;
  padding: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
}

.password-toggle-btn:hover {
  color: var(--navy);
}

.password-toggle-btn svg {
  width: 16px;
  height: 16px;
}

/* Remember & Forgot Row */
.form-helper-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  margin-top: 1px;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: #486581;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  accent-color: var(--blue);
  width: 13px;
  height: 13px;
  cursor: pointer;
}

.forgot-link {
  color: var(--blue);
  font-weight: 600;
}

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

/* Referral Input Style */
.referral-input {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}

/* Action Button */
.btn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  padding: 9px 16px;
  background: linear-gradient(135deg, #0b2948 0%, #1a5482 100%);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(11, 41, 72, 0.18);
  transition: all var(--transition-fast);
  margin-top: 4px;
  position: relative;
  overflow: hidden;
}

.btn-submit:hover {
  background: linear-gradient(135deg, #061c33 0%, #13446b 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(11, 41, 72, 0.26);
}

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

.btn-submit::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  transition: left 0.6s ease;
}

.btn-submit:hover::after {
  left: 140%;
}

.btn-arrow {
  display: inline-block;
  transition: transform var(--transition-fast);
}

.btn-submit:hover .btn-arrow {
  transform: translateX(3px);
}

/* Form Footer Prompt */
.form-footer-prompt {
  text-align: center;
  margin-top: clamp(8px, 1.6vh, 14px);
  font-size: 12.5px;
  color: var(--text-muted);
}

.form-footer-prompt a {
  color: var(--blue);
  font-weight: 700;
}

.form-footer-prompt a:hover {
  text-decoration: underline;
}

/* Bottom Security Badge */
.form-security-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: clamp(8px, 1.8vh, 16px);
  font-size: 10.5px;
  color: #829ab1;
  flex-shrink: 0;
}

.form-security-badge svg {
  color: #10b981;
}

/* ==========================================================================
   RESPONSIVE DESIGN (TABLETS & MOBILE)
   ========================================================================== */

@media (max-width: 900px) {
  html, body {
    height: auto !important;
    max-height: none !important;
    overflow-y: auto !important; /* Allow normal scroll on mobile */
    position: static;
  }

  .auth-page {
    height: auto !important;
    max-height: none !important;
    overflow-y: visible !important;
    flex-direction: column;
  }

  .auth-showcase {
    height: auto !important;
    max-height: none !important;
    flex: none;
    padding: 24px 20px;
  }

  .showcase-header {
    margin-bottom: 12px;
  }

  .showcase-body {
    margin: 8px 0 12px;
  }

  .showcase-body h1 {
    font-size: 22px;
  }

  .showcase-desc {
    font-size: 13px;
    margin-bottom: 12px;
  }

  .showcase-features {
    display: none;
  }

  .showcase-footer {
    display: none;
  }

  .auth-form-panel {
    height: auto !important;
    max-height: none !important;
    flex: 1;
    padding: 24px 20px 36px;
    overflow: visible !important;
  }

  .mobile-logo-link {
    display: inline-block;
  }
}
