.audit-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.audit-modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 720px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.audit-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.audit-modal-header h3 {
    margin: 0;
    font-size: 1.125rem;
    color: #1e293b;
}

.btn-close {
    background: none;
    border: 0;
    font-size: 1.5rem;
    color: #64748b;
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.btn-close:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.audit-modal-body {
    padding: 1rem 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.audit-filters {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.audit-filters label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: #475569;
}

.audit-filters .form-input {
    padding: 0.375rem 0.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.875rem;
}

.audit-loading,
.audit-empty {
    text-align: center;
    color: #64748b;
    padding: 2rem;
}

.audit-timeline {
    list-style: none;
    padding: 0;
    margin: 0;
}

.audit-event {
    border-left: 3px solid #e2e8f0;
    padding: 0.75rem 0 0.75rem 1rem;
    margin-bottom: 0.5rem;
    position: relative;
}

.audit-event::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 1rem;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #cbd5e1;
}

.audit-event-header {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 0.25rem;
}

.audit-action {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    letter-spacing: 0.05em;
}

.action-create {
    background: #dcfce7;
    color: #166534;
}

.action-update {
    background: #dbeafe;
    color: #1e40af;
}

.action-delete {
    background: #fee2e2;
    color: #991b1b;
}

.audit-date {
    color: #64748b;
    font-size: 0.875rem;
}

.audit-user {
    color: #475569;
    font-size: 0.875rem;
    font-weight: 500;
}

.audit-event-body {
    margin-top: 0.5rem;
}

.audit-object {
    color: #334155;
    margin: 0 0 0.5rem 0;
    font-size: 0.875rem;
}

.audit-event details {
    margin: 0.5rem 0;
}

.audit-event summary {
    cursor: pointer;
    color: #2563eb;
    font-size: 0.875rem;
    user-select: none;
}

.audit-diff {
    margin-top: 0.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.audit-diff pre {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.5rem;
    font-size: 0.75rem;
    max-height: 200px;
    overflow: auto;
    margin: 0.25rem 0 0 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.audit-notes {
    color: #64748b;
    font-size: 0.8125rem;
    font-style: italic;
    margin: 0.5rem 0 0 0;
}

[x-cloak] {
    display: none !important;
}
