/* Atlas application styles. Colours come from themes.css variables. */
:root {
  --atlas-header-h: 56px;
  --atlas-sidebar-w: 240px;
}
html,
body {
  height: 100%;
}
body {
  background: var(--bs-body-bg);
  font-size: 0.925rem;
}
:focus-visible {
  outline: 2px solid var(--atlas-focus);
  outline-offset: 2px;
}
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 2000;
  background: var(--atlas-accent);
  color: #fff;
  padding: 0.5rem 1rem;
}
.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}
.text-purple {
  color: #6e5dc6 !important;
}
[data-bs-theme='dark'] .text-purple {
  color: #b8acf6 !important;
}
.text-muted-2 {
  color: var(--atlas-muted) !important;
}

/* ── Header ── */
.atlas-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  height: var(--atlas-header-h);
  background: var(--atlas-header-bg);
  color: var(--atlas-header-fg);
  border-bottom: 1px solid var(--atlas-header-border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0.75rem;
}
.atlas-header a,
.atlas-header .btn-header {
  color: var(--atlas-header-fg);
}
/* primary action in the header keeps AA contrast in every theme */
.atlas-header a.btn-create,
.atlas-header a.btn-create:hover,
.atlas-header a.btn-create:focus-visible {
  color: #fff;
  background: #0a58ca;
  border-color: #0a58ca;
}
/* Entersoftone ES1 logo (625×384, transparent) */
.brand-logo {
  height: 30px;
  width: auto;
}
.brand-name {
  font-weight: 700;
  letter-spacing: 0.02em;
}
.auth-logo {
  height: 64px;
  width: auto;
}
.portal-powered-logo {
  height: 16px;
  width: auto;
  vertical-align: text-bottom;
}
[data-bs-theme='dark'] .brand-logo,
[data-bs-theme='dark'] .auth-logo,
[data-bs-theme='dark'] .portal-powered-logo {
  /* the logo blue is too dark on a dark header: lighten it */
  filter: brightness(1.6) saturate(0.9);
}
/* blue theme: the blue logo would vanish on the blue (#3273da) header, so it is shown at full brightness (white) */
[data-bs-theme='blue'] .atlas-header .brand-logo,
[data-bs-theme='blue'] .portal-powered-logo {
  filter: brightness(0) invert(1);
}
.atlas-header .brand {
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-right: 0.5rem;
}
.btn-header {
  background: transparent;
  border: 0;
  border-radius: 0.375rem;
  padding: 0.35rem 0.55rem;
  position: relative;
  line-height: 1.2;
}
.btn-header:hover,
.btn-header:focus-visible {
  background: rgba(127, 127, 127, 0.18);
}
.header-search {
  flex: 1 1 auto;
  max-width: 420px;
}
.header-search .form-control {
  height: 34px;
}
.badge-count {
  position: absolute;
  top: 0;
  right: 0;
  transform: translate(25%, -15%);
  font-size: 0.65rem;
}
.header-dropdown {
  width: 360px;
  max-height: 70vh;
  overflow: auto;
}

/* ── Shell ── */
.app-shell {
  display: flex;
  min-height: calc(100vh - var(--atlas-header-h));
}
.atlas-sidebar {
  width: var(--atlas-sidebar-w);
  flex: 0 0 var(--atlas-sidebar-w);
  background: var(--atlas-sidebar-bg);
  color: var(--atlas-sidebar-fg);
  border-right: 1px solid var(--atlas-border);
  padding: 0.75rem 0.5rem;
  position: sticky;
  top: var(--atlas-header-h);
  height: calc(100vh - var(--atlas-header-h));
  overflow-y: auto;
}
.atlas-sidebar.collapsed {
  display: none;
}
.atlas-sidebar .ws-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.5rem 0.75rem;
  font-weight: 600;
}
.atlas-sidebar a.nav-link {
  color: var(--atlas-sidebar-fg);
  border-radius: 0.375rem;
  padding: 0.4rem 0.6rem;
  display: flex;
  gap: 0.6rem;
  align-items: center;
}
.atlas-sidebar a.nav-link:hover {
  background: rgba(127, 127, 127, 0.15);
}
.atlas-sidebar a.nav-link.active {
  background: var(--atlas-sidebar-active-bg);
  color: var(--atlas-sidebar-active-fg);
  font-weight: 600;
}
/* Global left menu: collapsible groups with a right-aligned add (+) action, like Jira */
.atlas-sidebar {
  --atlas-sidebar-w: 300px;
}
.atlas-sidebar.collapsed-desktop {
  display: none;
}
.nav-group {
  margin-top: 0.35rem;
}
.nav-group-head {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  border-radius: 0.375rem;
}
.nav-group-head:hover,
.nav-group-head:focus-within {
  background: rgba(127, 127, 127, 0.1);
}
.nav-group-toggle {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: 0;
  color: var(--atlas-sidebar-fg);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.4rem 0.5rem;
  text-align: left;
  border-radius: 0.375rem;
}
.nav-chevron {
  font-size: 0.7rem;
  transition: transform 0.15s;
}
.nav-group-toggle[aria-expanded='false'] .nav-chevron {
  transform: rotate(-90deg);
}
.nav-group-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 0.3rem;
  background: transparent;
  color: var(--atlas-sidebar-fg);
  margin-right: 0.15rem;
  text-decoration: none;
}
.nav-group-action:hover,
.nav-group-action:focus-visible,
.nav-group-action[aria-expanded='true'] {
  background: rgba(127, 127, 127, 0.22);
  color: var(--atlas-sidebar-fg);
}
.nav-add-menu {
  font-size: 0.875rem;
  min-width: 13rem;
}
.nav-group > ul {
  padding-left: 0.6rem;
}
.nav-group > ul > li > a.nav-link {
  padding: 0.32rem 0.5rem;
  font-size: 0.875rem;
}
/* workspace rows: the actions (⋯) button appears on hover / keyboard focus */
.nav-ws-row {
  display: flex;
  align-items: center;
  border-radius: 0.375rem;
}
.nav-ws-row:hover {
  background: rgba(127, 127, 127, 0.12);
}
/* one hover surface per row: the link inside does not paint its own */
.atlas-sidebar .nav-ws-row a.nav-link:hover {
  background: transparent;
}
.nav-ws-row:not(:hover):not(:focus-within) .nav-ws-actions .nav-group-action:not([aria-expanded='true']) {
  opacity: 0;
}
@media (hover: none) {
  .nav-ws-row .nav-ws-actions .nav-group-action {
    opacity: 1 !important;
  }
}
.epic-menu {
  min-width: 15rem;
}
.epic-item .epic-menu-btn {
  opacity: 0.6;
}
.epic-item:hover .epic-menu-btn,
.epic-item:focus-within .epic-menu-btn,
.epic-menu-btn[aria-expanded='true'] {
  opacity: 1;
}
.atlas-sidebar a.nav-link.is-current {
  font-weight: 600;
}
.ws-subnav {
  margin: 0.15rem 0 0.35rem 1.1rem;
  padding-left: 0.4rem;
  border-left: 2px solid var(--atlas-border);
}
.ws-subnav a.nav-link {
  padding: 0.3rem 0.5rem;
  font-size: 0.85rem;
}
.atlas-sidebar a.nav-link-sub {
  padding-left: 1.6rem;
}
.atlas-sidebar a.nav-link-more {
  font-size: 0.8rem;
}
.nav-empty {
  font-size: 0.8rem;
  padding: 0.3rem 0.6rem;
  color: var(--atlas-muted);
}
.avatar-sm {
  width: 20px;
  height: 20px;
  font-size: 0.6rem;
}
.avatar-sm .bi {
  font-size: 0.65rem;
}
.atlas-sidebar .nav-section {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.9rem 0.6rem 0.3rem;
  opacity: 0.85;
}
main#main {
  flex: 1 1 auto;
  min-width: 0;
  padding: 1.25rem 1.5rem 3rem;
}
main#main:focus {
  outline: none;
}
.page-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.page-header h1 {
  font-size: 1.45rem;
  margin: 0;
  font-weight: 600;
}
.page-header .actions {
  margin-left: auto;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.breadcrumb {
  font-size: 0.82rem;
  margin-bottom: 0.25rem;
}

/* ── Surfaces ── */
.surface {
  background: var(--atlas-surface);
  border: 1px solid var(--atlas-border);
  border-radius: 0.5rem;
}
.surface-pad {
  padding: 1rem 1.25rem;
}
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--atlas-muted);
}
.empty-state .bi {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.5rem;
}

/* ── Avatars, chips, status ── */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 600;
  flex: 0 0 auto;
  vertical-align: middle;
}
.avatar-lg {
  width: 40px;
  height: 40px;
  font-size: 0.95rem;
}
.avatar-none {
  background: var(--atlas-todo-bg);
  color: var(--atlas-todo-fg);
}
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--tag-bg);
  color: var(--tag-fg);
  border-radius: 999px;
  padding: 0.05rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-decoration: none;
  line-height: 1.5;
}
a.tag-chip:hover {
  filter: brightness(0.95);
  color: var(--tag-fg);
}
.tag-chip button {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  line-height: 1;
}
.status-chip,
.status-todo,
.status-in_progress,
.status-archived,
.status-done {
  display: inline-block;
  border-radius: 0.25rem;
  padding: 0.05rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.status-todo {
  background: var(--atlas-todo-bg);
  color: var(--atlas-todo-fg);
}
.status-in_progress {
  background: var(--atlas-progress-bg);
  color: var(--atlas-progress-fg);
}
.status-done {
  background: var(--atlas-done-bg);
  color: var(--atlas-done-fg);
}
/* an idea's Archived status: grey, unlike Delivered (both are category done) */
.status-archived {
  background: var(--atlas-archived-bg);
  color: var(--atlas-archived-fg);
}
.status-chip {
  margin-left: 0.25rem;
}
.issue-key {
  font-family: var(--bs-font-monospace);
  font-size: 0.82rem;
  color: var(--atlas-muted);
  white-space: nowrap;
  text-decoration: none;
}
a.issue-key:hover,
a.issue-key:focus-visible {
  color: var(--atlas-accent);
  text-decoration: underline;
}
.mention {
  background: var(--atlas-public-bg);
  border-radius: 0.25rem;
  padding: 0 0.2rem;
}
.sla-badge {
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 0.25rem;
  padding: 0.05rem 0.4rem;
  white-space: nowrap;
}
.sla-ok {
  background: var(--atlas-done-bg);
  color: var(--atlas-done-fg);
}
.sla-at_risk {
  background: #f8e6a0;
  color: #533f04;
}
.sla-breached {
  background: #ffd5d2;
  color: #5d1f1a;
}
.sla-met,
.sla-paused,
.sla-none {
  background: var(--atlas-todo-bg);
  color: var(--atlas-todo-fg);
}

/* ── Tables / lists ── */
.table-issues td,
.table-issues th {
  vertical-align: middle;
}
.table-issues tr.selected,
.table-issues tr.selected > td {
  background: var(--atlas-sidebar-active-bg);
  color: var(--atlas-sidebar-active-fg);
}
.table-issues tr.selected a,
.table-issues tr.selected .issue-key {
  color: inherit;
}
/* .text-muted-2 is !important elsewhere; selected rows need the active foreground for contrast */
.table-issues tr.selected .text-muted-2 {
  color: var(--atlas-sidebar-active-fg) !important;
}
.table-issues .title-cell {
  max-width: 480px;
}
.table-issues .epic-cell {
  max-width: 8rem;
}
/* The epic of a task, as bordered text */
.epic-chip {
  display: inline-block;
  flex: 0 1 auto;
  max-width: 11rem;
  padding: 0 0.35rem;
  border: 1px solid #6e5dc6;
  border-radius: 0.25rem;
  color: var(--bs-body-color);
  font-size: 0.75rem;
  line-height: 1.35rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
  text-decoration: none;
}
[data-bs-theme='dark'] .epic-chip {
  border-color: #b8acf6;
}
a.epic-chip:hover,
a.epic-chip:focus-visible {
  text-decoration: underline;
}
.table-issues .epic-cell .epic-chip {
  max-width: 7rem;
}
/* The date an open task or ticket should have been finished by, as red bordered text */
.due-expired {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 0.25rem;
  padding: 0 0.35rem;
  border: 1px solid var(--bs-danger);
  border-radius: 0.25rem;
  color: var(--bs-danger-text-emphasis);
  font-size: 0.75rem;
  line-height: 1.35rem;
  white-space: nowrap;
}
.title-extras {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
}
/* In a backlog row the title gives way first, so the epic stays readable */
.backlog-row .epic-chip {
  flex: none;
  max-width: 9rem;
}
.selected .epic-chip,
.selected .due-expired {
  color: inherit;
}
/* Scrum All issues has more columns: the title takes what is left and long texts shorten, so all columns stay on screen */
.table-issues-scrum .title-cell {
  width: 100%;
  min-width: 10rem;
  max-width: 0;
}
.table-issues-scrum .product-cell {
  max-width: 7rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.title-cell a {
  color: inherit;
  text-decoration: none;
}
.title-cell a:hover {
  text-decoration: underline;
}

/* ── Split list + detail ── */
.split {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(380px, 1.15fr);
  gap: 1rem;
  align-items: start;
}
.split.no-detail {
  grid-template-columns: 1fr;
}
.detail-panel {
  position: sticky;
  top: calc(var(--atlas-header-h) + 0.75rem);
  max-height: calc(100vh - var(--atlas-header-h) - 1.5rem);
  overflow-y: auto;
  resize: horizontal;
}
.detail-panel:empty {
  display: none;
}
@media (max-width: 991.98px) {
  .split {
    grid-template-columns: 1fr;
  }
  .split.has-detail > .split-list {
    display: none;
  }
  .detail-panel {
    position: static;
    max-height: none;
  }
  .atlas-sidebar {
    display: none;
  }
  .atlas-sidebar.mobile-open {
    display: block;
    position: fixed;
    z-index: 1029;
    left: 0;
  }
  main#main {
    padding: 1rem;
  }
}

/* ── Issue detail ── */
.issue-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1.25rem;
}
.detail-panel .issue-detail {
  grid-template-columns: 1fr;
}
@media (max-width: 1199.98px) {
  .issue-detail {
    grid-template-columns: 1fr;
  }
}
.issue-title-input {
  font-size: 1.4rem;
  font-weight: 600;
  border: 1px solid transparent;
  padding: 0.15rem 0.35rem;
  margin-left: -0.35rem;
  width: 100%;
  background: transparent;
  color: inherit;
  border-radius: 0.375rem;
}
.issue-title-input:hover {
  background: var(--atlas-surface-2);
}
.issue-title-input:focus {
  border-color: var(--atlas-focus);
  background: var(--atlas-surface);
  outline: none;
}
.field-list dt {
  font-size: 0.78rem;
  color: var(--atlas-muted);
  font-weight: 600;
  margin-top: 0.75rem;
}
.field-list dd {
  margin-bottom: 0;
}
.save-indicator {
  font-size: 0.75rem;
  color: var(--atlas-muted);
  min-height: 1rem;
}
.markdown-body {
  overflow-wrap: anywhere;
}
.markdown-body img {
  max-width: 100%;
}
.markdown-body pre {
  background: var(--atlas-surface-2);
  border: 1px solid var(--atlas-border);
  padding: 0.75rem;
  border-radius: 0.375rem;
}
.markdown-body table {
  border-collapse: collapse;
  margin-bottom: 1rem;
}
.markdown-body th,
.markdown-body td {
  border: 1px solid var(--atlas-border);
  padding: 0.35rem 0.6rem;
}
.markdown-body blockquote {
  border-left: 4px solid var(--atlas-border);
  padding: 0.25rem 1rem;
  color: var(--atlas-muted);
}
.markdown-body blockquote.callout {
  color: inherit;
  border-radius: 0.375rem;
}
.callout-info {
  border-left-color: #579dff !important;
  background: var(--atlas-public-bg);
}
.callout-warning {
  border-left-color: #e2b203 !important;
  background: var(--atlas-internal-bg);
}
.callout-success {
  border-left-color: #22a06b !important;
  background: var(--atlas-done-bg);
  color: var(--atlas-done-fg) !important;
}
.markdown-body li.task-list-item {
  list-style: none;
  margin-left: -1.25rem;
}
.wiki-missing {
  text-decoration: underline dotted;
  color: var(--atlas-danger-fg);
}
/* Comments already written: no border, a slightly darker background and side margins, so they do not look like the new comment box */
:root,
[data-bs-theme='light'],
[data-bs-theme='blue'] {
  --atlas-comment-bg: color-mix(in srgb, var(--atlas-surface) 95%, #000);
}
[data-bs-theme='dark'] {
  --atlas-comment-bg: color-mix(in srgb, var(--atlas-surface) 93%, #fff);
}
.comment {
  border: 0;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  margin: 0 1.25rem 0.75rem;
  background: var(--atlas-comment-bg);
}
.comment.public {
  background: var(--atlas-public-bg);
}
.reply-box.mode-public textarea {
  border-color: var(--atlas-public-border);
}
.reply-box.mode-internal textarea {
  border-color: var(--atlas-internal-border);
  background: var(--atlas-internal-bg);
}

/* ── Board ── */
.board {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  align-items: flex-start;
}
.board-column {
  background: var(--atlas-column-bg);
  border-radius: 0.5rem;
  min-width: 270px;
  width: 270px;
  flex: 0 0 270px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 210px);
}
/* Roadmap: the columns share the whole width and reach the bottom of the window; each scrolls on its own */
.board-full {
  align-items: stretch;
  padding-bottom: 0;
  /* --board-h is set by app.js to what is left of the window below the board, so the page itself never scrolls */
  height: var(--board-h, calc(100vh - 250px));
}
.board-full .board-column {
  flex: 1 1 270px;
  width: auto;
  height: auto;
  max-height: none;
}
main#main:has(> .board-full) { padding-bottom: 0.25rem; }
/* Not on roadmap: no background, as it is not part of the roadmap */
/* Roadmap slides: one page per year, like slides of a presentation, with the ideas not on them beside */
.rs-page { padding-right: 20.25rem; }
.rs-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.rs-slides { display: grid; gap: 1.5rem; min-width: 0; }
.rs-slide { display: flex; flex-direction: column; aspect-ratio: 16 / 9; width: 100%; min-width: 0; box-sizing: border-box; padding: 1rem 1.25rem; background: var(--atlas-surface); border: 1px solid var(--atlas-border); border-radius: 0.25rem; box-shadow: 0 2px 10px rgba(9, 30, 66, 0.15); }
.rs-slide-title { margin: 0 0 0.6rem; font-size: 1.25rem; font-weight: 700; }
.rs-cross { display: grid; flex: 1 1 auto; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(9rem, 1fr)); }
.rs-q { min-width: 0; padding: 0.6rem 0.75rem; }
.rs-q:nth-child(odd) { border-right: 2px solid var(--atlas-border); }
.rs-q:nth-child(-n + 2) { border-bottom: 2px solid var(--atlas-border); }
.rs-q-title { margin: 0 0 0.4rem; font-size: 0.9rem; font-weight: 700; }
.rs-idea { position: relative; margin-bottom: 0.4rem; padding: 0.35rem 0.5rem; background: var(--atlas-dates-bg); border-radius: 0.25rem; font-size: 0.8rem; overflow-wrap: anywhere; }
.rs-card:has(.rs-handle) .rs-idea { padding-left: 1.4rem; }
.rs-handle { position: absolute; top: 0.25rem; left: 0.2rem; color: var(--bs-secondary-color); cursor: grab; }
.rs-handle:active { cursor: grabbing; }
.rs-idea-name { color: inherit; text-decoration: none; }
.rs-idea-name:hover { text-decoration: underline; }
/* always in view, whatever is scrolled */
.rs-side { position: fixed; top: calc(var(--atlas-header-h) + 0.75rem); right: 1.5rem; bottom: 0.75rem; width: 19rem; overflow-y: auto; z-index: 5; }
/* While a card is dragged over a slide its placeholder takes no room, so the slides below do not move away under the pointer */
.rs-slides .sortable-ghost { height: 0; min-height: 0; margin: 0; padding: 0; overflow: hidden; border-top: 3px solid var(--atlas-focus); border-radius: 0; }
.rs-drop { min-height: 3rem; height: 100%; }
.rs-q { display: flex; flex-direction: column; }
.rs-q .rs-drop { flex: 1 1 auto; }
/* T-0388: on the page a slide stays 16:9 however many ideas a year holds: aspect-ratio's automatic minimum let the cards stretch the
   slide (1.05 with 11 ideas). Now a quarter that holds more cards than fit continues them in further full-width columns to the right,
   scrolled sideways inside the quarter (scrollbar as the cue; links inside, so keyboard reachable). Sideways, not up/down: a vertical
   wheel over a slide still scrolls the page (an inner vertical scroller took the wheel). 20rem floor for narrow columns.
   Not in the HTML export (no .rs-page) or print, where every card stays visible. */
@media screen and (min-width: 992px) {
  .rs-page .rs-slide { min-height: 20rem; overflow: hidden; }
  .rs-page .rs-cross { flex: 1 1 0; min-height: 0; grid-template-rows: repeat(2, minmax(0, 1fr)); }
  .rs-page .rs-q { min-height: 0; }
  .rs-page .rs-q .rs-drop { flex: 1 1 0; height: auto; min-height: 3rem; columns: 1; column-fill: auto; column-gap: 0.75rem; overflow-x: auto; overflow-y: hidden; }
  .rs-page .rs-q .rs-drop > .rs-card { break-inside: avoid; }
}
@media (max-width: 991.98px) {
  .rs-page { padding-right: 0; }
  .rs-slide { aspect-ratio: auto; }
  .rs-side { position: static; width: auto; }
}
/* An idea's quarter moves: later than first planned in red, sooner in green */
.moved-badge { display: inline-block; padding: 0 0.4rem; border: 1px solid currentColor; border-radius: 0.25rem; font-size: 0.72rem; font-weight: 600; line-height: 1.5; }
.moved-later { color: #ae2e24; }
.moved-sooner { color: #216e4e; }
[data-bs-theme='dark'] .moved-later { color: #ff9c8f; }
[data-bs-theme='dark'] .moved-sooner { color: #7ee2b8; }
.board-column-outside {
  background: transparent;
}
.board-full .board-cards {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}
.board-column.wip-exceeded {
  background: var(--atlas-wip-over);
}
.board-column-header {
  padding: 0.6rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--atlas-muted);
  display: flex;
  justify-content: space-between;
}
.board-cards {
  padding: 0 0.5rem 0.5rem;
  min-height: 60px;
  overflow-y: auto;
  flex: 1 1 auto;
}
.board-card {
  background: var(--atlas-card-bg);
  border: 1px solid var(--atlas-border);
  border-radius: 0.375rem;
  padding: 0.55rem 0.65rem;
  margin-bottom: 0.5rem;
  box-shadow: 0 1px 1px rgba(9, 30, 66, 0.12);
  cursor: grab;
}
.board-card:focus-within,
.board-card:hover {
  border-color: var(--atlas-focus);
}
.board-card .card-title {
  font-size: 0.875rem;
  margin-bottom: 0.4rem;
  display: block;
  color: inherit;
  text-decoration: none;
}
.board-card.sortable-ghost {
  opacity: 0.4;
}
.swimlane-title {
  font-weight: 600;
  margin: 1rem 0 0.5rem;
}
.points-badge {
  background: var(--atlas-todo-bg);
  color: var(--atlas-todo-fg);
  border-radius: 999px;
  font-size: 0.7rem;
  padding: 0 0.45rem;
  font-weight: 600;
}

/* ── Backlog ── */
.backlog-section {
  margin-bottom: 1rem;
}
.backlog-section > summary {
  list-style: none;
  cursor: pointer;
  padding: 0.6rem 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
/* Tabs of a task or ticket: a slightly darker band (lighter in the dark theme), the open tab joins the content below */
:root,
[data-bs-theme='light'],
[data-bs-theme='blue'] {
  --atlas-tabs-bg: color-mix(in srgb, var(--atlas-surface) 93%, #000);
}
[data-bs-theme='dark'] {
  --atlas-tabs-bg: color-mix(in srgb, var(--atlas-surface) 90%, #fff);
}
.issue-tabs {
  gap: 0.15rem;
  padding: 0.35rem 0.35rem 0;
  border-radius: 0.4rem 0.4rem 0 0;
  background: var(--atlas-tabs-bg);
}
.issue-tabs .nav-link {
  color: var(--bs-body-color);
  font-size: 0.875rem;
  padding: 0.4rem 0.75rem;
}
.issue-tabs .nav-link:hover {
  background: color-mix(in srgb, var(--atlas-surface) 55%, transparent);
  border-color: transparent;
}
.issue-tabs .nav-link.active {
  background: var(--atlas-surface);
  border-color: var(--bs-border-color) var(--bs-border-color) var(--atlas-surface);
  box-shadow: inset 0 2px 0 var(--atlas-accent);
  font-weight: 600;
}
/* Sprint report: the tile that sums up the sprint stands apart from the others */
.surface.tile-forecast {
  background: color-mix(in srgb, var(--atlas-surface) 86%, var(--atlas-accent));
  border-color: var(--atlas-accent);
}
.tile-forecast .text-muted-2 {
  color: var(--bs-body-color) !important;
}
/* SLA column: first response and resolution, as two light dots; the dates show on hover */
.sla-dots {
  display: inline-flex;
  gap: 0.3rem;
  padding: 0.2rem;
  cursor: help;
  vertical-align: middle;
}
.sla-dot {
  width: 0.75rem;
  height: 0.75rem;
  border: 1px solid transparent;
  border-radius: 50%;
}
.sla-dot-good {
  background: #6fd39b;
  border-color: #2f9e62;
}
.sla-dot-bad {
  background: #f58a8a;
  border-color: #d64545;
}
.sla-dot-none {
  background: transparent;
  border-color: var(--atlas-muted);
}
/* Sub-tabs inside the Comments tab of a ticket */
.comment-subtabs .nav-link {
  padding: 0.25rem 0.7rem;
  font-size: 0.85rem;
  color: var(--bs-body-color);
}
.comment-subtabs .nav-link.active {
  background: var(--atlas-tabs-bg);
  color: var(--bs-body-color);
  font-weight: 600;
}
/* Editable drop-down: as wide as its field, and long lists scroll */
.typeahead-open-list {
  width: 100%;
  max-height: 16rem;
  overflow-y: auto;
}
.typeahead-open-list .dropdown-item {
  white-space: normal;
}
.typeahead-open-list .dropdown-item small {
  display: block;
  margin-left: 0 !important;
}
/* The lighter sprint panel of the dark theme needs a lighter red for its text to stay readable */
:root:not([data-bs-theme='dark']) .sprint-section .btn-outline-danger:not(:hover):not(:active) {
  color: #a52834;
  border-color: #a52834;
}
[data-bs-theme='dark'] .sprint-section .btn-outline-danger:not(:hover):not(:active) {
  color: #ffb3b8;
  border-color: #ffb3b8;
}
/* Quick filter of the backlog panel: top right, outside <summary> (no nested interactive content) */
.backlog-section:has(> .backlog-quick) {
  position: relative;
}
.backlog-section:has(> .backlog-quick) > summary {
  padding-right: 11rem;
}
.backlog-quick {
  position: absolute;
  top: 0.35rem;
  right: 0.9rem;
}
.backlog-section > summary::-webkit-details-marker {
  display: none;
}
.backlog-list {
  min-height: 42px;
  border-top: 1px solid var(--atlas-border);
}
.backlog-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.9rem;
  /* T-0100 (the user): no separator lines between backlog rows */
  background: var(--atlas-surface);
}
.backlog-row.selected {
  background: var(--atlas-sidebar-active-bg);
}
.backlog-row .title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.drag-handle {
  cursor: grab;
  color: var(--atlas-muted);
}
.inline-create {
  padding: 0.35rem 0.9rem;
}

/* ── Progress (no inline styles under CSP: width via classes) ── */
.progress-bar[class*='w-pct-'] {
  transition: width 0.2s;
}

/* ── Toasts ── */
.toast-container {
  z-index: 1090;
}

/* ── KB ── */
.kb-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 220px;
  gap: 1.25rem;
}
@media (max-width: 1199.98px) {
  .kb-layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }
  .kb-toc {
    display: none;
  }
}
@media (max-width: 767.98px) {
  .kb-layout {
    grid-template-columns: 1fr;
  }
}
.page-tree ul {
  list-style: none;
  padding-left: 0.9rem;
  margin: 0;
}
.page-tree > ul {
  padding-left: 0;
}
.page-tree a {
  display: block;
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
  color: inherit;
  text-decoration: none;
  font-size: 0.875rem;
}
.page-tree a.active {
  background: var(--atlas-sidebar-active-bg);
  color: var(--atlas-sidebar-active-fg);
  font-weight: 600;
}
.diff-add {
  background: var(--atlas-done-bg);
  color: var(--atlas-done-fg);
}
.diff-del {
  background: #ffd5d2;
  color: #5d1f1a;
  text-decoration: line-through;
}
.diff-view {
  white-space: pre-wrap;
  font-family: var(--bs-font-monospace);
  font-size: 0.82rem;
}

/* ── Messages ── */
.messages-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 1rem;
  min-height: 70vh;
}
@media (max-width: 767.98px) {
  .messages-layout {
    grid-template-columns: 1fr;
  }
}
.thread-list a {
  display: block;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--atlas-border);
  color: inherit;
  text-decoration: none;
}
.thread-list a.active {
  background: var(--atlas-sidebar-active-bg);
}
.thread-list a.unread .thread-subject {
  font-weight: 700;
}
.msg {
  margin-bottom: 0.9rem;
}
.msg-mine .msg-body {
  background: var(--atlas-public-bg);
}
.msg-body {
  border: 1px solid var(--atlas-border);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  display: inline-block;
  max-width: 100%;
}
.rich-card {
  border: 1px solid var(--atlas-border);
  border-radius: 0.375rem;
  padding: 0.4rem 0.6rem;
  display: inline-flex;
  gap: 0.5rem;
  align-items: center;
  margin: 0.25rem 0;
}

/* ── Discovery matrix ── */
.matrix {
  position: relative;
  aspect-ratio: 1.6;
  border: 1px solid var(--atlas-border);
  border-radius: 0.5rem;
  background: var(--atlas-surface);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(5, 1fr);
}
.matrix-cell {
  border: 1px dashed var(--atlas-border);
  padding: 0.25rem;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 0.25rem;
  overflow: auto;
}
.matrix-dot {
  background: var(--atlas-accent);
  color: #fff;
  border-radius: 999px;
  font-size: 0.7rem;
  padding: 0.05rem 0.45rem;
  text-decoration: none;
  cursor: grab;
}
.matrix-dot:hover {
  color: #fff;
  filter: brightness(1.1);
}

/* Impact × effort table (server-rendered, drop targets per cell) */
.matrix-table {
  --atlas-matrix-line: #ffffff;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0.6rem;
  border-color: var(--atlas-matrix-line);
}
[data-bs-theme='dark'] .matrix-table {
  --atlas-matrix-line: #161a1d;
}
.matrix-table > :not(caption) > * > * {
  border-color: var(--atlas-matrix-line);
}
.matrix-table th[scope='row'],
.matrix-table thead th:first-child {
  width: 6.5rem;
}
.matrix-table td {
  min-width: 160px;
  height: 92px;
}
.matrix-quick-win {
  --bs-table-bg: var(--atlas-done-bg);
  background: var(--atlas-done-bg);
}
.matrix-big-bet {
  --bs-table-bg: var(--atlas-progress-bg);
  background: var(--atlas-progress-bg);
}
.matrix-fill-in {
  --bs-table-bg: var(--atlas-todo-bg);
  background: var(--atlas-todo-bg);
}
.matrix-money-pit {
  --bs-table-bg: var(--atlas-wip-over);
  background: var(--atlas-wip-over);
}
.matrix-chip {
  background-color: inherit;
  background-image: linear-gradient(var(--atlas-matrix-chip-tint), var(--atlas-matrix-chip-tint));
  width: 100%;
  overflow-wrap: anywhere;
 
  border-radius: 0.25rem;
  padding: 0.7rem 0.45rem;
  margin-bottom: 0.25rem;
  font-size: 0.75rem;
  color: inherit;
  text-decoration: none;
}
/* each idea is a darker tone of its cell's colour, so it follows the cell when dragged */
:root {
  --atlas-matrix-chip-tint: rgba(9, 30, 66, 0.18);
}
[data-bs-theme='dark'] {
  --atlas-matrix-chip-tint: rgba(0, 0, 0, 0.4);
}
/* the pills' own colours fall short of AA on this background: they take the chip's text colour */
.matrix-chip .product-pill,
.matrix-chip .dimension-pill {
  color: inherit;
}
/* each idea of a timeline quarter is its own tinted card */
.timeline-record {
  background: var(--atlas-dates-bg);
  border: 1px solid var(--atlas-border);
  border-radius: 0.375rem;
  padding: 0.4rem 0.6rem;
  margin-bottom: 0.5rem;
  overflow-wrap: anywhere;
}
.timeline-record:last-child {
  margin-bottom: 0;
}
.matrix-chip-product {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  margin-top: 0.15rem;
  white-space: normal;
}
/* Idea Dimension, beside the product pill */
.dimension-pill {
  display: inline-block;
  padding: 0 0.5rem;
  border: 1px solid currentColor;
  border-radius: 1rem;
  font-size: 0.72rem;
  line-height: 1.4;
  vertical-align: middle;
}
.dimension-functional { color: #0052cc; }
.dimension-framework { color: #5e2ca5; }
[data-bs-theme='dark'] .dimension-functional { color: #85b8ff; }
[data-bs-theme='dark'] .dimension-framework { color: #c9a7ff; }
.matrix-chip[draggable='true'] {
  cursor: grab;
}
.matrix-zones { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 0.5rem 1rem; }
.matrix-zone { font-size: 0.85rem; }
.matrix-legend {
  display: inline-block;
  width: 0.8rem;
  height: 0.8rem;
  border: 1px solid var(--atlas-border);
  vertical-align: middle;
}
.board-column-title {
  padding: 0.6rem 0.75rem;
  margin: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Wizard steps */
.stepper {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  counter-reset: step;
}
.stepper li {
  counter-increment: step;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--atlas-border);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--atlas-muted);
}
.stepper li::before {
  content: counter(step) '. ';
}
.stepper li.done {
  background: var(--atlas-done-bg);
  color: var(--atlas-done-fg);
}
.stepper li.current {
  border-color: var(--atlas-focus);
  color: inherit;
  font-weight: 600;
}

/* Discovery timeline */
/* The timeline: one line across, the quarters in turn above and below it, scrolling sideways */
.htl {
  position: relative;
  overflow-x: auto;
  padding: 0.75rem;
  border-radius: 0.5rem;
  background: #f9f9f9;
}
[data-bs-theme='dark'] .htl {
  background: rgba(255, 255, 255, 0.05);
}
:root:not([data-bs-theme='dark']) .htl-unscheduled {
  background: #e9ebee;
  border: 0;
  box-shadow: none;
}
.htl-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(17rem, 21rem);
  grid-template-rows: auto 3.25rem auto;
  column-gap: 1rem;
  width: max-content;
  min-width: 100%;
}
.htl-q {
  display: grid;
  grid-row: 1 / -1;
  grid-template-rows: subgrid;
}
.timeline-controls > form[role='search'] {
  margin-bottom: 0 !important;
}
.htl-group > summary {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0;
  cursor: pointer;
  font-weight: 600;
}
.htl-family > summary {
  font-size: 0.9rem;
}
.htl-product {
  margin-left: 0.75rem;
}
.htl-product > summary {
  font-size: 0.8rem;
}
.htl-family + .htl-family {
  margin-top: 0.5rem;
}
.htl-panel {
  min-width: 0;
}
.htl-above .htl-panel {
  grid-row: 1;
  align-self: end;
}
.htl-below .htl-panel {
  grid-row: 3;
  align-self: start;
}
.htl-marker {
  grid-row: 2;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* the line itself: each piece also covers the gap to the next quarter */
.htl-marker::before {
  content: '';
  position: absolute;
  left: -0.5rem;
  right: -0.5rem;
  top: 50%;
  border-top: 3px solid var(--atlas-border);
}
.htl-q:first-child .htl-marker::before {
  left: 0;
}
.htl-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.85rem;
  height: 0.85rem;
  margin: -0.425rem 0 0 -0.425rem;
  border-radius: 50%;
  background: var(--bs-secondary-color);
}
/* the quarter's name sits on the side of the line away from its panel */
.htl-label {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}
.htl-above .htl-label {
  top: 62%;
}
.htl-below .htl-label {
  bottom: 62%;
}
.htl-now .htl-dot {
  background: var(--atlas-focus, var(--bs-primary));
  width: 1.1rem;
  height: 1.1rem;
  margin: -0.55rem 0 0 -0.55rem;
}
.timeline-current {
  border: 2px solid var(--atlas-focus);
}

/* ── Calendar (server rendered month grid) ── */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-left: 1px solid var(--atlas-border);
  border-top: 1px solid var(--atlas-border);
}
.cal-grid > div {
  border-right: 1px solid var(--atlas-border);
  border-bottom: 1px solid var(--atlas-border);
  min-height: 110px;
  padding: 0.25rem;
  background: var(--atlas-surface);
  font-size: 0.78rem;
}
.cal-grid > .cal-head {
  min-height: 0;
  font-weight: 700;
  text-align: center;
  background: var(--atlas-surface-2);
}
.cal-grid > .cal-out {
  background: var(--atlas-surface-2);
  color: var(--atlas-muted);
}
.cal-grid > .cal-today {
  outline: 2px solid var(--atlas-accent);
  outline-offset: -2px;
}
.cal-event {
  display: block;
  border-radius: 0.25rem;
  padding: 0 0.3rem;
  margin-top: 0.15rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
  background: var(--atlas-progress-bg);
  color: var(--atlas-progress-fg);
}
/* Scrum calendar: the sprint group on a faded tint; the rest collapsed, with its counts */
.cal-grp-sprint { padding: 0.15rem 0.25rem; border-radius: 0.25rem; background: rgba(0, 82, 204, 0.08); }
[data-bs-theme='dark'] .cal-grp-sprint { background: rgba(133, 184, 255, 0.12); }
details.cal-grp-none > summary { cursor: pointer; }
.cal-grp-count { font-weight: 400; }
.cal-event.cal-sprint {
  background: var(--atlas-done-bg);
  color: var(--atlas-done-fg);
}
.cal-event.cal-version {
  background: #dfd8fd;
  color: #352c63;
}
.cal-drop-target.drag-over {
  background: var(--atlas-sidebar-active-bg);
}

/* Scrum calendar: each day holds two groups of task cards ("In a sprint", "Not in a sprint") */
/* position: the visually-hidden day names inside are absolute and must be clipped by this box, not widen the page */
.cal-scroll { position: relative; overflow-x: auto; }
.cal-scroll:focus-visible { outline: 2px solid var(--atlas-focus); outline-offset: 2px; }
@media (max-width: 767.98px) {
  .cal-grid-scrum { min-width: 58rem; }
}
.cal-grp { margin-top: 0.2rem; min-width: 0; }
.cal-grp + .cal-grp { margin-top: 0.4rem; padding-top: 0.25rem; border-top: 1px dashed var(--atlas-border); }
.cal-grp-h { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--atlas-muted); }
.cal-task {
  margin-top: 0.2rem;
  padding: 0.2rem 0.3rem;
  min-width: 0;
  border: 1px solid var(--atlas-border);
  border-radius: 0.25rem;
  background: var(--atlas-card-bg);
  color: var(--bs-body-color);
  line-height: 1.25;
}
.cal-task-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  font-weight: 600;
  color: inherit;
  text-decoration: none;
}
a.cal-task-title:hover, a.cal-task-title:focus-visible { text-decoration: underline; }
.cal-task-title .issue-key { font-size: 0.72rem; white-space: normal; }
.cal-task-when { font-size: 0.68rem; color: var(--atlas-muted); }
.cal-task-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.2rem; margin-top: 0.15rem; min-width: 0; }
.cal-task-meta > [class*='status-'] { max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-size: 0.65rem; }
.cal-task-meta .product-pill { font-size: 0.68rem; }
.cal-task-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.25rem; margin-top: 0.15rem; font-size: 0.7rem; }
.cal-task-owner { display: flex; align-items: center; gap: 0.25rem; min-width: 0; flex: 1 1 auto; }
.cal-task-owner-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-task-hours { flex: none; white-space: nowrap; font-weight: 600; color: var(--atlas-muted); }
.cal-list-tasks { max-width: 28rem; }
/* the example calendars in the manual */
.cal-sample .cal-grid > div { min-height: 0; }
.cal-sample-tag { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--atlas-muted); }
.cal-sample .cal-bar { cursor: default; }
@media (max-width: 767.98px) {
  .cal-sample .cal-grid { min-width: 52rem; }
}

/* ── Misc ── */
.kbd-help kbd {
  min-width: 1.6rem;
  display: inline-block;
  text-align: center;
}
.inline-confirm {
  border: 1px solid #e34935;
  background: #ffeceb;
  color: #5d1f1a;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
}
[data-bs-theme='dark'] .inline-confirm {
  background: #42221f;
  color: #ffd5d2;
}
.code-block {
  font-family: var(--bs-font-monospace);
  font-size: 0.82rem;
  white-space: pre-wrap;
  word-break: break-all;
  background: var(--atlas-surface-2);
  border: 1px solid var(--atlas-border);
  border-radius: 0.375rem;
  padding: 0.75rem;
}
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.auth-card {
  width: 100%;
  max-width: 420px;
}
.chart-box {
  position: relative;
  height: 320px;
}
.chart-box-sm {
  position: relative;
  height: 220px;
}
.strength-meter {
  height: 6px;
}
.htmx-indicator {
  opacity: 0;
  transition: opacity 0.2s;
}
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  opacity: 1;
}
.skeleton {
  background: linear-gradient(90deg, var(--atlas-surface-2), var(--atlas-border), var(--atlas-surface-2));
  background-size: 200% 100%;
  animation: skeleton 1.2s infinite;
  border-radius: 0.25rem;
  min-height: 1rem;
}
@keyframes skeleton {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
.cursor-pointer {
  cursor: pointer;
}
.min-w-0 {
  min-width: 0;
}
.fs-xs {
  font-size: 0.75rem;
}
.fs-sm {
  font-size: 0.85rem;
}
.mw-reading {
  max-width: 820px;
}

/* ── Print (KB "save as PDF") ── */
@media print {
  .atlas-header,
  .atlas-sidebar,
  .skip-link,
  .toast-container,
  .d-print-none {
    display: none !important;
  }
  main#main {
    padding: 0;
  }
  .kb-layout {
    display: block;
  }
  .surface {
    border: 0;
  }
  a[href^='http']::after {
    content: ' (' attr(href) ')';
    font-size: 0.8em;
  }
}

/* Quick-filter avatars: selection is shown with a ring, not by fading (fading broke text contrast) */
.avatar-toggle .avatar {
  box-shadow: 0 0 0 2px transparent;
}
.avatar-toggle.is-on .avatar {
  box-shadow:
    0 0 0 2px var(--atlas-surface),
    0 0 0 4px var(--atlas-focus);
}

/* Security rows in the audit log */
.row-security > td {
  background: var(--atlas-internal-bg);
}

/* ── Workspace background (Settings → Appearance); values are applied by app.js ── */
.ws-bg {
  position: fixed;
  inset: calc(var(--ws-blur, 0px) * -2);
  z-index: -1;
  background-color: var(--ws-color, transparent);
  background-image: var(--ws-image, none);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(var(--ws-blur, 0px));
}
body:has(> .ws-bg) {
  background: transparent;
}
body:has(> .ws-bg) main#main {
  background: color-mix(in srgb, var(--bs-body-bg) var(--ws-overlay, 60%), transparent);
}
.bg-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.bg-swatch {
  width: 30px;
  height: 30px;
  border-radius: 0.375rem;
  border: 1px solid var(--atlas-border);
  cursor: pointer;
}
.btn-check:checked + .bg-swatch {
  box-shadow:
    0 0 0 2px var(--atlas-surface),
    0 0 0 4px var(--atlas-focus);
}
.btn-check:focus-visible + .bg-swatch {
  outline: 2px solid var(--atlas-focus);
  outline-offset: 2px;
}
.bg-thumb {
  width: 120px;
  height: 72px;
  object-fit: cover;
  border-radius: 0.375rem;
  border: 1px solid var(--atlas-border);
}
.bg-preview {
  position: relative;
  height: 220px;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid var(--atlas-border);
}
.bg-preview-layer {
  position: absolute;
  inset: calc(var(--ws-blur, 0px) * -2);
  background-color: var(--ws-color, transparent);
  background-image: var(--ws-image, none);
  background-size: cover;
  background-position: center;
  filter: blur(var(--ws-blur, 0px));
}
.bg-preview-card {
  position: absolute;
  inset: 40px 30px;
  border-radius: 0.375rem;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background: color-mix(in srgb, var(--bs-body-bg) var(--ws-overlay, 60%), transparent);
}

/* Backlog: epic drop target and long row menus */
.epic-item {
  border-radius: 0.375rem;
  padding: 0.15rem;
}
.epic-item.drop-hover {
  outline: 2px dashed var(--atlas-focus);
  background: rgba(127, 127, 127, 0.12);
}
.row-menu {
  max-height: 60vh;
  overflow-y: auto;
}
.ic-epic {
  max-width: 11rem;
}

/* Backlog: issue detail opens beside the backlog; full width when nothing is selected */
.split-backlog:has(> .detail-panel:empty) {
  grid-template-columns: 1fr;
}
.split-backlog {
  grid-template-columns: minmax(420px, 1.3fr) minmax(380px, 1fr);
}

/* Collapsed epics panel: a closed vertical bookmark on the left */
.epic-bookmark {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 34px;
  padding: 0.6rem 0;
  border: 1px solid var(--atlas-border);
  border-left: 3px solid #6e5dc6;
  border-radius: 0 0.5rem 0.5rem 0;
  background: var(--atlas-surface);
  color: var(--atlas-sidebar-fg);
  text-decoration: none;
  position: sticky;
  top: calc(var(--atlas-header-h) + 0.75rem);
}
.epic-bookmark:hover,
.epic-bookmark:focus-visible {
  background: rgba(127, 127, 127, 0.12);
  color: var(--atlas-sidebar-fg);
}
.epic-bookmark .bi {
  color: #6e5dc6;
}
.epic-bookmark-text {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* Issue detail: planned vs actual dates in a tinted panel
   (slightly darker than the page in light/blue themes, slightly lighter in dark) */
:root,
[data-bs-theme='light'],
[data-bs-theme='blue'] {
  --atlas-dates-bg: rgba(9, 30, 66, 0.06);
  --atlas-dates-border: rgba(9, 30, 66, 0.12);
}
[data-bs-theme='dark'] {
  --atlas-dates-bg: rgba(255, 255, 255, 0.06);
  --atlas-dates-border: rgba(255, 255, 255, 0.12);
}
.dates-panel {
  background: var(--atlas-dates-bg);
  border: 1px solid var(--atlas-dates-border);
  border-radius: 0.5rem;
  padding: 0.6rem 0.7rem 0.7rem;
  margin: 0.6rem 0;
}
.dates-panel-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--atlas-muted);
  margin-bottom: 0.35rem;
}
.date-field .form-control {
  min-width: 0;
}
/* our calendar button replaces the browser's own icon here, leaving room for the full date */
.date-field input[type='date']::-webkit-calendar-picker-indicator {
  display: none;
}
.date-field input[type='date'] {
  padding-right: 0.35rem;
}

/* Backlog sprint panels: borderless, tinted (#f9f9f9 in light/blue, a little lighter than the surface in dark) */
:root,
[data-bs-theme='light'],
[data-bs-theme='blue'] {
  --atlas-sprint-bg: color-mix(in srgb, var(--bs-body-bg) 94%, #000);
}
[data-bs-theme='dark'] {
  --atlas-sprint-bg: color-mix(in srgb, var(--bs-body-bg) 90%, #fff);
}
.backlog-section.sprint-section {
  border: 0;
  background: var(--atlas-sprint-bg);
}
.sprint-section .backlog-list {
  border-top: 0;
}
/* T-0104, the user (2026-11-19): the open Backlog panel has no border either (collapsed keeps its closed-panel edge) */
.backlog-section:not(.sprint-section)[open] {
  border: 0;
}
.backlog-section:not(.sprint-section) .backlog-list {
  border-top: 0;
}
/* T-0104, the user (2026-11-19): the All issues list panel has no border and no rounded corners */
.issues-list-surface,
.issues-list-surface .table-responsive,
.issues-list-surface .table-issues {
  border: 0;
  border-radius: 0;
}
/* T-0104, the user (2026-11-19): the row lines of the All issues list are light grey on light themes, dark grey on dark */
.issues-list-surface .table-issues {
  --bs-table-border-color: #e3e6ea;
}
[data-bs-theme='dark'] .issues-list-surface .table-issues {
  --bs-table-border-color: #3a3f46;
}
.issues-list-surface .table-issues > :not(caption) > * > * {
  border-bottom-color: var(--bs-table-border-color);
}
/* Backlog with no sprint: a "No sprint found" sprint panel holding Create sprint */
.sprint-empty {
  border: 1px dashed var(--atlas-border) !important;
}
.sprint-empty-body {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  padding: 1rem 1.25rem;
}
.sprint-empty-icon {
  font-size: 1.75rem;
  color: var(--atlas-accent);
}
.sprint-section .backlog-row > .row-num,
.sprint-section .backlog-row.is-child > .row-num {
  background: var(--atlas-sprint-bg);
}

/* ── Scrollbars: thin and theme-coloured everywhere ── */
:root,
[data-bs-theme='light'] {
  --atlas-scroll-thumb: rgba(9, 30, 66, 0.28);
  --atlas-scroll-thumb-hover: rgba(9, 30, 66, 0.45);
}
[data-bs-theme='blue'] {
  --atlas-scroll-thumb: rgba(12, 74, 160, 0.32);
  --atlas-scroll-thumb-hover: rgba(12, 74, 160, 0.5);
}
[data-bs-theme='dark'] {
  --atlas-scroll-thumb: rgba(255, 255, 255, 0.22);
  --atlas-scroll-thumb-hover: rgba(255, 255, 255, 0.38);
}
* {
  scrollbar-width: thin;
  scrollbar-color: var(--atlas-scroll-thumb) transparent;
}
/* the left menu follows its own (possibly dark) background */
.atlas-sidebar,
.atlas-sidebar * {
  scrollbar-color: color-mix(in srgb, var(--atlas-sidebar-fg) 35%, transparent) transparent;
}
/* fallback for browsers without scrollbar-width / scrollbar-color */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--atlas-scroll-thumb);
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--atlas-scroll-thumb-hover);
}

/* Issue detail: Epic area above Subtasks */
.epic-area {
  padding: 0.35rem 0;
}
.epic-area-progress {
  height: 4px;
}
.epic-picker {
  position: relative;
}
.epic-picker > summary {
  list-style: none;
}
.epic-picker > summary::-webkit-details-marker {
  display: none;
}
.epic-picker-form {
  position: absolute;
  right: 0;
  z-index: 20;
  width: 18rem;
  padding: 0.75rem;
  background: var(--atlas-surface);
  border: 1px solid var(--atlas-border);
  border-radius: 0.5rem;
  box-shadow: 0 6px 18px rgba(9, 30, 66, 0.15);
}
/* keep AA contrast for outline buttons on the tinted sprint background */
:root .sprint-section .btn-outline-secondary,
[data-bs-theme='light'] .sprint-section .btn-outline-secondary {
  --bs-btn-color: #545b62;
  --bs-btn-border-color: #545b62;
}
:root .sprint-section .btn-outline-success,
[data-bs-theme='light'] .sprint-section .btn-outline-success {
  --bs-btn-color: #146c43;
  --bs-btn-border-color: #146c43;
}
[data-bs-theme='dark'] .sprint-section .btn-outline-secondary {
  --bs-btn-color: #adb5bd;
  --bs-btn-border-color: #8c959f;
}
[data-bs-theme='dark'] .sprint-section .btn-outline-success {
  --bs-btn-color: #75b798;
  --bs-btn-border-color: #75b798;
}

/* Backlog: drop target that turns the dragged task into a subtask */
.backlog-row.subtask-target {
  position: relative;
  outline: 2px dashed var(--atlas-focus);
  outline-offset: -2px;
  background: color-mix(in srgb, var(--atlas-focus) 10%, var(--atlas-surface));
}
.backlog-row.subtask-target::after {
  content: attr(data-subtask-hint);
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  padding: 0.15rem 0.5rem;
  border-radius: 0.25rem;
  background: #0a58ca;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  pointer-events: none;
  white-space: nowrap;
}

/* "Created by NAME · date" above the description: small, grey, read-only */
.created-stamp {
  font-size: 0.78rem;
  color: var(--atlas-muted);
  margin: -0.25rem 0 0.75rem;
}

/* Issue lists: an opened issue always sits to the right on wide screens (also after htmx loads it) */
@media (min-width: 992px) {
  .split.no-detail:has(> .detail-panel:not(:empty)) {
    grid-template-columns: minmax(320px, 1fr) minmax(380px, 1.15fr);
  }
}
/* Row numbers: first column, small grey text on a slightly darker cell */
.table-issues .row-num-col,
.table-issues td.row-num {
  width: 1%;
  text-align: right;
  font-size: 0.72rem;
  color: var(--atlas-muted);
  background: var(--atlas-dates-bg);
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  white-space: nowrap;
}

/* Headings inside issue descriptions and comments stay proportionate to the panel */
.issue-detail .markdown-body h1 {
  font-size: 1.3rem;
}
.issue-detail .markdown-body h2 {
  font-size: 1.15rem;
}
.issue-detail .markdown-body h3 {
  font-size: 1.05rem;
}
.issue-detail .markdown-body h4,
.issue-detail .markdown-body h5,
.issue-detail .markdown-body h6 {
  font-size: 0.95rem;
}

/* Left menu workspaces: chevron to expand several at once; long names wrap (max two lines) */
.nav-ws-chevron {
  flex: 0 0 auto;
  width: 22px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0.3rem;
  background: transparent;
  color: var(--atlas-sidebar-fg);
  padding: 0;
}
.nav-ws-chevron:hover,
.nav-ws-chevron:focus-visible {
  background: rgba(127, 127, 127, 0.22);
}
.nav-ws-chevron .bi {
  font-size: 0.7rem;
  transition: transform 0.15s;
}
.nav-ws-chevron[aria-expanded='true'] .bi {
  transform: rotate(90deg);
}
.nav-ws-row > a.nav-link {
  padding-left: 0.3rem;
}
.nav-ws-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.ws-subnav {
  margin-left: 1.6rem;
}

/* Backlog: running row number and subtasks indented under their parent */
.backlog-row > .row-num {
  flex: 0 0 auto;
  min-width: 1.9rem;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin: -0.35rem 0 -0.35rem -0.9rem;
  padding: 0 0.45rem;
  font-size: 0.72rem;
  color: var(--atlas-muted);
  background: var(--atlas-dates-bg);
}
.backlog-row.is-child {
  padding-left: 2.6rem;
  background: color-mix(in srgb, var(--atlas-surface) 92%, var(--atlas-muted));
}
.backlog-row.is-child > .row-num {
  background: transparent;
  margin-left: -1.7rem;
  min-width: 1.4rem;
}

/* Workspace summary: who updated, epic and tags under each recently updated issue */
.recent-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0.75rem;
  font-size: 0.75rem;
  color: var(--atlas-muted);
  min-width: 0;
}
.recent-meta > span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.recent-meta .tag-chip {
  font-size: 0.68rem;
}

/* Owner & participants: overlapping round photos/initials with a hover / focus card */
.people-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem 0;
  padding-left: 0.35rem;
}
.person {
  position: relative;
  display: inline-flex;
  margin-left: -0.35rem;
}
.person-face {
  display: inline-flex;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--atlas-surface);
  cursor: default;
}
.person-face .avatar {
  width: 30px;
  height: 30px;
  font-size: 0.72rem;
}
.person.is-owner .person-face {
  box-shadow:
    0 0 0 2px var(--atlas-surface),
    0 0 0 4px #0a58ca;
  margin-right: 0.35rem;
}
.person-face:focus-visible {
  outline: 2px solid var(--atlas-focus);
  outline-offset: 2px;
}
.person:hover,
.person:focus-within {
  z-index: 5;
}
.avatar-photo {
  object-fit: cover;
  border-radius: 50%;
  display: inline-block;
}
.people-sep {
  width: 0.6rem;
}
.person-card {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  width: 15rem;
  padding: 0.6rem 0.7rem;
  background: var(--atlas-surface);
  color: var(--bs-body-color);
  border: 1px solid var(--atlas-border);
  border-radius: 0.5rem;
  box-shadow: 0 8px 22px rgba(9, 30, 66, 0.18);
}
.person:hover .person-card,
.person:focus-within .person-card {
  display: block;
}
.person-card-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.profile-photo {
  width: 64px;
  height: 64px;
  font-size: 1.3rem;
}
/* whole backlog rows can be dragged */
.backlog-list .backlog-row[data-id] {
  cursor: grab;
}
.backlog-list .backlog-row[data-id] a,
.backlog-list .backlog-row[data-id] button,
.backlog-list .backlog-row[data-id] input {
  cursor: pointer;
}

/* Backlog drag: landing spot indicators (rows do not shift while dragging) */
.backlog-row.drop-above {
  box-shadow: inset 0 3px 0 0 #0a58ca;
}
.backlog-row.drop-below {
  box-shadow: inset 0 -3px 0 0 #0a58ca;
}
.backlog-list.drop-into {
  outline: 2px dashed #0a58ca;
  outline-offset: -2px;
}

/* Issue detail: Status (left) and Priority (right) as matching columns, caption above the control */
.status-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}
.status-col-end {
  text-align: right;
}
/* Assignee + participants panel with compact dropdown pickers */
.people-panel {
 /* border: 1px solid var(--atlas-border);
  border-radius: 0.5rem;*/
  padding: 0.45rem 0.6rem;
}
.people-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 38px;
}
.people-row + .people-row {
 /* border-top: 1px solid var(--atlas-border);*/
}
.people-label {
  flex: 0 0 5.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--atlas-muted);
}
.people-row .people-strip {
  flex: 1 1 auto;
  min-width: 0;
}
.people-owner-name {
  font-size: 0.85rem;
  margin-left: 0.15rem;
}
.people-add {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--atlas-border);
  border-radius: 50%;
  background: var(--atlas-surface);
  color: var(--bs-body-color);
}
.people-add:hover,
.people-add:focus-visible,
.people-add[aria-expanded='true'] {
  border-color: #0a58ca;
  color: #0a58ca;
}
.people-menu {
  max-height: 18rem;
  overflow-y: auto;
  min-width: 14rem;
  max-width: 18rem;
}

/* Issue detail: subtasks as bordered rows with a remove (x) action */
.subtask-list {
  border: 1px solid var(--atlas-border);
  border-radius: 0.5rem;
  overflow: hidden;
}
.subtask-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
}
.subtask-item + .subtask-item {
  border-top: 1px solid var(--atlas-border);
}
.subtask-item .subtask-title {
  flex: 1 1 auto;
  min-width: 0;
}
.subtask-item:hover {
  background: rgba(127, 127, 127, 0.06);
}

/* All issues: subtasks indented under their parent */
.table-issues tr.is-child-row > td.title-cell {
  padding-left: 1.6rem;
}
.table-issues tr.is-child-row > td {
  background: color-mix(in srgb, var(--atlas-surface) 92%, var(--atlas-muted));
}
.table-issues tr.is-child-row.selected > td {
  background: var(--atlas-sidebar-active-bg);
}

/* Backlog sprint header: one toolbar row; form panels open below it */
.sprint-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
.sprint-panel {
  padding-top: 0.5rem;
}

/* ── Rich HTML editor (version release content) ── */
.text-prewrap {
  white-space: pre-wrap;
}
.rich-editor {
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  background: var(--bs-body-bg);
}
.rich-toolbar {
  gap: 0.25rem;
  padding: 0.375rem;
  border-bottom: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius) var(--bs-border-radius) 0 0;
}
.rich-area {
  min-height: 220px;
  max-height: 70vh;
  overflow: auto;
  padding: 0.75rem 1rem;
  outline: none;
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
}
.rich-area:focus-visible {
  box-shadow: inset 0 0 0 2px var(--bs-primary);
}
.rich-area.is-dragover {
  box-shadow: inset 0 0 0 2px var(--bs-success);
}
.rich-area img,
.rich-content img {
  max-width: 100%;
  height: auto;
}
.rich-source {
  border: 0;
  border-radius: 0 0 var(--bs-border-radius) var(--bs-border-radius);
  min-height: 220px;
  font-size: 0.85rem;
}
.rich-editor.is-busy .rich-area {
  opacity: 0.7;
}
.crumb-switch {
  font-size: inherit;
  vertical-align: baseline;
  text-decoration: none;
}
.crumb-menu {
  max-height: 60vh;
  overflow: auto;
}

/* ── Sprint screen: tags column and SPRINT MATRIX ── */
.table-issues td.tags-cell {
  max-width: 14rem;
}
.sprint-matrix-table {
  font-size: 0.85rem;
  width: auto;
  min-width: 100%;
}
.sprint-matrix-table th,
.sprint-matrix-table td {
  vertical-align: middle;
  white-space: nowrap;
}
.sprint-matrix-table thead th {
  background: var(--bs-tertiary-bg);
}
.sprint-matrix-table .group-cell {
  background: var(--bs-tertiary-bg);
}
.sprint-matrix-table td.is-zero {
  color: var(--atlas-muted);
}
.sprint-matrix-table td.has-delayed {
  color: var(--bs-danger-text-emphasis);
  background: var(--bs-danger-bg-subtle);
  font-weight: 600;
}
.sprint-matrix-table td.has-complete {
  color: var(--bs-success-text-emphasis);
  background: var(--bs-success-bg-subtle);
  font-weight: 600;
}
.sprint-matrix-table td.has-on_time {
  color: var(--bs-primary-text-emphasis);
  font-weight: 600;
}
.sprint-matrix-table tfoot th,
.sprint-matrix-table tfoot td {
  border-top-width: 2px;
}
@media print {
  body.print-only * {
    visibility: hidden;
  }
  body.print-only .print-target,
  body.print-only .print-target * {
    visibility: visible;
  }
  body.print-only .print-target {
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    border: 0;
    box-shadow: none;
  }
  body.print-only .print-target .table-responsive {
    overflow: visible;
  }
}

/* ── Markdown editor (EasyMDE) follows the theme: light, dark and blue ── */
.EasyMDEContainer .editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  padding: 4px 6px;
  background: var(--bs-tertiary-bg);
  border-color: var(--bs-border-color);
  opacity: 1;
}
.EasyMDEContainer .editor-toolbar button {
  color: var(--bs-body-color);
  border: 1px solid transparent;
}
.EasyMDEContainer .editor-toolbar button:hover,
.EasyMDEContainer .editor-toolbar button.active {
  background: var(--bs-secondary-bg);
  border-color: var(--bs-border-color);
}
.EasyMDEContainer .editor-toolbar i.separator {
  border-left: 1px solid var(--bs-border-color);
  border-right: 0;
  height: 18px;
  margin: 0 4px;
}
.EasyMDEContainer .CodeMirror {
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
  border-color: var(--bs-border-color);
}
.EasyMDEContainer .CodeMirror-cursor {
  border-left-color: var(--bs-body-color);
}
.EasyMDEContainer .CodeMirror-selected,
.EasyMDEContainer .CodeMirror-focused .CodeMirror-selected {
  background: var(--bs-primary-bg-subtle);
}
.EasyMDEContainer .CodeMirror .cm-header,
.EasyMDEContainer .CodeMirror .cm-strong {
  color: var(--bs-emphasis-color);
}
.EasyMDEContainer .CodeMirror .cm-link,
.EasyMDEContainer .CodeMirror .cm-url {
  color: var(--bs-link-color);
}
.EasyMDEContainer .CodeMirror .cm-comment {
  background: var(--bs-tertiary-bg);
  color: var(--bs-body-color);
}
.EasyMDEContainer .editor-preview,
.EasyMDEContainer .editor-preview-side {
  background: var(--bs-tertiary-bg);
  color: var(--bs-body-color);
  border-color: var(--bs-border-color);
}
.EasyMDEContainer .CodeMirror img,
.EasyMDEContainer .editor-preview img {
  max-width: 100%;
}

/* links on the yellow internal-note background need the darker link shade for AA contrast */
.comment.internal a:not(.btn),
.callout-warning a:not(.btn) {
  color: var(--bs-link-hover-color);
}

/* Workflow transitions editor: inline edit panel */
.tr-edit {
  position: relative;
}
.tr-edit > summary {
  list-style: none;
}
.tr-edit > summary::-webkit-details-marker {
  display: none;
}
.tr-edit-form {
  position: absolute;
  right: 0;
  z-index: 5;
  width: 16rem;
  box-shadow: var(--bs-box-shadow);
}

/* SLA: the policy and the two clocks share one compact row */
.sla-timers {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.5rem;
}
.sla-policy,
.sla-clock {
  flex: 1 1 11rem;
  min-width: 0;
  padding: 0.3rem 0.625rem;
  border-radius: 0.5rem;
}
.sla-policy {
  flex-grow: 0;
  flex-basis: 9rem;
  border: 1px solid var(--bs-border-color);
}
.sla-policy-name {
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.3;
}
.sla-clock {
  border-left: 3px solid currentColor;
}
.sla-clock-label {
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}
.sla-clock-time {
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}
.sla-clock-sub {
  font-size: 0.6875rem;
}

/* Diagrams (escalation flow, email pipeline): a tinted panel — a bit darker than the page in light
   themes, a bit brighter in the dark theme */
.escalation-flow {
  background: var(--atlas-flow-bg);
  border: 1px solid var(--atlas-flow-border);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
}

.reply-box.mode-internal textarea {
  border-color: var(--bs-border-color);
  background: var(--bs-body-bg);
}
[data-bs-theme='dark'] .sla-clock.sla-breached {
  background: #5d1f1a;
  color: #ffd5d2;
}
[data-bs-theme='dark'] .sla-clock.sla-at_risk {
  background: #533f04;
  color: #f8e6a0;
}
.sla-clock.sla-met-ok {
  background: var(--atlas-done-bg);
  color: var(--atlas-done-fg);
}

/* Queue lists: condensed ticket flow (origin → reply → development → outcome) */
.flow-cell {
  white-space: nowrap;
  width: 1%;
}
.flow-skeleton {
  display: inline-block;
  width: 7rem;
  height: 0.9rem;
  border-radius: 0.45rem;
  background: linear-gradient(90deg, var(--bs-tertiary-bg), var(--bs-secondary-bg), var(--bs-tertiary-bg));
  background-size: 200% 100%;
  animation: flow-shimmer 1.2s linear infinite;
  vertical-align: middle;
}
@keyframes flow-shimmer {
  to {
    background-position: -200% 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .flow-skeleton {
    animation: none;
  }
}
/* Multiselect dropdown (workspace products) */
.multiselect-toggle {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.multiselect-menu {
  width: 100%;
  max-height: 18rem;
  overflow-y: auto;
}
.multiselect-menu .form-check {
  padding-left: 2rem;
}

/* ── Calendars: start-date bars, my work log, email counts ── */
.cal-bar {
  display: block;
  height: 1.15rem;
  line-height: 1.15rem;
  margin: 0.15rem -0.25rem 0;
  padding: 0 0.3rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 0.72rem;
  color: var(--bs-body-color);
  text-decoration: none;
}
.bar-wait {
  background: rgba(253, 126, 20, 0.28);
}
.bar-late {
  /* still semi-transparent, dark enough for white text (WCAG AA) */
  background: rgba(176, 42, 55, 0.85);
  color: #fff;
}
.bar-work {
  background: var(--bs-primary-bg-subtle);
}
/* planned but not started: outline only (blue is kept for tickets that really started) */
.bar-plan {
  background: transparent;
  outline: 1px dashed var(--bs-secondary-color);
  outline-offset: -1px;
}
.cal-bar.bar-start,
.cal-bar.bar-planned,
.cal-bar.bar-due {
  border-radius: 0.25rem;
  margin-left: 0;
  margin-right: 0;
  font-weight: 600;
}
.bar-start {
  background: var(--bs-primary);
  color: #fff;
}
.bar-planned {
  background: rgba(253, 126, 20, 0.55);
}
.bar-due {
  background: var(--bs-secondary-bg);
  border: 1px solid var(--bs-border-color);
}
.cal-swatch {
  display: inline-block;
  width: 1.2rem;
  height: 0.75rem;
  border-radius: 0.2rem;
  vertical-align: middle;
}
.cal-total {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0 0.35rem;
  border-radius: 1rem;
  background: var(--bs-primary-bg-subtle);
  color: var(--bs-primary-text-emphasis);
}
.wl-event {
  white-space: normal;
  background: var(--bs-tertiary-bg);
  border-left: 3px solid var(--bs-primary);
}
.wl-time {
  font-weight: 700;
}
.wl-product {
  display: block;
  font-size: 0.66rem;
  color: var(--atlas-muted);
}
.cal-compact > div:not(.cal-head) {
  min-height: 64px;
}
.mail-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-width: 1.6rem;
  height: 1.6rem;
  padding: 0 0.3rem;
  border-radius: 1rem;
  font-size: 0.72rem;
  font-weight: 700;
  border: 2px solid currentColor;
}
.mail-in {
  color: var(--bs-primary-text-emphasis);
  background: var(--bs-primary-bg-subtle);
}
.mail-out {
  color: var(--bs-success-text-emphasis);
  background: var(--bs-success-bg-subtle);
}
.mail-event.mail-linked,
.mail-row.mail-linked {
  border-left: 3px solid var(--bs-success);
  background: var(--bs-success-bg-subtle);
}
.mail-event.mail-unlinked,
.mail-row.mail-unlinked {
  border-left: 3px solid #fd7e14;
  background: var(--bs-warning-bg-subtle);
}
.mail-event {
  color: var(--bs-body-color);
}
.mail-swatch {
  display: inline-block;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 0.2rem;
  vertical-align: middle;
}
.mail-swatch.mail-linked {
  background: var(--bs-success-bg-subtle);
  border-left: 3px solid var(--bs-success);
}
.mail-swatch.mail-unlinked {
  background: var(--bs-warning-bg-subtle);
  border-left: 3px solid #fd7e14;
}
.mail-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-bottom: 1px solid var(--atlas-border);
  min-width: 0;
}
.email-cal a.fw-semibold {
  color: inherit;
  text-decoration: none;
}
.email-cal a.fw-semibold:hover,
.email-cal a.fw-semibold:focus-visible {
  text-decoration: underline;
}

/* Issue side column: sprint + story points on one row, labelled like the other fields */
.field-label {
  display: block;
  font-size: 0.78rem;
  color: var(--atlas-muted);
  font-weight: 600;
  margin: 0.75rem 0 0.15rem;
}

/* SPRINT MATRIX: matrix | resize handle | tasks of the selected cell (default 50 / 50) */
.matrix-split {
  display: grid;
  grid-template-columns: var(--split-left, 50%) 10px minmax(0, 1fr);
  align-items: start;
}
.matrix-split.is-resizing {
  user-select: none;
  cursor: col-resize;
}
.split-handle {
  align-self: stretch;
  min-height: 8rem;
  cursor: col-resize;
  position: relative;
  touch-action: none;
}
.split-handle::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 4px;
  width: 2px;
  border-radius: 1px;
  background: var(--bs-border-color);
}
.split-handle:hover::before,
.split-handle:focus-visible::before,
.matrix-split.is-resizing .split-handle::before {
  background: var(--bs-primary);
  width: 4px;
  left: 3px;
}
.split-handle:focus-visible {
  outline: none;
}
.matrix-detail {
  position: sticky;
  top: calc(var(--atlas-header-h) + 0.75rem);
  max-height: calc(100vh - var(--atlas-header-h) - 1.5rem);
  overflow-y: auto;
}
.matrix-cell-link {
  display: block;
  margin: -0.25rem;
  padding: 0.25rem;
  color: inherit;
  text-decoration: underline dotted;
  border-radius: 0.2rem;
}
.matrix-cell-link:hover,
.matrix-cell-link:focus-visible {
  text-decoration: underline;
  outline: 2px solid var(--bs-primary);
  outline-offset: -2px;
}
.matrix-cell-link.is-selected {
  outline: 2px solid var(--bs-primary);
  outline-offset: -2px;
  background: var(--bs-primary-bg-subtle);
  color: var(--bs-primary-text-emphasis);
}
@media (max-width: 991.98px) {
  .matrix-split {
    grid-template-columns: 1fr;
  }
  .split-handle {
    display: none;
  }
  .matrix-detail {
    position: static;
    max-height: none;
    margin-top: 1rem;
  }
}
@media print {
  .matrix-split {
    display: block;
  }
}

/* ── Customer portal: logo top-left and the header band ── */
.portal-logo {
  height: 28px;
  width: auto;
}
.portal-hero {
  --hero-color: transparent;
  --hero-image: none;
  background-color: var(--hero-color);
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  min-height: 9rem;
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
}
.portal-hero[data-portal-hero='plain'],
.portal-hero[data-portal-hero='none'] {
  background-color: var(--bs-tertiary-bg);
}
.portal-hero[data-portal-hero='image']::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}
.portal-hero[data-tone='dark'][data-portal-hero='image']::before {
  background: rgba(255, 255, 255, 0.45);
}
.portal-hero > * {
  position: relative;
}
.portal-hero-text {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 700;
  margin: 0;
}
.portal-hero-sub {
  font-size: 1.05rem;
  margin: 0.4rem 0 0;
}
.portal-hero[data-tone='light'] {
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}
.portal-hero[data-tone='dark'] {
  color: #172b4d;
}
.portal-hero[data-portal-hero='plain'][data-tone='light'],
.portal-hero[data-portal-hero='none'][data-tone='light'] {
  color: var(--bs-body-color);
  text-shadow: none;
}
.portal-hero-preview {
  border-radius: 0.5rem;
  border: 1px solid var(--bs-border-color);
  min-height: 7rem;
}

/* Invite page: choose team member or customer user */
.invite-kinds {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.75rem;
}
.invite-kind {
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
  padding: 0.75rem 0.75rem 0.75rem 2.25rem;
  margin: 0;
}
.invite-kind:has(input:checked) {
  border-color: var(--bs-primary);
  background: var(--bs-primary-bg-subtle);
}
.invite-kind:has(input:checked) .text-muted-2 {
  color: var(--bs-primary-text-emphasis) !important; /* .text-muted-2 is !important */
}

/* Admin → Email → Setup: the three ways to send (links styled like .invite-kind) */
.invite-kind.email-option {
  padding-left: 0.75rem;
}
.email-option:hover {
  border-color: var(--bs-primary);
}
.email-option.is-current {
  border-color: var(--bs-primary);
  background: var(--bs-primary-bg-subtle);
}
.email-option.is-current .text-muted-2 {
  color: var(--bs-primary-text-emphasis) !important;
}

/* Email templates: placeholder chips in the mail editor, live preview, logo */
.mail-insert {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid var(--bs-border-color);
  background: var(--bs-tertiary-bg);
}
.mail-chip {
  font-family: var(--bs-font-monospace);
  font-size: 0.75rem;
  padding: 0.05rem 0.4rem;
}
.tpl-preview-box {
  overflow: hidden;
}
.tpl-preview-frame {
  display: block;
  width: 100%;
  height: 46rem;
  border: 0;
  border-top: 1px solid var(--bs-border-color);
  background: #f1f4f8;
}
.tpl-logo-box {
  background: #ffffff;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.375rem;
  padding: 0.5rem;
  text-align: center;
}
.tpl-logo {
  height: 3rem;
  width: auto;
}

/* Email settings: Power Automate guides */
.pa-steps > li {
  margin-bottom: 0.75rem;
}
.pa-code {
  position: relative;
  margin-top: 0.4rem;
}
.pa-copy {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
}
.pa-values {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.35rem 1rem;
  font-size: 0.875rem;
}
.pa-values dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.pa-guide code {
  overflow-wrap: anywhere;
}

/* My Calendar: assigned tickets on their timeline (two rows), weekends in grey */
.cal-grid > .cal-weekend {
  background: var(--bs-secondary-bg);
}
.cal-grid > .cal-weekend.cal-out {
  background: var(--bs-tertiary-bg);
}
.mc-item {
  display: block;
  margin: 0.15rem -0.25rem 0;
  padding: 0.1rem 0.3rem;
  font-size: 0.72rem;
  line-height: 1.25;
  color: var(--bs-body-color);
  text-decoration: none;
  overflow: hidden;
  border-left: 3px solid transparent;
}
.mc-item:hover .mc-title,
.mc-item:focus-visible .mc-title {
  text-decoration: underline;
}
.mc-item.bar-created,
.mc-item.bar-logged {
  background: var(--bs-tertiary-bg);
  border-left-color: var(--bs-secondary);
  margin-left: 0;
  margin-right: 0;
  border-radius: 0.2rem;
}
.mc-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  margin: 0.1rem 0;
}
.mc-label {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0 0.35rem;
  border-radius: 0.6rem;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.4;
}
.mc-label-est {
  background: var(--bs-warning-bg-subtle);
  color: var(--bs-warning-text-emphasis);
  border: 1px solid var(--bs-warning-border-subtle);
}
.mc-label-act {
  background: var(--bs-primary);
  color: #fff;
}
.mc-item.bar-start,
.mc-item.bar-planned,
.mc-item.bar-due {
  margin-left: 0;
  margin-right: 0;
  border-radius: 0.2rem;
}
.mc-item.bar-start {
  background: var(--bs-primary-bg-subtle);
  border-left-color: var(--bs-primary);
  color: var(--bs-primary-text-emphasis);
}
.mc-item.bar-late {
  background: rgba(220, 53, 69, 0.22);
  color: var(--bs-body-color);
}
.mc-item.bar-due {
  background: var(--bs-danger-bg-subtle);
  border-left-color: var(--bs-danger);
  color: var(--bs-danger-text-emphasis);
}
.mc-row1 {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
}
.mc-title {
  overflow: hidden;
  text-overflow: ellipsis;
}
.mc-time {
  margin-left: auto;
  font-weight: 700;
  padding-left: 0.25rem;
}
.mc-row2 {
  display: block;
  font-size: 0.64rem;
  color: var(--atlas-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mc-item.bar-start .mc-row2,
.mc-item.bar-due .mc-row2 {
  color: inherit;
  opacity: 0.85;
}
.mc-nowork {
  color: var(--bs-danger);
}
.pa-summary {
  cursor: pointer;
  list-style-position: outside;
}
.pa-summary::marker {
  color: var(--bs-primary);
}
details[open] > .pa-summary {
  margin-bottom: 0.25rem;
}
.pa-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--bs-primary);
  color: #fff;
  font-size: 0.8rem;
  margin-right: 0.35rem;
}

/* Ticket → Emails tab: the conversation */
.email-thread-item {
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--bs-border-color);
  border-left-width: 4px;
  border-radius: 0.4rem;
  margin-bottom: 0.5rem;
}
.email-thread-item.is-in {
  border-left-color: var(--bs-primary);
}
.email-thread-item.is-out {
  border-left-color: var(--bs-success);
  margin-left: 1.5rem;
}
.email-dir {
  display: inline-flex;
  width: 1.4rem;
  height: 1.4rem;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.8rem;
  flex: none;
}
.email-dir-in {
  background: var(--bs-primary-bg-subtle);
  color: var(--bs-primary-text-emphasis);
}
.email-dir-out {
  background: var(--bs-success-bg-subtle);
  color: var(--bs-success-text-emphasis);
}
.email-thread-subject {
  max-width: 70%;
}
.email-thread-snippet {
  color: var(--bs-secondary-color);
  margin-top: 0.15rem;
}

/* Email screen: conversation (oldest first, older emails collapsed) and reply box */
.conv-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.conv-item {
  border: 1px solid var(--bs-border-color);
  border-left-width: 4px;
  border-radius: 0.45rem;
  background: var(--bs-body-bg);
}
.conv-item.is-in {
  border-left-color: var(--bs-primary);
}
.conv-item.is-out {
  border-left-color: var(--bs-success);
  margin-left: 1.5rem;
}
.conv-item.is-current {
  box-shadow: 0 0 6px 3px var(--bs-success);
}
.conv-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  cursor: pointer;
  list-style: none;
}
.conv-head::-webkit-details-marker {
  display: none;
}
.conv-avatar {
  display: inline-flex;
  flex: none;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}
.conv-avatar-in {
  background: var(--bs-primary-bg-subtle);
  color: var(--bs-primary-text-emphasis);
}
.conv-avatar-out {
  background: var(--bs-success-bg-subtle);
  color: var(--bs-success-text-emphasis);
}
.conv-who {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.conv-snippet {
  color: var(--bs-secondary-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.conv-msg[open] .conv-snippet {
  display: none;
}
.conv-body {
  padding: 0 0.75rem 0.75rem 3.35rem;
}
.conv-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.conv-quoted > summary {
  display: inline-block;
  padding: 0 0.45rem;
  border-radius: 0.3rem;
  background: var(--bs-tertiary-bg);
  cursor: pointer;
  list-style: none;
}
.conv-quoted > summary::-webkit-details-marker {
  display: none;
}
.conv-quoted .conv-text {
  color: var(--bs-secondary-color);
  border-left: 3px solid var(--bs-border-color);
  padding-left: 0.6rem;
}
.conv-images {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.conv-images img {
  max-width: 220px;
  max-height: 160px;
  border-radius: 0.3rem;
  border: 1px solid var(--bs-border-color);
}
@media (max-width: 575.98px) {
  .conv-item.is-out {
    margin-left: 0.5rem;
  }
  .conv-body {
    padding-left: 0.75rem;
  }
}

/* Email editor (reply, signature): Outlook-web style */
.mail-editor {
  border: 1px solid var(--bs-border-color);
  border-radius: 0.45rem;
  background: var(--bs-body-bg);
}
.mail-editor:focus-within {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.2);
}
.mail-editor.is-invalid {
  border-color: var(--bs-danger);
}
.mail-editor.is-dragover {
  outline: 2px dashed var(--bs-primary);
}
.mail-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15rem;
  padding: 0.3rem 0.4rem;
  border-bottom: 1px solid var(--bs-border-color);
  background: var(--bs-tertiary-bg);
  border-radius: 0.45rem 0.45rem 0 0;
}
.mail-font {
  width: 9.5rem;
}
.mail-size {
  width: 4.6rem;
}
.mail-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.4rem;
  border: 1px solid transparent;
  border-radius: 0.3rem;
  background: transparent;
  color: var(--bs-body-color);
  cursor: pointer;
  margin: 0;
}
.mail-btn:hover,
.mail-btn:focus-visible {
  background: var(--bs-secondary-bg);
  border-color: var(--bs-border-color);
}
.mail-btn:disabled {
  opacity: 0.55;
  cursor: default;
}
.mail-btn-text {
  font-size: 0.85rem;
}
.mail-color {
  position: relative;
}
.mail-color input[type='color'] {
  width: 1.1rem;
  height: 1.1rem;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.mail-sep {
  width: 1px;
  height: 1.4rem;
  margin: 0 0.25rem;
  background: var(--bs-border-color);
}
.mail-area {
  min-height: 320px;
  max-height: 70vh;
  overflow: auto;
  resize: vertical;
  padding: 0.85rem 1rem;
  font-family: Aptos, Calibri, 'Segoe UI', Arial, sans-serif;
  font-size: 11pt;
  line-height: 1.45;
  outline: none;
}
.mail-area p {
  margin: 0;
}
.mail-area blockquote,
.conv-mail-html blockquote {
  margin: 0.4rem 0 0.4rem 0.8rem;
  padding-left: 0.7rem;
  border-left: 3px solid var(--bs-border-color);
  color: var(--bs-secondary-color);
}
.mail-area [data-signature] {
  margin-top: 0.75rem;
}
.mail-area-sm {
  min-height: 160px;
}
.conv-mail-html p {
  margin: 0;
}
.conv-mail-html img,
.mail-area img {
  max-width: 100%;
  height: auto;
}
.mail-sig {
  width: 11rem;
}
.mail-editor.is-busy {
  opacity: 0.7;
  pointer-events: none;
}
.sig-preview {
  padding: 0.75rem;
  border: 1px dashed var(--bs-border-color);
  border-radius: 0.4rem;
  font-family: Aptos, Calibri, 'Segoe UI', Arial, sans-serif;
  font-size: 10.5pt;
  overflow: auto;
}
.reply-addr {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.6rem;
}
.reply-line {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.reply-line[hidden] {
  display: none;
}
.reply-field {
  flex: 1;
  min-width: 0;
}
.reply-addr-label {
  flex: none;
  width: 2.5rem;
  padding-top: 0.3rem;
  font-size: 0.875rem;
  color: var(--bs-secondary-color);
}
.reply-bcc-toggle {
  flex: none;
}
.reply-file {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.4rem 0.2rem 0.55rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 1rem;
  background: var(--bs-tertiary-bg);
  font-size: 0.85rem;
}
.btn-close-sm {
  width: 0.6rem;
  height: 0.6rem;
  background-size: 0.6rem;
}

/* Settings → Email → How emails are linked */
.lk-dict dt {
  margin-top: 0.9rem;
  font-weight: 700;
}
.lk-dict dt:first-child {
  margin-top: 0;
}
.lk-dict dd {
  margin: 0.2rem 0 0;
}
.lk-order > li,
.lk-example > li {
  margin-bottom: 0.35rem;
}

/* Directory → Teams: member picker */
.team-picker {
  max-height: 320px;
  overflow: auto;
  columns: 2 16rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.4rem;
}
.team-picker .form-check {
  break-inside: avoid;
}

/* Customer portal: the main sections as picture buttons, centred under the header */
.portal-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 1rem 0;
}
.portal-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 8.5rem;
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.75rem;
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(9, 30, 66, 0.08);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
.portal-nav-btn .bi {
  font-size: 1.9rem;
  line-height: 1;
  color: var(--bs-primary);
}
.portal-nav-btn:hover,
.portal-nav-btn:focus-visible {
  border-color: var(--bs-primary);
  box-shadow: 0 4px 10px rgba(9, 30, 66, 0.15);
  transform: translateY(-1px);
  color: var(--bs-body-color);
}
.portal-nav-btn.active {
  border-color: var(--bs-primary);
  background: var(--bs-primary-bg-subtle);
  color: var(--bs-primary-text-emphasis);
}
@media (max-width: 575.98px) {
  .portal-nav-btn {
    min-width: 6.5rem;
    padding: 0.6rem 0.7rem;
    font-size: 0.85rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .portal-nav-btn {
    transition: none;
  }
}

/* "For you" dashboard: KPI tiles and the per-workspace work tables */
.kpi-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.75rem;
}
.kpi-tile {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--bs-secondary-border-subtle);
  color: inherit;
  text-decoration: none;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
.kpi-tile:hover,
.kpi-tile:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.08);
  color: inherit;
}
.kpi-tile.tile-good {
  border-left-color: var(--bs-success);
}
.kpi-tile.tile-bad {
  border-left-color: var(--bs-danger);
}
.kpi-label {
  font-size: 0.8rem;
  color: var(--bs-secondary-color);
}
.kpi-value {
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.1;
}
.kpi-sub {
  font-size: 0.75rem;
  color: var(--bs-secondary-color);
}
.work-matrix td,
.work-matrix th {
  white-space: nowrap;
}
.work-cell {
  display: inline-block;
  min-width: 2.25rem;
  padding: 0.1rem 0.5rem;
  border-radius: 0.375rem;
  text-align: center;
  font-weight: 600;
  text-decoration: none;
  background: var(--bs-secondary-bg);
  color: var(--bs-body-color);
}
.work-cell:hover {
  outline: 2px solid var(--bs-primary);
}
.work-cell.cell-good {
  background: var(--bs-success-bg-subtle);
  color: var(--bs-success-text-emphasis);
}
.work-cell.cell-bad {
  background: var(--bs-danger-bg-subtle);
  color: var(--bs-danger-text-emphasis);
}
.work-cell.cell-warn {
  background: var(--bs-warning-bg-subtle);
  color: var(--bs-warning-text-emphasis);
}

/* Ideas: what a status means (status dropdown on the idea, legend on the list) */
.status-help-item {
  white-space: normal;
  max-width: 22rem;
}
.status-help {
  display: block;
  font-size: 0.75rem;
  color: var(--bs-secondary-color);
  margin-top: 0.1rem;
}
.dropdown-item:active .status-help,
.dropdown-item:focus .status-help {
  color: inherit;
}
.status-help-current {
  max-width: 22rem;
}

/* Product discovery: year x quarter plan (summary widget and timeline) */
/* T-0386: the table is the containing block of its .visually-hidden spans ("(current quarter)", "Planned": position absolute). Without a
   positioned ancestor inside .table-responsive they escaped its overflow clip and widened the page (455 px at 390 px). */
.plan-cross {
  position: relative;
}
.plan-cross th.plan-q {
  min-width: 6.5rem;
}
.plan-cross th.plan-q-now {
  background: var(--bs-primary-bg-subtle);
}
.plan-cross td.plan-q-now {
  background: color-mix(in srgb, var(--bs-primary-bg-subtle) 40%, transparent);
}
.plan-cross .plan-idea {
  min-width: 14rem;
}
.plan-title-sm {
  max-width: 16rem;
}
.plan-cell {
  min-width: 6.5rem;
}
.plan-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.5rem;
  border-radius: 1rem;
  font-size: 0.8rem;
  border: 1px solid transparent;
}
.plan-chip.plan-todo {
  background: var(--bs-secondary-bg);
  color: var(--bs-secondary-color);
}
.plan-chip.plan-in_progress {
  background: var(--bs-primary-bg-subtle);
  color: var(--bs-primary-text-emphasis);
}
.plan-chip.plan-done {
  background: var(--bs-success-bg-subtle);
  color: var(--bs-success-text-emphasis);
}
.plan-chip.plan-moved {
  border-color: var(--bs-warning);
}
.plan-note {
  font-size: 0.7rem;
  white-space: nowrap;
}
.plan-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.5rem;
  border: 1px dashed var(--bs-secondary-color);
  border-radius: 1rem;
  color: var(--bs-secondary-color);
  font-size: 0.8rem;
}
.plan-delivery {
  min-width: 7rem;
}
.plan-progress {
  height: 0.4rem;
}
.plan-legend .plan-chip,
.plan-legend .plan-ghost {
  vertical-align: middle;
}

/* Product discovery: quarters display of the delivery plan (2 x 2 grid) */
/* T-0386: minmax(0, 1fr), not 1fr (= minmax(auto, 1fr)): a long nowrap idea title set the track's minimum and widened the page at 375/390 */
.qgrid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 992px) {
  .qgrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .qgrid-q:nth-child(odd) {
    border-right: 2px solid var(--bs-border-color);
  }
  .qgrid-q:nth-child(-n + 2) {
    border-bottom: 2px solid var(--bs-border-color);
  }
}
.qgrid-q {
  padding: 0.75rem 1rem 1.25rem;
  min-height: 12rem;
  --q-color: var(--bs-primary);
  --q-text: var(--bs-primary-text-emphasis);
}
@media (max-width: 991.98px) {
  .qgrid-q + .qgrid-q {
    border-top: 2px solid var(--bs-border-color);
  }
}
.qgrid-q2 {
  --q-color: var(--bs-success);
  --q-text: var(--bs-success-text-emphasis);
}
.qgrid-q3 {
  --q-color: var(--bs-warning);
  --q-text: var(--bs-warning-text-emphasis);
}
.qgrid-q4 {
  --q-color: var(--bs-danger);
  --q-text: var(--bs-danger-text-emphasis);
}
.qgrid-now {
  background: color-mix(in srgb, var(--bs-primary-bg-subtle) 35%, transparent);
}
.qgrid-title {
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  color: var(--q-text);
  margin-bottom: 0.75rem;
}
.qgrid-count {
  font-weight: 400;
  color: var(--bs-secondary-color);
  font-size: 0.85rem;
}
.qgrid-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0;
  font-size: 0.85rem;
  min-width: 0;
}
/* T-0386 rework: product pill + "N moves" + "← Qn" chips were nowrap and could not shrink: wider than the row on a phone, the title got
   0 px and the row pushed the page sideways. Mid widths: the labels wrap inside at most half the row. Quarter panel up to 36rem: labels on
   their own line, the title below in full (wraps), then info, bar and % (@container qgrid block after .qgrid-pct). */
.qgrid-meta {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  flex-shrink: 1;
  min-width: 0;
  max-width: 50%;
}
.qgrid-q {
  container: qgrid / inline-size;
}
.qgrid-group {
  background: var(--bs-secondary-bg);
  color: var(--bs-body-color);
  border-radius: 0.375rem;
  padding: 0.05rem 0.4rem;
  font-size: 0.7rem;
  white-space: nowrap;
  max-width: min(9rem, 100%); /* T-0386: never wider than the wrapped label line */
  overflow: hidden;
  text-overflow: ellipsis;
}
.qgrid-moves {
  background: var(--bs-info-bg-subtle);
  color: var(--bs-info-text-emphasis);
  border-radius: 1rem;
  padding: 0.05rem 0.4rem;
  font-size: 0.7rem;
  white-space: nowrap;
}
.qgrid-chip {
  background: var(--bs-danger-bg-subtle);
  color: var(--bs-danger-text-emphasis);
  border-radius: 1rem;
  padding: 0.05rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}
.qgrid-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--bs-body-color);
  text-decoration: none;
}
.qgrid-name:hover {
  text-decoration: underline;
}
.qgrid-name.qgrid-moved {
  color: var(--bs-danger-text-emphasis);
}
.qgrid-info {
  color: var(--bs-secondary-color);
  flex-shrink: 0;
  cursor: help;
}
.qgrid-bar {
  flex: 0 0 4.5rem;
  height: 0.4rem;
  border-radius: 1rem;
  background: var(--bs-secondary-bg);
  overflow: hidden;
}
.qgrid-fill {
  display: block;
  height: 100%;
  background: var(--q-color);
  border-radius: 1rem;
}
.qgrid-pct {
  flex: 0 0 2.5rem;
  text-align: right;
  font-size: 0.75rem;
  color: var(--q-text);
}
@container qgrid (max-width: 36rem) {
  .qgrid-row {
    flex-wrap: wrap;
    row-gap: 0.15rem;
    padding: 0.3rem 0;
  }
  .qgrid-meta {
    flex: 1 0 100%;
    max-width: 100%;
  }
  .qgrid-meta:not(:has(*)) {
    display: none;
  }
  .qgrid-name {
    flex: 1 1 0;
    white-space: normal;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2; /* up to two lines, then … (the full title is in its title attribute and on the idea page) */
    line-clamp: 2;
  }
}
.plan-cross th.plan-q-now .text-muted-2 {
  color: var(--bs-primary-text-emphasis) !important; /* AA on the tinted current-quarter header */
}
/* quarters display: vivid quarter colours (AA on light backgrounds), lighter shades in the dark theme */
.qgrid-q1 {
  --q-color: #1d4ed8;
  --q-text: #1d4ed8;
}
.qgrid-q2 {
  --q-color: #15803d;
  --q-text: #15803d;
}
.qgrid-q3 {
  --q-color: #c2610c;
  --q-text: #a14d06;
}
.qgrid-q4 {
  --q-color: #b91c1c;
  --q-text: #b91c1c;
}
.qgrid-name.qgrid-moved {
  color: #c81e1e;
}
[data-bs-theme='dark'] .qgrid-q1 {
  --q-color: #60a5fa;
  --q-text: #93c5fd;
}
[data-bs-theme='dark'] .qgrid-q2 {
  --q-color: #4ade80;
  --q-text: #86efac;
}
[data-bs-theme='dark'] .qgrid-q3 {
  --q-color: #fb923c;
  --q-text: #fdba74;
}
[data-bs-theme='dark'] .qgrid-q4 {
  --q-color: #f87171;
  --q-text: #fca5a5;
}
[data-bs-theme='dark'] .qgrid-name.qgrid-moved {
  color: #fca5a5;
}

/* Discovery panels with a tinted background: key links and product pills take AA colours there, as on the widgets above */
:root:not([data-bs-theme='dark']) .timeline-record,
:root:not([data-bs-theme='dark']) .htl-unscheduled,
:root:not([data-bs-theme='dark']) .rs-idea,
:root:not([data-bs-theme='dark']) .alert {
  --bs-link-color: #0052cc;
  --bs-link-color-rgb: 0, 82, 204;
}
:root:not([data-bs-theme='dark']) .timeline-record .product-pill,
:root:not([data-bs-theme='dark']) .htl-unscheduled .product-pill,
:root:not([data-bs-theme='dark']) .rs-idea .product-pill {
  color: #505f79;
}
/* "For you" widgets: no border, a slightly darker panel than the page */
:root,
[data-bs-theme='light'],
[data-bs-theme='blue'] {
  --atlas-widget-bg: rgba(9, 30, 66, 0.05);
}
/* links stay AA on the tinted widget panel */
:root:not([data-bs-theme='dark']) .home-widgets,
:root:not([data-bs-theme='dark']) .customer-card {
  --bs-link-color: #0052cc;
  --bs-link-color-rgb: 0, 82, 204;
}
[data-bs-theme='dark'] {
  --atlas-widget-bg: rgba(0, 0, 0, 0.22);
}
.home-widgets .surface {
  border-color: transparent;
  background: var(--atlas-widget-bg);
}
.home-widgets .kpi-tile {
  border-width: 0 0 0 4px;
}
.home-widgets .table {
  --bs-table-bg: transparent;
}
/* keep AA contrast for outline buttons on the tinted widget panel */
:root:not([data-bs-theme='dark']) .home-widgets .btn-outline-secondary {
  --bs-btn-color: #545b62;
  --bs-btn-border-color: #545b62;
}

/* Backlog: a collapsed sprint / backlog section reads as a closed panel with a coloured top edge,
   like the collapsed epics bookmark */
.backlog-section:not([open]) {
  border: 1px solid var(--atlas-border);
  border-top: 3px solid var(--atlas-accent);
  border-radius: 0.5rem;
  background: var(--atlas-surface);
}
.backlog-section.sprint-section:not([open]) {
  border: 1px solid var(--atlas-border);
  border-top: 3px solid #6e5dc6;
  background: var(--atlas-sprint-bg);
}
.backlog-section:not([open]) > summary:hover {
  background: rgba(127, 127, 127, 0.08);
}
.backlog-section:not([open]) > summary > .bi-chevron-down {
  transform: rotate(-90deg);
}

/* ── Top menu: Office-style ribbon (Profile → Menu position: Top), built from the same model as the sidebar ── */
.atlas-ribbon {
  background: var(--atlas-sidebar-bg);
  color: var(--atlas-sidebar-fg);
  border-bottom: 1px solid var(--atlas-border);
  padding: 0 0.75rem 0.5rem;
}
.ribbon-tabs {
  display: flex;
  gap: 0.15rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.ribbon-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 0;
  background: transparent;
  color: var(--atlas-sidebar-fg);
  padding: 0.45rem 0.8rem 0.4rem;
  font-size: 0.85rem;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  border-radius: 0.375rem 0.375rem 0 0;
}
.ribbon-tab:hover {
  background: rgba(127, 127, 127, 0.12);
}
.ribbon-tab[aria-selected='true'] {
  color: var(--atlas-sidebar-active-fg);
  border-bottom-color: var(--atlas-sidebar-active-fg);
  font-weight: 600;
}
.ribbon-panel {
  display: flex;
  align-items: stretch;
  background: var(--atlas-surface);
  border: 1px solid var(--atlas-border);
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px rgba(9, 30, 66, 0.08);
  padding: 0.35rem 0.25rem 0.15rem;
  min-height: 5.6rem;
}
.ribbon-panel[hidden],
.atlas-ribbon.collapsed-desktop .ribbon-panels {
  display: none;
}
.ribbon-group {
  display: flex;
  flex-direction: column;
  padding: 0 0.5rem;
  border-right: 1px solid var(--atlas-border);
  min-width: 0;
}
.ribbon-group:last-child {
  border-right: 0;
}
.ribbon-items {
  display: flex;
  align-items: flex-start;
  gap: 0.15rem;
  flex: 1 1 auto;
}
/* stacked lists (workspaces, queues, spaces): three small rows, then the next column */
.ribbon-stack {
  display: grid;
  grid-template-rows: repeat(3, auto);
  grid-auto-flow: column;
  grid-auto-columns: minmax(9rem, 13rem);
  column-gap: 0.35rem;
  row-gap: 0.05rem;
  align-content: start;
}
.ribbon-group-label {
  font-size: 0.7rem;
  color: var(--atlas-muted);
  text-align: center;
  padding-top: 0.2rem;
  max-width: 100%;
}
.ribbon-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  min-width: 4.2rem;
  max-width: 6.5rem;
  padding: 0.35rem 0.45rem;
  border: 0;
  border-radius: 0.375rem;
  background: transparent;
  color: var(--atlas-sidebar-fg);
  text-decoration: none;
  font-size: 0.78rem;
  line-height: 1.15;
  text-align: center;
}
.ribbon-btn > .bi {
  font-size: 1.35rem;
  line-height: 1;
}
.ribbon-btn > .avatar {
  width: 1.6rem;
  height: 1.6rem;
}
.ribbon-btn-sm {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  padding: 0.15rem 0.4rem;
  border-radius: 0.3rem;
  color: var(--atlas-sidebar-fg);
  text-decoration: none;
  font-size: 0.8rem;
}
.ribbon-btn-sm .badge,
.ribbon-btn-sm .bi-star-fill {
  margin-left: auto;
}
.ribbon-btn:hover,
.ribbon-btn[aria-expanded='true'],
.ribbon-btn-sm:hover,
.ribbon-split-toggle:hover,
.ribbon-split-toggle[aria-expanded='true'] {
  background: rgba(127, 127, 127, 0.15);
  color: var(--atlas-sidebar-fg);
}
.ribbon-btn.active,
.ribbon-btn-sm.active {
  background: var(--atlas-sidebar-active-bg);
  color: var(--atlas-sidebar-active-fg);
  font-weight: 600;
}
.ribbon-split {
  display: flex;
  align-items: center;
  min-width: 0;
}
.ribbon-split > .ribbon-btn-sm {
  flex: 1 1 auto;
}
.ribbon-split-toggle {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: var(--atlas-sidebar-fg);
  border-radius: 0.3rem;
  padding: 0.1rem 0.3rem;
  font-size: 0.7rem;
}
@media (max-width: 991.98px) {
  .ribbon-panel {
    overflow-x: auto;
  }
}

/* "For you": my profile card (100px photo) and team colleagues */
.avatar-xl {
  width: 100px;
  height: 100px;
  font-size: 2.25rem;
  flex: 0 0 auto;
}
.me-details {
  display: grid;
  grid-template-columns: 1.1rem minmax(0, 1fr);
  gap: 0.2rem 0.4rem;
}
.me-details dt {
  font-weight: normal;
  color: var(--atlas-muted);
}
.me-details dd {
  margin: 0;
  min-width: 0;
}
.colleagues-accordion {
  --bs-accordion-bg: transparent;
  --bs-accordion-active-bg: transparent;
  --bs-accordion-btn-padding-y: 0.55rem;
  --bs-accordion-body-padding-y: 0.5rem;
  border-radius: 0.5rem;
  overflow: hidden;
}
.colleagues-accordion .accordion-button {
  font-size: 0.875rem;
  font-weight: 600;
}
.colleague-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.5rem;
}
.colleague {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 0.6rem;
}
.colleague-photo {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  font-size: 1.1rem;
}
.colleague-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}
/* the photo fills the panel height, with the same margin on the top, bottom and left */
.colleague-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.25rem;
}
.colleague-actions .btn {
  --bs-btn-padding-y: 0.05rem;
  --bs-btn-padding-x: 0.4rem;
  --bs-btn-font-size: 0.72rem;
  white-space: nowrap;
}
.user-card-photo {
  flex: 0 0 auto;
  width: 96px;
  height: 96px;
  font-size: 2rem;
  border-radius: 0.75rem;
}
/* New message: "To" as chips with an @ search below */
.recipient-box {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  cursor: text;
}
.recipient-box:focus-within {
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}
.recipient-box input {
  flex: 1 1 10rem;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
}
.recipient-box .dropdown-menu {
  top: 100%;
  left: 0;
  right: 0;
  max-height: 16rem;
  overflow-y: auto;
}
.recipient-box .dropdown-item {
  white-space: normal;
}
.people-list {
  max-height: 22rem;
  overflow-y: auto;
}
.me-card.surface-pad {
  padding: 0.75rem;
} 
.me-card .avatar-xl {
  align-self: stretch;
  width: min(158px, 40%);
  height: auto;
}
/* "My team": no fill, only a faded border */
.team-widget {
  border: 0px solid var(--atlas-border);
  border-color: color-mix(in srgb, var(--atlas-border) 55%, transparent);
  border-radius: 0.5rem;
  background: transparent;
}
/* ribbon → Workspaces: two rows of workspaces; the picked one's views follow on the right */
.ribbon-stack-2 {
  grid-template-rows: repeat(2, auto);
}
.ribbon-ws-views {
  display: flex;
  align-items: stretch;
}
.ribbon-ws-views[hidden] {
  display: none;
}
button.ribbon-btn-sm {
  border: 0;
  background: transparent;
  text-align: left;
}
.ribbon-btn-sm[aria-pressed='true'] {
  background: var(--atlas-sidebar-active-bg);
  color: var(--atlas-sidebar-active-fg);
}
.ribbon-btn-sm.is-current {
  font-weight: 600;
}
/* "For you": people photos as rounded squares; colleagues as light tiles, text aligned left */
.home-widgets .avatar-xl,
.home-widgets .colleague-photo {
  border-radius: 0.75rem;
}
.home-widgets .colleague-photo {
  border-radius: 0.6rem;
}
:root,
[data-bs-theme='light'],
[data-bs-theme='blue'] {
  --atlas-colleague-bg: rgba(9, 30, 66, 0.025);
}
[data-bs-theme='dark'] {
  --atlas-colleague-bg: rgba(255, 255, 255, 0.035);
}
.home-widgets .colleague {
  padding: 0.4rem 0.6rem;
  border-radius: 0.5rem;
  background: var(--atlas-colleague-bg);
}

/* For you → My team: only an icon, before the team's name */
.team-header {
  display: flex;
  align-items: center;
  padding-left: 0.5rem;
}
.team-header .accordion-button {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  padding-left: 0.35rem;
}
.team-diagram-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: 0;
  border-radius: 0.25rem;
  background: transparent;
  color: var(--bs-primary-text-emphasis);
  font-size: 1rem;
}
.team-diagram-btn:hover {
  background: var(--bs-tertiary-bg);
}
/* Team organogram: nested lists, the connecting lines are borders of pseudo-elements */
.org-chart {
  overflow-x: auto;
  padding-bottom: 0.5rem;
}
.org-chart ul {
  display: flex;
  justify-content: center;
  position: relative;
  margin: 0;
  padding: 1.25rem 0 0;
  list-style: none;
}
.org-chart > ul {
  width: max-content;
  min-width: 100%;
  padding-top: 0;
}
.org-chart li {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  padding: 1.25rem 0.4rem 0;
}
.org-chart > ul > li {
  padding-top: 0;
}
.org-chart li::before,
.org-chart li::after {
  content: '';
  position: absolute;
  top: 0;
  width: 50%;
  height: 1.25rem;
  border-top: 1px solid var(--bs-border-color);
}
.org-chart li::before {
  left: 0;
}
.org-chart li::after {
  right: 0;
  border-left: 1px solid var(--bs-border-color);
  width: calc(50% + 1px);
}
.org-chart > ul > li::before,
.org-chart > ul > li::after,
.org-chart li:first-child::before,
.org-chart li:last-child::after {
  border-top: 0;
}
.org-chart > ul > li::after {
  border-left: 0;
}
.org-chart li:last-child::before {
  border-right: 1px solid var(--bs-border-color);
  width: 50%;
}
.org-chart li:last-child::after {
  border-left: 0;
}
.org-chart > ul > li:last-child::before {
  border-right: 0;
}
.org-chart ul ul::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  height: 1.25rem;
  border-left: 1px solid var(--bs-border-color);
}
.org-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  width: 10rem;
  padding: 0.5rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
  background: var(--bs-body-bg);
  text-align: center;
  overflow-wrap: anywhere;
}
.org-node-me {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 1px var(--bs-primary);
}
.org-node-photo {
  width: 48px;
  height: 48px;
  border-radius: 0.5rem;
  object-fit: cover;
}
span.org-node-photo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
/* T-0070: teams inside teams. The list indents sub-teams; the organogram reuses .org-chart with team boxes. */
.team-indent {
  display: inline-block;
}
.team-depth-1 { padding-left: 1.25rem; }
.team-depth-2 { padding-left: 2.5rem; }
.team-depth-3 { padding-left: 3.75rem; }
.team-depth-4 { padding-left: 5rem; }
.team-depth-5 { padding-left: 6.25rem; }
.team-depth-6 { padding-left: 7.5rem; }
.org-team-node {
  gap: 0.3rem;
  width: 11rem;
}
.org-team-name {
  overflow-wrap: anywhere;
}
.org-team-lead {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  max-width: 100%;
  min-width: 0;
}
.org-team-avatar {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}
/* Phones: the tree becomes an indented list down the page, with the lines on the left, so nothing scrolls sideways */
@media (max-width: 575.98px) {
  .org-chart-teams ul {
    display: block;
    padding: 0 0 0 1.1rem;
  }
  .org-chart-teams > ul {
    width: auto;
    min-width: 0;
    padding-left: 0;
  }
  .org-chart-teams li {
    display: block;
    padding: 0.5rem 0 0 0.9rem;
    border-left: 1px solid var(--bs-border-color);
  }
  .org-chart-teams li:last-child {
    border-left-color: transparent;
  }
  .org-chart-teams > ul > li {
    padding-left: 0;
    border-left: 0;
  }
  .org-chart-teams li::before {
    content: '';
    position: absolute;
    top: 0;
    left: -1px;
    width: 0.9rem;
    height: 1.6rem;
    border: 0;
    border-left: 1px solid var(--bs-border-color);
    border-bottom: 1px solid var(--bs-border-color);
    border-radius: 0;
  }
  .org-chart-teams li:last-child::before {
    width: 0.9rem;
    border-right: 0;
  }
  .org-chart-teams li::after,
  .org-chart-teams ul ul::before,
  .org-chart-teams > ul > li::before {
    display: none;
  }
  .org-chart-teams .org-node {
    align-items: flex-start;
    width: 100%;
    max-width: 22rem;
    text-align: left;
  }
}

/* Reports → Admin reports */
.adm-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
}
.adm-filter {
  flex: 1 1 14rem;
  min-width: 0;
  max-width: 24rem;
}
.adm-filter .multiselect-toggle {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.adm-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1rem;
}
.adm-scroll {
  overflow: auto;
  max-height: 75vh;
}
.adm-table {
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.8125rem;
}
.adm-table th,
.adm-table td {
  border-right: 1px solid var(--bs-border-color);
  border-bottom: 1px solid var(--bs-border-color);
  background: var(--bs-body-bg);
}
.adm-table .adm-weekend {
  background: var(--bs-secondary-bg);
}
.adm-user,
.adm-user-head {
  position: sticky;
  left: 0;
  z-index: 2;
  width: 15rem;
  min-width: 15rem;
  max-width: 15rem;
  padding: 0.4rem 0.6rem;
  font-weight: 400;
}
.adm-user-head {
  z-index: 3;
  font-weight: 600;
  vertical-align: bottom;
}
.adm-table thead th {
  position: sticky;
  top: 0;
}
.adm-table thead th:not(.adm-user-head) {
  z-index: 1;
}
.adm-avatar {
  flex: none;
  width: 32px;
  height: 32px;
  font-size: 0.7rem;
}
.adm-name {
  display: block;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.adm-sub {
  font-size: 0.75rem;
  color: var(--bs-secondary-color);
  overflow-wrap: anywhere;
}
.adm-day-head {
  min-width: 6.5rem;
  padding: 0.3rem 0.25rem;
  text-align: center;
  font-weight: 400;
  white-space: nowrap;
}
.adm-weekday,
.adm-range {
  display: block;
  font-size: 0.7rem;
}
.adm-table-wrap {
  position: relative;
  width: max-content;
}
.adm-table {
  --adm-band-height: 1.9rem;
}
.adm-table .adm-band-head {
  height: var(--adm-band-height);
  padding: 0 0.5rem;
  text-align: left;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  background: var(--bs-tertiary-bg);
  border-right-width: 2px;
}
/* the label stays in view, next to the user column, while its month scrolls by */
.adm-band-label {
  position: sticky;
  left: 15.5rem;
  display: inline-block;
}
.adm-table .adm-days-row th {
  top: var(--adm-band-height);
}
.adm-table .adm-band-start {
  border-left: 2px solid var(--bs-border-color);
}
/* now: under the sticky user column, over the cells */
.adm-now-line {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 1;
  width: 2px;
  margin-left: -1px;
  background: var(--bs-danger);
  pointer-events: none;
}
.adm-date {
  display: block;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
}
.adm-table .adm-today {
  box-shadow: inset 0 -3px 0 var(--bs-primary);
}
.adm-today .adm-date {
  color: var(--bs-primary-text-emphasis);
}
.adm-day:focus-visible {
  outline: 2px solid var(--bs-primary);
  outline-offset: -2px;
}
.adm-cell-key {
  width: 8.5rem;
}
.adm-cell-status {
  width: 1%;
}
.adm-day {
  min-width: 6.5rem;
  padding: 0.35rem 0.25rem;
  text-align: center;
  vertical-align: top;
}
.adm-hours {
  font-weight: 600;
  cursor: help;
}
.adm-logged {
  font-size: 0.75rem;
  cursor: help;
}
.adm-none {
  color: var(--bs-secondary-color);
  cursor: help;
}
.adm-pills {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
  margin-top: 0.2rem;
}
.adm-pill {
  display: inline-block;
  min-width: 1.5rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  cursor: help;
}
.adm-pill-owner {
  background: #b45309;
}
.adm-pill-participant {
  background: #2b6c8f;
}

/* Due date suggestion (create form), its settings and the history of changes */
.due-suggest { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.due-suggest legend { float: none; width: 100%; }
.due-days-input { width: 5.5rem; }
.due-changes li { padding-top: 0.25rem; }
.due-changes li + li { border-top: 1px solid var(--bs-border-color); margin-top: 0.25rem; }
/* Log work: quick durations */
.duration-pills { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.duration-pills .btn { --bs-btn-padding-y: 0.1rem; --bs-btn-padding-x: 0.6rem; --bs-btn-font-size: 0.75rem; }

/* Issues in other workspaces: the window, and the chip on a shared row */
.transfer-list { max-height: 45vh; overflow-y: auto; display: grid; gap: 0.35rem; }
.shared-chip { display: inline-block; font-size: 0.7rem; padding: 0 0.35rem; border: 1px solid var(--bs-border-color); border-radius: 0.25rem; white-space: nowrap; }

/* Workspace settings, first tab: the product families panel stands out */
.ws-products-panel { background: color-mix(in srgb, var(--bs-primary) 8%, var(--atlas-surface)); }

/* Email log: an email linked to a ticket */
.table > tbody > tr.email-linked > * { --bs-table-bg-state: rgba(25, 135, 84, 0.14); }
/* Ticket: the reply composer sits on the reply colour, its text area stays plain */
.ticket-reply .mail-area { background: var(--atlas-surface); }

/* Dark themes: danger text stays readable on dark surfaces */
[data-bs-theme="dark"] .text-danger { color: #ff8a93 !important; }

/* Email screen: the customer field in the narrow right panel */
.em-customer-form > .d-flex { flex-wrap: wrap; }
.em-customer-form > .d-flex > .form-control { flex: 1 1 100%; }

/* Issue: status, product, type and priority in one soft grey row, the full width of its panel */
[data-bs-theme='light'],
[data-bs-theme='blue'] {
  --atlas-status-row-bg: rgba(0, 0, 0, 0.05);
}
[data-bs-theme='dark'] {
  --atlas-status-row-bg: rgba(255, 255, 255, 0.06);
}
.status-area {
  width: 100%;
  background: var(--atlas-status-row-bg);
  border: 0;
  border-radius: 0;
  padding: 0.85rem 1rem;
}
.status-area .status-grid { flex-wrap: wrap; gap: 0.75rem 1.5rem; }
.status-area .status-col h2 { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.02em; margin-bottom: 0.35rem !important; }
.status-area .status-col form.mb-3 { margin-bottom: 0 !important; }
.status-area .status-col > p { margin-bottom: 0; }
.status-col-product { flex: 1 1 7rem; min-width: 0; }
.product-pick { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.product-menu { min-width: 0; }
/* no border and no background: as wide as its text, the arrow right after it */
.product-toggle { display: inline-flex; align-items: center; gap: 0.4rem; max-width: 100%; padding-left: 0; padding-right: 0; border: 0; background: transparent; color: var(--bs-body-color); }
.product-toggle:hover, .product-toggle:focus-visible, .product-toggle.show { background: transparent; color: var(--bs-body-color); }
.product-toggle:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: 2px; }
.product-options { max-height: 20rem; overflow-y: auto; }
.product-open { flex: none; }
/* T-0072: in the saving flow the discussion board sits under the product, when the product has boards */
[data-save-flow] .board-field:has(select) { margin-top: 1rem; }
.status-row-note:not(:empty) .alert { margin: 0.75rem 0 0; }
.status-area > p { margin: 0.6rem 0 0 !important; }

.status-area .btn-outline-secondary { background: var(--atlas-surface); color: var(--bs-body-color); }

/* Profile: the UI settings panel, slightly darker in light themes and slightly brighter in the dark one */
#ui-settings { background: var(--atlas-comment-bg); }

/* The product of a task: a bordered transparent pill */
.product-pill {
  display: inline-block;
  max-width: 100%;
  padding: 0 0.5rem;
  border: 1px solid currentColor;
  border-radius: 0.25rem;
  background: transparent;
  color: #5e6c84;
  font-size: 0.72rem;
  line-height: 1.4;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
[data-bs-theme='dark'] .product-pill { color: #b3bac5; }
/* on a selected row it follows the row's own text colour */
.table-issues tr.selected .product-pill, .backlog-row.selected .product-pill { color: inherit; }
.backlog-row .product-slot { flex: none; width: 5.5rem; min-width: 0; display: flex; }
/* T-0073: the Discussion board column of the backlog, between the key and the title */
.backlog-row .board-slot { flex: none; width: 8rem; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 0.875rem; color: var(--bs-secondary-color); }
.backlog-row .board-slot .bi { margin-right: 0.25rem; }
.backlog-row.selected .board-slot { color: inherit; }
@media (max-width: 575.98px) { .backlog-row .board-slot { width: 5rem; } }
.product-pill-cell { max-width: 8rem; }
.typeahead-open-list { max-height: 16rem; overflow-y: auto; }

/* Filter by product: as wide as what it says, within reason */
.product-filter .multiselect-toggle { width: auto; min-width: 9rem; max-width: 16rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* "For you": Assigned to me */
.due-btn { --bs-btn-padding-y: 0; --bs-btn-padding-x: 0.4rem; --bs-btn-font-size: 0.72rem; border: 1px solid var(--bs-border-color); background: transparent; color: var(--bs-body-color); white-space: nowrap; }
.due-btn:hover { border-color: currentColor; color: var(--bs-body-color); }
.due-btn.is-late, .due-btn.is-late:hover { border-color: #c9372c; color: #ae2e24; }
[data-bs-theme='dark'] .due-btn.is-late, [data-bs-theme='dark'] .due-btn.is-late:hover { border-color: #ff8a93; color: #ff8a93; }
.assigned-table { table-layout: auto; width: 100%; }
.assigned-table .title-cell { width: 100%; max-width: 0; }
.assigned-table .workspace-name-cell { font-size: 0.68rem; min-width: 5rem; max-width: 7rem; line-height: 1.2; white-space: normal; overflow-wrap: break-word; }
/* "For you": profile. The button stays at the top of the panel; the photo is centred with the text */
.me-card { position: relative; }
.me-name-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; }
.me-edit { --bs-btn-padding-y: 0; --bs-btn-padding-x: 0.35rem; --bs-btn-font-size: 0.7rem; }
.me-card .avatar-xl { align-self: flex-start; width: min(168px, 45%); height: auto; }
.me-card img.avatar-xl { max-height: 200px; object-fit: cover; }
/* "For you": a team is one row, scrolled sideways */
.colleague-scroll { display: flex; align-items: center; gap: 0.35rem; min-width: 0; }
.colleague-scroll-btn { flex: none; }
.colleague-grid { display: flex; flex: 1 1 auto; min-width: 0; flex-wrap: nowrap; gap: 0.5rem; overflow-x: auto; scrollbar-width: thin; }
/* no scrollbar: the arrows move the row (the keyboard and a touch swipe still do too) */
.colleague-grid { scrollbar-width: none; }
.colleague-grid::-webkit-scrollbar { display: none; }
.colleague-grid > .colleague { flex: 0 0 min(19rem, 85%); }
.colleague-text { gap: 0.3rem; }
.colleague-email { display: flex; align-items: center; gap: 0.35rem; min-width: 0; }
/* "For you": open work as a force-directed tree */
/* "For you": the core widget takes the rest of the screen; the chart takes the rest of the widget */
main#main:has(> .home-widgets) { display: flex; flex-direction: column; padding-bottom: 1rem; }
main#main > .home-widgets { flex: 1 1 auto; display: flex; flex-direction: column; }
.home-core { flex: 1 1 auto; }
.home-core > .col-12,
.home-core .work-plain,
.home-core .work-plain > .tab-content,
.home-core .work-plain > .tab-content > .tab-pane.active,
.home-core .work-tree-box { display: flex; flex-direction: column; }
.home-core .work-plain,
.home-core .work-plain > .tab-content,
.home-core .work-plain > .tab-content > .tab-pane.active,
.home-core .work-tree-box { flex: 1 1 auto; }
.work-tree { width: 100%; flex: 1 1 0; min-height: 22rem; position: relative; }
.work-tree.is-tall { min-height: 38rem; }
/* no panel behind this widget */
.home-widgets .surface.work-plain, .home-widgets .surface.me-card { background: transparent; }
.work-tree-picks { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.5rem; }
.net-swatch-0 { background: #c7e36b; }
.net-swatch-1 { background: #ffe14d; }
.net-swatch-2 { background: #ffb347; }
.net-swatch-3 { background: #f2762e; }
.net-swatch-4 { background: #b3261e; }
.work-net-detail { min-height: 1.75rem; margin-top: 0.25rem; }
.work-net-late { color: #8f1f18; font-weight: 600; }
[data-bs-theme='dark'] .work-net-late { color: #ff8a93; }
.work-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.75rem; margin-top: 0.5rem; }
.work-swatch { display: inline-block; width: 0.8rem; height: 0.8rem; border-radius: 50%; }

/* Sprint matrix: finished / pending next to the total */
.matrix-finished { font-weight: 600; color: #1f7a4d; }
.matrix-pending { font-weight: 600; }
[data-bs-theme='dark'] .matrix-finished { color: #7ee2b0; }

/* Email log: a ticket's heading when grouped */
.email-group-head > td { background: var(--atlas-comment-bg); padding-top: 0.45rem; padding-bottom: 0.45rem; }

/* Email log: stars and the Starred panel */
.email-star { color: var(--bs-secondary-color); }
.email-star.is-on { color: #b38600; }
[data-bs-theme='dark'] .email-star.is-on { color: #f5cd47; }
.email-starred-toggle { font-weight: 600; font-size: inherit; padding: 0.6rem 0.9rem; }
.email-adv-filter { min-width: 15rem; }

/* Sign-in page only (the other account pages share the layout): the look of the company sign-in */
.auth-wrap:has(.login-form) { background: url('/static/img/app-backdrop.svg') center / cover no-repeat, #f2f4f8; position: relative; }
.auth-card:has(.login-form) { width: 100%; max-width: 480px; padding: 1.75rem 2.5rem 2rem; background: var(--atlas-surface); border: 1px solid rgba(9, 30, 66, 0.12); border-radius: 1rem; box-shadow: 0 12px 32px rgba(9, 30, 66, 0.1); }
.auth-card:has(.login-form) > .text-center { margin-bottom: 1rem !important; }
.auth-card:has(.login-form) > .surface { padding: 0; background: transparent; border: 0; box-shadow: none !important; }
.login-title { margin-bottom: 2rem; font-size: 1.75rem; font-weight: 700; text-align: center; }
.login-form .form-control { height: 3rem; min-height: 3rem; border-color: #7a8a99; border-radius: 0.5rem; font-size: 0.875rem; }
.login-form .form-floating > label { padding-top: 0.8rem; font-size: 0.875rem; }
.login-submit, .login-alt { --bs-btn-font-size: 0.875rem; --bs-btn-padding-y: 0.8rem; --bs-btn-border-radius: 0.5rem; }
.login-submit { --bs-btn-bg: #005de4; --bs-btn-border-color: #005de4; --bs-btn-hover-bg: #004fc2; --bs-btn-hover-border-color: #004fc2; --bs-btn-active-bg: #0045a8; --bs-btn-active-border-color: #0045a8; }
.login-alt { --bs-btn-border-color: #7a8a99; --bs-btn-hover-border-color: currentColor; --bs-btn-color: var(--bs-body-color); --bs-btn-hover-color: var(--bs-body-color); }
.login-or { display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0 1.25rem; color: var(--bs-secondary-color); font-size: 0.875rem; }
.login-or::before, .login-or::after { content: ''; flex: 1; border-top: 1px solid var(--bs-border-color); }
.login-secure { position: absolute; left: 0; right: 0; bottom: 0.75rem; margin: 0; font-size: 0.875rem; text-align: center; }
.login-secure .bi { color: #5b8a00; }
/* the dark theme keeps its own colours: the backdrop image is light */
[data-bs-theme='dark'] .auth-wrap:has(.login-form) { background: var(--bs-body-bg); }
[data-bs-theme='dark'] .auth-card:has(.login-form) { border-color: rgba(255, 255, 255, 0.12); box-shadow: none; }
[data-bs-theme='dark'] .login-form .form-control { border-color: #8590a2; }
[data-bs-theme='dark'] .login-secure .bi { color: #bbfa6d; }
@media (max-width: 575.98px) {
  .auth-card:has(.login-form) { padding: 1.5rem 1.25rem; }
  .login-secure { position: static; margin-top: 1rem; }
}

/* "For you": the copy-email icon of a colleague */
.colleague-email .bi-clipboard { font-size: 11px; color: grey; }

.work-tree-picks .btn[aria-pressed='true'] { background: var(--bs-secondary); border-color: var(--bs-secondary); color: #fff; }

/* "For you", My team: more room above and below each person */
.home-widgets .colleague { padding-top: 1rem; padding-bottom: 1rem; }


/* Saving tasks flow */
.flow-field-list { display: flex; flex-direction: column; gap: 0.25rem; }
.flow-field-row { display: flex; align-items: center; gap: 0.35rem; padding: 0.25rem 0.5rem; border: 1px solid var(--bs-border-color); border-radius: 0.25rem; }
.save-flow-progress { display: block; width: 100%; height: 0.375rem; accent-color: var(--bs-primary); }
.flow-pick-row { display: flex; gap: 0.5rem; align-items: stretch; }
.flow-pick { flex: 1 1 auto; min-width: 0; }
.flow-pick-toggle { width: 100%; text-align: left; }
.flow-pick-choice { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.flow-pick-menu { width: 100%; max-height: 16rem; overflow-y: auto; }
.flow-pick-photo { width: 24px; height: 24px; flex: none; border-radius: 50%; object-fit: cover; }
.flow-pick-row:has(.is-invalid) ~ .invalid-feedback { display: block; }
.board-card-edit { padding: 0 0.3rem; font-size: 0.75rem; line-height: 1.4; }
/* Task / ticket / idea: the Close X first on the left and bigger (like Outlook on the web) */
.detail-close { display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; padding: 0; font-size: 1.35rem; line-height: 1; flex-shrink: 0; }
.detail-close .bi { -webkit-text-stroke: 0.5px; }
/* Discussion Boards kanban: sprint panels holding the status columns */
.board-sprint-body { padding: 0.25rem 0.75rem 0.75rem; overflow-x: auto; }
.board-sprint-panel .board { margin-bottom: 0; }
/* Discussion Boards kanban: Open on its own row at the bottom of the card */
.board-card-open-row { margin-top: 0.5rem; padding-top: 0.4rem; border-top: 1px solid var(--atlas-border); }
.board-card-sprint { font-weight: 500; }
.flow-pick-menu .dropdown-item.active i { color: #fff !important; }
.work-matrix .product-epics-start { border-left: 1px solid var(--bs-border-color); }
/* Products pipeline */
.pipeline-table th, .pipeline-table td { white-space: nowrap; }
/* every column fits, the red one included: the headings wrap */
.pipeline-table { font-size: 0.8125rem; }
.pipeline-table > :not(caption) > * > * { padding-left: 0.3rem; padding-right: 0.3rem; }
.pipeline-table thead th:not(:first-child) { white-space: normal; min-width: 2.5rem; vertical-align: bottom; font-size: 0.75rem; line-height: 1.2; }
.pipeline-table tbody th, .pipeline-table thead th:first-child, .pipeline-table tfoot th { white-space: normal; min-width: 8rem; max-width: 12rem; vertical-align: bottom; }
.pipeline-table > tbody > tr > th.pipeline-product { padding-left: 1rem; }
.pipeline-table .pipeline-family > *, .pipeline-table .pipeline-total > * { font-weight: 600; background-color: var(--bs-tertiary-bg); }
.pipeline-table .pipeline-due, .pipeline-table .pipeline-family > .pipeline-due, .pipeline-table .pipeline-total > .pipeline-due { background-color: var(--bs-danger-bg-subtle); color: var(--bs-danger-text-emphasis); font-weight: 600; }
.pipeline-table .pipeline-due a { color: inherit; }
.pipeline-table .pipeline-late { color: var(--bs-danger-text-emphasis); font-weight: 600; }
/* Header: search and Create in the middle of the bar; the sides take equal room */
.header-side { flex: 1 0 0; min-width: max-content; display: flex; align-items: center; }
.header-side-end { justify-content: flex-end; }
.header-center { flex: 0 1 34rem; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 0.25rem; margin-inline: 0.5rem; }
.header-center .header-search { flex: 1 1 auto; min-width: 0; max-width: none; }
/* a phone: the search box needs the room of the logo (the menu still leads home) */
@media (max-width: 480px) {
  .atlas-header .brand { display: none; }
}
/* My Calendar: plain entries, with no bars or colours over the days; only the no work logged flag keeps its colour */
.mc-item { margin: 0.15rem 0 0; padding: 0.1rem 0; background: none; border: 0; border-radius: 0; }
.mc-state { display: inline-block; min-width: 0.95rem; padding: 0 0.15rem; border: 1px solid currentColor; border-radius: 0.2rem; font-size: 0.65rem; font-weight: 700; line-height: 1.2; text-align: center; }
.mc-due .mc-state { background: var(--bs-body-color); border-color: var(--bs-body-color); color: var(--bs-body-bg); }

/* T-0270: my Sales actions in My Calendar: icon, time and a done / scheduled mark; no colour alone carries the state */
.mc-sales .mc-sales-mark { color: var(--bs-secondary-color); }
.mc-sales-done .mc-sales-mark { color: var(--bs-success-text-emphasis); }
.mc-sales-late .mc-sales-mark, .mc-sales-late .mc-time { color: var(--bs-danger-text-emphasis); font-weight: 600; }
.mc-sales .mc-time { margin-left: 0; padding-left: 0; font-variant-numeric: tabular-nums; }

/* Number signs: customer page and the customer panel of a ticket */
.stat-signs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(3.75rem, 1fr));
  gap: 0.375rem;
  margin: 0.625rem 0 0;
}
.stat-sign {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  padding: 0.3rem 0.25rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
  background: var(--atlas-surface);
  color: var(--bs-body-color);
  text-align: center;
  text-decoration: none;
}
a.stat-sign:hover,
a.stat-sign:focus-visible {
  border-color: var(--bs-primary);
}
.stat-sign-value {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.stat-sign-label {
  font-size: 0.6875rem;
  line-height: 1.2;
}
.stat-signs-large {
  grid-template-columns: repeat(auto-fit, minmax(8rem, 13rem));
  gap: 0.75rem;
  margin: 0 0 1rem;
}
.stat-signs-large .stat-sign {
  padding: 0.625rem 0.75rem;
}
.stat-signs-large .stat-sign-value {
  font-size: 1.75rem;
}
.stat-signs-large .stat-sign-label {
  font-size: 0.8125rem;
}

/* The customer panel of a ticket stands out from the plain fields around it */
.customer-card {
  margin: 0.75rem 0;
  padding: 0.625rem 0.75rem;
  background: var(--atlas-flow-bg);
  border: 1px solid var(--atlas-flow-border);
  border-left: 4px solid var(--bs-primary);
  border-radius: 0.5rem;
}
.customer-card-title {
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
}
.customer-card-name {
  font-size: 1.0625rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* Customer column of ticket lists and queues, and the card shown when hovering it */
.customer-cell {
  max-width: 9rem;
}
/* the lists with the most columns give up some padding, so they fit at 1280 wide without scrolling sideways */
.table-issues-scrum > :not(caption) > * > * {
  padding-inline: 0.3rem;
}
.table-issues-scrum .product-pill-cell {
  max-width: 7rem;
}
/* relative times such as "12 minutes ago" take two lines here rather than widening the table */
.table-issues-scrum td.fs-xs.text-nowrap {
  white-space: normal !important;
  min-width: 3.5rem;
}
/* the Invite button stays AA on the card's panel in the light themes */
:root:not([data-bs-theme='dark']) .customer-card .btn-outline-primary {
  --bs-btn-color: #0052cc;
  --bs-btn-border-color: #0052cc;
}
.customer-hover {
  position: fixed;
  z-index: 1080;
  width: 24rem;
  max-width: calc(100vw - 1rem);
  max-height: calc(100vh - 1rem);
  overflow: auto;
  background: var(--atlas-surface);
  border-radius: 0.5rem;
  box-shadow: var(--bs-box-shadow);
}
.customer-hover .customer-card {
  margin: 0;
}

/* Strategic themes (T-0020): the colour is a swatch beside normal text, so the text keeps its contrast in every theme */
.theme-chips { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-top: 0.15rem; }
.theme-chip { display: inline-flex; align-items: center; gap: 0.3rem; max-width: 100%; padding: 0.05rem 0.45rem; border: 1px solid var(--atlas-border); border-radius: 1rem; font-size: 0.75rem; font-weight: 400; color: var(--bs-body-color); }
.theme-swatch { display: inline-block; flex: none; width: 0.75rem; height: 0.75rem; border: 1px solid var(--atlas-border); border-radius: 0.2rem; background: transparent; }
.theme-swatch-lg { width: 1.1rem; height: 1.1rem; }
.theme-text { white-space: pre-line; }
.idea-themes { margin-top: 0.75rem; }
.idea-themes h2 { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.02em; }
.theme-manual-panel { padding: 0.75rem 1rem; border: 1px solid #85b8ff; border-radius: 0.5rem; background: #e9f2ff; color: #172b4d; }
[data-bs-theme='dark'] .theme-manual-panel { border-color: #1d7afc; background: #09326c; color: #cce0ff; }
/* The strategy report */
.strategy-table .strategy-theme { width: 30%; min-width: 11rem; }
.strategy-group { margin-left: 0.25rem; padding-left: 0.6rem; border-left: 2px solid var(--atlas-border); margin-bottom: 0.4rem; }

/* The form of an idea (T-0022): text on the tint is 12.5:1 (light, blue) and 11.5:1 (dark); the border 4.6:1 and 5.2:1 */
:root,
[data-bs-theme='light'],
[data-bs-theme='blue'] {
  --atlas-core-bg: #f3f0ff;
  --atlas-core-fg: #2b2161;
  --atlas-core-border: #6e5dc6;
}
[data-bs-theme='dark'] {
  --atlas-core-bg: #2b273f;
  --atlas-core-fg: #e8e3ff;
  --atlas-core-border: #9f8fef;
}
.idea-core-row { display: flex; flex-wrap: wrap; align-items: stretch; gap: 0.75rem; }
.idea-core-panel, .idea-plan-panel { min-width: 0; padding: 0.7rem 0.85rem 0.8rem; border-radius: 0.6rem; }
.idea-core-panel { flex: 3 1 18rem; background: var(--atlas-core-bg); color: var(--atlas-core-fg); border: 1px solid var(--atlas-core-border); border-left-width: 4px; }
.idea-plan-panel { flex: 2 1 13rem; background: transparent; border: 1px solid var(--atlas-border); }
/* Strategic themes and Planning side by side, with no frame, like the fields around them */
.idea-themes-row { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: flex-start; }
.idea-themes-row .idea-themes { flex: 1 1 14rem; min-width: 0; }
.idea-themes-row .idea-plan-panel { flex: 1 1 14rem; margin-top: 0.75rem; padding: 0; background: transparent; border: 0; border-radius: 0; }
.idea-themes-row .idea-plan-panel h2 { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.02em; }
.idea-core-title { margin: 0; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.03em; color: inherit; }
.idea-core-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(5.5rem, 1fr)); gap: 0.6rem; align-items: start; }
.idea-core-label { display: block; margin-bottom: 0.2rem; font-size: 0.75rem; font-weight: 600; }
.idea-core-score { font-size: 1.35rem; font-weight: 700; line-height: 1.2; }
/* T-0381: Confidence is a list of "60% — Fair evidence" levels: it gets the wide column. In a narrow panel (a phone, the side panel) Impact, Effort
   and Score share the first row and Confidence takes the second row's first two columns (dense: the Score fills the first row) */
.idea-core-panel { container-type: inline-size; }
.idea-core-fields:has(> .idea-core-conf) { grid-template-columns: minmax(3.5rem, 1fr) minmax(3.5rem, 1fr) minmax(10rem, 2.6fr) auto; }
@container (width < 24rem) {
  .idea-core-fields:has(> .idea-core-conf) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; grid-auto-flow: row dense; }
  .idea-core-fields > .idea-core-conf { grid-column: 1 / 3; }
}
/* T-0381 m1: the chosen confidence level's meaning under the select (panel text colour, small; wraps, never widens the column) */
.idea-core-hint { margin: 0.25rem 0 0; font-size: 0.78rem; line-height: 1.3; color: inherit; overflow-wrap: anywhere; }

/* Queue lists (T-0023): eleven columns at 1280 wide. Long texts shorten, the longest word of a status sets its width,
   the flow's circles are smaller and the title takes what is left. The full texts stay in the tooltips. */
.table-queue .title-cell { min-width: 9rem; }
.table-queue > thead > tr > th { font-size: 0.8rem; }
.table-queue .customer-link { max-width: 5rem; }
.table-queue .product-pill { max-width: 5rem; }
.table-queue .status-todo,
.table-queue .status-in_progress,
.table-queue .status-done { white-space: normal; }
.table-queue .mini-flow { gap: 1px; }
.table-queue .mf-step { min-width: 1.15rem; height: 1.15rem; }
.table-queue .mf-arrow { width: 0.4rem; }
.table-queue .mf-dev { display: inline-block; max-width: 4rem; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.table-queue .flow-skeleton { width: 4.5rem; }

/* Strategic theme form (T-0024): scope on top, then panels by context. One column when narrow, in reading order; full width in columns when wide. */
.theme-panel-scope { background-image: linear-gradient(var(--atlas-dates-bg), var(--atlas-dates-bg)); }
.theme-form-panels { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (min-width: 992px) {
  .theme-form-panels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .theme-panel-core { grid-column: 1; grid-row: 1; }
  .theme-panel-pillars { grid-column: 2; grid-row: 1 / span 3; }
  .theme-panel-time { grid-column: 1; grid-row: 2; }
  .theme-panel-ops { grid-column: 1; grid-row: 3; }
}
@media (min-width: 1600px) {
  .theme-form-panels { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) minmax(0, 1fr); }
  .theme-panel-core { grid-column: 1; grid-row: 1 / span 2; }
  .theme-panel-pillars { grid-column: 2; grid-row: 1 / span 2; }
  .theme-panel-time { grid-column: 3; grid-row: 1; }
  .theme-panel-ops { grid-column: 3; grid-row: 2; }
}

/* New idea wizard (T-0033): a progress row, one step at a time, cards for the choices. One column on a phone. */
.idea-wizard { max-width: 68rem; }
.wiz-progress { display: flex; flex-wrap: wrap; gap: 0.35rem 0.5rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.wiz-progress-item { flex: 1 1 0; min-width: 0; }
.wiz-progress-link { display: flex; align-items: center; gap: 0.4rem; min-height: 2.25rem; color: var(--atlas-muted); text-decoration: none; font-size: 0.8rem; line-height: 1.2; }
.wiz-progress-link:hover { color: var(--bs-body-color); }
.wiz-progress-num { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 1.9rem; height: 1.9rem; border: 2px solid var(--atlas-muted); border-radius: 50%; background: var(--atlas-surface); color: var(--bs-body-color); font-weight: 600; }
.wiz-progress-name { min-width: 0; overflow-wrap: anywhere; }
.is-past > .wiz-progress-link .wiz-progress-num { border-color: var(--atlas-progress-fg); background: var(--atlas-progress-bg); color: var(--atlas-progress-fg); }
.is-current > .wiz-progress-link { color: var(--bs-body-color); font-weight: 700; }
.is-current > .wiz-progress-link .wiz-progress-num { border-color: var(--atlas-accent); background: var(--atlas-accent); color: var(--atlas-surface); }
.wiz-step { min-width: 0; margin-bottom: 1rem; padding: 1.25rem 1.5rem 1.5rem; }
.wiz-step fieldset { min-width: 0; }
.wiz-step-head { margin-bottom: 1rem; }
.wiz-step-count { margin: 0 0 0.15rem; color: var(--atlas-muted); font-size: 0.8rem; font-weight: 600; }
.wiz-step-title { margin: 0 0 0.25rem; font-size: 1.35rem; font-weight: 700; scroll-margin-top: calc(var(--atlas-header-h) + 1rem); }
.wiz-step-lead { margin: 0; color: var(--atlas-muted); }
.wiz-cards { display: grid; gap: 0.75rem; }
.wiz-cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wiz-cards-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.wiz-cards-priority { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.wiz-card { position: relative; min-width: 0; }
/* the real radio stays in place for the keyboard and for screen readers; the label is what shows */
.wiz-card-input { position: absolute; top: 0.75rem; right: 0.75rem; width: 1.25rem; height: 1.25rem; margin: 0; opacity: 0; pointer-events: none; }
.wiz-card-label { display: flex; flex-direction: column; gap: 0.35rem; position: relative; height: 100%; padding: 1rem; border: 1px solid var(--atlas-border); border-radius: 0.6rem; background: var(--atlas-surface); color: var(--bs-body-color); cursor: pointer; overflow-wrap: anywhere; transition: border-color 0.12s ease, box-shadow 0.12s ease; }
.wiz-card-label-center { align-items: center; text-align: center; }
.wiz-card-label:hover { border-color: var(--atlas-accent); }
.wiz-card-mark { position: absolute; top: 0.75rem; right: 0.75rem; display: inline-flex; align-items: center; justify-content: center; width: 1.25rem; height: 1.25rem; border: 2px solid var(--atlas-muted); border-radius: 50%; background: var(--atlas-surface); color: var(--atlas-surface); font-size: 0.8rem; font-weight: 700; line-height: 1; }
.wiz-card-icon { font-size: 2rem; line-height: 1; }
.wiz-card-title { font-weight: 700; padding-right: 1.5rem; }
.wiz-card-label-center .wiz-card-title { padding-right: 0; }
.wiz-card-text { font-size: 0.875rem; }
.wiz-card-example { margin-top: auto; padding-top: 0.35rem; color: var(--atlas-muted); font-size: 0.8rem; }
.wiz-card-number { font-size: 1.6rem; font-weight: 700; line-height: 1.1; color: var(--atlas-accent); }
.wiz-card-input:checked + .wiz-card-label { border-color: var(--atlas-accent); background: var(--atlas-public-bg); box-shadow: inset 0 0 0 1px var(--atlas-accent); }
.wiz-card-input:checked + .wiz-card-label .wiz-card-mark { border-color: var(--atlas-accent); background: var(--atlas-accent); }
.wiz-card-input:checked + .wiz-card-label .wiz-card-mark::before { content: '\2713'; }
.wiz-card-input:focus-visible + .wiz-card-label { outline: 2px solid var(--atlas-focus); outline-offset: 2px; }
.wiz-file-list { margin: 0.5rem 0 0; padding: 0; list-style: none; }
.wiz-file { display: flex; align-items: center; gap: 0.5rem; min-width: 0; padding: 0.3rem 0; border-top: 1px solid var(--atlas-border); }
.wiz-file-name { flex: 0 1 auto; min-width: 0; overflow-wrap: anywhere; }
.wiz-file-size { flex: 0 0 auto; margin-right: auto; color: var(--atlas-muted); font-size: 0.8rem; }
.wiz-score { margin-bottom: 1rem; padding: 0.75rem 1rem; border: 1px solid var(--atlas-border); border-left: 4px solid var(--atlas-accent); border-radius: 0.5rem; background: var(--atlas-surface); }
.wiz-score-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.75rem; }
.wiz-score-label { font-weight: 700; }
.wiz-score-value { font-size: 1.6rem; font-weight: 700; line-height: 1.1; }
.wiz-score-hint { flex: 1 1 14rem; min-width: 0; color: var(--atlas-muted); font-size: 0.85rem; }
.wiz-score-formula { margin-top: 0.25rem; color: var(--atlas-muted); font-size: 0.8rem; overflow-wrap: anywhere; }
.wiz-note { margin-bottom: 0.5rem; font-weight: 600; }
.wiz-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 1.5rem; }
.wiz-nav-gap { flex: 1 1 auto; }
@media (max-width: 991.98px) {
  .wiz-cards-5 { grid-template-columns: minmax(0, 1fr); }
  .wiz-cards-5 .wiz-card-label { display: grid; grid-template-columns: 3.75rem minmax(0, 1fr); column-gap: 0.75rem; row-gap: 0.15rem; align-content: start; }
  .wiz-cards-5 .wiz-card-number { grid-row: 1 / span 3; align-self: start; }
  .wiz-cards-5 .wiz-card-title, .wiz-cards-5 .wiz-card-text, .wiz-cards-5 .wiz-card-example { grid-column: 2; }
  .wiz-cards-5 .wiz-card-example { padding-top: 0; }
  /* the names of the steps do not fit in one row: numbers only, and the name of the one you are on */
  .wiz-progress-item { flex: 0 0 auto; }
  .wiz-progress-name { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
  .is-current > .wiz-progress-link .wiz-progress-name { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip-path: none; white-space: normal; }
}
@media (max-width: 575.98px) {
  .wiz-step { padding: 1rem; }
  .wiz-cards-2, .wiz-cards-priority { grid-template-columns: minmax(0, 1fr); }
  .wiz-cards-priority .wiz-card-label { flex-direction: row; align-items: center; justify-content: flex-start; gap: 0.75rem; padding: 0.75rem 1rem; text-align: left; }
  .wiz-cards-priority .wiz-card-icon { font-size: 1.4rem; }
  /* the buttons share the row, and wrap when they do not fit */
  .wiz-nav .btn { flex: 1 1 8rem; }
  .wiz-nav-gap { display: none; }
}
/* the priority icons' amber and cyan are too light on a white card (non-text 3:1): darker on the light themes, here only */
:root:not([data-bs-theme='dark']) .wiz-cards-priority .text-warning { color: #855d00 !important; }
:root:not([data-bs-theme='dark']) .wiz-cards-priority .text-info { color: #087990 !important; }
/* T-0037: step 1 of the wizard, several families and products; the rich description of an idea while it is edited */
.wiz-checks-group { min-width: 0; margin-bottom: 1rem; }
.wiz-checks-group legend { float: none; width: auto; margin-bottom: 0.35rem; font-size: 0.925rem; font-weight: 600; }
.wiz-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(14rem, 100%), 1fr)); gap: 0.5rem; }
.wiz-check { display: flex; align-items: flex-start; gap: 0.5rem; min-width: 0; margin: 0; padding: 0.55rem 0.75rem; border: 1px solid var(--atlas-border); border-radius: 0.5rem; background: var(--atlas-surface); overflow-wrap: anywhere; cursor: pointer; }
.wiz-check:hover { border-color: var(--atlas-accent); }
.wiz-check:has(input:checked) { border-color: var(--atlas-accent); background: var(--atlas-public-bg); }
.wiz-check .form-check-input { flex: 0 0 auto; margin: 0.15rem 0 0; border-color: var(--atlas-muted); }
.wiz-check[hidden] { display: none; }
.wiz-checks-group.is-invalid .wiz-checks { outline: 2px solid var(--atlas-danger-fg); outline-offset: 3px; border-radius: 0.5rem; }
.wiz-checks-group.is-invalid ~ .invalid-feedback { display: block; }
.mail-heading { width: auto; max-width: 9rem; }
.mail-editor[data-rich-paste] .mail-area { min-height: 220px; }
.mail-editor[data-rich-paste] .mail-area table { border-collapse: collapse; margin: 0.5rem 0; }
.mail-editor[data-rich-paste] .mail-area th, .mail-editor[data-rich-paste] .mail-area td { min-width: 4rem; padding: 0.25rem 0.5rem; border: 1px solid var(--atlas-muted); }
.mail-editor[data-rich-paste] .mail-area pre { padding: 0.5rem; background: var(--atlas-surface-2); white-space: pre-wrap; }

/* Discovery summary (T-0042): two read-only boards */
.sum-boards details > summary { padding: 0.2rem 0; cursor: pointer; }
.sum-boards details[open] > summary { margin-bottom: 0.4rem; }
.sum-boards .board-cards { padding: 0; min-height: 0; overflow: visible; }
.sum-boards .board-card { cursor: default; margin-bottom: 0.4rem; }

/* Products Tasks Overview: new-work columns (tinted per theme) and the health check */
.pipeline-table .pl-new { background-color: var(--bs-info-bg-subtle); }
.pipeline-table .pl-bugs { background-color: var(--bs-warning-bg-subtle); }
.pipeline-table .pl-health { background-color: var(--bs-secondary-bg); }
.pipeline-table .pipeline-family > .pl-new, .pipeline-table .pipeline-total > .pl-new { background-color: var(--bs-info-bg-subtle); }
.pipeline-table .pipeline-family > .pl-bugs, .pipeline-table .pipeline-total > .pl-bugs { background-color: var(--bs-warning-bg-subtle); }
.pipeline-table .pipeline-family > .pl-health, .pipeline-table .pipeline-total > .pl-health { background-color: var(--bs-secondary-bg); }
.pipeline-table .pl-new a, .pipeline-table .pl-bugs a { color: inherit; text-decoration: underline; }
.pl-h { display: inline-flex; align-items: center; gap: 0.25rem; border: 1px solid transparent; border-radius: 1rem; padding: 0.05rem 0.5rem; font: inherit; font-weight: 600; background: none; color: inherit; }
button.pl-h { cursor: help; }
.pl-h-good, .pl-h-healthy { background-color: var(--bs-success-bg-subtle); color: var(--bs-success-text-emphasis); border-color: var(--bs-success-border-subtle); }
.pl-h-watch { background-color: var(--bs-warning-bg-subtle); color: var(--bs-warning-text-emphasis); border-color: var(--bs-warning-border-subtle); }
.pl-h-risk { background-color: var(--bs-danger-bg-subtle); color: var(--bs-danger-text-emphasis); border-color: var(--bs-danger-border-subtle); }
.pl-h-none { color: var(--bs-secondary-color); }
.pl-popover { --bs-popover-max-width: 30rem; font-size: 0.8125rem; }
.pl-hp p { margin: 0 0 0.3rem; }
.pl-hp .pl-hp-part { border-top: 1px solid var(--bs-border-color); padding-top: 0.3rem; margin-top: 0.3rem; }
.pl-hp .pl-hp-part .pl-h { padding: 0 0.4rem; font-size: 0.75rem; }
/* T-0097: Open work items and Total closed framed as a box: left/right on every cell, top on the header, bottom on the grand total */
.pipeline-table { --pl-frame: 2px solid var(--bs-primary-border-subtle); }
.pipeline-table > :is(thead, tbody, tfoot) > tr > .pipeline-col-framed { border-left: var(--pl-frame); border-right: var(--pl-frame); }
.pipeline-table > thead > tr:first-child > .pipeline-col-framed { border-top: var(--pl-frame); }
.pipeline-table > tfoot > tr:last-child > .pipeline-col-framed { border-bottom: var(--pl-frame); }
.pipeline-legend > summary { cursor: pointer; }
/* T-0097: Administration -> Settings, Product health rules */
.health-rules-input { width: 7.5rem; flex-wrap: nowrap; }
.health-rules-table td, .health-rules-table th { vertical-align: top; }

/* Month-over-Month Task Comparison and Service Report */
.mom-table { min-width: max-content; }
.mom-table th, .mom-table td { white-space: nowrap; }
.mom-table > thead > tr > th:first-child, .mom-table > tbody > tr > th:first-child, .mom-table > tfoot > tr > th:first-child { position: sticky; left: 0; z-index: 1; background-color: var(--bs-body-bg); min-width: 11rem; }
.mom-table .pipeline-family > th:first-child { background-color: var(--bs-tertiary-bg); }
.mom-table .mom-month { border-left: 2px solid var(--bs-border-color); }
.mom-table .mom-t { border-left: 2px solid var(--bs-border-color); }
.mom-table .mom-b { background-color: var(--bs-warning-bg-subtle); }
.mom-table .mom-ct, .mom-table .mom-cb { background-color: var(--bs-success-bg-subtle); }
.mom-table .pipeline-family > .mom-b, .mom-table .pipeline-total > .mom-b { background-color: var(--bs-warning-bg-subtle); }
.mom-table .pipeline-family > .mom-ct, .mom-table .pipeline-family > .mom-cb, .mom-table .pipeline-total > .mom-ct, .mom-table .pipeline-total > .mom-cb { background-color: var(--bs-success-bg-subtle); }
.mom-chart { height: 22rem; }
.svc-defs dt { font-weight: 600; display: inline; }
.svc-defs dt::after { content: ': '; }
.svc-defs dd { display: inline; margin: 0; }
.svc-defs dd::after { content: ''; display: block; }

/* T-0049: the reset buttons on the Backup tab. White on #b02a37 is 6.9:1; the focus ring comes from Bootstrap. */
.btn-reset { --bs-btn-color: #fff; --bs-btn-bg: #b02a37; --bs-btn-border-color: #b02a37; --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #8f1f2b; --bs-btn-hover-border-color: #8f1f2b; --bs-btn-active-color: #fff; --bs-btn-active-bg: #7a1923; --bs-btn-active-border-color: #7a1923; --bs-btn-focus-shadow-rgb: 176, 42, 55; --bs-btn-disabled-color: #fff; --bs-btn-disabled-bg: #8a4a50; --bs-btn-disabled-border-color: #8a4a50; }
.reset-panel { border-left: 4px solid #b02a37; }
.reset-list > li + li { border-top: 1px solid var(--atlas-border); }
.reset-intro { flex: 1 1 22rem; }

/* ── T-0052 welcome guide (modal guide/modal.ejs, page guide/page.ejs, practice mode) ── */
:root,
[data-bs-theme='light'] {
  --guide-admin-bg: #f3f0ff;
  --guide-admin-border: #6e5dc6;
  --guide-admin-fg: #352c63;
  --guide-sa-bg: #5e4db2;
  --guide-congrats-bg: #dcfff1;
  --guide-congrats-fg: #164b35;
}
[data-bs-theme='blue'] {
  --guide-admin-bg: #ecebff;
  --guide-admin-border: #5e4db2;
  --guide-admin-fg: #2b2470;
  --guide-sa-bg: #5e4db2;
  --guide-congrats-bg: #e3fcef;
  --guide-congrats-fg: #164b35;
}
[data-bs-theme='dark'] {
  --guide-admin-bg: #2b273f;
  --guide-admin-border: #9f8fef;
  --guide-admin-fg: #dfd8fd;
  --guide-sa-bg: #6e5dc6;
  --guide-congrats-bg: #164b35;
  --guide-congrats-fg: #dcfff1;
}
@media (min-width: 576px) {
  .guide-modal .guide-dialog { max-width: none; width: 90vw; height: 90vh; margin: 5vh auto; }
}
.guide-content { height: 100%; overflow: hidden; }
.guide-header { gap: 1rem; align-items: flex-start; background: #0c66e4; color: #fff; border-bottom-color: #0c66e4; }
.guide-header .modal-title, .guide-header .text-muted-2 { color: #fff !important; } /* .text-muted-2 is !important (T-0101: was grey) */
/* T-0101 welcome guide step 1 "Choose your desktop": two panels with CSS mockups (no images) */
.guide-desktop-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.guide-desktop-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; }
.guide-desktop-card { display: flex; flex-direction: column; gap: 0.4rem; padding: 0.75rem; border: 2px solid var(--atlas-border); border-radius: 0.75rem; background: var(--atlas-surface); cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s; }
.guide-desktop-card:hover { border-color: #0c66e4; }
.guide-desktop-card:has(input:focus-visible) { outline: 2px solid var(--atlas-focus); outline-offset: 2px; }
.guide-desktop-card.is-selected { border-color: #0c66e4; box-shadow: 0 0 0 3px rgba(12, 102, 228, 0.2); }
.guide-desktop-card.is-disabled { cursor: not-allowed; border-style: dashed; }
.guide-desktop-card.is-disabled:hover { border-color: var(--atlas-border); }
.guide-desktop-card.is-disabled .guide-mock, .guide-desktop-card.is-disabled .guide-desktop-name { opacity: 0.5; }
.guide-desktop-name { display: flex; align-items: center; gap: 0.4rem; font-weight: 600; }
.guide-desktop-tick { margin-left: auto; color: #0c66e4; visibility: hidden; }
.guide-desktop-card.is-selected .guide-desktop-tick { visibility: visible; }
.guide-desktop-help { font-size: 0.875rem; color: var(--bs-secondary-color); }
.guide-desktop-why { font-size: 0.8125rem; padding: 0.4rem 0.5rem; border-radius: 0.375rem; background: var(--bs-warning-bg-subtle); color: var(--bs-warning-text-emphasis); }
.guide-mock { position: relative; display: grid; grid-template-columns: 22% 1fr; grid-template-rows: 12% 1fr; gap: 4px; height: 8.5rem; padding: 6px; border-radius: 0.5rem; background: var(--atlas-surface-2); border: 1px solid var(--atlas-border); overflow: hidden; }
.guide-mock span { display: block; }
.guide-mock .gm-top { grid-column: 1 / -1; border-radius: 3px; background: #0c66e4; }
.guide-mock .gm-side { display: flex; flex-direction: column; gap: 5px; padding: 6px 5px; border-radius: 3px; background: var(--atlas-surface); }
.guide-mock .gm-line { height: 5px; border-radius: 3px; background: var(--atlas-border); }
.guide-mock .gm-line.short { width: 60%; }
.guide-mock .gm-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.guide-mock .gm-tile { display: flex; flex-direction: column; justify-content: center; gap: 5px; padding: 5px; border-radius: 3px; background: var(--atlas-surface); }
.guide-mock .gm-pie { width: 2rem; height: 2rem; margin: auto; border-radius: 50%; background: conic-gradient(#0c66e4 0 45%, #22a06b 45% 75%, #e2b203 75% 100%); }
.guide-mock .gm-bars { display: flex; align-items: flex-end; justify-content: center; gap: 4px; height: 100%; }
.guide-mock .gm-bars span { width: 14%; border-radius: 2px 2px 0 0; background: #0c66e4; }
.guide-mock .gm-bars span:nth-child(1) { height: 40%; } .guide-mock .gm-bars span:nth-child(2) { height: 75%; } .guide-mock .gm-bars span:nth-child(3) { height: 55%; } .guide-mock .gm-bars span:nth-child(4) { height: 90%; }
.guide-mock .gm-chat { display: flex; flex-direction: column; gap: 5px; padding: 6px; border-radius: 3px; background: var(--atlas-surface); }
.guide-mock .gm-bubble { display: flex; flex-direction: column; gap: 4px; width: 70%; min-height: 12px; padding: 5px; border-radius: 6px; background: var(--atlas-surface-2); }
.guide-mock .gm-bubble.me { align-self: flex-end; width: 55%; background: #0c66e4; }
.guide-mock .gm-bubble.me.short { width: 35%; }
.guide-mock .gm-input { position: relative; margin-top: auto; height: 14px; border-radius: 7px; border: 1px solid var(--atlas-border); }
.guide-mock .gm-send { position: absolute; right: 2px; top: 2px; width: 8px; height: 8px; border-radius: 50%; background: #0c66e4; }
.guide-header a { color: #fff; text-decoration: underline; }
.guide-header-btn { border: 0; color: #fff; font-size: 1.1rem; line-height: 1; padding: 0.25rem; }
.guide-header-btn:hover, .guide-header-btn:focus-visible { color: #fff; background: rgba(255, 255, 255, 0.15); }
.guide-header-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.guide-body { display: flex; flex: 1 1 auto; min-height: 0; }
.guide-nav { flex: 0 0 15rem; overflow-y: auto; padding: 1rem 0.75rem; background: var(--atlas-surface-2); border-right: 1px solid var(--atlas-border); }
.guide-main { flex: 1 1 auto; min-width: 0; overflow-y: auto; padding: 1.5rem 2rem 2rem; }
.guide-footer { justify-content: space-between; gap: 0.75rem; background: var(--atlas-surface); }
.guide-footer .form-text { font-size: 0.75rem; }
.guide-progress { display: flex; align-items: center; gap: 0.5rem; margin: 0 0.25rem 0.75rem; }
.guide-progress [data-guide-count] { white-space: nowrap; }
.guide-progress progress { flex: 1 1 auto; height: 0.375rem; accent-color: var(--atlas-accent); }
.guide-steplist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.125rem; }
.guide-steplist-admin-start { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--atlas-border); }
.guide-steplink { display: flex; align-items: center; gap: 0.625rem; width: 100%; padding: 0.45rem 0.6rem; border: 0; border-radius: 0.375rem; background: transparent; color: var(--bs-body-color); text-align: left; text-decoration: none; font-size: 0.875rem; }
.guide-steplink:hover { background: var(--atlas-sidebar-active-bg); color: var(--bs-body-color); }
.guide-steplink-num { flex: 0 0 1.5rem; height: 1.5rem; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--atlas-border); background: var(--atlas-surface); font-size: 0.75rem; font-weight: 600; }
.guide-steplink[aria-current='step'] { background: var(--atlas-sidebar-active-bg); color: var(--atlas-sidebar-active-fg); font-weight: 600; }
[data-bs-theme='blue'] .guide-steplink[aria-current='step'] { background: #dbe8ff; color: #0b2a5b; }
[data-bs-theme='blue'] .guide-steplink:hover { background: #dbe8ff; color: #0b2a5b; }
.guide-steplink[aria-current='step'] .guide-steplink-num { background: var(--atlas-accent); border-color: var(--atlas-accent); color: #fff; }
[data-bs-theme='dark'] .guide-steplink[aria-current='step'] .guide-steplink-num { color: #161a1d; }
.guide-steplink.is-admin .guide-steplink-num { border-color: var(--guide-admin-border); color: var(--guide-admin-fg); background: var(--guide-admin-bg); }
.guide-steplink.is-admin[aria-current='step'] .guide-steplink-num { background: var(--guide-sa-bg); border-color: var(--guide-sa-bg); color: #fff; }

.guide-step-num { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--atlas-muted); margin-bottom: 0.25rem; font-weight: 600; }
.guide-step-title { margin-bottom: 0.75rem; }
.guide-step-title:focus { outline: none; }
.guide-step-title:focus-visible { outline: 2px solid var(--atlas-focus); outline-offset: 2px; }
.guide-lead { font-size: 1.05rem; max-width: 60rem; }
.guide-kicker { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; color: var(--atlas-muted); margin-bottom: 0.5rem; }
.guide-kinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 0.75rem; }
.guide-kind { padding: 0.875rem 1rem; border: 1px solid var(--atlas-border); border-top: 4px solid var(--atlas-accent); border-radius: 0.5rem; background: var(--atlas-surface); }
.guide-kind-service { border-top-color: #1f845a; }
.guide-kind-discovery { border-top-color: #b38600; }
.guide-kind-head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.375rem; font-size: 1.1rem; }
.guide-facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.25rem 0.75rem; font-size: 0.8125rem; margin: 0; }
.guide-facts dt { font-weight: 600; color: var(--atlas-muted); }
.guide-facts dd { margin: 0; }
.guide-tiles { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 0.5rem 1rem; }
.guide-tiles li { display: flex; gap: 0.625rem; align-items: flex-start; font-size: 0.875rem; padding: 0.5rem 0; }
.guide-tiles li > .bi { font-size: 1.15rem; color: var(--atlas-accent); line-height: 1.2; }
.guide-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem 1.5rem; }
.guide-cols > section { min-width: 0; }
.guide-list { font-size: 0.875rem; padding-left: 1.1rem; margin-bottom: 0; }
.guide-list li + li { margin-top: 0.25rem; }
.guide-keys { display: grid; grid-template-columns: max-content 1fr; gap: 0.3rem 0.75rem; font-size: 0.875rem; margin: 0; }
.guide-keys dd { margin: 0; }

.guide-demo { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 1.25rem; align-items: start; margin-top: 0.75rem; }
.guide-video-el { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: contain; border: 1px solid var(--atlas-border); border-radius: 0.5rem; background: var(--atlas-surface-2); }
.guide-video-missing { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem; aspect-ratio: 16 / 10; padding: 1rem; text-align: center; font-size: 0.875rem; color: var(--atlas-muted); border: 1px dashed var(--atlas-border); border-radius: 0.5rem; background: var(--atlas-surface-2); }
.guide-video-missing .bi { font-size: 2rem; }
.guide-numbered { list-style: none; counter-reset: gstep; padding: 0; margin: 0; }
.guide-numbered > li { counter-increment: gstep; position: relative; padding: 0 0 0.75rem 2.25rem; font-size: 0.9rem; }
.guide-numbered > li::before { content: counter(gstep); position: absolute; left: 0; top: 0; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--atlas-accent); color: #fff; font-size: 0.8rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
[data-bs-theme='dark'] .guide-numbered > li::before { color: #161a1d; }
.guide-numbered-boxed { padding: 1rem 1rem 0.25rem; border: 1px solid var(--atlas-border); border-radius: 0.5rem; background: var(--atlas-surface-2); }

.guide-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; padding: 0.875rem 1rem; border-radius: 0.5rem; background: var(--atlas-surface-2); border: 1px solid var(--atlas-border); }
.guide-flow-st { padding: 0.25rem 0.75rem; border-radius: 1rem; font-size: 0.8125rem; font-weight: 600; }
.guide-flow-st.st-todo { background: var(--atlas-todo-bg); color: var(--atlas-todo-fg); }
.guide-flow-st.st-progress { background: var(--atlas-progress-bg); color: var(--atlas-progress-fg); }
.guide-flow-st.st-done { background: var(--atlas-done-bg); color: var(--atlas-done-fg); }

.guide-practice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr)); gap: 1rem; margin-top: 0.75rem; }
.guide-practice { padding: 1rem; border: 1px solid var(--atlas-border); border-radius: 0.5rem; background: var(--atlas-surface); min-width: 0; }
.practice-form { border: 2px dashed var(--atlas-internal-border); padding-top: 0; }
.practice-banner { position: sticky; top: 0; z-index: 3; display: flex; gap: 0.625rem; align-items: flex-start; margin: 0 -1rem 1rem; padding: 0.625rem 1rem; background: var(--atlas-internal-bg); color: var(--bs-body-color); border-bottom: 2px solid var(--atlas-internal-border); border-radius: 0.375rem 0.375rem 0 0; }
.practice-banner > .bi { font-size: 1.25rem; line-height: 1.2; }
.practice-result { outline: none; }
.practice-result .practice-banner { position: static; margin: 0 0 0.75rem; border: 0; border-left: 4px solid #1f845a; border-radius: 0.375rem; background: var(--atlas-done-bg); color: var(--atlas-done-fg); }
.practice-card { padding: 0.75rem 1rem; border: 1px solid var(--atlas-border); border-radius: 0.5rem; background: var(--atlas-card-bg); }

.guide-congrats { display: flex; gap: 1rem; align-items: center; padding: 1rem 1.25rem; border-radius: 0.75rem; background: var(--guide-congrats-bg); color: var(--guide-congrats-fg); }
.guide-congrats > .bi { font-size: 2.25rem; }
.guide-congrats-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.25rem; }
.guide-admin-panel { list-style: none; margin: 0; padding: 1rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.625rem; background: var(--guide-admin-bg); border: 1px solid var(--guide-admin-border); border-left-width: 4px; border-radius: 0.5rem; }
.guide-admin-item { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.75rem 0.875rem; border-radius: 0.375rem; background: var(--atlas-surface); border: 1px solid var(--atlas-border); }
.guide-admin-icon { font-size: 1.25rem; color: var(--guide-admin-border); line-height: 1.3; }
.guide-admin-name { font-weight: 600; margin-bottom: 0.125rem; display: flex; flex-wrap: wrap; gap: 0.375rem; align-items: center; }
.guide-admin-text { font-size: 0.8125rem; margin: 0; }
.guide-sa-badge { background: var(--guide-sa-bg); color: #fff; font-weight: 600; }
.guide-roles-wrap { border: 1px solid var(--atlas-border); border-radius: 0.5rem; }
.guide-roles { font-size: 0.8125rem; }
.guide-roles th[scope='col'] { white-space: nowrap; }
.guide-roles th[scope='row'] { position: sticky; left: 0; background: var(--atlas-surface); min-width: 12rem; }
.guide-role-notes { font-size: 0.8125rem; padding-left: 1.1rem; margin: 0.5rem 0 0; color: var(--atlas-muted); }

.guide-page { display: grid; grid-template-columns: 14rem minmax(0, 1fr); gap: 2rem; align-items: start; }
.guide-toc { position: sticky; top: calc(var(--atlas-header-h) + 1rem); }
.guide-page .guide-step { padding-bottom: 2rem; margin-bottom: 2rem; border-bottom: 1px solid var(--atlas-border); scroll-margin-top: calc(var(--atlas-header-h) + 1rem); }

@media (max-width: 991.98px) {
  .guide-demo { grid-template-columns: 1fr; }
  .guide-page { grid-template-columns: minmax(0, 1fr); }
  .guide-toc { position: static; }
}
@media (max-width: 767.98px) {
  .guide-body { flex-direction: column; }
  .guide-nav { flex: 0 0 auto; border-right: 0; border-bottom: 1px solid var(--atlas-border); padding: 0.5rem 0.75rem; }
  .guide-nav .guide-steplist { flex-direction: row; overflow-x: auto; gap: 0.25rem; padding-bottom: 0.25rem; }
  .guide-nav .guide-steplist li { flex: 0 0 auto; }
  .guide-nav .guide-steplist-admin-start { margin: 0 0 0 0.5rem; padding: 0 0 0 0.5rem; border-top: 0; border-left: 1px solid var(--atlas-border); }
  .guide-nav .guide-steplink { white-space: nowrap; padding: 0.35rem 0.5rem; }
  .guide-nav .guide-steplink:not([aria-current='step']) > span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .guide-progress { margin-bottom: 0.375rem; }
  .guide-main { padding: 1rem; }
  .guide-footer { flex-wrap: wrap; }
  .guide-footer .form-check { flex: 1 1 100%; }
  .guide-footer > .d-flex { flex: 1 1 100%; justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) {
  .guide-modal.fade .modal-dialog { transition: none; }
}

/* ── T-0053: escalation records by department (service tickets vs development tasks) ── */
:root,
[data-bs-theme='light'],
[data-bs-theme='blue'] {
  --atlas-dept-service: #0b6e69;
  --atlas-dept-dev: #6929c4;
}
[data-bs-theme='dark'] {
  --atlas-dept-service: #4fd1c5;
  --atlas-dept-dev: #b794f6;
}
.dept-service { --dept-c: var(--atlas-dept-service); }
.dept-dev { --dept-c: var(--atlas-dept-dev); }
.dept-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0 0.35rem;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  vertical-align: baseline;
  color: var(--dept-c);
  background: color-mix(in srgb, var(--dept-c) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--dept-c) 40%, transparent);
  border-radius: 999px;
}
/* a record in a side panel: accent bar in the department colour */
.dept-rec {
  padding: 0.3rem 0 0.3rem 0.55rem;
  border-left: 3px solid var(--dept-c);
}
.dept-ws {
  color: var(--dept-c);
  font-weight: 600;
}
.flow-meta .dept-tag {
  margin-right: 0.15rem;
}
/* escalator and assignee thumbnails, with the person card on hover and keyboard focus */
.esc-people {
  display: inline-flex;
  flex-shrink: 0;
  gap: 0.3rem;
}
.person.avatar-card {
  margin-left: 0;
}
.avatar-card .person-face .avatar {
  width: 24px;
  height: 24px;
  font-size: 0.62rem;
}
.avatar-card .person-card {
  left: auto;
  right: 0;
  width: 14rem;
}

/* ── T-0054: filter bar of Service queues and All tickets (wraps; no sideways scroll on a phone) ── */
.ticket-filters .tf-search {
  flex: 1 1 12rem;
  min-width: 10rem;
  max-width: 22rem;
}
.ticket-filters .multiselect-menu {
  min-width: 14rem;
}
@media (max-width: 575.98px) {
  .ticket-filters .tf-search,
  .ticket-filters .product-filter,
  .ticket-filters .product-filter .multiselect-toggle {
    max-width: 100%;
  }
}

/* ── T-0052 the guide minimized: a panel docked bottom right (guide/dock.ejs), not modal; collapsed it is a pill ── */
.guide-dock { position: fixed; right: 1rem; bottom: 1rem; z-index: 1040; width: 380px; max-width: calc(100vw - 2rem); max-height: 60vh; display: flex; flex-direction: column; background: var(--atlas-surface); color: var(--bs-body-color); border: 1px solid var(--atlas-border); border-top: 4px solid var(--atlas-accent); border-radius: 0.75rem; box-shadow: 0 0.5rem 1.5rem rgba(9, 30, 66, 0.25); }
.guide-dock[hidden] { display: none; }
.guide-dock-head { display: flex; align-items: center; gap: 0.25rem; padding: 0.5rem 0.5rem 0.5rem 0.875rem; border-bottom: 1px solid var(--atlas-border); }
.guide-dock-head h2 { font-size: 0.9rem; }
.guide-dock-head h2:focus { outline: none; }
.guide-dock-head h2:focus-visible { outline: 2px solid var(--atlas-focus); outline-offset: 2px; }
.guide-dock-btn { color: var(--bs-body-color); width: 2rem; height: 2rem; }
.guide-dock-close { margin-left: 0.25rem; }
.guide-dock-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0.75rem 0.875rem; }
.guide-dock-foot { display: flex; justify-content: space-between; gap: 0.5rem; padding: 0.5rem 0.875rem; border-top: 1px solid var(--atlas-border); }
.guide-dock .guide-step-title { font-size: 1.05rem; }
.guide-dock .guide-lead { font-size: 0.875rem; }
.guide-dock .guide-demo,
.guide-dock .guide-cols,
.guide-dock .guide-kinds,
.guide-dock .guide-tiles,
.guide-dock .guide-practice-grid,
.guide-dock .guide-admin-panel { grid-template-columns: minmax(0, 1fr); }
.guide-dock .guide-demo { gap: 0.75rem; }
.guide-dock .guide-numbered > li { font-size: 0.8125rem; }
.guide-dock .guide-congrats { padding: 0.75rem; }
.guide-dock .guide-congrats > .bi { display: none; }
.guide-dock .guide-congrats-title { font-size: 1rem; }
.guide-dock .guide-admin-panel { padding: 0.5rem; }
.guide-pill { position: fixed; right: 1rem; bottom: 1rem; z-index: 1040; border-radius: 2rem; padding: 0.5rem 1rem; box-shadow: 0 0.25rem 0.75rem rgba(9, 30, 66, 0.3); }
.guide-pill[hidden] { display: none; }
/* toasts move to the left while the panel or the pill sits bottom right */
body.has-guide-dock #toasts.toast-container { right: auto !important; left: 0 !important; }
@media (max-width: 575.98px) {
  .guide-dock { left: 0; right: 0; bottom: 0; width: 100%; max-width: none; max-height: 50vh; border-radius: 0.75rem 0.75rem 0 0; border-left: 0; border-right: 0; border-bottom: 0; }
  .guide-pill { left: 0.75rem; right: 0.75rem; bottom: 0.75rem; }
  body.has-guide-dock #toasts.toast-container { bottom: calc(50vh + 0.25rem) !important; }
  body.has-guide-dock.guide-dock-pill #toasts.toast-container { bottom: 3.5rem !important; }
}
@media print {
  .guide-dock, .guide-pill { display: none !important; }
}

/* ── T-0060: Source & flow as a path of chevrons (Salesforce-style) and a compact timeline ── */
:root,
[data-bs-theme='light'],
[data-bs-theme='blue'] {
  --fp-done-bg: #2e844a;
  --fp-done-fg: #ffffff;
  --fp-current-bg: #0176d3;
  --fp-current-fg: #ffffff;
  --fp-todo-bg: #e3e6ea;
  --fp-todo-fg: #3e4a59;
  --fp-skip-bg: #f1f3f5;
  --fp-skip-fg: #626f86;
  --fp-email: #b35900;
  --fp-line: #c7ccd3;
  --fp-icon-fg: #ffffff;
}
[data-bs-theme='dark'] {
  --fp-done-bg: #1f845a;
  --fp-done-fg: #ffffff;
  --fp-current-bg: #0c66e4;
  --fp-current-fg: #ffffff;
  --fp-todo-bg: #38414a;
  --fp-todo-fg: #dee4ea;
  --fp-skip-bg: #282e33;
  --fp-skip-fg: #9fadbc;
  --fp-email: #f5b041;
  --fp-line: #454f59;
  --fp-icon-fg: #161a1d;
}
.escalation-flow {
  padding: 0.6rem 0.75rem;
  min-width: 0;
}
/* the path: scrolls sideways inside its own box on a narrow screen, the page never does */
.flow-path-scroll {
  /* positioned, so the visually hidden state texts stay inside the scroll box */
  position: relative;
  overflow-x: auto;
  max-width: 100%;
  margin-bottom: 0.6rem;
  scrollbar-width: thin;
  border-radius: 999px;
}
.flow-path-scroll:focus-visible {
  outline: 2px solid var(--atlas-focus);
  outline-offset: 2px;
}
.flow-path {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}
.fp-step {
  --fp-tip: 0.6rem;
  position: relative;
  flex: 1 1 0;
  min-width: 7.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  height: 2.4rem;
  margin-left: calc(-1 * var(--fp-tip) + 0.2rem);
  padding: 0 calc(var(--fp-tip) + 0.35rem) 0 calc(var(--fp-tip) + 0.5rem);
  clip-path: polygon(0 0, calc(100% - var(--fp-tip)) 0, 100% 50%, calc(100% - var(--fp-tip)) 100%, 0 100%, var(--fp-tip) 50%);
  background: var(--fp-todo-bg);
  color: var(--fp-todo-fg);
  line-height: 1.2;
}
.fp-step:first-child {
  margin-left: 0;
  padding-left: 0.6rem;
  border-radius: 999px 0 0 999px;
  clip-path: polygon(0 0, calc(100% - var(--fp-tip)) 0, 100% 50%, calc(100% - var(--fp-tip)) 100%, 0 100%);
}
.fp-step:last-child {
  padding-right: 0.75rem;
  border-radius: 0 999px 999px 0;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, var(--fp-tip) 50%);
}
.fp-step.is-done {
  background: var(--fp-done-bg);
  color: var(--fp-done-fg);
}
.fp-step.is-current {
  background: var(--fp-current-bg);
  color: var(--fp-current-fg);
}
.fp-step.is-skipped {
  background: var(--fp-skip-bg);
  color: var(--fp-skip-fg);
}
/* the user (2026-11-23): Closed Lost in red: solid when the opportunity is lost (current), a light red tint otherwise */
.fp-step.fp-lost { background: #ffe2dd; color: #5d1f1a; }
.fp-step.fp-lost.is-current { background: #c9372c; color: #ffffff; }
.fp-step.fp-lost.is-current .fp-sub, .fp-step.fp-lost.is-current .fp-icon { color: #ffffff; }
[data-bs-theme='dark'] .fp-step.fp-lost { background: #42221f; color: #ffd5d2; }
[data-bs-theme='dark'] .fp-step.fp-lost.is-current { background: #ae2e24; color: #ffffff; }
.fp-icon {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 0.3rem;
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.2);
}
.fp-step.is-todo .fp-icon,
.fp-step.is-skipped .fp-icon {
  background: var(--atlas-surface);
}
.fp-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.fp-label {
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fp-tick {
  margin-left: 0.25rem;
  font-size: 0.8rem;
  vertical-align: -0.05em;
}
.fp-sub {
  font-size: 0.66rem;
  /* T-0177 D-1: no opacity: at 0.92 the white text fell below 4.5:1 on the done / current steps (4.2:1); full colour is 4.6:1 */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fp-step.is-skipped .fp-sub {
  font-style: italic;
}
/* the records under the path: a square icon each, joined by a thin vertical line */
.flow-timeline {
  margin: 0;
  padding: 0;
}
.flow-timeline .flow-node {
  position: relative;
  display: grid;
  grid-template-columns: 1.6rem minmax(0, 1fr);
  gap: 0.5rem;
  padding: 0.15rem 0 0.3rem;
}
.flow-timeline .flow-node:not(:last-child)::before {
  content: '';
  position: absolute;
  left: calc(0.8rem - 1px);
  top: 1.95rem;
  bottom: -0.15rem;
  width: 2px;
  background: var(--fp-line);
}
.ft-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  margin-top: 0.1rem;
  border-radius: 0.3rem;
  font-size: 0.8rem;
  color: var(--fp-icon-fg);
  background: var(--dept-c, var(--fp-todo-fg));
}
.flow-email .ft-icon {
  background: var(--fp-email);
}
.flow-node.is-placeholder .ft-icon {
  background: transparent;
  color: var(--atlas-muted);
  border: 1px dashed var(--fp-line);
}
.ft-body {
  min-width: 0;
  padding: 0.1rem 0.4rem;
  border-radius: 0.35rem;
}
.flow-node.is-current .ft-body {
  background: color-mix(in srgb, var(--fp-current-bg) 9%, transparent);
  box-shadow: inset 2px 0 0 var(--fp-current-bg);
}
.ft-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  font-size: 0.8rem;
}
.ft-type,
.ft-verb {
  font-size: 0.68rem;
  color: var(--atlas-muted);
  white-space: nowrap;
}
.ft-verb {
  font-style: italic;
}
.ft-title {
  line-height: 1.3;
}
.flow-status {
  max-width: 50%;
  flex-shrink: 1;
}

/* queue lists: the same path in miniature */
.mini-flow {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
}
.mf-step {
  --mf-tip: 0.35rem;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  height: 1.3rem;
  min-width: 1.75rem;
  margin-left: calc(-1 * var(--mf-tip) + 0.12rem);
  padding: 0 calc(var(--mf-tip) + 0.2rem) 0 calc(var(--mf-tip) + 0.3rem);
  clip-path: polygon(0 0, calc(100% - var(--mf-tip)) 0, 100% 50%, calc(100% - var(--mf-tip)) 100%, 0 100%, var(--mf-tip) 50%);
  background: var(--fp-todo-bg);
  color: var(--fp-todo-fg);
}
.mini-flow > .visually-hidden + .mf-step {
  margin-left: 0;
  padding-left: 0.4rem;
  border-radius: 999px 0 0 999px;
  clip-path: polygon(0 0, calc(100% - var(--mf-tip)) 0, 100% 50%, calc(100% - var(--mf-tip)) 100%, 0 100%);
}
.mf-step:last-child {
  padding-right: 0.45rem;
  border-radius: 0 999px 999px 0;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, var(--mf-tip) 50%);
}
.mf-step.is-done,
.mf-step.mf-email {
  background: var(--fp-done-bg);
  color: var(--fp-done-fg);
}
.mf-step.is-current {
  background: var(--fp-current-bg);
  color: var(--fp-current-fg);
}
.mf-step.is-skipped {
  background: var(--fp-skip-bg);
  color: var(--fp-skip-fg);
}
.mf-step sub {
  font-size: 0.55rem;
  bottom: 0;
}
.mf-dev {
  font-family: var(--bs-font-monospace);
  font-size: 0.66rem;
}
.mf-more {
  font-size: 0.62rem;
  opacity: 0.9;
}

/* T-0062: overdue marker on the Dates tab label */
.issue-tabs .tab-dot {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  margin-left: 0.2rem;
  border-radius: 50%;
  background: #c9372c;
  vertical-align: middle;
}
[data-bs-theme='dark'] .issue-tabs .tab-dot {
  background: #ff8a93;
}

/* ── Home tabs (For you): pill tabs in one soft box, numbered, the selected one filled; no borders or underline ── */
:root,
[data-bs-theme='light'],
[data-bs-theme='blue'] {
  --home-tab-active-bg: #1e3a8a;
  --home-tab-active-fg: #ffffff;
  --home-tab-hover-bg: rgba(9, 30, 66, 0.06);
}
[data-bs-theme='dark'] {
  --home-tab-active-bg: #2f56c7;
  --home-tab-active-fg: #ffffff;
  --home-tab-hover-bg: rgba(255, 255, 255, 0.06);
}
.home-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.3rem;
  border: 0;
  border-radius: 0.85rem;
  background: var(--atlas-surface-2);
  max-width: 100%;
}
.home-tabs .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  border: 0;
  border-radius: 0.6rem;
  background: transparent;
  color: var(--atlas-muted);
  font-weight: 500;
  line-height: 1.2;
}
.home-tabs .nav-link:hover { background: var(--home-tab-hover-bg); color: var(--bs-body-color); }
.home-tabs .nav-link:focus-visible { outline: 2px solid var(--atlas-accent); outline-offset: 2px; box-shadow: none; }
.home-tabs .nav-link.active,
.home-tabs .nav-link.active:hover { background: var(--home-tab-active-bg); color: var(--home-tab-active-fg); }
.home-tab-n {
  display: inline-grid;
  place-items: center;
  min-width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--atlas-border);
  color: var(--bs-body-color);
}
.home-tabs .nav-link.active .home-tab-n { background: rgba(255, 255, 255, 0.25); color: var(--home-tab-active-fg); }
.home-tabs .nav-link.active .badge { background: rgba(255, 255, 255, 0.25) !important; color: var(--home-tab-active-fg) !important; }
@media (max-width: 575.98px) {
  .home-tabs { display: flex; }
  .home-tabs .nav-link { padding: 0.35rem 0.6rem; }
}

/* T-0065: the source picker of "Copy from another workspace" grows, the button keeps its size */
.copy-source-select { flex: 1 1 16rem; width: auto; min-width: 0; }

/* T-0067: the round blue "?" help button next to a heading (opens a help dialog). White on #0b5ed7 is 5.3:1 in every theme. */
.help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  margin-left: 0.4rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  vertical-align: middle;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: #0b5ed7;
}
.help-btn:hover { background: #0a53be; }
.help-btn:focus-visible { outline: 3px solid #0b5ed7; outline-offset: 2px; box-shadow: 0 0 0 2px var(--bs-body-bg); }
.help-points li + li { margin-top: 0.35rem; }
/* T-0069: Delete user that cannot be used: the reason is in the title; the wrapper takes the focus (a disabled button cannot) */
.delete-user-off { cursor: not-allowed; border-radius: var(--bs-border-radius-sm); }
.delete-user-off .btn:disabled { pointer-events: none; }


/* T-0067: Retrieve → Mapping → Import, the steps of an entity tab of the S1 Product app (the T-0060 chevrons as tabs) */
.s1-steps-box { border-radius: 999px; }
.s1-steps .fp-step { padding: 0; }
.s1-steps .s1-step-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  height: 100%;
  padding: 0 1rem 0 1.1rem;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.s1-steps .fp-step:first-child .s1-step-btn { padding-left: 0.6rem; }
.s1-steps .fp-step:has(.s1-step-btn.active) { background: var(--fp-current-bg); color: var(--fp-current-fg); }
.s1-steps .s1-step-btn:focus-visible { outline: 2px solid var(--atlas-focus, #0b5ed7); outline-offset: -4px; }
/* rows of the Import list: a choosable one is picked by a click anywhere on it; one that cannot be chosen says why */
.s1-row-ok { cursor: pointer; }
.s1-row-blocked { cursor: not-allowed; background: var(--bs-tertiary-bg); }
.s1-row-blocked td { color: var(--bs-secondary-color); }

/* T-0084: the Scrum and Service pies on the Products grid, aligned right in each product's panel. Each tone has the open
   colour and a paler closed colour; app.js reads the same tokens for the amCharts slices, so table swatches and slices match. */
/* the user (2026-11-18): wider donuts; when the card is narrow the charts take a second row */
.product-card { container-type: inline-size; }
.product-card-body { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0.75rem; }
.product-card-info { flex: 1 1 12rem; min-width: 0; }
.product-pies { display: flex; gap: 0.75rem; margin-left: auto; }
.product-pie { width: 10.5rem; }
.product-pie-chart { height: 8.5rem; }
@container (max-width: 40rem) {
  .product-card-info { flex-basis: 100%; }
  .product-pies { margin-left: 0; width: 100%; justify-content: space-around; }
  .product-pie { flex: 1 1 0; width: auto; max-width: 14rem; min-width: 0; }
}
.product-pie-empty { height: 8.5rem; display: flex; align-items: center; justify-content: center; border: 1px dashed var(--bs-border-color); border-radius: 50%; }
.product-pie-table { font-size: 0.6875rem; --bs-table-bg: transparent; }
.product-pie-table th, .product-pie-table td { padding: 0.05rem 0.15rem; }
.product-pie-table tbody th { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 7rem; }
.pie-swatch { display: inline-block; width: 0.55rem; height: 0.55rem; border-radius: 2px; margin-right: 0.25rem; background: var(--pie-open); vertical-align: baseline; }
/* Scrum: bugs red, tasks blue, new features green (the issue type colours), closed paler */
.pie-tone-primary { --pie-open: #0c66e4; --pie-closed: #9dc2ff; }
.pie-tone-success { --pie-open: #1f845a; --pie-closed: #94dcb8; }
.pie-tone-danger { --pie-open: #c9372c; --pie-closed: #f5a9a1; }
.pie-tone-warning { --pie-open: #b65c02; --pie-closed: #f8c98a; }
.pie-tone-info { --pie-open: #1d7f8c; --pie-closed: #9ad8e0; }
.pie-tone-secondary, .pie-tone-type-0, .pie-tone-type-1, .pie-tone-type-2, .pie-tone-type-3, .pie-tone-type-4, .pie-tone-type-5 { --pie-open: #626f86; --pie-closed: #c1c7d0; }
/* Service: a palette of its own (none of the Scrum hues) */
.pie-tone-service-0 { --pie-open: #6e5dc6; --pie-closed: #c9c0f2; }
.pie-tone-service-1 { --pie-open: #c2185b; --pie-closed: #f3a6c4; }
.pie-tone-service-2 { --pie-open: #a35a00; --pie-closed: #eec48e; }
.pie-tone-service-3 { --pie-open: #00796b; --pie-closed: #93d6cc; }
.pie-tone-service-4 { --pie-open: #455a64; --pie-closed: #b6c3c9; }
.pie-tone-service-5 { --pie-open: #8e24aa; --pie-closed: #dcaee8; }
[data-bs-theme='dark'] .pie-tone-primary { --pie-open: #579dff; --pie-closed: #1c4f94; }
[data-bs-theme='dark'] .pie-tone-success { --pie-open: #4bce97; --pie-closed: #1f6b4b; }
[data-bs-theme='dark'] .pie-tone-danger { --pie-open: #f87168; --pie-closed: #8a2d26; }
[data-bs-theme='dark'] .pie-tone-warning { --pie-open: #f5a742; --pie-closed: #7f4b0b; }
[data-bs-theme='dark'] .pie-tone-info { --pie-open: #60c6d2; --pie-closed: #1e5b63; }
[data-bs-theme='dark'] :is(.pie-tone-secondary, .pie-tone-type-0, .pie-tone-type-1, .pie-tone-type-2, .pie-tone-type-3, .pie-tone-type-4, .pie-tone-type-5) { --pie-open: #9fadbc; --pie-closed: #454f59; }
[data-bs-theme='dark'] .pie-tone-service-0 { --pie-open: #9f8fef; --pie-closed: #463a85; }
[data-bs-theme='dark'] .pie-tone-service-1 { --pie-open: #f06d9f; --pie-closed: #7a2347; }
[data-bs-theme='dark'] .pie-tone-service-2 { --pie-open: #e2a54f; --pie-closed: #6e4512; }
[data-bs-theme='dark'] .pie-tone-service-3 { --pie-open: #4fc3b3; --pie-closed: #1b5a52; }
[data-bs-theme='dark'] .pie-tone-service-4 { --pie-open: #a7b8c0; --pie-closed: #3c4a50; }
[data-bs-theme='dark'] .pie-tone-service-5 { --pie-open: #cf7ee6; --pie-closed: #5c2a6b; }

/* Product page, Issues tab: open and closed per type (the user, 2026-11-18) */
.product-type-chip { display: flex; flex-direction: column; gap: 0.1rem; padding: 0.4rem 0.75rem; border: 1px solid var(--atlas-border); border-radius: 0.5rem; background: var(--atlas-surface-2); min-width: 9rem; }


/* ── T-0087b/c: AI setup status dots, the connection form, the floating AI button ── */
.ai-dot { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 50%; vertical-align: middle; border: 2px solid transparent; }
.ai-dot-live { background: var(--bs-success); border-color: var(--bs-success); }
.ai-dot-failed { background: var(--bs-danger); border-color: var(--bs-danger); }
.ai-dot-stale { background: var(--bs-secondary-color); border-color: var(--bs-secondary-color); }
.ai-dot-inactive { background: transparent; border-color: var(--bs-secondary-color); }
.ai-connections td { vertical-align: middle; }
.ai-help ol { padding-left: 1.25rem; }
.ai-launcher { position: fixed; right: 1rem; bottom: 1rem; z-index: 1040; display: flex; flex-direction: column; align-items: flex-end; gap: 0.5rem; }
/* the user (2026-11-18): a larger round button */
.ai-launcher-button { width: 3.75rem; height: 3.75rem; padding: 0; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.05rem; line-height: 1; }
.ai-launcher-button .bi { font-size: 1.5rem; }
.ai-launcher-button span { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.04em; }
@media (max-width: 575.98px) { .ai-launcher { right: 0.75rem; bottom: 0.75rem; } }

/* T-0087d: the chat in a right offcanvas (the user, 2026-11-18): 50% of the viewport on wide screens, resizable 30 to 90%
   through --ai-width (set from JS with style.setProperty, CSP-safe), full screen below 992px. Themes through the Bootstrap
   and atlas variables. */
.ai-launcher.is-open .ai-launcher-button { display: none; }
.ai-offcanvas.offcanvas-end, .ai-offcanvas.offcanvas-start { width: 100vw; display: flex; flex-direction: column; background: var(--atlas-surface, var(--bs-body-bg)); }
@media (min-width: 992px) {
  .ai-offcanvas.offcanvas-end { width: var(--ai-width, 50vw); border-left: 1px solid var(--bs-border-color); }
  /* T-0093: the chat on the left */
  .ai-offcanvas.offcanvas-start { width: var(--ai-width, 50vw); border-right: 1px solid var(--bs-border-color); }
}
.ai-side-left .ai-resize { left: auto; right: -0.25rem; }
/* T-0098: the chat at the top or the bottom: full width, 60% of the window high on wide screens (resizable 25 to 90% through
   --ai-height from the inner edge: the bottom edge at the top, the top edge at the bottom), full screen below 992px. The
   two columns stay; the sidebar list scrolls on a low panel (.ai-side-scroll). */
.ai-offcanvas.offcanvas-top, .ai-offcanvas.offcanvas-bottom { height: 100vh; height: 100dvh; max-height: 100%; display: flex; flex-direction: column; }
@media (min-width: 992px) {
  .ai-offcanvas.offcanvas-top, .ai-offcanvas.offcanvas-bottom { height: var(--ai-height, 60vh); }
  .ai-offcanvas.offcanvas-top { border-bottom: 1px solid var(--bs-border-color); }
  .ai-offcanvas.offcanvas-bottom { border-top: 1px solid var(--bs-border-color); }
}
.ai-edge-top .ai-resize, .ai-edge-bottom .ai-resize { left: 0; right: 0; width: auto; height: 0.5rem; cursor: ns-resize; }
.ai-edge-top .ai-resize { top: auto; bottom: -0.25rem; }
.ai-edge-bottom .ai-resize { top: -0.25rem; bottom: auto; }
.ai-edge-top .ai-resize::after, .ai-edge-bottom .ai-resize::after { top: 0.125rem; left: 50%; width: 3rem; height: 0.25rem; margin-top: 0; margin-left: -1.5rem; }
.ai-offcanvas.ai-no-anim, .ai-offcanvas.ai-resizing { transition: none; }
.ai-resize { position: absolute; top: 0; bottom: 0; left: -0.25rem; width: 0.5rem; cursor: ew-resize; z-index: 3; touch-action: none; }
.ai-resize::after { content: ''; position: absolute; top: 50%; left: 0.125rem; width: 0.25rem; height: 3rem; margin-top: -1.5rem; border-radius: 0.25rem; background: var(--bs-border-color); }
.ai-resize:hover::after, .ai-resize:focus-visible::after, .ai-resizing .ai-resize::after { background: var(--bs-primary); }
.ai-resize:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: -2px; }
@media (max-width: 991.98px) { .ai-resize { display: none; } }
.ai-chat-head { padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--bs-border-color); }
.ai-chat-body { flex: 1 1 auto; min-height: 0; padding: 0; display: flex; flex-direction: column; overflow: hidden; }

/* the chat component: two columns like ChatGPT; the sidebar collapses on a wide panel and slides over on a narrow one */
.ai-panel { position: relative; flex: 1 1 auto; min-height: 0; display: flex; container-type: inline-size; container-name: aichat; }
.ai-side { flex: 0 0 15.5rem; width: 15.5rem; display: flex; flex-direction: column; min-height: 0; background: var(--bs-tertiary-bg); border-right: 1px solid var(--bs-border-color); }
.ai-panel.side-collapsed .ai-side { display: none; }
.ai-side-top { padding: 0.5rem; }
.ai-side-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding-bottom: 0.5rem; }
.ai-side-h { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--bs-secondary-color); margin: 0.5rem 0.5rem 0.25rem; }
.ai-side-prompts { margin-top: 0.5rem; border-top: 1px solid var(--bs-border-color); padding-top: 0.25rem; }
.ai-side-bottom { border-top: 1px solid var(--bs-border-color); padding: 0.25rem 0.5rem; }
.ai-side-scrim { position: absolute; inset: 0; z-index: 4; background: rgba(0, 0, 0, 0.3); }
.ai-side-scrim[hidden] { display: none; }
@container aichat (max-width: 40rem) {
  .ai-side, .ai-panel.side-collapsed .ai-side { display: none; position: absolute; top: 0; bottom: 0; left: 0; z-index: 5; width: min(16rem, 85%); box-shadow: var(--bs-box-shadow); }
  .ai-panel.side-open .ai-side { display: flex; }
}
.ai-main { flex: 1 1 auto; min-width: 0; min-height: 0; display: flex; flex-direction: column; container-type: inline-size; container-name: aimain; }
.ai-panel-bar { display: flex; align-items: center; gap: 0.375rem; padding: 0.375rem 0.5rem; }
.ai-panel-title { min-width: 0; flex: 1 1 auto; font-weight: 600; }
.ai-conv { display: flex; align-items: center; gap: 0.125rem; padding: 0 0.25rem; border-radius: 0.375rem; margin: 0 0.25rem; }
.ai-conv.active { background: var(--bs-secondary-bg); }
.ai-conv-open { flex: 1 1 auto; min-width: 0; color: var(--bs-body-color); text-decoration: none; }
/* the user (2026-11-18): conversations list smaller; the date smaller than the title and a little greyer */
.ai-conv-title { font-size: 0.8125rem; line-height: 1.3; }
.ai-conv-date { font-size: 0.6875rem; line-height: 1.3; color: var(--atlas-muted); }.ai-thread { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0.75rem; display: flex; flex-direction: column; gap: 0.5rem; }
.ai-thread:focus { outline: none; }
/* the user (2026-11-18): a wider chat area */
.ai-conversation { display: flex; flex-direction: column; gap: 0.5rem; max-width: 72rem; width: 100%; margin: 0 auto; }
.ai-msg { max-width: 96%; border-radius: 0.625rem; padding: 0.375rem 0.625rem; font-size: 0.875rem; overflow-wrap: anywhere; }
/* T-0102 (the user, 2026-11-18): "the replies of ai should be without border or background", in the offcanvas and on the AI
   chat homepage in every theme; the user's own message keeps its light tinted bubble, without a border */
.ai-msg-user { align-self: flex-end; background: var(--bs-primary-bg-subtle); color: var(--bs-body-color); border: 0; }
.ai-msg-answer { align-self: flex-start; background: transparent; border: 0; border-radius: 0; padding-left: 0; padding-right: 0; }
/* the answer bubble with its tools and tokens line below it, outside the bubble */
.ai-answer-block { align-self: flex-start; display: flex; flex-direction: column; gap: 0.2rem; max-width: 96%; min-width: 0; }
.ai-answer-block > .ai-msg-answer { max-width: 100%; }
.ai-answer-meta { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0.25rem 1rem; padding: 0; font-size: 0.75rem; color: var(--bs-secondary-color); }
.ai-answer-meta .ai-tools { margin: 0; }
.ai-tokens { white-space: nowrap; }
.ai-msg-note { align-self: center; max-width: 100%; }
.ai-text { white-space: pre-wrap; }
.ai-answer-text > :last-child { margin-bottom: 0; }
.ai-answer-text p { margin-bottom: 0.375rem; }
.ai-answer-text table { font-size: 0.8125rem; }
.ai-answer-text pre { white-space: pre-wrap; }
.ai-typing { display: inline-block; letter-spacing: 0.2em; animation: ai-blink 1s steps(2, start) infinite; }
@keyframes ai-blink { to { visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .ai-typing { animation: none; } .ai-offcanvas { transition: none; } }
.ai-tools summary { cursor: pointer; color: var(--bs-secondary-color); }
.ai-tools code { font-size: 0.75rem; }
.ai-tool-denied, .ai-tool-error, .ai-tool-not_found, .ai-tool-invalid, .ai-tool-rejected, .ai-tool-limit { color: var(--bs-danger-text-emphasis); }
.ai-live-tools .ai-tool-running::before { content: '⟳ '; }
.ai-chips { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-top: 0.375rem; }
.ai-chip { display: inline-flex; align-items: center; gap: 0.25rem; max-width: 16rem; padding: 0.0625rem 0.5rem; border-radius: 999px; font-size: 0.75rem; border: 1px solid var(--bs-border-color); background: var(--bs-body-bg); color: var(--bs-link-color); text-decoration: none; overflow: hidden; white-space: nowrap; }
.ai-chip:hover, .ai-chip:focus { text-decoration: underline; }
.ai-empty { color: var(--bs-secondary-color); max-width: 46rem; width: 100%; margin: 0 auto; text-align: center; }
/* the user (2026-11-18): suggested prompts as small borderless buttons, grouped; T-0102: in the mega dropdown, 1 column on a
   very narrow chat, 2 on a narrow one, 4 on a wide one */
.ai-examples { display: grid; grid-template-columns: 1fr; gap: 0.75rem 1.25rem; }
@container aimain (min-width: 26rem) { .ai-examples { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container aimain (min-width: 52rem) { .ai-examples { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ai-example-title { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--bs-secondary-color); margin: 0 0 0.25rem; }
.ai-example { display: flex; align-items: flex-start; gap: 0.4rem; width: 100%; padding: 0.25rem 0.4rem; border: 0; border-radius: 0.375rem; background: transparent; color: var(--bs-body-color); font-size: 0.8rem; line-height: 1.3; text-align: left; }
.ai-example .bi { color: var(--bs-primary); flex-shrink: 0; margin-top: 0.1rem; }
.ai-example:hover, .ai-example:focus-visible { background: var(--bs-tertiary-bg); color: var(--bs-body-color); }
.ai-example:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: 1px; }
/* T-0102: the bottom bar holds one rounded box (the textarea and its button row); the rules are in the T-0102 block below */
.ai-input { position: relative; padding: 0.25rem 0.75rem 0.75rem; display: flex; flex-direction: column; gap: 0.375rem; }
/* T-0087h: the borderless bookmark after the user's own message and next to the input (the user, 2026-11-18) */
.ai-user-actions { align-self: flex-end; margin-top: -0.375rem; }
.ai-bookmark { padding: 0 0.25rem; line-height: 1; color: var(--bs-secondary-color); border: 0; text-decoration: none; }
.ai-bookmark:hover, .ai-bookmark:focus-visible { color: var(--bs-link-color); }
.ai-bookmark.is-saved { color: var(--bs-link-color); }
/* T-0087h: the Saved prompts list of the sidebar */
.ai-prompt { display: flex; align-items: center; gap: 0.125rem; padding: 0 0.25rem; border-radius: 0.375rem; margin: 0 0.25rem; }
.ai-prompt:hover { background: var(--bs-secondary-bg); }
.ai-prompt-run { flex: 1 1 auto; min-width: 0; color: var(--bs-body-color); text-decoration: none; }
.ai-dialog { border: 1px solid var(--bs-border-color); border-radius: 0.5rem; padding: 0.75rem; width: min(32rem, calc(100vw - 2rem)); background: var(--bs-body-bg); color: var(--bs-body-color); }
.ai-dialog::backdrop { background: rgb(0 0 0 / 0.35); }
.ai-share-candidates { max-height: 14rem; overflow-y: auto; border: 1px solid var(--bs-border-color-translucent); border-radius: 0.375rem; padding: 0.25rem 0.5rem; }
/* T-0095: the "Continue in the create wizard" card under an answer */
.ai-create-card { border: 1px solid var(--bs-border-color); border-radius: 0.5rem; padding: 0.5rem 0.625rem; margin: 0.25rem 0 0.5rem; background: var(--bs-body-bg); overflow-wrap: anywhere; }
/* T-0087e: Agent training */
.ai-preamble-text, .ai-diff { white-space: pre-wrap; font-size: 0.8125rem; max-height: 24rem; overflow: auto; background: var(--bs-tertiary-bg); border-radius: 0.375rem; padding: 0.5rem; }
.ai-skills-editor { min-height: 22rem; font-size: 0.8125rem; }
.ai-diff-add { display: block; background: var(--bs-success-bg-subtle); color: var(--bs-success-text-emphasis); }
.ai-diff-del { display: block; background: var(--bs-danger-bg-subtle); color: var(--bs-danger-text-emphasis); text-decoration: line-through; }
.ai-diff-same { display: block; }
.ai-try-out .ai-msg { max-width: 100%; }
.ai-budget-input { max-width: 10rem; }
/* T-0087d my_team card */
.ai-team-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 0.375rem; }
.ai-person { display: flex; align-items: flex-start; gap: 0.375rem; min-width: 0; }
.ai-person-text { min-width: 0; overflow-wrap: anywhere; }
.ai-team-card img.avatar-photo { width: 2rem; height: 2rem; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
/* T-0087g: product status report (pivot under an answer), scope quick replies; Bootstrap tokens only, so light, dark and blue
   follow the theme. On a phone only the table scrolls sideways, never the page. */
.ai-quick-replies { display: flex; flex-wrap: wrap; gap: 0.375rem; margin: 0.25rem 0 0.5rem; }
.ai-report { border: 1px solid var(--bs-border-color); border-radius: 0.5rem; padding: 0.5rem; margin: 0.25rem 0 0.5rem; background: var(--bs-body-bg); max-width: 100%; min-width: 0; }
.ai-report-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; margin-bottom: 0.25rem; }
.ai-report-head .ai-report-csv { margin-left: auto; }
.ai-report-scroll { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; border: 1px solid var(--bs-border-color-translucent); border-radius: 0.375rem; margin-bottom: 0.25rem; }
.ai-report-scroll:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: 1px; }
.ai-report-table { font-size: 0.8125rem; width: auto; min-width: 100%; --bs-table-bg: transparent; }
.ai-report-table th, .ai-report-table td { white-space: nowrap; vertical-align: middle; padding: 0.2rem 0.4rem; }
.ai-report-table thead th { background: var(--bs-tertiary-bg); color: var(--bs-emphasis-color); font-weight: 600; text-align: center; border-bottom-width: 1px; }
.ai-report-table thead th.ai-report-name { text-align: left; }
.ai-report-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.ai-report-table .ai-report-total { background: var(--bs-secondary-bg); }
.ai-report-group-scrum { border-top: 3px solid var(--bs-primary); }
.ai-report-group-service { border-top: 3px solid var(--bs-info); }
.ai-report-name { position: sticky; left: 0; z-index: 1; background: var(--bs-body-bg); text-align: left; min-width: 9rem; }
.ai-report-table thead .ai-report-name { background: var(--bs-tertiary-bg); }
.ai-report-ws-name { padding-left: 1.75rem !important; font-weight: 400; }
.ai-report-product th { font-weight: 600; }
.ai-report-table td.ai-report-late, .ai-report-table td.ai-report-late a { color: var(--bs-danger-text-emphasis); font-weight: 700; }
.ai-report-table td.ai-report-late { background: var(--bs-danger-bg-subtle); }
.ai-report-late-head { color: var(--bs-danger-text-emphasis) !important; }
.ai-report-table tfoot th, .ai-report-table tfoot td { font-weight: 700; border-top: 2px solid var(--bs-border-color); background: var(--bs-tertiary-bg); }
.ai-report-table tfoot .ai-report-name { background: var(--bs-tertiary-bg); }
.ai-report-sort, .ai-report-toggle { background: none; border: 0; padding: 0 0.125rem; color: inherit; font: inherit; cursor: pointer; }
.ai-report-sort:focus-visible, .ai-report-toggle:focus-visible { outline: 2px solid var(--bs-primary); border-radius: 0.25rem; }
th[aria-sort="ascending"] .ai-report-sort::after { content: " \25B2"; font-size: 0.625rem; }
th[aria-sort="descending"] .ai-report-sort::after { content: " \25BC"; font-size: 0.625rem; }
.ai-report-toggle .bi { display: inline-block; transition: transform 0.15s; }
.ai-report-toggle[aria-expanded="true"] .bi { transform: rotate(90deg); }
.ai-report-kpis td { background: var(--bs-tertiary-bg); white-space: normal; }
.ai-report-kpi-list { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; font-size: 0.75rem; position: sticky; left: 0.5rem; max-width: min(100%, 60rem); }
.ai-health { display: inline-block; padding: 0 0.4rem; border-radius: 999px; font-size: 0.6875rem; font-weight: 600; border: 1px solid transparent; }
.ai-health-good { background: var(--bs-success-bg-subtle); color: var(--bs-success-text-emphasis); border-color: var(--bs-success-border-subtle); }
.ai-health-watch { background: var(--bs-warning-bg-subtle); color: var(--bs-warning-text-emphasis); border-color: var(--bs-warning-border-subtle); }
.ai-health-risk { background: var(--bs-danger-bg-subtle); color: var(--bs-danger-text-emphasis); border-color: var(--bs-danger-border-subtle); }
.ai-health-none { background: var(--bs-secondary-bg); color: var(--bs-secondary-color); border-color: var(--bs-border-color); }
.ai-report-legend summary { cursor: pointer; color: var(--bs-link-color); }
@media (prefers-reduced-motion: reduce) { .ai-report-toggle .bi { transition: none; } }

/* T-0098, the user (2026-11-18, latest): "make the background of the offcanvas a blurry like bg just like in deepseek, with the
   same bg fades and shadows and text colors". The AI chat offcanvas (not the AI chat homepage, home/ai.ejs) is frosted glass,
   the same in the light, dark and blue themes: an off-white glass (#f9f8f8 at 90%, backdrop blur 24px) with a soft blue fade
   from the top (#9cc1e7), translucent white surfaces (blur 12px), hairline borders (black 6-10%), soft layered shadows, and
   near-black text (#1e232c; secondary 70% black, descriptions/dates 65% black). Accent #3a65c2 (primary buttons, white text
   5.5:1), links #234792, red #b02a37. Glass at 90% keeps every pair AA even over a dark page (text 10:1 or more, 65% black
   5.7:1 or more, red 4.5:1 or more). The class keeps its name .ai-panel-blue (used by the views and tests). Tokens are set on
   the offcanvas's own parts, never page-wide, and never on .ai-panel itself, so the dialogs opened from it (save prompt,
   share) keep the page's normal colours. */
.ai-offcanvas.ai-panel-blue {
  --ai-glass-text: #1e232c;
  --ai-glass-text-2: rgba(0, 0, 0, 0.7);
  --ai-glass-desc: rgba(0, 0, 0, 0.65);
  --ai-glass-placeholder: #5f6878;
  --ai-glass-link: #234792;
  --ai-glass-accent: #3a65c2;
  --ai-glass-accent-hover: #2f56ad;
  --ai-glass-icon: #4d6bfe;
  --ai-red: #9f2430;
  --ai-glass-surface: rgba(255, 255, 255, 0.55);
  --ai-glass-surface-strong: rgba(255, 255, 255, 0.78);
  --ai-glass-hover: rgba(0, 0, 0, 0.045);
  --ai-glass-active: rgba(77, 107, 254, 0.1);
  --ai-glass-border: rgba(0, 0, 0, 0.08);
  --ai-glass-border-strong: rgba(0, 0, 0, 0.12);
  --ai-glass-shadow: 0 0 1px 0 rgba(0, 0, 0, 0.2), 0 0 4px 0 rgba(0, 0, 0, 0.02), 0 12px 32px 0 rgba(0, 0, 0, 0.08);
  --ai-glass-shadow-card: 0 0 0 1px rgba(0, 0, 0, 0.05), 0 2px 4px rgba(0, 0, 0, 0.04), 0 12px 24px rgba(0, 0, 0, 0.05);
  /* kept for code that reads the old names */
  --ai-blue: transparent;
  --ai-blue-btn: var(--ai-glass-surface);
  --ai-blue-btn-hover: var(--ai-glass-hover);
  --ai-blue-conv: transparent;
  background:
    linear-gradient(180deg, rgba(156, 193, 231, 0.55) 0%, rgba(156, 193, 231, 0.18) 22%, rgba(250, 250, 250, 0) 45%),
    radial-gradient(120% 60% at 100% 0%, rgba(77, 107, 254, 0.1) 0%, rgba(77, 107, 254, 0) 60%),
    rgba(249, 248, 248, 0.9);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
  color: var(--ai-glass-text);
  border-color: var(--ai-glass-border);
  box-shadow: var(--ai-glass-shadow);
  color-scheme: light;
}
/* every part of the panel: light Bootstrap values, dark text, whatever the page theme */
.ai-panel-blue .ai-chat-head,
.ai-panel-blue [data-ai-loading],
.ai-panel-blue .ai-side,
.ai-panel-blue .ai-panel-bar,
.ai-panel-blue .ai-input,
.ai-panel-blue .ai-thread {
  --bs-body-bg: #fff;
  --bs-body-bg-rgb: 255, 255, 255;
  --bs-body-color: var(--ai-glass-text);
  --bs-body-color-rgb: 30, 35, 44;
  --bs-emphasis-color: #000;
  --bs-emphasis-color-rgb: 0, 0, 0;
  --bs-heading-color: var(--ai-glass-text);
  --bs-secondary-color: var(--ai-glass-text-2);
  --bs-tertiary-color: var(--ai-glass-desc);
  --bs-link-color: var(--ai-glass-link);
  --bs-link-color-rgb: 35, 71, 146;
  --bs-link-hover-color: #152443;
  --bs-link-hover-color-rgb: 21, 36, 67;
  --bs-border-color: var(--ai-glass-border-strong);
  --bs-border-color-translucent: var(--ai-glass-border);
  --bs-secondary-bg: var(--ai-glass-hover);
  --bs-tertiary-bg: rgba(0, 0, 0, 0.03);
  --bs-primary: var(--ai-glass-accent);
  --bs-primary-rgb: 58, 101, 194;
  --bs-danger-text-emphasis: var(--ai-red);
  --atlas-muted: var(--ai-glass-desc);
  --atlas-surface: var(--ai-glass-surface);
  --atlas-border: var(--ai-glass-border);
  color: var(--ai-glass-text);
  color-scheme: light;
}
.ai-panel-blue .ai-chat-head, .ai-panel-blue .ai-panel-bar { background: transparent; border-color: var(--ai-glass-border); }
/* the sidebar: a translucent glass column with a hairline edge */
.ai-panel-blue .ai-side {
  background: rgba(255, 255, 255, 0.4);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-color: var(--ai-glass-border) !important;
}
.ai-panel-blue .ai-resize::after { background: rgba(0, 0, 0, 0.15); }
.ai-panel-blue .ai-resize:hover::after, .ai-panel-blue .ai-resize:focus-visible::after, .ai-panel-blue.ai-resizing .ai-resize::after { background: var(--ai-glass-accent); }
.ai-panel-blue .ai-resize:focus-visible { outline-color: var(--ai-glass-accent); }
/* buttons: pill glass buttons (DeepSeek's secondary style); the main action (btn-primary, e.g. Send) the accent */
.ai-panel-blue :is(.ai-side, .ai-panel-bar, .ai-input) .btn:not(.btn-link):not(.btn-close) {
  --bs-btn-color: var(--ai-glass-text);
  --bs-btn-bg: var(--ai-glass-surface);
  --bs-btn-border-color: var(--ai-glass-border-strong);
  --bs-btn-hover-color: var(--ai-glass-text);
  --bs-btn-hover-bg: var(--ai-glass-surface-strong);
  --bs-btn-hover-border-color: rgba(0, 0, 0, 0.2);
  --bs-btn-active-color: var(--ai-glass-text);
  --bs-btn-active-bg: var(--ai-glass-surface-strong);
  --bs-btn-active-border-color: rgba(0, 0, 0, 0.2);
  --bs-btn-disabled-color: var(--ai-glass-desc);
  --bs-btn-disabled-bg: var(--ai-glass-surface);
  --bs-btn-disabled-border-color: var(--ai-glass-border);
  --bs-btn-focus-shadow-rgb: 58, 101, 194;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.ai-panel-blue :is(.ai-side, .ai-panel-bar, .ai-input, .ai-msg-answer) .btn.btn-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--ai-glass-accent);
  --bs-btn-border-color: var(--ai-glass-accent);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--ai-glass-accent-hover);
  --bs-btn-hover-border-color: var(--ai-glass-accent-hover);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--ai-glass-accent-hover);
  --bs-btn-active-border-color: var(--ai-glass-accent-hover);
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: var(--ai-glass-accent);
  --bs-btn-disabled-border-color: var(--ai-glass-accent);
}
.ai-panel-blue :is(.ai-side, .ai-panel-bar, .ai-input, .ai-thread) .btn-link {
  --bs-btn-color: var(--ai-glass-text-2);
  --bs-btn-hover-color: var(--ai-glass-text);
  --bs-btn-active-color: var(--ai-glass-text);
  --bs-btn-disabled-color: var(--ai-glass-desc);
  --bs-btn-focus-shadow-rgb: 58, 101, 194;
}
/* the user (2026-11-18): delete (trash) buttons and Clear history red, Clear history small and not underlined */
.ai-panel-blue :is(.ai-side, .ai-panel-bar, .ai-input) .btn.text-danger { color: var(--ai-red) !important; }
.ai-panel-blue [data-ai-clear] { font-size: 0.75rem; text-decoration: none; }
.ai-panel-blue [data-ai-clear]:hover, .ai-panel-blue [data-ai-clear]:focus-visible { text-decoration: none; color: #842029 !important; }
.ai-panel-blue :is(.ai-side, .ai-panel-bar, .ai-input) .btn:focus-visible { outline: 2px solid var(--ai-glass-accent); outline-offset: 1px; }
.ai-panel-blue .ai-conv:hover, .ai-panel-blue .ai-prompt:hover { background: var(--ai-glass-hover); }
.ai-panel-blue .ai-conv.active { background: var(--ai-glass-active); }
.ai-panel-blue .ai-conv-date { color: var(--ai-glass-desc); }
/* the message box: a raised glass card with the soft shadow; dark text, grey placeholder (4.6:1 on the glass). T-0102: the card
   is the box around the textarea and its buttons; the textarea itself has no border or background. */
.ai-panel-blue .ai-input-box {
  --bs-body-bg: var(--ai-glass-surface-strong);
  --bs-body-color: var(--ai-glass-text);
  background-color: var(--ai-glass-surface-strong);
  color: var(--ai-glass-text);
  border: 1px solid var(--ai-glass-border-strong);
  border-radius: 20px;
  box-shadow: var(--ai-glass-shadow);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color-scheme: light;
}
.ai-panel-blue .ai-input .form-control { --bs-secondary-color: var(--ai-glass-placeholder); color: var(--ai-glass-text); caret-color: var(--ai-glass-accent); color-scheme: light; }
.ai-panel-blue .ai-input .form-control::placeholder { color: var(--ai-glass-placeholder); opacity: 1; }
.ai-panel-blue .ai-input-box:focus-within { background-color: #fff; border-color: rgba(58, 101, 194, 0.5); box-shadow: 0 0 0 3px rgba(77, 107, 254, 0.15), var(--ai-glass-shadow); }
.ai-panel-blue .ai-notice { --bs-alert-color: #664d03; --bs-alert-bg: #fff3cd; --bs-alert-border-color: #ffe69c; --bs-alert-link-color: #664d03; }
/* the conversation area: no surface of its own, the glass and its fade show through */
.ai-panel-blue .ai-thread { background: transparent; }
.ai-panel-blue .ai-empty > p, .ai-panel-blue .ai-example-title { font-weight: 400; }
.ai-panel-blue .ai-example-title { color: var(--ai-glass-desc); }
/* the suggested prompts: pill glass buttons, accent icon, a lift on hover */
.ai-panel-blue .ai-example {
  background: var(--ai-glass-surface);
  color: var(--ai-glass-text);
  border: 1px solid var(--ai-glass-border);
  border-radius: 100px;
  margin: 5px 0 6px 0;
  padding: 6px 12px;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.ai-panel-blue .ai-example .bi { color: var(--ai-glass-icon); }
.ai-panel-blue .ai-example:hover, .ai-panel-blue .ai-example:focus-visible { background: var(--ai-glass-surface-strong); color: var(--ai-glass-text); border-color: var(--ai-glass-border-strong); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06); }
.ai-panel-blue .ai-example:focus-visible { outline: 2px solid var(--ai-glass-accent); outline-offset: 1px; }
/* the user's bubble: a light accent tint, dark text; no borders (the user, 2026-11-18) */
.ai-panel-blue .ai-msg-user, .ai-panel-blue .ai-msg-answer { border: 0; }
.ai-panel-blue .ai-msg-user { background: rgba(77, 107, 254, 0.12); color: var(--ai-glass-text); }
/* the sidebar's menus (prompt ⋯): white glass with dark text, whatever the page theme */
.ai-panel-blue .dropdown-menu {
  --bs-body-bg: #fff;
  --bs-body-bg-rgb: 255, 255, 255;
  --bs-body-color: #212529;
  --bs-body-color-rgb: 33, 37, 41;
  --bs-emphasis-color: #000;
  --bs-emphasis-color-rgb: 0, 0, 0;
  --bs-secondary-color: rgba(33, 37, 41, 0.75);
  --bs-secondary-bg: #e9ecef;
  --bs-tertiary-bg: #f8f9fa;
  --bs-border-color: #dee2e6;
  --bs-border-color-translucent: rgba(0, 0, 0, 0.08);
  --bs-dropdown-bg: rgba(255, 255, 255, 0.92);
  --bs-dropdown-border-radius: 16px;
  --bs-dropdown-box-shadow: 0 0 1px 0 rgba(0, 0, 0, 0.2), 0 0 4px 0 rgba(0, 0, 0, 0.02), 0 12px 32px 0 rgba(0, 0, 0, 0.08);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: var(--bs-dropdown-box-shadow);
  color: #212529;
  color-scheme: light;
}
.ai-panel-blue .dropdown-menu .text-danger { color: #b02a37 !important; }
/* the answers: no panel, dark text right on the glass (the user, 2026-11-18). Cards and tables in an answer (status report,
   my work, team, create, scope) are glass cards with the card shadow; headers and totals a faint grey tint. */
.ai-panel-blue .ai-msg-answer {
  --bs-body-bg: var(--ai-glass-surface-strong);
  --bs-body-bg-rgb: 255, 255, 255;
  --bs-body-color: var(--ai-glass-text);
  --bs-body-color-rgb: 30, 35, 44;
  --bs-emphasis-color: #000;
  --bs-heading-color: var(--ai-glass-text);
  --bs-secondary-color: var(--ai-glass-text-2);
  --bs-secondary-bg: rgba(0, 0, 0, 0.04);
  --bs-tertiary-bg: rgba(0, 0, 0, 0.03);
  --bs-border-color: var(--ai-glass-border-strong);
  --bs-border-color-translucent: var(--ai-glass-border);
  --bs-link-color: var(--ai-glass-link);
  --bs-link-color-rgb: 35, 71, 146;
  --bs-link-hover-color: #152443;
  --bs-link-hover-color-rgb: 21, 36, 67;
  --bs-primary: var(--ai-glass-accent);
  --bs-primary-rgb: 58, 101, 194;
  --bs-success-bg-subtle: #d1e7dd;
  --bs-success-border-subtle: #a3cfbb;
  --bs-success-text-emphasis: #0a3622;
  --bs-warning-bg-subtle: #fff3cd;
  --bs-warning-border-subtle: #ffe69c;
  --bs-warning-text-emphasis: #664d03;
  --bs-danger-bg-subtle: #f8d7da;
  --bs-danger-border-subtle: #f1aeb5;
  --bs-danger-text-emphasis: #58151c;
  --bs-code-color: #a3154f;
  --atlas-muted: var(--ai-glass-desc);
  --atlas-surface: var(--ai-glass-surface-strong);
  --atlas-border: var(--ai-glass-border);
  background: transparent;
  color: var(--ai-glass-text);
  padding-left: 0;
  padding-right: 0;
  color-scheme: light;
}
.ai-panel-blue .ai-msg-answer :is(.card, .table-responsive, .ai-team, .ai-report, .ai-card) { border-color: var(--ai-glass-border) !important; border-radius: 16px; box-shadow: var(--ai-glass-shadow-card); background: var(--ai-glass-surface-strong); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.ai-panel-blue .ai-msg-answer .table { --bs-table-bg: transparent; --bs-table-color: var(--ai-glass-text); --bs-table-border-color: var(--ai-glass-border); }
.ai-panel-blue .ai-msg-answer .ai-chip { text-decoration: none; }
.ai-panel-blue .ai-msg-answer .text-danger { color: var(--ai-red) !important; }
.ai-panel-blue .ai-msg-answer .ai-health-none { background: #e9ecef; color: #495057; border-color: #dee2e6; }
.ai-panel-blue .ai-msg-answer .btn:not(.btn-primary):not(.btn-link) {
  --bs-btn-color: var(--ai-glass-text);
  --bs-btn-bg: var(--ai-glass-surface);
  --bs-btn-border-color: var(--ai-glass-border-strong);
  --bs-btn-hover-color: var(--ai-glass-text);
  --bs-btn-hover-bg: var(--ai-glass-surface-strong);
  --bs-btn-hover-border-color: rgba(0, 0, 0, 0.2);
  --bs-btn-active-color: var(--ai-glass-text);
  --bs-btn-active-bg: var(--ai-glass-surface-strong);
  --bs-btn-active-border-color: rgba(0, 0, 0, 0.2);
  --bs-btn-focus-shadow-rgb: 58, 101, 194;
  border-radius: 100px;
}
.ai-panel-blue .ai-msg-answer .btn:focus-visible { outline: 2px solid var(--ai-glass-accent); outline-offset: 1px; }

/* ── T-0091: the user screen's Homepage panel, the AI chat homepage ── */
.home-page-option { padding: 0.5rem 0.75rem 0.5rem 2.25rem; border: 1px solid var(--atlas-border); border-radius: 0.5rem; margin-bottom: 0.5rem; }
.home-page-option .form-check-input { margin-left: -1.5rem; }
.home-page-option.is-disabled .form-check-label { color: var(--bs-secondary-color); }
.home-page-reason { color: var(--bs-warning-text-emphasis); }
/* the chat fills the main area, the full height below the top bar (and the ribbon); the page itself does not scroll */
body:has(.ai-home) { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
body:has(.ai-home) > .atlas-header, body:has(.ai-home) > .atlas-ribbon { flex: 0 0 auto; }
body:has(.ai-home) > .app-shell { flex: 1 1 auto; min-height: 0; }
main#main:has(> .ai-home) { display: flex; flex-direction: column; min-height: 0; padding: 0; }
main#main:has(> .ai-home) > .alert { margin: 0.5rem 0.75rem 0; }
.ai-home, .ai-home-host { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.ai-home-host { background: var(--atlas-surface, var(--bs-body-bg)); }

/* T-0099: direct answers, list cards, the answer kind, Deep analysis, the long-conversation hint, saved prompt marker.
   Base rules use the Bootstrap variables (page mode and every theme); inside the chat offcanvas the
   frosted-glass tokens apply (dark text on a light glass surface, AA contrast). */
.ai-direct-note { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; color: var(--bs-secondary-color); }
.ai-ask-ai { padding: 0.05rem 0.5rem; font-size: 0.75rem; border: 1px solid var(--bs-border-color); color: var(--bs-link-color); background: transparent; }
.ai-ask-ai:hover { background: var(--bs-secondary-bg); }
.ai-list-card { margin: 0.25rem 0 0.5rem; }
.ai-list-title { font-weight: 600; color: var(--bs-secondary-color); }
.ai-list-scroll { max-height: 18rem; overflow: auto; border: 1px solid var(--bs-border-color); border-radius: 0.375rem; }
.ai-list-table { font-size: 0.75rem; }
.ai-list-table th { position: sticky; top: 0; background: var(--bs-body-bg); white-space: nowrap; }
.ai-list-table td { vertical-align: top; }
.ai-kind { white-space: nowrap; }
.ai-long-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; margin: 0.5rem 0.625rem; padding: 0.375rem 0.625rem; border: 1px solid var(--bs-border-color); border-radius: 0.5rem; color: var(--bs-secondary-color); }
.ai-long-new { padding: 0.05rem 0.5rem; font-size: 0.75rem; border: 1px solid var(--bs-border-color); color: var(--bs-link-color); }
.ai-prompt-direct { font-size: 0.75em; color: var(--bs-secondary-color); }
.ai-panel-blue .ai-direct-note, .ai-panel-blue .ai-list-title, .ai-panel-blue .ai-long-hint, .ai-panel-blue .ai-prompt-direct { color: var(--ai-glass-text-2); }
.ai-panel-blue .ai-ask-ai, .ai-panel-blue .ai-long-new { color: var(--ai-glass-link); background: var(--ai-glass-surface-strong); border-color: var(--ai-glass-border-strong); }
.ai-panel-blue .ai-ask-ai:hover, .ai-panel-blue .ai-long-new:hover { background: var(--ai-glass-hover); }
.ai-panel-blue .ai-ask-ai:focus-visible, .ai-panel-blue .ai-long-new:focus-visible { outline: 2px solid var(--ai-glass-accent); outline-offset: 1px; }
.ai-panel-blue .ai-list-scroll { border-color: var(--ai-glass-border-strong); background: var(--ai-glass-surface-strong); }
.ai-panel-blue .ai-list-table { --bs-table-bg: transparent; --bs-table-color: var(--ai-glass-text); color: var(--ai-glass-text); }
.ai-panel-blue .ai-list-table th { background: var(--ai-glass-surface-strong); color: var(--ai-glass-text); }
.ai-panel-blue .ai-list-table a { color: var(--ai-glass-link); }
.ai-panel-blue .ai-long-hint { background: var(--ai-glass-surface); border-color: var(--ai-glass-border-strong); }

/* ── T-0102 (the user, 2026-11-18, like chat.deepseek.com): the start screen of a new chat, the message box with all its
   buttons inside, the Suggested prompts mega dropdown. Base rules use the Bootstrap tokens (the AI chat homepage follows the
   page theme); inside the chat offcanvas the T-0098 glass tokens apply. The offcanvas background, fade,
   blur and shadows are not touched here. ── */
/* an empty conversation: the greeting and the box in the middle of the chat area, no bottom bar; .is-start goes after the
   first message (client/public/js/ai.js, with a short slide that respects prefers-reduced-motion) */
.ai-panel.is-start .ai-thread { flex: 0 1 auto; margin-top: auto; padding-bottom: 1.25rem; }
.ai-panel.is-start .ai-input { margin-bottom: auto; }
.ai-panel.is-start .ai-main::after { content: ''; flex: 0 0 3rem; }
.ai-panel.is-start .ai-input-text.form-control { min-height: 3.25rem; }
.ai-greeting { font-size: 1.5rem; font-weight: 600; line-height: 1.3; color: var(--bs-body-color); margin: 0 0 0.25rem; }
.ai-greeting-sub { color: var(--bs-secondary-color); }
@container aimain (max-width: 26rem) { .ai-greeting { font-size: 1.25rem; } }
/* the box: one rounded card with the textarea (no border of its own, grows up to about 8 lines) and a row of buttons */
.ai-input-box {
  width: 100%;
  max-width: 46rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.5rem 0.5rem 0.4375rem 0.75rem;
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
  border: 1px solid var(--bs-border-color);
  border-radius: 20px;
  box-shadow: 0 0 1px 0 rgba(0, 0, 0, 0.2), 0 2px 8px 0 rgba(0, 0, 0, 0.04), 0 12px 32px 0 rgba(0, 0, 0, 0.08);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.ai-input-box:focus-within { border-color: var(--bs-primary-border-subtle); box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), 0.15), 0 12px 32px 0 rgba(0, 0, 0, 0.08); }
.ai-input-text.form-control, .ai-input-text.form-control:focus {
  padding: 0.25rem 0.125rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  resize: none;
  field-sizing: content;
  min-height: 1.75rem;
  max-height: 11rem;
  overflow-y: auto;
  font-size: 0.875rem;
  line-height: 1.5;
}
.ai-input-row { display: flex; align-items: center; gap: 0.375rem; flex-wrap: wrap; }
.ai-input-tools, .ai-input-actions { display: flex; align-items: center; gap: 0.375rem; min-width: 0; }
.ai-input-tools { flex-wrap: wrap; }
.ai-input-actions { margin-left: auto; }
.ai-count { color: var(--bs-secondary-color); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* the pills on the left (DeepSeek's DeepThink / Search style): Suggested prompts, Deep analysis (accent tint when on), Save prompt */
.ai-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  height: 1.875rem;
  padding: 0 0.7rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 999px;
  background: transparent;
  color: var(--bs-body-color);
  font-size: 0.75rem;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.ai-pill:hover { background: var(--bs-secondary-bg); color: var(--bs-body-color); }
.ai-pill:focus-visible, .ai-round:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: 1px; }
.ai-pill[aria-pressed="true"], .ai-pill[aria-expanded="true"] { background: var(--bs-primary-bg-subtle); border-color: var(--bs-primary-border-subtle); color: var(--bs-primary-text-emphasis); }
.ai-pill-icon, .ai-pill.ai-bookmark { width: 1.875rem; padding: 0; justify-content: center; border: 1px solid var(--bs-border-color); }
.ai-pill.ai-bookmark { color: var(--bs-secondary-color); }
/* the bottom bar: Suggested prompts stays one click away, small and borderless */
.ai-panel:not(.is-start) .ai-suggest-toggle:not([aria-expanded="true"]) { border-color: transparent; background: transparent; }
.ai-panel:not(.is-start) .ai-suggest-toggle:not([aria-expanded="true"]):hover { background: var(--bs-secondary-bg); }
/* a very narrow chat: the pills keep their names for screen readers but show only the icon */
@container aimain (max-width: 24rem) {
  .ai-pill > span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .ai-pill { width: 1.875rem; padding: 0; justify-content: center; }
}
/* the round buttons on the right: Stop (a square, while an answer streams) and Send (an up arrow; greyed while the box is empty) */
.ai-round { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 2rem; height: 2rem; padding: 0; border: 0; border-radius: 50%; font-size: 1rem; line-height: 1; cursor: pointer; transition: background-color 0.15s ease, color 0.15s ease; }
.ai-send { background: var(--bs-primary); color: #fff; }
.ai-send:hover { filter: brightness(0.92); }
.ai-send.is-empty { background: var(--bs-secondary-bg); color: var(--bs-secondary-color); filter: none; }
.ai-send:disabled { cursor: default; opacity: 0.65; }
.ai-stop { background: var(--bs-emphasis-color); color: var(--bs-body-bg); }
/* the mega dropdown: the 4 groups in columns (see .ai-examples), under the box or, without room, above it (.is-up, from JS) */
.ai-suggest {
  position: absolute;
  z-index: 6;
  left: 50%;
  top: calc(100% - 0.5rem);
  translate: -50% 0;
  width: min(58rem, calc(100cqw - 1rem));
  max-height: var(--ai-suggest-max, 28rem);
  overflow-y: auto;
  padding: 0.75rem 0.875rem;
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
  border: 1px solid var(--bs-border-color-translucent);
  border-radius: 16px;
  box-shadow: 0 0 1px 0 rgba(0, 0, 0, 0.2), 0 0 4px 0 rgba(0, 0, 0, 0.02), 0 12px 32px 0 rgba(0, 0, 0, 0.12);
  animation: ai-suggest-in 0.16s ease-out;
}
.ai-suggest.is-up { top: auto; bottom: calc(100% + 0.125rem); }
@keyframes ai-suggest-in { from { opacity: 0; transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .ai-suggest { animation: none; } .ai-input-box, .ai-pill, .ai-round { transition: none; } }
/* in the offcanvas: the glass tokens */
.ai-panel-blue .ai-greeting { color: var(--ai-glass-text); }
.ai-panel-blue .ai-greeting-sub, .ai-panel-blue .ai-count { color: var(--ai-glass-text-2); }
.ai-panel-blue .ai-pill { background: var(--ai-glass-surface); border-color: var(--ai-glass-border-strong); color: var(--ai-glass-text-2); }
.ai-panel-blue .ai-pill:hover { background: var(--ai-glass-hover); color: var(--ai-glass-text); }
.ai-panel-blue .ai-pill[aria-pressed="true"], .ai-panel-blue .ai-pill[aria-expanded="true"] { background: var(--ai-glass-active); border-color: rgba(58, 101, 194, 0.35); color: var(--ai-glass-link); }
.ai-panel-blue .ai-pill:focus-visible, .ai-panel-blue .ai-round:focus-visible { outline-color: var(--ai-glass-accent); }
.ai-panel-blue .ai-send { background: var(--ai-glass-accent); color: #fff; }
.ai-panel-blue .ai-send:hover { background: var(--ai-glass-accent-hover); filter: none; }
.ai-panel-blue .ai-send.is-empty { background: var(--ai-glass-border-strong); color: var(--ai-glass-desc); }
.ai-panel-blue .ai-stop { background: var(--ai-glass-text); color: #fff; }
/* the strong glass surface over the panel's off-white: the prompts stay readable over the thread behind them */
.ai-panel-blue .ai-suggest {
  background: linear-gradient(var(--ai-glass-surface-strong), var(--ai-glass-surface-strong)) rgba(249, 248, 248, 0.8);
  color: var(--ai-glass-text);
  border-color: var(--ai-glass-border);
  box-shadow: var(--ai-glass-shadow);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
}

/* T-0103: AI translate button inside a text field (partials/ai-translate.ejs). The field keeps room on the right so the text
   does not run under the button; the wrapper's invalid state still reaches the feedback that follows it. */
.ai-tr-field { position: relative; }
.ai-tr-field:has(> .ai-tr) > .form-control,
.ai-tr-field:has(> .ai-tr) > .issue-title-input { padding-right: 2.25rem; }
.ai-tr-field:has(> .ai-tr) > .form-control.is-invalid { padding-right: 4.25rem; background-position: right 2.4rem center; }
.ai-tr-field:has(> .ai-tr) > textarea.form-control.is-invalid { background-position: top 0.5rem right 2.4rem; }
.ai-tr-field:has(> .is-invalid) ~ .invalid-feedback { display: block; }
.ai-tr { position: absolute; top: 0.3rem; right: 0.3rem; z-index: 4; }
.ai-tr-field:has(> .form-control-sm) > .ai-tr { top: 0.15rem; right: 0.2rem; }
.ai-tr-field:has(> .issue-title-input) > .ai-tr { top: 0.4rem; }
.ai-tr-btn { --bs-btn-padding-y: 0.15rem; --bs-btn-padding-x: 0.35rem; --bs-btn-font-size: 0.9rem; --bs-btn-border-width: 0; line-height: 1; color: var(--bs-secondary-color); background: transparent; }
.ai-tr-btn:hover, .ai-tr-btn:focus-visible, .ai-tr-btn[aria-expanded='true'] { color: var(--bs-primary-text-emphasis); background: var(--bs-tertiary-bg); }
.ai-tr-btn:disabled { color: var(--bs-primary-text-emphasis); opacity: 1; }
.ai-tr-btn .spinner-border-sm { --bs-spinner-width: 0.9rem; --bs-spinner-height: 0.9rem; --bs-spinner-border-width: 0.15em; }
.ai-tr-menu { --bs-dropdown-min-width: 9rem; font-size: 0.875rem; }
.ai-tr-field.is-translating > .form-control, .ai-tr-field.is-translating > .issue-title-input, .ai-tr-field.is-translating .CodeMirror { opacity: 0.7; }
/* the markdown editor: the button sits at the right end of its toolbar */
.ai-tr-field:has(> .ai-tr) > .EasyMDEContainer .editor-toolbar { padding-right: 2.5rem; }
.ai-tr-field:has(> .EasyMDEContainer) > .ai-tr { top: 0.45rem; right: 0.4rem; }
.ai-tr-msg { margin-top: 0.25rem; font-size: 0.8rem; color: var(--bs-danger-text-emphasis); }

/* ── T-0108, the user (2026-11-19): Reports and Admin reports: tabs, report cards in 2 columns on large screens, titles without underline ── */
.reports-tabs .nav-link { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 500; }
.reports-tabs .nav-link .badge { font-weight: 600; }
.report-group-title { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--atlas-muted); margin: 0.5rem 0 0.5rem; }
.report-group { background: var(--atlas-surface); border: 1px solid var(--atlas-border); border-radius: 0.75rem; overflow: hidden; }
.report-link {
  position: relative; display: flex; align-items: flex-start; gap: 0.85rem; padding: 0.9rem 1rem;
  background: var(--atlas-surface); border: 1px solid var(--atlas-border); border-radius: 0.75rem;
  color: var(--bs-body-color); text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
a.report-link:hover, a.report-link:focus-visible, .report-link:has(.stretched-link:hover), .report-link:has(.stretched-link:focus-visible) {
  border-color: var(--atlas-accent); box-shadow: 0 6px 18px rgba(16, 24, 40, 0.08); transform: translateY(-1px); color: var(--bs-body-color);
}
.report-link-icon {
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; border-radius: 0.6rem;
  background: color-mix(in srgb, var(--atlas-accent) 12%, transparent); color: var(--atlas-accent); font-size: 1.05rem;
}
.report-link-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.report-link-name { font-weight: 600; color: var(--bs-body-color); text-decoration: none; }
.report-link-name:hover, .report-title-link, .report-title-link:hover { text-decoration: none; }
.report-link-desc { font-size: 0.8125rem; color: var(--atlas-muted); }
.report-link-meta { font-size: 0.75rem; color: var(--atlas-muted); margin-top: 0.15rem; }
.report-link-go { flex: 0 0 auto; align-self: center; color: var(--atlas-muted); transition: transform 0.15s ease; }
a.report-link:hover .report-link-go { transform: translateX(2px); color: var(--atlas-accent); }
.report-link-actions { position: relative; z-index: 2; align-self: center; }
@media (prefers-reduced-motion: reduce) { .report-link, .report-link-go { transition: none; } a.report-link:hover { transform: none; } }

/* ── T-0106, the user (2026-11-19, with a screenshot of deepseek.com): "even when the chat is full screen make it look like the
   deepseek chat backgrounds and when on dark mode make it also look like it but in dark mode with similar fades and the chatbox
   like it is a glass blurry area". The AI chat homepage (home/ai.ejs, .ai-home) gets the T-0098 glass tokens (the same values
   as the offcanvas). Rework 1 (the user, 2026-11-19, a second screenshot): "i dont like the grid ... create a bg like this, with
   mild shades like clouds. in the dark theme the bg will be black with lighter blue like clouds . then the chat box should be like
   glass blurry on top of the bg . apply the bg to the left panel too". So: no grid; five large soft periwinkle clouds of varied
   size and position (a big one top-centre/right with two lobes, one on the left middle, one at the far right edge) over #f6f7fa,
   fading to almost white at the bottom; dark: a black base #05070c with lighter blue clouds. The same background is behind the
   whole chat, the conversations panel included, in the homepage and in the offcanvas (every theme; this replaces T-0098's top fade
   in the light and blue offcanvas, as the user asked); the panel is a light glass over it (white 22% / 3%, blur 12px), so the
   clouds run on behind it. The message box is frosted glass: white 62% (dark: 6%), blur 24px. The rest of the light and blue
   offcanvas keeps T-0098. CSS gradients only; the background is on the non-scrolling host, so it stays behind the scrolling
   thread. No layout changes. Contrast (worst case: the top cloud cluster at its peak under the text) in H-T0106-06-to-09-002.
   Most rules below list the homepage (light, blue and dark) and the dark-theme offcanvas together. ── */
.ai-home {
  --ai-glass-text: #1e232c;
  --ai-glass-text-2: rgba(0, 0, 0, 0.7);
  --ai-glass-desc: rgba(0, 0, 0, 0.65);
  --ai-glass-placeholder: #5f6878;
  --ai-glass-link: #234792;
  --ai-glass-link-rgb: 35, 71, 146;
  --ai-glass-link-hover: #152443;
  --ai-glass-link-hover-rgb: 21, 36, 67;
  --ai-glass-accent: #3a65c2;
  --ai-glass-accent-rgb: 58, 101, 194;
  --ai-glass-accent-hover: #2f56ad;
  --ai-glass-icon: #4d6bfe;
  --ai-red: #9f2430;
  --ai-red-hover: #842029;
  --ai-glass-surface: rgba(255, 255, 255, 0.55);
  --ai-glass-surface-strong: rgba(255, 255, 255, 0.78);
  --ai-glass-box: rgba(255, 255, 255, 0.62);
  --ai-glass-hover: rgba(0, 0, 0, 0.045);
  --ai-glass-active: rgba(77, 107, 254, 0.1);
  --ai-glass-border: rgba(0, 0, 0, 0.08);
  --ai-glass-border-strong: rgba(0, 0, 0, 0.12);
  --ai-glass-border-hover: rgba(0, 0, 0, 0.2);
  --ai-glass-pill-border: var(--ai-glass-border-strong);
  --ai-glass-shadow: 0 0 1px 0 rgba(0, 0, 0, 0.2), 0 0 4px 0 rgba(0, 0, 0, 0.02), 0 12px 32px 0 rgba(0, 0, 0, 0.08);
  --ai-glass-shadow-card: 0 0 0 1px rgba(0, 0, 0, 0.05), 0 2px 4px rgba(0, 0, 0, 0.04), 0 12px 24px rgba(0, 0, 0, 0.05);
  --ai-glass-body-bg: #fff;
  --ai-glass-body-bg-rgb: 255, 255, 255;
  --ai-glass-body-rgb: 30, 35, 44;
  --ai-glass-emphasis: #000;
  --ai-glass-emphasis-rgb: 0, 0, 0;
  --ai-glass-tertiary: rgba(0, 0, 0, 0.03);
  --ai-glass-secondary-bg: rgba(0, 0, 0, 0.04);
  --ai-glass-answer-bg: var(--ai-glass-surface-strong);
  --ai-glass-box-focus: #fff;
  --ai-glass-bubble: rgba(77, 107, 254, 0.12);
  --ai-glass-send: var(--ai-glass-accent);
  --ai-glass-send-hover: var(--ai-glass-accent-hover);
  --ai-glass-stop-bg: var(--ai-glass-text);
  --ai-glass-stop-fg: #fff;
  --ai-glass-suggest-bg: linear-gradient(var(--ai-glass-surface-strong), var(--ai-glass-surface-strong)) rgba(249, 248, 248, 0.8);
  --ai-glass-resize: rgba(0, 0, 0, 0.15);
  --ai-glass-scheme: light;
}
/* the background and the conversations panel's glass, light (the homepage, and the offcanvas in the light and blue themes) */
.ai-home, .ai-offcanvas.ai-panel-blue {
  --ai-bg-base: #f6f7fa;
  --ai-fade: #fbfcfe;
  --ai-cloud-1: rgba(185, 201, 236, 0.5);
  --ai-cloud-2: rgba(214, 224, 245, 0.55);
  --ai-cloud-3: rgba(196, 210, 240, 0.45);
  --ai-cloud-4: rgba(185, 201, 236, 0.4);
  --ai-cloud-5: rgba(196, 210, 240, 0.42);
  --ai-glass-side: rgba(255, 255, 255, 0.22);
  --ai-glass-box: rgba(255, 255, 255, 0.62);
  --ai-glass-scheme: light;
}
/* the offcanvas lies over the page: a 90% base under its backdrop blur, as T-0098 */
.ai-offcanvas.ai-panel-blue { --ai-bg-base: rgba(246, 247, 250, 0.9); --ai-fade: rgba(251, 252, 254, 0.9); }
/* the dark set: the homepage and the offcanvas in the dark theme (AC-2, AC-3) */
:root[data-bs-theme='dark'] :is(.ai-home, .ai-offcanvas.ai-panel-blue) {
  --ai-glass-text: #e6ebf5;
  --ai-glass-text-2: rgba(230, 235, 245, 0.75);
  --ai-glass-desc: rgba(230, 235, 245, 0.74);
  --ai-glass-placeholder: #bcc4d6;
  --ai-glass-link: #a6bfff;
  --ai-glass-link-rgb: 166, 191, 255;
  --ai-glass-link-hover: #cfdcff;
  --ai-glass-link-hover-rgb: 207, 220, 255;
  --ai-glass-accent: #3a65c2;
  --ai-glass-accent-rgb: 58, 101, 194;
  --ai-glass-accent-hover: #2f56ad;
  --ai-glass-icon: #8ea2ff;
  --ai-red: #ffa6ae;
  --ai-red-hover: #ffc8cd;
  --ai-glass-surface: rgba(255, 255, 255, 0.04);
  --ai-glass-surface-strong: rgba(255, 255, 255, 0.06);
  --ai-glass-box: rgba(255, 255, 255, 0.06);
  --ai-glass-side: rgba(255, 255, 255, 0.03);
  --ai-glass-hover: rgba(255, 255, 255, 0.06);
  --ai-glass-active: rgba(77, 107, 254, 0.22);
  --ai-glass-border: rgba(255, 255, 255, 0.1);
  --ai-glass-border-strong: rgba(255, 255, 255, 0.16);
  --ai-glass-border-hover: rgba(255, 255, 255, 0.26);
  --ai-glass-pill-border: rgba(255, 255, 255, 0.48);
  --ai-glass-shadow: 0 0 1px 0 rgba(0, 0, 0, 0.6), 0 12px 32px 0 rgba(0, 0, 0, 0.45);
  --ai-glass-shadow-card: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 12px 24px rgba(0, 0, 0, 0.3);
  --ai-glass-body-bg: #0e1422;
  --ai-glass-body-bg-rgb: 14, 20, 34;
  --ai-glass-body-rgb: 230, 235, 245;
  --ai-glass-emphasis: #fff;
  --ai-glass-emphasis-rgb: 255, 255, 255;
  --ai-glass-tertiary: rgba(255, 255, 255, 0.04);
  --ai-glass-secondary-bg: rgba(255, 255, 255, 0.06);
  --ai-glass-answer-bg: #0e1422;
  --ai-glass-box-focus: rgba(255, 255, 255, 0.08);
  --ai-glass-bubble: rgba(77, 107, 254, 0.22);
  --ai-glass-send: #6b85ff;
  --ai-glass-send-hover: #5f79ff;
  --ai-glass-stop-bg: #e6ebf5;
  --ai-glass-stop-fg: #05070c;
  --ai-glass-suggest-bg: rgba(16, 22, 38, 0.96);
  --ai-glass-resize: rgba(255, 255, 255, 0.2);
  --ai-glass-scheme: dark;
  --ai-bg-base: #05070c;
  --ai-fade: #05070c;
  --ai-cloud-1: rgba(80, 120, 220, 0.2);
  --ai-cloud-2: rgba(107, 140, 255, 0.12);
  --ai-cloud-3: rgba(59, 91, 219, 0.14);
  --ai-cloud-4: rgba(80, 120, 220, 0.18);
  --ai-cloud-5: rgba(107, 140, 255, 0.1);
  /* kept for code that reads the old names */
  --ai-blue-btn: var(--ai-glass-surface);
  --ai-blue-btn-hover: var(--ai-glass-hover);
}
/* the dark offcanvas lies over the page: a 94% black base under its backdrop blur */
:root[data-bs-theme='dark'] .ai-offcanvas.ai-panel-blue { --ai-bg-base: rgba(5, 7, 12, 0.94); --ai-fade: rgba(5, 7, 12, 0.94); }
/* the background (top layer first): the fade at the bottom, then the clouds as overlapping soft ellipses with a slow fall-off
   (a big one top-centre/right with two lobes, one on the left middle, one at the far right edge), then the base. No grid. */
.ai-home .ai-home-host,
.ai-offcanvas.ai-panel-blue {
  background:
    linear-gradient(180deg, transparent 50%, var(--ai-fade) 100%),
    radial-gradient(48% 40% at 64% 2%, var(--ai-cloud-1) 0%, transparent 72%),
    radial-gradient(30% 24% at 42% 8%, var(--ai-cloud-2) 0%, transparent 70%),
    radial-gradient(26% 20% at 82% 16%, var(--ai-cloud-5) 0%, transparent 70%),
    radial-gradient(34% 42% at 0% 50%, var(--ai-cloud-3) 0%, transparent 72%),
    radial-gradient(20% 38% at 100% 34%, var(--ai-cloud-4) 0%, transparent 70%),
    var(--ai-bg-base);
  color: var(--ai-glass-text);
  color-scheme: var(--ai-glass-scheme);
}
:root[data-bs-theme='dark'] .ai-offcanvas.ai-panel-blue { border-color: var(--ai-glass-border); box-shadow: var(--ai-glass-shadow); }
/* every part of the chat: Bootstrap values from the tokens */
.ai-home :is([data-ai-loading], .ai-side, .ai-panel-bar, .ai-input, .ai-thread),
:root[data-bs-theme='dark'] .ai-panel-blue :is(.ai-chat-head, [data-ai-loading], .ai-side, .ai-panel-bar, .ai-input, .ai-thread) {
  --bs-body-bg: var(--ai-glass-body-bg);
  --bs-body-bg-rgb: var(--ai-glass-body-bg-rgb);
  --bs-body-color: var(--ai-glass-text);
  --bs-body-color-rgb: var(--ai-glass-body-rgb);
  --bs-emphasis-color: var(--ai-glass-emphasis);
  --bs-emphasis-color-rgb: var(--ai-glass-emphasis-rgb);
  --bs-heading-color: var(--ai-glass-text);
  --bs-secondary-color: var(--ai-glass-text-2);
  --bs-tertiary-color: var(--ai-glass-desc);
  --bs-link-color: var(--ai-glass-link);
  --bs-link-color-rgb: var(--ai-glass-link-rgb);
  --bs-link-hover-color: var(--ai-glass-link-hover);
  --bs-link-hover-color-rgb: var(--ai-glass-link-hover-rgb);
  --bs-border-color: var(--ai-glass-border-strong);
  --bs-border-color-translucent: var(--ai-glass-border);
  --bs-secondary-bg: var(--ai-glass-hover);
  --bs-tertiary-bg: var(--ai-glass-tertiary);
  --bs-primary: var(--ai-glass-accent);
  --bs-primary-rgb: var(--ai-glass-accent-rgb);
  --bs-danger-text-emphasis: var(--ai-red);
  --atlas-muted: var(--ai-glass-desc);
  --atlas-surface: var(--ai-glass-surface);
  --atlas-border: var(--ai-glass-border);
  color: var(--ai-glass-text);
  color-scheme: var(--ai-glass-scheme);
}
.ai-home :is(.ai-panel-bar, .ai-thread) { background: transparent; border-color: var(--ai-glass-border); }
.ai-home .ai-side,
.ai-offcanvas.ai-panel-blue .ai-side {
  background: var(--ai-glass-side);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-color: var(--ai-glass-border) !important;
}
:root[data-bs-theme='dark'] .ai-panel-blue .ai-resize::after { background: var(--ai-glass-resize); }
:root[data-bs-theme='dark'] .ai-panel-blue .ai-resize:hover::after, :root[data-bs-theme='dark'] .ai-panel-blue .ai-resize:focus-visible::after { background: var(--ai-glass-accent); }
/* buttons: glass pills; the main action (btn-primary, e.g. New chat) the accent with white text */
.ai-home :is(.ai-side, .ai-panel-bar, .ai-input) .btn:not(.btn-link):not(.btn-close),
:root[data-bs-theme='dark'] .ai-panel-blue :is(.ai-side, .ai-panel-bar, .ai-input) .btn:not(.btn-link):not(.btn-close) {
  --bs-btn-color: var(--ai-glass-text);
  --bs-btn-bg: var(--ai-glass-surface);
  --bs-btn-border-color: var(--ai-glass-border-strong);
  --bs-btn-hover-color: var(--ai-glass-text);
  --bs-btn-hover-bg: var(--ai-glass-surface-strong);
  --bs-btn-hover-border-color: var(--ai-glass-border-hover);
  --bs-btn-active-color: var(--ai-glass-text);
  --bs-btn-active-bg: var(--ai-glass-surface-strong);
  --bs-btn-active-border-color: var(--ai-glass-border-hover);
  --bs-btn-disabled-color: var(--ai-glass-desc);
  --bs-btn-disabled-bg: var(--ai-glass-surface);
  --bs-btn-disabled-border-color: var(--ai-glass-border);
  --bs-btn-focus-shadow-rgb: var(--ai-glass-accent-rgb);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.ai-home :is(.ai-side, .ai-panel-bar, .ai-input, .ai-msg-answer) .btn.btn-primary,
:root[data-bs-theme='dark'] .ai-panel-blue :is(.ai-side, .ai-panel-bar, .ai-input, .ai-msg-answer) .btn.btn-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--ai-glass-accent);
  --bs-btn-border-color: var(--ai-glass-accent);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--ai-glass-accent-hover);
  --bs-btn-hover-border-color: var(--ai-glass-accent-hover);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--ai-glass-accent-hover);
  --bs-btn-active-border-color: var(--ai-glass-accent-hover);
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: var(--ai-glass-accent);
  --bs-btn-disabled-border-color: var(--ai-glass-accent);
}
.ai-home :is(.ai-side, .ai-panel-bar, .ai-input, .ai-thread) .btn-link {
  --bs-btn-color: var(--ai-glass-text-2);
  --bs-btn-hover-color: var(--ai-glass-text);
  --bs-btn-active-color: var(--ai-glass-text);
  --bs-btn-disabled-color: var(--ai-glass-desc);
  --bs-btn-focus-shadow-rgb: var(--ai-glass-accent-rgb);
}
.ai-home :is(.ai-side, .ai-panel-bar, .ai-input) .btn.text-danger { color: var(--ai-red) !important; }
.ai-home [data-ai-clear] { font-size: 0.75rem; text-decoration: none; }
.ai-home [data-ai-clear]:hover, .ai-home [data-ai-clear]:focus-visible,
:root[data-bs-theme='dark'] .ai-panel-blue [data-ai-clear]:hover, :root[data-bs-theme='dark'] .ai-panel-blue [data-ai-clear]:focus-visible { text-decoration: none; color: var(--ai-red-hover) !important; }
.ai-home :is(.ai-side, .ai-panel-bar, .ai-input) .btn:focus-visible { outline: 2px solid var(--ai-glass-accent); outline-offset: 1px; }
.ai-home .ai-conv:hover, .ai-home .ai-prompt:hover { background: var(--ai-glass-hover); }
.ai-home .ai-conv.active { background: var(--ai-glass-active); }
.ai-home .ai-conv-date { color: var(--ai-glass-desc); }
/* the message box: the glass panel (start and bottom positions, T-0102) */
.ai-home .ai-input-box,
.ai-offcanvas.ai-panel-blue .ai-input-box,
:root[data-bs-theme='dark'] .ai-panel-blue .ai-input-box {
  --bs-body-bg: var(--ai-glass-box);
  --bs-body-color: var(--ai-glass-text);
  background-color: var(--ai-glass-box);
  color: var(--ai-glass-text);
  border: 1px solid var(--ai-glass-border-strong);
  border-radius: 20px;
  box-shadow: var(--ai-glass-shadow);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
  color-scheme: var(--ai-glass-scheme);
}
.ai-home .ai-input .form-control,
:root[data-bs-theme='dark'] .ai-panel-blue .ai-input .form-control { --bs-secondary-color: var(--ai-glass-placeholder); color: var(--ai-glass-text); caret-color: var(--ai-glass-accent); color-scheme: var(--ai-glass-scheme); }
.ai-home .ai-input .form-control::placeholder { color: var(--ai-glass-placeholder); opacity: 1; }
.ai-home .ai-input-box:focus-within,
:root[data-bs-theme='dark'] .ai-panel-blue .ai-input-box:focus-within { background-color: var(--ai-glass-box-focus); border-color: rgba(var(--ai-glass-accent-rgb), 0.5); box-shadow: 0 0 0 3px rgba(77, 107, 254, 0.15), var(--ai-glass-shadow); }
/* the start screen, the prompts and the bubbles */
.ai-home .ai-greeting { color: var(--ai-glass-text); }
.ai-home .ai-greeting-sub, .ai-home .ai-count { color: var(--ai-glass-text-2); }
.ai-home .ai-empty > p, .ai-home .ai-example-title { font-weight: 400; }
.ai-home .ai-example-title { color: var(--ai-glass-desc); }
.ai-home .ai-example {
  background: var(--ai-glass-surface);
  color: var(--ai-glass-text);
  border: 1px solid var(--ai-glass-border);
  border-radius: 100px;
  margin: 5px 0 6px 0;
  padding: 6px 12px;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.ai-home .ai-example .bi { color: var(--ai-glass-icon); }
.ai-home .ai-example:hover, .ai-home .ai-example:focus-visible { background: var(--ai-glass-surface-strong); color: var(--ai-glass-text); border-color: var(--ai-glass-border-strong); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06); }
.ai-home .ai-example:focus-visible { outline: 2px solid var(--ai-glass-accent); outline-offset: 1px; }
.ai-home .ai-msg-user, .ai-home .ai-msg-answer { border: 0; }
.ai-home .ai-msg-user,
:root[data-bs-theme='dark'] .ai-panel-blue .ai-msg-user { background: var(--ai-glass-bubble); color: var(--ai-glass-text); }
/* the pills, Send and Stop */
.ai-home .ai-pill,
:root[data-bs-theme='dark'] .ai-panel-blue .ai-pill { background: var(--ai-glass-surface); border-color: var(--ai-glass-pill-border); color: var(--ai-glass-text-2); }
.ai-home .ai-pill:hover,
:root[data-bs-theme='dark'] .ai-panel-blue .ai-pill:hover { background: var(--ai-glass-hover); color: var(--ai-glass-text); }
.ai-home .ai-pill[aria-pressed="true"], .ai-home .ai-pill[aria-expanded="true"],
:root[data-bs-theme='dark'] .ai-panel-blue .ai-pill[aria-pressed="true"], :root[data-bs-theme='dark'] .ai-panel-blue .ai-pill[aria-expanded="true"] { background: var(--ai-glass-active); border-color: rgba(var(--ai-glass-accent-rgb), 0.5); color: var(--ai-glass-link); }
.ai-home .ai-panel:not(.is-start) .ai-suggest-toggle:not([aria-expanded="true"]),
:root[data-bs-theme='dark'] .ai-panel-blue .ai-panel:not(.is-start) .ai-suggest-toggle:not([aria-expanded="true"]) { border-color: transparent; background: transparent; }
.ai-home .ai-panel:not(.is-start) .ai-suggest-toggle:not([aria-expanded="true"]):hover { background: var(--ai-glass-hover); }
.ai-home .ai-pill:focus-visible, .ai-home .ai-round:focus-visible { outline-color: var(--ai-glass-accent); }
.ai-home .ai-send,
:root[data-bs-theme='dark'] .ai-panel-blue .ai-send { background: var(--ai-glass-send); color: #fff; }
.ai-home .ai-send:hover,
:root[data-bs-theme='dark'] .ai-panel-blue .ai-send:hover { background: var(--ai-glass-send-hover); filter: none; }
.ai-home .ai-send.is-empty,
:root[data-bs-theme='dark'] .ai-panel-blue .ai-send.is-empty { background: var(--ai-glass-border-strong); color: var(--ai-glass-desc); }
.ai-home .ai-stop,
:root[data-bs-theme='dark'] .ai-panel-blue .ai-stop { background: var(--ai-glass-stop-bg); color: var(--ai-glass-stop-fg); }
/* the Suggested prompts dropdown: a strong surface, readable over the thread behind it */
.ai-home .ai-suggest,
:root[data-bs-theme='dark'] .ai-panel-blue .ai-suggest {
  background: var(--ai-glass-suggest-bg);
  color: var(--ai-glass-text);
  border-color: var(--ai-glass-border);
  box-shadow: var(--ai-glass-shadow);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
}
/* the answers: no panel (T-0102), text right on the background; cards and tables in an answer are glass cards */
.ai-home .ai-msg-answer,
:root[data-bs-theme='dark'] .ai-panel-blue .ai-msg-answer {
  --bs-body-bg: var(--ai-glass-answer-bg);
  --bs-body-bg-rgb: var(--ai-glass-body-bg-rgb);
  --bs-body-color: var(--ai-glass-text);
  --bs-body-color-rgb: var(--ai-glass-body-rgb);
  --bs-emphasis-color: var(--ai-glass-emphasis);
  --bs-heading-color: var(--ai-glass-text);
  --bs-secondary-color: var(--ai-glass-text-2);
  --bs-secondary-bg: var(--ai-glass-secondary-bg);
  --bs-tertiary-bg: var(--ai-glass-tertiary);
  --bs-border-color: var(--ai-glass-border-strong);
  --bs-border-color-translucent: var(--ai-glass-border);
  --bs-link-color: var(--ai-glass-link);
  --bs-link-color-rgb: var(--ai-glass-link-rgb);
  --bs-link-hover-color: var(--ai-glass-link-hover);
  --bs-link-hover-color-rgb: var(--ai-glass-link-hover-rgb);
  --bs-primary: var(--ai-glass-accent);
  --bs-primary-rgb: var(--ai-glass-accent-rgb);
  --atlas-muted: var(--ai-glass-desc);
  --atlas-surface: var(--ai-glass-surface-strong);
  --atlas-border: var(--ai-glass-border);
  background: transparent;
  color: var(--ai-glass-text);
  padding-left: 0;
  padding-right: 0;
  color-scheme: var(--ai-glass-scheme);
}
/* the dark offcanvas: Bootstrap 5.3's dark subtle colours instead of T-0098's light ones (health badges, late cells, code) */
:root[data-bs-theme='dark'] .ai-panel-blue .ai-msg-answer {
  --bs-success-bg-subtle: #051b11;
  --bs-success-border-subtle: #0f5132;
  --bs-success-text-emphasis: #75b798;
  --bs-warning-bg-subtle: #332701;
  --bs-warning-border-subtle: #997404;
  --bs-warning-text-emphasis: #ffda6a;
  --bs-danger-bg-subtle: #2c0b0e;
  --bs-danger-border-subtle: #842029;
  --bs-danger-text-emphasis: #ea868f;
  --bs-code-color: #e685b5;
}
:root[data-bs-theme='dark'] .ai-panel-blue .ai-msg-answer .ai-health-none { background: #2b3035; color: #dee2e6; border-color: #495057; }
.ai-home .ai-msg-answer :is(.card, .table-responsive, .ai-team, .ai-report, .ai-card) { border-color: var(--ai-glass-border) !important; border-radius: 16px; box-shadow: var(--ai-glass-shadow-card); background: var(--ai-glass-surface-strong); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.ai-home .ai-msg-answer .table { --bs-table-bg: transparent; --bs-table-color: var(--ai-glass-text); --bs-table-border-color: var(--ai-glass-border); }
.ai-home .ai-msg-answer .text-danger { color: var(--ai-red) !important; }
.ai-home .ai-msg-answer .btn:not(.btn-primary):not(.btn-link),
:root[data-bs-theme='dark'] .ai-panel-blue .ai-msg-answer .btn:not(.btn-primary):not(.btn-link) {
  --bs-btn-color: var(--ai-glass-text);
  --bs-btn-bg: var(--ai-glass-surface);
  --bs-btn-border-color: var(--ai-glass-border-strong);
  --bs-btn-hover-color: var(--ai-glass-text);
  --bs-btn-hover-bg: var(--ai-glass-surface-strong);
  --bs-btn-hover-border-color: var(--ai-glass-border-hover);
  --bs-btn-active-color: var(--ai-glass-text);
  --bs-btn-active-bg: var(--ai-glass-surface-strong);
  --bs-btn-active-border-color: var(--ai-glass-border-hover);
  --bs-btn-focus-shadow-rgb: var(--ai-glass-accent-rgb);
  border-radius: 100px;
}
.ai-home .ai-msg-answer .btn:focus-visible { outline: 2px solid var(--ai-glass-accent); outline-offset: 1px; }
/* T-0099 parts on the homepage */
.ai-home :is(.ai-direct-note, .ai-list-title, .ai-long-hint, .ai-prompt-direct) { color: var(--ai-glass-text-2); }
.ai-home :is(.ai-ask-ai, .ai-long-new) { color: var(--ai-glass-link); background: var(--ai-glass-surface-strong); border-color: var(--ai-glass-border-strong); }
.ai-home :is(.ai-ask-ai, .ai-long-new):hover { background: var(--ai-glass-hover); }
.ai-home .ai-list-scroll { border-color: var(--ai-glass-border-strong); background: var(--ai-glass-surface-strong); }
.ai-home .ai-list-table { --bs-table-bg: transparent; --bs-table-color: var(--ai-glass-text); color: var(--ai-glass-text); }
.ai-home .ai-list-table th { background: var(--ai-glass-answer-bg); color: var(--ai-glass-text); }
.ai-home .ai-list-table a { color: var(--ai-glass-link); }
.ai-home .ai-long-hint { background: var(--ai-glass-surface); border-color: var(--ai-glass-border-strong); }
:root[data-bs-theme='dark'] .ai-panel-blue .ai-list-table th { background: var(--ai-glass-answer-bg); }
/* the dark offcanvas's sidebar menus (prompt ⋯): a dark menu instead of T-0098's white one */
:root[data-bs-theme='dark'] .ai-panel-blue .dropdown-menu {
  --bs-body-bg: #141c2e;
  --bs-body-bg-rgb: 20, 28, 46;
  --bs-body-color: #e6ebf5;
  --bs-body-color-rgb: 230, 235, 245;
  --bs-emphasis-color: #fff;
  --bs-emphasis-color-rgb: 255, 255, 255;
  --bs-secondary-color: rgba(230, 235, 245, 0.75);
  --bs-secondary-bg: #1f2940;
  --bs-tertiary-bg: #192235;
  --bs-border-color: rgba(255, 255, 255, 0.14);
  --bs-border-color-translucent: rgba(255, 255, 255, 0.1);
  --bs-dropdown-bg: rgba(20, 28, 46, 0.96);
  --bs-dropdown-box-shadow: var(--ai-glass-shadow);
  color: #e6ebf5;
  color-scheme: dark;
}
:root[data-bs-theme='dark'] .ai-panel-blue .dropdown-menu .text-danger { color: var(--ai-red) !important; }
/* AC-5: without backdrop-filter, or with reduced transparency asked for, the glass gets a more opaque fill (the light and blue
   offcanvas: only the panel and the box, the rest of it is T-0098, already 90% opaque). */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .ai-home { --ai-glass-surface: rgba(255, 255, 255, 0.82); --ai-glass-surface-strong: rgba(255, 255, 255, 0.95); }
  .ai-home, .ai-offcanvas.ai-panel-blue { --ai-glass-side: rgba(255, 255, 255, 0.72); --ai-glass-box: rgba(255, 255, 255, 0.95); }
  :root[data-bs-theme='dark'] :is(.ai-home, .ai-offcanvas.ai-panel-blue) { --ai-glass-surface: rgba(22, 29, 46, 0.92); --ai-glass-surface-strong: rgba(26, 34, 54, 0.97); --ai-glass-box: rgba(26, 34, 54, 0.97); --ai-glass-side: rgba(12, 17, 29, 0.94); }
  :root[data-bs-theme='dark'] .ai-offcanvas.ai-panel-blue { --ai-bg-base: #05070c; --ai-fade: #05070c; }
}
@media (prefers-reduced-transparency: reduce) {
  .ai-home { --ai-glass-surface: rgba(255, 255, 255, 0.82); --ai-glass-surface-strong: rgba(255, 255, 255, 0.95); }
  .ai-home, .ai-offcanvas.ai-panel-blue { --ai-glass-side: rgba(255, 255, 255, 0.72); --ai-glass-box: rgba(255, 255, 255, 0.95); }
  :root[data-bs-theme='dark'] :is(.ai-home, .ai-offcanvas.ai-panel-blue) { --ai-glass-surface: rgba(22, 29, 46, 0.92); --ai-glass-surface-strong: rgba(26, 34, 54, 0.97); --ai-glass-box: rgba(26, 34, 54, 0.97); --ai-glass-side: rgba(12, 17, 29, 0.94); }
  :root[data-bs-theme='dark'] .ai-offcanvas.ai-panel-blue { --ai-bg-base: #05070c; --ai-fade: #05070c; }
}
/* the sidebar (the user, 2026-11-19): New chat without a border (a ghost button, full width, its icon, a faint hover), and below
   it two borderless tabs, Saved prompts (default) and Conversations; the open tab has the full text colour, bold, and a 2px
   underline in the link colour. Bootstrap variables only, so it follows the glass tokens of the homepage and the offcanvas. */
.ai-side .btn.ai-new-chat { color: var(--bs-body-color); font-weight: 500; text-decoration: none; border-color: transparent; border-radius: 0.5rem; padding: 0.375rem 0.5rem; }
.ai-side .btn.ai-new-chat:hover, .ai-side .btn.ai-new-chat:focus-visible, .ai-side .btn.ai-new-chat:active { color: var(--bs-body-color); background-color: var(--bs-secondary-bg); border-color: transparent; text-decoration: none; }
.ai-side .btn.ai-new-chat:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: 1px; }
.ai-side-tabs { display: flex; flex-wrap: nowrap; gap: 0.25rem; margin: 0 0.5rem 0.25rem; padding: 0; border: 0; }
.ai-side-tabs .nav-item { flex: 1 1 0; min-width: 0; }
.ai-side-tabs .nav-link {
  width: 100%;
  padding: 0.375rem 0.25rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--bs-secondary-color);
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: inset 0 -2px 0 transparent;
  transition: color 0.15s ease, box-shadow 0.15s ease;
}
.ai-side-tabs .nav-link:hover { color: var(--bs-body-color); }
.ai-side-tabs .nav-link.active { color: var(--bs-body-color); font-weight: 600; box-shadow: inset 0 -2px 0 var(--ai-glass-link, var(--bs-link-color)); }
.ai-side-tabs .nav-link:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: -2px; }
.ai-side-panes > .tab-pane.ai-side-prompts { margin-top: 0; border-top: 0; padding-top: 0.125rem; }
/* the Conversations tab: Clear history at its bottom, under the list */
.ai-side-panes > .ai-side-pane-convs.active { display: flex; flex-direction: column; min-height: 100%; }
.ai-side-pane-convs > .ai-convs { flex: 0 0 auto; }
.ai-side-pane-convs > .ai-side-bottom { margin-top: auto; border-top: 0; }
@media (prefers-reduced-motion: reduce) { .ai-side-tabs .nav-link { transition: none; } }
/* ── end T-0106 ── */
/* T-0106 follow-up (the user, 2026-11-19): the AI side panel stays glass; only its edge is a 2px border, white in the light and blue
   themes, black in the dark theme */
.ai-home .ai-side,
.ai-offcanvas.ai-panel-blue .ai-side {
  border-right: 2px solid #fff !important;
}
:root[data-bs-theme='dark'] .ai-home .ai-side,
:root[data-bs-theme='dark'] .ai-offcanvas.ai-panel-blue .ai-side {
  border-right-color: #000 !important;
}
/* the message box: the same 2px border (white; black in dark), glass and shadow unchanged; focus keeps its ring */
.ai-home .ai-input-box,
.ai-offcanvas.ai-panel-blue .ai-input-box,
.ai-home .ai-input-box:focus-within,
.ai-offcanvas.ai-panel-blue .ai-input-box:focus-within {
  border: 2px solid #fff;
}
:root[data-bs-theme='dark'] .ai-home .ai-input-box,
:root[data-bs-theme='dark'] .ai-offcanvas.ai-panel-blue .ai-input-box,
:root[data-bs-theme='dark'] .ai-home .ai-input-box:focus-within,
:root[data-bs-theme='dark'] .ai-offcanvas.ai-panel-blue .ai-input-box:focus-within {
  border-color: #000;
}
/* ── T-0109, the user (2026-11-19): "the buttons can be hidden by default, show them only on hover of the row. they should be
   smaller … on hover show 3 dots … in a drop down all the available options. one additional option should be to bookmark".
   One small ⋯ per conversation row (ai/_conversations.ejs), hidden with opacity (still in the tab order, so keyboard users reach
   it) and shown on hover, on focus inside the row and while its menu is open; always shown on touch screens. The menu keeps
   Popper's default absolute strategy: the sidebar has backdrop-filter (T-0098, T-0106), which would misplace a fixed menu,
   and Popper flips it inside the scrolling list (clippingParents boundary). Colours come from the existing sidebar dropdown
   rules (.ai-panel-blue .dropdown-menu, light and dark) and from the page theme on the full-screen chat. */
.ai-conv:hover { background: var(--bs-secondary-bg); }
.ai-conv .dropdown { flex: 0 0 auto; }
.ai-conv .ai-conv-menu {
  width: 1.5rem; height: 1.5rem; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 0.375rem; font-size: 0.875rem; line-height: 1; color: var(--bs-secondary-color); text-decoration: none;
  opacity: 0; transition: opacity 0.12s ease;
}
.ai-conv:hover .ai-conv-menu, .ai-conv:focus-within .ai-conv-menu, .ai-conv .ai-conv-menu.show { opacity: 1; }
.ai-conv .ai-conv-menu:hover, .ai-conv .ai-conv-menu.show { background: var(--bs-tertiary-bg); color: var(--bs-body-color); }
@media (hover: none) { .ai-conv .ai-conv-menu { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ai-conv .ai-conv-menu { transition: none; } }
.ai-conv-dropdown { --bs-dropdown-min-width: 10rem; --bs-dropdown-font-size: 0.8125rem; --bs-dropdown-item-padding-y: 0.3rem; }
.ai-conv-dropdown .dropdown-item .bi { width: 1rem; display: inline-block; text-align: center; margin-right: 0.25rem; }
.ai-conv-mark { font-size: 0.7em; margin-right: 0.3rem; color: var(--bs-primary); vertical-align: 0.1em; }
.ai-conv-group { font-size: 0.6875rem; font-weight: 600; color: var(--bs-secondary-color); margin: 0.25rem 0.75rem 0.125rem; }
.ai-conv-group .bi { font-size: 0.85em; }
.ai-conv-after-marked { margin-top: 0.375rem !important; padding-top: 0.375rem; border-top: 1px solid var(--bs-border-color-translucent); }
/* the glass sidebars: the ⋯ button's hover and the bookmark icon follow the glass tokens */
:is(.ai-panel-blue, .ai-home) .ai-conv .ai-conv-menu { color: var(--ai-glass-text-2); }
:is(.ai-panel-blue, .ai-home) .ai-conv .ai-conv-menu:hover, :is(.ai-panel-blue, .ai-home) .ai-conv .ai-conv-menu.show { background: var(--ai-glass-active); color: var(--ai-glass-text); }
:is(.ai-panel-blue, .ai-home) .ai-conv-mark, :is(.ai-panel-blue, .ai-home) .ai-conv-group .bi { color: var(--ai-glass-icon); }
:is(.ai-panel-blue, .ai-home) .ai-conv-group { color: var(--ai-glass-text-2); }
:is(.ai-panel-blue, .ai-home) .ai-conv-after-marked { border-top-color: var(--ai-glass-border); }
/* ── end T-0109 ── */
/* ── T-0110, the user (2026-11-19): "for the resulting html always the arrays should have no borders and a more beautiful and
   modern look with pills and icons at the type and status and the same icons in priority like in the app. also the due and
   start displayed as dates with smaller fonts grey. the product in bold". The AI answer's task table (ai/_list-card.ejs,
   card.issues) and the other list cards and markdown tables in answers: no outer or cell borders, a faint row separator and
   hover tint only. Type and status are pills (type icon and colour from the item type; status by category, the app's
   --atlas-todo/progress/done tokens, which follow light, blue and dark); priority uses partials/priority-icon's icons. ── */
.ai-list-scroll { border: 0; border-radius: 0.5rem; }
.ai-list-table { --bs-table-bg: transparent; border-collapse: separate; border-spacing: 0; }
.ai-list-table > :not(caption) > * > * { border: 0; padding: 0.35rem 0.5rem; box-shadow: none; }
.ai-list-table > tbody > tr > * { border-top: 1px solid var(--bs-border-color-translucent); vertical-align: middle; }
.ai-list-table > tbody > tr:first-child > * { border-top: 0; }
.ai-list-table > tbody > tr:hover > * { background: var(--bs-tertiary-bg); }
.ai-list-table > thead th { font-size: 0.6875rem; font-weight: 600; color: var(--bs-secondary-color); text-transform: uppercase; letter-spacing: 0.03em; }
.ai-task-key { font-weight: 600; text-decoration: none; white-space: nowrap; }
.ai-task-key:hover { text-decoration: underline; }
.ai-task-title { min-width: 10rem; }
.ai-task-product { font-weight: 700; white-space: nowrap; }
.ai-task-date { font-size: 0.6875rem; color: var(--bs-secondary-color); }
.ai-pill {
  display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.1rem 0.5rem; border-radius: 999px; font-size: 0.6875rem;
  font-weight: 600; line-height: 1.4; white-space: nowrap; background: var(--bs-tertiary-bg); color: var(--bs-body-color);
  border: 1px solid var(--bs-border-color-translucent);
}
.ai-pill .bi { font-size: 0.85em; }
.ai-status-dot { width: 0.45rem; height: 0.45rem; border-radius: 50%; background: currentColor; flex: 0 0 auto; opacity: 0.85; }
.ai-status-pill { border-color: transparent; }
.ai-status-todo { background: var(--atlas-todo-bg); color: var(--atlas-todo-fg); }
.ai-status-in_progress { background: var(--atlas-progress-bg); color: var(--atlas-progress-fg); }
.ai-status-done { background: var(--atlas-done-bg); color: var(--atlas-done-fg); }
.ai-task-prio { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.6875rem; color: var(--bs-secondary-color); }
/* the my_work card's tables (ai/_my-work.ejs): the same borderless look */
.ai-my-work .table { --bs-table-bg: transparent; border-collapse: separate; border-spacing: 0; }
.ai-my-work .table > :not(caption) > * > * { border: 0; box-shadow: none; }
.ai-my-work .table > tbody > tr > * { border-top: 1px solid var(--bs-border-color-translucent); }
.ai-my-work .table > tbody > tr:first-child > * { border-top: 0; }
:is(.ai-panel-blue, .ai-home) .ai-my-work .table > tbody > tr > * { border-top-color: var(--ai-glass-border); }
/* markdown tables the AI writes in its answer text: the same borderless look */
.ai-answer-text table { border-collapse: separate; border-spacing: 0; margin: 0.25rem 0 0.5rem; }
.ai-answer-text :is(th, td) { border: 0; padding: 0.3rem 0.5rem; text-align: left; vertical-align: top; }
.ai-answer-text tbody tr > * { border-top: 1px solid var(--bs-border-color-translucent); }
.ai-answer-text tbody tr:first-child > * { border-top: 0; }
.ai-answer-text thead th { font-size: 0.6875rem; font-weight: 600; color: var(--bs-secondary-color); text-transform: uppercase; letter-spacing: 0.03em; }
/* the glass chats (offcanvas T-0098, homepage T-0106): glass card, glass separators and hover, glass text colours */
:is(.ai-panel-blue, .ai-home) .ai-list-scroll { border: 0; }
:is(.ai-panel-blue, .ai-home) .ai-list-table > tbody > tr > *,
:is(.ai-panel-blue, .ai-home) .ai-answer-text tbody tr > * { border-top-color: var(--ai-glass-border); }
:is(.ai-panel-blue, .ai-home) .ai-list-table > tbody > tr:hover > * { background: var(--ai-glass-hover); }
:is(.ai-panel-blue, .ai-home) :is(.ai-list-table > thead th, .ai-answer-text thead th, .ai-task-date, .ai-task-prio) { color: var(--ai-glass-text-2); }
:is(.ai-panel-blue, .ai-home) .ai-type-pill { background: var(--ai-glass-surface); border-color: var(--ai-glass-border); color: var(--ai-glass-text); }
/* AC-5: one table per workspace: a small heading (name as a link, count), "Show all in …" under a cut table */
.ai-task-ws + .ai-task-ws { margin-top: 0.625rem; }
.ai-task-ws-h { display: flex; align-items: center; gap: 0.375rem; font-size: 0.75rem; font-weight: 600; margin: 0 0 0.25rem; }
.ai-task-ws-h a { color: inherit; text-decoration: none; }
.ai-task-ws-h a:hover { text-decoration: underline; }
.ai-task-ws-h .bi { color: var(--bs-secondary-color); font-size: 0.85em; }
.ai-task-ws-count { font-size: 0.6875rem; font-weight: 600; padding: 0 0.45rem; border-radius: 999px; background: var(--bs-tertiary-bg); color: var(--bs-secondary-color); }
.ai-task-more { margin-top: 0.25rem; }
.ai-task-more a { text-decoration: none; font-weight: 600; }
:is(.ai-panel-blue, .ai-home) .ai-task-ws-h .bi { color: var(--ai-glass-icon); }
:is(.ai-panel-blue, .ai-home) .ai-task-ws-count { background: var(--ai-glass-active); color: var(--ai-glass-text); }
:is(.ai-panel-blue, .ai-home) .ai-task-more a { color: var(--ai-glass-link); }
/* the user (2026-11-19): "the bg of the tables in the chat should also have some bg transparency". On the glass chats the answer
   tables are frosted glass the clouds show through (light and blue: white 50%, header 70%; dark: white 5%, header 8%), radius
   12px; cells draw no background of their own. Text stays --ai-glass-text / -text-2 (dark on at least white 50% over the
   strongest cloud, light on the dark set): AA. Without backdrop-filter, or with reduced transparency, a near-opaque fill. */
:root :is(.ai-panel-blue, .ai-home) {
  --ai-table-bg: rgba(255, 255, 255, 0.5);
  --ai-table-head: rgba(255, 255, 255, 0.7);
  --ai-table-hover: rgba(77, 107, 254, 0.06);
}
:root[data-bs-theme='dark'] :is(.ai-panel-blue, .ai-home) {
  --ai-table-bg: rgba(255, 255, 255, 0.05);
  --ai-table-head: rgba(255, 255, 255, 0.08);
  --ai-table-hover: rgba(255, 255, 255, 0.06);
}
:root :is(.ai-panel-blue, .ai-home) :is(.ai-list-scroll, .ai-my-work .ai-report-scroll, .ai-answer-text table) {
  background: var(--ai-table-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 0;
  border-radius: 12px;
  overflow: hidden;
}
:root :is(.ai-panel-blue, .ai-home) .ai-list-scroll { overflow: auto; }
:root :is(.ai-panel-blue, .ai-home) :is(.ai-list-table, .ai-my-work .table) { --bs-table-bg: transparent; --bs-table-hover-bg: transparent; --bs-table-striped-bg: transparent; }
:root :is(.ai-panel-blue, .ai-home) :is(.ai-list-table, .ai-my-work .table, .ai-answer-text table) > :not(caption) > * > * { background: transparent; }
:root :is(.ai-panel-blue, .ai-home) :is(.ai-list-table, .ai-my-work .table, .ai-answer-text table) > thead > tr > th { background: var(--ai-table-head); }
:root[data-bs-theme='dark'] :is(.ai-panel-blue, .ai-home) :is(.ai-list-table, .ai-my-work .table, .ai-answer-text table) > thead > tr > th { background: var(--ai-table-head); }
:root :is(.ai-panel-blue, .ai-home) :is(.ai-list-table, .ai-my-work .table, .ai-answer-text table) > tbody > tr:hover > * { background: var(--ai-table-hover); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root :is(.ai-panel-blue, .ai-home) { --ai-table-bg: rgba(255, 255, 255, 0.9); --ai-table-head: rgba(255, 255, 255, 0.97); }
  :root[data-bs-theme='dark'] :is(.ai-panel-blue, .ai-home) { --ai-table-bg: rgba(20, 28, 46, 0.92); --ai-table-head: rgba(30, 40, 62, 0.97); }
}
@media (prefers-reduced-transparency: reduce) {
  :root :is(.ai-panel-blue, .ai-home) { --ai-table-bg: rgba(255, 255, 255, 0.9); --ai-table-head: rgba(255, 255, 255, 0.97); }
  :root[data-bs-theme='dark'] :is(.ai-panel-blue, .ai-home) { --ai-table-bg: rgba(20, 28, 46, 0.92); --ai-table-head: rgba(30, 40, 62, 0.97); }
}
/* ── end T-0110 ── */

/* ── T-0112, the user (2026-11-19): "Show translation" options that change nothing; the translate button on ticket descriptions ── */
.ai-tr-msg:empty { display: none; }
.ai-tr-field:has(> .ai-tr) > .markdown-body { padding-right: 2.25rem; }
.ai-tr-field:has(> .markdown-body) > .ai-tr, .ai-tr-field:has(> .text-prewrap) > .ai-tr { top: 0; right: 0; }
.ai-tr-field:has(> .ai-tr) > .text-prewrap { padding-right: 2.25rem; }
.ai-tr-menu .dropdown-header { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; }
.ai-tr-panel { margin-top: 0.5rem; padding: 0.5rem 0.75rem 0.75rem; border: 1px solid var(--bs-border-color); border-left: 3px solid var(--bs-primary); border-radius: var(--bs-border-radius); background: var(--bs-tertiary-bg); color: var(--bs-body-color); }
.ai-tr-panel-head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.25rem; }
.ai-tr-panel-title { margin: 0 auto 0 0; font-size: 0.8rem; font-weight: 600; color: var(--bs-secondary-color); }
.ai-tr-panel-close { font-size: 0.65rem; }
.ai-tr-panel-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.9rem; max-height: 24rem; overflow-y: auto; }
/* ── end T-0112 ── */

/* ── T-0113: the green AI button in the task/ticket header (ai/_item-button.ejs) and the "Find similar" dialog (ai/_similar.ejs,
   built by ai.js). The table reuses the T-0110 task table classes. ── */
.ai-item-btn .bi-stars { margin-right: 0.125rem; }
.ai-similar .ai-list-scroll { max-height: none; }
.ai-similar-score { font-variant-numeric: tabular-nums; color: var(--bs-secondary-color); }
.ai-similar-loading { min-height: 3rem; }
/* ── end T-0113 ── */

/* ── T-0114, the user (2026-11-19): the Discussion board column before the epic (All issues, sprint list, backlog) and the
   highlighted card when "Go to discussion board" opens the board ── */
.board-chip { display: inline-flex; align-items: center; gap: 0.25rem; max-width: 9rem; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--bs-body-color); text-decoration: none; vertical-align: middle; }
.board-chip .bi { flex: none; color: var(--bs-secondary-color); }
a.board-chip:hover, a.board-chip:focus-visible { text-decoration: underline; }
.table-issues .board-cell { max-width: 9rem; }
.table-issues tr.selected .board-chip, .table-issues tr.selected .board-chip .bi { color: inherit; }
.backlog-row .board-slot .board-chip { max-width: 100%; color: inherit; }
.backlog-row .board-slot .board-chip .bi { margin-right: 0; }
@keyframes board-highlight-fade {
  0%, 60% { box-shadow: 0 0 0 3px var(--bs-warning); background-color: var(--bs-warning-bg-subtle); }
  100% { box-shadow: 0 0 0 3px transparent; }
}
.board-card.board-highlight, .backlog-row.board-highlight { animation: board-highlight-fade 4s ease-out forwards; }
@media (prefers-reduced-motion: reduce) {
  .board-card.board-highlight, .backlog-row.board-highlight { animation: none; box-shadow: 0 0 0 3px var(--bs-warning); }
}
/* ── end T-0114 ── */

/* T-0116, the user (2026-11-19): the Source & flow panel inside tasks and tickets has no border and a quieter background */
.escalation-flow.email-pipeline,
.escalation-flow.email-pipeline *:not(.ft-icon) {
  border-color: transparent;
}
.escalation-flow.email-pipeline {
  border: 0;
  background: color-mix(in srgb, var(--atlas-flow-bg) 45%, transparent);
}

/* T-0117: the Service ticket types help dialog */
.service-types-help dt { font-weight: 600; margin-top: 0.85rem; }
.service-types-help dt:first-child { margin-top: 0; }
.service-types-help dd { margin: 0.2rem 0 0 1.4rem; font-size: 0.875rem; color: var(--atlas-muted); }
/* T-0117: a small "?" that fits inside the caption's line, so labels and headings keep their spacing */
.help-btn.help-btn-sm { width: 0.95rem; height: 0.95rem; margin: -0.2rem 0 -0.2rem 0.25rem; font-size: 0.6rem; vertical-align: 0.05em; }
/* T-0117 (the user): the small "?" has no circle, no border, only a muted grey mark */
.help-btn.help-btn-sm, .help-btn.help-btn-sm:hover { background: transparent; border: 0; color: var(--atlas-muted); font-size: 0.75rem; }
.help-btn.help-btn-sm:hover { color: var(--bs-body-color); }
.help-btn.help-btn-sm:focus-visible { outline: 2px solid var(--atlas-focus); outline-offset: 1px; box-shadow: none; }

/* T-0119: the detail header row: key, a copy button on hover, then "Created by …" */
.detail-key { display: inline-flex; align-items: center; gap: 0.25rem; min-width: 0; }
.detail-key .key-copy { display: inline-flex; align-items: center; justify-content: center; width: 1.4rem; height: 1.4rem; padding: 0; border: 0; border-radius: 0.3rem; background: transparent; color: var(--atlas-muted); font-size: 0.8rem; opacity: 0; transition: opacity 0.12s ease; }
.detail-key:hover .key-copy, .detail-key .key-copy:focus-visible { opacity: 1; }
.detail-key .key-copy:hover { color: var(--bs-body-color); background: rgba(127, 127, 127, 0.12); }
@media (hover: none) { .detail-key .key-copy { opacity: 1; } }
.created-stamp.created-stamp-inline { margin: 0 0 0 0.75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* T-0120: Created, Reporter, Updated, Source side by side in grey; they wrap to the next line when the panel is narrow */
.meta-inline { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; color: var(--atlas-muted); }
.meta-inline > div { display: inline-flex; align-items: baseline; gap: 0.35rem; min-width: 0; }
.meta-inline dt { font-weight: 600; margin: 0; }
.meta-inline dd { margin: 0; color: var(--atlas-muted); }
.meta-inline dd * { color: inherit; }

/* T-0121: Teams call / chat in the AI team card (whole team, and per person) */
.ai-team-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.ai-teams-btn { --bs-btn-padding-y: 0.15rem; --bs-btn-padding-x: 0.55rem; --bs-btn-font-size: 0.78rem; color: #fff; background: #5b5fc7; border: 0; border-radius: 999px; }
.ai-teams-btn:hover, .ai-teams-btn:focus-visible { color: #fff; background: #4f52b2; }
.ai-person-text { flex: 1 1 auto; }
.ai-person-actions { display: inline-flex; gap: 0.15rem; margin-left: auto; align-self: center; }
.ai-teams-icon { display: inline-flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; color: #5b5fc7; text-decoration: none; }
.ai-teams-icon:hover, .ai-teams-icon:focus-visible { background: rgba(91, 95, 199, 0.12); color: #4f52b2; }
[data-bs-theme='dark'] .ai-teams-icon { color: #a5a8f0; }

/* T-0122: workspace type pills in the AI workspaces table */
.ws-type-pill { display: inline-flex; align-items: center; padding: 0.05rem 0.55rem; border-radius: 999px; font-size: 0.72rem; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.ws-type-scrum { background: #e9f2ff; color: #0055cc; }
.ws-type-service { background: #dcfff1; color: #216e4e; }
.ws-type-discovery { background: #fff4e5; color: #8a4b00; }
[data-bs-theme='dark'] .ws-type-scrum { background: rgba(87, 157, 255, 0.18); color: #9dc2ff; }
[data-bs-theme='dark'] .ws-type-service { background: rgba(75, 206, 151, 0.16); color: #7ee2b8; }
[data-bs-theme='dark'] .ws-type-discovery { background: rgba(255, 170, 60, 0.16); color: #ffc680; }

/* T-0125 (the user): the reports list in AI answers shows every report, not a short scroll box */
.ai-list-card[data-ai-list="reports"] .ai-list-scroll { max-height: none; }
.meta-inline dd a { color: var(--bs-link-color); }

/* T-0126 (the user): Service queues: a wider Customer column */
.table-queue td.customer-cell { min-width: 13rem; max-width: 16rem; }

/* ── T-0127, the user (2026-11-19): the project screen. Master data as a grid of label/value pairs, the People panel in a surface
   of its own, Phases / Linked tasks tabs over one surface. Phase rows reuse the T-0110 borderless table (ai-list-table); the
   subphase rows are indented under their phase and hidden when it is collapsed (app.js [data-project-phases]). Status pills
   use the app's category tokens, so light, dark and blue follow. ── */
.project-master-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 0.75rem 1.25rem; }
.project-master-grid dt { font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: var(--bs-secondary-color); margin-bottom: 0.125rem; }
.project-master-grid dd { margin: 0; font-weight: 600; }
.project-master-switch dt { display: flex; align-items: center; }
.project-master-switch .form-switch .form-check-input { cursor: pointer; }
section.people-panel { background: var(--bs-body-bg); border: 1px solid var(--bs-border-color-translucent); border-radius: var(--bs-border-radius-lg); }
.project-tabs { border-bottom: 0; }
.project-tab-content { border-top-left-radius: 0; }
.project-phases .phase-name { font-weight: 600; white-space: nowrap; }
.project-phases .phase-sub .phase-name { font-weight: 400; padding-left: 2.25rem; }
.project-phases .phase-sub > * { background: var(--bs-tertiary-bg); }
.phase-toggle, .phase-toggle-spacer { display: inline-flex; align-items: center; justify-content: center; width: 1.25rem; height: 1.25rem; margin-right: 0.25rem; vertical-align: -0.2em; }
.phase-toggle { padding: 0; border: 0; border-radius: 0.25rem; background: transparent; color: var(--bs-secondary-color); }
.phase-toggle:hover { background: var(--bs-secondary-bg); color: var(--bs-body-color); }
.phase-toggle:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: 1px; }
.phase-toggle .bi { transition: transform 0.15s; }
.phase-toggle.is-collapsed .bi { transform: rotate(-90deg); }
@media (prefers-reduced-motion: reduce) { .phase-toggle .bi { transition: none; } }
.phase-pct { min-width: 7rem; }
.phase-pct .progress { display: inline-flex; width: 4.5rem; height: 0.375rem; vertical-align: middle; margin-right: 0.375rem; }
.phase-status { border-color: transparent; }
.phase-status-planned { background: var(--atlas-todo-bg); color: var(--atlas-todo-fg); }
.phase-status-in_progress { background: var(--atlas-progress-bg); color: var(--atlas-progress-fg); }
.phase-status-done { background: var(--atlas-done-bg); color: var(--atlas-done-fg); }
.phase-status-on_hold { background: var(--bs-warning-bg-subtle); color: var(--bs-warning-text-emphasis); }
.phase-actions .btn-link { color: var(--bs-secondary-color); }
.phase-actions .btn-link:hover { color: var(--bs-body-color); }
.phase-actions .btn-link.text-danger:hover { color: var(--bs-danger) !important; }
.project-link-form .form-label { margin-bottom: 0.125rem; }
/* ── end T-0127 ── */

/* ── T-0129, the user (2026-11-19): the "Workload split" card of the AI chat (completed this month / open / overdue, no AI).
   A rounded light-grey card, a small change pill top right, one thin segmented bar (SVG: widths are attributes, no inline
   style under the CSP), a legend with dots and counts in grey brackets, two small meters side by side. Glass themes: the
   .ai-card rule of .ai-panel-blue / .ai-home gives the surface; the texts follow the glass tokens below. ── */
.ai-workload {
  --wl-completed: #2f9e44;
  --wl-open: #1c7ed6;
  --wl-overdue: #e8590c;
  --wl-track: rgba(0, 0, 0, 0.08);
  --wl-gap: var(--bs-tertiary-bg);
  border: 1px solid var(--bs-border-color-translucent);
  border-radius: 16px;
  background: var(--bs-tertiary-bg);
  padding: 0.75rem 0.9rem 0.8rem;
  margin: 0.25rem 0 0.5rem;
  max-width: 34rem;
}
[data-bs-theme='dark'] .ai-workload { --wl-completed: #51cf66; --wl-open: #4dabf7; --wl-overdue: #ff8a4c; --wl-track: rgba(255, 255, 255, 0.12); }
.ai-workload-head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.6rem; }
.ai-workload-title { font-size: 0.95rem; font-weight: 600; }
.ai-workload-pill { margin-left: auto; display: inline-flex; align-items: center; gap: 0.2rem; padding: 0.1rem 0.5rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; line-height: 1.4; }
.ai-workload-pill.is-up { background: var(--bs-success-bg-subtle); color: var(--bs-success-text-emphasis); }
.ai-workload-pill.is-down { background: var(--bs-danger-bg-subtle); color: var(--bs-danger-text-emphasis); }
.ai-workload-pill.is-flat { background: var(--bs-secondary-bg); color: var(--bs-secondary-color); }
.ai-workload-bar { display: block; width: 100%; height: 10px; border-radius: 999px; overflow: hidden; background: var(--wl-track); }
.ai-workload-bar a:focus-visible { outline: none; }
.ai-workload-bar a:focus-visible .ai-wl-seg { stroke: var(--bs-emphasis-color); stroke-width: 2px; vector-effect: non-scaling-stroke; }
.ai-wl-seg { stroke: var(--wl-gap); stroke-width: 2px; vector-effect: non-scaling-stroke; }
.ai-workload-bar a:hover .ai-wl-seg { opacity: 0.85; }
rect.ai-wl-completed { fill: var(--wl-completed); }
rect.ai-wl-open { fill: var(--wl-open); }
rect.ai-wl-overdue { fill: var(--wl-overdue); }
rect.ai-wl-track { fill: var(--wl-track); }
.ai-workload-legend { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; margin-top: 0.6rem; font-size: 0.8125rem; }
.ai-workload-legend a { color: inherit; text-decoration: none; }
.ai-workload-legend a:hover strong, .ai-workload-legend a:focus-visible strong { text-decoration: underline; }
.ai-wl-dot { display: inline-block; width: 0.55rem; height: 0.55rem; border-radius: 50%; margin-right: 0.35rem; vertical-align: 0.05em; }
span.ai-wl-completed { background: var(--wl-completed); }
span.ai-wl-open { background: var(--wl-open); }
span.ai-wl-overdue { background: var(--wl-overdue); }
.ai-wl-count, .ai-workload-meter-head { color: var(--bs-secondary-color); }
.ai-workload-meters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem 1.25rem; margin-top: 0.75rem; }
.ai-workload-meter-head { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.75rem; margin-bottom: 0.2rem; }
.ai-wl-pct { font-weight: 600; color: var(--bs-body-color); }
.ai-workload-meter-bar { display: block; width: 100%; height: 4px; border-radius: 999px; overflow: hidden; }
.ai-workload-empty { color: var(--bs-secondary-color); }
:is(.ai-panel-blue, .ai-home) .ai-workload { --wl-gap: transparent; --wl-track: rgba(0, 0, 0, 0.08); }
:root[data-bs-theme='dark'] :is(.ai-panel-blue, .ai-home) .ai-workload { --wl-track: rgba(255, 255, 255, 0.14); }
:is(.ai-panel-blue, .ai-home) :is(.ai-wl-count, .ai-workload-meter-head, .ai-workload-empty) { color: var(--ai-glass-text-2); }
:is(.ai-panel-blue, .ai-home) :is(.ai-workload-title, .ai-wl-pct, .ai-workload-legend) { color: var(--ai-glass-text); }
@container aimain (max-width: 22rem) { .ai-workload-meters { grid-template-columns: minmax(0, 1fr); } }
/* ── end T-0129 ── */

/* T-0129 (the user): the workload split uses the full width of the chat */
.ai-workload { max-width: none; width: 100%; }
.ai-answer-block:has(.ai-workload) { align-self: stretch; max-width: 100%; width: 100%; }
.ai-answer-block:has(.ai-workload) > .ai-msg-answer { width: 100%; }

/* ── T-0131, the user (2026-11-19): "My Actions Overview" in the AI chat: the Home "In numbers" tiles (home/_kpi-tiles.ejs, the
   same .kpi-tiles / .kpi-tile styles), full width; in the glass themes the tiles take the glass surface and text. ── */
.ai-kpi-card { margin: 0.25rem 0 0.5rem; width: 100%; }
.ai-answer-block:has(.ai-kpi-card) { align-self: stretch; max-width: 100%; width: 100%; }
.ai-answer-block:has(.ai-kpi-card) > .ai-msg-answer { width: 100%; }
:is(.ai-panel-blue, .ai-home) .ai-kpi-card .kpi-tile { background: var(--ai-glass-surface-strong); border-color: var(--ai-glass-border); color: var(--ai-glass-text); border-radius: 12px; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
:is(.ai-panel-blue, .ai-home) .ai-kpi-card :is(.kpi-label, .kpi-sub) { color: var(--ai-glass-text-2); }
:is(.ai-panel-blue, .ai-home) .ai-kpi-card .kpi-tile.tile-good { border-left-color: var(--bs-success); }
:is(.ai-panel-blue, .ai-home) .ai-kpi-card .kpi-tile.tile-bad { border-left-color: var(--bs-danger); }
:is(.ai-panel-blue, .ai-home) .ai-kpi-card .kpi-tile.tile-neutral { border-left-color: var(--bs-secondary-border-subtle); }
/* ── end T-0131 ── */

/* T-0133 (the user): KPI and dashboard prompts have a mild, see-through green background */
:root .ai-examples .ai-example-kpi > .ai-example { background: rgba(47, 158, 68, 0.12); }
:root .ai-examples .ai-example-kpi > .ai-example:hover, :root .ai-examples .ai-example-kpi > .ai-example:focus-visible { background: rgba(47, 158, 68, 0.2); }
:root[data-bs-theme='dark'] .ai-examples .ai-example-kpi > .ai-example { background: rgba(81, 207, 102, 0.14); }
:root[data-bs-theme='dark'] .ai-examples .ai-example-kpi > .ai-example:hover, :root[data-bs-theme='dark'] .ai-examples .ai-example-kpi > .ai-example:focus-visible { background: rgba(81, 207, 102, 0.22); }

/* ── T-0132: "My workload split per product": one full-width workload card per product, the product name next to the title ── */
.ai-workload-products { width: 100%; display: flex; flex-direction: column; gap: 0.5rem; }
.ai-workload-products .ai-workload { margin: 0; }
.ai-workload-product { font-weight: 500; color: var(--bs-secondary-color); margin-left: 0.35rem; }
:is(.ai-panel-blue, .ai-home) .ai-workload-product { color: var(--ai-glass-text-2); }
.ai-answer-block:has(.ai-workload-products) { align-self: stretch; max-width: 100%; width: 100%; }
.ai-answer-block:has(.ai-workload-products) > .ai-msg-answer { width: 100%; }
/* ── end T-0132 ── */

/* ── T-0134, the user (2026-11-19): "My products chart · Scrum / Service" in the AI chat: open items per product and type as a
   horizontal grouped-bar chart (SVG: widths and positions are attributes, no inline style under the CSP), full width. The
   series take the validated categorical palette in fixed order (blue, orange, aqua, yellow, magenta; stepped for dark);
   the numbers and names wear text colours, never the series colour. Glass themes: the .ai-card surface of .ai-panel-blue /
   .ai-home and the glass text tokens. ── */
.ai-pchart {
  --pc-s0: #2a78d6;
  --pc-s1: #eb6834;
  --pc-s2: #1baf7a;
  --pc-s3: #eda100;
  --pc-s4: #e87ba4;
  border: 1px solid var(--bs-border-color-translucent);
  border-radius: 16px;
  background: var(--bs-tertiary-bg);
  padding: 0.75rem 0.9rem 0.8rem;
  margin: 0.25rem 0 0.5rem;
  width: 100%;
}
[data-bs-theme='dark'] .ai-pchart { --pc-s0: #3987e5; --pc-s1: #d95926; --pc-s2: #199e70; --pc-s3: #c98500; --pc-s4: #d55181; }
.ai-pchart-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.6rem; margin-bottom: 0.5rem; }
.ai-pchart-title { font-size: 0.95rem; font-weight: 600; }
.ai-pchart-sub, .ai-pchart-total, .ai-pchart-empty { color: var(--bs-secondary-color); font-size: 0.8125rem; }
.ai-pchart-legend { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; font-size: 0.8125rem; margin-bottom: 0.6rem; }
.ai-pc-dot { display: inline-block; width: 0.6rem; height: 0.6rem; border-radius: 3px; margin-right: 0.35rem; vertical-align: 0.02em; }
span.ai-pc-s0 { background: var(--pc-s0); }
span.ai-pc-s1 { background: var(--pc-s1); }
span.ai-pc-s2 { background: var(--pc-s2); }
span.ai-pc-s3 { background: var(--pc-s3); }
span.ai-pc-s4 { background: var(--pc-s4); }
rect.ai-pc-s0 { fill: var(--pc-s0); }
rect.ai-pc-s1 { fill: var(--pc-s1); }
rect.ai-pc-s2 { fill: var(--pc-s2); }
rect.ai-pc-s3 { fill: var(--pc-s3); }
rect.ai-pc-s4 { fill: var(--pc-s4); }
.ai-pchart-rows { display: flex; flex-direction: column; }
.ai-pchart-row { display: grid; grid-template-columns: minmax(6rem, 12rem) minmax(0, 1fr); gap: 0.75rem; align-items: center; padding: 0.4rem 0; border-top: 1px solid var(--bs-border-color-translucent); }
.ai-pchart-row:first-child { border-top: 0; }
.ai-pchart-name { font-size: 0.8125rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-pchart-name.is-none > span:first-child { font-style: italic; font-weight: 500; }
.ai-pchart-bars { display: block; overflow: visible; }
.ai-pc-n { font-size: 11px; font-weight: 600; fill: var(--bs-body-color); }
.ai-pc-n.is-zero { fill: var(--bs-secondary-color); font-weight: 400; }
.ai-pchart-bars a:hover .ai-pc-bar { opacity: 0.85; }
.ai-pchart-bars a:focus-visible { outline: none; }
.ai-pchart-bars a:focus-visible .ai-pc-bar { stroke: var(--bs-emphasis-color); stroke-width: 2px; }
.ai-pchart-bars a:hover .ai-pc-n, .ai-pchart-bars a:focus-visible .ai-pc-n { text-decoration: underline; }
:is(.ai-panel-blue, .ai-home) :is(.ai-pchart-title, .ai-pchart-legend, .ai-pchart-name) { color: var(--ai-glass-text); }
:is(.ai-panel-blue, .ai-home) :is(.ai-pchart-sub, .ai-pchart-total, .ai-pchart-empty) { color: var(--ai-glass-text-2); }
:is(.ai-panel-blue, .ai-home) .ai-pc-n { fill: var(--ai-glass-text); }
:is(.ai-panel-blue, .ai-home) .ai-pc-n.is-zero { fill: var(--ai-glass-text-2); }
.ai-answer-block:has(.ai-pchart) { align-self: stretch; max-width: 100%; width: 100%; }
.ai-answer-block:has(.ai-pchart) > .ai-msg-answer { width: 100%; }
@container aimain (max-width: 26rem) { .ai-pchart-row { grid-template-columns: minmax(0, 1fr); gap: 0.25rem; } }
/* ── end T-0134 ── */

/* ── T-0135, the user (2026-11-19): the Administration prompts (a 5th group, side by side when the chat is wide enough, otherwise
   it wraps below the four), the "MoM task comparison chart (Scrum)" card (amCharts; the canvas height is set here, never inline),
   and the MoM report's new New features / Epics columns. ── */
@container aimain (min-width: 66rem) { .ai-examples.has-admin { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.ai-mom { border: 1px solid var(--bs-border-color-translucent); border-radius: 16px; background: var(--bs-tertiary-bg); padding: 0.75rem 0.9rem 0.8rem; margin: 0.25rem 0 0.5rem; width: 100%; }
.ai-mom-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.75rem; margin-bottom: 0.5rem; }
.ai-mom-title { font-size: 0.95rem; font-weight: 600; }
.ai-mom-toggle { margin-left: auto; }
.ai-mom-canvas { width: 100%; height: 460px; }
.ai-mom-empty, .ai-mom-numbers summary, .ai-mom-table caption { color: var(--bs-secondary-color); }
.ai-mom-numbers { margin-top: 0.5rem; font-size: 0.8125rem; }
.ai-mom-numbers summary { cursor: pointer; }
.ai-mom-table { font-size: 0.75rem; min-width: max-content; }
.ai-mom-table th, .ai-mom-table td { white-space: nowrap; }
.ai-mom-link { margin-top: 0.6rem; }
:is(.ai-panel-blue, .ai-home) :is(.ai-mom-title, .ai-mom-link, .ai-mom-table) { color: var(--ai-glass-text); }
:is(.ai-panel-blue, .ai-home) :is(.ai-mom-empty, .ai-mom-numbers summary, .ai-mom-table caption) { color: var(--ai-glass-text-2); }
:is(.ai-panel-blue, .ai-home) .ai-mom-table { --bs-table-bg: transparent; --bs-table-color: var(--ai-glass-text); }
.ai-answer-block:has(.ai-mom) { align-self: stretch; max-width: 100%; width: 100%; }
.ai-answer-block:has(.ai-mom) > .ai-msg-answer { width: 100%; }
.mom-table .mom-ct { border-left: 2px solid var(--bs-border-color); }
.mom-table .mom-cf, .mom-table .mom-ce, .mom-table .pipeline-family > .mom-cf, .mom-table .pipeline-family > .mom-ce, .mom-table .pipeline-total > .mom-cf, .mom-table .pipeline-total > .mom-ce { background-color: var(--bs-success-bg-subtle); }
/* ── end T-0135 ── */

/* T-0136 (the user, 2026-11-19): a wider chat for wide tables: the conversation column grows to 100rem (was 72rem), and an answer that
   holds a table or a list card uses the whole column (other answers keep their width; the message box stays centred at 46rem) */
.ai-conversation { max-width: 100rem; }
.ai-answer-block:has(table, .ai-list-card, .ai-task-ws, .ai-my-work, .ai-pchart) { align-self: stretch; max-width: 100%; width: 100%; }
.ai-answer-block:has(table, .ai-list-card, .ai-task-ws, .ai-my-work, .ai-pchart) > .ai-msg-answer { width: 100%; }

/* ── T-0137, the user (2026-11-19): "Give me the status and health of my products" answers with two small tables above the
   existing status report (ai/_health-parts.ejs): What defines health (the saved rules) and Products health overview. Both use
   the T-0110 borderless table (ai-list-table, glass backgrounds on the glass chats) and the health pills (ai-health-*). ── */
.ai-hp-title { font-size: 0.9rem; }
.ai-hp-title .bi { color: var(--bs-secondary-color); }
.ai-hp-table { font-size: 0.8125rem; width: 100%; }
.ai-hp-table th, .ai-hp-table td { vertical-align: top; }
.ai-hp-table thead th { white-space: nowrap; }
.ai-hp-table thead th .ai-health { text-transform: none; letter-spacing: 0; }
.ai-hp-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ai-hp-rule, .ai-hp-product { font-weight: 600; white-space: nowrap; }
.ai-hp-text { min-width: 14rem; color: var(--bs-secondary-color); }
.ai-hp-unit, .ai-hp-band { white-space: nowrap; }
.ai-hp-period { font-weight: 400; text-transform: none; letter-spacing: 0; }
.ai-hp-note { margin-top: 0.25rem; }
:is(.ai-panel-blue, .ai-home) .ai-hp-title .bi { color: var(--ai-glass-icon); }
:is(.ai-panel-blue, .ai-home) :is(.ai-hp-title, .ai-hp-rule, .ai-hp-product) { color: var(--ai-glass-text); }
:is(.ai-panel-blue, .ai-home) :is(.ai-hp-text, .ai-hp-note, .ai-hp-period) { color: var(--ai-glass-text-2); }
/* ── end T-0137 ── */

/* ── T-0139: Administration → Users: sortable headers, the Admin checkbox, the two tabs ── */
.users-tabs .nav-link { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 500; }
.users-tabs .nav-link .badge { font-weight: 600; }
.sort-table .sort-link { color: inherit; text-decoration: none; white-space: nowrap; }
.sort-table .sort-link:hover, .sort-table .sort-link:focus-visible { text-decoration: underline; }
.sort-table .sort-ico { margin-left: 0.3rem; font-size: 0.85em; color: var(--bs-body-color); }
.sort-table .sort-ico-idle { color: var(--bs-secondary-color); opacity: 0.45; transition: opacity 0.15s; }
.sort-table .sort-link:hover .sort-ico-idle, .sort-table .sort-link:focus-visible .sort-ico-idle { opacity: 0.85; }
.sort-table input[data-admin-check]:disabled { opacity: 1; }
/* ── end T-0139 ── */

/* ── T-0140 (the user, 2026-11-19): "What is my team?" card: the full chat width, one panel per person in a responsive grid (one column
   on a phone, more as the chat widens), the people grouped under each sub-team (ai/_team-card.ejs, the my_team tool's UI part). ── */
.ai-team-card { width: 100%; }
.ai-answer-block:has(.ai-team-card) { align-self: stretch; max-width: 100%; width: 100%; }
.ai-answer-block:has(.ai-team-card) > .ai-msg-answer { width: 100%; }
.ai-team-card .ai-team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(16rem, 100%), 1fr)); gap: 0.5rem; }
.ai-team-card .ai-person-panel { display: flex; align-items: flex-start; gap: 0.6rem; min-width: 0; padding: 0.6rem 0.7rem; border: 1px solid var(--bs-border-color); border-radius: 10px; background: var(--bs-body-bg); }
.ai-team-card .ai-person-panel img.avatar-photo, .ai-team-card .ai-person-panel .avatar { width: 2.5rem; height: 2.5rem; flex: 0 0 auto; }
.ai-team-card .ai-person-name { font-weight: 600; }
/* TR-T0138-1 D6: a long email ends with an ellipsis on one line (the full address in its title) instead of breaking mid-word */
.ai-team-card .ai-person-text { overflow: hidden; }
.ai-team-card .ai-person-mail { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; overflow-wrap: normal; }
.ai-team-group + .ai-team-group { margin-top: 0.75rem; }
.ai-team-group-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.6rem; padding-bottom: 0.2rem; border-bottom: 1px solid var(--bs-border-color); font-size: 0.85rem; font-weight: 600; }
.ai-team-group-meta { font-size: 0.75rem; font-weight: 400; color: var(--bs-secondary-color); }
:is(.ai-panel-blue, .ai-home) .ai-team-card .ai-person-panel { background: var(--ai-glass-surface-strong); border-color: var(--ai-glass-border); border-radius: 14px; box-shadow: var(--ai-glass-shadow-card); color: var(--ai-glass-text); }
:is(.ai-panel-blue, .ai-home) .ai-team-group-head { border-color: var(--ai-glass-border); color: var(--ai-glass-text); }
:is(.ai-panel-blue, .ai-home) .ai-team-group-meta { color: var(--ai-glass-text-2); }
/* T-0140 (the user): no outer panel: the team heading, Teams buttons and sub-team headings sit on the chat, only the person panels are
   boxed (the glass chats otherwise draw a card around .ai-team) */
.ai-team-card .ai-team-open { border: 0; border-radius: 0; padding: 0; background: none; box-shadow: none; }
:is(.ai-panel-blue, .ai-home) .ai-msg-answer .ai-team-card .ai-team-open { border: 0 !important; border-radius: 0; padding: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
/* ── end T-0140 ── */

/* T-0141 (the user): the Org chart link in the suggested prompts: a faded, see-through blue (like the green KPI prompts) */
:root .ai-examples .ai-example-link > .ai-example { background: rgba(28, 126, 214, 0.12); text-decoration: none; }
:root .ai-examples .ai-example-link > .ai-example:hover, :root .ai-examples .ai-example-link > .ai-example:focus-visible { background: rgba(28, 126, 214, 0.2); }
:root[data-bs-theme='dark'] .ai-examples .ai-example-link > .ai-example { background: rgba(77, 171, 247, 0.14); }
:root[data-bs-theme='dark'] .ai-examples .ai-example-link > .ai-example:hover, :root[data-bs-theme='dark'] .ai-examples .ai-example-link > .ai-example:focus-visible { background: rgba(77, 171, 247, 0.22); }
:root .ai-examples .ai-example-link .bi-box-arrow-up-right { font-size: 0.7rem; opacity: 0.6; }

/* T-0142 (the user, 2026-11-19): the suggested prompts dropdown follows the chat's width on wide screens (was capped at 58rem),
   up to the conversation's own 100rem (T-0136); 1rem gutter as before */
.ai-suggest { width: min(100rem, calc(100cqw - 1rem)); }

/* ── T-0146: user functions (profile group, users list pills) ── */
.user-functions .form-check-input:disabled, .user-functions .form-check-input:disabled ~ .form-check-label { opacity: 0.75; }
.fn-pill { font-weight: 500; background: var(--bs-secondary-bg); color: var(--bs-body-color); border: 1px solid var(--bs-border-color); }
/* ── end T-0146 ── */

/* T-0148 (the user): the Teams field of the user form is a multi-select dropdown: full width, the menu as wide as the field and
   scrolling when there are many teams */
.team-multiselect { width: 100%; }
.team-multiselect .multiselect-toggle { width: 100%; }
.team-multiselect-menu { width: 100%; max-height: 18rem; overflow-y: auto; }

/* T-0149: the Team filter of the users list (a multi-select) fills its column like the selects next to it */
.users-team-filter .product-filter, .users-team-filter .multiselect-toggle { width: 100%; }
.users-team-filter .multiselect-toggle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* T-0151: type-to-filter Industry / Sub-industry boxes on the customer form */
.creatable-menu { max-height: 16rem; overflow-y: auto; }
.creatable-menu .dropdown-item { cursor: pointer; white-space: normal; }
/* T-0151: Industries screen rows; #ind-<id> / #sub-<id> (linked from the customer form) is highlighted */
.lookup-row { padding: 0.25rem 0.5rem; border-radius: 0.4rem; scroll-margin-top: 5rem; }
.lookup-row:target { background: var(--bs-primary-bg-subtle, #e7f0ff); outline: 2px solid var(--bs-primary, #0d6efd); }
.lookup-rename { min-width: 14rem; }

/* T-0152: the Account owner panel of the customer page; T-0147 business unit pills (Direct blue, Indirect violet, Other grey) */
.owner-panel-photo { width: 56px; height: 56px; font-size: 1.25rem; flex: 0 0 auto; border-radius: 50%; object-fit: cover; display: inline-flex; align-items: center; justify-content: center; }
.min-w-0 { min-width: 0; }
.bu-pill.bu-direct { background: #dbeafe; color: #1e40af; }
.bu-pill.bu-indirect { background: #ede9fe; color: #5b21b6; }
.bu-pill.bu-other { background: #e5e7eb; color: #374151; }

/* T-0153: customers list address column */
.customer-address { max-width: 14rem; vertical-align: bottom; }

/* T-0154 (the user): Directory list tables: no borders, sortable headers, group rows; "Print table only" prints just the table */
.smart-table.table > :not(caption) > * > * { border-bottom-width: 0; }
/* T-0154 (the user): bold headers; no border or shadow around the table box; a grey running number first; even rows shaded (transparent,
   so it works in every theme); .col-fit columns only as wide as their content (the header may wrap) */
.smart-table thead th { white-space: nowrap; font-weight: 700; text-transform: none; }
.smart-table thead th .sort-link { font-weight: 700; }
.surface:has(> .smart-table), .surface:has(> .table-responsive > .smart-table) { border: 0 !important; box-shadow: none !important; }
.smart-table .row-no { width: 1%; white-space: nowrap; color: var(--bs-secondary-color, #6c757d); font-size: 0.75rem; text-align: right; padding-right: 0.25rem; }
.smart-table > tbody > tr.row-alt > * { background-color: rgba(var(--bs-emphasis-color-rgb, 0, 0, 0), 0.035); }
.smart-table .col-fit { width: 1%; white-space: nowrap; }
.smart-table thead th.col-fit { white-space: normal; min-width: 4.5rem; }
.smart-table .sort-link { font-size: inherit; color: inherit; }
.smart-table tr.group-row > th { background: var(--bs-tertiary-bg, #f3f4f6); font-size: 0.85rem; font-weight: 600; padding-top: 0.4rem; padding-bottom: 0.4rem; }
.print-only-title { display: none; }
@media print {
  body.print-table-only * { visibility: hidden !important; }
  body.print-table-only .print-target, body.print-table-only .print-target * { visibility: visible !important; }
  body.print-table-only .print-target { position: absolute; inset: 0 auto auto 0; width: 100%; box-shadow: none !important; border: 0 !important; }
  body.print-table-only .print-target .print-only-title { display: block; font-size: 14pt; margin: 0 0 8pt; }
  body.print-table-only .print-target .sort-ico { display: none !important; }
  body.print-table-only .print-target a { color: inherit !important; text-decoration: none !important; }
  body.print-table-only .print-target .table-responsive { overflow: visible !important; }
}
/* T-0154: the customer form's "Edit / delete" captions (open the Industries editor in a modal) */
.lookup-edit-link { font-size: 0.75rem; text-decoration: none !important; }
.lookup-row.is-target { background: var(--bs-primary-bg-subtle, #e7f0ff); outline: 2px solid var(--bs-primary, #0d6efd); }

/* T-0156: "Record not found. Want to add it?" + Add record, at the bottom of a lookup's list */
.creatable-menu .creatable-add { border-top: 1px solid var(--bs-border-color, #dee2e6); margin-top: 0.25rem; padding-top: 0.5rem; padding-bottom: 0.5rem; white-space: normal; }
.creatable-menu .creatable-add.active, .creatable-menu .creatable-add:hover { background: var(--bs-tertiary-bg, #f3f4f6); color: inherit; }

/* T-0157: a record form with a side panel: 80 / 20 on large screens, stacked below */
.record-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 1rem; }
@media (min-width: 992px) { .record-split { grid-template-columns: minmax(0, 4fr) minmax(0, 1fr); } }

/* T-0157: the person dropdown (Account owner) with photos */
.person-pick-face { width: 24px; height: 24px; border-radius: 50%; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; font-size: 0.65rem; object-fit: cover; }
.person-pick-menu .person-pick-face { width: 28px; height: 28px; font-size: 0.7rem; }
/* the initials as generated content (app.js person picker): not text axe compares with the button's accessible name */
.person-pick-face[data-initials]::before { content: attr(data-initials); }
.person-pick-menu { max-height: 20rem; overflow-y: auto; }
.person-pick-none { background: var(--bs-tertiary-bg, #e9ecef); color: var(--bs-secondary-color, #6c757d); }
.person-pick .form-select { background-position: right 0.75rem center; }

/* T-0160: ANAF results; the New customer choices */
.anaf-raw { max-height: 22rem; overflow: auto; font-size: 0.78rem; background: var(--bs-tertiary-bg, #f6f8fa); border-radius: 0.4rem; padding: 0.75rem; white-space: pre-wrap; word-break: break-word; }
.new-customer-choice { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }

/* T-0161 (the user): customer form panels without a border; the Account panel slightly tinted */
.surface.panel-plain { border: 0 !important; box-shadow: none !important; }
/* T-0162: a slight neutral grey (transparent, so it works in light and dark themes) */
/* T-0163 (the user): the theme's soft grey of the issue status row (--atlas-status-row-bg, light / blue / dark) */
.surface.panel-tinted { background: var(--atlas-status-row-bg, rgba(0, 0, 0, 0.05)) !important; }
/* text links on that grey (e.g. the Account owner's "Choose one"): the stronger link colour of the Sales panels (axe contrast, 3 themes) */
.surface.panel-tinted a:not(.btn):not(.dropdown-item) { color: var(--sales-link-strong, var(--bs-link-color)); }

/* T-0165: hover details (installations list) keep their line breaks */
.detail-popover .popover-body { white-space: pre-line; font-size: 0.8rem; max-width: 26rem; }
.text-prewrap { white-space: pre-wrap; }

/* T-0168: the customers list's installation columns, framed as one group (a soft border around them, a light tint) */
.smart-table .inst-group { background-color: rgba(var(--bs-primary-rgb, 13, 110, 253), 0.035); border-top: 1px solid var(--bs-border-color) !important; border-bottom: 1px solid var(--bs-border-color) !important; }
.smart-table .inst-first { border-left: 1px solid var(--bs-border-color) !important; }
.smart-table .inst-last { border-right: 1px solid var(--bs-border-color) !important; }

/* T-0171: Administration -> Access rights matrix: sticky user column, a line between entities */
.access-matrix th, .access-matrix td { white-space: nowrap; }
.access-matrix .ar-user-col { position: sticky; left: 0; z-index: 2; background: var(--bs-body-bg); min-width: 14rem; }
.access-matrix .ar-ent-first { border-left: 1px solid var(--bs-border-color) !important; }
.access-matrix thead th.ar-ent { font-weight: 700; }
.access-matrix-wrap { max-height: 75vh; overflow: auto; }
/* T-0278: the "View only" note under the Knowledge base header; its disabled boxes read as not in use */
.access-matrix .ar-view-only { color: var(--sales-muted-strong, var(--bs-body-color)); }
.access-matrix input.form-check-input:disabled { opacity: 0.35; cursor: not-allowed; }
/* T-0278 (axe, light theme): the bulk buttons on the tinted toolbar need the stronger link / muted colours (4.5:1 on #f2f2f2) */
[data-access-tools] .btn-outline-secondary { --bs-btn-color: var(--sales-muted-strong); --bs-btn-border-color: var(--sales-muted-strong); }
[data-access-tools] .btn-outline-primary { --bs-btn-color: var(--sales-link-strong); --bs-btn-border-color: var(--sales-link-strong); }
.access-matrix thead th { position: sticky; top: 0; background: var(--bs-body-bg); z-index: 1; }
.access-matrix thead tr:nth-child(2) th { top: 2rem; }

/* T-0174: customer page widgets: Installations / Projects in a semi-transparent green; Google search */
.stat-sign.stat-sign-green { background: rgba(25, 135, 84, 0.12) !important; border-color: rgba(25, 135, 84, 0.25) !important; }
.stat-sign.stat-sign-search .stat-sign-value { color: var(--bs-primary); }

/* T-0176: installation totals float at the bottom right, like an invoice's totals */
.install-totals-float { position: sticky; bottom: 1rem; z-index: 5; margin: 1rem 0 0 auto; width: min(22rem, 100%); padding: 0.75rem 1rem;
  background: var(--bs-body-bg); border: 1px solid var(--bs-border-color); border-radius: 0.6rem; box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.12); }
.install-totals-row { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.9rem; padding: 0.15rem 0; font-variant-numeric: tabular-nums; }
.install-totals-row > span:last-child { font-weight: 600; }
.install-totals-grand { border-top: 1px solid var(--bs-border-color); margin-top: 0.35rem; padding-top: 0.45rem; font-size: 1.05rem; }
.install-totals-grand > span { font-weight: 700; }

/* T-0178 (the user, 2026-11-19): native controls (the date picker icon, scrollbars, selects) follow the app theme, not the OS: with
   <meta name="color-scheme" content="light dark"> and a dark OS, the light theme drew a white calendar icon on a white field */
:root[data-bs-theme='light'],
:root[data-bs-theme='blue'] {
  color-scheme: light;
}
:root[data-bs-theme='dark'] {
  color-scheme: dark;
}

/* T-0180: project phases timeline (months, ISO weeks with dates, one bar per phase with its progress) */
.phase-timeline-scroll { overflow-x: auto; }
.phase-timeline-table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: max-content; table-layout: fixed; font-size: 0.8rem; }
.phase-timeline-table th, .phase-timeline-table td { padding: 0; }
.phase-timeline-table .tl-name-col { position: sticky; left: 0; z-index: 2; background: var(--bs-body-bg); min-width: 12rem; max-width: 16rem; padding: 0.3rem 0.6rem 0.3rem 0; text-align: left; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phase-timeline-table thead .tl-name-col { font-weight: 700; vertical-align: bottom; }
.phase-timeline-table .tl-month { text-align: left; font-weight: 700; padding: 0.25rem 0.4rem; border-left: 1px solid var(--bs-border-color); background: var(--atlas-status-row-bg, rgba(0, 0, 0, 0.04)); }
.phase-timeline-table .tl-week { width: 5.25rem; min-width: 5.25rem; padding: 0.2rem 0.3rem; border-left: 1px solid var(--bs-border-color); border-bottom: 1px solid var(--bs-border-color); vertical-align: top; text-align: left; }
.phase-timeline-table .tl-wn { display: block; font-weight: 600; }
.phase-timeline-table .tl-wd { display: block; font-size: 0.68rem; font-weight: 400; color: var(--bs-secondary-color); white-space: nowrap; }
.phase-timeline-table .tl-week-now { background: rgba(var(--bs-primary-rgb), 0.08); }
.phase-timeline-table .tl-track-cell { border-bottom: 1px solid var(--bs-border-color-translucent, rgba(0, 0, 0, 0.06)); }
.phase-timeline-table .tl-track { position: relative; height: 2rem;
  background-image: linear-gradient(to right, var(--bs-border-color) 1px, transparent 1px); background-repeat: repeat-x; }
.phase-timeline-table .tl-sub .tl-track { height: 1.6rem; }
.phase-timeline-table .tl-bar { position: absolute; top: 0.35rem; bottom: 0.35rem; border-radius: 0.35rem; overflow: hidden; display: flex; align-items: center;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08); min-width: 0.4rem; }
.phase-timeline-table .tl-sub .tl-bar { top: 0.3rem; bottom: 0.3rem; opacity: 0.9; }
.phase-timeline-table .tl-bar-done { position: absolute; inset: 0 auto 0 0; background: rgba(var(--bs-emphasis-color-rgb, 0, 0, 0), 0.22); }
.phase-timeline-table .tl-bar-label { position: relative; padding: 0 0.4rem; font-size: 0.7rem; font-weight: 600; white-space: nowrap; }
.phase-timeline-table .tl-bar:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: 1px; }
.phase-timeline-table .tl-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--bs-danger); opacity: 0.7; z-index: 1; }
.phase-timeline-table .tl-nodates { position: absolute; left: 0.4rem; top: 50%; transform: translateY(-50%); }

/* T-0182 (the user): the phases timeline looks like a calendar: a framed grid, centred month and week headers, months alternately
   shaded, every cell ruled */
.phase-timeline-table.tl-calendar { border:none; border-radius: 0.5rem; overflow: hidden; }
.tl-calendar thead th { text-align: center; vertical-align: middle; }
.tl-calendar thead .tl-name-col { text-align: left; padding-left: 0.6rem; border-right: 1px solid var(--bs-border-color); border-bottom: 1px solid var(--bs-border-color); }
.tl-calendar .tl-month { padding: 0.4rem 0.4rem; font-size: 0.85rem; letter-spacing: 0.02em; border-bottom: 1px solid var(--bs-border-color); border-left: 1px solid var(--bs-border-color); }
.tl-calendar .tl-month.tl-month-odd { background: var(--atlas-status-row-bg, rgba(0, 0, 0, 0.05)); }
.tl-calendar .tl-month.tl-month-even { background: rgba(var(--bs-primary-rgb), 0.07); }
.tl-calendar .tl-week { text-align: center; padding: 0.3rem 0.25rem; }
.tl-calendar .tl-week.tl-month-even { background: rgba(var(--bs-primary-rgb), 0.03); }
.tl-calendar .tl-week .tl-wn { font-size: 0.8rem; }
.tl-calendar .tl-week-now { background: rgba(var(--bs-primary-rgb), 0.14) !important; }
.tl-calendar .tl-week-now .tl-wn { color: var(--bs-primary); }
.tl-calendar tbody .tl-name-col { padding-left: 0.6rem; border-right: 1px solid var(--bs-border-color); border-bottom: 1px solid var(--bs-border-color-translucent, rgba(0, 0, 0, 0.08)); }
.tl-calendar tbody tr:last-child .tl-name-col, .tl-calendar tbody tr:last-child .tl-track-cell { border-bottom: 0; }
.tl-calendar .tl-track { height: 2.4rem; }
.tl-calendar .tl-sub .tl-track { height: 2rem; }
.tl-calendar .tl-bar { top: 0.45rem; bottom: 0.45rem; }

/* T-0183 (the user): every week's text fits: the timeline keeps its natural width (week columns never squeezed) and scrolls
   horizontally inside its panel; the phase names stay pinned on the left */
.phase-timeline-scroll { overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; padding-bottom: 0.25rem; }
.phase-timeline-table.tl-calendar { table-layout: auto; width: max-content; min-width: 100%; }
.tl-calendar .tl-week { min-width: 7.25rem; width: 7.25rem; white-space: nowrap; }
.tl-calendar .tl-week .tl-wn, .tl-calendar .tl-week .tl-wd { white-space: nowrap; }
.tl-calendar .tl-month { white-space: nowrap; }
.tl-calendar .tl-name-col { min-width: 13rem; }

/* T-0184: project screen: in-place editors, the second row (product suite, product) and the Open bugs widget */
.inline-edit-form { display: flex; flex-wrap: wrap; gap: 0.3rem; align-items: center; }
.inline-edit-form .form-control { width: auto; min-width: 9rem; flex: 1 1 9rem; }
.inline-edit-open { color: var(--bs-secondary-color); opacity: 0.7; }
.inline-edit:hover .inline-edit-open, .inline-edit-open:focus-visible { opacity: 1; color: var(--bs-primary); }
.project-master-row2 { display: flex; flex-wrap: wrap; align-items: stretch; gap: 1rem; border-top: 1px solid var(--bs-border-color-translucent, rgba(0, 0, 0, 0.08)); }
.project-master-row2 > .project-master-grid { flex: 1 1 18rem; }
.project-bugs-widget { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 8rem; padding: 0.5rem 1rem; border-radius: 0.6rem;
  background: var(--atlas-status-row-bg, rgba(0, 0, 0, 0.05)); text-align: center; }
.project-bugs-widget .project-bugs-value { font-size: 2rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.project-bugs-widget .project-bugs-label { font-size: 0.8rem; color: var(--bs-secondary-color); }
.project-bugs-widget.has-bugs { background: rgba(220, 53, 69, 0.1); }
.project-bugs-widget.has-bugs .project-bugs-value { color: var(--bs-danger); }

/* T-0186 (the user): phases carry an incremental number (1, 2 … / 1.1, 1.2 …) in a smaller grey font */
.phase-no { display: inline-block; min-width: 1.6rem; margin-right: 0.35rem; font-size: 0.72rem; font-weight: 400; color: var(--bs-secondary-color); font-variant-numeric: tabular-nums; }

/* T-0187 (the user): the project's people panel: "Project Team" title, the theme's soft grey (--atlas-status-row-bg), no border */
section.people-panel.project-team-panel { background: var(--atlas-status-row-bg, rgba(0, 0, 0, 0.05)); border: 0; padding: 0.75rem 0.85rem; }

/* T-0189: the status picker (like the tasks' status), the % bar, the quick-date dropdown next to date fields */
.status-pick-btn { display: flex; align-items: center; gap: 0.35rem; }
.status-pick-btn.dropdown-toggle::after { margin-left: auto; }
.status-pick-menu .ai-pill { display: inline-flex; align-items: center; gap: 0.3rem; }
.pct-range { --pct: 0%; height: 1.25rem; }
.pct-range::-webkit-slider-runnable-track { height: 0.85rem; border-radius: 1rem;
  background: linear-gradient(to right, var(--bs-primary) 0 var(--pct), var(--bs-secondary-bg, #e9ecef) var(--pct) 100%); }
.pct-range::-moz-range-track { height: 0.85rem; border-radius: 1rem; background: var(--bs-secondary-bg, #e9ecef); }
.pct-range::-moz-range-progress { height: 0.85rem; border-radius: 1rem; background: var(--bs-primary); }
.pct-range::-webkit-slider-thumb { margin-top: -0.2rem; }
.pct-number { width: 5.5rem; flex: 0 0 auto; }

/* T-0190 (the user): the phases rows alternate their background (odd rows tinted, transparent so it works in every theme) */
table.project-phases > tbody > tr:nth-child(odd) > * { background-color: rgba(var(--bs-emphasis-color-rgb, 0, 0, 0), 0.035); }

/* T-0191: the timeline inside the Phases tab, with a big top margin */
.phase-timeline.tl-in-tab { margin-top: 3rem; }
/* T-0192 (the user): bars in a blue palette (one shade per main phase), the completed part a darker shade of the same blue */
.tl-calendar .tl-bar { background: var(--tl-bg); color: #0b2350; box-shadow: inset 0 0 0 1px var(--tl-fill); }
.tl-calendar .tl-bar .tl-bar-done { background: var(--tl-fill); }
.tl-calendar .tl-bar .tl-bar-label { color: #0b2350; }
.tl-calendar .tl-bar .tl-bar-label.tl-label-on-fill { color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35); }
[data-bs-theme='dark'] .tl-calendar .tl-bar .tl-bar-label { color: #e7efff; }
.tl-calendar .tl-bar.tl-tone-0 { --tl-bg: #cfe2ff; --tl-fill: #0d6efd; }
.tl-calendar .tl-bar.tl-tone-1 { --tl-bg: #cff4fc; --tl-fill: #0aa2c0; }
.tl-calendar .tl-bar.tl-tone-2 { --tl-bg: #dbe4ff; --tl-fill: #3b5bdb; }
.tl-calendar .tl-bar.tl-tone-3 { --tl-bg: #d0ebff; --tl-fill: #1971c2; }
.tl-calendar .tl-bar.tl-tone-4 { --tl-bg: #e0e7ff; --tl-fill: #4c4cc9; }
.tl-calendar .tl-bar.tl-tone-5 { --tl-bg: #c5f6fa; --tl-fill: #0c8599; }
.tl-calendar .tl-sub .tl-bar { opacity: 0.85; }
.tl-calendar .tl-bar.tl-status-on_hold { background-image: repeating-linear-gradient(45deg, transparent 0 6px, rgba(255, 255, 255, 0.45) 6px 10px); }
[data-bs-theme='dark'] .tl-calendar .tl-bar { color: #e7efff; }
[data-bs-theme='dark'] .tl-calendar .tl-bar.tl-tone-0 { --tl-bg: rgba(13, 110, 253, 0.28); --tl-fill: #3d8bfd; }
[data-bs-theme='dark'] .tl-calendar .tl-bar.tl-tone-1 { --tl-bg: rgba(10, 162, 192, 0.28); --tl-fill: #3dd5f3; }
[data-bs-theme='dark'] .tl-calendar .tl-bar.tl-tone-2 { --tl-bg: rgba(59, 91, 219, 0.3); --tl-fill: #748ffc; }
[data-bs-theme='dark'] .tl-calendar .tl-bar.tl-tone-3 { --tl-bg: rgba(25, 113, 194, 0.3); --tl-fill: #4dabf7; }
[data-bs-theme='dark'] .tl-calendar .tl-bar.tl-tone-4 { --tl-bg: rgba(76, 76, 201, 0.3); --tl-fill: #9775fa; }
[data-bs-theme='dark'] .tl-calendar .tl-bar.tl-tone-5 { --tl-bg: rgba(12, 133, 153, 0.3); --tl-fill: #3bc9db; }

/* T-0197: projects list Tasks column: total + a split bar done (green) / in progress (blue) / not started (grey) */
.tasks-col { min-width: 13rem; }
.tasks-split { display: flex; flex: 1 1 6rem; min-width: 5rem; height: 0.5rem; border-radius: 1rem; overflow: hidden; background: var(--bs-secondary-bg, #e9ecef); }
.tasks-seg { display: block; height: 100%; }
.tasks-seg.tasks-done { background: var(--bs-success); }
.tasks-seg.tasks-doing { background: var(--bs-primary); }
.tasks-seg.tasks-todo { background: var(--bs-secondary-bg, #dee2e6); }
.tasks-total { min-width: 1.5rem; text-align: right; font-variant-numeric: tabular-nums; }

/* T-0199 (the user): the vertical menu's Main / Setup tabs, transparent */
.atlas-sidebar .sidebar-tabs { border-bottom: 1px solid var(--bs-border-color-translucent, rgba(0, 0, 0, 0.1)); gap: 0.25rem; flex-wrap: nowrap; }
.atlas-sidebar .sidebar-tabs .nav-link { background: transparent !important; border: 0; border-bottom: 2px solid transparent; border-radius: 0;
  color: inherit; opacity: 0.75; padding: 0.4rem 0.75rem; font-weight: 600; font-size: 0.85rem; }
.atlas-sidebar .sidebar-tabs .nav-link.active { opacity: 1; border-bottom-color: var(--bs-primary); color: inherit; }
.atlas-sidebar .sidebar-tabs .nav-link:hover, .atlas-sidebar .sidebar-tabs .nav-link:focus-visible { opacity: 1; }

/* T-0177a (DESIGN-T0177 13, 17): Sales P1 minimal pages. No inline styles (CSP): the form shows / hides fields with :has() only;
   hidden fields are still sent and the server ignores them (rate for the base currency, Sales fields for the other types). */
.ws-new-form .ws-sales-only { display: none; }
.ws-new-form:has(#type-SALES:checked) .ws-sales-only { display: block; }
.sales-form:has(#opp-currency option.is-base:checked) .sales-rate { display: none; }
.sales-stage-form .sales-when-won,
.sales-stage-form .sales-when-lost { display: none; }
.sales-stage-form:has(#opp-move-stage option.kind-won:checked) .sales-when-won,
.sales-stage-form:has(#opp-move-stage option.kind-lost:checked) .sales-when-lost { display: block; }
.sales-description { white-space: pre-wrap; overflow-wrap: anywhere; }
.sales-stage-badge { white-space: normal; text-align: left; }
.sales-line-edit > td { border-top: 0; padding-top: 0; }
.sales-line-edit summary { cursor: pointer; color: var(--bs-link-color); }

/* T-0177 D-2 (TR-T0177-1): phone width. The lists contain their visually hidden texts (position-relative on the scroll boxes in the
   templates), the members table wraps; the history values keep a readable width and the table scrolls inside its card instead of
   breaking a value one letter per line. */
.sales-hist-val { display: block; min-width: 5rem; max-width: 24rem; overflow-wrap: anywhere; }
/* it can scroll sideways, so it takes keyboard focus (axe scrollable-region-focusable) */
.sales-hist-scroll:focus-visible { outline: 2px solid var(--atlas-focus); outline-offset: 2px; }
@media (max-width: 575.98px) {
  .members-email { display: block; overflow-wrap: anywhere; }
}

/* ── T-0201 (DESIGN-T0201 6.4-6.9): database schema page, diagram and the shared list (page and chat card) ──
   Positions come from CSS custom properties set through the CSSOM by db-schema.js (no style attributes: CSP). */
.dbs-g0 { --dbs-gc: var(--dbs-g0); }
.dbs-g1 { --dbs-gc: var(--dbs-g1); }
.dbs-g2 { --dbs-gc: var(--dbs-g2); }
.dbs-g3 { --dbs-gc: var(--dbs-g3); }
.dbs-g4 { --dbs-gc: var(--dbs-g4); }
.dbs-g5 { --dbs-gc: var(--dbs-g5); }
.dbs-g6 { --dbs-gc: var(--dbs-g6); }
.dbs-g7 { --dbs-gc: var(--dbs-g7); }
.dbs-g8 { --dbs-gc: var(--dbs-g8); }
.dbs-g9 { --dbs-gc: var(--dbs-g9); }
.dbs-g10 { --dbs-gc: var(--dbs-g10); }
.dbs-g11 { --dbs-gc: var(--dbs-g11); }
.dbs-g12 { --dbs-gc: var(--dbs-g12); }
.dbs-g13 { --dbs-gc: var(--dbs-g13); }
.dbs-g14 { --dbs-gc: var(--dbs-g14); }
.dbs-g15 { --dbs-gc: var(--dbs-g15); }
.dbs { min-width: 0; }
.dbs-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.dbs-toolbar[hidden], .dbs [hidden] { display: none !important; }
.dbs-search { flex: 1 1 16rem; max-width: 26rem; min-width: 0; }
.dbs-groups { position: relative; }
.dbs-groups > summary { list-style: none; }
.dbs-groups > summary::-webkit-details-marker { display: none; }
.dbs-groups-menu {
  position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; min-width: 16rem; max-width: calc(100vw - 2rem);
  max-height: 60vh; overflow: auto; padding: 0.5rem 0.75rem; font-size: 0.875rem;
  background: var(--atlas-surface); color: var(--bs-body-color); border: 1px solid var(--atlas-border); border-radius: 0.375rem;
  box-shadow: 0 6px 18px rgba(9, 30, 66, 0.18);
}
.dbs-groups-all { display: flex; gap: 0.5rem; margin-bottom: 0.25rem; }
.dbs-groups-all .btn { padding: 0; }
.dbs-swatch { display: inline-block; width: 0.75rem; height: 0.75rem; margin-right: 0.375rem; border-radius: 2px; background: var(--dbs-gc); vertical-align: -1px; }
.dbs-diagram { position: relative; }
.dbs-skip:focus { position: absolute !important; z-index: 6; left: 0.5rem; top: 0.5rem; }
.dbs-viewport {
  position: relative; overflow: hidden; overflow: clip; height: calc(100vh - 300px); min-height: 420px;
  background: var(--dbs-bg); border: 1px solid var(--atlas-border); border-radius: 0.5rem; touch-action: none; cursor: grab;
}
.dbs-loading { margin: 0; padding: 1rem; color: var(--dbs-muted); }
.dbs-world {
  position: absolute; left: 0; top: 0; width: var(--w, 0); height: var(--h, 0); transform-origin: 0 0;
  transform: translate(var(--tx, 0), var(--ty, 0)) scale(var(--k, 1));
}
.dbs-edges { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.dbs-edge { fill: none; stroke: var(--dbs-edge); stroke-width: 1.25; marker-end: url(#dbs-arrow); transition: opacity 0.15s; }
.dbs-edge.is-dim { opacity: 0.15; }
.dbs-edge.is-hot { stroke: var(--dbs-edge-hot); stroke-width: 2.25; marker-end: url(#dbs-arrow-hot); opacity: 1; }
.dbs-edge.is-off { display: none; }
.dbs-arrow { fill: var(--dbs-edge); }
.dbs-arrow-hot { fill: var(--dbs-edge-hot); }
.dbs-cluster { position: static; }
.dbs-frame {
  position: absolute; left: 0; top: 0; width: var(--w, 0); height: var(--h, 0); transform: translate(var(--x, 0), var(--y, 0));
  background: var(--dbs-frame-bg); border: 1px solid var(--dbs-gc); border-top-width: 4px; border-radius: 0.5rem;
}
.dbs-cluster-title {
  position: absolute; left: 0; top: 0; margin: 0; transform: translate(var(--x, 0), var(--y, 0));
  font-size: 0.875rem; font-weight: 600; line-height: 1.4; white-space: nowrap; color: var(--dbs-node-fg);
}
.dbs-node {
  position: absolute; left: 0; top: 0; transform: translate(var(--x, 0), var(--y, 0)); width: max-content; min-width: 10rem; max-width: 16rem;
  background: var(--dbs-node-bg); color: var(--dbs-node-fg); border: 1px solid var(--dbs-node-border); border-left: 4px solid var(--dbs-gc);
  border-radius: 0.375rem; cursor: default;
}
.dbs-world.is-ready .dbs-node { transition: transform 0.15s ease; }
.dbs-node.is-open { width: 30rem; max-width: 30rem; z-index: 2; box-shadow: 0 4px 14px rgba(9, 30, 66, 0.2); }
.dbs-node-head {
  display: flex; flex-direction: column; align-items: flex-start; width: 100%; padding: 0.375rem 0.5rem; text-align: left;
  font: inherit; color: inherit; background: none; border: 0; border-radius: 0.25rem; cursor: pointer;
}
.dbs-node-head:focus-visible { outline: 2px solid var(--atlas-focus); outline-offset: 2px; }
.dbs-node-name { font-family: var(--bs-font-monospace); font-size: 0.8125rem; font-weight: 600; overflow-wrap: anywhere; }
.dbs-node-group, .dbs-node-meta { font-size: 0.75rem; color: var(--dbs-muted); }
.dbs-node-badge {
  margin-top: 0.125rem; padding: 0 0.375rem; font-size: 0.6875rem; color: var(--dbs-node-fg);
  background: var(--dbs-match-bg); border: 1px solid var(--dbs-match-border); border-radius: 1rem;
}
.dbs-node-body { padding: 0 0.5rem 0.5rem; font-size: 0.75rem; cursor: auto; }
.dbs-desc, .dbs-flags { color: var(--dbs-muted); }
.dbs-tbl { width: 100%; margin-bottom: 0.375rem; border-collapse: collapse; }
.dbs-tbl th, .dbs-tbl td { padding: 0.125rem 0.25rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--dbs-dim-border); overflow-wrap: anywhere; }
.dbs-tbl thead th { font-weight: 600; color: var(--dbs-muted); }
/* T-0206 m1: the index table's 2nd cell is Columns: it may wrap (a long column list must not widen its node) */
.dbs-tbl thead th, .dbs-tbl:not(.dbs-idx) td:nth-child(2), .dbs-tbl td:nth-child(3) { white-space: nowrap; overflow-wrap: normal; }
.dbs-tbl tbody th { font-family: var(--bs-font-monospace); font-weight: 600; }
/* T-0201 O-2: names (field, FK target, index, index columns) carry a <wbr> after each "_" / "."; break-word keeps those
   pieces whole when the table sizes its columns (anywhere let the column shrink to one letter and split names mid-word) */
.dbs-tbl tbody th, .dbs-tbl:not(.dbs-idx) td:nth-child(6), .dbs-idx td:nth-child(2) { overflow-wrap: break-word; }
.dbs-tbl tr.is-match > * { background: var(--dbs-match-bg); }
.dbs-rel { overflow-wrap: anywhere; }
.dbs-rel-btn { padding: 0; font-size: 0.75rem; vertical-align: baseline; text-align: left; color: var(--dbs-link); }
.dbs-rel-btn:hover, .dbs-rel-btn:focus-visible { color: var(--dbs-link); }
.dbs-node.is-match { background: var(--dbs-match-bg); border-color: var(--dbs-match-border); }
.dbs-node.is-related { border-color: var(--dbs-edge-hot); border-left-color: var(--dbs-gc); box-shadow: 0 0 0 1px var(--dbs-edge-hot); }
.dbs-node.is-selected { border-color: var(--dbs-select); border-left-color: var(--dbs-gc); box-shadow: 0 0 0 3px var(--dbs-select); z-index: 3; }
/* dimming changes colour, never opacity on text (axe contrast holds in every state) */
.dbs-node.is-dim { color: var(--dbs-dim-fg); border-color: var(--dbs-dim-border); border-left-color: var(--dbs-gc); background: var(--dbs-node-bg); }
.dbs-node.is-dim .dbs-node-group, .dbs-node.is-dim .dbs-node-meta { color: var(--dbs-dim-fg); }
@media (prefers-reduced-motion: reduce) {
  .dbs-world.is-ready .dbs-node, .dbs-edge { transition: none; }
}
/* the list (page list view and chat card) */
.dbs-l-gtitle { margin: 1rem 0 0.5rem; font-size: 1rem; font-weight: 600; }
.dbs-l-count, .dbs-l-desc, .dbs-l-nf, .dbs-l-rg, .dbs-l-note { color: var(--atlas-muted); }
.dbs-l-table { margin-bottom: 0.375rem; background: var(--atlas-surface); border: 1px solid var(--atlas-border); border-radius: 0.375rem; }
.dbs-l-table > summary { padding: 0.375rem 0.5rem; cursor: pointer; overflow-wrap: anywhere; }
.dbs-l-table > summary code, .dbs-l-cut code { font-weight: 600; color: inherit; }
.dbs-l-body { padding: 0 0.5rem 0.5rem; }
.dbs-l-tbl { width: 100%; table-layout: fixed; font-size: 0.8125rem; }
.dbs-l-tbl th, .dbs-l-tbl td { overflow-wrap: anywhere; }
.dbs-l-tbl tbody th { font-family: var(--bs-font-monospace); font-weight: 600; }
.dbs-l-rel { font-size: 0.8125rem; overflow-wrap: anywhere; }
.dbs-l-cut { font-size: 0.8125rem; overflow-wrap: anywhere; }
.ai-dbs-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.25rem; }
.dbs-list-card .dbs-l-gtitle { margin: 0.5rem 0 0.25rem; font-size: 0.8125rem; }
.dbs-list-card .dbs-l-tbl, .dbs-list-card .dbs-l-rel { font-size: 0.75rem; }
@media (max-width: 575.98px) {
  .dbs-search { flex-basis: 100%; max-width: none; }
  .dbs-viewport { height: calc(100vh - 340px); }
}

/* ── T-0202a: Project Management settings and Summary (DESIGN-T0202 7.4, 11). Colours are theme tokens or the tag palette. ── */
.stat-sign.stat-sign-red { background: var(--atlas-wip-over) !important; border-color: var(--atlas-danger-fg) !important; }
/* Work types */
.wt-list > .wt-row { padding: 0.75rem 0; border-bottom: 1px solid var(--atlas-border); }
.wt-list > .wt-row:last-child { border-bottom: 0; }
.wt-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; }
.wt-swatch { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; flex: 0 0 2rem; border: 1px solid var(--atlas-border); border-radius: 0.375rem; background: var(--atlas-surface-2); font-size: 1.1rem; }
.wt-title { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; flex: 1 1 12rem; min-width: 0; }
.wt-name { overflow-wrap: anywhere; }
.wt-actions { display: flex; gap: 0.25rem; margin-left: auto; }
.wt-row.is-inactive .wt-name { color: var(--atlas-muted); }
.wt-edit > summary { list-style: none; text-decoration: none; }
.wt-edit > summary::-webkit-details-marker { display: none; }
.wt-edit[open] > summary { margin-bottom: 0.25rem; }
.wt-preview { min-width: 2.25rem; justify-content: center; background: var(--atlas-surface-2); }
/* text-dark would vanish on a dark background: there the icon takes the body colour */
[data-bs-theme='dark'] .wt-icon.text-dark { color: var(--bs-body-color) !important; }
/* Calendar and work */
.cw-scroll:focus-visible { outline: 2px solid var(--atlas-focus); outline-offset: 2px; }
.cw-members .cw-col-hours { width: 7rem; min-width: 6rem; }
.cw-members .cw-col-day { width: 3rem; }
.cw-member { font-weight: 600; min-width: 11rem; }
.cw-day { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.125rem; min-width: 2rem; min-height: 2rem; margin: 0; cursor: pointer; }
.cw-day .form-check-input { margin: 0; }
.cw-day-name, .cw-stack-label { display: none; font-size: 0.75rem; color: var(--atlas-muted); }
.cw-vac { white-space: nowrap; }
.cw-past > * { --bs-table-color: var(--atlas-muted); color: var(--atlas-muted); }
.cw-holidays .cw-col-date { width: 12rem; }
.cw-add-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.5rem; }
.cw-add-form > div { flex: 0 1 auto; }
.cw-add-form > .cw-grow { flex: 1 1 12rem; }
.cw-vac-scroll { max-height: 28rem; overflow-y: auto; }
.cw-vac-scroll thead th { position: sticky; top: 0; z-index: 1; background: var(--atlas-surface); }
/* Phone width: each member or holiday row becomes a block; the day names and field names show next to the inputs */
@media (max-width: 767.98px) {
  .cw-stack, .cw-stack tbody { display: block; width: 100%; }
  .cw-stack thead { display: none; }
  .cw-stack tr { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.5rem; padding: 0.75rem 0; border-bottom: 1px solid var(--atlas-border); }
  .cw-stack tr:last-child { border-bottom: 0; }
  .cw-stack th, .cw-stack td { display: block; padding: 0; border: 0; width: auto; min-width: 0; background: transparent; }
  .cw-stack .cw-member { flex: 1 0 100%; }
  .cw-stack .cw-col-hours { flex: 1 0 100%; }
  .cw-stack .cw-col-hours .form-control { max-width: 8rem; }
  .cw-stack .cw-col-day { width: auto; }
  .cw-stack .cw-col-date, .cw-stack .cw-col-date + td { flex: 1 1 100%; width: auto; }
  .cw-day-name, .cw-stack-label { display: block; }
  .cw-add-form > div, .cw-add-form > .cw-grow { flex: 1 1 100%; }
}
/* PM copy settings */
.pmc-source { flex: 0 1 22rem; min-width: 12rem; }
.pmc-group { margin-bottom: 0.75rem; }
.pmc-chips { display: flex; flex-wrap: wrap; gap: 0.25rem; margin: 0.375rem 0 0 1.5rem; padding: 0; list-style: none; }

/* ── T-0177c (06; the user, 2026-11-20): Sales opportunity screens ──
   Tokens: --sales-amount (bold money), --sales-deal-* (deal type badges). AA (4.5:1) checked in light, blue and dark
   (D:/nodejs/.tmp/t0177c-06/contrast.mjs). The soft grey, borderless panel (.sales-soft, .sales-filter-bar) is the
   --atlas-status-row-bg of the issue status row. */
[data-bs-theme='light'],
[data-bs-theme='blue'] {
  --sales-amount: #216e4e;
  --sales-deal-new-bg: #dcfff1;
  --sales-deal-new-fg: #164b35;
  --sales-deal-existing-bg: #e9f2ff;
  --sales-deal-existing-fg: #0055cc;
  --sales-deal-upsell-bg: #fff7d6;
  --sales-deal-upsell-fg: #533f04;
  --sales-deal-other-bg: #f1f2f4;
  --sales-deal-other-fg: #44546f;
}
[data-bs-theme='dark'] {
  --sales-amount: #7ee2b8;
  --sales-deal-new-bg: #164b35;
  --sales-deal-new-fg: #baf3db;
  --sales-deal-existing-bg: #09326c;
  --sales-deal-existing-fg: #cce0ff;
  --sales-deal-upsell-bg: #533f04;
  --sales-deal-upsell-fg: #f8e6a0;
  --sales-deal-other-bg: #38414a;
  --sales-deal-other-fg: #dee4ea;
}
.sales-amount { font-weight: 700; color: var(--sales-amount); }
.sales-deal { font-weight: 600; }
.sales-deal-new-business { background: var(--sales-deal-new-bg); color: var(--sales-deal-new-fg); }
.sales-deal-existing-business { background: var(--sales-deal-existing-bg); color: var(--sales-deal-existing-fg); }
.sales-deal-upsell { background: var(--sales-deal-upsell-bg); color: var(--sales-deal-upsell-fg); }
.sales-deal-other { background: var(--sales-deal-other-bg); color: var(--sales-deal-other-fg); }
/* the grey, borderless panels: the filter bars of the list and the kanban, the Team panel of the detail page */
.surface.sales-filter-bar,
.surface.sales-soft { background: var(--atlas-status-row-bg); border-color: transparent; box-shadow: none; }
.sales-soft .border-bottom { border-color: rgba(var(--bs-emphasis-color-rgb, 0, 0, 0), 0.1) !important; }
.sales-filter-bar .sales-amount-input { width: 7rem; }
/* More filters (the user, 2026-11-20): each from/to range is one compact row with its label, sized to its content (the date
   presets group, app.js, is an .input-group, 100% wide by default); a range wraps only on a phone */
.sales-filter-bar .sales-range { display: inline-flex; align-items: center; gap: 0.5rem; flex-wrap: nowrap; }
.sales-filter-bar .sales-range label { white-space: nowrap; margin-bottom: 0; }
.sales-filter-bar .sales-range .input-group { width: auto; flex: 0 0 auto; }
.sales-filter-bar .sales-range .input-group > .form-control { width: 9.5rem; flex: 0 0 auto; }
@media (max-width: 575.98px) {
  .sales-filter-bar .sales-range { flex-wrap: wrap; }
}
/* the list: Customers / Projects style; the table box has no border (smart-table) */
.surface:has(> #opp-table .smart-table) { border: 0 !important; box-shadow: none !important; background: transparent; }
.sales-table .sales-check-col { width: 1%; padding-right: 0.25rem; }
.sales-avatars { display: inline-flex; align-items: center; }
.sales-avatars .avatar { box-shadow: 0 0 0 2px var(--atlas-surface); }
.sales-avatars .avatar + .avatar { margin-left: -0.3rem; }
/* the bulk bar: no border, a light accent tint, shown only while rows are ticked (app.js [data-opp-bulk]) */
.sales-bulk-bar { padding: 0.5rem 0.75rem; border: 0; border-radius: 0.5rem; background: color-mix(in srgb, var(--atlas-accent) 9%, var(--atlas-surface)); }
.sales-bulk-bar[hidden] { display: none !important; }
.sales-bulk-f, .sales-bulk-won, .sales-bulk-lost { display: none; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.sales-bulk-bar:has(#bulk-action option[value='owner']:checked) .when-owner,
.sales-bulk-bar:has(#bulk-action option[value='team']:checked) .when-team,
.sales-bulk-bar:has(#bulk-action option[value='stage']:checked) .when-stage,
.sales-bulk-bar:has(#bulk-stage option.kind-won:checked) .sales-bulk-won,
.sales-bulk-bar:has(#bulk-stage option.kind-lost:checked) .sales-bulk-lost { display: inline-flex; }
/* header drop-downs */
/* T-0275: one panel: the column list + "Save as a view" below it. Slice 1 rev (the user, 2026-11-24): "Columns and Layout" is a right
   off-canvas, 400 px on a desktop, the full width on a phone; the body scrolls, the footer (Apply) stays; each part is a .layout-sec */
:is(.sales-layout-panel, .list-layout-panel) { --bs-offcanvas-width: 400px; --bs-offcanvas-bg: var(--atlas-surface, var(--bs-body-bg)); --bs-offcanvas-color: var(--bs-body-color); --bs-offcanvas-border-color: var(--atlas-border, var(--bs-border-color)); }
:is(.sales-layout-panel, .list-layout-panel) .offcanvas-body { overscroll-behavior: contain; }
:is(.sales-layout-panel, .list-layout-panel) .layout-sec { padding: 1rem; }
:is(.sales-layout-panel, .list-layout-panel) .layout-sec + .layout-sec { border-top: 1px solid var(--atlas-border, var(--bs-border-color)); }
:is(.sales-layout-panel, .list-layout-panel) .layout-sec-h { font-size: 0.875rem; font-weight: 600; margin: 0 0 0.35rem; }
:is(.sales-layout-foot, .list-layout-foot) { flex: 0 0 auto; display: flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1rem; border-top: 1px solid var(--atlas-border, var(--bs-border-color)); background: var(--atlas-surface, var(--bs-body-bg)); }
@media (max-width: 575.98px) { :is(.sales-layout-panel, .list-layout-panel) { --bs-offcanvas-width: 100vw; } }
.col-order-row { display: flex; align-items: center; gap: 0.25rem; padding: 0.1rem 0.25rem; border-radius: 0.3rem; }
.col-order-row:hover { background: var(--bs-tertiary-bg); }
.col-order-row.is-dragging { opacity: 0.5; outline: 1px dashed var(--bs-border-color); }
.col-order-row .form-check { padding-left: 1.6rem; min-width: 0; }
/* T-0304 (DESIGN-T0287 14.6): the Analysis-by-lines switch, the Product line columns sub-heading; with JS the mode suffixes go (items of the other mode are hidden) */
.col-order-sub { font-size: 0.75rem; font-weight: 600; padding: 0.5rem 0.25rem 0.15rem; border-top: 1px solid var(--bs-border-color); margin-top: 0.35rem; }
.list-modes-on .col-mode-sfx { display: none; }
.list-mode-row .form-switch { padding-left: 2.5em; }
.col-grip { cursor: grab; color: var(--opp3-caption, var(--bs-secondary-color)); padding: 0 0.1rem; }
.col-move { padding: 0 0.15rem; line-height: 1; color: var(--bs-body-color); }
.col-move:focus-visible { outline: 2px solid var(--atlas-focus, var(--bs-primary)); }
/* the "?" of the share box opens under the whole row, inside the panel width */
:is(.sales-layout-panel, .list-layout-panel) .view-share-row { position: relative; }
:is(.sales-layout-panel, .list-layout-panel) .view-share-row .opp3-explain { position: static; }
:is(.sales-layout-panel, .list-layout-panel) .view-share-row .opp3-explain[open] > p { left: 0; right: 0; width: auto; top: 1.75rem; }
/* T-0275 slice 2 (DESIGN-T0275-group-by 4): the grouped table. T-0287 L1-FE (DESIGN-T0287 1.6): the opp-group-* rules renamed list-group-*
   (opp-grand-total -> list-grand-total, opp-total-note -> list-total-note) on the shared table class .list-table; the panel class has the
   neutral alias .list-layout-panel (and .list-layout-foot). Group bar above it; per group a header row (toggle) indented by level and a
   total line; a grand total. Theme tokens only (light, dark, blue). */
.list-group-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; padding: 0.35rem 0.5rem; margin-bottom: 0.5rem; border-radius: 0.5rem; background: var(--bs-tertiary-bg); }
.list-group-levels { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem; list-style: none; margin: 0; padding: 0; }
.list-group-levels > li { display: inline-flex; align-items: center; gap: 0.1rem; padding: 0 0 0 0.5rem; border: 1px solid var(--atlas-border, var(--bs-border-color)); border-radius: 1rem; background: var(--atlas-surface, var(--bs-body-bg)); font-size: 0.85rem; }
.list-group-levels > li + li::before { content: '\203A'; margin: 0 0.35rem 0 -0.15rem; color: var(--bs-body-color); }
.list-group-bar .btn-link { --bs-btn-color: var(--sales-link-strong, var(--bs-link-color)); --bs-btn-hover-color: var(--sales-link-strong, var(--bs-link-color)); }
.list-group-x { padding: 0.1rem 0.4rem; line-height: 1; }
:is(.sales-table, .list-table) tr[hidden] { display: none; }
/* T-0305 AC-2 (the user: "the grouped by row should have different color"): a group header row has its own background, a tint of the
   accent, strongest at level 1 and lighter per level (2, 3), with an accent bar at its left edge (a background layer: no layout change);
   data rows stay plain and the striped rows grey (.row-alt 3.5%), so a header never reads as a data row. Total rows: a neutral grey
   (not the accent), a top rule and bold label; the grand total darker with a 2 px rule. Text stays --bs-body-color (>= 4.5:1, measured in
   light, dark and blue). */
.list-table {
  --list-g-tint: var(--atlas-accent, var(--bs-primary));
  --list-g-base: var(--atlas-surface, var(--bs-body-bg));
  --list-g-h1: color-mix(in srgb, var(--list-g-tint) 22%, var(--list-g-base));
  --list-g-h2: color-mix(in srgb, var(--list-g-tint) 14%, var(--list-g-base));
  --list-g-h3: color-mix(in srgb, var(--list-g-tint) 8%, var(--list-g-base));
  --list-g-total: color-mix(in srgb, var(--bs-emphasis-color, #000) 10%, var(--list-g-base));
  --list-g-grand: color-mix(in srgb, var(--bs-emphasis-color, #000) 13%, var(--list-g-base));
}
.list-table tr.list-group-h > th { padding: 0.15rem 0.25rem; background-color: var(--list-g-h1); background-image: linear-gradient(to right, var(--list-g-tint) 0 4px, transparent 4px); border-top: 1px solid var(--atlas-border, var(--bs-border-color)); font-weight: 600; color: var(--bs-body-color); }
.list-table tr.list-group-l2 > th { background-color: var(--list-g-h2); background-image: linear-gradient(to right, color-mix(in srgb, var(--list-g-tint) 70%, transparent) 0 3px, transparent 3px); }
.list-table tr.list-group-l3 > th { background-color: var(--list-g-h3); background-image: linear-gradient(to right, color-mix(in srgb, var(--list-g-tint) 45%, transparent) 0 2px, transparent 2px); }
.list-group-toggle { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.2rem 0.4rem; font-weight: 600; color: var(--bs-body-color); text-align: left; }
.list-group-toggle:focus-visible { outline: 2px solid var(--atlas-focus, var(--bs-primary)); outline-offset: 1px; }
.list-group-chev { transition: transform 0.15s ease; }
.list-group-toggle[aria-expanded='false'] .list-group-chev { transform: rotate(-90deg); }
.list-group-k { font-weight: 400; color: var(--sales-muted-strong, var(--bs-body-color)); }
.list-group-n { display: inline-block; min-width: 1.5rem; padding: 0 0.4rem; border-radius: 1rem; background: var(--atlas-surface, var(--bs-body-bg)); border: 1px solid var(--atlas-border, var(--bs-border-color)); font-size: 0.75rem; text-align: center; }
.list-table tr.list-group-l2 > th { padding-left: 1.5rem; }
.list-table tr.list-group-l3 > th { padding-left: 2.75rem; }
.list-table tr.list-group-total > * { background: var(--list-g-total); border-top: 1px solid color-mix(in srgb, var(--bs-emphasis-color, #000) 30%, transparent); border-bottom: 1px solid var(--atlas-border, var(--bs-border-color)); font-size: 0.875rem; color: var(--bs-body-color); }
.list-table tr.list-group-total > th { font-weight: 600; }
.list-table tr.list-group-total-l2 > th { padding-left: 1.5rem; }
.list-table tr.list-group-total-l3 > th { padding-left: 2.75rem; }
.list-table tr.list-grand-total > * { background: var(--list-g-grand); border-top: 2px solid color-mix(in srgb, var(--bs-emphasis-color, #000) 45%, transparent); font-weight: 600; }
:is(.sales-table, .list-table) abbr[title] { text-decoration: none; cursor: help; }
.opp-ctx-menu { min-width: 12rem; }
.opp-ctx-menu .dropdown-item.disabled { color: var(--bs-body-color); opacity: 0.75; }
.opp-ctx-note { color: var(--bs-body-color); }
.list-total-note { color: var(--sales-muted-strong, var(--bs-body-color)); }
:is(.sales-layout-panel, .list-layout-panel) .list-group-lvl { min-width: 4rem; }
.sales-bulk-max { color: var(--bs-danger-text-emphasis, var(--bs-danger)); }
.sales-bulk-max[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .list-group-chev { transition: none; } }
/* T-0287 L1-FE (DESIGN-T0287 1.7, D-10): the light theme's link colour #0c66e4 is 4.16:1 on the shaded even row (.smart-table tr.row-alt);
   on every list on the shared list engine (.list-table) the links take the AA blue #0052cc, odd and even rows alike (light and blue
   themes; dark unchanged). T-0297: the other smart-table lists (Customers, Teams, ...) take the same rule. */
:root:not([data-bs-theme='dark']) :is(.list-table, .smart-table) { --bs-link-color: #0052cc; --bs-link-color-rgb: 0, 82, 204; }
/* the kanban: .board columns; the board scrolls sideways inside its own box at any width (AC-51) */
.sales-board { max-width: 100%; }
.sales-board:focus-visible { outline: 2px solid var(--atlas-focus); outline-offset: 2px; }
.sales-col-head { flex-direction: column; align-items: flex-start; gap: 0.25rem; }
.sales-col.kind-won { box-shadow: inset 0 3px 0 var(--bs-success); }
.sales-col.kind-lost { box-shadow: inset 0 3px 0 var(--bs-secondary-color); }
.sales-card.state-won { border-left: 3px solid var(--bs-success); cursor: default; }
.sales-card.state-lost { border-left: 3px solid var(--bs-secondary-color); cursor: default; }
.sales-card .card-title { overflow-wrap: anywhere; }
.sales-col-empty { border: 1px dashed var(--atlas-border); border-radius: 0.375rem; }
@media (max-width: 575.98px) {
  .sales-board .board-column { min-width: 240px; width: 240px; flex-basis: 240px; }
}
/* contrast on the grey panels and the shaded rows (axe, 3 themes): stronger link / outline colours */
[data-bs-theme='light'],
[data-bs-theme='blue'] { --sales-link-strong: #0050c0; --sales-muted-strong: #3d4a5c; }
[data-bs-theme='dark'] { --sales-link-strong: #85b8ff; --sales-muted-strong: #c7d1db; }
:is(.sales-filter-bar, .sales-soft) .btn-link { --bs-btn-color: var(--sales-link-strong); --bs-btn-hover-color: var(--sales-link-strong); --bs-btn-active-color: var(--sales-link-strong); }
:is(.sales-filter-bar, .sales-soft) .btn-outline-secondary { --bs-btn-color: var(--sales-muted-strong); --bs-btn-border-color: var(--sales-muted-strong); }
:is(.sales-filter-bar, .sales-soft) .btn-outline-primary { --bs-btn-color: var(--sales-link-strong); --bs-btn-border-color: var(--sales-link-strong); }
/* REV-T0177c-1 m7: Sales only (the Customers / Projects smart-tables keep their own key colour) */
.sales-table td.issue-key > a { color: var(--sales-link-strong, var(--bs-link-color)); }
/* n3 (AC-37): probability and weighted amount on the kanban cards, bold in the amount colour */
.sales-card-weighted .sales-amount { white-space: nowrap; }
/* the board is the scroll box of its visually hidden texts too (they must not widen the page, T-0177 D-2) */
.sales-board { position: relative; }
/* the Team panel's add form on one row; it wraps only when the column is very narrow */
.sales-team-person { flex: 1 1 9rem; min-width: 8rem; }
.sales-team-role { flex: 0 1 7.5rem; min-width: 6.5rem; }
.sales-team-add .btn { white-space: nowrap; }
.sales-table tbody a { color: var(--sales-link-strong); }
/* the user (2026-11-20): pill selectors (sales/_pill-select.ejs) for Lead source and Business unit, lead source pills in the list.
   Lead sources take one of 8 fixed pastel pairs by id (id % 8), like .bu-pill: dark text on a light tint, AA in every theme. */
.sales-pill { display: inline-flex; align-items: center; padding: 0.15rem 0.6rem; border-radius: 50rem; font-size: 0.8125rem; font-weight: 600; line-height: 1.4; white-space: nowrap; }
.ls-pill.ls-c0 { background: #dbeafe; color: #1e40af; }
.ls-pill.ls-c1 { background: #dcfce7; color: #166534; }
.ls-pill.ls-c2 { background: #fef3c7; color: #92400e; }
.ls-pill.ls-c3 { background: #ffe4e6; color: #9f1239; }
.ls-pill.ls-c4 { background: #ede9fe; color: #5b21b6; }
.ls-pill.ls-c5 { background: #ccfbf1; color: #115e59; }
.ls-pill.ls-c6 { background: #ffedd5; color: #9a3412; }
.ls-pill.ls-c7 { background: #e2e8f0; color: #334155; }
.sales-pill-toggle { min-height: calc(1.5em + 0.75rem + 2px); }
.sales-pill-toggle .sales-pill { font-size: 0.8125rem; }
.dropdown-menu.sales-pill-menu { min-width: 14rem; max-width: min(24rem, calc(100vw - 2rem)); }
.sales-pill-menu fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.sales-pill-opt { cursor: pointer; border: 2px solid transparent; }
.sales-pill-opt.sales-pill-none { background: var(--atlas-status-row-bg); color: var(--bs-body-color); font-weight: 500; }
.sales-pill-opt:hover { filter: brightness(0.96); }
.btn-check:checked + .sales-pill-opt { border-color: currentColor; }
.btn-check:checked + .sales-pill-opt::before { content: '\2713'; margin-right: 0.3rem; }
.btn-check:focus-visible + .sales-pill-opt { outline: 2px solid var(--atlas-focus); outline-offset: 2px; }
/* the kanban: product chips on the cards, the summary above the board */
.sales-card-products { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-top: 0.25rem; }
.sales-chip { display: inline-block; max-width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 0.45rem; border-radius: 0.3rem; font-size: 0.75rem; line-height: 1.5; background: var(--atlas-status-row-bg); color: var(--sales-muted-strong, var(--bs-body-color)); }
.sales-board-summary { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; align-items: baseline; }
.sales-board-summary .sales-sum-main { font-size: 1.35rem; }
.sales-board-summary .sales-sum-all { flex-basis: 100%; }
/* the list's Stage column (first, the user 2026-11-20): wider, smaller text, one line; ellipsis + title on a narrow screen */
.sales-table .sales-stage-th { min-width: 11rem; }
.sales-table .sales-stage-cell { min-width: 11rem; max-width: 16rem; }
.sales-stage-badge.sales-stage-compact { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; font-size: 0.75rem; font-weight: 600; }
@media (max-width: 575.98px) {
  .sales-table .sales-stage-th, .sales-table .sales-stage-cell { min-width: 7.5rem; max-width: 9rem; }
}
/* the Team tab (the user, 2026-11-20): "Add person" borderless, member rows avatar | name over "email, role" (same font) | edit, remove */
.sales-btn-borderless { border: 0; padding: 0.15rem 0.4rem; }
.sales-member { display: flex; align-items: flex-start; gap: 0.6rem; padding: 0.5rem 0; border-bottom: 1px solid rgba(var(--bs-emphasis-color-rgb, 0, 0, 0), 0.1); }
.sales-member:last-child { border-bottom: 0; }
.sales-member-name { font-weight: 600; overflow-wrap: anywhere; }
.sales-member-meta { color: var(--sales-muted-strong, var(--bs-secondary-color)); overflow-wrap: anywhere; }
.sales-icon-btn { padding: 0.1rem 0.35rem; line-height: 1; }
/* in-place fields of the view (sales/_inline-field.ejs, the T-0184 pattern) */
.sales-ie-name { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; margin-bottom: 0.5rem; }
.sales-ie-name .sales-ie-form .form-control { min-width: min(20rem, 100%); }
.sales-ie .sales-ie-form { margin-top: 0.25rem; }
.sales-ie .sales-pill-select { min-width: 10rem; }
/* T-0177c (the user, 2026-11-20): the reusable file uploader (partials/file-drop.ejs, app.js [data-file-drop]). The zone is the file
   input's label; the input stays focusable (keyboard, screen readers) but is drawn by the zone; theme tokens only */
.file-drop { position: relative; margin-top: 0.5rem; }
.file-drop-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.file-drop-zone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.15rem; padding: 1rem 0.75rem; margin: 0; border: 2px dashed var(--atlas-border); border-radius: 0.6rem; background: var(--atlas-status-row-bg); color: var(--bs-body-color); text-align: center; cursor: pointer; transition: border-color 0.15s, background-color 0.15s; }
.file-drop-zone .bi { font-size: 1.6rem; color: var(--sales-link-strong, var(--bs-link-color)); }
.file-drop-text { font-weight: 600; font-size: 0.875rem; }
.file-drop-hint { font-size: 0.75rem; color: var(--sales-muted-strong, var(--bs-secondary-color)); }
.file-drop-zone:hover, .file-drop-zone.is-dragover { border-color: var(--sales-link-strong, var(--bs-link-color)); background: color-mix(in srgb, var(--atlas-accent) 10%, var(--atlas-status-row-bg)); }
.file-drop-input:focus-visible + .file-drop-zone { outline: 2px solid var(--atlas-focus); outline-offset: 2px; border-color: var(--sales-link-strong, var(--bs-link-color)); }
@media (prefers-reduced-motion: reduce) { .file-drop-zone { transition: none; } }
.file-drop-queue { margin: 0.5rem 0 0; display: grid; gap: 0.5rem; }
.file-drop-item { display: grid; gap: 0.3rem; padding: 0.5rem 0.6rem; border: 1px solid var(--atlas-border); border-radius: 0.5rem; background: var(--atlas-surface); }
.file-drop-item.is-error { border-color: var(--bs-danger); }
.file-drop-head { display: flex; align-items: center; gap: 0.5rem; min-width: 0; font-size: 0.875rem; }
.file-drop-name { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.file-drop-size { font-size: 0.75rem; color: var(--sales-muted-strong, var(--bs-secondary-color)); white-space: nowrap; }
.file-drop-progress { width: 100%; height: 0.4rem; accent-color: var(--sales-link-strong, var(--bs-primary)); }
.file-drop-status { font-size: 0.75rem; color: var(--sales-muted-strong, var(--bs-secondary-color)); }
.file-drop-item.is-error .file-drop-status { color: var(--bs-danger-text-emphasis); font-weight: 600; }
.file-drop-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-top: 0.5rem; }
.file-drop-js .file-drop-nojs { display: none; }
.file-drop:not(.file-drop-js) .file-drop-nojs { margin-top: 0.5rem; }
.sales-file { padding: 0.35rem 0; border-bottom: 1px solid var(--atlas-border); }
.sales-file:last-child { border-bottom: 0; }
.sales-file-comment { color: var(--sales-muted-strong, var(--bs-secondary-color)); overflow-wrap: anywhere; }
/* the user (2026-11-20): one label / value grid for the Customer and Overview panels of the view, so their columns line up: two halves,
   each "label | value" with the same widths; at phone width the halves stack (one label / value column) */
.sales-kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1rem; row-gap: 0.35rem; }
.sales-kv-half { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 0.75rem; row-gap: 0.35rem; align-content: start; margin: 0; }
.sales-kv-half > dt { font-weight: 600; margin: 0; }
.sales-kv-half > dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 767.98px) {
  .sales-kv { grid-template-columns: minmax(0, 1fr); }
}
/* the opportunity's Team / Comments / Activity tabs on the grey panel (the user, 2026-11-20) */
.sales-tabs-panel .sales-tabs { border-bottom-color: rgba(var(--bs-emphasis-color-rgb, 0, 0, 0), 0.12); flex-wrap: wrap; }
.sales-tabs-panel .sales-tabs .nav-link { color: var(--sales-link-strong); padding: 0.4rem 0.75rem; }
.sales-tabs-panel .sales-tabs .nav-link.active { color: var(--bs-body-color); background: var(--atlas-surface); border-color: rgba(var(--bs-emphasis-color-rgb, 0, 0, 0), 0.12) rgba(var(--bs-emphasis-color-rgb, 0, 0, 0), 0.12) var(--atlas-surface); }
.sales-tabs-panel .tab-pane:focus-visible { outline: 2px solid var(--atlas-focus); outline-offset: 2px; }
.sales-tabs-panel .sales-comments .comment { background: var(--atlas-surface); margin: 0 0 0.75rem; padding: 0.6rem 0.75rem; }
/* ── end T-0177c ── */

/* ── T-0214 (the user, 2026-11-20): the Setup tab: generic entities as flat links with a small "Add" menu above them; the access
   level of the administration links in muted brackets (on the active link it takes the link's own colour) ── */
/* muted = the sidebar text mixed 80 % into the sidebar background: AA in light (5.2:1), dark and blue (the blue sidebar is dark) */
.atlas-sidebar .nav-access { font-size: 0.8em; color: color-mix(in srgb, var(--atlas-sidebar-fg) 80%, var(--atlas-sidebar-bg)); white-space: nowrap; }
.atlas-sidebar .nav-link.active .nav-access { color: inherit; }
.atlas-sidebar .sidebar-setup-add { display: flex; justify-content: flex-end; margin-bottom: 0.15rem; }
.atlas-sidebar .nav-setup-add { border: 0; padding: 0.15rem 0.5rem; font-size: 0.8125rem; text-decoration: none; --bs-btn-color: var(--atlas-sidebar-fg); --bs-btn-hover-color: var(--atlas-sidebar-fg); --bs-btn-active-color: var(--atlas-sidebar-fg); }
/* ── end T-0214 ── */

/* ── T-0177c dd/mm/yyyy date field (partials/date-dmy.ejs, app.js [data-date-dmy]): a text input + calendar button, the calendar a
   non-modal popover of our own; theme tokens only; on a phone the calendar stays inside the screen ── */
.date-dmy { position: relative; }
.date-dmy.date-dmy-inline.input-group { width: auto; }
.date-dmy .date-dmy-text { min-width: 7.5rem; font-variant-numeric: tabular-nums; }
.date-dmy-btn { --bs-btn-color: var(--bs-body-color); }
/* T-0303: fixed, placed by app.js from the field's rect (top / left through the CSSOM), so a scrolling box around the field cannot clip it */
.date-dmy-pop { position: fixed; top: 0; left: 0; z-index: 1070; width: 17.5rem; max-width: calc(100vw - 2rem); overflow-y: auto; overscroll-behavior: contain; padding: 0.5rem; border: 1px solid var(--atlas-border); border-radius: 0.5rem; background: var(--atlas-surface); color: var(--bs-body-color); box-shadow: 0 0.5rem 1.5rem rgba(9, 30, 66, 0.25); }
.date-dmy-pop[hidden] { display: none; }
.date-dmy-head { display: flex; align-items: center; justify-content: space-between; gap: 0.25rem; margin-bottom: 0.25rem; }
.date-dmy-title { font-weight: 600; font-size: 0.875rem; }
.date-dmy-nav { --bs-btn-color: var(--bs-body-color); --bs-btn-hover-color: var(--bs-body-color); padding: 0.15rem 0.45rem; }
.date-dmy-grid { width: 100%; border-collapse: separate; border-spacing: 2px; table-layout: fixed; }
.date-dmy-grid th { font-size: 0.75rem; font-weight: 600; text-align: center; color: var(--sales-muted-strong, var(--bs-secondary-color)); padding: 0.15rem 0; }
.date-dmy-grid td { padding: 0; text-align: center; }
.date-dmy-day { width: 100%; height: 2rem; border: 2px solid transparent; border-radius: 0.35rem; background: transparent; color: inherit; font-size: 0.875rem; line-height: 1; }
.date-dmy-day:hover { background: var(--atlas-status-row-bg); }
.date-dmy-day[aria-current='date'] { font-weight: 700; text-decoration: underline; }
.date-dmy-day[aria-pressed='true'] { border-color: var(--atlas-focus); background: color-mix(in srgb, var(--atlas-accent) 18%, var(--atlas-surface)); font-weight: 700; }
.date-dmy-day:focus-visible { outline: 2px solid var(--atlas-focus); outline-offset: 1px; }
.date-dmy-foot { display: flex; justify-content: space-between; margin-top: 0.25rem; }
/* T-0225 (REV-T0225-1 M1): T-0189's quick dates above Today / Clear, one per line with its date on the right */
.date-dmy-quick { display: flex; flex-direction: column; margin-top: 0.25rem; padding-top: 0.25rem; border-top: 1px solid var(--atlas-border); }
.date-dmy-quick .date-dmy-q { display: flex; justify-content: space-between; gap: 0.5rem; padding: 0.2rem 0.5rem; text-align: left; text-decoration: none; }
.date-dmy-quick .date-dmy-q:hover, .date-dmy-quick .date-dmy-q:focus-visible { text-decoration: underline; background: var(--atlas-status-row-bg); }
.date-dmy-q-hint { color: var(--sales-muted-strong, var(--bs-secondary-color)); font-variant-numeric: tabular-nums; }
:is(.date-dmy-foot, .date-dmy-quick) .btn-link { --bs-btn-color: var(--sales-link-strong, var(--bs-link-color)); --bs-btn-hover-color: var(--sales-link-strong, var(--bs-link-color)); }
/* in the filter bar ranges the field keeps its compact width */
.sales-filter-bar .sales-range .date-dmy.input-group { width: auto; flex: 0 0 auto; }
.sales-filter-bar .sales-range .date-dmy .date-dmy-text { width: 7.6rem; flex: 0 0 auto; }
/* round 5: the "?" explainer of the adjusted expected revenue on the kanban summary (a details element, no JS) */
.sales-explain { position: relative; display: inline-block; }
.sales-explain > summary { list-style: none; display: inline-flex; align-items: center; justify-content: center; width: 1.1rem; height: 1.1rem; border: 1px solid currentColor; border-radius: 50%; font-size: 0.7rem; font-weight: 700; line-height: 1; cursor: pointer; }
.sales-explain > summary::-webkit-details-marker { display: none; }
.sales-explain > summary:focus-visible { outline: 2px solid var(--atlas-focus); outline-offset: 2px; }
.sales-explain-text { position: absolute; z-index: 1060; top: calc(100% + 0.3rem); left: 0; width: 16rem; max-width: calc(100vw - 2rem); margin: 0; padding: 0.5rem 0.6rem; border: 1px solid var(--atlas-border); border-radius: 0.4rem; background: var(--atlas-surface); color: var(--bs-body-color); font-size: 0.8rem; box-shadow: 0 0.4rem 1rem rgba(9, 30, 66, 0.2); }
/* D-4 (09, TR-T0177c-1): muted text on the grey Sales panels (Team, Comments, Tasks) uses the stronger muted colour (AA in the 3 themes) */
.sales-soft .text-muted-2 { color: var(--sales-muted-strong, var(--bs-secondary-color)) !important; }
/* ── end T-0177c dd/mm/yyyy date field ── */

/* ── T-0217 (the user, 2026-11-20): phases timeline scale and zoom (app.js [data-tl-zoom-root]). With JS every week column has the
   width --tl-col and the header texts are laid over their cells (they never widen a column, so the percent-placed bars stay under
   their dates); Months is a table of its own with month columns (c5); narrow columns get short labels; the scroll stays inside the
   timeline ── */
.tl-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.tl-toolbar[hidden] { display: none; }
.tl-toolbar .btn[aria-pressed='true'] { background: var(--bs-secondary-bg); color: var(--bs-emphasis-color); border-color: var(--bs-border-color); font-weight: 600; }
.phase-timeline-scroll:focus-visible { outline: 2px solid var(--atlas-focus); outline-offset: 2px; }
.tl-calendar.tl-zoomable .tl-week { width: var(--tl-col); min-width: var(--tl-col); max-width: var(--tl-col); position: relative; height: 2.6rem; overflow: hidden; }
.tl-calendar.tl-zoomable .tl-week .tl-wn,
.tl-calendar.tl-zoomable .tl-week .tl-wd { position: absolute; left: 0.15rem; right: 0.15rem; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.tl-calendar.tl-zoomable .tl-week .tl-wn { top: 0.3rem; }
.tl-calendar.tl-zoomable .tl-week .tl-wd { top: 1.35rem; }
.tl-calendar.tl-zoomable .tl-month { position: relative; height: 2rem; overflow: hidden; }
/* the month name is drawn over its cell (data-long / data-short set by app.js; the alt text "" keeps screen readers on the cell text) */
.tl-calendar.tl-zoomable .tl-month { font-size: 0; }
.tl-calendar.tl-zoomable .tl-month::before { content: attr(data-long); content: attr(data-long) / ""; position: absolute; left: 0.4rem; right: 0.2rem; top: 50%; transform: translateY(-50%); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; font-size: 0.85rem; }
/* narrow weeks: the week number only; narrow months: the short month name */
.tl-calendar.tl-zoomable.tl-cols-narrow .tl-week { height: 1.7rem; }
.tl-calendar.tl-zoomable.tl-cols-narrow .tl-week .tl-wd { display: none; }
.tl-calendar.tl-zoomable.tl-view-months.tl-cols-narrow .tl-month::before { content: attr(data-short); content: attr(data-short) / ""; }
/* REV-T0217-1 c5 (the user, 2026-11-21): Months is its own table, one column per calendar month, all --tl-col wide; the month names
   are laid over their cells (they never widen a column); the track lines are one per month (app.js: 100% / months) */
.tl-months-table[hidden] { display: none; }
.tl-months-table .tl-mcol { width: var(--tl-col, 7rem); min-width: var(--tl-col, 7rem); max-width: var(--tl-col, 7rem); position: relative; height: 2.2rem; overflow: hidden; padding: 0; border-left: 1px solid var(--bs-border-color); border-bottom: 1px solid var(--bs-border-color); }
.tl-months-table .tl-mcol > span { position: absolute; left: 0.4rem; right: 0.2rem; top: 50%; transform: translateY(-50%); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; font-size: 0.85rem; font-weight: 700; }
.tl-months-table .tl-mcol.tl-month-odd { background: var(--atlas-status-row-bg, rgba(0, 0, 0, 0.05)); }
.tl-months-table .tl-mcol.tl-month-even { background: rgba(var(--bs-primary-rgb), 0.07); }
.tl-months-table .tl-mcol-now { background: rgba(var(--bs-primary-rgb), 0.14) !important; }
.tl-months-table .tl-mcol-now > span { color: var(--sales-link-strong, var(--bs-primary)); }
.tl-months-table .tl-m-short { display: none; }
/* narrow month columns: the short name ("Sep ’26"); the long one stays for screen readers */
.tl-months-table.tl-cols-narrow .tl-m-short { display: block; }
.tl-months-table.tl-cols-narrow .tl-m-long { width: 1px; height: 1px; left: 0; right: auto; clip: rect(0 0 0 0); clip-path: inset(50%); }
/* a bar too short for its label shows the label beside it */
.tl-calendar .tl-bar.tl-label-out { overflow: visible; }
.tl-calendar .tl-bar.tl-label-out .tl-bar-label { position: absolute; left: 100%; margin-left: 0.25rem; color: var(--bs-body-color) !important; text-shadow: none !important; }
/* the today line stays visible at every width */
.tl-calendar.tl-zoomable .tl-today { width: 2px; opacity: 0.85; }
@media (max-width: 575.98px) {
  .tl-calendar .tl-name-col { min-width: 7.5rem; max-width: 9rem; }
}
@media (prefers-reduced-motion: reduce) { .phase-timeline-scroll { scroll-behavior: auto; } }
/* readable at every zoom in the 3 themes (axe): the current week's number in the strong link colour; in dark, deeper fills under
   the light labels (the progress fill starts under the label) */
.tl-calendar .tl-week-now .tl-wn { color: var(--sales-link-strong, var(--bs-primary)); }
[data-bs-theme='dark'] .tl-calendar .tl-bar.tl-tone-0 { --tl-fill: #1f5fbf; }
[data-bs-theme='dark'] .tl-calendar .tl-bar.tl-tone-1 { --tl-fill: #0b6b80; }
[data-bs-theme='dark'] .tl-calendar .tl-bar.tl-tone-2 { --tl-fill: #3b55c9; }
[data-bs-theme='dark'] .tl-calendar .tl-bar.tl-tone-3 { --tl-fill: #1864ab; }
[data-bs-theme='dark'] .tl-calendar .tl-bar.tl-tone-4 { --tl-fill: #5f3dc4; }
[data-bs-theme='dark'] .tl-calendar .tl-bar.tl-tone-5 { --tl-fill: #0b6b7a; }
[data-bs-theme='dark'] .tl-calendar .tl-bar .tl-bar-label.tl-label-on-fill { color: #fff; text-shadow: none; }
/* light and blue: a dark label of a bar under 50 % starts on the dark progress fill: it gets a chip in the bar's light tone */
:is([data-bs-theme='light'], [data-bs-theme='blue']) .tl-calendar .tl-bar:not(.tl-label-out) .tl-bar-label:not(.tl-label-on-fill) { background: var(--tl-bg); border-radius: 0.25rem; margin-left: 0.15rem; padding: 0 0.3rem; }
/* ── end T-0217 ── */

/* ── T-0177d (the user, 2026-11-20): Sales actions: the widget + Log action head, scheduled actions, the action form (date / time,
   status, participants), the Actions tab; overdue by colour + icon + text (AC-266) ── */
.sales-actions-head { display: flex; flex-wrap: wrap; align-items: stretch; gap: 0.5rem; margin-bottom: 0.6rem; }
.sales-actions-widget { display: grid; grid-template-columns: repeat(3, minmax(0, auto)); gap: 0; margin: 0; flex: 1 1 18rem; border-radius: 0.5rem; background: var(--atlas-surface); overflow: hidden; }
.sales-widget-tile { padding: 0.4rem 0.75rem; border-left: 1px solid var(--atlas-border); min-width: 0; }
.sales-widget-tile:first-child { border-left: 0; }
.sales-widget-tile dt { font-size: 0.72rem; font-weight: 600; color: var(--sales-muted-strong, var(--bs-secondary-color)); white-space: nowrap; }
.sales-widget-tile dd { margin: 0; font-size: 1.05rem; font-weight: 700; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sales-log-action { display: flex; }
.sales-log-action .sales-log-btn { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 600; }
.sales-next-action .bi { margin: 0 0.15rem; }
.sales-overdue { display: inline-flex; align-items: center; gap: 0.2rem; margin-left: 0.35rem; color: var(--bs-danger-text-emphasis); font-weight: 600; font-size: 0.8125rem; }
.sales-scheduled-item { display: flex; align-items: flex-start; gap: 0.5rem; padding: 0.4rem 0.5rem; border-radius: 0.4rem; background: var(--atlas-surface); margin-bottom: 0.35rem; }
.sales-scheduled-item.is-overdue { box-shadow: inset 3px 0 0 var(--bs-danger); }
.sales-scheduled-ico { margin-top: 0.15rem; }
/* the form */
.sales-datetime-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.sales-datetime-row .date-dmy { flex: 1 1 10rem; width: auto; }
.sales-datetime-row .sales-time { flex: 0 0 5.5rem; width: 5.5rem; font-variant-numeric: tabular-nums; }
.sales-status-pick .btn { min-width: 6.5rem; }
.sales-check-list { max-height: 9.5rem; overflow-y: auto; padding: 0.25rem 0.5rem; border: 1px solid var(--atlas-border); border-radius: 0.4rem; }
.sales-next-box > summary { cursor: pointer; }
.sales-next-box[hidden] { display: none; }
/* action entries of the Activity tab: status badges as subtle background + emphasis text (AA in the 3 themes) */
.sales-action-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.6rem; margin-top: 0.15rem; }
.sales-action-status { font-weight: 600; }
.sales-action-status.sales-action-scheduled { background: var(--bs-info-bg-subtle); color: var(--bs-info-text-emphasis); }
.sales-action-status.sales-action-in_progress { background: var(--bs-primary-bg-subtle); color: var(--bs-primary-text-emphasis); }
.sales-action-status.sales-action-completed { background: var(--bs-success-bg-subtle); color: var(--bs-success-text-emphasis); }
.sales-action-status.sales-action-cancelled { background: var(--bs-secondary-bg-subtle); color: var(--bs-secondary-text-emphasis); }
.sales-action-tools { display: inline-flex; flex-wrap: wrap; gap: 0.5rem; }
.sales-action-tools .btn-link { --bs-btn-color: var(--sales-link-strong, var(--bs-link-color)); font-size: inherit; }
/* red links and icons on the grey Sales panels keep AA (the plain danger red is too light there) */
.sales-soft .btn-link.text-danger, .sales-soft .text-danger.btn-link { color: var(--bs-danger-text-emphasis) !important; }
/* the Actions tab */
.sales-actions-table tr.is-overdue td:first-child { box-shadow: inset 3px 0 0 var(--bs-danger); }
@media (max-width: 575.98px) {
  .sales-actions-widget { grid-template-columns: repeat(3, minmax(0, 1fr)); flex-basis: 100%; }
  .sales-widget-tile { padding: 0.35rem 0.5rem; }
  .sales-widget-tile dd { font-size: 0.85rem; white-space: normal; overflow-wrap: anywhere; }
  .sales-log-action, .sales-log-action .sales-log-btn { width: 100%; justify-content: center; }
}
/* ── end T-0177d ── */

/* ── T-0215a (the user, 2026-11-21): Sales contacts screens: avatars (photo or initials), the two-column screen, the form ── */
.contact-avatar { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; border-radius: 50%; object-fit: cover; font-weight: 600; line-height: 1; }
.contact-avatar.contact-avatar-sm { width: 32px; height: 32px; min-width: 32px; font-size: 0.75rem; }
.contact-avatar.contact-avatar-md { width: 40px; height: 40px; min-width: 40px; font-size: 0.875rem; }
.contact-avatar.contact-avatar-lg { width: 96px; height: 96px; min-width: 96px; font-size: 2rem; }
.contact-avatar[hidden] { display: none; }
.contact-name-link { display: inline-flex; align-items: center; gap: 0.5rem; }
/* the list's links on the shaded (hover / striped) rows: the stronger Sales link colour (axe, 3 themes) */
.contacts-table tbody a { color: var(--sales-link-strong, var(--bs-link-color)); }
.contacts-table .contact-name-link { min-width: 10rem; }
.contacts-table a[href^="mailto:"], .contacts-table a[href^="tel:"] { white-space: nowrap; }
.contact-country-filter { max-width: 100%; min-width: 0; }
.contact-customer-filter { min-width: 11rem; }
.contact-head { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.contact-head h1 { font-size: 1.6rem; }
.contact-sub { color: var(--sales-muted-strong, var(--bs-secondary-color)); }
.contact-sub a { color: var(--sales-link-strong, var(--bs-link-color)); }
.contact-dl { display: grid; grid-template-columns: minmax(6.5rem, 32%) minmax(0, 1fr); gap: 0.4rem 0.75rem; margin: 0; }
.contact-dl > dt { font-weight: 600; margin: 0; }
.contact-dl > dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.contact-dl a { color: var(--sales-link-strong, var(--bs-link-color)); }
.contact-address { white-space: pre-line; }
.contact-age { color: var(--sales-muted-strong, var(--bs-secondary-color)); }
.contact-rows > li { padding: 0.4rem 0; border-bottom: 1px solid rgba(var(--bs-emphasis-color-rgb, 0, 0, 0), 0.1); }
.contact-rows > li:last-child { border-bottom: 0; }
.contact-rows a { color: var(--sales-link-strong, var(--bs-link-color)); }
.contact-photo-edit { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 1rem; }
.contact-sex-pick .btn { min-width: 6.5rem; }
.contact-socials .form-label .bi { margin-right: 0.15rem; }
@media (max-width: 575.98px) {
  .contact-head h1 { font-size: 1.35rem; }
  .contact-dl { grid-template-columns: minmax(0, 1fr); gap: 0.1rem; }
  .contact-dl > dd { margin-bottom: 0.4rem; }
  .contact-sex-pick { flex-wrap: nowrap; width: 100%; }
  .contact-sex-pick .btn { flex: 1 1 0; min-width: 0; padding-inline: 0.35rem; }
}
/* ── end T-0215a ── */

/* ── T-0215b (the user, 2026-11-21): contacts linked to customers: the customer Contacts panel, the search list, the modals ── */
.contacts-panel a:not(.btn):not(.dropdown-item) { color: var(--sales-link-strong, var(--bs-link-color)); }
/* the grey (tinted) panel: the stronger link colour for its link buttons (axe, 3 themes) */
.contacts-panel .btn-link { --bs-btn-color: var(--sales-link-strong, var(--bs-link-color)); --bs-btn-hover-color: var(--sales-link-strong, var(--bs-link-hover-color)); --bs-btn-active-color: var(--sales-link-strong, var(--bs-link-color)); }
.cp-rows > .cp-row { display: flex; align-items: flex-start; gap: 0.6rem; padding: 0.45rem 0; border-bottom: 1px solid rgba(var(--bs-emphasis-color-rgb, 0, 0, 0), 0.08); }
.cp-rows > .cp-row:last-child { border-bottom: 0; }
.cp-row .contact-avatar { margin-top: 0.1rem; }
.cp-reach { display: flex; flex-wrap: wrap; gap: 0 0.75rem; overflow-wrap: anywhere; }
.cp-row-menu { flex: 0 0 auto; }
.link-picker:empty { display: none; }
.link-picker { margin-top: 0.35rem; }
.link-picker-list { display: flex; flex-direction: column; max-height: 18rem; overflow-y: auto; border: 1px solid var(--bs-border-color); border-radius: var(--bs-border-radius); background: var(--bs-body-bg); }
.link-picker-item { display: flex; align-items: center; gap: 0.6rem; width: 100%; padding: 0.45rem 0.6rem; border: 0; border-bottom: 1px solid var(--bs-border-color-translucent); background: transparent; color: var(--bs-body-color); text-align: start; font-size: 0.875rem; }
.link-picker-item:last-child { border-bottom: 0; }
.link-picker-item:hover:not([disabled]), .link-picker-item:focus-visible { background: var(--bs-tertiary-bg); outline: 2px solid var(--atlas-focus, var(--bs-primary)); outline-offset: -2px; }
.link-picker-item[disabled] { cursor: not-allowed; color: var(--bs-secondary-color); }
.link-picker-text { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.link-picker-sub { font-size: 0.8rem; color: var(--bs-secondary-color); }
.link-picker-icon { font-size: 1.1rem; color: var(--bs-secondary-color); }
.link-picker-note { padding: 0.35rem 0.1rem 0; }
.link-picker-create { padding-left: 0.1rem; padding-right: 0.1rem; }
.contact-modal-form .row > [class*='col-'] > .h6 { margin-bottom: 0.75rem; }
/* the modal's Personal column is narrow: birth date and sex one under the other */
.contact-modal-form .col-lg-5 .row > .col-sm-6 { flex: 0 0 100%; max-width: 100%; }
/* ── end T-0215b ── */

/* ── T-0211 (the user, 2026-11-21): Create chooser: type panels with workspace cards, a separate Sales panel; the Log action chooser ── */
.create-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (min-width: 1200px) { .create-layout.has-sales:not(.sales-only) { grid-template-columns: minmax(0, 1fr) minmax(18rem, 24rem); } }
.create-types { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.create-panel { min-width: 0; }
.create-panel-h { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font-size: 1.1rem; margin-bottom: 0.85rem; }
.create-panel-sub { font-size: 0.875rem; font-weight: 400; color: var(--sales-muted-strong, var(--bs-secondary-color)); }
.create-panel-sub::before { content: '·'; margin-right: 0.5rem; }
.create-type-icon { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 0.5rem; background: var(--bs-tertiary-bg); color: var(--bs-emphasis-color); font-size: 1rem; }
.create-grid, .create-actions { list-style: none; margin: 0; padding: 0; }
.create-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0.6rem; }
.create-card { display: flex; align-items: center; gap: 0.65rem; height: 100%; padding: 0.65rem 0.75rem; border: 1px solid var(--bs-border-color); border-radius: var(--bs-border-radius-lg); background: var(--bs-body-bg); color: var(--bs-body-color); text-decoration: none; transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease; }
.create-card:hover { border-color: var(--sales-link-strong, var(--bs-link-color)); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); color: var(--bs-body-color); }
.create-card:focus-visible, .create-action:focus-visible, .log-chooser-row:focus-visible { outline: 2px solid var(--atlas-focus, var(--bs-primary)); outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) { .create-card:hover { transform: translateY(-1px); } }
.create-ws-badge { flex: 0 0 auto; width: 2.25rem; height: 2.25rem; font-size: 0.8rem; }
.create-card-text { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.create-card-name { font-weight: 600; overflow-wrap: anywhere; }
.create-card-key { font-family: var(--bs-font-monospace); font-size: 0.75rem; color: var(--sales-muted-strong, var(--bs-secondary-color)); }
.create-star { color: #b07d00; flex: 0 0 auto; }
[data-bs-theme='dark'] .create-star { color: #ffd257; }
.create-card-go { flex: 0 0 auto; color: var(--sales-muted-strong, var(--bs-secondary-color)); }
.create-card:hover .create-card-go { color: var(--sales-link-strong, var(--bs-link-color)); }
/* the Sales panel: its own surface (the Sales grey), set apart from the type panels */
.create-sales { background: var(--atlas-status-row-bg, var(--bs-tertiary-bg)) !important; border-left: 4px solid var(--bs-success); }
.create-type-sales { background: var(--bs-success); color: #fff; }
.create-sales-group + .create-sales-group { margin-top: 0.9rem; padding-top: 0.9rem; border-top: 1px solid rgba(var(--bs-emphasis-color-rgb, 0, 0, 0), 0.1); }
.create-sales-ws { display: flex; align-items: center; gap: 0.5rem; min-width: 0; margin-bottom: 0.5rem; }
.create-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.create-action { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.4rem 0.75rem; border: 1px solid var(--sales-link-strong, var(--bs-link-color)); border-radius: 999px; background: var(--bs-body-bg); color: var(--sales-link-strong, var(--bs-link-color)); font-size: 0.875rem; font-weight: 500; text-decoration: none; }
.create-action:hover { background: var(--sales-link-strong, var(--bs-link-color)); color: #fff; }
.create-sales-contact { margin-top: 1rem; padding-top: 0.9rem; border-top: 1px solid rgba(var(--bs-emphasis-color-rgb, 0, 0, 0), 0.1); }
/* the Log action chooser */
.log-chooser-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--bs-border-color); border-radius: var(--bs-border-radius); }
.log-chooser-list > li + li { border-top: 1px solid var(--bs-border-color); }
.log-chooser-row { display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 0.75rem; color: var(--bs-body-color); text-decoration: none; }
.log-chooser-row:hover { background: var(--bs-tertiary-bg); color: var(--bs-body-color); }
.log-chooser-text { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; overflow-wrap: anywhere; }
.log-chooser-sub { font-size: 0.8rem; color: var(--bs-secondary-color); }
.log-chooser-go { color: var(--bs-secondary-color); }
@media (max-width: 575.98px) {
  .create-grid { grid-template-columns: minmax(0, 1fr); }
  .create-actions { flex-direction: column; }
  .create-action { justify-content: flex-start; }
}
/* ── end T-0211 ── */

/* ── T-0215c (the user, 2026-11-21): an opportunity's contacts row and picker ── */
.oc-rows > .oc-row { display: flex; align-items: flex-start; gap: 0.6rem; padding: 0.45rem 0; border-bottom: 1px solid rgba(var(--bs-emphasis-color-rgb, 0, 0, 0), 0.08); }
.oc-rows > .oc-row:last-child { border-bottom: 0; }
.oc-row .contact-avatar { margin-top: 0.1rem; }
.oc-row.is-legacy .fw-semibold { font-weight: 500 !important; }
.oc-reach { display: flex; flex-wrap: wrap; gap: 0 0.75rem; overflow-wrap: anywhere; }
.opp-contacts a:not(.btn):not(.dropdown-item) { color: var(--sales-link-strong, var(--bs-link-color)); }
.oc-menu { flex: 0 0 auto; }
.oc-menu .btn-link { color: var(--sales-link-strong, var(--bs-link-color)); }
.oc-add .link-picker-create { color: var(--sales-link-strong, var(--bs-link-color)); }
/* ── end T-0215c ── */

/* ── T-0177d2 (the user, 2026-11-21): email from an opportunity, the Sales task page and Tasks tab, Won → installation prompt ── */
.addr-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem; min-height: calc(1.5em + 0.5rem + 2px); height: auto; cursor: text; }
.addr-chips:focus-within { border-color: var(--bs-primary); box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.2); }
.addr-chips-input { flex: 1 1 10rem; min-width: 6rem; border: 0; outline: 0; background: transparent; color: var(--bs-body-color); padding: 0; }
.addr-chip { display: inline-flex; align-items: center; gap: 0.15rem; max-width: 100%; padding: 0 0.15rem 0 0.5rem; border-radius: 999px; background: var(--bs-secondary-bg); border: 1px solid var(--bs-border-color); font-size: 0.8125rem; line-height: 1.6; overflow-wrap: anywhere; }
.addr-chip.is-invalid { background: var(--bs-danger-bg-subtle); border-color: var(--bs-danger); color: var(--bs-danger-text-emphasis); }
.addr-chip-x { display: inline-flex; align-items: center; justify-content: center; width: 1.25rem; height: 1.25rem; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; }
.addr-chip-x:hover, .addr-chip-x:focus-visible { background: rgba(var(--bs-emphasis-color-rgb, 0, 0, 0), 0.12); }
.oe-line + .oe-line { margin-top: 0.35rem; }
.oe-file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 0.25rem 1rem; }
.inst-prompt { display: flex; gap: 0.9rem; align-items: flex-start; }
.inst-prompt-icon { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--bs-success-bg-subtle); color: var(--bs-success-text-emphasis); font-size: 1.2rem; }
.sales-task-head h1 { font-size: 1.5rem; }
.sales-task-opp a { color: var(--sales-link-strong, var(--bs-link-color)); }
.st-log-form { border-top: 1px solid rgba(var(--bs-emphasis-color-rgb, 0, 0, 0), 0.1); padding-top: 0.6rem; }
.sales-task-head + .row .sales-soft a:not(.btn) { color: var(--sales-link-strong, var(--bs-link-color)); }
.sales-tasks-table a { color: var(--sales-link-strong, var(--bs-link-color)); }
.tf-opp { width: 7rem; }
@media (max-width: 575.98px) {
  .oe-line { flex-wrap: wrap; }
  .inst-prompt { flex-direction: column; }
}
/* ── end T-0177d2 ── */

/* ── T-0209 (the user, 2026-11-21): delete an archived workspace (superadmins): the Danger zone and the delete preview ── */
.danger-zone { border: 1px solid var(--bs-danger-border-subtle, rgba(220, 53, 69, 0.5)) !important; border-left: 4px solid var(--bs-danger) !important; }
.wd-counts { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: 0.5rem; margin: 0; }
.wd-count { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; padding: 0.45rem 0.65rem; border: 1px solid var(--bs-border-color); border-radius: var(--bs-border-radius); }
.wd-count dt { font-weight: 400; margin: 0; min-width: 0; overflow-wrap: anywhere; }
.wd-count dd { font-weight: 700; margin: 0; font-variant-numeric: tabular-nums; }
.wd-count.is-zero dd { font-weight: 400; color: var(--bs-secondary-color); }
.wd-list { list-style: none; margin: 0; padding: 0; }
.wd-list > li { display: flex; justify-content: space-between; gap: 0.75rem; padding: 0.35rem 0; border-bottom: 1px solid var(--bs-border-color-translucent); overflow-wrap: anywhere; }
.wd-list > li:last-child { border-bottom: 0; }
.wd-n { font-weight: 600; font-variant-numeric: tabular-nums; }
.wd-traces { padding: 0.6rem 0.75rem; border-radius: var(--bs-border-radius); background: var(--bs-tertiary-bg); }
/* ── end T-0209 ── */

/* ── T-0210 (the user, 2026-11-21): grouped search: jump bar, groups, workspace sub-groups, result rows, exact-key notice ── */
.gs-notice { font-weight: 600; }
.gs-jump { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.6rem; margin-bottom: 1rem; }
.gs-jump-link { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.25rem 0.65rem; border: 1px solid var(--bs-border-color); border-radius: 999px; background: var(--bs-body-bg); color: var(--sales-link-strong, var(--bs-link-color)); font-size: 0.875rem; text-decoration: none; }
.gs-jump-link:hover { border-color: var(--sales-link-strong, var(--bs-link-color)); }
.gs-group { margin-bottom: 1rem; scroll-margin-top: 4.5rem; }
.gs-group-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.6rem; }
.gs-show-all { color: var(--sales-link-strong, var(--bs-link-color)); white-space: nowrap; }
.gs-sub + .gs-sub { margin-top: 0.9rem; }
.gs-sub-h { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; font-size: 0.95rem; font-weight: 600; margin: 0 0 0.35rem; }
.gs-sub-n { margin-left: auto; font-size: 0.8rem; font-weight: 400; color: var(--bs-secondary-color); }
.gs-star { color: #b07d00; }
[data-bs-theme='dark'] .gs-star { color: #ffd257; }
.gs-rows { list-style: none; margin: 0 0 0.4rem; padding: 0; border: 1px solid var(--bs-border-color); border-radius: var(--bs-border-radius); }
.gs-row + .gs-row { border-top: 1px solid var(--bs-border-color); }
.gs-row-link { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.3rem 1rem; padding: 0.5rem 0.75rem; color: var(--bs-body-color); text-decoration: none; }
.gs-row-link:hover { background: var(--bs-tertiary-bg); color: var(--bs-body-color); }
.gs-row-link:focus-visible { outline: 2px solid var(--atlas-focus, var(--bs-primary)); outline-offset: -2px; }
.gs-main { display: flex; align-items: baseline; gap: 0.5rem; min-width: 0; flex: 1 1 18rem; }
.gs-code { flex: 0 0 auto; }
.gs-name { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.gs-row-link:hover .gs-name { text-decoration: underline; }
.gs-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.6rem; font-size: 0.8125rem; }
.gs-owner { display: inline-flex; align-items: center; gap: 0.3rem; }
.gs-type { color: var(--bs-secondary-color); }
.gs-kb-icon { color: var(--bs-secondary-color); }
.gs-snippet { flex: 1 1 100%; font-size: 0.8125rem; color: var(--bs-secondary-color); overflow-wrap: anywhere; }
.gs-snippet mark { padding: 0 0.1rem; }
@media (max-width: 575.98px) {
  .gs-main { flex-basis: 100%; }
  .gs-sub-n { margin-left: 0; flex-basis: 100%; }
}
/* ── end T-0210 ── */

/* ── T-0177e (the user, 2026-11-21): Sales settings: pipelines and stages, required fields, Sales options, lists, automation ── */
.pl-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 0.6rem; }
.pl-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0.5rem; margin-bottom: 0.75rem; }
.pl-name-input { width: 14rem; max-width: 100%; }
.pl-delete > summary, .stage-edit > summary { list-style: none; }
.pl-delete > summary::-webkit-details-marker, .stage-edit > summary::-webkit-details-marker { display: none; }
.stage-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--bs-border-color); border-radius: var(--bs-border-radius); background: var(--bs-body-bg); }
.stage-row { padding: 0.45rem 0.65rem; }
.stage-row + .stage-row { border-top: 1px solid var(--bs-border-color); }
.stage-row.sortable-ghost { opacity: 0.4; }
.stage-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.75rem; }
.stage-grip { color: var(--bs-secondary-color); cursor: grab; }
.stage-grip.is-fixed { cursor: default; }
.stage-name { min-width: 0; overflow-wrap: anywhere; }
.stage-tools { margin-left: auto; display: inline-flex; }
.stage-tools .btn-link, .stage-edit > summary { color: var(--sales-link-strong, var(--bs-link-color)); }
.stage-edit[open] { margin-top: 0.4rem; padding: 0.6rem 0.75rem; border-radius: var(--bs-border-radius); background: var(--bs-tertiary-bg); }
.stage-prob { width: 6rem; }
.stage-required-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0.15rem 1rem; }
.req-api-badge { background: var(--bs-warning-bg-subtle); color: var(--bs-warning-text-emphasis); border: 1px solid var(--bs-warning-border-subtle); }
.ls-row { display: flex; align-items: flex-start; gap: 0.5rem; padding: 0.45rem 0; border-bottom: 1px solid rgba(var(--bs-emphasis-color-rgb, 0, 0, 0), 0.08); }
.ls-row:last-child { border-bottom: 0; }
.ls-row.is-inactive .ls-name { color: var(--bs-secondary-color); }
.ls-edit { flex: 1 1 auto; min-width: 0; }
.ls-fields { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.9rem; border: 0; margin: 0; padding: 0; }
.ls-name { width: 16rem; max-width: 100%; }
.ls-nodelete { color: var(--bs-secondary-color); padding: 0.25rem; }
.ar-task { padding: 0.65rem 0.75rem; border: 1px solid var(--bs-border-color); border-radius: var(--bs-border-radius); background: var(--bs-body-bg); margin-top: 0.75rem; }
.ar-remove .btn-link { padding: 0; }
.auto-all { border: 0; margin: 0; padding: 0; min-width: 0; }
/* contrast on the grey panels (axe, light and blue): darker danger text for messages and the outline Delete buttons */
:is(.so-form, .auto-all, .ls-rows, .pl-card) .invalid-feedback { color: var(--bs-danger-text-emphasis); }
.stage-edit .btn-outline-danger, .pl-delete .btn-outline-danger { --bs-btn-color: var(--bs-danger-text-emphasis); --bs-btn-border-color: var(--bs-danger-text-emphasis); }
.sp-roles { padding: 0.5rem 0.65rem; border-radius: var(--bs-border-radius); background: var(--bs-tertiary-bg); }
/* ── end T-0177e ── */

/* ── T-0177f (the user, 2026-11-21): Sales dashboard: layout, widget frame, tiles, funnel, donuts, heat map, deal tracker, leaderboard ── */
:root, [data-bs-theme='light'] {
  --stg-0: #c1c7d0; --stg-1: #e774bb; --stg-2: #f38a3f; --stg-3: #e2b203; --stg-4: #4bce97; --stg-5: #579dff; --stg-6: #9f8fef; --stg-7: #22a06b;
  --hm-0: #eef0f2; --hm-1: #c6e6d2; --hm-2: #8fd1a8; --hm-3: #4fb27c; --hm-4: #22874f; --hm-5: #0f5c33;
}
[data-bs-theme='dark'] {
  --stg-0: #9aa5b3; /* the other stage colours stay as in light: the badges keep dark text readable on them */
  --hm-0: #2c333a; --hm-1: #1c4532; --hm-2: #216e4e; --hm-3: #2fa073; --hm-4: #4bce97; --hm-5: #94e3bf;
}
[data-bs-theme='blue'] { --hm-0: #e9eef7; }
.dash-tiles { margin-bottom: 1rem; }
/* the user (2026-11-23): the period dates in the filter row, before Reset filters */
.dash-period-dates { white-space: nowrap; }
/* T-0233 (the user, 2026-11-23), minimal (06 restyles): the "Opportunities at risk" tab: the tile full width, then 50 / 50 (one column on phones) */
.dash-risk-top { margin-bottom: 1rem; }
.dash-risk-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (min-width: 768px) { .dash-risk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* T-0234 (the user, 2026-11-23): the Team performance tab (workspace admins): two columns, 50 / 50 (one on phones), every widget on the usual grey
   panel (.dw). Server-drawn SVG bars: colours as tokens per theme (graphics need 3:1 on the panel, the text is HTML in the panel colours). */
.dash-team { --tb-track: rgba(33, 37, 41, 0.12); --tb-call: #0c66e4; --tb-meeting: #6e5dc6; --tb-email: #0e7490; --tb-demo: #b86e00; --tb-task: #626f86; --tb-good: #1f845a; --tb-warn: #b86e00; --tb-bad: #c9372c; --tb-ini: #0c4a9e;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-items: start; }
[data-bs-theme='dark'] .dash-team { --tb-track: rgba(230, 234, 238, 0.16); --tb-call: #579dff; --tb-meeting: #9f8fef; --tb-email: #5cc0d6; --tb-demo: #f5a14a; --tb-task: #9fadbc; --tb-good: #4bce97; --tb-warn: #f5cd47; --tb-bad: #f87168; --tb-ini: #0c4a9e; }
[data-bs-theme='blue'] .dash-team { --tb-track: rgba(18, 38, 63, 0.14); }
@media (min-width: 768px) { .dash-team { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dash-team-col { display: grid; gap: 1rem; min-width: 0; align-content: start; }
.dash-team .dw { height: auto; }
@media (prefers-reduced-motion: no-preference) { .dash-team [data-tb-pct] { transition: width 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), x 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); } }
/* 1. Deals won by sales person: name, then the track with the bar, the photo bullet at its end and the figure beside it */
.tw-list, .tp-bars, .tz-list { list-style: none; margin: 0; padding: 0; }
.tw-list { display: grid; gap: 0.25rem; }
.tw-list > li { overflow: hidden; }
.tw-row { display: grid; grid-template-columns: 7rem minmax(0, 1fr); align-items: center; gap: 0.5rem; text-decoration: none; color: var(--lb-fg); }
.tw-row:hover .tw-name, .tw-row:focus-visible .tw-name { text-decoration: underline; }
.tw-row:focus-visible, .tp-row:focus-visible, .tz-link:focus-visible { outline-offset: -2px; }
.tw-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--lb-fg); font-size: 0.9rem; }
.tw-svg { display: block; width: calc(100% - 16px); margin-left: 16px; height: 34px; overflow: visible; }
.tw-track { fill: var(--tb-track); }
.tw-bar { fill: var(--tb-call); }
.tw-ini-bg { fill: var(--tb-ini); }
.tw-ini { fill: #fff; font-size: 0.7rem; font-weight: 700; }
.tw-ring { stroke: var(--lb-panel); stroke-width: 2; }
.tw-val { fill: var(--lb-fg); font-size: 0.8125rem; font-weight: 600; }
@container dw (max-width: 420px) { .tw-row { grid-template-columns: minmax(0, 1fr); gap: 0; } .tw-svg { margin-top: -0.15rem; } }
/* 2. Actions by sales person: a block per person, a bar per action kind on one scale */
.tp-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.75rem; }
@container dw (min-width: 680px) { .tp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tp-block, .tz-card { background: var(--lb-card); border-radius: 0.75rem; padding: 0.7rem 0.8rem; box-shadow: var(--lb-shadow); color: var(--lb-fg); }
.tp-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.5rem; }
.tp-person { min-width: 0; font-weight: 600; }
.tp-total, .tp-none { color: var(--lb-muted); font-size: 0.8rem; white-space: nowrap; }
.tp-none { white-space: normal; }
.tp-bars { display: grid; gap: 0.3rem; }
.tp-row { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr) 2.4rem; align-items: center; gap: 0.5rem; text-decoration: none; }
.tp-row:hover .tp-type, .tp-row:focus-visible .tp-type { text-decoration: underline; }
.tp-type { color: var(--lb-muted); font-size: 0.82rem; }
.tp-n { color: var(--lb-fg); font-weight: 600; font-size: 0.85rem; text-align: right; }
.tp-svg { display: block; width: 100%; height: 14px; }
.tp-track { fill: var(--tb-track); }
.tp-k-call { fill: var(--tb-call); } .tp-k-meeting { fill: var(--tb-meeting); } .tp-k-email { fill: var(--tb-email); } .tp-k-demo { fill: var(--tb-demo); } .tp-k-task { fill: var(--tb-task); }
/* 3. Actions per won deal: a card per person, a progress bar against the team average (the marker line) */
.tz-list { display: grid; gap: 0.6rem; }
.tz-card { border-left: 4px solid var(--lb-edge); }
.tz-good { border-left-color: var(--tb-good); } .tz-warn { border-left-color: var(--tb-warn); } .tz-bad { border-left-color: var(--tb-bad); }
.tz-top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.45rem; }
.tz-person { min-width: 0; font-weight: 600; }
.tz-fig { display: flex; align-items: baseline; gap: 0.3rem; white-space: nowrap; }
.tz-num { font-size: 1.5rem; line-height: 1; }
.tz-unit { color: var(--lb-muted); font-size: 0.78rem; }
.tz-svg { display: block; width: 100%; height: 12px; overflow: visible; }
.tz-track { fill: var(--tb-track); }
.tz-bar-good { fill: var(--tb-good); } .tz-bar-warn { fill: var(--tb-warn); } .tz-bar-bad { fill: var(--tb-bad); } .tz-bar-none { fill: var(--tb-track); }
.tz-marker { fill: var(--lb-fg); }
.tz-sub { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 0.75rem; margin-top: 0.4rem; font-size: 0.8rem; }
.tz-status { color: var(--lb-fg); }
.tz-avg { color: var(--lb-fg); }
.tz-avg-line { display: inline-block; width: 2px; height: 1em; background: var(--lb-fg); vertical-align: -0.15em; }
/* T-0233 polish (06): the value-at-risk figure tile in the Key figures card style (white card, round icon, big figure) */
.dash-risk { --risk-ico: #b42318; --risk-track: rgba(33, 37, 41, 0.1); }
[data-bs-theme='dark'] .dash-risk { --risk-ico: #ff9a92; --risk-track: rgba(230, 234, 238, 0.14); }
[data-bs-theme='blue'] .dash-risk { --risk-ico: #a3261b; --risk-track: rgba(18, 38, 63, 0.12); }
.risk-tile { display: flex; align-items: center; gap: 0.9rem; padding: 0.9rem 1.1rem; border-radius: 1rem; background: var(--lb-card); box-shadow: var(--lb-shadow); color: var(--lb-fg); }
.risk-tile .kf-ico { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 3rem; height: 3rem; border-radius: 50%; background: color-mix(in srgb, var(--risk-ico) 16%, var(--lb-card)); color: var(--risk-ico); font-size: 1.5rem; }
.risk-tile-body { display: flex; flex-direction: column; min-width: 0; }
.risk-tile-value { font-size: 2rem; font-weight: 700; line-height: 1.1; overflow-wrap: anywhere; }
.risk-tile-sub { color: var(--lb-muted); font-size: 0.95rem; }
.risk-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.risk-bar-row { display: grid; grid-template-columns: minmax(0, 7rem) minmax(0, 1fr) 9.5rem; gap: 0.5rem; align-items: center; }
.risk-bar-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.risk-bar-value { text-align: right; white-space: nowrap; }
.risk-bar-svg { width: 100%; height: 1rem; display: block; border-radius: 0.25rem; background: var(--risk-track, rgba(0, 0, 0, 0.08)); }
.risk-bar { fill: #0c66e4; }
.risk-bar-0, .risk-bar-ok { fill: #22a06b; }
.risk-bar-1 { fill: #94c748; }
.risk-bar-2 { fill: #e56910; }
.risk-bar-3, .risk-bar-hot { fill: #c9372c; }
.risk-bar-ok { fill: #0c66e4; }
[data-bs-theme='dark'] .risk-bar-3, [data-bs-theme='dark'] .risk-bar-hot { fill: #f87168; }
[data-bs-theme='dark'] .risk-bar-ok { fill: #579dff; }
/* T-0233 polish: the widgets are containers, so the layout follows the widget width (half a column on a desktop, the full width on a phone) */
.dw { container: dw / inline-size; }
@container dw (max-width: 400px) {
  .risk-bar-row { grid-template-columns: minmax(0, 1fr) auto; }
  .risk-bar-label { grid-column: 1 / -1; }
  .risk-tile-value { font-size: 1.6rem; }
  .dw-rows-table thead th { white-space: normal; }
}
/* the lists: compact rows that fit half a column; the name is cut with an ellipsis (full name in title); the owner is the avatar only;
   lower-value columns go below 520px of widget width */
.dw-rows-table { font-size: 0.9rem; }
.dw-rows-table > :not(caption) > * > * { padding: 0.3rem 0.4rem; }
.dw-rows-table th.dw-col-name { width: 100%; max-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dw-rows-table .dw-col-name a { color: var(--lb-link); }
.dw-rows-table .dw-sub { overflow: hidden; text-overflow: ellipsis; }
.dw-rows-table td, .dw-rows-table thead th { white-space: nowrap; }
.dw-rows-table .dw-col-owner { width: 1%; padding-left: 0.2rem; padding-right: 0.2rem; text-align: center; }
.dw-owner { display: inline-flex; }
.dw-owner .text-truncate { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@container dw (max-width: 519.98px) { .dw-rows-table .dw-col-lo { display: none; } }
.dw-rows-wrap { overflow-x: auto; }
/* contrast on the red panel (AA in light, dark and blue): muted text, empty states and links in the panel colours */
.dw .text-muted-2, .dw .issue-key { color: var(--lb-muted) !important; }
.dw .dw-empty { color: var(--lb-fg); }
.dw a.dw-show-all, .dw .dw-info > summary { color: var(--lb-link); }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-items: start; }
.dash-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; min-width: 0; }
.dash-bottom { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; margin-top: 1rem; }
@media (min-width: 1200px) {
  .dash-grid { grid-template-columns: minmax(0, 2fr) minmax(18rem, 1fr); align-items: stretch; }
  .dash-main { grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; }
  .dash-main > .dash-slot { grid-column: 1 / -1; }
  .dash-main > .dash-donut-product, .dash-main > .dash-donut-source { grid-column: auto; }
  .dash-side { position: relative; min-height: 20rem; }
  .dash-side > .dash-slot { position: absolute; inset: 0; }
  .dash-side .dw { height: 100%; display: flex; flex-direction: column; }
  .dash-side .lb-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
}
@media (max-width: 1199.98px) {
  .dash-grid { display: flex; flex-direction: column; align-items: stretch; }
  .dash-main { display: contents; }
  .dash-main > .dash-slot { order: 3; }
  .dash-main > .dash-funnel { order: 1; }
  .dash-side { order: 2; }
  .dash-side .lb-scroll { max-height: 32rem; overflow-y: auto; }
}
.dash-slot, .dash-side { min-width: 0; }
.dw { height: 100%; min-width: 0; }
/* the user (2026-11-23): every Sales dashboard widget on the same usual grey panel as Sales people / Key figures / the heat map
   (--lb-panel: #f1f3f5 light, themed for dark and blue), no border; tables inside take the panel colour too */
.dash-grid .dw, .dash-tiles .dw, .dash-bottom .dw, .dw { background: var(--lb-panel) !important; border: 0 !important; color: var(--lb-fg); }
.dw .dw-title { color: var(--lb-fg); }
.dw .table { --bs-table-bg: transparent; --bs-table-color: var(--lb-fg); }
/* the user (2026-11-23): the "Opportunities at risk" tab: every widget on a semi-transparent red panel (danger widgets) */
.dash-risk .dw.dw { background: rgba(201, 55, 44, 0.1) !important; }
[data-bs-theme='dark'] .dash-risk .dw.dw { background: rgba(248, 113, 104, 0.14) !important; }
/* on the grey panel (axe): links in the panel link colour; unselected toggle buttons in the panel text colour */
.dw a:not(.btn):not(.lb-pill):not(.kpi-tile-link) { color: var(--lb-link); }
.dw .btn-outline-secondary { --bs-btn-color: var(--lb-fg); --bs-btn-border-color: var(--lb-muted); --bs-btn-hover-color: var(--lb-panel); --bs-btn-hover-bg: var(--lb-fg); --bs-btn-hover-border-color: var(--lb-fg); --bs-btn-active-color: var(--lb-panel); --bs-btn-active-bg: var(--lb-fg); --bs-btn-active-border-color: var(--lb-fg); }
.dw.dw-grey { background: var(--atlas-status-row-bg, var(--bs-tertiary-bg)) !important; border: 0 !important; }
/* the user, 2026-11-23: the Activity heat map's header and title sit on the panel background, with no border; the inner panel then
   drops its own border and background so it reads as one surface */
.dw.dw-heatmap { background: var(--hm-panel-bg) !important; border: 0 !important; color: var(--hm-panel-fg); }
.dw.dw-heatmap .dw-title { color: var(--hm-panel-fg); }
.dw.dw-heatmap .hm-panel { border: 0; background: transparent; padding: 0; }
.dw-head { display: flex; align-items: center; gap: 0.35rem; margin-bottom: 0.5rem; }
.dw-title { font-size: 1rem; font-weight: 600; margin: 0; }
.dw-tools { margin-left: auto; display: inline-flex; align-items: center; gap: 0.25rem; }
.dw-info { position: relative; }
.dw-info > summary { list-style: none; color: var(--sales-link-strong, var(--bs-link-color)); }
.dw-info > summary::-webkit-details-marker { display: none; }
.dw-info-text { position: absolute; z-index: 5; top: 100%; left: -6rem; width: min(18rem, calc(100vw - 2rem)); padding: 0.5rem 0.65rem; border: 1px solid var(--bs-border-color); border-radius: var(--bs-border-radius); background: var(--bs-body-bg); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12); }
.dw-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin-bottom: 0.6rem; }
.dw-empty { padding: 1.25rem 0.5rem; text-align: center; color: var(--bs-secondary-color); }
.dw-error { padding: 0.75rem; border-radius: var(--bs-border-radius); background: var(--bs-danger-bg-subtle); color: var(--bs-danger-text-emphasis); }
.dw-skeleton { height: 8rem; }
.dw-chart { position: relative; height: 16rem; }
.dw-table { margin-top: 0.25rem; }
.dw-show-all { display: inline-block; margin-top: 0.4rem; color: var(--sales-link-strong, var(--bs-link-color)); }
/* tiles */
.kpi-tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 0.6rem; }
.kpi-tile { position: relative; border: 1px solid var(--bs-border-color); border-radius: var(--bs-border-radius-lg); background: var(--bs-body-bg); }
.kpi-tile-link { display: flex; flex-direction: column; gap: 0.15rem; padding: 0.65rem 0.8rem; color: var(--bs-body-color); text-decoration: none; height: 100%; }
a.kpi-tile-link:hover { background: var(--bs-tertiary-bg); color: var(--bs-body-color); }
.kpi-tile-label { font-size: 0.8rem; color: var(--bs-secondary-color); }
.kpi-tile-value { font-size: 1.5rem; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kpi-tile-sub { font-size: 0.8rem; color: var(--bs-secondary-color); }
.kpi-tile-explain { position: absolute; top: 0.35rem; right: 0.45rem; }
.kpi-tile-explain > summary { list-style: none; color: var(--bs-secondary-color); }
.kpi-tile-explain[open] > p { position: absolute; z-index: 5; right: 0; width: 14rem; padding: 0.4rem 0.5rem; border: 1px solid var(--bs-border-color); border-radius: var(--bs-border-radius); background: var(--bs-body-bg); }
/* stage colours (funnel bars, deal tracker badges) */
.stg-c0 { fill: var(--stg-0); } .stg-c1 { fill: var(--stg-1); } .stg-c2 { fill: var(--stg-2); } .stg-c3 { fill: var(--stg-3); }
.stg-c4 { fill: var(--stg-4); } .stg-c5 { fill: var(--stg-5); } .stg-c6 { fill: var(--stg-6); } .stg-c7 { fill: var(--stg-7); }
.dt-badge { display: inline-block; padding: 0.05rem 0.5rem; border-radius: 999px; font-size: 0.78rem; font-weight: 600; color: #172b4d; background: var(--stg-0); }
.stg-b1 { background: var(--stg-1); } .stg-b2 { background: var(--stg-2); } .stg-b3 { background: var(--stg-3); } .stg-b4 { background: var(--stg-4); }
.stg-b5 { background: var(--stg-5); } .stg-b6 { background: var(--stg-6); } .stg-b7 { background: var(--stg-7); }
/* funnel */
.funnel-bands { list-style: none; margin: 0; padding: 0; }
.funnel-link { display: grid; grid-template-columns: minmax(6rem, 10rem) minmax(0, 1fr) minmax(7rem, auto); align-items: center; gap: 0.6rem; color: var(--bs-body-color); text-decoration: none; padding: 0.15rem 0.25rem; border-radius: var(--bs-border-radius); }
.funnel-link:hover { background: var(--bs-tertiary-bg); color: var(--bs-body-color); }
.funnel-name { font-size: 0.875rem; overflow-wrap: anywhere; }
.funnel-bar { width: 100%; height: 1.6rem; display: block; }
.funnel-figs { font-size: 0.8125rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.funnel-conv { display: block; text-align: center; font-size: 0.75rem; color: var(--bs-secondary-color); }
@media (max-width: 575.98px) { .funnel-link { grid-template-columns: minmax(0, 1fr); gap: 0.1rem; } }
/* the user (2026-11-23): the amCharts funnel demo look (server-drawn): centred slices, a lighter link between them, labels on the right */
.funnel-am .funnel-link { grid-template-columns: minmax(0, 1fr) minmax(9rem, 15rem); gap: 1rem; padding: 0; align-items: start; }
.funnel-am .funnel-link:hover { background: transparent; }
.funnel-am .funnel-link:hover .funnel-shape rect { filter: brightness(0.92); }
.funnel-am .funnel-link:focus-visible { outline: 2px solid var(--bs-focus-ring-color, #0a559c); outline-offset: 2px; }
.funnel-shape { width: 100%; height: 3.6rem; display: block; overflow: visible; }
.funnel-shape.is-last { height: 2.4rem; }
.funnel-joint { opacity: 0.35; }
.funnel-label { display: flex; flex-direction: column; gap: 0.05rem; min-height: 2.4rem; justify-content: center; padding-top: 0.15rem; }
.funnel-am .funnel-name { font-weight: 600; display: inline-flex; align-items: center; gap: 0.4rem; }
.funnel-dot { width: 0.7rem; height: 0.7rem; border-radius: 0.2rem; flex: none; }
.funnel-dot.stg-b0 { background: var(--stg-0); }
/* the user (2026-11-23): the win step (last open stage) is green with a trophy; a darker green for the icon so it reads on the grey panel */
.funnel-trophy { color: #1f845a; font-size: 0.95rem; line-height: 1; }
[data-bs-theme='dark'] .funnel-trophy { color: #4bce97; }
/* the user (2026-11-23): the win label framed in semi-transparent green; the trophy also inside the win slice */
.funnel-label.is-win { border: 2px solid rgba(34, 160, 107, 0.45); background: rgba(34, 160, 107, 0.08); border-radius: 0.6rem; padding: 0.3rem 0.6rem; }
.funnel-shape-wrap { position: relative; display: block; min-width: 0; }
.funnel-slice-trophy { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: #ffffff; font-size: 1.15rem; line-height: 1; pointer-events: none; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35)); }
.funnel-am .funnel-figs { color: var(--bs-body-color); }
.funnel-am .funnel-conv { text-align: left; }
@media (max-width: 575.98px) { .funnel-am .funnel-link { grid-template-columns: minmax(0, 1fr) minmax(7rem, 9rem); gap: 0.5rem; } }
/* donuts */
.dw-donut { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.75rem; }
.dw-donut-chart { position: relative; height: 13rem; }
.dw-donut-centre { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 0; pointer-events: none; font-size: 0.8rem; color: var(--bs-secondary-color); }
.dw-donut-centre strong { font-size: 1.4rem; color: var(--bs-body-color); }
.dw-legend { border: 0; margin: 0; padding: 0; font-size: 0.8125rem; }
.dw-legend .form-check-input.dw-swatch:checked { background-color: var(--swatch, var(--bs-primary)); border-color: var(--swatch, var(--bs-primary)); }
.dw-legend-row a { color: var(--sales-link-strong, var(--bs-link-color)); }
/* heat map */
.hm-scroll { overflow-x: auto; max-width: 100%; }
.hm-grid { display: inline-flex; flex-direction: column; gap: 2px; min-width: 100%; }
.hm-head, .hm-row { display: grid; grid-template-columns: 14rem auto 7rem; align-items: center; gap: 0.5rem; }
.hm-label { min-width: 0; display: flex; align-items: center; gap: 0.3rem; font-size: 0.8125rem; white-space: nowrap; overflow: hidden; }
.hm-label a { color: var(--sales-link-strong, var(--bs-link-color)); overflow: hidden; text-overflow: ellipsis; }
.hm-wk { font-size: 9px; fill: var(--bs-secondary-color); }
.hm-l0 { fill: var(--hm-0); } .hm-l1 { fill: var(--hm-1); } .hm-l2 { fill: var(--hm-2); } .hm-l3 { fill: var(--hm-3); } .hm-l4 { fill: var(--hm-4); } .hm-l5 { fill: var(--hm-5); }
.hm-legend svg { vertical-align: middle; }
@media (max-width: 575.98px) { .hm-head, .hm-row { grid-template-columns: 9rem auto 6rem; } }
/* T-0229 (the user, 2026-11-23): Activity heat map: three tabs, taller, its own panel background (05 draft, restyled and signed by 06) */
/* the user, 2026-11-23: light theme on the app's cool grey palette (Bootstrap greys), no warm beige */
:root, [data-bs-theme='light'] { --hm-panel-bg: #f1f3f5; --hm-panel-fg: #212529; --hm-panel-muted: #495057; --hm-panel-link: #0a559c; --hm-panel-edge: #ced4da; --hm-panel-0: #e2e6ea; }
[data-bs-theme='dark'] { --hm-panel-bg: #12171c; --hm-panel-fg: #e6eaee; --hm-panel-muted: #aeb8c2; --hm-panel-link: #8fbaff; --hm-panel-edge: #3a444e; --hm-panel-0: #2c333a; }
[data-bs-theme='blue'] { --hm-panel-bg: #e3ecf8; --hm-panel-fg: #12263f; --hm-panel-muted: #3f5368; --hm-panel-link: #0a4d99; --hm-panel-edge: #aebfd8; --hm-panel-0: #cfdbec; }
.hm-tabs { margin: 0; padding: 0; border: 0; min-width: 0; }
/* 00 (axe on the e2e, 2026-11-23): the unchecked tabs on the grey panel take the panel text colour (Bootstrap secondary is 4.2:1 on #f1f3f5) */
.dw-heatmap .hm-tabs .btn-outline-secondary { --bs-btn-color: var(--hm-panel-fg); --bs-btn-border-color: var(--hm-panel-muted); --bs-btn-hover-color: var(--hm-panel-bg); --bs-btn-hover-bg: var(--hm-panel-fg); --bs-btn-hover-border-color: var(--hm-panel-fg); --bs-btn-active-color: var(--hm-panel-bg); --bs-btn-active-bg: var(--hm-panel-fg); --bs-btn-active-border-color: var(--hm-panel-fg); }
.hm-panel { --hm-0: var(--hm-panel-0); min-height: 24rem; padding: 0.75rem 0.85rem; border: 1px solid var(--hm-panel-edge); border-radius: var(--bs-border-radius-lg); background: var(--hm-panel-bg); color: var(--hm-panel-fg); }
.hm-panel .hm-scroll { max-height: 46rem; overflow-y: auto; }
.hm-panel .hm-grid { gap: 4px; }
.hm-panel :is(.hm-head, .hm-row) { grid-template-columns: 15rem auto 7rem; gap: 0.6rem; }
.hm-panel .hm-row { min-height: 1.75rem; }
/* the user, 2026-11-23: a closed opportunity on the heat map: semi-transparent green row (won) or red row (lost), plus a text badge
   (never colour alone). The sticky label keeps the same tint so the row reads as one band. */
.hm-row.hm-row-won, .hm-row.hm-row-won .hm-label { background-color: rgba(34, 160, 107, 0.14); }
.hm-row.hm-row-lost, .hm-row.hm-row-lost .hm-label { background-color: rgba(201, 55, 44, 0.12); }
.hm-row.hm-row-won, .hm-row.hm-row-lost { border-radius: 0.375rem; }
/* the user, 2026-11-23: the products of interest under the opportunity name (from its lines; at most 3 shown, "+n" for the rest) */
.hm-label:has(.hm-products) { flex-wrap: wrap; row-gap: 0; padding-block: 0.15rem; }
.hm-products { display: block; flex-basis: 100%; font-size: 0.72rem; color: var(--text-muted-2, var(--bs-secondary-color)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.hm-products .bi { font-size: 0.7rem; }
.hm-state { display: inline-block; padding: 0 0.4rem; border-radius: 1rem; font-size: 0.7rem; font-weight: 600; line-height: 1.4; vertical-align: 0.1em; }
.hm-state-won { color: var(--bs-success-text-emphasis); background-color: var(--bs-success-bg-subtle); border: 1px solid var(--bs-success-border-subtle); }
.hm-state-lost { color: var(--bs-danger-text-emphasis); background-color: var(--bs-danger-bg-subtle); border: 1px solid var(--bs-danger-border-subtle); }
.hm-panel .hm-label { font-size: 0.875rem; color: var(--hm-panel-fg); }
.hm-panel .hm-label a { color: var(--hm-panel-link); }
.hm-panel .hm-end, .hm-panel .hm-legend { color: var(--hm-panel-muted); }
.hm-panel .hm-end strong { color: var(--hm-panel-fg); }
.hm-panel .hm-wk { font-size: 11px; fill: var(--hm-panel-muted); }
.hm-panel .hm-cells rect, .hm-panel .hm-legend rect { stroke: var(--hm-panel-edge); stroke-width: 1; }
.hm-panel .hm-cells a:focus-visible { outline: none; }
.hm-panel .hm-cells a:focus-visible rect { stroke: var(--hm-panel-link); stroke-width: 2; }
@media (max-width: 575.98px) { .hm-panel :is(.hm-head, .hm-row) { grid-template-columns: 9rem auto 5rem; } }
.hm-panel .hm-label { position: sticky; left: 0; z-index: 1; background: var(--hm-panel-bg); padding-right: 0.3rem; }
.hm-panel .hm-cells a:hover rect { stroke: var(--hm-panel-link); }
/* deal tracker */
.dt-head th { background: var(--bs-tertiary-bg); }
.dt-toggle { padding: 0 0.25rem; color: var(--bs-body-color); }
.dt-toggle[aria-expanded='false'] .bi { transform: rotate(-90deg); }
.dt-table a { color: var(--sales-link-strong, var(--bs-link-color)); }
/* leaderboard */
/* T-0229 item 11 (the user's mockup, 2026-11-23): the Sales people widget: full width, a soft panel without a border, a header row with pill controls,
   one card per person (expanded by default, collapsible), six tinted stat tiles. Colours are tokens per theme (AA checked in light, dark and blue). */
:root, [data-bs-theme='light'] { --lb-panel: #f1f3f5; --lb-card: #ffffff; --lb-fg: #212529; --lb-muted: #495057; --lb-edge: #ced4da; --lb-shadow: 0 1px 4px rgba(20, 33, 61, 0.08); --lb-link: #0a559c; }
[data-bs-theme='dark'] { --lb-panel: #12171c; --lb-card: #1b2229; --lb-fg: #e6eaee; --lb-muted: #aeb8c2; --lb-edge: #3a444e; --lb-shadow: none; --lb-link: #8fbaff; }
[data-bs-theme='blue'] { --lb-panel: #e3ecf8; --lb-card: #f6f9fd; --lb-fg: #12263f; --lb-muted: #3f5368; --lb-edge: #aebfd8; --lb-shadow: 0 1px 4px rgba(18, 38, 63, 0.1); --lb-link: #0a4d99; }
:root, [data-bs-theme='light'], [data-bs-theme='blue'] { --lbc-opps: #0a559c; --lbc-value: #5e4db2; --lbc-won: #1a7a50; --lbc-calls: #a84a00; --lbc-demos: #a3366f; --lbc-actions: #0b6b7d; }
[data-bs-theme='dark'] { --lbc-opps: #7db3ff; --lbc-value: #b8acf6; --lbc-won: #4bce97; --lbc-calls: #f8a35a; --lbc-demos: #f797d2; --lbc-actions: #6cc3e0; }
.dash-grid.dash-grid-one { grid-template-columns: minmax(0, 1fr); }
.dw.dw-people { background: var(--lb-panel) !important; border: 0 !important; color: var(--lb-fg); }
.dw-people .dw-title, .dw-people .dw-info > summary { color: var(--lb-fg); }
.dw-people .dw-empty, .dw-people .dw-error { color: var(--lb-fg); }
.lb-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.65rem; margin-bottom: 0.85rem; }
.lb-head-ico { font-size: 1.5rem; line-height: 1; color: var(--lb-fg); }
.lb-title { font-size: 1.35rem; font-weight: 700; margin-right: 0.35rem; }
.lb-controls { display: contents; }
.lb-pillctl { display: inline-flex; align-items: center; gap: 0.45rem; min-height: 2.5rem; padding: 0.2rem 0.85rem; border: 1px solid var(--lb-edge); border-radius: 999px; background: var(--lb-card); color: var(--lb-fg); font-size: 0.95rem; }
.lb-pillctl > .bi { font-size: 1.05rem; color: var(--lb-muted); }
.lb-select { border: 0; background: transparent; color: inherit; font: inherit; padding: 0.2rem 0.1rem; cursor: pointer; max-width: 100%; }
.lb-select option { background: var(--lb-card); color: var(--lb-fg); }
.lb-pillctl:focus-within, .lb-dirbtn:focus-visible, .lb-refresh:focus-visible, .lb-chev:focus-visible { outline: 2px solid var(--lb-link); outline-offset: 2px; }
.lb-select:focus-visible { outline: none; }
.lb-dirbtn { cursor: pointer; padding-inline: 0.75rem; }
.lb-dirbtn[aria-pressed='true'] { border-color: var(--lb-link); }
.lb-group .form-check { display: inline-flex; align-items: center; gap: 0.5rem; margin: 0; padding-left: 0; min-height: 0; }
.lb-group .form-check-input { float: none; margin: 0; cursor: pointer; }
.lb-group .form-check-label { cursor: pointer; }
.lb-refresh { margin-left: auto; display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border: 0; border-radius: 50%; background: transparent; color: var(--lb-link); font-size: 1.4rem; line-height: 1; }
.lb-refresh:hover { background: color-mix(in srgb, var(--lb-link) 12%, transparent); }
.lb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.lb-group + .lb-group { margin-top: 1rem; }
.lb-group-h { font-size: 0.9rem; font-weight: 600; margin: 0 0 0.5rem; display: flex; flex-wrap: wrap; gap: 0.1rem 0.5rem; color: var(--lb-fg); }
.lb-group-h .text-muted-2 { color: var(--lb-muted) !important; }
.lb-card { padding: 1rem 1.15rem; border-radius: 1rem; background: var(--lb-card); box-shadow: var(--lb-shadow); }
.lb-top { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0.75rem; }
.lb-photo { flex: 0 0 auto; }
.lb-photo .avatar { width: 3.5rem; height: 3.5rem; font-size: 1.15rem; object-fit: cover; border-radius: 50%; }
.lb-photo > .text-truncate { display: none; } /* the bold name is printed beside the photo */
.lb-main { flex: 1 1 auto; min-width: 0; }
.lb-name { font-size: 1.15rem; line-height: 1.3; }
.lb-name a { color: var(--lb-fg); text-decoration: none; }
.lb-name a:hover { text-decoration: underline; }
.lb-sub, .lb-wl { color: var(--lb-muted); font-size: 0.95rem; }
.lb-pills { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.45rem; }
.lb-pill { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.2rem 0.75rem; border-radius: 999px; font-size: 0.9rem; text-decoration: none; background: color-mix(in srgb, var(--lb-fg) 8%, var(--lb-card)); color: var(--lb-muted); }
.lb-pill-won { background: color-mix(in srgb, var(--lbc-won) 16%, var(--lb-card)); color: #135c3b; }
[data-bs-theme='dark'] .lb-pill-won { color: var(--lbc-won); }
a.lb-pill:hover { text-decoration: underline; }
.lb-wl { display: none; }
.lb-right { flex: 0 0 auto; display: flex; align-items: center; gap: 0.75rem; margin-left: auto; }
.lb-ach { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.45rem 0.8rem; border-radius: 1.25rem; background: color-mix(in srgb, var(--lbc-won) 14%, var(--lb-card)); color: var(--lbc-won); }
.lb-ach > .bi { font-size: 1.3rem; line-height: 1; }
.lb-ach-txt { display: flex; flex-direction: column; line-height: 1.15; }
.lb-ach-pct { font-size: 1.35rem; font-weight: 700; }
.lb-ach-lbl { font-size: 0.8rem; color: var(--lb-muted); }
.lb-opp-pill { display: none; padding: 0.35rem 0.9rem; border-radius: 999px; background: color-mix(in srgb, var(--lb-fg) 9%, var(--lb-card)); color: var(--lb-fg); font-size: 0.95rem; white-space: nowrap; }
.lb-chev { display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; border: 0; border-radius: 50%; background: transparent; color: var(--lb-muted); font-size: 1.15rem; }
.lb-chev:hover { background: color-mix(in srgb, var(--lb-fg) 8%, transparent); color: var(--lb-fg); }
.lb-chev .bi { transition: transform 0.15s; }
.lb-chev[aria-expanded='false'] .bi { transform: rotate(180deg); }
.lb-card.is-collapsed .lb-pills, .lb-card.is-collapsed .lb-ach { display: none; }
.lb-card.is-collapsed .lb-wl { display: block; }
.lb-card.is-collapsed .lb-opp-pill { display: inline-block; }
.lb-card.is-collapsed .lb-right { align-self: center; }
.lb-stats { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; }
.lb-stats[hidden] { display: none; }
.lb-stat { --lbc: var(--lb-muted); min-width: 0; border-radius: 0.9rem; background: color-mix(in srgb, var(--lbc) 9%, var(--lb-card)); color: var(--lb-fg); }
.lb-stat-opps { --lbc: var(--lbc-opps); } .lb-stat-value { --lbc: var(--lbc-value); } .lb-stat-won { --lbc: var(--lbc-won); }
.lb-stat-calls { --lbc: var(--lbc-calls); } .lb-stat-demos { --lbc: var(--lbc-demos); } .lb-stat-actions { --lbc: var(--lbc-actions); }
.lb-stat-in { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: 'ico lbl' 'fig fig'; column-gap: 0.45rem; row-gap: 0.35rem; align-items: center; padding: 0.65rem 0.7rem; height: 100%; border-radius: inherit; color: inherit; text-decoration: none; }
a.lb-stat-in:hover, a.lb-stat-in:focus-visible { background: color-mix(in srgb, var(--lbc) 15%, var(--lb-card)); color: inherit; }
a.lb-stat-in:focus-visible { outline: 2px solid var(--lbc); outline-offset: 1px; }
.lb-stat-ico { grid-area: ico; display: inline-flex; align-items: center; justify-content: center; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: color-mix(in srgb, var(--lbc) 16%, var(--lb-card)); color: var(--lbc); font-size: 1.05rem; }
.lb-stat-lbl { grid-area: lbl; font-size: 0.9rem; color: var(--lb-muted); overflow-wrap: anywhere; }
.lb-stat-fig { grid-area: fig; font-size: 1.4rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.lb-stat-cur { font-size: 0.8rem; font-weight: 500; color: var(--lb-muted); }
/* T-0229-12 (the user, 2026-11-23): Key figures in the Sales people look: full width, panel without border, borderless cards with a tinted round icon.
   Scoped to .dw-tiles so Home "In numbers" and the AI chat keep their .kpi-tile look. */
:root, [data-bs-theme='light'], [data-bs-theme='blue'] { --lbc-lost: #b3261e; --lbc-overdue: #8a5300; }
[data-bs-theme='dark'] { --lbc-lost: #ff8f87; --lbc-overdue: #f5cd47; }
.dash-tiles, .dash-tiles > .dash-slot { width: 100%; min-width: 0; }
.dw-tiles { width: 100%; }
.dw-tiles .kpi-tiles { grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 0.75rem; }
.dw-tiles .kpi-tile { --lbc: var(--lb-muted); border: 0; border-radius: 1rem; background: var(--lb-card); box-shadow: var(--lb-shadow); color: var(--lb-fg); }
.dw-tiles .kpi-tile-won { --lbc: var(--lbc-won); } .dw-tiles .kpi-tile-lost { --lbc: var(--lbc-lost); } .dw-tiles .kpi-tile-open { --lbc: var(--lbc-opps); }
.dw-tiles .kpi-tile-weighted { --lbc: var(--lbc-value); } .dw-tiles .kpi-tile-adjusted { --lbc: var(--lbc-actions); } .dw-tiles .kpi-tile-win_rate { --lbc: var(--lbc-demos); }
.dw-tiles .kpi-tile-avg_deal { --lbc: var(--lbc-calls); } .dw-tiles .kpi-tile-cycle { --lbc: var(--lbc-opps); } .dw-tiles .kpi-tile-overdue { --lbc: var(--lbc-overdue); }
.dw-tiles .kpi-tile-link { gap: 0.3rem; padding: 0.85rem 1rem; border-radius: inherit; color: var(--lb-fg); }
.dw-tiles a.kpi-tile-link:hover, .dw-tiles a.kpi-tile-link:focus-visible { background: color-mix(in srgb, var(--lbc) 9%, var(--lb-card)); color: var(--lb-fg); }
.dw-tiles a.kpi-tile-link:focus-visible { outline: 2px solid var(--lbc); outline-offset: 1px; }
.dw-tiles .kf-ico { display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: color-mix(in srgb, var(--lbc) 16%, var(--lb-card)); color: var(--lbc); font-size: 1.1rem; margin-bottom: 0.15rem; }
.dw-tiles .kpi-tile-label, .dw-tiles .kpi-tile-sub { color: var(--lb-muted); font-size: 0.9rem; }
.dw-tiles .kpi-tile-value { color: var(--lb-fg); }
.dw-tiles .kpi-tile-explain { top: 0.6rem; right: 0.7rem; }
.dw-tiles .kpi-tile-explain > summary { color: var(--lb-muted); }
.dw-tiles .kpi-tile-explain > summary:focus-visible { outline: 2px solid var(--lb-link); outline-offset: 2px; border-radius: 50%; }
.dw-tiles .kpi-tile-explain[open] > p { top: 1.6rem; width: min(12rem, calc(100vw - 4rem)); border: 0; border-radius: 0.75rem; background: var(--lb-card); color: var(--lb-fg); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2); padding: 0.55rem 0.7rem; }
@media (max-width: 575.98px) {
  .lb-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
  .lb-card { padding: 0.8rem; }
  .lb-top { flex-wrap: wrap; }
  .lb-right { flex: 0 0 100%; justify-content: space-between; margin-left: 0; }
  .lb-stat-fig { font-size: 1.4rem; }
  .lb-title { font-size: 1.2rem; }
  .lb-refresh { margin-left: 0; }
}
/* ── end T-0177f ── */

/* ── T-0202bc (the user, 2026-11-21): Project Management: Log Work, the Work tab, tooltips, the Work logs split screen ── */
.btn-log-work { font-weight: 600; }
.lw-panel { padding: 0.75rem; border-radius: var(--bs-border-radius); background: var(--atlas-status-row-bg, var(--bs-tertiary-bg)); }
.lw-panel .btn-outline-secondary { --bs-btn-color: var(--bs-emphasis-color); --bs-btn-border-color: var(--bs-secondary-color); }
.lw-panel .invalid-feedback { color: var(--bs-danger-text-emphasis); }
/* T-0277 TR D-2: errors in the user screen dialogs (blue theme contrast 4.04:1 with the default danger colour) */
:is(#set-password-modal, #change-email-modal) .invalid-feedback { color: var(--bs-danger-text-emphasis); }
.project-inst-edit > summary { list-style: none; color: var(--sales-link-strong, var(--bs-link-color)); }
.project-inst-edit > summary::-webkit-details-marker { display: none; }
/* Work tab */
.wt-phases .wt-sub th { color: var(--bs-secondary-color); }
.wt-indent-1 { padding-left: 1rem; } .wt-indent-2 { padding-left: 2rem; } .wt-indent-3 { padding-left: 3rem; }
.wt-fig { font-variant-numeric: tabular-nums; }
.work-tip-btn { padding: 0 0.25rem; border: 0; border-bottom: 1px dashed currentColor; background: transparent; color: var(--sales-link-strong, var(--bs-link-color)); font-weight: 600; }
.work-tip-btn:focus-visible { outline: 2px solid var(--atlas-focus, var(--bs-primary)); outline-offset: 2px; }
.wt-bar-cell { width: 7rem; }
.wt-bar { width: 6rem; height: 0.4rem; display: block; }
.wt-bar-bg { fill: rgba(var(--bs-emphasis-color-rgb, 0, 0, 0), 0.12); }
.wt-bar-fg { fill: var(--bs-success); }
.wt-bar-fg.is-full { fill: var(--bs-success-text-emphasis); }
.work-tip { position: absolute; z-index: 1080; max-height: 60vh; overflow-y: auto; padding: 0.6rem 0.75rem; border: 1px solid var(--bs-border-color); border-radius: var(--bs-border-radius-lg); background: var(--bs-body-bg); color: var(--bs-body-color); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18); font-size: 0.875rem; }
.wtip-entry + .wtip-entry { margin-top: 0.45rem; padding-top: 0.45rem; border-top: 1px solid var(--bs-border-color-translucent); }
.wtip-hours { color: var(--bs-success-text-emphasis); white-space: nowrap; }
.wtip-desc { overflow-wrap: anywhere; }
.wtip-total { border-top: 1px solid var(--bs-border-color); padding-top: 0.35rem; text-align: right; }
/* Work logs */
.wl-modes { flex-wrap: wrap; gap: 0.25rem; }
.wl-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.wl-split.is-cal-collapsed { grid-template-columns: minmax(0, 3rem) minmax(0, 1fr); }
.wl-split.is-list-collapsed { grid-template-columns: minmax(0, 1fr) minmax(0, 3rem); }
.wl-split.is-cal-collapsed .wl-cal .wl-pane-body, .wl-split.is-list-collapsed .wl-list .wl-pane-body { display: none; }
.wl-split.is-cal-collapsed .wl-cal h2, .wl-split.is-list-collapsed .wl-list h2 { writing-mode: vertical-rl; }
.wl-split.is-cal-collapsed .wl-cal .wl-pane-head, .wl-split.is-list-collapsed .wl-list .wl-pane-head { flex-direction: column-reverse; align-items: center; }
.wl-split.is-cal-collapsed .wl-cal .wl-toggle, .wl-split.is-list-collapsed .wl-list .wl-toggle { margin-left: 0; }
.wl-split.is-cal-collapsed .wl-cal, .wl-split.is-list-collapsed .wl-list { padding-left: 0.25rem; padding-right: 0.25rem; overflow: hidden; }
.wl-pane { min-width: 0; }
.wl-pane-head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.5rem; }
.wl-toggle { margin-left: auto; color: var(--sales-link-strong, var(--bs-link-color)); }
.wl-cal-nav { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; margin-bottom: 0.5rem; }
.wl-dow, .wl-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.wl-view-day .wl-days { grid-template-columns: minmax(0, 1fr); }
.wl-dow span { font-size: 0.7rem; text-align: center; color: var(--bs-secondary-color); }
.wl-day { min-height: 4.5rem; padding: 0.15rem 0.2rem; border-radius: 4px; background: var(--bs-tertiary-bg); display: flex; flex-direction: column; gap: 1px; min-width: 0; font-size: 0.72rem; }
.wl-day.is-out { background: transparent; border: 1px dashed var(--bs-border-color); }
.wl-day.is-today { outline: 2px solid var(--bs-primary); outline-offset: -2px; }
.wl-day.is-holiday { background: rgba(var(--bs-secondary-rgb), 0.28); }
.wl-day.is-vacation { background: var(--bs-danger-bg-subtle); }
.wl-day-n { font-weight: 600; }
.wl-flag { font-size: 0.65rem; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-flag-vacation { color: var(--bs-danger-text-emphasis); font-weight: 600; }
.wl-entry { display: flex; min-width: 0; padding: 0 0.2rem; border-radius: 3px; text-decoration: none; color: var(--bs-body-color); border-left: 3px solid var(--bs-secondary); background: var(--bs-body-bg); }
.wl-entry.wl-done { border-left-color: var(--bs-success); }
.wl-entry:hover { text-decoration: underline; color: var(--bs-body-color); }
.wl-more { color: var(--bs-secondary-color); }
.wl-key { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 2px; vertical-align: middle; margin-left: 0.5rem; background: var(--bs-secondary); }
.wl-key.wl-done { background: var(--bs-success); }
.wl-key-holiday { background: rgba(var(--bs-secondary-rgb), 0.4); }
.wl-key-vacation { background: var(--bs-danger-bg-subtle); border: 1px solid var(--bs-danger); }
.wl-row { display: flex; align-items: flex-start; gap: 0.6rem; padding: 0.45rem 0; border-bottom: 1px solid rgba(var(--bs-emphasis-color-rgb, 0, 0, 0), 0.08); }
.wl-row:last-child { border-bottom: 0; }
.wl-row a { color: var(--sales-link-strong, var(--bs-link-color)); }
@media (max-width: 767.98px) {
  .wl-split, .wl-split.is-cal-collapsed, .wl-split.is-list-collapsed { grid-template-columns: minmax(0, 1fr); }
  .wl-split.is-cal-collapsed .wl-cal h2, .wl-split.is-list-collapsed .wl-list h2 { writing-mode: horizontal-tb; }
  .wl-day { min-height: 3.2rem; }
}
/* ── end T-0202bc ── */
/* ── T-0202c-06 Work detail (pm/work-detail.ejs, H-T0202c-05-to-06-001 item A): the entry's fields, description and history ── */
.wd-header { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; }
.wd-title { overflow-wrap: anywhere; min-width: 0; }
.wd-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-left: auto; }
.wd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(8rem, 100%), 1fr)); gap: 0.5rem 1rem; }
.wd-grid dt { font-size: 0.75rem; font-weight: 600; color: var(--bs-secondary-color); }
.wd-grid dd { margin-bottom: 0; overflow-wrap: anywhere; }
.wd-desc { white-space: pre-wrap; overflow-wrap: anywhere; }
.wd-done > summary { list-style: none; }
.wd-done > summary::-webkit-details-marker { display: none; }
.wd-history > li { padding: 0.5rem 0; border-bottom: 1px solid var(--atlas-border); overflow-wrap: anywhere; }
.wd-history > li:last-child { border-bottom: 0; }
.wd-old { text-decoration: line-through; color: var(--bs-secondary-color); }
/* ── end T-0202c-06 ── */

/* ── T-0202def (the user, 2026-11-21): PM Calendar, Heat map, Risk, AI planning, escalation ── */
:root, [data-bs-theme='light'], [data-bs-theme='blue'] {
  --hm-c0: #eef1f4; --hm-c1: #d6ecdf; --hm-c2: #b9e0c8; --hm-c3: #94d0ad; --hm-c4: #6fbe91; --hm-c5: #4aab77; --hm-c6: #2f945f; --hm-c7: #1f7a4c; --hm-c8: #15613b; --hm-c9: #0b4529;
  --hm-hol: #b8bfc8; --hm-vac: #e5484d; --pmc-hol-bg: #e9ecef; --pmc-vac-bg: #fde2e2;
}
[data-bs-theme='dark'] {
  --hm-c0: #2a3036; --hm-c1: #1d3a2b; --hm-c2: #1f4a33; --hm-c3: #215b3c; --hm-c4: #256e47; --hm-c5: #2b8454; --hm-c6: #349b62; --hm-c7: #46b475; --hm-c8: #6dcb93; --hm-c9: #a2e3bb;
  --hm-hol: #59616b; --hm-vac: #f07a7e; --pmc-hol-bg: #343a40; --pmc-vac-bg: #4a2224;
}
/* calendar */
.pmc-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin-bottom: 0.6rem; }
.pmc-title { margin: 0 0.4rem; }
.pmc-table th, .pmc-table td { white-space: nowrap; font-variant-numeric: tabular-nums; }
.pmc-person-h, .pmc-person { position: sticky; left: 0; z-index: 1; background: var(--bs-body-bg); min-width: 12rem; max-width: 16rem; }
.pmc-col { text-align: center; font-weight: 500; }
.pmc-col-l, .pmc-col-s { display: block; line-height: 1.1; }
.pmc-col-s { font-size: 0.7rem; color: var(--bs-secondary-color); font-weight: 400; }
.pmc-col.is-today { box-shadow: inset 0 -3px 0 var(--bs-primary); }
.pmc-cell { text-align: center; }
.pmc-table .pmc-holiday { background: var(--pmc-hol-bg); }
.pmc-table .pmc-vacation { background: var(--pmc-vac-bg); }
.pmc-table .pmc-dayoff { background-image: repeating-linear-gradient(135deg, transparent 0 4px, rgba(var(--bs-emphasis-color-rgb, 0, 0, 0), 0.08) 4px 6px); }
.pmc-fig { border-bottom: 0; }
.pmc-key { display: inline-block; width: 0.8rem; height: 0.8rem; border-radius: 2px; vertical-align: middle; margin-left: 0.4rem; border: 1px solid var(--bs-border-color); }
.pmc-key.pmc-holiday { background: var(--pmc-hol-bg); } .pmc-key.pmc-vacation { background: var(--pmc-vac-bg); }
.pmc-key.pmc-dayoff { background-image: repeating-linear-gradient(135deg, transparent 0 2px, rgba(var(--bs-emphasis-color-rgb, 0, 0, 0), 0.25) 2px 3px); }
/* heat map */
.pm-hm-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin-bottom: 0.6rem; }
.pm-hm-stats { display: flex; flex-wrap: wrap; align-items: stretch; gap: 0.4rem; margin: 0 0 0.6rem; }
.hm-stat { display: flex; gap: 0.4rem; align-items: baseline; padding: 0.2rem 0.6rem; border-radius: var(--bs-border-radius); background: var(--bs-tertiary-bg); }
.hm-stat dt { font-weight: 400; font-size: 0.8rem; color: var(--bs-secondary-color); margin: 0; }
.hm-stat dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.hm-stat-max { border-left: 4px solid var(--hm-c9); } .hm-stat-min { border-left: 4px solid var(--hm-c2); }
.hm-stat-med { border-left: 4px solid var(--hm-c5); } .hm-stat-avg { border-left: 4px solid var(--bs-primary); }
.hm-range { margin: -0.2rem 0 0.6rem; }
.ai-group, .ai-person-h { min-width: 0; overflow-wrap: anywhere; }
.pm-hm-scroll { overflow-x: auto; max-width: 100%; padding-bottom: 0.25rem; }
.pm-hm-svg { display: block; }
.hm-col-label { font-size: 11px; font-weight: 700; fill: var(--bs-body-color); }
.hm-month-label { font-size: 9px; fill: var(--bs-secondary-color); }
.hm-avg-bar, .hm-row-bar { fill: var(--bs-primary); opacity: 0.75; }
.hm-0 { fill: var(--hm-c0); } .hm-1 { fill: var(--hm-c1); } .hm-2 { fill: var(--hm-c2); } .hm-3 { fill: var(--hm-c3); } .hm-4 { fill: var(--hm-c4); }
.hm-5 { fill: var(--hm-c5); } .hm-6 { fill: var(--hm-c6); } .hm-7 { fill: var(--hm-c7); } .hm-8 { fill: var(--hm-c8); } .hm-9 { fill: var(--hm-c9); }
.hm-holiday { fill: var(--hm-hol); } .hm-vacation { fill: var(--hm-vac); } .hm-away { fill: var(--hm-vac); }
.hm-future { fill: transparent; stroke: var(--bs-border-color); stroke-width: 1; stroke-dasharray: 2 1; }
.pm-hm-legend svg { vertical-align: middle; }
.pm-hm-colrow th { background: var(--bs-tertiary-bg); }
/* risk */
.risk-head { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.6rem 0.8rem; border-radius: var(--bs-border-radius); }
.risk-head.is-risk { background: var(--bs-danger-bg-subtle); color: var(--bs-danger-text-emphasis); }
.risk-head.is-ok { background: var(--bs-success-bg-subtle); color: var(--bs-success-text-emphasis); }
.risk-head.is-none { background: var(--bs-secondary-bg); color: var(--bs-body-color); border: 1px solid var(--bs-border-color-translucent); }
.risk-head a, .risk-table a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.risk-level { font-weight: 600; white-space: nowrap; }
.risk-high { color: var(--bs-danger-text-emphasis); } .risk-medium { color: var(--bs-warning-text-emphasis); } .risk-ok { color: var(--bs-success-text-emphasis); }
/* AI */
.pm-ai-explain ol { padding-left: 1.1rem; }
.ai-risk-item + .ai-risk-item { margin-top: 0.6rem; padding-top: 0.6rem; border-top: 1px solid var(--bs-border-color-translucent); }
.ai-propose { margin: 0.75rem 0; }
.ai-prop-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem; padding: 0.35rem 0; border-bottom: 1px solid var(--bs-border-color-translucent); }
.ai-prop-row:last-child { border-bottom: 0; }
.ai-note-text { white-space: pre-line; overflow-wrap: anywhere; color: var(--bs-secondary-color); }
.ai-person { border: 0; margin: 0 0 0.75rem; padding: 0; min-width: 0; }
.ai-person-h { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font-size: 0.9rem; margin-bottom: 0.25rem; }
.ai-lines { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(15rem, 100%), 1fr)); gap: 0.25rem 1rem; }
.ai-line { display: flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; min-width: 0; }
.ai-line-l { display: inline-flex; gap: 0.4rem; min-width: 0; }
.ai-line-ph { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--bs-secondary-color); }
.ai-accept-bar { position: sticky; bottom: 0; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
/* escalation badge on Work rows */
.wt-esc { white-space: nowrap; }
/* ── end T-0202def ── */

/* T-0232: the Sales people multi-select (partials/people-filter) and the opportunity search (partials/opp-filter) */
.people-filter .multiselect-menu { min-width: 15rem; }
.people-filter .form-check-label { display: inline-flex; align-items: center; cursor: pointer; max-width: 100%; }
.people-filter .form-check-label .sales-person { max-width: 100%; }
.people-filter .people-filter-last-extra { border-bottom: 1px solid var(--atlas-border, var(--bs-border-color)); margin-bottom: 0.25rem; padding-bottom: 0.4rem !important; }
.opp-filter { display: inline-block; position: relative; }
.opp-filter .tf-opp { width: 11rem; }
.opp-filter .dropdown-menu { min-width: 16rem; max-height: 16rem; overflow-y: auto; }
.dw-controls .opp-filter .tf-opp, .dw-controls .people-filter { max-width: 100%; }
@media (max-width: 575.98px) { .opp-filter, .opp-filter .tf-opp { width: 100%; } }

/* T-0235 (the user, 2026-11-23): "Deals won by product suite" on the Overview: the bars with moving bullets of the Team tab (.tw-* rules above)
   with the same tokens (they are set on .dash-team there), a roomier name column for the suite's name, and the same move animation. */
.dw-won-by-suite { --tb-track: rgba(33, 37, 41, 0.12); --tb-call: #0c66e4; --tb-ini: #0c4a9e; }
[data-bs-theme='dark'] .dw-won-by-suite { --tb-track: rgba(230, 234, 238, 0.16); --tb-call: #579dff; --tb-ini: #0c4a9e; }
[data-bs-theme='blue'] .dw-won-by-suite { --tb-track: rgba(18, 38, 63, 0.14); }
.dw-won-by-suite .tw-row { grid-template-columns: 10rem minmax(0, 1fr); }
@container dw (max-width: 420px) { .dw-won-by-suite .tw-row { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: no-preference) { .dw-won-by-suite [data-tb-pct] { transition: width 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), x 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); } }
@media (min-width: 1200px) {
  .dash-main > .dash-donut-family, .dash-main > .dash-donut-product { grid-column: auto; }
  .dash-main > .dash-donut-source { grid-column: 1 / -1; }
}

/* T-0238: the owner select in place (Customer panel) and the Created section below Attachments */
.sales-ie-owner_id select { min-width: 12rem; max-width: 100%; }
.sales-created .date-dmy { min-width: 8.5rem; }

/* T-0237 (the user, 2026-11-23): the "Lost opportunities" tab: the list full width, then the two column charts 50 / 50 (stacked on phones), every
   widget on the usual grey panel (.dw). The column charts are server-drawn SVG after the amCharts demo "Columns with grainy gradients": the hues
   are theme tokens (--lc-t0..6 = the top of the gradient, --lc-b0..6 = the base; graphics need 3:1 on the panel, the figures are text). */
.dash-lost { --lc-t0: #3d83e8; --lc-b0: #0b5bd0; --lc-t1: #34a06f; --lc-b1: #1a7a52; --lc-t2: #c47d0a; --lc-b2: #a35c00; --lc-t3: #8071d4; --lc-b3: #6253b8; --lc-t4: #1f8aa8; --lc-b4: #0c6a85; --lc-t5: #d94d41; --lc-b5: #b32f24; --lc-t6: #8793a5; --lc-b6: #5f6b7c; --lc-grid: rgba(33, 37, 41, 0.14); }
[data-bs-theme='dark'] .dash-lost { --lc-t0: #7cb2ff; --lc-b0: #4d8fee; --lc-t1: #6fdba9; --lc-b1: #3fbf88; --lc-t2: #f7b36b; --lc-b2: #e08a2d; --lc-t3: #b8abf5; --lc-b3: #8f7fe0; --lc-t4: #7fd0e3; --lc-b4: #4aaec6; --lc-t5: #ff9a92; --lc-b5: #ee6259; --lc-t6: #b3bfcd; --lc-b6: #8794a6; --lc-grid: rgba(230, 234, 238, 0.16); }
[data-bs-theme='blue'] .dash-lost { --lc-grid: rgba(18, 38, 63, 0.16); }
.dash-lost-top { margin-bottom: 1rem; }
.dash-lost-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (min-width: 768px) { .dash-lost-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dash-lost .dw { height: auto; }
.dl-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.5rem; }
.dl-bar .dw-controls { display: flex; align-items: center; }
.dl-table { font-size: 0.9rem; }
.dl-table > :not(caption) > * > * { padding: 0.35rem 0.5rem; vertical-align: top; }
.dl-table .dl-opp { min-width: 11rem; }
.dl-table .dl-opp a { color: var(--lb-link); }
.dl-table .dl-reason { min-width: 8rem; }
.dl-table .dl-detail { min-width: 14rem; white-space: normal; overflow-wrap: anywhere; }
.lc-wrap { overflow-x: auto; }
.lc-svg { display: block; width: 100%; height: auto; min-width: 380px; }
.lc-svg.lc-wide-1 { min-width: 420px; }
.lc-svg.lc-wide-2 { min-width: 482px; }
.lc-svg.lc-wide-3 { min-width: 544px; }
.lc-svg.lc-wide-4 { min-width: 606px; }
.lc-svg.lc-wide-5 { min-width: 667px; }
.lc-svg.lc-wide-6 { min-width: 729px; }
.lc-svg.lc-wide-7 { min-width: 791px; }
.lc-grid { stroke: var(--lc-grid); stroke-width: 1; }
.lc-axis { stroke: var(--lb-muted); stroke-width: 1; }
.lc-ytxt, .lc-cat { fill: var(--lb-fg); font-size: 12px; }
.lc-val { fill: var(--lb-fg); font-size: 13px; font-weight: 600; }
.lc-hit { fill: transparent; }
.lc-col { stroke: none; }
.lc-col-link { outline: none; }
.lc-col-link:hover .lc-cat, .lc-col-link:focus-visible .lc-cat { text-decoration: underline; }
.lc-col-link:focus-visible .lc-hit { stroke: var(--lb-link); stroke-width: 2; }
.lc-t0 { stop-color: var(--lc-t0); } .lc-b0 { stop-color: var(--lc-b0); } .lc-t1 { stop-color: var(--lc-t1); } .lc-b1 { stop-color: var(--lc-b1); }
.lc-t2 { stop-color: var(--lc-t2); } .lc-b2 { stop-color: var(--lc-b2); } .lc-t3 { stop-color: var(--lc-t3); } .lc-b3 { stop-color: var(--lc-b3); }
.lc-t4 { stop-color: var(--lc-t4); } .lc-b4 { stop-color: var(--lc-b4); } .lc-t5 { stop-color: var(--lc-t5); } .lc-b5 { stop-color: var(--lc-b5); }
.lc-t6 { stop-color: var(--lc-t6); } .lc-b6 { stop-color: var(--lc-b6); }
.hm-owner { display: inline-flex; flex: none; vertical-align: middle; margin-right: 0.15rem; }

/* the user (2026-11-23): the action form: duration box + presets, coloured status choices with the icon above the text */
.act-duration-row { display: flex; gap: 0.4rem; align-items: center; }
.act-duration-text { max-width: 8rem; }
.act-duration-pick { width: auto; min-width: 7rem; }
.act-status-pick { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.act-st { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.2rem; min-width: 6.5rem; padding: 0.5rem 0.75rem; border-radius: 0.75rem; border: 2px solid transparent; cursor: pointer; font-size: 0.85rem; font-weight: 600; text-align: center; background: var(--act-bg); color: var(--act-fg); }
.act-st > .bi { font-size: 1.35rem; line-height: 1; }
.act-st-auto { --act-bg: #eef1f4; --act-fg: #3b4754; --act-on: #3b4754; }
.act-st-scheduled { --act-bg: #e3edff; --act-fg: #0a4bb5; --act-on: #0c66e4; }
.act-st-progress { --act-bg: #fff3d6; --act-fg: #7a5200; --act-on: #b27900; }
.act-st-completed { --act-bg: #dcf5e7; --act-fg: #156b45; --act-on: #1f845a; }
.act-st-cancelled { --act-bg: #ffe5e2; --act-fg: #a4231a; --act-on: #c9372c; }
.btn-check:checked + .act-st { background: var(--act-on); color: #ffffff; border-color: var(--act-on); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); }
.btn-check:focus-visible + .act-st { outline: 2px solid var(--bs-focus-ring-color, #0a559c); outline-offset: 2px; }
.act-st:hover { border-color: var(--act-on); }
[data-bs-theme='dark'] .act-st-auto { --act-bg: #2a323b; --act-fg: #d6dde4; --act-on: #6f7c89; }
[data-bs-theme='dark'] .act-st-scheduled { --act-bg: #1c2b45; --act-fg: #9cc2ff; --act-on: #1d6be0; }
[data-bs-theme='dark'] .act-st-progress { --act-bg: #3a2f14; --act-fg: #f5cd6a; --act-on: #9a6a00; }
[data-bs-theme='dark'] .act-st-completed { --act-bg: #163527; --act-fg: #7ee2b0; --act-on: #1a7a52; }
[data-bs-theme='dark'] .act-st-cancelled { --act-bg: #3f1d1a; --act-fg: #ffaaa3; --act-on: #b3302a; }

/* ── T-0239 (the user, 2026-11-23): the activity "wall" timeline, the type dropdown, the Outcome style, the time picker ── */
/* type colours (shared by the timeline and the action form): solid = badge / accent, tint = chip background, text = chip text */
.tlt-email { --tlt-solid: #0c66e4; --tlt-tint: #e3edff; --tlt-text: #0a4bb5; }
.tlt-call { --tlt-solid: #1f845a; --tlt-tint: #dcf5e7; --tlt-text: #156b45; }
.tlt-meeting { --tlt-solid: #7f5fc9; --tlt-tint: #efe8fc; --tlt-text: #5a3da6; }
.tlt-demo { --tlt-solid: #c25100; --tlt-tint: #ffeadb; --tlt-text: #8f3b00; }
.tlt-note { --tlt-solid: #5b6b7b; --tlt-tint: #eef1f4; --tlt-text: #3b4754; }
.tlt-task { --tlt-solid: #0a7f8f; --tlt-tint: #d9f3f6; --tlt-text: #0a5f6b; }
.tlt-stage { --tlt-solid: #a86f00; --tlt-tint: #fff3d6; --tlt-text: #7a5200; }
.tlt-update { --tlt-solid: #4a5fa0; --tlt-tint: #e6eaf8; --tlt-text: #34458a; }
[data-bs-theme='dark'] .tlt-email { --tlt-solid: #1d6be0; --tlt-tint: #1c2b45; --tlt-text: #9cc2ff; }
[data-bs-theme='dark'] .tlt-call { --tlt-solid: #1a7a52; --tlt-tint: #163527; --tlt-text: #7ee2b0; }
[data-bs-theme='dark'] .tlt-meeting { --tlt-solid: #8a6bd6; --tlt-tint: #2a2142; --tlt-text: #cdb8ff; }
[data-bs-theme='dark'] .tlt-demo { --tlt-solid: #c25100; --tlt-tint: #3d2411; --tlt-text: #ffb98a; }
[data-bs-theme='dark'] .tlt-note { --tlt-solid: #6f7c89; --tlt-tint: #2a323b; --tlt-text: #d6dde4; }
[data-bs-theme='dark'] .tlt-task { --tlt-solid: #0e8a9b; --tlt-tint: #12333a; --tlt-text: #84dbe7; }
[data-bs-theme='dark'] .tlt-stage { --tlt-solid: #9a6a00; --tlt-tint: #3a2f14; --tlt-text: #f5cd6a; }
[data-bs-theme='dark'] .tlt-update { --tlt-solid: #5a70b8; --tlt-tint: #212a45; --tlt-text: #b3c3f5; }

.tl-wall { position: relative; padding-left: 0; }
.tl-wall::before { content: ''; position: absolute; top: 0.5rem; bottom: 0.5rem; left: 1.1rem; width: 2px; background: var(--bs-border-color); }
.tl-day { position: relative; padding: 0.35rem 0 0.35rem 0; margin-top: 0.25rem; }
.tl-day-label { position: relative; display: inline-block; margin-left: 0.2rem; padding: 0.15rem 0.75rem; border-radius: 999px; background: var(--bs-secondary-bg); color: var(--bs-body-color); border: 1px solid var(--bs-border-color); font-size: 0.78rem; font-weight: 600; }
.tl-item { position: relative; display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.35rem 0; }
.tl-badge { position: relative; z-index: 1; flex: none; display: inline-flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--tlt-solid); color: #ffffff; font-size: 1rem; border: 3px solid var(--bs-body-bg); box-sizing: content-box; margin: -3px 0 0 -3px; }
.tl-card { flex: 1 1 auto; min-width: 0; background: var(--bs-body-bg); border: 1px solid var(--bs-border-color); border-left: 3px solid var(--tlt-solid); border-radius: 0.75rem; padding: 0.55rem 0.8rem; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06); }
[data-bs-theme='dark'] .tl-card { box-shadow: none; background: var(--bs-tertiary-bg); }
.tl-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.6rem; margin-bottom: 0.2rem; }
.tl-chip { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.1rem 0.55rem; border-radius: 999px; background: var(--tlt-tint); color: var(--tlt-text); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; }
.tl-time { font-size: 0.78rem; color: var(--bs-secondary-color); font-variant-numeric: tabular-nums; }
.tl-who { margin-left: auto; font-size: 0.78rem; color: var(--bs-secondary-color); min-width: 0; }
.tl-title { overflow-wrap: anywhere; }
.tl-body { margin-top: 0.2rem; color: var(--bs-secondary-color); font-size: 0.8rem; overflow-wrap: anywhere; white-space: pre-line; }
.tl-more { padding: 0.5rem 0 0 3rem; }

/* the action form: the type dropdown (JS on: the button shows, the select is visually hidden; JS off: the plain select) */
.act-type-dd { display: none; }
.act-type-box.act-type-js .act-type-dd { display: block; }
.act-type-box.act-type-js .act-type-select { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.act-type-btn { display: inline-flex; align-items: center; gap: 0.5rem; min-width: 12rem; padding: 0.4rem 0.8rem; border: 2px solid var(--tlt-solid); border-radius: 0.75rem; background: var(--tlt-tint); color: var(--tlt-text); font-weight: 700; }
.act-type-btn > .bi:first-child { font-size: 1.15rem; }
.act-type-caret { margin-left: auto; font-size: 0.75rem; }
.act-type-btn:hover, .act-type-btn:focus-visible, .act-type-btn.show { background: var(--tlt-tint); color: var(--tlt-text); border-color: var(--tlt-solid); box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--tlt-solid) 30%, transparent); }
.act-type-menu { min-width: 12rem; padding: 0.35rem; border-radius: 0.75rem; }
.act-type-opt { display: flex; align-items: center; gap: 0.6rem; border-radius: 0.5rem; font-weight: 600; color: var(--tlt-text); }
.act-type-opt > .bi { display: inline-flex; align-items: center; justify-content: center; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--tlt-tint); color: var(--tlt-text); }
.act-type-opt:hover, .act-type-opt:focus-visible, .act-type-opt.active { background: var(--tlt-tint); color: var(--tlt-text); }

/* the Outcome field: an accent bar, a tint and a flag */
.act-outcome { display: flex; align-items: stretch; border-left: 4px solid var(--act-out, #b27900); background: var(--act-out-bg, #fff6df); border-radius: 0.4rem; padding: 0.3rem 0.4rem 0.3rem 0.5rem; gap: 0.5rem; }
.act-outcome-ic { display: inline-flex; align-items: center; color: var(--act-out-ic, #7a5200); }
.act-outcome .form-control, .act-outcome .form-select { border-color: transparent; background-color: transparent; font-weight: 600; box-shadow: none; }
.act-outcome:focus-within { box-shadow: 0 0 0 0.2rem rgba(178, 121, 0, 0.3); }
[data-bs-theme='dark'] .act-outcome { --act-out: #d9a21b; --act-out-bg: #2d2610; --act-out-ic: #f5cd6a; }

/* the time picker beside the time box */
.dt-timewrap { position: relative; display: inline-flex; gap: 0.25rem; align-items: center; }
.dt-pop { position: absolute; z-index: 1056; top: calc(100% + 0.3rem); right: 0; width: 15rem; padding: 0.75rem; background: var(--bs-body-bg); color: var(--bs-body-color); border: 1px solid var(--bs-border-color); border-radius: 0.75rem; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2); }
.dt-pop[hidden] { display: none; }
.dt-steps { display: flex; align-items: center; justify-content: center; gap: 0.75rem; }
.dt-step { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; }
.dt-val { min-width: 3.5rem; padding: 0.2rem 0; text-align: center; font-size: 2rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; border-radius: 0.5rem; }
.dt-val:focus-visible { outline: 2px solid var(--bs-focus-ring-color, #0a559c); outline-offset: 2px; }
.dt-colon { font-size: 2rem; font-weight: 700; }
.dt-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.35rem; margin-top: 0.65rem; }
/* T-0239: the checked "By the date" choice in dark: white text needs a darker fill (AA) */
[data-bs-theme='dark'] .act-st-auto { --act-on: #4f5b67; }
.tl-subtabs .nav-link { padding: 0.25rem 0.8rem; font-size: 0.875rem; border-radius: 999px; }
/* axe (2026-11-23): the inactive Activity sub-tab on the grey side panel */
.tl-subtabs .nav-link:not(.active) { color: #0a4d99; }
[data-bs-theme='dark'] .tl-subtabs .nav-link:not(.active) { color: #9cc2ff; }
[data-bs-theme='blue'] .tl-subtabs .nav-link:not(.active) { color: #0a4d99; }
.tl-subtabs .nav-link.active { background: #0a4d99; color: #ffffff; }
[data-bs-theme='dark'] .tl-subtabs .nav-link.active { background: #1d6be0; color: #ffffff; }
/* the user (2026-11-23): the reopen ("undo won / lost") bar under the stage path */
.sales-reopen-bar { border-left: 4px solid #1f845a; background: rgba(34, 160, 107, 0.08); }
.sales-reopen-bar.sales-reopen-lost { border-left-color: #c9372c; background: rgba(201, 55, 44, 0.07); }
.sales-reopen-bar .bi-trophy-fill { color: #1f845a; }
.sales-reopen-bar .bi-x-circle-fill { color: #c9372c; }

/* ── T-0240 (the user, 2026-11-23): drill-down modals of the heat map cells, the donut numbers and the suite bars ── */
.dw-drill { padding: 0 0.25rem; border: 0; background: none; font: inherit; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--sales-link-strong, var(--bs-link-color)); text-decoration: underline; text-underline-offset: 2px; border-radius: 0.25rem; cursor: pointer; }
.dw-drill:hover { text-decoration-thickness: 2px; }
.dw-drill:focus-visible { outline: 2px solid var(--sales-link-strong, var(--bs-link-color)); outline-offset: 2px; }
.dw-drill-n { padding: 0 0.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.dw-legend-row > label { display: inline; }
.hm-cell { cursor: pointer; }
.tw-row[data-drill] { cursor: pointer; }
.dd-table { font-size: 0.875rem; }
.dd-table th { white-space: nowrap; font-weight: 600; }
.dd-date, .dd-amount { white-space: nowrap; font-variant-numeric: tabular-nums; }
.dd-subject { min-width: 12rem; }
.dd-opp { display: block; }
.dd-dur { font-family: var(--bs-font-monospace); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--bs-body-color); }
.dd-skeleton { height: 8rem; }

/* T-0241: the "Days overdue" column of the Overdue Opportunities view: red text (the theme's danger text colour, AA on each theme) */
.sales-days-overdue { color: var(--bs-danger-text-emphasis); font-weight: 700; font-variant-numeric: tabular-nums; }
/* T-0273 (the user, 2026-11-24): on the opportunities list the Days overdue number sits in a red pill (white on #c9372c: 5.2:1, every theme) */
td > span.sales-days-overdue { display: inline-block; min-width: 1.9rem; padding: 0.1rem 0.5rem; border-radius: 999px; background: #c9372c; color: #fff; font-size: 0.8rem; line-height: 1.3; text-align: center; }

/* T-0241: the reopen bar (Won / Lost) has no border, only its green or red left accent; Move to stage and the actions panel share a row */
.sales-reopen-bar.surface { border-top: 0; border-right: 0; border-bottom: 0; box-shadow: none; }
.sales-stage-actions .sales-stage-form, .sales-stage-actions .sales-reopen-bar { margin-bottom: 0; }

/* T-0241: the "Add colleague" menu header of the action form met no AA contrast in the dark and blue themes (axe, t0177d) */
.people-menu > .dropdown-header { color: var(--bs-body-color); }

/* ── T-0242 (06; the user, 2026-11-23): the Sales opportunity view in three columns, HubSpot style ──
   Left: hero card (back link, Actions, company icon + name, round shortcuts), About this company, profile. Middle: three equal tabs
   (Overview / Activities / Closing plan). Right: Contacts, Team, Attachments, Created. Every card collapses (sales/_card-head.ejs).
   Tokens only (--atlas-surface, --atlas-status-row-bg, --bs-*, --sales-*); AA checked in light, dark and blue. */
.opp3 { --opp3-gap: 0.75rem; }
.opp3-left, .opp3-main, .opp3-right { min-width: 0; }
.opp3 .opp3-card, .opp3 .opp3-hero { margin-bottom: var(--opp3-gap); }
.opp3 .surface.opp3-card.sales-soft { background: var(--atlas-surface); border-color: var(--bs-border-color); }
.opp3-card { padding: 0.5rem 0.9rem 0.8rem; }
.opp3-hero { padding: 0.75rem 0.9rem 0.9rem; }
.opp3-hero-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.6rem; }
/* T-0272: Share + Actions stay together at the right; on a narrow card they wrap under the back link */
.opp3-hero-btns { margin-left: auto; }
.opp3-back { color: var(--sales-link-strong, var(--bs-link-color)); text-decoration: none; font-size: 0.875rem; font-weight: 600; }
.opp3-back:hover { text-decoration: underline; }
.opp3-ident { display: flex; align-items: flex-start; gap: 0.6rem; }
.opp3-co-ico { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border-radius: 0.5rem; background: var(--atlas-status-row-bg); color: var(--bs-body-color); font-size: 1.25rem; }
.opp3-ident h1 { font-size: 1.15rem; line-height: 1.3; overflow-wrap: anywhere; }
/* card header: one toggle button (chevron + title) and an optional + Add beside it */
.opp3-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; min-height: 2.25rem; }
.opp3-h { margin: 0; font-size: 1rem; font-weight: 700; flex: 1 1 auto; min-width: 0; }
.opp3-toggle { display: flex; align-items: center; gap: 0.4rem; width: 100%; padding: 0.35rem 0; border: 0; background: transparent; color: var(--bs-body-color); font: inherit; font-weight: 700; text-align: left; border-radius: 0.25rem; }
.opp3-toggle:hover { color: var(--sales-link-strong, var(--bs-link-color)); }
.opp3-toggle:focus-visible { outline: 2px solid var(--atlas-focus, var(--bs-primary)); outline-offset: 2px; }
.opp3-chev { flex: 0 0 auto; font-size: 0.8rem; transition: transform 0.15s ease; }
.opp3-toggle.collapsed .opp3-chev { transform: rotate(-90deg); }
@media (prefers-reduced-motion: reduce) { .opp3-chev { transition: none; } }
.opp3-add { flex: 0 0 auto; padding: 0.15rem 0.4rem; font-weight: 600; text-decoration: none; color: var(--sales-link-strong, var(--bs-link-color)); }
.opp3-add:hover { text-decoration: underline; }
/* label above value */
.opp3-dl { margin: 0; display: grid; gap: 0.7rem; }
.opp3-dl-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.opp3-pair { min-width: 0; }
/* T-0271: captions a little greyer than the values (WCAG AA kept: 4.83:1 on white, 4.54:1 on #f7f8f9; dark 6.59:1 on #22272b) */
:root, [data-bs-theme='light'], [data-bs-theme='blue'] { --opp3-caption: #68737f; }
[data-bs-theme='dark'] { --opp3-caption: #9fadbc; }
.opp3-pair > dt { font-size: 0.75rem; font-weight: 600; color: var(--opp3-caption); margin: 0 0 0.1rem; }
.opp3-pair > dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.opp3-tiles { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.opp3-tile { background: var(--atlas-status-row-bg); border-radius: 0.5rem; padding: 0.6rem 0.75rem; min-width: 0; }
.opp3-tile > dt { font-size: 0.75rem; font-weight: 600; color: var(--sales-muted-strong, var(--bs-secondary-color)); }
.opp3-tile > dd { margin: 0.1rem 0 0; font-size: 1rem; overflow-wrap: anywhere; }
/* round shortcuts */
.opp3-shortcuts { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 0.25rem; margin: 0.9rem 0 0; padding: 0; }
.opp3-shortcuts > li { flex: 1 1 0; min-width: 3.4rem; display: flex; justify-content: center; position: relative; }
.opp3-sc { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; background: transparent; border: 0; padding: 0.1rem; color: var(--bs-body-color); text-decoration: none; font: inherit; border-radius: 0.5rem; }
.opp3-sc-ico { display: inline-flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--bs-primary-bg-subtle); color: var(--bs-primary-text-emphasis); font-size: 1.1rem; transition: background-color 0.15s ease; }
.opp3-sc:hover .opp3-sc-ico { background: var(--bs-primary); color: var(--bs-white, #fff); }
.opp3-sc:focus-visible { outline: 2px solid var(--atlas-focus, var(--bs-primary)); outline-offset: 2px; }
.opp3-sc-label { font-size: 0.75rem; font-weight: 600; line-height: 1.2; text-align: center; max-width: 4.75rem; }
/* tabs: three equal, the active one white (the tray is the theme's soft grey) */
.opp3-tabs { display: flex; flex-wrap: nowrap; gap: 0.25rem; padding: 0.25rem; margin: 0 0 var(--opp3-gap); background: var(--atlas-status-row-bg); border-radius: 0.6rem; }
.opp3-tabs .nav-item { flex: 1 1 0; min-width: 0; }
.opp3-tabs .nav-link { width: 100%; text-align: center; padding: 0.55rem 0.5rem; border: 0; border-radius: 0.45rem; color: var(--sales-link-strong, var(--bs-link-color)); font-weight: 600; background: transparent; }
.opp3-tabs .nav-link:hover { color: var(--bs-body-color); }
.opp3-tabs .nav-link.active { background: var(--atlas-surface); color: var(--bs-body-color); box-shadow: 0 1px 2px rgba(9, 30, 66, 0.2); }
.opp3-tabs .nav-link:focus-visible { outline: 2px solid var(--atlas-focus, var(--bs-primary)); outline-offset: -2px; }
.opp3-panes > .tab-pane:focus-visible { outline: 2px solid var(--atlas-focus, var(--bs-primary)); outline-offset: 2px; }
/* the stage form and the reopen bar sit inside a card now */
.opp3-stage .sales-stage-form, .opp3-stage .sales-reopen-bar { margin: 0; }
.opp3-stage .sales-reopen-bar { padding: 0.6rem 0.75rem; border-radius: 0.5rem; }
/* contacts as sub-cards, with copy buttons */
.opp3-right .oc-rows { display: grid; gap: 0.6rem; margin: 0 0 0.6rem; }
.opp3-right .oc-row { border: 1px solid var(--bs-border-color); border-radius: 0.5rem; padding: 0.6rem 0.65rem; background: var(--atlas-surface); }
.opp3-right .oc-reach { flex-direction: column; gap: 0.15rem; }
.oc-reach-item { display: inline-flex; align-items: center; gap: 0.25rem; min-width: 0; overflow-wrap: anywhere; }
.opp3-copy { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 1.75rem; height: 1.75rem; padding: 0; border: 0; border-radius: 0.25rem; background: transparent; color: var(--sales-link-strong, var(--bs-link-color)); }
.opp3-copy:hover { background: var(--atlas-status-row-bg); }
.opp3-copy:focus-visible { outline: 2px solid var(--atlas-focus, var(--bs-primary)); outline-offset: 1px; }
@media (max-width: 575.98px) {
  .opp3-dl-2, .opp3-tiles { grid-template-columns: minmax(0, 1fr); }
  .opp3-tabs .nav-link { padding: 0.5rem 0.25rem; font-size: 0.875rem; }
}

/* T-0242 (the user, 2026-11-23): the opportunity view sits on a grey page area with white cards (HubSpot look). Tokens per theme: light grey page
   and white cards; dark = a lighter grey than the body with cards a step lighter still; blue = a soft blue-grey with white cards. */
[data-bs-theme='light'] { --opp3-page-bg: #e6e9ed; --opp3-card-bg: #ffffff; --opp3-card-border: #d5d9df; }
[data-bs-theme='blue'] { --opp3-page-bg: #d9e4f2; --opp3-card-bg: #ffffff; --opp3-card-border: #c3d1e4; }
[data-bs-theme='dark'] { --opp3-page-bg: #2a3036; --opp3-card-bg: #333b43; --opp3-card-border: #46505a; }
.opp3-page { background: var(--opp3-page-bg); border-radius: 0.75rem; padding: 0.75rem; }
.opp3-page .surface, .opp3-page .opp3 .surface.opp3-card.sales-soft { background: var(--opp3-card-bg); border-color: var(--opp3-card-border); }
.opp3-page .opp3-tile, .opp3-page .opp3-co-ico { background: var(--atlas-status-row-bg); }
.opp3-page .opp3-right .oc-row { background: var(--opp3-card-bg); border-color: var(--opp3-card-border); }
@media (max-width: 575.98px) { .opp3-page { padding: 0.5rem; border-radius: 0.5rem; } }

/* T-0242: header card title = the company name (large); D-number + opportunity name smaller below; without a company the name is the title */
.opp3-company { margin: 0; font-size: 1.3rem; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.opp3-oppname.is-sub h1 { font-size: 0.875rem; font-weight: 500; color: var(--sales-muted-strong, var(--bs-secondary-color)); }
.opp3-oppname.is-sub .issue-key { font-size: 0.8125rem; }

/* T-0249: the date warning shown when a date is chosen (an empty live region until a warning exists) */
.date-rule-msg { display: block; width: 100%; margin-top: 0.25rem; font-size: 0.875em; color: var(--atlas-danger-fg, var(--bs-danger-text-emphasis)); }
.date-rule-msg:empty { display: none; }

/* T-0242 (the user, 2026-11-23): the view fills the height below the header: the grey page area grows to the bottom of the main column even
   when the content is short (the same flex pattern as the home widgets); no extra scroll when the content fits */
main#main:has(> .opp3-page) { display: flex; flex-direction: column; padding-bottom: 1rem; }
main#main > .opp3-page { flex: 1 1 auto; }

/* T-0248 (the user, 2026-11-23): the create-opportunity wizard (sales/create-wizard.ejs, js/opp-wizard.js). Without the script every
   step shows; with it (.oppwiz-on) only the current one. Tokens only: it follows the light, dark and blue themes. */
.oppwiz { width: 100%; max-width: 880px; margin: 0 auto; }
.oppwiz-page { display: flex; flex-direction: column; justify-content: flex-start; }
.oppwiz-suggest { display: block; color: var(--sales-muted-strong, var(--bs-secondary-color)); }
.oppwiz-suggest[hidden] { display: none; }
.oppwiz-progress { margin: 0 0 1.25rem; }
.oppwiz-count { margin: 0 0 0.5rem; font-weight: 600; }
.oppwiz-steps { display: flex; flex-wrap: wrap; gap: 0.35rem 0.5rem; margin: 0; padding: 0; list-style: none; }
.oppwiz-stepitem { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.2rem 0.6rem 0.2rem 0.25rem; border: 1px solid var(--bs-border-color); border-radius: 999px; font-size: 0.8125rem; color: var(--bs-body-color); background: var(--atlas-surface); }
.oppwiz-num { display: inline-flex; align-items: center; justify-content: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--atlas-status-row-bg); font-weight: 700; font-size: 0.75rem; }
.oppwiz-stepitem.is-done .oppwiz-num { background: var(--bs-success-bg-subtle); color: var(--bs-success-text-emphasis); }
.oppwiz-stepitem.is-current { border-color: var(--bs-primary); font-weight: 700; }
.oppwiz-stepitem.is-current .oppwiz-num { background: var(--bs-primary-bg-subtle); color: var(--bs-primary-text-emphasis); }
.oppwiz-step { border: 0; padding: 0; margin: 0 0 1rem; min-width: 0; }
.oppwiz-step > legend { float: none; width: auto; margin-bottom: 0.25rem; }
.oppwiz-on .oppwiz-step:not(.is-current) { display: none; }
.oppwiz-step > legend:focus-visible { outline: 2px solid var(--atlas-focus, var(--bs-primary)); outline-offset: 2px; }
.oppwiz-modes { display: grid; gap: 0.25rem; margin-bottom: 0.5rem; }
.oppwiz-panel { margin-top: 0.75rem; padding: 0.75rem; border-radius: 0.5rem; background: var(--atlas-status-row-bg); }
.oppwiz-panel[hidden], .oppwiz-msg[hidden], .oppwiz-own[hidden] { display: none; }
.oppwiz-req { color: var(--bs-danger-text-emphasis); }
.oppwiz-google.is-disabled { opacity: 0.65; cursor: not-allowed; }
.oppwiz-namegroup { flex-wrap: wrap; }
.oppwiz-namegroup > .form-control { min-width: 12rem; }
.oppwiz-lines td, .oppwiz-lines th { vertical-align: middle; }
.oppwiz-lines td:nth-child(1) { min-width: 13rem; }
.oppwiz-lines td:nth-child(2) { min-width: 11rem; }
.oppwiz-lines td:nth-child(3) { width: 6rem; }
.oppwiz-lines td:nth-child(4) { width: 8rem; }
.oppwiz-hint { min-height: 1.25rem; margin: 0 0 0.5rem; font-size: 0.875rem; color: var(--sales-muted-strong, var(--bs-secondary-color)); }
.oppwiz-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; padding-top: 0.75rem; border-top: 1px solid var(--bs-border-color); }
.oppwiz-nav-main { display: inline-flex; flex-wrap: wrap; gap: 0.5rem; }
.oppwiz-nav-main > [hidden] { display: none; }
.oppwiz-review { display: grid; gap: 0.75rem; }
.oppwiz-review-card { border: 1px solid var(--bs-border-color); border-radius: 0.5rem; padding: 0.6rem 0.75rem; background: var(--atlas-surface); }
.oppwiz-review-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.oppwiz-dl { display: grid; grid-template-columns: minmax(7rem, 14rem) minmax(0, 1fr); gap: 0.15rem 0.75rem; margin: 0.35rem 0 0; }
.oppwiz-dl > dt { font-weight: 600; font-size: 0.8125rem; color: var(--sales-muted-strong, var(--bs-secondary-color)); }
.oppwiz-dl > dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 575.98px) {
  .oppwiz-on .oppwiz-stepitem:not(.is-current) .oppwiz-name { display: none; }
  .oppwiz-stepitem { padding-right: 0.25rem; }
  .oppwiz-stepitem.is-current { padding-right: 0.6rem; }
  .oppwiz-dl { grid-template-columns: minmax(0, 1fr); }
  .oppwiz-nav-main { width: 100%; justify-content: flex-end; }
}

/* T-0242: the Contacts of the Opportunity profile card: name, role pill, star on the main contact; the checklist editor */
.opp3-crow { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.4rem; margin-bottom: 0.25rem; }
.opp3-role { display: inline-block; padding: 0.05rem 0.5rem; border-radius: 999px; background: var(--atlas-status-row-bg); color: var(--bs-body-color); font-size: 0.75rem; }
.opp3-star { color: var(--bs-warning-text-emphasis); font-size: 0.8rem; }
.opp3-cedit { margin-top: 0.5rem; padding: 0.6rem; border: 1px solid var(--opp3-card-border, var(--bs-border-color)); border-radius: 0.5rem; }
.opp3-cedit .form-check { margin-bottom: 0.25rem; }
/* the user (2026-11-23): the "?" explainer of Expected revenue on the opportunity view (a <details>, no JS) */
.opp3-explain { position: relative; display: inline-block; font-weight: 400; }
.opp3-explain > summary { list-style: none; cursor: pointer; color: var(--bs-secondary-color); line-height: 1; }
.opp3-explain > summary::-webkit-details-marker { display: none; }
.opp3-explain > summary:focus-visible { outline: 2px solid var(--atlas-focus, var(--bs-primary)); outline-offset: 2px; border-radius: 50%; }
.opp3-explain[open] > p { position: absolute; z-index: 20; left: 0; top: 1.4rem; width: min(16rem, 80vw); padding: 0.45rem 0.6rem; border: 1px solid var(--bs-border-color); border-radius: var(--bs-border-radius); background: var(--bs-body-bg); color: var(--bs-body-color); box-shadow: var(--bs-box-shadow-sm); text-transform: none; letter-spacing: normal; }
.opp3-creach { display: flex; flex-direction: column; flex: 0 0 100%; gap: 0.1rem; min-width: 0; }
.opp3-creach .oc-reach-item { min-width: 0; }
/* the user (2026-11-23): product / service lines: no top / bottom row borders, odd / even lines on alternating backgrounds,
   borderless Edit and Remove buttons (one tbody per line, so a line and its edit row share a background) */
.sales-lines-table > :not(caption) > * > * { border-bottom-width: 0; }
.sales-lines-table > thead > tr > th { border-bottom: 0; color: var(--bs-secondary-color); font-weight: 600; }
.sales-lines-table > tbody.sales-line:nth-of-type(odd) > tr > * { background-color: var(--bs-tertiary-bg); }
.sales-lines-table > tbody.sales-line:nth-of-type(even) > tr > * { background-color: var(--bs-body-bg); }
.sales-lines-table > tbody + tbody { border-top: 0; }
.sales-lines-table .sales-line-btn { border: 0; padding: 0.15rem 0.35rem; }
.sales-lines-table .sales-line-btn:not(.text-danger) { color: var(--bs-secondary-color); }
.sales-lines-table .sales-line-btn:hover, .sales-lines-table .sales-line-btn:focus-visible { background-color: var(--bs-secondary-bg); }
/* the user (2026-11-23): in the opportunity's Contacts card, email and telephone without underline, in the body colour, smaller */
.oc-reach a { color: var(--bs-body-color); text-decoration: none; font-size: 0.75rem; }
.oc-reach a:hover, .oc-reach a:focus-visible { text-decoration: underline; }
/* the user (2026-11-23): the industry picker's list is wider than its box (CAEN names are up to 182 chars), within the screen;
   on phones it takes the full width of the box and wraps */
.creatable-wide > .creatable-menu { width: max(100%, min(40rem, calc(100vw - 2rem))) !important; max-height: 22rem; }
.creatable-wide > .creatable-menu .dropdown-item { line-height: 1.3; padding-top: 0.35rem; padding-bottom: 0.35rem; }
@media (max-width: 575.98px) {
  .creatable-wide > .creatable-menu { width: 100% !important; max-height: 60vh; }
  .creatable-wide > .creatable-menu .dropdown-item { font-size: 0.875rem; }
}
/* T-0248: the message colour of the wizard in the dark theme (4.5:1 on the card; Bootstrap's own is 4.49) */
[data-bs-theme='dark'] .oppwiz-msg { color: #f2a3aa; }

/* T-0257 (the user, 2026-11-23): the "Change lifecycle stage" modal (sales/_stage-modal.ejs, js/stage-modal.js). The stage chooser is a radio
   group of cards in pipeline order: a grid on desktop, one column on phones. Text colours are Bootstrap's emphasis colours on their subtle
   backgrounds (AA in the light, dark and blue themes); the chosen card has a ring, the focused one an outline. */
.osm-sub { font-size: 1rem; font-weight: 600; }
.osm-closed { color: var(--bs-body-color); }
.osm-stages { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(9.5rem, 100%), 1fr)); gap: 0.5rem; }
.osm-stage { position: relative; display: block; margin: 0; }
.osm-radio { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.osm-radio:disabled { cursor: default; }
.osm-card { display: flex; flex-direction: column; gap: 0.15rem; height: 100%; padding: 0.65rem 0.75rem; border: 1px solid var(--bs-border-color); border-top: 4px solid var(--bs-border-color); border-radius: 0.6rem; background: var(--bs-body-bg); color: var(--bs-body-color); }
.osm-ico { font-size: 1.15rem; line-height: 1; }
.osm-name { font-weight: 600; overflow-wrap: anywhere; }
.osm-meta { font-size: 0.85rem; }
.osm-state { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.osm-stage.is-done .osm-card { border-top-color: #1f845a; background: var(--bs-success-bg-subtle); color: var(--bs-success-text-emphasis); }
.osm-stage.is-current .osm-card { border-color: var(--bs-primary); background: var(--bs-primary-bg-subtle); color: var(--bs-primary-text-emphasis); }
.osm-stage.kind-won:not(.is-current) .osm-card { border-top-color: #1f845a; background: var(--bs-success-bg-subtle); color: var(--bs-success-text-emphasis); }
.osm-stage.kind-lost:not(.is-current) .osm-card { border-top-color: #c9372c; background: var(--bs-danger-bg-subtle); color: var(--bs-danger-text-emphasis); }
.osm-radio:not(:disabled):hover + .osm-card { border-color: var(--bs-primary); }
.osm-radio:checked + .osm-card { border-color: var(--bs-primary); box-shadow: 0 0 0 3px var(--bs-primary); }
.osm-radio:focus-visible + .osm-card { outline: 3px solid var(--bs-body-color); outline-offset: 3px; }
@media (max-width: 767.98px) {
  .osm-stages { grid-template-columns: 1fr; }
  .osm-card { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.6rem; }
  .osm-name { flex: 1 1 8rem; }
}
.osm-progress-text { margin: 0 0 0.35rem; font-weight: 600; }
.osm-bar { height: 0.5rem; overflow: hidden; border-radius: 1rem; background: var(--bs-secondary-bg); }
.osm-bar-fill { display: block; width: 0; height: 100%; background: var(--bs-primary); transition: width 0.2s ease; }
.osm-clist { max-height: 14rem; margin-top: 0.5rem; overflow: auto; padding: 0.5rem 0.75rem 0.25rem; border: 1px solid var(--bs-border-color); border-radius: 0.5rem; }
.osm-clist:empty { display: none; }
.osm-cnew { padding: 0.75rem; border: 1px solid var(--bs-border-color); border-radius: 0.5rem; }
@media (prefers-reduced-motion: reduce) { .osm-bar-fill { transition: none; } }
/* the user (2026-11-23): on the opportunity's lifecycle stage path, stages not reached yet are in a grey (less visible) text,
   still AA on their background (light / blue #596574 on #e3e6ea = 4.9:1; dark #a9b3bd on #38414a = 4.9:1) */
.flow-path .fp-step.is-todo:not(.fp-lost) { color: #596574; }
[data-bs-theme='dark'] .flow-path .fp-step.is-todo:not(.fp-lost) { color: #a9b3bd; }
.flow-path .fp-step.is-todo:not(.fp-lost) .fp-label { font-weight: 400; }

/* T-0261 (the user, 2026-11-23): the company chooser (and every typeahead list). (a) The list opens BELOW its box: it was a child of a
   flex form (align-items: center) and, with no top, took its static position, centred over the input; top: 100% anchors it.
   (b) data-typeahead-wide (company pickers): as wide as the industry list, max(100%, min(40rem, 100vw - 2rem)), shifted left by
   app.js only as far as needed to stay on screen; on phones the box width. (c) a company row shows its CUI and industry on a muted second line. */
.typeahead-list { top: 100%; left: 0; margin-top: 0.125rem; z-index: 1056; }
.typeahead-wide { width: max(100%, min(40rem, calc(100vw - 2rem))); max-height: 22rem; overflow-y: auto; }
.typeahead-wide .dropdown-item { white-space: normal; line-height: 1.3; padding-top: 0.35rem; padding-bottom: 0.35rem; }
.typeahead-open-list .dropdown-item small.typeahead-code { display: inline; margin-left: 0.5rem !important; }
.typeahead-sub { font-size: 0.8125rem; }
@media (max-width: 575.98px) {
  .typeahead-wide { width: 100%; max-height: 60vh; }
}
/* T-0261: "Part of company": chips of companies with a remove button, and the company search under them */
.part-of { flex: 1 1 100%; min-width: 0; }
.part-of-chips { display: flex; flex-wrap: wrap; gap: 0.25rem; margin: 0 0 0.25rem; padding: 0; list-style: none; }
.part-of-chips:empty { display: none; }
.part-of-chip { display: inline-flex; align-items: center; gap: 0.25rem; max-width: 100%; padding: 0.1rem 0.25rem 0.1rem 0.6rem; border-radius: 999px; background: var(--bs-secondary-bg); color: var(--bs-body-color); font-size: 0.8125rem; }
.part-of-chip > span { overflow-wrap: anywhere; }
.part-of-x { border: 0; background: transparent; color: var(--bs-secondary-color); padding: 0.1rem 0.3rem; line-height: 1; border-radius: 50%; }
.part-of-x:hover, .part-of-x:focus-visible { background: var(--bs-tertiary-bg); color: var(--bs-body-color); }
a.part-of-link, button.part-of-link { display: inline-flex; align-items: center; max-width: 100%; padding: 0.1rem 0.6rem; border: 0; border-radius: 999px; background: var(--bs-secondary-bg); color: var(--bs-body-color); font-size: 0.8125rem; text-decoration: none; text-align: left; }
a.part-of-link:hover, button.part-of-link:hover, a.part-of-link:focus-visible, button.part-of-link:focus-visible { background: var(--bs-tertiary-bg); text-decoration: underline; }
.part-of-list { display: flex; flex-wrap: wrap; gap: 0.25rem; margin: 0; padding: 0; list-style: none; }

/* ── T-0258b (06; the user, 2026-11-23, Excel "CLOSING PLAN"): the Closing plan tab — Deal, Closing activities, Risk management ──
   White cards on the grey page (--opp3-*); every colour from tokens (AA in light, dark and blue). One column on phones. */
.cp-deal { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.25rem 1.75rem; align-items: start; }
.cp-col { display: grid; gap: 0.7rem; min-width: 0; }
.cp-pair > dt label { font: inherit; margin: 0; }
.cp-fieldwrap { display: flex; flex-wrap: wrap; align-items: center; gap: 0.15rem 0.5rem; }
.cp-fieldwrap > input, .cp-fieldwrap > select, .cp-fieldwrap > textarea, .cp-fieldwrap > .cp-ig { flex: 1 1 100%; min-width: 0; }
.cp-fieldwrap > .cp-status { flex: 1 1 100%; }
.cp-read { white-space: pre-wrap; overflow-wrap: anywhere; }
.cp-auto { display: inline-block; min-width: 3rem; padding: 0.2rem 0.5rem; border-radius: 0.375rem; background: var(--atlas-status-row-bg, var(--bs-tertiary-bg)); color: var(--bs-body-color); font-weight: 600; }
.cp-hint { color: var(--sales-muted-strong, var(--bs-secondary-color)); margin-top: 0.15rem; }
.cp-status { min-height: 1.1em; color: var(--sales-muted-strong, var(--bs-secondary-color)); }
.cp-status.is-ok { color: var(--sales-amount); font-weight: 600; }
.cp-status.is-error { color: var(--bs-danger-text-emphasis); font-weight: 600; }
.cp-status:empty { display: none; }
.cp-grow { field-sizing: content; width: 100%; min-width: 0; min-height: 2rem; resize: vertical; }
.cp-act-row > *, .cp-risk-cols > *, .cp-pair { min-width: 0; }
.cp-grow[rows='1'] { min-height: 2rem; }
.cp-group + .cp-group { margin-top: 1.1rem; }
.cp-group-h { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--sales-muted-strong, var(--bs-secondary-color)); margin: 0 0 0.35rem; padding-bottom: 0.25rem; border-bottom: 1px solid var(--opp3-card-border, var(--bs-border-color)); }
.cp-act-row { display: grid; grid-template-columns: minmax(10rem, 1.4fr) minmax(6.5rem, 0.6fr) minmax(9rem, 0.8fr) minmax(12rem, 2fr); gap: 0.4rem 0.9rem; align-items: start; padding: 0.4rem 0; border-bottom: 1px solid var(--opp3-card-border, var(--bs-border-color)); font-size: 0.875rem; }
.cp-act-row:last-child { border-bottom: 0; }
.cp-act-head { font-size: 0.72rem; font-weight: 600; color: var(--sales-muted-strong, var(--bs-secondary-color)); padding-top: 0; }
.cp-act { padding-top: 0.25rem; font-weight: 500; overflow-wrap: anywhere; }
.cp-switch { display: flex; align-items: center; gap: 0.5rem; padding-left: 0; margin: 0.2rem 0 0; min-height: 1.5rem; }
.cp-switch .form-check-input { float: none; margin: 0; width: 2.4em; height: 1.2em; cursor: pointer; }
.cp-state { font-weight: 600; min-width: 3.2rem; }
.cp-state.is-unset { font-weight: 400; color: var(--sales-muted-strong, var(--bs-secondary-color)); }
.cp-when .date-dmy { max-width: 11rem; }
.cp-risks { counter-reset: none; display: grid; gap: 0.8rem; }
.cp-risk { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr) auto; gap: 0.5rem 0.75rem; align-items: start; padding-bottom: 0.8rem; border-bottom: 1px solid var(--opp3-card-border, var(--bs-border-color)); }
.cp-risk-n { font-weight: 700; color: var(--sales-muted-strong, var(--bs-secondary-color)); padding-top: 0.3rem; }
.cp-risk-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem 0.9rem; }
.cp-colhead { display: block; font-size: 0.72rem; font-weight: 600; color: var(--sales-muted-strong, var(--bs-secondary-color)); margin-bottom: 0.15rem; }
.cp-risk-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem; }
.cp-risk-tools form { margin: 0; }
.cp-risk-read dt { font-size: 0.72rem; font-weight: 600; color: var(--sales-muted-strong, var(--bs-secondary-color)); }
.cp-risk-read dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.cp-risk-add { padding-top: 0.2rem; }
.cp-risk-add .cp-colhead { font-size: 0.8rem; }
/* T-0271 (the user, 2026-11-24): the Closing plan fields read like the other panels' in-place fields: no border at rest (plain text), a dashed
   outline and a pencil on hover, the normal field box on focus; still saved on change (closing-plan.js). Main competitor and the Closing
   activities comments keep their box. The add-risk form is not touched. */
[data-closing-plan] :is(.cp-deal .cp-fieldwrap > .form-control:not([data-cp-field='main_competitor']), .cp-deal .cp-fieldwrap > .form-select, .cp-deal .cp-ig > .form-control, .cp-when .form-control, .cp-risk .cp-risk-cols .form-control) {
  border-color: transparent; background-color: transparent; box-shadow: none; padding-left: 0.3rem; margin-left: -0.3rem; resize: none; cursor: text;
}
[data-closing-plan] .cp-deal .cp-fieldwrap > .form-select:not(:hover):not(:focus) { background-image: none; cursor: pointer; }
[data-closing-plan] :is(.cp-deal .cp-fieldwrap > .form-control:not([data-cp-field='main_competitor']), .cp-deal .cp-fieldwrap > .form-select, .cp-deal .cp-ig > .form-control, .cp-when .form-control, .cp-risk .cp-risk-cols .form-control):hover:not(:focus) {
  border-color: var(--bs-border-color); border-style: dashed;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236c757d'%3E%3Cpath d='M12.146.146a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1 0 .708l-10 10a.5.5 0 0 1-.168.11l-5 2a.5.5 0 0 1-.65-.65l2-5a.5.5 0 0 1 .11-.168zM11.207 2.5 13.5 4.793 14.793 3.5 12.5 1.207zm1.586 3L10.5 3.207 4 9.707V10h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.293zm-9.761 5.175-.106.106-1.528 3.821 3.821-1.528.106-.106A.5.5 0 0 1 5 12.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.468-.325'/%3E%3C/svg%3E") no-repeat right 0.4rem center / 0.75rem;
}
[data-closing-plan] :is(.cp-deal .cp-fieldwrap > .form-control:not([data-cp-field='main_competitor']), .cp-deal .cp-fieldwrap > .form-select, .cp-deal .cp-ig > .form-control, .cp-when .form-control, .cp-risk .cp-risk-cols .form-control):focus {
  border-style: solid; background-color: var(--bs-body-bg); resize: vertical;
}
[data-closing-plan] .cp-deal .cp-ig > .input-group-text { border-color: transparent; background: transparent; color: var(--opp3-caption); padding-left: 0.25rem; }
[data-closing-plan] .cp-deal .cp-ig:focus-within > .input-group-text { border-color: var(--bs-border-color); background: var(--bs-tertiary-bg); color: var(--bs-body-color); }
[data-closing-plan] .cp-when .date-dmy-btn:not(:hover):not(:focus-visible) { border-color: transparent; background: transparent; }
/* T-0271: K EUR amounts: the box is as wide as the typed value; the number and K EUR right after it in bold blue (--sales-link-strong, AA in 3 themes) */
.cp-fieldwrap.cp-money { flex-wrap: wrap; gap: 0.15rem 0.35rem; }
.cp-fieldwrap.cp-money > .cp-fit { flex: 0 0 auto; width: auto; field-sizing: content; min-width: 3.5rem; max-width: 100%; font-variant-numeric: tabular-nums; }
[data-closing-plan] .cp-fieldwrap.cp-money > .cp-fit:hover:not(:focus) { background-image: none; }
.cp-unit, .cp-fieldwrap.cp-money > .cp-fit, .cp-read.cp-amount { font-weight: 700; color: var(--sales-link-strong, var(--bs-link-color)); }
.cp-unit { white-space: nowrap; }
.cp-fieldwrap.cp-money > .cp-status { flex: 1 1 100%; }
/* T-0272 (the user, 2026-11-24): Actions > Print closing plan. Only the Closing plan tab goes to paper: A4, no borders, black on white,
   like a Word document (a title block, section headings, label / value rows). app.js [data-opp-print] adds body.print-closing for the print.
   Everything that neither holds nor sits inside the tab is hidden (:has); its ancestors lose their layout (columns, padding, cards). */
.cp-print-head { display: none; }
@page closing-plan { size: A4 portrait; margin: 16mm 16mm 18mm; }
@media print {
  body.print-closing { background: #fff !important; color: #111 !important; font: 10pt/1.4 'Segoe UI', Calibri, Arial, sans-serif; }
  body.print-closing *:not(:has(.print-target-pane)):not(.print-target-pane):not(.print-target-pane *) { display: none !important; }
  body.print-closing *:has(.print-target-pane) { display: block !important; position: static !important; margin: 0 !important; padding: 0 !important; width: auto !important; max-width: none !important; min-height: 0 !important; height: auto !important; overflow: visible !important; background: none !important; border: 0 !important; box-shadow: none !important; transform: none !important; container-type: normal !important; }
  body.print-closing .print-target-pane { page: closing-plan; display: block !important; opacity: 1 !important; color: #111 !important; }
  body.print-closing .print-target-pane * { color: #111 !important; background: transparent !important; box-shadow: none !important; border-color: transparent !important; }
  body.print-closing .print-target-pane [data-closing-plan] { container-type: normal !important; }
  /* title block */
  body.print-closing .cp-print-head { display: block; margin: 0 0 14pt; padding-bottom: 8pt; border-bottom: 1.5pt solid #1f3a64 !important; }
  body.print-closing .cp-print-kicker { margin: 0; font-size: 8.5pt; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #1f3a64 !important; }
  body.print-closing .cp-print-title { margin: 2pt 0 0; font-size: 18pt; font-weight: 700; }
  body.print-closing .cp-print-sub { margin: 1pt 0 8pt; font-size: 11pt; color: #444 !important; }
  body.print-closing .cp-print-meta { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 0 22pt; margin: 0; }
  body.print-closing .cp-print-meta dt { font-size: 7.5pt; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: #666 !important; }
  body.print-closing .cp-print-meta dd { margin: 0; font-weight: 600; }
  /* sections: cards become plain sections with a heading; collapse toggles, buttons, hints and save messages are not printed */
  body.print-closing .print-target-pane .opp3-card { border: 0 !important; padding: 0 !important; margin: 0 0 14pt !important; break-inside: auto; }
  body.print-closing .print-target-pane .opp3-head { display: block !important; margin: 0 0 6pt !important; padding: 0 0 3pt !important; border-bottom: 0.75pt solid #9aa5b1 !important; break-after: avoid; }
  body.print-closing .print-target-pane .opp3-h { margin: 0 !important; font-size: 12.5pt !important; font-weight: 700; }
  body.print-closing .print-target-pane .opp3-h, body.print-closing .print-target-pane .opp3-h * { color: #1f3a64 !important; }
  body.print-closing .print-target-pane .opp3-toggle { display: inline !important; padding: 0 !important; border: 0 !important; font: inherit !important; }
  body.print-closing .print-target-pane :is(.opp3-chev, .opp3-add) { display: none !important; }
  body.print-closing .print-target-pane :is(button:not(.opp3-toggle), .btn, .cp-status, .cp-hint, .opp3-explain, .cp-risk-tools, .cp-risk-add, .date-dmy-btn, .date-dmy-pop, .form-check-input, .cp-act-head, .cp-pencil) { display: none !important; }
  body.print-closing .print-target-pane .collapse { display: block !important; height: auto !important; }
  /* fields read as text */
  body.print-closing .print-target-pane :is(input, select, textarea) { border: 0 !important; padding: 0 !important; margin: 0 !important; min-height: 0 !important; height: auto !important; font: inherit !important; color: #111 !important; background: none !important; appearance: none !important; resize: none !important; box-shadow: none !important; width: 100% !important; field-sizing: content; overflow: visible !important; }
  body.print-closing .print-target-pane ::placeholder { color: #777 !important; }
  body.print-closing .print-target-pane .cp-fieldwrap.cp-money > .cp-fit { width: auto !important; min-width: 1.2rem !important; flex: 0 0 auto !important; }
  body.print-closing .print-target-pane .cp-ig { display: inline-flex !important; flex-wrap: nowrap !important; width: auto !important; }
  body.print-closing .print-target-pane .cp-ig > .form-control { width: auto !important; min-width: 1.2rem !important; flex: 0 0 auto !important; }
  body.print-closing .print-target-pane .cp-when .form-control::placeholder { color: transparent !important; }
  body.print-closing .print-target-pane .input-group-text { padding: 0 0 0 3pt !important; border: 0 !important; font: inherit !important; }
  body.print-closing .print-target-pane :is(.cp-unit, .cp-fit, .cp-amount) { color: #1f3a64 !important; }
  /* Deal: two columns of label / value rows */
  body.print-closing .print-target-pane .cp-deal { display: grid !important; grid-template-columns: 1fr 1fr; gap: 0 18pt; }
  body.print-closing .print-target-pane .cp-col { gap: 0 !important; }
  body.print-closing .print-target-pane .opp3-pair { padding: 3pt 0; border-bottom: 0.5pt solid #d5d9de !important; break-inside: avoid; }
  body.print-closing .print-target-pane .opp3-pair > dt { font-size: 7.5pt !important; color: #666 !important; text-transform: uppercase; letter-spacing: 0.03em; }
  body.print-closing .print-target-pane .cp-auto { padding: 0 !important; font-weight: 600; }
  /* Closing activities: a 4-column table (activity, status, when, comment) */
  body.print-closing .print-target-pane .cp-group-h { font-size: 9pt !important; color: #1f3a64 !important; border-bottom: 0.75pt solid #1f3a64 !important; margin: 8pt 0 2pt !important; break-after: avoid; }
  body.print-closing .print-target-pane .cp-act-row { display: grid !important; grid-template-columns: 38% 12% 15% 35% !important; gap: 0 6pt !important; padding: 2.5pt 0 !important; font-size: 9pt !important; border-bottom: 0.5pt solid #d5d9de !important; break-inside: avoid; }
  body.print-closing .print-target-pane .cp-act-row .cp-act, body.print-closing .print-target-pane .cp-act-row .cp-comment { grid-column: auto !important; padding: 0 !important; }
  body.print-closing .print-target-pane .cp-switch { margin: 0 !important; min-height: 0 !important; }
  body.print-closing .print-target-pane .cp-state.is-unset { color: #888 !important; font-weight: 400; }
  body.print-closing .print-target-pane .cp-when .date-dmy { max-width: none !important; }
  /* Risks: numbered, risk | mitigation */
  body.print-closing .print-target-pane .cp-risk { grid-template-columns: 14pt 1fr !important; padding-bottom: 4pt !important; border-bottom: 0.5pt solid #d5d9de !important; break-inside: avoid; }
  body.print-closing .print-target-pane .cp-risk-cols { grid-template-columns: 1fr 1fr !important; }
  body.print-closing .print-target-pane .cp-colhead { font-size: 7.5pt !important; color: #666 !important; text-transform: uppercase; }
}
/* the tab sits in the middle column (about 450px wide at 1280): the layout follows the width of the tab, not of the window */
[data-closing-plan] { container-type: inline-size; }
@container (max-width: 760px) {
  .cp-act-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .cp-act-head { display: none; }
  .cp-act-row .cp-act { grid-column: 1 / -1; padding-top: 0; }
  .cp-act-row .cp-comment { grid-column: 1 / -1; }
  .cp-deal { grid-template-columns: minmax(0, 1fr); }
  .cp-risk { grid-template-columns: 1.4rem minmax(0, 1fr); }
  .cp-risk-tools { grid-column: 2; }
  .cp-risk-cols { grid-template-columns: minmax(0, 1fr); }
}
@container (max-width: 360px) {
  .cp-act-row { grid-template-columns: minmax(0, 1fr); }
}

/* T-0263 (the user, 2026-11-24): the company screen in the opportunity view's three columns (entities/customer.ejs reuses .opp3-*). */
.opp3-ident h1.opp3-company { font-size: 1.3rem; font-weight: 700; line-height: 1.25; margin: 0; }
.cust3-page .opp3-cui { margin-top: 0.15rem; }
.cust3-page .opp3-cui .text-muted-2 { color: var(--sales-muted-strong, var(--bs-secondary-color)) !important; }
.cust3-rows { display: grid; gap: 0.6rem; }
.cust3-rows > li { min-width: 0; overflow-wrap: anywhere; }
.cust3-rows .text-muted-2 { color: var(--sales-muted-strong, var(--bs-secondary-color)) !important; }
.cust3-list.opp3-card { padding: 0; overflow: hidden; }
.cust3-list .empty-state { padding: 1rem; }
.cust3-google .btn { white-space: normal; }
.cust3-page .opp3-explain[open] > p { left: 0; max-width: calc(100vw - 3rem); }
.cust3-page .contacts-panel .cp-rows { margin-top: 0.25rem; }
/* the Related users partial (05) is a 8 + 4 grid made for a full-width page: inside the centre column its two parts stack */
.cust3-page #related-users > [class*='col-lg-'] { flex: 0 0 100%; max-width: 100%; }
/* T-0263 polish: compact number tiles filling the card, one-line tabs, hero header on two rows, one-line card titles */
.cust3-page .stat-signs-large { grid-template-columns: repeat(auto-fit, minmax(4.5rem, 1fr)); gap: 0.5rem; margin: 0; }
@media (max-width: 575.98px) { .cust3-page .stat-signs-large { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cust3-page .stat-signs-large .stat-sign { padding: 0.35rem 0.5rem; }
.cust3-page .stat-signs-large .stat-sign-value { font-size: 1.25rem; }
.cust3-page .stat-signs-large .stat-sign-label { font-size: 0.75rem; }
.cust3-page .opp3-tabs { overflow-x: auto; }
.cust3-page .opp3-tabs .nav-item { flex: 1 0 auto; }
.cust3-page .opp3-tabs .nav-link { white-space: nowrap; }
.cust3-page .opp3-tabs .badge { display: inline; }
.cust3-back { margin-bottom: 0.5rem; }
.cust3-actions { display: flex; align-items: center; justify-content: flex-start; gap: 0.5rem; margin-bottom: 0.75rem; }
.cust3-actions .btn { display: inline-flex; align-items: center; gap: 0.3rem; white-space: nowrap; line-height: 1.5; }
.cust3-page .opp3-h { flex: 1 1 0; min-width: 0; }
.cust3-page .opp3-toggle { white-space: nowrap; }
.cust3-page .opp3-toggle > span { overflow: hidden; text-overflow: ellipsis; }
.cust3-page .opp3-right .opp3-h, .cust3-page .opp3-right .opp3-toggle { font-size: 0.9375rem; gap: 0.3rem; }
.cust3-page .opp3-right .opp3-card { padding-left: 0.7rem; padding-right: 0.7rem; }
.cust3-page .opp3-add { white-space: nowrap; font-size: 0.8125rem; padding: 0.1rem 0.25rem; }

/* T-0265: the installations card (sort drop-down + Table / Export modal) and the industry label on narrow screens */
.cust3-page [data-inst-tools] .form-select { max-width: 100%; }
#cust-inst-modal .modal-header .table-tools { flex-wrap: wrap; }
.industry-label { overflow-wrap: anywhere; }

td.industry-label { min-width: 11rem; max-width: 18rem; }
/* T-0265: links in the installations table stay AA on the hovered / striped row (as on the other grey panels) */
:root:not([data-bs-theme='dark']) #cust-inst-modal { --bs-link-color: #0052cc; --bs-link-color-rgb: 0, 82, 204; }
/* T-0267: the company view's in-place fields (entities/_customer-field.ejs) */
.cust-ie-form .form-select, .cust-ie-form .creatable { min-width: min(14rem, 100%); flex: 1 1 100%; }
.cust-ie-industry .cust-ie-form, .cust-ie-place .cust-ie-form, .cust-ie-part_of .cust-ie-form, .cust-ie-account_owner_id .cust-ie-form { flex-direction: column; align-items: stretch; }
.cust-ie-part_of .part-of, .cust-ie-account_owner_id .form-select { width: 100%; }
.cust-ie-form .btn { flex: 0 0 auto; }
.cust-ie-name, .cust-ie-code { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.25rem; }
.cust-ie-name .cust-ie-form .form-control { min-width: min(18rem, 100%); font-size: 1rem; }
@media (max-width: 575.98px) { .cust-ie-form .form-control { min-width: 0; flex: 1 1 100%; } }
/* TR-T0267-1 D-3: the refused-value message in AA contrast on dark (Bootstrap's --bs-form-invalid-color is below 4.5:1 there) */
.cust-ie-form .invalid-feedback { color: var(--bs-danger-text-emphasis); }
/* on the company screen's dark card (#333b43) even --bs-danger-text-emphasis (#ea868f) is 4.49:1 (measured): Bootstrap's red-200 */
[data-bs-theme='dark'] .cust-ie-form .invalid-feedback { color: #f1aeb5; }
/* T-0268 (the user, 2026-11-23): the opportunity list's Actions column: icon + count chips (calls, meetings, emails, other); zero = muted */
.sales-actions-list { display: inline-flex; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.sales-action-chip { display: inline-flex; align-items: center; gap: 0.2rem; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--bs-body-color); }
.sales-action-chip.is-zero { font-weight: 400; color: var(--sales-muted-strong, var(--bs-secondary-color)); }

/* ── T-0279 / T-0280 / T-0283 (06): demos ── */
/* the Demo's Owner: the T-0271 in-place look (no box at rest, a dashed box + pencil on hover, the normal box on focus), half width */
.act-owner-inplace .act-resp-group .input-group-text { background: transparent; border-color: transparent; }
.act-owner-inplace .act-resp-group .form-select { border-color: transparent; background-color: transparent; font-weight: 600; }
.act-owner-inplace .act-resp-group:hover .form-select { border: 1px dashed var(--atlas-border, var(--bs-border-color)); }
.act-owner-inplace .act-resp-group:hover .input-group-text { border-color: transparent; }
.act-owner-inplace .act-resp-group:hover .input-group-text .bi::before { content: '\F4CB'; } /* bi-pencil */
.act-owner-inplace .act-resp-group .form-select:focus { border: 1px solid var(--bs-border-color); background-color: var(--bs-body-bg); }
/* the Products grid of a Demo: a small table; on a phone each row is a stacked card */
.demo-grid { --bs-table-bg: transparent; }
.demo-grid th { font-size: 0.8125rem; font-weight: 600; white-space: nowrap; }
.demo-grid td { vertical-align: top; }
.demo-grid .demo-grid-product { min-width: 10rem; }
.demo-grid .demo-grid-people { min-width: 10rem; max-width: 14rem; }
.demo-grid .demo-grid-people .multiselect-menu { max-height: 16rem; overflow-y: auto; }
.demo-grid .demo-grid-remove { width: 2.5rem; text-align: end; }
.demo-grid .demo-grid-remove .btn { --bs-btn-color: var(--bs-danger-text-emphasis, var(--bs-danger)); }
@media (max-width: 575.98px) {
  .demo-grid thead { display: none; }
  .demo-grid, .demo-grid tbody, .demo-grid tr, .demo-grid td { display: block; width: 100%; }
  .demo-grid tr { position: relative; padding: 0.5rem 2.5rem 0.5rem 0.5rem; margin-bottom: 0.5rem; border: 1px solid var(--atlas-border, var(--bs-border-color)); border-radius: 0.5rem; }
  .demo-grid td { padding: 0.2rem 0; border: 0; max-width: none; }
  .demo-grid .demo-grid-remove { position: absolute; top: 0.25rem; right: 0.25rem; width: auto; }
}
/* Demos/Presales list and the Actions tab: product names and comments under the main text */
.demo-comments, .demo-none { color: var(--sales-muted-strong, var(--bs-body-color)); }
.demo-quick-list { gap: 0.25rem; flex-wrap: wrap; }
.demo-quick-list .nav-link { padding: 0.25rem 0.75rem; font-size: 0.875rem; border: 1px solid var(--atlas-border, var(--bs-border-color)); color: var(--sales-link-strong, var(--bs-link-color)); }
.demo-quick-list .nav-link.active { color: #fff; background: var(--bs-primary); border-color: var(--bs-primary); }
.demo-table .demo-comments { max-width: 22rem; white-space: pre-line; }
/* T-0280: My calendar, a demo the user takes part in (icon + text, never colour alone) */
.mc-part { display: inline-flex; align-items: center; gap: 0.2rem; font-weight: 600; }
.demo-list-wrap { min-width: 0; }
/* T-0284: demo approval badges (icon + text, never colour alone; text in the body colour on a light tint of the state colour) */
.demo-badge { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.05rem 0.5rem; border: 1px solid var(--atlas-border, var(--bs-border-color)); border-radius: 1rem; font-size: 0.8125rem; font-weight: 600; color: var(--bs-body-color); white-space: nowrap; }
.demo-badge-pending { border-color: var(--bs-warning); background: color-mix(in srgb, var(--bs-warning) 14%, var(--atlas-surface, var(--bs-body-bg))); }
.demo-badge-approved { border-color: var(--bs-success); background: color-mix(in srgb, var(--bs-success) 12%, var(--atlas-surface, var(--bs-body-bg))); }
.demo-badge-rejected { border-color: var(--bs-danger); background: color-mix(in srgb, var(--bs-danger) 12%, var(--atlas-surface, var(--bs-body-bg))); }
.demo-approval-by, .demo-approval-note { color: var(--sales-muted-strong, var(--bs-body-color)); }
.demo-approval { min-width: 9rem; }
.demo-approval .demo-approval-note { max-width: 18rem; }
.demo-decide form { margin-right: 0.25rem; }
.demo-decide .btn-outline-success { --bs-btn-color: var(--bs-success-text-emphasis, var(--bs-success)); }
.demo-decide .btn-outline-danger { --bs-btn-color: var(--bs-danger-text-emphasis, var(--bs-danger)); }
.demo-approval-line { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
/* T-0284: Settings → Demos and presales process, the "No longer members" note (C-6) */
.dp-stale { padding: 0.5rem 0.75rem; border-left: 3px solid var(--bs-warning); border-radius: 0.25rem; background: color-mix(in srgb, var(--bs-warning) 8%, var(--atlas-surface, var(--bs-body-bg))); }
/* T-0289: installations import (upload, columns, review + problems modal, result). Theme colours come from Bootstrap's subtle /
   emphasis tokens, which light, dark and blue all define. */
.imp-file-name { overflow-wrap: anywhere; }
.imp-hints { padding-left: 1.1rem; }
.imp-hints li + li { margin-top: 0.15rem; }
.imp-open-jobs .list-group-item { background: transparent; }
.imp-columns-status:focus { outline: none; }
.imp-columns-status:focus-visible { outline: 2px solid var(--atlas-focus); outline-offset: 2px; }
.imp-settings { min-width: 0; }
.imp-settings legend { margin-bottom: 0.5rem; }
.imp-cols-wrap { border: 1px solid var(--atlas-border); border-radius: 0.375rem; }
.imp-cols { --bs-table-bg: transparent; }
.imp-cols th, .imp-cols td { vertical-align: top; }
.imp-cols thead th { font-size: 0.8rem; color: var(--atlas-muted); font-weight: 600; white-space: nowrap; }
.imp-col-head { min-width: 10rem; max-width: 22rem; font-weight: 600; }
.imp-col-samples { min-width: 10rem; max-width: 22rem; }
.imp-col-samples li { color: var(--atlas-muted); }
.imp-col-map { min-width: 14rem; }
.imp-badge-ai { background: var(--bs-info-bg-subtle); color: var(--bs-info-text-emphasis); border: 1px solid var(--bs-info-border-subtle); font-weight: 600; }
.imp-badge-matched { background: var(--bs-success-bg-subtle); color: var(--bs-success-text-emphasis); border: 1px solid var(--bs-success-border-subtle); font-weight: 600; }
.imp-parsed li { overflow-wrap: anywhere; }
.imp-parsed-bad { color: var(--bs-danger-text-emphasis); font-weight: 600; }
/* the select's label is for screen readers on wide screens; on a phone each column is a card and the labels show */
.imp-cols .imp-cell-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 767.98px) {
  .imp-cols-wrap { border: 0; overflow: visible; }
  .imp-cols thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .imp-cols, .imp-cols tbody, .imp-cols tr, .imp-cols th, .imp-cols td { display: block; width: 100%; max-width: none; min-width: 0; }
  .imp-cols tr { border: 1px solid var(--atlas-border); border-radius: 0.375rem; margin-bottom: 0.75rem; padding: 0.5rem 0.75rem; }
  .imp-cols th, .imp-cols td { border: 0; padding: 0.25rem 0; }
  .imp-cols .imp-cell-label { position: static; width: auto; height: auto; margin: 0 0 0.15rem; overflow: visible; clip: auto; white-space: normal; display: block; font-size: 0.75rem; color: var(--atlas-muted); font-weight: 600; }
}
.imp-count-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: 0.5rem 1rem; }
.imp-count-list > div { min-width: 0; }
.imp-count-list dt { font-size: 0.75rem; font-weight: 600; color: var(--atlas-muted); }
.imp-count-list dd { margin: 0; font-size: 1.15rem; font-weight: 700; }
.imp-count-bad dd { color: var(--bs-danger-text-emphasis); }
.imp-count-ok dd { color: var(--bs-success-text-emphasis); }
.imp-run { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.imp-run-why { color: var(--atlas-muted); }
.imp-unresolved { color: var(--bs-danger-text-emphasis); }
.imp-groups td { overflow-wrap: anywhere; }
.imp-pill-new { background: var(--bs-success-bg-subtle); color: var(--bs-success-text-emphasis); border: 1px solid var(--bs-success-border-subtle); }
.imp-pill-dup-import { background: var(--bs-warning-bg-subtle); color: var(--bs-warning-text-emphasis); border: 1px solid var(--bs-warning-border-subtle); }
.imp-pill-dup-skip, .imp-pill-skipped { background: var(--bs-secondary-bg-subtle); color: var(--bs-secondary-text-emphasis); border: 1px solid var(--bs-secondary-border-subtle); }
.imp-pill-blocked { background: var(--bs-danger-bg-subtle); color: var(--bs-danger-text-emphasis); border: 1px solid var(--bs-danger-border-subtle); }
.imp-problem { border-left: 3px solid var(--atlas-border); }
.imp-problem-open { border-left-color: var(--bs-danger); }
.imp-problem-set { min-width: 0; }
.imp-problem-set:focus { outline: none; }
.imp-problem-set:focus-visible { outline: 2px solid var(--atlas-focus); outline-offset: 4px; border-radius: 0.25rem; }
.imp-problem-set legend { float: none; width: auto; font-size: 0.95rem; }
.imp-state-open { background: var(--bs-danger-bg-subtle); color: var(--bs-danger-text-emphasis); border: 1px solid var(--bs-danger-border-subtle); }
.imp-state-decided { background: var(--bs-warning-bg-subtle); color: var(--bs-warning-text-emphasis); border: 1px solid var(--bs-warning-border-subtle); }
.imp-state-resolved { background: var(--bs-success-bg-subtle); color: var(--bs-success-text-emphasis); border: 1px solid var(--bs-success-border-subtle); }
.imp-state-moot, .imp-state-info { background: var(--bs-secondary-bg-subtle); color: var(--bs-secondary-text-emphasis); border: 1px solid var(--bs-secondary-border-subtle); }
.imp-invalid { color: var(--bs-warning-text-emphasis); }
.imp-sub { min-width: 0; max-width: 32rem; margin: 0; padding: 0; border: 0; }
.imp-created { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }

/* T-0287 L2-FE (DESIGN-T0287 3): the Installations list. The table is .list-table (link contrast on striped rows, 1.7). */
.inst-suite-pills { display: inline-flex; flex-wrap: wrap; gap: 0.25rem; }
.inst-view-owner { color: var(--bs-secondary-color); }
.inst-views-menu { max-height: 70vh; overflow-y: auto; }
.inst-views-menu .dropdown-header { color: var(--bs-secondary-color); } /* Bootstrap's #6c757d fails AA on the dark menu */
/* T-0288 (DESIGN-T0287 5.1, 5.2): the Installations graphs page: the grey page of .opp3-page, white panels without border. The chart
   marks take the amCharts demos' own colours (the user, 2026-11-25), set in app.js [data-inst-chart]; no palette tokens here. */
.inst-graphs .surface.inst-graph-panel { border: 0; background: var(--opp3-card-bg); }
.inst-chart { width: 100%; height: 340px; }
.inst-chart-wide { height: 440px; }
@media (max-width: 575.98px) { .inst-chart { height: 300px; } .inst-chart-wide { height: 460px; } }
.inst-graph-table { margin-top: 0.5rem; }
.inst-graph-table table { --bs-table-bg: transparent; }
.inst-graph-panel .opp3-explain[open] > p { right: 0; left: auto; }

/* ── T-0287 S-FE (06): the installation screen (installations/show.ejs) on the company screen's frame (.opp3-page.cust3-page) ── */
.inst3-pane-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; min-height: 2.25rem; margin-bottom: 0.4rem; }
.inst3-lines.opp3-card { padding: 0.5rem 0 0.8rem; }
.inst3-lines > .inst3-pane-head { padding: 0 0.9rem; }
.inst3-lines .empty-state { padding: 1rem; }
.inst3-lines #inst-lines-view > .install-totals-float { margin-right: 0.9rem; }
.inst3-editor > summary { list-style: none; display: inline-flex; align-items: center; gap: 0.3rem; }
.inst3-editor > summary::-webkit-details-marker { display: none; }
.inst3-editor[open] > summary { margin-bottom: 0.25rem; }
/* the editor's totals sit under its table (the read-only table's own totals keep floating) */
.install-totals-float.inst3-totals-static { position: static; box-shadow: none; margin-top: 0.5rem; }
.inst3-customer { overflow-wrap: anywhere; }
/* the hero's Delete: the emphasis red (AA on the dark card #333b43 too; the .stage-edit pattern) */
.inst3-page .cust3-actions .btn-outline-danger { --bs-btn-color: var(--bs-danger-text-emphasis); --bs-btn-border-color: var(--bs-danger-text-emphasis); }
/* dark: #ea868f on #333b43 is 4.49:1 (axe); #f1aeb5 is about 6:1 */
[data-bs-theme='dark'] .inst3-page .cust3-actions .btn-outline-danger { --bs-btn-color: #f1aeb5; --bs-btn-border-color: #f1aeb5; }
.inst3-specifics img { max-width: 100%; height: auto; }
.inst3-specifics { overflow-wrap: anywhere; }
.inst3-specifics table { display: block; max-width: 100%; overflow-x: auto; }
/* in-place fields: two controls side by side (dates, amount + currency); on a phone they stack */
.inst-ie-form { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0.35rem; }
.inst-ie-form > .form-control, .inst-ie-form > .form-select, .inst-ie-form > .inst-ie-pair, .inst-ie-form > .person-pick { flex: 1 1 100%; min-width: 0; }
.inst-ie-pair { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.inst-ie-pair > * { flex: 1 1 8rem; min-width: 0; }
.inst-ie-pair > .inst-ie-cur { flex: 0 1 6rem; }
/* T-0309: the form's read-only Value (sum of the lines), on the line of the inputs beside it */
.inst-value-ro { padding: 0.375rem 0; min-height: calc(1.5em + 0.75rem + 2px); }
.inst-ie > [data-ie-view] { display: inline; }
.inst-ie-owner > [data-ie-view], .inst-ie-notes > [data-ie-view] { display: block; }
.inst-ie-owner > .inline-edit-open { margin-top: 0.35rem; }
/* the comment thread's small "Edit" link on the white card: the strong link colour (AA in light, dark and blue) */
.inst-comments summary.btn-link { color: var(--sales-link-strong, var(--bs-link-color)); }
/* the rich editor without JS: its source textarea is the field (mail-editor noJsSource); the messages of the picture checks */
.mail-source-nojs { min-height: 12rem; font-family: var(--bs-font-monospace); font-size: 0.8125rem; }
.mail-msg { padding: 0.4rem 0.75rem; color: var(--bs-danger-text-emphasis); background: var(--bs-danger-bg-subtle); border-top: 1px solid var(--bs-border-color); }

/* T-0304 (DESIGN-T0287 14.6): a line comment in Analysis by lines, clipped to 2 lines (the full text in title) */
.inst-line-cmt { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 18rem; white-space: normal; }

/* T-0306 + T-0312 (DESIGN-T0306-installations-r5 1.1, 1.3; 06): the new installation page (installations/create.ejs) on the screen's
   frame. The Existing / New customer choice is CSS only (:has on the checked radio), so it also works without JS. */
.inst-new-f { margin: 0 0 0.9rem; min-width: 0; }
fieldset.inst-new-f { border: 0; padding: 0; }
.instnew-panel { min-width: 0; }
.instnew-new { padding: 0.6rem; border-radius: 0.5rem; border: 1px solid var(--bs-border-color); } /* no tint: the outline buttons and muted text keep AA on the card */
.instnew-both:has(#instnew-mode-new:checked) [data-instnew-panel='existing'],
.instnew-both:has(#instnew-mode-existing:checked) [data-instnew-panel='new'] { display: none; }
.instnew-modes .form-check-inline { margin-right: 0.75rem; }
.inst3-new .inst3-lines > .inst3-new-lines-foot { padding: 0.5rem 0.9rem 0; }
.inst3-new #instnew-anaf-result .anaf-result { overflow-wrap: anywhere; }
/* the messages after a 422 in AA on every card: --bs-danger-text-emphasis (blue), Bootstrap's red-200 on the dark card #333b43 */
.inst3-new .invalid-feedback { color: var(--bs-danger-text-emphasis); }
[data-bs-theme='dark'] .inst3-new .invalid-feedback { color: #f1aeb5; }
/* the ANAF answer in the narrow left column: label above value (the 3/9 grid of the customer form squeezed the labels to one letter a line) */
.instnew-new .anaf-result { padding: 0.6rem; }
.instnew-new .anaf-result dl.row > dt, .instnew-new .anaf-result dl.row > dd { flex: 0 0 auto; width: 100%; }
.instnew-new .anaf-result dl.row > dd { margin-bottom: 0.35rem; }
/* ── T-0310 (DESIGN-T0306 2.1): product lines as cards (installations/_inst-lines-grid.ejs, _line-card.ejs), the line modal and page
   (_line-form.ejs, line-page.ejs), the create page's cards and no-JS fieldsets. The grid follows the width of the centre card: auto-fill
   columns of at least 15rem (one column at 375 px); min() keeps a card inside a parent narrower than 15rem (no sideways scroll). */
.inst-lines { padding: 0 0.9rem; }
.inst-lines-bar { display: flex; justify-content: flex-end; margin-bottom: 0.5rem; }
.inst3-lines .inst-lines > .install-totals-float { margin-right: 0; }
.inst-line-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(15rem, 100%), 1fr)); gap: 0.75rem; padding: 0; }
.inst-line-card { display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; padding: 0.75rem; border: 1px solid var(--atlas-border); border-radius: 0.5rem; background: var(--atlas-surface); }
.inst-line-card-title { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin: 0; font-size: 0.9rem; font-weight: 600; overflow-wrap: anywhere; }
.inst-line-suite { white-space: normal; text-align: start; overflow-wrap: anywhere; }
.inst-line-dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.4rem 0.75rem; margin: 0; }
.inst-line-dl > div { min-width: 0; }
.inst-line-dl dt { font-size: 0.75rem; font-weight: 600; color: var(--opp3-caption, var(--atlas-muted)); margin: 0; }
.inst-line-dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.inst-line-wide { grid-column: 1 / -1; }
.inst-line-comments { display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.inst-line-card-foot { display: flex; justify-content: flex-end; margin-top: auto; }
.inst-line-card.is-invalid { border-color: var(--bs-danger-text-emphasis); }
.inst-line-err { color: var(--bs-danger-text-emphasis); font-weight: 600; }
[data-bs-theme='dark'] .inst-line-err { color: #f1aeb5; }
.inst-line-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 1rem; }
.inst-line-body .invalid-feedback, .inst-line-page .invalid-feedback, .inst-line-modal .invalid-feedback { color: var(--bs-danger-text-emphasis); }
[data-bs-theme='dark'] .inst-line-body .invalid-feedback, [data-bs-theme='dark'] .inst-line-page .invalid-feedback, [data-bs-theme='dark'] .inst-line-modal .invalid-feedback { color: #f1aeb5; }
.inst-line-modal .btn-outline-danger, .inst-line-page .btn-outline-danger { --bs-btn-color: var(--bs-danger-text-emphasis); --bs-btn-border-color: var(--bs-danger-text-emphasis); }
[data-bs-theme='dark'] .inst-line-modal .btn-outline-danger, [data-bs-theme='dark'] .inst-line-page .btn-outline-danger { --bs-btn-color: #f1aeb5; --bs-btn-border-color: #f1aeb5; }
.inst-line-page { max-width: 48rem; }
.inst-new-lines { padding: 0 0.9rem; }
.inst-new-line-set { min-width: 0; margin: 0 0 0.75rem; padding: 0.75rem; border: 1px solid var(--atlas-border); border-radius: 0.5rem; }
.inst-new-line-set > legend { float: none; width: auto; margin: 0 0 0.25rem; padding: 0 0.25rem; font-size: 0.85rem; font-weight: 600; }
.inst-new-lines .inst-line-grid { margin-bottom: 0.5rem; }

/* ── T-0314 (DESIGN-T0306 3.3-3.4): partner installation. The Partner picker shows only while "Partner installation" is ticked: CSS only
   (:has), so it also works without JS (installations/_inst-field.ejs 'partner', create.ejs hero). The list's partner company chips. ── */
.inst-partner-box { flex: 1 1 100%; min-width: 0; }
.inst-partner-box:has(.inst-partner-flag:not(:checked)) .inst-partner-pick { display: none; }
.inst-partner-pick > .form-control { width: 100%; min-width: 0; }
/* while the in-place form is open its own checkbox says "Partner installation" */
.inst3-partner:has(.inst-ie-form:not([hidden])) > .inst3-partner-l { display: none; }
.inst3-partner { margin-top: 0.35rem; overflow-wrap: anywhere; }
.inst3-partner > .inst-ie { display: inline; }
.inst3-partner > .inst-ie > .inst-ie-form { margin-top: 0.35rem; }
.inst3-new-partner { padding-top: 0.75rem; border-top: 1px solid var(--atlas-border); }
.inst-pc-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; min-width: 0; max-width: 100%; }
.inst-pc-chip { display: inline-flex; align-items: center; gap: 0.35rem; min-width: 0; max-width: 100%; margin: 0; padding: 0.15rem 0.6rem; border: 1px solid var(--atlas-border); border-radius: 999px; background: var(--bs-body-bg); font-size: 0.8125rem; overflow-wrap: anywhere; cursor: pointer; }
.inst-pc-chip > .form-check-input { flex: 0 0 auto; margin: 0; }
.inst-pc-add { min-width: 0; max-width: 100%; }
.inst-pc-add > .form-control { width: 15rem; max-width: 100%; }

/* ── 06 small fixes (2026-11-26) ── */
/* T-0299: on a phone a backlog row wraps (the title, badges, avatar and menu no longer push the page 233 px sideways), and so does
   each section's quick-create form (type, epic, title, Create) */
@media (max-width: 575.98px) {
  .backlog-row, .inline-create { flex-wrap: wrap; row-gap: 0.25rem; }
  .backlog-row .title { flex: 1 1 8rem; }
  .inline-create > * { min-width: 0; max-width: 100%; }
}
/* T-0301: the colleague strip scrolls inside itself: its visually hidden texts (position: absolute) took the page as their containing
   block and widened it (1461 px at 1280 for a user with a team) */
.colleague-grid { position: relative; }
/* T-0176 / T-0310: the floating totals keep floating (the user's T-0176) but leave the cards free where it counts: a card scrolled to
   or focused (Tab to its Edit, a saved line brought into view) stops above the box, not under it
   (scroll-padding, about the box's height); at the end of the page the box is back in its place under the grid, as before */
html:has(#inst-lines > .install-totals-float) { scroll-padding-bottom: 9rem; }
/* TR-SMALLFIX-1 D-1: Tab to a card link scrolls to it at once (not smoothly), so app.js [focusin] sees its final place and lifts it above the box */
html:has(#inst-lines > .install-totals-float):has(#inst-lines :focus) { scroll-behavior: auto; }
/* T-0319: an Installations list data row opens the installation (app.js [data-row-open]); group header and total rows do not */
#inst-list[data-row-open] > tbody > tr[data-row-href] { cursor: pointer; }

/* ── T-0313 (DESIGN-T0306-installations-r5 4.3, 4.7, 4.8, 4.11.3): import ANAF region, new customers, help; Company register card ── */
.imp-anaf { border-left: 3px solid var(--bs-info-border-subtle); }
.imp-pill-newcust { background: var(--bs-info-bg-subtle); color: var(--bs-info-text-emphasis); border: 1px solid var(--bs-info-border-subtle); }
.imp-newcust, .imp-reason, .imp-notimp td { overflow-wrap: anywhere; }
.imp-help-card { min-width: 0; overflow-wrap: anywhere; }
.imp-help-card ul { padding-left: 1.1rem; }
.imp-help-k { font-size: 0.8125rem; font-weight: 600; color: var(--atlas-muted); margin: 0.75rem 0 0.25rem; }
.reg-status { min-width: 0; overflow-wrap: anywhere; }
.reg-why { color: var(--atlas-muted); }
.reg-attribution { overflow-wrap: anywhere; }

/* ── T-0307 (DESIGN-T0306 8.6): the Implementation team card (installations/_inst-team.ejs) and the multiple person picker ── */
/* the right column is narrow (about 210 px at 1280): the title may wrap instead of hiding the count; the member actions sit under the text */
.cust3-page .inst-team .opp3-toggle { white-space: normal; }
.cust3-page .inst-team .opp3-toggle > span { overflow: visible; }
.inst-team-list { display: flex; flex-direction: column; gap: 0.625rem; }
.inst-team-m { display: grid; grid-template-columns: 36px minmax(0, 1fr); grid-template-areas: 'face txt' 'face acts' 'edit edit'; column-gap: 0.5rem; align-items: start; }
.inst-team-face { grid-area: face; width: 36px; height: 36px; border-radius: 50%; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; font-size: 0.8rem; object-fit: cover; }
.inst-team-face[data-initials]::before { content: attr(data-initials); }
.inst-team-txt { grid-area: txt; min-width: 0; padding-top: 0.125rem; }
.inst-team-name { display: flex; align-items: center; flex-wrap: wrap; gap: 0.25rem 0.375rem; min-width: 0; }
.inst-team-nm { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inst-team-role { overflow-wrap: anywhere; white-space: normal; }
.inst-team-acts { grid-area: acts; display: flex; flex-wrap: wrap; align-items: center; margin-left: -0.3rem; }
.inst-team-acts form { margin: 0; }
.inst-team-btn { padding: 0.25rem 0.3rem; line-height: 1; }
.inst-team-edit { grid-area: edit; min-width: 0; }
.inst-team-edit > summary { margin-left: 44px; }
.inst-team-sum { cursor: pointer; color: var(--bs-link-color); }
.inst-team-form { margin-top: 0.5rem; padding: 0.5rem; border: 1px solid var(--bs-border-color); border-radius: var(--bs-border-radius); min-width: 0; }
.inst-team-add { margin-top: 0.75rem; }
/* dark: the 422 text on the card (#ea868f on #333b43 is 4.49:1, as the in-place fields) */
[data-bs-theme='dark'] .inst-team .invalid-feedback { color: #f1aeb5; }
.inst-team-hints { display: flex; justify-content: space-between; gap: 0.5rem; margin-top: 0.25rem; }
.inst-team-hints > .form-text { min-width: 0; }
.inst-team-n { flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.inst-team-btns { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-top: 0.5rem; }
.person-pick-multi .person-pick-menu { max-height: none; overflow: visible; }
.person-pick-list { max-height: 16rem; overflow-y: auto; padding: 0.25rem 0; }
.person-pick-box { flex: 0 0 auto; font-size: 1rem; }
.person-pick-chips { display: flex; flex-wrap: wrap; gap: 0.375rem; margin: 0.5rem 0 0; }
.person-pick-chip { display: inline-flex; align-items: center; gap: 0.375rem; max-width: 100%; min-width: 0; padding: 0.125rem 0.375rem 0.125rem 0.125rem; border: 1px solid var(--bs-border-color); border-radius: 1rem; font-size: 0.8125rem; }
.person-pick-chip .person-pick-face { width: 20px; height: 20px; font-size: 0.55rem; }
.person-pick-chip-x { width: 0.6rem; height: 0.6rem; padding: 0.25rem; background-size: 0.6rem; flex: 0 0 auto; }
/* T-0322 (DESIGN-T0289 13.2, D-74..D-76; SEC-T0322-design C-20): Columns step states and the value preview. Only an undecided
   column is red (imp-col-unmapped, with the text badge "Not mapped"); a skipped one is grey (imp-col-skip, "Skipped"). Colour is
   never the only signal. Bootstrap's subtle / emphasis tokens are defined in light, dark and blue. */
.imp-col-state { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-top: 0.25rem; }
.imp-col-state:empty { display: none; }
.imp-col-caption { display: block; }
.imp-col-unmapped > th, .imp-col-unmapped > td { background: var(--bs-danger-bg-subtle); }
.imp-col-unmapped > th:first-child { box-shadow: inset 4px 0 0 var(--bs-danger); }
.imp-col-skip > th, .imp-col-skip > td { background: var(--bs-tertiary-bg); }
.imp-col-skip > th:first-child { box-shadow: inset 4px 0 0 var(--bs-secondary-border-subtle); }
.imp-col-unmapped .imp-col-samples li, .imp-col-skip .imp-col-samples li { color: var(--bs-body-color); }
.imp-badge-unmapped { background: var(--bs-danger-bg-subtle); color: var(--bs-danger-text-emphasis); border: 1px solid var(--bs-danger-border-subtle); font-weight: 600; }
.imp-col-unmapped .imp-badge-unmapped { background: var(--bs-body-bg); }
.imp-badge-skip { background: var(--bs-secondary-bg-subtle); color: var(--bs-secondary-text-emphasis); border: 1px solid var(--bs-secondary-border-subtle); font-weight: 600; }
.imp-badge-saved { background: var(--bs-primary-bg-subtle); color: var(--bs-primary-text-emphasis); border: 1px solid var(--bs-primary-border-subtle); font-weight: 600; }
.imp-col-preview { min-width: 14rem; max-width: 26rem; }
.imp-pv li + li { margin-top: 0.15rem; }
.imp-pv-item { overflow-wrap: anywhere; }
.imp-pv-raw { color: var(--atlas-muted); }
.imp-col-unmapped .imp-pv-raw, .imp-col-skip .imp-pv-raw, .imp-col-unmapped .imp-pv .text-muted-2, .imp-col-skip .imp-pv .text-muted-2 { color: var(--bs-body-color) !important; }
.imp-pv-ok .imp-pv-text { font-weight: 600; }
.imp-pv-info .imp-pv-text { color: var(--bs-info-text-emphasis); }
.imp-pv-warn .imp-pv-text { color: var(--bs-warning-text-emphasis); font-weight: 600; }
.imp-pv-bad .imp-pv-text { color: var(--bs-danger-text-emphasis); font-weight: 600; }
.imp-pv[aria-busy='true'] { opacity: 0.6; }
.imp-pv-stale { outline: 1px dashed var(--bs-warning-border-subtle); outline-offset: 2px; }
.imp-notmapped { color: var(--bs-danger-text-emphasis); font-weight: 600; }
.imp-notmapped:empty { display: none; }
.imp-saved .btn { white-space: normal; text-align: start; }
@media (max-width: 767.98px) {
  .imp-col-unmapped, .imp-col-skip { background: var(--bs-danger-bg-subtle); }
  .imp-col-skip { background: var(--bs-tertiary-bg); }
  .imp-col-unmapped { border-color: var(--bs-danger) !important; border-left-width: 4px !important; }
  .imp-col-unmapped > th:first-child, .imp-col-skip > th:first-child { box-shadow: none; }
  .imp-col-preview { max-width: none; }
  .imp-col-unmapped .imp-cell-label, .imp-col-skip .imp-cell-label { color: var(--bs-body-color) !important; }
}
.imp-pv-stale-note { color: var(--bs-warning-text-emphasis); margin-top: 0.15rem; }

/* T-0325 (REV-T0325-1 m1): product flag columns of the installations import. Theme variables only (light, dark and blue):
   body text on the body or the tertiary background, danger text on the body background; none of the pairs is below 4.5:1. */
.imp-badge-flag { background: var(--bs-tertiary-bg); color: var(--bs-body-color); border: 1px solid var(--bs-border-color); font-weight: 600; }
.imp-col-unmapped .imp-badge-flag, .imp-col-skip .imp-badge-flag { background: var(--bs-body-bg); }
.imp-flag-gone { color: var(--bs-danger-text-emphasis); font-weight: 600; overflow-wrap: anywhere; }
.imp-pv-flag, .imp-pv-flag-count { color: var(--bs-body-color); overflow-wrap: anywhere; }
.imp-pv-flag { font-weight: 600; }

/* T-0357 (the user, 2026-11-27): All ideas (Discovery): the score as a pill, coloured by its band in the workspace's scores (low / medium / high), in
   theme tokens (light, dark and blue follow Bootstrap's subtle pairs). The Board's "Move to quarter" button on a card. */
.score-cell { white-space: nowrap; }
.idea-score-pill { display: inline-block; min-width: 2.75rem; padding: 0.1rem 0.5rem; border: 1px solid transparent; border-radius: 50rem; font-size: 0.78rem; font-weight: 600; line-height: 1.35; text-align: center; font-variant-numeric: tabular-nums; }
.idea-score-low { color: var(--bs-secondary-text-emphasis); background: var(--bs-secondary-bg-subtle); border-color: var(--bs-secondary-border-subtle); }
.idea-score-medium { color: var(--bs-warning-text-emphasis); background: var(--bs-warning-bg-subtle); border-color: var(--bs-warning-border-subtle); }
.idea-score-high { color: var(--bs-success-text-emphasis); background: var(--bs-success-bg-subtle); border-color: var(--bs-success-border-subtle); }
.table-issues tr.selected .idea-score-pill { border-color: currentColor; }
.board-quarter-move { display: inline-flex; align-items: center; justify-content: center; min-width: 1.5rem; min-height: 1.5rem; padding: 0; border: 0; border-radius: 0.25rem; background: transparent; color: var(--bs-secondary-color); font-size: 0.8rem; line-height: 1; }
.board-quarter-move:hover { color: var(--bs-body-color); background: rgba(127, 127, 127, 0.18); }
.board-quarter-move:focus-visible { outline: 2px solid var(--atlas-focus); outline-offset: 1px; }

/* ── T-0368: Operational ideas (discovery/list.ejs): row number column as on the issue lists (.table-issues), tag pills before the title ── */
.ideas-list-table .row-num-col,
.ideas-list-table td.row-num {
  width: 1%;
  text-align: right;
  font-size: 0.72rem;
  color: var(--atlas-muted);
  background: var(--atlas-dates-bg);
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  white-space: nowrap;
}
/* the Idea cell keeps room for the tag pills and the title on one line (the table scrolls in its box on a phone) */
.ideas-list-table td.idea-cell { min-width: 16rem; }
.ideas-list-table td.idea-cell .tag-chip { white-space: nowrap; }
/* ── end T-0368 ── */
/* T-0368 AC-10: the two legends (statuses; impact, effort and confidence) side by side; an opened one takes the full width */
.ideas-legends { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0.25rem 1.5rem; }
.ideas-legends > details { min-width: 0; }
.ideas-legends > details[open] { flex-basis: 100%; }
/* ── end T-0368 AC-10 ── */
/* ── T-0367: Discovery All ideas on the shared list engine (issues/_idea-table.ejs, _idea-row.ejs). The issue-list look stays
   (.table-issues, .table-issues-scrum); .list-table gives the group rows, .sort-table the sort icons. AC-10: the tag pills sit before
   the title on the same line; a long title wraps after them (no sideways page scroll: the table scrolls inside .table-responsive). ── */
/* the title cell keeps room for the pills and the title on one line (.table-issues-scrum would shrink it to 10rem) */
.ideas-table .title-cell { white-space: normal; min-width: 18rem; }
.ideas-table .idea-title-line { display: inline; overflow-wrap: anywhere; }
.ideas-table .idea-title-tags .tag-chip { white-space: nowrap; }
.ideas-table .idea-title-link { display: inline; }
.ideas-table thead th { white-space: nowrap; }
.ideas-table .idea-goal-cell { max-width: 16rem; }
.ideas-table .idea-goal { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ideas-table .idea-themes-cell { min-width: 8rem; }
.ideas-table .idea-themes-cell .theme-chips { margin-top: 0; }
/* the # cell's hidden key link (Key and Title both hidden) shows on focus without widening the column for good */
.ideas-table td.row-num .visually-hidden-focusable:focus { display: inline-block; margin-left: 0.25rem; white-space: nowrap; }
/* group header and total rows: one line each (the table scrolls inside its box when a label is long) */
.ideas-table tr.list-group-h > th, .ideas-table tr.list-group-total > * { white-space: nowrap; }
/* ── end T-0367 ── */

/* ── T-0372: Discovery Summary widgets (discovery/summary.ejs .sum-widgets; charts in js/discovery-summary.js) ── */
/* the charts: amCharts draws into the box; the stacked chart grows with its legend (JS), the bar chart with its bars (JS) */
.sum-chart { width: 100%; height: 360px; min-width: 0; }
.sum-chart-hbar { height: 240px; }
/* the quarter strip: one row of cards that scrolls sideways inside its own focusable box, never the page */
/* position: relative keeps the cards' visually hidden text inside the box (absolute, it otherwise widened the page) */
.sumq-strip {
  position: relative;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  max-width: 100%;
  padding: 0.25rem 0.125rem 0.5rem;
  border-radius: var(--bs-border-radius);
}
.sumq-strip:focus-visible { outline: 2px solid var(--bs-primary); outline-offset: 2px; }
.sumq-list { display: flex; gap: 0.75rem; width: max-content; }
.sumq-card {
  flex: 0 0 auto;
  min-width: 8.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius-lg);
  background: var(--bs-tertiary-bg);
  color: var(--bs-body-color);
  scroll-snap-align: start;
}
.sumq-label { font-size: 0.875rem; font-weight: 600; color: var(--bs-secondary-color); }
.sumq-num { font-size: 2rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
/* today's quarter: the primary colour frame and a tinted card */
.sumq-card.is-current {
  border: 2px solid var(--bs-primary);
  background: color-mix(in srgb, var(--bs-primary) 12%, var(--bs-body-bg));
}
.sumq-card.is-current .sumq-label { color: var(--bs-emphasis-color); }
.sumq-card.is-none { border-style: dashed; }
@media (max-width: 575.98px) {
  .sum-chart { height: 320px; }
  .sumq-card { min-width: 7rem; padding: 0.5rem 0.75rem; }
  .sumq-num { font-size: 1.625rem; }
}
/* ── end T-0372 ── */

/* ── T-0370: Operational ideas (discovery/list.ejs) Columns panel + saved views, one cell per shown column ── */
/* AC-7 (the user, 2026-12-02): the Key is small and grey (the row number's size, the muted text colour), no underline; still a link
   (underline on hover / focus, the focus ring of every link) */
.ideas-list-table a.ops-key-link { font-size: 0.72rem; color: var(--atlas-muted); text-decoration: none; }
.ideas-list-table a.ops-key-link:hover,
.ideas-list-table a.ops-key-link:focus-visible { color: var(--atlas-muted); text-decoration: underline; }
.ideas-list-table thead th { white-space: nowrap; }
.ideas-list-table .ops-goal-cell { max-width: 16rem; }
.ideas-list-table .ops-goal { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ideas-list-table .ops-themes-cell { min-width: 8rem; }
.ideas-list-table .ops-themes-cell .theme-chips { margin-top: 0; }
.ideas-list-table .ops-tags-cell .tag-chip { white-space: nowrap; }
/* the # cell's hidden idea link (Key and Idea both hidden) stays inside the scroll box and shows on focus */
.ideas-list-table td.row-num { position: relative; }
.ideas-list-table td.row-num .visually-hidden-focusable:focus { display: inline-block; margin-left: 0.25rem; white-space: nowrap; }
.ops-view-reset { white-space: nowrap; }
/* ── end T-0370 ── */

/* ── T-0375: Matrix "Middle ground" (impact 3 or effort 3): a mild orange, lighter than the Money pits red, its own hue in every theme ── */
:root,
[data-bs-theme='light'],
[data-bs-theme='blue'] { --atlas-zone-middle-bg: #fecb94; }
[data-bs-theme='dark'] { --atlas-zone-middle-bg: #6e3c05; }
.matrix-middle {
  --bs-table-bg: var(--atlas-zone-middle-bg);
  background: var(--atlas-zone-middle-bg);
}
/* ── end T-0375 ── */

/* ── T-0376: Operational ideas: zone circle by the Score + its hover card; the Score board in the impact/effort/confidence legend.
   Zone colours are the Matrix classes (.matrix-<zone>); the thin muted ring gives the pale circles a visible edge in every theme. ── */
.zone-dot { display: inline-block; flex: 0 0 auto; width: 0.8rem; height: 0.8rem; border: 1px solid var(--atlas-muted); border-radius: 50%; vertical-align: middle; }
.zone-dot-btn { display: inline-flex; align-items: center; justify-content: center; width: 1.5rem; height: 1.5rem; margin-right: 0.2rem; padding: 0; border: 0; border-radius: 50%; background: transparent; vertical-align: middle; cursor: help; }
.zone-dot-btn:hover .zone-dot { box-shadow: 0 0 0 2px var(--atlas-muted); }
.zone-dot-btn:focus-visible { outline: 2px solid var(--atlas-focus); outline-offset: 0; }
/* the card: one column on a phone (never wider than the window), two columns of zones from 768px; the mini grid beside the lead line */
.zone-popover { --bs-popover-max-width: calc(100vw - 1rem); font-size: 0.78rem; }
.zone-card { width: min(22rem, calc(100vw - 3rem)); line-height: 1.35; }
.zone-card-top { display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 0.5rem; }
.zone-card-lead [data-zone-lead-cell] { display: block; }
@media (min-width: 768px) {
  .zone-card { width: 34rem; }
  .zone-list { grid-template-columns: 1fr 1fr; }
}
.zone-popover .popover-header { font-size: 0.875rem; font-weight: 600; }
.zone-card-lead { margin: 0; }
.zone-mini { display: grid; grid-template-columns: auto auto; grid-template-areas: 'y grid' '. x'; justify-content: start; align-items: center; gap: 0.2rem 0.35rem; }
.zone-mini-y { grid-area: y; font-size: 0.7rem; color: var(--atlas-muted); writing-mode: vertical-rl; transform: rotate(180deg); }
.zone-mini-x { grid-area: x; font-size: 0.7rem; color: var(--atlas-muted); }
.zone-mini-grid { grid-area: grid; display: grid; grid-template-columns: repeat(5, 1rem); grid-auto-rows: 1rem; gap: 2px; }
.zone-mini-cell { position: relative; border-radius: 2px; }
.zone-mini-cell.is-here { outline: 2px solid var(--bs-emphasis-color); outline-offset: 1px; }
.zone-mini-cell.is-here::after { content: ''; position: absolute; inset: 0; margin: auto; width: 0.4rem; height: 0.4rem; border-radius: 50%; background: var(--bs-emphasis-color); }
.zone-list { display: grid; gap: 0.3rem; margin: 0; padding: 0; list-style: none; }
.zone-item { padding: 0.25rem 0.4rem; border: 1px solid transparent; border-radius: 0.25rem; }
.zone-item.is-current { border-color: var(--atlas-muted); background: var(--bs-tertiary-bg); }
.zone-item .zone-rule { font-size: 0.72rem; color: var(--atlas-muted); }
.zone-item .zone-explain { display: block; }
/* the Score board: the Matrix's 5x5 grid in its zone colours, scrolling in its own (focusable) box if a phone is too narrow */
.zone-board-wrap { position: relative; max-width: 100%; overflow-x: auto; }
.zone-board-wrap:focus-visible { outline: 2px solid var(--atlas-focus); outline-offset: 2px; }
.zone-board { border-collapse: separate; border-spacing: 2px; font-size: 0.72rem; }
.zone-board th { padding: 0.2rem 0.35rem; font-weight: 600; text-align: center; white-space: nowrap; }
.zone-board th[scope='row'] { text-align: left; }
.zone-board td { width: 4.75rem; min-width: 3.2rem; height: 2.4rem; padding: 0.2rem; border-radius: 0.2rem; color: var(--bs-body-color); line-height: 1.15; text-align: center; }
.zone-explain-list .zone-dot { margin-right: 0.15rem; }
/* AC-6 (scope addition 2026-12-02): the zone's short name next to the circle, in the zone's colour family. The Matrix fills are pale
   (light, blue) or deep (dark), too weak for text, so each zone has a text shade: darker on the light themes, lighter on dark; each is
   >= 4.5:1 on the table's surface (white / #f2f2f2 / #22272b). DOM order is circle, score, name (the score stays the cell's first
   number); from 768px the name sits between circle and score so the scores stay right-aligned, below it the name wraps under the score. */
:root,
[data-bs-theme='light'],
[data-bs-theme='blue'] {
  --atlas-zone-quick-win-fg: #216e4e;
  --atlas-zone-big-bet-fg: #0055cc;
  --atlas-zone-middle-fg: #a54800;
  --atlas-zone-fill-in-fg: #44546f;
  --atlas-zone-money-pit-fg: #ae2e24;
}
[data-bs-theme='dark'] {
  --atlas-zone-quick-win-fg: #4bce97;
  --atlas-zone-big-bet-fg: #85b8ff;
  --atlas-zone-middle-fg: #fea362;
  --atlas-zone-fill-in-fg: #b6c2cf;
  --atlas-zone-money-pit-fg: #fd9891;
}
.ops-score { display: inline-flex; flex-wrap: nowrap; align-items: center; justify-content: flex-end; column-gap: 0.1rem; max-width: 100%; }
.ops-score .zone-dot-btn { order: 1; }
.ops-score .zone-label { order: 2; margin-right: 0.4rem; }
.ops-score .ops-score-num { order: 3; }
.zone-label { font-size: 0.72rem; font-weight: 600; line-height: 1.2; white-space: nowrap; }
.zone-label-quick-win { color: var(--atlas-zone-quick-win-fg); }
.zone-label-big-bet { color: var(--atlas-zone-big-bet-fg); }
.zone-label-middle { color: var(--atlas-zone-middle-fg); }
.zone-label-fill-in { color: var(--atlas-zone-fill-in-fg); }
.zone-label-money-pit { color: var(--atlas-zone-money-pit-fg); }
@media (max-width: 767.98px) {
  .ops-score { flex-wrap: wrap; }
  .ops-score .zone-label { order: 4; flex-basis: 100%; margin-right: 0; text-align: right; }
}
/* ── end T-0376 ── */

/* ── T-0378 Theme / Area idea fields (DESIGN-T0378 slice C1): settings tab, idea panel, wizard step ── */
.ifo-intro { max-width: 60rem; }
.ifo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: 1rem; align-items: start; }
.ifo-rows { display: grid; gap: 0.5rem; margin-bottom: 0.75rem !important; }
.ifo-list { container-type: inline-size; }
.ifo-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 0.35rem 0.6rem; padding: 0.4rem 0; border-bottom: 1px solid var(--atlas-border); }
.ifo-row:target { background: var(--atlas-public-bg); }
.ifo-edit { display: flex; gap: 0.35rem; min-width: 0; }
.ifo-name { min-width: 0; }
.ifo-used { white-space: nowrap; }
.ifo-actions { display: inline-flex; gap: 0.25rem; justify-content: flex-end; }
.ifo-err { grid-column: 1 / -1; margin-top: 0; }
@container (max-width: 26rem) {
  .ifo-row { grid-template-columns: minmax(0, 1fr) auto; }
  .ifo-edit { grid-column: 1 / -1; }
}
.ifo-add { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.5rem; margin-top: 0.75rem; }
.ifo-add-field { flex: 1 1 12rem; min-width: 0; }
.ifo-delete { max-width: 40rem; }
.idea-fields { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; flex: 1 1 100%; margin-top: 0.75rem; }
.idea-field { min-width: 0; max-width: 100%; }
.idea-field h2 { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.02em; }
.wiz-cards-opts { grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr)); }
.wiz-cards-opts .wiz-card-label { justify-content: center; min-height: 3.5rem; padding: 0.75rem 1rem; }
/* ── end T-0378 ── */

/* ── T-0383: Theme / Area in the idea panel = the Product picker (.product-menu / .product-toggle / .product-options, block above at
   "no border and no background"); only the search box, the listbox rows and the keyboard row are added here (app.js block T-0383). ── */
.idea-combo { max-width: 100%; }
.idea-combo .product-toggle { max-width: min(16rem, 100%); }
.idea-combo-menu { width: min(18rem, calc(100vw - 2rem)); overflow: hidden; padding-top: 0; }
.idea-combo-menu.show { display: flex; flex-direction: column; }
.idea-combo-head { padding: 0.5rem 0.5rem 0.25rem; }
.idea-combo-list { overflow-y: auto; min-height: 0; }
.idea-combo-opt { cursor: pointer; white-space: normal; overflow-wrap: anywhere; }
/* the keyboard position: the menu's own hover look; on the saved (.active) row an inset ring */
.idea-combo-opt.is-focus:not(.active) { background-color: var(--bs-dropdown-link-hover-bg); color: var(--bs-dropdown-link-hover-color); }
.idea-combo-opt.is-focus.active { box-shadow: inset 0 0 0 2px var(--bs-dropdown-link-active-color); }
.idea-combo-none { border-bottom: 1px solid var(--bs-dropdown-divider-bg); }
.idea-combo-info, .idea-combo-info:hover, .idea-combo-info:active { cursor: default; background: transparent; color: var(--bs-body-color); font-style: italic; }
.idea-combo-err { color: var(--atlas-danger-fg); font-size: 0.8125rem; }
.idea-combo-err:not(:empty) { padding-top: 0.25rem; }
/* AC-6 (the user: "the ? next to theme and area make them no bg color and smaller"): only these two; a 24 x 24 px target kept
   (WCAG 2.5.8) with negative margins, so the heading line does not grow */
.help-btn.help-btn-plain, .help-btn.help-btn-plain:hover { background: transparent; border: 0; color: var(--atlas-muted); }
.help-btn.help-btn-plain { width: 1.5rem; height: 1.5rem; margin: -0.375rem -0.25rem -0.375rem 0; font-size: 0.75rem; }
.help-btn.help-btn-plain:hover { color: var(--bs-body-color); }
.help-btn.help-btn-plain:focus-visible { outline: 2px solid var(--atlas-focus); outline-offset: 0; box-shadow: none; }
/* REV-T0378-1 m3 (axe color-contrast, light theme): the "Manage" link after "No values yet" sits on the tinted .status-area
   (--atlas-status-row-bg); Bootstrap's light link #0d6efd is below 4.5:1 there. AA link colour, as on the other tinted Discovery panels. */
:root:not([data-bs-theme='dark']) .idea-field {
  --bs-link-color: #0052cc;
  --bs-link-color-rgb: 0, 82, 204;
}
/* ── end T-0383 ── */

/* ── T-0385: a tag chip is a link, and `.table-issues tr.selected a { color: inherit }` gave it the selected row's foreground
   (light #0c66e4, blue #fff) on the chip's own light background: 3.9:1 / 1.4:1 on .tag-blue. The row refreshed after a side-panel
   edit is drawn with class "selected" (selectedKey), so only that row failed. Keep the chip's own colour pair in a selected row. ── */
.table-issues tr.selected a.tag-chip,
.table-issues tr.selected a.tag-chip:hover { color: var(--tag-fg); }
/* ── end T-0385 ── */

/* ── T-0384: what an Impact / Effort / Confidence value means. The value is a plain-looking span (dotted underline = "more here"; REV-T0384-1
   m2: not a tab stop, 00 2026-12-02), 24 px high at least as a tap target (WCAG 2.5.8); position: relative keeps its visually hidden text
   inside the list's .table-responsive clip (T-0386). The shared tooltip box (app.js, appended to <body>, placed by CSSOM, never catches
   the pointer) sits above everything, the roadmap hover card (1060) included. ── */
.scale-tip {
  position: relative; display: inline-block; min-width: 1.5rem; min-height: 1.5rem; padding: 0 0.125rem; margin: -0.125rem 0;
  border: 0; border-radius: 0.25rem; background: transparent; color: inherit; font: inherit; line-height: 1.5rem; text-align: inherit;
  text-decoration: underline dotted; text-decoration-color: var(--bs-secondary-color); text-underline-offset: 0.2em; cursor: help;
}
.scale-tip:hover { text-decoration-style: solid; }
.rs-tip-board > div[data-scale-tip] { cursor: help; }
.scale-pop {
  --scale-pop-bg: #172b4d; --scale-pop-fg: #ffffff;
  position: fixed; z-index: 1090; box-sizing: border-box; max-width: min(20rem, calc(100vw - 1rem)); padding: 0.35rem 0.55rem;
  background: var(--scale-pop-bg); color: var(--scale-pop-fg); border-radius: 0.375rem; box-shadow: 0 4px 12px rgba(9, 30, 66, 0.3);
  font-size: 0.8125rem; line-height: 1.35; overflow-wrap: anywhere; pointer-events: none;
}
.scale-pop[hidden] { display: none; }
:root[data-bs-theme='dark'] .scale-pop { --scale-pop-bg: #dee4ea; --scale-pop-fg: #161a1d; }
@media (forced-colors: active) { .scale-pop { border: 1px solid CanvasText; } }
/* ── end T-0384 ── */

/* ── T-0382 (DESIGN-T0378 D-23): the idea's Theme and Area above its name on the Roadmap (Quarter plan, Lanes, Slides, Board) and in their
   HTML exports (app.css is embedded in every export), only while the workspace's "Show Theme and Area on the roadmap" is ON
   (discovery/_idea-fields-line.ejs). One smaller grey line of plain text cut with "…", the T-0377 tags' size and colour (AA on the bars and
   cards in light, dark and blue). The wrapper is position: relative so its visually hidden text stays inside the bar or card (T-0386). Inside
   the Slides link it floats at full width: its own line above the key, and (out of flow) it does not take the link's hover underline. ── */
.idea-fields-box { position: relative; display: block; min-width: 0; }
.rs-idea-name > .idea-fields-box { float: left; width: 100%; }
.idea-fields-line {
  display: block; overflow: hidden; color: var(--bs-secondary-color); font-size: 0.6875rem; font-weight: 400; line-height: 1.25;
  white-space: nowrap; text-overflow: ellipsis;
}
.rt-main > .idea-fields-box, .rl-main > .idea-fields-box { flex: none; }
/* ── end T-0382 ── */

/* ── T-0387: New idea wizard, "Add a new theme / area" (admins; app.js shows the box). Field + Add on one line, wrapping on a phone. ── */
.wiz-add { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--bs-border-color); }
.wiz-add.wiz-add-first { margin-top: 0; padding-top: 0; border-top: 0; } /* no cards above it: no divider */
.wiz-add-empty { margin: 0 0 0.75rem; color: var(--atlas-muted); }
.wiz-add-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.wiz-add-row .form-control { flex: 1 1 12rem; min-width: 0; max-width: 28rem; }
.wiz-add-row .btn { flex: none; }
.wiz-add-err { color: var(--atlas-danger-fg); font-size: 0.875rem; }
.wiz-add-err:not(:empty) { padding-top: 0.25rem; }
/* ── end T-0387 ── */
