.mateo-auth {
  --auth-bg: #F5EFE6;
  --auth-surface: #FFFFFF;
  --auth-ink: #111111;
  --auth-fire: #C96A2B;
  --auth-fire-dark: #A95420;
  --auth-wood: #C79A5B;
  --auth-steel: #6B6B6B;
  --auth-border: #D9CEC0;
  min-height: calc(100svh - var(--navbar-h, 112px));
  background: var(--auth-bg);
  color: var(--auth-ink);
}

.mateo-auth-layout {
  display: grid;
  min-height: inherit;
}

.mateo-auth-visual {
  position: relative;
  display: flex;
  min-height: 220px;
  align-items: flex-end;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(201, 106, 43, .2), transparent 34%),
    linear-gradient(180deg, #111111 0%, #1A1A1A 100%);
  color: #FFFFFF;
}

.mateo-auth-visual::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,.04) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, rgba(255,255,255,.03) 0 1px, transparent 1px 100%);
  background-size: 42px 42px;
  content: "";
}

.mateo-auth-visual-content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 1.5rem;
}

.mateo-auth-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: #FFFFFF;
}

.mateo-auth-mark {
  display: inline-grid;
  width: 3rem;
  height: 3rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(245, 239, 230, .46);
  border-radius: 8px;
  background: #FFFFFF;
  color: var(--auth-fire-dark);
  font-family: var(--font-heading);
  font-size: .875rem;
  font-weight: 900;
}

.mateo-auth-mark img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.mateo-auth-brand-name,
.mateo-auth-title,
.mateo-auth-visual-title {
  font-family: var(--font-heading);
  font-weight: 900;
  letter-spacing: 0;
}

.mateo-auth-brand-name {
  font-size: 1.45rem;
  line-height: 1.05;
}

.mateo-auth-brand-tagline {
  margin-top: .2rem;
  color: rgba(245, 239, 230, .78);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.mateo-auth-visual-copy {
  display: none;
}

.mateo-auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem .75rem 2rem;
  background: var(--auth-bg);
}

.mateo-auth-form-wrap {
  width: min(100%, 36rem);
  border: 1px solid var(--auth-border);
  border-radius: 8px;
  background: #FFFFFF;
  padding: 1.25rem;
  box-shadow: 0 18px 44px rgba(17, 17, 17, .08);
}

.mateo-auth-form-wrap.is-compact {
  width: min(100%, 30rem);
}

.mateo-auth-heading {
  text-align: center;
}

.mateo-auth-heading .mateo-auth-mark {
  margin-inline: auto;
}

.mateo-auth-eyebrow {
  margin-top: 1rem;
  color: var(--auth-fire-dark);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.mateo-auth-title {
  margin-top: .45rem;
  color: var(--auth-ink);
  font-size: 2rem;
  line-height: 1.08;
}

.mateo-auth-subtitle {
  max-width: 28rem;
  margin: .75rem auto 0;
  color: var(--auth-steel);
  font-size: .94rem;
  line-height: 1.65;
}

.mateo-auth-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.mateo-auth-grid {
  display: grid;
  gap: 1rem;
}

.mateo-auth-label {
  display: block;
  margin-bottom: .45rem;
  color: var(--auth-ink);
  font-size: .84rem;
  font-weight: 800;
}

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

.mateo-auth-input-icon {
  position: absolute;
  top: 50%;
  left: .9rem;
  color: var(--auth-fire);
  font-size: .82rem;
  pointer-events: none;
  transform: translateY(-50%);
}

.mateo-auth-input {
  width: 100%;
  min-height: 3rem;
  border: 1px solid var(--auth-border);
  border-radius: 8px;
  background: #FFFFFF;
  color: var(--auth-ink);
  padding: .75rem 1rem .75rem 2.65rem;
  font-size: .95rem;
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.mateo-auth-input.has-toggle {
  padding-right: 3rem;
}

.mateo-auth-input::placeholder {
  color: #8A8178;
}

.mateo-auth-input:focus {
  outline: none;
  border-color: var(--auth-fire);
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(201, 106, 43, .14);
}

.mateo-auth-input:-webkit-autofill,
.mateo-auth-input:-webkit-autofill:hover,
.mateo-auth-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #FFFFFF inset !important;
  -webkit-text-fill-color: var(--auth-ink) !important;
  caret-color: var(--auth-fire) !important;
}

.mateo-auth-toggle {
  position: absolute;
  top: 50%;
  right: .45rem;
  display: inline-grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border-radius: 8px;
  color: var(--auth-steel);
  transform: translateY(-50%);
  transition: background-color .18s ease, color .18s ease;
}

.mateo-auth-toggle:hover,
.mateo-auth-toggle:focus-visible {
  background: #F5EFE6;
  color: var(--auth-fire-dark);
  outline: none;
}

.mateo-auth-help,
.mateo-auth-help ul {
  color: var(--auth-steel);
  font-size: .78rem;
  line-height: 1.55;
}

.mateo-auth-help ul {
  margin: .45rem 0 0;
  padding-left: 1rem;
}

.mateo-auth-help li + li {
  margin-top: .2rem;
}

.mateo-auth-error {
  margin-top: .45rem;
  border-left: 3px solid #9F3B32;
  background: #FFF3F1;
  padding: .65rem .75rem;
  color: #842F28;
  font-size: .8rem;
  font-weight: 800;
  line-height: 1.45;
}

.mateo-auth-error.form-error {
  margin-top: 0;
}

.mateo-auth-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.mateo-auth-link {
  color: var(--auth-fire-dark);
  font-weight: 900;
  text-decoration: underline;
  text-decoration-color: rgba(201, 106, 43, .34);
  text-underline-offset: .2rem;
}

.mateo-auth-link:hover {
  color: var(--auth-ink);
}

.mateo-auth-checkbox {
  width: 1rem;
  height: 1rem;
  accent-color: var(--auth-fire);
}

.mateo-auth-button {
  display: inline-flex;
  min-height: 3.1rem;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  border: 1px solid var(--auth-fire);
  border-radius: 8px;
  background: var(--auth-fire);
  color: #FFFFFF !important;
  padding: .75rem 1.25rem;
  font-size: .9rem;
  font-weight: 900;
  transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}

.mateo-auth-button:hover {
  border-color: var(--auth-fire-dark);
  background: var(--auth-fire-dark);
  transform: translateY(-1px);
}

.mateo-auth-button:disabled {
  cursor: wait;
  opacity: .68;
}

.mateo-auth-footer {
  margin-top: 1.35rem;
  border-top: 1px solid var(--auth-border);
  padding-top: 1.1rem;
  color: var(--auth-steel);
  text-align: center;
  font-size: .86rem;
  line-height: 1.6;
}

.mateo-auth-status-icon {
  display: grid;
  width: 4rem;
  height: 4rem;
  margin-inline: auto;
  place-items: center;
  border: 1px solid var(--auth-border);
  border-radius: 8px;
  background: #F5EFE6;
  color: var(--auth-fire-dark);
  font-size: 1.35rem;
}

@media (min-width: 640px) {
  .mateo-auth-main {
    padding: 2.5rem 1.5rem;
  }

  .mateo-auth-form-wrap {
    padding: 2rem;
  }

  .mateo-auth-grid.two-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .mateo-auth-layout {
    grid-template-columns: minmax(25rem, 42%) minmax(0, 1fr);
  }

  .mateo-auth-visual {
    min-height: inherit;
  }

  .mateo-auth-visual-content {
    padding: 3rem;
  }

  .mateo-auth-visual-copy {
    display: block;
    max-width: 29rem;
    margin-top: 16rem;
  }

  .mateo-auth-visual-title {
    font-size: 3.9rem;
    line-height: .98;
  }

  .mateo-auth-visual-text {
    max-width: 25rem;
    margin-top: 1.1rem;
    color: rgba(255, 255, 255, .78);
    font-size: 1rem;
    line-height: 1.75;
  }

  .mateo-auth-main {
    padding: 3rem 5rem;
  }
}

@media (max-width: 420px) {
  .mateo-auth-title {
    font-size: 1.75rem;
  }

  .mateo-auth-main {
    padding-inline: .75rem;
  }
}
