@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&family=Inter:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  --ink: #FFFFFF;
  --ink-2: #F3F2EE;
  --panel: #F7F6F2;
  --paper: #FFFFFF;
  --paper-dim: #ECE9E1;
  --brass: #6C3FA6;
  --brass-bright: #8B5FC4;
  --brass-deep: #3E2461;
  --signal: #3E9270;
  --signal-bright: #4FA37D;
  --signal-deep: #2C7053;
  --line: rgba(27, 42, 61, 0.10);
  --text: #1B2A3D;
  --text-dim: #64707F;
  --text-ink: #1B2A3D;
}

* { box-sizing: border-box; }

/* Defensive: guarantees the `hidden` HTML attribute always works, even if a more
   specific rule elsewhere sets `display` on the same element (this is what caused
   the Admin Centre link to stay visible for non-admins — .account-menu-panel a
   set display:block unconditionally, overriding [hidden]'s default display:none). */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
}

.mono { font-family: 'IBM Plex Mono', monospace; }

.layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: calc(100vh - 58px);
}

/* ---------- Sidebar ---------- */
.sidebar {
  background: var(--panel);
  border-right: 1px solid var(--line);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand .eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass-deep);
}

.brand h1 {
  font-family: 'Sora', sans-serif;
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field-group .label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
}

input, select {
  background: var(--ink-2);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 9px 11px;
  border-radius: 3px;
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  width: 100%;
}

input:focus, select:focus, button:focus-visible {
  outline: 2px solid var(--brass-bright);
  outline-offset: 1px;
}

input[type="range"] {
  padding: 0;
  accent-color: var(--brass);
}

button {
  cursor: pointer;
  border: none;
  border-radius: 3px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 13.5px;
  padding: 11px 14px;
  transition: transform 0.08s ease, opacity 0.15s ease;
}
button:active { transform: scale(0.98); }

.btn-primary {
  background: var(--brass);
  color: #FFFFFF;
}
.btn-primary:hover { background: var(--brass-bright); }

.btn-secondary {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}
.btn-secondary:hover { border-color: var(--brass-bright); color: var(--brass-bright); }

.divider {
  height: 1px;
  background: var(--line);
}

/* ---------- Industries multi-select ---------- */
.multiselect {
  position: relative;
}

.multiselect-toggle {
  width: 100%;
  text-align: left;
  background: var(--ink-2);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 9px 11px;
  border-radius: 3px;
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  font-weight: 400;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.multiselect-toggle::after {
  content: '▾';
  color: var(--text-dim);
  margin-left: 8px;
}

.multiselect-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 5px;
  box-shadow: 0 6px 20px rgba(27,42,61,0.14);
  max-height: 320px;
  overflow-y: auto;
  padding: 6px;
}

.multiselect-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-ink);
}
.multiselect-item:hover { background: rgba(108,63,166,0.08); }
.multiselect-item input { width: auto; margin: 0; }
.multiselect-item.all { font-weight: 600; }

.multiselect-divider {
  height: 1px;
  background: rgba(27,42,61,0.10);
  margin: 4px 2px;
}

.status-line {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11.5px;
  color: var(--text-dim);
  line-height: 1.6;
}

.status-line strong { color: var(--signal-deep); }

/* ---------- Main ---------- */
.main {
  padding: 32px 36px 60px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.main-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.main-header h2 {
  font-family: 'Sora', sans-serif;
  font-size: 26px;
  margin: 0 0 6px;
}

.main-header p {
  margin: 0;
  color: var(--text-dim);
  font-size: 14px;
  max-width: 520px;
}

.stat-row {
  display: flex;
  gap: 22px;
}
.stat {
  text-align: right;
}
.stat .num {
  font-family: 'Sora', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--brass-deep);
}
.stat .lbl {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* Map */
.map-wrap {
  border: 1px solid var(--line);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
}

#mapContainer {
  height: 520px;
  width: 100%;
  background: var(--panel);
}

.map-legend {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 1000;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(27,42,61,0.08);
}
.map-legend .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }

/* Leaflet popup theming */
.leaflet-popup-content-wrapper {
  background: var(--paper);
  color: var(--text-ink);
  border-radius: 5px;
}
.leaflet-popup-tip { background: var(--paper); }
.leaflet-popup-content { font-family: 'Inter', sans-serif; font-size: 13px; margin: 10px 14px; }
.leaflet-popup-content a { color: var(--brass-deep); font-weight: 600; }
.leaflet-popup-content .mono { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: #6B7688; }
.marker-cluster-small, .marker-cluster-medium, .marker-cluster-large {
  background-color: rgba(108,63,166,0.35) !important;
}
.marker-cluster-small div, .marker-cluster-medium div, .marker-cluster-large div {
  background-color: var(--brass) !important;
  color: #FFFFFF !important;
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
}

.leaflet-control-attribution {
  background: rgba(255,255,255,0.65) !important;
  font-size: 9.5px !important;
  padding: 1px 6px !important;
  color: #8a95a5 !important;
  box-shadow: none !important;
}
.leaflet-control-attribution a {
  color: #8a95a5 !important;
}

/* Table */
.table-wrap {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  color: var(--text-ink);
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(27,42,61,0.12);
}

.table-header h3 {
  font-family: 'Sora', sans-serif;
  margin: 0;
  font-size: 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead th {
  text-align: left;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6B7688;
  padding: 10px 20px;
  border-bottom: 1px solid rgba(27,42,61,0.14);
  position: sticky;
  top: 0;
  background: var(--paper);
}

tbody td {
  padding: 12px 20px;
  border-bottom: 1px solid rgba(27,42,61,0.08);
  vertical-align: top;
}

tbody tr:hover { background: rgba(108,63,166,0.08); }

.company-name { font-weight: 600; }
.company-name a { color: var(--text-ink); text-decoration: none; }
.company-name a:hover { color: var(--brass); text-decoration: underline; }

.tag-new {
  display: inline-block;
  background: var(--signal);
  color: #0C1F17;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: 3px;
  margin-left: 8px;
  vertical-align: middle;
}

.empty-state {
  padding: 60px 20px;
  text-align: center;
  color: #6B7688;
  font-size: 14px;
}

.empty-state .big {
  font-family: 'Sora', sans-serif;
  font-size: 18px;
  color: var(--text-ink);
  margin-bottom: 6px;
}

.filters-row {
  display: flex;
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(27,42,61,0.12);
  flex-wrap: wrap;
}
.filters-row input, .filters-row select {
  background: #fff;
  color: var(--text-ink);
  border: 1px solid rgba(27,42,61,0.18);
  width: auto;
  min-width: 140px;
}

/* Director/officer detail panel */
.detail-row td {
  background: var(--ink-2);
  padding: 0 !important;
  border-bottom: 1px solid rgba(27,42,61,0.08);
}

.detail-panel {
  padding: 14px 24px;
}

.detail-meta {
  font-size: 11.5px;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.detail-empty {
  font-size: 13px;
  color: #6B7688;
  font-style: italic;
}

.officer-row {
  padding: 8px 0;
  border-bottom: 1px solid rgba(27,42,61,0.06);
}
.officer-row:last-child { border-bottom: none; }

.officer-name {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--text-ink);
}

.officer-meta {
  font-size: 11px;
  color: #6B7688;
  margin-top: 2px;
}

/* Map popup directors section */
.popup-directors {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(27,42,61,0.12);
}
.popup-directors-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6B7688;
  margin-bottom: 4px;
}
.popup-directors-loading {
  font-size: 11px;
  color: #6B7688;
}
.popup-directors .officer-row { padding: 5px 0; }
.popup-directors .officer-name { font-size: 12.5px; }
.popup-directors .officer-meta { font-size: 10.5px; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { border-right: none; border-bottom: 1px solid var(--line); }
}

/* ---------- Contacted toggle ---------- */
.contact-toggle {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  padding: 4px 8px;
  border-radius: 3px;
  border: 1px solid rgba(27,42,61,0.2);
  background: transparent;
  color: #6B7688;
  cursor: pointer;
}
.contact-toggle.is-contacted {
  background: var(--signal);
  color: #0C1F17;
  border-color: var(--signal);
}

/* ---------- Auth / landing pages ---------- */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(108,63,166,0.10) 0%, transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(79,163,125,0.10) 0%, transparent 45%),
    var(--ink);
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 36px 32px;
}

.auth-card .eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass-deep);
}

.auth-card h1 {
  font-family: 'Sora', sans-serif;
  font-size: 24px;
  margin: 6px 0 24px;
}

.auth-card .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.auth-card label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.auth-card .error {
  color: #E08787;
  font-size: 13px;
  margin: -8px 0 16px;
  min-height: 16px;
}

.auth-card .success {
  color: var(--signal-deep);
  font-size: 13.5px;
  margin: -8px 0 16px;
}

.auth-card .switch-link {
  margin-top: 20px;
  font-size: 13.5px;
  color: var(--text-dim);
  text-align: center;
}

.auth-card .switch-link a { color: var(--brass-deep); text-decoration: none; }
.auth-card .switch-link a:hover { text-decoration: underline; }

.auth-card button[type="submit"] { width: 100%; margin-top: 8px; }

.password-field {
  position: relative;
}
.password-field input {
  padding-right: 42px;
}
.password-toggle {
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: var(--text-dim);
  border-radius: 4px;
}
.password-toggle:hover { color: var(--brass-deep); background: rgba(108,63,166,0.06); }
.password-toggle svg { display: block; }

.consent-field { margin-bottom: 4px; }
.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-dim);
  cursor: pointer;
  text-transform: none;
  letter-spacing: normal;
  font-family: 'Inter', sans-serif;
}
.consent-label input { width: auto; margin-top: 2px; }
.consent-label a { color: var(--brass-deep); }

/* Landing page */
.landing {
  background: var(--ink);
  color: var(--text);
  min-height: 100vh;
}

.landing-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 48px;
  max-width: 1100px;
  margin: 0 auto;
}

.landing-nav .logo {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
}

.landing-nav a.nav-link {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  margin-left: 20px;
}

.landing-hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 48px 60px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}

.landing-hero .eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass-deep);
  margin-bottom: 14px;
  display: block;
}

.landing-hero h1 {
  font-family: 'Sora', sans-serif;
  font-size: 46px;
  line-height: 1.08;
  margin: 0 0 22px;
  letter-spacing: -0.01em;
}

.landing-hero p.sub {
  color: var(--text-dim);
  font-size: 16.5px;
  line-height: 1.6;
  max-width: 480px;
  margin-bottom: 30px;
}

.landing-hero .cta-row { display: flex; gap: 14px; }
.landing-hero .cta-row a { text-decoration: none; }

.hero-visual {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: radial-gradient(circle at 50% 45%, var(--panel) 0%, var(--ink) 72%);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.landing-features {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 48px 100px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.feature-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 24px 22px;
}

.feature-card .num {
  font-family: 'IBM Plex Mono', monospace;
  color: var(--brass-deep);
  font-size: 12px;
  margin-bottom: 10px;
}

.feature-card h3 {
  font-family: 'Sora', sans-serif;
  font-size: 17px;
  margin: 0 0 8px;
}

.feature-card p {
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
}

@media (max-width: 800px) {
  .landing-hero { grid-template-columns: 1fr; }
  .landing-features { grid-template-columns: 1fr; }
}

textarea {
  background: var(--ink-2);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 9px 11px;
  border-radius: 3px;
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  width: 100%;
  resize: vertical;
}

/* Simple content pages: About, Support */
.content-page {
  max-width: 640px;
  margin: 0 auto;
  padding: 60px 24px 100px;
}

.content-page .eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass-deep);
  display: block;
  margin-bottom: 12px;
}

.content-page h1 {
  font-family: 'Sora', sans-serif;
  font-size: 36px;
  margin: 0 0 18px;
  letter-spacing: -0.01em;
}

.content-page p.lead {
  font-size: 17px;
  color: var(--text-dim);
  line-height: 1.6;
  margin: 0 0 24px;
}

.content-page p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 32px;
}

.contact-form .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-form label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.contact-form .error {
  color: #C0392B;
  font-size: 13px;
}

.contact-form .success {
  color: var(--signal-deep);
  font-size: 13px;
}

.contact-form button { align-self: flex-start; }

.site-footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 48px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--text-dim);
}

.site-footer a {
  color: var(--text-dim);
  text-decoration: none;
  margin-left: 18px;
}
.site-footer a:hover { color: var(--brass-deep); }

/* Free teaser search on landing page */
.teaser-search {
  margin-top: 34px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.teaser-search .teaser-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass-deep);
  margin-bottom: 10px;
  display: block;
}

.teaser-search-row {
  display: flex;
  gap: 10px;
}
.teaser-search-row input { flex: 1; }
.teaser-search-row button { white-space: nowrap; }

.teaser-result {
  margin-top: 16px;
  font-size: 14px;
}

.teaser-result .teaser-count {
  font-family: 'Sora', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--brass-deep);
}

.teaser-sample {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.teaser-sample-item {
  font-size: 13.5px;
  padding: 8px 10px;
  background: var(--ink-2);
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  color: var(--text-dim);
}
.teaser-sample-item strong { color: var(--text); }

.teaser-cta {
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--text-dim);
}
.teaser-cta a { color: var(--brass-deep); font-weight: 600; text-decoration: none; }
.teaser-cta a:hover { text-decoration: underline; }

/* Auth-aware nav link sets (public pages) */
.nav-links-user { display: none; }

/* ---------- App top nav (dashboard, account) ---------- */
.app-nav {
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 2000;
}

.app-nav .logo {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  text-decoration: none;
}

.app-nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.app-nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
}
.app-nav-links a:hover { color: var(--text); }
.app-nav-links a.active { color: var(--brass-deep); }

.account-menu {
  position: relative;
}

.account-menu-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 6px 14px 6px 6px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  color: var(--text);
}

.account-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brass);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 12px;
}

.account-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 2001;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(27,42,61,0.14);
  min-width: 200px;
  padding: 8px;
}

.account-menu-email {
  padding: 8px 10px;
  font-size: 12.5px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
  word-break: break-all;
}

.account-menu-panel a, .account-menu-panel button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 4px;
  font-size: 13.5px;
  color: var(--text);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
}
.account-menu-panel a:hover, .account-menu-panel button:hover { background: rgba(108,63,166,0.08); }

.account-info {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.account-info-row {
  display: flex;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.account-info-row:last-child { border-bottom: none; }

.account-info-row .label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* Legal pages */
.legal-page {
  max-width: 720px;
}

.legal-page h2 {
  font-family: 'Sora', sans-serif;
  font-size: 18px;
  margin: 32px 0 10px;
}

.section-heading {
  font-family: 'Sora', sans-serif;
  font-size: 20px;
  margin: 0 0 12px;
}

.legal-page p {
  font-size: 14px;
}

.legal-placeholder {
  background: rgba(192,57,43,0.08);
  border: 1px solid rgba(192,57,43,0.25);
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 13.5px;
  color: #A8362A;
  margin: 20px 0 0;
}
.legal-placeholder code {
  background: rgba(192,57,43,0.12);
  padding: 1px 5px;
  border-radius: 3px;
  font-family: 'IBM Plex Mono', monospace;
}

.mission-page {
  max-width: 680px;
}

.mission-page h1 {
  font-size: 32px;
  line-height: 1.2;
}

.mission-statement {
  font-family: 'Sora', sans-serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--brass-deep);
  margin: 18px 0 26px !important;
}

/* ---------- Admin Centre ---------- */
.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100vh - 58px);
}

.admin-sidebar {
  background: var(--panel);
  border-right: 1px solid var(--line);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-tab {
  text-align: left;
  background: none;
  border: none;
  padding: 10px 12px;
  border-radius: 5px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--text-dim);
  cursor: pointer;
}
.admin-tab:hover { background: rgba(108,63,166,0.06); color: var(--text); }
.admin-tab.active { background: rgba(108,63,166,0.10); color: var(--brass-deep); font-weight: 600; }

.admin-main {
  padding: 32px 40px;
}

.admin-panel h2 {
  font-family: 'Sora', sans-serif;
  font-size: 22px;
  margin: 0 0 20px;
}

.admin-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.admin-panel-header h2 { margin: 0; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.stat-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}
.stat-card-alert {
  border-color: var(--brass);
  background: rgba(192,138,62,0.06);
}
.stat-card-alert .stat-num { color: #A8362A; }
.stat-num {
  font-family: 'Sora', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--brass-deep);
  word-break: break-word;
}
.stat-lbl {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

#usersTableWrap table, #usersTableWrap th, #usersTableWrap td {
  background: var(--paper);
}
#usersTableWrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.admin-row-btn {
  padding: 5px 10px;
  font-size: 12px;
  margin-right: 6px;
}
.admin-row-btn.danger {
  border-color: #C0392B;
  color: #C0392B;
}
.admin-row-btn.primary-action {
  background: var(--brass);
  border-color: var(--brass);
  color: #fff;
}
.admin-row-btn.primary-action:hover { background: var(--brass-deep); }

tr.row-pending { background: rgba(192,138,62,0.06); }

.tag-pending {
  display: inline-block;
  background: rgba(192,138,62,0.18);
  color: var(--brass-deep);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: 3px;
}

.task-form {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.task-form input {
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--text-ink);
  padding: 9px 11px;
  border-radius: 4px;
  font-size: 13.5px;
  flex: 1;
  min-width: 160px;
}
.task-form select {
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--text-ink);
  padding: 9px 11px;
  border-radius: 4px;
  font-size: 13.5px;
}

.task-columns {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  align-items: start;
  overflow-x: auto;
}

.task-column {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  min-width: 200px;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.task-column.drag-over {
  background: rgba(108,63,166,0.08);
  border-color: var(--brass);
}
.task-column-completed {
  background: rgba(27,42,61,0.03);
}

.task-column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.task-column-count {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--text-dim);
}

.task-column-body {
  min-height: 40px;
}

.task-column-empty {
  font-size: 12.5px;
  color: #6B7688;
  font-style: italic;
  padding: 8px 2px;
}

.task-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 8px;
  cursor: grab;
}
.task-row:last-child { margin-bottom: 0; }
.task-row:active { cursor: grabbing; }
.task-row.is-dragging { opacity: 0.35; }
.task-row.is-done { opacity: 0.55; }
.task-row.is-done .task-title { text-decoration: line-through; }

.task-checkbox { width: auto; margin-top: 3px; }

.task-body { flex: 1; min-width: 0; }
.task-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-ink);
}
.task-desc {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 3px;
  word-break: break-word;
}

.task-category {
  display: inline-block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 3px;
}
.task-category.cat-required { background: rgba(192,57,43,0.12); color: #A8362A; }
.task-category.cat-recommended { background: rgba(192,138,62,0.15); color: var(--brass-deep); }
.task-category.cat-feature { background: rgba(62,146,112,0.15); color: var(--signal-deep); }
.task-category.cat-general { background: rgba(27,42,61,0.08); color: var(--text-dim); }
.task-category.cat-completed { background: rgba(27,42,61,0.10); color: var(--text-dim); }

.task-delete {
  background: none;
  border: none;
  color: #6B7688;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
}
.task-delete:hover { color: #C0392B; }

.fetch-schedule-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 20px;
}

.fetch-schedule-status {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-ink);
}

.fetch-schedule-next {
  font-size: 12.5px;
  color: var(--text-dim);
  margin-top: 4px;
}

.schedule-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}
.schedule-dot.active { background: var(--signal-deep); }
.schedule-dot.paused { background: #C0392B; }

#fetchLogsWrap table, #fetchLogsWrap th, #fetchLogsWrap td { background: var(--paper); }
#fetchLogsWrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.trigger-badge {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 3px;
  letter-spacing: 0.04em;
}
.trigger-scheduled { background: rgba(27,42,61,0.08); color: var(--text-dim); }
.trigger-manual { background: rgba(108,63,166,0.12); color: var(--brass-deep); }

.log-row-error { background: rgba(192,57,43,0.04); }
.log-ok { color: var(--signal-deep); font-weight: 600; font-size: 12.5px; }
.log-error { color: #A8362A; font-size: 12px; }

@media (max-width: 900px) {
  .admin-layout { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr; }
  .task-columns { grid-template-columns: 1fr; }
}
