/* ==========================================================================
   MONROVIA LABS — CMS SIGN-IN
   Built on the public site's design system (main.css) so the console feels
   like part of the same product rather than a bolted-on Django screen.
   ========================================================================== */

.ml-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(1.5rem, 5vw, 3rem);
}

.ml-login__wrap { width: 100%; max-width: 440px; }

.ml-login__card {
  position: relative;
  display: grid;
  gap: 1.5rem;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  background: color-mix(in srgb, var(--ink-2) 88%, transparent);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-lg);
  isolation: isolate;
}

/* Same top inner highlight the site's cards use. */
.ml-login__card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(160deg, var(--highlight), transparent 45%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.ml-login__brand { display: grid; justify-items: start; gap: 0.15rem; }
.ml-login__brand .logo { font-size: 1.125rem; }
.ml-login__brand p { margin-top: 0.35rem; }

.ml-login__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

/* Django injects its own error markup on some paths — keep it on-brand. */
.ml-login .errornote,
.ml-login .errorlist {
  list-style: none;
  padding: 0.75rem 1rem;
  border-radius: var(--r-sm);
  border: 1px solid color-mix(in srgb, var(--rose) 35%, transparent);
  background: color-mix(in srgb, var(--rose) 10%, transparent);
  color: var(--rose);
  font-size: 0.875rem;
}

/* -- Shared auth-page furniture ------------------------------------------- */

.ml-login__theme {
  position: fixed;
  top: max(1rem, env(safe-area-inset-top, 0px));
  right: 1rem;
  z-index: 10;
}

.ml-login__brand .logo { font-size: 1.0625rem; }
.ml-login__brand .logo__mark { width: 34px; height: 34px; border-radius: 9px; box-shadow: 0 0 0 1px var(--line); }

/* Password field with a reveal toggle sitting inside the input. */
.ml-login__password { position: relative; }
.ml-login__password .input { padding-right: 2.85rem; }

.ml-login__reveal {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  translate: 0 -50%;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--r-xs);
  color: var(--text-3);
  transition: color 0.25s var(--ease), background-color 0.25s var(--ease);
}
.ml-login__reveal:hover { color: var(--text); background: var(--surface-2); }
.ml-login__reveal .icon { width: 17px; height: 17px; }
.ml-login__reveal[aria-pressed="true"] { color: var(--brand-text); }

.ml-login .form-note { line-height: 1.5; }
.ml-login .form-note ul { padding-left: 1rem; list-style: disc; margin-top: 0.35rem; }

@media (max-width: 480px) {
  .ml-login__wrap { max-width: none; }
  .ml-login__foot { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
}
