.audit-logs-page {
    display: grid;
    gap: 18px;
}

.audit-logs-page .admin-page__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.audit-logs-page .admin-page__head h1 {
    margin: 0 0 6px;
    color: #0f172a;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.audit-logs-page .admin-page__head p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.65;
}

.audit-logs-page__meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.audit-logs-stat {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid #dbe4ee;
    border-radius: 999px;
    background: #f8fafc;
    color: #0f172a;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.audit-logs-toolbar-card {
    padding: 20px 22px;
}

.audit-logs-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.audit-logs-toolbar__text {
    display: grid;
    gap: 6px;
}

.audit-logs-toolbar__text h2 {
    margin: 0;
    color: #0f172a;
    font-size: 18px;
    line-height: 1.3;
    font-weight: 800;
}

.audit-logs-toolbar__text p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.65;
}

.audit-logs-toolbar__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.audit-logs-inline-form {
    margin: 0;
}

.audit-logs-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid #dbe4ee;
    border-radius: 12px;
    background: #ffffff;
    color: #0f172a;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.audit-logs-action-button:hover {
    transform: translateY(-1px);
}

.audit-logs-action-button:active {
    transform: translateY(0);
}

.audit-logs-action-button--ghost {
    background: #f8fafc;
    border-color: #dbe4ee;
    color: #334155;
}

.audit-logs-action-button--ghost:hover {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.audit-logs-action-button--danger,
.audit-logs-action-button--delete {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #be123c;
}

.audit-logs-action-button--danger:hover,
.audit-logs-action-button--delete:hover {
    background: #ffe4e6;
    border-color: #fda4af;
    color: #9f1239;
}

.audit-logs-empty-state {
    padding: 28px 18px;
    text-align: center;
}

.audit-logs-empty-state p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.7;
}

.audit-logs-bulk-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.audit-logs-bulk-bar__text {
    color: #475569;
    font-size: 14px;
    line-height: 1.65;
    font-weight: 600;
}

.audit-logs-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #ffffff;
}

.audit-logs-table {
    width: 100%;
    min-width: 1180px;
    border-collapse: collapse;
}

.audit-logs-table thead th {
    padding: 14px 14px;
    background: #f8fafc;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
    text-align: left;
    white-space: nowrap;
    border-bottom: 1px solid #e2e8f0;
}

.audit-logs-table tbody td {
    padding: 14px 14px;
    color: #475569;
    font-size: 14px;
    line-height: 1.6;
    border-bottom: 1px solid #edf2f7;
    vertical-align: top;
}

.audit-logs-table tbody tr:nth-child(even) {
    background: #fcfdff;
}

.audit-logs-table tbody tr:hover {
    background: #f8fbff;
}

.audit-logs-table tbody tr:last-child td {
    border-bottom: 0;
}

.audit-logs-table__select {
    width: 52px;
    text-align: center;
}

.audit-logs-checkbox {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #2563eb;
    cursor: pointer;
}

.audit-logs-id-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.audit-logs-actor {
    color: #0f172a;
    font-weight: 700;
    word-break: break-word;
}

.audit-logs-action-badge,
.audit-logs-entity-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    max-width: 100%;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #334155;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.audit-logs-action-badge--success {
    background: #ecfdf5;
    border-color: #bbf7d0;
    color: #166534;
}

.audit-logs-action-badge--warning {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.audit-logs-action-badge--danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.audit-logs-action-badge--neutral {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #334155;
}

.audit-logs-payload-cell {
    min-width: 340px;
    max-width: 420px;
}

.audit-logs-payload {
    display: block;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
    overflow: hidden;
}

.audit-logs-payload summary {
    padding: 12px 14px;
    color: #334155;
    font-size: 12px;
    line-height: 1.6;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
    word-break: break-word;
}

.audit-logs-payload summary::-webkit-details-marker {
    display: none;
}

.audit-logs-payload summary::after {
    content: "+";
    float: right;
    color: #64748b;
    font-size: 14px;
    font-weight: 800;
    margin-left: 10px;
}

.audit-logs-payload[open] summary::after {
    content: "−";
}

.audit-logs-payload pre {
    margin: 0;
    padding: 0 14px 14px;
    overflow-x: auto;
    color: #0f172a;
    font-size: 12px;
    line-height: 1.7;
}

.audit-logs-payload code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    white-space: pre-wrap;
    word-break: break-word;
}

.audit-logs-date {
    color: #334155;
    font-weight: 600;
    white-space: nowrap;
}

.audit-logs-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
}

.audit-logs-delete-form {
    margin: 0;
}

html[dir="rtl"] .audit-logs-page .admin-page__head,
body.is-rtl .audit-logs-page .admin-page__head,
html[dir="rtl"] .audit-logs-toolbar,
body.is-rtl .audit-logs-toolbar,
html[dir="rtl"] .audit-logs-bulk-bar,
body.is-rtl .audit-logs-bulk-bar {
    direction: rtl;
}

html[dir="rtl"] .audit-logs-table thead th,
html[dir="rtl"] .audit-logs-table tbody td,
body.is-rtl .audit-logs-table thead th,
body.is-rtl .audit-logs-table tbody td {
    text-align: right;
}

html[dir="rtl"] .audit-logs-actions,
body.is-rtl .audit-logs-actions {
    justify-content: flex-end;
}

@media (max-width: 1200px) {
    .audit-logs-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .audit-logs-toolbar__actions {
        justify-content: flex-start;
    }

    .audit-logs-table {
        min-width: 1080px;
    }
}

@media (max-width: 820px) {
    .audit-logs-page .admin-page__head {
        flex-direction: column;
        align-items: stretch;
    }

    .audit-logs-bulk-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .audit-logs-bulk-bar .audit-logs-inline-form {
        width: 100%;
    }

    .audit-logs-bulk-bar .audit-logs-action-button {
        width: 100%;
    }

    .audit-logs-toolbar__actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .audit-logs-toolbar__actions .audit-logs-inline-form {
        width: 100%;
    }

    .audit-logs-toolbar__actions .audit-logs-action-button {
        width: 100%;
    }
}

@media (max-width: 560px) {
    .audit-logs-page .admin-page__head h1 {
        font-size: 24px;
    }

    .audit-logs-toolbar-card {
        padding: 16px;
    }

    .audit-logs-toolbar__actions {
        grid-template-columns: 1fr;
    }

    .audit-logs-table {
        min-width: 960px;
    }

    .audit-logs-payload-cell {
        min-width: 280px;
    }
}