:root {
  color-scheme: dark;
  --bg: #0d0e10;
  --panel: #151619;
  --paper: #f8f7f3;
  --ink: #111318;
  --muted: #b5b3ad;
  --aqua: #7edbd8;
  --aqua-deep: #147d7a;
  --violet: #6555c7;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  background: var(--bg);
  color: var(--paper);
  margin: 0;
  min-width: 320px;
}

a {
  color: inherit;
}

a:focus-visible {
  outline: 3px solid var(--aqua);
  outline-offset: 4px;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(22rem, 0.9fr) minmax(28rem, 1.1fr);
  min-height: 100vh;
}

.brand-panel {
  background:
    linear-gradient(145deg, rgb(101 85 199 / 24%), transparent 44%),
    linear-gradient(25deg, rgb(126 219 216 / 13%), transparent 48%), var(--panel);
  border-right: 1px solid rgb(255 255 255 / 12%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: clamp(2rem, 6vw, 5.5rem);
}

.brand img {
  display: block;
  height: auto;
  width: clamp(7.5rem, 11vw, 10rem);
}

.brand-copy {
  max-width: 33rem;
}

.eyebrow {
  color: var(--aqua);
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0;
  margin: 0 0 1.3rem;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(2.65rem, 5vw, 5rem);
  line-height: 0.98;
  margin: 0;
  max-width: 10ch;
}

.brand-copy > p:last-child {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
  margin: 1.75rem 0 0;
  max-width: 43ch;
}

.powered {
  color: var(--muted);
  font-size: 0.82rem;
  margin: 0;
}

.form-panel {
  align-items: center;
  background: var(--paper);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  padding: clamp(2rem, 7vw, 6rem);
}

.auth-root,
.auth-status,
.form-panel footer {
  max-width: 27rem;
  width: 100%;
}

.auth-root > h2 {
  font-size: 1.55rem;
  margin: 0 0 0.7rem;
}

.auth-root > p {
  color: #525966;
  line-height: 1.55;
}

.auth-root > a {
  color: var(--aqua-deep);
  display: inline-block;
  font-weight: 750;
  margin-top: 1rem;
}

.loading-state {
  align-items: center;
  color: #525966;
  display: flex;
  gap: 0.85rem;
}

.loading-mark {
  animation: spin 800ms linear infinite;
  border: 3px solid rgb(17 19 24 / 14%);
  border-radius: 50%;
  border-top-color: var(--aqua-deep);
  height: 1.4rem;
  width: 1.4rem;
}

.auth-status {
  color: #8d2d2d;
  font-size: 0.8rem;
  min-height: 1.2rem;
}

.form-panel footer {
  display: flex;
  gap: 1.25rem;
  margin-top: 2rem;
}

.form-panel footer a {
  color: #525966;
  font-size: 0.8rem;
}

.mobile-brand {
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 780px) {
  .auth-layout {
    display: block;
  }

  .brand-panel {
    display: none;
  }

  .form-panel {
    min-height: 100svh;
    padding: 2rem 1.25rem;
  }

  .mobile-brand {
    color: var(--aqua-deep);
    display: block;
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 2.5rem;
    max-width: 27rem;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .loading-mark {
    animation: none;
  }
}
