/**
 * Sign-in screen.
 *
 * Self-contained — it deliberately does not pull in the app stylesheet, so the
 * door looks the same whichever side of it you end up on, and it can't be
 * broken by a theme change inside the app.
 *
 * The crest sits behind everything at very low opacity: present enough to read
 * as the fund's mark, faint enough that it never competes with the form. On a
 * light ground it stays dark rather than being inverted, so it reads as a
 * watermark instead of a hole.
 */

:root {
  --ground: #a7a7a7;
  --navy: #213269;
  --navy-l: #2c4188;
  --card: #ffffff;
  --ink: #16203f;
  --muted: #6b7590;
  --grey: #d7dbe6;
  --accent: #9085e9;
  --bad: #b3271b;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
  background: var(--ground);
}

.login-wrap {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: max(28px, calc(38vh - 250px)) 24px 32px;
  background: var(--ground);
  overflow: hidden;
}

/* The crest, washed almost entirely out — a shade darker than the ground. */
.login-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/img/amphisbaena.png') center 46% / auto 88% no-repeat;
  opacity: 0.032;
  pointer-events: none;
}

.login-wrap > * {
  position: relative;
}

/* ---------- brand ---------- */

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 22px;
}
.login-brand .crest {
  width: 66px;
  height: auto;
  display: block;
  opacity: 0.85;
}
.login-brand .wordmark {
  margin-top: 12px;
  color: var(--navy);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: 0.6px;
}
.login-brand .tagline {
  color: var(--navy);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1.2px;
  margin-top: 1px;
}

/* ---------- card ---------- */

/* Padding is deliberately tight: the box should wrap the form, not float it in
   whitespace. Text sizes are untouched — only the air around them. */
.login-card {
  background: var(--card);
  border-radius: 12px;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.22);
  padding: 18px 30px 16px;
  width: 100%;
  max-width: 390px;
  text-align: center;
}
.login-card h1 {
  margin: 0 0 14px;
  font-size: 19px;
  color: var(--navy);
}

.identified {
  background: #eef1fa;
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 13px;
  color: var(--navy);
  font-size: 12.5px;
  text-align: left;
}
.identified b {
  display: block;
  font-size: 14.5px;
  margin-top: 1px;
  overflow-wrap: anywhere;
}
.identified .link {
  background: none;
  border: 0;
  padding: 0;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11.5px;
  text-decoration: underline;
  cursor: pointer;
  font-family: inherit;
}

label.fld {
  display: block;
  text-align: left;
  font-size: 12px;
  letter-spacing: 0.2px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 5px;
}
.login-card input {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--grey);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  margin-bottom: 13px;
  background: #fff;
}
.login-card input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(144, 133, 233, 0.2);
}

.login-card button.primary {
  width: 100%;
  padding: 11px;
  border: 0;
  border-radius: 10px;
  background: var(--navy);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
}
.login-card button.primary:hover {
  background: var(--navy-l);
}
.login-card button.primary:disabled {
  opacity: 0.6;
  cursor: default;
}

/* Reserves no height when empty, so the card doesn't carry a blank strip. */
.login-err {
  color: var(--bad);
  margin-top: 9px;
  font-size: 13px;
}
.login-err:empty {
  display: none;
}

@media (max-width: 460px) {
  .login-wrap {
    padding-top: 32px;
  }
}
