
body {
  background-color: var(--background-body);
  color: var(--color-primary);
  font-family: 'Noto Sans', sans-serif;
  font-size: 1.125rem;
}

.vertical-center {
  align-items: center;
  display: flex;
  min-height: 80%;
}

@supports (height: 80vh) {
  .vertical-center {
  min-height: 80vh; /* Override with 80vh if supported */
  }
}

.auth-container {
  align-items: center;
  display: flex;
  height: 80%;
  justify-content: center;
  width: 100%;
}

.auth-card {
  background: var(--background-medium-light);
  border-radius: var(--radius-md);
  border: solid 1px var(--border-medium-dark);
  max-width: 28rem;
  padding: 2rem;
  width: 100%;
}

/* The visual title is the wordmark (::before below); the site handle stays
   in the DOM as the accessible name, wrapped in .visually-hidden. */
.auth-title {
  align-items: center;
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

/* Brand — Mizan mark rendered as a mask painted in the brand anchor ink
   (exact #8A181A burgundy on light themes, luminous burgundy on dark themes)
   so it stays crisp and legible on every theme. Fallback only: when the firm
   has an uploaded logo, auth-brand.html adds has-logo and the image replaces
   this mark. */
.auth-title:not(.has-logo)::before {
  background: var(--mizan-logo-ink, oklch(41.23% 0.1488 26.07));
  content: "";
  display: inline-block;
  height: 5rem;
  mask: url("../../images/brand/mizan-logo.png?v=1") center / contain no-repeat;
  -webkit-mask: url("../../images/brand/mizan-logo.png?v=1") center / contain no-repeat;
  width: 7.5rem;
}

:is([data-theme="mizan-dark"], [data-theme="dark"], [data-theme="cosmic"], [data-theme="kosmic"]) .auth-title:not(.has-logo)::before {
  background: var(--mizan-logo-ink-dark, oklch(69% 0.135 21));
}

/* A one-colour logo is painted in the text colour, so it matches the
   words beneath it in every theme (components/firm-logo.html). */
.auth-title {
  --firm-logo-ink: var(--color-primary);
}

/* The firm's uploaded logo (any aspect ratio), held to the wordmark's
   visual scale. */
.auth-logo {
  max-height: 3.75rem;
  max-width: 100%;
}

/* Standard screen-reader-only clip pattern. */
.visually-hidden {
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.auth-subtitle {
  font-size: 1em;
  margin-bottom: 2rem;
  text-align: center;
}

.auth-info {
  color: var(--color-primary);
  /* font-size: 1rem; */
  margin: 2rem 0;
  text-align: center;
}

.auth-error {
  background: var(--error-background);
  border: 1px solid var(--error-border);
  border-radius: var(--radius-sm);
  color: var(--error);
  font-size: 0.9em;
  margin-bottom: 0.75rem;
  padding: 0.75rem;
  text-align: center;
}

.prompt {
  margin-bottom: 2rem;
}

.reset-confirm p {
  margin-bottom: 1.25rem;
}

.account-form p {
  margin: 2rem 0 0;
  padding: 0;
}

.account-form label {
  display: block;
  font-weight: normal;
}

.account-form input {
  background: var(--input-background);
  border: solid 1px var(--input-border);
  border-radius: var(--radius-sm);
  color: var(--color-primary);
  display: block;
  font-size: inherit;
  margin-top: 0.25rem;
  padding: 0.5rem;
  width: 100%;
}

.account-form input::placeholder {
  color: var(--input-placeholder);
}

.account-form ul {
  padding-left: 0.25rem;
}

.account-form ul li {
  color: var(--urgent);
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

.account-form button:not(.btn) {
  background: var(--link);
  border: solid 1px var(--link);
  border-radius: var(--radius-sm);
  color: var(--background-subnav);
  font-size: 1em;
  margin-top: 2.5rem;
  padding: 0.5rem 0.75rem;
}

input {
  filter: none;
}

input:focus {
  outline: none;
}

.login-bottom {
  align-items: flex-end;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.login-bottom-right {
  display: flex;
  flex-direction: column;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.reset-confirm {
  margin-top: 2rem;
}

.reset-complete {
  text-align: center;
}

.spam-folder {
  color: var(--urgent);
  font-weight: 600;
}

.auth-buttons {
  align-items: center;
  display: flex;
  flex-direction: row;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
}

.auth-buttons.justify-between {
  justify-content: space-between;
}

/* The eye button that shows the password. The field keeps the form's
   input styling; the button sits inside its right edge. */
.password-field {
  display: block;
  position: relative;
}

.password-field input {
  padding-right: 2.75rem;
}

/* Outranks .account-form button:not(.btn) above, which would otherwise
   give this the submit button's fill and top margin. */
.account-form .password-field button.password-toggle {
  background: none;
  border: none;
  color: var(--color-muted);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  margin: 0;
  padding: 0.5rem;
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
}

.account-form .password-field button.password-toggle:hover,
.account-form .password-field button.password-toggle:focus-visible {
  color: var(--link);
}
