/* Aloha - Onboarding & Offboarding.
   The tokens and the topbar / section / row / pill pieces are the sales dashboard's
   (sales-dashboards app/src/index.css), so the two read as one family. Status colours
   always come with a text label, never colour alone. */

@font-face { font-family: "Manrope"; src: url("../assets/fonts/Manrope-Regular.ttf") format("truetype"); font-weight: 400; }
@font-face { font-family: "Manrope"; src: url("../assets/fonts/Manrope-SemiBold.ttf") format("truetype"); font-weight: 600; }
@font-face { font-family: "Manrope"; src: url("../assets/fonts/Manrope-Bold.ttf") format("truetype"); font-weight: 700; }
@font-face { font-family: "Manrope"; src: url("../assets/fonts/Manrope-ExtraBold.ttf") format("truetype"); font-weight: 800; }

:root {
  color-scheme: light;
  --page: #ebe6df;
  --surface: #fcfcfb;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --ink-muted: #898781;
  --hairline: #e1e0d9;
  --baseline: #c3c2b7;
  --ring: rgba(11, 11, 11, 0.1);
  --accent: #2a78d6;
  --accent-wash: rgba(42, 120, 214, 0.09);
  --good: #0ca30c;
  --good-text: #006300;
  --warning: #fab219;
  --warning-text: #8a5a00;
  --serious: #ec835a;
  --serious-text: #b4532c;
  --critical: #d03b3b;
  --critical-wash: rgba(208, 59, 59, 0.07);
  --shadow: 0 1px 2px rgba(11, 11, 11, 0.05);
  --navy: #03223b;
  --cream: #f1f1ef;
  --row-alt: rgba(235, 230, 223, 0.5);
  --topbar-bg: #03223b;
  --topbar-ink: #f1f1ef;
  --topbar-line: rgba(241, 241, 239, 0.16);
  --band: #f1f1ef;
  --section-head: #03223b;
  --section-head-ink: #f1f1ef;
  --section-head-hover: #123d61;
  --critical-on-navy: #ffb3a8;
  --bar-track: #e6e2da;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --page: #0d0d0d;
    --surface: #1a1a19;
    --ink: #ffffff;
    --ink-2: #c3c2b7;
    --ink-muted: #898781;
    --hairline: #2c2c2a;
    --baseline: #383835;
    --ring: rgba(255, 255, 255, 0.1);
    --accent: #3987e5;
    --accent-wash: rgba(57, 135, 229, 0.16);
    --good-text: #0ca30c;
    --warning-text: #fab219;
    --serious-text: #ec835a;
    --critical-wash: rgba(208, 59, 59, 0.14);
    --shadow: none;
    --navy: #e8edf2;
    --cream: #15171a;
    --row-alt: rgba(255, 255, 255, 0.028);
    --topbar-bg: #1a1a19;
    --topbar-ink: #ffffff;
    --topbar-line: #2c2c2a;
    --band: #24262b;
    --section-head: #24262b;
    --section-head-ink: #ffffff;
    --section-head-hover: #30333a;
    --critical-on-navy: #ff9b8d;
    --bar-track: #2c2c2a;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.45;
}
button { font: inherit; color: inherit; background: none; border: none; padding: 0; cursor: pointer; }
a { color: var(--accent); }
[hidden] { display: none !important; }

.shell { max-width: 1680px; margin: 0 auto; padding: 0 28px 64px; }

/* ---- topbar: the navy slab ---- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: var(--topbar-bg); color: var(--topbar-ink);
  border-bottom: 1px solid var(--topbar-line);
  margin: 0 -28px 20px; padding: 12px 28px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap; row-gap: 10px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand .mark { height: 30px; width: 30px; border-radius: 7px; flex: none; }
.brand h1 { margin: 0; font-size: 15px; font-weight: 800; color: var(--topbar-ink); white-space: nowrap; }
.brand .tagline { font-size: 12.5px; opacity: 0.7; white-space: nowrap; padding-left: 12px; border-left: 1px solid var(--topbar-line); }
.topbar .spacer { flex: 1; }
.asof { font-size: 12px; opacity: 0.72; }
.asof.stale { opacity: 1; color: var(--critical-on-navy); font-weight: 700; }
.who { font-size: 12.5px; opacity: 0.85; }
.topbar-link { font-size: 12.5px; text-decoration: underline; text-underline-offset: 2px; color: var(--topbar-ink); }
.refresh-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px;
  color: var(--topbar-ink); border: 1px solid var(--topbar-line);
}
.refresh-btn:hover:not(:disabled) { border-color: var(--topbar-ink); background: rgba(241, 241, 239, 0.1); }
.refresh-btn:disabled { opacity: 0.5; cursor: progress; }
.refresh-btn.spin svg { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Onboarding | Offboarding - a segmented switch on the slab */
.proc-tabs { display: inline-flex; border: 1px solid var(--topbar-line); border-radius: 9px; overflow: hidden; margin-left: 8px; }
.proc-tabs button { padding: 6px 14px; font-size: 13px; font-weight: 600; color: var(--topbar-ink); opacity: 0.75; }
.proc-tabs button + button { border-left: 1px solid var(--topbar-line); }
.proc-tabs button[aria-pressed="true"] { background: var(--topbar-ink); color: var(--topbar-bg); opacity: 1; }
.proc-tabs .n { font-weight: 500; opacity: 0.7; margin-left: 4px; font-variant-numeric: tabular-nums; }

/* ---- gate / states ---- */
.gate { max-width: 460px; margin: 80px auto; text-align: center; background: var(--surface); border: 1px solid var(--ring); border-radius: 12px; padding: 32px 28px; box-shadow: var(--shadow); }
.gate-msg { margin: 0 0 16px; color: var(--ink-2); }
.gate-msg strong { color: var(--ink); }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 8px; border: 1px solid var(--ring); background: var(--surface); font-weight: 600; font-size: 13px; }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.small { padding: 4px 10px; font-size: 12px; }
.banner { border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; border: 1px solid var(--ring); background: var(--surface); }
.banner.critical { border-color: rgba(208, 59, 59, 0.35); background: var(--critical-wash); box-shadow: inset 4px 0 0 var(--critical); }
.banner.critical strong { color: var(--critical); }

/* ---- alarm: someone with no board ---- */
.alarm { margin-bottom: 18px; }
.alarm .who-list { display: flex; flex-wrap: wrap; gap: 6px 8px; margin-top: 10px; padding: 0; list-style: none; }
.alarm .who-list li { background: var(--surface); border: 1px solid var(--ring); border-radius: 999px; padding: 3px 10px; font-size: 12.5px; }
.alarm .who-list li .d { color: var(--ink-muted); margin-left: 6px; font-variant-numeric: tabular-nums; }
.alarm .more { margin-top: 8px; font-size: 12.5px; text-decoration: underline; color: var(--ink-2); }

/* ---- KPI row ---- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--surface); border: 1px solid var(--ring); border-radius: 12px; padding: 12px 16px; box-shadow: var(--shadow); }
.kpi .label { font-size: 12px; color: var(--ink-2); font-weight: 600; }
.kpi .value { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.2; margin-top: 2px; }
.kpi .sub { font-size: 11.5px; color: var(--ink-muted); }
.kpi.critical .value { color: var(--critical); }
.kpi.critical { box-shadow: inset 0 -3px 0 var(--critical); }

/* ---- scopebar: view switch, search, toggles ---- */
.scopebar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.seg { display: inline-flex; border: 1px solid var(--ring); border-radius: 8px; overflow: hidden; background: var(--surface); }
.seg button { padding: 6px 14px; font-size: 13px; color: var(--ink-2); }
.seg button + button { border-left: 1px solid var(--ring); }
.seg button[aria-pressed="true"] { background: var(--accent); color: #fff; font-weight: 600; }
.search { flex: 0 1 320px; min-width: 200px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--ring); background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; }
.search:focus { outline: none; border-color: var(--accent); }
.toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); cursor: pointer; user-select: none; }
.scopebar .spacer { flex: 1; }
.scopebar .hint { font-size: 12px; color: var(--ink-muted); }

/* Department chips: "my department" */
.dept-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.dept-chips .lead { font-size: 12.5px; color: var(--ink-2); font-weight: 600; margin-right: 2px; }
.chip { border: 1px solid var(--ring); background: var(--surface); border-radius: 999px; padding: 5px 12px; font-size: 13px; color: var(--ink-2); display: inline-flex; gap: 6px; align-items: center; }
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--surface); font-weight: 600; }
.chip .c { font-variant-numeric: tabular-nums; opacity: 0.75; font-size: 12px; }
.chip .c.bad { color: var(--critical); opacity: 1; font-weight: 700; }
.chip[aria-pressed="true"] .c.bad { color: var(--critical-on-navy); }

/* ---- sections (navy header) ---- */
.section { background: var(--surface); border: 1px solid var(--ring); border-radius: 12px; margin-bottom: 14px; box-shadow: var(--shadow); overflow: hidden; }
.section > header {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 18px; background: var(--section-head); color: var(--section-head-ink);
}
.section > header h2 { margin: 0; font-size: 15px; font-weight: 700; }
.section > header .counts { font-size: 12px; opacity: 0.75; font-variant-numeric: tabular-nums; }
.section > header .bad { font-size: 12px; font-weight: 700; color: var(--critical-on-navy); }
.section > header .right { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.section > header .hbtn { font-size: 12px; color: var(--section-head-ink); border: 1px solid rgba(241, 241, 239, 0.3); border-radius: 6px; padding: 3px 9px; }
.section > header .hbtn:hover { background: rgba(241, 241, 239, 0.1); }
.section > header .bar { font-size: 12px; }
.section > header .bar .track { width: 120px; background: rgba(241, 241, 239, 0.18); }
.section.minimised { box-shadow: none; }
.section.minimised > header { background: var(--band); color: var(--ink); }
.section.minimised > header .counts { opacity: 1; color: var(--ink-2); }
.section.minimised > header .bad { color: var(--critical); }
.section.minimised > header .bar .track { background: var(--bar-track); }
.section.minimised > header .hbtn { color: var(--ink-2); border-color: var(--ring); }
.section.minimised > header .hbtn:hover { background: var(--surface); }
.acc-head { cursor: pointer; user-select: none; }
.section > header.acc-head:hover { background: var(--section-head-hover); }
.section.minimised > header.acc-head:hover { background: var(--accent-wash); }
.acc-head:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.chev { width: 16px; height: 16px; flex: none; transition: transform 0.15s ease; }
.open > .chev, [aria-expanded="true"] > .chev { transform: rotate(90deg); }
.empty { padding: 18px; color: var(--ink-muted); font-size: 13px; }

/* ---- progress bar: label always beside it ---- */
.bar { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar .track { width: 84px; height: 6px; border-radius: 999px; background: var(--bar-track); overflow: hidden; flex: none; }
.bar .fill { height: 100%; background: var(--good); border-radius: 999px; }

/* ---- person rows inside a department ---- */
.prow { border-bottom: 1px solid var(--hairline); }
.prow:last-child { border-bottom: none; }
.prow-head { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 18px; text-align: left; }
.prow-head:hover { background: var(--accent-wash); }
.prow.flagged > .prow-head { box-shadow: inset 3px 0 0 var(--critical); }
.pname { font-weight: 700; min-width: 180px; }
.meta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-left: auto; font-size: 12.5px; color: var(--ink-2); }
.meta .m { white-space: nowrap; }
.meta .m b { font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.meta .m.bad b, .meta .m.bad { color: var(--critical); }
.meta .m.muted { color: var(--ink-muted); }

/* ---- task table ---- */
.tasks { width: 100%; border-collapse: collapse; }
.tasks td { padding: 7px 12px; border-top: 1px solid var(--hairline); vertical-align: top; font-size: 13px; }
.tasks tr:nth-child(even) td { background: var(--row-alt); }
/* Status and when shrink to their content; the task name takes the rest. */
.tasks td.st { width: 1%; white-space: nowrap; padding-left: 46px; padding-right: 18px; }
.tasks td.when { width: 1%; color: var(--ink-2); font-size: 12.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tasks .when.bad { color: var(--critical); font-weight: 700; }
.tasks .when.today { color: var(--warning-text); font-weight: 700; }
.tasks .when-inline { display: none; font-size: 12px; color: var(--ink-2); margin-top: 2px; }
/* A narrow panel (the person view beside the list, or a phone) moves "when" under the name. */
.section { container-type: inline-size; }
@container (max-width: 640px) {
  .tasks td.when { display: none; }
  .tasks .when-inline { display: block; }
  .tasks td.st { padding-left: 18px; }
}
.tasks td.go { width: 44px; text-align: right; }
.tasks td.go a { text-decoration: none; color: var(--ink-muted); font-size: 13px; padding: 2px 6px; border-radius: 4px; }
.tasks td.go a:hover { color: var(--accent); background: var(--accent-wash); }
.tasks tr.done td.tn { color: var(--ink-muted); text-decoration: line-through; text-decoration-color: var(--baseline); }
.tasks tr.na td.tn { color: var(--ink-muted); }
.tasks .who-tag { display: inline-block; font-size: 11.5px; color: var(--ink-muted); margin-left: 8px; }
.tasks .req-btn { font-size: 11.5px; color: var(--accent); margin-left: 8px; text-decoration: underline; text-underline-offset: 2px; }
.tasks .req { margin-top: 6px; padding: 8px 10px; border-left: 3px solid var(--baseline); background: var(--band); color: var(--ink-2); font-size: 12.5px; white-space: pre-wrap; border-radius: 0 6px 6px 0; }
.dept-block .tasks td.st { padding-left: 18px; }
.done-toggle { display: block; width: 100%; text-align: left; padding: 7px 18px 7px 46px; font-size: 12.5px; color: var(--ink-2); border-top: 1px solid var(--hairline); }
.done-toggle:hover { background: var(--accent-wash); }
.dept-block .done-toggle { padding-left: 18px; }

/* ---- status pill: dot + label ---- */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; color: var(--ink-2); }
.pill .dot { width: 8px; height: 8px; border-radius: 999px; background: var(--baseline); flex: none; }
.pill.good { color: var(--good-text); } .pill.good .dot { background: var(--good); }
.pill.info .dot { background: var(--accent); }
.pill.warning { color: var(--warning-text); } .pill.warning .dot { background: var(--warning); }
.pill.serious { color: var(--serious-text); } .pill.serious .dot { background: var(--serious); }
.pill.critical { color: var(--critical); } .pill.critical .dot { background: var(--critical); }
.pill.neutral { color: var(--ink-muted); }

/* ---- by person: list + detail ---- */
.person-layout { display: grid; grid-template-columns: minmax(280px, 360px) 1fr; gap: 16px; align-items: start; }
.plist { background: var(--surface); border: 1px solid var(--ring); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow-y: auto; }
.plist .pcard { display: block; width: 100%; text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--hairline); }
.plist .pcard:last-child { border-bottom: none; }
.plist .pcard:hover { background: var(--accent-wash); }
.plist .pcard[aria-current="true"] { background: var(--accent-wash); box-shadow: inset 3px 0 0 var(--accent); }
.plist .pcard.flagged:not([aria-current="true"]) { box-shadow: inset 3px 0 0 var(--critical); }
.pcard .n1 { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.pcard .nm { font-weight: 700; }
.pcard .dt { font-size: 12px; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pcard .dt.bad { color: var(--critical); font-weight: 700; }
.pcard .sub { font-size: 12px; color: var(--ink-muted); margin: 1px 0 6px; }
.pcard .n3 { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pcard .tag { font-size: 11.5px; font-weight: 700; color: var(--critical); }
.pcard .tag.warn { color: var(--warning-text); }

.pdetail .facts { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 12px 18px; border-bottom: 1px solid var(--hairline); font-size: 13px; color: var(--ink-2); }
.pdetail .facts b { color: var(--ink); font-weight: 700; }
.pdetail .flags { padding: 10px 18px; border-bottom: 1px solid var(--hairline); display: flex; flex-direction: column; gap: 4px; }
.pdetail .flag { font-size: 12.5px; font-weight: 600; color: var(--warning-text); }
.pdetail .flag.critical { color: var(--critical); }
.dept-block > .dhead { display: flex; align-items: center; gap: 12px; padding: 9px 18px; background: var(--band); border-top: 1px solid var(--hairline); font-weight: 700; font-size: 13.5px; }
.dept-block:first-child > .dhead { border-top: none; }
.dept-block > .dhead .bar { margin-left: auto; font-weight: 500; }

/* ---- data notes ---- */
.notes { margin-top: 24px; font-size: 12.5px; color: var(--ink-2); }
.notes summary { cursor: pointer; font-weight: 600; }
.notes ul { margin: 8px 0 0; padding-left: 18px; }
.footnote { margin-top: 10px; font-size: 12px; color: var(--ink-muted); }

@media (max-width: 900px) {
  .shell { padding: 0 16px 48px; }
  .topbar { margin: 0 -16px 16px; padding: 10px 16px; position: static; }
  .person-layout { grid-template-columns: 1fr; }
  .plist { position: static; max-height: 360px; }
  .tasks td.st { width: auto; padding-left: 18px; }
  .tasks td.when { width: auto; white-space: normal; }
  .pname { min-width: 0; }
  .meta { margin-left: 0; gap: 10px; }
  .prow-head { flex-wrap: wrap; }
}

/* ================================================================ editing (18 Nov 2026) */
/* The tick column takes the indent the status column had; status keeps its own padding. */
.tasks td.pick { width: 1%; padding-left: 40px; padding-right: 4px; }
.tasks td.st { padding-left: 6px; }
.dept-block .tasks td.pick { padding-left: 18px; }
@container (max-width: 640px) { .tasks td.pick { padding-left: 14px; } .tasks td.st { padding-left: 6px; } }
.tasks td.pick input { width: 16px; height: 16px; cursor: pointer; accent-color: var(--accent); }
.tasks tr.selected td { background: var(--accent-wash) !important; }
.tname { text-align: left; font: inherit; color: inherit; cursor: default; }
.tasks tr.done .tname { color: var(--ink-muted); }
.note-mark { color: var(--ink-muted); font-size: 12px; margin-left: 4px; }
.sel-row { padding: 6px 18px 4px 40px; border-top: 1px solid var(--hairline); }
.dept-block .sel-row { padding-left: 18px; }
.link { font-size: 12px; color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.btn.ghost { background: transparent; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.muted { color: var(--ink-muted); }
.bad-text { color: var(--critical); }
.tick { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.tick.big { font-size: 14px; font-weight: 600; }
.tick input { width: 16px; height: 16px; accent-color: var(--good); }

/* Connect monday in the top bar */
.monday-btn { border: 1px solid var(--topbar-line); border-radius: 8px; padding: 5px 10px; text-decoration: none; font-size: 12.5px; }
.monday-btn:hover { border-color: var(--topbar-ink); }
.monday-btn:not(.connected) { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }

/* A short message after a save */
.notice { position: fixed; top: 66px; left: 50%; transform: translateX(-50%); z-index: 40; padding: 9px 16px; border-radius: 10px; font-size: 13px; font-weight: 600; box-shadow: 0 6px 20px rgba(11, 11, 11, 0.18); max-width: min(640px, calc(100vw - 32px)); }
.notice.good { background: var(--navy); color: var(--surface); }
.notice.bad { background: var(--critical); color: #fff; }

/* Bulk bar: fixed along the bottom while tasks are selected */
.bulk { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 30; max-width: calc(100vw - 32px); }
.bulk-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; background: var(--topbar-bg); color: var(--topbar-ink); border: 1px solid var(--topbar-line); border-radius: 12px; padding: 10px 14px; box-shadow: 0 8px 28px rgba(11, 11, 11, 0.28); font-size: 13px; }
.bulk-inner label { display: inline-flex; align-items: center; gap: 6px; }
.bulk-inner select, .bulk-inner input[type="date"] { font: inherit; font-size: 12.5px; padding: 4px 6px; border-radius: 6px; border: 1px solid var(--topbar-line); background: var(--surface); color: var(--ink); }
.bulk-inner .hint { font-size: 12px; opacity: 0.75; }
.bulk-inner .btn.ghost { color: var(--topbar-ink); border-color: var(--topbar-line); }

/* Task panel: a drawer from the right */
.scrim { position: fixed; inset: 0; background: rgba(11, 11, 11, 0.28); z-index: 35; }
.panel { position: fixed; top: 0; right: 0; height: 100vh; width: min(540px, 100vw); z-index: 36; background: var(--surface); border-left: 1px solid var(--ring); box-shadow: -10px 0 30px rgba(11, 11, 11, 0.18); display: flex; flex-direction: column; }
.panel .ph { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 14px 18px; background: var(--section-head); color: var(--section-head-ink); }
.panel .pt { font-size: 15px; font-weight: 700; }
.panel .ps { font-size: 12.5px; opacity: 0.75; margin-top: 2px; }
.panel .px { font-size: 22px; line-height: 1; padding: 0 4px; color: var(--section-head-ink); }
.panel .pnote { padding: 10px 18px; background: var(--accent-wash); border-bottom: 1px solid var(--hairline); font-size: 13px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.panel .pbody { overflow-y: auto; padding: 6px 18px 18px; flex: 1; }
.panel .pf { padding: 12px 0; border-bottom: 1px solid var(--hairline); }
.panel .pf:last-child { border-bottom: none; }
.panel .pf > label:first-child { display: block; font-size: 12px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.03em; }
.panel .pf > label.tick { text-transform: none; letter-spacing: 0; color: var(--ink); font-size: 14px; }
.panel select, .panel input[type="date"], .panel textarea { font: inherit; font-size: 13px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--ring); background: var(--surface); color: var(--ink); }
.panel select { min-width: 220px; }
.panel textarea { width: 100%; resize: vertical; margin-top: 8px; }
.panel .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.panel .hint { font-size: 12px; color: var(--ink-2); margin-top: 6px; }
.panel .hint.warn { color: var(--warning-text); font-weight: 600; }
.panel .hint.bad, .panel .bad { color: var(--critical); font-weight: 700; }
.panel .req { margin: 0; }
.panel .note-text { white-space: pre-wrap; font-size: 13px; background: var(--band); border-radius: 8px; padding: 8px 10px; max-height: 180px; overflow-y: auto; }
.panel .composer { position: relative; }
.mention-list { position: absolute; left: 0; top: 100%; z-index: 5; background: var(--surface); border: 1px solid var(--ring); border-radius: 8px; box-shadow: 0 6px 18px rgba(11, 11, 11, 0.16); display: flex; flex-direction: column; min-width: 220px; overflow: hidden; }
.mention-list button { text-align: left; padding: 7px 12px; font-size: 13px; }
.mention-list button:hover { background: var(--accent-wash); }
.updates { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.upd { border: 1px solid var(--hairline); border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.upd.reply { margin: 8px 0 0 14px; background: var(--band); }
.upd-h { font-size: 12px; margin-bottom: 3px; }
.upd-b { white-space: pre-wrap; }
.panel .pfoot { padding: 10px 18px; border-top: 1px solid var(--hairline); display: flex; justify-content: space-between; font-size: 13px; }
@media (max-width: 900px) { .notice { top: 12px; } }

/* ================================================================ the sales dashboard's columns (18 Nov 2026)
   TASK · ASSIGNEE · NOTES · UPDATES · DOCS · DUE · STATUS - styled as sales-dashboards' .subtasks:
   small capital headers, centred counts, "15 Oct · overdue" in red, the setter under the status. */
.tasks thead th {
  text-align: left; font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--ink-muted); font-weight: 600; padding: 8px 12px 6px 0; border-bottom: 1px solid var(--hairline);
  background: var(--surface); white-space: nowrap;
}
.tasks thead th.pick { padding-left: 40px; padding-right: 4px; }
.dept-block .tasks thead th.pick { padding-left: 18px; }
.tasks td { padding: 9px 12px 9px 0; }
.tasks tr:nth-child(even) td { background: transparent; }
.tasks tbody tr td { border-top: 1px solid var(--hairline); }
.tasks td.tn { min-width: 220px; }
.tasks th.assignee, .tasks td.assignee { width: 200px; min-width: 160px; font-size: 13px; color: var(--ink-2); }
.tasks th.count, .tasks td.count { text-align: center; width: 64px; font-variant-numeric: tabular-nums; }
.tasks td.count { font-weight: 600; color: var(--ink); }
.tasks td.count.zero, .tasks td.count.pending { font-weight: 400; color: var(--ink-muted); }
.tasks th.due, .tasks td.due { width: 130px; min-width: 120px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tasks td.due .over, .tasks td.due .cell-btn.over { color: var(--critical); font-weight: 600; }
.tasks td.due .today, .tasks td.due .cell-btn.today { color: var(--warning-text); font-weight: 600; }
.tasks th.status-cell, .tasks td.status-cell { width: 190px; min-width: 170px; text-align: right; }
.tasks td.status-cell .by { font-size: 11.5px; color: var(--ink-muted); margin-top: 3px; white-space: nowrap; }
.tasks th.go, .tasks td.go { width: 36px; }
.cell-btn { text-align: left; font: inherit; color: inherit; border-radius: 6px; padding: 2px 4px; margin: -2px -4px; }
.tasks td.status-cell .cell-btn { text-align: right; }
.cell-btn:hover { background: var(--accent-wash); }
.cell-btn .add { color: var(--ink-muted); font-size: 12px; }
.inline-due, .inline-status { font: inherit; font-size: 12.5px; padding: 3px 6px; border-radius: 6px; border: 1px solid var(--accent); background: var(--surface); color: var(--ink); max-width: 100%; }
.assignee-inline { display: none; font-size: 12px; color: var(--ink-muted); margin-top: 2px; }
.tasks tr.done td.tn .tname { color: var(--ink-muted); text-decoration: line-through; text-decoration-color: var(--baseline); }
/* A narrower list (the person view beside the people list, a phone): counts and the assignee
   column fold away; the assignee moves under the task name. */
@container (max-width: 860px) {
  .tasks th.count, .tasks td.count, .tasks th.assignee, .tasks td.assignee { display: none; }
  .assignee-inline { display: block; }
}
@container (max-width: 560px) {
  .tasks th.due, .tasks td.due { width: 90px; min-width: 0; white-space: normal; }
  .tasks th.status-cell, .tasks td.status-cell { width: auto; min-width: 0; }
  .tasks td.status-cell .by { white-space: normal; }
  .tasks thead th.pick, .tasks td.pick { padding-left: 12px; }
}
/* Assignee chips in the task panel */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.achip { display: inline-flex; align-items: center; gap: 4px; background: var(--band); border: 1px solid var(--hairline); border-radius: 999px; padding: 3px 4px 3px 10px; font-size: 12.5px; }
.achip button { font-size: 14px; line-height: 1; padding: 0 5px; border-radius: 999px; color: var(--ink-muted); }
.achip button:hover { background: var(--critical-wash); color: var(--critical); }
.panel input[type="text"] { font: inherit; font-size: 13px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--ring); background: var(--surface); color: var(--ink); width: 100%; margin-top: 8px; }

/* A task holder's own tasks (19 Nov 2026): a thin accent on the left of the row */
.tasks tr.mine td:first-child { box-shadow: inset 3px 0 0 var(--accent); }

/* ================================================================ one line per task (19 Nov 2026)
   Everything is changed on the task's own line - no side panel. The notes bubble sits after the
   task name; hovering it (or the NOTES count) shows the notes; the ⓘ shows what done means. */
.tasks td, .tasks th { white-space: nowrap; }
.tasks td.tn { max-width: 0; width: 40%; }
.tasks td.tn .tname { display: inline-block; max-width: calc(100% - 64px); overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.tasks td.assignee { max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
.tasks td.assignee .cell-btn { max-width: 100%; overflow: hidden; text-overflow: ellipsis; display: inline-block; vertical-align: middle; }
.tasks th.status-cell, .tasks td.status-cell { width: 260px; min-width: 220px; }
.st-line { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.tasks td.status-cell .by { font-size: 11.5px; color: var(--ink-muted); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px; }
.tick-box { width: 16px; height: 16px; accent-color: var(--good); cursor: pointer; flex: none; margin: 0 2px 0 0; }
.tick-box:disabled { cursor: default; }
/* the speech bubble */
.bubble { display: inline-flex; align-items: center; gap: 3px; margin-left: 8px; padding: 1px 6px; border-radius: 999px; color: var(--ink-muted); vertical-align: middle; font-size: 11.5px; font-weight: 700; line-height: 1.4; }
.bubble:hover { color: var(--accent); background: var(--accent-wash); }
.bubble.has { color: var(--ink); background: var(--band); border: 1px solid var(--hairline); }
.bubble.has:hover { color: var(--accent); }
.info { display: inline-block; margin-left: 6px; color: var(--ink-muted); font-size: 12px; cursor: help; vertical-align: middle; }
.info:hover, .info:focus { color: var(--accent); outline: none; }
.tasks td.count[data-pop] { cursor: default; }
/* the note box, in the line's middle */
.tasks td.composer-cell { padding-top: 5px; padding-bottom: 5px; }
.note-input, .assign-input { font: inherit; font-size: 13px; width: 100%; padding: 5px 9px; border-radius: 8px; border: 1px solid var(--accent); background: var(--surface); color: var(--ink); }
.note-input:focus, .assign-input:focus { outline: 2px solid var(--accent-wash); }
.tasks td .composer { position: relative; }
.tasks .mention-list { position: absolute; left: 0; top: calc(100% + 2px); z-index: 20; background: var(--surface); border: 1px solid var(--ring); border-radius: 8px; box-shadow: 0 6px 18px rgba(11, 11, 11, 0.16); display: flex; flex-direction: column; min-width: 220px; overflow: hidden; }
.tasks .mention-list button { text-align: left; padding: 7px 12px; font-size: 13px; }
.tasks .mention-list button:hover, .tasks .mention-list button:first-child { background: var(--accent-wash); }
/* assignees, edited in their cell */
.tasks td.assignee.editing { max-width: none; overflow: visible; white-space: normal; }
.tasks td.assignee.editing .composer { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.tasks td.assignee.editing .achip { padding: 1px 2px 1px 8px; font-size: 12px; }
.tasks td.assignee.editing .assign-input { width: 90px; flex: 1; padding: 3px 7px; }
/* the hover card */
.pop { position: fixed; z-index: 50; background: var(--surface); color: var(--ink); border: 1px solid var(--ring); border-radius: 10px; box-shadow: 0 10px 30px rgba(11, 11, 11, 0.2); padding: 10px 12px; max-height: 340px; overflow-y: auto; font-size: 13px; white-space: normal; }
.pop-h { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 6px; }
.pop-b, .pn-b { white-space: pre-wrap; }
.pn { padding: 7px 0; border-top: 1px solid var(--hairline); }
.pn:first-of-type { border-top: none; padding-top: 0; }
.pn.reply { margin-left: 12px; border-top: none; padding-bottom: 0; }
.pn.col { background: var(--band); border-radius: 6px; padding: 7px 9px; margin-top: 6px; }
.pn-h { font-size: 12px; margin-bottom: 2px; }
.pop p { margin: 0; }
@container (max-width: 860px) {
  .tasks th.status-cell, .tasks td.status-cell { width: 200px; min-width: 0; }
  .tasks td.status-cell .by { display: none; }
}
@container (max-width: 860px) {
  .assignee-inline { display: inline; font-size: 12px; margin-left: 8px; }
}
/* one line means the task cell clips: a long name / inline assignee ends in "…", never runs into Due */
.tasks td.tn { overflow: hidden; text-overflow: ellipsis; }
.tasks thead th.assignee { font-size: 11px; color: var(--ink-muted); }

/* The note box floats over the task's speech bubble (19 Nov 2026) - the line stays as it is */
.note-box { position: fixed; z-index: 45; background: var(--surface); border: 1px solid var(--accent); border-radius: 10px; box-shadow: 0 10px 30px rgba(11, 11, 11, 0.22); padding: 3px; }
.note-box .note-input { border: none; padding: 6px 9px; }
.note-box .note-input:focus { outline: none; }
.note-box .mention-list { position: absolute; left: -4px; top: calc(100% + 6px); z-index: 46; background: var(--surface); border: 1px solid var(--ring); border-radius: 8px; box-shadow: 0 6px 18px rgba(11, 11, 11, 0.16); display: flex; flex-direction: column; min-width: 220px; overflow: hidden; }
.note-box .mention-list button { text-align: left; padding: 7px 12px; font-size: 13px; }
.note-box .mention-list button:hover, .note-box .mention-list button:first-child { background: var(--accent-wash); }
.bubble.active { color: var(--accent); background: var(--accent-wash); }

/* ================================================================ the bell (19 Nov 2026) */
/* The sales dashboard's bell: unread count on the bell, the list under it, Teams / Email choice at the foot. */
.bell-wrap { position: relative; display: inline-flex; }
.bell-wrap[hidden], .bell-pop[hidden], .bell-n[hidden] { display: none; }
.refresh-btn.bell { position: relative; }
.bell-n {
  position: absolute; top: -5px; right: -7px; min-width: 16px; padding: 0 4px; border-radius: 999px;
  background: #c62f3c; color: #fff; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
}
.bell-pop {
  color: var(--ink); /* not the top bar's light text */
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60;
  width: min(420px, calc(100vw - 24px)); max-height: min(70vh, 560px); overflow: auto;
  border: 1px solid var(--ring); border-radius: 10px; background: var(--surface);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); text-align: left;
}
.bell-head {
  position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px; border-bottom: 1px solid var(--ring); background: var(--surface); font-size: 13.5px;
}
.bell-actions { display: flex; gap: 14px; }
.bell-pop .mlink { border: 0; background: none; padding: 0; color: var(--accent); font-size: 12px; cursor: pointer; }
.bell-pop .mlink:hover { text-decoration: underline; text-underline-offset: 2px; }
.bell-empty { margin: 0; padding: 14px 12px; font-size: 13px; color: var(--ink-2); }
.bell-list { list-style: none; margin: 0; padding: 0; }
.bell-li { position: relative; }
.bell-item {
  display: flex; flex-direction: column; gap: 2px; width: 100%; padding: 9px 34px 9px 12px;
  border: 0; border-bottom: 1px solid var(--ring); background: transparent; color: var(--ink); text-align: left; cursor: pointer;
}
.bell-item:hover { background: var(--row-alt); }
.bell-item.unread { box-shadow: inset 3px 0 0 var(--accent); }
.bell-item.unread .bell-line { font-weight: 600; }
.bell-line { font-size: 13px; }
.bell-where { font-size: 11px; color: var(--ink-2); }
.bell-x {
  position: absolute; top: 8px; right: 8px; z-index: 1; width: 22px; height: 22px; border: 0; border-radius: 50%;
  background: transparent; color: var(--ink-muted); font-size: 12px; line-height: 22px; cursor: pointer; opacity: 0;
}
.bell-li:hover .bell-x, .bell-x:focus-visible { opacity: 1; }
.bell-x:hover { background: var(--band); color: var(--ink); }
@media (hover: none) { .bell-x { opacity: 0.7; } }
.bell-prefs {
  position: sticky; bottom: 0; display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  padding: 9px 12px; border-top: 1px solid var(--ring); background: var(--surface); font-size: 12px; color: var(--ink-2);
}
.bell-prefs label { display: inline-flex; gap: 4px; align-items: center; color: var(--ink); cursor: pointer; }
.bell-off { color: var(--ink-muted); font-style: italic; }
@media (max-width: 700px) {
  .bell-pop { position: fixed; top: 12px; left: 8px; right: 8px; width: auto; max-height: calc(100dvh - 96px); }
}
/* a task opened from a notification: a brief highlight */
.tasks tr.flash > td { animation: flash 2.4s ease-out; }
@keyframes flash { 0%, 35% { background: var(--accent-wash); } 100% { background: transparent; } }

/* ================================================================ saving, visibly (19 Nov 2026) */
.notice.busy { background: var(--surface); color: var(--ink); border: 1px solid var(--ring); display: inline-flex; align-items: center; gap: 9px; }
.spinner { width: 14px; height: 14px; flex: none; border-radius: 50%; border: 2px solid var(--accent-wash); border-top-color: var(--accent); animation: spin 0.8s linear infinite; display: inline-block; }
.tasks tr.saving > td { opacity: 0.55; transition: opacity 0.2s; }
.note-box .composer { display: flex; align-items: center; }
.note-box .box-saving { display: none; align-items: center; gap: 7px; padding: 0 10px; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.note-box.saving .box-saving { display: inline-flex; }
.note-box.saving .note-input { color: var(--ink-2); }

/* ================================================================ a note on several tasks (19 Nov 2026) */
.bulk-inner .bulk-note-wrap { flex: 1 1 100%; display: flex; align-items: center; gap: 8px; }
.bulk-note-field { position: relative; flex: 1; display: flex; }
.bulk-note { flex: 1; font: inherit; font-size: 12.5px; padding: 5px 9px; border-radius: 6px; border: 1px solid var(--topbar-line); background: var(--surface); color: var(--ink); min-width: 0; }
.bulk-note:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.bulk .mention-list { position: absolute; left: 0; top: auto; bottom: calc(100% + 6px); max-height: 260px; overflow-y: auto; z-index: 31; background: var(--surface); color: var(--ink); border: 1px solid var(--ring); border-radius: 8px; box-shadow: 0 6px 18px rgba(11, 11, 11, 0.16); display: flex; flex-direction: column; min-width: 220px; }
.bulk .mention-list[hidden] { display: none; }
.bulk .mention-list button { text-align: left; padding: 7px 12px; font-size: 13px; color: var(--ink); }
.bulk .mention-list button:hover, .bulk .mention-list button:focus { background: var(--accent-wash); }

/* ================================================================ the Connect monday gate (19 Nov 2026) */
.mg-card { max-width: 460px; margin: 80px auto; display: grid; gap: 14px; text-align: center; background: var(--surface); border: 1px solid var(--ring); border-radius: 14px; padding: 28px 24px; box-shadow: var(--shadow); }
.mg-card h2 { margin: 0; font-size: 19px; font-weight: 800; }
.mg-card p { margin: 0; color: var(--ink-2); line-height: 1.5; }
.mg-mark { width: 44px; height: 44px; border-radius: 9px; justify-self: center; }
.mg-btn { justify-self: center; padding: 10px 22px; font-size: 14px; }
.mg-small { font-size: 12.5px; }
@media (max-width: 520px) { .mg-card { margin: 32px 0; } }
