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

body {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  background: #0d0d10;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* ── background ── */
.auth-bg { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.auth-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,229,160,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,160,.025) 1px, transparent 1px);
  background-size: 48px 48px;
}
.auth-glow {
  position: absolute;
  top: -200px; left: 50%; transform: translateX(-50%);
  width: 800px; height: 600px;
  background: radial-gradient(ellipse, rgba(0,229,160,.1) 0%, transparent 60%);
}

/* ── wrapper ── */
.auth-wrap {
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

/* ── logo ── */
.auth-logo {
  display: flex; align-items: center; gap: 11px;
  text-decoration: none;
}
.auth-logo-dot {
  width: 40px; height: 40px;
  background: #00e5a0;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 20px rgba(0,229,160,.3);
}
.auth-logo-dot span { font-size: 1.1rem; color: #0d0d10; }
.auth-logo-name { font-size: 1.1rem; font-weight: 700; color: #f0f0f4; letter-spacing: -.3px; }

/* ── card ── */
.auth-card {
  width: 100%;
  background: #13131a;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 22px;
  padding: 40px 36px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.02),
    0 32px 64px rgba(0,0,0,.5),
    inset 0 1px 0 rgba(255,255,255,.05);
}

.auth-card-head { margin-bottom: 32px; }
.auth-card-head h1 {
  font-size: 1.5rem; font-weight: 800; color: #f0f0f4;
  letter-spacing: -.4px; margin-bottom: 6px;
}
.auth-card-head p { font-size: .85rem; color: #5a5a66; }

/* ── alert ── */
.auth-alert {
  display: flex; align-items: flex-start; gap: 9px;
  background: rgba(239,68,68,.08);
  border: 1px solid rgba(239,68,68,.2);
  color: #fca5a5;
  font-size: .82rem;
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 24px;
  line-height: 1.5;
}
.auth-alert span { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }
.auth-alert ul   { list-style: none; display: flex; flex-direction: column; gap: 3px; }

/* ── form ── */
.auth-form { display: flex; flex-direction: column; gap: 18px; }

.auth-field { display: flex; flex-direction: column; gap: 8px; }
.auth-field label {
  font-size: .72rem; font-weight: 700;
  color: #6a6a78;
  letter-spacing: .08em; text-transform: uppercase;
}
.auth-hint { font-size: .7rem; font-weight: 400; text-transform: none; letter-spacing: 0; color: #444450; }

/* unified input row */
.auth-input-wrap {
  display: flex; align-items: stretch;
  background: #fff;
  border: 1.5px solid #e2e2ea;
  border-radius: 12px;
  overflow: hidden;
  transition: border-color .18s, box-shadow .18s;
}
.auth-input-wrap:focus-within {
  border-color: #00e5a0;
  box-shadow: 0 0 0 3px rgba(0,229,160,.12);
}

.auth-input-wrap > span.material-icons-round {
  display: flex; align-items: center;
  padding: 0 14px;
  font-size: 1rem;
  color: #b0b0bc;
  background: #f7f7fa;
  flex-shrink: 0;
  border-right: 1.5px solid #e2e2ea;
  transition: color .18s;
}
.auth-input-wrap:focus-within > span.material-icons-round {
  color: #00b37a;
}

.auth-input-wrap input {
  flex: 1;
  background: #fff;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: .9rem;
  color: #111118;
  padding: 14px 14px;
  min-width: 0;
}
.auth-input-wrap input::placeholder { color: #b0b0bc; }

/* fix browser autofill override */
.auth-input-wrap input:-webkit-autofill,
.auth-input-wrap input:-webkit-autofill:hover,
.auth-input-wrap input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 9999px #fff inset !important;
  -webkit-text-fill-color: #111118 !important;
  caret-color: #111118;
  transition: background-color 9999s ease;
}

.auth-toggle-pw {
  background: #f7f7fa;
  border: none;
  border-left: 1.5px solid #e2e2ea;
  padding: 0 14px;
  color: #b0b0bc;
  display: flex; align-items: center;
  cursor: pointer;
  transition: color .15s;
  flex-shrink: 0;
}
.auth-toggle-pw:hover { color: #6a6a78; }
.auth-toggle-pw span  { font-size: 1rem; }

/* ── terms ── */
.auth-terms {
  font-size: .76rem;
  color: #444450;
  line-height: 1.55;
}
.auth-terms a { color: #00e5a0; text-decoration: none; }
.auth-terms a:hover { text-decoration: underline; }

/* ── submit ── */
.auth-submit {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  padding: 14px;
  background: #00e5a0;
  color: #0d0d10;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: .92rem; font-weight: 800;
  letter-spacing: -.1px;
  cursor: pointer;
  margin-top: 6px;
  transition: opacity .15s, transform .1s, box-shadow .15s;
  box-shadow: 0 4px 20px rgba(0,229,160,.25);
}
.auth-submit:hover  { opacity: .92; box-shadow: 0 6px 28px rgba(0,229,160,.35); }
.auth-submit:active { transform: scale(.98); }
.auth-submit span   { font-size: 1rem; }

/* ── google btn ── */
.auth-google-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
  padding: 13px;
  background: #fff;
  color: #3c3c3c;
  border: 1.5px solid #e2e2ea;
  border-radius: 12px;
  font-family: inherit;
  font-size: .88rem; font-weight: 600;
  text-decoration: none;
  margin-top: 14px;
  transition: background .15s, border-color .15s, box-shadow .15s;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.auth-google-btn:hover {
  background: #f7f7fa;
  border-color: #c8c8d8;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}

/* ── divider ── */
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 24px 0 0;
}
.auth-divider::before,
.auth-divider::after {
  content: ''; flex: 1; height: 1px; background: #1e1e28;
}
.auth-divider span { font-size: .75rem; color: #3a3a48; white-space: nowrap; }

/* ── switch ── */
.auth-switch {
  text-align: center;
  margin-top: 16px;
  font-size: .84rem;
  color: #4a4a58;
}
.auth-switch a { color: #00e5a0; font-weight: 600; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }

/* ── back ── */
.auth-back {
  display: flex; align-items: center; gap: 5px;
  font-size: .78rem; color: #2e2e3a;
  text-decoration: none;
  transition: color .15s;
}
.auth-back:hover { color: #6a6a78; }
.auth-back span  { font-size: .9rem; }
