/* BrazHunt login page. Loaded after tokens.css and base.css only: components.css is behind the login wall.
   One solid card on the near-black page, one accent action. Motion is covered by base.css (prefers-reduced-motion). */

.login {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: var(--space-5);
}

.login__card {
  width: min(420px, 100%);
  padding: var(--space-6);
  border: 1px solid var(--glass-stroke);
  border-radius: var(--r-sheet);
  background: var(--surface-1);
  box-shadow: inset 0 1px 0 var(--glass-edge), 0 30px 60px -42px var(--shade);
}

.login__head {
  display: grid;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.login__mark {
  width: 32px;
  height: 32px;
  margin-bottom: var(--space-2);
}

.login__title {
  font-family: var(--font-display);
  font-size: var(--fs-21);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.login__lede {
  color: var(--nevoa);
}

.login__form {
  display: grid;
  gap: var(--space-4);
}

/* ---- Fields ---- */
.field {
  display: grid;
  gap: var(--space-2);
}

.field__label {
  color: var(--nevoa);
  font-size: var(--fs-13);
  font-weight: 600;
}

.field__control {
  position: relative;
}

/* 17px keeps iOS from zooming the page on focus; the surface is one step above the card, plus a stroke. */
.field__input {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 10px var(--space-4);
  border: 1px solid var(--glass-edge);
  border-radius: var(--r-tile);
  background: var(--surface-2);
  color: var(--areia);
  font: inherit;
  font-size: var(--fs-17);
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}

.field__input:hover {
  background: var(--surface-3);
}

.field__input--with-toggle {
  padding-right: 6.5rem;
}

.field__input[aria-invalid='true'] {
  border-color: var(--sev-alert);
}

.field__toggle {
  position: absolute;
  inset: 1px 1px 1px auto;
  min-width: 44px;
  padding: 0 var(--space-4);
  border: 0;
  border-radius: calc(var(--r-tile) - 1px);
  background: transparent;
  color: var(--nevoa);
  font-size: var(--fs-13);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s var(--ease);
}

.field__toggle:hover {
  background: var(--surface-3);
  color: var(--areia);
}

/* The ring stays inside the input, so it is never clipped or confused with the field's own focus ring. */
.field__toggle:focus-visible {
  outline-offset: -3px;
  border-radius: calc(var(--r-tile) - 1px);
}

.field__input:focus-visible {
  border-radius: var(--r-tile);
}

/* ---- Error: tint, line and a text mark, never colour alone ---- */
.login__error {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--sev-alert-line);
  border-radius: var(--r-tile);
  background: var(--sev-alert-tint);
  color: var(--areia);
  font-weight: 500;
}

.login__error[hidden] {
  display: none;
}

.login__error::before {
  content: '!';
  content: '!' / '';
  display: grid;
  place-items: center;
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border-radius: var(--r-pill);
  background: var(--sev-alert);
  color: var(--sev-alert-ink);
  font-size: var(--fs-13);
  font-weight: 700;
  line-height: 1;
}

.login__error--static {
  margin-top: var(--space-4);
}

/* ---- Primary action ---- */
.login__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  min-height: 48px;
  padding: 9px var(--space-4);
  border: 1px solid var(--verde);
  border-radius: var(--r-pill);
  background: var(--verde);
  color: var(--verde-ink);
  font-size: var(--fs-17);
  font-weight: 650;
  cursor: pointer;
  transition: filter 0.18s var(--ease);
}

.login__submit:hover {
  filter: brightness(1.08);
}

.login__submit:disabled {
  opacity: 0.72;
  cursor: progress;
  filter: none;
}

/* ---- Footer hint ---- */
.login__hint {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--hairline);
  color: var(--bruma);
  font-size: var(--fs-13);
}

@media (max-width: 480px) {
  .login {
    align-items: start;
    padding: var(--space-4);
    padding-top: var(--space-6);
  }

  .login__card {
    padding: var(--space-5);
  }
}
