/* BUD Lead Finder. Bootstrap 5.3 plus these overrides.
   The look: one pale frame holds the menu and the top bar; each page sits on a white sheet.
   Colour goes on data (tracks, bars, the selected tab) and status, not on the chrome.
   Every colour pair used for text meets WCAG 2.2 AA (4.5:1). Change colours here only, in :root. */
:root {
  /* Surfaces */
  --frame: #f3f5f9;          /* the menu and top bar, a blue-grey step from Blue Unicorn's blue */
  --sheet: #ffffff;          /* the page */
  --raised: #f5f7fa;         /* wells and quiet panels inside the page */
  --active: #e6e9f0;         /* the selected menu item */
  --border: #e6e9ee;         /* card edges */
  --rule: #eff1f4;           /* row lines in tables and lists */
  --control: #cdd1d8;        /* input and button edges */
  /* Text */
  --text: #131416;
  --muted: #5b5f66;
  /* Brand and status */
  --brand: #2347c5;          /* Blue Unicorn blue: links, tracks, bars, the selected tab */
  --brand-dark: #1b3a9f;
  --brand-tint: #e9eefc;
  --primary: #16181d;        /* the one filled button per screen */
  --positive: #1e7b4f;
  --negative: #c4242a;
  --pill-positive-bg: #dcfae5; --pill-positive-ink: #04250e;
  --pill-negative-bg: #ffedea; --pill-negative-ink: #831c1e;
  --pill-warning-bg: #fff6dc; --pill-warning-ink: #7a3a0b;
  --pill-info-bg: #e9eefc;     --pill-info-ink: #1b2f78;
  --pill-hold-bg: #e3f2fb;     --pill-hold-ink: #0c4a6e;
  --pill-neutral-bg: #eceef1;  --pill-neutral-ink: #34373c;
  /* Shape and spacing */
  --radius-sheet: 16px;
  --radius-card: 10px;
  --radius-control: 7px;
  --sidebar-width: 236px;
  --topbar-height: 56px;
  --gap: 20px;
  --pad: 32px;
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  /* Bootstrap's own variables, pointed at the tokens above */
  --bs-body-font-family: var(--font);
  --bs-body-font-size: 14px;
  --bs-body-line-height: 1.5;
  --bs-body-bg: var(--sheet);
  --bs-body-color: var(--text);
  --bs-border-color: var(--border);
  --bs-secondary-color: var(--muted);
  --bs-link-color: var(--brand);
  --bs-link-color-rgb: 35, 71, 197;
  --bs-link-hover-color: var(--brand-dark);
  --bs-link-hover-color-rgb: 27, 58, 159;
  --bs-primary: #2347c5;
  --bs-primary-rgb: 35, 71, 197;
  --bs-border-radius: var(--radius-control);
  --bs-focus-ring-color: rgba(35, 71, 197, .35);
}

/* ---------- Base ---------- */
body { font-family: var(--font); font-size: 14px; color: var(--text); background: var(--frame); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { font-family: var(--font); color: var(--text); letter-spacing: -.01em; }
h1, .h1 { font-size: 24px; font-weight: 600; line-height: 1.25; margin: 0; }
h2, .h2 { font-size: 16px; font-weight: 600; margin-bottom: 12px; }
h3, .h3 { font-size: 14px; font-weight: 600; }
a { text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
.text-secondary { color: var(--muted) !important; }
.text-primary { color: var(--brand) !important; }
.text-danger { color: var(--negative) !important; }
.text-break { overflow-wrap: anywhere; word-break: normal; }
.small, small { font-size: 12.5px; }
code, kbd, .user-select-all { font-family: var(--font-mono); font-size: 12.5px; }
code { color: var(--text); background: var(--raised); padding: 1px 5px; border-radius: 4px; }
.num, .table td, .kpi-value { font-variant-numeric: tabular-nums; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.btn:focus-visible { box-shadow: none; outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- Shell: menu + top bar on the frame, page on a white sheet ---------- */
.app-frame { min-height: 100vh; }
.sidebar { --bs-offcanvas-width: 280px; --bs-offcanvas-bg: var(--frame); color: var(--text); }
.sidebar-inner { display: flex; flex-direction: column; height: 100%; padding: 14px 12px 12px; overflow-y: auto; }
.app-main { min-width: 0; display: flex; flex-direction: column; }
@media (min-width: 992px) {
  .app-frame { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
  .sidebar.offcanvas-lg { position: sticky; top: 0; height: 100vh; background: var(--frame) !important; }
  .app-main { padding: 0 8px 8px 0; min-height: 100vh; }
}

.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-weight: 600; font-size: 15px; }
.brand-scope { font-size: 12px; color: var(--muted); }

.icon { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.nav-group + .nav-group { margin-top: 18px; }
.nav-group-label { font-size: 12px; color: var(--muted); padding: 0 10px 6px; }
.sidebar .nav-link { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; margin-bottom: 1px; border-radius: 8px; color: #3b3f46; font-size: 14px; }
.sidebar .nav-link .icon { color: #6b7079; }
.sidebar .nav-link:hover { background: rgba(19, 20, 22, .045); color: var(--text); text-decoration: none; }
.sidebar .nav-link.active { background: var(--active); color: var(--text); font-weight: 500; }
.sidebar .nav-link.active .icon { color: var(--brand); }
.nav-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-count { flex: none; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--sheet); border: 1px solid var(--border); font-size: 12px; font-weight: 500; line-height: 18px; text-align: center; color: var(--text); font-variant-numeric: tabular-nums; }
.nav-count-danger { background: var(--pill-negative-bg); border-color: transparent; color: var(--pill-negative-ink); }
.sidebar-foot { margin-top: auto; padding-top: 16px; }
.account { display: flex; align-items: center; gap: 10px; padding: 10px 10px 2px; margin-top: 8px; border-top: 1px solid var(--border); }
.account-initial { width: 26px; height: 26px; flex: none; border-radius: 50%; background: var(--brand-tint); color: var(--brand-dark); font-size: 12px; font-weight: 600; display: grid; place-items: center; }
.account-email { font-size: 12.5px; color: var(--muted); min-width: 0; }
.sign-out { padding: 2px 10px 0 46px; font-size: 12.5px; color: var(--muted); text-decoration: none; }
.sign-out:hover { color: var(--text); text-decoration: underline; }

.app-topbar { height: var(--topbar-height); display: flex; align-items: center; gap: 12px; padding: 0 4px; position: sticky; top: 0; z-index: 1020; background: var(--frame); }
.topbar-brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; color: var(--text); }
.topbar-brand:hover { text-decoration: none; }
.topbar-brand .brand-mark { width: 24px; height: 24px; }
.topbar-search { position: relative; width: min(460px, 100%); margin-left: auto; margin-right: auto; }
.topbar-search .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 15px; height: 15px; }
.topbar-search .form-control { height: 36px; padding-left: 34px; background: var(--sheet); border-color: var(--border); }
.btn-icon { width: 36px; height: 36px; padding: 0; display: inline-grid; place-items: center; border-radius: var(--radius-control); color: var(--text); }
.btn-icon:hover { background: rgba(19, 20, 22, .06); }

.sheet { flex: 1; background: var(--sheet); padding: 28px var(--pad) 48px; min-width: 0; }
@media (min-width: 992px) {
  .sheet { border: 1px solid var(--border); border-radius: var(--radius-sheet); }
  .sheet > * { max-width: 1320px; }
}
@media (max-width: 991.98px) {
  .app-topbar { padding: 0 12px; border-bottom: 1px solid var(--border); }
  .topbar-search { display: none; }
  .sheet { padding: 20px 16px 40px; }
}

/* ---------- Page title row ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head > * { min-width: 0; }
.page-head > .text-secondary { font-size: 14px; }
.page-sub { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.count { font-size: 14px; font-weight: 500; color: var(--muted); margin-left: 4px; font-variant-numeric: tabular-nums; vertical-align: 2px; }
h2 .count { font-size: 13px; vertical-align: 1px; }

/* ---------- Panels and cards ---------- */
.panel, .card-block { background: var(--sheet); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 20px; }
.panel.p-0 { padding: 0; overflow: hidden; }
.panel > h2:last-child, .panel > p:last-child { margin-bottom: 0; }
.panel > h2:first-child { margin-bottom: 14px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.card-head h2 { margin: 0; }
.card-meta { font-size: 12.5px; color: var(--muted); }
.card-foot { margin: 12px 0 0; font-size: 12.5px; color: var(--muted); }
.empty-line { margin: 0; padding: 10px 12px; color: var(--muted); border: 1px dashed var(--control); border-radius: 8px; font-size: 13px; }
dl.details { display: grid; grid-template-columns: minmax(110px, 34%) 1fr; gap: 0 16px; }
dl.details dt { font-weight: 400; color: var(--muted); padding: 8px 0; border-bottom: 1px solid var(--rule); }
dl.details dd { margin: 0; padding: 8px 0; border-bottom: 1px solid var(--rule); }
dl.details dt:last-of-type, dl.details dd:last-of-type { border-bottom: 0; }
details > summary { cursor: pointer; font-weight: 500; }

/* ---------- Today: KPI strip, targets, overview grid ---------- */
.notices:empty { display: none; }
.kpi-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--radius-card); margin-bottom: var(--gap); }
.kpi { display: flex; flex-direction: column; gap: 2px; padding: 16px 20px 18px; color: var(--text); min-width: 0; }
.kpi + .kpi { border-left: 1px solid var(--border); }
a.kpi:hover { text-decoration: none; background: var(--raised); }
.kpi:first-child { border-radius: var(--radius-card) 0 0 var(--radius-card); }
.kpi:last-child { border-radius: 0 var(--radius-card) var(--radius-card) 0; }
.kpi-label { font-size: 13px; color: var(--muted); }
.kpi-value { font-size: 30px; font-weight: 400; line-height: 1.2; letter-spacing: -.02em; }
.kpi-value small { font-size: 15px; color: var(--muted); letter-spacing: 0; }
.kpi-value.is-negative { color: var(--negative); }
.kpi-note { font-size: 12.5px; color: var(--muted); }
@media (max-width: 767.98px) {
  .kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi + .kpi { border-left: 0; }
  .kpi:nth-child(even) { border-left: 1px solid var(--border); }
  .kpi:nth-child(n+3) { border-top: 1px solid var(--border); }
  .kpi, .kpi:first-child, .kpi:last-child { border-radius: 0; }
}

.overview { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--gap); align-items: start; }
.overview-main, .overview-rail { display: flex; flex-direction: column; gap: var(--gap); min-width: 0; }
.overview-rail { gap: 8px; }
.overview-rail .card-block + .rail-head { margin-top: 12px; }
.rail-head { font-size: 14px; font-weight: 600; margin: 0; padding-left: 2px; }
@media (max-width: 1199.98px) { .overview { grid-template-columns: minmax(0, 1fr); } }

.targets { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.target-line { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 7px; color: var(--muted); }
.target-line strong { color: var(--text); font-weight: 600; }
.track { height: 8px; border-radius: 999px; background: #e9ecf1; overflow: hidden; }
.track-fill { display: block; height: 100%; background: var(--brand); border-radius: 999px; }

.row-list { list-style: none; margin: 0; padding: 0; }
.row-list > li { padding: 10px 0; border-bottom: 1px solid var(--rule); }
.row-list > li:first-child { padding-top: 0; }
.row-list > li:last-child { border-bottom: 0; }
.row-list-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 500; }
.row-list-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* Older list styles still used on some pages */
.recent-list li { padding: 10px 0; border-bottom: 1px solid var(--rule); }
.recent-list li:last-child { border-bottom: 0; }
.summary-list li { padding: 4px 0; }

/* Stat tiles (Reports and Pipeline): label and figure, no icons */
.stat { display: block; background: var(--sheet); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 16px 18px; height: 100%; color: inherit; }
a.stat:hover { text-decoration: none; background: var(--raised); }
.stat-n { font-weight: 400; font-size: 28px; line-height: 1.2; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-n small { font-size: 14px; color: var(--muted); letter-spacing: 0; }
.stat-l { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* ---------- Notices (Bootstrap alerts): quiet tints, dark text, one button ---------- */
.alert { --bs-alert-border-radius: var(--radius-card); --bs-alert-padding-y: 11px; --bs-alert-padding-x: 16px; font-size: 14px; border-width: 1px; }
.alert-success { --bs-alert-bg: var(--pill-positive-bg); --bs-alert-border-color: #bfeccd; --bs-alert-color: var(--pill-positive-ink); }
.alert-danger { --bs-alert-bg: var(--pill-negative-bg); --bs-alert-border-color: #f8cfc8; --bs-alert-color: var(--pill-negative-ink); }
.alert-warning { --bs-alert-bg: #fffbeb; --bs-alert-border-color: #fde68a; --bs-alert-color: #7a3a0b; }
.alert-info, .alert-primary { --bs-alert-bg: var(--raised); --bs-alert-border-color: var(--border); --bs-alert-color: var(--text); }
.alert .alert-link, .alert a:not(.btn) { color: inherit; text-decoration: underline; font-weight: 500; }
.notices .alert, .alert-strip .alert { margin-bottom: 8px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.notices { margin-bottom: 20px; }
.notices .alert form, .alert-strip .alert form { margin: 0; }
.alert .btn-outline-secondary { --bs-btn-bg: var(--sheet); }

/* ---------- Buttons: near-black primary, white secondary, red text for destructive ---------- */
.btn { --bs-btn-font-weight: 500; --bs-btn-font-size: 14px; --bs-btn-padding-y: 7px; --bs-btn-padding-x: 14px; --bs-btn-border-radius: var(--radius-control); transition: background-color .12s ease, border-color .12s ease, color .12s ease, transform .08s ease; }
.btn:active { transform: translateY(1px); }
.btn-sm { --bs-btn-font-size: 13px; --bs-btn-padding-y: 4px; --bs-btn-padding-x: 10px; }
.btn-primary { --bs-btn-bg: var(--primary); --bs-btn-border-color: var(--primary); --bs-btn-hover-bg: #2c3038; --bs-btn-hover-border-color: #2c3038; --bs-btn-active-bg: #000; --bs-btn-active-border-color: #000; --bs-btn-disabled-bg: #8b8f97; --bs-btn-disabled-border-color: #8b8f97; }
.btn-outline-primary { --bs-btn-color: var(--brand-dark); --bs-btn-bg: var(--sheet); --bs-btn-border-color: var(--control); --bs-btn-hover-color: var(--brand-dark); --bs-btn-hover-bg: var(--brand-tint); --bs-btn-hover-border-color: #b7c5f0; --bs-btn-active-color: var(--brand-dark); --bs-btn-active-bg: #dbe3fb; --bs-btn-active-border-color: #b7c5f0; --bs-btn-disabled-color: #7d86a6; --bs-btn-disabled-border-color: var(--border); }
.btn-outline-secondary { --bs-btn-color: var(--text); --bs-btn-bg: var(--sheet); --bs-btn-border-color: var(--control); --bs-btn-hover-color: var(--text); --bs-btn-hover-bg: var(--raised); --bs-btn-hover-border-color: #b9bec7; --bs-btn-active-color: var(--text); --bs-btn-active-bg: var(--active); --bs-btn-active-border-color: #b9bec7; }
.btn-outline-danger { --bs-btn-color: var(--negative); --bs-btn-bg: var(--sheet); --bs-btn-border-color: var(--control); --bs-btn-hover-color: var(--pill-negative-ink); --bs-btn-hover-bg: var(--pill-negative-bg); --bs-btn-hover-border-color: #f1b5ab; --bs-btn-active-color: var(--pill-negative-ink); --bs-btn-active-bg: #ffdcd5; --bs-btn-active-border-color: #f1b5ab; }
.btn-danger { --bs-btn-bg: var(--negative); --bs-btn-border-color: var(--negative); --bs-btn-hover-bg: #a51d22; --bs-btn-hover-border-color: #a51d22; }
.btn-warning { --bs-btn-color: var(--text); --bs-btn-bg: var(--sheet); --bs-btn-border-color: var(--control); --bs-btn-hover-color: var(--text); --bs-btn-hover-bg: var(--raised); --bs-btn-hover-border-color: #b9bec7; }
.btn-link { --bs-btn-color: var(--brand); --bs-btn-hover-color: var(--brand-dark); }

/* ---------- Forms ---------- */
.form-label { font-size: 13px; font-weight: 500; color: var(--text); margin-bottom: 6px; }
.form-control, .form-select { font-size: 14px; border-color: var(--control); border-radius: var(--radius-control); min-height: 36px; padding-top: 6px; padding-bottom: 6px; }
.form-control-sm { min-height: 30px; font-size: 13px; }
textarea.form-control { line-height: 1.55; }
.form-control::placeholder { color: #6b7079; }
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(35, 71, 197, .18); }
.form-check-input { border-color: #a9afb9; }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-check-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(35, 71, 197, .18); }
.form-text { color: var(--muted); font-size: 12.5px; }
.input-group .btn { border-color: var(--control); }
.filters { background: var(--raised); border-color: transparent; }
.filters .form-label { font-size: 12.5px; font-weight: 500; margin-bottom: 4px; color: var(--muted); }
.pw-toggle { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; }
.pw-toggle svg[hidden] { display: none; }

/* ---------- Tables: grey sentence-case headers, row lines, right-aligned numbers ---------- */
.table { --bs-table-bg: transparent; --bs-table-hover-bg: var(--raised); --bs-table-border-color: var(--rule); margin-bottom: 0; }
.table > :not(caption) > * > * { padding: 12px 14px; border-bottom-color: var(--rule); vertical-align: middle; }
.table thead th { font-size: 12.5px; font-weight: 500; color: var(--muted); background: transparent; border-bottom: 1px solid var(--border); white-space: nowrap; padding-top: 10px; padding-bottom: 10px; }
.table tbody tr:last-child > * { border-bottom: 0; }
.table td a { font-weight: 500; }
.table th a { color: inherit; }
.table-tight > :not(caption) > * > *, .table-sm > :not(caption) > * > * { padding: 8px 10px; }
.table .text-end, .table th.num, .table td.num { text-align: right; }
.panel > .table-responsive > .table > :not(caption) > * > :first-child { padding-left: 20px; }
.panel > .table-responsive > .table > :not(caption) > * > :last-child { padding-right: 20px; }
.table-responsive { position: relative; }   /* keeps screen-reader text inside scrolling tables */

/* Pagination and pills (Replies filter tabs become underline tabs) */
.pagination { --bs-pagination-color: var(--text); --bs-pagination-border-color: var(--control); --bs-pagination-hover-bg: var(--raised); --bs-pagination-hover-color: var(--text); --bs-pagination-active-bg: var(--primary); --bs-pagination-active-border-color: var(--primary); --bs-pagination-font-size: 13px; --bs-pagination-padding-y: 5px; --bs-pagination-padding-x: 11px; }
.sheet .nav-pills { gap: 4px; border-bottom: 1px solid var(--border); flex-wrap: nowrap; overflow-x: auto; }
.sheet .nav-pills .nav-link { border-radius: 0; color: var(--muted); padding: 8px 10px 10px; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; white-space: nowrap; }
.sheet .nav-pills .nav-link:hover { color: var(--text); text-decoration: none; }
.sheet .nav-pills .nav-link.active { background: none; color: var(--text); font-weight: 500; border-bottom-color: var(--brand); }

/* ---------- Status pills: pale tint, dark text of the same hue ---------- */
.badge-stage, .badge-status, .badge-class { display: inline-flex; align-items: center; flex: none; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 500; line-height: 1; white-space: nowrap; background: var(--pill-neutral-bg); color: var(--pill-neutral-ink); vertical-align: 1px; text-transform: none; }
.badge-stage-new { background: var(--pill-info-bg); color: var(--pill-info-ink); }
.badge-stage-progress { background: var(--pill-warning-bg); color: var(--pill-warning-ink); }
.badge-stage-hold { background: var(--pill-hold-bg); color: var(--pill-hold-ink); }
.badge-stage-hot { background: var(--pill-positive-bg); color: var(--pill-positive-ink); }
.badge-stage-closed { background: var(--pill-neutral-bg); color: var(--pill-neutral-ink); }
.badge-stage-stop { background: var(--pill-negative-bg); color: var(--pill-negative-ink); }
.badge-status-pending, .badge-status-pending_approval { background: var(--pill-warning-bg); color: var(--pill-warning-ink); }
.badge-status-approved, .badge-status-sending { background: var(--pill-info-bg); color: var(--pill-info-ink); }
.badge-status-sent { background: var(--pill-positive-bg); color: var(--pill-positive-ink); }
.badge-status-failed { background: var(--pill-negative-bg); color: var(--pill-negative-ink); }
.badge-status-unknown { background: var(--pill-warning-bg); color: var(--pill-warning-ink); }
.badge-status-received { background: var(--pill-hold-bg); color: var(--pill-hold-ink); }
.badge-class-unclassified { background: var(--pill-warning-bg); color: var(--pill-warning-ink); }
.badge-class-interested, .badge-class-question, .badge-class-objection, .badge-class-wrong_person { background: var(--pill-positive-bg); color: var(--pill-positive-ink); }
.badge-class-not_interested, .badge-class-unsubscribe, .badge-class-opt_out, .badge-class-complaint, .badge-class-bounce { background: var(--pill-negative-bg); color: var(--pill-negative-ink); }
.badge-class-ooo { background: var(--pill-hold-bg); color: var(--pill-hold-ink); }

/* ---------- Lead page and email threads ---------- */
.timeline { margin: 0; padding: 0; }
.timeline li { border-left: 1px solid var(--border); padding: 0 0 14px 18px; position: relative; list-style: none; margin-left: 4px; }
.timeline li::before { content: ''; position: absolute; left: -4px; top: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--sheet); border: 1.5px solid var(--brand); }
.timeline li:last-child { padding-bottom: 0; }
.thread-msg { border: 1px solid var(--border); border-radius: var(--radius-card); padding: 14px 16px; margin-bottom: 10px; }
.thread-msg header { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-bottom: 6px; font-size: 13px; }
.thread-out { background: var(--sheet); }
.thread-in { background: var(--sheet); border-left: 3px solid var(--brand); }
.thread-msg details summary { color: var(--brand); font-size: 13px; }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.email-preview { white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--font); font-size: 14px; line-height: 1.6; background: var(--raised); border: 0; border-radius: 8px; padding: 16px 18px; margin: 0; color: var(--text); }
.email-preview .footer-part { color: var(--muted); }
.gate-problems, .gate-warnings { border-radius: 8px; padding: 10px 16px 10px 32px; margin-bottom: 14px; font-size: 13.5px; }
.gate-problems { color: var(--pill-negative-ink); background: var(--pill-negative-bg); }
.gate-warnings { color: #7a3a0b; background: #fffbeb; }
.gate-problems li + li, .gate-warnings li + li { margin-top: 4px; }

/* ---------- Pipeline board: scrolls sideways inside the page on small screens ---------- */
.board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x proximity; }
.board-col { flex: 0 0 264px; background: var(--raised); border-radius: var(--radius-card); padding: 12px; display: flex; flex-direction: column; max-height: 76vh; scroll-snap-align: start; }
.board-col-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; padding: 0 2px; }
.board-col-head h2 { margin: 0; font-size: 13.5px; }
.board-cards { overflow-y: auto; margin: 0; padding: 0; list-style: none; }
.board-card { background: var(--sheet); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin-bottom: 6px; font-size: 13px; transition: border-color .12s ease; }
.board-card:hover { border-color: #c5cbd5; }
.board-card a { font-weight: 500; color: var(--text); }

/* ---------- Report bars: one hue, true ratio ---------- */
.bar-track { background: #e9ecf1; border-radius: 999px; height: 8px; overflow: hidden; min-width: 64px; }
.bar-fill { background: var(--brand); height: 100%; border-radius: 999px; }
.bar-fill-hot { background: var(--positive); }
.bar-fill-stop { background: var(--negative); }

/* ---------- Settings: section list on the left, panels on the right ---------- */
.settings-nav { position: sticky; top: calc(var(--topbar-height) + 12px); display: flex; flex-direction: column; gap: 1px; }
.settings-nav a { display: block; padding: 6px 10px; border-radius: 7px; color: var(--muted); }
.settings-nav a:hover, .settings-nav a:focus-visible { background: var(--raised); color: var(--text); text-decoration: none; }
.settings-section { scroll-margin-top: calc(var(--topbar-height) + 16px); }
.settings-section > h2 { font-size: 16px; padding-bottom: 12px; margin-bottom: 16px; border-bottom: 1px solid var(--rule); }

/* Suppression remove control */
.remove-entry summary { list-style: none; cursor: pointer; display: inline-block; }
.remove-entry summary::-webkit-details-marker { display: none; }
.remove-entry[open] { min-width: 14rem; }

/* ---------- Sign in, first-run setup, consent and unsubscribe pages ---------- */
.auth-body { display: grid; place-items: center; min-height: 100vh; padding: 16px; background: var(--frame); }
.auth-card { background: var(--sheet); border: 1px solid var(--border); border-radius: var(--radius-sheet); padding: 32px; width: 100%; max-width: 400px; }
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.auth-card h1, .auth-card .h3 { font-size: 20px; font-weight: 600; margin-bottom: 4px; }
.auth-card .brand-line { font-size: 14px; color: var(--muted); margin-bottom: 24px; }
.auth-card .btn-primary { height: 40px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
