:root {
  color-scheme: light;
  --navy: #101014;
  --ink: #131821;
  --muted: #5f6b7a;
  --blue: #006ee6;
  --blue-bright: #00a7ff;
  --mint: #33d6a6;
  --coral: #ff5a5f;
  --gold: #ffcc4d;
  --line: #dfe7ee;
  --surface: #ffffff;
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(0, 167, 255, 0.14), transparent 28%),
    linear-gradient(225deg, rgba(255, 90, 95, 0.1), transparent 26%),
    linear-gradient(180deg, #fbfcfe 0%, #f3f6f8 100%);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(16, 16, 20, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 16, 20, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 72%);
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.auth-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.75fr);
  gap: 44px;
  align-items: center;
  max-width: 1120px;
  margin: 0 auto;
  padding: 48px 24px;
}

.auth-brand {
  padding: 42px 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid rgba(223, 231, 238, 0.82);
  box-shadow: 0 18px 36px rgba(0, 110, 230, 0.18);
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 7px;
}

.eyebrow {
  margin: 28px 0 10px;
  color: var(--coral);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  max-width: 620px;
  color: var(--navy);
  font-size: clamp(56px, 8vw, 100px);
  line-height: 0.9;
  letter-spacing: -0.075em;
}

.lede {
  max-width: 560px;
  margin-top: 24px;
  color: #263241;
  font-size: 18px;
  line-height: 1.55;
}

.proof-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.proof-strip span {
  border-radius: 999px;
  padding: 9px 13px;
  color: #071b15;
  background: rgba(51, 214, 166, 0.16);
  border: 1px solid rgba(51, 214, 166, 0.28);
  font-size: 12px;
  font-weight: 800;
}

.auth-card {
  position: relative;
  overflow: hidden;
  padding: 34px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.9)),
    var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 26px 70px rgba(16, 16, 20, 0.14);
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 8px;
  background: linear-gradient(90deg, var(--blue-bright), var(--mint), var(--gold), var(--coral));
}

.auth-card__head .eyebrow {
  margin-top: 0;
}

h2 {
  color: var(--navy);
  font-size: 34px;
  line-height: 1;
  letter-spacing: -0.045em;
}

.auth-card__head p:last-child {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.auth-form {
  display: grid;
  gap: 14px;
  margin-top: 26px;
}

.field {
  display: grid;
  gap: 7px;
}

.field span {
  color: #3f4857;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.field small {
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.field input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.field input:focus {
  border-color: rgba(0, 167, 255, 0.7);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(0, 167, 255, 0.14);
}

.auth-error {
  padding: 10px 12px;
  border-radius: 12px;
  color: #8d2025;
  background: rgba(255, 90, 95, 0.1);
  border: 1px solid rgba(255, 90, 95, 0.24);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.auth-error[data-tone="success"] {
  color: #087655;
  background: rgba(51, 214, 166, 0.12);
  border-color: rgba(51, 214, 166, 0.28);
}

.auth-inline-link {
  display: inline-flex;
  margin-top: 10px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
}

.auth-inline-link:hover {
  text-decoration: underline;
}

.auth-form.is-complete {
  margin-top: 24px;
}

.auth-form.is-complete .field,
.auth-form.is-complete .auth-submit {
  display: none;
}

.auth-form.is-complete .auth-error {
  display: block;
  padding: 18px 20px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.45;
}

.auth-submit {
  position: relative;
  overflow: hidden;
  min-height: 56px;
  border-radius: 18px;
  color: #ffffff;
  background:
    linear-gradient(135deg, #111827 0%, var(--blue) 52%, var(--blue-bright) 100%);
  box-shadow: 0 18px 34px rgba(0, 110, 230, 0.28);
  font-size: 15px;
  font-weight: 900;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.auth-submit:hover:not(:disabled),
.auth-submit:focus-visible {
  transform: translateY(-2px);
  filter: saturate(1.08);
  box-shadow: 0 24px 44px rgba(0, 110, 230, 0.34);
}

.mode-switch {
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.mode-switch a {
  color: var(--blue);
  font-weight: 900;
  text-decoration: none;
}

.mode-switch a:hover {
  text-decoration: underline;
}

body[data-mode="login"] .field--register {
  display: none;
}

@media (max-width: 820px) {
  .auth-shell {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 28px 16px;
  }

  .auth-brand {
    padding: 16px 0 0;
  }

  h1 {
    font-size: clamp(44px, 14vw, 68px);
  }

  .lede {
    font-size: 15px;
  }

  .auth-card {
    padding: 28px 20px;
    border-radius: 22px;
  }
}
