:root {
  --bg: #f4f1fb;
  --panel: rgba(255,255,255,0.84);
  --white: #fff;
  --text: #221b37;
  --muted: #766d8d;
  --line: #e7def7;
  --purple: #7c3aed;
  --purple-2: #5b0a74;
  --shadow: 0 24px 70px rgba(78, 28, 122, 0.12);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}
.tech-bg { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.grid {
  position:absolute; inset:-10%;
  background-image: linear-gradient(rgba(124,58,237,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(124,58,237,.07) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at center, black 36%, transparent 78%);
}
.orb,.ring,.particles { position:absolute; border-radius:50%; }
.orb { filter: blur(18px); opacity:.5; animation: float 12s ease-in-out infinite; }
.orb-1 { width:240px; height:240px; background:rgba(151,87,218,.32); top:6%; left:4%; }
.orb-2 { width:320px; height:320px; background:rgba(91,10,116,.18); right:8%; top:20%; animation-delay:-3s; }
.orb-3 { width:220px; height:220px; background:rgba(124,58,237,.2); left:42%; bottom:4%; animation-delay:-6s; }
.ring { border:1px solid rgba(124,58,237,.16); animation: spin 26s linear infinite; }
.ring-1 { width:460px; height:460px; top:-140px; right:-110px; }
.ring-2 { width:360px; height:360px; bottom:-120px; left:-120px; animation-direction: reverse; }
.particles {
  inset: 0;
  background-image: radial-gradient(circle, rgba(124,58,237,.3) 1.2px, transparent 1.2px);
  background-size: 120px 120px;
  opacity:.35;
  animation: drift 26s linear infinite;
}
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  position: relative;
  z-index: 1;
}
.auth-hero {
  padding: 60px clamp(28px, 5vw, 72px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
}
.brand-mark { display:flex; align-items:center; gap:14px; font-size:28px; font-weight:800; }
.brand-mark.small { font-size: 24px; }
.brand-mark img { width:54px; height:54px; border-radius:18px; box-shadow: var(--shadow); }
.auth-hero h1 { font-size: clamp(2.5rem, 5vw, 4.8rem); line-height:1; margin:0; max-width:680px; }
.auth-hero p { font-size: 1.05rem; color: var(--muted); max-width: 560px; line-height: 1.8; }
.hero-card {
  width: min(430px, 100%);
  aspect-ratio: 1.6;
  border-radius: 26px;
  background: linear-gradient(135deg, #9757da 0%, #5b0a74 100%);
  position: relative;
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-top: 8px;
}
.hero-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 15%, rgba(255,255,255,0.24), transparent 20%);
}
.tech-card::before {
  content:''; position:absolute; inset:8%; border:1px solid rgba(255,255,255,.18); border-radius:24px;
}
.hero-card-top { height: 38%; background: rgba(255,255,255,0.12); }
.hero-avatar {
  position: absolute; left: 28px; top: 72px; width: 78px; height: 78px; border-radius: 50%;
  background: linear-gradient(135deg, #fff, #efe4ff); border: 6px solid rgba(255,255,255,0.35);
}
.hero-lines { position:absolute; left:28px; bottom:26px; display:grid; gap:10px; width: 60%; }
.hero-lines span { height: 12px; border-radius: 999px; background: rgba(255,255,255,0.72); }
.hero-lines span:nth-child(2) { width: 82%; }
.hero-lines span:nth-child(3) { width: 48%; }
.tech-dots { position:absolute; right:24px; bottom:24px; display:grid; grid-template-columns: repeat(3, 10px); gap:10px; }
.tech-dots b { width:10px; height:10px; border-radius:50%; background: rgba(255,255,255,.64); animation: pulse 2.5s ease-in-out infinite; }
.tech-dots b:nth-child(2), .tech-dots b:nth-child(5) { animation-delay:.3s; }
.tech-dots b:nth-child(3), .tech-dots b:nth-child(6) { animation-delay:.6s; }
.hero-points { list-style:none; padding:0; margin: 8px 0 0; display:grid; gap:12px; }
.hero-points li { display:flex; gap:12px; align-items:center; color: var(--muted); }
.hero-points i { color: var(--purple); }
.auth-panel {
  margin: 28px;
  border-radius: 32px;
  background: var(--panel);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}
.panel-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  background: #efe8fb;
  padding: 6px;
  border-radius: 16px;
  margin-bottom: 24px;
}
.switch-btn,.primary-btn,.inline-btn {
  border: none; font: inherit; cursor: pointer; text-decoration:none; display:inline-flex; align-items:center; justify-content:center;
}
.switch-btn { padding: 12px; border-radius: 12px; background: transparent; color: var(--muted); font-weight: 700; }
.switch-btn.active { background: var(--white); color: var(--text); box-shadow: 0 8px 24px rgba(68,33,118,0.08); }
.auth-form { display:none; }
.auth-form.active { display:block; }
.auth-form h2 { margin: 0 0 8px; font-size: 2rem; }
.auth-form p { margin: 0 0 20px; color: var(--muted); }
.auth-form label { display:block; margin: 16px 0 8px; font-weight: 600; }
.field {
  display:flex; align-items:center; gap:12px; border:1px solid var(--line); background: var(--white);
  padding: 0 16px; border-radius: 16px; min-height: 54px;
}
.field i { color: var(--purple); }
.field input {
  width:100%; border:none; outline:none; font:inherit; background: transparent; padding: 16px 0;
}
.primary-btn, .inline-btn {
  width:100%; margin-top: 24px; padding: 15px 18px; border-radius: 16px; color:#fff; font-weight: 700;
  background: linear-gradient(135deg, var(--purple), var(--purple-2));
  box-shadow: 0 18px 40px rgba(91, 10, 116, 0.28);
}
.form-inline-links { display:flex; justify-content:flex-end; margin-top: 12px; }
.form-inline-links a, .back-link, .reset-link-box a { color: var(--purple-2); font-weight: 700; text-decoration:none; }
.alert { padding: 14px 16px; border-radius: 16px; margin-bottom: 14px; font-weight: 600; }
.alert.error { background:#fff1f2; color:#be123c; }
.alert.success { background:#ecfdf5; color:#047857; }
.lang-floating {
  position: fixed; top: 16px; right: 18px; z-index: 3; background: rgba(255,255,255,.9); border:1px solid #e7def7; border-radius: 14px; padding: 8px 10px; display:flex; gap:8px; align-items:center;
  box-shadow: 0 14px 28px rgba(64,28,110,.08);
}
.lang-floating select { border:none; background:transparent; font:inherit; outline:none; color: var(--text); }
.single-auth-page { display:grid; place-items:center; padding: 24px; }
.single-auth-card {
  width:min(520px, 100%); background: rgba(255,255,255,.9); border:1px solid #e7def7; border-radius: 28px; padding: 28px; box-shadow: var(--shadow); position:relative; z-index:2;
}
.single-auth-card h1 { margin: 14px 0 8px; }
.single-auth-card p { color: var(--muted); }
.reset-link-box { margin-top: 18px; background:#f7f4fd; border:1px solid #e7def7; border-radius: 18px; padding: 16px; display:grid; gap:10px; word-break: break-all; }
@keyframes float { 0%,100%{ transform: translateY(0) translateX(0);} 50%{ transform: translateY(-18px) translateX(10px);} }
@keyframes spin { from { transform: rotate(0deg);} to { transform: rotate(360deg);} }
@keyframes drift { from { transform: translateY(0);} to { transform: translateY(-120px);} }
@keyframes pulse { 0%,100%{ transform: scale(.8); opacity:.5;} 50%{ transform: scale(1.2); opacity:1;} }
@media (max-width: 980px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-panel { margin: 0 18px 18px; }
  .auth-hero { padding-bottom: 24px; }
}
@media (max-width: 680px) {
  .auth-hero { padding: 84px 18px 18px; }
  .auth-panel { padding: 18px; border-radius: 24px; }
  .lang-floating { left: 16px; right: auto; }
}
