/* Sign-in / set-password pages (server-rendered, no MudBlazor). */
:root {
  --serif: "Times New Roman", Georgia, "Book Antiqua", serif;
  --brand: #632423;        /* McEvoy Legal maroon (from the firm's document templates) */
  --brand-dark: #4a1a1a;
  --accent: #c0504d;       /* McEvoy Legal red + */
  --olive: #76923c;
  --purple: #5f497a;
  --mono: "Courier New", Courier, monospace;
  --bg: #f6f2f0;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --danger-bg: #fee2e2;
  --danger: #991b1b;
  --border: #d1d5db;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #e8a3a8;
    --brand-dark: #f3c6c9;
    --bg: #161011;
    --card: #221a1b;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --danger-bg: #3f1d1d;
    --danger: #fecaca;
    --border: #374151;
  }
}

.auth {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border-radius: 12px;
  padding: 32px 28px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.auth-brand { margin-bottom: 24px; }

.auth h1 { font-family: var(--serif); font-size: 1.6rem; font-weight: 600; color: var(--brand); margin: 0 0 4px; }
.auth .muted { color: var(--muted); }
.auth .small { font-size: 0.85rem; margin-top: 20px; }

.auth form { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; }
.auth label { font-weight: 500; margin-top: 8px; }
.auth label.check { display: flex; gap: 8px; align-items: center; font-weight: 400; }

.auth input[type="email"],
.auth input[type="password"],
.auth input[type="text"] {
  font-size: 1rem;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
}

.auth input:focus { outline: 2px solid var(--brand); outline-offset: 1px; }

.auth button {
  margin-top: 16px;
  padding: 12px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--brand);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.auth button:hover { background: var(--brand-dark); }

/* "Sign in with McEvoy Legal": a link styled like the sign-in button */
.auth a.sso-button {
  display: block;
  margin-top: 8px;
  padding: 12px;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  color: #fff;
  background: var(--brand);
  border-radius: 8px;
}
.auth a.sso-button:hover { background: var(--brand-dark); color: #fff; }

.auth .alert {
  background: var(--danger-bg);
  color: var(--danger);
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 12px;
}

.auth .field-error { color: var(--danger); font-size: 0.85rem; }
.auth .steps { padding-left: 20px; line-height: 1.6; }
.auth a { color: var(--brand); }

/* Admin pages */
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 0.8rem; white-space: pre-wrap; word-break: break-all; }

/* McEvoy Legal wordmark (Components/Shared/BrandMark.razor) */
.brand { display: inline-flex; align-items: center; gap: 0.45em; line-height: 1; color: var(--brand, #632423); }
.brand-plus { width: 0.95em; height: 0.95em; fill: var(--accent, #c0504d); flex: none; transform: translateY(-0.35em); }
.brand-text { display: inline-flex; flex-direction: column; gap: 0.25em; }
.brand-name { font-family: var(--mono, "Courier New", monospace); font-weight: 700; font-size: 1em; }
.brand-product { font-family: system-ui, "Segoe UI", sans-serif; font-size: 0.42em; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.75; }
.brand-light { color: #fff; }

/* Serif headings across the admin site */
.mud-typography-h4, .mud-typography-h5 { font-family: var(--serif) !important; font-weight: 600 !important; color: var(--mud-palette-primary); }

/* Three-colour stripe from the McEvoy Legal templates (maroon / olive / purple) */
.brand-stripe { display: flex; gap: 6px; height: 5px; }
.brand-stripe span { flex: 1; }
.brand-stripe span:nth-child(1) { background: #632423; }
.brand-stripe span:nth-child(2) { background: #76923c; }
.brand-stripe span:nth-child(3) { background: #5f497a; }
.auth-card .brand-stripe { margin: -32px -28px 24px; height: 6px; border-radius: 12px 12px 0 0; overflow: hidden; gap: 0; }


/* Printing a pre-bill: just the bill, no navigation. */
@media print {
    .mud-appbar, .mud-drawer, .brand-stripe, .no-print { display: none !important; }
    .mud-main-content { padding: 0 !important; margin: 0 !important; }
    .printable { box-shadow: none !important; }
}


/* Keep the brand wordmark on one line and tidy the header on phones */
.brand-name { white-space: nowrap; }
@media (max-width: 600px) {
    .brand { font-size: 18px !important; }
    .brand-product { display: none; }   /* hide the long tagline on small screens */
}
