/* Agent activity, under Insights. */

.aa-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.aa-bar .aa-spacer { flex: 1 1 auto; }
.aa-custom { display: flex; align-items: center; gap: 6px; }
.aa-custom input[type=date] {
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font-size: 12.5px;
  color: var(--text);
}

.aa-notes {
  background: #eff6ff;
  color: #1e3a8a;
  border-radius: 9px;
  padding: 10px 13px;
  font-size: 12.5px;
  line-height: 1.55;
  margin-bottom: 12px;
}

/* Fourteen columns of metrics will not fit any laptop, and a page that scrolls
   sideways as a whole is unusable. The table gets its own scroller. */
.aa-scroll { overflow-x: auto; }
.aa-table { min-width: 1180px; }
.aa-table th, .aa-table td { white-space: nowrap; }
.aa-table td { vertical-align: top; }
.aa-table .aa-name { white-space: normal; min-width: 150px; overflow-wrap: anywhere; }
.aa-sub { color: var(--muted); font-size: 11.5px; margin-top: 2px; font-weight: 500; }
.aa-bad { color: #b91c1c; }
.aa-foot { margin-top: 10px; }

/* Detail */
.aa-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.aa-head .aa-spacer { flex: 1 1 auto; }
.aa-title { display: flex; flex-direction: column; min-width: 0; }
.aa-title b { font-size: 16px; }

/* min-width:0 or a long agent name in the left column pushes the right one
   off the screen: grid children default to min-width auto. */
.aa-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
}
.aa-cols > * { min-width: 0; }
@media (max-width: 1080px) { .aa-cols { grid-template-columns: 1fr; } }

.aa-tight { padding: 4px 16px 12px; }
.aa-metric { width: 100%; }
.aa-metric b { font-size: 13px; }
.aa-why {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.55;
  margin-top: 3px;
  overflow-wrap: anywhere;
}
.aa-value { text-align: right; white-space: nowrap; vertical-align: top; padding-top: 12px; }
.aa-value b { font-size: 17px; }

/* Leads with no contact attempt: the spec asks for links, so they are links. */
.aa-leads {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 6px;
  padding: 10px 0;
}
.aa-lead {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  background: #fff;
}
.aa-lead:hover { background: #f0f6ff; border-color: #bfdbfe; }
.aa-lead-name { font-weight: 600; overflow-wrap: anywhere; }

/* Comparison */
.aa-picker { margin-bottom: 12px; }
.aa-picker-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 12px;
}
.aa-picker-row > div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.aa-picker-row select {
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  max-width: 100%;
}
.aa-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .4px;
  font-weight: 700;
  color: var(--muted);
}
@media (max-width: 820px) { .aa-picker-row { grid-template-columns: 1fr; } }

.aa-caption { margin-bottom: 10px; font-size: 12.5px; line-height: 1.55; }
.aa-cmp { min-width: 620px; }
.aa-cmp td:not(:first-child), .aa-cmp th:not(:first-child) { text-align: right; white-space: nowrap; }
.aa-cmp td:first-child { color: var(--muted); font-weight: 600; }
