/* ─────────────────────────────────────────────────────────────────────────
 * IPSYSTEM v1.20 — Activity timeline + audit log styles
 * ─────────────────────────────────────────────────────────────────────────
 */

/* ─── Activity timeline (entity detail pages) ─────────────────────────── */
.ipsys-activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ipsys-activity-item {
  display: flex;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid #f5f5f5;
}
.ipsys-activity-item:first-child { border-top: 0; }

.ipsys-activity-avatar { flex: 0 0 auto; padding-top: 2px; }
.ipsys-activity-body   { flex: 1 1 auto; min-width: 0; }

.ipsys-activity-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: #495057;
  line-height: 1.5;
}
.ipsys-activity-line strong { color: #344050; font-weight: 600; }
.ipsys-activity-fields { color: #878a99; font-size: 12.5px; }

.ipsys-activity-meta {
  font-size: 11.5px;
  color: #878a99;
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.ipsys-activity-meta .sep { opacity: .5; }
.ipsys-activity-toggle {
  color: #405189;
  text-decoration: none;
  font-weight: 500;
}
.ipsys-activity-toggle:hover { text-decoration: underline; }

/* ─── Action tag pills ──────────────────────────────────────────────── */
.ipsys-act-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .4px;
  border-radius: 10px;
  text-transform: uppercase;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
.ipsys-act-add  { background: rgba(10, 179, 156, .12); color: #0a8072; }
.ipsys-act-upd  { background: rgba(64, 81, 137, .12); color: #2f3e6e; }
.ipsys-act-del  { background: rgba(240, 101, 72, .12); color: #b1391f; }
.ipsys-act-auth { background: rgba(247, 184, 75, .15); color: #8a6418; }
.ipsys-act-gen  { background: rgba(135, 138, 153, .15); color: #495057; }

/* ─── Inline diff table ─────────────────────────────────────────────── */
.ipsys-activity-diff {
  margin-top: 8px;
  background: #f8f9fb;
  border: 1px solid #e9ebec;
  border-radius: 6px;
  padding: 8px;
  overflow-x: auto;
}
.ipsys-diff-tbl {
  width: 100%;
  font-size: 12px;
  border-collapse: collapse;
}
.ipsys-diff-tbl th {
  text-align: left;
  padding: 4px 8px;
  font-weight: 600;
  color: #878a99;
  text-transform: uppercase;
  font-size: 10.5px;
  letter-spacing: .3px;
  border-bottom: 1px solid #e9ebec;
}
.ipsys-diff-tbl td {
  padding: 4px 8px;
  vertical-align: top;
  border-bottom: 1px solid #f0f1f3;
  word-break: break-word;
}
.ipsys-diff-tbl tr:last-child td { border-bottom: 0; }
.ipsys-diff-tbl code {
  background: #fff;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 11.5px;
  color: #2f3e6e;
  border: 1px solid #e9ebec;
}
.ipsys-diff-old { color: #b1391f; }
.ipsys-diff-new { color: #0a8072; }

/* ─── Enhanced audit log table styles ───────────────────────────────── */
.ipsys-audit-row td:first-child { white-space: nowrap; font-size: 11.5px; color: #878a99; }
.ipsys-audit-user { display: inline-flex; align-items: center; gap: 8px; }
.ipsys-audit-user-meta { line-height: 1.3; }
.ipsys-audit-user-meta .name { font-weight: 600; font-size: 13px; color: #344050; }
.ipsys-audit-user-meta .role { font-size: 10.5px; color: #878a99; text-transform: uppercase; letter-spacing: .3px; }
.ipsys-audit-entity { font-size: 12.5px; color: #344050; }
.ipsys-audit-entity small { color: #878a99; font-family: ui-monospace, monospace; font-size: 10.5px; }
