/* Denetim kaydı: Sistem → Denetim kaydı sayfası ve kayıt kartlarındaki "Geçmiş". */
.audit-toolbar { flex-wrap: wrap; }
.audit-toolbar .filter-grid select { min-width: 150px; }
.audit-list { padding: 4px 18px 8px; }
.audit-footer { display: flex; justify-content: center; padding: 6px 0 18px; }
.audit-footer .button.hidden { display: none; }

.audit-day { position: sticky; top: 0; z-index: 1; margin: 14px 0 4px; padding: 6px 0; background: #fff; color: #8a8ea3; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; border-bottom: 1px solid var(--line); }
.audit-item { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid #f3f4f8; }
.audit-item:last-child { border-bottom: 0; }
.audit-avatar { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-size: 11px; font-weight: 700; color: #5c6075; background: #eef0f6; }
.audit-avatar.tone-green { color: #1f8a5f; background: #e7f6ef; }
.audit-avatar.tone-red { color: #c2410c; background: #fdeee8; }
.audit-avatar.tone-blue { color: #3756c9; background: #eaf0fd; }
.audit-avatar.tone-purple { color: var(--purple); background: #efedfc; }
.audit-body { flex: 1; min-width: 0; }
.audit-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; line-height: 1.5; }
.audit-actor { color: #2a2d3d; }
.audit-action { font-weight: 600; color: #5c6075; }
.audit-action.tone-green { color: #1f8a5f; }
.audit-action.tone-red { color: #c2410c; }
.audit-action.tone-blue { color: #3756c9; }
.audit-action.tone-purple { color: var(--purple); }
.audit-type { padding: 1px 7px; border-radius: 10px; background: #f3f4f8; color: #6b6f84; font-size: 11px; font-weight: 600; }
.audit-entity { padding: 0; border: 0; background: none; color: var(--purple); font: inherit; font-weight: 600; cursor: pointer; text-align: left; }
.audit-entity:hover { text-decoration: underline; }
.audit-entity-text { font-weight: 600; color: #2a2d3d; }
.audit-via { padding: 1px 7px; border-radius: 10px; font-size: 10px; font-weight: 700; color: #6b6f84; background: #f3f4f8; }
.audit-via-ai { color: var(--purple); background: #efedfc; }
.audit-via-extension { color: #0a66c2; background: #e8f1fb; }
.audit-via-import { color: #a16207; background: #fdf6e3; }
.audit-line time { margin-left: auto; color: #999cad; font-size: 11px; white-space: nowrap; }
.audit-summary { margin-top: 2px; color: #5c6075; font-size: 12px; }
.audit-quote { margin-top: 4px; padding: 6px 10px; border-left: 3px solid #e3e1fa; background: #faf9ff; color: #5c6075; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }

.audit-diff { width: 100%; margin-top: 6px; border-collapse: collapse; font-size: 12px; }
.audit-diff th { width: 150px; padding: 4px 10px 4px 0; color: #8a8ea3; font-weight: 600; text-align: left; vertical-align: top; white-space: nowrap; }
.audit-diff td { padding: 4px 0; vertical-align: top; color: #2a2d3d; overflow-wrap: anywhere; }
.audit-diff tr + tr th, .audit-diff tr + tr td { border-top: 1px dashed #f0f1f6; }
.audit-diff .audit-old { color: #b45309; text-decoration: line-through; text-decoration-color: rgba(180, 83, 9, .45); width: 40%; }
.audit-diff .audit-new { color: #1f7a54; font-weight: 600; width: 40%; }
.audit-diff .audit-arrow { width: 24px; color: #b4b7c6; text-align: center; }
.audit-diff code { font-size: 11px; white-space: pre-wrap; }
.audit-empty { color: #b4b7c6; text-decoration: none; }
.audit-snapshot { margin-top: 4px; font-size: 12px; }
.audit-snapshot summary { color: #8a8ea3; cursor: pointer; }
.audit-none { margin: 10px 0; color: #999cad; font-size: 12px; }
.audit-more { margin: 10px auto 4px; display: block; }

/* Kişi kartı "Geçmiş" sekmesi ve firma / fırsat penceresindeki katlanabilir bölüm. */
#cdHistoryPane .audit-record { max-height: 60vh; overflow-y: auto; padding-right: 4px; }
.audit-inline { margin: 12px 0 4px; border: 1px solid var(--line); border-radius: 9px; padding: 0 12px; }
.audit-inline.hidden { display: none; }
.audit-inline > summary { padding: 10px 0; color: #5c6075; font-size: 12px; font-weight: 700; cursor: pointer; }
.audit-inline[open] > summary { border-bottom: 1px solid var(--line); }
.audit-inline .audit-record { max-height: 320px; overflow-y: auto; padding-bottom: 8px; }
.audit-record .audit-day { margin-top: 8px; }

@media (max-width: 700px) {
  .audit-diff th { width: auto; white-space: normal; }
  .audit-line time { margin-left: 0; }
}
