/* ============================================================
   auth.css - sign-in and set-password pages.
   Loaded AFTER Bootstrap 5.3.8 (public/bootstrap5). Bootstrap gives
   the grid (container-fluid/row/col), form-control, form-label,
   form-check, buttons, alerts and spinner; this file only sets the
   JAMFLO look: photo on the left, form on the right, same fonts,
   colours and 4px corners as the landing page.
   ============================================================ */
:root{
  color-scheme: light;
  --paper: #FFFFFF; --ground: #F5F5F4; --ink: #141416; --ink-2: #3B3D42; --mute: #63666C;
  --line: #E4E4E2; --line-2: #CFCFCC; --red: #C8102E; --red-dark: #A10D25; --char: #1B1C1F;
  --ok: #1F6B45; --bad: #A10D25;
  --head: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --text: "Inter", "Segoe UI", Arial, sans-serif;
  --r: 4px;

  /* Bootstrap variables, set to the JAMFLO theme */
  --bs-body-font-family: var(--text);
  --bs-body-line-height: 1.6;
  --bs-body-color: var(--ink);
  --bs-body-bg: var(--paper);
  --bs-border-color: var(--line-2);
  --bs-border-radius: var(--r);
  --bs-link-color: var(--ink-2);
  --bs-link-color-rgb: 59, 61, 66;
  --bs-link-hover-color: var(--ink);
  --bs-link-hover-color-rgb: 20, 20, 22;
  --bs-focus-ring-color: rgba(20, 20, 22, .35);
}
body{ background: var(--paper); color: var(--ink); font: 16px/1.6 var(--text); -webkit-font-smoothing: antialiased; }
img{ max-width: 100%; display: block; }
h1{ margin: 0; font: 700 2.2rem/1.1 var(--head); letter-spacing: -.015em; text-wrap: balance; color: var(--ink); }
p{ margin: 0; }
.photo{ filter: saturate(.82) contrast(1.06) sepia(.06); object-fit: cover; }
.fade-in{ animation: fadeIn .5s ease both; }
@keyframes fadeIn{ from{ opacity: 0; } to{ opacity: 1; } }
@media (prefers-reduced-motion: reduce){ *{ animation: none !important; transition: none !important; } }
:is(a, button, input):focus-visible{ outline: 2px solid var(--ink); outline-offset: 2px; }

/* Layout (owner pick "2"): the yard photo fills the screen, softly
   darkened, and the form is a white Bootstrap card on the right. */
.auth{ position: relative; display: flex; align-items: center; min-height: 100vh; min-height: 100dvh; padding-block: 3rem; background: var(--char); }
.auth .side{ position: absolute; inset: 0; background: var(--char); }
.auth .side img{ position: absolute; inset: 0; width: 100%; height: 100%; }
.auth .side::after{ content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, rgba(20, 20, 22, .78) 0%, rgba(20, 20, 22, .45) 55%, rgba(20, 20, 22, .3) 100%); }
.auth .side p{ position: absolute; z-index: 1; left: max(2.5rem, 5vw); bottom: 2.5rem; max-width: 34rem; color: #fff; font: 700 clamp(1.8rem, 3vw, 2.6rem)/1.1 var(--head); text-shadow: 0 1px 12px rgba(0, 0, 0, .35); }
.auth-wrap{ position: relative; z-index: 2; }
.form-side.card{ padding: 2.6rem 2.6rem 2.2rem; border: 0; border-radius: var(--r); background: var(--paper); box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.form-side > *{ width: 100%; }
.brand{ display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--ink); }
.brand img{ width: 40px; height: 40px; object-fit: contain; }
.brand b{ font: 800 18px/1 var(--head); letter-spacing: .04em; }
.form-side section{ margin-top: 2.5rem; }
.sub{ color: var(--mute); margin-top: .5rem; }
.sub b{ color: var(--ink); font-weight: 600; word-break: break-all; }
form{ display: grid; gap: 1.1rem; margin-top: 2rem; }

/* Bootstrap form controls, JAMFLO style */
.form-label{ margin-bottom: .4rem; font-size: .9rem; font-weight: 600; }
.input{ position: relative; }
.form-control{ height: 46px; padding: 0 .85rem; border-color: var(--line-2); border-radius: var(--r); background: #fff; color: var(--ink); font: 400 16px var(--text); }
.form-control.has-toggle{ padding-right: 4.2rem; }
.form-control:focus{ border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.form-control::placeholder{ color: #8A8D92; }
.pw-toggle{ --bs-btn-padding-x: .75rem; --bs-btn-padding-y: 0; --bs-btn-font-size: 13px; --bs-btn-font-weight: 600; --bs-btn-color: var(--ink-2); --bs-btn-hover-color: var(--ink); --bs-btn-hover-bg: var(--ground); --bs-btn-active-bg: var(--ground); --bs-btn-border-width: 0; --bs-btn-border-radius: 3px; position: absolute; right: 4px; top: 4px; bottom: 4px; }

.row-remember{ display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-size: .9rem; }
.form-check{ font-size: .9rem; }
.form-check-input{ width: 18px; height: 18px; margin-top: .15rem; border: 1px solid #76797F; border-radius: 3px; }
.form-check-input:checked{ background-color: var(--ink); border-color: var(--ink); }
.form-check-input:focus{ border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.link{ --bs-btn-padding-x: 0; --bs-btn-padding-y: 0; --bs-btn-font-size: inherit; --bs-btn-font-weight: 400; --bs-btn-border-width: 0; --bs-btn-focus-box-shadow: none; vertical-align: baseline; text-underline-offset: 3px; }
.alert.error{ --bs-alert-padding-x: .85rem; --bs-alert-padding-y: .6rem; --bs-alert-margin-bottom: 0; --bs-alert-border-radius: var(--r); font-size: .9rem; font-weight: 600; }
.alert.error:empty{ display: none; }

/* Main button: Bootstrap .btn with the JAMFLO red */
.btn-red{
  --bs-btn-color: #fff; --bs-btn-bg: var(--red); --bs-btn-border-color: var(--red);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--red-dark); --bs-btn-hover-border-color: var(--red-dark);
  --bs-btn-active-color: #fff; --bs-btn-active-bg: #8A0B20; --bs-btn-active-border-color: #8A0B20;
  --bs-btn-disabled-color: #fff; --bs-btn-disabled-bg: var(--red); --bs-btn-disabled-border-color: var(--red); --bs-btn-disabled-opacity: .65;
  --bs-btn-font-size: 15px; --bs-btn-font-weight: 600; --bs-btn-border-radius: var(--r);
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; height: 48px;
}
.btn-red:focus-visible{ outline: 2px solid var(--ink); outline-offset: 2px; box-shadow: none; }
.btn-login.loading .spinner-border{ display: inline-block !important; }

/* Live password checklist */
.rules{ margin: -.3rem 0 0; display: grid; gap: .2rem; font-size: .85rem; color: var(--mute); }
.rules li{ display: flex; align-items: center; gap: .5rem; }
.rules .tick{ width: 14px; height: 14px; border: 1px solid var(--line-2); border-radius: 2px; display: inline-grid; place-items: center; }
.rules li.ok{ color: var(--ok); }
.rules li.ok .tick{ background: var(--ok); border-color: var(--ok); }
.rules li.ok .tick::before{ content: "\2713"; color: #fff; font-size: 10px; line-height: 1; }

.switch, .help{ margin-top: 1.5rem; color: var(--mute); font-size: .9rem; }
.countdown{ margin-top: 1rem; color: var(--mute); font-size: .9rem; }
.check-badge{ width: 48px; height: 48px; margin: 0 auto 1rem; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #fff; font-size: 1.4rem; }
.back-to-site{ display: inline-block; width: auto; margin-top: 2.5rem; color: var(--ink-2); font-size: .9rem; text-decoration: none; }
.back-to-site:hover{ color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 991.98px){
  .auth{ display: block; padding: 0; background: var(--paper); }
  .auth .side{ position: relative; height: 220px; }
  .auth .side p{ left: 20px; right: 20px; bottom: 1.2rem; font-size: 1.5rem; }
  .auth-wrap{ max-width: none; padding: 0; }
  .form-side.card{ padding: 2rem max(20px, env(safe-area-inset-left, 0px)) 3rem; border-radius: 0; box-shadow: none; }
  .form-side section{ margin-top: 1.8rem; }
  h1{ font-size: 1.9rem; }
}
