/* ==========================================================================
   BookCentral UI — design system
   HeroUI v3–style tokens (names match the existing --accent / --surface vars)
   One stylesheet for every screen. No build step, no framework.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --accent: #ba3521;            /* brand red */
  --accent-hover: #9c2b1b;
  --accent-soft: #fbece8;
  --accent-soft-border: #f3d2ca;
  --accent-foreground: #ffffff;

  --background: #f6f5f4;        /* app ground */
  --surface: #ffffff;           /* cards */
  --surface-2: #faf9f8;
  --surface-sunken: #efecea;    /* kanban columns, segmented controls */
  --field-background: #ffffff;

  --foreground: #1f1b19;        /* ink */
  --foreground-2: #3b3532;
  --foreground-3: #57504c;
  --muted: #6b625e;
  --placeholder: #8f8782;

  --border: #eeebe8;
  --border-strong: #e2ddd9;
  --divider: #f0edea;

  --teal: #1f6f8b;              /* agent avatar */

  --success: #17663a;  --success-soft: #e3f5ea;
  --warning: #8a5300;  --warning-soft: #fdf1dc;
  --info: #1d5b9e;     --info-soft: #e6f0fb;
  --danger: #9c2b1b;   --danger-soft: #fbece8;
  --neutral: #4f4845;  --neutral-soft: #f0eeec;
  --purple: #5b3a9e;   --purple-soft: #f0eafb;

  --radius: .625rem;            /* 10px */
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(28, 25, 23, .04);
  --shadow-card: 0 1px 2px rgba(28, 25, 23, .04), 0 6px 20px rgba(28, 25, 23, .04);
  --shadow-pop: 0 8px 24px rgba(28, 25, 23, .18);

  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: clamp(16px, 3vw, 32px);
  --side-w: 248px;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.bc {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font: 400 14px/1.45 var(--font);
}
:where(.bc) a { color: var(--accent); }
:where(.bc) a:hover { color: var(--accent-hover); }
.bc h1, .bc h2, .bc h3, .bc p { margin: 0; }
.bc img { max-width: 100%; }
.bc :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Typography */
.h1 { font-size: 30px; line-height: 1.15; letter-spacing: -.02em; font-weight: 700; }
.h1-sm { font-size: 26px; line-height: 1.2; letter-spacing: -.02em; font-weight: 700; }
.h2 { font-size: 18px; font-weight: 700; }
.h3 { font-size: 16px; font-weight: 700; }
.lbl { font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.text-13 { font-size: 13px; }
.strong { font-weight: 600; }
.bold { font-weight: 700; }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ok { color: var(--success); } .warn { color: var(--warning); } .bad { color: var(--danger); }
.link-plain { text-decoration: none; font-weight: 600; }

/* ---------- 3. Layout helpers ---------- */
.stack { display: flex; flex-direction: column; gap: var(--gap, 16px); min-width: 0; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap, 8px); min-width: 0; }
.row-nowrap { display: flex; align-items: center; gap: var(--gap, 8px); min-width: 0; }
.between { justify-content: space-between; }
.end { justify-content: flex-end; }
.start { align-items: flex-start; }
.grow { flex: 1 1 auto; min-width: 0; }
.ml-auto { margin-left: auto; }
.gap-4 { --gap: 4px; } .gap-6 { --gap: 6px; } .gap-8 { --gap: 8px; } .gap-16 { --gap: 16px; } .gap-10 { --gap: 10px; } .gap-12 { --gap: 12px; } .gap-14 { --gap: 14px; } .gap-20 { --gap: 20px; } .gap-24 { --gap: 24px; }

/* Auto-fit grid that never overflows a phone. Set --min per use. */
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(var(--min, 220px), 100%), 1fr)); gap: var(--gap, 16px); }
.grid-fill { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(var(--min, 280px), 100%), 1fr)); gap: var(--gap, 16px); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap, 12px); }

/* Main + side column layout (wraps to one column on small screens) */
.split { display: flex; flex-wrap: wrap; gap: var(--gap, 20px); align-items: flex-start; }
.split > .split-main { flex: 2 1 560px; min-width: 0; display: flex; flex-direction: column; gap: var(--gap, 20px); }
.split > .split-side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: var(--gap, 20px); }
.split.stretch { align-items: stretch; }
.split > .split-nav { flex: 1 1 230px; max-width: 100%; }
.split > .split-wide { flex: 4 1 600px; min-width: 0; display: flex; flex-direction: column; gap: var(--gap, 20px); }

/* ---------- 4. App shell ---------- */
.bc-app { min-height: 100vh; display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); }
.bc-side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 18px;
  padding: 20px 14px; background: var(--surface); border-right: 1px solid var(--border);
  scrollbar-width: thin;
}
.bc-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; text-decoration: none; color: var(--foreground); }
.bc-brand:hover { color: var(--foreground); }
.bc-brand-mark { width: 36px; height: 36px; border-radius: 11px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.bc-brand-name { display: flex; flex-direction: column; }
.bc-brand-name b { font-size: 15px; }
.bc-brand-name span { font-size: 12px; color: var(--muted); }
.bc-menu-btn { display: none !important; }
.bc-side-body { display: flex; flex-direction: column; gap: 18px; flex: 1 1 auto; min-height: 0; }
.bc-nav { display: flex; flex-direction: column; gap: 1px; }
.bc-nav .lbl { padding: 12px 12px 4px; }
.bc-nav .lbl:first-child { padding-top: 4px; }
.bc-nav a { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-radius: 10px; color: var(--foreground-3); text-decoration: none; font-weight: 500; font-size: 13.5px; }
.bc-nav a svg { flex: none; }
.bc-nav a:hover { background: #f2f0ef; color: var(--foreground); }
.bc-nav a.on, .bc-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--danger); font-weight: 600; }
.bc-nav .badge { margin-left: auto; }
.bc-side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; }
.bc-usercard { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: var(--background); text-decoration: none; color: var(--foreground); }
.bc-usercard-photo { padding: 0; overflow: hidden; cursor: zoom-in; border-color: var(--background); }
.bc-usercard-photo img { width: 100%; height: 100%; object-fit: cover; }
.bc-usercard .sidebar-agent-id { font-size: 11px; }
.bc-usercard .sidebar-edit-profile { font-size: 12px; font-weight: 600; }
.bc-version { font-size: 12px; text-decoration: none; padding: 0 10px; color: var(--muted) !important; }

.bc-main { min-width: 0; display: flex; flex-direction: column; }
.bc-topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px var(--gutter); border-bottom: 1px solid var(--border); background: var(--background); }
.bc-topbar .inp { flex: 1 1 160px; max-width: 520px; min-width: 0; }
.bc-topbar-actions { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.bc-content { padding: clamp(16px, 2.5vw, 28px) var(--gutter) 56px; display: flex; flex-direction: column; gap: 20px; width: 100%; }
.bc-content.flush { padding: clamp(14px, 2vw, 20px) clamp(14px, 2vw, 24px) 32px; gap: 14px; }

.bc-page-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; justify-content: space-between; }
.bc-page-head .lbl { margin-bottom: 6px; }
.bc-page-head p.muted { margin-top: 6px; }
.bc-page-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--muted); }
.crumbs a { text-decoration: none; }
.crumbs [aria-current] { color: var(--foreground); font-weight: 500; }

.dot-badge { position: relative; }
.dot-badge::after { content: ""; position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); border: 2px solid var(--background); }

/* Tablet + phone: sidebar becomes a top bar with a menu button */
@media (max-width: 1023px) {
  .bc-app { display: block; }
  .bc-side { position: sticky; top: 0; z-index: 40; height: auto; max-height: 100vh; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px 16px; gap: 10px; border-right: 0; border-bottom: 1px solid var(--border); }
  .bc-menu-btn { display: inline-flex !important; margin-left: auto; }
  .bc-side-body { display: none; flex: 1 1 100%; max-height: calc(100vh - 70px); overflow-y: auto; padding-bottom: 8px; }
  .bc-side.open .bc-side-body { display: flex; }
}
@media (max-width: 640px) {
  .kbd { display: none; }
  .h1 { font-size: 24px; }
  .h1-sm { font-size: 22px; }
}

/* ---------- 5. Surfaces ---------- */
.card { background: var(--surface); border-radius: var(--radius-xl); border: 1px solid var(--border); box-shadow: var(--shadow-card); min-width: 0; }
.card-pad { padding: 22px; }
.card-pad-lg { padding: 24px; }
.card-pad-sm { padding: 16px 18px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head .lbl { margin-bottom: 2px; }
.tile { padding: 16px; border-radius: var(--radius-lg); background: var(--background); }
.tile-soft { padding: 12px; border-radius: 14px; background: var(--background); }
.callout { padding: 14px 16px; border-radius: var(--radius-lg); background: var(--accent-soft); border: 1px solid var(--accent-soft-border); color: #6b1e12; }
.callout-info { background: var(--info-soft); border-color: #cfe0f4; color: #173f6b; }
.callout-ok { background: var(--success-soft); border-color: #c9ead6; color: var(--success); }
.divider { height: 1px; background: var(--divider); border: 0; margin: 4px 0; }

/* Stat tile */
.stat { padding: 18px; }
.stat-label { font-size: 13px; color: var(--muted); }
.stat-value { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: 12px; color: var(--muted); }

/* Key/value strip (trip, booking) */
.meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 16px; padding: 16px; border-radius: var(--radius-lg); background: var(--background); }
.meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.meta > :first-child { font-size: 12px; color: var(--muted); }
.meta > :last-child { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fld { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fld > :first-child { font-size: 12px; color: var(--muted); }
.fld > :last-child { font-weight: 500; }

/* Label / value line (pricing) */
.line { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 14px; }
.line > :last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.line.total { border-top: 1px solid var(--divider); margin-top: 4px; padding-top: 12px; font-weight: 700; }

/* List row */
.item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--divider); min-width: 0; }
.item:last-child { border-bottom: 0; }
.item-body { flex: 1 1 auto; min-width: 0; }
.item-title { font-weight: 600; }
.item-sub { font-size: 12px; color: var(--muted); }

/* ---------- 6. Chips, avatars, badges ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--radius-pill); font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 1.4; }
.chip-sm { padding: 1px 8px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; flex: none; }
.c-red, .tone-danger { background: var(--danger-soft); color: var(--danger); }
.c-green, .tone-success { background: var(--success-soft); color: var(--success); }
.c-amber, .tone-warning { background: var(--warning-soft); color: var(--warning); }
.c-blue, .tone-info { background: var(--info-soft); color: var(--info); }
.c-gray, .tone-neutral { background: var(--neutral-soft); color: var(--neutral); }
.c-purple, .tone-purple { background: var(--purple-soft); color: var(--purple); }
.av { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; flex: none; border: 2px solid #fff; }
.av-sm { width: 28px; height: 28px; font-size: 11px; }
.av-lg { width: 64px; height: 64px; font-size: 22px; border-width: 0; }
.av-xl { width: 88px; height: 88px; font-size: 30px; border-width: 0; }
.av-agent { background: var(--teal); color: #fff; }
.av-stack { display: flex; }
.av-stack .av + .av { margin-left: -8px; }
.kbd { font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 6px; background: #fff; border: 1px solid #e7e3e0; color: var(--muted); }
.count { font-size: 12px; color: var(--muted); margin-left: auto; }

/* ---------- 7. Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--radius-md); font: 600 14px var(--font); border: 0; cursor: pointer; text-decoration: none; white-space: nowrap; flex: none; }
.btn svg { flex: none; }
.btn-p { background: var(--accent); color: var(--accent-foreground) !important; }
.btn-p:hover { background: var(--accent-hover); }
.btn-s { background: #f2f0ef; color: var(--foreground) !important; }
.btn-s:hover { background: #e8e5e3; }
.btn-g { background: transparent; color: var(--foreground-3) !important; }
.btn-g:hover { background: #efecea; color: var(--foreground) !important; }
.btn-o { background: #fff; color: var(--foreground) !important; border: 1.5px solid var(--border-strong); }
.btn-o:hover { border-color: #c9c1bc; }
.btn-t { background: var(--teal); color: #fff !important; }
.btn-t:hover { background: #185a72; }
.btn-danger { background: var(--danger-soft); color: var(--danger) !important; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn-xs { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 9px; }
.btn-lg { height: 48px; padding: 0 20px; font-size: 15px; border-radius: 14px; }
.btn-i { width: 40px; padding: 0; }
.btn-i.btn-sm { width: 32px; }
.btn-block { width: 100%; }
.btn-tile { flex-direction: column; height: 64px; gap: 4px; font-size: 12px; padding: 0; width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }

/* Segmented control */
.seg { display: inline-flex; flex-wrap: wrap; background: var(--surface-sunken); border-radius: var(--radius-md); padding: 4px; gap: 2px; }
.seg button, .seg a { border: 0; background: transparent; padding: 0 14px; height: 32px; border-radius: 9px; font: 600 13px var(--font); color: var(--foreground-3) !important; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.seg .on, .seg [aria-pressed="true"], .seg [aria-current="page"] { background: #fff; color: var(--foreground) !important; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }

/* Filter pills */
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: var(--radius-pill); border: 1px solid var(--border-strong); background: #fff; font: 600 13px var(--font); color: var(--foreground-3) !important; cursor: pointer; text-decoration: none; white-space: nowrap; }
.pill .count { margin-left: 2px; }
.pill.on, .pill[aria-pressed="true"], .pill[aria-current="page"] { background: var(--foreground); border-color: var(--foreground); color: #fff !important; }
.pill.on .count { color: #d6d0cc; }

/* Tabs — wrap, never scroll */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid #e7e3e0; }
.tabs button, .tabs a { border: 0; background: transparent; padding: 12px 14px; font: 600 14px var(--font); color: var(--muted) !important; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none; }
.tabs .on, .tabs [aria-selected="true"], .tabs [aria-current="page"] { color: var(--foreground) !important; border-bottom-color: var(--accent); }
[data-tab-panel][hidden] { display: none !important; }

/* Secondary vertical nav (settings, library, email folders) */
.subnav { display: flex; flex-direction: column; gap: 2px; padding: 12px; }
.subnav .lbl { padding: 10px 12px 4px; }
.subnav a, .subnav button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 10px; border: 0; background: transparent; color: var(--foreground-3) !important; text-decoration: none; font: 500 14px var(--font); cursor: pointer; text-align: left; }
.subnav a:hover, .subnav button:hover { background: #f2f0ef; }
.subnav .on, .subnav [aria-current="page"] { background: var(--accent-soft); color: var(--danger) !important; font-weight: 600; }

/* ---------- 8. Forms ---------- */
.inp { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: var(--radius-md); background: var(--surface-sunken); color: var(--muted); }
.inp input { border: 0; background: transparent; outline: none; font: 14px var(--font); color: var(--foreground); flex: 1; min-width: 0; width: 100%; }
.inp-white { background: #fff; border: 1px solid var(--border-strong); }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--foreground-2); min-width: 0; }
.field small, .help { font-weight: 400; color: var(--muted); font-size: 12px; }
.field > input:not([type=checkbox]):not([type=radio]), .field > select, .field > textarea, .control {
  height: 40px; border-radius: var(--radius-md); border: 1px solid var(--border-strong); background: var(--field-background);
  padding: 0 12px; font: 400 14px var(--font); color: var(--foreground); width: 100%;
}
.field > textarea, textarea.control { height: 120px; min-height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.field > input:focus, .field > select:focus, .field > textarea:focus, .control:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.field .errorlist, .errorlist { list-style: none; margin: 0; padding: 0; color: var(--danger); font-weight: 500; font-size: 12px; }
.field-lg > input:not([type=checkbox]), .field-lg > select { height: 48px; border-radius: 14px; font-size: 15px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; font-weight: 500; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); margin: 1px 0 0; flex: none; }
.mini { height: 34px; border-radius: 10px; border: 1px solid var(--border-strong); background: #fff; padding: 0 10px; font: 500 13px var(--font); color: var(--foreground); }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }

/* Toggle switch: <input type="checkbox" role="switch" class="tg"> */
.tg { appearance: none; -webkit-appearance: none; width: 40px; height: 24px; border-radius: 999px; background: #d9d3cf; position: relative; cursor: pointer; flex: none; margin: 0; transition: background .15s; }
.tg::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .15s; }
.tg:checked { background: var(--accent); }
.tg:checked::after { transform: translateX(16px); }
.trow { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--divider); }
.trow:last-child { border-bottom: 0; }

/* ---------- 9. Tables ---------- */
.tbl-wrap { overflow-x: auto; scrollbar-width: thin; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 640px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--background); padding: 10px 14px; white-space: nowrap; }
.tbl th:first-child { border-radius: 12px 0 0 12px; }
.tbl th:last-child { border-radius: 0 12px 12px 0; }
.tbl td { padding: 13px 14px; border-bottom: 1px solid var(--divider); vertical-align: middle; white-space: nowrap; }
.tbl td.wrap { white-space: normal; min-width: 200px; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tfoot td { border-top: 1px solid var(--border-strong); background: var(--surface-2); }
.tbl .r, .tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl tbody tr:hover td { background: #fcfbfa; }
.tbl a { text-decoration: none; font-weight: 600; }
.tbl-compact td { padding: 9px 12px; }

/* ---------- 10. Copy to clipboard ---------- */
.cp { position: relative; border: 0; background: none; padding: 0; margin: 0; font: inherit; color: inherit; cursor: copy; display: inline-flex; align-items: center; border-radius: 6px; text-align: left; white-space: nowrap; max-width: 100%; }
.cp svg { position: absolute; right: -19px; top: 50%; transform: translateY(-50%); opacity: 0; transition: opacity .15s; pointer-events: none; }
.cp:hover, .cp:focus-visible { color: var(--accent); }
.cp:hover svg, .cp:focus-visible svg { opacity: 1; }
.bc-toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 100; display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 12px; background: var(--foreground); color: #fff; font: 500 13px var(--font); box-shadow: var(--shadow-pop); max-width: calc(100vw - 32px); }
.bc-toast[hidden] { display: none; }

/* Django messages */
.messages { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.messages li { padding: 12px 16px; border-radius: 14px; background: var(--info-soft); color: #173f6b; font-weight: 500; }
.messages .success { background: var(--success-soft); color: var(--success); }
.messages .warning { background: var(--warning-soft); color: var(--warning); }
.messages .error { background: var(--danger-soft); color: var(--danger); }

/* ---------- 11. Rich text editor ---------- */
.rte { border: 1px solid var(--border-strong); border-radius: 14px; background: #fff; overflow: hidden; display: flex; flex-direction: column; font-weight: 400; }
.rte.flat { border: 0; border-radius: 0; }
.rte-bar { display: flex; flex-wrap: nowrap; align-items: center; gap: 1px; padding: 5px 6px; border-bottom: 1px solid var(--divider); background: var(--surface-2); overflow-x: auto; scrollbar-width: none; }
.rte-bar::-webkit-scrollbar { display: none; }
.rte-bar button { width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: var(--neutral); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; flex: none; }
.rte-bar button:hover { background: #efecea; color: var(--foreground); }
.rte-bar button[aria-pressed="true"] { background: var(--accent-soft); color: var(--danger); }
.rte-bar select { height: 28px; border: 0; border-radius: 8px; background: transparent; font: 500 13px var(--font); color: var(--foreground-2); padding: 0 6px; cursor: pointer; flex: none; }
.rte-bar select:hover { background: #efecea; }
.rte-sep { width: 1px; height: 18px; background: var(--border-strong); margin: 0 3px; flex: none; }
.rte-end { display: inline-flex; gap: 1px; margin-left: auto; flex: none; }
.rte-body { min-height: var(--rte-h, 140px); padding: 14px 16px; font: 400 14.5px/1.6 var(--font); color: var(--foreground); outline: none; overflow: auto; resize: vertical; }
.rte-body:focus { box-shadow: inset 0 0 0 2px var(--accent-soft-border); }
.rte-body:empty::before { content: attr(data-placeholder); color: var(--placeholder); }
.rte-body p { margin: 0 0 10px; } .rte-body p:last-child { margin-bottom: 0; }
.rte-body h2 { font-size: 20px; margin: 0 0 8px; } .rte-body h3 { font-size: 16px; margin: 0 0 6px; }
.rte-body blockquote { margin: 0 0 10px; padding-left: 12px; border-left: 3px solid var(--border-strong); color: var(--foreground-3); }
.rte-body ul, .rte-body ol { margin: 0 0 10px; padding-left: 22px; }
.rte-body table { border-collapse: collapse; width: 100%; }
.rte-body td { border: 1px solid var(--border-strong); padding: 6px; }
.rte-src { display: none; min-height: var(--rte-h, 140px); border: 0; padding: 14px 16px; font: 13px/1.5 ui-monospace, Consolas, monospace; resize: vertical; outline: none; }
.rte.source .rte-body { display: none; } .rte.source .rte-src { display: block; }
.mf { display: inline-block; padding: 0 6px; border-radius: 6px; background: var(--info-soft); color: var(--info); font-size: 13px; font-weight: 600; }

/* ---------- 12. Kanban (Jira-style, one scrolling row) ---------- */
.kboard { height: var(--kboard-h, calc(100vh - 300px)); min-height: 480px; overflow-x: auto; overflow-y: hidden; padding-bottom: 10px; scrollbar-width: thin; scrollbar-color: #d9d3cf transparent; }
.kboard.auto { height: auto; overflow-y: visible; }
.kcols { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(272px, 1fr); gap: 14px; align-items: stretch; min-width: min-content; height: 100%; }
.kcol { min-width: 0; min-height: 0; height: 100%; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #d9d3cf transparent; background: var(--surface-sunken); border-radius: 18px; padding: 0 12px 12px; display: flex; flex-direction: column; gap: 10px; border: 2px solid transparent; transition: border-color .12s, background .12s; }
.kboard.auto .kcol { height: auto; }
.kcol-head { position: sticky; top: 0; z-index: 1; background: inherit; margin: 0 -12px; padding: 14px 16px 6px; display: flex; align-items: center; gap: 8px; }
.kcol.over { border-color: var(--accent); background: #f7e7e3; }
.kcard { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--border); text-decoration: none; color: var(--foreground) !important; box-shadow: var(--shadow-sm); flex: none; }
.kcard { position: relative; }
.kcard:hover { border-color: #d9d3cf; }
.kcard a.stretch { color: var(--foreground) !important; text-decoration: none; }
.kcard a.stretch::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.kcard .kmove, .kcard button, .kcard .above { position: relative; z-index: 1; }
.kcard[draggable="true"] { cursor: grab; }
.kcard[draggable="true"]:active { cursor: grabbing; }
.kcard.dragging { opacity: .45; transform: rotate(1.5deg); }
.kcard-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px solid var(--divider); padding-top: 8px; font-size: 13px; }
.kdrop { border: 2px dashed #d9d3cf; border-radius: 14px; padding: 14px; text-align: center; font-size: 12px; color: var(--muted); }
/* The "Move to" select is the touch + keyboard fallback for dragging: always shown on touch screens,
   tucked away on mouse devices until it receives keyboard focus. */
@media (hover: hover) and (pointer: fine) { .kcard .kmove:not(:focus) { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; } }
.kmove { font-size: 12px; height: 28px; border-radius: 8px; border: 1px solid var(--border-strong); background: #fff; color: var(--foreground-3); padding: 0 6px; max-width: 100%; }

/* ---------- 13. Trip progress stepper ---------- */
.steps-wrap { overflow-x: auto; scrollbar-width: thin; }
.steps { display: flex; min-width: 760px; }
.step { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; font-size: 12px; font-weight: 600; color: var(--muted); text-align: center; }
.step::before { content: ""; position: absolute; top: 13px; left: -50%; right: 50%; height: 2px; background: var(--border-strong); z-index: 0; }
.step:first-child::before { display: none; }
.step i { position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-style: normal; background: var(--neutral-soft); color: var(--muted); border: 2px solid #fff; }
.step.done { color: var(--foreground-2); } .step.done i { background: #24965a; color: #fff; } .step.done::before { background: #24965a; }
.step.now { color: var(--foreground); } .step.now i { background: var(--accent); color: #fff; } .step.now::before { background: #24965a; }

/* ---------- 14. Timeline / activity / conversation ---------- */
.timeline { display: flex; flex-direction: column; }
.tl-item { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--divider); }
.tl-item:last-child { border-bottom: 0; }
.tl-icon { width: 32px; height: 32px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex: none; }
.bubble { padding: 12px 14px; border-radius: 16px; background: var(--background); line-height: 1.55; max-width: 640px; }
.bubble-out { background: var(--accent-soft); color: #3b1810; }
.msg { display: flex; gap: 12px; }
.msg-out { flex-direction: row-reverse; }
.msg-out .msg-body { align-items: flex-end; }
.msg-body { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }

/* ---------- 15. Email client (3 panes) ---------- */
.mail { display: flex; flex-wrap: wrap; min-height: calc(100vh - 170px); overflow: hidden; padding: 0; }
.mail-folders { flex: 1 1 210px; max-width: 100%; padding: 14px 10px; border-right: 1px solid var(--divider); background: #fbfaf9; display: flex; flex-direction: column; gap: 2px; }
.mail-list { flex: 2 1 340px; min-width: 0; border-right: 1px solid var(--divider); display: flex; flex-direction: column; }
.mail-read { flex: 3 1 420px; min-width: 0; display: flex; flex-direction: column; }
.mail-row { display: flex; gap: 10px; width: 100%; padding: 12px 14px; border: 0; border-bottom: 1px solid var(--divider); background: #fff; text-align: left; font: inherit; color: inherit; cursor: pointer; text-decoration: none; }
.mail-row:hover { background: var(--surface-2); }
.mail-row.on, .mail-row[aria-current="true"] { background: var(--accent-soft); }
.mail-row.unread .mail-from, .mail-row.unread .mail-subj { font-weight: 700; }
.fold { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--foreground-3) !important; text-decoration: none; font-weight: 500; }
.fold:hover { background: #f2f0ef; }
.fold.on { background: var(--foreground); color: #fff !important; }
.fold.on .muted { color: #d6d0cc; }
.mfield { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--divider); padding: 10px 0; font-size: 14px; }
.mfield > span { width: 64px; flex: none; color: var(--muted); font-size: 13px; }
.mfield input, .mfield select { flex: 1; min-width: 0; border: 0; outline: none; font: 14px var(--font); color: var(--foreground); background: transparent; }
@media (max-width: 900px) { .mail { min-height: 0; } .mail-folders, .mail-list { border-right: 0; border-bottom: 1px solid var(--divider); } }

/* ---------- 16. Calendar ---------- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-dow { padding: 10px; font-size: 12px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--divider); }
.cal-day { min-height: 112px; padding: 8px; border-right: 1px solid var(--divider); border-bottom: 1px solid var(--divider); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day.other { background: var(--surface-2); color: var(--placeholder); }
.cal-day.today .cal-num { background: var(--accent); color: #fff; }
.cal-num { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; }
.cal-ev { display: block; padding: 2px 6px; border-radius: 6px; font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
@media (max-width: 640px) { .cal-day { min-height: 64px; padding: 4px; } .cal-ev { font-size: 10px; padding: 1px 3px; } }
.agenda { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--divider); }
.agenda:last-child { border-bottom: 0; }
.agenda-date { width: 54px; flex: none; text-align: center; }

/* ---------- 17. Automation builder ---------- */
.flow-step { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 16px; border: 1px solid var(--border); background: #fff; }
.flow-step.trigger { background: var(--accent-soft); border-color: var(--accent-soft-border); }
.flow-num { width: 32px; height: 32px; border-radius: 10px; background: var(--foreground); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.flow-step.trigger .flow-num { background: var(--accent); }
.flow-line { width: 2px; height: 18px; background: var(--border-strong); margin-left: 31px; }
.flow-add { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px; border-radius: 16px; border: 1.5px dashed #d9d3cf; align-items: center; }

/* ---------- 18. Documents / file tiles ---------- */
.file { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 16px; border: 1px solid var(--border); background: #fff; text-decoration: none; color: var(--foreground) !important; min-width: 0; }
.file:hover { border-color: #d9d3cf; }
.file-ico { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.dropzone { border: 1.5px dashed #d9d3cf; border-radius: 16px; padding: 28px; text-align: center; color: var(--muted); }

/* ---------- 19. FAQ accordion ---------- */
.faq details { border-bottom: 1px solid var(--divider); padding: 4px 0; }
.faq details:last-child { border-bottom: 0; }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; padding: 14px 0; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 18px; color: var(--muted); line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq .ans { padding: 0 0 14px; color: var(--foreground-3); line-height: 1.6; }

/* ---------- 20. Progress / bars ---------- */
.bar { height: 10px; border-radius: 99px; overflow: hidden; display: flex; background: #e9e5e2; }
.bar > span { display: block; height: 100%; }
.bar-accent { background: var(--accent); } .bar-muted { background: #d9d3cf; } .bar-ok { background: #24965a; }
.chart-bars { display: flex; align-items: flex-end; gap: 10px; height: 180px; }
.chart-bars > div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; height: 100%; justify-content: flex-end; }
.chart-bars span.b { width: 100%; max-width: 44px; border-radius: 8px 8px 4px 4px; background: var(--accent); }
.chart-bars span.b.soft { background: #e8c4bc; }
.chart-bars small { font-size: 11px; color: var(--muted); }

/* ---------- 21. Empty state ---------- */
.empty { padding: 48px 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.empty-ico { width: 56px; height: 56px; border-radius: 16px; background: var(--neutral-soft); color: var(--muted); display: flex; align-items: center; justify-content: center; }

/* ---------- 22. Public pages (login, traveler portal, trip request, group page) ---------- */
.pub { min-height: 100vh; display: flex; flex-direction: column; background: var(--background); }
.pub-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px clamp(16px, 3vw, 28px); background: #fff; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.pub-main { flex: 1; display: flex; justify-content: center; padding: clamp(24px, 4vw, 40px) 20px 64px; }
.pub-wrap { width: 100%; max-width: 1080px; display: flex; flex-direction: column; gap: 20px; }
.pub-narrow { width: 100%; max-width: 720px; display: flex; flex-direction: column; gap: 22px; }
.pub-card { padding: clamp(22px, 4vw, 32px); border-radius: 24px; }
.hero-dark { border-radius: 24px; background: var(--foreground); color: #fff; padding: clamp(22px, 4vw, 32px); display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: flex-end; }
.hero-dark .sub { color: #d6d0cc; }
.photo-ph { border-radius: 28px; border: 1.5px dashed #57504c; display: flex; align-items: center; justify-content: center; color: #8f8782; font-size: 14px; text-align: center; padding: 16px; }
.auth { overflow-x: hidden; min-height: 100vh; display: flex; flex-wrap: wrap; background: var(--background); }
.auth-art { flex: 1 1 520px; min-height: 360px; padding: 40px; background: var(--foreground); color: #fff; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; position: relative; overflow: hidden; }
.auth-art .photo-ph { position: absolute; inset: 120px 40px 160px 40px; }
@media (max-width: 700px) { .auth-art { min-height: 0; padding: 28px 20px; flex-basis: 100%; } .auth-art .photo-ph, .auth-art img { display: none; } .auth-form { padding: 28px 16px; flex-basis: 100%; } .auth-art .h1 { font-size: 26px !important; } }
.auth-form { min-width: 0; flex: 1 1 480px; display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-box { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 20px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: #e7e3e0; }
.otp { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.otp input { height: 56px; border-radius: 14px; border: 1px solid var(--border-strong); text-align: center; font: 600 22px var(--font); width: 100%; }
.opt { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 14px; border: 1.5px solid #e7e3e0; background: #fff; cursor: pointer; font: 500 14px var(--font); color: var(--foreground); text-align: left; }
.opt:has(input:checked), .opt.on { border-color: var(--accent); background: #fdf6f4; }
.opt input { accent-color: var(--accent); }
.wizard-steps { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; }
.wstep { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.wstep i { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 12px; background: var(--neutral-soft); }
.wstep.on { color: var(--foreground); } .wstep.on i { background: var(--accent); color: #fff; }
.wstep.done i { background: #24965a; color: #fff; }
.cabin { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: 18px; border: 1.5px solid #e7e3e0; background: #fff; cursor: pointer; }
.cabin:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.cabin input { position: absolute; opacity: 0; pointer-events: none; }

/* ---------- 23. Print ---------- */
@media print {
  .bc-side, .bc-topbar, .bc-page-actions, .btn { display: none !important; }
  .bc-app { display: block; }
  .card { box-shadow: none; }
}

/* Runtime integration: retain the established theme preference and genuine agency branding. */
:root[data-theme="dark"] { color-scheme:dark; --accent:#f09686; --accent-hover:#ffb3a5; --accent-soft:#44251f; --accent-soft-border:#704136; --background:#1d1b1b; --surface:#272525; --surface-2:#302d2c; --surface-sunken:#353130; --field-background:#302d2c; --foreground:#f2eeec; --foreground-2:#dfd6d2; --foreground-3:#cfc2bc; --muted:#bfb1aa; --border:#46403d; --border-strong:#62544d; --divider:#423b37; }
.bc-brand-logo { width:60px; height:42px; object-fit:contain; background:#fff; border-radius:6px; }
.bc-brand-name { min-width:0; }
.bc-metric-breakdown { margin:8px 0 0; padding-top:8px; border-top:1px solid var(--divider); font-size:12px; }
.bc-metric-breakdown>div { display:flex; justify-content:space-between; gap:12px; margin:5px 0; }
.bc-metric-breakdown dd { margin:0; white-space:nowrap; font-weight:600; }
.bc-app-footer { margin-top:32px; padding:20px 0; text-align:center; font-size:12px; color:var(--muted); }
.bc-required { padding:2px 6px; border-radius:12px; background:var(--accent-soft); color:var(--danger); font-weight:700; }
.bc-preview-banner { padding:8px 16px; background:#fdf1dc; color:#5b3b00; text-align:center; }
.bc-quick-dialog, #quick-contact-dialog { width:min(780px,calc(100vw - 32px)); max-height:calc(100dvh - 32px); overflow:auto; border:1px solid var(--border); border-radius:16px; padding:24px; background:var(--surface); color:var(--foreground); }
.bc-quick-dialog::backdrop, #quick-contact-dialog::backdrop { background:#0008; }
.bc-quick-dialog>header { margin-bottom:20px; }
.bc-quick-dialog select[multiple] { min-height:130px; }
.bc-task-link { display:grid; gap:4px; text-decoration:none; }
.bc-side-body { min-height:0; }
.bc-side-foot { flex-shrink:0; }
:root[data-theme="dark"] .btn-p { background:#ba3521; color:#fff; }
:root[data-theme="dark"] .inp-white, :root[data-theme="dark"] .tile-soft .btn { background:var(--surface) !important; }

#quick-contact-dialog form { display:grid; gap:16px; margin-top:20px; }
#quick-contact-dialog form>div:not(.dialog-actions) { display:grid; gap:6px; }
#quick-contact-dialog input { width:100%; min-height:40px; border:1px solid var(--border-strong); border-radius:10px; padding:8px 12px; background:var(--field-background); color:var(--foreground); }
#quick-contact-dialog .dialog-actions { display:flex; flex-wrap:wrap; gap:10px; }

.bc .column-chooser { position:relative; }
.bc .column-chooser-menu { position:absolute; z-index:20; right:0; top:calc(100% + 8px); display:grid; gap:10px; width:260px; max-width:calc(100vw - 48px); padding:18px; border:1px solid var(--border); border-radius:12px; background:var(--surface); box-shadow:var(--shadow-pop); }
.bc .column-chooser-menu label { display:flex; align-items:center; gap:8px; }
.bc [data-column].column-hidden { display:none !important; }
.bc .tbl td select { max-width:240px; min-height:36px; padding:6px; border:1px solid var(--border-strong); border-radius:8px; background:var(--field-background); color:var(--foreground); font:inherit; }
.bc .tbl td small { display:block; }
.bc-history { margin-top:20px; }
.bc-history>section { margin-top:12px; }
.bc [data-view-panel] { margin-top:20px; }

@media(max-width:600px){.bc .column-chooser-menu{left:0;right:auto}}

/* Contain absolute accessible labels inside their scrolling table/board. */
.bc .tbl-wrap,.bc .kboard{position:relative;max-width:100%}

.bc .kmove{background:var(--field-background);color:var(--foreground)}

/* Retain the existing enhanced Django widgets inside the new quick-create dialogs. */
.bc .multi-combobox{position:relative;min-width:0}
.bc .multi-trigger{display:block;width:100%;min-height:40px;padding:9px 12px;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border:1px solid var(--border-strong);border-radius:10px;background:var(--field-background);color:var(--foreground);font:inherit;cursor:pointer}
.bc .multi-panel{display:none;position:absolute;z-index:30;left:0;right:0;top:calc(100% + 5px);padding:10px;border:1px solid var(--border-strong);border-radius:10px;background:var(--surface);box-shadow:var(--shadow-pop)}
.bc .multi-combobox.open .multi-panel{display:block}
.bc .multi-search{margin-bottom:8px;width:100%}
.bc .multi-choices{max-height:240px;overflow:auto;display:grid;gap:3px}
.bc .multi-choice{display:flex!important;align-items:center;gap:9px;padding:8px;border-radius:7px;font-weight:400!important}
.bc .multi-choice:hover{background:var(--surface-sunken)}
.bc .multi-choice input{width:16px!important;height:16px!important;min-height:0;margin:0;flex:0 0 auto}
.bc .multi-create-contact{width:100%;margin-top:8px;padding:9px;border:1px dashed var(--accent);border-radius:8px;background:var(--accent-soft);color:var(--accent);font:inherit;cursor:pointer}
.bc .multi-required-error{color:var(--danger);font-size:12px;margin-top:8px}
.bc .multi-invalid .multi-trigger{border-color:var(--danger)}
.bc .field label .bc-required{color:var(--danger);background:var(--danger-soft);font-weight:700}
.bc .rich-editor{border:1px solid var(--border-strong);border-radius:10px;overflow:hidden;background:var(--field-background)}
.bc .editor-toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:4px;padding:8px;border-bottom:1px solid var(--border);background:var(--surface-2)}
.bc .editor-toolbar button,.bc .editor-toolbar select{min-height:30px;padding:4px 7px;border:1px solid var(--border);border-radius:6px;background:var(--surface);color:var(--foreground);font:inherit}
.bc .editor-visual{min-height:160px;padding:12px;outline-offset:-3px}
.bc .editor-visual p{margin:0 0 10px}
.bc .editor-source{width:100%;min-height:160px}

/* Theme-complete interactive states (including pointer hover). */
.bc .btn-g:hover {background:var(--surface-sunken)}
.bc .btn-o {background:var(--surface)}
.bc .btn-s {background:var(--surface-sunken)}
.bc .kbd {background:var(--surface);color:var(--muted);border-color:var(--border)}
:root[data-theme="dark"] {--accent-foreground:#2b1410;--success-soft:#173b28;--warning-soft:#44351d;--info-soft:#203346;--danger-soft:#44251f}
:root[data-theme="dark"] .bc .btn-p {color:var(--accent-foreground)!important}

:root[data-theme="dark"] {--danger:#ffb3a5;--success:#91d8ab;--warning:#ffd38a;--info:#a3c7ff}
.bc .bc-side .btn-p {background:var(--accent)!important}

/* Touch screens: checkboxes and radios large enough to tap. */
@media (pointer:coarse), (max-width:600px) {.bc input:is([type=checkbox],[type=radio]) {width:22px;height:22px;flex-shrink:0}}
/* Phones: shared stat cards sit two per row, compact, so page content starts sooner. */
@media (max-width:600px) {.bc .kit-stats {grid-template-columns:repeat(2,minmax(0,1fr));gap:8px} .bc .kit-stats > .stat {padding:12px 14px;min-height:0} .bc .kit-stats .stat-value {font-size:20px} .bc .kit-stats .stat-label, .bc .kit-stats .stat-sub {font-size:11px}}
/* Word/name stats (e.g. Parent group) at text size, two lines max, instead of a 26px figure. */
.bc .stat-value.stat-text {font-size:15px;font-weight:650;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.bc .stat-value a {color:var(--accent);text-decoration:none}
.bc .stat-value a:hover {text-decoration:underline}
