/* Live activity and customer tracking. Builds on the analytics (va-*) styles. */
.tr-page .va-metrics {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}
/* Keeps visually hidden headers inside the scroller instead of widening the page. */
.tr-page .va-table-scroll,
.tr-dialog .va-table-scroll {
  position: relative;
}
.tr-table {
  min-width: 760px;
}
.tr-table th {
  font-size: 11px;
  font-weight: 600;
  color: #62625c;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.tr-table td {
  vertical-align: top;
}
.tr-person {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 200px;
}
.tr-person > div,
.tr-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.tr-person strong,
.tr-stack strong {
  font-weight: 600;
  overflow-wrap: anywhere;
}
.tr-person span,
.tr-stack span {
  font-size: 11px;
  color: #62625c;
  overflow-wrap: anywhere;
}
.tr-page code,
.tr-dialog code {
  font-size: 11px;
  color: #4f4f49;
  background: #f3f3ee;
  border-radius: 4px;
  padding: 1px 5px;
  overflow-wrap: anywhere;
  width: fit-content;
}
.tr-initial {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f1f1ec;
  color: #2a2a25;
  font-weight: 600;
  position: relative;
}
.tr-initial.is-live:after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #24724b;
  border: 2px solid #fff;
}
.tr-inline {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.tr-person .tr-inline,
.tr-stack .tr-inline {
  color: #3d3d37;
}
.tr-presence {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #4f4f49;
}
.tr-presence > span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9a9a92;
}
.tr-presence.is-online {
  color: #1d6340;
}
.tr-presence.is-online > span {
  background: #24724b;
  box-shadow: 0 0 0 3px #24724b1f;
}
.tr-presence.is-away {
  color: #8a5a00;
}
.tr-presence.is-away > span {
  background: #c98a12;
}
.tr-page .tr-chip,
.tr-dialog .tr-chip {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  color: #4f4f49;
  background: #f1f1eb;
  border-radius: 6px;
  padding: 3px 8px;
}
.tr-page .tr-chip.is-good,
.tr-dialog .tr-chip.is-good {
  color: #1d6340;
  background: #e5f3eb;
}
.tr-page .tr-chip.is-warn,
.tr-dialog .tr-chip.is-warn {
  color: #8a3b0c;
  background: #fbebe2;
}
.tr-muted {
  color: #62625c;
  font-size: 12px;
}
.tr-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.tr-row-actions .cms-secondary,
.tr-table .cms-secondary {
  padding: 8px 12px;
}
.tr-filters {
  grid-template-columns: 2fr 1fr 1fr auto auto;
}
.tr-check {
  display: flex !important;
  align-items: center;
  gap: 8px !important;
  padding-bottom: 12px;
}
.tr-dialog h4 {
  margin: 22px 0 10px;
  font-size: 14px;
}
.tr-dialog .va-dialog-header {
  flex-wrap: wrap;
}
.tr-dialog .va-dialog-header > div:first-child {
  flex: 1 1 180px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.tr-dialog .va-dialog-header .va-header-actions {
  flex: none;
}
.tr-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: #e5e5df;
  border: 1px solid #e5e5df;
  border-radius: 14px;
  overflow: hidden;
  margin: 12px 0 18px;
}
.tr-facts > div {
  background: #fff;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.tr-facts > div > span:first-child {
  font-size: 11px;
  color: #62625c;
}
.tr-facts a {
  color: #20201c;
  font-weight: 600;
}
.tr-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.tr-list > li {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid #ecece7;
  font-size: 13px;
}
.tr-list > li > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1 1 260px;
}
.tr-list span,
.tr-list time {
  font-size: 11px;
  color: #62625c;
  overflow-wrap: anywhere;
}
.tr-events {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}
.tr-events li {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.5fr) auto;
  gap: 10px;
  padding: 10px 0 10px 12px;
  border-left: 3px solid #d9d9d2;
  margin-bottom: 6px;
  font-size: 12px;
}
.tr-events li.is-warning {
  border-color: #c98a12;
}
.tr-events li.is-critical {
  border-color: #b4320d;
}
.tr-events span,
.tr-events time {
  color: #62625c;
  overflow-wrap: anywhere;
}
.tr-timeline {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
}
.tr-timeline li {
  position: relative;
  padding: 0 0 18px 20px;
  border-left: 2px solid #e2e2db;
  margin-left: 4px;
  font-size: 13px;
}
.tr-timeline li:before {
  content: "";
  position: absolute;
  left: -5px;
  top: 3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9a9a92;
}
.tr-timeline li.is-logged:before {
  background: #ff4d1f;
}
.tr-timeline li.is-status_changed:before {
  background: #24724b;
}
.tr-timeline strong {
  font-weight: 600;
  display: block;
}
.tr-timeline p {
  margin: 6px 0;
  color: #3d3d37;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.tr-timeline time {
  font-size: 11px;
  color: #62625c;
}
.tr-log {
  border: 1px solid #e2e2db;
  border-radius: 14px;
  padding: 16px 18px;
}
.tr-log-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.tr-log textarea,
.tr-log select,
.tr-log input {
  width: 100%;
}
@media (max-width: 1100px) {
  .tr-filters {
    grid-template-columns: 1fr 1fr;
  }
  .tr-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .tr-log-grid,
  .tr-events li {
    grid-template-columns: 1fr;
  }
  /* Rows become stacked cards; each cell is already self-describing. */
  .tr-table {
    min-width: 0;
  }
  .tr-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .tr-table,
  .tr-table tbody,
  .tr-table tr,
  .tr-table td {
    display: block;
    width: 100%;
  }
  .tr-page .tr-table tr,
  .tr-dialog .tr-table tr {
    padding: 14px 0;
    border-bottom: 1px solid #e9e9e3;
  }
  .tr-page .tr-table td,
  .tr-dialog .tr-table td {
    border: 0;
    padding: 5px 0;
  }
  .tr-table td:empty {
    display: none;
  }
  .tr-person {
    min-width: 0;
  }
  .tr-row-actions {
    justify-content: flex-start;
  }
}
@media (max-width: 400px) {
  .tr-filters,
  .tr-facts {
    grid-template-columns: 1fr;
  }
  .tr-filters .va-search {
    grid-column: auto;
  }
}
