:root { color-scheme: light; }
* { box-sizing: border-box; }
body.auth-page {
  margin: 0; min-height: 100vh; display: grid; place-items: center;
  padding: 24px; background: #eef3ef; color: #173f33;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.auth-card {
  width: min(420px, calc(100vw - 48px)); background: white; border-radius: 18px;
  padding: 30px; box-shadow: 0 18px 50px rgba(20, 60, 48, .14);
}
.eyebrow { margin: 0 0 6px; text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; }
.auth-card h1 { margin: 0; font-size: 2rem; }
.muted { color: #5e7169; }
.auth-form { display: grid; gap: 16px; margin-top: 22px; }
.auth-form label { display: grid; gap: 7px; font-weight: 650; }
.auth-form input:not([type=checkbox]) {
  width: 100%; padding: 12px 13px; border: 1px solid #b9c8c0; border-radius: 10px; font: inherit;
}
.auth-form .remember { grid-template-columns: auto 1fr; align-items: center; font-weight: 500; }
.auth-form button {
  border: 0; border-radius: 10px; padding: 13px 16px; font: inherit; font-weight: 750;
  background: #173f33; color: white; cursor: pointer;
}
.auth-form button:disabled { cursor: wait; opacity: .78; }
.auth-loading {
  position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center;
  padding: 24px; background: rgba(238, 243, 239, .96); backdrop-filter: blur(5px);
}
.auth-loading[hidden] { display: none; }
.auth-loading-card {
  width: min(340px, calc(100vw - 48px)); display: grid; justify-items: center; gap: 12px;
  padding: 30px; border: 1px solid #d7e2dc; border-radius: 20px; background: #fff;
  color: #173f33; text-align: center; box-shadow: 0 18px 50px rgba(20, 60, 48, .14);
}
.auth-loading-card img { border-radius: 16px; }
.auth-loading-card strong { font-size: 1.15rem; }
.auth-loading-card p { margin: -4px 0 0; color: #5e7169; }
.auth-spinner {
  width: 30px; height: 30px; border: 3px solid #c8d8d0; border-top-color: #173f33;
  border-radius: 50%; animation: auth-spin .8s linear infinite;
}
@keyframes auth-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .auth-spinner { animation-duration: 1.8s; } }
.auth-link-button { border: 0; padding: 0; background: transparent; color: #315f4d; font: 700 .95rem system-ui; cursor: pointer; }
.auth-error, .auth-message { padding: 11px 12px; border-radius: 9px; margin-top: 14px; }
.auth-error { background: #fde8e8; color: #8a1f1f; }
.auth-message { background: #e5f3e9; color: #235b36; }
.river-check-logout {
  position: fixed; right: 14px; bottom: 14px; z-index: 9999;
  margin: 0;
}
.river-check-logout button {
  border: 1px solid rgba(255,255,255,.35); border-radius: 999px;
  padding: 9px 13px; background: rgba(23,63,51,.94); color: white;
  font: 600 .9rem system-ui, sans-serif; box-shadow: 0 4px 16px rgba(0,0,0,.18);
}
@media (max-width: 820px) {
  body:not(.auth-page) .river-check-logout { display: none; }
}
