/* static/css/auth_v2.css
 *
 * Sign-in surfaces: login, forgot password, password reset, 401, and the page
 * users land on after logging out (logout redirects to auth.login with a
 * flash, so this is the "logged out" screen too).
 *
 * This is the only page most staff see before they are anyone in particular —
 * no role, no base, no session — so it carries the brand more directly than the
 * internal tool does. Deliberately single-theme: it has to sit under the
 * light-ground logo asset, and there is no user theme preference to read yet.
 *
 * Palette matches the rest of the restyle — #004542 and #A07D32 from the Dream
 * Yacht logo, #E8E5DB as the foam neutral.
 */

:root {
  --auth-ink:    #004542;
  --auth-ink-2:  #52706D;
  --auth-ink-3:  #8AA09D;
  --auth-gold:   #A07D32;
  --auth-paper:  #FFFFFF;
  --auth-foam:   #E8E5DB;
  --auth-line:   #E4EBE9;
  --auth-line-2: #CFDAD8;
  --auth-crit:   #B42318;  --auth-crit-bg: #FEF3F2;
  --auth-ok:     #088391;  --auth-ok-bg:   #EFF8F9;
}

/* ── Ground ─────────────────────────────────────────────────────────────── */
body.bg-light {
  /* Overrides the flat #f8f9fa in base_login's inline <style>. A very low
     contrast wash — horizon rather than decoration. */
  background-color: var(--auth-foam) !important;
  background-image:
    radial-gradient(90rem 40rem at 50% -20%, rgba(0, 69, 66, .10), transparent 60%),
    linear-gradient(180deg, #F4F6F4 0%, var(--auth-foam) 100%) !important;
  background-attachment: fixed;
  min-height: 100vh;
  color: var(--auth-ink);
}

/* ── Logo bar ───────────────────────────────────────────────────────────── */
body.bg-light .navbar.bg-light {
  background: transparent !important;
  border: 0;
}
body.bg-light .navbar .nav-link {
  color: var(--auth-ink-2);
  font-weight: 600;
  font-size: .8125rem;
}
body.bg-light .navbar .nav-link:hover { color: var(--auth-ink); }

/* ── Card ───────────────────────────────────────────────────────────────── */
.auth-card {
  background: var(--auth-paper);
  border: 1px solid var(--auth-line);
  border-radius: 14px;
  padding: 1.75rem 1.625rem 1.5rem;
  box-shadow:
    0 1px 2px rgba(0, 69, 66, .04),
    0 8px 24px rgba(0, 69, 66, .08);
  /* A single gold hairline is the only brand flourish on the page. */
  border-top: 2px solid var(--auth-gold);
}
.auth-shell {
  width: 100%;
  max-width: 25rem;
  margin: 0 auto;
}
.auth-card h1,
.auth-card h2 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--auth-ink);
  text-wrap: balance;
  margin: 0;
}
.auth-lede {
  color: var(--auth-ink-2);
  font-size: .8125rem;
  margin: .375rem 0 0;
}
.auth-sep {
  border: 0;
  border-top: 1px solid var(--auth-line);
  margin: 1.125rem 0 1rem;
}

/* ── Fields ─────────────────────────────────────────────────────────────── */
.auth-card .form-label {
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--auth-ink-3);
  margin-bottom: .3125rem;
}
.auth-card .form-control {
  border: 1px solid var(--auth-line-2);
  border-radius: 8px;
  padding: .5625rem .75rem;
  font-size: .9375rem;
  color: var(--auth-ink);
  /* 44px: this is the one control everyone uses on a tablet at the dock. */
  min-height: 44px;
}
.auth-card .form-control::placeholder { color: var(--auth-ink-3); }
.auth-card .form-control:focus {
  border-color: var(--auth-gold);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--auth-gold) 20%, transparent);
}

/* ── Actions ────────────────────────────────────────────────────────────── */
.auth-card .btn-primary {
  --bs-btn-bg: var(--auth-ink);
  --bs-btn-border-color: var(--auth-ink);
  --bs-btn-hover-bg: #013C39;
  --bs-btn-hover-border-color: #013C39;
  --bs-btn-active-bg: #013C39;
  --bs-btn-active-border-color: #013C39;
  font-weight: 600;
  letter-spacing: .01em;
  border-radius: 8px;
  min-height: 44px;
}
.auth-card .btn-outline-secondary {
  --bs-btn-color: var(--auth-ink-2);
  --bs-btn-border-color: var(--auth-line-2);
  --bs-btn-hover-bg: #F7FAF9;
  --bs-btn-hover-border-color: var(--auth-ink-3);
  --bs-btn-hover-color: var(--auth-ink);
  border-radius: 8px;
}
.auth-card .btn-link {
  color: var(--auth-ink-2);
  font-size: .8125rem;
  font-weight: 600;
  text-decoration: none;
}
.auth-card .btn-link:hover { color: var(--auth-ink); text-decoration: underline; }
.auth-card .btn:focus-visible,
.auth-card .form-control:focus-visible {
  outline: 2px solid var(--auth-gold);
  outline-offset: 2px;
}
.auth-alt {
  border-top: 1px solid var(--auth-line);
  margin-top: 1.125rem;
  padding-top: 1rem;
  text-align: center;
}
.auth-alt .small { color: var(--auth-ink-3); font-size: .75rem; }

.auth-foot {
  text-align: center;
  color: var(--auth-ink-3);
  font-size: .6875rem;
  letter-spacing: .04em;
  margin-top: 1.25rem;
}

/* ── Flash toasts ───────────────────────────────────────────────────────── */
#flash-toasts .toast {
  border: 1px solid var(--auth-line);
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 69, 66, .12);
}
#flash-toasts .toast.text-bg-success {
  background: var(--auth-ok-bg) !important;
  color: var(--auth-ok) !important;
  border-color: color-mix(in srgb, var(--auth-ok) 26%, transparent);
}
#flash-toasts .toast.text-bg-danger {
  background: var(--auth-crit-bg) !important;
  color: var(--auth-crit) !important;
  border-color: color-mix(in srgb, var(--auth-crit) 26%, transparent);
}

@media (max-width: 575.98px) {
  .auth-card { padding: 1.375rem 1.125rem 1.25rem; border-radius: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  body.bg-light { background-attachment: scroll; }
}
