/* Blackties Dashboard — sign-in screens, styled to match blackties.co.uk.

   Deliberately scoped to `main.auth` (the signed-out shell in base.html), so the
   signed-in dashboard keeps its own gold theme untouched. Fonts are self-hosted
   because the app's CSP is default-src 'self' and Google Fonts would be blocked.

   Palette lifted from the website's stylesheet: ink #0b0a12, brand primary
   #4A068F, the vivid #9F43FE used on the wordmark, and the lifted #b78af0 for
   text on dark. */

@import url("/static/fonts/fonts.css");

main.auth {
  --bt-ink: #0b0a12;
  --bt-ink-2: #100e1a;
  --bt-line: rgba(255, 255, 255, 0.09);
  --bt-text: #eef0f6;
  --bt-muted: #a3a8b8;
  --bt-accent: #8b5fbf;
  --bt-bright: #b78af0;
  --bt-vivid: #9f43fe;
  --bt-deep: #4a068f;

  position: relative;
  background: var(--bt-ink);
  font-family: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  color: var(--bt-text);
  overflow: hidden;
}

/* the hero glow from the website, kept behind everything */
main.auth::before {
  content: "";
  position: absolute; inset: -20% -10% auto -10%; height: 90%;
  background: radial-gradient(50% 50% at 50% 40%,
    rgba(107, 70, 193, 0.42), rgba(74, 6, 143, 0.18) 55%, transparent 76%);
  pointer-events: none;
}
main.auth > * { position: relative; }

/* ---------- the wordmark, same construction as the site header ---------- */
main.auth .bt-mark {
  display: block; text-align: center; margin: 0 0 1.9rem;
  font-family: "Poppins", sans-serif; font-weight: 700;
  font-size: 1.62rem; letter-spacing: 0.12em; color: #fff;
  text-transform: none; text-decoration: none; white-space: nowrap;
}
main.auth .bt-mark span {
  /* no glow — a text-shadow at this size reads as soft focus, not light (matches the
     main site's .brand span) */
  color: var(--bt-vivid);
}
main.auth .bt-mark i {
  font-style: normal; font-size: 0.72em; vertical-align: 0.55em;
  letter-spacing: 0; color: #fff; margin-left: 2px;
}
main.auth .bt-mark em {
  display: block; font-family: "Plus Jakarta Sans", sans-serif; font-style: normal;
  font-size: 0.55rem; letter-spacing: 0.52em; color: var(--bt-muted);
  margin-top: -1px; padding-left: 0.52em;   /* optical centre: tracking pads the right */
}

/* ---------- the card ---------- */
main.auth .auth-box { width: min(410px, 100%); }
main.auth .card,
main.auth .auth-card {
  background: var(--bt-ink-2);
  border: 1px solid rgba(139, 95, 191, 0.28);
  border-radius: 16px;
  padding: 2.1rem 2rem 1.8rem;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  text-align: left;
}
main.auth .auth-card h1,
main.auth .auth-card .h {
  font-family: "Poppins", sans-serif; font-weight: 600;
  font-size: 1.24rem; margin: 0 0 0.3rem; color: var(--bt-text);
}
main.auth .muted { color: var(--bt-muted); }
main.auth .auth-card > .muted { margin: 0 0 1.5rem; font-size: 0.93rem; }

/* ---------- fields ---------- */
main.auth label {
  display: block; margin: 1rem 0 0.35rem;
  color: var(--bt-text); font-size: 0.82rem; font-weight: 600;
}
main.auth input {
  width: 100%; padding: 0.8rem 0.95rem;
  background: rgba(255, 255, 255, 0.05); color: var(--bt-text);
  border: 1px solid var(--bt-line); border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;   /* 16px exactly: anything less and iOS zooms the page on focus */
}
main.auth input::placeholder { color: #6f7486; }
main.auth input:focus {
  outline: none; border-color: var(--bt-accent);
  box-shadow: 0 0 0 3px rgba(139, 95, 191, 0.25);
}

/* ---------- buttons ---------- */
main.auth button {
  width: 100%; margin-top: 1.4rem; padding: 0.85rem 1.2rem;
  background: linear-gradient(90deg, #6b46c1, var(--bt-vivid));
  color: #fff; font-family: inherit; font-size: 0.98rem; font-weight: 600;
  border: 0; border-radius: 10px; cursor: pointer;
  transition: filter 0.2s ease;
}
main.auth button:hover { filter: brightness(1.1); }
main.auth button:focus-visible { outline: 2px solid var(--bt-bright); outline-offset: 2px; }
main.auth button.ghost {
  background: transparent; border: 1px solid rgba(255, 255, 255, 0.28);
  color: var(--bt-text);
}
main.auth button.ghost:hover { border-color: var(--bt-accent); color: var(--bt-bright); filter: none; }

/* ---------- links & small print ---------- */
main.auth a { color: var(--bt-bright); text-decoration: none; }
main.auth a:hover { text-decoration: underline; }
main.auth .auth-alt { margin: 1.1rem 0 0; text-align: center; font-size: 0.86rem; }
main.auth .login-legal {
  margin: 1.4rem auto 0; max-width: 410px; text-align: center;
  color: var(--bt-muted); font-size: 0.76rem; line-height: 1.55;
}
main.auth .bt-back {
  display: block; text-align: center; margin-top: 1rem;
  font-size: 0.82rem; color: var(--bt-muted);
}
main.auth .bt-back:hover { color: var(--bt-bright); }

/* ---------- flashes ---------- */
main.auth .flash {
  border-radius: 10px; padding: 0.75rem 1rem; margin: 0 0 1rem;
  font-size: 0.9rem; border: 1px solid;
}
main.auth .flash.error { background: rgba(255, 107, 107, 0.10); border-color: rgba(255, 107, 107, 0.4); color: #ff9b9b; }
main.auth .flash.notice { background: rgba(240, 180, 41, 0.10); border-color: rgba(240, 180, 41, 0.4); color: #f3c766; }
main.auth .flash.ok { background: rgba(96, 190, 130, 0.12); border-color: rgba(96, 190, 130, 0.4); color: #7fd6a4; }

@media (max-width: 460px) {
  main.auth .card, main.auth .auth-card { padding: 1.7rem 1.3rem 1.5rem; }
  main.auth .bt-mark { font-size: 1.38rem; }
}
