/* Opportunities Pipeline Board Styles */

/* Pipeline Column Headers - Compact and Scannable */
.pipeline-column {
  min-width: 280px; /* Slightly reduced from default since headers are shorter */
  display: flex;
  flex-direction: column;
  position: relative;
}

.pipeline-column .column-header h5 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
}

.pipeline-column .column-header .bi-info-circle {
  cursor: help;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.pipeline-column .column-header .bi-info-circle:hover {
  color: var(--bs-primary) !important;
}

/* Stage Tooltips - Enhanced Styling */
.tooltip {
  max-width: 400px; /* Wider tooltips for detailed content */
}

.tooltip-inner {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

.tooltip-inner hr {
  border-color: rgba(255, 255, 255, 0.3);
  margin: 0.5rem 0;
}

.tooltip-inner strong {
  display: block;
  margin-bottom: 0.25rem;
}

.tooltip-inner .text-muted {
  opacity: 0.8;
}

/* Compact Header Layout */
.column-header .badge {
  font-size: 0.75rem;
  padding: 0.35em 0.65em;
}

.column-header small {
  font-size: 0.8rem;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
  .pipeline-column {
    min-width: 250px;
  }
  
  .column-header h5 {
    font-size: 0.9rem;
  }
  
  .column-header .bi-info-circle {
    font-size: 0.8rem;
  }
  
  .tooltip {
    max-width: 300px;
  }
}

/* Dark theme support for tooltips */
body.dark-theme .tooltip-inner {
  background-color: #2a3142;
  color: #e9ecef;
}

body.dark-theme .tooltip-arrow::before {
  border-top-color: #2a3142 !important;
}

/* Ensure tooltips don't interfere with drag & drop */
.pipeline-column .dragging .bi-info-circle {
  pointer-events: none;
}

/* ============================================
   FULL-COLUMN DROPZONE IMPLEMENTATION
   ============================================
   The entire pipeline-column is a dropzone, not just a small area.
   This allows users to drop cards anywhere in the column, even when
   there are many cards (10+). Similar to deals and projects kanban.
   ============================================ */

/* Entire column is droppable - flex layout for proper dropzone */
.pipeline-column .column-content {
  flex: 1; /* Take up remaining space in column */
  overflow-y: auto; /* Scrollable if needed */
  min-height: 300px; /* Ensure droppable area even when empty */
}

/* Visual feedback when dragging over column */
.pipeline-column.drag-over {
  background-color: rgba(0, 123, 255, 0.05);
}

/* Additional styling when column has drag-over classes applied */
.pipeline-column[data-pipeline-kanban-target~="dropZone"].bg-light.border.border-primary.border-2 {
  background-color: rgba(0, 123, 255, 0.05) !important;
}

/* Ensure cards don't block dropzone interactions */
.opportunity-card {
  pointer-events: auto;
  margin-bottom: 0.5rem;
}

/* ============================================
   CONSISTENT STAGE BADGE COLORS
   ============================================
   Stage badges use a consistent color scheme across all views
   (list, show, kanban cards) for better user experience.
   ============================================ */

/* Custom purple badge for technical validation stage */
.badge-purple {
  background-color: #9b59b6;
  color: white;
}

/* Ensure badge styling is consistent across the app */
.badge {
  padding: 0.35em 0.65em;
  font-size: 0.85em;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: 0.375rem;
}

/* ============================================
   SORTABLE TABLE HEADERS
   ============================================
   Styling for sortable column headers in list view
   ============================================ */

/* Make table header cells flex containers */
.pipeline-list .table thead th {
  position: relative;
}

/* Sortable column header styling */
.pipeline-list .table thead th a {
  color: inherit;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 0.5rem;
  transition: color 0.2s ease;
}

.pipeline-list .table thead th a:hover {
  color: var(--bs-primary);
}

.pipeline-list .table thead th a i {
  font-size: 0.875rem;
  flex-shrink: 0;
  margin-left: auto;
}

/* Active sort column */
.pipeline-list.table thead th a:has(.bi-arrow-up),
.pipeline-list .table thead th a:has(.bi-arrow-down) {
  color: var(--bs-primary);
  font-weight: 600;
}

/* ==========================================================================
   Fold list (cp-fold-*): the opportunity SPIN and MEDDIC tabs
   (spin_question_logs/_spin_tab, opportunity_qualifications/_qualification).
   One collapsible row per stage / component with its items underneath, coloured
   by a cp-tone-* class. The card header, pills and tones are shared
   (section_header.css).
   ========================================================================== */
/* No overflow: hidden on the card: it would clip the question ⋮ menus on the
   last open stage. The last row rounds its own corner instead. */
.cp-fold-rows .cp-fold-row:last-child {
  border-bottom-left-radius: var(--bs-card-inner-border-radius);
  border-bottom-right-radius: var(--bs-card-inner-border-radius);
}

.cp-fold-row {
  border-left: 3px solid rgba(var(--cp-tone-rgb), 0.75) !important;
}

/* dark_theme.css greys every .accordion-item border (border-color, !important, at
   body.dark-theme specificity); win back the tone stripe on the left edge. */
body.dark-theme .accordion-item.cp-fold-row {
  border-left-color: rgba(var(--cp-tone-rgb), 0.75) !important;
}

.cp-fold-row-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-right: 1.25rem;
}

.cp-fold-toggle {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 0.5rem 0.875rem 1.25rem;
  border: 0;
  background: none;
  color: inherit;
  text-align: left;
}

.cp-fold-toggle:focus-visible {
  outline: 2px solid rgba(var(--cp-tone-rgb), 0.5);
  outline-offset: -2px;
}

.cp-fold-icon {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  font-size: 1.05rem;
  color: var(--cp-tone-text);
  background-color: rgba(var(--cp-tone-rgb), 0.12);
}

.cp-fold-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.cp-fold-title {
  font-weight: 600;
  line-height: 1.3;
}

.cp-fold-desc {
  font-size: 0.8125rem;
  color: var(--bs-secondary-color);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cp-fold-count {
  margin-left: auto;
  min-width: 1.75rem;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  color: var(--cp-tone-text);
  background-color: rgba(var(--cp-tone-rgb), 0.12);
}

.cp-fold-chevron {
  flex-shrink: 0;
  color: var(--bs-secondary-color);
  transition: transform 0.2s;
}

.cp-fold-toggle:not(.collapsed) .cp-fold-chevron {
  transform: rotate(180deg);
}

.cp-fold-row-header:has(.cp-fold-toggle:not(.collapsed)) {
  background-color: rgba(var(--cp-tone-rgb), 0.05);
}

.cp-fold-add {
  flex-shrink: 0;
  white-space: nowrap;
}

.cp-fold-body {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding: 1.25rem 1.25rem 1.25rem 4.375rem;
}

.cp-fold-empty {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border: 1px dashed var(--bs-border-color);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: var(--bs-secondary-color);
}

.cp-fold-item {
  padding: 0.75rem 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
  background-color: var(--bs-body-bg);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.cp-fold-item:hover {
  border-color: rgba(var(--cp-tone-rgb), 0.45);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.cp-fold-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.cp-fold-item-text {
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.cp-fold-item-meta {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--bs-secondary-color);
}

.cp-fold-item-menu {
  padding: 0 0.25rem;
  line-height: 1;
}

.cp-fold-item-answer {
  margin-top: 0.5rem;
  padding-left: 0.75rem;
  border-left: 2px solid rgba(var(--cp-tone-rgb), 0.5);
  font-size: 0.875rem;
  color: var(--bs-body-color);
  overflow-wrap: anywhere;
}

.cp-fold-item-answer p:last-child,
.cp-fold-item-impact p:last-child {
  margin-bottom: 0;
}

.cp-fold-item-unanswered {
  margin: 0.375rem 0 0;
  font-size: 0.8125rem;
  font-style: italic;
  color: var(--bs-secondary-color);
}

.cp-fold-item-impact {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.625rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.8125rem;
  color: var(--bs-info-text-emphasis);
  background-color: var(--bs-info-bg-subtle);
  overflow-wrap: anywhere;
}

@media (max-width: 575.98px) {
  .cp-fold-body {
    padding-left: 1.25rem;
  }

  .cp-fold-desc {
    display: none;
  }
}

/* MEDDIC tab (opportunity_qualifications/_qualification, _section_summary, _modal_form):
   fold list as above, plus the overall score, the stage-gate note and the item details. */
.cp-meddic-score {
  min-width: 11rem;
}

.cp-meddic-score-value {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 0.25rem;
  margin-bottom: 0.375rem;
}

.cp-meddic-score-value strong {
  font-size: 1.5rem;
  line-height: 1;
  color: var(--cp-tone-text);
}

.cp-meddic-score-value > span:not(.cp-fold-pill) {
  font-size: 0.8125rem;
  color: var(--bs-secondary-color);
}

.cp-meddic-score-value .cp-fold-pill {
  align-self: center;
  margin-left: 0.375rem;
}

/* Doubled class: settings.css sets a global .progress height that loads later. */
.progress.cp-meddic-score-bar {
  height: 6px;
  margin-bottom: 0;
}

.cp-meddic-gate {
  display: flex;
  gap: 0.625rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--bs-border-color);
  font-size: 0.875rem;
  color: var(--bs-warning-text-emphasis);
  background-color: var(--bs-warning-bg-subtle);
}

.cp-meddic-points {
  min-width: 2.75rem;
}

.cp-meddic-detail {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
}

.cp-meddic-steps {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.875rem;
}

.cp-meddic-steps li + li {
  margin-top: 0.25rem;
}

.cp-meddic-advantage {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.8125rem;
  color: var(--bs-success-text-emphasis);
  background-color: var(--bs-success-bg-subtle);
}

.cp-meddic-rows {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.cp-meddic-rows:empty {
  display: none;
}

/* Opportunity Overview sales journey (opportunities/_stage_panel, _journey_track):
   the Details card's header. A connected track through the open stages (done /
   current / upcoming), slim in the header; expanded, a full-size track with, under
   it, a callout about the current stage whose caret points at that step (--cp-caret). */
/* The card's own background, which the callout tint, caret and upcoming dots are
   mixed from. dark_theme.css paints cards #23272b directly (no variable). The
   journey is a size container so the step labels follow its width, not the
   viewport. */
.cp-journey {
  --cp-journey-surface: #fff;
  container-type: inline-size;
}

body.dark-theme .cp-journey {
  --cp-journey-surface: #23272b;
}

/* Collapsed: the slim track and the "Stage guide" toggle on the right of the
   Details card's header (a cp-fold-header, sized like the SPIN / MEDDIC ones). */
.cp-journey-head-end {
  flex: 1 1 24rem;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
}

.cp-journey-track--slim {
  flex: 1 1 auto;
  max-width: 34rem;
  transition: opacity 0.15s;
}

.cp-journey-track--slim .cp-journey-node {
  gap: 0.25rem;
  padding: 0 0.125rem;
}

.cp-journey-track--slim .cp-journey-dot {
  width: 1.5rem;
  height: 1.5rem;
  font-size: 0.6875rem;
}

.cp-journey-track--slim .cp-journey-step:not(:last-child)::after {
  top: 0.75rem;
}

.cp-journey-track--slim .cp-journey-label {
  font-size: 0.6875rem;
  line-height: 1.15;
}

.cp-journey-track--slim .cp-journey-step.is-current .cp-journey-dot {
  box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), 0.2);
}

/* The whole header toggles the stage guide (opportunities--journey); the steps
   keep their own hover, so the row only tints faintly. */
.cp-journey-head.is-toggle {
  cursor: pointer;
  transition: background-color 0.15s;
}

.cp-journey-head.is-toggle:hover {
  background-color: rgba(var(--bs-primary-rgb), 0.03);
}

/* Bare chevron like the SPIN / MEDDIC rows' (.cp-fold-chevron). */
.cp-journey-toggle {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 0.375rem;
  background: none;
  color: var(--bs-secondary-color);
}

.cp-journey-head.is-toggle:hover .cp-journey-toggle,
.cp-journey-toggle:focus-visible {
  color: var(--bs-primary-text-emphasis);
}

.cp-journey-toggle:focus-visible {
  outline: 2px solid rgba(var(--bs-primary-rgb), 0.5);
  outline-offset: 2px;
}

.cp-journey-toggle .bi-chevron-down {
  display: inline-block;
  transition: transform 0.2s;
}

.cp-journey-toggle:not(.collapsed) .bi-chevron-down {
  transform: rotate(180deg);
}

/* Expanded: the full journey under the header; the slim track steps aside so the
   track is not shown twice. */
.cp-journey:has(.cp-journey-full.show, .cp-journey-full.collapsing) .cp-journey-track--slim {
  visibility: hidden;
  opacity: 0;
}

.cp-journey-full-body {
  padding: 1.5rem 1.25rem;
  border-bottom: 1px solid var(--bs-border-color);
}

/* "Details" label over the description etc. when the journey is the header. */
.cp-details-title {
  margin-bottom: 1rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
}

.cp-journey-track {
  display: grid;
  grid-template-columns: repeat(var(--cp-steps, 6), minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.cp-journey-step {
  position: relative;
}

/* The line to the next step, behind the dots; filled up to the current step. */
.cp-journey-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 1rem;
  left: 50%;
  width: 100%;
  height: 2px;
  transform: translateY(-50%);
  background-color: var(--bs-border-color);
}

.cp-journey-step.is-done:not(:last-child)::after {
  background-color: var(--bs-primary);
}

.cp-journey-node {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  padding: 0 0.25rem;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: center;
}

button.cp-journey-node {
  cursor: pointer;
}

.cp-journey-dot {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bs-border-color);
  border-radius: 50%;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--bs-secondary-color);
  background-color: var(--cp-journey-surface);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.cp-journey-label {
  font-size: 0.75rem;
  line-height: 1.25;
  color: var(--bs-secondary-color);
}

.cp-journey-step.is-done .cp-journey-dot {
  border-color: var(--bs-primary);
  color: #fff;
  background-color: var(--bs-primary);
}

.cp-journey-step.is-current .cp-journey-dot {
  border-color: var(--bs-primary);
  color: #fff;
  background-color: var(--bs-primary);
  box-shadow: 0 0 0 5px rgba(var(--bs-primary-rgb), 0.2);
}

.cp-journey-step.is-current .cp-journey-label {
  font-weight: 600;
  color: var(--bs-primary-text-emphasis);
}

button.cp-journey-node:hover .cp-journey-dot,
button.cp-journey-node:focus-visible .cp-journey-dot {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 4px rgba(var(--bs-primary-rgb), 0.15);
}

button.cp-journey-node:hover .cp-journey-label,
button.cp-journey-node:focus-visible .cp-journey-label {
  color: var(--bs-primary-text-emphasis);
}

/* Keyboard focus: a solid ring around the dot, distinct from the hover halo. */
button.cp-journey-node:focus-visible {
  outline: none;
}

button.cp-journey-node:focus-visible .cp-journey-dot {
  box-shadow: 0 0 0 3px var(--cp-journey-surface), 0 0 0 5px var(--bs-primary);
}

/* Callout about the current stage; opaque tint so the caret hides the border under it. */
.cp-journey-stage {
  --cp-callout-bg: color-mix(in srgb, var(--bs-primary) 7%, var(--cp-journey-surface));
  --cp-callout-border: color-mix(in srgb, var(--bs-primary) 35%, var(--cp-journey-surface));
  position: relative;
  margin-top: 1.125rem;
  padding: 1.125rem 1.25rem 1.25rem;
  border: 1px solid var(--cp-callout-border);
  border-radius: 0.75rem;
  background-color: var(--cp-callout-bg);
}

/* Without color-mix(): translucent tint (the caret then shows the border line under it). */
@supports not (color: color-mix(in srgb, red, blue)) {
  .cp-journey-stage {
    --cp-callout-bg: rgba(var(--bs-primary-rgb), 0.07);
    --cp-callout-border: rgba(var(--bs-primary-rgb), 0.35);
  }
}

.cp-journey-stage::before {
  content: "";
  position: absolute;
  top: -8px;
  left: calc(var(--cp-caret, 50%) - 7px);
  width: 14px;
  height: 14px;
  border-top: 1px solid var(--cp-callout-border);
  border-left: 1px solid var(--cp-callout-border);
  background-color: var(--cp-callout-bg);
  transform: rotate(45deg);
}

.cp-journey-stage-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.75rem;
  row-gap: 0.25rem;
  margin-bottom: 1rem;
}

.cp-journey-stage-step {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--bs-primary-text-emphasis);
}

.cp-journey-stage-title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 600;
}

.cp-journey-stage-days {
  margin-left: auto;
  font-size: 0.8125rem;
  color: var(--bs-secondary-color);
}

.cp-journey-guide {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1rem 1.5rem;
}

.cp-journey-guide-item {
  display: flex;
  gap: 0.75rem;
  font-size: 0.875rem;
}

.cp-journey-guide-icon {
  flex: 0 0 2rem;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  color: var(--bs-primary-text-emphasis);
  background-color: rgba(var(--bs-primary-rgb), 0.12);
}

.cp-journey-guide-label {
  margin-bottom: 0.125rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
}

/* Too narrow for six labels side by side: only the current step keeps its label
   (the others have a "Move to …" tooltip). */
@container (max-width: 560px) {
  .cp-journey-step:not(.is-current) .cp-journey-label {
    display: none;
  }

  .cp-journey-stage-days {
    margin-left: 0;
  }
}

/* Won / lost journey (opportunities/_closed_journey): the slim track keeps the
   stages it went through, fades the skipped and never-reached ones, and ends in
   an outcome node in the outcome's tone; expanded, the path it travelled. */
.cp-journey-step.is-skipped .cp-journey-dot {
  border-style: dashed;
}

.cp-journey-step.is-skipped:not(:last-child)::after {
  background-color: rgba(var(--bs-primary-rgb), 0.35);
}

.cp-journey-step.is-not-reached .cp-journey-node {
  opacity: 0.45;
}

.cp-journey-step.is-outcome .cp-journey-dot {
  border-color: rgb(var(--cp-tone-rgb));
  color: #fff;
  background-color: rgb(var(--cp-tone-rgb));
  box-shadow: 0 0 0 3px rgba(var(--cp-tone-rgb), 0.2);
}

.cp-journey-step.is-outcome .cp-journey-label {
  font-weight: 600;
  color: var(--cp-tone-text);
}

.cp-journey-path {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cp-journey-path-row {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.75rem;
  padding: 0 0 0.875rem 1.75rem;
  font-size: 0.875rem;
}

/* The line down to the next row. */
.cp-journey-path-row:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 0.875rem;
  bottom: -0.125rem;
  left: 0.4375rem;
  width: 2px;
  background-color: rgba(var(--bs-primary-rgb), 0.35);
}

.cp-journey-path-dot {
  position: absolute;
  top: 0.25rem;
  left: 0;
  width: 1rem;
  height: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bs-primary);
  border-radius: 50%;
  font-size: 0.5625rem;
  background-color: var(--cp-journey-surface);
}

.cp-journey-path-row.is-closing {
  padding-bottom: 0;
}

.cp-journey-path-row.is-closing .cp-journey-path-dot {
  border-color: rgb(var(--cp-tone-rgb));
  color: #fff;
  background-color: rgb(var(--cp-tone-rgb));
}

.cp-journey-path-row.is-closing .cp-journey-path-label {
  font-weight: 600;
  color: var(--cp-tone-text);
}

.cp-journey-path-label {
  font-weight: 500;
}

.cp-journey-path-meta {
  font-size: 0.8125rem;
  color: var(--bs-secondary-color);
}

/* KPI strip: tiles divided by hairlines — tinted icon, small caps label, the
   figure and a one-line context. Used by the pipeline statistics
   (opportunities/index, #pipelineMetrics) and the budget journey figures
   (shared/_budget_figures). Any number of tiles per row: each draws its right
   and bottom hairline, and the strip hangs 1px past its .cp-kpi-wrap so the
   outer ones are clipped. */
.cp-kpi-wrap {
  overflow: hidden;
}

.cp-kpi-strip {
  margin: 0 -1px -1px 0;
}

.cp-kpi {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 1.125rem 1.25rem;
  box-shadow: inset -1px -1px 0 var(--bs-border-color);
}

/* An odd last tile in the two-up layout takes the full row (no stray hairline). */
@media (max-width: 1199.98px) {
  .cp-kpi-strip.row-cols-2 > .cp-kpi:last-child:nth-child(odd) {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

.cp-kpi-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--bs-secondary-color);
}

.cp-kpi-value {
  margin-top: 0.125rem;
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.cp-kpi-sub {
  margin-top: 0.125rem;
  font-size: 0.75rem;
  color: var(--bs-secondary-color);
}

/* Doubled class: settings.css sets a global .progress height that loads later. */
.progress.cp-kpi-bar {
  height: 4px;
  max-width: 8rem;
  margin-top: 0.5rem;
}
