*, *::before, *::after { box-sizing: border-box; }

:root {
  --auth-black: #070907;
  --auth-ink: #0a0c0a;
  --auth-bone: #f5f4ee;
  --auth-white: #ffffff;
  --auth-lime: #c6ff3f;
  --auth-lime-deep: #587300;
  --auth-muted: #5d625b;
  --auth-faint: #81867e;
  --auth-line: #b9bdb5;
  --auth-error: #a82e29;
  --auth-success: #3f5800;
  --auth-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --auth-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html { min-height: 100%; background: var(--auth-black); }

body.auth-page {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  color: var(--auth-ink);
  background: var(--auth-bone);
  font-family: var(--auth-ui);
  display: block;
  -webkit-font-smoothing: antialiased;
}

.auth-shell {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 62%) minmax(420px, 38%);
  overflow: hidden;
}

.auth-hero {
  position: relative;
  min-width: 0;
  padding: clamp(32px, 4vw, 64px);
  color: var(--auth-bone);
  background: var(--auth-black) url("/assets/scoutiq-auth-player.webp") center center / cover no-repeat;
  isolation: isolate;
  display: flex;
  flex-direction: column;
}

.auth-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(90deg, rgba(198, 255, 63, .18) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px);
  background-size: 25% 100%, 100% 22%;
  opacity: .32;
}

.auth-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(7, 9, 7, .92) 0%, rgba(7, 9, 7, .46) 48%, rgba(7, 9, 7, .08) 78%);
}

.auth-brand {
  color: var(--auth-bone);
  display: inline-flex;
  align-items: baseline;
  align-self: flex-start;
  font-family: var(--auth-display);
  font-size: clamp(26px, 2.25vw, 38px);
  font-style: italic;
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
}

.auth-brand span { color: var(--auth-lime); }

.auth-story {
  width: min(390px, 48%);
  margin: auto 0;
  position: relative;
  z-index: 1;
}

.auth-story h1 {
  margin: 0;
  color: var(--auth-bone);
  font-family: var(--auth-display);
  font-size: clamp(58px, 7vw, 110px);
  font-style: italic;
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: .82;
  text-transform: uppercase;
}

.auth-story h1 span { color: var(--auth-lime); display: block; }

.auth-story p {
  max-width: 390px;
  margin: 28px 0 0;
  color: #c2c8c0;
  font-size: clamp(15px, 1.35vw, 19px);
  line-height: 1.55;
}

.auth-copyright,
.auth-mobile-copyright {
  color: #8a9188;
  font-size: 12px;
  letter-spacing: .01em;
}

.auth-mobile-copyright { display: none; }

.auth-main {
  position: relative;
  min-width: 0;
  background: var(--auth-bone);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(40px, 5vw, 82px);
}

.auth-main::before {
  content: "";
  position: absolute;
  top: -8%;
  bottom: -8%;
  left: -52px;
  width: 82px;
  pointer-events: none;
  background: var(--auth-bone);
  clip-path: polygon(64% 0, 100% 0, 100% 100%, 0 100%);
}

.auth-flow {
  width: min(100%, 458px);
  position: relative;
  z-index: 1;
}

.auth-flow h2 {
  margin: 0 0 10px;
  font-family: var(--auth-display);
  font-size: clamp(50px, 4.8vw, 72px);
  font-style: italic;
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: .92;
  text-transform: uppercase;
}

.auth-flow h2 em { color: #78a700; font-style: italic; }

.auth-subtitle {
  margin: 0 0 34px;
  color: var(--auth-muted);
  font-size: 15px;
  line-height: 1.55;
}

.auth-login-form { margin-top: 38px; }

.auth-field { margin: 0 0 22px; }

.auth-field-row,
.auth-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.auth-label {
  display: block;
  margin: 0 0 9px;
  color: var(--auth-ink);
  font-size: 13px;
  font-weight: 700;
}

.auth-input-wrap { position: relative; }

.auth-input {
  width: 100%;
  height: 56px;
  padding: 0 16px;
  border: 1px solid var(--auth-line);
  border-radius: 2px;
  outline: 0;
  color: var(--auth-ink);
  background: rgba(255, 255, 255, .42);
  font: 500 15px/1 var(--auth-ui);
  transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.auth-input::placeholder { color: var(--auth-faint); }
.auth-input:hover { border-color: #8e948a; }
.auth-input:focus {
  border-color: var(--auth-ink);
  background: var(--auth-white);
  box-shadow: 0 0 0 3px rgba(198, 255, 63, .38);
}

.auth-input.has-toggle { padding-right: 72px; }

.auth-password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  padding: 8px 6px;
  color: var(--auth-muted);
  background: transparent;
  font: 700 12px/1 var(--auth-ui);
  cursor: pointer;
}

.auth-password-toggle:hover,
.auth-password-toggle:focus-visible { color: var(--auth-ink); outline: 0; }

.auth-link {
  color: var(--auth-lime-deep);
  font-size: 13px;
  font-weight: 700;
  text-underline-offset: 3px;
}

.auth-meta-row { margin: -6px 0 24px; }

.auth-button {
  width: 100%;
  min-height: 58px;
  border: 1px solid var(--auth-ink);
  border-radius: 2px;
  padding: 14px 20px;
  color: var(--auth-ink);
  background: var(--auth-lime);
  font: 800 15px/1.1 var(--auth-ui);
  cursor: pointer;
  transition: background-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.auth-button:hover { background: #d3ff68; transform: translateY(-1px); box-shadow: 0 8px 22px rgba(10, 12, 10, .12); }
.auth-button:focus-visible { outline: 3px solid rgba(10, 12, 10, .28); outline-offset: 2px; }
.auth-button:disabled { cursor: wait; opacity: .68; transform: none; box-shadow: none; }

.auth-button-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  color: var(--auth-ink);
  background: transparent;
  text-decoration: none;
}

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  margin: 28px 0 24px;
  color: var(--auth-faint);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after { content: ""; height: 1px; background: #d4d5cf; }

.auth-switch { margin: 0; text-align: center; color: var(--auth-muted); font-size: 14px; }

.auth-alert {
  margin: 0 0 22px;
  padding: 13px 15px;
  border-left: 3px solid currentColor;
  background: rgba(168, 46, 41, .07);
  color: var(--auth-error);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.auth-alert-success { color: var(--auth-success); background: rgba(63, 88, 0, .08); }

.auth-code-panel {
  margin: 0 0 22px;
  padding: 17px;
  border: 1px solid var(--auth-line);
  background: rgba(255, 255, 255, .45);
}

.auth-code-panel-title { margin-bottom: 8px; color: var(--auth-muted); font-size: 12px; font-weight: 800; }
.auth-code-panel-value { word-break: break-all; font: 700 15px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .06em; }
.auth-code-panel-note { margin-top: 9px; color: var(--auth-faint); font-size: 12px; line-height: 1.45; }
.auth-recovery-list { font: 700 14px/1.8 ui-monospace, SFMono-Regular, Menlo, monospace; }

.auth-password-rules {
  margin: -10px 0 22px;
  color: var(--auth-faint);
  font-size: 12px;
  line-height: 1.45;
}

.auth-back { margin-top: 22px; text-align: center; }

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: minmax(0, 54%) minmax(390px, 46%); }
  .auth-story { width: min(330px, 64%); }
  .auth-main { padding: 44px 38px; }
}

@media (max-width: 720px) {
  body.auth-page { background: var(--auth-bone); }
  .auth-shell { display: flex; flex-direction: column; min-height: 100svh; overflow: visible; }
  .auth-hero {
    flex: 0 0 clamp(250px, 34svh, 300px);
    min-height: 250px;
    padding: 24px;
    background-position: 61% center;
    overflow: hidden;
  }
  .auth-hero::before { background-size: 33.333% 100%, 100% 33.333%; }
  .auth-hero::after { background: linear-gradient(90deg, rgba(7, 9, 7, .89), rgba(7, 9, 7, .18)); }
  .auth-brand { font-size: 28px; }
  .auth-story { width: 48%; margin: auto 0 10px; }
  .auth-story h1 { font-size: clamp(50px, 15vw, 68px); line-height: .8; }
  .auth-story p { display: none; }
  .auth-copyright { display: none; }
  .auth-main {
    flex: 1 0 auto;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 46px 24px 24px;
  }
  .auth-main::before {
    top: -28px;
    left: 0;
    right: 0;
    bottom: auto;
    width: 100%;
    height: 44px;
    clip-path: polygon(0 56%, 100% 0, 100% 100%, 0 100%);
  }
  .auth-flow { width: 100%; max-width: none; }
  .auth-flow h2 { font-size: 48px; }
  .auth-subtitle { margin-bottom: 25px; font-size: 14px; }
  .auth-login-form { margin-top: 26px; }
  .auth-field { margin-bottom: 18px; }
  .auth-input { height: 52px; }
  .auth-button { min-height: 54px; }
  .auth-divider { margin: 22px 0 20px; }
  .auth-mobile-copyright { display: block; margin-top: 28px; }
}

@media (max-width: 390px), (max-height: 720px) and (max-width: 720px) {
  .auth-hero { flex-basis: 220px; min-height: 220px; }
  .auth-story h1 { font-size: 48px; }
  .auth-main { padding-top: 36px; }
  .auth-flow h2 { font-size: 42px; }
  .auth-subtitle { margin-bottom: 20px; }
  .auth-field { margin-bottom: 15px; }
  .auth-mobile-copyright { margin-top: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
