/* ==========================================================================
   Pipelines (modules/features/pipeline-manager.js)
   The picker at the start of the Opportunities filter bar, and the
   "Pipelines" dialog: every pipeline on the left, the selected one's name
   and stages on the right, Save / Delete along the bottom.
   ========================================================================== */

.pm-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Picker ────────────────────────────────────────────────────────────── */

.pp {
  position: relative;
  flex-shrink: 0;
}

.pp-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 240px;
  height: var(--control-height-md);
  padding: 0 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--btn-radius);
  background: var(--bg-secondary);
  font: inherit;
  font-size: var(--type-sm);
  font-weight: 650;
  color: var(--text-primary);
  cursor: pointer;
}

.pp-trigger:hover,
.pp-trigger[aria-expanded="true"] {
  background: var(--bg-tertiary);
}

.pp-trigger .pm-icon {
  width: 15px;
  height: 15px;
  color: var(--text-muted);
}

.pp-name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.pp-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 60;
  width: 300px;
  max-width: calc(100vw - 32px);
  max-height: min(420px, 70vh);
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-secondary);
  box-shadow: 0 12px 32px rgba(15, 17, 23, 0.14), 0 2px 6px rgba(15, 17, 23, 0.06);
}

.pp-menu-label {
  padding: 6px 8px 4px;
  font-size: 12px;
  font-weight: 550;
  color: var(--text-muted);
}

.pp-item,
.pp-action {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 0 8px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  font: inherit;
  font-size: 14px;
  text-align: left;
  color: var(--text-primary);
  cursor: pointer;
}

.pp-item {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  grid-template-areas:
    "check name meta"
    ".     dots dots";
  row-gap: 4px;
  padding-top: 7px;
  padding-bottom: 8px;
}

.pp-action {
  height: 34px;
  color: var(--text-secondary);
}

.pp-item:hover,
.pp-item:focus-visible,
.pp-action:hover,
.pp-action:focus-visible {
  background: var(--bg-tertiary);
  outline: none;
}

.pp-item-check {
  grid-area: check;
  display: grid;
  place-items: center;
  color: var(--color-primary);
}

.pp-item-check .pm-icon {
  width: 14px;
  height: 14px;
  stroke-width: 2.5;
}

.pp-item-name {
  grid-area: name;
  overflow: hidden;
  font-weight: 550;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.pp-item.is-active .pp-item-name {
  font-weight: 650;
}

.pp-item-meta {
  grid-area: meta;
  font-size: 12.5px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* The pipeline's stages as a row of colours */
.pp-item-dots {
  grid-area: dots;
  display: flex;
  gap: 3px;
}

.pp-item-dots span {
  width: 14px;
  height: 4px;
  border-radius: 2px;
}

.pp-action .pm-icon {
  color: var(--text-muted);
}

.pp-menu-sep {
  height: 1px;
  margin: 6px 2px;
  background: var(--border-color);
}

/* ── Dialog ────────────────────────────────────────────────────────────── */

.pm-overlay {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-modal) + 5);
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(15, 17, 23, 0.4);
  animation: pm-fade 0.15s ease both;
}

@keyframes pm-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.pm-dialog {
  display: flex;
  flex-direction: column;
  width: min(820px, 100%);
  height: min(620px, calc(100dvh - 32px));
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: var(--bg-secondary);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
}

.pm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  padding: 14px 16px 14px 20px;
  border-bottom: 1px solid var(--border-color);
}

.pm-title {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
  color: var(--text-primary);
}

.pm-icon-btn {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.pm-icon-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.pm-body {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  flex: 1;
  min-height: 0;
}

/* The list of pipelines */
.pm-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
  overflow-y: auto;
  padding: 10px;
  border-right: 1px solid var(--border-color);
  background: var(--bg-primary);
}

.pm-list-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.pm-list-item:hover {
  background: var(--bg-tertiary);
}

.pm-list-item.is-active {
  background: var(--bg-secondary);
  box-shadow: 0 0 0 1px var(--border-color), 0 1px 2px rgba(15, 17, 23, 0.04);
}

.pm-list-name {
  max-width: 100%;
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.pm-list-meta {
  font-size: 12.5px;
  color: var(--text-muted);
}

.pm-new {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  margin-top: 4px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 550;
  color: var(--text-secondary);
  cursor: pointer;
}

.pm-new:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.pm-new[hidden] {
  display: none;
}

.pm-loading {
  padding: 10px;
  font-size: 13.5px;
  color: var(--text-muted);
}

/* The selected pipeline */
.pm-editor {
  min-height: 0;
  overflow-y: auto;
  padding: 20px 24px 24px;
}

.pm-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.pm-input,
.pm-stage-name {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-secondary);
  box-shadow: none;
  font: inherit;
  font-size: 14px;
  color: var(--text-primary);
}

.pm-input:focus,
.pm-stage-name:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-bg);
}

.pm-stages-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}

.pm-hint {
  font-size: 12.5px;
  color: var(--text-muted);
}

.pm-stages {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pm-stage {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 4px 4px 2px;
  border-radius: 9px;
}

.pm-stage.is-dragging {
  opacity: 0.4;
}

.pm-stage.is-drop-before {
  box-shadow: 0 -2px 0 var(--color-primary);
}

.pm-stage.is-drop-after {
  box-shadow: 0 2px 0 var(--color-primary);
}

.pm-grip {
  width: 22px;
  height: 30px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: grab;
}

.pm-grip:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.pm-grip:active {
  cursor: grabbing;
}

.pm-grip.is-locked {
  cursor: default;
}

.pm-grip .pm-icon {
  width: 14px;
  height: 14px;
  fill: currentColor;
  stroke-width: 1.5;
}

/* One swatch per stage; it opens the palette */
.pm-swatch {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: var(--swatch);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  cursor: pointer;
}

.pm-swatch:hover {
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08), 0 0 0 3px color-mix(in srgb, var(--swatch) 25%, transparent);
}

.pm-palette {
  position: absolute;
  top: calc(100% + 2px);
  left: 30px;
  z-index: 5;
  display: flex;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-secondary);
  box-shadow: 0 10px 28px rgba(15, 17, 23, 0.14);
}

.pm-palette-dot {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--swatch);
  cursor: pointer;
}

.pm-palette-dot.is-selected,
.pm-palette-dot:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--bg-secondary), 0 0 0 4px var(--swatch);
}

.pm-stage-name {
  flex: 1;
  min-width: 0;
  height: 34px;
}

.pm-outcome {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.pm-outcome--won {
  background: rgba(16, 185, 129, 0.12);
  color: #0e8a62;
}

.pm-outcome--lost {
  background: rgba(239, 68, 68, 0.1);
  color: #c23b3b;
}

[data-theme="dark"] .pm-outcome--won { color: #4ad6a3; }
[data-theme="dark"] .pm-outcome--lost { color: #f08080; }

.pm-stage-remove-space {
  width: 30px;
  flex-shrink: 0;
}

/* A thin rule between the open stages and Won / Lost */
.pm-stage:not(.is-outcome) + .pm-stage.is-outcome {
  margin-top: 8px;
}

.pm-stage:not(.is-outcome) + .pm-stage.is-outcome::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 32px;
  right: 34px;
  height: 1px;
  background: var(--border-color);
}

.pm-add {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  margin: 8px 0 0 26px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 550;
  color: var(--text-secondary);
  cursor: pointer;
}

.pm-add:hover:not(:disabled) {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.pm-add:disabled {
  color: var(--text-muted);
  cursor: default;
}

.pm-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, #f59e0b 35%, var(--border-color));
  border-radius: 10px;
  background: color-mix(in srgb, #f59e0b 8%, transparent);
}

.pm-callout p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-secondary);
}

.pm-link {
  flex-shrink: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary);
  cursor: pointer;
}

.pm-note {
  margin: 16px 0 0;
  font-size: 12.5px;
  color: var(--text-muted);
}

.pm-error {
  margin: 12px 0 0;
  font-size: 13px;
  font-weight: 550;
  color: #d14343;
}

.pm-error[hidden] {
  display: none;
}

.pm-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
}

.pm-foot-space {
  flex: 1;
}

.pm-delete {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  font-size: 13.5px;
  font-weight: 550;
  color: #d14343;
  cursor: pointer;
}

.pm-delete:hover {
  background: rgba(209, 67, 67, 0.08);
}

.pm-dialog :is(.pm-icon-btn, .pm-list-item, .pm-new, .pm-grip, .pm-swatch, .pm-add, .pm-link, .pm-delete):focus-visible,
.pp-trigger:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}

/* ── Phones: the list becomes a row of tabs above the editor ───────────── */

@media (max-width: 720px) {
  .pm-overlay {
    padding: 0;
    place-items: end stretch;
  }

  .pm-dialog {
    width: 100%;
    height: calc(100dvh - 24px);
    border-radius: 14px 14px 0 0;
  }

  .pm-body {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }

  .pm-list {
    flex-direction: row;
    gap: 6px;
    overflow-x: auto;
    padding: 8px 12px;
    border-right: 0;
    border-bottom: 1px solid var(--border-color);
    scrollbar-width: none;
  }

  .pm-list-item,
  .pm-new {
    flex-shrink: 0;
    width: auto;
    margin: 0;
  }

  .pm-list-meta {
    display: none;
  }

  .pm-editor {
    padding: 16px;
  }

  .pm-hint {
    display: none;
  }

  .pm-outcome {
    display: none;
  }

  .pp-trigger {
    max-width: 180px;
  }
}

/* With the picker in front, the search gives up width before the bar wraps */
@media (min-width: 721px) {
  .pipeline-fb .fb-search {
    flex: 1 1 160px;
    width: auto;
    max-width: 260px;
  }
}

/* ── Board: one row of fixed-width stages ─────────────────────────────────
   However many stages a pipeline has and however wide the screen, each
   stage is the same width and new ones go to the right; the board scrolls
   sideways. (Phones show one stage at a time instead, in phone.css.) */
@media (min-width: 769px) {
  .pipeline-stages {
    display: flex;
    align-items: stretch;
    gap: 28px;
    min-height: calc(100dvh - var(--header-height, 52px) - 140px);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding-bottom: 12px;
    scrollbar-width: thin;
  }

  .pipeline-stage {
    flex: 0 0 256px;
    width: 256px;
    min-width: 0;
  }
}

/* ── Columns and cards, Attio-like ─────────────────────────────────────────
   The columns are the page itself: no fill and no border, only the gap
   between them. Cards are white with a hairline and line their facts up on
   the left, one row each with a 16px icon, and end with note and task
   buttons and the days in stage. */

.main-content:has(.pipeline-stages) {
  background: var(--bg-secondary);
}

.pipeline-stage,
[data-theme="dark"] .pipeline-stage,
.pipeline-stage.is-empty {
  gap: 8px;
  padding: 10px 0 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.pipeline-stage:hover,
[data-theme="dark"] .pipeline-stage:hover {
  border: 0;
}

.pipeline-stage-header,
[data-theme="dark"] .pipeline-stage-header {
  gap: 6px;
  padding: 2px 4px 2px 6px;
  border-bottom: 0;
}

.pipeline-stage-title {
  min-width: 0;
  gap: 8px;
  font-size: 14px;
}

.pipeline-stage-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pipeline-stage-count,
[data-theme="dark"] .pipeline-stage-count {
  min-width: 0;
  padding: 0 6px;
  border: 0;
  border-radius: 5px;
  background: var(--bg-tertiary);
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  color: var(--text-muted);
}

.pipeline-stage-tools {
  display: flex;
  flex-shrink: 0;
  gap: 2px;
}

.pipeline-stage-tool {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
}

.pipeline-stage-tool:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

/* The header's + is a quiet icon, not the dashed button the old one was */
.pipeline-stage-tool.pipeline-inline-add {
  width: 24px;
  height: 24px;
  margin: 0;
  border: 0;
}

.pipeline-stage-drag {
  cursor: grab;
}

.pipeline-stage-drag:active {
  cursor: grabbing;
}

.pipeline-stage-ghost {
  opacity: 0.4;
}

/* One line in every stage (total, then weighted or the closed-deal range),
   so the cards start at the same height in every column */
.pipeline-stage-value {
  flex-wrap: nowrap;
  min-width: 0;
  height: 18px;
  padding: 0 6px;
  overflow: hidden;
  line-height: 18px;
  white-space: nowrap;
}

.pipeline-stage-total {
  flex-shrink: 0;
}

.pipeline-stage-weighted:empty {
  display: none;
}

.pipeline-stage-note {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: inherit;
  font-weight: 500;
}

/* "New deal" under the header */
.pipeline-new-deal.pipeline-inline-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  margin: 0;
  border: 1px dashed var(--border-color);
  border-radius: 8px;
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.pipeline-new-deal.pipeline-inline-add:hover {
  border-style: solid;
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

/* An empty column is just space to drop a deal into */
.pipeline-stage.is-empty .opportunity-list::before {
  content: none;
}

.opportunity-list {
  gap: 8px;
}

/* "+" after the last stage */
.pipeline-add-stage {
  flex: 0 0 auto;
}

.pipeline-add-stage-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  min-height: 0;
  padding: 0;
  border: 1px dashed var(--border-color);
  border-radius: 10px;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
}

.pipeline-add-stage-btn:hover {
  border-style: solid;
  background: var(--bg-primary);
  color: var(--text-primary);
}

.pipeline-add-stage.is-open {
  flex: 0 0 256px;
}

.pipeline-add-stage-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border-radius: 12px;
  background: var(--bg-primary);
}

.pipeline-add-stage-form[hidden],
.pipeline-add-stage-btn[hidden] {
  display: none;
}

.pipeline-add-stage-input {
  height: 32px;
  font-size: 14px;
}

.pipeline-add-stage-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

/* Cards */
.opportunity-card,
[data-theme="dark"] .opportunity-card {
  --card-bg: var(--bg-secondary);
  gap: 7px;
  padding: 10px 12px 9px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--card-bg);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

[data-theme="dark"] .opportunity-card {
  --card-bg: var(--bg-tertiary);
  box-shadow: none;
}

.opportunity-card:hover {
  border-color: color-mix(in srgb, var(--border-color) 60%, var(--text-muted));
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.06);
}

.opportunity-card .opp-name {
  margin-bottom: 1px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-primary);
}

.opp-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--text-secondary, var(--text-primary));
}

.opp-row-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.opp-muted {
  color: var(--text-muted);
}

/* Every icon in a card: one box, one size */
.opp-icon,
.opportunity-card .opp-avatar,
.opportunity-card .opp-owner-avatar {
  flex-shrink: 0;
  width: 16px !important;
  height: 16px !important;
  min-width: 16px;
}

.opp-icon {
  color: var(--text-muted);
}

.opportunity-card .opp-avatar {
  border-radius: 4px;
}

.opportunity-card .opp-avatar-initials {
  font-size: 7px;
}

.opportunity-card .opp-owner-avatar {
  position: relative;
  display: grid;
  place-items: center;
  margin: 0;
  border-radius: 50%;
  font-size: 7.5px;
  font-weight: 600;
  line-height: 1;
  color: #fff;
  overflow: hidden;
}

.opportunity-card .opp-owner-avatar img {
  position: absolute;
  inset: 0;
}

.opportunity-card .opp-owner-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.opportunity-card .opp-value-row {
  display: flex;
  margin: 0;
}

.opportunity-card .opp-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.opportunity-card .opp-value.is-empty {
  font-weight: 500;
  color: var(--text-muted);
}

.opportunity-card .opp-prob-label {
  margin-left: 6px;
  padding: 0;
  border: 0;
  background: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.opportunity-card .opp-next-step {
  padding: 0;
  border: 0;
}

.opportunity-card .opp-next-step.is-unset {
  color: var(--text-muted);
}

.opportunity-card .opp-step-date {
  flex-shrink: 0;
  font-size: 12.5px;
}

/* Footer: note and task buttons (with counts) on the left, days in this stage on the right */
.opp-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
  padding-top: 4px;
  border-top: 1px solid var(--border-color);
  font-size: 12px;
  color: var(--text-muted);
}

.opp-foot-actions {
  display: inline-flex;
  gap: 4px;
  margin-left: -5px;
}

/* Notes and tasks: buttons that open the deal ready to add one */
.opp-foot-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 28px;
  height: 28px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
}

.opp-foot-btn.has-count {
  padding: 0 6px;
  font-size: 12.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.opp-foot-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.opp-foot-btn:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}

.opp-card-foot .opp-foot-btn .opp-icon {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px;
}

.opp-foot-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-variant-numeric: tabular-nums;
}

.opp-card-foot .opp-icon {
  width: 14px !important;
  height: 14px !important;
  min-width: 14px;
}

.opportunity-card .opp-stage-age {
  padding: 0;
  border: 0;
  background: none;
  font-size: 12px;
  font-weight: 500;
  color: inherit;
}

.opportunity-card.is-stale .opp-foot-age {
  color: var(--color-warning, #d97706);
}

/* Phones show one stage at a time under tabs: no reordering or adding
   stages there, and the header sits tight on its totals */
@media (max-width: 768px) {
  .pipeline-stage-drag,
  .pipeline-add-stage {
    display: none !important;
  }

  .pipeline-stages .pipeline-stage-header {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
  }
}
