/* Vendored from special_functions_manager v1.88.0 static/css/sfm-refresh.css on 2026-09-15. Do not hand-edit; re-copy from SFM and re-apply the adaptations listed below.
   Adaptations: appended inline shell integration rules from SFM templates/base.html (2026-09-15); served here as shell.css. WO-side counter-rules live in main.css:
   `.input-group { gap: 0 }` (Bootstrap input-groups), `.btn { white-space: normal }` (translated labels wrap),
   `.sfm-version-row` reset (WO reuses that class name for the mobile-nav version badge wrapper), and the
   `body` rule maps --font-sans / --body-line / --text-body / --shell-bg so the theme reaches body text. */

/* =========================================================
   SFM Refresh Proposal — global styles
   Built on Dana Hall School design system v3.0.0
   ========================================================= */

:root {
  /* Local additions to the brand tokens */
  --rail-width: 248px;
  --topbar-height: 56px;
  --shell-bg: #f4f5f7;
  --canvas-border: #e3e6ec;

  /* Theme-able shell tokens (v1.88.0). Defaults reproduce the Classic design
     exactly; static/css/themes.css overrides them per [data-theme]. */
  --base-font-size: 15px;
  --text-body: #2a2c33;
  --canvas-bg: #ffffff;
  --surface-bg: #ffffff;          /* cards, inputs, chips */
  --rail-bg: #fbfbfd;
  --surface-subtle: #fbfbfd;      /* off-white panels inside the canvas; NOT the rail */
  --chrome-bg: #ffffff;           /* topbar */
  --chrome-fg: var(--dana-blue-dark);
  --chrome-muted: var(--gray-600);
  --chrome-link: var(--gray-800);
  --chrome-link-icon: var(--gray-600);
  --chrome-active-bg: var(--dana-blue-dark-10);
  --chrome-active-fg: var(--dana-blue-dark);
  --chrome-hover-bg: var(--dana-blue-dark-10);
  --chrome-hover-fg: var(--dana-blue-dark);
  --chrome-border: var(--canvas-border);
  --input-bg: #ffffff;
  --input-border: var(--canvas-border);
  --input-border-w: 1px;
  --input-fg: #2a2c33;
  --placeholder-fg: var(--gray-500);
  --card-border-w: 1px;
  --btn-cyan-fg: #ffffff;
  --link-underline: none;
  --focus-ring: 0 0 0 3px var(--dana-blue-light-10);
  --touch-min: 36px;

  --shadow-resting: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-card:    0 1px 3px rgba(0,0,0,0.08);
  --shadow-elevated:0 4px 14px rgba(50,53,125,0.10);
  --shadow-modal:   0 20px 50px rgba(50,53,125,0.18);

  /* Status pill backgrounds (10% tints) */
  --pill-pending-bg: rgba(255, 193, 7, 0.14);
  --pill-pending-fg: #806300;
  --pill-approved-bg: rgba(40, 167, 69, 0.12);
  --pill-approved-fg: #15642a;
  --pill-rejected-bg: rgba(220, 53, 69, 0.12);
  --pill-rejected-fg: #841823;
  --pill-revision-bg: rgba(253, 126, 20, 0.13);
  --pill-revision-fg: #93420b;
  --pill-archived-bg: rgba(117, 117, 117, 0.13);
  --pill-archived-fg: #4a4a4a;
  --pill-info-bg: rgba(0, 176, 231, 0.13);
  --pill-info-fg: #006a8b;
  --pill-navy-bg: rgba(50, 53, 125, 0.10);
  --pill-navy-fg: #2a2c66;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--shell-bg);
  color: var(--text-body);
  font-family: 'Founders Grotesk Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: var(--base-font-size);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Type helpers */
.t-display     { font-family: 'SangBleu Versailles', Georgia, serif; font-weight: 400; letter-spacing: -0.01em; }
.t-display-it  { font-family: 'SangBleu Versailles', Georgia, serif; font-weight: 400; font-style: italic; }
.t-condensed   { font-family: 'Founders Grotesk Condensed', sans-serif; font-weight: 500; letter-spacing: 0.005em; }
.t-x-condensed { font-family: 'Founders Grotesk X-Condensed', sans-serif; font-weight: 500; }
.t-mono        { font-family: 'Founders Grotesk Mono', ui-monospace, monospace; }

a { color: var(--dana-blue-dark); text-decoration: var(--link-underline); text-underline-offset: 3px; }
a:hover { color: var(--dana-blue-light-dark); }

button { font-family: inherit; }

::selection { background: var(--dana-blue-light-10); }

/* =========================================================
   APP SHELL
   ========================================================= */

.app-frame {
  display: grid;
  grid-template-rows: var(--topbar-height) 1fr;
  height: 100vh;
  min-height: 720px;
  background: var(--canvas-bg);
}

/* --- Topbar --- */
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 20px 10px 16px;
  min-height: 56px;
  background: var(--chrome-bg);
  color: var(--chrome-fg);
  border-bottom: 3px solid var(--dana-blue-light);
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
  position: relative;
  z-index: 10;
}
.topbar .brand {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none;
  min-width: var(--rail-width);
  padding-right: 16px;
  border-right: 1px solid var(--chrome-border);
  height: 100%;
}
.topbar .brand img { width: 32px; height: 32px; }
.topbar .brand .brand-text {
  display: flex; flex-direction: column; line-height: 1.1;
}
.topbar .brand .brand-school {
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--chrome-muted); font-weight: 500;
}
.topbar .brand .brand-app {
  font-family: 'Founders Grotesk Condensed', sans-serif;
  font-weight: 500;
  font-size: 17px;
  color: var(--chrome-fg);
}

.topbar-search {
  flex: 1;
  max-width: 480px;
  position: relative;
}
.topbar-search input {
  width: 100%;
  height: max(36px, var(--touch-min));
  padding: 0 12px 0 36px;
  border: var(--input-border-w) solid var(--input-border);
  border-radius: 8px;
  background: var(--input-bg);
  font-size: 14px;
  font-family: inherit;
  color: var(--input-fg);
}
.topbar-search input::placeholder { color: var(--placeholder-fg); }
.topbar-search input:focus {
  outline: none;
  border-color: var(--dana-blue-light);
  background: var(--input-bg);
  box-shadow: var(--focus-ring);
}
.topbar-search .fa-search {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--placeholder-fg); font-size: 13px;
}

.topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-btn {
  width: max(36px, var(--touch-min)); height: max(36px, var(--touch-min));
  border: 1px solid transparent;
  background: transparent;
  border-radius: 8px;
  color: var(--chrome-link);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 150ms ease;
}
.icon-btn:hover { background: var(--chrome-hover-bg); color: var(--chrome-hover-fg); }
.icon-btn .dot {
  position: absolute; top: 8px; right: 8px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--dana-blue-light);
}
.topbar-actions .icon-btn { position: relative; }

.user-chip {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 4px 12px 4px 4px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--chrome-border);
  cursor: pointer;
  height: max(36px, var(--touch-min));
}
.user-chip:hover { background: var(--chrome-hover-bg); }
.user-chip .avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--gradient-brand);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600;
}
.user-chip .who { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.user-chip .who .name { font-size: 13px; font-weight: 500; color: var(--chrome-fg); }
.user-chip .who .role { font-size: 11px; color: var(--chrome-muted); }

/* --- Main grid: rail + canvas --- */
.shell-grid {
  display: grid;
  grid-template-columns: var(--rail-width) 1fr;
  height: 100%;
  min-height: 0;
}

/* --- Left rail --- */
.rail {
  background: var(--rail-bg);
  border-right: 1px solid var(--chrome-border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 12px 0;
}
.rail .rail-cta {
  margin: 4px 12px 16px;
}
.rail-section {
  padding: 14px 16px 6px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--chrome-muted);
  font-weight: 500;
}
.rail-link {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 16px 9px 18px;
  margin: 1px 8px;
  border-radius: 6px;
  color: var(--chrome-link);
  font-size: 14px;
  font-weight: 400;
  min-height: var(--touch-min);
  cursor: pointer;
  position: relative;
  border: none;
  background: transparent;
  text-align: left;
  width: calc(100% - 16px);
  font-family: inherit;
  transition: background 150ms ease, color 150ms ease;
}
.rail-link i { width: 18px; text-align: center; color: var(--chrome-link-icon); font-size: 14px; }
.rail-link:hover { background: var(--chrome-hover-bg); color: var(--chrome-hover-fg); }
.rail-link:hover i { color: var(--chrome-hover-fg); }
.rail-link.active {
  background: var(--chrome-active-bg);
  color: var(--chrome-active-fg);
  font-weight: 500;
}
.rail-link.active i { color: var(--dana-blue-light); }
.rail-link.active::before {
  content: '';
  position: absolute;
  left: 0; top: 6px; bottom: 6px;
  width: 3px;
  background: var(--dana-blue-light);
  border-radius: 0 3px 3px 0;
}
.rail-link .count {
  margin-left: auto;
  font-size: 11px;
  font-weight: 500;
  background: var(--dana-blue-light-10);
  color: var(--pill-info-fg);
  padding: 1px 7px;
  border-radius: 999px;
  font-family: 'Founders Grotesk Mono', monospace;
}

.rail-footer {
  margin-top: auto;
  padding: 14px 16px;
  border-top: 1px solid var(--chrome-border);
  font-size: 11px;
  color: var(--chrome-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.rail-footer .build-dot {
  width: 6px; height: 6px; border-radius: 50%; background: #28a745;
}
/* Version badge — the build stamp is a real button that opens the recent-commits
   popover. Styled to stay exactly as ignorable as the span it replaced. */
.rail-footer .rail-version {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.rail-footer .rail-version:hover { color: var(--chrome-link); }
.rail-footer .rail-version:focus { outline: none; }
.rail-footer .rail-version:focus-visible {
  outline: 2px solid var(--dana-blue-light);
  outline-offset: 2px;
  border-radius: 3px;
}

/* Recent-commits popover. Portalled to <body> (the rail clips), so these rules
   are intentionally global rather than nested under .rail. */
.sfm-version-popover { max-width: 380px; }
.sfm-version-popover .popover-header {
  font-size: 12px;
  font-weight: 600;
  color: var(--dana-blue-dark);
}
.sfm-version-popover .popover-body { padding: 6px 12px 10px; }
.sfm-version-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 5px 0;
  font-size: 11.5px;
  line-height: 1.35;
  border-bottom: 1px solid var(--canvas-border);
}
.sfm-version-row:last-child { border-bottom: 0; padding-bottom: 0; }
.sfm-version-hash {
  font-family: var(--font-mono);
  color: var(--dana-blue-dark);
  flex: 0 0 auto;
}
.sfm-version-rel {
  color: var(--gray-600);
  white-space: nowrap;
  flex: 0 0 auto;
}
.sfm-version-msg {
  color: var(--gray-800);
  min-width: 0;
  overflow-wrap: anywhere;
}

/* --- Canvas --- */
.canvas {
  background: var(--canvas-bg);
  overflow: auto;
  min-height: 0;
}

/* =========================================================
   PAGE HEADER (one component everywhere)
   ========================================================= */
.page-header {
  padding: 32px 40px 20px;
  border-bottom: 1px solid var(--canvas-border);
  background: var(--canvas-bg);
}
.page-header .crumbs {
  font-size: 12px;
  color: var(--gray-600);
  letter-spacing: 0.04em;
  margin-bottom: 6px;
  display: flex; align-items: center; gap: 6px;
}
.page-header .crumbs .sep { color: var(--gray-400); }
.page-header h1 {
  margin: 0;
  font-family: 'Founders Grotesk Condensed', sans-serif;
  font-weight: 500;
  font-size: 30px;
  color: var(--dana-blue-dark);
  letter-spacing: -0.005em;
  line-height: 1.1;
}
.page-header .subtitle {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--gray-700);
  max-width: 60ch;
}
/* Inline title + subtitle to reclaim vertical space at the top of the page.
   Templates wrap <h1> + <p.subtitle> in <div class="title-row"> to opt in. */
.page-header .title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 14px;
  row-gap: 2px;
}
.page-header .title-row .subtitle {
  margin: 0;
  font-size: 13px;
  color: var(--gray-600);
  max-width: 70ch;
  position: relative;
  padding-left: 14px;
}
.page-header .title-row .subtitle::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 1px;
  height: 0.95em;
  transform: translateY(-50%);
  background: var(--canvas-border, rgba(0,0,0,0.12));
}
@media (max-width: 480px) {
  .page-header .title-row .subtitle { padding-left: 0; }
  .page-header .title-row .subtitle::before { display: none; }
}
.page-header .header-row {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
  flex-wrap: wrap;
}
.page-header .header-actions {
  display: flex; gap: 8px; align-items: center;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  text-transform: none;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
  line-height: 1.2;
  white-space: nowrap;
}
.btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}
.btn-primary {
  background: var(--dana-blue-dark);
  color: #fff;
}
.btn-primary:hover { background: var(--dana-blue-dark-dark); color: #fff; }
.btn-cyan {
  background: var(--dana-blue-light);
  color: var(--btn-cyan-fg);
}
.btn-cyan:hover { background: var(--dana-blue-light-dark); color: var(--btn-cyan-fg); }
.btn-outline {
  background: var(--surface-bg);
  border-color: var(--input-border);
  color: var(--gray-800);
}
.btn-outline:hover { background: #f0f4f8; border-color: var(--dana-blue-light); color: var(--dana-blue-dark); }
.btn-ghost {
  background: transparent;
  color: var(--gray-700);
}
.btn-ghost:hover { background: var(--dana-blue-dark-10); color: var(--dana-blue-dark); }
.btn-danger-outline {
  background: #fff;
  border-color: rgba(220, 53, 69, 0.4);
  color: var(--danger-color);
}
.btn-danger-outline:hover { background: rgba(220, 53, 69, 0.08); }

.btn-sm { padding: 5px 11px; font-size: 13px; border-radius: 6px; }
.btn-lg { padding: 11px 22px; font-size: 15px; }

/* =========================================================
   PILLS / BADGES (capsule, 10% tints)
   ========================================================= */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: 'Founders Grotesk Text', sans-serif;
  line-height: 1.5;
  white-space: nowrap;
}
.pill.lg { font-size: 12px; padding: 4px 12px; }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-pending { background: var(--pill-pending-bg); color: var(--pill-pending-fg); }
.pill-approved { background: var(--pill-approved-bg); color: var(--pill-approved-fg); }
.pill-rejected { background: var(--pill-rejected-bg); color: var(--pill-rejected-fg); }
.pill-revision { background: var(--pill-revision-bg); color: var(--pill-revision-fg); }
.pill-archived { background: var(--pill-archived-bg); color: var(--pill-archived-fg); }
.pill-info { background: var(--pill-info-bg); color: var(--pill-info-fg); }
.pill-navy { background: var(--pill-navy-bg); color: var(--pill-navy-fg); }
.pill-clear { background: transparent; color: var(--gray-700); border: 1px solid var(--canvas-border); }

/* Department pills */
.pill-dept-dining     { background: rgba(0,176,231,0.13); color: #006a8b; }
.pill-dept-facilities { background: rgba(50,53,125,0.10); color: #2a2c66; }
.pill-dept-tech       { background: rgba(132, 80, 200, 0.10); color: #5a3ea0; }
.pill-dept-safety     { background: rgba(220, 53, 69, 0.10); color: #841823; }
.pill-dept-events     { background: rgba(40, 167, 69, 0.12); color: #15642a; }

/* =========================================================
   ROLE BADGE — three variants for tweak panel
   ========================================================= */
.role-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px;
  font-weight: 500;
}

/* Variant: pill — capsule, 10% tint */
.role-badge.role-v-pill {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--dana-blue-dark-10);
  color: var(--dana-blue-dark);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}
.role-badge.role-v-pill i { font-size: 10px; }

/* Variant: chip — solid navy, square-ish */
.role-badge.role-v-chip {
  padding: 4px 9px;
  border-radius: 6px;
  background: var(--dana-blue-dark);
  color: #fff;
  text-transform: none;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0;
}
.role-badge.role-v-chip i { font-size: 10px; opacity: 0.85; }

/* Variant: rule — minimal, condensed text under name */
.role-badge.role-v-rule {
  padding: 0;
  background: transparent;
  color: var(--gray-700);
  font-family: 'Founders Grotesk Condensed', sans-serif;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  border-left: 2px solid var(--dana-blue-light);
  padding-left: 8px;
}
.role-badge.role-v-rule i { display: none; }

/* =========================================================
   CARD
   ========================================================= */
.card {
  background: var(--surface-bg);
  border: var(--card-border-w) solid var(--canvas-border);
  border-radius: 12px;
  box-shadow: var(--shadow-resting);
  transition: box-shadow 250ms ease;
}
.card.hoverable:hover { box-shadow: var(--shadow-elevated); }
.card-header {
  padding: 14px 20px;
  background: var(--dana-blue-dark-10);
  border-bottom: 2px solid var(--dana-blue-light);
  border-radius: 12px 12px 0 0;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.card-header h3 {
  margin: 0;
  font-family: 'Founders Grotesk Condensed', sans-serif;
  font-weight: 500;
  font-size: 17px;
  color: var(--dana-blue-dark);
  letter-spacing: 0.005em;
}
.card-body { padding: 20px; }

/* =========================================================
   FORM
   ========================================================= */
.field-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-700);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.field-label .req { color: var(--danger-color); margin-left: 2px; }

.input, .select, .textarea {
  width: 100%;
  padding: 9px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--input-fg);
  background: var(--input-bg);
  border: var(--input-border-w) solid var(--input-border);
  border-radius: 8px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
  line-height: 1.4;
}
.input::placeholder, .textarea::placeholder { color: var(--placeholder-fg); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--dana-blue-light);
  box-shadow: var(--focus-ring);
}
.textarea { min-height: 90px; resize: vertical; }
.help-text { font-size: 12px; color: var(--gray-600); margin-top: 5px; }

.field-row {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}
.field-row.cols-2 { grid-template-columns: 1fr 1fr; }
.field-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }

/* Radio group as visual tabs */
.radio-pillgroup {
  display: inline-flex;
  background: #f4f5f7;
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}
.radio-pillgroup label {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  color: var(--gray-700);
  transition: all 150ms ease;
}
.radio-pillgroup input { display: none; }
.radio-pillgroup label.checked,
.radio-pillgroup input:checked + label {
  background: #fff;
  color: var(--dana-blue-dark);
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

/* Tag-style multi-select */
.choice-tile {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--canvas-border);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  transition: all 150ms ease;
}
.choice-tile:hover { border-color: var(--dana-blue-light); }
.choice-tile.selected {
  background: var(--dana-blue-light-10);
  border-color: var(--dana-blue-light);
  color: var(--dana-blue-dark);
  font-weight: 500;
}
.choice-tile .check {
  width: 16px; height: 16px; border-radius: 4px;
  border: 1.5px solid var(--gray-400);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; color: transparent;
}
.choice-tile.selected .check {
  background: var(--dana-blue-light); border-color: var(--dana-blue-light); color: #fff;
}

/* =========================================================
   STAT CARDS
   ========================================================= */
.stat {
  background: var(--surface-bg);
  border: var(--card-border-w) solid var(--canvas-border);
  border-radius: 12px;
  padding: 18px 20px;
}
.stat .label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-600);
  margin: 0 0 8px;
}
.stat .value {
  font-family: 'Founders Grotesk X-Condensed', sans-serif;
  font-weight: 500;
  font-size: 38px;
  line-height: 1;
  color: var(--dana-blue-dark);
}
.stat .delta {
  font-size: 12px;
  margin-top: 6px;
  color: var(--gray-700);
}
.stat .delta.up { color: var(--success-color); }
.stat .delta.down { color: var(--danger-color); }

/* =========================================================
   TOAST + EMPTY
   ========================================================= */
.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-700);
}
.empty .empty-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--dana-blue-dark-10);
  color: var(--dana-blue-dark);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
}
.empty h3 {
  margin: 0 0 6px;
  font-family: 'Founders Grotesk Condensed', sans-serif;
  font-weight: 500;
  font-size: 20px;
  color: var(--dana-blue-dark);
}
.empty p { margin: 0 0 18px; font-size: 14px; }

/* =========================================================
   UTILITIES
   ========================================================= */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-6 { gap: 24px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.text-muted { color: var(--gray-600); }
.text-mono { font-family: 'Founders Grotesk Mono', monospace; }
.divider { height: 1px; background: var(--canvas-border); margin: 16px 0; border: none; }

/* =========================================================
   FORM SCREEN — additions for the rebuilt Special Function form
   ========================================================= */
.field-row.cols-4 { grid-template-columns: repeat(4, 1fr); }
.input-sm { padding: 5px 9px; font-size: 13px; height: 32px; max-width: 90px; }
.field-label-hint { font-weight: 400; color: var(--gray-600); margin-left: 6px; font-size: 11px; }

/* Sticky left rail */
.form-rail {
  position: sticky; top: 0; align-self: start;
  padding: 24px 18px;
  border-right: 1px solid var(--canvas-border);
  background: #fbfbfd;
  height: 100vh;
  overflow-y: auto;
}
.form-rail-label {
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gray-600); font-weight: 500; margin-bottom: 10px;
}
.form-rail-list { list-style: none; margin: 0 0 18px; padding: 0; }
.form-rail-list li a {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 8px; border-radius: 6px;
  color: var(--gray-800); font-size: 13px; line-height: 1.3;
  text-decoration: none;
}
.form-rail-list li a:hover { background: var(--dana-blue-dark-10); }
.form-rail-num {
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 1.5px solid var(--canvas-border);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; color: var(--gray-700);
  flex-shrink: 0;
}

/* Lead-time / estimate cards in rail */
.lead-card, .estimate-card {
  margin-top: 14px; padding: 14px;
  background: #fff;
  border: 1px solid var(--canvas-border);
  border-radius: 10px;
}
.lead-card.warn { border-color: rgba(255, 193, 7, 0.5); background: #fffaf0; }
.lead-label, .estimate-label {
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gray-600); margin-bottom: 4px; font-weight: 500;
}
.lead-days, .estimate-amount {
  font-size: 30px; line-height: 1; color: var(--dana-blue-dark); margin-bottom: 6px;
}
.lead-ok { font-size: 11px; color: var(--success-color); display: flex; gap: 5px; align-items: flex-start; }
.lead-warn { font-size: 11px; color: #b07d00; display: flex; gap: 5px; align-items: flex-start; line-height: 1.35; }
.estimate-sub { font-size: 11px; color: var(--gray-600); }

/* Form body + section cards */
.form-body { padding: 28px 40px 60px; max-width: 920px; min-width: 0; }
.form-section-card {
  background: var(--surface-bg);
  border: var(--card-border-w) solid var(--canvas-border);
  border-top: 3px solid var(--dana-blue-light);
  border-radius: 10px;
  margin-bottom: 18px;
  scroll-margin-top: calc(var(--topbar-height, 56px) + 16px);
}
.form-section-head {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 18px 22px 8px;
}
.form-section-num {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--dana-blue-dark);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'Founders Grotesk Condensed', sans-serif;
  font-size: 14px; font-weight: 500;
  flex-shrink: 0;
}
.form-section-head h3 {
  margin: 4px 0 0;
  font-family: 'Founders Grotesk Condensed', sans-serif;
  font-weight: 500;
  font-size: 18px;
  color: var(--dana-blue-dark);
  letter-spacing: 0.005em;
}
.form-section-sub { margin: 4px 0 0; font-size: 13px; color: var(--gray-700); }
.form-section-body { padding: 8px 22px 22px; }

/* Yes / No radio */
.yesno-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.yesno {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 16px;
  border: 1.5px solid var(--canvas-border);
  border-radius: 999px;
  font-size: 13px; cursor: pointer;
  background: #fff;
  user-select: none;
}
.yesno input { display: none; }
.yesno-dot {
  width: 14px; height: 14px; border-radius: 50%;
  border: 1.5px solid var(--gray-400);
  display: inline-block;
}
.yesno.on { border-color: var(--dana-blue-light); background: var(--dana-blue-light-10); color: var(--dana-blue-dark); font-weight: 500; }
.yesno.on .yesno-dot { background: var(--dana-blue-light); border-color: var(--dana-blue-light); box-shadow: inset 0 0 0 3px #fff; }
.yesno-hint { font-size: 12px; color: var(--gray-600); margin-left: 4px; }

/* Conditional reveal */
.conditional-block {
  margin-top: 14px;
  padding: 16px;
  background: #fbfbfd;
  border-left: 3px solid var(--dana-blue-light);
  border-radius: 0 8px 8px 0;
}

/* Inline warnings + similar events */
.inline-warn {
  margin-top: 6px;
  font-size: 12px;
  color: #b07d00;
  display: flex; gap: 6px; align-items: flex-start;
}
.similar-events {
  margin-top: 6px;
  padding: 8px 10px;
  background: rgba(255, 193, 7, 0.08);
  border: 1px solid rgba(255, 193, 7, 0.35);
  border-radius: 6px;
  font-size: 12px;
  color: var(--gray-800);
  display: flex; gap: 6px; align-items: flex-start;
}
.similar-events i { color: #b07d00; margin-top: 2px; }
.similar-events a { color: var(--dana-blue-dark); font-weight: 500; }

/* Revision picker */
.revision-picker { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 14px; }
.revision-row {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 10px 12px;
  border: 1.5px solid var(--canvas-border);
  border-radius: 8px;
  cursor: pointer; background: #fff;
}
.revision-row.checked { border-color: var(--dana-blue-light); background: var(--dana-blue-light-10); }
.revision-row input { margin-top: 3px; }
.revision-title { font-size: 13px; font-weight: 500; color: var(--dana-blue-dark); }
.revision-meta { font-size: 12px; color: var(--gray-600); margin-top: 2px; }

/* Location list */
.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1; }
.location-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.location-empty {
  font-size: 12px; color: var(--gray-600);
  display: flex; gap: 6px; align-items: center;
  padding: 8px 0;
}
.location-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  background: #fff;
  border: 1px solid var(--canvas-border);
  border-radius: 8px;
  font-size: 13px;
}
.location-chip i { color: var(--dana-blue-light); }
.location-chip span { flex: 1; }
.location-chip button {
  background: transparent; border: none; cursor: pointer;
  color: var(--gray-500); font-size: 13px;
  padding: 4px 8px; border-radius: 4px;
}
.location-chip button:hover { color: var(--danger-color); background: rgba(220,53,69,0.08); }
.duplicate-warn {
  margin-top: 14px;
  padding: 10px 12px;
  background: rgba(255, 193, 7, 0.08);
  border: 1px solid rgba(255, 193, 7, 0.35);
  border-radius: 6px;
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 12px; color: var(--gray-800); line-height: 1.45;
}
.duplicate-warn i { color: #b07d00; margin-top: 2px; }
.duplicate-warn a { color: var(--dana-blue-dark); font-weight: 500; }

/* Menu panel + items grid + table */
.menu-link { font-size: 13px; color: var(--dana-blue-light); font-weight: 500; }
.menu-panel {
  margin-top: 14px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--canvas-border);
  border-radius: 8px;
}
.menu-panel-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.menu-panel-title {
  font-family: 'Founders Grotesk Condensed', sans-serif;
  font-weight: 500;
  font-size: 15px;
  color: var(--dana-blue-dark);
  letter-spacing: 0.01em;
}
.menu-guests { display: flex; align-items: center; gap: 8px; }
.menu-guests .field-label { margin: 0; }
.menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border: 1.5px solid var(--canvas-border);
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer; background: #fff;
}
.menu-item input { display: none; }
.menu-item .check-box {
  width: 18px; height: 18px; border-radius: 4px;
  border: 1.5px solid var(--gray-400);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; color: transparent;
  flex-shrink: 0;
}
.menu-item.on { border-color: var(--dana-blue-light); background: var(--dana-blue-light-10); }
.menu-item.on .check-box { background: var(--dana-blue-light); border-color: var(--dana-blue-light); color: #fff; }
.menu-item-name { flex: 1; }
.menu-item-note { font-size: 11px; color: var(--gray-600); flex-basis: 100%; margin-left: 28px; }

.menu-table {
  width: 100%; border-collapse: collapse;
  font-size: 13px;
}
.menu-table th {
  text-align: left;
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--gray-600); font-weight: 500;
  padding: 8px 10px;
  border-bottom: 1px solid var(--canvas-border);
}
.menu-table td {
  padding: 10px;
  border-bottom: 1px solid var(--canvas-border);
  color: var(--gray-800);
}
.menu-table tbody tr:last-child td { border-bottom: none; }
.menu-table tr.on td { color: var(--gray-900); font-weight: 500; }
.menu-table tr:not(.on) td { color: var(--gray-500); }

/* Meal-kind chip toggles */
.meal-kind-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 14px; }
.chip-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border: 1.5px solid var(--canvas-border);
  border-radius: 999px;
  background: #fff; cursor: pointer; font-size: 13px;
  user-select: none;
}
.chip-toggle input { display: none; }
.chip-toggle i { color: var(--gray-500); }
.chip-toggle.on { border-color: var(--dana-blue-light); background: var(--dana-blue-light-10); color: var(--dana-blue-dark); font-weight: 500; }
.chip-toggle.on i { color: var(--dana-blue-light); }

/* Form divider */
.form-divider { border: none; border-top: 1px dashed var(--canvas-border); margin: 18px 0; }

/* Muted callout */
.muted-callout {
  padding: 12px 14px;
  background: #fbfbfd;
  border: 1px dashed var(--canvas-border);
  border-radius: 8px;
  font-size: 13px; color: var(--gray-700);
  display: flex; gap: 10px; align-items: center;
}
.muted-callout i { color: var(--gray-500); }

/* Attach row */
.attach-row { display: flex; gap: 8px; margin-top: 10px; }

/* Sticky footer bar */
.form-footer-bar {
  position: sticky; bottom: 0;
  z-index: 1030; /* above form content, below floating widgets (1040+) */
  background: var(--surface-bg);
  border: var(--card-border-w) solid var(--canvas-border);
  border-radius: 12px;
  padding: 12px 16px;
  margin-top: 18px;
  box-shadow: var(--shadow-elevated, 0 -4px 16px rgba(0,0,0,0.04));
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.form-footer-summary {
  display: flex; gap: 18px; flex-wrap: wrap;
  font-size: 13px; color: var(--gray-700);
}
.form-footer-summary strong { color: var(--dana-blue-dark); font-weight: 600; }


/* ── Campus Safety structured asks (v1.83.0) ─────────────────────────── */
.safety-ask {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 14px; margin-bottom: 8px;
  border: 1px solid var(--canvas-border); border-radius: 8px; background: #fff;
}
.safety-ask.is-on { border-color: var(--dana-blue-light); background: #f6fcff; }
.safety-ask > input[type="checkbox"] { margin-top: 3px; flex: 0 0 auto; }
.safety-ask-main { flex: 1; min-width: 0; }
.safety-ask-main .safety-ask-label { display: block; font-weight: 600; color: var(--dana-blue-dark); cursor: pointer; }
.safety-ask-main .safety-ask-hint { display: block; font-size: 12px; color: var(--gray-600); margin-top: 1px; }
.safety-ask-details { margin-top: 10px; }
.safety-ask-details .field-row { margin-bottom: 0; }
.safety-ask-details .field-label { font-size: 12px; }
.safety-ask-error { color: var(--danger-color); font-size: 12px; margin-top: 4px; }

/* ── Needs-first gating: greyed rail entries add a section on click ──── */
.form-rail-list li.is-off a { opacity: 0.55; }
.form-rail-list li.is-off a::after {
  content: "+"; margin-left: auto; font-weight: 600; color: var(--dana-blue-light);
}
.form-rail-list li.is-off .form-rail-num { background: #eef0f4; border-style: dashed; color: var(--gray-600); }
.form-rail-list li.is-off.is-muted a { pointer-events: auto; cursor: pointer; }
.form-rail-showall { width: 100%; justify-content: center; margin: -8px 0 14px; }

/* ── Per-department lead strip (form rail card and start page) ───────── */
.lead-strip { font-size: 12px; color: var(--gray-800); }
.lead-strip-empty { color: var(--gray-600); line-height: 1.4; }
.lead-strip-title { font-weight: 600; color: var(--dana-blue-dark); margin-bottom: 6px; }
.lead-row { display: flex; flex-wrap: wrap; gap: 4px 8px; padding: 6px 0; border-top: 1px solid var(--canvas-border); }
.lead-row:first-of-type { border-top: 0; }
.lead-dept { font-weight: 600; }
.lead-ask { color: var(--gray-600); }
.lead-phrase { flex-basis: 100%; line-height: 1.35; }
.lead-row--met .lead-phrase { color: var(--success-color); }
.lead-row--passed .lead-phrase { color: var(--gray-700); }
.lead-strip--page {
  border: 1px solid var(--canvas-border); border-left: 4px solid var(--dana-blue-light);
  border-radius: 8px; background: #fff; padding: 12px 16px; font-size: 14px;
}
.lead-strip--page .lead-row { flex-wrap: nowrap; gap: 12px; }
.lead-strip--page .lead-phrase { flex-basis: auto; margin-left: auto; text-align: right; }

/* ---------------------------------------------------------------------------
   Create-page wizard (v1.84.0) — step strip and review pane.
   Built by static/js/form/create-wizard.js; the container ships empty and
   hidden so a page without JS is the classic single-page form.
   --------------------------------------------------------------------------- */
.sff-wizard-steps {
    display: flex;
    align-items: stretch;
    gap: 6px;
    flex-wrap: wrap;
    background: var(--surface, #fff);
    border: 1px solid var(--canvas-border, #e9ecef);
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 18px;
}
.sff-wizard-step {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 44px;
    padding: 6px 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--gray-600, #6c757d);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
}
.sff-wizard-step:hover { background: var(--gray-100, #f5f5f5); }
.sff-wizard-step .sff-wizard-num {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--gray-200, #eee);
    color: var(--gray-600, #6c757d);
    font-size: 12px;
    font-weight: 700;
}
.sff-wizard-step .sff-wizard-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sff-wizard-step.is-done { color: var(--dana-blue-dark, #32357d); }
.sff-wizard-step.is-done .sff-wizard-num {
    background: var(--success, #28a745);
    color: #fff;
}
.sff-wizard-step.is-current {
    background: rgba(50, 53, 125, 0.08);
    border-color: rgba(50, 53, 125, 0.25);
    color: var(--dana-blue-dark, #32357d);
    font-weight: 600;
}
.sff-wizard-step.is-current .sff-wizard-num {
    background: var(--dana-blue-dark, #32357d);
    color: #fff;
}

.sff-review-block { padding: 14px 0; border-top: 1px solid var(--canvas-border, #e9ecef); }
.sff-review-block:first-child { border-top: 0; padding-top: 0; }
.sff-review-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}
.sff-review-head h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--dana-blue-dark, #32357d);
}
.sff-review-list {
    display: grid;
    grid-template-columns: minmax(140px, 34%) 1fr;
    gap: 4px 16px;
    margin: 0;
    font-size: 14px;
}
.sff-review-list dt { color: var(--gray-600, #6c757d); font-weight: 500; }
.sff-review-list dd { margin: 0; color: var(--text-body, #333); overflow-wrap: anywhere; }
.sff-review-empty { margin: 0; color: var(--gray-600, #6c757d); font-size: 13px; }

@media (max-width: 700px) {
    .sff-wizard-step .sff-wizard-label { display: none; }
    .sff-wizard-step.is-current .sff-wizard-label { display: inline; }
    .sff-review-list { grid-template-columns: 1fr; gap: 2px; }
    .sff-review-list dd { margin-bottom: 8px; }
}

.sff-wizard-showall {
    flex: 0 0 auto;
    align-self: center;
    margin-left: auto;
    padding: 6px 10px;
    min-height: 44px;
    border: 0;
    background: transparent;
    color: var(--dana-blue-light, #00b0e7);
    font-size: 13px;
    font-weight: 500;
    text-decoration: underline;
    cursor: pointer;
}
.sff-wizard-showall:hover { color: var(--dana-blue-dark, #32357d); }

/* ---------------------------------------------------------------------------
   Consistency notice (v1.84.0) — e.g. tablecloths that do not match the tables
   ordered. Advisory, never blocking, so it uses the information register and
   no red (CLAUDE.md tone rule).
   --------------------------------------------------------------------------- */
.sff-check-alert {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid #ffe08a;
    border-left: 4px solid var(--warning, #ffc107);
    border-radius: 8px;
    background: #fffbf0;
    font-size: 14px;
    color: #5c4813;
}
.sff-check-alert > i { margin-top: 2px; color: #b7860b; }
.sff-check-alert strong { display: block; color: #5c4813; margin-bottom: 4px; }
.sff-check-list { margin: 0 0 6px; padding-left: 18px; }
.sff-check-list li { margin: 2px 0; }
.sff-check-alert small { color: #7a6528; }

/* Linen quantity beside its checkbox (v1.84.0). Revealed by linen-check.js
   when the kind is ticked. */
.linen-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.linen-qty { display: inline-flex; align-items: center; gap: 6px; }
.linen-qty .linen-qty-input { width: 5.5em; }
.linen-qty-label { margin: 0; font-size: 13px; color: var(--gray-600, #6c757d); }
/* =========================================================
   THEME PICKER (profile + appearance settings) — token-driven
   ========================================================= */
.theme-picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.theme-opt {
  position: relative; display: flex; gap: 12px; align-items: flex-start;
  padding: 12px; min-height: 72px; cursor: pointer; margin: 0;
  border: 2px solid var(--input-border); border-radius: 10px; background: var(--surface-bg);
  color: var(--text-body);
}
.theme-opt input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: pointer; }
.theme-opt:has(input:checked) { border-color: var(--dana-blue-dark); box-shadow: inset 0 0 0 1px var(--dana-blue-dark); }
.theme-opt:has(input:focus-visible) { box-shadow: var(--focus-ring); }
.theme-opt-dot {
  width: 22px; height: 22px; border-radius: 50%; flex: none; margin-top: 2px;
  border: 2px solid var(--input-border); background: var(--surface-bg);
}
.theme-opt:has(input:checked) .theme-opt-dot {
  border-color: var(--dana-blue-dark);
  background: radial-gradient(circle, var(--dana-blue-dark) 45%, transparent 48%);
}
.theme-swatch {
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr;
  width: 44px; height: 44px; flex: none; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--canvas-border);
}
.theme-swatch i { display: block; }
.theme-opt-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.theme-opt-title { font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.theme-opt-desc { color: var(--text-muted); font-size: 0.9em; }
.theme-tag {
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px;
  background: var(--dana-blue-dark-10); color: var(--dana-blue-dark);
  border: 1px solid var(--dana-blue-dark);
}
@media (max-width: 575.98px) { .theme-picker { grid-template-columns: 1fr; } }

/* Vendored SFM templates/base.html shell integration, 2026-09-15. */
      /* Shell adjustments specific to the Django app integration */
      html, body { height: auto; min-height: 100vh; width: 100%; margin: 0; padding: 0; }
      body { min-width: 0 !important; padding-top: 0 !important; }
      /* Legacy main.css adds 70px padding-top for the old fixed navbar; the new topbar is sticky in-flow, so we override. */
      .app-frame { display: flex; flex-direction: column; min-height: 100vh; height: auto; width: 100%; background: var(--shell-bg); }
      /* Default: single column (used when no rail is rendered, e.g. logged out). */
      .shell-grid { display: grid; grid-template-columns: minmax(0, 1fr); flex: 1 1 auto; min-height: 0; width: 100%; }
      /* When the rail is in the DOM, switch to two-column at desktop. */
      .shell-grid.has-rail { grid-template-columns: var(--rail-width) minmax(0, 1fr); }
      .canvas { background: var(--canvas-bg); overflow: visible; min-width: 0; width: 100%; }
      .topbar { position: sticky; top: 0; z-index: 1020; width: 100%; }
      .rail { position: sticky; top: var(--topbar-height); height: calc(100vh - var(--topbar-height)); }
      /* Rail backdrop is mobile-only — keep it position:fixed always so it never
         participates in grid auto-flow at desktop (where it would otherwise
         occupy the rail track and push canvas content to a new row). */
      .rail-backdrop {
        position: fixed; inset: var(--topbar-height) 0 0 0;
        background: rgba(15,23,42,0.4); z-index: 1029;
        opacity: 0; pointer-events: none;
        transition: opacity 200ms ease;
        display: none;
      }
      .rail-backdrop.is-open { opacity: 1; pointer-events: auto; }
      /* Mobile: hide rail, expose hamburger */
      .rail-toggle { display: none; }
      @media (max-width: 991.98px) {
        .shell-grid, .shell-grid.has-rail { grid-template-columns: 1fr; }
        .topbar .brand { min-width: 0; border-right: 0; padding-right: 0; }
        .rail { position: fixed; top: var(--topbar-height); left: 0; bottom: 0; width: 280px; transform: translateX(-100%); transition: transform 200ms ease; z-index: 1030; box-shadow: var(--shadow-elevated); }
        .rail.is-open { transform: translateX(0); }
        .rail-toggle { display: inline-flex; }
        .rail-backdrop { display: block; }
        .topbar-search { display: none; }
      }
      /* Auto-dismiss alert container floats over canvas */
      #messages-container { padding: 12px 24px 0; }
      /* Footer in flow */
      .sfm-footer {
        padding: 14px 24px;
        border-top: 1px solid var(--canvas-border);
        background: var(--canvas-bg);
        font-size: 12px;
        color: var(--text-muted);
        display: flex; justify-content: space-between; align-items: center;
        flex-wrap: wrap; gap: 8px;
      }

      .topbar-language {
        display: inline-flex;
      }
      .topbar-language select {
        border: 1px solid var(--canvas-border);
        border-radius: 8px;
        background: var(--surface-bg);
        padding: 4px 28px 4px 10px;
        font-size: 12px;
        color: var(--gray-800);
        min-width: 145px;
      }
      /* Tools rail dropdown — show items inline */
      .rail-link.is-disabled { opacity: 0.4; pointer-events: none; }

      /* ------------------------------------------------------------------
         Reusable "full-scroll" canvas opt-in (desktop only, lg+).

         Apply class="canvas canvas--full-scroll" on a page wrapper to:
         - claim the viewport below the sticky topbar
         - keep direct children at natural height (pinned in flow)
         - let exactly ONE direct child grow + scroll independently

         Two opt-in conventions:
         1) Mark the scrollable child explicitly: <div class="scroll-body">
         2) /events/-style pages with .page-header convention — the
            sibling immediately following .page-header auto-scrolls.

         Mobile (<992px) is untouched — pages keep their normal document flow.
         ------------------------------------------------------------------ */
      @media (min-width: 992px) {
        .canvas--full-scroll {
          height: calc(100vh - var(--topbar-height));
          overflow: hidden;
          display: flex;
          flex-direction: column;
        }
        .canvas--full-scroll > .scroll-body,
        .canvas--full-scroll > .page-header + *:not(.scroll-body) {
          flex: 1 1 auto;
          min-height: 0;                  /* CRITICAL: lets child scroll */
          overflow-y: auto;
          overflow-x: hidden;
          -webkit-overflow-scrolling: touch;
          overscroll-behavior: contain;
        }
      }
