/* AfriBilling – dashboard, reports and activity log (builder E). Builds on afribilling.css; no colours of its own. */

/* feed rows that link to their invoice/quote/payment keep the design's text colours */
.ov-feed-link { color: inherit; text-decoration: none; }
.ov-feed-link:hover b { text-decoration: underline; text-underline-offset: 2px; }
.ov-plain { color: inherit; text-decoration: none; }
.ov-plain:hover { text-decoration: underline; text-underline-offset: 2px; }
.ov-fi { min-width: 0; overflow-wrap: anywhere; }

/* charts: bar tooltips + readable labels in both themes */
.ov-chart rect, .ov-chart circle { cursor: default; }
.ov-chart .neg-l { stroke: var(--border-strong); stroke-width: 1; }

/* reports: period picker */
.ov-period { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ov-period .select { width: auto; }
.ov-custom { display: none; gap: 8px; align-items: center; flex-wrap: wrap; }
.ov-custom.on { display: flex; }
.ov-custom .input { width: 150px; }
.ov-csv { white-space: nowrap; }

/* reports: client statement card */
.ov-stmt-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.ov-stmt-form .field { margin: 0; min-width: 0; }
.ov-stmt-form .field.grow { flex: 1 1 240px; }
.ov-stmt-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ov-stmt-sum > div { padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); min-width: 0; }
.ov-stmt-sum .num { font: 700 17px/1.2 var(--font-head); color: var(--text); margin-top: 4px; }

/* activity log */
.ov-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ov-filters .select { width: auto; max-width: 100%; }
.ov-who { display: flex; gap: 10px; align-items: center; min-width: 0; }
.ov-who b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-what { min-width: 0; overflow-wrap: anywhere; color: var(--text-2); }
.ov-what b { color: var(--text); font-weight: 650; }
.ov-ip { font-family: var(--font-mono, ui-monospace, monospace); font-size: 12.5px; color: var(--muted); }

@media (max-width: 980px) {
  .ov-stmt-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .ov-period, .ov-period .select { width: 100%; }
  .ov-period .btn { flex: 1 1 auto; }
  .ov-custom .input { width: auto; flex: 1 1 130px; min-width: 0; }
  /* table footers become a labelled totals card (the design's footer row was wider than a phone) */
  .rtable.ov-foot tfoot tr { display: block; padding: 12px 16px; }
  .rtable.ov-foot tfoot td { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; border: 0; text-align: right; }
  .rtable.ov-foot tfoot td::before { content: attr(data-label); font-size: 12px; font-weight: 600; color: var(--muted); text-align: left; }
  .rtable.ov-foot tfoot td.hide-card { display: none; }
  .ov-filters .select, .ov-filters .btn { flex: 1 1 140px; }
  .ov-what { text-align: right; }
}
@media (max-width: 720px) {
  .rtable.ov-foot tfoot td:first-child { justify-content: flex-start; text-align: left; }
  .rtable.ov-foot tfoot td:first-child::before { display: none; }
}
