/* ===========================================================
   auth — register / login
   =========================================================== */
body.auth-body {
  margin: 0;
  min-height: 100vh;
  background: #050506;
  color: #f5f5f7;
  font-family: var(--font, Inter, system-ui, sans-serif);
}

/* halftone backdrop ----------------------------------------- */
.auth-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #050506;
  pointer-events: none;
}
.auth-bg::before {
  content: "";
  position: absolute;
  inset: -6vh -4vw;
  background: url("../img/halftone.svg") right center / cover no-repeat;
  opacity: 0.95;
}
.auth-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 5, 6, 0.94) 0%, rgba(5, 5, 6, 0.86) 20%, rgba(5, 5, 6, 0.46) 42%, rgba(5, 5, 6, 0.08) 60%, rgba(5, 5, 6, 0) 72%),
    linear-gradient(180deg, rgba(5, 5, 6, 0.65), transparent 20%, transparent 80%, rgba(5, 5, 6, 0.8));
}

/* brand ------------------------------------------------------ */
.auth-brand {
  position: fixed;
  top: 28px;
  left: 40px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--display, "Space Grotesk", sans-serif);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #fff;
  text-decoration: none;
}
.auth-brand .brand-word { display: inline; }
.auth-brand .tld { color: rgba(255, 255, 255, 0.72); font-weight: 600; }
.auth-brand .brand-mark {
  display: block;
  width: 26px;
  height: 26px;
  flex: none;
  object-fit: contain;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.6));
}

/* layout ----------------------------------------------------- */
.auth-shell {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: grid;
  align-content: center;
  padding: 104px clamp(24px, 9.4vw, 152px) 60px;
}
.auth-col { width: 100%; max-width: 336px; }

.auth-col h1 {
  margin: 0 0 12px;
  font-family: var(--font, Inter, sans-serif);
  font-size: clamp(28px, 2.3vw, 36px);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.1;
  white-space: nowrap;
  color: #fff;
}
.auth-sub {
  margin: 0 0 24px;
  font-size: 12.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.5);
}

/* fields ----------------------------------------------------- */
.afield {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 48px;
  margin-bottom: 12px;
  padding: 0 8px 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: #0b0b0b;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.afield:focus-within {
  border-color: rgba(255, 255, 255, 0.45);
  background: #0d0d0d;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}
.afield .afi {
  flex: none;
  display: block;
  color: rgba(255, 255, 255, 0.42);
}
.afield .prefix {
  flex: none;
  font-size: 12.5px;
  letter-spacing: 0.01em;
  color: #9a9a9a;
  white-space: nowrap;
}
.afield input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: none;
  outline: none;
  color: #f2f2f2;
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.01em;
  box-shadow: none;
}
.afield input::placeholder { color: rgba(255, 255, 255, 0.36); }
.afield input:focus { background: none; box-shadow: none; }

.afield .clear {
  flex: none;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: rgba(255, 255, 255, 0.42);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: color 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}
.afield input:not(:placeholder-shown) ~ .clear { opacity: 1; pointer-events: auto; }
.afield .clear:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }

.afield .submit {
  flex: none;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f4f4f6;
  color: #0a0a0c;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.afield .submit:hover { background: #fff; transform: translateY(-1px); }
.afield .submit:disabled { opacity: 0.6; cursor: default; transform: none; }
.afield .submit svg { display: block; }

.aerr {
  display: none;
  margin: 4px 0 0 18px;
  font-size: 11.5px;
  line-height: 1.5;
  color: #f5f5f5;
}
.aerr.on { display: block; }

/* divider + alt sign-in -------------------------------------- */
.adiv {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 24px 0 14px;
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.34);
}
.adiv::before,
.adiv::after {
  content: "";
  height: 1px;
  flex: 1;
  background: rgba(255, 255, 255, 0.09);
}

.alt-row { display: block; }
.alt-btn {
  width: 100%;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.035);
  color: #ececec;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.alt-btn:hover { background: rgba(255, 255, 255, 0.07); border-color: rgba(255, 255, 255, 0.18); }
.alt-btn:active { transform: translateY(1px); }
.alt-btn .dico { display: flex; color: #8a8a8a; }

/* footer text ------------------------------------------------ */
.afoot {
  margin: 26px 0 0;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.45);
}
.afoot a {
  margin-left: 4px;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.afoot a:hover { text-decoration: underline; text-underline-offset: 3px; }
.linkish {
  padding: 0;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, 0.7);
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}
.linkish:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

.alegal {
  margin: 13px 0 0;
  font-size: 10px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.3);
}
.alegal a { color: rgba(255, 255, 255, 0.46); text-decoration: underline; text-underline-offset: 2px; }
.alegal a:hover { color: rgba(255, 255, 255, 0.7); }

/* responsive ------------------------------------------------ */
@media (max-width: 900px) {
  .auth-bg::before { inset: -4vh -18vw; opacity: 0.8; }
}
@media (max-width: 640px) {
  .auth-shell { padding: 96px 22px 44px; align-content: start; }
  .auth-brand { top: 20px; left: 20px; font-size: 19px; }
  .auth-brand .brand-mark { width: 20px; height: 20px; font-size: 18px; }
  .auth-col { max-width: 100%; }
  .auth-col h1 { font-size: 29px; letter-spacing: -0.04em; }
  .auth-sub { margin-bottom: 22px; }
  .auth-bg::before { inset: -2vh -46vw -2vh 8vw; opacity: 0.7; }
  .auth-bg::after {
    background:
      linear-gradient(90deg, rgba(5, 5, 6, 0.92) 0%, rgba(5, 5, 6, 0.72) 48%, rgba(5, 5, 6, 0.3) 100%),
      linear-gradient(180deg, rgba(5, 5, 6, 0.5), transparent 28%, transparent 72%, rgba(5, 5, 6, 0.7));
  }
}

/* ---------- monochrome theme ---------- */
body.auth-body, .auth-bg { background:#050505; }
.afield:focus-within { border-color:rgba(255,255,255,.42); background:#101010; box-shadow:0 0 0 3px rgba(255,255,255,.07); }
.afield .prefix { color:#9a9a9a; }
.aerr { color:#f5f5f5; }
.alt-btn .dico { color:#bdbdbd; }

/* original artwork has ~35% transparent padding; scale it to fill the mark */
.auth-brand .brand-mark { transform: scale(1.45); transform-origin: center; }
