.auth-body {
  min-height: 100dvh;
  background: var(--bg);
}
.auth-shell {
  width: min(calc(100% - 32px), 460px);
  min-height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 0 28px;
}
.auth-brand {
  display: inline-flex;
  align-self: center;
  margin-bottom: 34px;
  line-height: 0;
}
.auth-brand img { width: 126px; height: auto; max-height: 34px; object-fit: contain; }
.auth-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.82);
  padding: 30px;
  box-shadow: var(--shadow);
}
.auth-kicker { margin: 0 0 10px; color: var(--soft); font-size: 11px; letter-spacing: .16em; font-weight: 700; }
.auth-card h1 { margin: 0; font-size: 30px; line-height: 1.15; letter-spacing: -.035em; }
.auth-copy { margin: 12px 0 24px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.auth-error { margin: -8px 0 18px; padding: 10px 12px; border: 1px solid #e1c8c8; border-radius: 8px; color: #8a4040; font-size: 13px; background: #fffafa; }
.auth-card form { display: grid; gap: 16px; }
.auth-card label { display: grid; gap: 8px; font-size: 13px; font-weight: 650; color: #30343a; }
.auth-card input {
  width: 100%;
  border: 1px solid #d4d9df;
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  padding: 12px 13px;
  outline: none;
}
.auth-card input:focus { border-color: #aeb6c0; box-shadow: 0 0 0 3px rgba(53,78,102,.10); }
.auth-card button {
  margin-top: 3px;
  border: 0;
  border-radius: 10px;
  background: #17191c;
  color: #fff;
  font: inherit;
  font-weight: 700;
  padding: 12px 16px;
  cursor: pointer;
}
.auth-card button:hover { background: #292d32; }
.auth-card button:focus-visible, .auth-brand:focus-visible, .auth-footer a:focus-visible, .portal-logout:focus-visible {
  outline: 3px solid rgba(53,78,102,.24);
  outline-offset: 4px;
}
.auth-footer {
  margin-top: 26px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  color: var(--soft);
  font-size: 11px;
}
.auth-footer a { color: inherit; text-decoration: none; }
.auth-police { display: inline-flex; align-items: center; gap: 5px; }
.auth-police img { width: 18px; height: 20px; object-fit: contain; }

.portal-logout {
  margin-left: auto;
  color: var(--text-primary);
  text-decoration: none;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: .01em;
  transition: opacity .2s ease;
}
.portal-logout:hover {
  opacity: .55;
}

/* auth/app.py still injects the legacy footer logout link at runtime.
   Keep it non-rendered while the visible action lives in the header. */
.filings > a[href="/logout"] { display: none; }

@media (max-width: 640px) {
  .portal-logout {
    font-size: 13px;
  }
}

@media (max-width: 520px) {
  .auth-shell { justify-content: flex-start; padding-top: 54px; }
  .auth-card { padding: 24px 20px; }
  .auth-card h1 { font-size: 27px; }
}
