/* ==========================================================================
   QSwitch SuperApp Platform - Premium Split-Screen Login & Slider System
   Design System: Obsidian Dark Glassmorphism, Neon Cyan & Indigo Accents
   ========================================================================== */

:root {
  --qs-bg: #07090e;
  --qs-surface: rgba(15, 20, 32, 0.85);
  --qs-surface-elevated: rgba(22, 29, 48, 0.9);
  --qs-border: rgba(255, 255, 255, 0.08);
  --qs-border-glow: rgba(99, 102, 241, 0.4);
  --qs-primary: #4f46e5;
  --qs-primary-light: #6366f1;
  --qs-cyan: #06b6d4;
  --qs-emerald: #10b981;
  --qs-amber: #f59e0b;
  --qs-text-main: #f8fafc;
  --qs-text-muted: #94a3b8;
  --qs-text-sub: #64748b;
  --qs-radius: 16px;
  --qs-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 45px -10px rgba(99, 102, 241, 0.2);
}

/* Base Body Enhancements */
body {
  background-color: var(--qs-bg) !important;
  color: var(--qs-text-main) !important;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  font-family: "InterDisplay", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

/* Ambient Background Glows */
body::before {
  content: '';
  position: fixed;
  top: -20%;
  left: -10%;
  width: 60vw;
  height: 60vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, rgba(6, 182, 212, 0.04) 40%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  animation: qsPulseOrb 12s ease-in-out infinite alternate;
}

body::after {
  content: '';
  position: fixed;
  bottom: -20%;
  right: -10%;
  width: 50vw;
  height: 50vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, rgba(79, 70, 229, 0.06) 50%, transparent 70%);
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}

@keyframes qsPulseOrb {
  0% { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.15) translate(30px, 40px); }
}

/* Split-Screen Master Container */
.qswitch-split-wrapper {
  display: flex;
  width: 100vw;
  min-height: 100vh;
  position: relative;
  z-index: 1;
  background-color: var(--qs-bg);
}

/* ==========================================================================
   LEFT COLUMN: Feature Slider
   ========================================================================== */
.qswitch-slider-panel {
  flex: 0 0 50%;
  max-width: 50%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 56px 64px;
  background: linear-gradient(135deg, rgba(13, 17, 28, 0.94) 0%, rgba(9, 11, 19, 0.98) 100%);
  border-right: 1px solid var(--qs-border);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

/* Grid pattern background overlay on left panel */
.qswitch-slider-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
}

/* Brand Header */
.qs-brand-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 16px;
}

.qs-brand-logo-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px -4px rgba(79, 70, 229, 0.55);
}

.qs-brand-text-group {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.qs-brand-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 30%, #a5b4fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.qs-brand-badge {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
}

/* Slider Container */
.qs-slider-container {
  position: relative;
  z-index: 2;
  margin: 48px 0;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.qs-slide-item {
  display: none;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.qs-slide-item.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.qs-slide-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-radius: 30px;
  font-size: 12px;
  font-weight: 600;
  color: var(--qs-cyan);
  margin-bottom: 22px;
}

.qs-slide-tag-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--qs-cyan);
  box-shadow: 0 0 8px var(--qs-cyan);
}

.qs-slide-title {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.25;
  color: #ffffff;
  margin: 0 0 18px 0;
  letter-spacing: -0.025em;
}

.qs-slide-description {
  font-size: 16px;
  line-height: 1.65;
  color: var(--qs-text-muted);
  max-width: 520px;
  margin: 0 0 32px 0;
}

/* Interactive Preview Box in Slide */
.qs-slide-card {
  background: var(--qs-surface);
  border: 1px solid var(--qs-border);
  border-radius: 16px;
  padding: 20px 26px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 12px 30px -5px rgba(0, 0, 0, 0.6);
  max-width: 520px;
}

.qs-card-stat {
  display: flex;
  flex-direction: column;
}

.qs-card-stat-label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--qs-text-sub);
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 5px;
}

.qs-card-stat-value {
  font-size: 19px;
  font-weight: 700;
  color: #ffffff;
}

.qs-card-stat-value.cyan { color: var(--qs-cyan); }
.qs-card-stat-value.emerald { color: var(--qs-emerald); }
.qs-card-stat-value.indigo { color: #a5b4fc; }

/* Slider Navigation Dots & Progress */
.qs-slider-controls {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  border-top: 1px solid var(--qs-border);
}

.qs-dots-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.qs-dot {
  width: 10px;
  height: 10px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.qs-dot:hover {
  background: rgba(255, 255, 255, 0.4);
}

.qs-dot.active {
  width: 32px;
  background: linear-gradient(90deg, #4f46e5 0%, #06b6d4 100%);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.5);
}

.qs-slider-platform-note {
  font-size: 12px;
  color: var(--qs-text-sub);
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.qs-status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--qs-emerald);
  box-shadow: 0 0 8px var(--qs-emerald);
}

/* ==========================================================================
   RIGHT COLUMN: Auth Panel containing React #app
   ========================================================================== */
.qswitch-login-panel {
  flex: 0 0 50%;
  max-width: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  box-sizing: border-box;
  background: radial-gradient(circle at 50% 50%, rgba(20, 26, 42, 0.7) 0%, rgba(7, 9, 14, 0.95) 80%);
  min-height: 100vh;
}

/* Login Page Constraints for React's Fullscreen Classes */
.qswitch-split-wrapper:not(.in-dashboard) #app {
  width: 100% !important;
  max-width: 460px !important;
  margin: 0 auto !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}

.qswitch-split-wrapper:not(.in-dashboard) #app .w-screen,
.qswitch-split-wrapper:not(.in-dashboard) #app [class*="w-screen"] {
  width: 100% !important;
  max-width: 100% !important;
}

.qswitch-split-wrapper:not(.in-dashboard) #app .h-screen,
.qswitch-split-wrapper:not(.in-dashboard) #app .min-h-screen,
.qswitch-split-wrapper:not(.in-dashboard) #app [class*="h-screen"] {
  height: auto !important;
  min-height: auto !important;
  background: transparent !important;
}

/* Restyle the existing React login form container card */
.qswitch-split-wrapper:not(.in-dashboard) #app [class*="bg-white"],
.qswitch-split-wrapper:not(.in-dashboard) #app [class*="bg-jp-gray-light_gray_bg"],
.qswitch-split-wrapper:not(.in-dashboard) #app [class*="border"] {
  background: var(--qs-surface) !important;
  border: 1px solid var(--qs-border) !important;
  border-radius: var(--qs-radius) !important;
  box-shadow: var(--qs-shadow) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  color: var(--qs-text-main) !important;
}

/* Hide background vertical stripes on login screen */
.qswitch-split-wrapper:not(.in-dashboard) #app [class*="bg-[radial-gradient"],
.qswitch-split-wrapper:not(.in-dashboard) #app [style*="background-image"] {
  background-image: none !important;
}

/* Input Fields in Login Card */
.qswitch-split-wrapper:not(.in-dashboard) #app input {
  background: rgba(10, 14, 26, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 10px !important;
  color: #ffffff !important;
  font-size: 14px !important;
  padding: 12px 14px !important;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4) !important;
  transition: all 0.25s ease !important;
}

.qswitch-split-wrapper:not(.in-dashboard) #app input:focus {
  border-color: var(--qs-primary-light) !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3), inset 0 2px 4px rgba(0, 0, 0, 0.4) !important;
  outline: none !important;
}

/* Primary Action Button (Continue / Sign in) */
.qswitch-split-wrapper:not(.in-dashboard) #app button {
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%) !important;
  border: none !important;
  border-radius: 10px !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 15px !important;
  letter-spacing: 0.01em !important;
  padding: 13px 20px !important;
  cursor: pointer !important;
  box-shadow: 0 6px 20px -2px rgba(79, 70, 229, 0.5) !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.qswitch-split-wrapper:not(.in-dashboard) #app button:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 10px 25px -2px rgba(6, 182, 212, 0.6) !important;
}

/* Headings and labels */
.qswitch-split-wrapper:not(.in-dashboard) #app h1,
.qswitch-split-wrapper:not(.in-dashboard) #app h2,
.qswitch-split-wrapper:not(.in-dashboard) #app [class*="text-2xl"],
.qswitch-split-wrapper:not(.in-dashboard) #app [class*="text-xl"],
.qswitch-split-wrapper:not(.in-dashboard) #app [class*="text-3xl"] {
  color: #ffffff !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em !important;
}

.qswitch-split-wrapper:not(.in-dashboard) #app label,
.qswitch-split-wrapper:not(.in-dashboard) #app [class*="text-jp-gray-"] {
  color: var(--qs-text-muted) !important;
}

/* Link & Tag Styling inside Login */
.qswitch-split-wrapper:not(.in-dashboard) #app a {
  color: var(--qs-cyan) !important;
  text-decoration: none !important;
  font-weight: 600 !important;
}

.qswitch-split-wrapper:not(.in-dashboard) #app a:hover {
  text-decoration: underline !important;
}

/* ==========================================================================
   STRIP ALL EXTERNAL LINKS, LOGOS & TRACKERS
   ========================================================================== */
a[href*="hyperswitch.io"],
a[href*="juspay.in"],
a[href*="terms"],
a[href*="privacy"],
a[href*="scarf.sh"],
img[src*="scarf.sh"],
img[src*="a.png"] {
  display: none !important;
}

/* Governance footer replacing external links */
.qs-governance-footer {
  margin-top: 24px;
  font-size: 12px;
  color: var(--qs-text-sub);
  text-align: center;
  line-height: 1.5;
  font-weight: 500;
}

/* ==========================================================================
   AUTHENTICATED / DASHBOARD VIEW TRANSITION
   ========================================================================== */
.qswitch-split-wrapper.in-dashboard {
  display: block !important;
}

.qswitch-split-wrapper.in-dashboard #qsSliderPanel {
  display: none !important;
}

.qswitch-split-wrapper.in-dashboard .qswitch-login-panel {
  max-width: 100vw !important;
  width: 100vw !important;
  flex: 1 1 100% !important;
  padding: 0 !important;
  min-height: 100vh !important;
  background: transparent !important;
}

.qswitch-split-wrapper.in-dashboard #app {
  width: 100vw !important;
  height: 100vh !important;
  max-width: 100vw !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
}

/* ==========================================================================
   RESPONSIVE LAYOUT
   ========================================================================== */
@media (max-width: 1024px) {
  .qswitch-slider-panel {
    padding: 40px 32px;
  }
  .qs-slide-title {
    font-size: 28px;
  }
}

@media (max-width: 860px) {
  .qswitch-split-wrapper {
    flex-direction: column;
  }
  .qswitch-slider-panel {
    flex: none;
    max-width: 100%;
    padding: 32px 24px;
    min-height: auto;
    border-right: none;
    border-bottom: 1px solid var(--qs-border);
  }
  .qswitch-login-panel {
    flex: none;
    max-width: 100%;
    padding: 32px 20px;
    min-height: auto;
  }
  .qs-slider-container {
    min-height: auto;
    margin: 24px 0;
  }
  .qs-slide-title {
    font-size: 24px;
  }
}
