/* MAIN — sidebar + header stay #ffffff; the page area inside .main tints
   to --page-bg (#fdfdfd) so kanban columns sit on a softer surface than
   the chrome above them. .cn-header-bar and .tabs declare their own white
   backgrounds further down, so the tint only shows below them. */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; background: var(--page-bg); position: relative; }

.ref-menu-preview-wrap {
  position: absolute;
  top: 106px;
  left: 260px;
  z-index: 650;
  transform: scale(0.56);
  transform-origin: top left;
  pointer-events: none;
}

.ref-menu-preview {
  width: 390px;
  background: #fff;
  border: 1px solid #eeeeee;
  border-radius: 20px;
  padding: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  pointer-events: auto;
}

.ref-menu-item {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 16px;
  border-radius: 13px;
  color: #2f3138;
  font-size: 21px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
}

.ref-menu-item.active {
  background: #f4f4f4;
}

.ref-menu-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  color: #3c3f45;
}

.ref-menu-label {
  flex: 1;
  white-space: nowrap;
}

.ref-menu-shortcut {
  margin-left: auto;
  padding: 5px 8px;
  border-radius: 8px;
  background: #f4f4f4;
  color: #46484e;
  font-size: 16px;
  letter-spacing: 0;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
}

.ref-menu-external,
.ref-menu-download {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}

.ref-menu-external {
  width: 24px;
  height: 24px;
  color: #a8a8a8;
  flex-basis: 24px;
}

.ref-menu-download {
  color: #a8a8a8;
}

.ref-menu-preview .ref-menu-chevron {
  width: 24px;
  height: 24px;
  color: var(--chevron-default, #616161);
  flex: 0 0 24px;
  stroke-width: 1.8;
  transform: rotate(-90deg);
  transition: transform 0.2s, color 0.15s;
}

.ref-menu-item:hover .ref-menu-chevron {
  color: var(--text-primary, #2f3138);
}

.ref-menu-divider {
  height: 1px;
  background: #eeeeee;
  margin: 8px -10px;
}

.ref-menu-gradient-logo {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fff 0 42%, transparent 43%),
    conic-gradient(
      from 20deg,
      #14b8ff,
      #2563eb,
      #5b21b6,
      #7c2dff,
      #db2777,
      #ef4444,
      #f59e0b,
      #14b8ff
    );
}

.ref-menu-preview svg {
  display: block;
  stroke: currentColor;
  stroke-width: 4.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.no-icon-menu-preview-wrap {
  position: absolute;
  top: 106px;
  left: 500px;
  z-index: 650;
  transform: scale(0.56);
  transform-origin: top left;
  pointer-events: none;
}

/* Sub menus size to what they hold: never narrower than the approved
   203px, wider (up to 320px) when a label and its value need it, so no text
   is squeezed into the padding or cut. Drawn at twice the size. */
.no-icon-menu-preview,
.col-dropdown,
.tv-sc-ctx {
  width: max-content;
  min-width: 406px;
  max-width: 640px;
  background: #ffffff;
  border: 1px solid #dddddd;
  border-radius: 17px;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.05),
    0 8px 22px rgba(0, 0, 0, 0.08);
  padding: 17px 26px;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  pointer-events: auto;
  user-select: none;
}

.no-icon-menu-preview.is-wide {
  min-width: 560px;
}

.no-icon-menu-row,
.col-dropdown-item,
.tv-sc-ctx-item {
  height: 47px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  margin: 0 -10px;
  padding: 0 10px;
  border-radius: 10px;
  color: #242424;
  font-size: 28px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
  transition: background 0.12s;
}

.no-icon-menu-left {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  white-space: nowrap;
}

.no-icon-menu-row.is-clickable,
.col-dropdown-item,
.tv-sc-ctx-item {
  cursor: pointer;
}

.no-icon-menu-row.is-clickable:hover,
.col-dropdown-item:hover,
.tv-sc-ctx-item:hover {
  background: #f7f7f7;
}

.no-icon-menu-row.is-active,
.no-icon-menu-row.is-selected,
.col-dropdown-item.active,
.col-dropdown-item.is-active,
.col-dropdown-item.is-selected {
  background: #f1f1f1;
}

.no-icon-menu-row.is-active:hover,
.no-icon-menu-row.is-selected:hover,
.col-dropdown-item.active:hover,
.col-dropdown-item.is-active:hover,
.col-dropdown-item.is-selected:hover {
  background: #f1f1f1;
}

.no-icon-menu-row.danger,
.col-dropdown-item.danger,
.tv-sc-ctx-item.danger {
  color: #c44;
}

.no-icon-menu-row.danger:hover,
.col-dropdown-item.danger:hover,
.tv-sc-ctx-item.danger:hover {
  color: #c44;
}

.no-icon-menu-right,
.col-dd-hint {
  display: flex;
  align-items: center;
  gap: 13px;
  color: #858585;
  font-size: 28px;
  font-weight: 400;
  flex: 0 0 auto;
  margin-left: 28px;
  white-space: nowrap;
}

.no-icon-menu-chevron,
.col-dd-chev {
  width: 24px;
  height: 24px;
  color: #222222;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: rotate(-90deg);
  transform-origin: center;
  transition: transform 0.16s ease, color 0.12s;
}

.no-icon-menu-row.is-active .no-icon-menu-right,
.col-dropdown-item.is-active .col-dd-hint,
.col-dropdown-item.active .col-dd-hint {
  color: #242424;
}

.no-icon-menu-row.is-active .no-icon-menu-chevron,
.col-dropdown-item.is-active .col-dd-chev,
.col-dropdown-item.active .col-dd-chev {
  color: #222222;
  transform: rotate(0deg);
}

.no-icon-menu-divider,
.col-dropdown-div,
.tv-sc-ctx-div {
  height: 1px;
  background: #e5e5e5;
  margin: 12px 0 10px;
}

.col-dropdown-panel[hidden] {
  display: none;
}

.col-dd-chev.is-open {
  transform: rotate(0deg);
}

.no-icon-menu-clear {
  justify-content: flex-start;
}

/* ================================================================
   HEADER BAR — always-on compact bar (replaces former expanded header)
   Mirrors the Starline-style reference: breadcrumb on the left, three-dots
   action menu after the page title, then viewer-avatars + Search + Add
   on the right.
   ================================================================ */
.cn-header-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 24px;
  height: 52px;
  background: #ffffff;
  box-shadow: 0 1px 0 0 var(--border);
  position: relative;
  z-index: 800;
  flex-shrink: 0;
  container-type: inline-size;
  min-width: 0;
  overflow: visible;
}
.cn-header-bar:has(.cn-hb-experience-wrap.open),
.cn-header-bar:has([data-header-add-toggle][aria-expanded="true"]) { z-index: 1600; }

.cn-hb-left {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
  overflow: visible;
}

.cn-hb-crumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14.75px;
  color: var(--text-primary);
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.12s;
  white-space: nowrap;
  min-width: 0;
  flex: 0 1 auto;
}
.cn-hb-crumb:hover { background: #f7f7f7; }
.cn-hb-crumb:first-child {
  max-width: 280px;
  max-width: min(42cqw, 280px);
}
.cn-hb-crumb-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cn-hb-crumb svg.cn-hb-icon {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.cn-hb-crumb svg.cn-hb-page-icon-journey {
  width: 18px;
  height: 18px;
  transform: translateY(-0.5px);
}
/* Second breadcrumb (view-tab) icon reads slightly smaller than the page
   icon so the hierarchy stays clear. */
.cn-hb-crumb svg.cn-hb-icon-tab { width: 16px; height: 16px; }

.cn-hb-sep {
  color: var(--text-muted);
  font-size: 16px;
  opacity: 0.6;
  user-select: none;
  pointer-events: none;
  margin: 0 4px;
}

.cn-hb-more-wrap {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  z-index: 1300;
}
.cn-hb-more-btn {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 5px;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  line-height: 0;
  transition: background 0.12s, color 0.12s;
}
.cn-hb-more-btn:hover { background: var(--workspace-dots-hover); color: var(--text-primary); }
.cn-hb-more-wrap.open .cn-hb-more-btn { background: var(--workspace-dots-hover); color: var(--text-primary); }
.cn-hb-more-btn svg {
  width: 14px;
  height: 14px;
  display: block;
  fill: currentColor;
  stroke: none;
}
.cn-hb-more-menu {
  display: block;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--action-menu-bg);
  border: 1px solid var(--action-menu-border);
  border-radius: var(--action-menu-radius);
  box-shadow: var(--action-menu-shadow);
  padding: var(--action-menu-padding);
  z-index: 500;
  min-width: var(--action-menu-min-width);
  max-width: min(340px, calc(100vw - 32px));
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px) scale(0.98);
  transform-origin: top left;
  transition:
    opacity 0.14s ease,
    transform 0.16s cubic-bezier(0.2, 0, 0.2, 1),
    visibility 0s linear 0.16s;
}
.cn-hb-more-wrap.open .cn-hb-more-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  transition-delay: 0s;
}
.cn-hb-more-menu.cn-hb-workspace-menu-popover {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  min-width: 0;
  max-width: none;
  width: 203px;
  height: 158px;
  overflow: visible;
  z-index: 1200;
}
.cn-hb-more-menu.cn-hb-workspace-menu-popover:has(.no-icon-menu-preview.is-wide) {
  width: 280px;
}
.cn-hb-workspace-menu-popover .no-icon-menu-preview {
  transform: translateX(var(--no-icon-menu-shift-x, 0px)) scale(0.5);
  transform-origin: top left;
  pointer-events: auto;
}
.cn-hb-more-item {
  height: var(--action-menu-item-height);
  display: flex;
  align-items: center;
  gap: var(--action-menu-item-gap);
  padding: 0 var(--action-menu-item-padding-x);
  font-size: var(--action-menu-font-size);
  border-radius: var(--action-menu-item-radius);
  cursor: pointer;
  color: var(--action-menu-text);
  white-space: nowrap;
  user-select: none;
  transition: background 0.12s;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
}
.cn-hb-more-item:hover,
.cn-hb-more-item.is-active,
.cn-hb-more-item.active { background: var(--action-menu-hover); }
.cn-hb-more-item svg {
  width: var(--action-menu-icon-size);
  height: var(--action-menu-icon-size);
  stroke: var(--action-menu-icon);
  fill: none;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 var(--action-menu-icon-size);
}
.cn-hb-more-item > span { flex: 1; }
.cn-hb-more-div {
  height: 1px;
  background: var(--action-menu-border);
  margin: 8px calc(var(--action-menu-padding) * -1);
}

.cn-hb-right {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  min-width: 0;
  flex: 0 1 auto;
  max-width: min(78%, 1020px);
  justify-content: flex-end;
  overflow: visible;
}

/* Vertical dividers between the right-cluster groups (search | experience | add).
   Slightly shorter than the 26px buttons so the line floats centred with
   equal breathing room above and below. */
.cn-hb-divider {
  width: 1px;
  height: 16px;
  background: var(--border);
  flex-shrink: 0;
  margin: 0 8px;
  align-self: center;
  transition: opacity 0.18s, width 0.22s ease-out, margin 0.22s ease-out;
}

/* Phase tiles embedded in the header right cluster — share the sidebar's
   palette so the whole row reads as part of the same design system. */
.cn-hb-pipeline {
  display: flex;
  align-items: center;
  min-width: 0;
  max-width: 1000px;
  max-width: clamp(140px, 42cqw, 1000px);
  flex: 0 1 auto;
  overflow: visible;
  opacity: 1;
  transform: translateX(0);
  transition: max-width 0.24s ease-out, opacity 0.18s ease-out, transform 0.24s ease-out;
}
.cn-hb-divider-experience {
  display: block;
  flex: 0 0 1px;
  min-width: 1px;
  width: 1px;
  margin-left: 8px;
  margin-right: 8px;
}
.cn-hb-pipeline .pipeline-stage,
.cn-hb-pipeline .pipeline-total-block {
  height: 24px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  background: #fafafa;
  border: 1px solid #ededed;
  border-radius: 7px;
  font-size: 12.5px;
  gap: 6px;
  flex: 0 0 auto;
}
.cn-hb-pipeline .pipeline-stage:hover,
.cn-hb-pipeline .pipeline-total-block:hover {
  background: #f7f7f7;
}
.cn-hb-pipeline .pipeline-stage.ps-active {
  background: #f3f3f3;
  border-color: #d8d8d8;
}

/* When the search bar is active no element gets a standalone translate.
   Search growing its min-width naturally widens the right cluster, which
   shifts the pipeline tiles + the divider + the search field left as a
   single group, so the spacing around the divider is preserved. */

/* Mirrors .sidebar.expanded .search exactly — same fill (#fafafa), soft
   border (#ededed), 13px typography, and ⌘ + input + / triad. Focus does
   not change the background; the caret + dark text indicate active state,
   matching the menu's behaviour. Only the width expands when active so
   the user has room to type. */
.cn-hb-search-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 24px;
  padding: 0 9px;
  border-radius: 7px;
  color: #a9a9a9;
  cursor: text;
  font-size: 13px;
  border: 1px solid #ededed;
  background: #fafafa;
  font-family: inherit;
  width: 170px;
  min-width: 130px;
  max-width: 240px;
  flex: 0 0 170px;
  overflow: hidden;
  transition: width 0.18s ease-out, flex-basis 0.18s ease-out, max-width 0.18s ease-out;
  user-select: none;
}
.cn-hb-search-btn.is-active {
  width: 374px;
  min-width: 270px;
  max-width: 420px;
  flex-basis: 374px;
}
.cn-hb-cmd-sym {
  font-size: 13px;
  font-weight: 500;
  color: #a9a9a9;
  margin-left: -2px;
  flex-shrink: 0;
  line-height: 1;
}
.cn-hb-search-slash {
  color: #b8b8b8;
  font-size: 13px;
  flex-shrink: 0;
  line-height: 1;
}

.cn-hb-search-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 13px;
  color: #1a1a1a;
  caret-color: #1a1a1a;
  padding: 0;
  line-height: 1;
  height: 16px;
  -webkit-appearance: none;
}
.cn-hb-search-input::-webkit-search-cancel-button { display: none; }
.cn-hb-search-input::placeholder { color: #a9a9a9; opacity: 1; }

/* Finance experience control — a quiet utility between Search and the primary Add action. */
.cn-hb-experience-wrap {
  position: relative;
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  z-index: 1500;
}
.cn-hb-experience-btn {
  position: relative;
  height: 24px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  border: 1px solid #ededed;
  border-radius: 7px;
  background: #fafafa;
  color: #5f5f5f;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}
.cn-hb-experience-btn:hover { border-color: #e1e1e1; background: #f7f7f7; color: var(--text-primary); }
.cn-hb-experience-wrap.open .cn-hb-experience-btn { border-color: #dddddd; background: #f1f1f1; color: var(--text-primary); }
.cn-hb-experience-btn:focus-visible { outline: 2px solid #3d85c6; outline-offset: 2px; }
.cn-hb-experience-btn > svg {
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cn-hb-experience-btn > svg.fin-chevron { width: 10px; height: 10px; transition: transform 140ms ease; }
.cn-hb-experience-wrap.open .cn-hb-experience-btn > svg.fin-chevron { transform: rotate(180deg); }
.cn-hb-experience-btn > strong {
  padding: 1px 4px;
  border-radius: 4px;
  background: #ececec;
  color: #555555;
  font-size: 10.5px;
  font-weight: 650;
  line-height: 1.45;
}
.cn-hb-experience-wrap.is-custom .cn-hb-experience-btn::after {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  width: 6px;
  height: 6px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #3d85c6;
}

.cn-hb-experience-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(360px, calc(100vw - 32px));
  max-height: min(640px, calc(100dvh - 76px));
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid #dddddd;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(20,20,20,.05), 0 16px 42px rgba(20,20,20,.14);
  color: var(--text-primary);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px) scale(.98);
  transform-origin: top right;
  transition: opacity 140ms ease, transform 160ms cubic-bezier(.2,0,.2,1), visibility 0s linear 160ms;
}
.cn-hb-experience-wrap.open .cn-hb-experience-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  transition-delay: 0s;
}
.fin-experience-menu-head { padding: 14px 14px 11px; border-bottom: 1px solid #ebebeb; }
.fin-experience-menu-head strong { display: block; font-size: 13.5px; font-weight: 650; }
.fin-experience-menu-head span { display: block; margin-top: 3px; color: #737373; font-size: 11.5px; line-height: 1.4; }
.fin-experience-levels { padding: 7px; }
.fin-experience-level {
  width: 100%;
  min-height: 52px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-primary);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.fin-experience-level:hover { background: #f7f7f7; }
.fin-experience-level.is-active { background: #f1f1f1; }
.fin-experience-level:focus-visible,
.fin-experience-function:focus-visible,
.fin-experience-menu-foot button:focus-visible { outline: 2px solid #3d85c6; outline-offset: -2px; }
.fin-experience-radio {
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border: 1px solid #c8c8c8;
  border-radius: 50%;
  background: #fff;
}
.fin-experience-level.is-active .fin-experience-radio::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #3d85c6; }
.fin-experience-level > span:last-child,
.fin-experience-function > span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fin-experience-level strong,
.fin-experience-function strong { overflow: hidden; font-size: 12.5px; font-weight: 620; text-overflow: ellipsis; white-space: nowrap; }
.fin-experience-level em,
.fin-experience-function em { color: #737373; font-size: 11px; font-style: normal; line-height: 1.35; white-space: normal; }
.fin-experience-divider { height: 1px; background: #ebebeb; }
.fin-experience-group-head {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px 5px;
  color: #5f5f5f;
}
.fin-experience-group-head span { font-size: 11.5px; font-weight: 650; }
.fin-experience-group-head small { color: #737373; font-size: 10.5px; }
.fin-experience-functions { padding: 0 7px 7px; }
.fin-experience-function {
  width: 100%;
  min-height: 50px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-primary);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.fin-experience-function:not([aria-disabled="true"]):hover { background: #f7f7f7; }
.fin-experience-function[aria-disabled="true"] { cursor: default; }
.fin-experience-check {
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border: 1px solid #cdcdcd;
  border-radius: 3px;
  background: #fff;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}
.fin-experience-function.is-active .fin-experience-check { border-color: #3d85c6; background: #3d85c6; }
.fin-experience-function small { color: #737373; font-size: 10.5px; }
.fin-experience-menu-foot {
  position: sticky;
  bottom: 0;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-top: 1px solid #e6e6e6;
  background: #fdfdfd;
}
.fin-experience-menu-foot span { color: #737373; font-size: 10.5px; }
.fin-experience-menu-foot button { min-height: 28px; padding: 0 8px; border: 1px solid #d8d8d8; border-radius: 6px; background: #fff; color: #555555; font-family: inherit; font-size: 11.5px; cursor: pointer; }
.fin-experience-menu-foot button:hover:not([aria-disabled="true"]) { background: #f5f5f5; color: var(--text-primary); }
.fin-experience-menu-foot button[aria-disabled="true"] { color: #a9a9a9; cursor: default; }

.cn-hb-add-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: 7px;
  background: var(--text-primary);
  color: #ffffff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  border: none;
  font-family: inherit;
  transition: opacity 0.12s;
  flex: 0 0 auto;
}
.cn-hb-add-btn:hover { opacity: 0.92; }
.cn-hb-add-btn svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cn-hb-add-wrap { position: relative; flex: 0 0 auto; }
.cn-hb-add-menu {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  z-index: 1400;
  width: 230px;
  max-width: calc(100vw - 32px);
  max-height: min(610px, calc(100dvh - 105px));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px;
  border: 1px solid #dedede;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 3px 8px rgba(0,0,0,.06), 0 12px 30px rgba(0,0,0,.1);
}
.cn-hb-add-menu[hidden] { display: none; }
.cn-hb-add-group + .cn-hb-add-group { margin-top: 5px; padding-top: 5px; border-top: 1px solid #ececec; }
.cn-hb-add-group-label { padding: 6px 9px 4px; color: #7a7a7a; font-size: 10px; font-weight: 600; letter-spacing: .045em; text-transform: uppercase; }
.cn-hb-add-item { display: block; width: 100%; min-height: 29px; padding: 6px 9px; border: 0; border-radius: 6px; background: transparent; color: var(--text-primary); font-family: inherit; font-size: 12px; font-weight: 400; line-height: 1.35; text-align: left; cursor: pointer; }
.cn-hb-add-item:hover, .cn-hb-add-item:focus-visible { background: #f2f2f2; outline: none; }
.cn-hb-add-btn:focus-visible { outline: 2px solid #767676; outline-offset: 3px; }

@container (max-width: 1180px) {
  .cn-hb-right { max-width: min(58%, 720px); }
  .cn-hb-pipeline {
    flex: 0 0 auto;
    max-width: 260px;
  }
  .cn-hb-pipeline .pipeline-stage {
    width: 24px;
    padding: 0;
    justify-content: center;
    gap: 0;
  }
  .cn-hb-pipeline .pipeline-stage .ps-count {
    display: none;
  }
}

/* ================================================================
   TABS ROW
   Tabs on the left, right-side controls (Group/Sort/View/Filter + Search)
   ================================================================ */
.tabs {
  position: relative;
  z-index: 700;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 28px 0 18px;
  min-height: 39px;
  background: #ffffff;
  min-width: 0;
  container-type: inline-size;
  overflow: visible;
}
.tabs::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 1px;
  background: var(--border);
  pointer-events: none;
  z-index: 4;
}
.tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  font-size: 14px;
  color: #555;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  user-select: none;
  position: relative;
  z-index: 5;
  min-width: 0;
  flex: 0 1 auto;
}
.tab svg { width: 15px; height: 15px; opacity: 1; }
.tab-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tab:hover { color: #2a2a2a; }
.tab.active { color: var(--text-primary); font-weight: 500; border-bottom-color: var(--text-primary); }
.tabs-spacer {
  flex: 1 1 auto;
  min-width: 0;
}

/* Right-side controls cluster — approved "segment" design (from the user's
   Bloop/Dockerfile reference): no per-button containers, no rounding. Each
   control is a flat, full-height segment of the tabs bar; boundaries are 1px
   vertical lines spanning the bar's full height, in the same var(--border) as
   the bar's bottom line so verticals and horizontal meet in one continuous
   tone. Hover/open = flat full-segment #f7f7f7 tint. The header Search/Add
   above intentionally keep their original bento pills — only this cluster
   uses the segment idiom. */
.tabs-controls {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  gap: 0;
  flex: 0 1 auto;
  min-width: 0;
  margin-left: auto;
  margin-right: 0;
  overflow: visible;
}
.tc-menu-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
  border-left: 1px solid var(--border);
}
.tc-menu-wrap:last-child { border-right: 1px solid var(--border); }
.tc-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 100%;
  padding: 0 14px;
  border-radius: 0;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
  letter-spacing: -0.005em;
}
.tc-btn:hover { background: #f7f7f7; color: var(--text-primary); }
.tc-btn strong { font-weight: 500; color: var(--text-primary); margin-left: 3px; }
.tc-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.tc-menu-wrap.open .tc-btn { background: #f7f7f7; color: var(--text-primary); }
.tc-btn.is-active,
.tc-btn.is-active:hover { background: #f1f1f1; color: var(--text-primary); }
.tc-action-wrap:last-child { border-right: 1px solid var(--border); }
.tc-action-wrap + .tc-action-wrap { border-left: 1px solid var(--border); }
.tc-action-btn { color: #5f5f5f; }
.tc-action-btn svg { width: 13px; height: 13px; }
.tc-action-reset .tc-action-btn { color: #7d625d; }

@container (max-width: 1120px) {
  .tabs { padding-left: 16px; padding-right: 18px; }
  .tc-btn strong { display: none; }
}

@container (max-width: 980px) {
  .tabs { padding-left: 14px; padding-right: 18px; }
  .tab { padding-left: 10px; padding-right: 10px; }
  .tc-btn {
    width: 28px;
    padding: 0;
    justify-content: center;
    gap: 0;
  }
  .tc-btn > span { display: none; }
}

@container (max-width: 680px) {
  .tabs { gap: 0; }
  .tab {
    padding-left: 9px;
    padding-right: 9px;
  }
  .tab-label { display: none; }
  .tabs-controls { gap: 4px; }
}

@container (max-width: 520px) {
  .tabs-controls .tc-menu-wrap:nth-child(2),
  .tabs-controls .tc-menu-wrap:nth-child(4) {
    display: none;
  }
  .tabs-controls .tc-action-reset { display: none; }
}

.tc-menu {
  display: block;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: max-content;
  max-width: 640px;
  background: #ffffff;
  border: 1px solid #dddddd;
  border-radius: 17px;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.05),
    0 8px 22px rgba(0, 0, 0, 0.08);
  padding: 17px 26px;
  z-index: 500;
  min-width: 406px;
  max-height: min(1120px, calc((100vh - 88px) * 2));
  overflow: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px) scale(0.48);
  transform-origin: top right;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  pointer-events: none;
  user-select: none;
  transition:
    opacity 0.14s ease,
    transform 0.16s cubic-bezier(0.2, 0, 0.2, 1),
    visibility 0s linear 0.16s;
}
.tc-menu-wrap.open .tc-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(0.5);
  transition-delay: 0s;
}
.tc-menu-wide { min-width: 406px; }
.tc-menu-section {
  height: 32px;
  display: flex;
  align-items: center;
  margin: 0 -10px 4px;
  padding: 0 10px;
  font-size: 20px;
  text-transform: none;
  letter-spacing: 0;
  color: #858585;
  user-select: none;
}
.tc-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 13px;
  height: 47px;
  box-sizing: border-box;
  margin: 0 -10px;
  padding: 0 10px;
  font-size: 28px;
  font-weight: 400;
  border-radius: 10px;
  cursor: pointer;
  color: #242424;
  white-space: nowrap;
  user-select: none;
  transition: background 0.12s;
}
.tc-menu-item:hover { background: #f7f7f7; }
.tc-menu-item.is-active,
.tc-menu-item.is-active:hover { background: #f1f1f1; }
.tc-menu-item > svg {
  display: none;
}
.tc-menu-item svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  opacity: 1;
}
.tc-menu-item > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tc-menu-item .tc-type-dot {
  width: 14px;
  height: 14px;
  border-radius: 2px;
  flex: 0 0 14px;
}
/* How many a choice holds, e.g. files from one business. */
.tc-menu-item .tc-menu-count { flex: 0 0 auto; margin-left: 8px; color: #8a8a8a; font-style: normal; font-variant-numeric: tabular-nums; }
.tc-menu-div { height: 1px; background: #e5e5e5; margin: 12px 0 10px; }

/* Pipeline summary spacing fallback (uses the wrapping div from the
   component itself rather than inline margin) */
.pipeline-summary {
  display: flex;
  gap: 4px;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  flex: 0 0 auto;
  overflow: visible;
}
.pipeline-stages {
  display: flex;
  gap: 4px;
  align-items: center;
  min-width: 0;
  flex: 0 0 auto;
  overflow: visible;
}
.pipeline-total-wrap {
  display: flex;
  flex: 0 0 auto;
  margin-left: 4px;
}
.pipeline-stage { display: flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 4px; font-size: 12px; color: var(--text-secondary); background: var(--tag-bg); cursor: pointer; transition: background 0.15s; flex: 0 0 auto; }
.pipeline-stage.is-hidden-by-fit { display: none !important; }
.pipeline-stage:hover { background: #eaeaea; }
.pipeline-stage.ps-active:hover { filter: brightness(1.05); }
.pipeline-stage .ps-dot { width: 7px; height: 7px; border-radius: 2px; flex-shrink: 0; }
.pipeline-stage .ps-count { font-weight: 600; color: var(--text-primary); }
.pipeline-total-block { display: flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 4px; font-size: 12px; color: var(--text-secondary); background: var(--tag-bg); cursor: pointer; }
.pipeline-total-block .ps-count { font-weight: 600; color: var(--text-primary); }
.pipeline-total-stripes { width: 21px; height: 7px; border-radius: 2px; flex-shrink: 0; overflow: hidden; display: flex; }
.pipeline-arrow { display: none; }

@container (max-width: 980px) {
  .cn-hb-pipeline {
    flex: 0 0 auto;
    max-width: 224px;
  }
  .cn-hb-pipeline .pipeline-stage {
    width: 24px;
    padding: 0;
    justify-content: center;
    gap: 0;
  }
  .cn-hb-pipeline .pipeline-stage .ps-count { display: none; }
  .cn-hb-search-btn.is-active {
    width: 320px;
    min-width: 260px;
    max-width: 340px;
    flex-basis: 320px;
  }
}

@container (max-width: 820px) {
  .cn-header-bar { padding-left: 18px; padding-right: 18px; }
  .cn-hb-left { flex-basis: 190px; }
  .cn-hb-right { max-width: 50%; }
  .cn-hb-experience-btn > strong { display: none; }
  .cn-hb-crumb:first-child {
    max-width: 180px;
    max-width: min(34cqw, 180px);
  }
  .cn-hb-crumb:nth-of-type(2) {
    max-width: min(24cqw, 132px);
  }
  .cn-hb-pipeline {
    max-width: min(148px, 18cqw);
  }
  .cn-hb-pipeline .pipeline-total-wrap {
    display: none;
  }
  .cn-hb-search-btn {
    min-width: 112px;
    flex-basis: 128px;
  }
  .cn-hb-search-btn.is-active {
    width: 260px;
    min-width: 220px;
    max-width: 260px;
    flex-basis: 260px;
  }
}

@container (max-width: 680px) {
  .cn-header-bar { gap: 4px; padding-left: 14px; padding-right: 14px; }
  .cn-hb-sep { margin-left: 1px; margin-right: 1px; }
  .cn-hb-crumb { padding-left: 6px; padding-right: 6px; }
  .cn-hb-pipeline { display: none; }
  .cn-hb-right { max-width: none; flex: 0 0 auto; }
  .cn-hb-search-btn {
    width: 32px;
    min-width: 32px;
    max-width: 32px;
    flex: 0 0 32px;
    padding: 0;
    justify-content: center;
    gap: 0;
  }
  .cn-hb-search-input,
  .cn-hb-search-slash {
    display: block;
    flex: 0 0 0;
    width: 0;
    min-width: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transition: opacity 0.12s ease-out;
  }
  .cn-hb-search-btn.is-active {
    width: 220px;
    min-width: 180px;
    max-width: 220px;
    flex: 0 0 220px;
    padding: 0 9px;
    gap: 8px;
  }
  .cn-hb-search-btn.is-active .cn-hb-search-input {
    flex: 1 1 auto;
    width: auto;
    opacity: 1;
    pointer-events: auto;
  }
  .cn-hb-search-btn.is-active .cn-hb-search-slash {
    flex: 0 0 auto;
    width: auto;
    opacity: 1;
  }
  .cn-hb-experience-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    justify-content: center;
    gap: 0;
  }
  .cn-hb-experience-label,
  .cn-hb-experience-btn > strong,
  .cn-hb-experience-btn > svg.fin-chevron { display: none; }
  .cn-hb-experience-menu {
    position: fixed;
    top: 60px;
    right: 12px;
    width: min(360px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    max-height: calc(100dvh - 72px);
  }
  .cn-hb-right:has(.cn-hb-search-btn.is-active) .cn-hb-experience-wrap { display: none; }
  .cn-hb-add-btn {
    width: 30px;
    padding: 0;
    justify-content: center;
    gap: 0;
    font-size: 0;
  }
  .cn-hb-add-btn svg { width: 13px; height: 13px; }
}

@container (max-width: 480px) {
  .cn-hb-crumb:first-child,
  .cn-hb-sep { display: none; }
  .cn-hb-left { flex-basis: 96px; }
  .cn-hb-crumb { max-width: 120px; }
  .cn-hb-search-btn.is-active {
    width: 190px;
    max-width: 190px;
    flex-basis: 190px;
  }
  .cn-hb-experience-menu { right: 10px; width: min(340px, calc(100vw - 20px)); max-width: calc(100vw - 20px); }
}

@media (prefers-reduced-motion: reduce) {
  .cn-hb-experience-btn,
  .cn-hb-experience-btn > svg.fin-chevron,
  .cn-hb-experience-menu { transition: none; }
}

/* ================================================================
   COLUMN HIGHLIGHT (board view pipeline hover)
   ================================================================ */
.column { position: relative; overflow: visible; }
.column.col-highlight::after {
  content: '';
  position: absolute;
  top: -20px; bottom: -20px;
  left: -8px; right: -8px;
  background: var(--col-highlight-bg);
  z-index: 0;
  pointer-events: none;
}
.column:first-child.col-highlight::after { left: -28px; }
.column:last-child.col-highlight::after { right: -28px; }
.board.cols-2 .column.col-highlight::after,
.board.cols-3 .column.col-highlight::after { left: -6px; right: -6px; }
.board.cols-4 .column.col-highlight::after,
.board.cols-5 .column.col-highlight::after { left: -5px; right: -5px; }
.board.cols-2 .column:first-child.col-highlight::after,
.board.cols-3 .column:first-child.col-highlight::after,
.board.cols-4 .column:first-child.col-highlight::after,
.board.cols-5 .column:first-child.col-highlight::after { left: -28px; }
.board.cols-2 .column:last-child.col-highlight::after,
.board.cols-3 .column:last-child.col-highlight::after,
.board.cols-4 .column:last-child.col-highlight::after,
.board.cols-5 .column:last-child.col-highlight::after { right: -28px; }

.view-panel { display: none; flex: 1; overflow: hidden; }
.view-panel.active { display: flex; flex-direction: column; }

/* ================================================================
   LEGACY — Functions menu / view-density button (kept for any code
   that still references the class names but no longer rendered by
   the layout). Hidden so they cannot leak into the new layout.
   ================================================================ */
.cn-header, .cn-header-expanded, .header, .header-breadcrumb, .header-top,
.header-title-area, .header-title, .header-subtitle,
.functions-wrap, .view-density-btn, .cn-compact-bar { display: none !important; }

/* The Repository_32-styled dropdown (.cc-menu) is still used by other
   parts of the app — keep its rules. */
.cc-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 406px;
  background: #ffffff;
  border: 1px solid #dddddd;
  border-radius: 17px;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.05),
    0 8px 22px rgba(0, 0, 0, 0.08);
  padding: 17px 26px;
  z-index: 500;
  min-width: 0;
  max-height: min(1120px, calc((100vh - 88px) * 2));
  overflow: auto;
  transform: scale(0.5);
  transform-origin: top right;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  pointer-events: auto;
  user-select: none;
}
.cc-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 13px;
  height: 47px;
  box-sizing: border-box;
  margin: 0 -10px;
  padding: 0 10px;
  font-size: 28px;
  font-weight: 400;
  border-radius: 10px;
  cursor: pointer;
  color: #242424;
  white-space: nowrap;
  user-select: none;
  transition: background 0.12s;
}
.cc-menu-item:hover { background: #f7f7f7; }
.cc-menu-item svg {
  display: none;
  width: 24px;
  height: 24px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 1;
  flex-shrink: 0;
}
.cc-menu-item > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cc-menu-kbd {
  flex-shrink: 0;
  font-size: 28px;
  color: #858585;
  font-family: inherit;
  padding-left: 28px;
  letter-spacing: 0;
}
.cc-menu-item.is-active,
.cc-menu-item.active-toggle { background: #f1f1f1; color: #242424; }
.cc-menu-item.is-active:hover,
.cc-menu-item.active-toggle:hover { background: #f1f1f1; }
.cc-menu-div { height: 1px; background: #e5e5e5; margin: 12px 0 10px; }

/* The business you are in: its colour square (the menu's 16px, 4px corners)
   before its name, opening the list of your businesses. */
.cn-hb-biz-wrap { display: flex; }
.cn-hb-biz-sq { flex: none; width: 16px; height: 16px; border-radius: 4px; }
.cn-hb-biz-wrap.open .cn-hb-biz { background: #f1f1f1; }
