*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --navy:     #0B1D3E;
  --blue:     #1A56DB;
  --orange:   #E85D26;
  --white:    #FFFFFF;
  --gray-50:  #F8F9FB;
  --gray-100: #F0F2F5;
  --gray-200: #E2E6ED;
  --gray-400: #9AA3B0;
  --gray-600: #5A6478;
  --gray-800: #1E2533;
  --green:    #059669;
  --red:      #DC2626;
  --radius:   12px;
  --shadow-sm: 0 1px 4px rgba(0,0,0,.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,.13);
  --font:     'Inter', sans-serif;
  --font-d:   'Manrope', sans-serif;
  --t:        .2s ease;
}

html, body {
  height: 100%;
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  color: var(--gray-800);
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul { list-style: none; }

/* ── WRAPPER ─────────────────────────────────── */
.auth-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

/* ── LEFT PANEL ──────────────────────────────── */
.auth-left {
  background: var(--navy);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 52px;
}

.auth-left-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 40px;
  max-width: 420px;
  width: 100%;
}

.auth-logo img {
  height: 44px;
  width: auto;
  filter: brightness(0) invert(1);
}

.auth-tagline h2 {
  font-family: var(--font-d);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 800;
  color: var(--white);
  line-height: 1.2;
  letter-spacing: -.4px;
  margin-bottom: 14px;
}

.auth-tagline p {
  color: rgba(255,255,255,.6);
  font-size: .95rem;
  line-height: 1.7;
}

/* Stats */
.auth-stats {
  display: flex;
  align-items: center;
  gap: 20px;
}

.stat-val {
  font-family: var(--font-d);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-lbl {
  font-size: .75rem;
  color: rgba(255,255,255,.45);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.stat-divider {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,.15);
  flex-shrink: 0;
}

/* Testimonial */
.auth-testimonial {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  padding: 22px 24px;
}

.testimonial-text {
  font-size: .9rem;
  color: rgba(255,255,255,.8);
  line-height: 1.7;
  font-style: italic;
  margin-bottom: 16px;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.testimonial-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.testimonial-name {
  font-weight: 700;
  font-size: .85rem;
  color: var(--white);
}

.testimonial-role {
  font-size: .75rem;
  color: rgba(255,255,255,.45);
}

/* Decorative circles */
.deco-circle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.deco-1 {
  width: 480px; height: 480px;
  background: rgba(26,86,219,.12);
  top: -160px; right: -160px;
}
.deco-2 {
  width: 300px; height: 300px;
  background: rgba(26,86,219,.08);
  bottom: -100px; left: -80px;
}
.deco-3 {
  width: 160px; height: 160px;
  background: rgba(232,93,38,.1);
  bottom: 80px; right: -40px;
}

/* ── RIGHT PANEL ─────────────────────────────── */
.auth-right {
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  overflow-y: auto;
}

.auth-right-inner {
  width: 100%;
  max-width: 440px;
}

/* Tabs */
.auth-tabs {
  display: flex;
  position: relative;
  background: var(--gray-100);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 32px;
  gap: 0;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  font-size: .875rem;
  font-weight: 600;
  color: var(--gray-400);
  border-radius: 8px;
  transition: color var(--t);
  position: relative;
  z-index: 1;
}
.auth-tab.active { color: var(--gray-800); }

.tab-indicator {
  position: absolute;
  top: 4px;
  left: 4px;
  height: calc(100% - 8px);
  width: calc(50% - 4px);
  background: var(--white);
  border-radius: 7px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s cubic-bezier(.4,0,.2,1);
}
.tab-indicator.right {
  transform: translateX(calc(100% + 0px));
}

/* Forms */
.auth-form {
  display: none;
  flex-direction: column;
  gap: 0;
}
.auth-form.active { display: flex; }

.form-welcome { margin-bottom: 28px; }

.form-title {
  font-family: var(--font-d);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--gray-800);
  letter-spacing: -.3px;
  margin-bottom: 5px;
}

.form-sub {
  color: var(--gray-400);
  font-size: .875rem;
}

/* User type */
.user-type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 8px;
  margin-bottom: 20px;
}

.user-type-card {
  cursor: pointer;
}

.user-type-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}

.user-type-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 10px;
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  transition: border-color var(--t), background var(--t), box-shadow var(--t);
  background: var(--white);
}

.user-type-card input:checked + .user-type-inner {
  border-color: var(--blue);
  background: rgba(26,86,219,.05);
  box-shadow: 0 0 0 3px rgba(26,86,219,.1);
}

.user-type-icon {
  color: var(--gray-400);
  transition: color var(--t);
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-type-card input:checked + .user-type-inner .user-type-icon {
  color: var(--blue);
}

.user-type-label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--gray-600);
  transition: color var(--t);
}

.user-type-card input:checked + .user-type-inner .user-type-label {
  color: var(--blue);
}

/* Form group */
.form-group {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--gray-600);
  margin-bottom: 7px;
  letter-spacing: .01em;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
}

.label-row .form-label { margin-bottom: 0; }

.forgot-link {
  font-size: .78rem;
  color: var(--blue);
  font-weight: 500;
  transition: opacity var(--t);
}
.forgot-link:hover { opacity: .75; }

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

.input-icon {
  position: absolute;
  left: 13px;
  color: var(--gray-400);
  display: flex;
  align-items: center;
  pointer-events: none;
}

.form-input {
  width: 100%;
  border: 1.5px solid var(--gray-200);
  border-radius: 9px;
  padding: 11px 42px 11px 40px;
  font-family: var(--font);
  font-size: .875rem;
  color: var(--gray-800);
  background: var(--white);
  outline: none;
  transition: border-color var(--t), box-shadow var(--t);
}

.form-input::placeholder { color: var(--gray-400); }

.form-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26,86,219,.1);
}

.form-input.error {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(220,38,38,.08);
}

.toggle-pw {
  position: absolute;
  right: 12px;
  color: var(--gray-400);
  display: flex;
  align-items: center;
  transition: color var(--t);
}
.toggle-pw:hover { color: var(--gray-600); }

/* Field error */
.field-error {
  font-size: .75rem;
  color: var(--red);
  margin-top: 5px;
  min-height: 16px;
  display: block;
}

/* Password strength */
.password-strength {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.strength-bar {
  flex: 1;
  height: 4px;
  background: var(--gray-200);
  border-radius: 4px;
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  width: 0%;
  border-radius: 4px;
  transition: width .3s ease, background .3s ease;
}

.strength-label {
  font-size: .72rem;
  font-weight: 600;
  min-width: 44px;
  color: var(--gray-400);
}

/* Checkbox */
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 22px;
}

.check-input {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--gray-300);
  border-radius: 4px;
  accent-color: var(--blue);
  flex-shrink: 0;
  margin-top: 1px;
  cursor: pointer;
}

.check-label {
  font-size: .82rem;
  color: var(--gray-600);
  line-height: 1.5;
  cursor: pointer;
}

.terms-link {
  color: var(--blue);
  font-weight: 500;
}
.terms-link:hover { text-decoration: underline; }

/* Submit button */
.btn-submit {
  width: 100%;
  background: var(--blue);
  color: var(--white);
  font-size: .95rem;
  font-weight: 700;
  padding: 13px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity var(--t), transform var(--t);
  margin-bottom: 22px;
}
.btn-submit:hover { opacity: .88; }
.btn-submit:active { transform: scale(.99); }

/* Spinner */
.btn-spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--gray-400);
  font-size: .78rem;
  margin-bottom: 16px;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

/* Social buttons */
.social-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
}
.social-row-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  border: 1.5px solid var(--gray-200);
  border-radius: 9px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--gray-700);
  background: var(--white);
  transition: background var(--t), border-color var(--t);
}
.btn-social:hover { background: var(--gray-50); border-color: var(--gray-300); }

/* Switch link */
.auth-switch {
  text-align: center;
  font-size: .82rem;
  color: var(--gray-400);
}

.switch-link {
  color: var(--blue);
  font-weight: 600;
  font-size: .82rem;
  transition: opacity var(--t);
}
.switch-link:hover { opacity: .75; }

/* Toast */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--gray-800);
  color: var(--white);
  padding: 12px 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .875rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .3s;
  z-index: 999;
  white-space: nowrap;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── RESPONSIVE ──────────────────────────────── */
@media (max-width: 820px) {
  .auth-wrapper {
    grid-template-columns: 1fr;
  }
  .auth-left {
    padding: 36px 28px;
    min-height: auto;
  }
  .auth-left-inner { gap: 28px; }
  .auth-right { padding: 36px 24px; }
}

@media (max-width: 480px) {
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .social-row { grid-template-columns: 1fr; }
  .auth-stats { gap: 14px; }
  .stat-val { font-size: 1.2rem; }
}