/* ── shared.css ───────────────────────────────────────────────────
   Common styles for standalone pages (login, request-access, account,
   404) and server-rendered message pages (lib/message-page.js, the
   edge 403). Imported via <link rel="stylesheet" href="/shared.css">.

   This file must stay in public/. Vite copies public/ verbatim, so the
   /shared.css URL exists in dist/. At the repo root Vite bundled it into
   a hashed /assets/ name for the HTML entries, and every server-rendered
   page that linked /shared.css at runtime got a 404 in production.
   ─────────────────────────────────────────────────────────────── */

/* ── Reset ────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Colour tokens (mirrors Tailwind values from main app) ────── */
:root {
  --app-border-width: calc(1px + 0.5pt);
  --bg-page: #f9fafb; /* gray-50  */
  --bg-card: #ffffff; /* white    */
  --border: #e5e7eb; /* gray-200 */
  --text-primary: #111827; /* gray-900 */
  --text-muted: #9ca3af; /* gray-400 */
  --text-subtle: #6b7280; /* gray-500 */
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --ms-blue: #0078d4;
  --ms-blue-hover: #106ebe;
  --surface-elevated: #f3f4f6; /* gray-100 */
  --surface-hover: #e5e7eb; /* gray-200 */
  --border-subtle: #d1d5db; /* gray-300 */
  --border-strong: #9ca3af; /* gray-400 */
}
.dark {
  --bg-page: #030712; /* gray-950 */
  --bg-card: #111827; /* gray-900 */
  --border: #1f2937; /* gray-800 */
  --text-primary: #f9fafb; /* gray-100 */
  --text-muted: #6b7280; /* gray-500 */
  --text-subtle: #9ca3af; /* gray-400 */
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.4), 0 1px 2px -1px rgb(0 0 0 / 0.4);
  --surface-elevated: #1f2937; /* gray-800 */
  --surface-hover: #374151; /* gray-700 */
  --border-subtle: #374151; /* gray-700 */
  --border-strong: #4b5563; /* gray-600 */
}

/* ── Base layout ──────────────────────────────────────────────── */
html,
body {
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-primary);
  transition:
    background-color 0.3s,
    color 0.3s;
}

/* ── Card ─────────────────────────────────────────────────────── */
.card {
  background-color: var(--bg-card);
  border: var(--app-border-width, calc(1px + 0.5pt)) solid var(--border);
  border-radius: 0.75rem;
  box-shadow: var(--shadow);
  transition:
    background-color 0.3s,
    border-color 0.3s;
}

/* ── Branding ─────────────────────────────────────────────────── */
.logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: 1.5rem;
}
.logo-wrap img {
  height: 2.25rem;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}
.logo-title {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.125rem;
  line-height: 1.15;
  text-align: left;
  min-width: 0;
}
.logo-title .brand {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}
.logo-title .sub {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ── Divider ──────────────────────────────────────────────────── */
.divider {
  border: none;
  border-top: var(--app-border-width, calc(1px + 0.5pt)) solid var(--border);
  margin: 0 0 1.5rem;
  transition: border-color 0.3s;
}

/* Cloudflare Turnstile slot (interaction-only: empty until a challenge shows) */
.turnstile-slot {
  display: block;
  width: 100%;
}
.turnstile-slot:not(:empty) {
  margin: 0.25rem 0 0.75rem;
}
