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

:root {
  --brand-a:    #5a3378;
  --brand-b:    #693D97;
  --grad:       linear-gradient(135deg, #5a3378 0%, #693D97 100%);
  --bg:         #F2F8FD;
  --danger:     #d94f4f;
  --success:    #22c55e;
  --text-pri:   #1c1033;
  --text-sec:   #5a5a7a;
  --text-muted: #9b9bb8;
  --border:     rgba(90,51,120,0.13);
  --card:       #ffffff;
  --input-bg:   #F5F0FB;
  --shadow:     0 24px 64px rgba(90,51,120,0.14), 0 4px 16px rgba(90,51,120,0.07);
  --r:          20px;
  --rx:         10px;
}


/* body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  padding: 36px 16px;
  position: relative;
} */

/* soft ambient blobs */
/* body::before {
  content: '';
  position: fixed;
  width: 560px; height: 560px;
  top: -180px; left: -180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(105,61,151,0.09) 0%, transparent 65%);
  pointer-events: none;
}
body::after {
  content: '';
  position: fixed;
  width: 420px; height: 420px;
  bottom: -120px; right: -120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(90,51,120,0.08) 0%, transparent 65%);
  pointer-events: none;
} */

/* decorative shapes in bg */
/* .bg-shapes {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.bg-shapes span {
  position: absolute;
  border: 1.5px solid rgba(105,61,151,0.1);
  animation: drift 12s ease-in-out infinite;
} */
@keyframes drift {
  0%,100% { transform: translateY(0) rotate(var(--r0,0deg)); }
  50%      { transform: translateY(-12px) rotate(var(--r1,10deg)); }
}

/* ── PAGE WRAPPER ── */
.page-wrap {
        position: relative;
    z-index: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 52px;
    padding: 70px 0;
}

/* ── LEFT PANEL ── */
.brand-panel {
  display: none;
  flex-direction: column;
  gap: 26px;
  flex: 1;
}
@media (min-width: 960px) { .brand-panel { display: flex; } }

.bp-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.bp-logo-icon {
  width: 44px; height: 44px;
  background: var(--grad);
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(90,51,120,0.28);
}
.bp-logo-icon svg { width: 21px; height: 21px; color: #fff; }
.bp-logo-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--brand-a);
  letter-spacing: -0.4px;
}

.bp-heading {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.5px;
  color: var(--text-pri);
}
.bp-heading em {
  font-style: normal;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bp-desc {
  font-size: 15px;
  color: var(--text-sec);
  line-height: 1.7;
  max-width: 330px;
}

.bp-feats { display: flex; flex-direction: column; gap: 12px; }
.bp-feat {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-sec);
  font-weight: 500;
}
.bp-feat-icon {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: rgba(105,61,151,0.08);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.bp-feat-icon svg { width: 15px; height: 15px; color: var(--brand-b); }

.bp-trust {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(105,61,151,0.07);
  border: 1px solid rgba(105,61,151,0.15);
  border-radius: 100px;
  padding: 8px 16px;
  font-size: 12.5px;
  color: var(--brand-a);
  font-weight: 600;
  width: fit-content;
}
.bp-trust svg { width: 13px; height: 13px; color: var(--brand-b); flex-shrink:0; }

/* ── AUTH CARD ── */
.auth-card {
  background: var(--card);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 440px;
  flex-shrink: 0;
  overflow: hidden;
  animation: popIn .55s cubic-bezier(.34,1.4,.64,1) both;
}
@keyframes popIn {
  from { opacity: 0; transform: translateY(22px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── CARD TOP BAR ── */
.card-top {
  background: var(--color-grad);
  padding: 26px 30px 22px;
  position: relative;
  overflow: hidden;
}
.card-top::before {
  content:'';
  position: absolute;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: rgba(255,255,255,.055);
  top: -55px; right: -40px;
}
.card-top::after {
  content:'';
  position: absolute;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
  bottom: -20px; left: 24px;
}

.ct-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.ct-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 17px;
  font-weight: 800;
}
.ct-logo-box {
  width: 30px; height: 30px;
  background: rgba(255,255,255,.2);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.ct-logo-box svg { width: 15px; height: 15px; color: #fff; }

.ct-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 100px;
  padding: 4px 11px;
  font-size: 11px;
  color: rgba(255,255,255,.92);
  font-weight: 600;
}
.ct-badge svg { width: 11px; height: 11px; }

.ct-titles { position: relative; z-index: 1; }
.ct-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
}
.ct-sub {
  font-size: 15px;
  color: rgba(255,255,255,.68);
  margin-top: 2px;
}

/* ── CARD BODY ── */
.card-body { padding: 26px 30px 22px; }

/* ── PANELS ── */
.panel { display: none; animation: pIn .3s ease both; }
.panel.active { display: block; }
@keyframes pIn {
  from { opacity:0; transform:translateX(8px); }
  to   { opacity:1; transform:translateX(0); }
}

/* ── FIELDS ── */
.field { margin-bottom: 15px; }
.field > label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-sec);
  letter-spacing: .45px;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.field-wrap { position: relative; }
.fi { /* field icon */
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
  transition: color .2s;
}
.fi svg { width: 15px; height: 15px; }
.field-wrap:focus-within .fi { color: var(--brand-b); }

.field input,
.field select {
  width: 100%;
  background: var(--input-bg);
  border: 1.5px solid var(--border);
  border-radius: var(--rx);
  padding: 11px 12px 11px 36px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--text-pri);
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
  appearance: none;
  -webkit-appearance: none;
}
.field input::placeholder { color: var(--text-muted); }
.field input:focus,
.field select:focus {
  border-color: var(--brand-b);
  box-shadow: 0 0 0 3px rgba(105,61,151,.09);
  background: #fff;
}
.field input.has-toggle { padding-right: 38px; }

/* pw toggle */
.pw-tog {
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  cursor: pointer; padding: 3px;
  color: var(--text-muted);
  display: flex;
  transition: color .2s;
  justify-content: flex-end;
  width: auto;
}
.pw-tog:hover { color: var(--brand-b); }
.pw-tog svg { width: 15px; height: 15px; }

/* select arrow */
.sel-wrap { position: relative; }
.sel-wrap::after {
  content:'';
  position: absolute;
  right: 11px; top: 50%;
  transform: translateY(-50%);
  width:0; height:0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--text-muted);
  pointer-events: none;
}
.sel-wrap select { padding: 15px 12px 14px 36px; padding-right: 28px; }

/* two-col */
.frow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 15px;
}
@media (max-width: 480px) { .frow { grid-template-columns: 1fr; } }

/* phone row */
.phone-row {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 10px;
  margin-bottom: 15px;
}
@media (max-width: 460px) { .phone-row { grid-template-columns: 1fr; } }
.phone-row .field { margin-bottom: 0; }

/* strength */
.sbar { height: 3px; border-radius: 3px; background: #e5e7eb; margin-top: 5px; overflow: hidden; }
.sfill { height: 100%; border-radius: 3px; width: 0%; transition: width .3s, background .3s; }

/* field note */
.fnote { font-size: 11px; color: var(--text-muted); margin-top: 4px; line-height: 1.4; }

/* forgot */
.forgot-row {
  text-align: right;
  margin-top: -7px;
  margin-bottom: 15px;
}
.forgot-row a {
  font-size: 14px;
  color: var(--brand-b);
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
}
.forgot-row a:hover { text-decoration: underline; }

/* ── VALIDATION ── */
label.error {
  display: block !important;
  font-size: 11.5px !important;
  color: var(--danger) !important;
  font-weight: 500 !important;
  margin-top: 4px !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}
input.error, select.error {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 3px rgba(217,79,79,.09) !important;
  background: #fff9f9 !important;
}
input.valid, select.valid { border-color: var(--success) !important; }

/* ── BUTTONS ── */
.btn-primary {
  width: 100%;
  background: var(--color-grad);
  color: #fff;
  border: none;
  border-radius: var(--rx);
  padding: 13px 20px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: .3px;
  box-shadow: 0 6px 20px rgba(90,51,120,.28);
  transition: all .25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(90,51,120,.38); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity:.7; cursor:not-allowed; transform:none; }
.btn-primary svg { width:15px; height:15px; }

.btn-outline {
  flex:1;
  background: transparent;
  color: var(--text-sec);
  border: 1.5px solid var(--border);
  border-radius: var(--rx);
  padding: 11px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  text-align: center;
}
.btn-outline:hover { border-color: var(--brand-b); color: var(--brand-b); background: rgba(105,61,151,.04); }

/* divider */
.divider {
  display: flex; align-items: center; gap: 10px;
  margin: 2px 0 14px;
}
.divider::before,.divider::after { content:''; flex:1; height:1px; background: var(--border); }
.divider span { font-size: 12px; color: var(--text-muted); }

/* btn row */
.btn-row { display: flex; gap: 10px; }

/* switch */
.switch-row {
  display: flex; align-items: center; justify-content: center;
  gap: 5px; flex-wrap: wrap;
}
.switch-row span {font-size: 15px;color: var(--text-muted);}
.sl { /* switch link */
  background: none;
  border: none;
  color: var(--brand-b);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.sl:hover { color: var(--brand-a); }

/* success */
.success-msg {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  padding: 4px 0 16px;
}
.success-tick {
  width: 52px; height: 52px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  animation: popIn .5s cubic-bezier(.34,1.56,.64,1) both;
}
.success-tick svg { width:24px; height:24px; color:#fff; }
.success-msg h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 17px; font-weight: 700;
  color: var(--text-pri);
}
.success-msg p { font-size: 13px; color: var(--text-sec); line-height: 1.5; }

/* ── FOOTER ── */
.card-footer {
  background: #F5F0FB;
  border-top: 1px solid var(--border);
  padding: 13px 30px;
  text-align: center;
}
.card-footer p {font-size: 15px;color: var(--text-muted);line-height: 1.6;}
.card-footer a { color: var(--brand-b); text-decoration: none; }
.card-footer a:hover { text-decoration: underline; }

/* ── RESPONSIVE ── */
@media (max-width: 580px) {
  .card-top  { padding: 20px 20px 18px; }
  .card-body { padding: 20px 20px 18px; }
  .card-footer { padding: 12px 20px; }
}
@media(max-width: 576px){
  .auth-card{
    max-width: 90vw;
    margin: auto;
  }
}