/* today.css — the Today and Action inbox tabs of AI Opportunities (today.js).
 * Built from opportunities.css's pieces and tokens (--op-*); no coloured
 * edges on any box (owner, 28 Sep 2026) - urgency is the pill. */

/* ---- the five for today ---- */
.crm-td__top { gap: 4px; }
.crm-td__toph { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.crm-td__toph .fi { color: #65a30d; font-size: 20px; }
.dark .crm-td__toph .fi { color: #d4fb08; }
.crm-td__toprow, .crm-td__row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--op-line); }
.crm-td__toprow:nth-child(2), .crm-td__panelhead + .crm-td__row { border-top: 0; }
.crm-td__rank {
  width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; flex: none;
  background: var(--op-panel); color: var(--op-ink); font-weight: 800; font-size: 14px;
}
.crm-td__toprow:nth-child(2) .crm-td__rank { background: var(--op-lime); color: #000; }
.crm-td__topwords { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.crm-td__say { font-size: 14.5px; font-weight: 700; color: var(--op-ink); line-height: 1.55; unicode-bidi: plaintext; }
.crm-td__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--op-muted); }
.crm-td__meta .crm-opp__pill { height: 24px; font-size: 12px; }
.crm-td__toprow > .crm-opp__btn, .crm-td__row > .crm-opp__btn { flex: none; }
.crm-td__all { align-self: flex-start; margin-top: 4px; }

/* ---- the numbers ---- */
.crm-td__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: start; }
.crm-td__panel { gap: 2px; }
.crm-td__stat {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 7px 8px; margin: 0 -8px;
  border: 0; border-radius: 8px; background: none; font: inherit; color: var(--op-ink); text-align: start; width: calc(100% + 16px);
}
.crm-td__stat.is-link { cursor: pointer; }
.crm-td__stat.is-link:hover { background: var(--op-panel); }
.crm-td__label { font-size: 13px; color: var(--op-muted); min-width: 0; unicode-bidi: plaintext; }
.crm-td__value { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; flex: none; }
.crm-td__stat.is-bad .crm-td__value { color: var(--op-crit); }
.crm-td__note { margin: 6px 0 0; line-height: 1.55; }

/* ---- the action inbox ---- */
.crm-td__section { gap: 0; }
.crm-td__section .crm-opp__panelhead { margin-bottom: 2px; }
.crm-td__section .crm-opp__panelhead + .crm-td__row { border-top: 0; }
.crm-td__count {
  margin-inline-start: 4px; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 999px; display: inline-grid; place-items: center;
  background: var(--op-panel); color: var(--op-muted); font-size: 12px; font-weight: 700;
}

@media (max-width: 1280px) {
  .crm-td__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .crm-td__grid { grid-template-columns: 1fr; }
  .crm-td__toprow, .crm-td__row { flex-wrap: wrap; }
  .crm-td__toprow > .crm-opp__btn, .crm-td__row > .crm-opp__btn { margin-inline-start: 46px; }
}

/* ---- the business timeline (timeline.js, item 55) ---- */
.crm-tl { gap: 2px; }
.crm-tl__day { font-size: 12.5px; font-weight: 800; color: var(--op-muted); margin: 10px 0 4px; }
.crm-tl__day:first-child { margin-top: 0; }
.crm-tl__row {
  display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 8px 6px; border: 0; border-radius: 8px;
  background: none; font: inherit; color: var(--op-ink); text-align: start;
}
button.crm-tl__row { cursor: pointer; }
button.crm-tl__row:hover { background: var(--op-panel); }
.crm-tl__icon { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; font-size: 13px; }
.crm-tl__row.is-up .crm-tl__icon { background: var(--op-green-soft); color: var(--op-green); }
.crm-tl__row.is-down .crm-tl__icon { background: var(--op-crit-soft); color: var(--op-crit); }
.crm-tl__row.is-warn .crm-tl__icon { background: var(--crm-alert-bg, #fff1f2); color: var(--crm-alert-icon, #e8384f); }
.crm-tl__row.is-info .crm-tl__icon { background: var(--op-blue-soft); color: var(--op-blue); }
.crm-tl__text { font-size: 13.5px; line-height: 1.6; padding-top: 3px; unicode-bidi: plaintext; }
