/* Dashboard, sign-in and reception pages. The public website uses site.css.
   Same brand as the website: navy anchor, cobalt actions, cool-grey surfaces, sandstone for live on navy. Flat and bordered. */
@font-face { font-family: "Newsreader"; src: url("../fonts/newsreader.woff2") format("woff2"); font-weight: 400 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope-variable.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }

:root {
  --navy: #101c2d;
  --navy-2: #182a42;       /* raised surface on navy */
  --navy-line: #2b3f5c;
  --on-navy: #eef2f8;
  --on-navy-muted: #aab6c8;
  --sand: #e7b464;         /* live highlights on navy */
  --cobalt: #2a4fc4;
  --cobalt-dark: #213fa0;
  --cobalt-soft: #8ea6f2;  /* light accent on dark surfaces */
  --cobalt-tint: #e8edfb;
  --mist: #f5f7fa;
  --sand-soft: #fbf1df;
  --sand-ink: #7a4f0e;
  --blue: var(--cobalt); --blue-dark: var(--cobalt-dark); --blue-tint: var(--cobalt-tint); --paper: var(--mist);
  --white: #ffffff;
  --ink: #3a4557;      /* secondary text */
  --control-border: #76839a;
  --rule: #dfe4ec;     /* quiet separators */
  --line: #101c2d;     /* structural borders */
  /* Status colours: only for status. */
  --ok: #17663f;   --ok-tint: #e3f1e9;
  --warn: #8a4b00; --warn-tint: #f8ecd9;
  --bad: #a3221a;  --bad-tint: #f9e3e1;

  --display: "Newsreader", Georgia, "Times New Roman", serif;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 8px;
  --radius-sm: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 1.0625rem; line-height: 1.6; color: var(--navy); background: var(--white); }
img, svg { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; font-weight: 700; letter-spacing: -0.015em; }
h1 { font-family: var(--display); font-weight: 500; font-optical-sizing: auto; letter-spacing: -0.01em; }
p, ul, ol, dl, figure { margin: 0; }
a { color: var(--cobalt); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { color: var(--cobalt-dark); }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--cobalt); }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--navy); color: var(--white); padding: 10px 14px; border-radius: var(--radius-sm); }
.skip-link:focus { top: 12px; color: var(--white); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border: 2px solid var(--control-border); border-radius: 999px;
  font-weight: 700; font-size: 1rem; line-height: 1; text-decoration: none; cursor: pointer;
  background: var(--white); color: var(--navy);
}
.btn:hover { background: var(--mist); border-color: var(--navy); color: var(--navy); }
.btn-primary { background: var(--cobalt); border-color: var(--cobalt); color: var(--white); }
.btn-primary:hover { background: var(--cobalt-dark); border-color: var(--cobalt-dark); color: var(--white); }
.btn-dark { background: var(--navy); color: var(--white); }
.btn-dark:hover { background: var(--navy-2); color: var(--white); }
.btn-small { min-height: 36px; padding: 0 14px; font-size: 0.9375rem; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* Forms */
.field { display: grid; gap: 6px; }
.field label, .field legend { font-weight: 700; font-size: 0.9375rem; }
.field .hint { font-size: 0.875rem; color: var(--ink); }
.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; background: var(--white);
  border: 2px solid var(--control-border); border-radius: var(--radius-sm);
}
.textarea { min-height: 110px; resize: vertical; }
/* The same ring as buttons and links: the action colour, offset so it reads against white and the page tint. */
.input:focus, .select:focus, .textarea:focus { border-color: var(--cobalt); outline: 3px solid var(--cobalt); outline-offset: 2px; }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--bad); }
.field .error[hidden] { display: none; }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: var(--bad); }
.field .error { color: var(--bad); font-size: 0.875rem; font-weight: 700; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9375rem; }
.check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--cobalt); flex: none; }

/* Status pills: status only. */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 0.8125rem; font-weight: 700; white-space: nowrap; border: 1.5px solid currentColor; }
.pill-ok { color: var(--ok); background: var(--ok-tint); }
.pill-warn { color: var(--warn); background: var(--warn-tint); }
.pill-bad { color: var(--bad); background: var(--bad-tint); }
.pill-info { color: var(--cobalt-dark); background: var(--cobalt-tint); }
.pill-plain { color: var(--ink); background: var(--white); border-color: var(--rule); }

/* Staff shell (sidebar, top bar; painted by web/app/shell.js). One flat list, no submenu. */
.workspace .sidebar nav { gap: 3px; }
.workspace .sidebar nav a { min-height: 42px; padding: 6px 12px; font-size: 0.875rem; font-weight: 600; }
.workspace .sidebar nav a span:not(.nav-count) { overflow-wrap: anywhere; }
.workspace .sidebar nav .nav-setup { margin-bottom: 12px; }
.workspace .sidebar nav .nav-help { margin-top: 18px; }
.workspace .business-label { margin: 24px 12px 18px; }
.workspace .business-label strong { font-size: 0.9375rem; }
.workspace .sidebar-bottom { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 10px; align-items: center; }
.workspace .sidebar-user-links { grid-column: 1 / -1; display: flex; gap: 14px; align-items: center; white-space: nowrap; padding-left: 2px; }
.workspace .sidebar-user-links a, .workspace .sidebar-user-links .text-button { color: var(--on-navy); font-size: 0.75rem; font-weight: 700; text-decoration: none; }
.workspace .sidebar-user-links .text-button:hover { color: var(--sand); }
.workspace .sidebar-user-links a:hover, .workspace .sidebar-user-links a[aria-current="page"] { color: var(--sand); }
.workspace .topbar { font-size: 0.875rem; }
.workspace #breadcrumb a { color: var(--ink); text-decoration: none; }
.workspace #breadcrumb a:hover { color: var(--navy); text-decoration: underline; }
.workspace #breadcrumb [aria-current="page"] { color: var(--navy); font-weight: 700; }
.workspace .topbar-actions { gap: 10px; }
.workspace .topbar-actions .pill { margin-right: 6px; }
.workspace .topbar-actions [hidden] { display: none; }
.development-banner[hidden] { display: none; }
@media (max-width: 800px) { .workspace .sidebar nav .nav-help { margin-top: 8px; } .workspace .sidebar-bottom { margin: 0 12px; } }
@media (max-width: 540px) { .workspace .topbar-actions { flex-wrap: wrap; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
