/* Lumii Layout Polish V126
   Camada global para corrigir quebras de palavra, tabelas e botoes sem alterar regras de negocio. */

:root {
    --lumii-control-radius: .7rem;
    --lumii-table-border: rgba(15, 23, 42, .10);
    --lumii-table-muted: #5f6f7a;
}

html,
body {
    text-rendering: optimizeLegibility;
}

body,
.app-content,
.card,
.neo-card,
.bi-card,
.question-card,
.hero-card,
.ai-card,
.lumii-card,
.alert,
.badge,
.table,
.table th,
.table td {
    word-break: normal !important;
    overflow-wrap: break-word !important;
    hyphens: none !important;
}

.btn,
button.btn,
a.btn,
.top-action-btn,
.pwa-install-actions button,
.mobile-bottom-link,
.nav-link-app,
.badge,
.status-badge,
.nav-badge,
.user-module-pill {
    white-space: nowrap;
    word-break: keep-all !important;
    overflow-wrap: normal !important;
}

.btn,
a.btn,
button.btn,
.top-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .42rem;
    line-height: 1.15;
    min-width: max-content;
}

.btn-sm {
    min-height: 38px;
    padding-inline: .65rem;
}

.btn-group,
.page-actions,
.toolbar-actions,
.action-row,
.lumii-action-row,
.table-actions,
.crud-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .45rem;
}

.table-responsive {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    table-layout: auto;
}

.table th,
.table td {
    padding: .72rem .75rem;
    vertical-align: middle;
}

.table thead th,
.table tr:first-child > th {
    color: #17212b;
    font-weight: 850;
    border-bottom-color: var(--lumii-table-border);
}

.table tbody td,
.table tr > td {
    border-color: var(--lumii-table-border);
}

.table td:last-child,
.table th:last-child {
    width: 1%;
    min-width: 118px;
    white-space: nowrap;
    text-align: right;
}

.table td:last-child .btn,
.table td:last-child a.btn,
.table td:last-child button.btn {
    margin: .12rem 0 .12rem .25rem;
}

.table td:nth-last-child(2) .badge,
.table td:nth-last-child(2) {
    white-space: nowrap;
}

.table .badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: .28rem .55rem;
}

.table td:nth-child(1),
.table th:nth-child(1) {
    min-width: 230px;
}

.table td:nth-child(3),
.table th:nth-child(3),
.table td:nth-child(4),
.table th:nth-child(4) {
    min-width: 190px;
}

.table td .text-muted,
.table td small {
    color: var(--lumii-table-muted) !important;
}

.card > .table-responsive:first-child,
.card .table-responsive {
    border-radius: .85rem;
}

.card.p-3 > .table-responsive,
.card.p-4 > .table-responsive {
    margin-inline: 0;
}

.form-control,
.form-select {
    min-width: 0;
}

.row,
.d-flex,
.input-group,
.top-actions-strip,
.lumii-command-bar,
.command-context,
.top-brand-pill {
    min-width: 0;
}

.top-actions-strip {
    justify-content: flex-end;
}

.top-action-btn {
    flex: 0 0 auto;
    min-height: 42px;
}

.lumii-command-bar {
    align-items: center;
}

.top-brand-pill {
    flex: 0 0 auto;
}

.nav-text,
.user-name,
.command-title,
.command-subtitle {
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-text,
.user-name {
    white-space: nowrap;
}

@media (min-width: 992px) {
    .app-content {
        padding-inline: 1.4rem;
    }

    .card,
    .neo-card,
    .bi-card,
    .question-card,
    .hero-card,
    .ai-card,
    .lumii-card {
        overflow: visible;
    }
}

@media (max-width: 1199.98px) {
    .top-actions-strip {
        justify-content: flex-start;
    }

    .lumii-command-bar {
        align-items: flex-start !important;
    }
}

@media (max-width: 991.98px) {
    .btn,
    a.btn,
    button.btn,
    .top-action-btn {
        min-width: 0;
    }

    .table {
        min-width: 760px;
    }

    .table.table-sm {
        min-width: 640px;
    }
}

@media (max-width: 767.98px) {
    .btn,
    a.btn,
    button.btn {
        white-space: normal;
        overflow-wrap: break-word !important;
    }

    .table td:last-child .btn,
    .table td:last-child a.btn,
    .table td:last-child button.btn {
        white-space: nowrap;
    }

    .top-action-btn,
    .pwa-install-actions button,
    .mobile-bottom-link,
    .badge {
        white-space: nowrap;
    }

    .table th,
    .table td {
        padding: .68rem .7rem;
    }
}

@media (max-width: 575.98px) {
    .page-actions,
    .toolbar-actions,
    .action-row,
    .lumii-action-row {
        align-items: stretch;
    }

    .page-actions > .btn,
    .toolbar-actions > .btn,
    .action-row > .btn,
    .lumii-action-row > .btn {
        flex: 1 1 160px;
    }
}
