/* ============================================================================
   Cadastro — páginas de lista, global e modular.

   Estas telas viviam em folhas .razor.css (CSS isolation) que estão INERTES:
   o bundle FrontendApp.styles.css deixou de ser referenciado em App.razor no
   commit d14ff8e1, então nenhum .razor.css do projeto é aplicado. As páginas
   ficavam sem estilo nenhum.

   Mesmo tratamento já dado a overview.css e comercial.css: o CSS foi portado
   verbatim para cá para que realmente carregue. Cada página é escopada por uma
   classe própria (.economic-groups-page / .companies-list-page) porque as duas
   compartilham 47 blocos de seletor com 29 divergências entre si — sem escopo,
   uma sobrescreveria a outra. A classe fica nos dois elementos raiz de cada
   página (.list-wrapper e .modal-overlay, que são irmãos, não aninhados).

   As animações ganharam prefixo por origem (eg- / cl- / clcnpj-) porque mais de
   uma folha definia "dropdownFadeIn" e, em escopo global, os nomes colidiriam.

   Section A:   Grupos Econômicos — listagem (/EconomicGroups/List)
   Section A.1: Reconciliação da listagem com o FilterToggle do design system
   Section B:   Empresas — listagem (/CompaniesList/List)
   Section C:   Formulários e modais dos dois módulos
   ============================================================================ */

/* ---------------------------------------------------------------------------
   Section A — Grupos Econômicos
   --------------------------------------------------------------------------- */
.list-wrapper.economic-groups-page {
    padding: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
.economic-groups-page .list-header {
    background-color: #0156A7;
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 16px 24px;
    border-radius: 8px 8px 0 0;
}

/* Toolbar */
.economic-groups-page .list-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #fff;
    border-left: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
}

/* Table */
.economic-groups-page .table-wrapper {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-top: none;
    overflow-x: auto;
    overflow-y: visible;
    padding-bottom: 80px;
}

.economic-groups-page .data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.economic-groups-page .data-table thead tr {
    border-bottom: 2px solid #e2e8f0;
}

.economic-groups-page .data-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #2d3748;
    white-space: nowrap;
}

.economic-groups-page .data-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
}

.economic-groups-page .data-table th.sortable:hover {
    background: #f7fafc;
}

.economic-groups-page .data-table td {
    padding: 12px 16px;
    color: #4a5568;
    border-bottom: 1px solid #f0f4f8;
    white-space: nowrap;
}

.economic-groups-page .data-table tbody tr:hover {
    background: #f7fafc;
}

.economic-groups-page .empty-row {
    text-align: center;
    color: #a0aec0;
    padding: 40px 0 !important;
}

.economic-groups-page .col-actions {
    text-align: center;
    width: 100px;
}

/* ── Status Badge (unificado) ── */
.economic-groups-page .status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: filter 0.15s ease;
    white-space: nowrap;
}

.economic-groups-page .status-badge:hover {
    filter: brightness(0.93);
}

.economic-groups-page .status-badge::before,
.economic-groups-page .status-badge::after {
    content: none !important;
    display: none !important;
}

.economic-groups-page .status-active {
    background-color: #c6f6d5;
    color: #276749;
}

.economic-groups-page .status-prospection {
    background-color: #e2e8f0;
    color: #4a5568;
}

.economic-groups-page .status-inactive {
    background-color: #fed7d7;
    color: #9b2c2c;
}

/* ── Status Dropdown ── */
.economic-groups-page .td-status {
    position: relative;
}

.economic-groups-page .status-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.economic-groups-page .status-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 200;
    min-width: 140px;
    overflow: hidden;
    animation: eg-dropdownFadeIn 0.15s ease;
}

@keyframes eg-dropdownFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.economic-groups-page .status-dropdown-item {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    transition: filter 0.12s ease;
}

.economic-groups-page .status-dropdown-item:hover {
    filter: brightness(0.90);
}

.economic-groups-page .status-dropdown-item.status-active {
    background-color: #c6f6d5;
    color: #276749;
}

.economic-groups-page .status-dropdown-item.status-prospection {
    background-color: #e2e8f0;
    color: #4a5568;
}

/* Action buttons */
.economic-groups-page .btn-action {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 4px 6px;
    border-radius: 4px;
    transition: background 0.15s;
    margin: 0 2px;
}

.economic-groups-page .btn-edit {
    color: #0156A7;
}

.economic-groups-page .btn-edit:hover {
    background: #ebf4ff;
}

.economic-groups-page .btn-delete {
    color: #e53e3e;
}

.economic-groups-page .btn-delete:hover {
    background: #fff5f5;
}

/* Pagination */
.economic-groups-page .pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    padding: 20px 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 8px 8px;
}

.economic-groups-page .page-btn {
    min-width: 36px;
    height: 36px;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    color: #4a5568;
    transition: all 0.15s;
    padding: 0 8px;
}

.economic-groups-page .page-btn:hover:not(:disabled) {
    background: #ebf4ff;
    border-color: #0156A7;
    color: #0156A7;
}

.economic-groups-page .page-btn.active {
    background-color: #0156A7;
    color: white;
    border-color: #0156A7;
    font-weight: 600;
}

.economic-groups-page .page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.economic-groups-page .page-ellipsis {
    padding: 0 4px;
    color: #a0aec0;
}

/* Modal overlay */
.modal-overlay.economic-groups-page {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.economic-groups-page .modal-form-container {
    width: 100%;
    max-width: 720px;
}

/* Delete confirm modal */
.economic-groups-page .modal-confirm {
    background: #fff;
    border-radius: 8px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    overflow: hidden;
}

.economic-groups-page .modal-confirm-header {
    padding: 16px 24px;
    font-size: 1.05rem;
    font-weight: 600;
    color: #2d3748;
    border-bottom: 1px solid #e2e8f0;
}

.economic-groups-page .modal-confirm-body {
    padding: 24px;
    color: #4a5568;
    font-size: 0.95rem;
    line-height: 1.6;
}

.economic-groups-page .confirm-note {
    font-size: 0.82rem;
    color: #718096;
}

.economic-groups-page .modal-confirm-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
}

.economic-groups-page .btn-cancel {
    background-color: #718096;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 9px 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
}

.economic-groups-page .btn-cancel:hover {
    background-color: #4a5568;
}

.economic-groups-page .btn-delete-confirm {
    background-color: #e53e3e;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 9px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.economic-groups-page .btn-delete-confirm:hover {
    background-color: #c53030;
}

.economic-groups-page .status-arrow {
    flex-shrink: 0;
    margin-left: 4px;
    width: 10px;
    height: 10px;
    opacity: 0.8;
}

/* ---------------------------------------------------------------------------
   Section A.1 — Grupos Econômicos: reconciliação com o FilterToggle

   O CSS acima monta um card contínuo a partir de irmãos empilhados:
   .list-header (topo azul, cantos arredondados) → .list-toolbar (faixa branca
   com bordas laterais) → .table-wrapper (que por isso tem border-top: none).

   O PR #845 (db1121dd) trocou a <div class="list-toolbar"> pelo componente
   <FilterToggle> do design system, mas o CSS ficou como estava — descasamento
   que passou despercebido porque a folha estava inerte. Sem a faixa, o botão
   encosta no header azul e a tabela fica sem borda superior.

   Aqui a .ds-filter-bar do FilterToggle recebe o papel visual da antiga
   .list-toolbar, apenas dentro desta página (escopo .economic-groups-page),
   sem alterar o design system para o resto da aplicação.
   --------------------------------------------------------------------------- */

.economic-groups-page .ds-filter-bar {
    padding: 12px 16px;
    background: #fff;
    border-left: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    margin-bottom: 0;
}

/* ---------------------------------------------------------------------------
   Section B — Empresas
   --------------------------------------------------------------------------- */
.list-wrapper.companies-list-page {
    padding: 32px 40px;
    max-width: 1440px;
    margin: 0 auto;
}

.companies-list-page .list-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: visible;
}

.companies-list-page .list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: linear-gradient(135deg, #0156A7 0%, #01458A 100%);
    color: white;
    padding: 18px 24px;
    border-radius: 10px 10px 0 0;
}

.companies-list-page .list-header-title {
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.companies-list-page .list-header-meta {
    font-size: 0.82rem;
    opacity: 0.9;
    font-weight: 500;
}

.companies-list-page .list-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 20px;
    border-bottom: 1px solid #edf2f7;
    background: #fafbfc;
}

.companies-list-page .toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.companies-list-page .toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.companies-list-page .btn-add {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #0156A7;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}

.companies-list-page .btn-add:hover {
    background-color: #01458A;
    box-shadow: 0 2px 8px rgba(1, 86, 167, 0.25);
}

.companies-list-page .btn-add-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.companies-list-page .btn-icon {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    width: 38px;
    height: 38px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #4a5568;
    transition: background 0.15s, border-color 0.15s;
}

.companies-list-page .btn-icon:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
}

.companies-list-page .btn-icon-filter {
    background-color: #0156A7;
    color: white;
    border-color: #0156A7;
}

.companies-list-page .btn-icon-filter:hover {
    background-color: #01458A;
    border-color: #01458A;
}

.companies-list-page .btn-icon-filter.is-active {
    box-shadow: 0 0 0 3px rgba(1, 86, 167, 0.2);
}

.companies-list-page .filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 20px;
    border-bottom: 1px solid #edf2f7;
    background: #fff;
}

.companies-list-page .filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    background: #ebf8ff;
    border: 1px solid #bee3f8;
    color: #2c5282;
    font-size: 0.78rem;
    font-weight: 500;
}

.companies-list-page .filter-chip-clear {
    background: transparent;
    border: none;
    color: #0156A7;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    padding: 5px 8px;
    border-radius: 4px;
}

.companies-list-page .filter-chip-clear:hover {
    background: #ebf8ff;
}

.companies-list-page .list-alert {
    margin: 0 20px 16px;
    padding: 12px 16px;
    border-radius: 6px;
    background: #fff5f5;
    border: 1px solid #feb2b2;
    color: #c53030;
    font-size: 0.875rem;
}

.companies-list-page .table-scroll {
    overflow-x: auto;
    overflow-y: visible;
    padding-bottom: 80px;
}

.companies-list-page .data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.companies-list-page .data-table thead tr {
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
}

.companies-list-page .data-table th {
    padding: 13px 18px;
    text-align: left;
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.companies-list-page .data-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: background 0.15s, color 0.15s;
}

.companies-list-page .data-table th.sortable:hover {
    background: #edf2f7;
    color: #0156A7;
}

.companies-list-page .sort-indicator {
    margin-left: 4px;
    font-size: 0.75rem;
    opacity: 0.7;
}

.companies-list-page .data-table td {
    padding: 14px 18px;
    color: #475569;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.companies-list-page .data-table tbody tr.data-row {
    transition: background 0.12s;
}

.companies-list-page .data-table tbody tr.data-row:hover {
    background: #f8fafc;
}

.companies-list-page .cell-primary {
    font-weight: 600;
    color: #1e293b;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.companies-list-page .cell-secondary {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #64748b;
}

.companies-list-page .cell-mono {
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-variant-numeric: tabular-nums;
    color: #64748b;
    font-size: 0.84rem;
}

.companies-list-page .loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 56px 24px;
    color: #64748b;
}

.companies-list-page .loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e2e8f0;
    border-top-color: #0156A7;
    border-radius: 50%;
    animation: cl-list-spin 0.7s linear infinite;
}

@keyframes cl-list-spin {
    to { transform: rotate(360deg); }
}

.companies-list-page .empty-state {
    text-align: center;
    padding: 56px 24px !important;
    color: #94a3b8;
}

.companies-list-page .empty-state-title {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 4px;
}

.companies-list-page .col-actions {
    text-align: right;
    width: 110px;
    white-space: nowrap;
}

.companies-list-page .td-status {
    position: relative;
    min-width: 160px;
}

.companies-list-page .status-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.companies-list-page .status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: filter 0.15s ease;
    white-space: nowrap;
}

.companies-list-page .status-badge:hover {
    filter: brightness(0.93);
}

.companies-list-page .status-badge::before,
.companies-list-page .status-badge::after {
    content: none !important;
    display: none !important;
}

.companies-list-page .status-active {
    background-color: #c6f6d5;
    color: #276749;
}

.companies-list-page .status-prospection {
    background-color: #e2e8f0;
    color: #4a5568;
}

.companies-list-page .status-inactive {
    background-color: #fed7d7;
    color: #9b2c2c;
}

.companies-list-page .status-credit {
    background-color: #fefcbf;
    color: #744210;
}

.companies-list-page .status-homologation {
    background-color: #bee3f8;
    color: #2c5282;
}

.companies-list-page .status-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 200;
    min-width: 180px;
    overflow: hidden;
    animation: cl-dropdownFadeIn 0.15s ease;
}

@keyframes cl-dropdownFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.companies-list-page .status-dropdown-item {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    transition: filter 0.12s ease;
}

.companies-list-page .status-dropdown-item:hover {
    filter: brightness(0.90);
}

.companies-list-page .status-dropdown-item.status-active {
    background-color: #c6f6d5;
    color: #276749;
}

.companies-list-page .status-dropdown-item.status-prospection {
    background-color: #e2e8f0;
    color: #4a5568;
}

.companies-list-page .status-dropdown-item.status-inactive {
    background-color: #fed7d7;
    color: #9b2c2c;
}

.companies-list-page .status-dropdown-item.status-credit {
    background-color: #fefcbf;
    color: #744210;
}

.companies-list-page .status-dropdown-item.status-homologation {
    background-color: #bee3f8;
    color: #2c5282;
}

.companies-list-page .status-arrow {
    flex-shrink: 0;
    margin-left: 4px;
    width: 10px;
    height: 10px;
    opacity: 0.8;
}

.companies-list-page .actions-group {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.companies-list-page .btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    border-radius: 4px;
    transition: background 0.15s;
    margin: 0 2px;
}

.companies-list-page .btn-edit {
    color: #0156A7;
}

.companies-list-page .btn-edit:hover {
    background: #ebf4ff;
}

.companies-list-page .btn-delete {
    color: #e53e3e;
}

.companies-list-page .btn-delete:hover {
    background: #fff5f5;
}

.companies-list-page .pagination-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-top: 1px solid #edf2f7;
    background: #fafbfc;
    border-radius: 0 0 10px 10px;
}

.companies-list-page .pagination-info {
    font-size: 0.82rem;
    color: #64748b;
}

.companies-list-page .pagination {
    display: flex;
    align-items: center;
    gap: 4px;
}

.companies-list-page .page-btn {
    min-width: 36px;
    height: 36px;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    color: #475569;
    transition: all 0.15s;
    padding: 0 10px;
}

.companies-list-page .page-btn:hover:not(:disabled) {
    background: #ebf8ff;
    border-color: #0156A7;
    color: #0156A7;
}

.companies-list-page .page-btn.active {
    background-color: #0156A7;
    color: white;
    border-color: #0156A7;
    font-weight: 600;
}

.companies-list-page .page-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.companies-list-page .page-ellipsis {
    padding: 0 6px;
    color: #94a3b8;
}

.modal-overlay.companies-list-page {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.companies-list-page .modal-confirm {
    background: #fff;
    border-radius: 10px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
    overflow: hidden;
}

.companies-list-page .modal-confirm-header {
    padding: 18px 24px;
    font-size: 1.05rem;
    font-weight: 600;
    color: #1e293b;
    border-bottom: 1px solid #e2e8f0;
}

.companies-list-page .modal-confirm-body {
    padding: 24px;
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.6;
}

.companies-list-page .confirm-note {
    font-size: 0.82rem;
    color: #64748b;
}

.companies-list-page .modal-confirm-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
    background: #fafbfc;
}

.companies-list-page .btn-cancel {
    background-color: #fff;
    color: #475569;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 9px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}

.companies-list-page .btn-cancel:hover {
    background: #f8fafc;
}

.companies-list-page .btn-delete-confirm {
    background-color: #dc2626;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 9px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.companies-list-page .btn-delete-confirm:hover {
    background-color: #b91c1c;
}

@media (max-width: 1024px) {
    .list-wrapper.companies-list-page {
        padding: 20px 16px;
    }

    .companies-list-page .pagination-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .companies-list-page .pagination {
        justify-content: center;
    }
}


/* ---------------------------------------------------------------------------
   Section C — Formulários e modais do módulo (Cadastrar/Editar, filtros,
   consulta de CNPJ, seções relacionadas). Mesma origem: folhas .razor.css
   inertes, portadas e escopadas por página.
   --------------------------------------------------------------------------- */

/* --- EconomicGroups/Form.razor.css  (escopo: .economic-groups-page) --- */
.economic-groups-page .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 32px;
}

.economic-groups-page .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
}

.economic-groups-page .form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #333;
}

.economic-groups-page .required {
    color: #e53e3e;
}

.economic-groups-page .form-control {
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 0.95rem;
    color: #2d3748;
    transition: border-color 0.2s;
    width: 100%;
    box-sizing: border-box;
    background: #fff;
}

.economic-groups-page .form-control:focus {
    outline: none;
    border-color: #0156A7;
    box-shadow: 0 0 0 2px rgba(26, 79, 138, 0.15);
}

.economic-groups-page .input-error {
    border-color: #e53e3e !important;
}

.economic-groups-page .error-msg {
    color: #e53e3e;
    font-size: 0.78rem;
}

/* Dropdown dinâmico */
.economic-groups-page .dropdown-group {
    position: relative;
}

.economic-groups-page .dropdown-overlay {
    position: fixed;
    inset: 0;
    z-index: 99;
    background: transparent;
}

.economic-groups-page .dropdown-list {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
}

.economic-groups-page .dropdown-item {
    padding: 9px 12px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.15s;
}

.economic-groups-page .dropdown-item:hover {
    background-color: #ebf4ff;
    color: #0156A7;
}

/* Botões */
.economic-groups-page .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 28px;
}

.economic-groups-page .btn-cancel {
    background-color: #718096;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 24px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s;
}

.economic-groups-page .btn-cancel:hover {
    background-color: #4a5568;
}

/* ── Seção de Auditoria ── */
.economic-groups-page .form-audit-section {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.economic-groups-page .audit-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #4a5568;
    margin: 0 0 16px 0;
}

.economic-groups-page .audit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 32px;
}

.economic-groups-page .audit-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.economic-groups-page .audit-item label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.economic-groups-page .audit-value {
    font-size: 0.9rem;
    color: #2d3748;
    margin: 0;
    font-family: 'Courier New', monospace;
}
/* --- EconomicGroups/FilterModal.razor.css  (escopo: .economic-groups-page) --- */
.filter-grid.economic-groups-page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 24px;
}

.economic-groups-page .filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
}

.economic-groups-page .filter-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #4a5568;
}

.economic-groups-page .filter-control {
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 0.9rem;
    color: #2d3748;
    width: 100%;
    box-sizing: border-box;
    background: #fff;
    transition: border-color 0.2s;
}

.economic-groups-page .filter-control:focus {
    outline: none;
    border-color: #0156A7;
    box-shadow: 0 0 0 2px rgba(26, 79, 138, 0.15);
}

/* Dropdown dinâmico */
.economic-groups-page .dropdown-group {
    position: relative;
}

.dropdown-overlay.economic-groups-page {
    position: fixed;
    inset: 0;
    z-index: 99;
    background: transparent;
}

.economic-groups-page .dropdown-list {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 100;
    max-height: 180px;
    overflow-y: auto;
}

.economic-groups-page .dropdown-item {
    padding: 9px 12px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.15s;
}

.economic-groups-page .dropdown-item:hover {
    background-color: #ebf4ff;
    color: #0156A7;
}


/* --- CompaniesList/Form.razor.css  (escopo: .companies-list-page) --- */
.companies-list-page .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 32px;
}

.companies-list-page .form-group-group-row {
    display: flex;
    align-items: flex-end;
    gap: 24px;
}

.companies-list-page .form-group-group-row .group-field {
    flex: 1;
    min-width: 0;
}

.companies-list-page .form-group-singleton {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
    padding-bottom: 2px;
}

.companies-list-page .singleton-checkbox {
    white-space: nowrap;
    margin-top: 0;
    min-height: 38px;
    align-items: center;
}

.companies-list-page .form-control-readonly {
    background-color: #f7fafc;
    color: #4a5568;
    cursor: default;
}

.companies-list-page .form-control-readonly:focus {
    border-color: #cbd5e0;
    box-shadow: none;
}

.companies-list-page .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
}

.companies-list-page .form-group-full {
    grid-column: 1 / -1;
}

.companies-list-page .form-group-checkbox {
    justify-content: center;
}

.companies-list-page .form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #333;
}

.companies-list-page .checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #4a5568;
    margin-top: 4px;
}

.companies-list-page .required {
    color: #e53e3e;
}

.companies-list-page .form-control {
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 0.95rem;
    color: #2d3748;
    transition: border-color 0.2s;
    width: 100%;
    box-sizing: border-box;
    background: #fff;
}

.companies-list-page .form-textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.companies-list-page .form-control:focus {
    outline: none;
    border-color: #0156A7;
    box-shadow: 0 0 0 2px rgba(26, 79, 138, 0.15);
}

.companies-list-page .input-error {
    border-color: #e53e3e !important;
}

.companies-list-page .error-msg {
    color: #e53e3e;
    font-size: 0.78rem;
}

.companies-list-page .dropdown-group {
    position: relative;
}

.companies-list-page .validation-summary {
    margin-top: 16px;
    padding: 12px 16px;
    border: 1px solid #feb2b2;
    border-radius: 4px;
    background: #fff5f5;
    color: #c53030;
    font-size: 0.875rem;
}

.companies-list-page .save-feedback {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
}

.companies-list-page .save-feedback.info {
    background: #ebf8ff;
    border: 1px solid #bee3f8;
    color: #2c5282;
}

.companies-list-page .save-feedback.success {
    background: #f0fff4;
    border: 1px solid #9ae6b4;
    color: #276749;
}

.companies-list-page .save-feedback.warning {
    background: #fffaf0;
    border: 1px solid #fbd38d;
    color: #975a16;
}

.companies-list-page .save-feedback.error {
    background: #fff5f5;
    border: 1px solid #feb2b2;
    color: #c53030;
}

.companies-list-page .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 28px;
}

.companies-list-page .dropdown-list {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
}

.companies-list-page .dropdown-item {
    padding: 9px 12px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.15s;
}

.companies-list-page .dropdown-item:hover {
    background-color: #ebf4ff;
    color: #0156A7;
}

.companies-list-page .btn-cancel {
    background-color: #718096;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 24px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s;
}

.companies-list-page .btn-cancel:hover {
    background-color: #4a5568;
}

.companies-list-page .form-audit-section {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.companies-list-page .audit-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #4a5568;
    margin: 0 0 16px 0;
}

.companies-list-page .audit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 32px;
}

.companies-list-page .audit-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.companies-list-page .audit-item label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.companies-list-page .audit-value {
    font-size: 0.9rem;
    color: #2d3748;
    margin: 0;
    font-family: 'Courier New', monospace;
}

.companies-list-page .related-hint {
    margin-top: 20px;
    padding: 12px 16px;
    background: #ebf8ff;
    border: 1px solid #bee3f8;
    border-radius: 4px;
    color: #2c5282;
    font-size: 0.875rem;
}

.companies-list-page .cnpj-input-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.companies-list-page .cnpj-input-row .form-control {
    flex: 1;
}

.companies-list-page .btn-cnpj-search {
    background-color: #0156A7;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0 14px;
    cursor: pointer;
    flex-shrink: 0;
}

.companies-list-page .btn-cnpj-search:hover:not(:disabled) {
    background-color: #163f6e;
}

.companies-list-page .btn-cnpj-search:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.companies-list-page .cnpj-lookup-info {
    color: #2f855a;
    font-size: 0.8rem;
    margin-top: 4px;
}

/* --- CompaniesList/FilterModal.razor.css  (escopo: .companies-list-page) --- */
.modal-overlay.companies-list-page {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.companies-list-page .modal-container {
    background: #fff;
    border-radius: 8px;
    width: 100%;
    max-width: 640px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    overflow: hidden;
}

.companies-list-page .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a202c;
}

.companies-list-page .modal-close {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: #718096;
    padding: 4px 8px;
    border-radius: 4px;
}

.companies-list-page .modal-body {
    padding: 24px;
    position: relative;
}

.companies-list-page .filter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 24px;
}

.companies-list-page .filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
}

.companies-list-page .filter-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #4a5568;
}

.companies-list-page .filter-control {
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 0.9rem;
    color: #2d3748;
    width: 100%;
    box-sizing: border-box;
    background: #fff;
}

.companies-list-page .dropdown-group {
    position: relative;
}

.companies-list-page .dropdown-overlay {
    position: fixed;
    inset: 0;
    z-index: 99;
    background: transparent;
}

.companies-list-page .dropdown-list {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 100;
    max-height: 180px;
    overflow-y: auto;
}

.companies-list-page .dropdown-item {
    padding: 9px 12px;
    font-size: 0.9rem;
    cursor: pointer;
}

.companies-list-page .dropdown-item:hover {
    background-color: #ebf4ff;
    color: #0156A7;
}

.companies-list-page .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
}

.companies-list-page .btn-filter,
.companies-list-page .btn-reset {
    background-color: #0156A7;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 9px 28px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}

.companies-list-page .btn-cancel {
    background-color: #718096;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 9px 20px;
    font-size: 0.9rem;
    cursor: pointer;
}

/* --- CompaniesList/CnpjLookupModal.razor.css  (escopo: .companies-list-page) --- */
.cnpj-lookup-overlay.companies-list-page {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.companies-list-page .cnpj-lookup-card {
    background: #fff;
    border-radius: 8px;
    padding: 28px 32px;
    min-width: 320px;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.companies-list-page .cnpj-lookup-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 16px;
    border: 4px solid #e2e8f0;
    border-top-color: #0156A7;
    border-radius: 50%;
    animation: clcnpj-cnpj-spin 0.8s linear infinite;
}

.companies-list-page .cnpj-lookup-message {
    margin: 0;
    font-size: 0.95rem;
    color: #2d3748;
    font-weight: 500;
}

@keyframes clcnpj-cnpj-spin {
    to { transform: rotate(360deg); }
}

/* --- CompaniesList/CompanyRelatedSections.razor.css  (escopo: .companies-list-page) --- */
.related-sections.companies-list-page {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.companies-list-page .related-draft-hint {
    margin: 0 0 12px 0;
    padding: 10px 14px;
    background: #ebf8ff;
    border: 1px solid #bee3f8;
    border-radius: 4px;
    color: #2c5282;
    font-size: 0.85rem;
}

.companies-list-page .related-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #4a5568;
    margin: 0 0 16px 0;
}

.related-loading.companies-list-page {
    margin-top: 20px;
    color: #718096;
    font-size: 0.9rem;
}

.companies-list-page .related-block {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 16px;
    background: #fafbfc;
}

.companies-list-page .related-summary {
    font-size: 1rem;
    font-weight: 600;
    color: #2d3748;
    cursor: pointer;
    margin-bottom: 8px;
}

.companies-list-page .btn-add {
    background-color: #38a169;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 12px;
    transition: background 0.2s;
}

.companies-list-page .btn-add:hover {
    background-color: #2f855a;
}

.companies-list-page .related-card {
    position: relative;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 12px;
    background: #fff;
}

.companies-list-page .btn-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: 1px solid #e53e3e;
    color: #e53e3e;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 0.85rem;
    line-height: 1;
}

.companies-list-page .btn-remove:hover:not(:disabled) {
    background: #fff5f5;
}

.companies-list-page .btn-remove:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.companies-list-page .related-card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 24px;
    padding-right: 36px;
}

.companies-list-page .related-card-grid-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

.companies-list-page .related-card-grid .form-group-full {
    grid-column: 1 / -1;
}

.companies-list-page .related-card-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

.companies-list-page .btn-save-item {
    background-color: #0156A7;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 20px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.companies-list-page .btn-save-item:hover:not(:disabled) {
    background-color: #163f6e;
}

.companies-list-page .btn-save-item:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.companies-list-page .related-card .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.companies-list-page .related-card .form-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: #333;
}

.companies-list-page .related-card .form-control {
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 0.9rem;
    color: #2d3748;
    width: 100%;
    box-sizing: border-box;
    background: #fff;
}

.companies-list-page .related-card .form-control:focus {
    outline: none;
    border-color: #0156A7;
    box-shadow: 0 0 0 2px rgba(26, 79, 138, 0.15);
}

.companies-list-page .related-card .required {
    color: #e53e3e;
}

@media (max-width: 768px) {
    .companies-list-page .related-card-grid,
.companies-list-page .related-card-grid-3 {
        grid-template-columns: 1fr;
    }
}

/* ---------------------------------------------------------------------------
   Section D — Ajustes sobre o CSS portado

   As seções acima são o port verbatim das folhas .razor.css. Estes ajustes
   ficam separados de propósito, para deixar claro o que é herdado e o que foi
   alterado de forma consciente.

   1. Botão "Adicionar" das seções relacionadas de Empresa vinha verde
      (#38a169) — divergia do azul institucional usado no resto do app.
   2. Raios de 4px/8px fixos deixavam a tela mais quadrada que o restante da
      aplicação. Passam a usar os tokens do design system, que já valem para
      botões, inputs e cards (--border-radius: 10px, --border-radius-sm: 8px).
   --------------------------------------------------------------------------- */

/* 1. Azul institucional no lugar do verde, igual ao .btn-save da mesma tela */
.companies-list-page .btn-add {
    background-color: #0156A7;
}

.companies-list-page .btn-add:hover {
    background-color: #163f6e;
}

/* 2. Raios alinhados ao design system */
.economic-groups-page .form-control,
.companies-list-page .form-control,
.economic-groups-page .filter-control,
.companies-list-page .filter-control,
.economic-groups-page .dropdown-list,
.companies-list-page .dropdown-list {
    border-radius: var(--border-radius-sm);
}

.economic-groups-page .btn-cancel,
.companies-list-page .btn-cancel,
.companies-list-page .btn-add,
.companies-list-page .btn-remove,
.companies-list-page .btn-reset,
.companies-list-page .btn-filter,
.companies-list-page .btn-save-item,
.companies-list-page .btn-cnpj-search {
    border-radius: var(--border-radius-sm);
}

/* ---------------------------------------------------------------------------
   Section D: Prospecção — colunas de interação/proposta na listagem de Empresas
              e o modal Registrar Interação.

   Mesmo tratamento das seções acima: estas classes nasceram em
   RegistrarInteracaoModal.razor.css e List.razor.css, que são inertes, e por
   isso apareciam sem estilo nenhum. Escopadas por .companies-list-page, que
   está tanto no .list-wrapper da listagem quanto no .modal-overlay dos modais.
   --------------------------------------------------------------------------- */

/* --- Listagem: badge "Prospectada" ao lado da Razão Social --- */
.companies-list-page .badge-prospectada {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 10px;
    background: #e6f6ed;
    border: 1px solid #b7e3c9;
    color: #1b6e42;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.5;
    white-space: nowrap;
    vertical-align: middle;
}

/* --- Listagem: textos auxiliares das colunas de prospecção --- */
.companies-list-page .cell-hint {
    display: block;
    margin-top: 2px;
    color: #718096;
    font-size: 0.75rem;
}

.companies-list-page .cell-empty {
    color: #a0aec0;
    font-size: 0.8rem;
    font-style: italic;
}

/* --- Listagem: "Status da Última Proposta" ---
   É um <button> porque navega via código (monta a rota do Kanban), mas precisa
   ler como um badge clicável, no mesmo desenho dos .status-badge da coluna
   Status ao lado — sem isso saía com a aparência crua de botão do navegador. */
.companies-list-page .proposta-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 4px 12px;
    border: 1px solid #bee2ff;
    border-radius: 12px;
    background: #e7f5ff;
    color: #0060ab;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.companies-list-page .proposta-link::after {
    content: "\2197"; /* seta ↗ — sinaliza que sai desta tela para o Kanban */
    font-size: 0.72rem;
    opacity: 0.65;
}

.companies-list-page .proposta-link:hover {
    background: #bee2ff;
    border-color: #94d0ff;
    color: #00325a;
}

.companies-list-page .proposta-link:focus-visible {
    outline: 2px solid #0077d4;
    outline-offset: 1px;
}

/* --- Listagem: botão de registrar interação, na mesma família dos .btn-action --- */
.companies-list-page .btn-interacao {
    color: #0060ab;
}

.companies-list-page .btn-interacao:hover {
    background: #e7f5ff;
    color: #00325a;
}

/* --- Modal Registrar Interação ---
   A base (.modal-overlay/.modal-container/.filter-*) vem da seção do
   FilterModal acima; aqui ficam só os complementos deste modal. */
.companies-list-page .filter-group-full {
    grid-column: 1 / -1;
}

.companies-list-page .filter-hint {
    display: block;
    margin-top: 2px;
    color: #718096;
    font-size: 0.78rem;
    font-weight: 400;
}

.companies-list-page .filter-control:disabled {
    background: #f7fafc;
    color: #4a5568;
    cursor: not-allowed;
}

.companies-list-page .filter-control.is-invalid {
    border-color: #e53e3e;
    background: #fff5f5;
}

.companies-list-page .interacao-textarea {
    resize: vertical;
    min-height: 130px;
    font-family: inherit;
}

/* Aviso do efeito da primeira interação: cria Proposta nova ou vincula à do grupo. */
.companies-list-page .interacao-info {
    margin-bottom: 18px;
    padding: 10px 14px;
    border: 1px solid #bee3f8;
    border-radius: 4px;
    background: #ebf4ff;
    color: #2a4365;
    font-size: 0.85rem;
}

.companies-list-page .interacao-alert {
    margin-bottom: 18px;
    padding: 10px 14px;
    border: 1px solid #feb2b2;
    border-radius: 4px;
    background: #fff5f5;
    color: #742a2a;
    font-size: 0.85rem;
}

.companies-list-page .interacao-loading {
    padding: 28px 0;
    color: #718096;
    font-size: 0.9rem;
    text-align: center;
}

/* Fluxo sequencial: interação > visita > relatório > reembolso > e-mail. */
.companies-list-page .modal-container.wizard-modal-wide {
    max-width: min(1440px, 96vw);
    max-height: 94vh;
    display: flex;
    flex-direction: column;
}

.companies-list-page .wizard-modal-body {
    overflow: auto;
    max-height: calc(94vh - 78px);
}

.companies-list-page .wizard-progress {
    color: #718096;
    font-size: .75rem;
    font-weight: 500;
    margin-top: 2px;
}

.companies-list-page .wizard-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.companies-list-page .wizard-actions-top {
    justify-content: flex-start;
    margin-bottom: 14px;
}

.companies-list-page .wizard-centered {
    max-width: 720px;
    margin: 10px auto;
    padding: 28px 16px;
    text-align: center;
}

.companies-list-page .wizard-success-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 14px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #e6fffa;
    color: #087f5b;
    font-size: 1.6rem;
}

.companies-list-page .receipt-upload,
.companies-list-page .email-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px;
    border: 1px dashed #90cdf4;
    border-radius: 6px;
    background: #f7fbff;
}

.companies-list-page .email-summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
    border-style: solid;
}

.companies-list-page .receipt-files {
    padding-top: 7px;
    color: #4a5568;
    font-size: .8rem;
}

.companies-list-page .reimbursement-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

.companies-list-page .reimbursement-table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    font-size: .78rem;
}

.companies-list-page .reimbursement-table th,
.companies-list-page .reimbursement-table td {
    padding: 6px;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.companies-list-page .reimbursement-table th {
    background: #edf2f7;
    color: #2d3748;
    font-weight: 600;
}

.companies-list-page .reimbursement-table input {
    min-width: 105px;
    max-width: 150px;
    padding: 6px;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
}

.companies-list-page .reimbursement-table td:nth-child(2) input {
    min-width: 210px;
}

.companies-list-page .number-cell {
    text-align: right;
}

.companies-list-page .empty-lines {
    padding: 24px !important;
    text-align: center;
    color: #718096;
}

.companies-list-page .recipient-list {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}

.companies-list-page .recipient-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    border-radius: 999px;
    background: #ebf4ff;
    color: #2a4365;
    font-size: .83rem;
}

.companies-list-page .recipient-chip button {
    border: 0;
    background: transparent;
    color: inherit;
    padding: 0;
    line-height: 1;
    font-size: 1rem;
}

@media (max-width: 720px) {
    .companies-list-page .receipt-upload { align-items: flex-start; flex-direction: column; }
    .companies-list-page .wizard-actions > * { flex: 1 1 auto; }
}
