:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-soft: #f8fafb;
  --text: #1c2229;
  --muted: #65717f;
  --border: #d8e0e8;
  --accent: #236f65;
  --accent-strong: #184f48;
  --danger: #b34242;
  --danger-bg: #fff3f0;
  --shadow: 0 12px 30px rgba(28, 34, 41, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 1100px;
  padding-left: 64px;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: 0;
  transition: padding-left 0.16s ease;
}

body.side-nav-expanded {
  padding-left: 184px;
}

a {
  color: inherit;
}

.side-nav {
  width: 56px;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border-right: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 10px 0 28px rgba(28, 34, 41, 0.06);
  overflow: hidden;
  padding: 14px 8px;
  transition: width 0.16s ease;
}

body.side-nav-expanded .side-nav {
  width: 176px;
  align-items: stretch;
}

.side-nav a,
.side-nav button {
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 9px 10px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 680;
  white-space: nowrap;
  cursor: pointer;
}

body.side-nav-expanded .side-nav a,
body.side-nav-expanded .side-nav button {
  justify-content: flex-start;
  gap: 10px;
}

.side-nav a:hover,
.side-nav a:focus-visible,
.side-nav button:hover,
.side-nav button:focus-visible {
  background: #eef2f5;
  color: var(--text);
  outline: none;
}

.side-nav a.is-active,
.side-nav a.is-active:hover,
.side-nav a.is-active:focus-visible {
  background: rgba(35, 111, 101, 0.1);
  color: var(--accent-strong);
  font-weight: 720;
}

.side-nav svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.side-nav .side-nav-toggle,
body.side-nav-expanded .side-nav .side-nav-toggle {
  justify-content: center;
  gap: 0;
  margin-bottom: 4px;
}

.side-nav-toggle-close {
  display: none;
}

body.side-nav-expanded .side-nav-toggle-open {
  display: none;
}

body.side-nav-expanded .side-nav-toggle-close {
  display: block;
}

.side-nav span,
.side-nav button span {
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.12s ease, transform 0.12s ease, max-width 0.16s ease;
}

body.side-nav-expanded .side-nav span,
body.side-nav-expanded .side-nav button span {
  max-width: 120px;
  opacity: 1;
  transform: translateX(0);
}

.side-nav-form {
  width: 100%;
  margin: auto 0 0;
}

.side-nav-separator {
  height: 1px;
  flex: 0 0 auto;
  align-self: stretch;
  margin: 2px 8px;
  background: var(--border);
}

.dashboard-shell {
  width: min(1460px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 36px;
}

.dashboard-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.pipeline-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
}

.pipeline-tab {
  min-height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 680;
}

.pipeline-tab:hover {
  border-color: #aeb9c5;
  background: #eef2f5;
}

.pipeline-tab.is-active {
  border-color: var(--accent);
  background: rgba(35, 111, 101, 0.08);
  color: var(--accent-strong);
}

.expert-role-tabs {
  margin: 0 0 16px;
}

.expert-role-tabs .pipeline-tab {
  cursor: pointer;
  font: inherit;
}

.date-mode-switcher {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  margin-left: auto;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.date-mode-switcher[hidden] {
  display: none;
}

.date-mode-button {
  min-height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 720;
  padding: 6px 10px;
  cursor: pointer;
}

.date-mode-button:hover,
.date-mode-button:focus-visible {
  background: #eef2f5;
  color: var(--text);
  outline: none;
}

.date-mode-button.is-active {
  background: rgba(35, 111, 101, 0.1);
  color: var(--accent-strong);
}

.dashboard-header {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 16px;
  margin-bottom: 12px;
}

.dashboard-header h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 760;
}

.dashboard-title-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dashboard-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dashboard-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
  font-weight: 400;
}

.dashboard-data-time {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  font-weight: 500;
}

.dashboard-data-time[hidden] {
  display: none;
}

#experiment-data-time {
  margin-bottom: 16px;
}

.dashboard-heading-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.dashboard-loader {
  width: 18px;
  height: 18px;
  margin-top: 7px;
  flex: 0 0 auto;
  border: 2px solid rgba(35, 111, 101, 0.18);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: dashboard-spin 0.75s linear infinite;
}

.dashboard-loader[hidden] {
  display: none;
}

.dashboard-title-row .dashboard-loader {
  margin-top: 0;
}

@keyframes dashboard-spin {
  to {
    transform: rotate(360deg);
  }
}

.manager-list {
  display: grid;
  gap: 14px;
}

.partners-pipeline-list {
  display: grid;
  gap: 24px;
}

.partners-pipeline-section {
  display: grid;
  gap: 10px;
}

.partners-pipeline-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.partners-pipeline-heading h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 780;
}

.partners-stages-row {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.expert-manager-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
}

.manager-block {
  min-width: 0;
  background: var(--surface);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 16px;
}

.manager-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.manager-heading h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 760;
}

.expert-manager-selector {
  position: relative;
  z-index: 7;
}

.expert-manager-toggle {
  border: 0;
  background: transparent;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0;
  font: inherit;
  font-size: 20px;
  font-weight: 760;
  line-height: 1.2;
  cursor: pointer;
}

.expert-manager-toggle:focus-visible {
  border-radius: 4px;
  outline: 2px solid rgba(35, 111, 101, 0.35);
  outline-offset: 3px;
}

.expert-manager-toggle-chevron {
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-2px) rotate(45deg);
}

.expert-manager-toggle[aria-expanded="true"] .expert-manager-toggle-chevron {
  transform: translateY(2px) rotate(225deg);
}

.expert-manager-panel {
  min-width: 230px;
  position: absolute;
  z-index: 16;
  top: calc(100% + 10px);
  left: 0;
  display: grid;
  gap: 3px;
  border: 1px solid #dfe4ea;
  background: var(--surface);
  box-shadow: 0 16px 32px rgba(28, 34, 41, 0.12);
  padding: 8px;
}

.expert-manager-panel[hidden] {
  display: none;
}

.expert-manager-option {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #3c475b;
  padding: 5px 10px;
  font: inherit;
  font-size: 14px;
  text-align: left;
}

.expert-manager-name {
  min-width: 0;
  flex: 1 1 auto;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.expert-manager-name:focus-visible {
  border-radius: 3px;
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.expert-manager-option input {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  margin: 1px 0 0;
  accent-color: var(--accent);
}

.expert-manager-option:hover,
.expert-manager-option:focus-within,
.expert-manager-option.is-active {
  background: #e9fbfd;
  color: #127e9e;
  outline: none;
}

.manager-title-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.manager-note,
.error-box {
  margin: -2px 0 12px;
  padding: 9px 10px;
  border: 1px solid rgba(179, 66, 66, 0.24);
  border-radius: 8px;
  background: var(--danger-bg);
  color: #763332;
  font-size: 13px;
  font-weight: 620;
}

.manager-summary {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 680;
}

.manager-summary-badge {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  padding: 6px 9px;
}

.manager-summary-badge[href] {
  text-decoration: none;
}

.manager-summary-badge[href]:hover {
  border-color: rgba(35, 111, 101, 0.28);
  color: var(--accent-strong);
}

.manager-summary-badge-danger {
  border-color: rgba(179, 66, 66, 0.35);
  background: var(--danger-bg);
  color: var(--danger);
}

.manager-summary-badge-danger[href]:hover {
  border-color: rgba(179, 66, 66, 0.45);
  background: #ffe9e4;
  color: var(--danger);
}

.stages-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(136px, 1fr));
  gap: 0;
  overflow-x: auto;
  padding-bottom: 2px;
}

.dashboard-stages-row {
  display: flex;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-gutter: stable;
  padding-bottom: 6px;
}

.dashboard-stages-row:focus-visible {
  border-radius: 6px;
  outline: 2px solid rgba(35, 111, 101, 0.35);
  outline-offset: 3px;
}

.experiment-stages-row {
  grid-template-columns: repeat(9, minmax(136px, 1fr));
  overflow: visible;
}

.experiment-stage-filter {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.experiment-stage-filter-toggle {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  display: inline-grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
}

.experiment-stage-filter-toggle:hover,
.experiment-stage-filter-toggle:focus-visible,
.experiment-stage-filter-toggle[aria-expanded="true"] {
  background: #eef2f5;
  color: var(--accent-strong);
  outline: none;
}

.experiment-stage-filter-toggle svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.experiment-stage-filter-summary {
  max-width: 92px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.experiment-stage-filter-clear {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  display: inline-grid;
  place-items: center;
  padding: 0;
  font: inherit;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}

.experiment-stage-filter-clear:hover,
.experiment-stage-filter-clear:focus-visible {
  background: #eef2f5;
  color: var(--text);
  outline: none;
}

.experiment-stage-period-panel {
  width: 180px;
  position: absolute;
  z-index: 10;
  top: calc(100% + 8px);
  left: 0;
  display: block;
  border: 1px solid #dfe4ea;
  background: var(--surface);
  box-shadow: 0 16px 32px rgba(28, 34, 41, 0.12);
}

.experiment-stage-period-panel.is-align-right {
  right: 0;
  left: auto;
}

.experiment-stage-period-panel[hidden] {
  display: none;
}

.experiment-stage-period-panel.is-custom-open {
  width: 570px;
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
}

.experiment-stage-period-presets {
  display: grid;
  align-content: start;
  gap: 3px;
  padding: 8px;
}

.experiment-stage-period-panel.is-custom-open .experiment-stage-period-presets {
  border-right: 1px solid #dfe4ea;
}

.experiment-stage-period-presets button {
  min-height: 32px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #3c475b;
  padding: 5px 10px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.experiment-stage-period-presets button:hover,
.experiment-stage-period-presets button:focus-visible,
.experiment-stage-period-presets button.is-active {
  background: #e9fbfd;
  color: #127e9e;
  outline: none;
}

.experiment-stage-period-form {
  display: none;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 10px;
  row-gap: 10px;
  padding: 14px;
}

.experiment-stage-period-panel.is-custom-open .experiment-stage-period-form {
  display: grid;
}

.experiment-stage-period-form h3 {
  grid-column: 1 / -1;
  margin: 0;
  color: #3c475b;
  font-size: 17px;
  line-height: 1.15;
  font-weight: 720;
}

.experiment-stage-period-form label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.experiment-stage-period-form input {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  border: 1px solid #c8d0da;
  border-radius: 7px;
  background: var(--surface);
  color: #111417;
  padding: 5px 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
}

.experiment-stage-period-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.experiment-stage-period-apply {
  min-height: 36px;
  border-radius: 7px;
  padding: 5px 11px;
  font: inherit;
  font-size: 13px;
  font-weight: 680;
  cursor: pointer;
}

.experiment-stage-period-apply {
  margin-left: auto;
  border: 1px solid #1496bd;
  background: #1496bd;
  color: #fff;
}

.experiment-stage-period-apply:hover,
.experiment-stage-period-apply:focus-visible {
  border-color: #087a9d;
  background: #087a9d;
  outline: none;
}

.cohort-analysis {
  margin-top: 22px;
}

.cohort-panel {
  background: var(--surface);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.cohort-heading {
  margin: 0 0 4px;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 760;
}

.cohort-description {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
}

.cohort-date-issues {
  margin-top: 20px;
  border: 1px solid #f0c8a7;
  border-radius: 8px;
  background: #fffaf5;
  padding: 16px;
}

.cohort-date-issues > h3 {
  margin: 0;
  color: #9a4b13;
  font-size: 16px;
  font-weight: 760;
}

.cohort-date-issues > p {
  max-width: 920px;
  margin: 6px 0 0;
  color: #765236;
  font-size: 13px;
  line-height: 1.45;
}

.cohort-date-issue-groups {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.cohort-date-issue-group {
  min-width: 0;
  border: 1px solid #ead8c9;
  border-radius: 7px;
  background: var(--surface);
  padding: 12px;
}

.cohort-date-issue-group h4 {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 720;
  line-height: 1.35;
}

.cohort-date-issue-group h4 strong {
  min-width: 26px;
  border-radius: 999px;
  background: #fce7d5;
  color: #9a4b13;
  padding: 2px 7px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.cohort-date-issue-table-wrap {
  overflow-x: auto;
  margin-top: 10px;
}

.cohort-date-issue-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
}

.cohort-date-issue-deal-column {
  width: 180px;
}

.cohort-date-issue-table th,
.cohort-date-issue-table td {
  padding: 9px 10px;
  text-align: left;
  vertical-align: top;
}

.cohort-date-issue-table th {
  background: #fffaf5;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.cohort-date-issue-table td {
  border-top: 1px solid #ead8c9;
}

.cohort-date-issue-table td > a {
  color: var(--accent-strong);
  font-weight: 700;
  text-decoration: none;
}

.cohort-date-issue-table td > a:hover,
.cohort-date-issue-table td > a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 2px;
  outline: none;
}

.cohort-quality-stage {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.cohort-quality-stage strong {
  min-width: 0;
  color: var(--text);
  font-weight: 650;
}

.cohort-quality-stage > span {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cohort-quality-stage.is-missing > span {
  color: #9a4b13;
  font-weight: 700;
}

.cohort-controls {
  display: grid;
  grid-template-columns: 250px 350px;
  align-items: end;
  gap: 10px;
  margin: 24px 0;
}

.cohort-source-control {
  position: relative;
  z-index: 5;
}

.cohort-controls select,
.cohort-source-control select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  padding: 5px 8px;
  font: inherit;
  font-size: 14px;
}

.cohort-source-control select {
  min-height: 44px;
}

.cohort-source-field-label,
.cohort-period-field-label {
  position: absolute;
  z-index: 1;
  top: -7px;
  left: 10px;
  padding: 0 4px;
  background: var(--surface);
  color: #798596;
  font-size: 11px;
  font-weight: 400;
  line-height: 14px;
  pointer-events: none;
}

.cohort-period-control {
  position: relative;
  z-index: 5;
}

.cohort-entry-source-control {
  width: 180px;
}

.cohort-entry-period-control {
  width: max-content;
  max-width: 100%;
}

.cohort-entry-source-control select {
  width: 180px;
  min-height: 24px;
  border-color: #d7dee6;
  border-radius: 5px;
  padding: 2px 24px 2px 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.cohort-entry-period-control .cohort-period-toggle {
  width: auto;
  min-height: 24px;
  border-color: #d7dee6;
  border-radius: 5px;
  justify-content: flex-start;
  padding: 2px 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.cohort-entry-period-control .cohort-period-toggle-copy {
  flex-wrap: nowrap;
  gap: 5px;
}

.cohort-entry-period-control .cohort-period-toggle-copy strong,
.cohort-entry-period-control .cohort-period-toggle-copy em {
  font-size: 11px;
  font-weight: 650;
  line-height: 1.1;
  white-space: nowrap;
}

.cohort-entry-period-control .cohort-period-toggle-chevron {
  width: 5px;
  height: 5px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  font-size: 0;
  line-height: 0;
  transform: translateY(-1px) rotate(45deg);
}

.cohort-entry-period-control .cohort-period-toggle[aria-expanded="true"] .cohort-period-toggle-chevron {
  transform: translateY(0) rotate(225deg);
}

.cohort-period-toggle {
  width: 100%;
  min-height: 44px;
  border: 1px solid #c8d0da;
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 12px;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.cohort-period-toggle-copy {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}

.cohort-period-toggle-copy strong {
  font-size: 14px;
  font-weight: 720;
  letter-spacing: 0;
  line-height: 1.1;
}

.cohort-period-toggle-copy em {
  color: #9aa4b4;
  font-size: 13px;
  font-style: normal;
  font-weight: 500;
  line-height: 1.1;
  white-space: normal;
}

.cohort-period-toggle-chevron {
  color: #9aa4b4;
  flex: 0 0 auto;
  font-size: 17px;
  line-height: 0.65;
  transform: translateY(-4px);
}

.cohort-period-toggle[aria-expanded="true"] .cohort-period-toggle-chevron {
  transform: translateY(4px) rotate(180deg);
}

.cohort-period-panel {
  width: 220px;
  position: absolute;
  z-index: 12;
  top: calc(100% + 8px);
  left: 0;
  display: block;
  border: 1px solid #dfe4ea;
  background: var(--surface);
  box-shadow: 0 16px 32px rgba(28, 34, 41, 0.12);
}

.cohort-period-panel[hidden] {
  display: none;
}

.cohort-period-panel.is-custom-open {
  width: 650px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
}

.cohort-period-presets {
  display: grid;
  align-content: start;
  gap: 3px;
  padding: 8px;
}

.cohort-period-panel.is-custom-open .cohort-period-presets {
  border-right: 1px solid #dfe4ea;
}

.cohort-period-presets button {
  min-height: 32px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #3c475b;
  padding: 5px 10px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}

.cohort-period-presets button:hover,
.cohort-period-presets button:focus-visible,
.cohort-period-presets button.is-active {
  background: #e9fbfd;
  color: #127e9e;
  outline: none;
}

.cohort-custom-period-form {
  display: none;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
}

.cohort-period-panel.is-custom-open .cohort-custom-period-form {
  display: grid;
}

.cohort-custom-period-form h3 {
  grid-column: 1 / -1;
  margin: 0;
  color: #3c475b;
  font-size: 18px;
  font-weight: 720;
}

.cohort-custom-period-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 680;
}

.cohort-custom-period-form input {
  min-height: 40px;
  border: 1px solid #c8d0da;
  border-radius: 8px;
  background: var(--surface);
  color: #111417;
  padding: 6px 9px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
}

.cohort-custom-period-apply {
  grid-column: 2;
  justify-self: end;
  min-width: 130px;
  min-height: 40px;
  border: 1px solid #1496bd;
  border-radius: 8px;
  background: #1496bd;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 720;
  cursor: pointer;
}

.cohort-apply {
  min-height: 36px;
  border: 1px solid var(--accent);
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  padding: 5px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 720;
  cursor: pointer;
}

.cohort-apply:hover,
.cohort-apply:focus-visible {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  outline: none;
}

.cohort-result {
  margin-top: 10px;
}

.cohort-summary {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 14px;
}

.cohort-summary strong {
  font-size: 26px;
  line-height: 1;
  font-weight: 800;
}

.cohort-summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.cohort-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.cohort-table th,
.cohort-table td {
  padding: 9px 8px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.cohort-table .cohort-data-row td {
  height: 42px;
}

.cohort-table .cohort-untracked-stage td {
  color: var(--muted);
  font-style: italic;
}

.cohort-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.cohort-table td:not(:first-child),
.cohort-table th:not(:first-child) {
  text-align: right;
}

.cohort-deal-count-link {
  color: inherit;
  text-decoration: none;
}

.cohort-deal-count-link:hover,
.cohort-deal-count-link:focus-visible {
  color: var(--accent-strong);
  text-decoration: underline;
  text-underline-offset: 2px;
  outline: none;
}

.cohort-deal-count-split {
  display: inline-grid;
  justify-items: end;
  gap: 2px;
  font-variant-numeric: tabular-nums;
}

.cohort-deal-count-split > strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.cohort-deal-count-split > span {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
  white-space: nowrap;
}

.cohort-deal-count-split a {
  color: var(--accent-strong);
  text-decoration: none;
}

.cohort-deal-count-split a:hover,
.cohort-deal-count-split a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 2px;
  outline: none;
}

.cohort-table td.cohort-stage-filter-column,
.cohort-table th.cohort-stage-filter-column {
  text-align: left;
  white-space: nowrap;
}

.cohort-row-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 0;
  color: inherit;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.cohort-row-toggle:hover,
.cohort-row-toggle:focus-visible {
  color: var(--accent-strong);
  outline: none;
}

.cohort-row-toggle-chevron {
  box-sizing: border-box;
  width: 7px;
  height: 7px;
  margin-top: -2px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  color: var(--muted);
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}

.cohort-row-toggle[aria-expanded="true"] .cohort-row-toggle-chevron {
  margin-top: -4px;
  transform: rotate(45deg);
}

.cohort-entry-stage-cell {
  display: flex;
  align-items: center;
  gap: 7px;
}

.cohort-entry-stage-cell .cohort-row-toggle {
  flex: 0 0 12px;
}

.cohort-aggregate-detail > td {
  height: auto;
  max-width: 0;
  padding: 0;
  background: #fbfcfd;
}

.cohort-aggregate-shell {
  width: 100%;
  min-width: 0;
  padding: 14px 16px 16px;
}

.cohort-aggregate-heading {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
}

.cohort-aggregate-scroll {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-gutter: stable;
  touch-action: pan-x;
}

.cohort-aggregate-scroll:focus-visible {
  outline: 2px solid rgba(35, 111, 101, 0.38);
  outline-offset: 2px;
}

.cohort-aggregate-grid {
  display: flex;
  width: max-content;
  min-width: 100%;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
}

.cohort-aggregate {
  flex: 0 0 280px;
  min-width: 280px;
  padding: 12px 14px;
}

.cohort-aggregate + .cohort-aggregate {
  border-left: 1px solid var(--border);
}

.cohort-aggregate h3 {
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cohort-aggregate ul {
  display: grid;
  gap: 4px;
  margin: 9px 0 0;
  padding: 0;
  list-style: none;
}

.cohort-aggregate li {
  min-width: 0;
}

.cohort-aggregate li > a,
.cohort-aggregate-group h4 > a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.cohort-aggregate li > a:hover,
.cohort-aggregate li > a:focus-visible,
.cohort-aggregate-group h4 > a:hover,
.cohort-aggregate-group h4 > a:focus-visible {
  color: var(--accent-strong);
  outline: none;
}

.cohort-aggregate-value {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 4ch 4.5ch;
  align-items: baseline;
  column-gap: 6px;
  font-size: 12px;
}

.cohort-aggregate-value > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cohort-aggregate-value strong,
.cohort-aggregate-value em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.cohort-aggregate-value.is-zero,
.cohort-aggregate-value.is-zero strong,
.cohort-aggregate-value.is-zero em {
  color: #b2bcc6;
}

.cohort-aggregate-group {
  margin-top: 8px;
}

.cohort-aggregate-group h4 {
  display: flex;
  align-items: center;
  gap: 3px;
  margin: 0;
  font-size: 12px;
}

.cohort-aggregate-group h4 > a,
.cohort-aggregate-group h4 > .cohort-aggregate-value {
  flex: 1 1 auto;
  min-width: 0;
}

.cohort-aggregate-group h4 .cohort-aggregate-value strong {
  color: var(--text);
  font-size: 12px;
}

.cohort-aggregate-group-toggle {
  display: grid;
  flex: 0 0 16px;
  place-items: center;
  width: 16px;
  height: 16px;
  margin: 0 3px 0 -3px;
  padding: 0;
  color: var(--muted);
  border: 0;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
}

.cohort-aggregate-group-toggle:hover,
.cohort-aggregate-group-toggle:focus-visible {
  background: #eef2f5;
  outline: none;
}

.cohort-aggregate-group-toggle span {
  display: block;
  box-sizing: border-box;
  width: 6px;
  height: 6px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(-45deg);
}

.cohort-aggregate-group-toggle[aria-expanded="true"] span {
  transform: rotate(45deg);
}

.cohort-aggregate-group > ul {
  margin-top: 5px;
  padding-left: 20px;
}

.cohort-aggregate-group > ul[hidden] {
  display: none;
}

.cohort-aggregate-empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.cohort-stage-cell {
  display: flex;
  align-items: center;
  gap: 9px;
}

.cohort-stage-period-filter {
  position: relative;
  z-index: 4;
  flex: 0 0 auto;
}

.cohort-stage-period-filter.is-open {
  z-index: 20;
}

.cohort-stage-period-toggle {
  min-height: 24px;
  border: 1px solid #d7dee6;
  border-radius: 5px;
  background: var(--surface);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  font: inherit;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
}

.cohort-stage-period-toggle:hover,
.cohort-stage-period-toggle:focus-visible,
.cohort-stage-period-toggle[aria-expanded="true"] {
  border-color: #aeb9c5;
  color: var(--text);
  outline: none;
}

.cohort-stage-period-toggle-chevron {
  width: 5px;
  height: 5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  flex: 0 0 auto;
  transform: translateY(-1px) rotate(45deg);
}

.cohort-stage-period-toggle[aria-expanded="true"] .cohort-stage-period-toggle-chevron {
  transform: translateY(0) rotate(225deg);
}

.cohort-stage-period-panel {
  width: 210px;
  position: absolute;
  z-index: 15;
  top: calc(100% + 6px);
  left: 0;
  border: 1px solid #dfe4ea;
  background: var(--surface);
  box-shadow: 0 16px 32px rgba(28, 34, 41, 0.12);
}

.cohort-stage-period-filter.is-open-upward .cohort-stage-period-panel {
  top: auto;
  bottom: calc(100% + 6px);
  box-shadow: 0 -16px 32px rgba(28, 34, 41, 0.12);
}

.cohort-stage-period-panel[hidden] {
  display: none;
}

.cohort-stage-period-panel.is-config-open {
  width: 570px;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
}

.cohort-stage-period-options {
  display: grid;
  align-content: start;
  gap: 3px;
  padding: 8px;
}

.cohort-stage-period-panel.is-config-open .cohort-stage-period-options {
  border-right: 1px solid #dfe4ea;
}

.cohort-stage-period-options button {
  min-height: 32px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #3c475b;
  padding: 5px 10px;
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.cohort-stage-period-options button:hover,
.cohort-stage-period-options button:focus-visible,
.cohort-stage-period-options button.is-active {
  background: #e9fbfd;
  color: #127e9e;
  outline: none;
}

.cohort-stage-period-form {
  display: none;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  padding: 14px;
}

.cohort-stage-period-panel.is-config-open .cohort-stage-period-form {
  display: grid;
}

.cohort-stage-period-form h3 {
  grid-column: 1 / -1;
  margin: 0;
  color: #3c475b;
  font-size: 16px;
  font-weight: 720;
}

.cohort-stage-period-form label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
}

.cohort-stage-period-form input {
  min-width: 0;
  min-height: 36px;
  border: 1px solid #c8d0da;
  border-radius: 7px;
  background: var(--surface);
  color: #111417;
  padding: 5px 8px;
  font: inherit;
  font-size: 13px;
}

.cohort-stage-period-form button {
  grid-column: 2;
  justify-self: end;
  min-height: 36px;
  border: 1px solid #1496bd;
  border-radius: 7px;
  background: #1496bd;
  color: #fff;
  padding: 5px 11px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.cohort-current-title {
  margin: 18px 0 8px;
  font-size: 14px;
  font-weight: 760;
}

.cohort-current-stages {
  display: grid;
  grid-template-columns: repeat(9, minmax(110px, 1fr));
  overflow: visible;
}

.cohort-current-stage {
  min-width: 0;
  padding: 7px 10px;
}

.cohort-current-stage + .cohort-current-stage {
  border-left: 1px solid var(--border);
}

.cohort-current-stage h4 {
  min-height: 30px;
  margin: 0 0 6px;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 700;
}

.cohort-current-stage strong {
  font-size: 20px;
  line-height: 1;
  font-weight: 800;
}


.task-buckets-row {
  grid-template-columns: repeat(6, minmax(150px, 1fr));
}

.dashboard-stages-row .stage-cell {
  flex: 0 0 220px;
  min-width: 220px;
  scroll-snap-align: start;
}

.stage-cell {
  min-width: 0;
  background: transparent;
  padding: 6px 12px 8px;
}

.stage-cell:first-child {
  padding-left: 0;
}

.stage-cell + .stage-cell {
  border-left: 1px solid var(--border);
}

.stage-cell h3 {
  min-height: 38px;
  margin: 0;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 760;
}

.stage-cell-heading,
.task-bucket-heading {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-radius: 5px;
  margin: 0 -6px;
  padding: 4px 6px;
}

.stage-cell-heading h3,
.task-bucket-heading h3 {
  min-height: 0;
  font-size: 14px;
  font-weight: 720;
  line-height: 1.1;
}

.stage-cell-heading .metric-value,
.task-bucket-heading .metric-value {
  font-size: 14px;
  font-weight: 720;
  line-height: 1.1;
  min-width: 2ch;
  border-radius: 5px;
  padding: 1px 3px;
}

.task-bucket-values {
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 0;
  min-width: 4ch;
}

.task-bucket-overdue-value {
  color: var(--danger);
  font-size: 14px;
  font-weight: 720;
  line-height: 1.1;
}

.stage-cell-heading-link,
.task-bucket-heading-link {
  color: inherit;
  text-decoration: none;
}

.task-bucket-heading-danger {
  color: var(--danger);
}

.stage-cell-heading-link:hover,
.task-bucket-heading-link:hover {
  background: #eef2f5;
  color: var(--accent-strong);
}

.task-bucket-heading-link-danger:hover {
  background: var(--danger-bg);
  color: var(--danger);
}

.stage-taskless-row {
  margin-top: 12px;
}

.task-bucket-cell .age-buckets {
  margin-top: 6px;
  padding-top: 6px;
}

.metric {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
}

.metric-value {
  display: inline-block;
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  font-weight: 800;
  min-width: 1.1em;
  border-radius: 6px;
  padding: 1px 3px;
  text-align: right;
}

.metric-value-link {
  text-decoration: none;
}

.metric-value-link:hover {
  background: #eef2f5;
  color: var(--accent-strong);
}

.metric-value-link.taskless-positive:hover {
  background: var(--danger-bg);
  color: var(--danger);
}

.metric-zero {
  color: var(--muted);
  opacity: 0.5;
}

.taskless-positive {
  color: var(--danger);
}

.age-buckets {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

.age-bucket {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  border-radius: 5px;
  color: #46515e;
  font-size: 11px;
  line-height: 1.25;
  margin: 0 -3px;
  padding: 2px 3px;
}

.age-bucket-link {
  text-decoration: none;
}

.age-bucket-link:hover {
  background: #eef2f5;
  color: var(--accent-strong);
}

.age-bucket-link:hover .age-bucket-value.taskless-positive {
  color: var(--danger);
}

.age-bucket-link-danger {
  color: var(--danger);
}

.age-bucket-link-danger:hover {
  background: var(--danger-bg);
  color: var(--danger);
}

.age-bucket-values {
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 0;
  min-width: 4ch;
}

.age-bucket-overdue-value {
  color: var(--danger);
  font-size: 13px;
  font-weight: 760;
  line-height: 1;
}

.age-bucket.is-zero {
  color: #aeb8c3;
}

.age-bucket-value {
  display: inline-block;
  color: var(--text);
  font-size: 13px;
  font-weight: 780;
  line-height: 1;
  min-width: 2ch;
  border-radius: 5px;
  padding: 1px 3px;
  text-align: right;
}

.age-bucket.is-zero .age-bucket-value {
  color: #c5ced7;
  opacity: 1;
}

.age-bucket-value.taskless-positive {
  color: var(--danger);
}

.task-metric {
  margin-top: 18px;
}

.test-filter-row {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.test-manager-role-controls {
  margin-bottom: 12px;
}

.test-manager-role-tab {
  font-family: inherit;
  cursor: pointer;
}

.test-heading-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.test-heading-title-row .dashboard-loader {
  margin-top: 0;
}

.test-shell .dashboard-header {
  margin-bottom: 24px;
}

.test-period-control {
  flex: 0 1 300px;
  position: relative;
  z-index: 5;
}

.test-transition-control {
  flex: 0 1 360px;
  position: relative;
  z-index: 5;
}

.test-filter-field-label {
  position: absolute;
  z-index: 1;
  top: -7px;
  left: 10px;
  padding: 0 4px;
  background: var(--surface);
  color: #798596;
  font-size: 11px;
  font-weight: 400;
  line-height: 14px;
  pointer-events: none;
}

.test-transition-toggle {
  width: 100%;
  min-height: 44px;
  border: 1px solid #c8d0da;
  border-radius: 8px;
  background: var(--surface);
  color: #111417;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 12px;
  font: inherit;
  cursor: pointer;
}

.test-transition-toggle:hover,
.test-transition-toggle:focus-visible,
.test-transition-toggle[aria-expanded="true"] {
  border-color: #aeb9c5;
  outline: none;
}

.test-transition-copy {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 680;
  line-height: 1.2;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.test-transition-copy.is-placeholder {
  color: #9aa4b4;
  font-weight: 500;
}

.test-transition-chevron {
  color: #7b8798;
  flex: 0 0 auto;
  font-size: 16px;
  line-height: 0.65;
  transform: translateY(-4px);
}

.test-transition-toggle[aria-expanded="true"] .test-transition-chevron {
  transform: translateY(4px) rotate(180deg);
}

.test-transition-panel {
  width: 660px;
  position: absolute;
  z-index: 10;
  top: calc(100% + 8px);
  left: 0;
  border: 1px solid #dfe4ea;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 16px 32px rgba(28, 34, 41, 0.12);
}

.test-transition-panel[hidden] {
  display: none;
}

.test-transition-stage-lists {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.test-transition-stage-list {
  display: grid;
  align-content: start;
  gap: 2px;
  padding: 12px;
}

.test-transition-stage-list + .test-transition-stage-list {
  border-left: 1px solid #dfe4ea;
}

.test-transition-stage-list h2 {
  margin: 0 0 4px;
  color: #3c475b;
  font-size: 14px;
  font-weight: 720;
  line-height: 1.2;
}

.test-transition-stage-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  border-radius: 6px;
  color: #3c475b;
  padding: 4px 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.test-transition-stage-option:hover,
.test-transition-stage-option:focus-within {
  background: #f4f7f8;
}

.test-transition-stage-option input {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
}

.test-transition-actions {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid #dfe4ea;
  padding: 10px 12px;
}

.test-transition-apply {
  min-height: 34px;
  border: 1px solid #1496bd;
  border-radius: 7px;
  background: #1496bd;
  color: #fff;
  padding: 5px 13px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.test-transition-apply:hover,
.test-transition-apply:focus-visible {
  border-color: #087a9d;
  background: #087a9d;
  outline: none;
}

.test-period-toggle {
  width: 100%;
  min-height: 44px;
  border: 1px solid #c8d0da;
  border-radius: 8px;
  background: var(--surface);
  color: #111417;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 12px;
  font: inherit;
  cursor: pointer;
}

.test-period-toggle:hover,
.test-period-toggle:focus-visible,
.test-period-toggle[aria-expanded="true"] {
  border-color: #aeb9c5;
  outline: none;
}

.test-period-toggle-copy {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
}

.test-period-toggle strong {
  font-size: 14px;
  font-weight: 720;
  letter-spacing: 0;
  line-height: 1.1;
}

.test-period-toggle-copy span {
  color: #9aa4b4;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.1;
  white-space: nowrap;
}

.test-period-toggle-chevron {
  color: #9aa4b4;
  flex: 0 0 auto;
  font-size: 16px;
  line-height: 0.65;
  transform: translateY(-4px);
}

.test-period-toggle[aria-expanded="true"] .test-period-toggle-chevron {
  transform: translateY(4px) rotate(180deg);
}

.test-period-panel {
  width: 660px;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  display: grid;
  grid-template-columns: minmax(196px, 27%) minmax(0, 1fr);
  border: 1px solid #dfe4ea;
  background: var(--surface);
  box-shadow: 0 16px 32px rgba(28, 34, 41, 0.12);
}

.test-period-panel[hidden] {
  display: none;
}

.test-period-presets {
  display: grid;
  align-content: start;
  gap: 3px;
  padding: 8px;
  border-right: 1px solid #dfe4ea;
}

.test-period-presets button {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #3c475b;
  padding: 5px 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.test-period-presets button:hover,
.test-period-presets button:focus-visible {
  background: #f4f7f8;
  outline: none;
}

.test-period-presets button.is-active {
  background: #e9fbfd;
  color: #127e9e;
  font-weight: 680;
}

.test-custom-period-form {
  display: grid;
  align-content: start;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 12px;
  row-gap: 12px;
  padding: 16px;
}

.test-custom-period-form h2 {
  grid-column: 1 / -1;
  margin: 0;
  color: #3c475b;
  font-size: 18px;
  line-height: 1.15;
  font-weight: 720;
}

.test-custom-period-fields {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.test-custom-period-fields label {
  display: grid;
  gap: 5px;
  color: #6e7788;
  font-size: 14px;
  font-weight: 680;
}

.test-custom-period-fields input {
  width: 100%;
  min-height: 42px;
  border: 1px solid #c8d0da;
  border-radius: 8px;
  background: var(--surface);
  color: #111417;
  padding: 6px 9px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
}

.test-custom-period-fields input:focus-visible {
  border-color: var(--accent);
  outline: 2px solid rgba(35, 111, 101, 0.2);
  outline-offset: 1px;
}

.test-period-apply {
  grid-column: 2;
  justify-self: end;
  min-width: 138px;
  min-height: 42px;
  border: 1px solid #1496bd;
  border-radius: 8px;
  background: #1496bd;
  color: #fff;
  padding: 7px 14px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.test-period-apply:hover,
.test-period-apply:focus-visible {
  border-color: #087a9d;
  background: #087a9d;
  outline: none;
}

.test-manager-list {
  display: grid;
  gap: 14px;
}

.test-manager-card {
  min-width: 0;
  background: var(--surface);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.test-manager-summary-card {
  border: 1px solid rgba(35, 111, 101, 0.22);
}

.test-manager-card header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border);
}

.test-manager-card h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
}

.test-manager-total,
.test-manager-total-link {
  flex: 0 0 auto;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}

.test-manager-total-link {
  border-radius: 5px;
  margin: -3px -5px;
  padding: 3px 5px;
  text-decoration: none;
}

.test-manager-total-link:hover,
.test-manager-total-link:focus-visible {
  background: #eef2f5;
  color: var(--accent-strong);
  outline: none;
}

.test-manager-aggregates {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.test-aggregate-scroll {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-gutter: stable;
}

.test-aggregate-scroll:focus-visible {
  outline: 2px solid rgba(35, 111, 101, 0.38);
  outline-offset: -2px;
}

.events-sales-shell .test-manager-aggregates {
  min-width: 1960px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.events-lead-shell .test-manager-aggregates {
  min-width: 1960px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.events-sales-shell .test-aggregate {
  padding: 12px 16px;
}

.events-sales-shell .test-aggregate h3 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.test-aggregate {
  min-width: 0;
  padding: 14px 16px;
}

.test-aggregate + .test-aggregate {
  border-left: 1px solid var(--border);
}

.test-aggregate h3 {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.test-aggregate ul {
  display: grid;
  gap: 5px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.test-aggregate li {
  width: 100%;
  min-width: 0;
  color: var(--text);
  font-size: 13px;
}

.test-aggregate-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 4ch 4.25ch;
  align-items: baseline;
  column-gap: 6px;
  width: 100%;
  min-width: 0;
}

.test-aggregate-link {
  display: block;
  width: 100%;
  position: relative;
  color: inherit;
  border-radius: 5px;
  margin: -3px 0;
  padding: 3px 0;
  text-decoration: none;
}

.test-aggregate-link::before {
  position: absolute;
  z-index: 0;
  inset: 0 -6px;
  border-radius: 8px;
  content: "";
  pointer-events: none;
}

.test-aggregate-link:hover,
.test-aggregate-link:focus-visible {
  color: var(--accent-strong);
  outline: none;
}

.test-aggregate-link:hover::before,
.test-aggregate-link:focus-visible::before {
  background: #eef2f5;
}

.test-aggregate-link .test-aggregate-row {
  position: relative;
  z-index: 1;
}

.test-aggregate-row > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.test-aggregate-row strong {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.test-aggregate-row.is-zero,
.test-aggregate-row.is-zero > span {
  color: #aeb8c3;
}

.test-aggregate-row.is-zero strong {
  color: #c5ced7;
}

.test-aggregate li.test-aggregate-empty {
  color: var(--muted);
}

.test-aggregate-group {
  margin-top: 5px;
}

.test-aggregate-grouped > h3 + .test-aggregate-group {
  margin-top: 10px;
}

.test-aggregate-group-header {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  font-size: 13px;
  line-height: inherit;
}

.test-aggregate-group-toggle {
  position: relative;
  display: grid;
  flex: 0 0 16px;
  place-items: center;
  width: 16px;
  height: 16px;
  margin: 0 5px 0 -5px;
  padding: 0;
  color: var(--text);
  border: 0;
  border-radius: 5px;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.test-aggregate-group-toggle::before {
  position: absolute;
  z-index: 0;
  inset: -4.5px -1px;
  border-radius: 8px;
  content: "";
}

.test-aggregate-group-toggle:hover::before,
.test-aggregate-group-toggle:focus-visible::before {
  background: #eef2f5;
}

.test-aggregate-group-toggle:focus-visible {
  outline: none;
}

.test-aggregate-group-link,
.test-aggregate-group-heading {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 720;
  line-height: inherit;
}

.test-aggregate-group-heading {
  display: block;
  margin: -3px 0;
  padding: 3px 0;
}

.test-aggregate-group-link .test-aggregate-row,
.test-aggregate-group-heading .test-aggregate-row {
  position: relative;
  z-index: 1;
}

.test-aggregate-group-link .test-aggregate-row strong,
.test-aggregate-group-heading .test-aggregate-row strong {
  color: var(--text);
  font-size: 13px;
}

.test-aggregate-group-link .test-aggregate-row.is-zero strong,
.test-aggregate-group-heading .test-aggregate-row.is-zero strong {
  color: #c5ced7;
}

.test-aggregate-share {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.test-aggregate-row.is-zero .test-aggregate-share {
  color: #c5ced7;
}

.test-aggregate-group-chevron {
  display: block;
  box-sizing: border-box;
  width: 6px;
  height: 6px;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  color: var(--muted);
  transform: rotate(-45deg);
  transform-origin: center;
  transition: transform 0.15s ease;
}

.test-aggregate-group.is-expanded .test-aggregate-group-chevron {
  transform: rotate(45deg);
}

.test-aggregate-group ul {
  gap: 3px;
  margin-top: 5px;
  padding-left: 26px;
}

.test-aggregate-group ul[hidden] {
  display: none;
}

.test-aggregate-group .test-aggregate-link .test-aggregate-row {
  position: relative;
  z-index: 1;
}

.test-empty-state {
  margin: 0;
  padding: 16px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 760px) {
  .test-filter-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .test-period-control,
  .test-transition-control {
    width: 100%;
    flex-basis: auto;
  }

  .test-transition-panel {
    width: 100%;
  }

  .test-period-toggle {
    min-height: 44px;
    padding: 10px 16px;
  }

  .test-period-toggle-copy {
    gap: 8px;
    flex-wrap: wrap;
  }

  .test-period-toggle strong {
    font-size: 16px;
  }

  .test-period-toggle-copy span {
    font-size: 14px;
  }

  .test-period-toggle-chevron {
    font-size: 18px;
  }

  .test-period-panel {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .test-period-presets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 12px;
    border-right: 0;
    border-bottom: 1px solid #dfe4ea;
  }

  .test-period-presets button {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 14px;
  }

  .test-custom-period-form {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 20px;
  }

  .test-custom-period-form h2 {
    font-size: 18px;
  }

  .test-custom-period-fields {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .test-custom-period-fields label {
    font-size: 14px;
  }

  .test-custom-period-fields input {
    min-height: 42px;
    font-size: 15px;
  }

  .test-period-apply {
    grid-column: 1;
    justify-self: stretch;
    min-width: 0;
    min-height: 42px;
    font-size: 15px;
  }

  .test-manager-aggregates {
    grid-template-columns: 1fr;
  }

  .events-sales-shell .test-manager-aggregates {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .events-lead-shell .test-manager-aggregates {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .test-aggregate + .test-aggregate {
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .events-sales-shell .test-aggregate + .test-aggregate {
    border-top: 0;
    border-left: 1px solid var(--border);
  }
}

@media (max-width: 540px) {
  .test-transition-stage-lists {
    grid-template-columns: 1fr;
  }

  .test-transition-stage-list + .test-transition-stage-list {
    border-top: 1px solid #dfe4ea;
    border-left: 0;
  }
}

.login-shell {
  width: min(440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0;
}

.login-panel {
  background: var(--surface);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 22px;
}

.login-panel h1 {
  margin: 0 0 18px;
  font-size: 26px;
  line-height: 1.1;
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-form label,
.full-row-label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
}

.admin-shell {
  width: min(1460px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 36px;
}

.admin-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.admin-header h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
  font-weight: 760;
}

.admin-header p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.admin-panel {
  background: var(--surface);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 14px;
}

.pipeline-admin-card {
  display: grid;
  gap: 14px;
}

.pipeline-admin-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.pipeline-admin-header h2,
.pipeline-admin-section h3 {
  margin: 0;
}

.pipeline-admin-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.pipeline-admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr);
  gap: 14px;
  align-items: start;
}

.pipeline-admin-section {
  display: grid;
  gap: 10px;
}

.inline-admin-form {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.inline-admin-form label {
  display: grid;
  gap: 5px;
}

.inline-admin-form span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
}

.inline-admin-form input {
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  background: var(--surface-soft);
}

.compact-table {
  margin-top: 2px;
}

.manager-checkbox-list {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.manager-checkbox-list label {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 8px 10px;
}

.manager-checkbox-list small {
  color: var(--muted);
}

.checkbox-fieldset {
  display: grid;
  gap: 8px;
  margin: 0;
  border: 0;
  padding: 0;
}

.checkbox-fieldset legend {
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
  padding: 0;
}

.checkbox-fieldset label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.role-create-panel {
  padding: 20px;
}

.role-create-panel h2 {
  margin-bottom: 4px;
}

.role-create-description {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13px;
}

.role-create-form {
  display: grid;
  gap: 20px;
}

.role-create-fields {
  display: grid;
  grid-template-columns: minmax(220px, 0.65fr) minmax(320px, 1.35fr);
  gap: 16px;
}

.role-create-fields label {
  display: grid;
  align-content: start;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
}

.role-create-fields input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  padding: 8px 10px;
}

.role-create-fields input::placeholder {
  color: #9aa5b1;
}

.role-create-fields input:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(35, 111, 101, 0.12);
  outline: none;
}

.role-create-fields small {
  color: #8793a0;
  font-size: 11px;
  font-weight: 500;
}

.role-permissions {
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.role-permissions legend {
  padding: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 720;
}

.role-permissions > p {
  margin: 3px 0 10px;
  color: var(--muted);
  font-size: 12px;
}

.role-permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
}

.role-permission-grid label {
  min-width: 0;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 9px 11px;
  color: var(--text);
  font-size: 13px;
  font-weight: 620;
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease;
}

.role-permission-grid label:hover {
  border-color: #aeb9c5;
  background: #f1f5f6;
}

.role-permission-grid label:has(input:checked) {
  border-color: rgba(35, 111, 101, 0.5);
  background: rgba(35, 111, 101, 0.08);
  color: var(--accent-strong);
}

.role-permission-grid input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin: 0;
  accent-color: var(--accent);
}

.role-permission-grid input:focus-visible {
  outline: 2px solid rgba(35, 111, 101, 0.45);
  outline-offset: 2px;
}

.role-create-actions {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.role-create-actions .primary-button {
  min-width: 138px;
}

.admin-panel h2 {
  margin: 0 0 12px;
  font-size: 18px;
  line-height: 1.2;
}

.manager-form {
  display: grid;
  grid-template-columns: 180px minmax(260px, 1fr) 220px auto;
  row-gap: 10px;
  column-gap: 18px;
  align-items: end;
}

.manager-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
}

.pipeline-section-picker {
  min-width: 260px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
}

.pipeline-section-picker legend {
  padding: 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
}

.pipeline-section-picker label,
.pipeline-sections-form label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: 13px;
  font-weight: 620;
}

.pipeline-section-picker input,
.pipeline-sections-form input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}

.pipeline-sections-form {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 12px 0 0;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.pipeline-sections-form strong {
  font-size: 13px;
}

.pipeline-sections-form button {
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface-soft);
  color: var(--text);
  padding: 6px 9px;
  font: inherit;
  font-size: 12px;
  font-weight: 680;
  cursor: pointer;
}

.manager-form input,
.manager-form select,
.login-form input,
.full-row-label input,
.stage-date-field-input,
.table-actions input,
.table-actions select {
  min-height: 38px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  padding: 8px 10px;
}

.primary-button,
.table-actions button {
  min-height: 38px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 680;
  padding: 8px 10px;
  cursor: pointer;
}

.primary-button {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.danger-button {
  color: var(--danger) !important;
}

.manager-table {
  width: 100%;
  border-collapse: collapse;
}

.manager-table th,
.manager-table td {
  border-bottom: 1px solid var(--border);
  padding: 10px 8px;
  text-align: left;
  vertical-align: middle;
}

.manager-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.manager-table tr.is-hidden td {
  color: var(--muted);
  background: #f1f4f6;
}

.table-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.table-actions form {
  margin: 0;
}

.manager-section-form {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.manager-section-form select,
.manager-section-form button {
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface-soft);
  color: var(--text);
  padding: 6px 8px;
  font: inherit;
  font-size: 12px;
}

.manager-section-form button {
  cursor: pointer;
  font-weight: 680;
}

.flash-list {
  border: 1px solid rgba(35, 111, 101, 0.24);
  border-radius: 8px;
  background: rgba(35, 111, 101, 0.08);
  color: var(--accent-strong);
  padding: 9px 10px;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 620;
}

.flash-list p {
  margin: 0;
}

@media (max-width: 900px) {
  .role-create-fields {
    grid-template-columns: 1fr;
  }

  .role-permission-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
