/* retoor <retoor@molodetz.nl> */

.audit-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: flex-end;
    margin-bottom: 1.25rem;
    padding: 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.audit-filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.audit-filter-field label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.audit-filter-field select,
.audit-filter-field input {
    padding: 0.375rem 0.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-card-hover);
    color: var(--text-primary);
    font-size: 0.8125rem;
}

.audit-filter-actions {
    display: flex;
    gap: 0.375rem;
    align-items: center;
}

.audit-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 600;
    background: var(--bg-card-hover);
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.audit-badge-origin {
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.audit-badge-devii {
    margin-left: 0.25rem;
    background: rgba(var(--accent-rgb), 0.15);
    color: var(--accent);
}

.audit-result {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.audit-result-success {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.audit-result-failure {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.audit-result-denied {
    background: rgba(234, 179, 8, 0.15);
    color: var(--warning);
}

.audit-actor-ip {
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-size: 0.75rem;
}

.audit-detail-grid {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.5rem 1rem;
    margin-bottom: 1.5rem;
}

.audit-detail-grid dt {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding-top: 0.125rem;
}

.audit-detail-grid dd {
    color: var(--text-primary);
    font-size: 0.875rem;
    word-break: break-word;
}

.audit-meta pre {
    background: var(--bg-card-hover);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem;
    overflow-x: auto;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-break: break-word;
}

.audit-section-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 1.5rem 0 0.75rem;
    color: var(--text-primary);
}

.audit-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.audit-value-change {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
}

.audit-value-old {
    color: var(--danger);
    text-decoration: line-through;
}

.audit-value-new {
    color: var(--success);
}

@media (max-width: 768px) {
    .audit-detail-grid {
        grid-template-columns: 1fr;
        gap: 0.125rem 0;
    }

    .audit-detail-grid dd {
        margin-bottom: 0.5rem;
    }
}
