/* ==========================================================================
   Login gate — styles
   Load AFTER css/style.css (reuses --navy-*, --card, --line-strong, --muted,
   --red-soft, --paper, --font-display tokens where available; falls back to
   plain hex values so this still looks right even if a token is missing).
   ========================================================================== */

body.auth-locked .app-shell { display: none !important; }

#authOverlay {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, var(--navy-900, #1E3C72) 0%, var(--navy-800, #274B8A) 100%);
  padding: 20px;
}
body:not(.auth-locked) #authOverlay { display: none; }

.auth-card {
  width: 100%; max-width: 380px;
  background: var(--card, #fff);
  border-radius: 16px;
  padding: 36px 32px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.auth-brand-mark {
  width: 42px; height: 42px; border-radius: 11px;
  background: var(--navy-800, #274B8A); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-family: var(--font-display, inherit);
}
.auth-brand-name { font-weight: 800; font-size: 16px; color: var(--navy-900, #1E3C72); }
.auth-brand-sub { font-size: 12px; color: var(--muted, #888); margin-top: 2px; }

.auth-title { font-size: 18px; font-weight: 700; margin-bottom: 18px; color: var(--navy-900, #1E3C72); }

.auth-field { margin-bottom: 14px; }
.auth-field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted, #888); margin-bottom: 6px; }
.auth-field input {
  width: 100%; padding: 11px 13px; border-radius: 9px;
  border: 1px solid var(--line-strong, #ccc); font-size: 14px;
  background: var(--paper, #f7f8fa); box-sizing: border-box;
}
.auth-field input:focus { outline: none; border-color: var(--navy-800, #274B8A); }

.auth-error {
  display: none; background: var(--red-soft, #fdeaea); color: #c0392b;
  font-size: 12.5px; padding: 9px 12px; border-radius: 8px; margin-bottom: 14px;
}

.auth-submit {
  width: 100%; padding: 12px; border-radius: 9px; border: 0;
  background: var(--navy-800, #274B8A); color: #fff;
  font-weight: 700; font-size: 14px; cursor: pointer;
  transition: opacity .12s ease;
}
.auth-submit:disabled { opacity: .65; cursor: default; }

.logout-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 9px 12px; margin-top: 10px;
  border-radius: 9px; border: 1px solid var(--line-strong, #ccc);
  background: transparent; color: var(--muted, #888);
  font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.logout-btn:hover { background: var(--red-soft, #fdeaea); color: #c0392b; border-color: transparent; }