/* Sales & CRM hero window: a demo deal moves Lead, Quotation, Sales order on a board, then the
   salesperson's target fills. Shell and tokens (.app, .app__bar, .status, .mod) come from /style.css. */
.crm .app__main { gap: 10px; }

/* Board: one column per stage. Exactly one column holds the deal, and grid rows stretch, so the board
   keeps its height while hero.js moves the deal between columns. */
.crm-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.crm-col { display: grid; grid-template-rows: auto 1fr; gap: 6px; min-width: 0; padding: 6px 5px 5px; border: 1px solid var(--line); border-radius: 8px; background: var(--sunk); }
.crm-col__head { display: flex; align-items: center; gap: 6px; height: 20px; padding: 0 3px; color: var(--muted-fg-2); font-size: 12px; font-weight: 600; white-space: nowrap; }
.crm-col__head i { min-width: 18px; height: 18px; margin-left: auto; padding: 0 5px; border-radius: 9px; background: var(--muted); color: var(--muted-fg-2); font-size: 11px; font-style: normal; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums; }
.crm-col__list { display: grid; align-content: start; gap: 6px; min-width: 0; }
.crm-ghost { display: grid; align-content: center; gap: 7px; height: 44px; padding: 0 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); }
.crm-ghost i { display: block; height: 6px; border-radius: 3px; background: var(--muted); }
.crm-ghost i + i { width: 55%; }
.crm-deal { position: relative; z-index: 1; display: grid; gap: 1px; min-width: 0; padding: 6px 8px 7px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); box-shadow: inset 2px 0 0 var(--coral), 0 1px 2px rgba(0, 0, 0, .06); }
.crm-deal b { overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.crm-deal span { min-height: 1.35em; font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; } /* an empty amount keeps its line */
.crm-deal__doc { color: var(--muted-fg); }
.crm-deal__amt { font-weight: 600; }

/* Target card: the salesperson's month, one bar filled with transform */
.crm-card { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.crm-card__head { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-bottom: 1px solid var(--line); }
.crm-card__head b { font-weight: 600; white-space: nowrap; }
.crm-card__head span { min-width: 0; margin-left: auto; overflow: hidden; color: var(--muted-fg); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.crm-target { display: grid; gap: 7px; padding: 10px 12px 11px; }
.crm-target__nums { display: flex; align-items: baseline; gap: 8px; font-variant-numeric: tabular-nums; }
.crm-target__nums b { font-size: 16px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.crm-target__nums span { margin-left: auto; color: var(--muted-fg-2); font-weight: 600; }
.crm-bar { display: block; height: 6px; border-radius: 3px; background: var(--muted); overflow: hidden; }
.crm-bar span { display: block; height: 100%; border-radius: inherit; background: var(--coral); transform-origin: left; transform: scaleX(var(--fill)); }
.crm-target__of { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 8px; color: var(--muted-fg); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.crm-target__of b { color: var(--ok); font-weight: 600; }

@media (max-width: 600px) {
  /* Phones: the columns become stacked lanes (label left, deal right); equal rows keep the board still */
  .crm-board { grid-template-columns: minmax(0, 1fr); grid-auto-rows: 1fr; gap: 6px; }
  .crm-col { grid-template-columns: 104px minmax(0, 1fr); grid-template-rows: none; align-items: center; padding: 5px; }
  .crm-col__head { font-size: 11.5px; }
  .crm-deal { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; } /* name and number on one line when they fit */
  .crm-ghost, .crm-deal__amt { display: none; } /* lane counts stay, so each lane still reads as a pipeline stage */
}
@media (max-width: 400px) {
  .crm .crm-crumb, .crm .crumbs svg { display: none; } /* the status badge keeps its room */
}
