@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Outfit:wght@400;500;600;700&display=swap');

:root {
  --primary-purple: #8B00DD;
  --primary-purple-hover: #7300B8;
  --primary-purple-glow: rgba(139, 0, 221, 0.15);
  --primary-purple-glow-soft: rgba(139, 0, 221, 0.05);
  
  --primary-green: #00DF89;
  --primary-green-hover: #00C57A;
  --primary-green-glow: rgba(0, 223, 137, 0.15);
  --primary-green-glow-soft: rgba(0, 223, 137, 0.05);

  --text-main: #18181B;
  --text-muted: #71717A;
  --text-inverse: #FFFFFF;
  
  --bg-base: #FAFAFB;
  --bg-card: #FFFFFF;
  
  --border-color: #E4E4E7;
  --border-color-focus: #8B00DD;
  --border-color-error: #EF4444;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-premium: 0 25px 50px -12px rgba(139, 0, 221, 0.12);

  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-base);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  overflow-x: hidden;
  position: relative;
}

/* Background mesh gradients */
.bg-mesh-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.bg-mesh-glow::before,
.bg-mesh-glow::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.4;
  mix-blend-mode: multiply;
}

.bg-mesh-glow::before {
  width: 500px;
  height: 500px;
  background: var(--primary-purple-glow);
  top: -100px;
  right: -100px;
  animation: floatGlow 12s ease-in-out infinite alternate;
}

.bg-mesh-glow::after {
  width: 600px;
  height: 600px;
  background: var(--primary-green-glow);
  bottom: -150px;
  left: -150px;
  animation: floatGlow 15s ease-in-out infinite alternate-reverse;
}

@keyframes floatGlow {
  0% {
    transform: translate(0, 0) scale(1);
  }
  100% {
    transform: translate(40px, 40px) scale(1.1);
  }
}

/* Base Split Container */
.container {
  display: flex;
  width: 100%;
  min-height: 100vh;
  z-index: 1;
}

/* Left panel: Brand and Marketing */
.marketing-panel {
  display: none;
  flex: 1.1;
  padding: 3rem 4rem;
  background: radial-gradient(circle at 10% 20%, var(--primary-purple-glow-soft) 0%, transparent 60%),
              radial-gradient(circle at 90% 85%, var(--primary-green-glow-soft) 0%, transparent 60%),
              #FCFCFD;
  border-right: 1px solid var(--border-color);
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

@media (min-width: 1024px) {
  .marketing-panel {
    display: flex;
  }
}

.marketing-header .mini-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-main);
  text-decoration: none;
}

.marketing-header .mini-logo img {
  height: 28px;
}

.marketing-body {
  margin: auto 0;
  display: flex;
  flex-direction: column;
  gap: 3rem;
  align-items: center;
}

.marketing-text-content {
  width: 100%;
  max-width: 520px;
  text-align: left;
}

.marketing-tag {
  display: inline-flex;
  align-items: center;
  background: rgba(139, 0, 221, 0.08);
  color: var(--primary-purple);
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(139, 0, 221, 0.12);
  text-transform: uppercase;
}

.marketing-title {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-main);
  margin-bottom: 1.5rem;
}

.marketing-title span.accent {
  background: linear-gradient(135deg, var(--primary-purple) 30%, #5F0099 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
}

.marketing-description {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* Premium CSS Credit Card */
.card-wrapper {
  perspective: 1000px;
  margin: 1.5rem 0;
  cursor: pointer;
}

.credit-card {
  width: 380px;
  height: 230px;
  border-radius: 20px;
  background: linear-gradient(135deg, #18181B 0%, #0F0F11 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.3),
              0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 0.1s ease, box-shadow 0.3s ease;
}

/* Interactive light reflection shimmer on Card */
.credit-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.06) 0%, transparent 60%);
  pointer-events: none;
  transform: translate(-25%, -25%);
  transition: opacity 0.5s ease;
}

.credit-card-glow-purple {
  position: absolute;
  top: -50px;
  right: -50px;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(139, 0, 221, 0.25) 0%, transparent 70%);
  filter: blur(10px);
  pointer-events: none;
}

.credit-card-glow-green {
  position: absolute;
  bottom: -60px;
  left: -60px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(0, 223, 137, 0.2) 0%, transparent 70%);
  filter: blur(10px);
  pointer-events: none;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  transform: translateZ(30px);
}

.card-chip {
  width: 45px;
  height: 35px;
  background: linear-gradient(135deg, #FFE194 0%, #D8A033 100%);
  border-radius: 6px;
  position: relative;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.4), 0 1px 2px rgba(0,0,0,0.2);
}

.card-chip::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 8px;
  right: 8px;
  bottom: 5px;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 4px;
}

.card-logo-icon {
  width: 32px;
  height: 32px;
}

.card-middle {
  margin-top: auto;
  transform: translateZ(40px);
}

.card-number {
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.45rem;
  letter-spacing: 0.18em;
  color: var(--text-inverse);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  word-spacing: 0.1em;
}

.card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 1rem;
  transform: translateZ(25px);
}

.card-holder {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.card-label {
  font-size: 0.6rem;
  text-transform: uppercase;
  color: #71717A;
  letter-spacing: 0.1em;
}

.card-value {
  font-size: 0.85rem;
  font-weight: 500;
  color: #E4E4E7;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.card-expiry {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
}

/* Feature list at footer of left panel */
.marketing-features {
  display: flex;
  gap: 2rem;
  max-width: 520px;
}

.feature-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.feature-icon-wrapper {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--bg-base);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-purple);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.feature-item:hover .feature-icon-wrapper {
  background: var(--primary-purple);
  color: var(--text-inverse);
  border-color: var(--primary-purple);
  transform: translateY(-2px);
}

.feature-item h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}

.feature-item p {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-muted);
}

/* Right panel: Login form */
.form-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 2rem;
  position: relative;
  z-index: 1;
}

@media (min-width: 640px) {
  .form-panel {
    padding: 3rem 6rem;
  }
}

@media (min-width: 1024px) {
  .form-panel {
    padding: 3rem 5rem;
    max-width: 550px;
    flex: none;
    width: 520px;
  }
}

@media (min-width: 1200px) {
  .form-panel {
    width: 560px;
  }
}

.form-container {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.form-header {
  margin-bottom: 2.25rem;
  text-align: left;
}

.form-header .mobile-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.form-header .mobile-logo img {
  height: 38px;
}

@media (min-width: 1024px) {
  .form-header .mobile-logo {
    margin-bottom: 3rem;
  }
}

.form-header h2 {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.form-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Form Styles */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.input-group {
  position: relative;
  display: flex;
  flex-direction: column;
}

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

.input-icon {
  position: absolute;
  left: 1rem;
  color: var(--text-muted);
  pointer-events: none;
  transition: color 0.3s ease;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.input-field {
  width: 100%;
  padding: 1.6rem 1rem 0.6rem 3rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-main);
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  outline: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
}

.input-field::placeholder {
  color: transparent;
}

/* Floating Label */
.input-label {
  position: absolute;
  left: 3rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.95rem;
  color: var(--text-muted);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Floating label effect when focused or populated */
.input-field:focus ~ .input-label,
.input-field:not(:placeholder-shown) ~ .input-label {
  top: 0.85rem;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--primary-purple);
}

/* Input icons focus color changes */
.input-field:focus {
  border-color: var(--primary-purple);
  box-shadow: 0 0 0 4px var(--primary-purple-glow);
  background-color: #FFFFFF;
}

.input-field:focus ~ .input-icon {
  color: var(--primary-purple);
}

/* Password Toggle */
.btn-toggle-password {
  position: absolute;
  right: 1rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.3s ease;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

/* Input error state */
.input-group.has-error .input-field {
  border-color: var(--border-color-error);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.input-group.has-error .input-field:focus {
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15);
}

.input-group.has-error .input-label,
.input-group.has-error .input-icon {
  color: var(--border-color-error) !important;
}

.error-message {
  font-size: 0.78rem;
  color: var(--border-color-error);
  margin-top: 0.35rem;
  display: none;
  font-weight: 500;
}

.input-group.has-error .error-message {
  display: block;
  animation: slideDownError 0.2s ease-out;
}

@keyframes slideDownError {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Options row: remember & forgot password */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  margin-top: 0.25rem;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: var(--text-muted);
  user-select: none;
}

.remember-me input {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  outline: none;
  background-color: var(--bg-card);
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.remember-me input:checked {
  background-color: var(--primary-purple);
  border-color: var(--primary-purple);
}

.remember-me input:checked::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 5px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.remember-me input:focus-visible {
  box-shadow: 0 0 0 2px var(--primary-purple-glow);
}

.forgot-password-link {
  color: var(--primary-purple);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.forgot-password-link:hover {
  color: var(--primary-purple-hover);
  text-decoration: underline;
}

/* Button Sign In */
.btn-submit {
  width: 100%;
  padding: 0.95rem;
  background-color: var(--primary-purple);
  color: var(--text-inverse);
  border: none;
  border-radius: 12px;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-md), 0 4px 14px 0 rgba(139, 0, 221, 0.25);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}

.btn-submit:hover {
  background-color: var(--primary-purple-hover);
  box-shadow: var(--shadow-lg), 0 6px 20px 0 rgba(139, 0, 221, 0.35);
  transform: translateY(-1px);
}

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

/* Button Shimmer loading effect */
.btn-submit::before {
  content: "";
  position: absolute;
  top: 0;
  left: -150%;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.25), transparent);
  transform: skewX(-25deg);
}

.btn-submit.loading::before {
  animation: shine 1.2s ease-in-out infinite;
}

@keyframes shine {
  100% {
    left: 150%;
  }
}

.spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.btn-submit.loading .spinner {
  display: block;
}

.btn-submit.loading .btn-text {
  opacity: 0.8;
}

/* OAuth Social Login section */
.oauth-separator {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.75rem 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.oauth-separator::before,
.oauth-separator::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}

.oauth-separator:not(:empty)::before {
  margin-right: .75rem;
}

.oauth-separator:not(:empty)::after {
  margin-left: .75rem;
}

.social-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.btn-social {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  color: #27272A;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.btn-social:hover {
  background-color: #F4F4F5;
  border-color: #D4D4D8;
  transform: translateY(-1px);
}

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

.btn-social svg {
  width: 20px;
  height: 20px;
}

/* Form Sign Up link */
.form-footer-nav {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.form-footer-nav a {
  color: var(--primary-purple);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.form-footer-nav a:hover {
  color: var(--primary-purple-hover);
  text-decoration: underline;
}

/* Success view after authentication animation */
.success-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  padding: 2rem;
  border-radius: 0;
}

.success-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.success-checkmark-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: var(--primary-green-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-green);
  margin-bottom: 1.5rem;
  transform: scale(0.5);
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.success-overlay.active .success-checkmark-circle {
  transform: scale(1);
}

.success-checkmark-circle svg {
  width: 40px;
  height: 40px;
}

.success-overlay h3 {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.success-overlay p {
  color: var(--text-muted);
  font-size: 0.95rem;
  text-align: center;
}

/* Live Chat Button on bottom-right matching screenshot */
.live-chat-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--primary-purple);
  color: white;
  border: none;
  padding: 0.75rem 1.25rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(139, 0, 221, 0.3);
  z-index: 5;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.live-chat-btn:hover {
  background-color: var(--primary-purple-hover);
  box-shadow: 0 6px 20px rgba(139, 0, 221, 0.45);
  transform: translateY(-2px);
}

.live-chat-btn svg {
  width: 18px;
  height: 18px;
}
