/* Admin Activity Log page */
.activity-note { padding:10px 20px; font-size:13px; color:var(--text-secondary); background:var(--surface-2); border-bottom:1px solid var(--border); border-radius:var(--radius-lg) var(--radius-lg) 0 0; }
.activity-toolbar { align-items:center; }
.activity-live { display:inline-flex; align-items:center; gap:6px; font-weight:600; font-size:13px; cursor:pointer; user-select:none; }
.activity-live input { width:16px; height:16px; accent-color:var(--accent); }
.activity-dot { width:9px; height:9px; border-radius:50%; background:var(--border-strong); display:inline-block; }
.activity-live.on .activity-dot { background:#1f9d55; box-shadow:0 0 0 3px rgba(31,157,85,.2); }
.activity-live.paused .activity-dot { background:#d69e2e; box-shadow:none; }
.activity-range { display:inline-flex; align-items:center; gap:6px; font-size:12px; color:var(--text-secondary); }
.activity-range .form-input { min-height:36px; padding:4px 8px; width:190px; }
.activity-status { padding:8px 20px; font-size:12px; color:var(--text-secondary); min-height:18px; }
.activity-table table { table-layout:auto; }
.activity-table td, .activity-table th { white-space:nowrap; }
.activity-table td.act-details { white-space:normal; min-width:260px; max-width:520px; overflow-wrap:anywhere; }
.activity-table tr.act-new { animation:actFlash 2.4s ease-out; }
.activity-table tr.act-fail td:nth-child(3) .status-badge { background:#fde8e8; color:#9b1c1c; }
.activity-more { padding:12px 20px; text-align:center; }
@keyframes actFlash { from { background:rgba(31,157,85,.18); } to { background:transparent; } }
@media (prefers-reduced-motion: reduce) { .activity-table tr.act-new { animation:none; } }
@media (max-width: 700px) {
  .activity-range { width:100%; }
  .activity-range .form-input { flex:1 1 auto; width:auto; min-width:0; }
  #tab-activity-log .table-toolbar .filter-select, #tab-activity-log .table-toolbar .search-input { flex:1 1 100%; min-width:0; }
  /* each event becomes a small card: no sideways scrolling needed on a phone */
  .activity-table table, .activity-table thead, .activity-table tbody, .activity-table tr, .activity-table td { display:block; width:100%; }
  .activity-table thead { display:none; }
  .activity-table tr { padding:10px 14px; border-top:1px solid var(--border); }
  .activity-table td { border:0 !important; padding:2px 0 !important; white-space:normal; max-width:none; overflow-wrap:anywhere; }
  .activity-table td[data-label]::before { content:attr(data-label) ": "; color:var(--text-secondary); font-size:11px; font-weight:600; text-transform:uppercase; }
  .activity-table td.act-details { min-width:0; }
}

/* Data retention card on the Logs page (admins only) */
.retention-card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-lg); box-shadow:var(--shadow-sm); margin-bottom:16px; padding:14px 20px; }
.retention-head { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:6px 16px; margin-bottom:8px; }
.retention-head h3 { font-size:15px; margin:0; }
.retention-meta { font-size:12px; color:var(--text-muted); }
.retention-badge { background:var(--warn-light); color:var(--warn); border-radius:999px; padding:2px 8px; font-weight:600; }
.retention-table-wrap { overflow-x:auto; }
.retention-table { width:100%; border-collapse:collapse; font-size:13px; }
.retention-table th, .retention-table td { text-align:left; padding:6px 8px; border-bottom:1px solid var(--border); white-space:nowrap; }
.retention-table th { color:var(--text-muted); font-weight:600; }
@media (max-width: 700px) {
  .retention-table thead { display:none; }
  .retention-table tr { display:block; padding:6px 0; border-bottom:1px solid var(--border); }
  .retention-table td { display:flex; justify-content:space-between; border:0; padding:2px 0; white-space:normal; }
  .retention-table td::before { content:attr(data-label); color:var(--text-muted); margin-right:12px; }
}
