/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
  /* ---- BoardTable brand tokens (source of truth) — Quorum direction, teal ---- */
  --teal:        #2c7c84;  /* accent: "table", active state, primary CTA (oklch .55 .10 200) */
  --teal-light:  #74b6bd;  /* accent on dark grounds (ink/navy) for contrast (oklch .74 .10 200) */
  --teal-dark:   #20606b;  /* teal pressed/hover; teal text on light grounds */

  --coral:       #e2725b;  /* warm accent — sparing highlights, eyebrows, stats */
  --coral-light: #ef9684;  /* coral on dark grounds for contrast */
  --coral-dark:  #c2543e;  /* coral pressed/hover */

  --onyx:        #141a24;  /* primary ink / dark display ground */
  --gold:        var(--teal);        /* legacy alias → teal accent */
  --gold-bright: var(--teal-light);  /* legacy alias → teal on dark */
  --bullion:     var(--teal-dark);   /* legacy alias → teal pressed/text-on-light */
  --navy:        #141a24;  /* legacy alias → ink (was old navy #15212f) */
  --gold-deep:   var(--teal-dark);   /* legacy alias → teal pressed (was old #a8842f) */
  --bone:        #f4f6f8;  /* light brand ground (cloud) */
  --slate:       #5e6776;  /* muted / secondary text */

  --ink-navy:    #141a24;  /* app nav / chrome (the sidebar) — ink */
  --ink-navy-2:  #1f2733;  /* chrome hover */
  --ink-navy-3:  #2a3340;  /* chrome active */
  --app-bg:      #f4f6f8;  /* app canvas (cloud) */
  --surface:     #ffffff;
  --ink:         #141a24;  /* primary body text on light */
  --on-navy-mute:#8a93a1;  /* muted text on dark chrome (faint) */
  --hair:        #dde2e9;  /* borders / dividers (line) */
  --hair-soft:   #e2e6ec;  /* soft divider (mist) */

  --ok:        #3e7c5a;  --ok-bg:     #e8f0ea;
  --warn:      #c7861f;  --warn-bg:   #f7eed9;
  --danger-c:  #b5462f;  --danger-bg: #f5e3dd;

  /* AI surface — teal-tinted light card, never a dark box */
  --ai-bg-top:   #eef6f7;
  --ai-bg-bottom:#dfeef0;
  --ai-border:   #c3dde0;
  --ai-text:     #1f4f55;
  --ai-accent:   var(--teal);

  /* ---- Type system: Space Grotesk (display/headings/wordmark) · IBM Plex Sans (body) · IBM Plex Mono (data labels) ---- */
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-serif:   "Space Grotesk", system-ui, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, monospace;
  --font-body:    "IBM Plex Sans", system-ui, sans-serif;

  /* ---- Legacy semantic vars remapped onto the brand (keeps all views in sync) ---- */
  --charcoal: var(--ink-navy);
  --primary: var(--ink-navy);
  --primary-dark: var(--ink-navy);
  --primary-light: var(--bullion);
  --accent: var(--gold);
  --accent-light: rgba(44,124,132,0.12);
  --bg: var(--app-bg);
  --sidebar-bg: var(--ink-navy);
  --sidebar-hover: var(--ink-navy-2);
  --text: var(--ink);
  --text-muted: var(--slate);
  --border: var(--hair);
  --success: var(--ok);
  --danger: var(--danger-c);
  --warning: var(--warn);
  --white: #ffffff;
  --shadow: 0 1px 3px rgba(14,14,16,0.10), 0 1px 2px rgba(14,14,16,0.06);
  --shadow-md: 0 4px 6px rgba(14,14,16,0.08), 0 2px 4px rgba(14,14,16,0.05);
  --shadow-lg: 0 10px 15px rgba(14,14,16,0.10), 0 4px 6px rgba(14,14,16,0.06);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 14px;
  --nav-height: 60px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 15px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body), system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-weight: 460;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-serif), Georgia, serif;
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: -0.01em;
  color: var(--primary-dark);
}

h1 { font-size: 1.9rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; }

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-light);
}

input, textarea, select {
  font-family: inherit;
  font-size: 0.9rem;
}

/* ============================================================
   UTILITY
   ============================================================ */
.hidden { display: none !important; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.85rem; }
.text-center { text-align: center; }
.w-full { width: 100%; }

/* ============================================================
   NAVIGATION
   ============================================================ */
:root {
  --side-w: 252px;
  --topbar-h: 60px;
}

body:not(.is-admin) .admin-only { display: none; }

/* ---- Left sidebar -------------------------------------------------- */
.app-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--side-w);
  background: var(--ink-navy);
  border-right: 1px solid rgba(255,255,255,0.06);
  z-index: 200;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.side-brand {
  flex: 0 0 auto;
  padding: 1.05rem 1.15rem 0.9rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.side-collapse-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  color: rgba(244,241,234,0.7);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.side-collapse-btn:hover { background: rgba(255,255,255,0.12); color: var(--bone); }
.side-collapse-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
/* The in-sidebar collapse control only applies on desktop; the drawer handles mobile */
@media (max-width: 900px) { .side-collapse-btn { display: none; } }
.side-brand-logo { display: inline-flex; align-items: center; text-decoration: none; }
/* Make the sidebar wordmark a touch larger so the brand has presence */
.side-brand .nav-lockup__wm { font-size: 25px; }
.nav-brand-tagline {
  display: block;
  font-family: var(--font-mono), 'IBM Plex Mono', monospace;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal-light);
  white-space: nowrap;
}
.side-org-name {
  margin-top: 0.55rem;
  color: rgba(244,241,234,0.62);
  font-family: var(--font-mono), 'IBM Plex Mono', monospace;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.side-org-name:empty { display: none; }

/* Search + AI launcher */
.side-tools {
  flex: 0 0 auto;
  padding: 0.85rem 0.85rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.side-search { position: relative; }
.side-search-input {
  width: 100%;
  height: 36px;
  padding: 0 0.7rem;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  color: var(--bone);
  font-family: var(--font-body), 'Hanken Grotesk', sans-serif;
  font-size: 0.82rem;
  transition: border-color 0.15s, background 0.15s;
}
/* Win over the legacy `.nav-search input { width:140px }` rule (higher
   specificity) so the sidebar search spans the full menu width. */
.side-search .side-search-input { width: 100%; border-radius: var(--radius-sm); padding: 0 0.7rem; height: 36px; }
.side-search-input::placeholder { color: rgba(244,241,234,0.4); }
.side-search-input:focus {
  outline: none;
  background: rgba(255,255,255,0.1);
  border-color: var(--gold);
}
.side-search .search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 1000;
}
.side-ai-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  height: 38px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-bright) 100%);
  color: var(--onyx);
  font-family: var(--font-mono), 'IBM Plex Mono', monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: filter 0.15s, transform 0.05s;
}
.side-ai-btn:hover { filter: brightness(1.06); }
.side-ai-btn:active { transform: translateY(1px); }

/* Grouped nav */
.side-nav {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0.35rem 0.6rem 0.6rem;
}
.side-nav::-webkit-scrollbar { width: 8px; }
.side-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 4px; }
.side-group { margin-top: 0.85rem; }
.side-group:first-child { margin-top: 0.4rem; }
.side-group-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0 0.65rem 0.4rem;
  color: rgba(244,241,234,0.5);
  font-family: var(--font-mono), 'IBM Plex Mono', monospace;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
/* Neutral typographic lead-in for group labels — a quiet hairline tick, not
   a coloured status dot (a red square here read as an error/alert). */
.side-group-label::before {
  content: "";
  width: 10px;
  height: 1px;
  border-radius: 0;
  background: rgba(244,241,234,0.28);
  flex-shrink: 0;
}
.side-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  color: rgba(244,241,234,0.78);
  font-size: 0.86rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
}
.side-ico { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.85; }
.side-link:hover { background: rgba(255,255,255,0.06); color: var(--bone); }
.side-link.active {
  background: rgba(44,124,132,0.13);
  color: var(--gold-bright);
  font-weight: 600;
}
.side-link.active::before {
  content: "";
  position: absolute;
  left: -0.6rem;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 22px;
  border-radius: 0 3px 3px 0;
  background: var(--gold-bright);
}
.side-link.active .side-ico { opacity: 1; color: var(--gold-bright); }
.side-sublink {
  padding-left: 2.55rem;
  font-size: 0.8rem;
  color: rgba(244,241,234,0.6);
}

/* Collapsible nav group (Registers) */
.side-group-toggle {
  width: 100%;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}
.side-caret {
  width: 14px;
  height: 14px;
  margin-left: auto;
  opacity: 0.55;
  transition: transform 0.16s ease;
}
.side-group-toggle[aria-expanded="false"] .side-caret { transform: rotate(-90deg); }
.side-subgroup {
  overflow: hidden;
  max-height: 40rem;
  transition: max-height 0.2s ease;
}
.side-subgroup.collapsed { max-height: 0; }

/* ============================================================
   5x5 RISK MATRIX
   ============================================================ */
.risk-matrix-wrap { width: 100%; }
.rm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}
.rm-title { margin: 0; font-size: 1.05rem; }
.rm-sub { font-size: 0.75rem; color: var(--text-muted); font-weight: 500; margin-left: 0.4rem; }
.rm-legend { display: flex; gap: 0.9rem; flex-wrap: wrap; }
.rm-legend-item { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.72rem; color: var(--text-muted); }
.rm-legend-swatch { width: 13px; height: 13px; border-radius: 3px; display: inline-block; }
.rm-scroll { overflow-x: auto; }
.risk-matrix {
  border-collapse: separate;
  border-spacing: 4px;
  width: 100%;
  min-width: 560px;
  table-layout: fixed;
}
.risk-matrix th, .risk-matrix td { text-align: center; }
.rm-corner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  font-size: 0.62rem;
  color: var(--text-muted);
  line-height: 1.3;
  font-weight: 600;
  padding: 0.2rem;
}
.rm-axis { padding: 0.3rem 0.2rem; }
.rm-axis-num {
  display: block;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--ink-navy, #141a24);
}
.rm-axis-lbl {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.2;
}
.rm-axis-y { width: 92px; text-align: right; padding-right: 0.5rem; }
.rm-cell {
  position: relative;
  height: 58px;
  border-radius: 7px;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s, outline 0.1s;
  vertical-align: middle;
}
.rm-cell:hover { transform: scale(1.04); box-shadow: 0 3px 10px rgba(0,0,0,0.18); z-index: 2; }
.rm-cell-sel { outline: 3px solid #0b0f16; outline-offset: 1px; z-index: 3; }
.rm-rating { display: block; font-size: 0.78rem; font-weight: 700; opacity: 0.85; }
.rm-count {
  position: absolute;
  top: 3px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: rgba(0,0,0,0.32);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 18px;
}
.rm-active-note {
  margin-top: 0.85rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* User footer */
.side-user {
  flex: 0 0 auto;
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 0.6rem;
}
.side-user-btn {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.45rem 0.55rem;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  transition: background 0.12s;
}
.side-user-btn:hover { background: rgba(255,255,255,0.06); }
.side-user-meta { display: flex; flex-direction: column; gap: 0.1rem; flex: 1; min-width: 0; }
.side-user-name {
  color: var(--bone);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.side-user-chevron { color: rgba(244,241,234,0.5); font-size: 0.7rem; }
/* The footer reuses .nav-dd for its dropdown behaviour, but .nav-dd sets
   display:inline-flex (meant for inline topbar menus). On a full-width footer
   that mis-sizes the box, so the account button and the upward menu render
   against a content-width context and the open menu fails to cleanly cover the
   nav links above it. Force a normal full-width block here. */
.side-user.nav-dd { display: block; width: 100%; }
.side-user .nav-dd-menu-up { top: auto; bottom: calc(100% + 4px); left: 0.55rem; right: 0.55rem; }
/* Solid, opaque menu so nothing behind it bleeds through when it opens upward. */
.side-user .nav-dd-menu-up { background: var(--white); box-shadow: 0 -8px 24px rgba(0,0,0,0.22); }

/* ---- Top bar ------------------------------------------------------- */
.app-topbar {
  position: fixed;
  top: 0;
  left: var(--side-w);
  right: 0;
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--hair);
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
}
.topbar-left { display: flex; align-items: center; gap: 0.85rem; min-width: 0; }
.topbar-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: none;
  border: 1px solid var(--hair);
  border-radius: var(--radius-sm);
  color: var(--ink);
  cursor: pointer;
}
.topbar-breadcrumb {
  font-family: var(--font-display), 'Spectral', serif;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Organisation chip (name + logo) in the header */
.topbar-org { display: inline-flex; align-items: center; gap: 0.55rem; min-width: 0; flex: 0 1 auto; position: relative; }
.topbar-org-logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; flex: 0 0 auto;
  border-radius: 8px;
  background: var(--navy, #141a24);
  color: var(--gold-bright, #74b6bd);
  font-family: var(--font-mono), 'IBM Plex Mono', monospace;
  font-size: 0.95rem; font-weight: 700; line-height: 1;
  overflow: hidden;
}
/* When a real logo image is uploaded, let it breathe: taller, free width. */
.topbar-org-logo.has-img {
  background: transparent;
  width: auto; height: 46px; max-width: 230px;
  border-radius: 4px;
}
.topbar-org-logo img { width: auto; height: 100%; max-width: 230px; object-fit: contain; border-radius: 4px; }
.topbar-org-name {
  font-size: 0.95rem; font-weight: 600; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 22ch;
}
.topbar-divider { width: 1px; height: 22px; background: var(--hair); flex: 0 0 auto; }
.topbar-right { display: flex; align-items: center; gap: 0.75rem; flex: 0 0 auto; }
.topbar-convene { display: inline-flex; align-items: center; gap: 0.4rem; }
/* Live date & time in the header (replaces the old Add Meeting button) */
.topbar-clock {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--hair);
  border-radius: var(--radius-sm);
  background: var(--bg-card, transparent);
  line-height: 1.1; white-space: nowrap;
}
.topbar-clock-day {
  font-family: var(--font-display), 'Spectral', serif;
  font-size: 1.05rem; font-weight: 600; color: var(--ink);
}
.topbar-clock-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 0.05rem; }
.topbar-clock-date { font-size: 0.72rem; color: var(--ink-soft, #6b7280); }
.topbar-clock-time {
  font-family: var(--font-mono), 'IBM Plex Mono', monospace;
  font-size: 0.85rem; font-weight: 600; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 600px) {
  .topbar-clock { padding: 0.25rem 0.5rem; gap: 0.4rem; }
  .topbar-clock-day { display: none; }
}

/* Mobile drawer scrim */
.sidebar-scrim {
  position: fixed;
  inset: 0;
  background: rgba(14,14,16,0.5);
  z-index: 190;
  opacity: 1;
  transition: opacity 0.2s;
}

/* ============================================================
   APP CONTENT
   ============================================================ */
.app-content {
  min-height: 100vh;
  margin-left: var(--side-w);
  padding-top: var(--topbar-h);
}

.app-content.no-nav {
  margin-left: 0;
  padding-top: 0;
}

/* ---- Responsive: collapse sidebar into a drawer -------------------- */
@media (max-width: 900px) {
  .app-sidebar {
    transform: translateX(-100%);
    transition: transform 0.24s ease;
    box-shadow: 0 0 40px rgba(0,0,0,0.4);
  }
  .app-sidebar.open { transform: translateX(0); }
  .app-topbar { left: 0; }
  .app-content { margin-left: 0; }
  .app-footer { margin-left: 0; }
  .topbar-menu-btn { display: inline-flex; }
}

/* ---- Desktop: optional collapse to reclaim screen space ------------ */
@media (min-width: 901px) {
  .app-sidebar { transition: transform 0.24s ease; }
  .app-topbar { transition: left 0.24s ease; }
  .app-content { transition: margin-left 0.24s ease; }
  body.sidebar-collapsed .app-sidebar { transform: translateX(-100%); }
  body.sidebar-collapsed .app-topbar { left: 0; }
  body.sidebar-collapsed .app-content { margin-left: 0; }
  body.sidebar-collapsed .app-footer { margin-left: 0; }
  /* When collapsed, surface the hamburger in the topbar to bring it back */
  body.sidebar-collapsed .topbar-menu-btn { display: inline-flex; }
}
/* On phones, keep the org logo but drop the name + divider to save room */
@media (max-width: 600px) {
  .topbar-org-name { display: none; }
  .topbar-divider { display: none; }
}

.page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.page-title {
  font-size: 1.75rem;
  color: var(--primary-dark);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
  font-family: inherit;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-light);
  color: var(--white);
}

/* Teal primary — reserved for the single primary action of a view. */
.btn-teal {
  background: var(--teal);
  color: #fff;
  border: 1px solid var(--teal);
}
.btn-teal:hover:not(:disabled) {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
  color: #fff;
}

.btn-accent {
  background: var(--accent);
  color: #fff;
}

.btn-accent:hover:not(:disabled) {
  background: #b01f1e;
  color: var(--primary-dark);
}

.btn-ghost {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.3);
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(255,255,255,0.1);
  color: var(--white);
}

.btn-ghost-dark {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost-dark:hover:not(:disabled) {
  background: var(--bg);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
}

.btn-danger:hover:not(:disabled) {
  background: #b91c1c;
  color: var(--white);
}

/* Quiet, low-emphasis destructive action — for inside edit forms */
.btn-link-danger {
  background: none;
  border: none;
  color: var(--text-muted, #6b7280);
  padding: 0.3rem 0.4rem;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.btn-link-danger:hover:not(:disabled) {
  background: none;
  color: var(--danger);
}

.btn-success {
  background: var(--success);
  color: var(--white);
}

.btn-sm {
  padding: 0.3rem 0.75rem;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 0.7rem 1.6rem;
  font-size: 1rem;
}

.btn-icon {
  padding: 0.4rem;
  border-radius: var(--radius-sm);
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-header {
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header h3 {
  font-size: 1rem;
  margin: 0;
}

.card-body {
  padding: 1.4rem;
}

.card-footer {
  padding: 1rem 1.4rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-draft {
  background: #e5e7eb;
  color: #374151;
}

.badge-published {
  background: #dcfce7;
  color: #15803d;
}

.badge-archived {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge-admin {
  background: var(--accent-light);
  color: var(--text-muted);
}

.badge-director {
  background: #e0e7f5;
  color: var(--primary);
}

.badge-active {
  background: #dcfce7;
  color: #15803d;
}

.badge-inactive {
  background: #fee2e2;
  color: #b91c1c;
}

.badge-success { background: #dcfce7; color: #15803d; }
.badge-warning { background: #fef3c7; color: #b45309; }
.badge-info    { background: #dbeafe; color: #1d4ed8; }
.badge-danger  { background: #fee2e2; color: #b91c1c; }

/* ============================================================
   FORMS
   ============================================================ */
.form-group {
  margin-bottom: 1.1rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.form-label .required {
  color: var(--danger);
  margin-left: 2px;
}

.form-control {
  display: block;
  width: 100%;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--text);
  font-size: 0.9rem;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,58,92,0.12);
}

.form-control::placeholder {
  color: #b0aaa2;
}

textarea.form-control {
  resize: vertical;
  min-height: 90px;
}

select.form-control {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.25rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-error {
  color: var(--danger);
  font-size: 0.8rem;
  margin-top: 0.3rem;
}

/* Upload zone */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  background: var(--bg);
  transition: border-color 0.2s;
  cursor: pointer;
}

.upload-zone:hover {
  border-color: var(--primary);
}

.upload-zone .upload-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.upload-zone p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--onyx) 0%, var(--ink-navy) 55%, var(--ink-navy-3) 100%);
  padding: 1rem;
}

.login-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 420px;
  overflow: hidden;
}

.login-header {
  background: var(--primary-dark);
  padding: 2.5rem 2rem;
  text-align: center;
  border-bottom: 3px solid var(--accent);
}

.login-monogram {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  line-height: 0;
  width: fit-content;
}

.login-org-name {
  color: var(--white);
  font-family: var(--font-body), system-ui, sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.login-tagline {
  color: var(--accent-light);
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.03em;
}

.login-body {
  padding: 2rem;
}

.login-error {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: var(--danger);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.9rem;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

/* ============================================================
   DASHBOARD
   ============================================================ */
.section-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

.meeting-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.meeting-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.1s;
  overflow: hidden;
}

.meeting-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.meeting-card-header {
  background: var(--primary-dark);
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.meeting-card-header .meeting-title {
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 700;
  font-family: var(--font-body), system-ui, sans-serif;
  line-height: 1.3;
}

.meeting-card-body {
  padding: 1.1rem 1.25rem;
}

.meeting-meta {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 1rem;
}

.meeting-meta-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.meeting-meta-icon {
  flex-shrink: 0;
  font-size: 0.9rem;
  margin-top: 0.05rem;
  color: var(--text-muted);
}
.meeting-meta-icon svg { display: block; }

.meeting-meta-value {
  color: var(--text);
  font-weight: 500;
}

.meeting-date-display {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.9rem;
}

.meeting-card-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state h3 {
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

/* ============================================================
   MEETING BOOK LAYOUT (3-column)
   ============================================================ */
.meeting-book {
  display: flex;
  height: calc(100vh - var(--nav-height));
  overflow: hidden;
  position: relative;
}

/* TOC Sidebar (the meeting's agenda rail) — a distinct lighter slate so it reads as
   part of the meeting book, separate from the near-black app navigation beside it. */
.meeting-toc {
  width: 240px;
  flex-shrink: 0;
  background: #243140;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  border-right: 1px solid rgba(0,0,0,0.35);
  box-shadow: inset 4px 0 0 var(--teal);
}

.toc-header {
  position: relative;
  padding: 1.25rem 1rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* Collapse control on the agenda rail */
.toc-collapse-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.65rem;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.75);
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.toc-collapse-btn:hover { background: rgba(255,255,255,0.14); color: #fff; }

/* Reopen tab — visible only when the agenda rail is collapsed */
.toc-reopen-btn {
  display: none;
  position: absolute;
  top: calc(var(--nav-height) + 0.75rem);
  left: 0.75rem;
  z-index: 20;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.7rem;
  border: none;
  background: #243140;
  color: #fff;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
}
.toc-reopen-btn:hover { background: #2c3b4d; }
.meeting-book.toc-collapsed .meeting-toc { display: none; }
.meeting-book.toc-collapsed .toc-reopen-btn { display: flex; }

.toc-meeting-title {
  color: var(--white);
  font-family: var(--font-body), system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.75rem;
  padding-right: 1.75rem;
}

.toc-back-link {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--accent-light);
  font-size: 0.8rem;
  opacity: 0.8;
  transition: opacity 0.15s;
}

.toc-back-link:hover {
  opacity: 1;
  color: var(--accent-light);
}

.toc-section-label {
  padding: 0.85rem 1rem 0.4rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.35);
}

.toc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all 0.15s;
  color: rgba(255,255,255,0.65);
  font-size: 0.82rem;
}

.toc-item:hover {
  background: var(--sidebar-hover);
  color: var(--white);
}

.toc-item.active {
  background: rgba(215,43,42,0.12);
  border-left-color: var(--accent);
  color: var(--accent);
}

.toc-item-title {
  flex: 1;
  line-height: 1.3;
}

.toc-doc-badge {
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.6);
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  font-size: 0.7rem;
  flex-shrink: 0;
  margin-left: 0.5rem;
}

.toc-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 0.75rem 0;
}

.toc-footer-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  color: rgba(255,255,255,0.55);
  font-size: 0.82rem;
  transition: all 0.15s;
}

.toc-footer-link:hover {
  color: var(--accent-light);
  background: var(--sidebar-hover);
}

/* Main content */
.meeting-main {
  flex: 1;
  overflow-y: auto;
  background: var(--bg);
  min-width: 0;
}

.meeting-main-inner {
  padding: 1.5rem;
  max-width: 900px;
}

.meeting-header-block {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.meeting-header-block h1 {
  font-size: 1.6rem;
  color: var(--primary-dark);
  margin-bottom: 0.75rem;
}

.meeting-header-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.meeting-header-meta span {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.meeting-header-meta svg { color: var(--teal); flex: none; }

/* Meeting action bar — one teal primary, ghost secondaries, "More" overflow */
.meeting-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: flex-start;
}
.meeting-actions .btn { display: inline-flex; align-items: center; gap: 0.4rem; }
.meeting-actions .btn svg { flex: none; }

.more-wrap { position: relative; }
.more-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 40;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 0.4rem;
  min-width: 215px;
  display: flex;
  flex-direction: column;
}
.more-menu[hidden] { display: none; }
.more-menu button {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
}
.more-menu button svg { flex: none; }
.more-menu button:hover { background: var(--bg); }
.more-menu button.warn { color: var(--danger); }
.more-menu button.warn:hover { background: #fef2f2; }
.more-sep { height: 1px; background: var(--border); margin: 0.3rem 0.2rem; }

.rsvp-btn-detail { display: inline-flex; align-items: center; gap: 0.35rem; }
.rsvp-btn-detail svg { flex: none; }
.rsvp-btn-tick { display: inline-flex; align-items: center; gap: 0.3rem; }
.rsvp-btn-tick svg { flex: none; }
/* Inline icon inside a badge/chip (e.g. "Upcoming" calendar mark) */
.badge svg { vertical-align: -2px; margin-right: 2px; }

.section-block {
  margin-bottom: 1.25rem;
}

.section-heading {
  font-size: 1rem;
  color: var(--primary);
  padding: 0.6rem 0;
  margin-bottom: 0.6rem;
  border-bottom: 2px solid var(--accent-light);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-heading-number {
  color: var(--accent);
}

/* Section numbering + sub-sections */
.section-num,
.toc-item-num {
  font-weight: 700;
  color: var(--teal, #2c7c84);
  margin-right: 0.35rem;
}
.section-block-sub .section-heading {
  font-size: 0.92rem;
  border-bottom-width: 1px;
}
.toc-item-sub {
  padding-left: 1.5rem;
  font-size: 0.86rem;
  opacity: 0.92;
}
.section-list-item-sub {
  background: #fafafa;
}

/* Document rows */
.document-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.document-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: border-color 0.15s;
}

.document-row:hover {
  border-color: var(--primary);
}

.doc-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.doc-icon-pdf { background: #fee2e2; }
.doc-icon-word { background: #dbeafe; }
.doc-icon-excel { background: #dcfce7; }
.doc-icon-image { background: #fef3c7; }
.doc-icon-other { background: #f3f4f6; }

.doc-info {
  flex: 1;
  min-width: 0;
}

.doc-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.doc-size {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.doc-actions {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}

/* Annotation Panel */
.meeting-annotations {
  width: 300px;
  flex-shrink: 0;
  background: var(--white);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Collapsible annotation panel */
.annotation-collapse-btn {
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-muted);
  border-radius: 6px;
  width: 26px;
  height: 26px;
  line-height: 1;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.annotation-collapse-btn:hover {
  background: var(--bg);
  color: var(--primary);
}
.annotation-reopen-btn {
  display: none;
  position: absolute;
  top: calc(var(--nav-height) + 0.75rem);
  right: 0.75rem;
  z-index: 20;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--primary);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.annotation-reopen-btn:hover {
  background: var(--bg);
}
.meeting-book.annotations-collapsed .meeting-annotations {
  display: none;
}
.meeting-book.annotations-collapsed .annotation-reopen-btn {
  display: flex;
}
.meeting-book.annotations-collapsed .meeting-main-inner {
  max-width: 1200px;
}

.annotation-panel-header {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.annotation-panel-header h3 {
  font-size: 0.95rem;
  margin: 0;
}

.annotation-count {
  background: var(--accent-light);
  color: var(--text-muted);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.annotation-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.annotation-tab {
  flex: 1;
  padding: 0.55rem;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  border-bottom: 2px solid transparent;
  font-family: inherit;
}

.annotation-tab.active {
  color: var(--primary);
  border-bottom-color: var(--accent);
}

.annotation-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.annotation-item {
  border-radius: var(--radius);
  padding: 0.75rem;
  font-size: 0.85rem;
  border: 1px solid var(--border);
}

.annotation-item.private {
  background: var(--bg);
  border-color: #d1cdc7;
}

.annotation-item.shared {
  background: var(--accent-light);
  border-color: rgba(215,43,42,0.3);
}

.annotation-item-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.annotation-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
}

.annotation-meta {
  flex: 1;
  min-width: 0;
}

.annotation-user {
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.annotation-time {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.annotation-page {
  font-size: 0.72rem;
  color: var(--text-muted);
  padding: 0.1rem 0.4rem;
  background: rgba(0,0,0,0.06);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.annotation-text {
  color: var(--text);
  line-height: 1.5;
}

.annotation-visibility {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

.annotation-panel-footer {
  padding: 0.75rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.annotation-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.annotation-empty-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  opacity: 0.4;
}

/* Add annotation form in panel */
.annotation-add-form {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem;
  margin-top: 0.5rem;
}

.annotation-add-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  font-size: 0.85rem;
  resize: vertical;
  min-height: 70px;
  font-family: inherit;
}

.annotation-visibility-toggle {
  display: flex;
  gap: 0.75rem;
  margin: 0.6rem 0;
}

.annotation-visibility-toggle label {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  cursor: pointer;
  color: var(--text);
}

.annotation-add-actions {
  display: flex;
  gap: 0.4rem;
  justify-content: flex-end;
}

/* ============================================================
   PDF VIEWER
   ============================================================ */
.pdf-viewer-container {
  width: 100%;
}

.pdf-viewer-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}

.pdf-page-info {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}

.pdf-pages {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pdf-page-wrapper {
  position: relative;
  display: inline-block;
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--white);
  line-height: 0;
}

.pdf-page-wrapper canvas {
  display: block;
  max-width: 100%;
}

.pdf-annotation-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

.annotation-marker {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  transition: transform 0.1s;
  z-index: 10;
}

.annotation-marker:hover {
  transform: translate(-50%, -50%) scale(1.25);
}

.annotation-marker.private {
  background: var(--white);
  border: 2.5px solid var(--accent);
  color: var(--accent);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.annotation-marker.shared {
  background: var(--accent);
  border: 2px solid #b01f1e;
  color: var(--primary-dark);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Annotation popup (on PDF) */
.annotation-popup {
  position: absolute;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 0.75rem;
  width: 220px;
  z-index: 20;
  font-size: 0.85rem;
}

.annotation-popup-close {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1rem;
  padding: 0.1rem 0.3rem;
  line-height: 1;
}

.annotation-popup-user {
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--primary);
  margin-bottom: 0.3rem;
}

.annotation-popup-text {
  color: var(--text);
  line-height: 1.5;
}

/* Add annotation inline popup */
.annotation-add-popup {
  position: absolute;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 0.85rem;
  width: 240px;
  z-index: 25;
}

.annotation-add-popup textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.5rem;
  font-size: 0.85rem;
  resize: none;
  height: 70px;
  font-family: inherit;
  margin-bottom: 0.5rem;
}

.annotation-add-popup textarea:focus {
  outline: none;
  border-color: var(--primary);
}

/* Non-PDF file display */
.non-pdf-display {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.non-pdf-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.non-pdf-display h3 {
  margin-bottom: 0.5rem;
}

.non-pdf-display p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

/* ============================================================
   QUESTIONS VIEW
   ============================================================ */
.questions-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.breadcrumb a {
  color: var(--primary);
}

.breadcrumb-sep {
  color: var(--border);
}

.questions-submit-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow);
}

.questions-submit-card h3 {
  font-size: 1rem;
  margin-bottom: 0.85rem;
}

.question-thread {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.question-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.question-bubble {
  padding: 1rem 1.25rem;
}

.question-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.question-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.question-user-info {
  flex: 1;
}

.question-user-name {
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--text);
}

.question-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.question-text {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.6;
  padding: 0.75rem 0.85rem;
  background: var(--bg);
  border-radius: var(--radius);
  border-left: 3px solid var(--border);
}

.question-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.question-response {
  background: var(--accent-light);
  border-top: 1px solid rgba(215,43,42,0.3);
  padding: 1rem 1.25rem;
}

.question-response-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.question-response-text {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.6;
}

.question-reply-form {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 1rem 1.25rem;
}

.question-reply-form h4 {
  font-size: 0.85rem;
  margin-bottom: 0.6rem;
}

/* ============================================================
   ADMIN DASHBOARD
   ============================================================ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  text-align: center;
}

.stat-value {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--primary);
  font-family: var(--font-body), system-ui, sans-serif;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================================
   TABLE
   ============================================================ */
.table-wrapper {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  /* Allow wide tables (e.g. the user list with its action buttons) to scroll
     horizontally instead of being clipped on the right-hand edge. */
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  box-shadow: var(--shadow);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
  vertical-align: middle;
}

.table tr:last-child td {
  border-bottom: none;
}

.table tr:hover td {
  background: #fdfcfb;
}

.table-actions {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  flex-wrap: wrap;
}

/* ============================================================
   USER LIST
   ============================================================ */
.user-avatar-lg {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.user-row-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ============================================================
   ADMIN MEETING FORM
   ============================================================ */
.admin-form-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.form-section {
  margin-bottom: 1.75rem;
}

.form-section-title {
  font-size: 1rem;
  color: var(--primary-dark);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent-light);
}

.section-list-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.85rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
}

.section-list-item .section-name {
  flex: 1;
  font-weight: 500;
  font-size: 0.9rem;
}

.section-list-item .section-doc-count {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.section-order-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.15rem 0.4rem;
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: all 0.1s;
}

.section-order-btn:hover {
  background: var(--white);
  color: var(--text);
}

.add-section-form {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-top: 0.75rem;
}

.uploaded-doc-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.85rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.4rem;
  font-size: 0.875rem;
}

.uploaded-doc-name {
  flex: 1;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.uploaded-doc-section {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.uploaded-doc-size {
  color: var(--text-muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,35,56,0.55);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 520px;
  overflow: hidden;
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 1.1rem;
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1.3rem;
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-sm);
  line-height: 1;
  transition: all 0.1s;
}

.modal-close:hover {
  background: var(--bg);
  color: var(--text);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* ============================================================
   MEETING WORKFLOW STEPPER
   ============================================================ */
.workflow-stepper {
  display: flex;
  align-items: center;
  width: 100%;
  overflow-x: auto;
}
.workflow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  flex: 0 0 auto;
  min-width: 64px;
}
.workflow-step-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  border: 2px solid var(--border);
  background: var(--white);
  color: var(--text-muted);
  transition: all 0.15s;
}
.workflow-step-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.workflow-step.done .workflow-step-dot {
  border-color: var(--teal, #2c7c84);
  background: var(--teal, #2c7c84);
  color: #fff;
}
.workflow-step.current .workflow-step-dot {
  border-color: var(--teal, #2c7c84);
  color: var(--teal, #2c7c84);
  box-shadow: 0 0 0 4px rgba(44,124,132,0.15);
}
.workflow-step.current .workflow-step-label {
  color: var(--text);
  font-weight: 600;
}
.workflow-step-line {
  flex: 1 1 auto;
  height: 2px;
  min-width: 16px;
  background: var(--border);
  margin: 0 -4px;
  align-self: flex-start;
  margin-top: 16px;
}
.workflow-step-line.done {
  background: var(--teal, #2c7c84);
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 0.75rem 1.1rem;
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  pointer-events: auto;
  animation: slideInToast 0.25s ease;
  max-width: 340px;
  border-left-width: 4px;
}

.toast.success {
  border-left-color: var(--success);
}

.toast.error {
  border-left-color: var(--danger);
}

.toast.warning {
  border-left-color: var(--warning);
}

.toast.info {
  border-left-color: var(--primary);
}

.toast-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.toast-dismiss {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1rem;
  padding: 0;
  line-height: 1;
}

@keyframes slideInToast {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ============================================================
   LOADING SPINNER
   ============================================================ */
.loading-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-inline {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  padding: 1rem;
}

.spinner-sm {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

/* ============================================================
   WELCOME PANEL (in meeting view when no doc selected)
   ============================================================ */
.welcome-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.welcome-panel-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.welcome-panel h2 {
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.welcome-panel p {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 400px;
  margin: 0 auto;
}

/* ============================================================
   MISC HELPERS
   ============================================================ */
.divider {
  height: 1px;
  background: var(--border);
  margin: 1.25rem 0;
}

.alert {
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  border-left: 4px solid;
}

.alert-info {
  background: #eff6ff;
  border-color: var(--primary-light);
  color: var(--primary-dark);
}

.alert-warning {
  background: #fffbeb;
  border-color: var(--warning);
  color: var(--text-muted);
}

.progress-bar-wrap {
  height: 6px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.progress-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.3s;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .meeting-annotations {
    width: 260px;
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .meeting-book {
    flex-direction: column;
  }

  .meeting-toc {
    width: 100%;
    max-height: 200px;
  }

  .meeting-annotations {
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--border);
    max-height: 300px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .nav-logo-text {
    display: none;
  }
}

/* ============================================================
   RESOURCES
   ============================================================ */
.resource-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.resource-card { background: white; border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); transition: transform 0.15s, box-shadow 0.15s; }
.resource-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.resource-card-header { display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 0.75rem; }
.resource-file-icon { font-size: 2rem; flex-shrink: 0; }
.resource-meta { flex: 1; }
.resource-title { font-weight: 600; color: var(--primary-dark); margin-bottom: 0.25rem; }
.resource-category-badge { font-size: 0.7rem; font-weight: 600; padding: 0.15rem 0.5rem; border-radius: 20px; background: var(--accent-light); color: var(--primary); text-transform: uppercase; letter-spacing: 0.05em; }
.resource-description { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.75rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.resource-footer { display: flex; align-items: center; justify-content: space-between; font-size: 0.8rem; color: var(--text-muted); }
.category-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.category-pill { padding: 0.35rem 0.9rem; border-radius: 20px; border: 1.5px solid var(--border); background: white; cursor: pointer; font-size: 0.85rem; font-weight: 500; transition: all 0.15s; }
.category-pill:hover { border-color: var(--primary); color: var(--primary); }
.category-pill.active { background: var(--primary); color: white; border-color: var(--primary); }

/* ============================================================
   PROFILE
   ============================================================ */
.profile-page { max-width: 700px; }
.profile-header { display: flex; align-items: center; gap: 1.5rem; padding: 1.5rem; background: white; border-radius: var(--radius-lg); box-shadow: var(--shadow); margin-bottom: 1.5rem; }
.profile-avatar-large { width: 90px; height: 90px; border-radius: 50%; object-fit: cover; border: 3px solid var(--accent); flex-shrink: 0; }
.profile-avatar-initials { width: 90px; height: 90px; border-radius: 50%; background: var(--primary); color: white; display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 700; flex-shrink: 0; border: 3px solid var(--accent); }
.profile-header-info h2 { margin-bottom: 0.25rem; }
.profile-edit-form { background: white; border-radius: var(--radius-lg); padding: 1.5rem; box-shadow: var(--shadow); }
.photo-upload-area { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.profile-grid-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.board-directory { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.director-card { background: white; border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); text-align: center; }
.director-card .profile-avatar-large, .director-card .profile-avatar-initials { width: 70px; height: 70px; margin: 0 auto 0.75rem; font-size: 1.5rem; }
.director-card h4 { margin-bottom: 0.25rem; }
.director-card .director-position { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.director-contact { font-size: 0.8rem; color: var(--text-muted); }

/* ============================================================
   MESSAGE BOARD
   ============================================================ */
.post-list { display: flex; flex-direction: column; gap: 0.75rem; }
.post-card { background: white; border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); cursor: pointer; transition: transform 0.15s, box-shadow 0.15s; border-left: 4px solid transparent; }
.post-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.post-card.pinned { border-left-color: var(--accent); }
.post-card-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; }
.post-category-badge { font-size: 0.7rem; font-weight: 700; padding: 0.15rem 0.5rem; border-radius: 20px; text-transform: uppercase; letter-spacing: 0.05em; }
.post-category-badge.General { background: #e5e7eb; color: #374151; }
.post-category-badge.Announcement { background: #fef3c7; color: #92400e; }
.post-category-badge.Discussion { background: #dbeafe; color: #1e40af; }
.post-category-badge.Question { background: #d1fae5; color: #065f46; }
.post-title { font-weight: 700; color: var(--primary-dark); font-size: 1rem; margin-bottom: 0.35rem; }
.post-preview { font-size: 0.85rem; color: var(--text-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-footer { display: flex; align-items: center; gap: 1rem; margin-top: 0.75rem; font-size: 0.8rem; color: var(--text-muted); }
.reply-count { display: flex; align-items: center; gap: 0.25rem; }
.single-post { max-width: 800px; }
.post-content-block { background: white; border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); margin-bottom: 1.5rem; white-space: pre-wrap; line-height: 1.7; }
.replies-section h3 { margin-bottom: 1rem; }
.reply-card { background: white; border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); margin-bottom: 0.75rem; }
.reply-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.reply-form { background: white; border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); margin-top: 1rem; }

/* ============================================================
   CALENDAR
   ============================================================ */
.calendar-layout { display: grid; grid-template-columns: 1fr 340px; gap: 1.5rem; align-items: start; }
.calendar-grid-container { background: white; border-radius: var(--radius-lg); padding: 1.25rem; box-shadow: var(--shadow); }
.calendar-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.calendar-month-title { font-size: 1.1rem; font-weight: 700; color: var(--primary-dark); }
.calendar-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 4px; }
.calendar-weekday { text-align: center; font-size: 0.75rem; font-weight: 600; color: var(--text-muted); padding: 0.25rem; text-transform: uppercase; }
.calendar-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.calendar-day { min-height: 70px; padding: 0.35rem; border-radius: var(--radius-sm); cursor: default; position: relative; }
.calendar-day.other-month { opacity: 0.3; }
.calendar-day.today { background: var(--accent-light); }
.calendar-day.today .day-number { color: var(--primary); font-weight: 700; }
.calendar-day.has-events { cursor: pointer; }
.calendar-day.has-events:hover { background: #f1f5f9; }
.day-number { font-size: 0.85rem; font-weight: 500; }
.day-events { margin-top: 2px; display: flex; flex-direction: column; gap: 1px; }
.day-event-dot { font-size: 0.65rem; padding: 1px 4px; border-radius: 3px; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.upcoming-events-panel { background: white; border-radius: var(--radius-lg); padding: 1.25rem; box-shadow: var(--shadow); }
.upcoming-events-panel h3 { margin-bottom: 1rem; }

/* Calendar search bar */
.cal-search-bar {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.cal-search-input-wrap { position: relative; flex: 1; min-width: 220px; }
.cal-search-input-wrap .cal-search-ico {
  position: absolute;
  left: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.cal-search-input-wrap #cal-search { padding-left: 2rem; }
.calendar-day.cal-dim { opacity: 0.32; }
.calendar-day.cal-match { background: rgba(44,124,132,0.12); box-shadow: inset 0 0 0 1.5px var(--gold, #2c7c84); }
.day-event-dot.dot-dim { opacity: 0.3; }
.event-item { display: flex; gap: 0.75rem; padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
.event-item:last-child { border-bottom: none; }
.event-date-badge { flex-shrink: 0; width: 46px; text-align: center; }
.event-date-badge .ev-day { font-size: 1.4rem; font-weight: 800; color: var(--primary); line-height: 1; }
.event-date-badge .ev-month { font-size: 0.65rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; }
.event-info { flex: 1; }
.event-title { font-weight: 600; font-size: 0.9rem; color: var(--primary-dark); }
.event-time { font-size: 0.8rem; color: var(--text-muted); }
.event-category-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 6px; }

/* ============================================================
   ACTIONS
   ============================================================ */
.actions-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; margin-bottom: 1.5rem; }
.actions-stat-card { background: white; border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); text-align: center; border-top: 3px solid var(--border); }
.actions-stat-card.open { border-top-color: #f59e0b; }
.actions-stat-card.in_progress { border-top-color: #3b82f6; }
.actions-stat-card.completed { border-top-color: var(--success); }
.actions-stat-card.deferred { border-top-color: var(--text-muted); }
.actions-stat-number { font-size: 1.8rem; font-weight: 800; color: var(--primary); }
.actions-stat-label { font-size: 0.8rem; color: var(--text-muted); }
.action-list { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.action-row { background: white; border-bottom: 1px solid var(--border); }
.action-row:last-child { border-bottom: none; }
.action-row-header { display: flex; align-items: center; gap: 0.75rem; padding: 0.9rem 1rem; cursor: pointer; }
.action-row-header:hover { background: #f9fafb; }
.action-priority-bar { width: 4px; height: 36px; border-radius: 2px; flex-shrink: 0; }
.action-priority-bar.high { background: var(--danger); }
.action-priority-bar.medium { background: #f59e0b; }
.action-priority-bar.low { background: var(--text-muted); }
.action-title-col { flex: 1; min-width: 0; }
.action-title { font-weight: 600; color: var(--primary-dark); font-size: 0.9rem; }
.action-desc-preview { font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.action-assignee { font-size: 0.85rem; color: var(--text-muted); white-space: nowrap; }
.action-due { font-size: 0.8rem; white-space: nowrap; }
.action-due.overdue { color: var(--danger); font-weight: 600; }
.action-status-badge { font-size: 0.75rem; font-weight: 700; padding: 0.2rem 0.6rem; border-radius: 20px; white-space: nowrap; }
.action-status-badge.open { background: #fef3c7; color: #92400e; }
.action-status-badge.in_progress { background: #dbeafe; color: #1e40af; }
.action-status-badge.completed { background: #d1fae5; color: #065f46; }
.action-status-badge.deferred { background: #f3f4f6; color: #6b7280; }
.action-expand-btn { font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; padding: 0.25rem 0.5rem; border-radius: var(--radius-sm); border: 1px solid var(--border); background: white; cursor: pointer; }
/* Inline line-icons inside actions text/buttons (replacing former emoji) */
.action-expand-btn svg, .category-pill svg, .action-due svg,
.action-meeting-tag svg, .action-icon-btn svg, .update-file-link svg { vertical-align: -2px; margin-right: 1px; }
.action-icon-btn { display: inline-flex; align-items: center; gap: 0.25rem; }
.action-icon-btn svg { margin-right: 0; }
.action-detail-panel { border-top: 1px solid var(--border); background: #f9fafb; padding: 1rem 1.25rem; display: none; }
.action-detail-panel.open { display: block; }
.updates-thread { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1rem; }
.update-item { background: white; border-radius: var(--radius-sm); padding: 0.75rem; box-shadow: var(--shadow); }
.update-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.35rem; font-size: 0.8rem; }
.update-status-tag { background: var(--accent-light); color: var(--primary); font-size: 0.7rem; font-weight: 700; padding: 0.1rem 0.4rem; border-radius: 4px; }
.update-text { font-size: 0.875rem; white-space: pre-wrap; }
.update-file-link { font-size: 0.8rem; color: var(--primary); text-decoration: underline; margin-top: 0.25rem; display: block; }
.add-update-form { background: white; border-radius: var(--radius-sm); padding: 0.75rem; }
.add-update-form h5 { margin-bottom: 0.5rem; font-size: 0.875rem; }
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-bottom: 1.25rem; }

/* Action reference number badge */
.action-no {
  display: inline-block;
  margin-right: 0.5rem;
  padding: 0.05rem 0.4rem;
  border-radius: 4px;
  background: var(--ink-navy, #141a24);
  color: var(--gold-bright, #74b6bd);
  font-family: var(--font-mono), 'IBM Plex Mono', monospace;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  vertical-align: middle;
}

/* Action timeline (in the expanded detail panel) */
.action-timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin: 0.25rem 0 1rem;
  padding-left: 1.35rem;
}
.action-timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--border, #e3ddd0);
}
.atl-item { position: relative; }
.atl-marker {
  position: absolute;
  left: -1.35rem;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--gold, #2c7c84);
  box-shadow: 0 0 0 2px #fff;
}
.atl-item.atl-created .atl-marker { border-color: var(--ink-navy, #141a24); background: var(--ink-navy, #141a24); }
.atl-item.atl-status .atl-marker { border-color: #2563eb; }
.atl-body {
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
  box-shadow: var(--shadow);
}
.atl-head { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; font-size: 0.78rem; margin-bottom: 0.2rem; }
.atl-author { font-weight: 700; }
.atl-event { font-weight: 700; color: var(--ink-navy, #141a24); }
.atl-time { color: var(--text-muted); }
.atl-meta { font-size: 0.76rem; color: var(--text-muted); }

/* Minutes section */
.minutes-section { background: white; border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1rem; box-shadow: var(--shadow); }
.minutes-section h4 { margin-bottom: 0.75rem; color: var(--primary-dark); }

/* ============================================================
   MINUTES BUILDER
   ============================================================ */
.minutes-builder { display: grid; grid-template-columns: 220px 1fr 300px; height: calc(100vh - var(--nav-height)); overflow: hidden; }
.minutes-toc { border-right: 1px solid var(--border); background: white; overflow-y: auto; padding: 1rem 0; }
.minutes-toc-header { padding: 0.75rem 1rem 0.5rem; border-bottom: 1px solid var(--border); margin-bottom: 0.5rem; }
.minutes-toc-header h3 { font-size: 0.9rem; margin-bottom: 0.15rem; }
.minutes-toc-header p { font-size: 0.75rem; color: var(--text-muted); }
.minutes-toc-item { padding: 0.6rem 1rem; cursor: pointer; font-size: 0.85rem; border-left: 3px solid transparent; transition: all 0.15s; }
.minutes-toc-item:hover { background: var(--accent-light); border-left-color: var(--accent); }
.minutes-toc-item.active { background: var(--accent-light); border-left-color: var(--accent); font-weight: 600; color: var(--primary); }
.minutes-editor { display: flex; flex-direction: column; overflow: hidden; }
.minutes-editor-header { padding: 1rem 1.5rem; border-bottom: 1px solid var(--border); background: white; display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.minutes-editor-body { flex: 1; padding: 1.5rem; overflow-y: auto; display: flex; flex-direction: column; gap: 1rem; }
.minutes-textarea { flex: 1; min-height: 350px; padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius); font-size: 0.9rem; line-height: 1.7; resize: none; font-family: 'Georgia', serif; width: 100%; }
.minutes-textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(215,43,42,0.15); }
.minutes-save-status { font-size: 0.8rem; color: var(--text-muted); }
.minutes-save-status.saving { color: var(--accent); }
.minutes-save-status.saved { color: var(--success); }
.record-btn { display: flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.9rem; border-radius: 20px; border: none; cursor: pointer; font-size: 0.85rem; font-weight: 600; transition: all 0.2s; }
.record-btn.idle { background: var(--primary); color: white; }
.record-btn.recording { background: var(--danger); color: white; animation: pulse-record 1.5s infinite; }
@keyframes pulse-record { 0%,100% { opacity:1; } 50% { opacity:0.7; } }
.minutes-bottom-bar { padding: 0.75rem 1.5rem; border-top: 1px solid var(--border); background: white; display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.minutes-actions-panel { border-left: 1px solid var(--border); background: #f9fafb; overflow-y: auto; display: flex; flex-direction: column; }
.minutes-actions-header { padding: 1rem; border-bottom: 1px solid var(--border); background: white; }
.minutes-actions-list { flex: 1; padding: 0.75rem; overflow-y: auto; }
.minutes-action-item { background: white; border-radius: var(--radius-sm); padding: 0.65rem; margin-bottom: 0.5rem; box-shadow: var(--shadow); font-size: 0.85rem; border-left: 3px solid var(--accent); }
.minutes-capture-form { padding: 0.75rem; border-top: 1px solid var(--border); background: white; }
.minutes-capture-form h4 { font-size: 0.85rem; margin-bottom: 0.65rem; color: var(--primary-dark); }

/* ============================================================
   GLOBAL SEARCH
   ============================================================ */
.nav-search { position: relative; }
.nav-search input { background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2); border-radius: 20px; padding: 0.3rem 0.75rem; color: white; font-size: 0.8rem; width: 140px; outline: none; transition: all 0.2s; }
.nav-search input::placeholder { color: rgba(255,255,255,0.5); }
.nav-search input:focus { background: rgba(255,255,255,0.2); border-color: var(--accent); width: 200px; }
.search-dropdown { position: absolute; top: calc(100% + 8px); right: 0; width: 360px; background: white; border-radius: var(--radius); box-shadow: var(--shadow-lg); border: 1px solid var(--border); z-index: 2000; max-height: 400px; overflow-y: auto; }
.search-group-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); padding: 0.5rem 0.75rem 0.25rem; background: #f9fafb; }
.search-result-item { display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem 0.75rem; text-decoration: none; color: var(--text); font-size: 0.875rem; border-bottom: 1px solid #f3f4f6; transition: background 0.1s; }
.search-result-item:hover { background: var(--accent-light); }
.sr-icon { flex-shrink: 0; }
.search-result-item span:nth-child(2) { flex: 1; }
.sr-meta { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; }
.search-no-results { padding: 1rem; text-align: center; color: var(--text-muted); font-size: 0.875rem; }

/* ============================================================
   DASHBOARD WIDGETS
   ============================================================ */
.dashboard-widgets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}
.widget {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.widget-header h3 {
  font-size: 1rem;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.widget-title-icon {
  display: inline-flex;
  color: var(--teal);
}
.widget-view-all {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 500;
}
.widget-footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border);
  background: #fafaf9;
}
.widget-loading {
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}
.widget-empty {
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}
.widget-empty-clear {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  color: var(--teal-dark);
}
.widget-empty-clear svg { flex: none; }
.widget-post-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.65rem 1.25rem;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: background 0.1s;
}
.widget-post-item:last-child { border-bottom: none; }
.widget-post-item:hover { background: var(--accent-light); }
.widget-post-category {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.widget-post-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.widget-post-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.widget-action-item {
  display: grid;
  grid-template-columns: 8px 1fr;
  grid-template-rows: auto auto;
  column-gap: 0.65rem;
  padding: 0.65rem 1.25rem;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.widget-action-item:last-child { border-bottom: none; }
.widget-action-priority {
  grid-row: span 2;
  width: 8px;
  height: 32px;
  border-radius: 4px;
  flex-shrink: 0;
}
.widget-action-priority.high { background: var(--danger); }
.widget-action-priority.medium { background: #f59e0b; }
.widget-action-priority.low { background: var(--text-muted); }
.widget-action-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.widget-action-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Key Dates widget */
.widget-keydate-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 1.25rem;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: background 0.12s;
}
.widget-keydate-item:last-child { border-bottom: none; }
.widget-keydate-item:hover { background: var(--accent-light); }
.widget-keydate-icon { display: inline-flex; align-items: center; color: var(--teal); flex-shrink: 0; }
.widget-keydate-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.widget-keydate-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.widget-keydate-type {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.widget-keydate-when {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(44,124,132,0.08);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  white-space: nowrap;
}
.widget-keydate-when.is-soon { color: var(--coral-dark); background: rgba(226,114,91,0.12); }
.widget-keydate-when.is-overdue { color: #fff; background: var(--danger); }

.toc-footer-link-accent {
  color: var(--accent) !important;
  font-weight: 600;
}

/* ============================================================
   NOTIFICATIONS BELL
   ============================================================ */
.nav-notif {
  position: relative;
}

.nav-notif-btn {
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  font-size: 1.1rem;
  padding: 0.3rem 0.4rem;
  border-radius: var(--radius-sm);
  line-height: 1;
  color: var(--muted);
  transition: background 0.15s, color 0.15s;
  display: flex;
  align-items: center;
}

.nav-notif-btn:hover {
  background: var(--hair);
  color: var(--ink);
}

/* Help icon button in the top bar (sits with the bell) */
.topbar-help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.3rem 0.4rem;
  border-radius: var(--radius-sm);
  line-height: 1;
  color: var(--muted);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.topbar-help-btn:hover {
  background: var(--hair);
  color: var(--ink);
}

/* Feedback link in the footer */
.footer-feedback-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font: inherit;
  color: inherit;
  text-decoration: none;
}
.footer-feedback-btn:hover {
  text-decoration: underline;
}

/* Feedback button */
.topbar-feedback-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.85);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-sm);
  line-height: 1;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.topbar-feedback-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--gold);
  color: var(--white);
}
@media (max-width: 640px) {
  .topbar-feedback-label { display: none; }
  .topbar-feedback-btn { padding: 0.4rem 0.5rem; }
}
/* Icon-only feedback button (square, sits with the notification bell) */
.topbar-feedback-icon { padding: 0.45rem; }

/* Header quick-action buttons */
.topbar-quick { display: inline-flex; align-items: center; gap: 0.35rem; }
.topbar-quick-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--hair);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: background 0.14s, border-color 0.14s, color 0.14s, box-shadow 0.14s;
}
.topbar-quick-btn svg { color: var(--coral); flex-shrink: 0; }
.topbar-quick-btn:hover {
  background: rgba(226,114,91,0.08);
  border-color: var(--coral);
  color: var(--coral-dark);
  box-shadow: 0 1px 3px rgba(20,26,36,0.06);
}
@media (max-width: 1100px) {
  .topbar-quick-btn span { display: none; }
  .topbar-quick-btn { padding: 0.45rem; }
}
@media (max-width: 760px) {
  .topbar-quick,
  .topbar-quick + .topbar-divider { display: none; }
}

/* Feedback modal */
.feedback-intro {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0 0 1.1rem;
  line-height: 1.5;
}
.feedback-cats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}
.feedback-cat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  transition: border-color 0.15s, background 0.15s;
}
.feedback-cat:hover { border-color: var(--gold); }
.feedback-cat.selected {
  border-color: var(--gold);
  background: rgba(44,124,132,0.08);
}
.feedback-cat-emoji { font-size: 1.1rem; line-height: 1; }

.notif-badge {
  position: absolute;
  top: -2px;
  right: -4px;
  background: var(--danger);
  color: var(--white);
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  line-height: 1;
  pointer-events: none;
}

.notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 340px;
  min-width: 300px;
  max-height: 420px;
  overflow-y: auto;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0,0,0,0.06);
  z-index: 200;
  display: flex;
  flex-direction: column;
}

/* When the bell lives on the left of the header, open its dropdown leftward
   so it doesn't run off the screen edge. */
.nav-notif-left .notif-dropdown {
  right: auto;
  left: 0;
}

@media (max-width: 480px) {
  /* Keep the panel on-screen on small devices regardless of bell position. */
  .nav-notif-left .notif-dropdown {
    left: 0;
    right: auto;
    max-width: calc(100vw - 24px);
  }
}

.notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem 0.6rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.notif-header strong {
  font-size: 0.875rem;
  color: var(--primary-dark);
}

.notif-mark-all {
  font-size: 0.78rem;
  color: var(--accent);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-weight: 500;
}

.notif-mark-all:hover {
  text-decoration: underline;
}

.notif-list {
  overflow-y: auto;
  flex: 1;
}

.notif-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.12s;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-item:hover {
  background: #f9fafb;
}

.notif-item.unread {
  background: var(--accent-light);
}

.notif-item.unread:hover {
  background: rgba(215,43,42,0.08);
}

.notif-item-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary-dark);
  line-height: 1.35;
}

.notif-item-body {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.notif-item-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: right;
  margin-top: 0.1rem;
}

.notif-empty {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Notification preferences toggles */
.notif-pref-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
}

.notif-pref-row:last-child {
  border-bottom: none;
}

.notif-pref-label {
  font-size: 0.875rem;
  color: var(--text);
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #d1d5db;
  border-radius: 22px;
  transition: background 0.2s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--accent);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(18px);
}

/* ─────────────────────────────────────────
   MOBILE / PWA STYLES
   ───────────────────────────────────────── */

/* Bottom navigation bar — mobile only */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 150;
  background: var(--primary);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 10px 4px 8px;
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  font-size: 10px;
  font-weight: 500;
  gap: 3px;
  transition: color 0.15s;
}
.mobile-nav-item.active { color: var(--accent); }
.mobile-nav-item:active { opacity: 0.7; }
.mobile-nav-icon { font-size: 20px; line-height: 1; }
.mobile-nav-label { font-size: 10px; letter-spacing: 0.01em; }

@media (max-width: 768px) {
  /* Show mobile bottom tab bar */
  .mobile-nav { display: flex !important; }

  /* Add bottom padding so content clears the mobile nav */
  .app-content { padding-bottom: 72px !important; }

  /* Make cards full-width on mobile */
  .card { border-radius: 12px; }

  /* Dashboard grid — single column */
  .dashboard-grid { grid-template-columns: 1fr !important; }

  /* Meeting cards — stack */
  .meetings-grid { grid-template-columns: 1fr !important; }

  /* Tables — horizontal scroll */
  .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { min-width: 600px; }

  /* Modals — full screen on mobile */
  .modal { max-width: 100% !important; width: 100% !important; margin: 0 !important;
           border-radius: 20px 20px 0 0 !important; position: fixed !important;
           bottom: 0 !important; left: 0 !important; right: 0 !important; top: auto !important;
           max-height: 90vh; overflow-y: auto; }
  .modal-overlay { align-items: flex-end !important; }

  /* Larger tap targets */
  .btn { min-height: 44px; }
  .form-control { min-height: 44px; font-size: 16px !important; } /* prevent iOS zoom */

  /* Meeting book — full width sections */
  .meeting-layout { grid-template-columns: 1fr !important; }
  .meeting-toc { display: none; }

  /* Hide non-essential table columns on mobile */
  .hide-mobile { display: none !important; }
}

/* ── PWA install prompt ── */
.pwa-install-banner {
  position: fixed;
  bottom: 80px; left: 16px; right: 16px;
  background: var(--primary);
  color: white;
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  z-index: 140;
  animation: slideUp 0.3s ease;
}
@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.pwa-install-icon { font-size: 32px; flex-shrink: 0; }
.pwa-install-text { flex: 1; }
.pwa-install-title { font-weight: 700; font-size: 15px; margin-bottom: 2px; }
.pwa-install-sub { font-size: 12px; color: rgba(255,255,255,0.6); }
.pwa-install-btn { background: var(--accent); color: #fff; border: none;
  border-radius: 8px; padding: 8px 16px; font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap; }
.pwa-install-dismiss { background: none; border: none; color: rgba(255,255,255,0.4);
  font-size: 18px; cursor: pointer; padding: 4px; flex-shrink: 0; }

/* ── Read Aloud Bar ──────────────────────────────────────────────────────── */
.read-aloud-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--primary);
  border-top: 2px solid var(--accent);
  padding: 10px 16px;
  display: none;
  flex-direction: column;
  gap: 6px;
  z-index: 200;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.35);
}
.read-aloud-bar.rab-visible { display: flex; }

.rab-track {
  display: flex;
  align-items: center;
  gap: 10px;
}
.rab-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}
.rab-progress {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
  overflow: hidden;
}
.rab-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.4s ease;
}
.rab-counter {
  font-size: 0.72rem;
  color: rgba(255,255,255,0.5);
  white-space: nowrap;
}

.rab-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
}
.rab-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s;
  line-height: 1;
}
.rab-btn:hover:not(:disabled) { background: rgba(255,255,255,0.18); }
.rab-btn:disabled { opacity: 0.3; cursor: default; }
.rab-btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
  padding: 6px 18px;
}
.rab-btn-primary:hover:not(:disabled) { background: #b01f1e; }
.rab-btn-close {
  margin-left: 8px;
  background: rgba(255,255,255,0.06);
  font-size: 0.8rem;
}
.rab-speed {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 0.8rem;
  cursor: pointer;
  margin-left: 4px;
}
.rab-speed option { background: #1a2a3a; color: #fff; }

/* Pad meeting main content when bar is open */
.meeting-main.has-read-aloud-bar { padding-bottom: 100px; }

/* Highlight the currently-reading section */
.reading-highlight {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: var(--radius);
  animation: readingPulse 1.5s ease-in-out infinite;
}
@keyframes readingPulse {
  0%, 100% { outline-color: var(--accent); }
  50%       { outline-color: rgba(215,43,42,0.35); }
}

/* ── Org Selector (login screen) ─────────────────────────────────────────── */
.org-select-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.org-select-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  text-align: left;
  width: 100%;
  color: inherit;
}
.org-select-card:hover:not(:disabled) {
  background: rgba(215,43,42,0.08);
  border-color: var(--accent);
}
.org-select-avatar {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.org-select-info { flex: 1; }
.org-select-name { font-weight: 600; font-size: 0.95rem; }
.org-select-role { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; text-transform: capitalize; }
.org-select-arrow { color: var(--text-muted); font-size: 1.1rem; }

/* ── Org Switcher (nav bar) ──────────────────────────────────────────────── */
/* ---- Org switcher on the header org name (multi-org users) ---------- */
.topbar-org.is-switchable {
  cursor: pointer;
  border-radius: 8px;
  padding: 3px 7px 3px 4px;
  margin-left: -4px;
  transition: background 0.15s;
}
.topbar-org.is-switchable:hover,
.topbar-org.is-switchable.open { background: rgba(0,0,0,0.05); }
.topbar-org.is-switchable:focus-visible { outline: 2px solid var(--gold-bright, #74b6bd); outline-offset: 2px; }
.topbar-org-chevron {
  font-size: 0.7rem;
  color: var(--text-muted, #8a8a8a);
  margin-left: 1px;
  flex: 0 0 auto;
  transition: transform 0.15s;
}
.topbar-org.open .topbar-org-chevron { transform: rotate(180deg); }

.topbar-org-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 252px;
  background: #fff;
  border: 1px solid var(--hair, rgba(0,0,0,0.1));
  border-radius: 12px;
  box-shadow: 0 14px 44px rgba(0,0,0,0.16);
  overflow: hidden;
  z-index: 320;
  padding: 5px;
}
.org-switch-head {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted, #8a8a8a);
  padding: 8px 11px 6px;
}
.org-switch-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 9px 11px;
  background: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: var(--ink, #1c1b18);
  text-align: left;
  transition: background 0.12s;
}
.org-switch-item:hover { background: rgba(0,0,0,0.05); }
.org-switch-item.active { background: rgba(44,124,132,0.14); }
.org-switch-avatar {
  width: 32px; height: 32px;
  border-radius: 7px;
  background: var(--navy, #141a24);
  color: var(--gold-bright, #74b6bd);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.org-switch-info { flex: 1; min-width: 0; }
.org-switch-name { font-size: 0.875rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.org-switch-role { font-size: 0.72rem; color: var(--text-muted); text-transform: capitalize; margin-top: 1px; }
.org-switch-tick { color: var(--gold-bright, #74b6bd); font-weight: 700; font-size: 0.95rem; flex-shrink: 0; }

/* ============================================================
   DOCUMENT ENGAGEMENT TRACKING
   ============================================================ */
.engagement-grid { display: flex; flex-direction: column; gap: 8px; }
.engagement-row { display: grid; grid-template-columns: 1fr 120px 40px auto; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.engagement-row:last-child { border-bottom: none; }
.engagement-doc-name { font-size: 0.875rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.engagement-bar-wrap { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.engagement-bar { height: 100%; background: var(--accent); border-radius: 3px; transition: width 0.4s ease; }
.engagement-pct { font-size: 0.75rem; color: var(--text-muted); text-align: right; white-space: nowrap; }
.engagement-avatars { display: flex; gap: 4px; flex-wrap: wrap; }
.engagement-avatar { width: 24px; height: 24px; border-radius: 50%; font-size: 0.65rem; font-weight: 700; display: flex; align-items: center; justify-content: center; cursor: default; }
.engagement-avatar.viewed { background: var(--accent); color: #fff; }
.engagement-avatar.not-viewed { background: var(--border); color: var(--text-muted); }
.doc-viewed-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: inline-block; margin-left: 6px; vertical-align: middle; }

/* ============================================================
   SKILLS MATRIX
   ============================================================ */
.skills-matrix-table { border-collapse: collapse; font-size: 0.82rem; white-space: nowrap; }
.skills-matrix-table th, .skills-matrix-table td { border: 1px solid var(--border); }
.skill-col-header { padding: 4px; writing-mode: vertical-lr; transform: rotate(180deg); min-height: 80px; text-align: left; font-weight: 500; font-size: 0.72rem; }
.skill-header-text { max-height: 100px; overflow: hidden; }
.category-label { text-align: center; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); padding: 3px 6px; }
.skill-cell { width: 28px; height: 28px; text-align: center; cursor: default; transition: opacity 0.15s; }
.skill-cell-editable { cursor: pointer; }
.skill-cell-editable:hover { opacity: 0.75; }
.skill-cell-val { font-size: 0.7rem; font-weight: 700; color: var(--primary); }
.skill-popover { animation: fadeIn 0.1s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.skills-matrix-wrap { margin-bottom: 2rem; }
@media print { .app-sidebar, .app-topbar, .mobile-nav, #read-aloud-bar { display: none !important; } }

/* ============================================================
   CIRCULAR RESOLUTIONS
   ============================================================ */
.circular-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1rem; }
.circular-open { border-color: var(--accent); border-width: 2px; }
.circular-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.circular-resolution-text { background: rgba(255,255,255,0.04); border-left: 3px solid var(--accent); padding: 10px 14px; border-radius: 0 6px 6px 0; font-size: 0.9rem; margin: 0.75rem 0; }
.circular-vote-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.circular-vote-btn { font-weight: 600; padding: 10px 24px; }
.btn-success { background: #16a34a; color: #fff; border: none; }
.btn-success:hover { background: #15803d; }
.btn-danger { background: #dc2626; color: #fff; border: none; }
.btn-danger:hover { background: #b91c1c; }

/* ============================================================
   MEETING DATE VOTING
   ============================================================ */
.mdv-section-title { font-size: 1rem; font-weight: 700; margin: 0 0 1rem; color: var(--accent); }
.mdv-section-muted { margin-top: 2rem; color: var(--text-muted); }
.mdv-options { margin: 1rem 0; display: flex; flex-direction: column; gap: 8px; }
.mdv-option {
  display: grid; grid-template-columns: 1fr auto auto; gap: 14px; align-items: center;
  padding: 10px 14px; background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 8px;
}
.mdv-option-final { border-color: var(--accent); border-width: 2px; background: rgba(44,124,132,0.08); }
.mdv-option-date strong { font-size: 0.92rem; }
.mdv-best { display: inline-block; margin-left: 8px; font-size: 0.72rem; font-weight: 700; color: var(--gold-bright, #74b6bd); text-transform: uppercase; letter-spacing: 0.04em; }
.mdv-option-tally { display: flex; gap: 12px; font-size: 0.8rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mdv-choices { display: flex; gap: 6px; }
.mdv-choice {
  width: 34px; height: 34px; border-radius: 7px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-muted); font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-size: 0.95rem; transition: all 0.15s;
}
.mdv-choice:hover:not([disabled]) { border-color: var(--text-muted); }
.mdv-choice[disabled] { cursor: default; opacity: 0.55; }
.mdv-choice-sel.mdv-choice-yes { background: #16a34a; border-color: #16a34a; color: #fff; }
.mdv-choice-sel.mdv-choice-maybe { background: #d97706; border-color: #d97706; color: #fff; }
.mdv-choice-sel.mdv-choice-no { background: #dc2626; border-color: #dc2626; color: #fff; }
.mdv-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 4px; }
.mdv-legend { display: flex; align-items: center; gap: 8px; font-size: 0.78rem; color: var(--text-muted); }
.mdv-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-left: 8px; }
.mdv-dot.mdv-yes { background: #16a34a; }
.mdv-dot.mdv-maybe { background: #d97706; }
.mdv-dot.mdv-no { background: #dc2626; }
.mdv-confirm-list { display: flex; flex-direction: column; gap: 8px; }
.mdv-confirm-opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.mdv-confirm-opt:hover { border-color: var(--accent); }
@media (max-width: 640px) {
  .mdv-option { grid-template-columns: 1fr; gap: 8px; }
  .mdv-choices { justify-content: flex-start; }
}

/* ============================================================
   CARTEL PERSONALITY (cheeky brand touches)
   ============================================================ */
.cartel-hero {
  margin: 0 0 1.25rem;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius, 12px);
  background: linear-gradient(110deg, var(--ink-navy, #141a24) 0%, #0b0f16 100%);
  border: 1px solid rgba(44,124,132,0.25);
  position: relative;
  overflow: hidden;
}
/* Greeting demoted to a small eyebrow — the topbar already orients the user,
   so the card's real estate goes to the countdown (what they came for). */
.cartel-hero-greeting {
  font-family: var(--font-mono, 'IBM Plex Mono', monospace);
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(116,182,189,0.85);
}
.cartel-hero-count {
  margin-top: 2px;
  font-family: var(--font-display, 'Space Grotesk', sans-serif);
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1.15;
  color: var(--gold-bright, #74b6bd);
  letter-spacing: 0.01em;
}
.cartel-hero-line {
  margin-top: 2px;
  font-size: 0.9rem;
  color: rgba(246,243,236,0.82);
  font-style: italic;
}
@media (max-width: 640px) {
  .cartel-hero-count { font-size: 1.2rem; }
  .cartel-hero-line { font-size: 0.82rem; }
}

/* Organisation mission statement — dashboard reminder of why we exist */
.mission-banner {
  margin: 0 0 1.25rem;
  padding: 1.1rem 1.4rem;
  border-radius: var(--radius, 12px);
  background: var(--cream, #f6f3ec);
  border: 1px solid rgba(44,124,132,0.35);
  border-left: 4px solid var(--gold, #2c7c84);
  position: relative;
}
.mission-banner-label {
  display: block;
  font-family: var(--font-mono, 'IBM Plex Mono', monospace);
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-deep, #20606b);
  margin-bottom: 0.35rem;
}
.mission-banner-text {
  margin: 0;
  font-family: var(--font-serif, 'Spectral', serif);
  font-size: 1.15rem;
  line-height: 1.5;
  font-style: italic;
  color: var(--ink-navy, #141a24);
}
.mission-banner-empty { border-left-color: var(--hair, #e2ddd2); border-color: var(--hair, #e2ddd2); background: var(--cream, #f6f3ec); }
.mission-banner-placeholder { font-style: normal; font-size: 0.95rem; color: var(--text-muted, #7a7468); }
.mission-banner-placeholder a { color: var(--gold-deep, #20606b); font-weight: 600; text-decoration: none; white-space: nowrap; }
.mission-banner-placeholder a:hover { text-decoration: underline; }
@media (max-width: 640px) {
  .mission-banner-text { font-size: 1rem; }
}

/* ============================================================
   ORG CHART
   ============================================================ */
.oc-image-wrap { margin: 1rem 0 2rem; text-align: center; }
.oc-image { max-width: 100%; border: 1px solid var(--border); border-radius: var(--radius); }
.oc-tree { overflow-x: auto; padding: 1rem 0.5rem 2rem; }
.oc-root { display: flex; flex-direction: column; align-items: center; min-width: max-content; margin: 0 auto; }
.oc-branch {
  display: flex; justify-content: center; list-style: none; padding: 0; margin: 0;
  position: relative; padding-top: 22px;
}
/* vertical connector down from a parent into the branch row */
.oc-branch::before {
  content: ''; position: absolute; top: 0; left: 50%; width: 2px; height: 22px; background: var(--border);
}
.oc-node-li {
  position: relative; padding: 22px 14px 0; display: flex; flex-direction: column; align-items: center;
}
/* horizontal connector across siblings */
.oc-node-li::before, .oc-node-li::after {
  content: ''; position: absolute; top: 0; width: 50%; height: 22px; border-top: 2px solid var(--border);
}
.oc-node-li::before { left: 0; }
.oc-node-li::after { right: 0; }
/* vertical drop into each child */
.oc-node-li::before { border-right: 2px solid var(--border); }
.oc-node-li:only-child::before, .oc-node-li:only-child::after { display: none; }
.oc-node-li:first-child::before { border: none; }
.oc-node-li:last-child::after { border: none; }
/* connector stub above each card */
.oc-node-li > .oc-card { position: relative; }
.oc-node-li > .oc-card::before {
  content: ''; position: absolute; top: -22px; left: 50%; width: 2px; height: 22px; background: var(--border);
}
.oc-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 16px; min-width: 170px; max-width: 230px; text-align: center; box-shadow: var(--shadow);
  position: relative;
}
.oc-card-committee { border-left: 4px solid var(--accent, #2c7c84); }
.oc-card-team { border-left: 4px solid #6b7280; }
.oc-card-title { font-weight: 700; font-size: 0.9rem; color: var(--ink-navy, #141a24); }
.oc-card-person { font-size: 0.8rem; color: var(--text-muted); margin-top: 3px; }
.oc-card-actions { display: none; gap: 4px; justify-content: center; margin-top: 8px; }
.oc-card:hover .oc-card-actions { display: flex; }
.oc-btn {
  width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg, #fff);
  cursor: pointer; font-size: 0.8rem; line-height: 1; display: flex; align-items: center; justify-content: center; color: var(--text-muted);
}
.oc-btn:hover { border-color: var(--accent); color: var(--accent); }
.oc-btn-danger:hover { border-color: var(--danger, #dc2626); color: var(--danger, #dc2626); }

/* ============================================================
   STRATEGIC PLAN
   ============================================================ */
.rag-summary { display: flex; gap: 16px; margin-bottom: 2rem; flex-wrap: wrap; }
.rag-summary-card { display: flex; flex-direction: column; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 24px; min-width: 100px; cursor: pointer; transition: box-shadow 0.15s, transform 0.15s; }
.rag-summary-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); transform: translateY(-1px); }
.strategy-objective { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem 1.5rem; margin-bottom: 1rem; }
.strategy-obj-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.strategy-obj-progress { width: 80px; height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.strategy-obj-progress-bar { height: 100%; background: var(--accent); border-radius: 3px; transition: width 0.4s; }
.strategy-kpi-list { display: flex; flex-direction: column; gap: 4px; }
.strategy-kpi-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; transition: background 0.12s; }
.strategy-kpi-row:hover { background: rgba(255,255,255,0.04); }
.rag-dot { font-size: 1rem; flex-shrink: 0; }
.strategy-kpi-info { flex: 1; min-width: 0; font-size: 0.875rem; }
.strategy-kpi-title { font-weight: 500; }
.rag-badge { font-size: 0.72rem; font-weight: 600; padding: 2px 8px; border-radius: 99px; white-space: nowrap; flex-shrink: 0; }

/* ============================================================
   DIRECTOR INDUCTION
   ============================================================ */
.induction-progress-card { background: var(--surface); border: 1px solid var(--accent); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 2rem; }
.induction-item { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; border-radius: 8px; transition: background 0.12s; margin-bottom: 4px; }
.induction-item:hover { background: rgba(255,255,255,0.04); }
.induction-item-done .induction-item-title { text-decoration: line-through; opacity: 0.5; }
.induction-check { width: 22px; height: 22px; border-radius: 5px; border: 2px solid var(--border); background: none; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 0.75rem; color: #fff; transition: all 0.15s; margin-top: 1px; }
.induction-check.checked { background: var(--accent); border-color: var(--accent); }
.induction-check:hover:not(:disabled) { border-color: var(--accent); }
.induction-item-content { flex: 1; min-width: 0; }
.induction-item-title { font-size: 0.9rem; font-weight: 500; }
.induction-item-desc { margin-top: 2px; }

/* ─── Subcommittees ─────────────────────────────── */
.sc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.sc-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; }
.sc-card-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.sc-avatar { width: 42px; height: 42px; border-radius: 10px; background: var(--primary); color: white; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; font-weight: 700; flex-shrink: 0; }
.sc-card-name { font-weight: 600; font-size: 1rem; }
.sc-card-desc { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.sc-card-stats { display: flex; gap: 1rem; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.sc-workspace-modal { display: flex; flex-direction: column; gap: 1.5rem; }
.sc-workspace-section h3 { font-size: 0.875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 0.75rem; }
.sc-member-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
.sc-member-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent-light); color: var(--primary); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem; flex-shrink: 0; }
.sc-member-info { flex: 1; }
.sc-member-name { font-weight: 500; font-size: 0.875rem; }
.sc-member-email { font-size: 0.75rem; color: var(--text-muted); }
.sc-meeting-row { display: flex; align-items: center; justify-content: space-between; padding: 0.5rem 0; border-bottom: 1px solid var(--border); text-decoration: none; color: inherit; }
.sc-meeting-row:hover { color: var(--primary); }
.sc-meeting-title { font-weight: 500; font-size: 0.875rem; }
.sc-meeting-date { font-size: 0.75rem; color: var(--text-muted); }
.sc-workspace-actions { display: flex; gap: 0.75rem; padding-top: 0.5rem; border-top: 1px solid var(--border); }
.badge-blue { background: #dbeafe; color: #1d4ed8; }
.badge-green { background: #dcfce7; color: #15803d; }
.btn-danger-outline { border: 1px solid var(--danger, #ef4444); color: var(--danger, #ef4444); background: transparent; }

/* ─── ACNC AIS ─────────────────────────────────── */
.acnc-ais { max-width: 900px; margin: 0 auto; }
.acnc-banner { background: linear-gradient(135deg, #1e3a5f 0%, #2d5a8e 100%); color: white; border-radius: var(--radius-lg); padding: 1.5rem; margin-bottom: 1.5rem; }
.acnc-banner-title { font-size: 1.25rem; font-weight: 700; }
.acnc-banner-subtitle { font-size: 0.9rem; opacity: 0.85; margin-top: 0.25rem; }
.acnc-status { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.75rem; font-size: 0.8rem; opacity: 0.9; }
.acnc-status-dot { width: 8px; height: 8px; border-radius: 50%; background: #f0c040; flex-shrink: 0; }
.acnc-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; margin-bottom: 1.25rem; }
.acnc-section-header { display: flex; align-items: center; gap: 0.75rem; font-weight: 700; font-size: 1rem; margin-bottom: 1.25rem; color: var(--text); }
.acnc-section-num { width: 28px; height: 28px; background: var(--primary); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.8rem; font-weight: 700; flex-shrink: 0; }
.acnc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.acnc-field { display: flex; flex-direction: column; gap: 0.3rem; }
.acnc-field-label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.acnc-field-value { font-size: 0.9rem; padding: 0.4rem 0; border-bottom: 1px solid var(--border); }
.acnc-empty { color: var(--text-muted); font-style: italic; }
.acnc-placeholder { color: var(--text-muted); }
.acnc-gov-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.acnc-gov-stat { text-align: center; padding: 1rem; background: var(--bg); border-radius: var(--radius); border: 1px solid var(--border); }
.acnc-gov-value { font-size: 1.5rem; font-weight: 700; color: var(--primary); }
.acnc-gov-label { font-size: 0.8rem; font-weight: 600; margin-top: 0.2rem; }
.acnc-gov-note { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.2rem; }
.acnc-meetings-label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); margin-bottom: 0.5rem; }
.acnc-meeting-row { display: flex; gap: 1rem; padding: 0.35rem 0; border-bottom: 1px solid var(--border); font-size: 0.875rem; }
.acnc-meeting-date { color: var(--text-muted); flex-shrink: 0; min-width: 90px; }
.acnc-directors-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.acnc-directors-table th { text-align: left; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); border-bottom: 2px solid var(--border); padding: 0.5rem 0.75rem; }
.acnc-directors-table td { padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--border); }
.acnc-note { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.75rem; }
.acnc-checklist { display: flex; flex-direction: column; gap: 0.5rem; }
.acnc-check-item { display: flex; align-items: center; gap: 0.75rem; font-size: 0.9rem; cursor: pointer; padding: 0.4rem 0; }
.acnc-checkbox { width: 18px; height: 18px; cursor: pointer; }
.acnc-checklist-section { background: #f0fdf4; border-color: #bbf7d0; }
@media print {
  .app-sidebar, .app-topbar, .mobile-nav, #toast-container, .btn, .page-header button, .page-header a { display: none !important; }
  .acnc-ais { max-width: 100%; }
  .acnc-section { break-inside: avoid; }
}

/* ─── AI Paper Summaries ────────────────────────── */
.ai-summary-btn { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.75rem; font-weight: 600; color: #7c3aed; background: #f5f3ff; border: 1px solid #ddd6fe; border-radius: 20px; padding: 0.2rem 0.6rem; cursor: pointer; transition: all 0.15s; margin-left: 0.5rem; }
.ai-summary-btn:hover, .ai-summary-btn.active { background: #ede9fe; border-color: #7c3aed; }
.ai-summary-panel { margin: 0.5rem 0 0.75rem 0; border-radius: var(--radius); border: 1px solid #ddd6fe; background: #faf8ff; overflow: hidden; }
.ai-summary-content { padding: 1rem 1.25rem; }
.ai-summary-badge { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #7c3aed; margin-bottom: 0.6rem; }
.ai-summary-text { font-size: 0.875rem; line-height: 1.6; color: var(--text); }
.ai-li { margin-left: 1.25rem; display: list-item; }
.ai-summary-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 0.75rem; padding-top: 0.6rem; border-top: 1px solid #ede9fe; }
.ai-summary-meta { font-size: 0.72rem; color: var(--text-muted); }
.ai-regen-btn { font-size: 0.75rem; color: #7c3aed; background: transparent; border: none; cursor: pointer; padding: 0; }
.ai-regen-btn:hover { text-decoration: underline; }
.ai-generate-prompt { display: flex; flex-direction: column; align-items: center; padding: 1.5rem; text-align: center; gap: 0.6rem; }
.ai-generate-icon { font-size: 1.75rem; }
.ai-generate-text { font-size: 0.875rem; color: var(--text-muted); max-width: 320px; }
.ai-no-key { padding: 1.25rem; text-align: center; }
.ai-no-key-icon { font-size: 1.5rem; margin-bottom: 0.4rem; }
.ai-no-key-title { font-weight: 700; margin-bottom: 0.3rem; }
.ai-no-key-text { font-size: 0.85rem; color: var(--text-muted); max-width: 360px; margin: 0 auto; }
.ai-no-key-text code { background: #f1f5f9; padding: 0.1em 0.4em; border-radius: 4px; font-size: 0.8em; }
.ai-summary-error { padding: 0.75rem 1rem; font-size: 0.85rem; color: #b91c1c; background: #fef2f2; border-bottom: 1px solid #fecaca; }
.ai-summary-empty { padding: 0.75rem 1rem; font-size: 0.85rem; color: var(--text-muted); }
.btn-danger-outline:hover { background: #fef2f2; }

/* ─── Nav Logo Sub-title ─────────────────────────── */
.nav-logo { display:flex; align-items:center; gap:0.6rem; text-decoration:none; }
.nav-logo-titles { display:flex; flex-direction:column; gap:0; }
.nav-logo-text { color:white; font-size:0.85rem; font-weight:700; letter-spacing:0.01em; white-space:nowrap; line-height:1.2; }
.nav-logo-powered { color:rgba(255,255,255,0.45); font-size:0.6rem; font-weight:400; white-space:nowrap; line-height:1; }

/* ─── Nav Dropdowns ──────────────────────────────── */
.nav-dd { position:relative; display:inline-flex; flex-shrink:0; }
.nav-dd-trigger { cursor:pointer; background:none; border:none; font:inherit; display:flex; align-items:center; gap:0.2rem; }
.nav-dd-chevron { font-size:0.65rem; opacity:0.7; transition:transform 0.15s; }
.nav-dd.open .nav-dd-chevron { transform:rotate(180deg); }
.nav-dd-menu { display:none; position:absolute; top:calc(100% + 6px); left:0; min-width:200px; background:white; border:1px solid var(--border); border-radius:var(--radius); box-shadow:0 8px 24px rgba(0,0,0,0.12); z-index:1000; padding:0.375rem 0; }
.nav-dd-menu-right { left:auto; right:0; }
.nav-dd.open .nav-dd-menu { display:block; }
.nav-dd-header { padding:0.5rem 1rem 0.25rem; font-size:0.7rem; font-weight:700; text-transform:uppercase; letter-spacing:0.06em; color:var(--text-muted); }
.nav-dd-item { display:block; padding:0.45rem 1rem; font-size:0.85rem; color:var(--text); text-decoration:none; transition:background 0.1s; white-space:nowrap; width:100%; text-align:left; background:none; border:none; cursor:pointer; font:inherit; }
.nav-dd-item:hover { background:var(--bg); color:var(--primary); }
.nav-dd-item.active { color:var(--primary); font-weight:600; background:var(--bg); }
.nav-dd-divider { height:1px; background:var(--border); margin:0.25rem 0; }
.nav-dd-btn-item { color:var(--danger, #ef4444); }
.nav-dd-btn-item:hover { background:#fef2f2; color:var(--danger, #ef4444); }
/* Highlight Registers/People trigger when child is active */
.nav-dd:has(.nav-dd-item.active) .nav-dd-trigger { color:white !important; background:rgba(255,255,255,0.12); border-radius:var(--radius-sm); }

/* ─── Nav Icon + Avatar buttons ─────────────────── */
.nav-icon-btn { background:rgba(255,255,255,0.08); border:1px solid rgba(255,255,255,0.15); border-radius:var(--radius-sm); color:rgba(255,255,255,0.85); width:32px; height:32px; display:flex; align-items:center; justify-content:center; cursor:pointer; transition:all 0.15s; padding:0; }
.nav-icon-btn:hover { background:rgba(255,255,255,0.16); color:white; }
.nav-avatar-btn { background:rgba(255,255,255,0.12); border:1.5px solid rgba(255,255,255,0.25); border-radius:50%; width:32px; height:32px; display:flex; align-items:center; justify-content:center; cursor:pointer; transition:all 0.15s; padding:0; }
.nav-avatar-btn:hover { background:rgba(255,255,255,0.22); }
.nav-avatar-initial { color:white; font-weight:700; font-size:0.85rem; line-height:1; }
.nav-dd-user-info { padding:0.6rem 1rem 0.5rem; }
.nav-dd-user-name { font-weight:600; font-size:0.875rem; color:var(--text); }
.nav-dd-user-role { margin-top:0.2rem; }

/* ─── Footer ─────────────────────────────────────── */
.app-footer { background:var(--bg-card); border-top:1px solid var(--border); margin-top:auto; margin-left:var(--side-w); padding:2rem 0 0; transition: margin-left 0.24s ease; }
.footer-inner { max-width:1200px; margin:0 auto; padding:0 1.5rem; display:flex; flex-direction:column; gap:1.5rem; }
.footer-brand { display:flex; align-items:center; gap:0.5rem; font-size:0.8rem; color:var(--text-muted); }
.footer-sitemap { display:grid; grid-template-columns:repeat(4,1fr); gap:1.5rem; }
.footer-col-title { font-size:0.7rem; font-weight:700; text-transform:uppercase; letter-spacing:0.07em; color:var(--text-muted); margin-bottom:0.6rem; }
.footer-link { display:block; font-size:0.8rem; color:var(--text-muted); text-decoration:none; padding:0.2rem 0; transition:color 0.1s; }
.footer-link:hover { color:var(--primary); }
.footer-bottom { border-top:1px solid var(--border); padding:0.75rem 1.5rem; margin-top:0.5rem; display:flex; align-items:center; justify-content:space-between; font-size:0.72rem; color:var(--text-muted); }
.footer-bottom-links { display:flex; gap:1rem; }
.footer-bottom-links a { color:var(--text-muted); text-decoration:none; }
.footer-bottom-links a:hover { color:var(--primary); }
@media (max-width:768px) {
  .footer-sitemap { grid-template-columns:repeat(2,1fr); }
  .app-footer { display:none; } /* hidden on mobile — nav handles it */
}
/* Hide the sitemap footer on the full-height meeting-book reader view: that layout
   scrolls internally, so a document-flow footer would slide up and cover content. */
#app-content:has(.meeting-book) ~ .app-footer { display:none; }

/* ── RSVP Styles ─────────────────────────────────────────────────────────── */
.btn-warning { background: #d97706; color: #fff; border: none; }
.btn-warning:hover:not(:disabled) { background: #b45309; }

.meeting-rsvp-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  padding-top: 0.6rem;
  margin-top: 0.6rem;
  border-top: 1px solid var(--border);
}

.rsvp-label {
  font-size: 0.775rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 0.25rem;
}

.rsvp-counts {
  font-size: 0.775rem;
  color: var(--text-muted);
  margin-left: 0.25rem;
}

/* ── Visibility Selector ─────────────────────────────────────────────────── */
.visibility-field { margin-bottom: 0; }

.visibility-options {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
}

.visibility-opt {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  flex: 1;
  min-width: 120px;
  padding: 0.6rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: var(--bg-card);
  position: relative;
}

.visibility-opt input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.visibility-opt span {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.visibility-opt small {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.visibility-opt:hover {
  border-color: var(--primary);
  background: rgba(215,43,42,0.05);
}

.visibility-opt.selected {
  border-color: var(--primary);
  background: rgba(215,43,42,0.05);
}

/* Restricted option: teal accent when selected */
.visibility-opt:has(input[value="restricted"]).selected,
.visibility-opt:has(input[value="restricted"]):has(input:checked) {
  border-color: #D72B2A;
  background: rgba(215,43,42,0.05);
}

/* Confidential option: amber accent when selected */
.visibility-opt:has(input[value="confidential"]).selected {
  border-color: #d97706;
  background: #fffbeb;
}

.visibility-user-select {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.visibility-user-select.hidden { display: none; }

.visibility-user-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 200px;
  overflow-y: auto;
  margin-top: 0.5rem;
}

.visibility-user-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  cursor: pointer;
  padding: 0.2rem 0;
}

.visibility-user-checkbox input[type="checkbox"] {
  flex-shrink: 0;
}

.visibility-user-role {
  font-size: 0.775rem;
  color: var(--text-muted);
  margin-left: 0.25rem;
}

/* ── Visibility Badges ───────────────────────────────────────────────────── */
.visibility-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 9999px;
  white-space: nowrap;
  vertical-align: middle;
  margin-left: 0.35rem;
}

.visibility-badge-restricted {
  background: rgba(215,43,42,0.08);
  color: #b01f1e;
  border: 1px solid rgba(215,43,42,0.25);
}

.visibility-badge-confidential {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

/* ── Confidential item card treatment ───────────────────────────────────── */
.confidential-item {
  border-left: 3px solid #d97706 !important;
  background: #fffdf5 !important;
}

.restricted-item {
  border-left: 3px solid #D72B2A !important;
}


/* ── Help nav button ─────────────────────────────────────────────────── */
.nav-help-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: rgba(255,255,255,0.55);
  transition: color 0.2s, background 0.2s;
}
.nav-help-btn:hover {
  color: rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.08);
}

/* ============================================================
   BOARDTABLE — WORDMARK LOCKUP
   Two-tone lowercase wordmark: "board" (ink) + "table" (teal).
   Scale the whole mark with one knob: font-size on .tbc-lockup.
   ============================================================ */
.tbc-lockup {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  font-size: 72px;                 /* the only size you set */
  line-height: 1;
  --tbc-b: var(--ink);
  --tbc-t: var(--teal);
  --tbc-tag: var(--teal);
}
.tbc-lockup__wm {
  font-family: var(--font-display); font-weight: 600;
  font-size: 0.62em; letter-spacing: -0.03em; line-height: 1; white-space: nowrap;
}
.tbc-lockup__wm .b { color: var(--tbc-b); }
.tbc-lockup__wm .t { color: var(--tbc-t); }
.tbc-lockup__tag {
  font-family: var(--font-body); font-weight: 600; font-size: 0.16em;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--tbc-tag);
  margin-top: 0.85em; white-space: nowrap;
}
/* Variants */
.tbc-lockup--inverse { --tbc-b: #fff; --tbc-t: var(--teal-light); --tbc-tag: var(--teal-light); }
.tbc-lockup--ongold  { --tbc-b: var(--ink); --tbc-t: var(--ink); --tbc-tag: rgba(20,26,36,0.62); }

/* Compact wordmark for the top nav / footer */
.nav-lockup {
  display: inline-flex; align-items: baseline; line-height: 1;
}
.nav-lockup__wm {
  font-family: var(--font-display); font-weight: 600; font-size: 22px;
  letter-spacing: -0.03em; line-height: 1;
}
.nav-lockup__wm .b { color: var(--ink); }
.nav-lockup__wm .t { color: var(--teal); }
.nav-lockup--inverse .b { color: #fff; }
.nav-lockup--inverse .t { color: var(--teal-light); }

/* ============================================================
   AI SURFACE — gold-tinted light card (never a dark box)
   ============================================================ */
.ai-card, .ai-surface {
  background: linear-gradient(180deg, var(--ai-bg-top), var(--ai-bg-bottom));
  border: 1px solid var(--ai-border);
  border-radius: var(--radius);
  color: var(--ai-text);
}
.ai-card .ai-eyebrow, .ai-surface .ai-eyebrow {
  font-family: var(--font-mono); font-weight: 700; font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--ai-accent);
}

/* ============================================================
   BOARD PULSE (happiness survey)
   ============================================================ */
.hap-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}
@media (max-width: 820px) { .hap-grid { grid-template-columns: 1fr; } }
.hap-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.25rem;
}
.hap-card h3 { margin: 0 0 0.35rem; font-size: 1.05rem; }
.hap-muted { color: var(--text-muted); font-size: 0.88rem; margin: 0 0 1rem; }
.hap-faces {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  margin: 0.5rem 0 1rem;
}
.hap-face {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.85rem 0.4rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg, #fff);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s, background 0.15s;
}
.hap-face:hover { transform: translateY(-2px); border-color: var(--gold); }
.hap-face.selected {
  border-color: var(--gold-bright);
  background: rgba(231,179,71,0.12);
  box-shadow: 0 0 0 1px var(--gold-bright) inset;
}
.hap-face-emoji { font-size: 1.8rem; line-height: 1; }
.hap-face-label { font-size: 0.72rem; color: var(--text-muted); font-weight: 600; }
.hap-comment {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 0.75rem;
  font: inherit;
  resize: vertical;
  margin-bottom: 0.85rem;
}
.hap-saved-note {
  margin: 0.75rem 0 0;
  font-size: 0.82rem;
  color: var(--success);
}
.hap-gauge { display: flex; align-items: baseline; gap: 0.35rem; }
.hap-gauge-value { font-family: var(--font-mono); font-size: 3rem; font-weight: 800; line-height: 1; }
.hap-gauge-out { font-size: 1.1rem; color: var(--text-muted); }
.hap-participation { font-size: 0.85rem; color: var(--text-muted); margin: 0.5rem 0 1rem; }
.hap-dist-row {
  display: grid;
  grid-template-columns: 1.4rem 5.5rem 1fr 1.5rem;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  font-size: 0.82rem;
}
.hap-dist-face { font-size: 1rem; }
.hap-dist-label { color: var(--text-muted); }
.hap-dist-bar { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; }
.hap-dist-fill { display: block; height: 100%; background: var(--gold-bright); border-radius: 4px; }
.hap-dist-count { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-muted); }
.hap-trend {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  min-height: 160px;
  padding-top: 0.5rem;
  overflow-x: auto;
}
.hap-trend-col { display: flex; flex-direction: column; align-items: center; flex: 1; min-width: 48px; }
.hap-trend-track {
  width: 100%;
  height: 110px;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(to top, var(--border) 0, transparent 1px) repeat-y;
}
.hap-trend-bar { width: 100%; border-radius: 4px 4px 0 0; min-height: 3px; transition: height 0.3s; }
.hap-trend-val { font-family: var(--font-mono); font-size: 0.78rem; font-weight: 700; margin-top: 0.25rem; }
.hap-trend-label { font-size: 0.68rem; color: var(--text-muted); margin-top: 0.15rem; white-space: nowrap; }
.hap-comments { display: flex; flex-direction: column; gap: 0.6rem; }
.hap-comment-item {
  display: flex;
  gap: 0.6rem;
  padding: 0.65rem 0.8rem;
  background: var(--bg, #faf9f6);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.88rem;
}
.hap-comment-face { font-size: 1.1rem; flex-shrink: 0; }
.hap-comment-text { color: var(--text); }

/* ── Director dashboard: "Your bench" strip ───────────────────────── */
.bench-region { margin: 0 0 1.75rem; }
.bench-region .section-label { margin-bottom: 0.6rem; }
.bench-loading {
  padding: 0.9rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.9rem;
}
/* All-clear: replaces the stat tiles entirely when nothing needs the user, so
   they never see a row of giant "0"s. */
.bench-allclear {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(180deg, #f1f7f6 0%, var(--surface) 80%);
  border: 1px solid var(--hair);
  border-left: 3px solid var(--teal);
  border-radius: var(--radius);
}
.bench-allclear-icon { color: var(--teal); display: flex; flex-shrink: 0; }
.bench-allclear-text { font-size: 1rem; color: var(--text); font-weight: 500; }
.bench-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
}
.bench-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--hair);
  border-left: 3px solid var(--hair);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: border-color .15s ease, transform .12s ease, box-shadow .15s ease;
}
.bench-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(14,14,16,0.08);
  border-left-color: var(--gold);
}
.bench-tile-icon { line-height: 1; color: var(--gold); margin-bottom: 0.3rem; }
.bench-tile-icon svg { display: block; }
.bench-tile-num {
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1.05;
  color: var(--ink-navy);
}
.bench-tile-label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-weight: 600;
}
.bench-tile.bench-tile-active {
  border-left-color: var(--gold);
  background: linear-gradient(180deg, #fffdf6 0%, var(--surface) 70%);
}
.bench-tile.bench-tile-active .bench-tile-num { color: var(--gold); }
@media (max-width: 640px) {
  .bench-strip { grid-template-columns: 1fr; gap: 0.6rem; }
  .bench-tile { flex-direction: row; align-items: center; gap: 0.7rem; }
  .bench-tile-num { font-size: 1.5rem; }
  .bench-tile-label { flex: 1; }
}

/* ── Admin dashboard: "Needs you" command centre ──────────────────── */
.command-center {
  background: var(--ink-navy);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem 1.2rem;
  margin-bottom: 1.75rem;
  color: #fff;
}
.command-center-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.command-center-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: var(--gold-bright);
  margin: 0;
}
.command-center-sub {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.55);
}
.command-center-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.command-center-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 0.9rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
}
.command-center-icon { font-size: 1.05rem; flex-shrink: 0; }
.command-center-text { flex: 1; font-size: 0.92rem; color: #fff; }
.command-center-cta {
  flex-shrink: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold-bright);
  text-decoration: none;
  white-space: nowrap;
}
.command-center-cta:hover { text-decoration: underline; }
.command-center-clear {
  padding: 0.6rem 0.2rem;
  color: rgba(255,255,255,0.8);
  font-size: 0.92rem;
}
@media (max-width: 600px) {
  .command-center-item { flex-wrap: wrap; }
  .command-center-cta { margin-left: 2.4rem; }
}

/* ============================================================
   MEETING MODE — full-screen, distraction-free meeting book
   ============================================================ */
body.meeting-mode .app-sidebar,
body.meeting-mode .app-topbar,
body.meeting-mode .mobile-nav,
body.meeting-mode #feedback-btn { display: none !important; }
body.meeting-mode .app-content { margin-left: 0 !important; padding-top: 0 !important; }
body.meeting-mode .meeting-book { height: 100vh; }
body.meeting-mode .meeting-annotations { display: none; }
body.meeting-mode .meeting-main-inner { max-width: 1000px; margin: 0 auto; }

.meeting-mode-exit {
  position: fixed;
  top: 14px;
  right: 16px;
  z-index: 9999;
  background: var(--ink-navy, #141a24);
  color: var(--gold-bright, #74b6bd);
  border: 1px solid rgba(44,124,132,0.45);
  border-radius: 2rem;
  padding: 0.45rem 1rem;
  font-family: var(--font-mono, 'IBM Plex Mono', monospace);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0,0,0,0.25);
}
.meeting-mode-exit:hover { background: #0b0f16; }

/* ============================================================
   PRESENTATION SCREEN VIEW — project agenda & papers to a screen
   ============================================================ */
body.presenting .app-sidebar,
body.presenting .app-topbar,
body.presenting .mobile-nav,
body.presenting #feedback-btn { display: none !important; }
body.presenting .app-content { margin-left: 0 !important; padding-top: 0 !important; }
body.presenting { overflow: hidden; }

.present-stage {
  position: fixed;
  inset: 0;
  z-index: 6000;
  background: radial-gradient(120% 120% at 70% 10%, #1d2c3d 0%, var(--ink-navy, #141a24) 45%, #0a0d12 100%);
  color: var(--cream, #f6f3ec);
  display: flex;
  flex-direction: column;
}

.present-slide-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 9vh 9vw 12vh;
  overflow-y: auto;
}
.present-slide-wrap.present-anim .pslide { animation: pslide-in 0.35s ease; }
@keyframes pslide-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.pslide { width: 100%; max-width: 1140px; }

.pslide-kicker {
  font-family: var(--font-mono, 'IBM Plex Mono', monospace);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: clamp(0.8rem, 1.4vw, 1.1rem);
  color: var(--gold-bright, #74b6bd);
  margin-bottom: 1.4rem;
}

/* Title & closing slides */
.pslide-title { text-align: center; }
.pslide-org {
  font-family: var(--font-mono, 'IBM Plex Mono', monospace);
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: clamp(0.85rem, 1.5vw, 1.15rem);
  color: rgba(246,243,236,0.65);
  margin-bottom: 1.8rem;
}
.pslide-bigtitle {
  font-family: var(--font-serif, 'Spectral', serif);
  font-weight: 600;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 1.05;
  margin: 0 0 1.8rem;
  color: #fff;
}
.pslide-meta {
  display: flex;
  gap: 2.2rem;
  justify-content: center;
  flex-wrap: wrap;
  font-size: clamp(1.05rem, 2vw, 1.6rem);
  color: rgba(246,243,236,0.9);
}
.pslide-empty { font-size: clamp(1.1rem, 2vw, 1.6rem); color: rgba(246,243,236,0.8); max-width: 30ch; margin: 0 auto; }

/* Agenda overview slide */
.pslide-agenda-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: none;
}
.pslide-agenda-list li {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(44,124,132,0.18);
  font-family: var(--font-serif, 'Spectral', serif);
  font-size: clamp(1.3rem, 3vw, 2.4rem);
}
.pslide-agenda-num {
  font-family: var(--font-mono, 'IBM Plex Mono', monospace);
  font-size: clamp(1rem, 1.8vw, 1.5rem);
  color: var(--gold-bright, #74b6bd);
  min-width: 1.6em;
  font-weight: 700;
}
.pslide-agenda-title { flex: 1; }

/* Agenda item slides */
.pslide-item-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.2rem; }
.pslide-item-num {
  font-family: var(--font-mono, 'IBM Plex Mono', monospace);
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  font-weight: 700;
  color: var(--gold-bright, #74b6bd);
}
.pslide-tag {
  font-family: var(--font-mono, 'IBM Plex Mono', monospace);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: clamp(0.7rem, 1.1vw, 0.95rem);
  font-weight: 700;
  color: var(--ink-navy, #141a24);
  background: var(--gold-bright, #74b6bd);
  border-radius: 2rem;
  padding: 0.3rem 0.9rem;
}
.pslide-item-title {
  font-family: var(--font-serif, 'Spectral', serif);
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1.08;
  margin: 0 0 1.2rem;
  color: #fff;
}
.pslide-presenter {
  font-size: clamp(1rem, 1.8vw, 1.4rem);
  color: rgba(246,243,236,0.75);
  margin-bottom: 1.4rem;
}
.pslide-recommendation {
  background: rgba(44,124,132,0.12);
  border-left: 4px solid var(--gold, #2c7c84);
  border-radius: 8px;
  padding: 1rem 1.4rem;
  font-size: clamp(1.05rem, 2vw, 1.5rem);
  line-height: 1.4;
  margin-bottom: 1.6rem;
}
.pslide-papers-label {
  font-family: var(--font-mono, 'IBM Plex Mono', monospace);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: clamp(0.7rem, 1.2vw, 0.95rem);
  color: var(--gold-bright, #74b6bd);
  margin-bottom: 0.8rem;
}
.pslide-papers { list-style: none; margin: 0; padding: 0; }
.pslide-papers li {
  font-size: clamp(1.05rem, 2.2vw, 1.7rem);
  padding: 0.5rem 0;
  color: rgba(246,243,236,0.92);
}

/* Controls */
.present-topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.4rem;
}
.present-counter {
  font-family: var(--font-mono, 'IBM Plex Mono', monospace);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(246,243,236,0.9);
}
.present-top-actions { display: flex; gap: 0.6rem; }
.present-icon-btn {
  background: rgba(255,255,255,0.06);
  color: var(--cream, #f6f3ec);
  border: 1px solid rgba(44,124,132,0.35);
  border-radius: 2rem;
  padding: 0.4rem 0.9rem;
  font-family: var(--font-mono, 'IBM Plex Mono', monospace);
  font-size: 0.8rem;
  cursor: pointer;
}
.present-icon-btn:hover { background: rgba(255,255,255,0.14); }

.present-controls {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 1.2rem;
}
.present-btn {
  background: rgba(255,255,255,0.06);
  color: var(--gold-bright, #74b6bd);
  border: 1px solid rgba(44,124,132,0.4);
  border-radius: 50%;
  width: 52px; height: 52px;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.present-btn:hover:not([disabled]) { background: rgba(44,124,132,0.25); }
.present-btn[disabled] { opacity: 0.3; cursor: default; }
.present-dots { display: flex; gap: 0.5rem; flex-wrap: wrap; max-width: 60vw; justify-content: center; }
.present-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  border: none;
  background: rgba(246,243,236,0.25);
  cursor: pointer;
  padding: 0;
}
.present-dot.active { background: var(--gold-bright, #74b6bd); }

@media (max-width: 600px) {
  .present-dots { display: none; }
}

/* Clickable user name in Manage Directors table */
.user-name-link {
  color: var(--ink-navy, #141a24);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.12s ease, border-color 0.12s ease;
}
.user-name-link:hover {
  color: var(--gold-deep, #20606b);
  border-bottom-color: var(--gold, #2c7c84);
}

/* ─── Board Reports ──────────────────────────────── */
.back-link { display:inline-block; font-size:0.8rem; font-weight:600; color:var(--text-muted); text-decoration:none; margin-bottom:0.35rem; }
.back-link:hover { color:var(--ink-navy); }
.btn-danger-ghost { color:#b91c1c; }
.btn-danger-ghost:hover { background:#fef2f2; }

/* List: report cards */
.report-card-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(300px, 1fr)); gap:1rem; }
.report-card {
  background:#fff; border:1px solid var(--border); border-radius:var(--radius);
  padding:1.1rem 1.2rem; cursor:pointer; transition:box-shadow 0.15s, border-color 0.15s, transform 0.1s;
  display:flex; flex-direction:column; gap:0.55rem;
}
.report-card:hover { box-shadow:0 6px 20px rgba(17,19,22,0.08); border-color:var(--gold); transform:translateY(-1px); }
.report-card-top { display:flex; align-items:center; justify-content:space-between; gap:0.5rem; }
.report-type-chip {
  font-size:0.68rem; font-weight:700; text-transform:uppercase; letter-spacing:0.05em;
  color:var(--ink-navy); background:rgba(44,124,132,0.16); border:1px solid rgba(44,124,132,0.4);
  padding:2px 9px; border-radius:999px;
}
.report-card-title { font-size:1.05rem; font-weight:700; line-height:1.3; margin:0; color:var(--ink); }
.report-card-meta { display:flex; flex-wrap:wrap; gap:0.6rem 1rem; font-size:0.78rem; color:var(--text-muted); }
.report-card-actions { display:flex; gap:0.4rem; margin-top:0.3rem; padding-top:0.6rem; border-top:1px solid var(--border); flex-wrap:wrap; }

/* Builder */
.report-builder { max-width:880px; }
.report-builder-meta {
  background:#fff; border:1px solid var(--border); border-radius:var(--radius);
  padding:1.25rem 1.4rem; margin-bottom:1.5rem;
}
.report-builder-sections-head { margin-bottom:0.75rem; }
.report-builder-sections-head h2 { margin:0 0 0.15rem; font-size:1.15rem; }
.report-section-card {
  background:#fff; border:1px solid var(--border); border-radius:var(--radius);
  padding:1rem 1.1rem; margin-bottom:0.9rem;
}
.report-section-card-head { display:flex; align-items:center; gap:0.6rem; margin-bottom:0.6rem; }
.report-section-card-head .br-sec-heading { font-weight:600; }
.report-section-card-tools { display:flex; gap:0.25rem; flex-shrink:0; }
.icon-btn {
  width:30px; height:30px; border:1px solid var(--border); background:#fff; border-radius:8px;
  cursor:pointer; font-size:0.9rem; line-height:1; color:var(--text-muted);
  display:inline-flex; align-items:center; justify-content:center; transition:all 0.12s;
}
.icon-btn:hover:not(:disabled) { border-color:var(--gold); color:var(--ink-navy); background:rgba(44,124,132,0.1); }
.icon-btn:disabled { opacity:0.35; cursor:not-allowed; }

/* Per-section writing tools (AI assist, resolution / strategy inserts) */
.br-sec-tools {
  display:flex; align-items:center; flex-wrap:wrap; gap:0.45rem;
  margin-top:0.6rem; padding-top:0.6rem; border-top:1px dashed var(--border);
}
.br-ai {
  display:inline-flex; align-items:center; gap:0.3rem;
  border:1px solid var(--coral); background:rgba(226,114,91,0.08); color:var(--coral-dark);
  border-radius:8px; padding:0.32rem 0.6rem; font-size:0.82rem; font-weight:600;
  cursor:pointer; transition:all 0.12s; white-space:nowrap;
}
.br-ai:hover:not(:disabled) { background:var(--coral); color:#fff; }
.br-ai:disabled { opacity:0.5; cursor:wait; }
.br-insert {
  border:1px solid var(--border); background:#fff; border-radius:8px;
  padding:0.32rem 0.5rem; font-size:0.82rem; color:var(--text-muted);
  max-width:220px; cursor:pointer;
}
.br-insert:hover { border-color:var(--gold); }
.br-ai-status { font-size:0.8rem; color:var(--coral-dark); font-weight:600; margin-left:auto; }

/* Print document */
.report-doc {
  background:#fff; border:1px solid var(--border); border-radius:var(--radius);
  padding:3rem 3.25rem; max-width:880px; margin:0 auto;
  box-shadow:0 4px 24px rgba(17,19,22,0.06);
}
.report-doc-header {
  display:flex; align-items:center; gap:1rem; justify-content:space-between;
  padding-bottom:1.25rem; margin-bottom:1.5rem; border-bottom:3px solid var(--gold);
}
.report-doc-logo { height:64px; width:auto; max-width:260px; object-fit:contain; }
.report-doc-logo-fallback {
  width:60px; height:60px; border-radius:10px; background:var(--ink-navy); color:var(--gold-bright);
  display:flex; align-items:center; justify-content:center; font-size:1.6rem; font-weight:800;
}
.report-doc-org { font-size:1.35rem; font-weight:700; color:var(--ink-navy); text-align:right; }
.report-doc-title-block { margin-bottom:2rem; }
.report-doc-type { font-size:0.75rem; font-weight:700; text-transform:uppercase; letter-spacing:0.08em; color:var(--gold); margin-bottom:0.35rem; }
.report-doc-title { font-size:1.85rem; line-height:1.2; margin:0 0 0.9rem; color:var(--ink); }
.report-doc-meta { display:flex; flex-wrap:wrap; gap:0.4rem 1.5rem; font-size:0.85rem; color:var(--text-muted); }
.report-doc-meta strong { color:var(--ink); font-weight:600; }
/* Canonical board-paper cover sheet (Title / Board Consideration / Author / Draft Resolution) */
.report-cover-sheet {
  border:1px solid var(--border); border-radius:8px; overflow:hidden;
  margin:0.4rem 0 1rem;
}
.report-cover-row { display:grid; grid-template-columns:190px 1fr; }
.report-cover-row + .report-cover-row { border-top:1px solid var(--border); }
.report-cover-key {
  background:#f4f7f7; padding:0.6rem 0.85rem; font-size:0.8rem; font-weight:700;
  text-transform:uppercase; letter-spacing:0.04em; color:var(--ink-navy);
  border-right:1px solid var(--border); display:flex; align-items:center;
}
.report-cover-val { padding:0.6rem 0.85rem; font-size:0.95rem; line-height:1.5; color:var(--ink); }
.report-cover-val p { margin:0 0 0.4rem; }
.report-cover-val p:last-child { margin-bottom:0; }
.report-cover-val ul { margin:0; padding-left:1.2rem; }
.report-doc-submeta { margin-top:0.5rem; }
@media (max-width:640px) {
  .report-cover-row { grid-template-columns:1fr; }
  .report-cover-key { border-right:none; border-bottom:1px solid var(--border); }
}

/* Cover-sheet draft-resolution helper row in the builder */
.report-coversheet-label {
  font-size:0.8rem; font-weight:700; text-transform:uppercase; letter-spacing:0.05em;
  color:var(--ink-navy); margin-bottom:0.6rem;
}
.br-resolution-tools { display:flex; align-items:center; gap:8px; margin-top:8px; flex-wrap:wrap; }
.br-resolution-tools .form-control-sm { max-width:240px; height:auto; padding:0.3rem 0.5rem; font-size:0.85rem; }

.report-doc-section { margin-bottom:1.75rem; break-inside:avoid; }
.report-doc-section h2 {
  font-size:1.15rem; color:var(--ink-navy); margin:0 0 0.5rem;
  padding-bottom:0.3rem; border-bottom:1px solid var(--border);
}
.report-doc-section-body { font-size:0.95rem; line-height:1.65; color:var(--ink); }
.report-doc-section-body p { margin:0 0 0.7rem; }
.report-doc-section-body ul { margin:0 0 0.7rem; padding-left:1.4rem; }
.report-doc-section-body li { margin-bottom:0.3rem; }
.report-doc-empty { color:var(--text-muted); }

@media (max-width:640px) {
  .report-doc { padding:1.5rem 1.25rem; }
  .report-doc-header { flex-direction:column; align-items:flex-start; gap:0.6rem; }
  .report-doc-org { text-align:left; }
}

@media print {
  .report-doc { box-shadow:none; border:none; border-radius:0; padding:0; max-width:100%; }
  .report-print-toolbar { display:none !important; }
  .report-doc-section { break-inside:avoid; }
}

/* Board-report review / approval workflow panel */
.br-workflow-card {
  border: 1px solid var(--hair);
  border-radius: var(--radius-sm);
  background: var(--surface, #fafafa);
  padding: 1rem 1.1rem;
  margin-bottom: 1.25rem;
}
.br-workflow-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.br-wf-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 700;
}
.br-wf-status { margin-top: 0.35rem; display: flex; align-items: center; gap: 0.5rem; }
.br-workflow-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.br-workflow-meta {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--ink);
}
.br-wf-note {
  margin-top: 0.75rem;
  padding: 0.65rem 0.8rem;
  border-radius: var(--radius-sm);
  background: #f1f5f9;
  font-size: 0.88rem;
  line-height: 1.45;
}
.br-wf-note.is-changes { background: #fef2f2; border: 1px solid #fecaca; }
.br-wf-note strong { display: block; margin-bottom: 0.2rem; }

/* ============================================================
   People-select — avatar dropdown (enhances native <select>)
   ============================================================ */
.ps-wrap { position: relative; }
.ps-native {
  /* Keep the native select in the DOM (value source) but visually hidden.
     Don't use display:none so required/label behaviour still works. */
  position: absolute !important;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
  margin: 0;
}
.ps-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  text-align: left;
  cursor: pointer;
  background: var(--white, #fff);
}
.ps-trigger-inner { display: inline-flex; align-items: center; gap: 0.55rem; min-width: 0; }
.ps-trigger .ps-label,
.ps-option-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ps-placeholder { color: var(--muted); }
.ps-caret { color: var(--muted); font-size: 0.8rem; flex-shrink: 0; }

.ps-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 60;
  max-height: 280px;
  overflow-y: auto;
  background: var(--white, #fff);
  border: 1px solid var(--hair);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  padding: 0.3rem;
}
.ps-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.55rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--ink);
}
.ps-option:hover { background: var(--hair); }
.ps-option.is-selected { background: rgba(31,111,92,0.08); font-weight: 600; }
.ps-option-label { flex: 1; min-width: 0; }
.ps-check { color: var(--gold, #b8860b); flex-shrink: 0; }

.ps-avatar {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  color: #fff;
  font-weight: 700;
  line-height: 1;
}
.ps-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ps-avatar-init { text-transform: uppercase; }
.ps-avatar-blank {
  width: 26px; height: 26px;
  border: 1px dashed var(--hair);
  background: transparent;
}

/* ── Board Analytics dashboard ─────────────────────────────────────────── */
.analytics-tab {
  background: none;
  border: none;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.analytics-tab:hover { color: var(--text); }
.analytics-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.analytics-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.85rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border, #e2e8f0);
}
.analytics-root .card-h, #analytics-root .card-h {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 0.85rem;
}
.chart-note {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0.6rem 0 0;
}
.kpi-card { transition: box-shadow 0.15s; }
@media (max-width: 760px) {
  #analytics-root .analytics-row { grid-template-columns: 1fr !important; }
}
@media print {
  .analytics-actions, .analytics-tabs, #tab-meeting { display: none !important; }
  #analytics-root .card { break-inside: avoid; box-shadow: none; border: 1px solid #e2e8f0; }
  #analytics-root .analytics-row { grid-template-columns: 1fr 1fr !important; }
}

/* Import wizard — strategy KPI rows collapse to stacked on narrow screens */
@media (max-width: 640px) {
  .strat-kpi-row {
    grid-template-columns: 1fr auto !important;
    grid-template-rows: auto auto auto;
  }
  .strat-kpi-row input:nth-child(2),
  .strat-kpi-row input:nth-child(3) {
    grid-column: 1;
  }
  .strat-kpi-row button {
    grid-column: 2;
    grid-row: 1;
  }
}

/* Circular resolutions — vote count semantic colours */
.vote-yes-count { color: var(--success, #16a34a); font-weight: 600; }
.vote-no-count  { color: var(--danger,  #dc2626); font-weight: 600; }

/* Strategy — minimum 44px touch target for KPI/action update buttons on mobile */
@media (max-width: 768px) {
  [data-update-kpi], [data-update-action] {
    min-height: 44px;
    padding: 0.6rem 0.75rem !important;
  }
}
