/* Shared by the site (app.css) and the admin panel (admin.css). */

:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --ink: #1c2024;
  --muted: #6b7280;
  --line: #e3e6ea;
  --accent: #1f4e79;
  --accent-dark: #17395a;
  /* Table and section headings */
  --head: #eef1f5;
  /* A box set into a panel */
  --soft: #f7f9fb;
  /* A field that cannot be changed */
  --disabled: #f2f4f6;
  --danger: #b42318;
  --danger-dark: #8f1c13;
  /* Messages, badges and flags */
  --success-bg: #e7f5ec;
  --success-line: #b7e0c6;
  --success-ink: #1c6b3c;
  --warning-bg: #fdf6e3;
  --warning-line: #f0dda6;
  --warning-ink: #8a6100;
  --error-bg: #fdecec;
  --error-line: #f3bcbc;
  --info-bg: #eaf1f8;
  --info-line: #c3d7ec;
  --font: system-ui, -apple-system, "Segoe UI", sans-serif;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 var(--font);
}

/* Top bar. Equal outer columns keep the title centred on the page. */
.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px 16px;
  padding: 10px 20px;
  background: var(--accent);
  color: #fff;
}
.topbar a { color: #fff; text-decoration: none; }
/* The nav stays whole; the title wraps instead. */
.topbar nav { display: flex; align-items: center; gap: 16px; white-space: nowrap; }
.topbar .standards { justify-self: start; }
.topbar .account { justify-self: end; }
/* A long organisation name wraps. */
.brand {
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-align: center;
}

/* Too narrow for three across: title on top, the rest stacked beneath. */
@media (max-width: 760px) {
  .topbar { grid-template-columns: 1fr; justify-items: center; }
  .topbar .brand { order: -1; }
  .topbar .standards,
  .topbar .account { justify-self: center; flex-wrap: wrap; justify-content: center; }
}

/* Tabs: the current one is filled; the others keep its shape, so nothing shifts. */
.topbar .tabs {
  display: flex;
  gap: 4px;
  padding: 3px;
  background: rgba(255, 255, 255, .12);
  border-radius: 8px;
}
.topbar .tabs a {
  padding: 5px 12px;
  border-radius: 6px;
  font-weight: 600;
  white-space: nowrap;
  color: rgba(255, 255, 255, .78);
}
.topbar .tabs a:hover { color: #fff; background: rgba(255, 255, 255, .14); }
.topbar .tabs a.current { background: #fff; color: var(--accent); }
.who { opacity: .85; font-size: .9rem; }
.logout-form { margin: 0; }
.linkish {
  background: none; border: 0; padding: 0;
  color: #fff; font: inherit; cursor: pointer; text-decoration: underline;
}
