@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

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

:root {
  /* WINADS — ULTRA MODERN FINTECH THEME */
  --primary: #6366F1;
  --primary-hover: #4F46E5;
  --pl: #818CF8;
  --sec: #38BDF8;
  --acc: #EC4899;
  --bg: #0B0F1A;
  --bg-card: #131B2E;
  --field: rgba(255, 255, 255, 0.045);
  --txt: #F8FAFC;
  --muted: #94A3B8;
  --muted2: #CBD5E1;
  --ok: #34D399;
  --err: #F87171;
  --line: rgba(255, 255, 255, 0.08);
  --line2: rgba(255, 255, 255, 0.14);
  --grad: linear-gradient(135deg, #6366F1 0%, #8B5CF6 50%, #38BDF8 100%);
  --grad2: linear-gradient(135deg, #38BDF8 0%, #6366F1 50%, #A855F7 100%);
  --on-grad: #FFFFFF;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--bg);
  color: var(--txt);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Background Atmosphere */
.auth-bg {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  position: relative;
  background:
    radial-gradient(1000px 600px at 15% -10%, rgba(99, 102, 241, 0.18) 0%, transparent 60%),
    radial-gradient(900px 550px at 85% 110%, rgba(56, 189, 248, 0.14) 0%, transparent 60%),
    radial-gradient(650px 450px at 50% 50%, rgba(139, 92, 246, 0.06) 0%, transparent 70%),
    var(--bg);
}

.grid-lines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  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: 48px 48px;
  z-index: 0;
}

.auth-wrapper {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
  max-width: 1140px;
  width: 100%;
  position: relative;
  z-index: 1;
}

/* Auth Card */
.auth-card {
  background: rgba(19, 27, 46, 0.88);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 42px 38px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45), 0 1px 0 rgba(255, 255, 255, 0.08) inset;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  animation: cardIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--grad);
}

/* Brand Logo */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  text-decoration: none;
}

.auth-brand-img {
  height: 42px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  background: #ffffff;
  padding: 5px 12px;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  display: block;
  transition: transform 0.2s ease;
}

.auth-brand-img:hover {
  transform: scale(1.02);
}

.brand-logo {
  width: 44px;
  height: 44px;
  background: var(--grad);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 19px;
  color: #FFFFFF;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.45);
}

.brand-name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--txt);
}
.brand-name b {
  color: var(--pl);
}

.auth-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.6px;
  margin-bottom: 6px;
  color: #FFFFFF;
}

.auth-sub {
  color: var(--muted);
  font-size: 14.5px;
  margin-bottom: 26px;
  line-height: 1.5;
}

/* Form Controls */
.form-group {
  margin-bottom: 18px;
  position: relative;
}

.form-group label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted2);
  text-transform: uppercase;
  letter-spacing: 0.9px;
  margin-bottom: 8px;
}

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

.input-wrap .input-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  pointer-events: none;
  transition: color 0.2s;
  z-index: 2;
}

.input-wrap .input-icon svg.ic {
  width: 17px;
  height: 17px;
}

.input-wrap input {
  width: 100%;
  height: 50px;
  background: var(--field);
  border: 1.5px solid var(--line);
  border-radius: 13px;
  padding: 0 16px 0 46px;
  color: var(--txt);
  font-size: 14.5px;
  font-family: inherit;
  font-weight: 500;
  outline: none;
  transition: all 0.2s ease;
}

.input-wrap input:focus {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.06);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.18);
}

.input-wrap input:focus ~ .input-icon,
.input-wrap input:focus + .input-icon {
  color: var(--pl);
}

.input-wrap input::placeholder {
  color: #64748B;
  font-size: 14px;
}

.pw-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: color 0.2s;
  z-index: 2;
}

.pw-toggle:hover {
  color: var(--pl);
}

.pw-toggle svg.ic {
  width: 17px;
  height: 17px;
}

/* Password Strength Indicator */
.pw-strength {
  margin-top: 8px;
}

.pw-strength-bar {
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.pw-strength-fill {
  height: 100%;
  border-radius: 4px;
  transition: all 0.3s ease;
  width: 0%;
}

.pw-strength-text {
  font-size: 11.5px;
  font-weight: 600;
  margin-top: 5px;
}

/* Checkbox Label */
.check-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--muted2);
  cursor: pointer;
  margin: 18px 0 22px;
  line-height: 1.4;
}

.check-label input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
  border-radius: 4px;
  cursor: pointer;
  flex-shrink: 0;
}

/* Primary Button Styling */
.btn-primary,
.btn-grad {
  width: 100%;
  padding: 15px 24px;
  background: var(--grad);
  border: none;
  border-radius: 13px;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 15.5px;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.38);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  position: relative;
  overflow: hidden;
  margin-top: 8px;
}

.btn-primary:hover,
.btn-grad:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(99, 102, 241, 0.52);
}

.btn-primary:active,
.btn-grad:active {
  transform: translateY(0);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.btn-primary:disabled,
.btn-grad:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none;
}

.switch-auth {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--muted);
}

.switch-auth a {
  color: var(--sec);
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s;
  margin-left: 4px;
}

.switch-auth a:hover {
  color: var(--pl);
  text-decoration: underline;
}

/* Error & Success Messages */
.err-msg {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #FCA5A5;
  padding: 13px 16px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: shake 0.4s ease both;
}

.success-msg {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6EE7B7;
  padding: 13px 16px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

/* Left Promo Side */
.auth-promo {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.promo-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(99, 102, 241, 0.14);
  border: 1px solid rgba(99, 102, 241, 0.35);
  padding: 7px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 700;
  color: var(--pl);
  width: fit-content;
}

.auth-promo h1 {
  font-size: 44px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -1.2px;
  color: #FFFFFF;
}

.highlight {
  background: var(--grad2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-promo p {
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.7;
}

.promo-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 6px;
}

.stat-item {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 12px;
  text-align: center;
  transition: transform 0.25s, border-color 0.25s;
}

.stat-item:hover {
  transform: translateY(-3px);
  border-color: rgba(99, 102, 241, 0.4);
}

.stat-num {
  font-size: 22px;
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}

.stat-lbl {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--muted2);
}

.feature-icon {
  width: 34px;
  height: 34px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pl);
  flex-shrink: 0;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--bg-card);
  border: 1px solid var(--line2);
  border-radius: 14px;
  padding: 14px 22px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  z-index: 99999;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.34, 1.3, 0.64, 1);
  display: flex;
  align-items: center;
  gap: 10px;
  backdrop-filter: blur(20px);
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}
.toast.ok {
  border-color: rgba(52, 211, 153, 0.4);
  color: var(--ok);
}
.toast.err {
  border-color: rgba(248, 113, 113, 0.4);
  color: var(--err);
}

/* Responsive */
@media (max-width: 960px) {
  .auth-wrapper {
    grid-template-columns: 1fr;
    max-width: 520px;
    gap: 36px;
  }
  .auth-promo {
    order: 2;
  }
  .auth-promo h1 {
    font-size: 32px;
  }
  .auth-card {
    padding: 34px 26px;
  }
}

@media (max-width: 480px) {
  .auth-bg {
    padding: 24px 14px;
  }
  .auth-card {
    padding: 28px 18px;
    border-radius: 18px;
  }
  .auth-title {
    font-size: 24px;
  }
  .promo-stats {
    gap: 8px;
  }
  .stat-item {
    padding: 12px 6px;
  }
  .stat-num {
    font-size: 17px;
  }
  .stat-lbl {
    font-size: 9.5px;
  }
}
