/* ==========================================================================
   Backstage — Design Tokens
   Plain CSS custom properties. No build step, no CDN fonts (offline-tolerant
   per NFR — gig-day band coordination must render with zero network).
   Works directly with server-rendered Hotwire HTML: link this file and go.
   See docs/design/design-system.md for rationale.
   ========================================================================== */

:root {
  /* ---- Font stacks (system fonts only — no CDN dependency) ---- */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  /* ---- Type scale (1.25 ratio, 16px base) ---- */
  --text-xs: 0.75rem;    /* 12px — metadata, timestamps, table cell labels */
  --text-sm: 0.875rem;   /* 14px — secondary text, form help text, badges */
  --text-base: 1rem;     /* 16px — body copy, inputs */
  --text-md: 1.125rem;   /* 18px — emphasized body, card titles */
  --text-lg: 1.375rem;   /* 22px — section headings */
  --text-xl: 1.75rem;    /* 28px — page titles */
  --text-2xl: 2.25rem;   /* 36px — rare, marketing-only */

  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.65;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;

  /* ---- Spacing scale (4px base unit) ---- */
  --space-1: 0.25rem;  /* 4px */
  --space-2: 0.5rem;   /* 8px */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-5: 1.5rem;   /* 24px */
  --space-6: 2rem;     /* 32px */
  --space-7: 3rem;     /* 48px */
  --space-8: 4rem;     /* 64px */

  /* ---- Radii ---- */
  --radius-sm: 4px;   /* inputs, small controls */
  --radius-md: 6px;   /* buttons, badges */
  --radius-lg: 10px;  /* cards, modals */
  --radius-pill: 999px; /* status pills, tags */

  /* ---- Motion ---- */
  --duration-fast: 100ms;
  --duration-base: 160ms;
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);

  /* ---- Light theme (default) ---- */
  --color-bg: #ffffff;
  --color-bg-subtle: #f6f7f9;
  --color-bg-muted: #eef0f3;
  --color-surface: #ffffff;
  --color-surface-raised: #ffffff;

  --color-border: #dfe3e8;
  --color-border-strong: #c4cad3;

  --color-text: #14171f;
  --color-text-secondary: #4b5262;
  --color-text-muted: #7c8496;
  --color-text-on-accent: #ffffff;

  --color-accent: #2952e3;
  --color-accent-hover: #1f42c2;
  --color-accent-subtle: #eaefff;
  --color-accent-border: #b9c8ff;

  --color-success: #157a4a;
  --color-success-subtle: #e4f5ec;
  --color-success-border: #a9e0c3;

  --color-warning: #92620a;
  --color-warning-subtle: #fdf1dc;
  --color-warning-border: #f2cf8e;

  --color-danger: #b3261e;
  --color-danger-subtle: #fbe9e8;
  --color-danger-border: #f0b6b1;

  --color-info: #205e9c;
  --color-info-subtle: #e7f1fc;
  --color-info-border: #b6d6f4;

  --color-offline: #6b4fc4;
  --color-offline-subtle: #f0ecfb;
  --color-offline-border: #cabdec;

  --color-focus-ring: #2952e3;

  /* ---- Shadows (light) ---- */
  --shadow-sm: 0 1px 2px rgba(20, 23, 31, 0.06);
  --shadow-md: 0 2px 8px rgba(20, 23, 31, 0.08), 0 1px 2px rgba(20, 23, 31, 0.06);
  --shadow-lg: 0 8px 24px rgba(20, 23, 31, 0.12), 0 2px 6px rgba(20, 23, 31, 0.08);
}

/* ---- Dark theme: honors OS preference, or force with data-theme="dark" ---- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-bg: #14161a;
    --color-bg-subtle: #1a1d22;
    --color-bg-muted: #22262d;
    --color-surface: #1c1f25;
    --color-surface-raised: #23272f;

    --color-border: #33383f;
    --color-border-strong: #454b54;

    --color-text: #eef0f3;
    --color-text-secondary: #b7bcc6;
    --color-text-muted: #868d99;
    --color-text-on-accent: #ffffff;

    --color-accent: #6d8bff;
    --color-accent-hover: #8aa1ff;
    --color-accent-subtle: #232a45;
    --color-accent-border: #3a4a80;

    --color-success: #4ecb90;
    --color-success-subtle: #163126;
    --color-success-border: #2c5641;

    --color-warning: #e6ac3f;
    --color-warning-subtle: #362a12;
    --color-warning-border: #5c4a24;

    --color-danger: #f0776f;
    --color-danger-subtle: #3a1e1c;
    --color-danger-border: #63332f;

    --color-info: #6fb2f2;
    --color-info-subtle: #17293c;
    --color-info-border: #2c4a68;

    --color-offline: #b09cf0;
    --color-offline-subtle: #2a2440;
    --color-offline-border: #473c6e;

    --color-focus-ring: #8aa1ff;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.45), 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.35);
  }
}

/* Explicit override attribute for a user-facing theme toggle (future). */
[data-theme="dark"] {
  --color-bg: #14161a;
  --color-bg-subtle: #1a1d22;
  --color-bg-muted: #22262d;
  --color-surface: #1c1f25;
  --color-surface-raised: #23272f;
  --color-border: #33383f;
  --color-border-strong: #454b54;
  --color-text: #eef0f3;
  --color-text-secondary: #b7bcc6;
  --color-text-muted: #868d99;
  --color-text-on-accent: #ffffff;
  --color-accent: #6d8bff;
  --color-accent-hover: #8aa1ff;
  --color-accent-subtle: #232a45;
  --color-accent-border: #3a4a80;
  --color-success: #4ecb90;
  --color-success-subtle: #163126;
  --color-success-border: #2c5641;
  --color-warning: #e6ac3f;
  --color-warning-subtle: #362a12;
  --color-warning-border: #5c4a24;
  --color-danger: #f0776f;
  --color-danger-subtle: #3a1e1c;
  --color-danger-border: #63332f;
  --color-info: #6fb2f2;
  --color-info-subtle: #17293c;
  --color-info-border: #2c4a68;
  --color-offline: #b09cf0;
  --color-offline-subtle: #2a2440;
  --color-offline-border: #473c6e;
  --color-focus-ring: #8aa1ff;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.45), 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.55), 0 2px 6px rgba(0, 0, 0, 0.35);
}

/* ==========================================================================
   Base element styles — minimal reset + typographic defaults.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background: var(--color-bg);
}

h1, h2, h3, h4, p, figure { margin: 0; }

a {
  color: var(--color-accent);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
}

/* ==========================================================================
   Components — buttons, form fields, cards, table, badges, nav shell,
   modal/dialog, toast, offline-indicator banner.
   See docs/design/design-system.md §Components for usage guidance.
   ========================================================================== */

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  line-height: 1;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color var(--duration-base) var(--ease-standard),
    border-color var(--duration-base) var(--ease-standard);
  white-space: nowrap;
}
.btn:disabled { cursor: not-allowed; opacity: 0.5; }

.btn-primary {
  background: var(--color-accent);
  color: var(--color-text-on-accent);
}
.btn-primary:hover:not(:disabled) { background: var(--color-accent-hover); }

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-border-strong);
}
.btn-secondary:hover:not(:disabled) { background: var(--color-bg-subtle); }

.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
}
.btn-ghost:hover:not(:disabled) { background: var(--color-bg-muted); color: var(--color-text); }

.btn-danger {
  background: var(--color-danger);
  color: #ffffff;
}
.btn-danger:hover:not(:disabled) { filter: brightness(0.92); }

.btn-sm { padding: var(--space-2) var(--space-3); font-size: var(--text-xs); }
.btn-lg { padding: var(--space-4) var(--space-5); font-size: var(--text-base); }

/* ---- Form fields ---- */
.field { display: flex; flex-direction: column; gap: var(--space-2); }

.field-label {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text);
}
.field-hint {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.field-error {
  font-size: var(--text-xs);
  color: var(--color-danger);
}

.input, .select, .textarea {
  font-family: inherit;
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  width: 100%;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--color-accent);
  outline: 2px solid var(--color-accent-border);
  outline-offset: 0;
}
.input::placeholder, .textarea::placeholder { color: var(--color-text-muted); }

.field.has-error .input,
.field.has-error .select,
.field.has-error .textarea {
  border-color: var(--color-danger);
}

.textarea { resize: vertical; min-height: 6rem; }

.checkbox-row, .radio-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
}
.checkbox-row input, .radio-row input { width: 16px; height: 16px; }

/* ---- Cards ---- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}
.card-compact { padding: var(--space-4); }
.card-title {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-2);
}
.card-meta {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ---- Table ---- */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
.table th {
  text-align: left;
  font-weight: var(--weight-medium);
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: var(--space-3) var(--space-3);
  border-bottom: 1px solid var(--color-border-strong);
}
.table td {
  padding: var(--space-3) var(--space-3);
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}
.table tbody tr:hover { background: var(--color-bg-subtle); }

/* ---- Badge / status pill ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  line-height: 1.4;
}
.badge-neutral {
  background: var(--color-bg-muted);
  color: var(--color-text-secondary);
  border-color: var(--color-border);
}
.badge-success {
  background: var(--color-success-subtle);
  color: var(--color-success);
  border-color: var(--color-success-border);
}
.badge-warning {
  background: var(--color-warning-subtle);
  color: var(--color-warning);
  border-color: var(--color-warning-border);
}
.badge-danger {
  background: var(--color-danger-subtle);
  color: var(--color-danger);
  border-color: var(--color-danger-border);
}
.badge-info {
  background: var(--color-info-subtle);
  color: var(--color-info);
  border-color: var(--color-info-border);
}

/* ---- Nav shell ---- */
.nav-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
.nav-sidebar {
  background: var(--color-bg-subtle);
  border-right: 1px solid var(--color-border);
  padding: var(--space-5) var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.nav-brand {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
}
.nav-group { display: flex; flex-direction: column; gap: var(--space-1); }
.nav-group-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  padding: var(--space-2) var(--space-3);
}
.nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}
.nav-link:hover { background: var(--color-bg-muted); text-decoration: none; color: var(--color-text); }
.nav-link.is-active {
  background: var(--color-accent-subtle);
  color: var(--color-accent);
  font-weight: var(--weight-medium);
}
.nav-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
}
.nav-main { padding: var(--space-5); }

/* ---- Modal / dialog ---- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 23, 31, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
}
.modal {
  background: var(--color-surface-raised);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 480px;
  padding: var(--space-5);
}
.modal-title {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-2);
}
.modal-body {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-5);
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
}

/* ---- Toast ---- */
.toast-stack {
  position: fixed;
  bottom: var(--space-5);
  right: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  z-index: 1000;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  min-width: 260px;
  max-width: 360px;
}
.toast-success { border-left: 3px solid var(--color-success); }
.toast-warning { border-left: 3px solid var(--color-warning); }
.toast-danger { border-left: 3px solid var(--color-danger); }
.toast-info { border-left: 3px solid var(--color-info); }

/* ---- Offline-indicator banner ---- */
/* Persistent, full-width, non-dismissible-by-accident banner used across
   band-coordination views (itinerary, call sheet, contacts) so a user on a
   bad venue connection always knows they're looking at cached data. */
.offline-banner {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  padding: var(--space-2) var(--space-4);
  background: var(--color-offline-subtle);
  color: var(--color-offline);
  border-bottom: 1px solid var(--color-offline-border);
}
.offline-banner .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-offline);
  flex: none;
}

/* ==========================================================================
   ICONS (revision 2026-09-21, commit c98c360 feedback)
   Vendored Lucide sprite at docs/design/icons/icons.svg — self-hosted, no
   CDN (offline-tolerant NFR). Usage:
     <svg class="icon" aria-hidden="true"><use href="icons/icons.svg#bell"/></svg>
   Relative path from docs/design/mockups/<module>/x.html is
   "../../icons/icons.svg#<name>". Icons inherit `currentColor`; size via
   .icon (16px, matches icon-btn) or .icon-lg (20px, nav menus).
   Full symbol list: bell user guitar calendar home users megaphone globe
   settings inbox message-square clock map-pin file-text search menu x
   chevron-down chevron-right check check-circle alert-triangle wifi-off
   image video send bar-chart ticket dollar-sign todo list edit trash-2
   arrow-left arrow-right external-link mail phone share-2 link-2 music
   package moon sun log-out filter refresh-cw eye more-horizontal
   paperclip tag lock download plus info
   ========================================================================== */
.icon {
  width: 16px; height: 16px; flex: none;
  display: inline-block; vertical-align: -0.125em;
}
.icon-lg { width: 20px; height: 20px; }
.icon-btn svg.icon { width: 18px; height: 18px; }

/* ==========================================================================
   APP HEADER (canonical pattern — booking/inquiry-new.html promoted)
   Every backend module uses the SAME header:

     <header class="nav-topbar">
       <div class="nav-topbar-left">
         <button class="act-switcher">…act name…</button>
       </div>
       <div class="nav-topbar-right">
         <div class="dropdown">…bell icon-btn + .dropdown-menu…</div>
         <div class="tooltip-wrap">…avatar…<span class="tooltip">…</span></div>
       </div>
     </header>
     <div class="module-header">
       <div class="module-title-row">
         <div><h1>…</h1><div class="sub">…</div></div>
         <div class="title-actions">…buttons…</div>
       </div>
       <nav class="tab-strip">…</nav>
     </div>
     <main class="module-body">…</main>

   Do NOT place bare text (e.g. <strong>) or badges as direct children of
   .nav-topbar: it is a space-between flex row, so any direct child becomes
   a stretched flex item and renders like a block (the campaigns.html
   "<strong> creates a block" bug). Always wrap in nav-topbar-left/-right.
   ========================================================================== */
strong, b { font-weight: var(--weight-semibold); } /* stays inline — no display rule */

.nav-topbar { position: relative; z-index: 20; }
.nav-topbar-left { display: flex; align-items: center; gap: var(--space-4); min-width: 0; }
.nav-topbar-right { display: flex; align-items: center; gap: var(--space-3); }

.act-switcher {
  display: flex; align-items: center; gap: var(--space-2);
  font-size: var(--text-sm); font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
  background: none; border: none; cursor: pointer;
  font-family: inherit; padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-md);
}
.act-switcher:hover { background: var(--color-bg-muted); color: var(--color-text); }

.avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--color-accent-subtle); color: var(--color-accent);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-xs); font-weight: var(--weight-semibold);
  flex: none;
}

.icon-btn {
  width: 32px; height: 32px; border-radius: var(--radius-md);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--color-text-secondary); background: transparent; border: none;
  cursor: pointer; position: relative; flex: none;
}
.icon-btn:hover { background: var(--color-bg-muted); color: var(--color-text); }
.icon-btn .dot-alert {
  position: absolute; top: 4px; right: 4px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--color-danger);
  border: 1.5px solid var(--color-bg);
}

/* ---- Dropdown (notification bell panel, act switcher menu) ---- */
.dropdown { position: relative; display: inline-flex; }
.dropdown-menu {
  position: absolute; top: calc(100% + var(--space-2)); right: 0;
  min-width: 280px; max-width: 340px;
  background: var(--color-surface-raised);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-2);
  z-index: 100;
  display: none;
}
.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu,
.dropdown.is-open .dropdown-menu { display: block; }
.dropdown-header {
  font-size: var(--text-xs); font-weight: var(--weight-semibold);
  text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--color-text-muted);
  padding: var(--space-2) var(--space-3) var(--space-1);
}
.dropdown-item {
  display: flex; gap: var(--space-3); align-items: flex-start;
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-md);
  font-size: var(--text-sm); color: var(--color-text);
}
.dropdown-item:hover { background: var(--color-bg-subtle); text-decoration: none; }
.dropdown-item .when {
  font-size: var(--text-xs); color: var(--color-text-muted); flex: none;
  min-width: 56px; padding-top: 2px;
}
.dropdown-item.unread { background: var(--color-accent-subtle); }
.dropdown-footer {
  border-top: 1px solid var(--color-border); margin-top: var(--space-1);
  padding-top: var(--space-1); text-align: center;
}
.dropdown-footer a { font-size: var(--text-sm); display: block; padding: var(--space-2); border-radius: var(--radius-md); }
.dropdown-footer a:hover { background: var(--color-bg-subtle); text-decoration: none; }

/* ---- Tooltip (avatar name·role) ---- */
.tooltip-wrap { position: relative; display: inline-flex; }
.tooltip {
  position: absolute; top: calc(100% + var(--space-2)); right: 0;
  white-space: nowrap;
  background: var(--color-text); color: var(--color-bg);
  font-size: var(--text-xs); font-weight: var(--weight-medium);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden;
  transition: opacity var(--duration-fast) var(--ease-standard);
  z-index: 110; pointer-events: none;
}
.tooltip-wrap:hover .tooltip,
.tooltip-wrap:focus-within .tooltip { opacity: 1; visibility: visible; }

/* ---- Module header (title row + tab strip under topbar) ---- */
.module-header { padding: var(--space-5) var(--space-5) 0; }
.module-title-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-4); margin-bottom: var(--space-4); flex-wrap: wrap;
}
.module-title-row h1 { font-size: var(--text-xl); font-weight: var(--weight-semibold); }
.module-title-row .sub { font-size: var(--text-sm); color: var(--color-text-muted); margin-top: var(--space-1); }
.module-title-row .title-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.tab-strip {
  display: flex; gap: var(--space-1); border-bottom: 1px solid var(--color-border);
  overflow-x: auto; /* narrow viewports: tabs scroll, never wrap */
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.tab-strip a {
  padding: var(--space-3) var(--space-4); font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary); border-bottom: 2px solid transparent;
  margin-bottom: -1px; white-space: nowrap;
  display: inline-flex; align-items: center; gap: var(--space-2);
}
.tab-strip a:hover { color: var(--color-text); text-decoration: none; }
.tab-strip a.is-active { color: var(--color-accent); border-bottom-color: var(--color-accent); }
.module-body { padding: var(--space-5); }
.breadcrumb { font-size: var(--text-sm); color: var(--color-text-muted); margin-bottom: var(--space-3); }
.breadcrumb a { color: var(--color-text-muted); }
.breadcrumb a:hover { color: var(--color-accent); }

/* ==========================================================================
   TAGS IN TABLES (fans.html "Tags" border-misalignment fix)
   Root cause: pages set `display:flex` directly on a <td> (e.g.
   .tags-cell). That overrides the table-cell display, so the cell no
   longer participates in the row's border layout and the row's bottom
   border renders misaligned. NEVER set display on a .table td/th — wrap
   the pills in a span.tag-list instead:
     <td><span class="tag-list"><span class="tag-pill">VIP</span>…</span></td>
   ========================================================================== */
.tag-list { display: inline-flex; gap: var(--space-1); flex-wrap: wrap; }
.tag-pill {
  display: inline-flex; align-items: center; gap: var(--space-1);
  font-size: var(--text-xs); font-weight: var(--weight-medium);
  padding: 1px var(--space-2); border-radius: var(--radius-pill);
  background: var(--color-accent-subtle); color: var(--color-accent);
  border: 1px solid var(--color-accent-border);
}

/* ==========================================================================
   RESPONSIVE BREAKPOINT SYSTEM (one layout per module, no phone/desktop forks)
   Media-query custom properties are not supported by CSS, so the
   breakpoints live as this documented ladder — use these EXACT px values:

     ≥1280px  --bp-xl   wide desktop (default .detail-grid 2-col, 5-col pipeline)
     1024px   --bp-lg   sidebar collapses to the topbar (nav becomes a drawer)
     768px    --bp-md   tab strips scroll; 2-col form grids stack; detail-grid
                        stacks to 1-col; tables may horizontally scroll
     560px    --bp-sm   mobile: band-coordination bottom-tabs appear; the
                        sidebar is fully replaced by .bottom-tabs navigation

   Canonical rules below cover the shared shell; module CSS reuses the same
   four values, never invents its own.
   ========================================================================== */
@media (max-width: 1024px) {
  .nav-shell { grid-template-columns: 1fr; }
  .nav-sidebar {
    display: none; /* replaced by topbar menu button + drawer/bottom-tabs */
  }
  .nav-topbar .menu-toggle { display: inline-flex; }
}
.menu-toggle { display: none; }

@media (max-width: 768px) {
  .module-header, .module-body { padding-left: var(--space-4); padding-right: var(--space-4); }
  .detail-grid { grid-template-columns: 1fr; }
  .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* Mobile bottom-tab bar (band-coordination gig-day pattern, reusable by any
   module). Hidden ≥ sm; below it the sidebar link set is expected to render
   here instead. Each tab: <a class="bottom-tab is-active"><svg class="icon
   icon-lg"/><span>…</span></a> */
.bottom-tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 200;
  display: none;
  background: var(--color-surface-raised);
  border-top: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  padding: var(--space-2) var(--space-2) calc(var(--space-2) + env(safe-area-inset-bottom, 0));
}
.bottom-tab {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: var(--space-1) var(--space-2);
  font-size: var(--text-xs); font-weight: var(--weight-medium);
  color: var(--color-text-muted);
  border-radius: var(--radius-md);
}
.bottom-tab:hover { color: var(--color-text); text-decoration: none; }
.bottom-tab.is-active { color: var(--color-accent); }
@media (max-width: 560px) {
  .bottom-tabs { display: flex; }
  .nav-main { padding-bottom: 72px; } /* keep content clear of the bar */
}
