/* ===========================================================================
   NMOS auth pages (unslop direction, 2026-11-11)
   login, register, forgot-password, reset-password, check-email, verify-email,
   accept-share (and admin-login, which shares the markup).
   Loaded after auth.css and nmos-glass.css and overrides their auth sections:
   no glass card, no blur, no accent hairline, no glow button, no radial body
   background, no Manrope / serif headings, no uppercase mono labels.
   Same tokens and rules as the public foundation (nmos-glass-site.css).

   auth.css and nmos-glass.css mark many auth declarations !important, so the
   matching declarations here carry it too. Nothing else does.

   Scope: body.sentinel-body.auth-body:not(.dashboard-body)

   Contents
    1 Tokens        4 Fields            7 Messages and status
    2 Page          5 Buttons           8 Toast, loading, cookies
    3 Card, brand   6 Links and footer  9 Motion
   =========================================================================== */

/* ---------- 1. Tokens (identical to the public foundation) --------------- */
body.sentinel-body.auth-body:not(.dashboard-body) {
  color-scheme: dark;

  /* ink ramp */
  --surface-dim: #07080d;
  --surface-inset: #07080d;
  --surface: #0b0d14;
  --surface-bright: #11141c;
  --surface-container-lowest: #11141c;
  --surface-container-low: #151923;
  --surface-container: #1a1e28;
  --surface-container-high: #222734;
  --surface-container-highest: #2a3040;
  --surface-variant: #1a1e28;
  --surface-glass: rgba(11, 13, 20, 0.84);
  --inverse-surface: #eef0f5;
  --inverse-on-surface: #0b0d14;

  /* text roles and hairlines */
  --on-surface: #eef0f5;
  --on-surface-variant: #a3a9b8;
  --outline: #7a8296;
  --outline-variant: rgba(238, 240, 245, 0.14);
  --border-subtle: rgba(238, 240, 245, 0.08);
  --border-strong: rgba(238, 240, 245, 0.14);
  --navy-deep: #eef0f5;
  --secondary: #a3a9b8;

  /* accent */
  --primary: #38BDF8;
  --primary-action: #38BDF8;
  --primary-hover: #7DD3FC;
  --on-primary: #04121C;
  --primary-container: #1a1e28;
  --on-primary-container: #eef0f5;

  /* status: meaning only */
  --ok: #4cc38a;
  --warn: #d9a23b;
  --risk: #e5484d;
  --error: #e5484d;
  --data-accent-orange: #d9a23b;

  /* shape */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* depth: none on surfaces, one neutral shadow for popovers */
  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: none;
  --shadow-pop: 0 12px 32px rgba(0, 0, 0, 0.45);

  /* motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 150ms;
  --t-base: 180ms;
  --t-enter: 400ms;

  /* type */
  --font-display: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-label: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* layout */
  --gutter: 24px;
}

@media (max-width: 767px) {
  body.sentinel-body.auth-body:not(.dashboard-body) { --gutter: 20px; }
}

/* ---------- 2. Page ------------------------------------------------------ */
body.sentinel-body.auth-body:not(.dashboard-body) {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 48px var(--gutter);
  background: var(--surface);
  color: var(--on-surface);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 24px;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}
body.sentinel-body.auth-body:not(.dashboard-body) ::selection { background: var(--surface-container-highest); color: var(--on-surface); }
body.sentinel-body.auth-body:not(.dashboard-body) :focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
body.sentinel-body.auth-body:not(.dashboard-body) [hidden] { display: none !important; }
body.sentinel-body.auth-body:not(.dashboard-body) .auth-container { width: 100%; max-width: 28rem; margin: 0 auto; }

body.sentinel-body.auth-body:not(.dashboard-body) :is(.lucide-icon, i[data-lucide], svg.lucide) { stroke-width: 1.5; }

/* ---------- 3. Card and brand -------------------------------------------- */
body.sentinel-body.auth-body:not(.dashboard-body) .auth-card {
  overflow: hidden;
  background: var(--surface-container-lowest);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
body.sentinel-body.auth-body:not(.dashboard-body) .auth-card-accent { display: none; }
body.sentinel-body.auth-body:not(.dashboard-body) .auth-card-body { padding: 32px; }

body.sentinel-body.auth-body:not(.dashboard-body) .auth-brand { margin: 0 0 32px; text-align: left; }
body.sentinel-body.auth-body:not(.dashboard-body) .auth-logo { display: inline-block; }
body.sentinel-body.auth-body:not(.dashboard-body) .auth-logo .auth-logo-text {
  display: block;
  background: none !important;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  letter-spacing: 0;
  color: var(--on-surface) !important;
  -webkit-text-fill-color: currentColor !important;
}
body.sentinel-body.auth-body:not(.dashboard-body) :is(.auth-title, .auth-brand h1) {
  margin: 24px 0 8px;
  background: none !important;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  line-height: 32px;
  letter-spacing: 0;
  color: var(--on-surface) !important;
  -webkit-text-fill-color: currentColor !important;
}
body.sentinel-body.auth-body:not(.dashboard-body) .auth-lead {
  margin: 0;
  font-size: 15px;
  line-height: 24px;
  color: var(--on-surface-variant) !important;
}

/* ---------- 4. Fields ---------------------------------------------------- */
body.sentinel-body.auth-body:not(.dashboard-body) .auth-form { padding: 0; }
body.sentinel-body.auth-body:not(.dashboard-body) .auth-form > p:not([class]) { margin: 0 0 16px; font-size: 15px; line-height: 24px; color: var(--on-surface-variant); }
body.sentinel-body.auth-body:not(.dashboard-body) .auth-form .form-group { margin-bottom: 20px; }
body.sentinel-body.auth-body:not(.dashboard-body) .auth-form .form-label {
  margin: 0 0 8px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--on-surface) !important;
}
body.sentinel-body.auth-body:not(.dashboard-body) .auth-label-row { gap: 12px; margin-bottom: 8px; }
body.sentinel-body.auth-body:not(.dashboard-body) .auth-label-row .form-label { margin-bottom: 0; }

body.sentinel-body.auth-body:not(.dashboard-body) .auth-form :is(input:not([type="checkbox"], [type="radio"], [type="hidden"]), select, .form-input) {
  min-height: 44px;
  padding: 8px 12px;
  background: var(--surface-container) !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: none !important;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 24px;
  color: var(--on-surface) !important;
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
body.sentinel-body.auth-body:not(.dashboard-body) .auth-form .auth-input-wrap :is(input, .form-input) { padding-left: 40px; }
body.sentinel-body.auth-body:not(.dashboard-body) .auth-form .auth-input-wrap.has-toggle :is(input, .form-input) { padding-right: 44px; }
body.sentinel-body.auth-body:not(.dashboard-body) .auth-form :is(input:not([type="checkbox"], [type="radio"], [type="hidden"]), select, .form-input):hover {
  background: var(--surface-container-high) !important;
  border-color: var(--border-strong) !important;
}
body.sentinel-body.auth-body:not(.dashboard-body) .auth-form :is(input:not([type="checkbox"], [type="radio"], [type="hidden"]), select, .form-input):focus {
  background: var(--surface-container) !important;
  border-color: var(--primary) !important;
  box-shadow: none !important;
  outline: 1px solid var(--primary);
  outline-offset: 0;
  color: var(--on-surface) !important;
}
body.sentinel-body.auth-body:not(.dashboard-body) .auth-form :is(input, .form-input)::placeholder { color: var(--outline) !important; opacity: 1; }
body.sentinel-body.auth-body:not(.dashboard-body) .auth-form input:is(:-webkit-autofill, :-webkit-autofill:hover, :-webkit-autofill:focus) {
  -webkit-text-fill-color: var(--on-surface) !important;
  box-shadow: 0 0 0 1000px var(--surface-container) inset !important;
  caret-color: var(--on-surface);
}
body.sentinel-body.auth-body:not(.dashboard-body) .auth-form .form-input[aria-invalid="true"],
body.sentinel-body.auth-body:not(.dashboard-body) .form-group.error .form-input {
  border-color: var(--risk) !important;
  box-shadow: none !important;
}

body.sentinel-body.auth-body:not(.dashboard-body) .auth-input-wrap .auth-field-icon { left: 12px; color: var(--outline) !important; }
body.sentinel-body.auth-body:not(.dashboard-body) .auth-input-wrap .auth-toggle-password {
  right: 4px;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  color: var(--outline) !important;
  transition: color var(--t-fast) var(--ease);
}
body.sentinel-body.auth-body:not(.dashboard-body) .auth-input-wrap .auth-toggle-password:hover { color: var(--on-surface) !important; }

body.sentinel-body.auth-body:not(.dashboard-body) .auth-form :is(.form-group small, .password-strength-text, .form-help) {
  margin-top: 8px;
  font-size: 13px;
  line-height: 20px;
  color: var(--on-surface-variant) !important;
}
body.sentinel-body.auth-body:not(.dashboard-body) .auth-form .register-notice { margin: 0 0 16px; font-size: 14px; line-height: 20px; color: var(--on-surface-variant) !important; }
body.sentinel-body.auth-body:not(.dashboard-body) .auth-form .checkbox-group { margin-bottom: 12px; }
body.sentinel-body.auth-body:not(.dashboard-body) .auth-form .checkbox-label { gap: 12px; font-size: 14px; line-height: 20px; color: var(--on-surface-variant) !important; }
body.sentinel-body.auth-body:not(.dashboard-body) .auth-form .checkbox-label:hover { color: var(--on-surface) !important; }
body.sentinel-body.auth-body:not(.dashboard-body) .auth-form .checkbox-label input[type="checkbox"] { margin: 2px 0 0 !important; accent-color: var(--primary) !important; }

body.sentinel-body.auth-body:not(.dashboard-body) .password-strength-bar { height: 4px; margin: 8px 0 4px; background: var(--surface-container); border-radius: 2px; }
body.sentinel-body.auth-body:not(.dashboard-body) .password-strength-fill { transition: background-color var(--t-fast) var(--ease); }
body.sentinel-body.auth-body:not(.dashboard-body) .password-strength-fill.weak { background: var(--risk); }
body.sentinel-body.auth-body:not(.dashboard-body) .password-strength-fill.fair { background: var(--warn); }
body.sentinel-body.auth-body:not(.dashboard-body) .password-strength-fill:is(.good, .strong) { background: var(--ok); }

/* ---------- 5. Buttons ---------------------------------------------------
   .btn-primary = accent fill; any other .btn in the form = secondary.        */
body.sentinel-body.auth-body:not(.dashboard-body) .auth-form .btn {
  min-height: 44px;
  margin-top: 0;
  padding: 8px 20px;
  background: var(--surface-container) !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: none !important;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: none;
  color: var(--on-surface) !important;
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
body.sentinel-body.auth-body:not(.dashboard-body) .auth-form .btn:hover { background: var(--surface-container-high) !important; border-color: var(--border-strong) !important; box-shadow: none !important; }
body.sentinel-body.auth-body:not(.dashboard-body) .auth-form .btn.btn-primary {
  background: var(--primary) !important;
  border-color: transparent !important;
  color: var(--on-primary) !important;
}
body.sentinel-body.auth-body:not(.dashboard-body) .auth-form .btn.btn-primary:hover:not(:disabled) { background: var(--primary-hover) !important; border-color: transparent !important; }
body.sentinel-body.auth-body:not(.dashboard-body) .auth-form .btn:active:not(:disabled) { transform: scale(0.98) !important; }
body.sentinel-body.auth-body:not(.dashboard-body) .auth-form .btn:disabled,
body.sentinel-body.auth-body:not(.dashboard-body) .auth-form[aria-busy="true"] .btn.btn-primary { opacity: 0.5; cursor: not-allowed; }
body.sentinel-body.auth-body:not(.dashboard-body) .auth-form .btn + .btn,
body.sentinel-body.auth-body:not(.dashboard-body) .auth-form .btn + .form-help + .btn { margin-top: 12px !important; }
body.sentinel-body.auth-body:not(.dashboard-body) .auth-form .btn-full { width: 100%; }
body.sentinel-body.auth-body:not(.dashboard-body) .auth-form :is(.checkbox-group, .form-help, .register-notice) + .btn { margin-top: 20px; }
body.sentinel-body.auth-body:not(.dashboard-body) .auth-form > .auth-lead { margin-top: 12px !important; } /* login.php sets an inline off-grid margin */

/* ---------- 6. Links and footer ------------------------------------------ */
body.sentinel-body.auth-body:not(.dashboard-body) .auth-link { font-weight: 500; color: var(--primary) !important; }
body.sentinel-body.auth-body:not(.dashboard-body) .auth-link:hover { color: var(--primary-hover) !important; text-decoration: underline; text-underline-offset: 2px; }
body.sentinel-body.auth-body:not(.dashboard-body) :is(.auth-link-muted, .auth-label-row .auth-link-muted) {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: 0;
  color: var(--on-surface-variant) !important;
  transition: color var(--t-fast) var(--ease);
}
body.sentinel-body.auth-body:not(.dashboard-body) :is(.auth-link-muted, .auth-label-row .auth-link-muted):hover { color: var(--on-surface) !important; }

body.sentinel-body.auth-body:not(.dashboard-body) .auth-footer {
  flex-flow: row wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 16px 32px;
  text-align: left;
  background: none !important;
  border-top: 1px solid var(--border-subtle) !important;
}
body.sentinel-body.auth-body:not(.dashboard-body) .auth-footer p { margin: 0; font-size: 14px; line-height: 20px; color: var(--on-surface-variant) !important; }
body.sentinel-body.auth-body:not(.dashboard-body) .auth-badge {
  gap: 8px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--outline) !important;
}
body.sentinel-body.auth-body:not(.dashboard-body) .auth-badge .lucide-icon { color: var(--outline) !important; }

/* ---------- 7. Messages and status ---------------------------------------- */
body.sentinel-body.auth-body:not(.dashboard-body) .auth-message {
  margin: 0 0 20px;
  padding: 12px 16px;
  background: var(--surface-container);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: var(--on-surface);
}
body.sentinel-body.auth-body:not(.dashboard-body) .auth-message--error { border-color: var(--risk); }
body.sentinel-body.auth-body:not(.dashboard-body) .auth-message--success { border-color: var(--ok); }
body.sentinel-body.auth-body:not(.dashboard-body) :is(.form-error, .login-2fa-email-status.is-error) { font-size: 13px; line-height: 20px; color: var(--risk); }
body.sentinel-body.auth-body:not(.dashboard-body) :is(.form-success, .login-2fa-email-status.is-success) { font-size: 13px; line-height: 20px; color: var(--ok); }
body.sentinel-body.auth-body:not(.dashboard-body) .login-2fa-email-status.is-info { color: var(--on-surface-variant); }

/* ---------- 8. Toast, loading, cookies ------------------------------------ */
body.sentinel-body.auth-body:not(.dashboard-body) .toast {
  top: 24px;
  right: 24px;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface-container) !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-pop);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  color: var(--on-surface);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}
body.sentinel-body.auth-body:not(.dashboard-body) .toast.show { opacity: 1; pointer-events: auto; transform: none; }
body.sentinel-body.auth-body:not(.dashboard-body) .toast::before {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--outline);
}
body.sentinel-body.auth-body:not(.dashboard-body) .toast-success::before { background: var(--ok); }
body.sentinel-body.auth-body:not(.dashboard-body) .toast-warning::before { background: var(--warn); }
body.sentinel-body.auth-body:not(.dashboard-body) .toast-error::before { background: var(--risk); }
body.sentinel-body.auth-body:not(.dashboard-body) .toast-message { font-size: 14px; font-weight: 400; line-height: 20px; color: var(--on-surface) !important; }

body.sentinel-body.auth-body:not(.dashboard-body) .loading-overlay {
  background: rgba(7, 8, 13, 0.8);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  transition: opacity var(--t-base) var(--ease), visibility var(--t-base) var(--ease);
}
body.sentinel-body.auth-body:not(.dashboard-body) .loading-content {
  padding: 32px;
  background: var(--surface-container-lowest) !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-pop);
}
body.sentinel-body.auth-body:not(.dashboard-body) .loading-content p { font-size: 14px; line-height: 20px; color: var(--on-surface-variant) !important; }
body.sentinel-body.auth-body:not(.dashboard-body) .loading-spinner {
  width: 32px;
  height: 32px;
  margin: 0 auto 16px;
  border: 2px solid var(--surface-container-highest);
  border-top-color: var(--on-surface) !important;
}

/* cookie-consent.css loads later and styles the buttons by id, hence the ids */
body.sentinel-body.auth-body:not(.dashboard-body) .nmos-cookie-consent {
  max-width: 32rem;
  padding: 16px;
  background: var(--surface-container-lowest);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
  color: var(--on-surface);
}
body.sentinel-body.auth-body:not(.dashboard-body) .nmos-cookie-consent .nmos-cookie-consent__text { margin: 0 0 12px; font-size: 14px; line-height: 20px; color: var(--on-surface-variant); }
body.sentinel-body.auth-body:not(.dashboard-body) .nmos-cookie-consent .nmos-cookie-consent__text a { color: var(--primary); text-decoration: none; }
body.sentinel-body.auth-body:not(.dashboard-body) .nmos-cookie-consent .nmos-cookie-consent__text a:hover { color: var(--primary-hover); text-decoration: underline; text-underline-offset: 2px; }
body.sentinel-body.auth-body:not(.dashboard-body) .nmos-cookie-consent .nmos-cookie-consent__actions { gap: 8px; }
body.sentinel-body.auth-body:not(.dashboard-body) .nmos-cookie-consent :is(#nmosCookieAccept, #nmosCookieDecline) {
  min-height: 36px;
  padding: 8px 16px;
  background: var(--surface-container);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  color: var(--on-surface);
  transition: background-color var(--t-fast) var(--ease);
}
body.sentinel-body.auth-body:not(.dashboard-body) .nmos-cookie-consent :is(#nmosCookieAccept, #nmosCookieDecline):hover { background: var(--surface-container-high); }

/* ---------- 9. Small screens and motion ------------------------------------ */
@media (max-width: 479px) {
  body.sentinel-body.auth-body:not(.dashboard-body) { align-items: flex-start; padding: 24px var(--gutter); }
  body.sentinel-body.auth-body:not(.dashboard-body) .auth-card-body { padding: 24px; }
  body.sentinel-body.auth-body:not(.dashboard-body) .auth-footer { padding: 16px 24px; }
  body.sentinel-body.auth-body:not(.dashboard-body) .toast { left: 16px; right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  body.sentinel-body.auth-body:not(.dashboard-body) *,
  body.sentinel-body.auth-body:not(.dashboard-body) *::before,
  body.sentinel-body.auth-body:not(.dashboard-body) *::after {
    animation-duration: 0.01ms !important;
    transition: none !important;
  }
}
