*{margin:0;padding:0;box-sizing:border-box;}
:root{
  --purple:#A855F7;--pink:#F472B6;--blue:#60A5FA;--green:#34D399;
  --bg:#0A0712;--bg2:#110B1E;--bg3:#19102B;
  --surface:rgba(168,85,247,0.05);--surface2:rgba(168,85,247,0.09);
  --border:rgba(168,85,247,0.22);--border2:rgba(255,255,255,0.07);
  --text:#F5F2FB;--text2:#C9C2DB;--text3:#8E85A6;
  --grad:linear-gradient(135deg,#A855F7,#F472B6);
  --display:'Unbounded',sans-serif;
}
html,body{height:100%;}
body{
  font-family:'Sora',sans-serif;
  background:var(--bg);color:var(--text);
  min-height:100vh;overflow-x:hidden;
}

.auth-page{display:flex;min-height:100vh;}

/* ── Hero panel ── */
.auth-hero{
  flex:1;position:relative;overflow:hidden;
  display:flex;flex-direction:column;justify-content:space-between;
  padding:40px 48px 44px;
  background:linear-gradient(160deg,#1a0a2e 0%,#0f0618 45%,#120820 100%);
  border-right:1px solid rgba(168,85,247,.12);
  min-height:100vh;
}
.auth-hero::before{
  content:'';position:absolute;inset:0;pointer-events:none;
  background:
    radial-gradient(560px 320px at 85% 0%,rgba(244,114,182,.22),transparent 58%),
    radial-gradient(420px 260px at 0% 100%,rgba(168,85,247,.18),transparent 55%);
}
.auth-hero::after{
  content:'';position:absolute;inset:0;pointer-events:none;opacity:.04;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}
.auth-hero-inner{position:relative;z-index:1;max-width:440px;}
.auth-brand{
  display:inline-flex;align-items:center;gap:12px;
  text-decoration:none;color:inherit;margin-bottom:48px;
}
.auth-brand-mark{
  width:44px;height:44px;border-radius:12px;
  background:var(--grad);
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 6px 22px rgba(168,85,247,.45);
  flex-shrink:0;
}
.auth-brand-mark svg{width:22px;height:22px;fill:#fff;}
.auth-brand-name{
  font-family:var(--display);font-weight:700;font-size:1rem;
  letter-spacing:.04em;
  background:linear-gradient(100deg,#fff 30%,#D9B8FF 70%,#F9A8D4);
  -webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;
}
.auth-eyebrow{
  display:inline-flex;align-items:center;gap:7px;
  font-size:10px;font-weight:800;letter-spacing:.14em;text-transform:uppercase;
  color:#D8B4FE;margin-bottom:14px;
}
.auth-eyebrow span{
  width:6px;height:6px;border-radius:50%;
  background:var(--grad);box-shadow:0 0 10px rgba(168,85,247,.9);
}
.auth-hero h1{
  font-family:var(--display);
  font-size:clamp(1.75rem,3.5vw,2.6rem);
  font-weight:800;line-height:1.1;letter-spacing:-.02em;
  color:#fff;margin-bottom:14px;
}
.auth-hero h1 em{
  font-style:normal;
  background:linear-gradient(100deg,#E9D5FF,#F9A8D4);
  -webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;
}
.auth-hero-lead{
  font-size:15px;color:rgba(255,255,255,.55);line-height:1.65;margin-bottom:36px;
}
.auth-features{display:flex;flex-direction:column;gap:14px;}
.auth-feature{
  display:flex;align-items:flex-start;gap:12px;
  padding:14px 16px;border-radius:14px;
  background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08);
}
.auth-feature-icon{
  width:36px;height:36px;border-radius:10px;flex-shrink:0;
  display:flex;align-items:center;justify-content:center;
  background:rgba(168,85,247,.15);border:1px solid rgba(168,85,247,.25);
}
.auth-feature strong{display:block;font-size:13px;font-weight:700;color:#fff;margin-bottom:2px;}
.auth-feature span{font-size:12px;color:rgba(255,255,255,.45);line-height:1.45;}

.auth-eq{
  position:relative;z-index:1;
  display:flex;align-items:flex-end;gap:5px;height:48px;margin-top:auto;
  opacity:.35;
}
.auth-eq span{
  width:4px;border-radius:4px;background:var(--grad);
  animation:eq 1.1s ease-in-out infinite;
}
.auth-eq span:nth-child(1){height:18px;animation-delay:0s;}
.auth-eq span:nth-child(2){height:32px;animation-delay:.15s;}
.auth-eq span:nth-child(3){height:24px;animation-delay:.3s;}
.auth-eq span:nth-child(4){height:40px;animation-delay:.45s;}
.auth-eq span:nth-child(5){height:28px;animation-delay:.6s;}
.auth-eq span:nth-child(6){height:36px;animation-delay:.75s;}
.auth-eq span:nth-child(7){height:20px;animation-delay:.9s;}
@keyframes eq{0%,100%{transform:scaleY(.55)}50%{transform:scaleY(1.25)}}

/* ── Form panel ── */
.auth-main{
  width:100%;max-width:560px;flex-shrink:0;
  display:flex;flex-direction:column;
  padding:28px 40px 40px;
  background:var(--bg);
  position:relative;
  overflow-y:auto;
}
.auth-topbar{
  display:flex;align-items:center;justify-content:space-between;
  margin-bottom:28px;flex-shrink:0;
}
.auth-back{
  display:inline-flex;align-items:center;gap:7px;
  font-size:13px;font-weight:600;color:var(--text3);
  text-decoration:none;transition:color .15s;
}
.auth-back:hover{color:var(--purple);}
.auth-back svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;}
.auth-theme-btn{
  width:38px;height:38px;border-radius:11px;
  background:var(--surface);border:1px solid var(--border2);
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;color:var(--text2);transition:.2s;
}
.auth-theme-btn:hover{background:var(--surface2);border-color:var(--border);color:var(--text);}
.auth-theme-btn svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;}

.auth-form-wrap{
  flex:1;display:flex;flex-direction:column;
  max-width:440px;width:100%;margin:0 auto;
}
.auth-form-head{margin-bottom:24px;}
.auth-form-head h2{
  font-family:var(--display);font-size:1.55rem;font-weight:800;
  letter-spacing:-.02em;margin-bottom:6px;
}
.auth-form-head p{font-size:14px;color:var(--text3);line-height:1.5;}

.auth-alert{
  display:flex;align-items:flex-start;gap:10px;
  background:rgba(248,113,113,.08);border:1px solid rgba(248,113,113,.28);
  border-radius:12px;padding:12px 14px;
  color:#F87171;font-size:13px;margin-bottom:20px;line-height:1.45;
}
.auth-alert svg{flex-shrink:0;margin-top:1px;}

.auth-field{margin-bottom:16px;}
.auth-label{
  display:block;font-size:11px;font-weight:700;
  color:var(--text3);text-transform:uppercase;letter-spacing:.07em;
  margin-bottom:8px;
}
.auth-input-wrap{position:relative;}
.auth-input-wrap svg.field-icon{
  position:absolute;left:14px;top:50%;transform:translateY(-50%);
  width:16px;height:16px;stroke:var(--text3);fill:none;
  stroke-width:2;stroke-linecap:round;pointer-events:none;
}
.auth-input{
  width:100%;padding:13px 16px 13px 42px;
  background:var(--surface);border:1px solid var(--border2);
  border-radius:12px;color:var(--text);
  font-family:'Sora',sans-serif;font-size:14px;
  outline:none;transition:border-color .18s,box-shadow .18s,background .18s;
}
.auth-input::placeholder{color:var(--text3);}
.auth-input:focus{
  border-color:rgba(168,85,247,.55);
  box-shadow:0 0 0 3px rgba(168,85,247,.12);
  background:rgba(168,85,247,.06);
}
.auth-pw-toggle{
  position:absolute;right:12px;top:50%;transform:translateY(-50%);
  background:none;border:none;cursor:pointer;padding:4px;
  color:var(--text3);display:flex;transition:color .15s;
}
.auth-pw-toggle:hover{color:var(--text);}
.auth-field-error{font-size:12px;color:#F87171;margin-top:6px;}

.auth-form-row{
  display:grid;grid-template-columns:1fr 1fr;gap:14px;
}
@media(max-width:520px){.auth-form-row{grid-template-columns:1fr;}}

/* Role picker */
.auth-role-label{
  font-size:11px;font-weight:700;color:var(--text3);
  text-transform:uppercase;letter-spacing:.07em;
  margin-bottom:10px;
}
.auth-role-grid{
  display:grid;grid-template-columns:repeat(2,1fr);gap:10px;
  margin-bottom:20px;
}
@media(max-width:400px){.auth-role-grid{grid-template-columns:1fr;}}
.auth-role{position:relative;}
.auth-role input[type=radio]{
  position:absolute;opacity:0;width:0;height:0;pointer-events:none;
}
.auth-role label{
  display:flex;flex-direction:column;align-items:center;gap:8px;
  padding:14px 12px;border-radius:14px;cursor:pointer;
  background:var(--surface);border:1px solid var(--border2);
  transition:background .15s,border-color .15s,box-shadow .15s;
  text-align:center;height:100%;
}
.auth-role label svg{
  width:22px;height:22px;stroke:var(--text3);fill:none;
  stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;
  transition:stroke .15s;
}
.auth-role-name{
  font-size:13px;font-weight:700;color:var(--text2);
  transition:color .15s;
}
.auth-role-desc{
  font-size:10.5px;font-weight:400;color:var(--text3);
  line-height:1.4;
}
.auth-role label:hover{
  border-color:rgba(168,85,247,.35);
  background:rgba(168,85,247,.06);
}
.auth-role input:checked + label{
  border-color:rgba(168,85,247,.55);
  background:rgba(168,85,247,.12);
  box-shadow:0 0 0 1px rgba(168,85,247,.2),0 6px 20px rgba(168,85,247,.12);
}
.auth-role input:checked + label svg{stroke:#C084FC;}
.auth-role input:checked + label .auth-role-name{color:#E9D5FF;}

.auth-btn{
  width:100%;padding:14px 20px;border-radius:100px;border:none;
  background:var(--grad);color:#fff;
  font-family:'Sora',sans-serif;font-size:15px;font-weight:700;
  cursor:pointer;transition:transform .15s,box-shadow .15s;
  box-shadow:0 8px 28px rgba(168,85,247,.4);
  margin-top:8px;
}
.auth-btn:hover{transform:translateY(-1px);box-shadow:0 12px 36px rgba(168,85,247,.5);}
.auth-btn:active{transform:none;}

.auth-divider{
  display:flex;align-items:center;gap:14px;margin:22px 0;
}
.auth-divider::before,.auth-divider::after{
  content:'';flex:1;height:1px;background:var(--border2);
}
.auth-divider span{font-size:12px;color:var(--text3);white-space:nowrap;}

.auth-btn-outline{
  width:100%;padding:13px 20px;border-radius:100px;
  background:transparent;border:1px solid var(--border);
  color:var(--text);font-family:'Sora',sans-serif;
  font-size:14px;font-weight:600;cursor:pointer;
  transition:background .15s,border-color .15s;
  display:flex;align-items:center;justify-content:center;
  text-decoration:none;
}
.auth-btn-outline:hover{
  background:var(--surface);border-color:rgba(168,85,247,.4);
}

.auth-foot{
  text-align:center;font-size:12px;color:var(--text3);
  margin-top:20px;line-height:1.65;
}
.auth-foot a{color:var(--purple);font-weight:600;text-decoration:none;}
.auth-legal{
  text-align:center;font-size:11px;color:var(--text3);
  margin-top:14px;line-height:1.65;
}
.auth-legal a{color:var(--purple);font-weight:600;text-decoration:none;}

@media(max-width:960px){
  .auth-page{flex-direction:column;}
  .auth-hero{
    min-height:auto;border-right:none;
    border-bottom:1px solid rgba(168,85,247,.12);
    padding:32px 28px 28px;
  }
  .auth-brand{margin-bottom:28px;}
  .auth-hero-lead{margin-bottom:24px;}
  .auth-features{display:none;}
  .auth-eq{display:none;}
  .auth-main{max-width:none;padding:28px 24px 36px;}
}
@media(max-width:480px){
  .auth-hero h1{font-size:1.5rem;}
  .auth-form-head h2{font-size:1.3rem;}
}
