@font-face {
  font-family: "Sellify Sans";
  src: url("../fonts/Montserrat-Regular.ttf") format("truetype");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

@font-face {
  font-family: "Sellify Sans";
  src: url("../fonts/Montserrat-Bold.ttf") format("truetype");
  font-display: swap;
  font-style: normal;
  font-weight: 600 800;
}

:root {
  --auth-ink: #172027;
  --auth-muted: #65727b;
  --auth-border: #d6dde1;
  --auth-surface: #f7f8f8;
  --auth-accent: #a96318;
  --auth-accent-strong: #83470c;
  --auth-brand: #14262b;
  --auth-danger: #9e3434;
  --auth-danger-soft: #fff2f1;
  --auth-success: #246b4d;
  --auth-success-soft: #edf8f2;
}

* { box-sizing: border-box; }

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

.auth-body {
  width: 100%;
  min-width: 0;
  min-height: 100dvh;
  overflow-x: hidden;
  background: var(--auth-surface);
  color: var(--auth-ink);
  font-family: "Sellify Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.auth-shell {
  display: grid;
  width: 100%;
  min-width: 0;
  min-height: 100dvh;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
}

.auth-brand {
  position: relative;
  display: flex;
  min-height: 100dvh;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  padding: clamp(2rem, 4.5vw, 4.5rem);
  background:
    radial-gradient(circle at 82% 8%, rgba(169, 99, 24, .24), transparent 27rem),
    radial-gradient(circle at 8% 100%, rgba(64, 104, 110, .25), transparent 32rem),
    var(--auth-brand);
  color: #f7f4ed;
}

.auth-brand::after {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 44px 44px;
  content: "";
  pointer-events: none;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .75), transparent 78%);
}

.auth-brand::before {
  position: absolute;
  inset: 0;
  background-image: url("../login_bg.png");
  background-position: center;
  background-size: cover;
  content: "";
  opacity: .06;
  pointer-events: none;
  mix-blend-mode: luminosity;
}

.auth-logo,
.auth-brand-content,
.auth-brand-footnote {
  position: relative;
  z-index: 1;
}

.auth-logo {
  display: inline-flex;
  width: fit-content;
  min-height: 44px;
  align-items: center;
}

.auth-logo img { width: auto; height: 2.25rem; }

.auth-brand-content {
  width: min(100%, 38rem);
  margin: auto 0;
  padding-block: clamp(4rem, 10vh, 7rem);
}

.auth-eyebrow {
  margin: 0 0 1rem;
  color: var(--auth-accent);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.auth-brand .auth-eyebrow { color: #dfa961; }

.auth-brand h2 {
  max-width: 15ch;
  margin: 0;
  font-size: clamp(2rem, 3.5vw, 3.65rem);
  font-weight: 600;
  letter-spacing: -.045em;
  line-height: 1.08;
  text-wrap: balance;
}

.auth-brand-copy {
  max-width: 49ch;
  margin: 1.5rem 0 0;
  color: rgba(247, 244, 237, .7);
  font-size: clamp(.9rem, 1.2vw, 1.05rem);
  line-height: 1.7;
}

.auth-path {
  position: relative;
  display: grid;
  max-width: 35rem;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  margin-top: clamp(4.5rem, 9vh, 6.75rem);
}

.auth-path-line {
  position: absolute;
  top: .4rem;
  right: 8%;
  left: 4%;
  height: 1px;
  background: rgba(247, 244, 237, .22);
}

.auth-path-item {
  position: relative;
  display: grid;
  gap: .9rem;
  color: rgba(247, 244, 237, .72);
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.45;
}

.auth-path-index {
  display: grid;
  width: 2.15rem;
  height: 1.25rem;
  place-items: center;
  background: var(--auth-brand);
  color: #dfa961;
  font-size: .72rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: .08em;
}

.auth-brand-footnote {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin: 0;
  color: rgba(247, 244, 237, .55);
  font-size: .7rem;
}

.auth-brand-footnote i { color: #dfa961; }

.auth-access {
  display: grid;
  width: 100%;
  min-width: 0;
  min-height: 100dvh;
  place-items: center;
  padding: clamp(2rem, 6vw, 6rem);
  background:
    radial-gradient(circle at 100% 0, rgba(169, 99, 24, .07), transparent 24rem),
    #f7f8f8;
}

.auth-access-inner { width: min(100%, 29rem); min-width: 0; }
.auth-mobile-logo { display: none; }
.auth-form-wrap {
  min-width: 0;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.auth-heading { margin-bottom: 2.4rem; }

.auth-heading h1 {
  margin: 0;
  color: var(--auth-ink);
  font-size: clamp(2rem, 3.3vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -.045em;
  line-height: 1.08;
}

.auth-heading > p:last-child {
  margin: .8rem 0 0;
  color: var(--auth-muted);
  font-size: .9rem;
  line-height: 1.6;
}

.auth-alert-stack {
  display: grid;
  gap: .6rem;
  margin-bottom: 1.25rem;
}

.auth-alert {
  display: grid;
  grid-template-columns: 1rem 1fr;
  gap: .7rem;
  margin-bottom: 1.25rem;
  border: 1px solid;
  border-radius: .5rem;
  padding: .85rem 1rem;
  font-size: .78rem;
  line-height: 1.55;
}

.auth-alert-stack .auth-alert { margin-bottom: 0; }
.auth-alert i { margin-top: .18rem; }
.auth-alert--error { border-color: #e5b9b5; background: var(--auth-danger-soft); color: var(--auth-danger); }
.auth-alert--success { border-color: #b8daca; background: var(--auth-success-soft); color: var(--auth-success); }

.auth-form { display: grid; min-width: 0; gap: 1.25rem; }
.auth-field { display: grid; min-width: 0; gap: .5rem; }

.auth-field label {
  color: #36434b;
  font-size: .76rem;
  font-weight: 600;
}

.auth-input {
  width: 100%;
  min-height: 3.15rem;
  border: 1px solid var(--auth-border);
  border-radius: .5rem;
  background: #fff;
  color: var(--auth-ink);
  padding: .78rem .9rem;
  font: 400 .88rem/1.4 "Sellify Sans", sans-serif;
  box-shadow: 0 1px 2px rgba(20, 38, 43, .025);
  transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.auth-input::placeholder { color: #98a2a8; }
.auth-input:hover { border-color: #aeb9bf; }
.auth-input:focus {
  border-color: var(--auth-accent);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(169, 99, 24, .14);
}

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

.auth-password { position: relative; min-width: 0; }
.auth-password .auth-input { padding-right: 3.5rem; }

.auth-choice {
  display: flex;
  min-width: 0;
  min-height: 2.75rem;
  align-items: center;
  gap: .65rem;
  color: #46545c;
  cursor: pointer;
  font-size: .76rem;
  font-weight: 600;
  line-height: 1.4;
}

.auth-choice-input {
  width: 1.1rem;
  height: 1.1rem;
  flex: 0 0 auto;
  margin: 0;
  accent-color: var(--auth-accent-strong);
}

.auth-password-toggle {
  position: absolute;
  top: 50%;
  right: .3rem;
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 0;
  border-radius: .4rem;
  background: transparent;
  color: #6c7981;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background-color 140ms ease, color 140ms ease;
}

.auth-password-toggle:hover { background: #f0f2f3; color: var(--auth-ink); }
.auth-password-toggle:active { transform: translateY(calc(-50% + 1px)); }

.auth-input:focus-visible,
.auth-choice-input:focus-visible,
.auth-password-toggle:focus-visible,
.auth-submit:focus-visible,
.auth-logo:focus-visible {
  outline: 2px solid var(--auth-accent);
  outline-offset: 2px;
}

.auth-field-error {
  margin: 0;
  color: var(--auth-danger);
  font-size: .72rem;
  font-weight: 600;
  line-height: 1.45;
}

.auth-submit {
  position: relative;
  width: 100%;
  min-height: 3.2rem;
  margin-top: .25rem;
  overflow: hidden;
  border: 1px solid var(--auth-brand);
  border-radius: .5rem;
  background: var(--auth-brand);
  color: #fff;
  padding: .85rem 1rem;
  font: 600 .84rem/1 "Sellify Sans", sans-serif;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(20, 38, 43, .12);
  transition: background-color 140ms ease, border-color 140ms ease, transform 90ms ease, box-shadow 140ms ease;
}

.auth-submit:hover { border-color: #203c43; background: #203c43; box-shadow: 0 10px 24px rgba(20, 38, 43, .16); }
.auth-submit:active { transform: translateY(1px); }
.auth-submit[aria-busy="true"] { cursor: progress; opacity: .76; }

.auth-submit[aria-busy="true"]::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #dfa961 50%, transparent);
  content: "";
  transform: translateX(-100%);
  animation: auth-progress 1s cubic-bezier(.4, 0, .2, 1) infinite;
}

.auth-support {
  margin: 1.8rem 0 0;
  color: var(--auth-muted);
  font-size: .72rem;
  line-height: 1.6;
}

.auth-support span { display: block; color: #3f4d55; }

@keyframes auth-progress {
  to { transform: translateX(100%); }
}

@media (max-width: 860px) {
  .auth-shell { display: block; }
  .auth-brand { display: none; }
  .auth-access { min-height: 100dvh; padding: 2rem 1.25rem 3rem; }
  .auth-mobile-logo { display: block; margin-bottom: clamp(3rem, 10vh, 5rem); }
  .auth-mobile-logo img { width: auto; height: 2rem; }
  .auth-heading { margin-bottom: 2rem; }
}

@media (max-width: 420px) {
  .auth-access { place-items: start center; padding-inline: 1rem; }
  .auth-mobile-logo { margin-bottom: 3.5rem; }
  .auth-heading h1 { font-size: 2rem; }
  .auth-input,
  .auth-submit { min-height: 3.25rem; }
}

@media (max-width: 340px) {
  .auth-access { padding: 1.5rem .75rem 2rem; }
  .auth-mobile-logo { margin-bottom: 2.5rem; }
  .auth-heading { margin-bottom: 1.5rem; }
  .auth-heading h1 { font-size: 1.8rem; }
  .auth-support { margin-top: 1.4rem; }
}

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