/* ─── page scaffold ─────────────────────────────────────────────── */
html, body {
  margin: 0;
  height: auto;          /* avoid % height relying on parent */
  min-height: 100vh;     /* always at least the viewport */
  font-family: "Inter", system-ui, sans-serif;
  background: #fafafa;
}

/* full-screen flexbox → centers the card regardless of master.css */
#site-content {
  display: flex !important;            /* defeat accidental overrides */
  align-items: center !important;
  justify-content: center !important;
  min-height: 100vh;                   /* center vertically */
  height: auto;                        /* don’t force 100% */
}

/* ─── login card ────────────────────────────────────────────────── */
#login-container {
  /* fluid width: 100 % on phones → caps at 380 px on desktop  */
  width: min(90vw, 380px);
  padding: 2.5rem 2rem;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 0.4rem 1rem rgba(0, 0, 0, 0.08);

  display: flex;
  flex-direction: column;
  gap: 1.8rem;
  box-sizing: border-box;
}

#login-container img {
  width: clamp(120px, 40%, 160px);
  height: auto;
  align-self: center;
}

/* ─── form layout ──────────────────────────────────────────────── */
form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.form-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

/* label takes 35 % of the row (never < 6 rem) until very narrow */
.form-row label {
  flex: 0 0 35%;
  min-width: 6rem;
  text-align: right;
  font-size: 0.95rem;
  font-weight: 500;
  color: #444;
}

/* input fills the rest */
.form-row input[type="text"],
.form-row input[type="password"] {
  flex: 1 1 0;
  padding: 0.55rem 0.75rem;
  font-size: 0.95rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
}

/* centre the button and reuse your master-colour */
.button-row {
  justify-content: center;
}
.button-row button {
  padding: 0.55rem 1.8rem;
  font-size: 1rem;
  background: #ff9054;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.button-row button:hover {
  background: #e07b37;
}

.button-row .link-button {
  display: inline-block;
  padding: 0.55rem 1.8rem;
  font-size: 1rem;
  background: #ff9054;
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.15s ease;
}
.button-row .link-button:hover {
  background: #e07b37;
}

/* non-field error list */
ul.errorlist.nonfield li {
  color: #d33;
  font-size: 0.95rem;
  text-align: center;
}

/* ─── narrow-screen tweaks (≤ 480 px) ───────────────────────────── */
@media (max-width: 480px) {
  /* stack label & input vertically */
  .form-row {
    flex-direction: column;
    align-items: stretch;
  }
  .form-row label {
    text-align: left;
    min-width: 0;
  }
}
