:root {
  --bg: #0f1114;
  --surface: #181b20;
  --surface-hi: #1e2128;
  --border: #252830;
  --border-hi: #343946;
  --blue: #0052ff;
  --green: #05b169;
  --red: #f03d3d;
  --text-1: #ffffff;
  --text-2: #9ca3af;
  --text-3: #596273;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { color-scheme: dark; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text-1);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { cursor: pointer; }

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
}
.auth-card {
  width: min(420px, 100%);
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
}
.auth-brand { display: flex; align-items: center; gap: 11px; }
.auth-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: #5c88ff;
}
.auth-mark img { width: 28px; height: 28px; display: block; }
.auth-brand-name { font-size: 17px; font-weight: 600; }
.auth-brand-name span { color: var(--blue); }
.auth-heading { margin-top: 40px; }
.auth-eyebrow {
  color: #78a0ff;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.auth-heading h1 { margin-top: 9px; font-size: 27px; font-weight: 500; letter-spacing: 0; }
.auth-heading > p:last-child { margin-top: 9px; color: var(--text-2); font-size: 13px; line-height: 1.55; }
#authForm { margin-top: 30px; }
.auth-field { margin-top: 16px; display: grid; gap: 8px; }
.auth-field > span:first-child { color: var(--text-2); font-size: 12px; }
.auth-field input {
  width: 100%;
  height: 44px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  background: #121419;
  color: var(--text-1);
  transition: border-color 160ms ease, background 160ms ease;
}
.auth-field input:hover { border-color: var(--border-hi); }
.auth-field input:focus { border-color: var(--blue); background: #141820; }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 78px; }
.password-toggle {
  position: absolute;
  right: 8px;
  top: 7px;
  height: 30px;
  padding: 0 7px;
  border: 0;
  background: transparent;
  color: var(--text-3);
  font-size: 11px;
}
.password-toggle:hover { color: var(--text-1); }
.confirm-field.is-hidden, .email-field.is-hidden { display: none; }
.auth-message { min-height: 20px; margin-top: 15px; color: var(--red); font-size: 12px; line-height: 1.5; }
.auth-message.success { color: var(--green); }
.auth-submit {
  width: 100%;
  height: 44px;
  margin-top: 6px;
  border: 1px solid var(--blue);
  border-radius: 8px;
  background: var(--blue);
  color: white;
  font-size: 13px;
  font-weight: 600;
  transition: background 160ms ease, opacity 160ms ease;
}
.auth-submit:hover { background: #174cff; }
.auth-submit:disabled { cursor: wait; opacity: 0.58; }
.auth-switch {
  margin-top: 18px;
  color: var(--text-3);
  font-size: 12px;
  text-align: center;
}
.auth-switch a { color: #78a0ff; text-decoration: none; }
.auth-switch a:hover { color: var(--text-1); }
.auth-switch.is-hidden { display: none; }
.auth-footer {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-3);
  font-size: 11px;
}
.auth-secure { display: flex; align-items: center; gap: 8px; }
.auth-legal { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 14px; }
.auth-legal a { color: var(--text-3); font-size: 10px; text-decoration: none; }
.auth-legal a:hover { color: var(--text-1); }
.secure-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }

@media (max-width: 520px) {
  .auth-shell { padding: 16px; }
  .auth-card { padding: 26px 22px; border-radius: 12px; }
  .auth-heading { margin-top: 32px; }
}
