/* Negociações: a jornada comercial inteira em um único quadro. */
.cb-page {
  min-width: 0;
  --cb-border: #dce5f2;
  --cb-muted: #718198;
}

.cb-page .page-heading {
  margin-bottom: 22px;
  align-items: flex-start;
}

.cb-page .page-heading p {
  max-width: 680px;
  font-size: 14px;
  line-height: 1.6;
}

.cb-page .page-heading > .btn { flex-shrink: 0; }

.cb-page .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Small, useful entry points into the day's work. */
.cb-pulse {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.cb-pulse-item {
  display: grid;
  grid-template-columns: 32px auto 1fr;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  min-height: 67px;
  padding: 13px 16px;
  border: 1px solid #ffffffd9;
  border-radius: 17px;
  background: #ffffff8f;
  color: var(--ink);
  text-align: left;
  box-shadow: 0 3px 13px #304e7810;
  transition: background .18s, border-color .18s, box-shadow .18s;
}

.cb-pulse-item > .icon {
  width: 19px;
  height: 19px;
  color: #708bbb;
  justify-self: center;
}

.cb-pulse-item > strong {
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -1px;
  line-height: 1;
}

.cb-pulse-item > span {
  color: #6b7d98;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
}

.cb-pulse-item:hover,
.cb-pulse-item.active {
  background: #f5f8ff;
  border-color: #aebff0;
  box-shadow: 0 3px 14px #3b63af10;
}

.cb-pulse-item.active > .icon,
.cb-pulse-item.active > strong { color: var(--blue); }

.cb-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.cb-toolbar .search-field {
  flex: 1 1 220px;
  min-width: 180px;
  max-width: none;
  min-height: 43px;
  border-radius: 11px;
}

.cb-toolbar .search-field input { font-size: 12px; }
.cb-toolbar .search-field .icon { width: 17px; height: 17px; }

.cb-toolbar > label:not(.search-field) {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #708098;
  font-size: 11px;
}

.cb-toolbar select {
  min-width: 128px;
  max-width: 210px;
  min-height: 43px;
  padding: 10px 29px 10px 12px;
  border: 1px solid var(--cb-border);
  border-radius: 11px;
  background-color: #ffffffb3;
  color: #526783;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.cb-toolbar > button {
  min-height: 43px;
  padding-inline: 13px;
  font-size: 12px;
  white-space: nowrap;
}

.cb-toolbar > button.active,
.cb-toolbar > button[aria-pressed="true"] {
  background: #e7eefc;
  color: #2855be;
  border-color: #c6d5f2;
  border-radius: 11px;
}

.cb-board-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 13px;
  color: #73849d;
  font-size: 11px;
  line-height: 1.6;
}

.cb-board-caption strong { color: #526783; font-weight: 600; }
.cb-board-caption p { font-size: inherit; }
.cb-scroll-actions { display: flex; gap: 7px; flex-shrink: 0; }

.cb-scroll-actions button {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  padding: 0;
  border: 1px solid #d5e0ef;
  border-radius: 10px;
  background: #ffffffb3;
  color: #6b83aa;
}

.cb-scroll-actions button:hover { background: #fff; color: var(--blue); }
.cb-scroll-actions button:disabled { opacity: .4; cursor: default; }
.cb-scroll-actions .icon { width: 15px; height: 15px; }
.cb-mobile-stages { display: none; }

/* All columns remain side by side; the page owns the vertical scroll. */
.cb-board {
  display: grid;
  grid-template-columns: repeat(6, minmax(270px, 1fr));
  align-items: start;
  gap: 14px;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 2px 1px 20px;
  scrollbar-width: thin;
  scrollbar-color: #c4d2e8 transparent;
  scroll-padding-inline: 1px;
}

.cb-board::-webkit-scrollbar { height: 7px; }
.cb-board::-webkit-scrollbar-track { background: #e4ebf580; border-radius: 8px; }
.cb-board::-webkit-scrollbar-thumb { background: #c4d2e8; border-radius: 8px; }

.cb-column {
  --cb-stage: #6e89b5;
  --cb-stage-soft: #e6edf8;
  min-width: 0;
  padding: 13px 9px 10px;
  border: 1px solid #dce5f0;
  border-top: 2px solid #becfe8;
  border-radius: 18px;
  background: #e8eef77a;
  transition: background .18s, border-color .18s;
}

.cb-column[data-stage="conversa"] { --cb-stage: #547aba; --cb-stage-soft: #e1ebfc; border-top-color: #99b5e4; }
.cb-column[data-stage="visita"] { --cb-stage: #a47b43; --cb-stage-soft: #f8edda; border-top-color: #d7bb88; }
.cb-column[data-stage="negociacao"] { --cb-stage: #796bb3; --cb-stage-soft: #ebe6f8; border-top-color: #b9a8df; }
.cb-column[data-stage="venda"] { --cb-stage: #338d94; --cb-stage-soft: #dff0ef; border-top-color: #91c6c7; }
.cb-column[data-stage="concluida"] { --cb-stage: #4c9177; --cb-stage-soft: #e1f0e8; border-top-color: #9fc8b6; }

.cb-column-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 3px 4px 16px;
}

.cb-stage-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 11px;
  background: var(--cb-stage-soft, #e6edf8);
  color: var(--cb-stage, #6e89b5);
  flex-shrink: 0;
}

.cb-stage-icon .icon { width: 17px; height: 17px; }
.cb-column-head > div { flex: 1; min-width: 0; }
.cb-column-head h2 { font-size: 13px; font-weight: 650; letter-spacing: -.15px; line-height: 1.4; }
.cb-column-head p { margin-top: 3px; font-size: 10px; color: #8190a6; line-height: 1.4; }

.cb-column-head > b {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding-inline: 5px;
  border: 1px solid #dce4f0;
  border-radius: 8px;
  background: #ffffff85;
  color: #7485a0;
  font-size: 11px;
  font-weight: 600;
}

.cb-column-body { display: grid; gap: 11px; min-height: 105px; }

.cb-card {
  min-width: 0;
  padding: 15px 13px 12px;
  border: 1px solid #ffffff;
  border-radius: 14px;
  background: #fffffff0;
  box-shadow: 0 3px 10px #3c557c08, 0 1px 2px #314d7b05;
  transition: border-color .18s, box-shadow .18s, opacity .18s, transform .18s;
}

.cb-card:hover { border-color: #cddaf0; box-shadow: 0 5px 17px #334f7a0f; }
.cb-card[draggable="true"] { cursor: grab; }
.cb-card.dragging { opacity: .42; transform: rotate(-1deg); cursor: grabbing; }
.cb-column.drag-over { background: #e0eaff; border-color: #8eace7; }
.cb-card-head { display: flex; align-items: flex-start; gap: 5px; }

.cb-person {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.cb-person .avatar { width: 33px; height: 33px; font-size: 10px; }
.cb-person > span:last-child { min-width: 0; }
.cb-person strong { display: block; font-size: 13px; font-weight: 650; line-height: 1.4; overflow-wrap: anywhere; }
.cb-person small { display: block; margin-top: 3px; font-size: 10px; line-height: 1.4; color: #8390a3; }
.cb-person:hover strong { color: var(--blue); }
.cb-card-head > .circle-btn { height: 27px; width: 24px; margin-right: -4px; color: #9aabc0; }
.cb-card-head > .circle-btn .icon { height: 17px; width: 17px; }
.cb-sources { display: flex; flex-wrap: wrap; gap: 5px; margin: 12px 0; }

.cb-source {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 4px 6px;
  border: 1px solid #e5ebf3;
  border-radius: 6px;
  background: #f4f7fb;
  color: #70819a;
  font-size: 9px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}

.cb-source svg, .cb-source .icon { display: block; width: 11px; height: 11px; flex-shrink: 0; }
.cb-source .brand-mark { background: none; box-shadow: none; border-radius: 0; }
.cb-source-whatsapp { color: #37836b; background: #f0f8f3; border-color: #deeee5; }
.cb-source-instagram { color: #a36b90; background: #faf3f8; border-color: #f0e3ec; }
.cb-source-facebook { color: #507bbc; background: #f0f5fd; border-color: #e0e9f8; }
.cb-source-olx { color: #8263b2; background: #f5f1fc; border-color: #eae2f6; }
.cb-source-webmotors { color: #b36778; background: #fff3f5; border-color: #f4e0e6; }
.cb-source-manual { color: #778198; background: #f2f4f8; border-color: #e4e9f1; }
.cb-source-site { color: #4e87a0; background: #eef7fa; border-color: #dcecf3; }
.cb-source-indicacao { color: #a08b61; background: #faf6ed; border-color: #eee7d8; }

.cb-car {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 0 0 12px;
  margin: 0 0 12px;
  border-bottom: 1px solid #edf1f7;
}

.cb-car > img { width: 56px; height: 44px; border-radius: 8px; object-fit: cover; background: #edf1f6; flex-shrink: 0; }
.cb-car > .icon { width: 31px; height: 31px; margin: 6px 12px; color: #9bacc5; flex-shrink: 0; }
.cb-car > span { display: grid; place-items: center; width: 56px; height: 44px; border-radius: 8px; background: #eff4fb; color: #8d9fbd; flex-shrink: 0; }
.cb-car > span .icon { width: 24px; height: 24px; }
.cb-car > div { min-width: 0; }
.cb-car strong { display: block; font-size: 11px; font-weight: 600; line-height: 1.5; }
.cb-car small { display: block; font-size: 10px; margin-top: 2px; color: #8492a7; line-height: 1.45; }

.cb-next { padding: 10px 11px; border-radius: 9px; background: #f2f6fc; }
.cb-next > small { display: block; font-size: 8px; color: #8497b1; letter-spacing: .9px; font-weight: 650; text-transform: uppercase; }
.cb-next p { margin-top: 5px; font-size: 11px; line-height: 1.55; color: #526782; }
.cb-next strong { font-weight: 600; }
.cb-due { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; color: #8a99af; font-size: 9px; line-height: 1.5; }
.cb-due .icon { width: 11px; height: 11px; }
.cb-due.late { color: #b27b38; }
.cb-card:has(> .cb-due.late) .cb-next { background: #fff8ec; }

.cb-visit {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 9px;
  padding: 8px 9px;
  border-radius: 8px;
  background: #f9f4eb;
  color: #9a7d4e;
  font-size: 10px;
  line-height: 1.5;
}

.cb-visit .icon { width: 13px; height: 13px; margin-top: 1px; flex-shrink: 0; }
.cb-visit small { display: block; margin-top: 2px; font-size: 9px; color: #aa9474; }
.cb-status { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.cb-status > span { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px; border-radius: 6px; background: #f3f5f9; color: #7b89a0; font-size: 9px; line-height: 1.35; }
.cb-status .icon { width: 11px; height: 11px; }
.cb-status > .late, .cb-status > .warning { background: #fff4e4; color: #a67d42; }
.cb-status > .success { background: #eaf6ee; color: #4e8b6d; }
.cb-status > .info { background: #eaf0fc; color: #6683b5; }
.cb-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; }
.cb-owner { display: inline-flex; align-items: center; gap: 5px; font-size: 9px; color: #92a0b3; min-width: 0; }
.cb-owner > .icon { width: 12px; height: 12px; flex-shrink: 0; }
.cb-owner > .avatar { width: 19px; height: 19px; font-size: 7px; }
.cb-card-foot .text-btn { min-height: 25px; padding: 3px 0; font-size: 10px; white-space: nowrap; }
.cb-card-foot .text-btn .icon { width: 12px; height: 12px; }

.cb-empty-column {
  display: flex;
  align-items: center;
  flex-direction: column;
  min-height: 181px;
  padding: 27px 17px 20px;
  border: 1px dashed #cdd9eb;
  border-radius: 13px;
  background: #ffffff3b;
  text-align: center;
  color: #94a3ba;
}

.cb-empty-column > .icon { width: 24px; height: 24px; margin-bottom: 12px; color: #a0b2cc; }
.cb-empty-column strong { color: #7c8ea8; font-size: 11px; font-weight: 500; line-height: 1.5; }
.cb-empty-column p { margin-top: 6px; font-size: 10px; line-height: 1.6; color: #9aa9be; }
.cb-empty-column > button { margin-top: 11px; font-size: 11px; }
.cb-empty { padding: 48px 24px; border: 1px solid #fff; border-radius: 20px; background: #ffffff8c; text-align: center; }
.cb-empty > .icon { width: 36px; height: 36px; color: #8fa6c8; margin-bottom: 16px; }
.cb-empty h2, .cb-empty h3 { font-size: 20px; }
.cb-empty p { max-width: 440px; margin: 11px auto 20px; font-size: 13px; line-height: 1.7; }
.cb-history-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }

/* Dialogs reuse the same source, person and action language as the board. */
.cb-choice-list { display: grid; gap: 10px; margin-top: 23px; }
.cb-choice-list > button {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  min-height: 77px;
  padding: 15px;
  border: 1px solid #dee6f2;
  border-radius: 13px;
  background: #f7f9fd;
  color: var(--ink);
  text-align: left;
}

.cb-choice-list > button > .icon { width: 23px; height: 23px; color: #728fbf; flex-shrink: 0; }
.cb-choice-list > button > div { flex: 1; min-width: 0; }
.cb-choice-list strong { display: block; font-size: 14px; font-weight: 600; }
.cb-choice-list p { margin-top: 5px; font-size: 12px; font-weight: 400; line-height: 1.6; color: #7d8ca4; }
.cb-choice-list > button:hover, .cb-choice-list > button.active { background: #eff4fe; border-color: #b8caef; }
.cb-choice-list > button:disabled { opacity: .55; cursor: default; }
.cb-detail-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 17px 0; margin: 17px 0; border-block: 1px solid #e3eaf4; }
.cb-detail-meta > div { flex: 1 1 130px; min-width: 0; }
.cb-detail-meta small, .cb-detail-meta dt { display: block; font-size: 10px; color: #91a0b5; margin-bottom: 5px; }
.cb-detail-meta strong, .cb-detail-meta dd { margin: 0; font-size: 12px; line-height: 1.6; font-weight: 500; }
.cb-detail-meta > span { font-size: 12px; color: #74849b; }
.cb-journey-mini { display: flex; list-style: none; gap: 5px; padding: 0; margin: 24px 0; }
.cb-journey-mini > * { position: relative; flex: 1; min-width: 0; padding-top: 13px; color: #91a0b6; font-size: 9px; line-height: 1.5; text-align: center; }
.cb-journey-mini > *::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; border-radius: 3px; background: #e4ebf5; }
.cb-journey-mini > .done::before { background: #a3bcea; }
.cb-journey-mini > .active, .cb-journey-mini > .current { color: #3e67b7; font-weight: 600; }
.cb-journey-mini > .active::before, .cb-journey-mini > .current::before { background: var(--blue); }
.cb-result-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 21px 0; }
.cb-result-choices > button, .cb-result-choices > label { display: flex; align-items: center; gap: 9px; min-height: 52px; padding: 13px; border: 1px solid #dfe7f3; border-radius: 11px; background: #f6f8fc; color: #627792; font-size: 12px; text-align: left; cursor: pointer; }
.cb-result-choices .icon { width: 18px; height: 18px; flex-shrink: 0; }
.cb-result-choices > .active, .cb-result-choices > :has(input:checked) { background: #edf3ff; border-color: #adc4ef; color: #3664b6; }

.cb-page button:focus-visible,
.cb-page select:focus-visible,
.cb-choice-list > button:focus-visible,
.cb-result-choices > button:focus-visible {
  outline: 2px solid #6d94e6;
  outline-offset: 3px;
}

.cb-toolbar .search-field:focus-within { border-color: #96b1e6; box-shadow: 0 0 0 3px #3e71d30c; }

@media (max-width: 1180px) {
  .cb-pulse-item { grid-template-columns: 25px auto; gap: 7px 9px; padding: 13px; }
  .cb-pulse-item > span { grid-column: 1 / -1; }
  .cb-pulse-item > strong { justify-self: end; font-size: 25px; }
  .cb-toolbar { gap: 9px; }
  .cb-toolbar > label:not(.search-field) { gap: 5px; }
  .cb-toolbar select { min-width: 120px; max-width: 175px; }
}

@media (max-width: 720px) {
  .cb-page .page-heading { margin-bottom: 20px; gap: 12px; }
  .cb-page .page-heading h1 { font-size: 27px; }
  .cb-page .page-heading p { max-width: 100%; font-size: 13px; line-height: 1.6; }
  .cb-page .page-heading > div { min-width: 0; }
  .cb-pulse { gap: 8px; overflow-x: auto; padding: 1px 1px 5px; margin-bottom: 14px; scrollbar-width: none; }
  .cb-pulse::-webkit-scrollbar { display: none; }
  .cb-pulse-item { flex: 0 0 130px; min-height: 78px; padding: 12px; border-radius: 14px; }
  .cb-pulse-item > span { font-size: 10px; }
  .cb-pulse-item > strong { font-size: 26px; }
  .cb-toolbar { gap: 9px; margin-bottom: 17px; }
  .cb-toolbar .search-field { flex-basis: 100%; min-height: 44px; }
  .cb-toolbar .search-field input { font-size: 16px; padding-block: 11px; }
  .cb-toolbar > label:not(.search-field) { flex: 1 1 120px; min-width: 0; flex-direction: column; align-items: stretch; font-size: 10px; gap: 5px; }
  .cb-toolbar select { width: 100%; max-width: none; min-width: 0; min-height: 44px; font-size: 12px; }
  .cb-toolbar > select { flex: 1 1 130px; }
  .cb-toolbar > button { min-height: 44px; padding-inline: 11px; font-size: 11px; }
  .cb-board-caption { gap: 8px; margin-bottom: 10px; align-items: flex-start; font-size: 10px; }
  .cb-scroll-actions { gap: 5px; }
  .cb-scroll-actions button { width: 34px; height: 34px; }
  .cb-mobile-stages { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 13px; padding: 2px 1px 5px; scrollbar-width: none; }
  .cb-mobile-stages::-webkit-scrollbar { display: none; }
  .cb-mobile-stages button, .cb-mobile-stages a { display: inline-flex; align-items: center; gap: 5px; min-height: 34px; padding: 7px 10px; border: 1px solid #d9e3f2; border-radius: 9px; background: #ffffffa6; color: #7188a9; font-size: 10px; white-space: nowrap; text-decoration: none; }
  .cb-mobile-stages .active { border-color: #abc0eb; background: #edf3ff; color: #4168b6; }
  .cb-mobile-stages b { font-size: 9px; font-weight: 500; opacity: .7; }
  .cb-board { grid-template-columns: repeat(6, min(88vw, 340px)); gap: 12px; max-width: none; margin-inline: -19px; padding: 2px 19px 20px; scroll-snap-type: x proximity; scroll-padding-inline: 19px; }
  .cb-column { scroll-snap-align: start; padding: 14px 10px 11px; }
  .cb-column-head { padding: 2px 4px 16px; }
  .cb-column-head h2 { font-size: 15px; }
  .cb-column-head p { font-size: 11px; }
  .cb-column-head > b { min-width: 26px; height: 26px; font-size: 12px; }
  .cb-stage-icon { width: 35px; height: 35px; }
  .cb-stage-icon .icon { width: 18px; height: 18px; }
  .cb-card { padding: 16px 15px 12px; }
  .cb-person { min-height: 38px; }
  .cb-person strong { font-size: 14px; }
  .cb-person small { font-size: 11px; }
  .cb-person .avatar { width: 37px; height: 37px; font-size: 11px; }
  .cb-card-head > .circle-btn { width: 32px; height: 35px; }
  .cb-sources { margin-block: 13px; gap: 6px; }
  .cb-source { padding: 5px 7px; font-size: 10px; }
  .cb-car strong { font-size: 12px; }
  .cb-car small { font-size: 11px; }
  .cb-next { padding: 11px 12px; }
  .cb-next > small { font-size: 9px; }
  .cb-next p { font-size: 12px; }
  .cb-due { font-size: 10px; }
  .cb-visit { font-size: 11px; }
  .cb-visit small { font-size: 10px; }
  .cb-status > span { font-size: 10px; }
  .cb-owner { font-size: 10px; }
  .cb-card-foot { margin-top: 9px; }
  .cb-card-foot .text-btn { min-height: 36px; padding-inline: 3px; font-size: 12px; }
  .cb-card-foot .text-btn .icon { width: 14px; height: 14px; }
  .cb-empty-column strong { font-size: 13px; }
  .cb-empty-column p { font-size: 12px; }
  .cb-empty-column > button { font-size: 12px; min-height: 36px; }
  .cb-history-grid { grid-template-columns: 1fr; gap: 13px; }
  .cb-choice-list > button { padding: 14px; }
  .cb-choice-list strong { font-size: 14px; }
  .cb-choice-list p { font-size: 12px; }
  .cb-journey-mini { gap: 4px; }
  .cb-journey-mini > * { font-size: 8px; }
  .cb-result-choices { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .cb-card, .cb-column, .cb-pulse-item { transition: none; }
  .cb-card.dragging { transform: none; }
}
