@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&family=JetBrains+Mono:wght@400;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #0a0a0a;
  --card-from:  #151515;
  --card-to:    #0d0d0d;
  --border:     rgba(255,255,255,0.07);
  --ibg:        rgba(255,255,255,0.04);
  --iborder:    rgba(255,255,255,0.10);
  --ifocus:     rgba(255,255,255,0.28);
  --text:       #ededed;
  --muted:      rgba(255,255,255,0.42);
  --font:       'Space Grotesk', system-ui, sans-serif;
  --mono:       'JetBrains Mono', monospace;
}

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  background-image: radial-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  font-family: var(--font);
  color: var(--text);
  padding: 32px 16px;
  -webkit-font-smoothing: antialiased;
}

/* ── wrap & card ── */
.aw { width: 100%; max-width: 420px; }

.ac {
  background: linear-gradient(180deg, var(--card-from) 0%, var(--card-to) 100%);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 40px 120px -40px rgba(0,0,0,0.9);
  position: relative;
  overflow: hidden;
}

/* brand */
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  text-decoration: none;
}

.brand img { height: 26px; width: auto; }

.brand-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

/* title */
.at { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 4px; }
.as { font-size: 0.83rem; color: var(--muted); margin-bottom: 22px; }

/* tabs */
.tabs {
  display: flex;
  gap: 3px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 18px;
}

.tab {
  flex: 1;
  padding: 9px 6px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  background: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font);
}

.tab:hover { color: var(--text); background: rgba(255,255,255,0.03); }

.tab.on {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.12);
  color: #fff;
}

/* form */
.af { display: flex; flex-direction: column; gap: 16px; }
.af.hide { display: none; }

.af-field { display: flex; flex-direction: column; gap: 5px; }

.af-label { font-size: 0.79rem; font-weight: 500; color: rgba(255,255,255,0.65); }

.af-wrap { position: relative; }

.af-ico {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.28);
  pointer-events: none;
  display: flex;
  align-items: center;
}

.af-ico.btn { pointer-events: auto; cursor: pointer; }

.af-input {
  width: 100%;
  background: var(--ibg);
  border: 1px solid var(--iborder);
  border-radius: 12px;
  padding: 11px 14px 11px 40px;
  color: var(--text);
  font-size: 0.875rem;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.15s;
  -webkit-appearance: none;
}

.af-input::placeholder { color: rgba(255,255,255,0.2); }
.af-input:focus { border-color: var(--ifocus); }
.af-input.bare { padding-left: 14px; }
.af-input.code { text-align: center; font-size: 1.6rem; letter-spacing: 0.4em; font-family: var(--mono); padding: 14px; }
.af-input.err { border-color: rgba(248,113,113,0.5); }

/* password eye toggle — right-side button */
.af-input-eye { padding-right: 42px; padding-left: 14px; }

.af-eye-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  padding: 2px;
  transition: color 0.15s;
}

.af-eye-btn:hover { color: rgba(255,255,255,0.7); }
.af-eye-btn.visible { color: rgba(255,255,255,0.7); }

/* kill browser autofill blue/white background */
.af-input:-webkit-autofill,
.af-input:-webkit-autofill:hover,
.af-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px rgba(255,255,255,0.04) inset !important;
  -webkit-text-fill-color: var(--text) !important;
  caret-color: var(--text);
  border-color: var(--iborder) !important;
  transition: background-color 9999s ease-in-out 0s;
}

/* buttons */
.ab {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  border: none;
  transition: opacity 0.15s;
  background: #fff;
  color: #0a0a0a;
}

.ab:hover { opacity: 0.88; }
.ab:disabled { opacity: 0.35; cursor: not-allowed; }

.ab.ghost {
  background: rgba(255,255,255,0.05);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.1);
}

.ab.ghost:hover { background: rgba(255,255,255,0.09); opacity: 1; }

.ab.sq {
  width: 44px;
  flex-shrink: 0;
  padding: 12px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* row */
.arow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ag { display: flex; gap: 10px; }

/* check row */
.achk {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.achk-box {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
}

.achk-box.on { background: #fff; border-color: #fff; }
.achk-txt { font-size: 0.79rem; color: var(--muted); }

/* link */
.alink {
  font-size: 0.79rem;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: color 0.15s;
}

.alink:hover { color: var(--text); }

/* error / success */
.aerr {
  padding: 10px 14px;
  background: rgba(248,113,113,0.07);
  border: 1px solid rgba(248,113,113,0.18);
  border-radius: 8px;
  color: #f87171;
  font-size: 0.79rem;
  display: none;
}

.aerr.show { display: block; }

.aok {
  padding: 10px 14px;
  background: rgba(74,222,128,0.06);
  border: 1px solid rgba(74,222,128,0.14);
  border-radius: 8px;
  color: #4ade80;
  font-size: 0.79rem;
  display: none;
}

.aok.show { display: block; }

/* divider */
.adiv {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,0.18);
  font-size: 0.73rem;
}

.adiv::before, .adiv::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.07);
}

/* steps */
.asteps {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 22px;
}

.astep {
  height: 4px;
  width: 36px;
  border-radius: 2px;
  background: rgba(255,255,255,0.1);
  transition: background 0.2s;
}

.astep.on  { background: rgba(255,255,255,0.7); }
.astep.done{ background: rgba(255,255,255,0.35); }

/* strength */
.str-bars {
  display: flex;
  gap: 4px;
  align-items: center;
  margin-top: 8px;
}

.str-bar {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,0.1);
  transition: background 0.2s;
}

.str-bar.w  { background: #f87171; }
.str-bar.f  { background: #fb923c; }
.str-bar.s  { background: #facc15; }
.str-bar.vs { background: #4ade80; }

.str-lbl { font-size: 0.7rem; color: var(--muted); min-width: 64px; text-align: right; }

/* req grid */
.req-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.req-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.77rem;
  color: var(--muted);
}

.req-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.52rem;
  color: rgba(255,255,255,0.25);
  transition: all 0.15s;
}

.req-dot.ok {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.4);
  color: #fff;
}

/* foot */
.afoot { text-align: center; font-size: 0.8rem; color: var(--muted); margin-top: 22px; }

/* OTP boxes */
.otp-row { display: flex; gap: 8px; justify-content: center; }

.otp-b {
  width: 44px;
  height: 52px;
  background: var(--ibg);
  border: 1px solid var(--iborder);
  border-radius: 10px;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  outline: none;
  font-family: var(--mono);
  transition: border-color 0.15s;
}

.otp-b:focus { border-color: var(--ifocus); }

/* overlay modal */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.overlay.hide { display: none; }

.modal {
  background: #141414;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 18px;
  padding: 28px;
  max-width: 390px;
  width: calc(100% - 32px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modal-title { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.02em; text-align: center; }
.modal-sub   { font-size: 0.81rem; color: var(--muted); text-align: center; line-height: 1.65; }

.modal-btns { display: flex; gap: 8px; }

.mb {
  flex: 1;
  padding: 10px;
  border-radius: 9px;
  font-size: 0.81rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  border: none;
  transition: all 0.15s;
}

.mb.cancel {
  background: rgba(248,113,113,0.07);
  border: 1px solid rgba(248,113,113,0.18);
  color: #f87171;
}

.mb.cancel:hover { background: rgba(248,113,113,0.13); }

.mb.go { background: #fff; color: #0a0a0a; }
.mb.go:hover { opacity: 0.88; }
.mb.go:disabled { opacity: 0.35; cursor: not-allowed; }

.mb.sec {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text);
}

.mb.sec:hover { background: rgba(255,255,255,0.09); }
.mb.sec:disabled { opacity: 0.35; cursor: not-allowed; }

.ac.dimmed { opacity: 0.12; pointer-events: none; }

/* highlight email in modal */
.hl { color: #ededed; font-weight: 500; }

/* hint text */
.hint { font-size: 0.72rem; color: var(--muted); margin-top: 4px; }
