/* ── PB-04 · The login screen ──────────────────────────────────────────────
 *
 * THE FIRST RULE HERE IS A SECURITY ONE, not a visual one.
 *
 * `.sirewise-hidden-until-auth` is applied in the server-rendered markup, so
 * the application is hidden by the stylesheet the browser parses BEFORE it runs
 * any JavaScript. There is therefore no frame in which an unauthenticated
 * viewer sees the dashboard. Hiding it from a script after load would leave
 * exactly such a frame, and it would be visible on a slow connection -- which
 * is to say, on a farm.
 *
 * `display: none` rather than opacity or visibility, deliberately: those two
 * leave the element laid out and selectable, and its text copyable.
 */

.sirewise-hidden-until-auth { display: none !important; }
.auth-hidden               { display: none !important; }

/* ── The card ────────────────────────────────────────────────────────────── */
.auth-card-wrap {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  /* A field at dusk, in two greens, rather than the grey of a login box. The
     rest of the product is a working tool; this is the one screen that is
     allowed to look like something. */
  background:
    radial-gradient(1200px 600px at 20% -10%, #2f6b46 0%, rgba(47,107,70,0) 60%),
    radial-gradient(900px 500px at 110% 110%, #1c4430 0%, rgba(28,68,48,0) 55%),
    #14261c;
  overflow-y: auto;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: #fbfaf6;
  border-radius: 4px;
  padding: 40px 36px 32px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 2px 0 rgba(255, 255, 255, 0.5) inset;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  color: #23301f;
}

.auth-brand {
  margin: 0;
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.4px;
  color: #1c4430;
}

.auth-tagline {
  margin: 2px 0 26px;
  font-size: 14px;
  color: #5d6b58;
  font-style: italic;
}

.auth-card label {
  display: block;
  margin: 16px 0 5px;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #4a5a45;
}

.auth-input {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 13px;
  font-size: 16px;          /* 16px stops iOS zooming the page on focus */
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  border: 1px solid #c7cec2;
  border-radius: 3px;
  background: #fff;
  color: #23301f;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.auth-input:focus {
  outline: none;
  border-color: #2f6b46;
  box-shadow: 0 0 0 3px rgba(47, 107, 70, 0.18);
}

.auth-btn {
  width: 100%;
  margin-top: 22px;
  padding: 12px 16px;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: #2f6b46;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: background 120ms ease;
}

.auth-btn:hover:not(:disabled) { background: #275939; }
.auth-btn:disabled { background: #9aa89b; cursor: progress; }

.auth-link-btn {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 4px;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 13px;
  color: #4a5a45;
  background: none;
  border: none;
  text-decoration: underline;
  cursor: pointer;
}

.auth-link-btn:hover { color: #1c4430; }

/* ── Messages ────────────────────────────────────────────────────────────── */
/* Empty by default and takes no space, so the card does not jump when the
   first message appears. */
.auth-message {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 13.5px;
  line-height: 1.45;
}

.auth-message-info,
.auth-message-warn,
.auth-message-error {
  margin: 4px 0 8px;
  padding: 10px 12px;
  border-radius: 3px;
  border-left: 3px solid;
}

.auth-message-info  { background: #eef3ec; border-color: #2f6b46; color: #24402f; }
.auth-message-warn  { background: #fdf4e3; border-color: #b8860b; color: #5a4409; }
.auth-message-error { background: #fbeceb; border-color: #b3453d; color: #7a2019; }

.auth-setpw-intro {
  margin: 0 0 4px;
  font-size: 14px;
  color: #4a5a45;
}

.auth-footnote {
  margin: 26px 0 0;
  padding-top: 16px;
  border-top: 1px solid #e3e6dd;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 12.5px;
  line-height: 1.5;
  color: #6b7866;
}

/* ── Signed-in furniture ─────────────────────────────────────────────────── */
#sirewise-farm-name {
  font-weight: 600;
  color: #1c4430;
}

@media (max-width: 480px) {
  .auth-card { padding: 30px 22px 24px; }
  .auth-brand { font-size: 28px; }
}
