/* Collective CRM: dark sidebar, light workspace, white cards, red brand accent (#ff073a) */
:root {
  --bg: #F6F7F9; --surface: #FFFFFF; --side: #0B0B0C; --side-2: #161618;
  --ink: #111214; --text: #2B3036; --muted: #6B7280; --faint: #9AA1A9;
  --line: #E6E8EB; --line-2: #EEF0F2;
  --red: #FF073A; --red-ink: #D9002F; --red-soft: #FFF0F3;
  --paper: var(--bg); --paper-2: #F1F2F4; --white: #fff; --forest: #111214; --green: #2B3036; --mint: #F1F2F4;
  --signal: var(--red); --signal-ink: var(--red-ink);
  --radius: 14px; --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
  --display: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
body { background: var(--bg); color: var(--text); font: 400 14px/1.5 var(--body); }
h1, h2, h3 { font-family: var(--display); font-variation-settings: normal; font-weight: 700; letter-spacing: -.02em; color: var(--ink); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* Buttons and pills */
.btn { background: var(--red); border-color: var(--red); border-radius: 10px; font: 600 14px/1 var(--body); padding: 11px 16px; }
.btn:hover { background: var(--red-ink); border-color: var(--red-ink); }
.btn-sm { padding: 9px 13px; font-size: 13px; }
.btn .ic { width: 16px; height: 16px; stroke-width: 2.2; }
.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--bg); border-color: #D5D8DD; }
.btn-dark { background: var(--ink); border-color: var(--ink); }
.btn-danger { background: var(--surface); color: var(--red-ink); border: 1px solid #FFC9D4; }
.btn-danger:hover { background: var(--red-soft); border-color: var(--red); }
.pill { border-radius: 6px; font: 600 11px/1 var(--body); letter-spacing: .02em; text-transform: none; padding: 5px 8px; background: var(--paper-2); color: var(--muted); }
.pill-green { background: #E8F5EE; color: #1F6B43; }
.pill-amber { background: #FDF3E1; color: #8A5A12; }
.pill-red { background: var(--red-soft); color: var(--red-ink); }
.pill-dark { background: var(--ink); color: #fff; }
.pill-orange { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
input, select, textarea { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 14px; background: var(--surface); }
input:focus, select:focus, textarea:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(255, 7, 58, .12); }
.choices input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--side); }
.login-card { width: min(400px, 100%); padding: 32px; }
.login-logo { display: block; height: 52px; width: auto; }
.login-card h1 { font-size: 24px; margin: 24px 0 18px; }
.login-card .btn { width: 100%; padding: 13px; }

/* Shell */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { background: var(--side); color: #fff; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.side-brand { display: flex; align-items: center; gap: 12px; padding: 22px 22px 20px; border-bottom: 1px solid rgba(255, 255, 255, .08); text-decoration: none; color: #fff; }
.side-brand img { height: 40px; width: auto; display: block; }
.side-brand span { font: 600 10px/1 var(--body); letter-spacing: .14em; color: rgba(255, 255, 255, .5); padding: 5px 7px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 6px; }
.side-scroll { flex: 1; overflow-y: auto; padding: 8px 14px 16px; }
.side-label { margin: 20px 10px 8px; font: 600 10.5px/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .4); }
.side-nav { display: grid; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 12px; text-decoration: none; color: rgba(255, 255, 255, .72); padding: 9px 10px; border-radius: 9px; font-weight: 500; font-size: 14px; transition: background .15s, color .15s; }
.side-nav a:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.side-nav a.on { background: rgba(255, 7, 58, .14); color: #FF4D6D; }
.side-nav a.on .ic { color: var(--red); }
.side :focus-visible, .login :focus-visible { outline-color: #fff; }
.side-user { display: flex; align-items: center; gap: 11px; padding: 16px 18px; border-top: 1px solid rgba(255, 255, 255, .08); }
.side-user-text { flex: 1; min-width: 0; display: grid; }
.side-user-text b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user-text small { font-size: 12px; color: rgba(255, 255, 255, .5); }
.icon-btn { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; border: 0; background: transparent; color: rgba(255, 255, 255, .6); cursor: pointer; }
.icon-btn:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.avatar { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--red); color: #fff; font: 700 12px/1 var(--body); flex-shrink: 0; }
.avatar-light { background: var(--red-soft); color: var(--red-ink); }
.avatar-sm { width: 30px; height: 30px; font-size: 11px; background: var(--paper-2); color: var(--text); }

.shell { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px clamp(16px, 2.6vw, 32px); background: rgba(246, 247, 249, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.search { display: flex; align-items: center; gap: 10px; width: min(380px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 0 10px 0 12px; color: var(--faint); }
.search input { border: 0; padding: 10px 0; background: transparent; box-shadow: none; }
.search input:focus { box-shadow: none; }
.search:focus-within { border-color: var(--red); box-shadow: 0 0 0 3px rgba(255, 7, 58, .12); }
.search kbd { font: 600 11px/1 var(--body); color: var(--faint); border: 1px solid var(--line); border-radius: 5px; padding: 3px 6px; }
.top-actions { display: flex; align-items: center; gap: 14px; }
.main { padding: 26px clamp(16px, 2.6vw, 32px) 80px; min-width: 0; }
.menu-btn, .side-backdrop { display: none; }
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  /* The menu slides in from the left */
  .side { position: fixed; top: 0; left: 0; bottom: 0; z-index: 60; width: min(300px, 86vw); height: 100%; transform: translateX(-105%); transition: transform .22s ease; box-shadow: 0 0 40px rgba(0, 0, 0, .45); }
  .side.open { transform: none; }
  .side-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(0, 0, 0, .5); }
  body.menu-open { overflow: hidden; }
  .menu-btn { display: inline-grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
  .menu-btn .ic { width: 20px; height: 20px; }
  .topbar { gap: 10px; padding: 10px 16px; }
  .search { flex: 1; min-width: 0; width: auto; }
  .search kbd { display: none; }
  .top-actions { gap: 8px; }
  .top-new-label { display: none; }
  #top-new { padding: 9px 10px; }
  .main { padding-left: 16px !important; padding-right: 16px !important; }
  .head { align-items: flex-start; }
  .head-actions { width: 100%; }
  .drawer-panel { padding: 22px 16px; }
}
/* Lists become stacked cards on a phone, each value under its column name */
@media (max-width: 700px) {
  table.t, table.t tbody, table.t tr, table.t td { display: block; width: 100%; }
  table.t thead { display: none; }
  table.t tbody tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  table.t td { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; align-items: start; justify-items: start; padding: 4px 0 !important; border: 0 !important; text-align: left !important; font-size: 13px; }
  table.t td::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 500; }
  table.t td:not([data-label]), table.t td[data-label=""] { display: block; }
  table.t td:not([data-label])::before, table.t td[data-label=""]::before { content: none; }
  table.t td:first-child { grid-template-columns: minmax(0, 1fr); }
  table.t td:first-child::before { content: none; }
  table.t td:first-child, table.t td:first-child b, table.t td:first-child a { font-size: 15px; }
  table.t td.act, table.t td.chk { display: flex; gap: 8px; justify-content: flex-start; }
  table.t td.chk::before, table.t td.act::before { content: none; }
  table.t .num { text-align: left !important; }
  .table-scroll { overflow-x: visible; }
}

/* Page heads */
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.head h1 { font-size: 26px; margin: 0; }
.head .sub { color: var(--muted); margin: 4px 0 0; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.crumb { font-size: 13px; color: var(--muted); margin-bottom: 6px; display: inline-block; text-decoration: none; }
.crumb:hover { color: var(--ink); }
.notice { font-size: 13px; color: #8A5A12; background: #FDF3E1; border: 1px solid #F6E2BC; border-radius: 10px; padding: 10px 14px; margin-bottom: 18px; }

/* Grids */
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1500px) { .g5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.span2 { grid-column: span 2; }
.dash-row { grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); }
@media (max-width: 1200px) { .g4, .g5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dash-row { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .g2, .g3, .g4, .g5 { grid-template-columns: 1fr; } .span2 { grid-column: auto; } }
[data-mt] { margin-top: 18px; }

/* Cards */
.card h2 { font-size: 16px; font-weight: 700; letter-spacing: -.01em; margin: 0; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.card h2 small { font: 500 12px/1 var(--body); color: var(--muted); }
.card > h2 { margin-bottom: 14px; }
.card-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.card-sub { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.view-all { font-size: 13px; font-weight: 600; color: var(--red-ink); text-decoration: none; white-space: nowrap; }
.view-all:hover { text-decoration: underline; }
.seg { display: inline-flex; background: var(--paper-2); border-radius: 9px; padding: 3px; }
.seg button { border: 0; background: transparent; font: 600 12px/1 var(--body); color: var(--muted); padding: 7px 12px; border-radius: 7px; cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* Stat cards */
.stat { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 20px 0; box-shadow: var(--shadow); overflow: hidden; text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s; }
a.stat:hover { border-color: #D5D8DD; box-shadow: 0 4px 14px rgba(16, 24, 40, .08); }
.stat-label { font-size: 13px; color: var(--muted); font-weight: 500; }
.stat-ic { position: absolute; top: 16px; right: 16px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: var(--red-soft); color: var(--red); }
.stat:nth-child(2) .stat-ic { background: var(--paper-2); color: var(--ink); }
.stat:nth-child(3) .stat-ic { background: var(--paper-2); color: #5B6470; }
.stat b { font: 700 28px/1.1 var(--display); letter-spacing: -.03em; color: var(--ink); margin: 12px 0 8px; }
.stat b small { font-size: 14px; font-weight: 600; color: var(--muted); margin-left: 2px; }
.trend { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--muted); }
.trend .ic { width: 14px; height: 14px; stroke-width: 2.2; }
.trend.up { color: #1F8A52; }
.trend.down { color: var(--red-ink); }
.stat-alert { border-color: #FFC9D4; }
.spark { display: block; width: calc(100% + 40px); height: 44px; margin: 14px -20px 0; }

/* Charts */
.area { display: block; width: 100%; height: auto; }
.axis { font: 500 11px var(--body); fill: var(--faint); }
.axis-dark { fill: var(--text); font-size: 12px; }
.donut-wrap { display: grid; place-items: center; padding: 4px 0 14px; }
.donut { width: 168px; height: 168px; }
.donut-n { font: 700 24px var(--display); fill: var(--ink); }
.donut-l { font: 500 10px var(--body); fill: var(--muted); }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.legend li { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 10px; font-size: 13px; color: var(--text); }
.legend svg { width: 10px; height: 10px; }
.legend b { font-weight: 600; color: var(--ink); }
.hbars { display: block; width: 100%; height: auto; }

/* Tables */
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; background: var(--surface); }
.t th { text-align: left; font: 500 12px/1 var(--body); letter-spacing: 0; text-transform: none; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); }
.t td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; color: var(--text); }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr { cursor: pointer; }
.t tbody tr:hover td { background: #FAFBFC; }
.t a { font-weight: 600; text-decoration: none; color: var(--ink); }
.t .num { text-align: right; font-variant-numeric: tabular-nums; }
.t-plain th:first-child, .t-plain td:first-child { padding-left: 0; width: 28px; }
.t-plain th:last-child, .t-plain td:last-child { padding-right: 0; }
.who { display: flex; align-items: center; gap: 10px; }
.who > span:last-child { display: grid; }
.who small { font-size: 12px; color: var(--muted); }
.prog { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.prog svg { width: 64px; height: 6px; }
.table-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; background: var(--surface); box-shadow: var(--shadow); }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar input, .toolbar select { width: auto; min-width: 220px; }

/* Lists */
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 11px 0; border-top: 1px solid var(--line-2); display: flex; justify-content: space-between; gap: 12px; align-items: center; font-size: 13.5px; }
.list li:first-child { border-top: 0; padding-top: 0; }
.list a { text-decoration: none; font-weight: 600; color: var(--ink); }
.list a:hover { text-decoration: underline; }
.list .meta { color: var(--muted); font-size: 12.5px; }
.empty-s { color: var(--muted); font-size: 13.5px; padding: 4px 0; margin: 0; }
.link-btn { background: none; border: 0; color: inherit; padding: 0; text-align: left; text-decoration: underline; cursor: pointer; font: inherit; }

/* Pipeline board */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.col { background: #EEF0F2; border-radius: var(--radius); padding: 10px; min-height: 180px; }
.col.drop { outline: 2px dashed var(--red); outline-offset: -2px; }
.col-h { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 6px 10px; }
.col-h b { font: 700 13px/1 var(--body); color: var(--ink); }
.col-h span { font-size: 12px; color: var(--muted); }
.deal { background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 12px; margin-bottom: 8px; cursor: grab; display: block; text-decoration: none; box-shadow: var(--shadow); }
.deal:hover { border-color: var(--red); }
.deal b { display: block; font-size: 14px; color: var(--ink); }
.deal .meta { font-size: 12px; color: var(--muted); margin-top: 4px; display: flex; justify-content: space-between; gap: 6px; }

/* Company page */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs a { padding: 10px 14px; text-decoration: none; font-weight: 600; font-size: 13.5px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); border-color: var(--red); }
.tabs a .count { background: var(--paper-2); border-radius: 999px; padding: 2px 7px; font-size: 11px; margin-left: 4px; }
.dl { display: grid; grid-template-columns: 130px 1fr; gap: 10px 14px; font-size: 13.5px; margin: 0; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 12px 0 12px 22px; border-top: 1px solid var(--line-2); position: relative; font-size: 13.5px; }
.timeline li::before { content: ""; position: absolute; left: 2px; top: 18px; width: 8px; height: 8px; border-radius: 50%; background: var(--text); }
.timeline li.task::before { background: var(--red); }
.timeline li.system::before { background: var(--line); }
.timeline .body { white-space: pre-wrap; }
.timeline .meta { font-size: 12px; color: var(--muted); margin-top: 4px; display: flex; gap: 10px; align-items: center; }
.timeline li.done .body { text-decoration: line-through; color: var(--muted); }
.composer { display: grid; gap: 8px; margin-bottom: 8px; }
.composer-row { display: flex; gap: 8px; flex-wrap: wrap; }
.composer-row select, .composer-row input { width: auto; }
.linkbox { display: flex; gap: 8px; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; font: 500 13px/1.3 ui-monospace, Consolas, monospace; word-break: break-all; }
.linkbox span { flex: 1; }
.switch { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.switch input { width: 18px; height: 18px; accent-color: var(--red); }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.kpi b { display: block; font: 700 26px/1.1 var(--display); letter-spacing: -.03em; color: var(--ink); font-variation-settings: normal; }
.kpi span { font-size: 12.5px; color: var(--muted); }
.kpi.alert-k b { color: var(--red-ink); }
.kpi.dark { background: var(--ink); border-color: var(--ink); }
.kpi.dark b { color: #fff; } .kpi.dark span { color: rgba(255, 255, 255, .7); }

/* Induction slots */
.day-block { margin-bottom: 18px; }
.day-block h3 { font-size: 14px; margin-bottom: 8px; }
.slot-row { display: grid; grid-template-columns: 70px 90px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; margin-bottom: 6px; font-size: 13.5px; }
.slot-row .time { font-weight: 700; font-size: 15px; color: var(--ink); }
.slot-row .cap { color: var(--muted); font-size: 12.5px; }
.slot-row .cap.full { color: var(--red-ink); font-weight: 600; }
.people { display: flex; flex-wrap: wrap; gap: 6px; }
.person-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 4px 6px 4px 10px; font-size: 12.5px; }
.person-chip button { border: 0; background: var(--surface); border-radius: 999px; padding: 3px 7px; font-size: 11px; cursor: pointer; font-weight: 600; color: var(--muted); }
.person-chip button:hover { color: var(--ink); background: var(--paper-2); }
.person-chip.attended { background: #E8F5EE; border-color: transparent; }
.person-chip.no_show { background: var(--red-soft); border-color: transparent; text-decoration: line-through; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.red { background: #B42318; } .dot.amber { background: #B7791F; } .dot.green { background: #1F6B43; }
@media (max-width: 700px) { .slot-row { grid-template-columns: 60px 1fr; } .slot-row .people, .slot-row > :last-child { grid-column: 1 / -1; } }

/* Drawer */
.drawer { position: fixed; inset: 0; z-index: 40; }
.drawer-bg { position: absolute; inset: 0; background: rgba(11, 11, 12, .45); }
.drawer-panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(600px, 100%); background: var(--bg); overflow-y: auto; padding: 28px; box-shadow: -20px 0 50px rgba(0, 0, 0, .2); }
.drawer-x { position: absolute; right: 16px; top: 14px; border: 1px solid var(--line); background: var(--surface); width: 34px; height: 34px; border-radius: 50%; font-size: 20px; cursor: pointer; line-height: 1; }
.drawer h2 { font-size: 22px; margin-right: 40px; }
.answers { list-style: none; padding: 0; margin: 0; }
.answers-h { margin: 16px 0 2px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tz-card p { margin: 0 0 8px; }
.tz-card .btn { margin-top: 4px; }
.answers li { padding: 10px 0; border-top: 1px solid var(--line-2); font-size: 13.5px; display: grid; gap: 3px; }
.answers .q { color: var(--muted); }
.answers .a { font-weight: 600; }
.answers .a.yes { color: #B42318; }
.section-title { font: 600 11px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 22px 0 8px; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 10px; font-size: 13.5px; z-index: 60; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); }
.mail { white-space: pre-wrap; font-size: 12.5px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-top: 8px; }
details.card summary { cursor: pointer; font-weight: 600; }
[data-mb] { margin-bottom: 10px; }
.nav-row { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* "New company" lives in the top bar; hide the older per-page duplicate */
.head-actions #new-co { display: none; }

/* Customer list (record list layout: view tabs, pill tools, sortable table, footer) */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.list-card { padding: 0; overflow: hidden; }
.view-tabs { display: flex; gap: 6px; padding: 14px 18px 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
.view-tabs button { display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; padding: 10px 14px; border-radius: 10px 10px 0 0; font: 600 13.5px/1 var(--body); color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.view-tabs button:hover { color: var(--ink); background: var(--bg); }
.view-tabs button.on { color: var(--ink); background: var(--paper-2); border-bottom-color: var(--red); }
.view-tabs .count { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 2px 7px; font-size: 11px; color: var(--muted); }
.list-tools { display: flex; flex-wrap: wrap; gap: 10px; padding: 16px 18px; }
.search-pill { width: min(320px, 100%); border-radius: 999px; }
.sort-pill { display: inline-flex; align-items: center; gap: 8px; padding: 0 6px 0 14px; border: 1px solid var(--line); border-radius: 999px; font: 600 13px/1 var(--body); color: var(--text); background: var(--surface); }
.sort-pill select { border: 0; padding: 9px 8px; width: auto; font-weight: 600; background: transparent; box-shadow: none; cursor: pointer; }
.sort-pill:focus-within { border-color: var(--red); box-shadow: 0 0 0 3px rgba(255, 7, 58, .12); }
.table-scroll { overflow-x: auto; }
.t-list th, .t-list td { padding: 14px 16px; }
.t-list th { border-top: 1px solid var(--line); background: #FAFBFC; }
.t-list td { border-bottom: 1px solid var(--line-2); }
.t-list .chk { width: 44px; padding-right: 0; }
.t-list .chk input { width: 18px; height: 18px; padding: 0; accent-color: var(--red); cursor: pointer; }
.t-list .act { width: 52px; text-align: right; }
.th-sort { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 0; font: 600 12.5px/1 var(--body); color: var(--muted); cursor: pointer; }
.th-sort:hover, .th-sort.on { color: var(--ink); }
.th-sort .arrow { color: var(--red); font-size: 13px; min-width: 8px; }
.t-list .num .th-sort { flex-direction: row-reverse; }
.t-list a { color: var(--red-ink); }
.t-list a:hover { text-decoration: underline; }
.logo-chip { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); overflow: hidden; flex-shrink: 0; }
.logo-chip img { width: 24px; height: 24px; object-fit: contain; }
.who-text { display: grid; }
.who-text b { font-weight: 600; color: var(--ink); }
.who-text small { font-size: 12px; color: var(--muted); }
.add-link { border: 0; background: none; padding: 0; font: 600 13px/1 var(--body); color: var(--red-ink); cursor: pointer; }
.add-link:hover { text-decoration: underline; }
.icon-btn-light { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; }
.icon-btn-light:hover { color: var(--ink); border-color: #D5D8DD; }
.t-list td .pill { margin-left: 6px; }
.empty-row { text-align: center; color: var(--muted); padding: 28px !important; }
.list-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--line); background: #FAFBFC; }
.count-pill { background: var(--paper-2); border-radius: 999px; padding: 8px 14px; font: 600 13px/1 var(--body); color: var(--ink); }
.list-foot .btn-ghost { border-radius: 999px; }
.field .hint { font-weight: 400; }

/* Corporate MRR card at the top of the dashboard */
.mrr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 28px; align-items: center; padding: 26px 28px; border-radius: 18px; color: #fff;
  background: radial-gradient(120% 140% at 0% 0%, rgba(255, 7, 58, .32) 0%, rgba(255, 7, 58, 0) 55%), var(--side); box-shadow: 0 10px 30px -12px rgba(11, 11, 12, .45); }
.mrr-main { display: grid; gap: 6px; }
.mrr-label { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, .7); }
.mrr-label .ic { color: var(--red); }
.mrr b { font: 700 clamp(36px, 4vw, 52px)/1.05 var(--display); letter-spacing: -.04em; }
.mrr b small { font-size: 16px; font-weight: 600; color: rgba(255, 255, 255, .6); margin-left: 4px; letter-spacing: 0; }
.mrr-sub { font-size: 13.5px; color: rgba(255, 255, 255, .7); }
.mrr-fix { margin-top: 6px; font-size: 12.5px; font-weight: 600; color: #FF6F8A; text-decoration: none; }
.mrr-fix:hover { text-decoration: underline; }
.mrr-split { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mrr-split li { display: grid; grid-template-columns: minmax(0, 150px) 1fr auto 40px; align-items: center; gap: 12px; font-size: 13px; }
.mrr-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: rgba(255, 255, 255, .85); }
.mrr-split svg { width: 100%; height: 6px; }
.mrr-split b { font: 600 13px/1 var(--body); letter-spacing: 0; font-variant-numeric: tabular-nums; }
.mrr-pct { text-align: right; color: rgba(255, 255, 255, .5); font-variant-numeric: tabular-nums; }
.mrr-split .mrr-empty { display: block; color: rgba(255, 255, 255, .55); font-size: 13px; line-height: 1.5; }
@media (max-width: 900px) { .mrr { grid-template-columns: 1fr; } }

.from-monthly { display: block; font-size: 11.5px; font-weight: 500; color: var(--muted); margin-top: 2px; }

.li-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 5px; font-size: 12px; font-weight: 600; color: #0A66C2 !important; text-decoration: none; width: fit-content; }
.li-link:hover { text-decoration: underline; }
.li-search { color: var(--muted) !important; font-weight: 500; }
.li-search .li-ic { opacity: .55; }
.li-ic { width: 14px; height: 14px; flex-shrink: 0; }

/* Upsells */
.mrr-upsells { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 10px; padding: 9px 12px; border-radius: 10px; background: rgba(255, 255, 255, .07); color: rgba(255, 255, 255, .75); font-size: 12.5px; text-decoration: none; width: fit-content; }
.mrr-upsells:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.mrr-upsells span { font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: .08em; font-size: 10.5px; margin-right: 4px; }
.mrr-upsells b { color: #fff; font: 700 12.5px/1 var(--body); letter-spacing: 0; }
.up-stats .kpi b small { font-size: 13px; color: var(--muted); font-weight: 600; margin-left: 2px; }
.plan-add { display: grid; grid-template-columns: minmax(0, 2fr) 120px 130px auto; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-2); }
@media (max-width: 760px) { .plan-add { grid-template-columns: 1fr 1fr; } .plan-add input[name="name"] { grid-column: 1 / -1; } }

/* ================================================================ Dark theme (default)
   Near-black page, slightly lighter sidebar, dark grey cards with subtle borders, red accent.
   Light theme applies when <html data-theme="light"> (toggle in the top bar). */
html:not([data-theme="light"]) {
  color-scheme: dark;
  --bg: #0B0B0B; --surface: #1A1A1A; --side: #121212; --side-2: #1A1A1A;
  --ink: #ECEDEE; --text: #D2D5D9; --muted: #959BA2; --faint: #6E747B;
  --line: #2C2C2C; --line-2: #242424; --paper-2: #262626; --mint: #262626;
  --red-ink: #FF4D6D; --red-soft: rgba(255, 7, 58, .14);
  --shadow: 0 1px 2px rgba(0, 0, 0, .35);
}
html:not([data-theme="light"]) .side { border-right: 1px solid var(--line-2); }
html:not([data-theme="light"]) .topbar { background: rgba(11, 11, 11, .85); }
html:not([data-theme="light"]) .t th, html:not([data-theme="light"]) .t-list th, html:not([data-theme="light"]) .list-foot { background: #161616; }
html:not([data-theme="light"]) .t tbody tr:hover td { background: #212121; }
html:not([data-theme="light"]) a.stat:hover, html:not([data-theme="light"]) .btn-ghost:hover, html:not([data-theme="light"]) .icon-btn-light:hover { border-color: #3A3A3A; }
html:not([data-theme="light"]) .btn-ghost:hover { background: #222; }
html:not([data-theme="light"]) .pill-green { background: rgba(34, 197, 94, .14); color: #4ADE80; }
html:not([data-theme="light"]) .pill-amber { background: rgba(245, 158, 11, .14); color: #FBBF24; }
html:not([data-theme="light"]) .pill-red { background: rgba(255, 7, 58, .16); color: #FF6F8A; }
html:not([data-theme="light"]) .pill-dark { background: #ECEDEE; color: #111; }
html:not([data-theme="light"]) .notice { background: rgba(245, 158, 11, .08); border-color: rgba(245, 158, 11, .25); color: #FBBF24; }
html:not([data-theme="light"]) .kpi.dark, html:not([data-theme="light"]) .btn-dark { background: #262626; border-color: #262626; }
html:not([data-theme="light"]) .logo-chip { background: #0B0B0B; box-shadow: inset 0 0 0 1px var(--line); }
html:not([data-theme="light"]) .toast { background: #ECEDEE; color: #111; }
html:not([data-theme="light"]) .stat-alert { border-color: rgba(255, 7, 58, .45); }
html:not([data-theme="light"]) .btn-danger { background: transparent; border-color: rgba(255, 7, 58, .45); color: #FF6F8A; }
html:not([data-theme="light"]) .btn-danger:hover { background: var(--red-soft); }
html:not([data-theme="light"]) .seg button.on { background: #2E2E2E; }
html:not([data-theme="light"]) .col { background: #141414; border: 1px solid var(--line-2); }
html:not([data-theme="light"]) .choices span { background: var(--surface); border-color: var(--line); }
html:not([data-theme="light"]) .choices input:checked + span { background: #ECEDEE; border-color: #ECEDEE; color: #111; }
html:not([data-theme="light"]) .person-chip.attended { background: rgba(34, 197, 94, .14); }
html:not([data-theme="light"]) .person-chip.no_show { background: rgba(255, 7, 58, .14); }
html:not([data-theme="light"]) .mrr { box-shadow: inset 0 0 0 1px var(--line); }
html:not([data-theme="light"]) .li-link { color: #5AA2EE !important; }
html:not([data-theme="light"]) .login { background: #000; }
html:not([data-theme="light"]) .login-logo { content: url("/shared/logo-white.png"); }
html:not([data-theme="light"]) .dot.red { background: #FF6F8A; } html:not([data-theme="light"]) .dot.amber { background: #FBBF24; } html:not([data-theme="light"]) .dot.green { background: #4ADE80; }
html:not([data-theme="light"]) .answers .a.yes { color: #FF6F8A; }
html:not([data-theme="light"]) .trend.up { color: #4ADE80; }
html:not([data-theme="light"]) .alert-error { background: rgba(255, 7, 58, .14); color: #FF6F8A; }
html:not([data-theme="light"]) .alert-ok { background: rgba(34, 197, 94, .14); color: #4ADE80; }
html:not([data-theme="light"]) .alert-warn { background: rgba(245, 158, 11, .12); color: #FBBF24; }

/* Theme toggle */
.theme-btn { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; }
.theme-btn:hover { color: var(--ink); }
.theme-btn .moon { display: none; }
html[data-theme="light"] .theme-btn .sun { display: none; }
html[data-theme="light"] .theme-btn .moon { display: block; }

/* ================================================================ Type scale matched to the reference dashboard
   14px base · 24px page titles and stat figures · 16px card titles · 12px labels, buttons, table headers and chart text */
body { font-size: 14px; line-height: 1.43; }
.head h1 { font-size: 24px; line-height: 32px; font-weight: 700; }
.head .sub { font-size: 14px; line-height: 20px; }
.side-nav a { font-size: 14px; font-weight: 500; }
.side-label { font-size: 10px; letter-spacing: 1px; }
.side-user-text b { font-size: 14px; } .side-user-text small { font-size: 12px; }
.btn { font-size: 13px; } .btn-sm { font-size: 12px; font-weight: 500; }
.search input { font-size: 13px; }
input, select, textarea { font-size: 13px; }
.card h2 { font-size: 16px; line-height: 24px; font-weight: 600; }
.card-sub { font-size: 12px; line-height: 16px; }
.view-all { font-size: 12px; }
.seg button { font-size: 12px; font-weight: 500; }
.stat-label { font-size: 12px; line-height: 16px; }
.stat b { font-size: 24px; line-height: 32px; }
.stat b small { font-size: 12px; }
.trend { font-size: 12px; }
.kpi b { font-size: 24px; line-height: 32px; } .kpi span { font-size: 12px; }
.axis { font-size: 12px; } .axis-dark { font-size: 12px; }
.legend li { font-size: 12px; }
.t, table.t { font-size: 12px; }
.t th, .th-sort { font-size: 12px; font-weight: 500; }
.t td { font-size: 12px; }
.t a, .who-text b { font-size: 14px; font-weight: 500; }
.who small, .who-text small { font-size: 12px; }
.pill { font-size: 11px; font-weight: 500; }
.list li { font-size: 13px; } .list .meta { font-size: 12px; }
.empty-s { font-size: 13px; }
.view-tabs button, .tabs a { font-size: 13px; }
.count-pill, .sort-pill, .add-link { font-size: 12px; }
.mrr b { font-size: clamp(30px, 3vw, 40px); }
.mrr-label, .mrr-sub, .mrr-split li, .mrr-split b { font-size: 12px; }
.drawer h2 { font-size: 18px; }
.field > label { font-size: 13px; }
.dl, .timeline li, .slot-row, .answers li { font-size: 13px; }
.notice { font-size: 12px; }
.mrr .mrr-upsells b { font-size: 12px; line-height: 1; }

/* Client reports sub-tab */
.side-nav a.side-sub { padding-left: 24px; font-size: 13px; }
.side-nav a.side-sub .ic { width: 16px; height: 16px; }
.seg-link { display: inline-block; padding: 7px 12px; border-radius: 7px; font: 500 12px/1 var(--body); color: var(--muted); text-decoration: none; white-space: nowrap; }
.seg-link:hover { color: var(--ink); }
.seg-link.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
html:not([data-theme="light"]) .seg-link.on { background: #2E2E2E; }
.report-frame { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.report-frame iframe { display: block; width: 100%; height: calc(100vh - 210px); min-height: 640px; border: 0; }
.report-link { font-size: 11.5px; font-weight: 600; color: var(--muted) !important; text-decoration: none; margin-top: 2px; }
.report-link:hover { color: var(--red-ink) !important; }
@media (max-width: 900px) { .report-frame iframe { height: 80vh; } }

/* New leads */
.nav-count { margin-left: auto; min-width: 20px; padding: 2px 7px; border-radius: 999px; background: #FF073A; color: #fff; font-size: 11px; font-weight: 700; text-align: center; line-height: 16px; }
tr.clickable { cursor: pointer; }
.wrap-cell { max-width: 260px; white-space: normal; }
.lead-contact { display: grid; gap: 2px; margin: 10px 0 4px; }
.lead-links { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 13px; }
.lead-actions { flex-wrap: wrap; gap: 8px; justify-content: flex-start; }

/* Finance (layout after the Apex finance dashboard) */
.crumbs-crm { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.crumbs-crm a { color: var(--muted); text-decoration: none; } .crumbs-crm a:hover { color: var(--ink); }
.crumbs-crm b { color: var(--ink); font-weight: 500; }
.fin-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
.fin-kpi { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; box-shadow: var(--shadow); }
.fin-kpi-l { display: block; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.fin-kpi b { display: block; font: 700 27px/1.1 var(--display); letter-spacing: -.03em; color: var(--ink); font-variation-settings: normal; margin-bottom: 10px; }
.fin-kpi small { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }
.fin-ic { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; }
.fin-ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fin-ic.green { background: rgba(5,145,80,.14); color: #11A764; } .fin-ic.teal { background: rgba(20,170,170,.14); color: #1BB3B3; }
.fin-ic.amber { background: rgba(230,160,30,.16); color: #E0A11B; } .fin-ic.blue { background: rgba(30,127,219,.14); color: #3B91E6; }
.fin-trend { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; }
.fin-trend svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.fin-trend .muted { font-weight: 400; }
.fin-trend.good { color: #12A15A; } .fin-trend.bad { color: #E5383B; }
.fin-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; margin-bottom: 18px; }
.fin-row-b { grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); }
.fin-card { padding: 24px 26px; border-radius: 16px; }
.fin-card h2 { font-size: 18px; margin: 0 0 4px; }
.fin-card .card-sub { margin: 0 0 16px; }
.fin-chart { width: 100%; height: auto; display: block; }
.fin-chart .ch-l { font-size: 14px; fill: var(--muted); }
.fin-legend { display: flex; gap: 16px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.fin-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.lg-g { background: #059150; } .lg-b { background: #1E7FDB; } .lg-l { background: #A259C7; height: 3px !important; vertical-align: 2px !important; }
.fin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.fin-table th { text-align: left; font-weight: 500; color: var(--muted); font-size: 13px; padding: 8px 0 12px; border-bottom: 1px solid var(--line); }
.fin-table td { padding: 15px 12px 15px 0; border-bottom: 1px solid var(--line-2, var(--line)); }
.fin-table tr:last-child td { border-bottom: 0; }
.fin-table .num { text-align: right; padding-right: 28px; }
.fin-table .r { text-align: right; padding-right: 0; }
.fin-table a { color: inherit; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; }
.mono .sans { font-family: var(--body); }
.fin-late { color: #E5383B; }
.fin-badge { display: inline-block; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.fin-badge.red { background: #E11D2E; color: #fff; } .fin-badge.amber { background: #F5A70B; color: #1a1a1a; } .fin-badge.green { background: #0E8A43; color: #fff; }
.fin-aging { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.fin-aging li > div { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 8px; }
.fin-aging b { font-weight: 700; }
.fin-bar { display: block; width: 100%; height: 6px; }
.fin-track { fill: var(--line); }
.fin-connect ol { padding-left: 20px; display: grid; gap: 10px; margin: 14px 0; }
.fin-connect code { font-size: 12px; }
@media (max-width: 1100px) { .fin-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fin-row, .fin-row-b { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .fin-kpis { grid-template-columns: minmax(0, 1fr); } }
/* Finance-only accounts: hide everything else */
body.role-finance .side-nav:not([data-finance-nav]), body.role-finance .side-label:not([data-finance-nav]), body.role-finance #top-search, body.role-finance #top-new { display: none; }

/* ----------------------------------------------------------------- pilot */
.pilot-add { display: grid; grid-template-columns: 150px minmax(0, 1.4fr) 120px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
@media (max-width: 900px) { .pilot-add { grid-template-columns: 1fr 1fr; } }
.pilot-t td { vertical-align: top; }
.pilot-t tbody tr { cursor: default; }
.pilot-comments { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.pilot-comments .check { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 13.5px; }
.pilot-comments .check input { margin-top: 3px; }

/* HR report: always a white "paper" sheet, in either theme, and the only thing that prints */
.report-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.pilot-report {
  --ink: #111214; --text: #2B3036; --muted: #62676C; --surface: #fff; --line: #E4E6EA; --line-2: #EEF0F2; --paper-2: #F1F2F4; --bg: #F6F7F8;
  max-width: 900px; margin: 0 auto; padding: 44px 48px; background: #fff; color: var(--text); border-radius: var(--radius); box-shadow: var(--shadow);
}
.pilot-report h1, .pilot-report h2 { color: var(--ink); }
.pilot-report .kpi { box-shadow: none; background: var(--bg); border-color: var(--line-2); }
.pilot-report .t td, .pilot-report .t th { background: transparent; }
.pr-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding-bottom: 22px; margin-bottom: 22px; border-bottom: 2px solid var(--ink); }
.pr-head h1 { font-size: 30px; margin: 4px 0; }
.pr-head > div { text-align: right; }
.pr-logo { height: 40px; width: auto; }
.pr-kicker { font: 700 11px/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--red); margin: 0; }
.pr-sec { margin-top: 30px; }
.pr-sec h2 { font-size: 17px; margin: 0 0 10px; }
.pr-wants { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 24px; }
.pr-wants li { display: flex; justify-content: space-between; border-bottom: 1px solid var(--line-2); padding: 6px 0; }
.pr-quote { margin: 0 0 10px; padding: 12px 16px; border-left: 3px solid var(--red); background: var(--bg); border-radius: 0 10px 10px 0; font-style: italic; }
.pr-foot { margin-top: 34px; font-size: 11.5px; color: var(--muted); }
@media print {
  @page { margin: 14mm; }
  body * { visibility: hidden; }
  .pilot-report, .pilot-report * { visibility: visible; }
  .pilot-report { position: absolute; inset: 0 auto auto 0; width: 100%; max-width: none; padding: 0; box-shadow: none; }
  .pr-sec, .pilot-report .grid { break-inside: avoid; }
}
/* keep the report sheet light in the dark theme too */
html .pilot-report .t th { background: transparent; color: var(--muted); }
html .pilot-report .t tbody tr:hover td { background: transparent; }
html .pilot-report .pill-green { background: #E8F5EE; color: #1F6B43; }
html .pilot-report .pill-red { background: #FDE8EC; color: #B0062B; }
.pilot-t td:first-child { min-width: 220px; }
.parq-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; }
/* Onboarding progress: 2/3 after the intake form, 3/3 after the first workout */
.onb { display: inline-flex; align-items: center; gap: 8px; }
.onb svg { width: 60px; height: 6px; }
.onb .onb-track { fill: var(--paper-2); }
.onb .onb-fill { fill: var(--red); }
.onb b { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.onb-done .onb-fill { fill: #1F9D57; }
.onb-done b { color: #1F9D57; }
[data-mt-s] { margin-top: 8px; }

/* 1-1 check-ins */
.flag-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.flag-list li { display: grid; gap: 2px; padding: 10px 12px 10px 14px; border-radius: 10px; background: var(--bg); box-shadow: inset 3px 0 0 #f0b429; }
.flag-list li.red { box-shadow: inset 3px 0 0 var(--red); }
.flag-list li span { font-size: 13px; color: var(--muted); }
.commit-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.commit-list li { display: flex; justify-content: space-between; gap: 12px; align-items: center; font-size: 13.5px; }
.inline-form { display: flex; gap: 8px; }
.inline-form input { flex: 1; }
.check-inline { display: flex; align-items: center; gap: 8px; margin: 8px 0 10px; font-size: 13px; }
.chart-gap { height: 10px; }
.crumb { margin: 0 0 6px; font-size: 13px; }
.crumb a { color: var(--muted); }
.check-inline input { width: auto; margin: 0; flex: none; }
.kpi .pill { font-size: 13px; }
.side-nav a.side-sub2 { padding-left: 40px; font-size: 12.5px; }
.side-nav a.side-sub2 .ic { width: 12px; height: 12px; }
.side-nav a.side-toggle .chev { margin-left: auto; width: 14px; height: 14px; transition: transform .2s; }
.side-nav a.side-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }
.side-drop { display: flex; flex-direction: column; gap: 2px; }
.side-drop[hidden] { display: none; }

/* Big Collective Challenge */
.bonus-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.bonus-card { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--bg); }
.bonus-card img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.bonus-card p { margin: 10px 12px 0; font-size: 13px; }
.bonus-card .nav-row { padding: 10px 12px 12px; gap: 6px; }
.ch-board { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: ch; }
.ch-board li { display: grid; grid-template-columns: 1fr 120px 48px; gap: 12px; align-items: center; font-size: 13.5px; counter-increment: ch; }
.ch-board li::before { content: counter(ch); display: none; }
.ch-board li b { text-align: right; font-size: 15px; }
.ch-bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.ch-bar i { display: block; height: 100%; border-radius: 3px; background: var(--red); }

/* Meal log in the coach view */
.meal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.meal-card { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--bg); }
.meal-card img, .meal-nophoto { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.meal-nophoto { display: grid; place-items: center; color: var(--muted); font-size: 12px; background: var(--surface); }
.meal-card p { margin: 8px 10px 10px; font-size: 12.5px; }

/* One-off fees in the customer drawer */
.fee-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.fee-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 13.5px; }
.fee-list li small { display: block; color: var(--muted); margin-top: 2px; }
.fee-list li.muted { border-style: dashed; }
#ce-fee-add .check { display: flex; gap: 8px; align-items: center; font-size: 13.5px; margin: 4px 0 12px; }

/* Dashboard: red flags to contact */
.rf-table tbody tr { cursor: pointer; }
.rf-table tbody tr:hover, .rf-table tbody tr:focus-visible { background: var(--red-soft); outline: none; }
.rf-table .rf-out small { display: block; margin-top: 4px; font-size: 11.5px; }
.rf-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.rf-stats .kpi { box-shadow: none; }
.rf-stats .kpi b small { font-size: 13px; color: var(--muted); font-weight: 600; margin-left: 2px; }
.rf-card .dl { margin-bottom: 12px; }

/* The Collective: tier lists and the one-page profile */
.coll-table tbody tr { cursor: pointer; }
.coll-table tbody tr:hover, .coll-table tbody tr:focus-visible { background: var(--bg); outline: none; }
.coll-table td small { display: block; margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.coll-table td small.muted { display: inline; }
.pills-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.person-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
@media (max-width: 1100px) { .person-grid { grid-template-columns: 1fr; } }
.snap-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.snap-kpis .kpi { box-shadow: none; }
.snap-kpis .kpi b { font-size: 20px; }
.snap-kpis .kpi b small { font-size: 12px; color: var(--muted); font-weight: 600; margin-left: 2px; }
.snap-kpis .kpi span .pill { margin-left: 4px; }
.snap-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.snap-list li { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 13.5px; }
.snap-list li > span { flex: 1; min-width: 0; }
.snap-list li small { display: block; color: var(--muted); margin-top: 2px; line-height: 1.45; }
.lv-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; background: var(--muted); }
.lv-dot.red { background: #E5484D; } .lv-dot.amber { background: #E2A336; } .lv-dot.green { background: #30A46C; }
.snap-history summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.journey { list-style: none; margin: 0; padding: 0; }
.journey li { display: grid; grid-template-columns: 104px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-2); font-size: 13.5px; }
.journey li:first-child { border-top: 0; }
.journey .tl-date { color: var(--muted); font-size: 12.5px; padding-top: 1px; }
.journey small { display: block; color: var(--muted); margin-top: 2px; }
.okline { color: #1F6B43; }

/* Movement screen: client videos on the person profile */
.screen-req { margin-bottom: 6px; }
.screen-req .section-title { margin-top: 4px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; }

/* Class passes */
.pass-bar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 10px; align-items: center; }
.pass-inline { display: grid; grid-template-columns: 160px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
#ps-open.pass-inline { grid-template-columns: minmax(0, 1fr) auto; }
.pass-walkin { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pass-walkin input[type="email"], .pass-walkin select { grid-column: span 2; }
.pass-list li { gap: 10px; }
.pass-search { max-width: 280px; }
#pc-q { width: 100%; }
@media (max-width: 900px) { .pass-bar { grid-template-columns: 1fr; } }
.pass-grid > *, .pass-grid .grid > * { min-width: 0; }
.pass-scroll { overflow-x: auto; }
.pass-scroll .t { min-width: 760px; }

/* Blood test review and nutrition library */
.bl-table td { vertical-align: top; }
.bl-table input, .bl-table select, .bl-table textarea { width: 100%; padding: 7px 9px; font-size: 13px; }
.bl-table td:first-child { min-width: 170px; } .bl-table td:first-child select { margin-top: 6px; color: var(--muted); }
.bl-table td:nth-child(6) { min-width: 260px; }
.bl-table .w-num { width: 74px; } .bl-table .w-unit { width: 84px; }
.bl-table .nowrap { white-space: nowrap; } .bl-table .nowrap input { display: inline-block; }
.bl-item { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-bottom: 12px; }
.bl-item textarea { grid-column: 1; } .bl-item [data-x] { grid-row: 1; grid-column: 2; }
.lib-row { padding: 14px 0; border-top: 1px solid var(--line-2); } .lib-row:first-of-type { border-top: 0; }
.lib-row h3 { margin: 0 0 4px; font: 700 15px var(--display); }
.lib-box textarea, .lib-box input, #b-msg { width: 100%; }
.lib-box input { margin-top: 6px; font-size: 13px; }

/* Staff accounts: no company search or "New company", no deleting */
body.role-staff #top-search, body.role-staff #top-new, body.role-staff #erase, body.role-staff [data-del-screen], body.role-staff [data-plan-del] { display: none; }

/* Finance: subscriptions and one-off payments sections */
.fin-sec-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 18px 18px 12px; }
.fin-sec-head h2 { margin: 0; font-size: 16px; }
.fin-sec-head .card-sub { margin: 4px 0 0; }
.at-seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 10px; background: var(--paper-2); }
.at-seg button { border: 0; background: transparent; padding: 7px 12px; border-radius: 8px; font: 600 13px/1 var(--body); color: var(--muted); cursor: pointer; }
.at-seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* Intake Form: the form link, ready to copy */
.form-link { margin: -6px 0 18px; }
.form-link span { font: 500 13px/1.4 var(--body); color: var(--muted); word-break: break-all; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Intake answers: a branded card per section, easy to scan */
.ans-cards { display: grid; gap: 12px; margin-top: 10px; }
.ans-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px 6px; }
.ans-card header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.ans-card h3 { margin: 0; flex: 1; font: 800 13px/1.2 var(--display); letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.ans-dashes { display: flex; gap: 4px; }
.ans-dashes i { width: 12px; height: 4px; border-radius: 99px; background: var(--red); }
.ans-n { font: 700 11px/1 var(--body); color: var(--faint); background: var(--paper-2); border-radius: 99px; padding: 4px 8px; }
.ans-card dl { margin: 0; }
.ans-row { padding: 11px 0; border-top: 1px solid var(--line-2); }
.ans-row dt { font-size: 12.5px; line-height: 1.4; color: var(--muted); margin-bottom: 5px; }
.ans-row dd { margin: 0; }
.ans-val, .ans-plain { font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.ans-plain { font-weight: 500; color: var(--text); }
.ans-text { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--paper-2); font-size: 14px; line-height: 1.5; color: var(--ink); white-space: pre-wrap; }
.ans-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ans-tag { padding: 5px 10px; border-radius: 99px; background: var(--paper-2); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--ink); }
.ans-score { display: flex; align-items: center; gap: 6px; }
.ans-score b { font: 800 20px/1 var(--display); color: var(--ink); }
.ans-score small { font-size: 12px; color: var(--muted); }
.ans-bar { width: 120px; height: 6px; margin-left: 8px; }
.ans-bar .track { fill: var(--paper-2); } .ans-bar .fill { fill: var(--red); }
.ans-flag { display: inline-block; padding: 4px 12px; border-radius: 99px; background: var(--red-soft); color: var(--red-ink); font-weight: 800; font-size: 13px; }
.ans-row.is-flag dt { color: var(--ink); font-weight: 600; }
html:not([data-theme="light"]) .ans-card { background: #1F1F21; border-color: #2E2E31; }
html:not([data-theme="light"]) .ans-text, html:not([data-theme="light"]) .ans-tag, html:not([data-theme="light"]) .ans-n { background: #2A2A2D; }
html:not([data-theme="light"]) .ans-bar .track { fill: #333337; }
html:not([data-theme="light"]) .ans-row dt { color: #A3A8AE; }

/* Home dashboard (10 Nov 2026) */
.home-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.home-kpi { display: block; padding: 20px 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); text-decoration: none; color: var(--text); }
.home-kpi:hover { border-color: var(--faint); }
.home-k { font: 600 11px/1 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.home-kpi b { display: flex; align-items: baseline; gap: 10px; margin: 10px 0 6px; font: 800 38px/1 var(--display); letter-spacing: -.04em; color: var(--ink); }
.home-kpi b em { font: 600 12px/1 var(--body); font-style: normal; letter-spacing: 0; color: var(--muted); }
.home-kpi small { font-size: 13px; color: var(--muted); }
.home-kpi.is-red { background: var(--red); border-color: var(--red); }
.home-kpi.is-red .home-k, .home-kpi.is-red small, .home-kpi.is-red b em { color: rgba(255, 255, 255, .8); }
.home-kpi.is-red b { color: #fff; }
.home-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.home-list, .home-pipe, .home-fin { padding: 0; overflow: hidden; }
.home-two header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.home-two header h2 { margin: 0; font-size: 16px; }
.home-two header p { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }
.home-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.home-legend { display: inline-flex; gap: 6px; align-items: center; margin-left: 4px; }
.home-legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-left: 4px; }
.home-two ul { list-style: none; margin: 0; padding: 4px 0; max-height: 420px; overflow-y: auto; }
.home-list li, .home-fin li { display: flex; align-items: center; gap: 12px; padding: 11px 20px; border-bottom: 1px solid var(--line-2); }
.home-list li[data-member] { cursor: pointer; }
.home-list li[data-member]:hover { background: var(--paper-2); }
.home-two li:last-child { border-bottom: 0; }
.home-dot, .home-legend i { flex-shrink: 0; width: 12px; height: 12px; border-radius: 50%; }
.home-dot.g, .home-legend .g { background: #1f9d55; } .home-dot.a, .home-legend .a { background: #e8a317; } .home-dot.r, .home-legend .r { background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.home-who { flex: 1; min-width: 0; display: grid; }
.home-who b { color: var(--ink); font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-who small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-when { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.home-when.late { color: var(--red-ink); font-weight: 700; }
.home-empty { color: var(--muted); font-size: 13px; justify-content: center; }
.home-pipe ul { padding: 10px 20px 16px; display: grid; gap: 10px; }
.home-pipe li { display: grid; grid-template-columns: 130px 1fr 32px; gap: 12px; align-items: center; font-size: 13px; }
.home-pipe li b { text-align: right; color: var(--ink); }
.home-pipe svg { width: 100%; height: 8px; }
.home-pipe .track { fill: var(--paper-2); } .home-pipe .fill { fill: var(--faint); } .home-pipe .fill.on { fill: var(--red); }
.home-pipe > p, .home-fin > p { padding: 0 20px 14px; margin: 0; }
.home-fin > p.muted { padding-top: 16px; }
.home-fin-kpis { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
.home-fin-kpis div { padding: 14px 20px; display: grid; gap: 2px; }
.home-fin-kpis div + div { border-left: 1px solid var(--line-2); }
.home-fin-kpis span { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.home-fin-kpis b { font: 800 20px/1.2 var(--display); color: var(--ink); }
.home-fin-kpis .late b { color: var(--red-ink); }
.home-fin-kpis small { font-size: 12px; color: var(--muted); }
.home-amt { font-weight: 700; color: var(--ink); white-space: nowrap; }
.home-btns { display: flex; gap: 6px; align-items: center; }
.home-sent { font-size: 12px; color: var(--muted); white-space: nowrap; }
@media (max-width: 1100px) { .home-two { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
  .home-kpis { grid-template-columns: 1fr; }
  .home-two ul { max-height: none; }
  .home-kpi b { font-size: 32px; }
  .home-list li, .home-fin li { flex-wrap: wrap; padding: 12px 16px; }
  .home-list li .home-who, .home-fin li .home-who { flex: 1 1 calc(100% - 40px); }
  .home-list li .home-when, .home-fin li .home-when { margin-left: 24px; flex: 1; }
  .home-fin li .home-amt { margin-left: auto; }
  .home-pipe li { grid-template-columns: 110px 1fr 28px; }
  .home-fin-kpis { grid-template-columns: 1fr; }
  .home-fin-kpis div + div { border-left: 0; border-top: 1px solid var(--line-2); }
}

/* Dashboard: website card (Google Analytics) */
.home-web { padding: 0; overflow: hidden; }
.home-web header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.home-web header h2 { margin: 0; font-size: 16px; }
.home-web header p { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }
.home-web .late { color: var(--red-ink); }
.home-fin-kpis small.up { color: #1f9d55; } .home-fin-kpis small.down { color: var(--red-ink); }
.home-web-chart { padding: 18px 20px 6px; }
.home-web-chart svg { width: 100%; height: 110px; display: block; fill: var(--red); }
.home-web-axis { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.home-web-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--line); }
.home-web-cols > div { padding: 16px 20px 18px; }
.home-web-cols > div + div { border-left: 1px solid var(--line-2); }
.home-web-cols h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 10px; }
.home-web-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.home-web-list li { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; }
.home-web-list span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.home-web-list b { color: var(--ink); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
@media (max-width: 700px) { .home-web-cols { grid-template-columns: 1fr; } .home-web-cols > div + div { border-left: 0; border-top: 1px solid var(--line-2); } }
