/* audit trail */
.aud { display: flex; flex-direction: column; height: 100%; min-height: 0; padding: 16px 20px; gap: 10px; }
.aud-gov { padding: 12px 14px; flex-shrink: 0; }
.aud-gov-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px; }
.aud-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)); gap: 8px; }
.aud-stat { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; display: flex; flex-direction: column; }
.aud-stat b { font-size: 20px; font-weight: 600; color: var(--primary); line-height: 1.2; }
.aud-stat span { font-size: 11.5px; color: var(--muted-fg); }
.aud-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; flex-shrink: 0; }
.aud-bar .input { min-width: 200px; flex: 1 1 200px; max-width: 320px; padding: 6px 10px; }
.aud-bar select { padding: 6px 8px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--card); font-size: 12.5px; }
.aud-bar .btn span { display: inline; }
.aud-tamper { font-size: 12px; color: var(--muted-fg); }
.aud-note { display: flex; gap: 8px; align-items: center; padding: 8px 12px; border-radius: var(--radius-sm); font-size: 12.5px; flex-shrink: 0; }
.aud-note.ok { background: var(--ok-bg); color: var(--ok); } .aud-note.bad { background: var(--bad-bg); color: var(--bad); font-weight: 500; }
.aud-note.warn { background: var(--warn-bg); color: var(--warn); }
.aud-table { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.aud-head, .aud-row { display: grid; grid-template-columns: 84px 90px 100px minmax(160px, 1fr) minmax(260px, 330px); gap: 10px; align-items: center; padding: 0 14px; }
.aud-head { height: 34px; background: var(--muted); font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted-fg); flex-shrink: 0; }
.aud-scroll { flex: 1; min-height: 0; overflow: auto; position: relative; }
.aud-spacer { width: 1px; }
.aud-row { position: absolute; left: 0; right: 0; height: 46px; border-bottom: 1px solid var(--border); font-size: 12.5px; }
.aud-row.ok { box-shadow: inset 3px 0 var(--ok); } .aud-row.bad { background: var(--bad-bg); box-shadow: inset 3px 0 var(--bad); }
.aud-c { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aud-c.t { color: var(--muted-fg); font-size: 11.5px; }
.aud-actor { font-weight: 600; } .aud-actor.agent { color: var(--primary); }
.aud-c.hash { display: flex; align-items: center; gap: 5px; overflow: visible; }
.aud-c.hash code { font-family: var(--font-mono); font-size: 11px; padding: 1px 5px; border-radius: 4px; }
.aud-c.hash .prev { color: var(--faint); background: var(--muted); }
.aud-c.hash .cur { color: var(--secondary); background: var(--secondary-50); font-weight: 600; }
.aud-link { color: var(--faint); display: grid; }
.aud-row.bad .icon { color: var(--bad); } .aud-row.ok .icon:last-child { color: var(--ok); }
@media (max-width: 820px) {
  .aud { height: auto; padding: 12px; } .aud-table { min-height: 360px; }
  .aud-head, .aud-row { grid-template-columns: 70px 70px minmax(120px, 1fr) 260px; min-width: 560px; }
  .aud-head span:nth-child(3), .aud-c.kind { display: none; }
  .aud-table { overflow-x: auto; }
  .aud-scroll { flex: none; height: 60vh; min-width: 560px; }
}
