/* ===== LOTE 11: USUÁRIOS, PERFIS E AUDITORIA ===== */

.user-management-page,
.audit-page {
    width: 100%;
}

.user-toolbar-left {
    flex-wrap: wrap;
}

.management-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.user-table {
    min-width: 1040px;
}

.user-status-blocked {
    background: #fff7ed;
    color: #c2410c;
}

.self-badge {
    display: inline-flex;
    margin-left: 6px;
    padding: 2px 6px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 8px;
    font-weight: 850;
    vertical-align: middle;
}

.row-action:disabled {
    opacity: .42;
    cursor: not-allowed;
}

.management-note {
    margin-top: 16px;
    padding: 11px 13px;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    background: #eff6ff;
    color: #475569;
    font-size: 11px;
    line-height: 1.5;
}

.profile-modal {
    width: min(920px, 100%);
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.profile-card {
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: #fff;
}

.profile-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.profile-card-head strong {
    display: block;
    font-size: 13px;
}

.profile-card-head div > span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.4;
}

.permission-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 13px;
}

.permission-list > span {
    padding: 5px 7px;
    border-radius: 7px;
    background: #f1f5f9;
    color: #475569;
    font-size: 9px;
    font-weight: 750;
}

.permission-list em {
    color: var(--muted);
    font-size: 10px;
}

.audit-info-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
}

.audit-info-card strong {
    display: block;
    font-size: 15px;
}

.audit-info-card p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.audit-table {
    min-width: 1120px;
}

.audit-module {
    display: inline-flex;
    padding: 5px 8px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 9px;
    font-weight: 850;
}

.audit-description {
    min-width: 320px;
    max-width: 520px;
    color: #475569;
    line-height: 1.45;
}

.audit-entity-modal {
    width: min(650px, 100%);
}

@media (max-width: 820px) {
    .management-actions {
        width: 100%;
        justify-content: stretch;
    }

    .management-actions .action-button {
        flex: 1;
    }

    .profile-grid {
        grid-template-columns: 1fr;
    }

    .audit-toolbar {
        align-items: stretch;
        flex-direction: column;
    }
}
