:root {
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --bg: #f5f5f7;
  --surface: #fff;
  --line: rgba(0, 0, 0, .11);
  --danger: #d70015;
  --success: #16883f;
}

* { box-sizing: border-box; }

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

body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Geist", -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); }

button, input { font: inherit; }

.auth-page {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(24rem, .9fr) minmax(32rem, 1.1fr);
}

.auth-panel {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  padding: clamp(2rem, 6vw, 6rem);
  background: #fbfdff;
}

.auth-shell {
  width: min(100%, 27rem);
  margin-inline: auto;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border: 1px solid #dfe7f2;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(25, 55, 91, .11), 0 3px 10px rgba(25, 55, 91, .05);
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  margin-bottom: clamp(2.4rem, 6vh, 4.5rem);
  color: var(--ink);
  font-size: .95rem;
  font-weight: 650;
  text-decoration: none;
}

.auth-brand img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.auth-kicker {
  display: block;
  margin-bottom: .55rem;
  color: var(--blue);
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.auth-heading {
  margin: 0;
  font-size: clamp(2.65rem, 5vw, 4.3rem);
  font-weight: 760;
  line-height: .98;
  letter-spacing: -.065em;
}

.auth-intro {
  margin: 1.2rem 0 2rem;
  color: var(--muted);
  font-size: 1rem;
}

.auth-form {
  display: grid;
  gap: 1.05rem;
}

.field {
  display: grid;
  gap: .42rem;
}

.field label {
  color: #3a3a3c;
  font-size: .82rem;
  font-weight: 650;
}

.field input {
  width: 100%;
  min-height: 50px;
  padding: 0 .95rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  outline: 0;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.field input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, .12);
}

.field input[aria-invalid="true"] {
  border-color: var(--danger);
}

.helper {
  color: var(--muted);
  font-size: .74rem;
}

.auth-button {
  min-height: 50px;
  margin-top: .35rem;
  border: 0;
  border-radius: 12px;
  background: #065dff;
  color: #fff;
  font-weight: 650;
  cursor: pointer;
  transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease;
}

.auth-button:hover {
  background: var(--blue-hover);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 113, 227, .18);
}

.auth-button:active { transform: translateY(0); }
.auth-button:disabled { opacity: .65; cursor: wait; transform: none; box-shadow: none; }

.auth-button:focus-visible,
.auth-brand:focus-visible,
.auth-switch a:focus-visible {
  outline: 3px solid rgba(0, 113, 227, .3);
  outline-offset: 3px;
}

.auth-message {
  min-height: 1.4rem;
  margin: 0;
  color: var(--danger);
  font-size: .8rem;
}

.auth-message[data-state="success"] { color: var(--success); }

.auth-switch {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .82rem;
}

.auth-switch a { font-weight: 650; text-decoration: none; }

.auth-showcase {
  position: relative;
  min-height: 100dvh;
  display: grid;
  align-content: center;
  overflow: hidden;
  padding: clamp(2rem, 7vw, 7rem);
  color: #fff;
  background: linear-gradient(145deg, #031226, #071f43 72%, #04162e);
}

.auth-showcase::before,
.auth-showcase::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 50%;
}

.auth-showcase::before {
  width: 36rem;
  height: 36rem;
  right: -12rem;
  top: -10rem;
}

.auth-showcase::after {
  width: 18rem;
  height: 18rem;
  right: 5rem;
  top: 4rem;
}

.showcase-copy {
  position: relative;
  z-index: 1;
  width: min(100%, 42rem);
}

.showcase-copy > span {
  color: rgba(255, 255, 255, .58);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.showcase-copy h2 {
  margin: 1rem 0;
  font-size: clamp(3.2rem, 6vw, 6.3rem);
  font-weight: 700;
  line-height: .92;
  letter-spacing: -.075em;
}

.showcase-copy p {
  max-width: 34rem;
  color: rgba(255, 255, 255, .66);
  font-size: 1.1rem;
}

.showcase-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
  width: min(100%, 42rem);
  margin-top: 3rem;
}

.showcase-grid div {
  min-height: 7rem;
  display: grid;
  align-content: end;
  gap: .2rem;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 18px;
  background: rgba(255, 255, 255, .07);
  backdrop-filter: blur(18px);
}

.showcase-grid strong { font-size: 1rem; }
.showcase-grid span { color: rgba(255, 255, 255, .56); font-size: .75rem; }

.register-page .auth-panel { align-content: start; overflow-y: auto; }
.register-page .auth-shell { width: min(100%, 34rem); padding: clamp(1.5rem, 3vw, 2.25rem); }
.register-page .auth-brand { margin-bottom: 2.8rem; }
.register-page .auth-heading { font-size: clamp(2.5rem, 4.5vw, 3.8rem); }
.register-page .auth-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.register-page .field-wide,
.register-page .auth-button,
.register-page .auth-message,
.register-page .auth-switch,
.register-page .auth-intro { grid-column: 1 / -1; }

@media (max-width: 62rem) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-panel { min-height: 100dvh; padding: 2rem; }
  .auth-showcase { display: none; }
  .auth-brand { margin-bottom: clamp(3rem, 10vh, 6rem); }
  .register-page .auth-panel { min-height: 100dvh; }
}

@media (max-width: 34rem) {
  .auth-panel { padding: 1.25rem; }
  .auth-heading { font-size: 2.8rem; }
  .register-page .auth-form { grid-template-columns: 1fr; }
  .register-page .field { grid-column: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
