/* Meu Palcco — correção final dos cards mobile de Contratantes e Prestadores.
   Mantém nome e ações na mesma linha, remove checkbox e elimina espaços vazios. */
@media (max-width: 820px) {
    body.app-route-contratantes .resource-list--clients .responsive-table tbody tr,
    body.app-route-empresas .resource-list--clients .responsive-table tbody tr,
    body.app-route-contatos .resource-list--clients .responsive-table tbody tr,
    body.app-route-clientes .resource-list--clients .responsive-table tbody tr,
    body.app-route-prestadores .resource-list--service-providers .responsive-table tbody tr,
    body.app-route-prestadores .responsive-table--service-providers tbody tr {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        grid-template-rows: auto !important;
        align-items: center !important;
        column-gap: 12px !important;
        row-gap: 0 !important;
        min-height: 0 !important;
        height: auto !important;
        padding: 16px !important;
        overflow: visible !important;
    }

    body.app-route-contratantes .resource-list--clients .responsive-table tbody tr > td,
    body.app-route-empresas .resource-list--clients .responsive-table tbody tr > td,
    body.app-route-contatos .resource-list--clients .responsive-table tbody tr > td,
    body.app-route-clientes .resource-list--clients .responsive-table tbody tr > td,
    body.app-route-prestadores .resource-list--service-providers .responsive-table tbody tr > td,
    body.app-route-prestadores .responsive-table--service-providers tbody tr > td {
        min-width: 0 !important;
    }

    body.app-route-contratantes .resource-list--clients .responsive-table tbody tr > td.bulk-select-column,
    body.app-route-contratantes .resource-list--clients .responsive-table tbody tr > td[data-label="Selecionar"],
    body.app-route-empresas .resource-list--clients .responsive-table tbody tr > td.bulk-select-column,
    body.app-route-empresas .resource-list--clients .responsive-table tbody tr > td[data-label="Selecionar"],
    body.app-route-contatos .resource-list--clients .responsive-table tbody tr > td.bulk-select-column,
    body.app-route-contatos .resource-list--clients .responsive-table tbody tr > td[data-label="Selecionar"],
    body.app-route-clientes .resource-list--clients .responsive-table tbody tr > td.bulk-select-column,
    body.app-route-clientes .resource-list--clients .responsive-table tbody tr > td[data-label="Selecionar"],
    body.app-route-prestadores .resource-list--service-providers .responsive-table tbody tr > td.bulk-select-column,
    body.app-route-prestadores .resource-list--service-providers .responsive-table tbody tr > td[data-label="Selecionar"],
    body.app-route-prestadores .responsive-table--service-providers tbody tr > td.bulk-select-column,
    body.app-route-prestadores .responsive-table--service-providers tbody tr > td[data-label="Selecionar"] {
        display: none !important;
    }

    body.app-route-contratantes .resource-list--clients .responsive-table tbody tr > td.is-primary-field,
    body.app-route-empresas .resource-list--clients .responsive-table tbody tr > td.is-primary-field,
    body.app-route-contatos .resource-list--clients .responsive-table tbody tr > td.is-primary-field,
    body.app-route-clientes .resource-list--clients .responsive-table tbody tr > td.is-primary-field,
    body.app-route-prestadores .resource-list--service-providers .responsive-table tbody tr > td.is-primary-field,
    body.app-route-prestadores .responsive-table--service-providers tbody tr > td.is-primary-field {
        position: static !important;
        grid-column: 1 !important;
        grid-row: 1 !important;
        display: block !important;
        width: auto !important;
        min-width: 0 !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        align-self: center !important;
        font-size: 18px !important;
        font-weight: 750 !important;
        line-height: 1.25 !important;
        text-align: left !important;
        white-space: normal !important;
        word-break: normal !important;
        overflow-wrap: normal !important;
        hyphens: none !important;
    }

    body.app-route-contratantes .resource-list--clients .responsive-table tbody tr > td.actions,
    body.app-route-contratantes .resource-list--clients .responsive-table tbody tr > td[data-label="Ações"],
    body.app-route-empresas .resource-list--clients .responsive-table tbody tr > td.actions,
    body.app-route-contatos .resource-list--clients .responsive-table tbody tr > td.actions,
    body.app-route-clientes .resource-list--clients .responsive-table tbody tr > td.actions,
    body.app-route-prestadores .resource-list--service-providers .responsive-table tbody tr > td.actions,
    body.app-route-prestadores .resource-list--service-providers .responsive-table tbody tr > td[data-label="Ações"],
    body.app-route-prestadores .responsive-table--service-providers tbody tr > td.actions {
        position: static !important;
        inset: auto !important;
        grid-column: 2 !important;
        grid-row: 1 !important;
        display: flex !important;
        width: auto !important;
        max-width: none !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        align-self: center !important;
        align-items: center !important;
        justify-content: flex-end !important;
        flex-wrap: nowrap !important;
        gap: 8px !important;
        background: transparent !important;
        border: 0 !important;
        transform: none !important;
    }

    body.app-route-contratantes .resource-list--clients .responsive-table tbody tr > td.actions .icon-action,
    body.app-route-prestadores .resource-list--service-providers .responsive-table tbody tr > td.actions .icon-action,
    body.app-route-prestadores .responsive-table--service-providers tbody tr > td.actions .icon-action {
        flex: 0 0 46px !important;
        width: 46px !important;
        min-width: 46px !important;
        height: 46px !important;
        min-height: 46px !important;
        margin: 0 !important;
    }

    body.app-route-contratantes .resource-list--clients .responsive-table tbody tr > td.actions form,
    body.app-route-prestadores .resource-list--service-providers .responsive-table tbody tr > td.actions form,
    body.app-route-prestadores .responsive-table--service-providers tbody tr > td.actions form {
        display: contents !important;
        margin: 0 !important;
    }

    /* A toolbar externa permanece dentro da largura útil e totalmente à direita. */
    body.app-route-contratantes .clients-list-toolbar,
    body.app-route-prestadores .service-providers-list-toolbar {
        padding-inline: 0 !important;
        justify-content: flex-end !important;
    }

    body.app-route-contratantes .clients-list-toolbar > .heading-actions,
    body.app-route-prestadores .service-providers-list-toolbar > .heading-actions {
        width: fit-content !important;
        margin-left: auto !important;
        margin-right: 0 !important;
        justify-content: flex-end !important;
    }
}

@media (max-width: 430px) {
    body.app-route-prestadores .resource-list--service-providers .responsive-table tbody tr,
    body.app-route-prestadores .responsive-table--service-providers tbody tr {
        column-gap: 8px !important;
        padding: 14px !important;
    }

    body.app-route-prestadores .resource-list--service-providers .responsive-table tbody tr > td.is-primary-field,
    body.app-route-prestadores .responsive-table--service-providers tbody tr > td.is-primary-field {
        font-size: 17px !important;
    }

    body.app-route-prestadores .resource-list--service-providers .responsive-table tbody tr > td.actions,
    body.app-route-prestadores .responsive-table--service-providers tbody tr > td.actions {
        gap: 6px !important;
    }

    body.app-route-prestadores .resource-list--service-providers .responsive-table tbody tr > td.actions .icon-action,
    body.app-route-prestadores .responsive-table--service-providers tbody tr > td.actions .icon-action {
        flex-basis: 42px !important;
        width: 42px !important;
        min-width: 42px !important;
        height: 42px !important;
        min-height: 42px !important;
    }
}
