/* Job cards: five jobs per business type, each owned by one AI agent.
   Reuses the product-mock language from illustrations.css (window, ledger,
   supplier check, result) and adds the agent bar, sources and job blocks. */
.la-five-flows .jc-card {
  min-height: 0;
  height: auto;
  background: linear-gradient(150deg, #fbfdff, #edf4fd);
}
.la-five-flows .jc-wide {
  grid-column: span 3;
}
.la-five-flows .jc-narrow {
  grid-column: span 2;
}
.jc-card .la-flow-head h3 {
  max-width: 420px;
}
.jc-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.jc-window {
  flex: none;
  display: flex;
  flex-direction: column;
  margin: 0 23px;
  border-color: #cddbed;
  box-shadow: 0 16px 35px -15px #25496b3b;
}
.jc-card .la-done {
  margin-top: 0;
}

/* Second wide card carries the dark product look of the original chat card. */
.la-five-flows .jc-card:nth-child(2) {
  background:
    radial-gradient(ellipse at 90% 85%, #2e85dd 0, transparent 56%),
    linear-gradient(150deg, #0c2850, #145592);
  background-color: #0c2850;
}
.jc-card:nth-child(2) .la-flow-head h3 {
  color: #fff;
}
.jc-card:nth-child(2) .la-flow-head > button {
  background: #ffffff15;
  border-color: #ffffff44;
  color: #fff;
}
.jc-card:nth-child(2) .jc-window {
  border-color: #fff;
  box-shadow: 0 18px 40px #001c3b38;
}
.jc-card:nth-child(2) > .la-done,
.jc-card:nth-child(2) > .la-done > span {
  color: #d9f2e6;
}

/* Agent identity: one avatar per agent, identical wherever it appears. */
.jc-agent-bar {
  flex-wrap: nowrap;
  gap: 10px;
  padding: 11px 12px;
  background: #f7f9fc;
}
.jc-agent-bar strong {
  font-size: 14px;
  color: #183e66;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.jc-avatar {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  background: #e8f0fa;
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 3px #c9dcf0;
}
.jc-avatar img {
  display: block;
  width: 150%;
  height: 150%;
  max-width: none;
  margin: -6% 0 0 -25%;
  object-fit: cover;
}
.jc-window .jc-agent-bar > .jc-state:last-child {
  margin-left: auto;
  flex: none;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid #cce6d6;
  background: #eaf7ef;
  color: #206245;
}
.jc-window .jc-agent-bar > .jc-state[data-state="ready-for-review"] {
  border-color: #c9dcf4;
  background: #edf5ff;
  color: #17589a;
}

.jc-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.jc-label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.04em;
  line-height: 1.5;
  color: #45617f;
  margin-bottom: 7px;
}
.jc-block {
  margin: 0;
  min-width: 0;
}

/* Records read */
.jc-sources {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2eaf3;
}
.jc-sources > small {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: #45617f;
}
.jc-sources > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.jc-source {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  line-height: 1.3;
  color: #24486a;
  background: #fff;
  border: 1px solid #d6e2f0;
  border-radius: 999px;
  padding: 4px 9px 4px 6px;
}
.jc-source img {
  width: 14px;
  height: 14px;
  object-fit: contain;
}
.jc-source img.is-wide {
  width: auto;
  height: 11px;
}
.jc-source.is-record {
  color: #3a5f86;
  background: #f6f9fd;
  border-style: dashed;
}
.jc-source svg {
  color: #6b8aac;
}

/* Numbers */
.jc-kpis {
  display: grid;
  grid-template-columns: repeat(var(--kpi-count), minmax(0, 1fr));
  gap: 7px;
}
.jc-kpis > div {
  padding: 9px 9px 8px;
  border: 1px solid #e0e8f1;
  border-radius: 7px;
  background: #fff;
  min-width: 0;
}
.jc-kpis span {
  display: block;
  font-size: 12px;
  line-height: 1.4;
  color: #45617f;
}
.jc-kpis strong {
  display: block;
  margin-top: 4px;
  font-size: 19px;
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: #173e6f;
}
.jc-chart {
  margin: 0;
}
.jc-chart .la-bars {
  height: 112px;
  gap: 10px;
}
.jc-chart .la-bars > div > b {
  font-size: 12px;
  font-weight: 400;
  color: #45617f;
  margin-bottom: 3px;
}
.jc-chart .la-bars > .is-forecast i {
  background: repeating-linear-gradient(
    135deg,
    #0a6ad8 0 5px,
    #3d91ec 5px 10px
  );
}
.jc-chart .la-bars > .is-forecast b,
.jc-chart .la-bars > .is-forecast small {
  color: #0a5cc0;
  font-weight: 500;
}
.jc-table {
  background: #fff;
  border: 1px solid #d6e3f2;
  border-radius: 10px;
  padding: 10px 10px 4px;
}
.jc-table table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  color: #24486a;
}
.jc-table th,
.jc-table td {
  padding: 8px 6px;
  border-top: 1px solid #e3ebf5;
  vertical-align: top;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.jc-table th {
  font-size: 12px;
  font-weight: 400;
  color: #45617f;
  background: #f3f8ff;
}
.jc-table td {
  font-size: 13px;
}
.jc-table td:first-child {
  color: #183e66;
}
.jc-table .is-flag {
  color: #9a5a0b;
}
.jc-table th,
.jc-table .is-flag,
.jc-table .is-ok {
  white-space: nowrap;
  overflow-wrap: normal;
}
.jc-table .is-ok {
  color: #206245;
}

/* Rows with a status */
.jc-list {
  border: 1px solid #dce6f2;
  border-radius: 9px;
  background: #fff;
  overflow: hidden;
}
.jc-list > div {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
}
.jc-list > div + div {
  border-top: 1px solid #e8eef6;
}
.jc-list > div > div {
  min-width: 0;
  flex: 1;
}
.jc-list strong {
  display: block;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 500;
  color: #183e66;
}
.jc-list span {
  display: block;
  font-size: 12px;
  line-height: 1.45;
  color: #45617f;
}
.jc-pill {
  flex: none;
  font-style: normal;
  font-size: 12px;
  line-height: 1.3;
  padding: 3px 7px;
  border-radius: 6px;
  border: 1px solid #cce6d6;
  background: #eaf7ef;
  color: #206245;
  white-space: nowrap;
}
.jc-pill[data-tone="warn"] {
  border-color: #f0d9b5;
  background: #fff6e8;
  color: #8a520b;
}
.jc-pill[data-tone="wait"] {
  border-color: #d6e2f0;
  background: #f4f8fd;
  color: #3a5f86;
}
.jc-pill[data-tone="draft"] {
  border-color: #c9dcf4;
  background: #edf5ff;
  color: #17589a;
}

/* Supplier check and matches reuse .li-source-comparison */
.jc-compare {
  margin: 0;
}
.jc-compare .li-source-variance b {
  color: #9a5a0b;
}
.jc-compare.is-ok .li-source-variance b {
  color: #206245;
}
.jc-compare > p {
  margin: 9px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: #45617f;
}

/* Messages */
.jc-chat {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.jc-chat .jc-label {
  margin-bottom: 1px;
}
.jc-bubble {
  margin: 0;
  max-width: 86%;
  padding: 8px 11px;
  font-size: 13px;
  line-height: 1.45;
  border-radius: 14px;
}
.jc-bubble.is-in {
  align-self: flex-start;
  background: #edf2f8;
  color: #24486a;
  border-bottom-left-radius: 4px;
}
.jc-bubble.is-out {
  align-self: flex-end;
  background: #086cde;
  color: #fff;
  border-bottom-right-radius: 4px;
}
.jc-chat-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #206245;
}
.jc-chat-meta svg {
  width: 14px;
  height: 14px;
}
.jc-draft {
  border: 1px dashed #b9cfe8;
  border-radius: 9px;
  background: #f8fbff;
  padding: 10px 12px;
}
.jc-draft-head {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 12px;
  line-height: 1.45;
  color: #45617f;
}
.jc-draft > p {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: #24486a;
}
.jc-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.jc-steps li {
  font-size: 12px;
  line-height: 1.3;
  color: #24486a;
  background: #fff;
  border: 1px solid #d6e2f0;
  border-radius: 6px;
  padding: 5px 8px;
}

/* Morning briefing audio */
.jc-voice {
  border: 1px solid #c9dcf0;
  border-radius: 10px;
  background: linear-gradient(140deg, #f2f8ff, #e2eefc);
  padding: 12px;
}
.jc-voice-player {
  display: flex;
  align-items: center;
  gap: 10px;
}
.jc-voice .la-play-briefing {
  width: 44px;
  height: 44px;
  flex: none;
  font-size: 18px;
}
.jc-voice .li-waveform {
  height: 46px;
  width: auto;
  flex: 1;
  gap: 3px;
  justify-content: flex-start;
  overflow: hidden;
}
.jc-voice .li-waveform i {
  width: 3px;
  flex: none;
}
.jc-voice:has(.la-play-briefing[aria-pressed="true"]) .li-waveform i {
  animation: li-wave 0.85s var(--wave-delay) ease-in-out infinite alternate;
}
.jc-voice > p {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: #24486a;
}

/* Outcome */
.jc-result {
  align-items: center;
  margin: 2px 0 0;
  padding: 13px 12px;
  gap: 10px;
  background: #fff;
  border: 1px solid #a9d7c0;
  border-radius: 10px;
  box-shadow: 0 8px 20px -8px #215d4650;
}
.jc-result > div > small:first-child {
  margin-top: 0;
  letter-spacing: 0.04em;
}
.jc-result strong {
  font-size: 15px;
  color: #205d43;
  line-height: 1.45;
  margin: 3px 0 0;
}
.jc-result > div > small:last-child {
  margin-top: 2px;
}
.jc-result[data-state="ready-for-review"] {
  border-color: #b9d3f1;
  box-shadow: 0 8px 20px -8px #1b4f8a45;
}
.jc-result[data-state="ready-for-review"] strong {
  color: #17589a;
}
.jc-result[data-state="ready-for-review"] .li-result-icon {
  background: #edf5ff;
  border-color: #c9dcf4;
  color: #17589a !important;
}

/* Full job in the dialog */
.jc-dialog .jc-window {
  margin: 0;
}
.jc-dialog .jc-table {
  overflow-x: auto;
}
.jc-dialog .la-done {
  padding: 16px 0 0;
}

/* Tablet and mobile follow loopai.com: fixed card heights, cropped product
   previews and no result strip. Measured on loopai.com, 23 Oct 2026:
   768px = two 340px columns, 480px then 425px cards; 390px = one column,
   20px gutters, 24px gaps, 480px then 400px cards; 21px headings. */
@media (max-width: 1023px) {
  .la-five-flows {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }
  .la-five-flows .jc-wide,
  .la-five-flows .jc-narrow {
    grid-column: auto;
    height: 425px;
    min-height: 425px;
  }
  .la-five-flows .jc-wide {
    height: 480px;
    min-height: 480px;
  }
  .jc-card .la-flow-head {
    padding: 29px 24px 22px 29px;
  }
  .jc-card .la-flow-head h3 {
    font-size: 21px;
    line-height: 1.2;
  }
  .jc-stage {
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
  }
  .jc-card .jc-window {
    margin: 0 20px;
    flex: none;
  }
  /* Like Loop's dashboard preview, wide tables keep their columns and run
     past the card edge instead of squeezing. */
  .jc-card .jc-table {
    overflow: hidden;
  }
  .jc-card .jc-table table {
    min-width: 430px;
  }
  .jc-card > .la-done {
    display: none;
  }
}
@media (max-width: 760px) {
  .la-five-flows {
    grid-template-columns: 1fr;
  }
  .la-five-flows .jc-narrow {
    height: 400px;
    min-height: 400px;
  }
}
.jc-card .jc-ledger > div,
.jc-dialog .jc-ledger > div {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 8px;
}
.jc-ledger > div > span:nth-child(2) {
  display: block;
}
.jc-ledger > div > strong {
  width: auto;
  padding-left: 0;
}
