/* Premier hub - styling from premieritdisposal.co.uk (Inter, navy #072754, sky #00b4f0) with Apple-style surfaces. */
:root {
  --bg: #f5f8fb; --surface: #ffffff; --surface-2: #f0f6fa; --ink: #041531; --ink-2: #33415a; --muted: #6b7686;
  --line: #e2e9f0; --navy: #072754; --navy-2: #04193a; --sky: #00b4f0; --sky-2: #00abed;
  --good: #009252; --good-bg: #e6f6ee; --near: #b77900; --near-bg: #fff4dc; --bad: #c8323a; --bad-bg: #fdecec;
  --none: #9aa4b2; --shadow: 0 1px 2px rgba(4,25,58,.04), 0 8px 28px -12px rgba(4,25,58,.16);
  --shadow-lift: 0 24px 60px -24px rgba(4,25,58,.32); --radius: 20px; --radius-s: 12px;
  --hero: linear-gradient(135deg, #031d44 0%, #002f57 50%, #007cb4 100%);
  --junk: #f26b1d; --btn: #072754;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #020919; --surface: #07162c; --surface-2: #0b1f3b; --ink: #f2f6fa; --ink-2: #c4cfdc; --muted: #8b97a8;
    --line: rgba(255,255,255,.09); --navy: #9fd8ff; --good-bg: rgba(0,146,82,.16); --near-bg: rgba(183,121,0,.18);
    --bad-bg: rgba(200,50,58,.18); --good: #3ccf8e; --near: #f0b43c; --bad: #ff6b72;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 28px -12px rgba(0,0,0,.6); color-scheme: dark; --btn: #0a6fa8;
  }
}
/* Light / dark picked by hand in the sidebar (12/11/2026) - otherwise the device's own setting decides */
:root[data-theme="dark"] {
    --bg: #020919; --surface: #07162c; --surface-2: #0b1f3b; --ink: #f2f6fa; --ink-2: #c4cfdc; --muted: #8b97a8;
  --line: rgba(255,255,255,.09); --navy: #9fd8ff; --good-bg: rgba(0,146,82,.16); --near-bg: rgba(183,121,0,.18);
  --bad-bg: rgba(200,50,58,.18); --good: #3ccf8e; --near: #f0b43c; --bad: #ff6b72;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 28px -12px rgba(0,0,0,.6); color-scheme: dark; --btn: #0a6fa8;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; }
a { color: var(--sky-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; font-weight: 600; }
h1 { font-size: clamp(28px, 4vw, 44px); letter-spacing: -0.035em; line-height: 1.08; }
h2 { font-size: 22px; }
h3 { font-size: 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.wrap.wide { max-width: none; padding: 0 24px; }  /* planner + booking figures use the whole browser width (Will, 13/11/2026) */

/* top bar - frosted, sticky */
.bar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--line); }
.bar .wrap { display: flex; align-items: center; gap: 22px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; letter-spacing: -0.01em; }
.brand img { height: 30px; width: auto; }
.brand:hover { text-decoration: none; }
.nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.nav a { color: var(--ink-2); padding: 7px 12px; border-radius: 999px; font-size: 14px; font-weight: 500; white-space: nowrap; }
.nav a:hover { background: var(--surface-2); text-decoration: none; }
.nav a.on { background: var(--btn); color: #fff; }
.who { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.who form { margin: 0; }
.linkbtn { background: none; border: 0; color: var(--muted); font: inherit; cursor: pointer; padding: 4px; }
.linkbtn:hover { color: var(--ink); }

/* automation health */
.side .badge { margin-left: auto; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700; border-radius: 999px;
  padding: 1px 7px; line-height: 16px; }
.hrows { display: flex; flex-direction: column; }
.hrow { display: grid; grid-template-columns: 14px 1fr auto; gap: 12px; align-items: start; padding: 12px 0; border-top: 1px solid var(--line); }
.hrow:first-child { border-top: 0; }
.hrow .dot { margin-top: 5px; }
.dot.none { background: var(--line); }
.hwhen { text-align: right; white-space: nowrap; }
.hrow.late .hmain b { color: var(--bad); }
.meter { position: relative; height: 12px; border-radius: 999px; background: var(--line); overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: 999px; background: var(--good); }
.meter span.near { background: var(--near); } .meter span.behind { background: var(--bad); }
.meter i { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--surface); opacity: .8; }
@media (max-width: 640px) { .hrow { grid-template-columns: 14px 1fr; } .hwhen { grid-column: 2; text-align: left; } }

/* team calendar: next 7 working days */
.days7 { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.days7 .day { padding: 14px 14px; }
.days7 .day.is-today { box-shadow: 0 0 0 2px var(--sky), var(--shadow); }
.days7 .dlab { font-weight: 600; margin-bottom: 8px; }
.days7 .dlab span { color: var(--muted); font-weight: 400; font-size: 12px; margin-left: 4px; }
.days7 .dn { font-size: 13px; padding: 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1100px) { .days7 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 600px) { .days7 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* team calendar grid */
.calgrid th, .calgrid td.cell { padding: 4px 2px; text-align: center; min-width: 24px; }
.calgrid .we { background: var(--surface-2); }
.calgrid .td { box-shadow: inset 0 0 0 2px var(--sky); }
.blk { display: block; height: 22px; border-radius: 5px; font-size: 11px; line-height: 22px; color: #fff; font-weight: 700; }
.blk.hol { background: var(--sky-2); }
.blk.off { background: repeating-linear-gradient(45deg, var(--muted), var(--muted) 3px, transparent 3px, transparent 6px); color: var(--ink); }

/* per-user ticks on the Logins page */
details.ticks { display: inline-block; position: relative; text-align: left; }
details.ticks summary { list-style: none; cursor: pointer; }
details.ticks summary::-webkit-details-marker { display: none; }
details.ticks[open] .tickform { position: absolute; right: 0; top: 36px; z-index: 10; width: 260px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-s); box-shadow: var(--shadow-lift); padding: 12px 14px; }
.tickform label { display: flex; gap: 8px; align-items: center; margin: 6px 0; font-weight: 400; color: var(--ink); }
.tickform input[type=checkbox] { width: auto; }

/* sidebar layout (10/11/2026) */
.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 14px;
  padding: 18px 14px; background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-right: 1px solid var(--line); z-index: 30; }
.side .brand { padding: 2px 8px 4px; }
.side .cosw { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
.side .cosw a { text-align: center; }
.snav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.snav .grp { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); padding: 14px 10px 6px; }
.snav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--ink-2); font-size: 14px; font-weight: 500; }
.snav a:hover { background: var(--surface-2); text-decoration: none; }
.snav a.on { background: var(--btn); color: #fff; }
.ic { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.me { border-top: 1px solid var(--line); padding: 12px 8px 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.me form { margin: 0; }
.me .linkbtn { display: inline-flex; align-items: center; gap: 6px; padding: 2px 0; text-align: left; }
.who-name { font-weight: 600; color: var(--ink); }
.who-name span { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.main { min-width: 0; }
.mbar { display: none; }
.scrim { display: none; }
@media (max-width: 900px) {
  .app { display: block; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 264px; transform: translateX(-100%); transition: transform .25s ease;
    box-shadow: var(--shadow-lift); background: var(--surface); }
  body.menu-open .side { transform: none; }
  body.menu-open .scrim { display: block; position: fixed; inset: 0; background: rgba(2,9,25,.35); z-index: 25; }
  .mbar { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: env(safe-area-inset-top) 16px 0; position: sticky; top: 0; z-index: 20;
    background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--line); }
  .mbar .brand img { height: 26px; }
  .mbar .pill { margin-left: auto; }
  .burger { background: none; border: 0; padding: 8px 4px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
  .burger span { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--ink); }
}

/* hero */
.hero { background: var(--hero); color: #fff; padding: 46px 0 88px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: auto -10% -60% 40%; height: 120%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0,190,250,.35), transparent); pointer-events: none; }
.hero p { color: rgba(255,255,255,.75); margin: 8px 0 0; font-size: 17px; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 600; color: var(--sky); margin-bottom: 10px; }
.hero .eyebrow { color: #7fdcff; }
.lift { margin-top: -56px; position: relative; z-index: 2; }

/* cards */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fill, minmax(460px, 1fr)); }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px; border: 1px solid var(--line); }
a.card { display: block; color: inherit; transition: transform .2s ease, box-shadow .2s ease; }
a.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); text-decoration: none; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--surface-2); color: var(--ink-2); }
.pill.pgr { background: rgba(0,180,240,.12); color: #0077a8; }
.pill.junk { background: rgba(242,107,29,.12); color: #c24f0c; }
.pill.soon { background: var(--surface-2); color: var(--muted); }
.big { font-size: 40px; font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 14px; }
.stat .label { font-size: 12px; color: var(--muted); font-weight: 500; }
.stat .value { font-size: 26px; font-weight: 600; letter-spacing: -0.03em; }
.stat .sub { font-size: 12px; color: var(--muted); }
.planned { opacity: .72; }

/* status dots */
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--none); margin-right: 6px; vertical-align: 1px; }
.dot.good { background: var(--good); } .dot.near { background: var(--near); } .dot.behind { background: var(--bad); }
.chip { display: inline-block; min-width: 46px; text-align: center; padding: 2px 8px; border-radius: 8px; font-weight: 600; font-size: 13px; }
.chip.good { background: var(--good-bg); color: var(--good); } .chip.near { background: var(--near-bg); color: var(--near); }
.chip.behind { background: var(--bad-bg); color: var(--bad); } .chip.none { color: var(--none); }

/* scorecard */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; justify-content: space-between; margin: 26px 0 14px; }
.seg { display: inline-flex; background: var(--surface-2); padding: 3px; border-radius: 999px; border: 1px solid var(--line); }
.seg a { padding: 6px 14px; border-radius: 999px; color: var(--ink-2); font-size: 14px; font-weight: 500; }
.seg a.on { background: var(--surface); box-shadow: 0 1px 3px rgba(4,25,58,.12); color: var(--ink); }
.seg a:hover { text-decoration: none; }
.cosw { flex-shrink: 0; }
.cosw a { padding: 5px 12px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.cosw a.on.pgr { background: var(--btn); color: #fff; }
.cosw a.on.junk { background: var(--junk); color: #fff; }
@media (max-width: 720px) { .cosw a { padding: 5px 9px; font-size: 12px; } }
.weekpick { display: flex; align-items: center; gap: 6px; }
.weekpick .label { font-weight: 600; padding: 0 6px; }
.round { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--surface);
  border: 1px solid var(--line); color: var(--ink); }
.round:hover { text-decoration: none; background: var(--surface-2); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 500; padding: 0 10px 10px; white-space: nowrap; }
td { padding: 12px 10px; border-top: 1px solid var(--line); vertical-align: middle; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.outcome td:first-child { font-weight: 600; }
.group-row td { padding-top: 18px; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); border-top: 0; }
.src { font-size: 11px; color: var(--muted); display: block; font-weight: 400; }
.spark { display: block; }
.diff { font-size: 12px; color: var(--muted); display: block; }
.bar-y { height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; min-width: 70px; }
.bar-y i { display: block; height: 100%; background: linear-gradient(90deg, var(--sky-2), var(--navy)); border-radius: 999px; }

/* forms and buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 10px 18px; font: 600 14px Inter, system-ui, sans-serif;
  background: var(--btn); color: #fff; cursor: pointer; }
.btn:hover { text-decoration: none; filter: brightness(1.12); }
.btn.sky { background: linear-gradient(135deg, #007bad, #00ade4); }
.btn.ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn.small { padding: 6px 12px; font-size: 13px; }
form.inline { display: inline; margin: 0; }
label { display: block; font-size: 13px; font-weight: 500; color: var(--ink-2); margin: 14px 0 6px; }
input, select, textarea { width: 100%; font: 15px Inter, system-ui, sans-serif; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-s); padding: 11px 13px; outline: none; transition: border .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--sky); box-shadow: 0 0 0 4px rgba(0,180,240,.15); }
textarea { min-height: 90px; resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 5px; }
.numgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0 16px; }

/* flash */
.flash { margin: 18px 0 0; padding: 12px 16px; border-radius: var(--radius-s); font-weight: 500; }
.flash.good { background: var(--good-bg); color: var(--good); }
.flash.bad { background: var(--bad-bg); color: var(--bad); }

/* entries */
.entry { display: flex; gap: 14px; align-items: flex-start; padding: 13px 0; border-top: 1px solid var(--line); }
.entry:first-child { border-top: 0; }
.entry .what { flex: 1; min-width: 0; }
.entry .title { font-weight: 600; }
.entry .meta { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.entry .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.kind { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--sky-2); }
.check { font-size: 12px; font-weight: 600; }
.check.found, .check.confirmed { color: var(--good); } .check.not_found { color: var(--bad); }
.check.error { color: var(--near); } .check.pending { color: var(--muted); }

/* login */
.login-shell { min-height: 100vh; display: grid; place-items: center; background: var(--hero); padding: 20px; }
.login-card { width: 100%; max-width: 400px; background: var(--surface); border-radius: 24px; padding: 34px 32px; box-shadow: var(--shadow-lift); }
.login-card img { height: 40px; }
.btn.ms { width: 100%; justify-content: center; margin-top: 20px; padding: 13px 18px; background: #2f2f2f; color: #fff; border-radius: 12px; }
.pwbox { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 12px; }
.pwbox summary { cursor: pointer; font-size: 13px; color: var(--muted); list-style: none; text-align: center; }
.pwbox summary::-webkit-details-marker { display: none; }
.pwbox[open] summary { margin-bottom: 4px; }

footer { color: var(--muted); font-size: 12px; padding: 40px 0 30px; }
section + section { margin-top: 22px; }

@media (max-width: 720px) {
  .grid.two { grid-template-columns: 1fr; }
  .row2 { grid-template-columns: 1fr; }
  .who .name { display: none; }
  .hero { padding: 30px 0 76px; }
  .bar .wrap { gap: 10px; }
  .brand span { display: none; }
  .card { padding: 18px 16px; }
  .hide-s { display: none; }
}

.themebtn { background: none; border: 0; color: inherit; cursor: pointer; font: inherit; font-size: 13px; opacity: .8; padding: 4px 0; text-align: left; }
.themebtn:hover { opacity: 1; }

/* company logo in the corner (13/11/2026): readable on dark backgrounds too */
.brand img { max-width: 170px; object-fit: contain; }
:root[data-theme="dark"] .brand img { background: #fff; border-radius: 8px; padding: 3px 6px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand img { background: #fff; border-radius: 8px; padding: 3px 6px; } }

/* mobile (13/11/2026): grid and flex children may shrink below their content, so wide tables scroll inside
   their own box instead of pushing the page sideways */
.grid > *, .stat-row > *, .numgrid > * { min-width: 0; }
.card { min-width: 0; }
@media (max-width: 720px) {
  .numgrid { grid-template-columns: 1fr; }
  .numgrid > [style*="span"] { grid-column: auto !important; }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat .value { font-size: 22px; }
  .weekpick .label { font-size: 13px; }
  .hero h1 { font-size: 26px; line-height: 1.15; }
  .hero p { font-size: 15px; }
  .btn.small { padding: 7px 11px; }
  table th, table td { padding-left: 8px; padding-right: 8px; }
}

/* sidebar tidy (16/11/2026): tighter rows, clearer section headings, icons slightly muted until active */
.snav { display: flex; flex-direction: column; gap: 1px; }
.snav .grp { padding: 16px 10px 5px; font-size: 10.5px; letter-spacing: .14em; }
.snav a { padding: 7px 10px; font-size: 13.5px; }
.snav a .ic { opacity: .75; }
.snav a.on .ic, .snav a:hover .ic { opacity: 1; }
.snav a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.entry .sched { color: var(--near); font-weight: 600; } .entry .sched.live { color: var(--muted); font-weight: 500; }

/* Home "Needs attention" (18/11/2026): the figure has its own column wide enough for "+437%", so it never runs into the text */
.attn { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2px 26px; }
.attn a { display: grid; grid-template-columns: 62px 1fr; gap: 12px; align-items: baseline; padding: 7px 0; color: inherit; text-decoration: none; }
.attn a:hover span { text-decoration: underline; }
.attn b { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 720px) {
  .attn { grid-template-columns: 1fr; gap: 0; }
  .attn a { grid-template-columns: 58px 1fr; padding: 11px 0; border-top: 1px solid var(--line); }
  .attn a:first-child { border-top: 0; }
  .attn a span { font-size: 14px; }
  .card-head { flex-wrap: wrap; row-gap: 4px; }
  .card { padding: 16px; }
}

/* Outbound sales record (18/11/2026) */
.crm-avatar { position: relative; flex: 0 0 64px; width: 64px; height: 64px; border-radius: 16px; background: rgba(255,255,255,.14); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 22px; color: #fff; overflow: hidden; }
.crm-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 6px; }
.crm-logo { width: 46px; height: 46px; object-fit: contain; border-radius: 10px; background: #fff; border: 1px solid var(--line); padding: 4px; }
.crm-actions { padding: 14px 18px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.crm-btns { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.crm-outcomes { display: flex; flex-wrap: wrap; gap: 8px; }
.crm-outcomes label { margin: 0; cursor: pointer; }
.crm-outcomes input { position: absolute; opacity: 0; width: 0; }
.crm-outcomes span { display: inline-block; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; font-weight: 500; color: var(--ink-2); background: var(--surface); }
.crm-outcomes input:checked + span { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.crm-outcomes input:focus-visible + span { box-shadow: 0 0 0 4px rgba(0,180,240,.25); }
.crm-item { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.crm-dot { flex: 0 0 10px; width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; background: var(--muted); }
.crm-dot.call { background: #00ade4; } .crm-dot.email_out { background: #7a5af8; } .crm-dot.email_in { background: var(--good); } .crm-dot.task { background: var(--near); }
.crm-body { white-space: pre-wrap; margin-top: 4px; color: var(--ink-2); max-height: 220px; overflow: auto; overflow-wrap: anywhere; }
.crm-filter a { padding: 4px 10px; font-size: 13px; }
@media (max-width: 720px) {
  .crm-cols { grid-template-columns: 1fr; }
  .crm-btns .btn { flex: 1 1 auto; justify-content: center; }
  .crm-avatar { flex-basis: 48px; width: 48px; height: 48px; font-size: 17px; }
  .crm-filter { width: 100%; overflow-x: auto; }
}

/* Call pop-up (19/11/2026): pressing Call lifts the "Log a call" box into a floating panel, as HubSpot's dialler does */
.crm-pop-head { display: none; }
#call.crm-pop { position: fixed; right: 22px; bottom: 22px; width: 440px; max-width: calc(100vw - 24px); max-height: calc(100vh - 40px); overflow: auto; z-index: 60; margin: 0 !important;
  box-shadow: 0 24px 70px rgba(4,25,58,.38); border: 1px solid var(--line); }
#call.crm-pop .card-head { display: none; }
#call.crm-pop .crm-pop-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -6px 0 12px; }
#call.crm-pop .crm-pop-head b { font-size: 15px; }
.crm-timer { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--good); }
@media (max-width: 720px) { #call.crm-pop { right: 0; left: 0; bottom: 0; width: 100%; max-width: 100%; border-radius: 18px 18px 0 0; max-height: 88vh; } }

/* deals board: two pipelines, drag and drop, time in stage (19/11/2026) */
.crm-deal-stale { margin: 18px 0 0; padding: 10px 14px; border-radius: var(--radius-s); background: var(--near-bg); color: var(--near); font-weight: 500; font-size: 14px; }
.crm-deal-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 1fr); gap: 12px; margin-top: 18px; align-items: start; overflow-x: auto; padding-bottom: 6px; }
.crm-deal-col { margin: 0; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 12px; min-height: 110px; }
.crm-deal-col.over { outline: 2px dashed var(--sky); outline-offset: -2px; }
.crm-deal-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.crm-deal-head h3 { font-size: 14px; margin: 0; }
.crm-deal-none { margin: 10px 0 0; }
.crm-deal-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 12px; margin-top: 10px; font-size: 13px; overflow-wrap: anywhere; scroll-margin-top: 90px; }
.crm-deal-card[draggable="true"] { cursor: grab; }
.crm-deal-card.dragging { opacity: .45; }
.crm-deal-card:target { border-color: var(--sky); box-shadow: 0 0 0 2px rgba(0,180,240,.25); }
.crm-deal-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.crm-deal-value { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.crm-deal-meta { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.crm-deal-due.bad, .crm-deal-age.bad { color: var(--bad); font-weight: 600; }
.crm-deal-age { color: var(--muted); }
.crm-deal-age.near { color: var(--near); font-weight: 600; }
.crm-deal-move { margin-top: 8px; }
.crm-deal-move select { width: 100%; padding: 5px 8px; font-size: 13px; }
.crm-deal-edit { margin-top: 6px; }
.crm-deal-edit summary { cursor: pointer; color: var(--muted); font-size: 12px; }
.crm-deal-edit label { margin: 8px 0 3px; font-size: 12px; }
.crm-deal-edit input, .crm-deal-edit select, .crm-deal-edit textarea { width: 100%; padding: 6px 9px; font-size: 13px; }
.crm-deal-edit textarea { min-height: 60px; }
.crm-deal-edit .btn { margin-top: 10px; }
@media (max-width: 720px) { .crm-deal-board { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: 1fr; overflow-x: visible; }
  .crm-deal-col { min-height: 0; } .crm-deal-move select, .crm-deal-edit input, .crm-deal-edit select, .crm-deal-edit textarea { font-size: 16px; } }

/* outbound sales: list filters, saved views, bulk actions, search (Henry Ashton's review, 19/11/2026) */
.crm-find { display: flex; gap: 8px; flex: 1 1 260px; max-width: 420px; margin: 0; }
.crm-find input { padding: 8px 12px; }
.crm-fform { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 14px; }
.crm-fform > div { flex: 1 1 170px; min-width: 0; }
.crm-fform label { margin-top: 0; }
.crm-fform .crm-days { display: flex; gap: 6px; }
.crm-fform .crm-days input { flex: 0 0 78px; width: 78px; }
.crm-fform .crm-fgo { flex: 0 0 auto; display: flex; gap: 12px; align-items: center; padding-bottom: 6px; }
.crm-views { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.crm-view { display: inline-flex; align-items: center; gap: 6px; padding: 5px 6px 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); font-size: 13px; font-weight: 500; }
.crm-view.on { border-color: var(--sky); box-shadow: 0 0 0 2px rgba(0,180,240,.2); }
.crm-view > :last-child:not(form) { margin-right: 6px; }
.crm-view-x { border: 0; background: none; color: var(--muted); font-size: 18px; line-height: 1; padding: 2px 7px; cursor: pointer; border-radius: 999px; }
.crm-view-x:hover { color: var(--bad); }
.crm-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
.crm-save { flex: 1 1 320px; }
.crm-save summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 6px 0; }
.crm-save form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 8px 0 4px; }
.crm-save input[type=text] { flex: 1 1 260px; width: auto; padding: 8px 12px; }
.crm-check { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 400; color: var(--ink); }
.crm-check input, .crm-tick input { width: 20px; height: 20px; flex: 0 0 20px; padding: 0; margin: 0; vertical-align: middle; accent-color: var(--sky); }
th.crm-tick, td.crm-tick { width: 36px; padding-right: 0; }
.crm-bulk { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 10px 12px; margin-top: 12px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface-2); font-size: 14px; }
.crm-bulk.on { position: sticky; bottom: 10px; z-index: 15; border-color: var(--sky); box-shadow: 0 6px 24px rgba(0,0,0,.16); }
.crm-bulk select, .crm-bulk input { width: auto; max-width: 100%; padding: 8px 10px; font-size: 14px; }
.crm-bulk [data-for] { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.crm-bulk [hidden] { display: none; }
.crm-bulk input[name=fu_days] { width: 74px; }
.crm-bulk input[name=fu_title] { width: 290px; }
.crm-bulk-n { white-space: nowrap; }
.crm-results { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; align-items: start; }
.crm-results .card { margin: 0; }
@media (max-width: 720px) {
  .crm-find { flex-basis: 100%; max-width: none; }
  .crm-find input, .crm-save input[type=text] { font-size: 16px; }
  .crm-fform > div { flex-basis: 140px; }
  .crm-check input, .crm-tick input { width: 24px; height: 24px; flex-basis: 24px; }
  .crm-bulk { gap: 8px; bottom: 6px; }
  .crm-bulk select, .crm-bulk input { font-size: 16px; padding: 10px; }
  .crm-bulk > select, .crm-bulk [data-for], .crm-bulk [data-for] > select, .crm-bulk input[name=to_owner], .crm-bulk input[name=fu_title] { flex: 1 1 100%; width: 100%; }
  .crm-bulk [hidden] { display: none; }
  .crm-bulk .btn { flex: 1 1 auto; justify-content: center; padding: 12px 16px; }
  .crm-results { grid-template-columns: 1fr; }
}

/* quick edit of one detail on a contact record (19/11/2026) */
.crm-quickrow { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 4px 0; font-size: 13px; }
.crm-quick summary { cursor: pointer; list-style: none; } .crm-quick summary::-webkit-details-marker { display: none; }
.crm-quick .crm-pen { color: var(--sky); font-size: 12px; margin-left: 4px; text-decoration: underline; }
.crm-quick form { display: flex; gap: 6px; margin-top: 6px; } .crm-quick input[name=value] { padding: 7px 10px; font-size: 14px; min-width: 190px; }
.crm-nonum { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .crm-nonum input[name=value] { padding: 9px 12px; width: 200px; }
/* Outbound sales: sequences (Henry Ashton's review, 19/11/2026, item 3) */
.crm-seq-card { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; justify-content: space-between; font-size: 14px; }
.crm-seq-card > div:first-of-type { flex: 1 1 240px; min-width: 0; overflow-wrap: anywhere; }
.crm-seq-card form:not(.inline) { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; flex: 1 1 260px; min-width: 0; max-width: 100%; justify-content: flex-end; }
.crm-seq-card select { width: auto; flex: 1 1 180px; min-width: 0; max-width: 100%; padding: 7px 10px; font-size: 14px; }
.crm-seq-tag { display: inline-block; margin-top: 4px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); font-size: 11px; font-weight: 600; }
.crm-seq-counts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.crm-seq-steps { list-style: none; margin: 12px 0 0; padding: 0; }
.crm-seq-steps li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.crm-seq-day { flex: 0 0 58px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.crm-seq-kind { flex: 0 0 auto; padding: 1px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); font-size: 12px; font-weight: 600; }
.crm-seq-what { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }
.crm-seq-edit > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 6px 0; }
section > .crm-seq-edit { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 6px; }
.crm-seq-top { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 12px; }
.crm-seq-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.crm-seq-row select, .crm-seq-row input { width: auto; max-width: 100%; padding: 7px 10px; font-size: 14px; }
.crm-seq-row input[type=number] { width: 74px; }
.crm-seq-row .crm-seq-t { flex: 2 1 200px; min-width: 0; }
.crm-seq-n { flex: 0 0 18px; color: var(--muted); }
.crm-seq-row [hidden] { display: none; }
@media (max-width: 720px) {
  .crm-seq-row select, .crm-seq-row input, .crm-seq-card select { font-size: 16px; }
  .crm-seq-row .crm-seq-t { flex-basis: 100%; }
  .crm-seq-row > select { flex: 1 1 130px; }
  .crm-seq-card form:not(.inline) { justify-content: flex-start; }
  .crm-seq-card .btn { flex: 1 1 auto; justify-content: center; }
}

.linkish{background:none;border:0;padding:0;color:inherit;text-decoration:underline;cursor:pointer;font:inherit}
.crm-find-top{flex:none;width:100%;max-width:420px;margin:0 0 10px auto}
@media (max-width: 720px){.crm-find-top{max-width:none}}
.crm-merge{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:8px 0 0}
.crm-merge button{border:0;cursor:pointer;font:inherit;font-size:12px;font-weight:600}
.crm-tpl{margin-top:14px}
.crm-tpl summary{cursor:pointer;font-size:13px;color:var(--sky)}
.crm-ai{display:flex;flex-wrap:wrap;gap:8px 10px;align-items:center;margin:14px 0 4px;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2)}
.crm-ai input{flex:1 1 260px;margin:0}
.crm-ai span{flex-basis:100%}
.crm-fix{margin-top:6px;font-size:12px}
.crm-fix summary{cursor:pointer;color:var(--sky);list-style:none;display:inline-block}
.crm-fix summary::-webkit-details-marker{display:none}
.crm-fix form{display:grid;gap:8px;margin-top:8px}
.crm-fix textarea{min-height:110px;font-size:14px}
.crm-fix select{max-width:280px}
@media (max-width: 720px){.crm-fix textarea,.crm-fix select{font-size:16px}}
.crm-pref{display:flex;gap:10px;align-items:flex-start;margin:10px 0;font-weight:400;cursor:pointer}
.crm-pref input{width:auto;margin-top:3px;flex:none}
.crm-pref span{display:block}
.crm-pref span span{margin-top:2px}
.crm-how{margin:0;padding-left:20px;display:grid;gap:8px;font-size:14px;line-height:1.45}
