/* Lead Sheets: airy dashboard. Periwinkle canvas, borderless white cards with soft blue-tinted shadows,
   one blue accent, geometric type. Progress rings are the signature element. */
:root {
  --canvas: #F4F5F9;
  --surface: #FFFFFF;
  --surface-2: #F6F7FA;
  --ink: #1C2033;
  --ink-2: #6F7489;
  --ink-3: #A4A8B8;
  --line: #EDEEF3;
  --line-2: #DFE1E9;
  --blue: #3375BF;   /* the scheme's blue: buttons, links, rings */
  --blue-ink: #FFFFFF;
  --blue-soft: #E8F0F9;
  --blue-tint: #CFE0F2;
  --track: #EDF0F8;
  --green: #2F8F3A;   /* text shades of the scheme's green, yellow and red */
  --green-soft: #E6F5E4;
  --amber: #946A05;
  --amber-soft: #FDF4DA;
  --red: #C23B34;
  --red-soft: #FBE9E7;
  --shadow: 0 1px 2px rgba(28, 32, 51, .04), 0 10px 30px rgba(28, 32, 51, .05);
  --shadow-s: 0 1px 2px rgba(28, 32, 51, .05), 0 4px 12px rgba(28, 32, 51, .05);
  --radius-l: 22px;
  --radius-m: 14px;
  --radius-s: 10px;
  --font: "Poppins", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: #0E1016; --surface: #171A22; --surface-2: #1E222C; --ink: #EEF0F5; --ink-2: #9CA1B2; --ink-3: #646A7C;
    --line: #252934; --line-2: #2F3440; --blue: #6FA6E3; --blue-ink: #0B1430; --blue-soft: #1B2A42; --blue-tint: #24395A;
    --track: #272B36; --green: #7ED07F; --green-soft: #17301B; --amber: #F3C24C; --amber-soft: #33290F; --red: #F07467; --red-soft: #3A1A1C;
    --shadow: 0 18px 40px rgba(0, 0, 0, .35); --shadow-s: 0 6px 16px rgba(0, 0, 0, .3); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --canvas: #0E1016; --surface: #171A22; --surface-2: #1E222C; --ink: #EEF0F5; --ink-2: #9CA1B2; --ink-3: #646A7C;
  --line: #252934; --line-2: #2F3440; --blue: #6FA6E3; --blue-ink: #0B1430; --blue-soft: #1B2A42; --blue-tint: #24395A;
  --track: #272B36; --green: #7ED07F; --green-soft: #17301B; --amber: #F3C24C; --amber-soft: #33290F; --red: #F07467; --red-soft: #3A1A1C;
  --shadow: 0 18px 40px rgba(0, 0, 0, .35); --shadow-s: 0 6px 16px rgba(0, 0, 0, .3); color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 14px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--blue) 45%, transparent); outline-offset: 2px; border-radius: 8px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.small { font-size: 12.5px; }
.blue { color: var(--blue); }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 30px 0 24px; background: var(--surface);
  display: flex; flex-direction: column; box-shadow: 1px 0 0 var(--line); z-index: 4; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 28px 38px; }
.brand-mark { width: 38px; height: 38px; border-radius: 50%; background: var(--blue); display: grid; place-items: center; flex: none;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--blue) 35%, transparent); }
.brand-mark svg { width: 19px; height: 19px; stroke: var(--blue-ink); }
.brand-name { font-weight: 600; font-size: 17px; letter-spacing: .02em; line-height: 1.1; }
.brand-sub { font-size: 11px; color: var(--ink-2); }
.nav { display: grid; gap: 6px; padding: 0 16px; }
.nav a { position: relative; display: flex; align-items: center; gap: 14px; padding: 11px 14px; border-radius: 12px; color: var(--ink-2); font-size: 14px; font-weight: 500; }
.nav a:hover { color: var(--ink); background: var(--surface-2); text-decoration: none; }
.nav a.on { color: var(--blue); background: var(--blue-soft); }
.nav a.on::before { content: ""; position: absolute; left: -16px; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--blue); }
.nav svg { width: 20px; height: 20px; stroke: currentColor; flex: none; }
.side-cta { margin: auto 18px 0; padding: 14px 14px 14px 18px; border-radius: var(--radius-m); background: var(--surface-2);
  display: flex; align-items: center; justify-content: space-between; color: var(--blue); font-weight: 500; box-shadow: var(--shadow-s); }
.side-cta:hover { text-decoration: none; background: var(--blue-soft); }
.side-cta .plus { width: 30px; height: 30px; border-radius: 50%; background: var(--blue); color: var(--blue-ink); display: grid; place-items: center;
  font-size: 19px; line-height: 1; box-shadow: 0 6px 14px color-mix(in srgb, var(--blue) 40%, transparent); }

.content { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 20px; padding: 26px 40px 6px; }
.topbar .ptitle { font-size: 20px; font-weight: 600; letter-spacing: -.01em; margin: 0; min-width: 0; }
.topbar .search { margin-left: auto; }
.who { display: flex; align-items: center; gap: 10px; position: relative; }
.who summary { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; }
.who summary::-webkit-details-marker { display: none; }
.who .menu { position: absolute; right: 0; top: 46px; background: var(--surface); border-radius: var(--radius-m); box-shadow: var(--shadow); padding: 8px; min-width: 180px; z-index: 10; }
.who .menu a { display: block; padding: 9px 12px; border-radius: 9px; color: var(--ink); }
.who .menu a:hover { background: var(--surface-2); text-decoration: none; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--blue), color-mix(in srgb, var(--blue) 55%, #9BC1FF));
  color: var(--blue-ink); display: grid; place-items: center; font-weight: 600; font-size: 13px; flex: none; }
.mode { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; background: var(--amber-soft); color: var(--amber); font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.mode::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.mode.live { background: var(--green-soft); color: var(--green); }

main { padding: 22px 40px 64px; max-width: 1320px; width: 100%; min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
h1 { font-size: 26px; line-height: 1.2; font-weight: 600; letter-spacing: -0.015em; margin: 0; }
h2 { font-size: 17px; font-weight: 600; letter-spacing: -0.005em; margin: 0; }
h3 { font-size: 14px; font-weight: 600; margin: 0; }
.lede { color: var(--ink-2); margin: 4px 0 0; font-size: 14px; }

/* ---------- surfaces ---------- */
.panel { background: var(--surface); border-radius: var(--radius-l); box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 24px 28px 12px; gap: 12px; }
.panel-head .k { font-size: 12px; color: var(--ink-3); margin-bottom: 2px; }
.panel-body { padding: 4px 28px 24px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.dash { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, .95fr); gap: 24px; align-items: start; }
.dash .wide { grid-column: span 2; }
.dash .side { grid-column: 3; grid-row: 1 / span 2; }
.stack { display: grid; gap: 24px; }

/* key figures strip (admin) */
.figures { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-bottom: 24px; }
.figure { padding: 20px 24px; background: var(--surface); border-radius: var(--radius-l); box-shadow: var(--shadow); }
.figure .v { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.figure .v small { font-size: 14px; color: var(--ink-2); font-weight: 500; letter-spacing: 0; }
.figure .k { color: var(--ink-2); font-size: 12.5px; margin-top: 2px; }

/* ---------- charts ---------- */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .line { fill: none; stroke: var(--blue); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.chart .area { fill: url(#fade); }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .dot { fill: var(--surface); stroke: var(--blue); stroke-width: 3; }
.axis { display: flex; justify-content: space-between; padding: 6px 10px 0; font-size: 11.5px; color: var(--ink-3); }
.peak { position: absolute; transform: translate(-50%, -100%); margin-top: -14px; padding: 8px 12px; border-radius: 12px; background: var(--surface);
  box-shadow: var(--shadow); text-align: center; pointer-events: none; white-space: nowrap; }
.peak b { display: block; font-size: 16px; line-height: 1.2; }
.peak span { font-size: 11px; color: var(--ink-2); }
.chart-wrap { position: relative; padding: 18px 28px 22px; }

/* ---------- progress ring (the signature) ---------- */
.ring { --size: 46px; width: var(--size); height: var(--size); flex: none; position: relative; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .t { stroke: var(--track); }
.ring .p { stroke: var(--blue); stroke-linecap: round; transition: stroke-dashoffset .9s cubic-bezier(.2, .8, .2, 1); }
.ring .lab { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ring.big { --size: 132px; }
.ring.big .lab { font-size: 26px; letter-spacing: -0.02em; }
.ring.big .lab span { display: block; font-size: 11px; font-weight: 500; color: var(--ink-2); letter-spacing: 0; text-align: center; }
@media (prefers-reduced-motion: reduce) { .ring .p { transition: none; } }

.profile { text-align: center; padding: 26px 28px 8px; }
.profile .ring { margin: 18px auto 16px; }
.profile .name { font-size: 17px; font-weight: 600; }
.profile .role { color: var(--ink-2); font-size: 12.5px; }
.minis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 20px 0 6px; }
.minis div { background: var(--surface-2); border-radius: 12px; padding: 10px 6px; }
.minis b { display: block; font-size: 16px; font-variant-numeric: tabular-nums; }
.minis span { font-size: 11px; color: var(--ink-2); }
.divider { height: 1px; background: var(--line); margin: 18px 28px 0; }

/* ---------- lists ---------- */
.list { list-style: none; margin: 0; padding: 4px 16px 16px; display: grid; gap: 4px; }
.row { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: var(--radius-m); }
a.row { color: inherit; }
a.row:hover { background: var(--surface-2); text-decoration: none; }
.row .grow { flex: 1; min-width: 0; }
.row .title { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .sub { color: var(--ink-2); font-size: 12.5px; }
.chev { width: 16px; height: 16px; stroke: var(--blue); flex: none; }
.tile { width: 42px; height: 42px; border-radius: 12px; background: var(--blue-tint); color: var(--blue); display: grid; place-items: center; flex: none; font-weight: 600; font-size: 12px; }
.tile svg { width: 19px; height: 19px; stroke: currentColor; }
.tile.soft { background: var(--blue-soft); }
.card-row { box-shadow: var(--shadow-s); background: var(--surface); }

/* ---------- tables ---------- */
.table-pad { padding: 0 16px 14px; }
table.data { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
table.data th { text-align: left; font-weight: 500; color: var(--ink-3); font-size: 12px; padding: 10px 14px; background: var(--surface); position: sticky; top: 0; }
table.data td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
table.data tr:hover td { background: var(--surface-2); }
table.data td.r, table.data th.r { text-align: right; }
.district { font-weight: 600; font-size: 14.5px; }

/* ---------- pills and buttons ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--shine), var(--dot, currentColor); }
.pill.todo { color: var(--ink-2); background: var(--surface-2); }
.pill.part { color: var(--amber); background: var(--amber-soft); --dot: var(--fam-yellow); }
.pill.done { color: var(--green); background: var(--green-soft); --dot: var(--fam-green); }
.pill.off { color: var(--ink-3); background: transparent; border: 1px dashed var(--line-2); }
.pill.off::before { display: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 12px; padding: 9px 18px;
  font: 500 13.5px/1.2 var(--font); cursor: pointer; background: var(--blue); color: var(--blue-ink); white-space: nowrap;
  box-shadow: 0 6px 14px color-mix(in srgb, var(--blue) 28%, transparent); }
.btn:hover { filter: brightness(1.05); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.quiet { background: var(--blue-soft); color: var(--blue); box-shadow: none; }
.btn.small { padding: 6px 13px; font-size: 12.5px; border-radius: 10px; }
.btn.danger { background: var(--red-soft); color: var(--red); box-shadow: none; }
.btn[disabled] { opacity: .45; cursor: default; filter: none; }

.banner { display: flex; gap: 12px; align-items: center; padding: 12px 18px; border-radius: var(--radius-m); background: var(--amber-soft); color: var(--amber); font-size: 13.5px; margin-bottom: 22px; }
.flash { padding: 12px 18px; border-radius: var(--radius-m); background: var(--blue-soft); color: var(--blue); margin-bottom: 20px; font-size: 13.5px; }

/* forms */
input[type=text], input[type=password], input[type=search], select {
  font: 14px var(--font); color: var(--ink); background: var(--surface-2); border: 1px solid transparent; border-radius: 12px; padding: 10px 14px; width: 100%; }
input:focus, select:focus { outline: none; border-color: var(--blue); background: var(--surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 15%, transparent); }
label.f { display: block; font-size: 12.5px; color: var(--ink-2); margin: 14px 0 6px; }
.search { position: relative; max-width: 340px; width: 100%; display: block; }
.search input { padding-left: 40px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-s); }
.search svg { position: absolute; left: 15px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); stroke: var(--ink-3); }

/* auth pages */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth .panel { width: 100%; max-width: 400px; padding: 38px; }
.auth h1 { font-size: 24px; margin: 22px 0 4px; }
.auth .btn { width: 100%; margin-top: 24px; padding: 12px; font-size: 14.5px; }

/* centre hero on the tracker page */
.hero { display: flex; gap: 30px; align-items: center; padding: 28px 30px; }
.hero .facts { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.hero .facts div { font-size: 12px; color: var(--ink-2); background: var(--surface-2); border-radius: 12px; padding: 10px 16px; }
.hero .facts b { display: block; font-size: 18px; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.next-up { margin-left: auto; padding: 20px 22px; border-radius: var(--radius-m); background: var(--blue-soft); min-width: 250px; }
.next-up .d { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; color: var(--blue); line-height: 1.2; }

/* job progress */
.working { padding: 52px 32px; text-align: center; }
.spinner { width: 46px; height: 46px; margin: 0 auto 20px; border-radius: 50%; border: 4px solid var(--track); border-top-color: var(--blue); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }
.steps { list-style: none; padding: 0; margin: 24px auto 0; max-width: 360px; text-align: left; }
.steps li { padding: 7px 0; color: var(--ink-3); display: flex; gap: 12px; align-items: center; font-size: 13.5px; }
.steps li.on { color: var(--ink); font-weight: 500; }
.steps li.ok { color: var(--ink-2); }
.steps li::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--track); flex: none; }
.steps li.on::before { background: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); }
.steps li.ok::before { background: var(--green); }

/* results entry: segmented control per business */
.seg { display: inline-flex; background: var(--surface-2); border-radius: 11px; padding: 3px; gap: 2px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { padding: 5px 10px; border-radius: 8px; font-size: 12px; cursor: pointer; color: var(--ink-2); white-space: nowrap; }
.seg label:hover { color: var(--ink); }
.seg input:checked + label { background: var(--surface); color: var(--blue); font-weight: 600; box-shadow: var(--shadow-s); }
.seg input:focus-visible + label { outline: 2px solid var(--blue); }
.seg input[value=appointment]:checked + label { color: var(--green); }
.seg input[value=wrong]:checked + label, .seg input[value=dead]:checked + label, .seg input[value=do_not_call]:checked + label { color: var(--red); }
.savebar { position: sticky; bottom: 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px;
  padding: 12px 14px 12px 20px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-m); box-shadow: var(--shadow); }

.pbar { height: 6px; border-radius: 3px; background: var(--track); overflow: hidden; min-width: 80px; }
.pbar i { display: block; height: 100%; background: var(--fam-blue); border-radius: 3px; }

.empty { padding: 30px 28px; text-align: center; color: var(--ink-2); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; font-size: 13.5px; margin: 0; }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; }
.crumb { font-size: 12.5px; margin: 0 0 12px; }

/* ---------- smaller screens ---------- */
@media (max-width: 1180px) {
  .dash { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .dash .wide { grid-column: 1 / -1; }
  .dash .side { grid-column: 1 / -1; grid-row: auto; }
}
@media (max-width: 960px) {
  .grid-2, .dash { grid-template-columns: minmax(0, 1fr); }
  .figures { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .next-up { margin-left: 0; width: 100%; }
  .hero { flex-wrap: wrap; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: sticky; height: auto; flex-direction: row; align-items: center; padding: 10px 14px; box-shadow: 0 1px 0 var(--line); overflow-x: auto; }
  .brand { padding: 0 10px 0 0; }
  .brand-name, .brand-sub, .side-cta span:first-child { display: none; }
  .nav { display: flex; gap: 2px; padding: 0; }
  .nav a { padding: 9px 11px; }
  .nav a span { display: none; }
  .nav a.on::before { display: none; }
  .side-cta { margin: 0 0 0 auto; padding: 4px; background: none; box-shadow: none; }
  .topbar { padding: 18px 16px 0; flex-wrap: wrap; }
  .topbar .search { order: 3; max-width: none; }
  .who summary span { display: none; }
  main { padding: 18px 16px 48px; }
  h1 { font-size: 22px; }
  .hide-sm { display: none; }
  .hero { padding: 22px; gap: 18px; }
  .panel-head { padding: 20px 20px 10px; }
  .panel-body { padding: 4px 20px 20px; }
  .list { padding: 4px 8px 12px; }
  table.data { display: block; overflow-x: auto; }
  table.data th { position: static; }
  table.data th, table.data td { padding: 10px 8px; }
  .savebar { flex-wrap: wrap; }
  .banner { display: block; }
  .chart-wrap { padding: 14px 16px 18px; }
}
.panel > table.data { width: calc(100% - 32px); margin: 0 16px 16px; }
.list { grid-template-columns: minmax(0, 1fr); }

/* ---------- colour scheme for colour elements: soft spheres ----------
   Five core colours (green, blue, purple, red, yellow) and five extras. Use these for anything that needs colour
   beyond the blue accent: people, chart segments, status dots. Text stays on the --green/--amber/--red ink colours. */
:root { --fam-green: #5FBC5F; --fam-blue: #3375BF; --fam-purple: #9333E0; --fam-red: #D6463F; --fam-yellow: #ECB542;
  --fam-teal: #1FA595; --fam-orange: #EE7A2E; --fam-pink: #DE3F8A; --fam-indigo: #4B4FD3; --fam-lime: #8DB82C;
  --fam-green-hi: #96D681; --fam-blue-hi: #70B3C8; --fam-purple-hi: #BF72F4; --fam-red-hi: #E5735A; --fam-yellow-hi: #FADF64;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='80' height='80' filter='url(%23n)'/%3E%3C/svg%3E");
  --shine: radial-gradient(circle at 62% 36%, rgba(255,255,255,.42), rgba(255,255,255,0) 62%); }

/* ---------- data-cleaning visuals ---------- */
:root { /* the five main removal reasons use the five primaries; the less common ones use the extras */
  --c-phone: var(--fam-blue); --c-dupes: var(--fam-purple); --c-closed: var(--fam-red); --c-lowconf: var(--fam-yellow); --c-tps: var(--fam-green);
  --c-chain: var(--fam-teal); --c-dnc: var(--fam-orange); --c-wrong: var(--fam-pink);
  --hatch: repeating-linear-gradient(135deg, var(--blue-tint) 0 2px, transparent 2px 8px); }
.d-track { stroke: var(--track); }
.d-phone { stroke: var(--c-phone); background: var(--c-phone); } .d-dupes { stroke: var(--c-dupes); background: var(--c-dupes); }
.d-closed { stroke: var(--c-closed); background: var(--c-closed); } .d-chain { stroke: var(--c-chain); background: var(--c-chain); }
.d-lowconf { stroke: var(--c-lowconf); background: var(--c-lowconf); } .d-tps { stroke: var(--c-tps); background: var(--c-tps); }
.d-dnc { stroke: var(--c-dnc); background: var(--c-dnc); } .d-wrong { stroke: var(--c-wrong); background: var(--c-wrong); }
.donut { position: relative; width: 210px; height: 210px; margin: 6px auto 10px; }
.donut svg { width: 100%; height: 100%; transform: rotate(0deg); }
.donut-mid { position: absolute; inset: 44px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-s); display: grid; place-content: center; text-align: center; }
.donut-mid span { font-size: 11.5px; color: var(--ink-2); }
.donut-mid b { font-size: 26px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; }
.legend { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.legend li { display: flex; align-items: center; gap: 10px; }
.legend i { width: 12px; height: 12px; border-radius: 50%; flex: none; background-image: var(--shine); }
.legend .grow { flex: 1; min-width: 0; }
.legend .pc { width: 38px; text-align: right; font-size: 12px; }

.wf { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 14px; align-items: end; padding: 8px 28px 26px; }
.wf-col { display: flex; flex-direction: column; align-items: stretch; min-width: 0; }
.wf-num { text-align: center; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.wf-num.neg { color: var(--c-closed); font-weight: 500; }
.wf-bar { height: 190px; display: flex; flex-direction: column; justify-content: flex-end; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.wf-solid { background: linear-gradient(180deg, var(--fam-blue-hi), var(--fam-blue) 70%); border-radius: 0; }
.wf-solid.soft { background: linear-gradient(180deg, color-mix(in oklab, var(--fam-blue) 55%, var(--surface)), color-mix(in oklab, var(--fam-blue) 72%, var(--surface))); }
.wf-solid.strong { background: linear-gradient(180deg, var(--fam-green-hi), var(--fam-green) 70%); }
.wf-hatch { background: var(--hatch), color-mix(in srgb, var(--c-closed) 14%, var(--surface)); border-bottom: 2px solid var(--c-closed); }
.wf-lab { text-align: center; font-size: 11.5px; color: var(--ink-2); margin-top: 10px; line-height: 1.3; height: 46px; }
.bars-axis span { flex: 1 1 0; min-width: 0; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-bottom: 24px; }
.kpi { background: var(--surface); border-radius: var(--radius-l); box-shadow: var(--shadow); padding: 18px 22px; display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: end; }
.kpi .t { grid-column: 1 / -1; font-size: 12.5px; color: var(--ink-2); }
.kpi .v { font-size: 28px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: 11.5px; color: var(--ink-3); }
.kpi .delta { font-size: 12px; font-weight: 600; color: var(--blue); text-align: right; }
.kpi .delta.down { color: var(--c-closed); }
.spark { width: 110px; height: 38px; display: block; overflow: visible; }
.spark path { fill: none; stroke: var(--blue); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.toggle { display: inline-flex; gap: 6px; }
.toggle a { padding: 6px 14px; border-radius: 999px; font-size: 12.5px; color: var(--ink-2); border: 1px solid var(--line-2); }
.toggle a:hover { text-decoration: none; color: var(--ink); }
.toggle a.on { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.bars { display: flex; gap: 12px; align-items: stretch; height: 250px; padding: 54px 28px 0; }
.bars .b { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; }
.bars .fill { border-radius: 12px; min-height: 8px; background: var(--hatch), var(--surface-2); }
.bars .b.is-peak .fill { background: linear-gradient(var(--blue) 0 34px, transparent 34px), var(--hatch), var(--surface-2); background-color: var(--surface-2); }
.bars .tip { position: absolute; left: 50%; transform: translateX(-50%); background: var(--surface); box-shadow: var(--shadow); border-radius: 12px; padding: 7px 12px; text-align: center; white-space: nowrap; z-index: 2; }
.bars .tip span { display: block; font-size: 11px; color: var(--ink-2); }
.bars .tip b { font-size: 16px; }
.bars-axis { display: flex; gap: 12px; padding: 10px 28px 24px; font-size: 11.5px; color: var(--ink-3); text-align: center; }
.bars-axis .on { color: var(--ink); font-weight: 600; }
.clean-notes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 0 28px 24px; }
.clean-notes div { background: var(--surface-2); border-radius: 12px; padding: 10px 14px; font-size: 12.5px; color: var(--ink-2); }
.clean-notes b { color: var(--ink); font-size: 15px; display: block; }

@media (max-width: 1180px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .kpis { gap: 14px; } .kpi { padding: 14px 16px; } .kpi .v { font-size: 22px; } .spark { width: 70px; }
  .wf { grid-template-columns: repeat(7, 64px); overflow-x: auto; padding: 8px 16px 20px; gap: 10px; }
  .bars, .bars-axis { gap: 5px; padding-left: 14px; padding-right: 14px; }
  .bars-axis { font-size: 9.5px; }
}

.panel-head { flex-wrap: wrap; }
@media (max-width: 960px) { .clean-notes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .clean-notes { padding: 0 16px 20px; } .toggle a { padding: 5px 10px; } }
.bars .tip.r { left: auto; right: 0; transform: none; }
.bars .tip.l { left: 0; transform: none; }

/* ---------- people badges ---------- */
.av { --c: var(--fam-blue); width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  background: var(--grain), radial-gradient(circle at 62% 36%, var(--hi, var(--c)) 0%, color-mix(in oklab, var(--hi, var(--c)) 45%, var(--c)) 28%, var(--c) 64%);
  background-blend-mode: soft-light, normal; color: var(--ink, #fff); text-shadow: 0 1px 1px color-mix(in srgb, var(--c) 60%, transparent);
  font-size: 12.5px; font-weight: 600; box-shadow: 0 0 0 2px var(--surface); line-height: 1; }
.av.s { width: 22px; height: 22px; font-size: 10.5px; }
.av.l { width: 40px; height: 40px; font-size: 16px; }
.av.empty { background: var(--surface-2); color: var(--ink-3); box-shadow: 0 0 0 1.5px var(--line-2) inset, 0 0 0 2px var(--surface); font-weight: 500; }
.pair { display: inline-flex; flex: none; }
.pair .av + .av { margin-left: -7px; }
.people { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 16px; }
.person { display: flex; align-items: center; gap: 10px; }
.person .r { font-size: 11.5px; color: var(--ink-2); line-height: 1.2; }
.person .n { font-weight: 500; line-height: 1.3; }
select.inline { width: auto; padding: 6px 10px; font-size: 13px; border-radius: 10px; }

/* ---------- radius search ---------- */
.rs { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 0; align-items: stretch; }
.rs-left { min-width: 0; }
.rs-form { padding: 6px 28px 26px; display: grid; gap: 16px; align-content: start; }
.rs-map { min-height: 460px; border-radius: 0 var(--radius-l) var(--radius-l) 0; overflow: hidden; background: var(--surface-2); position: relative; isolation: isolate; z-index: 0; }
#map { position: absolute; inset: 0; }
.slider { display: grid; gap: 8px; }
.slider .top { display: flex; justify-content: space-between; align-items: baseline; }
.slider output { font-size: 28px; font-weight: 600; letter-spacing: -.02em; color: var(--blue); font-variant-numeric: tabular-nums; }
.slider output small { font-size: 14px; color: var(--ink-2); font-weight: 500; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 3px; background: linear-gradient(var(--blue), var(--blue)) 0/var(--fill, 50%) 100% no-repeat, var(--track); outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 1px 4px rgba(0,0,0,.25), 0 0 0 1px rgba(0,0,0,.04); cursor: pointer; }
input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 1px 4px rgba(0,0,0,.25); cursor: pointer; }
input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 30%, transparent); }
.ticks { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-3); }
.ticks button { background: none; border: 0; font: inherit; color: inherit; cursor: pointer; padding: 2px 4px; border-radius: 6px; }
.ticks button:hover { color: var(--blue); background: var(--blue-soft); }
.rs-count { background: var(--surface-2); border-radius: var(--radius-m); padding: 14px 16px; }
.rs-count b { font-size: 26px; letter-spacing: -.02em; display: block; line-height: 1.2; }
.rs-count .muted { font-size: 12.5px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); font-weight: 500; }
.chip.out { background: var(--surface-2); color: var(--ink-3); }
.legend-map { position: absolute; left: 12px; bottom: 12px; z-index: 500; background: color-mix(in srgb, var(--surface) 92%, transparent); border-radius: 12px; padding: 8px 12px; font-size: 12px; box-shadow: var(--shadow-s); display: grid; gap: 4px; }
.legend-map i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.leaflet-container { font-family: var(--font); background: var(--surface-2); }

/* ---------- planner (timeline) ---------- */
.plan-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-bottom: 24px; }
.plan-stats .kpi { grid-template-columns: auto 1fr; align-items: center; gap: 0 14px; }
.plan-stats .dot { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; grid-row: span 2; }
.dot.now { background: var(--blue-soft); color: var(--blue); } .dot.soon { background: var(--amber-soft); color: var(--amber); }
.dot.done { background: var(--green-soft); color: var(--green); } .dot.un { background: var(--surface-2); color: var(--ink-2); }
.dot svg { width: 20px; height: 20px; stroke: currentColor; }
.gantt { --label: 250px; position: relative; overflow-x: auto; }
.g-inner { min-width: 900px; position: relative; }
.g-head { display: grid; grid-template-columns: var(--label) 1fr; position: sticky; top: 0; z-index: 3; background: var(--surface); }
.g-months, .g-weeks, .g-track { position: relative; }
.g-months { height: 26px; }
.g-months span { position: absolute; top: 4px; font-size: 12.5px; font-weight: 600; padding-left: 8px; border-left: 1px solid var(--line); white-space: nowrap; overflow: hidden; }
.g-weeks { height: 24px; border-bottom: 1px solid var(--line); }
.g-weeks span { position: absolute; top: 2px; font-size: 11px; color: var(--ink-3); padding-left: 6px; }
.g-row { display: grid; grid-template-columns: var(--label) 1fr; min-height: 62px; border-bottom: 1px solid var(--line); }
.g-row:last-child { border-bottom: 0; }
.g-row:hover { background: var(--surface-2); }
.g-label { display: flex; align-items: center; gap: 12px; padding: 10px 16px 10px 28px; min-width: 0; position: sticky; left: 0; z-index: 2; background: inherit; }
.g-label a { color: var(--ink); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-track { background-image: repeating-linear-gradient(90deg, var(--line) 0 1px, transparent 1px calc(100% / var(--n, 16))); }
.g-track .g-today::before { display: none; }
.g-track .g-today { opacity: .55; }
.g-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--c-closed); z-index: 2; pointer-events: none; }
.g-today::before { content: "Today"; position: absolute; top: -22px; left: 50%; transform: translateX(-50%); font-size: 10.5px; font-weight: 600; color: #fff; background: var(--c-closed); padding: 2px 7px; border-radius: 999px; white-space: nowrap; }
.g-head .g-today::before { top: 2px; }
.bar { position: absolute; top: 13px; height: 36px; border-radius: 12px; display: flex; align-items: center; gap: 8px; padding: 0 10px 0 6px; cursor: pointer;
  border: 0; font: inherit; text-align: left; overflow: hidden; color: var(--ink); transition: transform .12s, box-shadow .12s; }
.bar:hover, .bar:focus-visible { transform: translateY(-1px); box-shadow: var(--shadow); z-index: 2; }
.bar .lbl { font-size: 11.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; }
.bar .pct { font-size: 11px; font-weight: 600; margin-left: auto; position: relative; white-space: nowrap; }
.bar .pair, .bar .lbl { position: relative; }
.bar.now { background: var(--blue-tint); color: var(--blue); box-shadow: 0 6px 16px color-mix(in srgb, var(--blue) 22%, transparent); }
.bar.now .fill { position: absolute; inset: 0 auto 0 0; background: var(--blue); opacity: .18; }
.bar.done { background: var(--green-soft); color: var(--green); }
.bar.next { background: var(--hatch), var(--surface); color: var(--ink-2); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.bar.clip-l { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.bar.clip-r { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.bar .av { box-shadow: 0 0 0 2px color-mix(in srgb, var(--surface) 80%, transparent); }
.g-empty { padding: 40px 28px; text-align: center; color: var(--ink-2); }
.key { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); align-items: center; }
.key i { display: inline-block; width: 22px; height: 10px; border-radius: 4px; margin-right: 6px; vertical-align: -1px; }
.key .k-now { background: var(--blue-tint); } .key .k-done { background: var(--green-soft); } .key .k-next { background: var(--hatch), var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); }
.navbtns { display: flex; gap: 6px; }

dialog { border: 0; border-radius: var(--radius-l); padding: 0; box-shadow: 0 30px 80px rgba(20, 30, 70, .25); background: var(--surface); color: var(--ink); width: min(480px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(20, 28, 60, .28); backdrop-filter: blur(3px); }
dialog form { padding: 26px 28px 24px; }
dialog h2 { margin-bottom: 4px; }
.f2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.dlg-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 22px; align-items: center; }
.dlg-actions .spacer { margin-right: auto; }
input[type=date] { font: 14px var(--font); color: var(--ink); background: var(--surface-2); border: 1px solid transparent; border-radius: 12px; padding: 9px 12px; width: 100%; }
textarea { font: 14px var(--font); color: var(--ink); background: var(--surface-2); border: 1px solid transparent; border-radius: 12px; padding: 10px 12px; width: 100%; resize: vertical; min-height: 60px; }
.durs { display: flex; gap: 6px; margin-top: 8px; }
.durs button { font: 500 12px var(--font); padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.durs button:hover { color: var(--blue); border-color: var(--blue); }

@media (max-width: 1180px) { .plan-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 960px) { .rs { grid-template-columns: minmax(0, 1fr); } .rs-map { border-radius: 0 0 var(--radius-l) var(--radius-l); min-height: 340px; } }
@media (max-width: 760px) { .gantt { --label: 150px; } .g-label { padding-left: 14px; gap: 8px; } .g-label .pair { display: none; } .plan-stats { gap: 14px; } .rs-form { padding: 6px 16px 20px; } }
.tiles { filter: grayscale(.9) brightness(1.04) contrast(.92); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tiles { filter: grayscale(1) invert(.92) brightness(.9) contrast(.9); } }
:root[data-theme="dark"] .tiles { filter: grayscale(1) invert(.92) brightness(.9) contrast(.9); }

/* search panel keeps a fixed shape while the slider moves */
.rs-count { height: 170px; overflow: hidden; display: flex; flex-direction: column; }
.rs-count b { white-space: nowrap; }
#rsSub { display: block; min-height: 38px; line-height: 1.5; }
.rs-count .chips { height: 62px; overflow: hidden; align-content: flex-start; }
#rsGo { width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.slider output { min-width: 110px; text-align: right; }
@media (max-width: 960px) { .rs { grid-template-columns: minmax(0, 1fr); } .rs-map { border-radius: 0 0 var(--radius-l) var(--radius-l); min-height: 340px; } }

/* call-by warnings */
.pill.bad { color: var(--red); background: var(--red-soft); --dot: var(--fam-red); }
.tile.warn { background: var(--amber-soft); color: var(--amber); }
.tile.bad { background: var(--red-soft); color: var(--red); }
.callby { margin-bottom: 24px; box-shadow: var(--shadow), inset 4px 0 0 var(--amber); }
.callby .row { gap: 12px; }
.callby .row form { margin-left: 4px; }

/* ======================================================================
   Neutral controls, colour for meaning.
   Buttons, the active menu item and other controls are navy and grey, so the
   five scheme colours only appear where they mean something (people, status,
   data). Blue still marks links and "in progress".
   ====================================================================== */
:root { --ctl: #1F2547; --ctl-ink: #FFFFFF; --ctl-soft: #ECEEF5; --ctl-soft-ink: #1F2547; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --ctl: #E9EBF1; --ctl-ink: #14161D; --ctl-soft: #262A35; --ctl-soft-ink: #E9EBF1; } }
:root[data-theme="dark"] { --ctl: #E9EBF1; --ctl-ink: #14161D; --ctl-soft: #262A35; --ctl-soft-ink: #E9EBF1; }

.btn { background: var(--ctl); color: var(--ctl-ink); box-shadow: 0 6px 14px color-mix(in srgb, var(--ctl) 22%, transparent); }
.btn:hover { filter: none; background: color-mix(in oklab, var(--ctl) 88%, var(--surface)); }
.btn.quiet { background: var(--ctl-soft); color: var(--ctl-soft-ink); }
.btn.quiet:hover { background: color-mix(in oklab, var(--ctl-soft) 80%, var(--ink-3)); }
.btn.danger { background: var(--red-soft); color: var(--red); }
.brand-mark { background: var(--ctl); box-shadow: 0 6px 16px color-mix(in srgb, var(--ctl) 25%, transparent); }
.brand-mark svg { stroke: var(--ctl-ink); }
.nav a.on { color: var(--ink); background: var(--ctl-soft); font-weight: 600; }
.nav a.on::before { background: var(--ctl); }
.side-cta { color: var(--ink); }
.side-cta:hover { background: var(--ctl-soft); }
.side-cta .plus { background: var(--ctl); color: var(--ctl-ink); box-shadow: 0 6px 14px color-mix(in srgb, var(--ctl) 25%, transparent); }
.avatar { background: var(--ctl); color: var(--ctl-ink); }
.tile { background: var(--ctl-soft); color: var(--ctl-soft-ink); }
.tile.soft { background: var(--surface-2); color: var(--ink-2); }
.next-up { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.next-up .d { color: var(--ink); }
.seg input:checked + label { color: var(--ink); }
.ticks button:hover { color: var(--ink); background: var(--ctl-soft); }
input[type=range] { background: linear-gradient(var(--ctl), var(--ctl)) 0/var(--fill, 50%) 100% no-repeat, var(--track); }
.kpi .delta { color: var(--green); }
.ring .p { stroke: var(--fam-green); }

/* Businesses printed: solid pale bars, the busiest one in full colour */
.bars .fill { background: color-mix(in oklab, var(--fam-blue) 20%, var(--surface)); }
.bars .b.is-peak .fill { background: linear-gradient(180deg, var(--fam-blue-hi), var(--fam-blue) 60%); box-shadow: 0 10px 22px color-mix(in srgb, var(--fam-blue) 28%, transparent); }
.bars .b:hover .fill { background: color-mix(in oklab, var(--fam-blue) 38%, var(--surface)); }
.bars .b.is-peak:hover .fill { background: linear-gradient(180deg, var(--fam-blue-hi), var(--fam-blue) 60%); }

/* Insight card */
.insight { margin-bottom: 24px; padding: 22px 26px; display: grid; grid-template-columns: minmax(220px, .8fr) 3fr; gap: 22px; align-items: center;
  background: var(--surface); }
.insight-head { display: flex; gap: 14px; align-items: center; }
.insight-head h2 { margin: 0; }
.insight-icon { width: 48px; height: 48px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--grain), radial-gradient(circle at 62% 36%, var(--fam-red-hi) 0%, var(--fam-red) 64%); background-blend-mode: soft-light, normal;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--fam-red) 30%, transparent); }
.insight-icon svg { width: 22px; height: 22px; stroke: #fff; }
.insight-items { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.insight-item { background: var(--surface-2); border-radius: var(--radius-m); padding: 14px 16px; }
.insight-item .tag { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.insight-item .tag::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--shine), var(--dot, var(--ink-3)); }
.t-call-by { --dot: var(--fam-red); } .t-appointments { --dot: var(--fam-green); } .t-calls { --dot: var(--fam-blue); }
.t-plan { --dot: var(--fam-purple); } .t-progress { --dot: var(--fam-yellow); } .t-getting-started { --dot: var(--fam-blue); }
.insight-item p { margin: 0; font-size: 13.5px; line-height: 1.45; }
@media (max-width: 1000px) { .insight { grid-template-columns: minmax(0, 1fr); } }

/* Striped district meter */
.meter { display: flex; gap: 3px; height: 30px; }
.meter i { flex: 1 1 0; min-width: 2px; border-radius: 3px; background: var(--track); }
.meter i.d { background: linear-gradient(180deg, var(--fam-green-hi), var(--fam-green)); }
.meter i.p { background: linear-gradient(180deg, var(--fam-yellow-hi), var(--fam-yellow)); }
.meter-key { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: 12px; color: var(--ink-2); }
.meter-key i { display: inline-block; width: 4px; height: 13px; border-radius: 2px; background: var(--track); margin-right: 6px; vertical-align: -2px; }
.meter-key i.d { background: var(--fam-green); } .meter-key i.p { background: var(--fam-yellow); }
.meter-key b { color: var(--ink); font-weight: 600; margin-right: 3px; }
.hero-meter { margin-top: 16px; max-width: 460px; }
.hero-meter .meter { height: 22px; }
.profile .meter { margin-top: 4px; }
.profile .meter-key { justify-content: flex-start; text-align: left; }

/* Breakdown strip with ranked list */
.strip-head { display: flex; align-items: baseline; gap: 8px; margin: 2px 0 12px; }
.strip-head b { font-size: 26px; font-weight: 600; letter-spacing: -.02em; }
.strip-head span { color: var(--ink-2); font-size: 12.5px; }
.strip { display: flex; gap: 4px; height: 30px; margin-bottom: 16px; }
.strip i { flex: 1 1 0; min-width: 6px; border-radius: 8px; background-image: var(--shine); }
.legend.ranked i { width: 4px; height: 16px; border-radius: 2px; background-image: none; }
.legend.ranked .pc { width: 42px; }
.legend.ranked b { width: 56px; text-align: right; }

/* Phone: sheet rows wrap their buttons; wide tables scroll inside their card */
@media (max-width: 760px) {
  .sheet-row { flex-wrap: wrap; }
  .sheet-row .grow { flex-basis: calc(100% - 60px); }
  table.data { display: block; overflow-x: auto; }
  table.data th { position: static; }
}


/* ======================================================================
   Refinement pass: quieter surfaces, colour only as accents.
   ====================================================================== */
/* Headline figures: a small sphere marks each one; the line stays the scheme blue */
.kpi .t { display: flex; align-items: center; gap: 8px; }
.kpi .t::before { content: ""; width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--shine), var(--k, var(--fam-blue)); }
.kpi:nth-child(1) { --k: var(--fam-blue); } .kpi:nth-child(2) { --k: var(--fam-red); }
.kpi:nth-child(3) { --k: var(--fam-purple); } .kpi:nth-child(4) { --k: var(--fam-green); }
.spark path { stroke: var(--k, var(--fam-blue)); stroke-width: 1.8; }
.kpi .delta { color: var(--ink-3); font-weight: 500; }

/* Found to ready: only the first and last bars carry colour */

/* Cards and lists: fewer lines, more air */
.panel-head { padding-bottom: 8px; }
.list .row + .row { border-top-color: var(--line); }
.minis div { background: var(--surface-2); }
.insight { box-shadow: var(--shadow); }
.insight-icon { width: 44px; height: 44px; }

/* Rows of cards line up: cards in a row share the tallest one's height */
.dash { align-items: stretch; }
.meter-key { gap: 6px 12px; font-size: 11.5px; }
.profile .meter-key span { white-space: nowrap; }

/* Light or dark switch in the top bar (remembered on this browser; otherwise follows the computer's setting) */
.theme-btn { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--surface); box-shadow: var(--shadow-s); color: var(--ink-2);
  display: grid; place-items: center; cursor: pointer; flex: none; }
.theme-btn:hover { color: var(--ink); }
.theme-btn svg { width: 18px; height: 18px; stroke: currentColor; }
.theme-btn .i-sun { display: none; }
:root[data-theme="dark"] .theme-btn .i-sun { display: block; } :root[data-theme="dark"] .theme-btn .i-moon { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-btn .i-sun { display: block; } :root:not([data-theme="light"]) .theme-btn .i-moon { display: none; } }

/* Cleaning chart: a true waterfall. Neutral start, each removal in its reason's colour (same as the strip and
   donut), green for what is left to call. */
.wf-bar { background: transparent; border-radius: 10px; }
.wf-solid.found { background: color-mix(in oklab, var(--ink) 78%, var(--surface)); border-radius: 10px 10px 0 0; }
.wf-solid.ready { background: var(--fam-green); border-radius: 10px 10px 0 0; }
.wf-rest { background: color-mix(in oklab, var(--ink-3) 14%, var(--surface-2)); }
.wf-cut { border-radius: 8px 8px 0 0; background-image: none; }
.wf-bar > :last-child { border-radius: 0 0 10px 10px; }
.wf-solid.found, .wf-solid.ready { border-radius: 10px; }
.wf-num.neg { color: var(--ink-2); }
.wf-lab i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.wf-note { margin: -14px 28px 22px; font-size: 11.5px; color: var(--ink-3); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .wf-solid.found { background: color-mix(in oklab, var(--ink) 50%, var(--surface)); } }
:root[data-theme="dark"] .wf-solid.found { background: color-mix(in oklab, var(--ink) 50%, var(--surface)); }

/* Centres allocated to someone else: visible, not openable */
.row.locked { cursor: default; }
.row.locked .title { color: var(--ink-2); }
.row.locked:hover { background: none; }
.lock { color: var(--ink-3); display: grid; place-items: center; flex: none; }
.lock svg { width: 17px; height: 17px; stroke: currentColor; }
.locked-name { color: var(--ink-2); }
/* empty team badge: not the empty-state box */
.av.empty { padding: 0; font-size: 12px; text-align: center; }
.av.empty.s { font-size: 10.5px; } .av.empty.l { font-size: 16px; }

/* Allocations */
.handover { display: grid; grid-template-columns: 1fr 1fr auto auto; gap: 12px; align-items: end; }
.handover .check { display: flex; gap: 8px; align-items: center; padding-bottom: 10px; white-space: nowrap; }
.handover .check input { width: auto; }
.alloc-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; }
.alloc-row select { min-width: 150px; }
@media (max-width: 900px) { .handover { grid-template-columns: minmax(0, 1fr); } }

.view-switch { align-self: center; }

/* Telesales picker (several people per centre) */
.picker { position: relative; display: inline-block; }
.picker summary { list-style: none; cursor: pointer; font-size: 13px; padding: 6px 30px 6px 10px; border-radius: 10px; background: var(--surface-2);
  color: var(--ink); white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; position: relative; }
.picker summary::-webkit-details-marker { display: none; }
.picker summary::after { content: ''; position: absolute; right: 11px; top: 50%; width: 6px; height: 6px; margin-top: -5px;
  border-right: 1.6px solid var(--ink-2); border-bottom: 1.6px solid var(--ink-2); transform: rotate(45deg); }
.picker[open] summary { box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 15%, transparent); background: var(--surface); }
.picker-menu { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; min-width: 220px; max-height: 280px; overflow: auto;
  background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-l, 0 18px 50px rgba(20, 30, 70, .18)); padding: 6px; }
.picker-menu label { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px; cursor: pointer; font-size: 13.5px; white-space: nowrap; }
.picker-menu label:hover { background: var(--surface-2); }
.picker-menu input { width: 16px; height: 16px; accent-color: var(--blue); margin: 0; }
dialog .picker, dialog .picker summary { display: block; max-width: none; }
dialog .picker summary { font-size: 14px; padding: 10px 30px 10px 14px; border-radius: 12px; }

/* Sales runs and contact history */
.run-card { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.run-card .grow { min-width: 200px; }
.run-list { display: grid; gap: 2px; }
.run-row { display: grid; grid-template-columns: minmax(240px, 2.4fr) repeat(5, minmax(60px, 1fr)); gap: 12px; align-items: center; padding: 14px 28px; border-top: 1px solid var(--line); }
.run-row.head { border-top: 0; padding-top: 0; padding-bottom: 4px; font-size: 11.5px; color: var(--ink-3); }
.run-row .v { font-weight: 600; font-variant-numeric: tabular-nums; }
.run-row .n { font-size: 11.5px; color: var(--ink-3); display: none; }
.run-row .when { font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.run-row .who { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--ink-2); margin-top: 6px; }
@media (max-width: 700px) { .run-row { padding: 14px 18px; } .run-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } .run-row .first { grid-column: 1 / -1; } .run-row.head { display: none; } .run-row .n { display: block; } }
.contacts { max-height: 420px; overflow: auto; }
.tier { display: inline-block; font-size: 11.5px; padding: 1px 8px; border-radius: 999px; margin-top: 4px; }
.tier.t1 { background: var(--amber-soft); color: var(--amber); } .tier.t2 { background: var(--surface-2); color: var(--ink-2); }
.tier-head td { background: var(--surface-2); font-size: 12px; font-weight: 600; color: var(--ink-2); padding-top: 8px; padding-bottom: 8px; }
.for-who { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 14px; font-size: 13px; color: var(--ink-2); }
.for-who select { width: auto; }
.chips-pick { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.chips-pick input { position: absolute; opacity: 0; pointer-events: none; }
.chips-pick label { padding: 6px 12px; border-radius: 999px; background: var(--surface-2); font-size: 13px; cursor: pointer; }
.chips-pick input:checked + label { background: var(--blue-soft); color: var(--blue); font-weight: 600; }
.chips-pick input:focus-visible + label { outline: 2px solid var(--blue); }
.note-link { background: none; border: 0; padding: 0; font: inherit; font-size: 12px; color: var(--blue); cursor: pointer; margin-top: 4px; }
.note-text { font-size: 12px; color: var(--ink-2); margin-top: 4px; }
.task-note { display: flex; gap: 12px; align-items: center; }
#dnc .contacts { padding: 0 14px; }
.alloc-row .picker summary { min-width: 170px; }

/* Do not call: locked results */
.seg.locked { cursor: not-allowed; }
.seg.locked label { cursor: not-allowed; }
.seg.locked input:not(:checked) + label { opacity: .55; }
.lock-msg { margin-top: 8px; font-size: 12.5px; color: var(--red); background: var(--red-soft); padding: 7px 10px; border-radius: 9px; max-width: 420px; }
.dnc-lock { display: flex; gap: 6px; align-items: center; margin-top: 4px; font-size: 12px; color: var(--red); }
.dnc-lock svg { width: 13px; height: 13px; stroke: currentColor; flex: none; }
.banner svg { width: 17px; height: 17px; stroke: currentColor; flex: none; }
#dnc .found { max-height: 360px; overflow: auto; margin: 10px 14px 0; }
#dnc .found td { vertical-align: top; }
#dnc .found input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--blue); }
.tag-mini { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); margin-left: 6px; }
.tag-mini.red { background: var(--red-soft); color: var(--red); }
[hidden] { display: none !important; }
#dtab svg { width: 13px; height: 13px; vertical-align: -2px; stroke: currentColor; fill: none; margin-right: 3px; }

/* (i) tooltips */
.tip { display: inline-grid; place-items: center; width: 18px; height: 18px; padding: 0; margin-left: 4px; border: 0; background: none; color: var(--ink-3); cursor: help; vertical-align: -3px; border-radius: 50%; }
.tip svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; }
.tip:hover, .tip:focus-visible { color: var(--blue); outline: none; }
.tip:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 25%, transparent); }
.tipbox { position: absolute; z-index: 1000; max-width: min(300px, calc(100vw - 16px)); padding: 9px 12px; border-radius: 10px; background: #1E2440; color: #fff;
  font-size: 12.5px; line-height: 1.45; font-weight: 400; box-shadow: 0 10px 30px rgba(20, 30, 70, .25); pointer-events: none; }
:root[data-theme="dark"] .tipbox { background: #F2F3F7; color: #1E2440; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tipbox { background: #F2F3F7; color: #1E2440; } }

.web-link { display: inline-block; font-size: 12px; margin-top: 3px; color: var(--blue); text-decoration: none; word-break: break-all; }
.web-link:hover { text-decoration: underline; }
.web-dead { font-size: 12px; margin-top: 3px; color: var(--ink-3); }

.login-note { margin: 4px 22px 10px; padding: 10px 14px; border-radius: var(--radius-m); font-size: 13.5px; }
.login-note.ok { background: var(--green-soft); color: var(--green); }
.login-note.bad { background: var(--red-soft); color: var(--red); }
