/* SWEG — novo shell da aplicação (protótipo B01): menu em cartão branco, topo limpo e conteúdo sobre fundo creme.
   Só se aplica dentro de .sw-shell (MainLayout). Carregado depois de app.css; usa as variáveis de sweg-ui.css. */

/* Tipografia do protótipo: Inter, base de 13,6 px (o resto do sistema usa 12,8 px como raiz; o protótipo é mais denso nas tabelas) */
html:has(.sw-shell) { font-size: 13.6px; }
.sw-shell { background: var(--sw-bg); font-family: var(--sw-font); color: var(--sw-text); line-height: 1.5; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-optical-sizing: auto; }
.sw-shell button, .sw-shell input, .sw-shell select, .sw-shell textarea, .sw-shell table, .sw-shell th, .sw-shell td,
.sw-shell h1, .sw-shell h2, .sw-shell h3, .sw-shell h4, .sw-shell .btn, .sw-shell .badge, .sw-shell label { font-family: var(--sw-font); }
.sw-shell h1, .sw-shell h2, .sw-shell h3 { letter-spacing: -.01em; }
.sw-shell table td, .sw-shell table th { font-variant-numeric: tabular-nums; }
body:has(.sw-shell) { background: var(--sw-bg); }

/* ── Menu lateral: cartão branco flutuante ─────────────────────────────── */
.sw-shell .sidebar {
    top: 16px;
    margin: 16px 0 16px 16px;
    height: calc(100vh - 32px);
    background: #fff;
    color: var(--sw-text);
    border: 1px solid var(--sw-border);
    border-radius: 20px;
    font-family: var(--sw-font);
}
.sw-shell .sidebar.collapsed { width: var(--sidebar-collapsed-width); }

.sw-shell .sidebar-header { height: auto; padding: 22px 20px 14px; align-items: flex-start; border-bottom: 0; overflow: visible; }
.sw-shell .sidebar-brand-link { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 2px; height: auto; }
.sw-shell .sidebar-brand-link .sw-logo { transition: none; }
.sw-shell .sidebar-brand-link .sw-brand-sub { font-size: 12px; color: var(--sw-muted); }
.sw-shell .sidebar.collapsed .sw-brand-sub { display: none; }
.sw-shell .sidebar.collapsed .sidebar-header { align-items: center; padding: 16px 0; }
.sw-shell .mobile-close-btn { color: var(--sw-text); }

.sw-shell .sidebar-nav { padding: 4px 16px 16px; }

.sw-shell .sidebar .nav-section-title {
    color: #4B5563 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    letter-spacing: .06em !important;
    padding: 0 10px !important;
    margin: 18px 0 6px !important;
}

.sw-shell .sidebar .nav-item {
    min-height: 44px;
    padding: 0 10px;
    margin-bottom: 2px;
    gap: 12px;
    border-radius: 12px;
    color: var(--sw-text);
    font-size: 15px;
    font-weight: 500;
    box-shadow: none;
    background: transparent;
}
.sw-shell .sidebar .nav-item:hover { background: #F3F5F7; color: var(--sw-text); }
.sw-shell .sidebar .nav-item.active { background: transparent; color: var(--sw-primary-dark); font-weight: 600; box-shadow: none; }
.sw-shell .sidebar .nav-item-icon { width: 20px; height: 20px; }
.sw-shell .sidebar .nav-chevron { color: #6B7280; }

/* Submenus: caixa interior com borda, como no protótipo */
.sw-shell .sidebar .nav-submenu-items {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 2px 0 6px 10px;
    padding: 8px;
    border: 1px solid #EEF0F3;
    border-radius: 12px;
    background: #FAFBFC;
}
.sw-shell .sidebar .nav-submenu-items.nested { margin-left: 6px; padding: 6px; background: #fff; }
.sw-shell .sidebar .nav-subitem {
    min-height: 38px;
    padding: 0 12px;
    margin: 0;
    border-radius: 8px;
    color: var(--sw-text);
    font-size: 14px;
    font-weight: 400;
}
.sw-shell .sidebar .nav-subitem:hover { background: #F0F3F6; color: var(--sw-text); }
.sw-shell .sidebar .nav-subitem.active { background: #edeeef; color: var(--sw-primary-dark); font-weight: 600; }

/* Itens bloqueados por plano e selos */
.sw-shell .sidebar .nav-item.locked-item { color: var(--sw-muted); opacity: 1; }
.sw-shell .sidebar .nav-item.locked-item:hover { background: transparent; }
.sw-shell .sidebar .nav-upsell-btn { background: var(--sw-primary-soft); color: var(--sw-primary-dark); border: 1px solid #dadcdd; }
.sw-shell .sidebar .nav-upsell-btn:hover { background: var(--sw-primary); color: #fff; }
.sw-shell .sidebar .nav-upsell-btn.lock { background: #FAF8F5; color: var(--sw-primary-dark); border-color: var(--sw-border-strong); }
.sw-shell .sidebar .nav-badge-soon { background: #F3F5F7; color: var(--sw-muted); }
.sw-shell .sidebar .nav-skeleton-item { background: linear-gradient(90deg, #F3F5F7 25%, #E8EBEF 37%, #F3F5F7 63%); background-size: 400% 100%; }
.sw-shell .sidebar .sidebar-logout { border-top: 1px solid #F0F2F5; }
.sw-shell .sidebar .logout-btn { color: var(--sw-muted); }

/* Scrollbar discreta */
.sw-shell .sidebar::-webkit-scrollbar-thumb, .sw-shell .sidebar-nav::-webkit-scrollbar-thumb { background: #E1E5EA; }

/* Menu recolhido */
.sw-shell .sidebar.collapsed .nav-item { justify-content: center; padding: 0; }
.sw-shell .sidebar.collapsed .sidebar-nav { padding-left: 8px; padding-right: 8px; }

/* ── Topo ───────────────────────────────────────────────────────────────── */
.sw-shell .main-content { padding: 0 32px 0 24px; }
.sw-shell .topbar {
    height: auto;
    min-height: 88px;
    padding: 28px 0 22px;
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border-bottom: 1px solid var(--sw-border);
    position: static;
    max-width: none;
    margin: 0;
    gap: 16px;
    flex-wrap: wrap;
}
.sw-shell .topbar-title { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.01em; color: var(--sw-text); }
.sw-shell .topbar-toggle { color: var(--sw-text); width: 36px; height: 36px; border: 1px solid var(--sw-border-strong); background: #fff; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.sw-shell .topbar-toggle:hover { background: var(--sw-bg); }
.sw-shell .topbar-right { gap: 12px; }
.sw-shell .topbar-btn { border: 1px solid var(--sw-border-strong); background: #fff; border-radius: 999px; color: var(--sw-text); }
.sw-shell .topbar-btn:hover { background: var(--sw-bg); color: var(--sw-primary-dark); }
.sw-shell .user-menu { gap: 12px; padding: 0 6px; min-height: 48px; border-radius: 999px; }
.sw-shell .user-menu:hover { background: rgba(0, 0, 0, .04); }
.sw-shell .user-avatar { width: 44px; height: 44px; background: #F3F5F7; border: 1px solid var(--sw-border-strong); color: var(--sw-text); font-size: 16px; font-weight: 600; }
.sw-shell .user-name { font-size: 15px; font-weight: 600; color: var(--sw-text); }
.sw-shell .user-role { font-size: 13px; color: var(--sw-muted); }
.sw-shell .profile-dropdown { border-radius: 16px; border-color: var(--sw-border); }
.sw-shell .profile-dropdown-header { background: var(--sw-primary-soft); }
.sw-shell .profile-dropdown-avatar { background: #fff; border: 1px solid var(--sw-border-strong); color: var(--sw-primary-dark); }

/* ── Conteúdo ───────────────────────────────────────────────────────────── */
.sw-shell .page-content { max-width: none; margin: 0; padding: 24px 0 56px; min-height: 0; }
.sw-shell .card { border: 1px solid var(--sw-border); border-radius: 20px; box-shadow: none; }

/* ── Ecrãs pequenos ─────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .sw-shell .sidebar { margin: 0; top: 0; height: 100vh; border-radius: 0 20px 20px 0; }
    .sw-shell .main-content { padding: 0 16px; }
    .sw-shell .topbar { padding: 16px 0; min-height: 64px; }
    .sw-shell .topbar-title { font-size: 18px; }
}

/* Botão "Termine a configuração da sua conta" no topo */
.sw-shell .sw-setup { display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 6px 0 18px; border-radius: 999px; background: var(--sw-primary-soft); border: 1px solid #dadcdd; color: var(--sw-primary-dark); font: 600 14px var(--sw-font); text-decoration: none; white-space: nowrap; }
.sw-shell .sw-setup:hover { background: #edeeef; color: var(--sw-primary-dark); }
.sw-shell .sw-setup-ring { position: relative; width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; color: var(--sw-primary); }
.sw-shell .sw-setup-ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.sw-shell .sw-setup-ring span { position: relative; font-size: 11px; font-weight: 700; color: var(--sw-primary-dark); }
@media (max-width: 720px) { .sw-shell .sw-setup-txt { display: none; } .sw-shell .sw-setup { padding-left: 6px; } }

/* ── Painel de controlo (B01) ─────────────────────────────────────────────── */
.sw-dash { display: flex; flex-direction: column; gap: 24px; position: relative; }
.sw-dash-filters { display: flex; flex-wrap: wrap; gap: 12px; }
.sw-dd { display: inline-flex; align-items: center; min-width: 200px; border: 1px solid var(--sw-border); border-radius: 12px; background: #fff; }
.sw-dd select { width: 100%; min-height: 48px; padding: 0 16px; border: 0; background: transparent; font: 500 15px var(--sw-font); color: var(--sw-text); cursor: pointer; outline: none; }
.sw-dd:focus-within { outline: 2px solid #343a40; outline-offset: -1px; }

.sw-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.sw-kpi { padding: 28px; border-radius: 20px; background: #fff; border: 1px solid var(--sw-border); display: flex; flex-direction: column; gap: 18px; }
.sw-kpi.hot { background: var(--sw-primary); border-color: var(--sw-primary); color: #fff; }
.sw-kpi-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 16px; font-weight: 500; }
.sw-kpi > strong { font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-kpi > strong small { font-size: 16px; font-weight: 600; letter-spacing: 0; opacity: .8; }
.sw-kpi .sub { font-size: 14px; }
.sw-kpi-go { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--sw-border-strong); background: #fff; color: #374151; display: inline-flex; align-items: center; justify-content: center; flex: none; text-decoration: none; }
.sw-kpi-go.inv { background: #fff; color: var(--sw-primary); border-color: #fff; }
.sw-kpi b { font-weight: 600; }

.sw-row { display: flex; flex-wrap: wrap; gap: 20px; }
.sw-card { background: #fff; border: 1px solid var(--sw-border); border-radius: 20px; box-sizing: border-box; }
.sw-pad { padding: 24px 28px; }
.sw-card-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sw-card-h h2 { margin: 0; font-size: 18px; font-weight: 600; color: #374151; flex: 1; }
.sw-ico { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--sw-border); color: #374151; flex: none; }
.sw-lg { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: #374151; }
.sw-lg i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.sw-lg.pill { padding: 6px 12px; border: 1px solid var(--sw-border); border-radius: 999px; background: #fff; }
.sw-yaxis { display: flex; flex-direction: column; justify-content: space-between; height: 260px; padding-bottom: 24px; font-size: 13px; text-align: right; }
.sw-bars { flex: 1; min-width: 0; display: flex; align-items: flex-end; justify-content: space-between; gap: 4px; height: 260px; background: repeating-linear-gradient(to top, transparent 0, transparent 58px, #EDF0F3 58px, #EDF0F3 59px); }
.sw-bar-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.sw-bar-pair { display: flex; align-items: flex-end; justify-content: center; gap: 3px; width: 100%; height: 236px; }
.sw-bar { flex: 1 1 0; max-width: 16px; min-width: 2px; border-radius: 6px 6px 0 0; min-height: 0; }
.sw-donut { width: 220px; height: 220px; border-radius: 999px; display: flex; align-items: center; justify-content: center; }
.sw-donut > div { width: 138px; height: 138px; border-radius: 999px; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; }

.sw-tb { width: 100%; border-collapse: separate; border-spacing: 0; }
.sw-tb th { text-align: left; font-size: 13px; font-weight: 500; color: #4B5563; padding: 12px 16px; background: var(--sw-bg); white-space: nowrap; }
.sw-tb td { padding: 12px 16px; font-size: 14px; border-bottom: 1px solid #F0F2F5; white-space: nowrap; }
.sw-chip { display: inline-flex; align-items: center; padding: 4px 8px; border: 1px solid #E5E7EB; border-radius: 8px; background: #F9FAFB; font-size: 13px; font-weight: 600; color: var(--sw-text); text-decoration: none; font-variant-numeric: tabular-nums; }

.sw-fab-wrap { position: fixed; right: 28px; bottom: 28px; z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.sw-fab { width: 60px; height: 60px; border-radius: 999px; border: 1px solid var(--sw-border-strong); background: #fff; box-shadow: 0 6px 20px rgba(17, 24, 39, .10); color: var(--sw-text); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.sw-fab:hover { color: var(--sw-primary); }
.sw-fab-menu { background: #fff; border: 1px solid var(--sw-border); border-radius: 16px; box-shadow: 0 10px 30px rgba(17, 24, 39, .14); padding: 8px; display: flex; flex-direction: column; min-width: 190px; }
.sw-fab-menu a { padding: 11px 14px; border-radius: 10px; color: var(--sw-text); text-decoration: none; font-size: 14px; font-weight: 500; }
.sw-fab-menu a:hover { background: #F3F5F7; }
.sw-st { display: inline-flex; justify-content: center; min-width: 84px; padding: 4px 10px; border-radius: 8px; font-size: 12px; font-weight: 600; }
.sw-st.ok { background: var(--sw-ok-soft); color: var(--sw-ok-text); }
.sw-st.warn { background: var(--sw-warn-soft); color: var(--sw-warn-text); }
.sw-st.err { background: var(--sw-err-soft); color: var(--sw-err-text); }
@media (max-width: 720px) { .sw-kpi > strong { font-size: 26px; } .sw-pad { padding: 18px; } .sw-donut { width: 180px; height: 180px; } .sw-donut > div { width: 112px; height: 112px; } }

/* ── Listagem de facturação (protótipo B04): separadores por tipo, filtros em cartão, tabela limpa ─────────────
   Só dentro de .sw-lista (Faturacao.razor). Outras listagens ganham o mesmo aspecto acrescentando esta classe. */
.sw-lista { display: flex; flex-direction: column; gap: 24px; }
.sw-lista > * { margin: 0; }

/* Cabeçalho */
.sw-lista .page-header { margin: 0 !important; padding: 0 0 4px; align-items: flex-end; flex-wrap: wrap; gap: 16px; }
.sw-lista .page-header h1 { font-size: 24px !important; font-weight: 700; letter-spacing: -.01em; margin: 0 0 8px !important; color: var(--sw-text); }
.sw-lista .sw-crumbs { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--sw-muted); }
.sw-lista .sw-crumbs a { color: var(--sw-muted); text-decoration: none; }
.sw-lista .sw-crumbs a:hover { color: var(--sw-primary-dark); }
.sw-lista .sw-crumbs span:last-child { color: #374151; }
.sw-lista .page-header .btn.btn-primary { min-height: 44px; padding: 0 18px; border-radius: 10px; background: var(--sw-primary); border: 1px solid var(--sw-primary); color: #fff; font: 600 14px var(--sw-font); box-shadow: none; text-transform: none; }
.sw-lista .page-header .btn.btn-primary:hover { background: var(--sw-primary-hover); }

/* Separadores por tipo de documento */
.sw-tabs { display: flex; flex-wrap: wrap; gap: 10px; padding-bottom: 20px; border-bottom: 1px solid var(--sw-border); }
.sw-tabs .pt { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--sw-border); background: #fff; font: 500 14px var(--sw-font); color: #374151; text-decoration: none; cursor: pointer; }
.sw-tabs .pt:hover { background: #FCFBF9; color: #374151; }
.sw-tabs .pt.on { background: var(--sw-primary); border-color: var(--sw-primary); color: #fff; font-weight: 600; }

/* Filtros */
.sw-lista .filter-card { background: #fff; border: 1px solid var(--sw-border); border-radius: 20px; box-shadow: none; overflow: visible; }
.sw-lista .filter-header { padding: 18px 24px; background: transparent; border-bottom: 1px solid #F0F2F5; cursor: pointer; }
.sw-lista .filter-title { font-size: 16px; font-weight: 600; color: #374151; margin: 0; display: flex; align-items: center; gap: 10px; }
.sw-lista .filter-title i { color: var(--sw-muted); }
.sw-lista .btn-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--sw-border-strong); border-radius: 10px; background: #fff; font: 600 13px var(--sw-font); color: var(--sw-text); cursor: pointer; }
.sw-lista .btn-toggle:hover { background: var(--sw-bg); }
.sw-lista .filter-grid-modern { gap: 18px 20px !important; padding: 22px 24px !important; }
.sw-lista .filter-grid-modern[style*="padding: 0"] { padding-top: 0 !important; }
.sw-lista .filter-column { display: flex; flex-direction: column; gap: 16px; }
.sw-lista .form-field > label { display: block; font-size: 13px !important; font-weight: 500 !important; color: #4B5563 !important; text-transform: lowercase; margin-bottom: 8px; letter-spacing: 0; }
.sw-lista .form-field > label::first-letter { text-transform: uppercase; }
.sw-lista .modern-input, .sw-lista .modern-input.compact { min-height: 44px; padding: 0 14px; border: 1px solid var(--sw-border-strong); border-radius: 10px; background: #fff; font: 14px var(--sw-font); color: var(--sw-text); box-shadow: none; }
.sw-lista .modern-input:focus { outline: 2px solid #343a40; outline-offset: -1px; border-color: var(--sw-border-strong); }
.sw-lista .modern-input-group { gap: 10px; }
.sw-lista .premium-select-trigger { min-height: 44px; border: 1px solid var(--sw-border-strong); border-radius: 10px; background: #fff; font: 14px var(--sw-font); color: var(--sw-text); box-shadow: none; }
.sw-lista .premium-select-trigger:hover, .sw-lista .premium-select-trigger.active { border-color: #343a40; }
.sw-lista .premium-dropdown-container { border: 1px solid var(--sw-border); border-radius: 14px; box-shadow: 0 10px 30px rgba(17, 24, 39, .12); }
.sw-lista .premium-dropdown-item.selected { background: #edeeef; color: var(--sw-primary-dark); }
.sw-lista .filter-footer { background: #FCFBF9; border-radius: 0 0 20px 20px; border-top: 1px solid #F0F2F5 !important; }
.sw-lista .filter-footer .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 10px; font: 600 14px var(--sw-font); box-shadow: none; text-transform: none; }
.sw-lista .filter-footer .btn-primary { background: var(--sw-primary); border: 1px solid var(--sw-primary); color: #fff; }
.sw-lista .filter-footer .btn-primary:hover { background: var(--sw-primary-hover); }
.sw-lista .filter-footer .btn-secondary { background: #fff; border: 1px solid var(--sw-border-strong); color: var(--sw-text); }
.sw-lista .filter-footer .btn-secondary:hover { background: var(--sw-bg); }
.sw-lista .filter-footer .btn-link { border: 0; background: transparent; color: var(--sw-primary-dark); min-height: 44px; padding: 0 10px; font-size: 13px !important; }

/* Cartão da lista: barra de ferramentas + tabela */
.sw-lista-card { background: #fff; border: 1px solid var(--sw-border); border-radius: 20px; overflow: hidden; }
.sw-lista-card .result-header { margin: 0 !important; padding: 18px 24px; background: transparent; border: 0; border-bottom: 1px solid #F0F2F5; border-radius: 0; box-shadow: none; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.sw-lista-card .result-count { font-size: 14px; color: #374151; }
.sw-lista-card .header-divider { color: #D1D5DB; }
.sw-lista-card .table-search { flex: 1 1 260px; }
.sw-lista-card .table-search .modern-input { width: 100%; }
.sw-lista-card .btn-icon-outline { width: 44px; height: 44px; border: 1px solid var(--sw-border-strong); border-radius: 10px; background: #fff; display: inline-flex; align-items: center; justify-content: center; color: #374151; cursor: pointer; }
.sw-lista-card .btn-icon-outline:hover { background: var(--sw-bg); }
.sw-lista-card .pagination-btn { min-width: 36px; height: 36px; border: 1px solid var(--sw-border-strong); border-radius: 8px; background: #fff; color: var(--sw-text); cursor: pointer; }
.sw-lista-card .pagination-btn:disabled { opacity: .45; cursor: not-allowed; }
.sw-lista-card .pagination-info { font-size: 13px; color: var(--sw-muted); padding: 0 8px; }
.sw-lista-card > .card { border: 0; border-radius: 0; box-shadow: none; background: transparent; }

/* Tabela */
.sw-lista-card .docs-table { border-collapse: separate; border-spacing: 0; width: 100%; }
.sw-lista-card .docs-table thead th { background: var(--sw-bg); color: #4B5563; font-size: 13px; font-weight: 500; padding: 12px 16px; border: 0; text-transform: none; letter-spacing: 0; white-space: nowrap; }
.sw-lista-card .docs-table thead th:first-child { border-radius: 10px 0 0 10px; }
.sw-lista-card .docs-table thead th:last-child { border-radius: 0 10px 10px 0; }
.sw-lista-card .docs-table tbody td { padding: 10px 16px; font-size: 14px; border: 0; border-bottom: 1px solid #F0F2F5; background: transparent !important; color: var(--sw-text); vertical-align: middle; }
.sw-lista-card .docs-table tbody tr:hover td { background: #FAFCFD !important; }
.sw-lista-card .docs-table tbody tr.row-anulado td { color: #9CA3AF; }
.sw-lista-card .docs-table .col-total, .sw-lista-card .docs-table .col-emissao { font-variant-numeric: tabular-nums; }
.sw-lista-card .docs-table tfoot td { background: #FCFBF9 !important; border: 0; font-size: 14px; }
.sw-lista .sw-chip { display: inline-flex; align-items: center; padding: 4px 8px; border: 1px solid #E5E7EB; border-radius: 8px; background: #F9FAFB; font-size: 13px; font-weight: 600; color: var(--sw-text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sw-lista .client-code-badge { display: inline-flex; padding: 2px 8px; border: 1px solid #E5E7EB; border-radius: 8px; background: #F9FAFB; font-size: 12px; font-weight: 600; color: #374151; }
.sw-lista-card .badge { display: inline-flex; justify-content: center; min-width: 84px; padding: 4px 10px; border-radius: 8px; font-size: 12px; font-weight: 600; text-transform: none; letter-spacing: 0; border: 0; box-shadow: none; }
.sw-lista-card .badge-success { background: var(--sw-ok-soft); color: var(--sw-ok-text); }
.sw-lista-card .badge-warning { background: var(--sw-warn-soft); color: var(--sw-warn-text); }
.sw-lista-card .badge-error, .sw-lista-card .badge-danger { background: var(--sw-err-soft); color: var(--sw-err-text); }
.sw-lista-card .badge-info, .sw-lista-card .badge-primary { background: #EAF1FE; color: #1D4ED8; }
.sw-lista-card .btn-table-icon-minimal { width: 36px; height: 36px; border: 1px solid var(--sw-border-strong); border-radius: 10px; background: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.sw-lista-card .btn-table-icon-minimal:hover { background: var(--sw-bg); }
.sw-lista .doc-actions-menu { border: 1px solid var(--sw-border); border-radius: 14px; box-shadow: 0 10px 30px rgba(17, 24, 39, .14); }

/* Totais */
.sw-lista-card .summary-container { padding: 18px 24px; border-top: 1px solid #F0F2F5; background: #FCFBF9; }
.sw-lista-card .summary-card { background: transparent; border: 0; box-shadow: none; padding: 0; }
.sw-lista-card .summary-label { color: var(--sw-muted); font-size: 13px; }
.sw-lista-card .summary-value { font-size: 18px; font-weight: 700; color: var(--sw-text); }

@media (max-width: 720px) { .sw-lista .page-header { align-items: flex-start; } .sw-tabs .pt { min-height: 40px; padding: 0 14px; } }

/* ── Cartões de resumo, botão Filtros e painel lateral de filtros (protótipos B04 e B03) ───────────────────── */
.sw-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.sw-stat { display: flex; align-items: center; gap: 16px; padding: 20px 22px; }
.sw-stat .ring { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 999px; border: 1px solid var(--sw-border-strong); color: #374151; flex: none; }
.sw-stat .txt { display: flex; flex-direction: column; gap: 2px; font-size: 14px; color: #374151; }
.sw-stat .txt strong { font-size: 22px; font-weight: 700; color: var(--sw-text); }

.sw-lista-card .sw-lista-title { margin: 0 auto 0 0; font-size: 18px; font-weight: 600; color: #374151; }
.sw-lista-card .result-count-group { display: none; }
.sw-lista-card .table-search { flex: 0 1 280px; }
.sw-btn-filtros { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 1px solid var(--sw-border-strong); border-radius: 10px; background: #fff; font: 600 14px var(--sw-font); color: var(--sw-text); cursor: pointer; white-space: nowrap; }
.sw-btn-filtros:hover { background: var(--sw-bg); }
.sw-badge-n { min-width: 18px; padding: 1px 5px; border-radius: 6px; background: var(--sw-primary); color: #fff; font-size: 11px; text-align: center; }

/* Painel lateral */
.sw-drawer-backdrop { position: fixed; inset: 0; background: rgba(31, 41, 55, .45); z-index: 1000; animation: sw-fade-in .2s ease; }
.sw-drawer { position: fixed; top: 16px; right: 16px; bottom: 16px; width: 520px; max-width: calc(100% - 32px); background: #fff; border-radius: 24px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(17, 24, 39, .18); z-index: 1001; animation: sw-slide-in .25s ease; }
@keyframes sw-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes sw-slide-in { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.sw-drawer-bar { display: none; }
.sw-drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 24px 32px 12px; }
.sw-drawer-head h2 { margin: 0; font-size: 20px; font-weight: 600; color: var(--sw-text); }
.sw-drawer-head p { margin: 4px 0 0; font-size: 14px; color: var(--sw-muted); }
.sw-drawer-x { width: 44px; height: 44px; border: 0; border-radius: 999px; background: transparent; font-size: 28px; line-height: 1; color: #374151; cursor: pointer; }
.sw-drawer-x:hover { background: #F3F5F7; }
.sw-drawer .sw-drawer-body { display: flex; flex-direction: column; flex: 1; min-height: 0; max-height: none; opacity: 1; visibility: visible; }
.sw-drawer-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 32px 24px; display: flex; flex-direction: column; gap: 18px; }
.sw-drawer .filter-grid-modern { display: flex !important; flex-direction: column; gap: 16px !important; padding: 0 !important; }
.sw-drawer .filter-column { gap: 16px; }
.sw-drawer .modern-input-group { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sw-drawer .form-field > label { display: block; font-size: 13px; font-weight: 500; color: #4B5563; text-transform: lowercase; margin-bottom: 8px; }
.sw-drawer .form-field > label::first-letter { text-transform: uppercase; }
.sw-drawer .modern-input, .sw-drawer .modern-input.compact { width: 100%; min-height: 44px; padding: 0 14px; border: 1px solid var(--sw-border-strong); border-radius: 10px; background: #fff; font: 14px var(--sw-font); color: var(--sw-text); box-shadow: none; }
.sw-drawer .modern-input:focus { outline: 2px solid #343a40; outline-offset: -1px; }
.sw-drawer .premium-select-trigger { min-height: 44px; border: 1px solid var(--sw-border-strong); border-radius: 10px; background: #fff; font: 14px var(--sw-font); box-shadow: none; }
.sw-drawer .premium-select-trigger:hover, .sw-drawer .premium-select-trigger.active { border-color: #343a40; }
.sw-drawer .premium-dropdown-container { border: 1px solid var(--sw-border); border-radius: 14px; box-shadow: 0 10px 30px rgba(17, 24, 39, .12); }
.sw-drawer .premium-dropdown-item.selected { background: #edeeef; color: var(--sw-primary-dark); }
.sw-drawer .filter-footer { flex: none; margin: 0 !important; padding: 16px 32px !important; background: #FCFBF9; border-top: 1px solid #F0F2F5 !important; }
.sw-drawer .filter-footer > div { flex-wrap: wrap; }
.sw-drawer .filter-footer .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 10px; font: 600 14px var(--sw-font); box-shadow: none; text-transform: none; }
.sw-drawer .filter-footer .btn-primary { background: var(--sw-primary); border: 1px solid var(--sw-primary); color: #fff; }
.sw-drawer .filter-footer .btn-primary:hover { background: var(--sw-primary-hover); }
.sw-drawer .filter-footer .btn-secondary { background: #fff; border: 1px solid var(--sw-border-strong); color: var(--sw-text); }
.sw-drawer .filter-footer .btn-link { border: 0; background: transparent; color: var(--sw-primary-dark); padding: 0 10px; font-size: 13px !important; }
@media (max-width: 720px) { .sw-drawer { top: 0; right: 0; bottom: 0; width: 100%; max-width: 100%; border-radius: 0; } .sw-drawer-head, .sw-drawer-scroll, .sw-drawer .filter-footer { padding-left: 20px !important; padding-right: 20px !important; } }

/* Listagens densas: texto de tabela mais pequeno, sem linhas alternadas, códigos em Inter */
.sw-lista-card .docs-table thead th { font-size: 12.5px; padding: 11px 14px; }
.sw-lista-card .docs-table tbody td { font-size: 13px; padding: 9px 14px; }
.sw-lista-card .docs-table tbody tr, .sw-lista-card .docs-table.table-striped tbody tr:nth-of-type(odd), .sw-lista-card .docs-table.table-striped tbody tr:nth-of-type(even), .sw-lista-card .docs-table tbody tr:nth-child(odd), .sw-lista-card .docs-table tbody tr:nth-child(even) { background: transparent !important; }
.sw-lista-card .docs-table tbody tr:hover, .sw-lista-card .docs-table tbody tr:hover td { background: #FAFCFD !important; }
.sw-lista .sw-chip { font-size: 12px; padding: 3px 8px; }
.sw-lista .client-code-badge { font-family: var(--sw-font) !important; font-size: 11.5px; font-weight: 600; padding: 2px 8px; }
.sw-lista-card .badge { font-size: 11.5px; min-width: 76px; padding: 3px 9px; }
.sw-lista-card .col-nome { font-weight: 500; text-transform: none; }
.sw-lista-card .sw-lista-title { font-size: 16px; }
.sw-lista-card .pagination-info, .sw-lista-card .result-count { font-size: 12.5px; }

/* Sem listras: o Bootstrap pinta as linhas alternadas com uma sombra interior nas células (--bs-table-*), não com o fundo */
.sw-lista-card .docs-table, .sw-lista-card .docs-table.table-striped, .sw-lista-card .docs-table.table-hover {
    --bs-table-bg: transparent; --bs-table-bg-type: transparent; --bs-table-bg-state: transparent;
    --bs-table-accent-bg: transparent; --bs-table-striped-bg: transparent; --bs-table-hover-bg: transparent;
}
.sw-lista-card .docs-table > :not(caption) > * > * { box-shadow: none !important; background-image: none !important; }
.sw-lista-card .docs-table tbody tr:hover > * { background-color: #FAFCFD !important; }

/* Tabela da listagem: um pouco mais pequena */
.sw-lista-card .docs-table thead th { font-size: 11.5px; padding: 10px 12px; }
.sw-lista-card .docs-table tbody td { font-size: 12px; padding: 8px 12px; }
.sw-lista .sw-chip { font-size: 11px; padding: 2px 7px; }
.sw-lista .client-code-badge { font-size: 10.5px; padding: 2px 7px; }
.sw-lista-card .badge { font-size: 10.5px; min-width: 70px; padding: 3px 8px; }
.sw-lista-card .col-user, .sw-lista-card .col-idx { font-size: 11px; }
.sw-lista-card .tfoot td, .sw-lista-card .docs-table tfoot td { font-size: 12px; }

/* ══════════════════════════════════════════════════════════════════════════════════════════════════════════════
   Esquema do protótipo aplicado a TODAS as páginas do layout principal (só aspecto: não altera campos nem lógica).
   Âmbito: .sw-shell .page-content. As páginas com marcação própria (Faturacao.razor) mantêm as suas regras .sw-lista.
   ══════════════════════════════════════════════════════════════════════════════════════════════════════════════ */

/* ── Cabeçalhos de página ─────────────────────────────────────────────────── */
.sw-shell .page-content .page-header { margin: 0 0 20px; gap: 12px; align-items: center; flex-wrap: wrap; }
.sw-shell .page-content .page-header h1, .sw-shell .page-content .page-title { font-size: 22px; font-weight: 700; letter-spacing: -.01em; color: var(--sw-text); margin: 0; }
.sw-shell .page-content .page-header p, .sw-shell .page-content .page-subtitle { color: var(--sw-muted); font-size: 13px; margin: 4px 0 0; }

/* ── Botões ────────────────────────────────────────────────────────────────── */
.sw-shell .page-content .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 10px; font: 600 13px var(--sw-font); text-transform: none; letter-spacing: 0; box-shadow: none; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s; }
.sw-shell .page-content .btn.btn-sm, .sw-shell .page-content .btn-sm { min-height: 34px; padding: 0 12px; font-size: 12px; border-radius: 9px; }
.sw-shell .page-content .btn-primary { background: var(--sw-primary); border: 1px solid var(--sw-primary); color: #fff; }
.sw-shell .page-content .btn-primary:hover:not(:disabled) { background: var(--sw-primary-hover); border-color: var(--sw-primary-hover); color: #fff; }
.sw-shell .page-content .btn-secondary, .sw-shell .page-content .btn-outline, .sw-shell .page-content .btn-outline-secondary, .sw-shell .page-content .btn-light { background: #fff; border: 1px solid var(--sw-border-strong); color: var(--sw-text); }
.sw-shell .page-content .btn-secondary:hover:not(:disabled), .sw-shell .page-content .btn-outline:hover:not(:disabled), .sw-shell .page-content .btn-outline-secondary:hover:not(:disabled), .sw-shell .page-content .btn-light:hover:not(:disabled) { background: var(--sw-bg); color: var(--sw-text); border-color: var(--sw-border-strong); }
.sw-shell .page-content .btn-ghost, .sw-shell .page-content .btn-link { background: transparent; border: 0; color: var(--sw-primary-dark); }
.sw-shell .page-content .btn-ghost:hover { background: #F3F5F7; }
.sw-shell .page-content .btn-danger { background: #fff; border: 1px solid #F3B8B2; color: var(--sw-err-text); }
.sw-shell .page-content .btn-danger:hover:not(:disabled) { background: var(--sw-err-soft); color: var(--sw-err-text); }
.sw-shell .page-content .btn:disabled, .sw-shell .page-content .btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ── Campos ────────────────────────────────────────────────────────────────── */
.sw-shell .page-content .modern-input, .sw-shell .page-content .form-input, .sw-shell .page-content .form-control,
.sw-shell .page-content .form-select, .sw-shell .page-content select.modern-input {
    border: 1px solid var(--sw-border-strong); border-radius: 10px; background-color: #fff; font: 13px var(--sw-font); color: var(--sw-text); box-shadow: none;
}
.sw-shell .page-content .modern-input:not([class*="-sm"]):not(textarea), .sw-shell .page-content .form-input:not([class*="-sm"]):not(textarea),
.sw-shell .page-content .form-control:not([class*="-sm"]):not(textarea), .sw-shell .page-content .form-select:not([class*="-sm"]) { min-height: 40px; padding-left: 12px; padding-right: 12px; }
.sw-shell .page-content .modern-input:focus, .sw-shell .page-content .form-input:focus, .sw-shell .page-content .form-control:focus, .sw-shell .page-content .form-select:focus { outline: 2px solid #343a40; outline-offset: -1px; border-color: var(--sw-border-strong); box-shadow: none; }
.sw-shell .page-content .form-field > label, .sw-shell .page-content .form-label { font-size: 12.5px; font-weight: 500; color: #4B5563; }
.sw-shell .page-content .premium-select-trigger { min-height: 40px; border: 1px solid var(--sw-border-strong); border-radius: 10px; background: #fff; font: 13px var(--sw-font); box-shadow: none; }
.sw-shell .page-content .premium-select-trigger:hover, .sw-shell .page-content .premium-select-trigger.active { border-color: #343a40; }
.sw-shell .page-content .premium-dropdown-container { border: 1px solid var(--sw-border); border-radius: 14px; box-shadow: 0 10px 30px rgba(17, 24, 39, .12); }
.sw-shell .page-content .premium-dropdown-item.selected { background: #edeeef; color: var(--sw-primary-dark); }
.sw-shell .page-content input[type="checkbox"], .sw-shell .page-content input[type="radio"] { accent-color: var(--sw-primary); }

/* ── Cartões e barras de resultados ────────────────────────────────────────── */
.sw-shell .page-content .card { background: #fff; border: 1px solid var(--sw-border); border-radius: 20px; box-shadow: none; }
.sw-shell .page-content .card-header { background: transparent; border-bottom: 1px solid #F0F2F5; padding: 16px 22px; }
.sw-shell .page-content .card-title { font-size: 16px; font-weight: 600; color: #374151; }
.sw-shell .page-content .result-header { background: #fff; border: 1px solid var(--sw-border); border-radius: 16px; box-shadow: none; padding: 12px 18px; margin-bottom: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.sw-shell .page-content .result-count { font-size: 12.5px; color: #374151; }
.sw-shell .page-content .header-divider { color: #D1D5DB; }
.sw-shell .page-content .btn-icon-outline { width: 40px; height: 40px; border: 1px solid var(--sw-border-strong); border-radius: 10px; background: #fff; display: inline-flex; align-items: center; justify-content: center; color: #374151; cursor: pointer; }
.sw-shell .page-content .btn-icon-outline:hover { background: var(--sw-bg); }
.sw-shell .page-content .pagination-btn { min-width: 34px; height: 34px; border: 1px solid var(--sw-border-strong); border-radius: 8px; background: #fff; color: var(--sw-text); cursor: pointer; }
.sw-shell .page-content .pagination-btn:disabled { opacity: .45; cursor: not-allowed; }
.sw-shell .page-content .pagination-info { font-size: 12.5px; color: var(--sw-muted); }

/* ── Tabelas (sem listras; só o hover muda a cor) ──────────────────────────── */
.sw-shell .page-content :is(.table, .data-table, .modern-table, .premium-table, .legacy-table, .config-table, .table-legacy) {
    border-collapse: separate; border-spacing: 0; width: 100%;
    --bs-table-bg: transparent; --bs-table-bg-type: transparent; --bs-table-bg-state: transparent;
    --bs-table-accent-bg: transparent; --bs-table-striped-bg: transparent; --bs-table-hover-bg: transparent;
}
.sw-shell .page-content :is(.table, .data-table, .modern-table, .premium-table, .legacy-table, .config-table, .table-legacy) thead th {
    background: var(--sw-bg); color: #4B5563; font-size: 11.5px; font-weight: 500; text-transform: none; letter-spacing: 0; padding: 10px 12px; border: 0; white-space: nowrap;
}
.sw-shell .page-content :is(.table, .data-table, .modern-table, .premium-table, .legacy-table, .config-table, .table-legacy) thead th:first-child { border-radius: 10px 0 0 10px; }
.sw-shell .page-content :is(.table, .data-table, .modern-table, .premium-table, .legacy-table, .config-table, .table-legacy) thead th:last-child { border-radius: 0 10px 10px 0; }
.sw-shell .page-content :is(.table, .data-table, .modern-table, .premium-table, .legacy-table, .config-table, .table-legacy) tbody td {
    font-size: 12px; padding: 8px 12px; border: 0; border-bottom: 1px solid #F0F2F5; color: var(--sw-text); vertical-align: middle; background: transparent; font-variant-numeric: tabular-nums;
}
.sw-shell .page-content :is(.table, .data-table, .modern-table, .premium-table, .legacy-table, .config-table, .table-legacy) > :not(caption) > * > * { box-shadow: none !important; }
.sw-shell .page-content :is(.table, .data-table, .modern-table, .premium-table, .legacy-table, .config-table, .table-legacy) tbody tr:nth-child(odd),
.sw-shell .page-content :is(.table, .data-table, .modern-table, .premium-table, .legacy-table, .config-table, .table-legacy) tbody tr:nth-child(even) { background: transparent; }
.sw-shell .page-content :is(.table, .data-table, .modern-table, .premium-table, .legacy-table, .config-table, .table-legacy) tbody tr:hover > td { background: #FAFCFD; }
.sw-shell .page-content :is(.table, .data-table, .modern-table, .premium-table, .legacy-table, .config-table, .table-legacy) tfoot td { background: #FCFBF9; border: 0; font-size: 12px; }

/* ── Estados (badges) ──────────────────────────────────────────────────────── */
.sw-shell .page-content .badge { display: inline-flex; align-items: center; justify-content: center; padding: 3px 9px; border-radius: 8px; font-size: 10.5px; font-weight: 600; text-transform: none; letter-spacing: 0; border: 0; }
.sw-shell .page-content .badge-success { background: var(--sw-ok-soft); color: var(--sw-ok-text); }
.sw-shell .page-content .badge-warning { background: var(--sw-warn-soft); color: var(--sw-warn-text); }
.sw-shell .page-content .badge-error, .sw-shell .page-content .badge-danger { background: var(--sw-err-soft); color: var(--sw-err-text); }
.sw-shell .page-content .badge-info, .sw-shell .page-content .badge-primary { background: #EAF1FE; color: #1D4ED8; }
.sw-shell .page-content .badge-secondary, .sw-shell .page-content .badge-light { background: #F3F5F7; color: #4B5563; }

/* ── Separadores (tabs) ────────────────────────────────────────────────────── */
.sw-shell .page-content .nav-tabs, .sw-shell .page-content .tabs { gap: 8px; border-bottom: 1px solid var(--sw-border); }
.sw-shell .page-content .tab-btn { font: 500 13px var(--sw-font); border-radius: 10px 10px 0 0; }
.sw-shell .page-content .tab-btn.tab-active, .sw-shell .page-content .tab-active { color: var(--sw-primary-dark); border-bottom-color: var(--sw-primary); font-weight: 600; }

/* ── Modais ────────────────────────────────────────────────────────────────── */
.sw-shell .modal-content { border: 0; border-radius: 20px; box-shadow: 0 24px 60px rgba(17, 24, 39, .18); }
.sw-shell .modal-header { border-bottom: 1px solid #F0F2F5; }
.sw-shell .modal-title { font-weight: 600; letter-spacing: -.01em; }
.sw-shell .modal-footer { border-top: 1px solid #F0F2F5; background: #FCFBF9; border-radius: 0 0 20px 20px; }

/* ── Filtros: cartão limpo (páginas com filtros sempre visíveis) ───────────── */
.sw-shell .page-content .filter-card { background: #fff; border: 1px solid var(--sw-border); border-radius: 20px; box-shadow: none; animation: none !important; transform: none !important; }
.sw-shell .page-content .filter-bar { gap: 12px; }

/* ── Filtros recolhíveis -> painel lateral à direita (mesma marcação das 37 páginas com "Filtros de Pesquisa") ─── */
/* Fechado: só um botão "Filtros" alinhado à direita */
.sw-shell .page-content .filter-card:has(> .filter-header):has(> .filter-content) { background: transparent; border: 0; padding: 0; margin: 0 0 14px !important; overflow: visible; }
.sw-shell .page-content .filter-card:has(> .filter-content.hide) > .filter-header,
.sw-shell .page-content .filter-card:not(:has(> .filter-content.show)) > .filter-header { display: flex; justify-content: flex-end; padding: 0; border: 0; background: transparent; }
.sw-shell .page-content .filter-card:not(:has(> .filter-content.show)) > .filter-header .filter-title { display: none; }
.sw-shell .page-content .filter-card:not(:has(> .filter-content.show)) > .filter-content { display: none; }
.sw-shell .page-content .filter-card > .filter-header .btn-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border: 1px solid var(--sw-border-strong); border-radius: 10px; background: #fff; font: 600 13px var(--sw-font); color: var(--sw-text); cursor: pointer; }
.sw-shell .page-content .filter-card:not(:has(> .filter-content.show)) > .filter-header .btn-toggle { font-size: 0; gap: 0; }
.sw-shell .page-content .filter-card:not(:has(> .filter-content.show)) > .filter-header .btn-toggle i { display: none; }
.sw-shell .page-content .filter-card:not(:has(> .filter-content.show)) > .filter-header .btn-toggle::before { content: "Filtros"; font-size: 13px; padding-left: 26px; background: no-repeat left center / 18px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%231F2937' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 5h18l-7 8v6l-4 2v-8z'/%3E%3C/svg%3E"); line-height: 20px; }
/* Aberto: painel flutuante */
.sw-shell .page-content .filter-card:has(> .filter-content.show) {
    position: fixed; top: 16px; right: 16px; bottom: 16px; width: 520px; max-width: calc(100% - 32px); z-index: 1001; margin: 0 !important; padding: 0;
    display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 0; border-radius: 24px;
    box-shadow: 0 0 0 200vmax rgba(31, 41, 55, .45), 0 24px 60px rgba(17, 24, 39, .18); animation: sw-slide-in .25s ease !important;
}
.sw-shell .page-content .filter-card:has(> .filter-content.show) > .filter-header { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 22px 32px 10px; border: 0; background: transparent; }
.sw-shell .page-content .filter-card:has(> .filter-content.show) .filter-title { font-size: 20px; font-weight: 600; margin: 0; color: var(--sw-text); }
.sw-shell .page-content .filter-card:has(> .filter-content.show) > .filter-header .btn-toggle { font-size: 0; gap: 0; width: 44px; height: 44px; min-height: 44px; padding: 0; justify-content: center; border: 0; border-radius: 999px; background: transparent; }
.sw-shell .page-content .filter-card:has(> .filter-content.show) > .filter-header .btn-toggle i { display: none; }
.sw-shell .page-content .filter-card:has(> .filter-content.show) > .filter-header .btn-toggle::before { content: "\00d7"; font-size: 28px; line-height: 1; color: #374151; }
.sw-shell .page-content .filter-card:has(> .filter-content.show) > .filter-header .btn-toggle:hover { background: #F3F5F7; }
.sw-shell .page-content .filter-card > .filter-content.show { display: block; flex: 1; min-height: 0; overflow-y: auto; max-height: none; opacity: 1; visibility: visible; padding: 0; }
.sw-shell .page-content .filter-card > .filter-content.show :is(.filter-grid-modern, .filter-grid, .filter-row, .filter-wrapper-modern) { display: flex !important; flex-direction: column; gap: 16px !important; padding: 8px 32px 20px !important; }
.sw-shell .page-content .filter-card > .filter-content.show .filter-column { display: flex; flex-direction: column; gap: 16px; }
.sw-shell .page-content .filter-card > .filter-content.show .modern-input-group { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sw-shell .page-content .filter-card > .filter-content.show :is(.modern-input, .form-input, .form-control, .form-select, .premium-select-wrapper) { width: 100%; }
.sw-shell .page-content .filter-card > .filter-content.show .filter-footer { position: sticky; bottom: 0; margin: 0 !important; padding: 16px 32px !important; background: #FCFBF9; border-top: 1px solid #F0F2F5 !important; z-index: 2; }
@media (max-width: 720px) { .sw-shell .page-content .filter-card:has(> .filter-content.show) { top: 0; right: 0; bottom: 0; width: 100%; max-width: 100%; border-radius: 0; } .sw-shell .page-content .filter-card > .filter-content.show :is(.filter-grid-modern, .filter-grid, .filter-row) { padding-left: 20px !important; padding-right: 20px !important; } }

/* ── Painel de filtros: correcções para as páginas com .filter-grid > .filter-row > .filter-item (Artigos, Stocks, ...) ── */
.sw-shell .page-content .filter-card > .filter-content.show > :is(.filter-grid-modern, .filter-grid, .filter-wrapper-modern) { padding: 8px 32px 20px !important; display: flex !important; flex-direction: column; gap: 16px !important; }
.sw-shell .page-content .filter-card > .filter-content.show :is(.filter-grid, .filter-grid-modern, .filter-wrapper-modern) :is(.filter-row, .filter-column) { padding: 0 !important; margin: 0 !important; display: flex !important; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 16px !important; width: 100%; }
.sw-shell .page-content .filter-card > .filter-content.show :is(.filter-item, .form-field, .filter-date-group) { flex: none !important; width: 100% !important; min-width: 0 !important; max-width: none !important; margin: 0 !important; }
.sw-shell .page-content .filter-card > .filter-content.show .filter-date-group { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.sw-shell .page-content .filter-card > .filter-content.show :is(.filter-label, .form-field > label) { display: block; font-size: 12.5px !important; font-weight: 500 !important; color: #4B5563 !important; text-transform: lowercase !important; letter-spacing: 0 !important; margin: 0 0 8px; }
.sw-shell .page-content .filter-card > .filter-content.show :is(.filter-label, .form-field > label)::first-letter { text-transform: uppercase; }
.sw-shell .page-content :is(.filter-input, .filter-select) { min-height: 40px; padding: 0 12px; border: 1px solid var(--sw-border-strong); border-radius: 10px; background: #fff; font: 13px var(--sw-font); color: var(--sw-text); box-shadow: none; }
.sw-shell .page-content :is(.filter-input, .filter-select):focus { outline: 2px solid #343a40; outline-offset: -1px; }
.sw-shell .page-content .filter-card > .filter-content.show :is(.filter-input, .filter-select, .modern-input, .form-input) { width: 100%; }
.sw-shell .page-content .filter-card > .filter-content.show .premium-select-trigger { width: 100%; }

/* Botões só com ícone (pesquisar / limpar): passam a ter texto, lado a lado */
.sw-shell .page-content .filter-card > .filter-content.show .filter-actions { display: flex !important; flex-direction: row !important; align-items: center !important; justify-content: flex-start; gap: 10px !important; padding: 4px 0 0 !important; width: 100%; }
.sw-shell .page-content .filter-card > .filter-content.show .filter-actions .btn { width: auto; min-width: 0; padding: 0 18px; }
.sw-shell .page-content .filter-card > .filter-content.show .filter-actions .btn-primary::after { content: "Pesquisar"; }
.sw-shell .page-content .filter-card > .filter-content.show .filter-actions .btn-light::after,
.sw-shell .page-content .filter-card > .filter-content.show .filter-actions .btn-secondary::after,
.sw-shell .page-content .filter-card > .filter-content.show .filter-actions .btn-outline::after { content: "Limpar"; }
.sw-shell .page-content .filter-card > .filter-content.show .filter-actions .btn i { font-size: 13px; }

/* Título do painel */
.sw-shell .page-content .filter-card:has(> .filter-content.show) .filter-title { font-size: 18px !important; display: flex; align-items: center; gap: 10px; }
.sw-shell .page-content .filter-card:has(> .filter-content.show) .filter-title i { font-size: 15px !important; color: var(--sw-muted) !important; }

/* ── Perfil / A minha organização: cabeçalho nas cores do novo layout (creme + laranja, sem o azul-marinho) ── */
.sw-shell .page-content .perfil-header-card { border: 1px solid var(--sw-border); border-radius: 20px; background: #fff; }
.sw-shell .page-content .perfil-header-bg { background: linear-gradient(135deg, #f6f6f7 0%, #edeeef 55%, #dfe0e2 100%); border-bottom: 1px solid #dfe0e2; }
.sw-shell .page-content .perfil-header-bg::after { display: none; }
.sw-shell .page-content .perfil-name { color: var(--sw-text); text-shadow: none; font-weight: 700; letter-spacing: -.01em; }
.sw-shell .page-content .perfil-email { color: var(--sw-muted); }
.sw-shell .page-content .perfil-avatar-large { background: var(--sw-primary); color: #fff; border: 4px solid #fff; box-shadow: 0 8px 24px rgba(40, 44, 49, .22); font-weight: 700; letter-spacing: -.02em; }
.sw-shell .page-content .perfil-info-label { color: var(--sw-muted); }
.sw-shell .page-content .perfil-info-value { color: var(--sw-text); }

/* ══════════════════════════════════════════════════════════════════════════════════════════════════════════
   Tema do novo layout aplicado às cores e cartões "antigos" (análise ao sistema: azul/verde/amarelo sólidos,
   ícones com degradé, sublinhado laranja, códigos monoespaçados). Só aspecto, sem alterar marcação nem lógica.
   ══════════════════════════════════════════════════════════════════════════════════════════════════════════ */

/* ── Cabeçalho de página: linha fina cinzenta em vez do sublinhado laranja ─────────────────────────────── */
.sw-shell .page-content .page-header { border-bottom: 1px solid var(--sw-border); padding-bottom: 16px; margin-bottom: 20px; }
.sw-shell .page-content .page-title { color: var(--sw-text); font-size: 22px; }

/* ── Cartões de estatística (Artigos, Clientes, Stocks, ...): ícone em círculo neutro à esquerda, número à direita ── */
.sw-shell .page-content .stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; margin-bottom: 20px; }
.sw-shell .page-content :is(.stats-card, .stat-card) { display: flex; flex-direction: row; align-items: center; gap: 16px; padding: 18px 22px; background: #fff; border: 1px solid var(--sw-border); border-radius: 20px; box-shadow: none; min-width: 0; }
.sw-shell .page-content .stats-icon, .sw-shell .page-content .stat-icon {
    width: 48px; height: 48px; border-radius: 999px; flex: none; display: inline-flex; align-items: center; justify-content: center;
    background: #fff !important; background-image: none !important; border: 1px solid var(--sw-border-strong); color: #374151 !important; box-shadow: none;
}
.sw-shell .page-content .stats-icon svg, .sw-shell .page-content .stat-icon svg { width: 20px; height: 20px; }
.sw-shell .page-content .stats-icon i, .sw-shell .page-content .stat-icon i { font-size: 17px; color: inherit !important; }
.sw-shell .page-content .stats-content { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sw-shell .page-content :is(.stats-label, .stat-label) { margin: 0 !important; font-size: 13px; color: #374151; }
.sw-shell .page-content :is(.stats-value, .stat-value) { margin: 0 !important; font-size: 22px; font-weight: 700; color: var(--sw-text); letter-spacing: -.01em; }
.sw-shell .page-content .stats-change { font-size: 12px; color: var(--sw-muted); }
/* Destaque semântico mínimo: só o ícone muda de tom para estados negativos */
.sw-shell .page-content .stats-icon.danger, .sw-shell .page-content .stats-icon.error { color: var(--sw-err-text) !important; border-color: #F3B8B2; }

/* Outros ícones "em caixa colorida" (estado, informação) */
.sw-shell .page-content :is(.status-icon, .info-icon, .review-icon, .quick-action-icon) { background: #fff !important; background-image: none !important; border: 1px solid var(--sw-border-strong); color: #374151 !important; }

/* ── Botões de acção da tabela (ver / editar / duplicar / apagar): neutros, só mudam ao passar o rato ──── */
.sw-shell .page-content :is(.action-btn-sm, .btn-icon-action, .btn-table-icon, .btn-action-view, .btn-action-edit, .btn-action-delete, .btn-action-nc) {
    width: 34px; height: 34px; min-height: 0; padding: 0; display: inline-flex; align-items: center; justify-content: center;
    background: #fff !important; background-image: none !important; color: #4B5563 !important; border: 1px solid var(--sw-border-strong); border-radius: 10px; box-shadow: none; cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.sw-shell .page-content :is(.action-btn-sm, .btn-icon-action, .btn-table-icon, .btn-action-view, .btn-action-edit, .btn-action-delete, .btn-action-nc):hover { transform: none; opacity: 1; background: var(--sw-bg) !important; color: var(--sw-text) !important; }
.sw-shell .page-content :is(.action-btn-sm, .btn-icon-action).edit:hover, .sw-shell .page-content .btn-action-edit:hover { background: var(--sw-primary-soft) !important; color: var(--sw-primary-dark) !important; border-color: #dadcdd; }
.sw-shell .page-content :is(.action-btn-sm, .btn-icon-action).delete:hover, .sw-shell .page-content .btn-action-delete:hover { background: var(--sw-err-soft) !important; color: var(--sw-err-text) !important; border-color: #F3B8B2; }
.sw-shell .page-content :is(.action-btn-sm, .btn-icon-action) svg { width: 16px; height: 16px; stroke-width: 1.7; }
.sw-shell .page-content :is(.action-btn-sm, .btn-icon-action) i { font-size: 14px; }

/* ── Botões "de marca" antigos com degradé ou cores soltas ────────────────────────────────────────────── */
.sw-shell .page-content :is(.btn-pesquisar, .btn-pesquisar-modern, .btn-brand, .btn-submit, .btn-submit-premium, .btn-start, .btn-next, .btn-success, .btn-modern-primary, .btn-modern-success, .btn-modern-warning, .btn-modern-info) {
    background: var(--sw-primary) !important; background-image: none !important; border: 1px solid var(--sw-primary); color: #fff; border-radius: 10px; box-shadow: none;
}
.sw-shell .page-content :is(.btn-pesquisar, .btn-pesquisar-modern, .btn-brand, .btn-submit, .btn-submit-premium, .btn-start, .btn-next, .btn-success, .btn-modern-primary, .btn-modern-success, .btn-modern-warning, .btn-modern-info):hover:not(:disabled) { background: var(--sw-primary-hover) !important; transform: none; }
.sw-shell .page-content :is(.btn-modern-secondary, .btn-modern-danger) { background: #fff !important; background-image: none !important; border: 1px solid var(--sw-border-strong); color: var(--sw-text); border-radius: 10px; box-shadow: none; }
.sw-shell .page-content .btn-modern-danger { color: var(--sw-err-text); border-color: #F3B8B2; }

/* ── Cabeçalhos de cartão/modal com degradé -> creme-pêssego ───────────────────────────────────────────── */
.sw-shell :is(.card-header-premium, .background-primary, .modal-header-agenda, .aviso-header, .profile-header-strip, .profile-header-card) { background: linear-gradient(135deg, #f6f6f7 0%, #edeeef 100%) !important; color: var(--sw-text) !important; }
.sw-shell .modal-header { background-image: none; }
/* O texto destes cabeçalhos era branco sobre um degradé escuro; com o fundo creme passa a escuro (títulos e tudo o que foi marcado a branco). */
.sw-shell :is(.card-header-premium, .background-primary, .modal-header-agenda, .aviso-header, .profile-header-strip, .profile-header-card, .perfil-header-bg)
    :is(.text-white, h1, h2, h3, h4, h5, h6, .card-title, [style*="color:white"], [style*="color: white"], [style*="color:#fff"], [style*="color: #fff"], [style*="color:#FFF"], [style*="color: #FFF"]):not(.btn):not(button):not(.badge):not(.btn *):not(button *) { color: var(--sw-text) !important; }

/* ── Estados (badges): azul deixa de existir; "info" e "primary" passam a neutro e laranja-suave ────────── */
.sw-shell .page-content .badge-info { background: #F3F5F7; color: #374151; }
.sw-shell .page-content .badge-primary { background: var(--sw-primary-soft); color: var(--sw-primary-dark); }
.sw-lista-card .badge-info { background: #F3F5F7; color: #374151; }
.sw-lista-card .badge-primary { background: var(--sw-primary-soft); color: var(--sw-primary-dark); }

/* ── Códigos / referências: Inter com algarismos tabulares, num "chip" neutro (sem rosa nem monoespaçado) ── */
.sw-shell .page-content :is(code, .ref-code, .client-code-badge, .codigo, .code) {
    font-family: var(--sw-font) !important; font-variant-numeric: tabular-nums; font-size: 11.5px; font-weight: 600;
    background: #F9FAFB; color: #1F2937; border: 1px solid #E5E7EB; border-radius: 8px; padding: 2px 7px; letter-spacing: 0;
}

/* ── Texto de apoio e links ────────────────────────────────────────────────────────────────────────────── */
.sw-shell .page-content a:not(.btn):not(.nav-item):not(.nav-subitem):not([class*="btn"]):not(.sw-chip):not(.action-btn-sm):not(.pt):not(.sw-bt):not(.sw-setup):not(.sw-kpi-go) { color: var(--sw-primary-dark); }
.sw-shell .page-content .text-primary, .sw-shell .page-content .text-primary-500, .sw-shell .page-content .text-primary-600 { color: var(--sw-primary-dark) !important; }
.sw-shell .page-content .text-gradient { background: none; -webkit-text-fill-color: currentColor; color: var(--sw-primary-dark); }

/* Mais variantes de botões de acção (action-btn-premium, btn-icon, icon-btn-premium): mesmo esquema neutro */
.sw-shell .page-content :is(.action-btn-premium, .btn-icon, .icon-btn-premium) {
    width: 34px; height: 34px; min-height: 0; padding: 0; display: inline-flex; align-items: center; justify-content: center;
    background: #fff !important; background-image: none !important; color: #4B5563 !important; border: 1px solid var(--sw-border-strong) !important; border-radius: 10px; box-shadow: none !important; cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.sw-shell .page-content :is(.action-btn-premium, .btn-icon, .icon-btn-premium):hover { transform: none; background: var(--sw-bg) !important; color: var(--sw-text) !important; }
.sw-shell .page-content :is(.action-btn-premium, .btn-icon).edit:hover { background: var(--sw-primary-soft) !important; color: var(--sw-primary-dark) !important; border-color: #dadcdd !important; }
.sw-shell .page-content :is(.action-btn-premium, .btn-icon).delete:hover { background: var(--sw-err-soft) !important; color: var(--sw-err-text) !important; border-color: #F3B8B2 !important; }
.sw-shell .page-content :is(.action-btn-premium, .btn-icon, .icon-btn-premium) :is(svg, i) { color: inherit !important; }

/* ══ Botões sem qualquer estilo no projecto (apareciam com o aspecto cru do navegador): estilo de base ══ */
/* Ícone / acção de linha: quadrado neutro de 34 px */
.sw-shell :is(.btn-action, .action-btn, .btn-icon-link, .btn-icon-ghost, .card-action-btn, .toolbar-btn, .page-nav-btn, .btn-utility) {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 34px; min-height: 34px; padding: 0 8px;
    background: #fff; color: #4B5563; border: 1px solid var(--sw-border-strong); border-radius: 10px; box-shadow: none; cursor: pointer; font: 500 12px var(--sw-font); text-decoration: none; transition: background .15s, color .15s, border-color .15s;
}
.sw-shell :is(.btn-action, .action-btn, .btn-icon-link, .btn-icon-ghost, .card-action-btn, .toolbar-btn, .page-nav-btn, .btn-utility):hover:not(:disabled) { background: var(--sw-bg); color: var(--sw-text); }
.sw-shell :is(.btn-action, .action-btn, .btn-icon-link, .btn-icon-ghost, .card-action-btn) svg { width: 16px; height: 16px; stroke-width: 1.7; }
.sw-shell :is(.btn-action, .action-btn, .btn-icon-link, .card-action-btn).text-danger, .sw-shell :is(.btn-action, .action-btn, .btn-icon-link, .card-action-btn).delete { color: var(--sw-err-text); }
.sw-shell :is(.btn-action, .action-btn, .btn-icon-link, .card-action-btn).text-danger:hover, .sw-shell :is(.btn-action, .action-btn, .btn-icon-link, .card-action-btn).delete:hover { background: var(--sw-err-soft); border-color: #F3B8B2; color: var(--sw-err-text); }
.sw-shell :is(.btn-action, .action-btn).edit:hover { background: var(--sw-primary-soft); border-color: #dadcdd; color: var(--sw-primary-dark); }
.sw-shell :is(.btn-action, .action-btn, .toolbar-btn, .page-nav-btn):disabled { opacity: .5; cursor: not-allowed; }

/* Fechar de modais */
.sw-shell .modal-close { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; padding: 0; background: transparent; border: 0; border-radius: 999px; color: #6B7280; font-size: 22px; line-height: 1; cursor: pointer; }
.sw-shell .modal-close:hover { background: #F3F5F7; color: var(--sw-text); }

/* Variantes de botão em falta */
.sw-shell .btn-xs { min-height: 28px !important; padding: 0 9px !important; font-size: 11px !important; border-radius: 8px !important; }
.sw-shell .btn-block { display: flex; width: 100%; }
.sw-shell .btn-action-primary { background: var(--sw-primary); color: #fff; border-color: var(--sw-primary); }
.sw-shell .btn-action-primary:hover:not(:disabled) { background: var(--sw-primary-hover); color: #fff; }
.sw-shell :is(.btn-light-danger, .btn-remove-file-v2) { background: var(--sw-err-soft); color: var(--sw-err-text); border: 1px solid #F3B8B2; border-radius: 8px; cursor: pointer; }

/* Os botões "outline" do Bootstrap trazem azul/vermelho puros: passam à paleta */
.sw-shell .page-content .btn-outline-primary { color: var(--sw-primary-dark); border-color: #dadcdd; background: #fff; }
.sw-shell .page-content .btn-outline-primary:hover { background: var(--sw-primary-soft); color: var(--sw-primary-dark); border-color: #dadcdd; }
.sw-shell .page-content .btn-outline-danger { color: var(--sw-err-text); border-color: #F3B8B2; background: #fff; }
.sw-shell .page-content .btn-outline-danger:hover { background: var(--sw-err-soft); color: var(--sw-err-text); border-color: #F3B8B2; }
.sw-shell .page-content .btn-warning { background: var(--sw-warn-soft); color: var(--sw-warn-text); border: 1px solid #F7D9A6; }
.sw-shell .page-content .btn-dark { background: #1F2937; color: #fff; border: 1px solid #1F2937; }

/* Menu do utilizador: o avatar e o cabeçalho tinham azul/roxo (MainLayout.razor.css); passam ao mesmo aspecto do avatar do topo */
.sw-shell .topbar .profile-dropdown .profile-dropdown-header { background: var(--sw-bg) !important; background-image: none !important; border-bottom: 1px solid var(--sw-border); }
.sw-shell .topbar .profile-dropdown .profile-dropdown-avatar { background: #F3F5F7 !important; background-image: none !important; border: 1px solid var(--sw-border-strong) !important; color: var(--sw-text) !important; box-shadow: none !important; font-weight: 600; }
.sw-shell .topbar .profile-dropdown .profile-dropdown-info strong { color: var(--sw-text); }
.sw-shell .topbar .profile-dropdown .profile-dropdown-item:hover { background: #F3F5F7; color: var(--sw-text); }
.sw-shell .topbar .user-menu.active, .sw-shell .topbar .user-menu:hover { background: rgba(0, 0, 0, .04) !important; }

/* "Filtros" na barra de resultados: o cartão de filtros fechado desaparece (o botão vive em .result-header) */
.sw-shell .page-content .filter-card[data-sw-moved]:not(:has(> .filter-content.show)) { display: none !important; }
.sw-shell .page-content .result-header > .sw-btn-filtros-js { order: -1; margin-right: 4px; flex: none; }

/* Ícone "PDF" vermelho nas linhas das tabelas -> documento em contorno, neutro (laranja ao passar o rato) */
.sw-shell .page-content td .fa-file-pdf, .sw-shell .page-content td .fa-file-pdf.fas, .sw-shell .page-content td .fa-file-pdf.far { font-weight: 400 !important; color: #4B5563 !important; font-size: 1rem !important; }
.sw-shell .page-content td .fa-file-pdf::before { content: "\f15c"; }
.sw-shell .page-content td :is(button, a):hover .fa-file-pdf { color: var(--sw-primary-dark) !important; }

/* Clientes (cartões): botões de acção neutros e caixa de indicadores */
.sw-shell .client-card .action-btn { width: 32px; height: 32px; background: #fff !important; color: var(--sw-text) !important; border: 1px solid var(--sw-border-strong) !important; border-radius: 10px; }
.sw-shell .client-card .action-btn:hover { background: var(--sw-bg) !important; opacity: 1; }
.sw-shell .client-card .action-btn.edit:hover { background: var(--sw-primary-soft) !important; color: var(--sw-primary-dark) !important; }
.sw-shell .client-card .action-btn.delete:hover { background: var(--sw-err-soft) !important; color: var(--sw-err-text) !important; }
.sw-shell .client-card .actions-buttons { gap: 6px; }
.sw-shell .client-card .client-card-actions { width: 84px; }

/* Clientes (cartões): lado esquerdo */
.sw-shell .client-card { align-items: stretch; gap: 0; padding: 18px 8px 18px 20px; }
.sw-shell .client-card-avatar { min-width: 112px; padding: 0 20px 0 0; gap: 8px; justify-content: center; }
.sw-shell .client-card .avatar-image { width: 56px; height: 56px; overflow: hidden; border: 1px solid var(--sw-border); background: #F3F5F7; }
.sw-shell .client-card .client-code { font-size: 12px; font-weight: 600; color: var(--sw-text); background: #F3F5F7; border-radius: 999px; padding: 2px 10px; }
.sw-shell .client-card-info { padding: 0 24px; display: flex; flex-direction: column; justify-content: center; gap: 12px; min-width: 0; }
.sw-shell .cc-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sw-shell .cc-nome { font-size: 15px; font-weight: 700; color: var(--sw-text); letter-spacing: -.01em; }
.sw-shell .client-card .client-type-badge { margin: 0; font-size: 11px; padding: 2px 8px; border-radius: 999px; }
.sw-shell .cc-grid { display: grid; grid-template-columns: repeat(3, minmax(120px, max-content)); gap: 10px 36px; }
.sw-shell .cc-grid > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.sw-shell .cc-grid .cc-wide { grid-column: 1 / -1; }
.sw-shell .cc-t { font-size: 13px; color: var(--sw-text); overflow-wrap: anywhere; }
@media (max-width: 900px) { .sw-shell .cc-grid { grid-template-columns: repeat(2, 1fr); } }

/* Fornecedores: cartões (mesmo esquema dos clientes) */
.sw-shell .fo-lista { display: flex; flex-direction: column; gap: 12px; }
.sw-shell .fo-card { display: flex; align-items: stretch; background: #fff; border: 1px solid var(--sw-border); border-radius: 14px; padding: 18px 8px 18px 20px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.sw-shell .fo-avatar { min-width: 112px; padding-right: 20px; border-right: 1px solid var(--sw-border); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.sw-shell .fo-ini { width: 56px; height: 56px; border-radius: 50%; background: #F3F5F7; border: 1px solid var(--sw-border); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 17px; color: var(--sw-text); }
.sw-shell .fo-cod { font-size: 12px; font-weight: 600; color: var(--sw-text); background: #F3F5F7; border-radius: 999px; padding: 2px 10px; }
.sw-shell .fo-info { flex: 1; min-width: 0; padding: 0 24px; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.sw-shell .fo-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sw-shell .fo-nome { font-size: 15px; font-weight: 700; color: var(--sw-text) !important; text-decoration: none; letter-spacing: -.01em; }
.sw-shell .fo-nome:hover { text-decoration: underline; }
.sw-shell .fo-sub { font-size: 12px; color: var(--sw-muted, #6b7280); margin-top: -6px; }
.sw-shell .fo-grid { display: grid; grid-template-columns: repeat(3, minmax(120px, max-content)); gap: 10px 36px; }
.sw-shell .fo-grid > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.sw-shell .fo-l { font-size: 11px; color: #6b7280; }
.sw-shell .fo-t { font-size: 13px; color: var(--sw-text); overflow-wrap: anywhere; }
.sw-shell .fo-stats { display: flex; flex-direction: column; justify-content: center; gap: 10px; min-width: 200px; padding: 0 24px; border-left: 1px solid var(--sw-border); }
.sw-shell .fo-stat { display: flex; flex-direction: column; gap: 1px; }
.sw-shell .fo-v { font-size: 14px; font-weight: 600; color: var(--sw-text); font-variant-numeric: tabular-nums; }
.sw-shell .fo-v.warn { color: #24282c; }
.sw-shell .fo-acts { width: 84px; padding: 0 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.sw-shell .fo-btns { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.sw-shell .fo-btns .action-btn { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; background: #fff; color: var(--sw-text); border: 1px solid var(--sw-border-strong); border-radius: 10px; cursor: pointer; padding: 0; text-decoration: none; }
.sw-shell .fo-btns .action-btn:hover { background: var(--sw-bg); }
.sw-shell .fo-btns .action-btn.edit:hover { background: var(--sw-primary-soft); color: var(--sw-primary-dark); }
.sw-shell .fo-btns .action-btn.delete:hover { background: var(--sw-err-soft); color: var(--sw-err-text); }
.sw-shell .fo-novo { width: auto !important; flex: 0 0 auto; margin-left: auto; white-space: nowrap; }
@media (max-width: 900px) { .sw-shell .fo-card { flex-wrap: wrap; gap: 14px; } .sw-shell .fo-grid { grid-template-columns: repeat(2, 1fr); } .sw-shell .fo-stats { border-left: 0; padding: 0; } }
.sw-stat .txt small { font-size: 12px; color: #6b7280; }
.sw-shell .sw-stats { margin-bottom: 16px; }
.sw-shell .card.p-xl.text-center { align-items: center; }

/* Estados vazios: o botão de acção nunca estica à largura do cartão */
.sw-shell .page-content :is(.card.text-center, .card[style*="text-align:center"], .card[style*="text-align: center"], .empty-state, .empty-state-card, .empty-card) { align-items: center; }
.sw-shell .page-content :is(.card.text-center, .card[style*="text-align:center"], .card[style*="text-align: center"], .empty-state, .empty-state-card, .empty-card) > :is(.btn, button, a.btn):not(.btn-block) { width: auto; align-self: center; flex: 0 0 auto; margin-left: auto; margin-right: auto; }

/* Menu fechado: logótipo mais pequeno */
.sw-shell .sidebar.collapsed .sw-logo-img { height: 30px !important; max-width: 100%; }
.sw-shell .sidebar.collapsed .sw-logo-img { height: auto !important; width: 64px; max-width: calc(100% - 32px); margin: 0 auto; }
.sw-shell .sidebar.collapsed .sidebar-brand-link { padding-left: 16px; padding-right: 16px; justify-content: center; }
.sw-shell .sidebar.collapsed .sw-logo-img { width: 60px !important; min-width: 60px; max-width: none !important; height: auto !important; margin: 0 auto; display: block; }
.sw-shell .sidebar.collapsed .sidebar-brand-link { padding: 0 !important; width: 100%; display: flex; justify-content: center; }
.sw-shell .sidebar.collapsed .sidebar-header .sidebar-brand-link .sw-logo-img { width: 50px !important; min-width: 0 !important; height: auto !important; margin: 0 auto !important; }
.sw-shell .sidebar.collapsed .sidebar-header { padding: 16px 12px; }
.sw-shell .sidebar.collapsed .sidebar-header .sidebar-brand-link { align-items: center !important; justify-content: center; width: 100%; padding: 0 !important; overflow: hidden; }
.sw-shell .sidebar.collapsed .sidebar-header .sidebar-brand-link .sw-logo-img { width: auto !important; max-width: calc(100% - 24px) !important; }
.sw-shell .sidebar.collapsed .sidebar-header .sidebar-brand-link .sw-logo-img { max-width: none !important; width: auto !important; height: 33px !important; }
.sw-shell .sidebar.collapsed .sidebar-header .sidebar-brand-link { overflow: visible; }

/* Logótipo segue a largura real do menu (cobre o menu estreito mesmo sem a classe "collapsed") */
.sw-shell .sidebar-header { container-type: inline-size; container-name: sw-sbh; }
@container sw-sbh (max-width: 110px) {
    .sidebar-brand-link { align-items: center !important; justify-content: center; width: 100%; padding: 0 !important; }
    .sidebar-brand-link .sw-logo-img { height: 33px !important; width: auto !important; max-width: none !important; margin: 0 auto; }
}

/* Menu fechado: cabeçalho a centrar o logótipo (flex no próprio cabeçalho) */
.sw-shell .sidebar.collapsed .sidebar-header { display: flex !important; justify-content: center !important; align-items: center !important; padding: 18px 0 10px !important; width: 100%; box-sizing: border-box; }
.sw-shell .sidebar.collapsed .sidebar-header .sidebar-brand-link { flex: 0 0 auto !important; width: auto !important; margin: 0 !important; padding: 0 !important; display: flex !important; justify-content: center !important; }
.sw-shell .sidebar.collapsed .sidebar-header .sidebar-brand-link .sw-logo-img { height: 30px !important; width: auto !important; margin: 0 !important; flex: none; }
.sw-shell .sidebar.collapsed .sidebar-header .sidebar-brand-link .sw-logo-img { width: 56px !important; height: auto !important; max-width: 56px !important; }
.sw-shell .sidebar.collapsed .sidebar-header { padding-left: 24px !important; padding-right: 24px !important; }
.sw-shell .sidebar.collapsed .sidebar-header .sidebar-brand-link .sw-logo-img { padding: 10px !important; }

/* Botão PT/EN na barra de topo */
.sw-shell .topbar .sw-lang-top { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; font: 600 13px var(--sw-font); width: auto; }

/* ── Abrir/fechar menu: botão dentro do menu, junto ao logo (como no AppyPay) ── */
.sw-shell .sidebar-header { position: relative; }
.sw-shell .sw-side-toggle { position: absolute; top: 22px; right: 16px; width: 36px; height: 36px; padding: 0; display: inline-flex; align-items: center; justify-content: center; background: #fff; color: var(--sw-text); border: 1px solid var(--sw-border-strong); border-radius: 10px; cursor: pointer; }
.sw-shell .sw-side-toggle:hover { background: var(--sw-bg); }
.sw-shell .sidebar.collapsed .sidebar-header { flex-direction: column; gap: 10px; }
.sw-shell .sidebar.collapsed .sw-side-toggle { position: static; }
.sw-shell .sidebar-brand-link { padding-right: 0; }
@media (min-width: 1025px) { .sw-shell .topbar-toggle { display: none; } }
@media (max-width: 1024px) { .sw-shell .sw-side-toggle { display: none; } }

/* ── Botões: sem formato "pílula" nem sombra, igual em todo o sistema ──────── */
.sw-shell .btn.rounded-pill, .sw-shell .btn[class*="rounded-"], .sw-shell .btn-action-primary { border-radius: 10px !important; }
.sw-shell .btn.btn-sm.rounded-pill { border-radius: 9px !important; }
.sw-shell .btn.shadow, .sw-shell .btn.shadow-sm, .sw-shell .btn.shadow-lg, .sw-shell .btn.shadow-glow, .sw-shell .btn-action-primary.shadow-glow { box-shadow: none !important; }
.sw-shell .btn.btn-primary.px-4, .sw-shell .btn.btn-primary.px-5 { padding-left: 18px; padding-right: 18px; }

/* ── Etiquetas de tipo e estado: cores da marca (SWEG, BCS, ...) e tipo de letra do tema ─── */
.sw-shell .page-content .badge-tipo, .sw-shell .page-content .client-type-badge {
    background: #F3F5F7; color: var(--sw-text); border: 1px solid var(--sw-border); border-radius: 999px;
    font: 500 12px var(--sw-font); text-transform: none; letter-spacing: 0; padding: 3px 10px;
}
.sw-shell .page-content .badge-soft {
    border-radius: 999px; font: 600 12px var(--sw-font); text-transform: none; letter-spacing: 0; padding: 3px 10px; border: 0;
}
.sw-shell .page-content .badge-soft.active { background: var(--color-primary-100, var(--sw-primary-soft)); color: var(--color-primary-800, var(--sw-primary-dark)); }
.sw-shell .page-content .badge-soft.inactive { background: #F3F5F7; color: var(--sw-muted); }

/* ── Dashboard de Recursos Humanos ─────────────────────────────────────────── */
.sw-shell .rh-linha { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; }
.sw-shell .rh-linha b { font-weight: 600; color: var(--sw-text); }
.sw-shell .rh-tile { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--sw-border); background: #fff; color: var(--sw-text); text-decoration: none; transition: border-color .15s, background .15s; }
.sw-shell .rh-tile:hover { border-color: var(--sw-primary); background: var(--sw-primary-soft); }
.sw-shell .rh-tile-t { min-width: 0; display: flex; flex-direction: column; }
.sw-shell .rh-tile-t b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-shell .rh-tile-t small { font-size: 12px; color: var(--sw-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Dashboard de Contabilidade ────────────────────────────────────────────── */
.sw-shell .co-grupos { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.sw-shell .co-link { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border-radius: 10px; color: var(--sw-text); font-size: 14px; text-decoration: none; }
.sw-shell .co-link svg { color: var(--sw-muted); }
.sw-shell .co-link:hover { background: var(--sw-primary-soft); color: var(--sw-primary-dark); }

.sw-shell .page-content h2.sw-sec { margin: 8px 0 0; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; display: flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 600; letter-spacing: 0; text-transform: none; color: #374151; }
.sw-shell .page-content h2.sw-sec::after { content: ""; flex: 1; height: 1px; background: var(--sw-border); }

/* ── Condomínios: cartão do condomínio ─────────────────────────────────────── */
.sw-shell .gc-cond-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.sw-shell .gc-kpi { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border-radius: 16px; background: var(--sw-bg); border: 1px solid var(--sw-border); font-size: 14px; }
.sw-shell .gc-kpi strong { font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.sw-shell .gc-kpi strong small { font-size: 14px; font-weight: 600; letter-spacing: 0; opacity: .7; }
.sw-shell .gc-cond-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px 24px; padding-top: 20px; border-top: 1px solid var(--sw-border); font-size: 14px; }
.sw-shell .gc-cond-info > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sw-shell .gc-cond-info b { font-weight: 600; overflow-wrap: anywhere; }

.sw-shell .fc-pos { color: var(--sw-ok-text); font-weight: 600; }
.sw-shell .fc-neg { color: var(--sw-err-text); font-weight: 600; }

/* ── Contabilidade: cartões dos meses ──────────────────────────────────────── */
.sw-shell .co-meses { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.sw-shell .co-mes { padding: 22px 24px; display: flex; flex-direction: column; gap: 12px; }
.sw-shell .co-mes-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sw-shell .co-mes-h strong { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }

.sw-shell .sw-tb th:first-child { border-radius: 10px 0 0 10px; }
.sw-shell .sw-tb th:last-child { border-radius: 0 10px 10px 0; }

/* ── Separadores (tabs) em pílulas, em todo o sistema ──────────────────────── */
.sw-shell .page-content .tab-btn {
    display: inline-flex !important; align-items: center; gap: 8px; width: auto !important; min-height: 40px; padding: 0 18px !important; margin: 0 !important;
    border: 1px solid var(--sw-border-strong) !important; border-radius: 999px !important; background: #fff !important; box-shadow: none !important;
    color: var(--sw-muted) !important; font: 600 14px var(--sw-font) !important; white-space: nowrap; cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.sw-shell .page-content .tab-btn:hover { background: var(--sw-bg) !important; color: var(--sw-text) !important; }
.sw-shell .page-content .tab-btn.active, .sw-shell .page-content .tab-btn.tab-active,
.sw-shell .page-content .tab-btn.active:hover, .sw-shell .page-content .tab-btn.tab-active:hover {
    background: var(--sw-primary-soft) !important; color: var(--sw-primary-dark) !important; border-color: var(--sw-primary-ring) !important;
}
/* barra que contém os separadores */
.sw-shell .page-content :has(> .tab-btn) {
    display: flex !important; flex-wrap: wrap; gap: 8px; background: transparent !important; border-bottom: 0 !important; overflow: visible !important;
}
/* cartão que só serve de moldura à barra (padding 0): deixa de ter caixa */
.sw-shell .page-content .card[style*="padding:0"]:has(> div > .tab-btn),
.sw-shell .page-content .card[style*="padding: 0"]:has(> div > .tab-btn) {
    background: transparent !important; border: 0 !important; box-shadow: none !important; border-radius: 0 !important; padding: 0 !important; overflow: visible !important;
}
/* cartões de configuração com a barra dentro do próprio cartão */
.sw-shell .page-content .config-card > .tabs-header,
.sw-shell .page-content .card > .card-tabs {
    padding: 16px 20px !important; border-bottom: 1px solid var(--sw-border) !important;
}

/* Coluna de acções fixa à direita: largura própria e botões em duas linhas, para nunca ficarem por cima do texto das outras colunas */
.sw-shell .page-content :is(th, td).sticky-col-right { width: 208px !important; min-width: 208px !important; max-width: 208px !important; box-sizing: border-box; }
.sw-shell .page-content td.sticky-col-right { background: #fff !important; }
.sw-shell .page-content td.sticky-col-right > :is(.flex, div) { display: flex !important; flex-wrap: wrap !important; justify-content: flex-start !important; gap: 6px !important; align-items: center; }

/* ── Membros / candidatos / cartões (vista de cartões): novo desenho, partilhado por todas as páginas do módulo ── */
.sw-shell .page-content .membro-detailed-card {
    display: flex; flex-wrap: wrap; background: #fff; border: 1px solid var(--sw-border); border-radius: 20px; margin-bottom: 0; box-shadow: none; min-height: 0; overflow: hidden; transition: border-color .15s;
}
.sw-shell .page-content .membro-detailed-card:hover { transform: none; box-shadow: none; border-color: var(--sw-primary-ring); }

.sw-shell .page-content .membro-card-left { width: 160px; flex: none; background: var(--sw-bg); border-right: 1px solid var(--sw-border); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px 14px; }
.sw-shell .page-content .membro-type-header { width: auto; max-width: 100%; background: var(--sw-primary-soft); color: var(--sw-primary-dark); border-radius: 999px; padding: 5px 12px; font: 600 12px var(--sw-font); text-transform: none; text-align: center; }
.sw-shell .page-content .membro-photo { flex: none; width: 76px; height: 76px; padding: 0; border-radius: 999px; background: #EEF1F4; color: #9CA3AF; font-size: 2rem; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.sw-shell .page-content .membro-photo img { width: 100%; height: 100%; object-fit: cover; }
.sw-shell .page-content .membro-code-footer { width: auto; background: #fff; color: var(--sw-text); border: 1px solid var(--sw-border-strong); border-radius: 8px; padding: 4px 10px; font: 600 12px var(--sw-font); font-variant-numeric: tabular-nums; }

.sw-shell .page-content .membro-card-main { flex: 2 1 380px; min-width: 0; padding: 22px 26px; border-right: 1px solid var(--sw-border); }
.sw-shell .page-content .membro-info-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 22px; font-size: 14px; }
.sw-shell .page-content .info-item { color: var(--sw-text); line-height: 1.35; overflow-wrap: anywhere; }
.sw-shell .page-content .info-item strong { display: block; margin: 0 0 2px; color: var(--sw-muted); font-size: 12px; font-weight: 500; }
.sw-shell .page-content .info-item.full-width { grid-column: span 3; }

.sw-shell .page-content .membro-card-stats { flex: 1 1 240px; min-width: 0; padding: 20px; border-right: 1px solid var(--sw-border); display: flex; flex-direction: column; gap: 8px; background: #fff; }
.sw-shell .page-content .stat-btn-group { display: flex; gap: 8px; }
.sw-shell .page-content .stat-btn { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 8px 12px; background: #fff; border: 1px solid var(--sw-border); border-radius: 10px; font-size: 13px; color: var(--sw-text); cursor: pointer; transition: background .15s, border-color .15s; }
.sw-shell .page-content .stat-btn:hover { background: var(--sw-primary-soft); border-color: var(--sw-primary-ring); }
.sw-shell .page-content .stat-btn .count { background: #F3F5F7; padding: 0 8px; border-radius: 6px; font-weight: 600; color: var(--sw-text); }
.sw-shell .page-content .stat-btn i { color: var(--sw-muted); }

.sw-shell .page-content .membro-card-quota { flex: 1.2 1 240px; min-width: 0; padding: 0; border-right: 1px solid var(--sw-border); display: flex; flex-direction: column; }
.sw-shell .page-content .quota-tabs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px; padding: 14px 14px 0; border-bottom: 0; }
.sw-shell .page-content .quota-tabs span { padding: 8px 6px; text-align: center; font-size: 13px; color: var(--sw-primary-dark); font-weight: 600; border: 0; border-radius: 8px; cursor: pointer; }
.sw-shell .page-content .quota-tabs span:hover { background: var(--sw-primary-soft); }
.sw-shell .page-content .quota-validity { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px 20px 20px; gap: 8px; }
.sw-shell .page-content .quota-validity .label { font-size: 12px; font-weight: 500; color: var(--sw-muted); margin: 0; }
.sw-shell .page-content .status-box { background: var(--sw-warn-soft); color: var(--sw-warn-text); padding: 10px 14px; border-radius: 10px; font-size: 13px; font-weight: 600; text-align: center; width: 100%; text-transform: none; }

.sw-shell .page-content .membro-card-right { width: 190px; flex: none; margin-left: auto; display: flex; flex-direction: column; background: var(--sw-bg); }
.sw-shell .page-content .options-header { text-align: left; padding: 16px 18px 0; font: 500 12px var(--sw-font); color: var(--sw-muted); border-bottom: 0; }
.sw-shell .page-content .options-icons { padding: 10px 14px; display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 6px; }
.sw-shell .page-content .admission-section { padding: 6px 18px 18px; display: flex; flex-direction: column; gap: 8px; }
.sw-shell .page-content .admission-section .label { font-size: 12px; font-weight: 500; color: var(--sw-muted); margin: 0; text-align: left; }
.sw-shell .page-content .date-badge { background: #fff; color: var(--sw-text); border: 1px solid var(--sw-border-strong); border-radius: 8px; padding: 6px 10px; font: 600 13px var(--sw-font); text-align: center; font-variant-numeric: tabular-nums; }
.sw-shell .page-content .btn-card-action { background: #fff; color: var(--sw-text); border: 1px solid var(--sw-border-strong); border-radius: 10px; padding: 7px 10px; font: 600 13px var(--sw-font); cursor: pointer; width: 100%; transition: background .15s; }
.sw-shell .page-content .btn-card-action:hover { background: var(--sw-primary-soft); color: var(--sw-primary-dark); border-color: var(--sw-primary-ring); }
@media (max-width: 1200px) { .sw-shell .page-content .membro-card-main { border-right: 0; } .sw-shell .page-content .membro-card-right { width: 100%; flex-direction: row; flex-wrap: wrap; align-items: center; } }

/* Caixas de estado das avaliações dos candidatos: tons suaves do tema */
.sw-shell .page-content .status-box-modern { border-radius: 10px; box-shadow: none; }
.sw-shell .page-content .status-box-modern.red { background: var(--sw-err-soft) !important; color: var(--sw-err-text) !important; border-color: var(--sw-err-soft) !important; }
.sw-shell .page-content .status-box-modern.yellow { background: var(--sw-warn-soft) !important; color: var(--sw-warn-text) !important; border-color: var(--sw-warn-soft) !important; }
.sw-shell .page-content .status-box-modern.green { background: var(--sw-ok-soft) !important; color: var(--sw-ok-text) !important; border-color: var(--sw-ok-soft) !important; }
.sw-shell .page-content .status-box-modern * { color: inherit !important; }

/* Outras colunas de acções (Estagiários, listagens sem coluna fixa): botões em duas linhas em vez de sobreporem as colunas vizinhas */
.sw-shell .page-content :is(th, td).actions-col { width: 208px !important; min-width: 208px !important; max-width: 208px !important; box-sizing: border-box; }
.sw-shell .page-content td.actions-col .action-group { flex-wrap: wrap !important; gap: 6px !important; }
.sw-shell .page-content table td > .flex.gap-xs { flex-wrap: wrap !important; }

/* ── Quotas de um membro ───────────────────────────────────────────────────── */
.sw-shell .quotas-membros { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.sw-shell .quotas-membro { display: flex; align-items: center; gap: 16px; padding: 18px 20px; cursor: pointer; transition: border-color .15s, background .15s; }
.sw-shell .quotas-membro:hover { border-color: var(--sw-primary-ring); background: var(--sw-primary-soft); }
.sw-shell .quotas-nome { font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sw-shell .quotas-avatar { flex: none; width: 52px; height: 52px; border-radius: 999px; background-color: #EEF1F4; background-size: cover; background-position: center; }
.sw-shell .quotas-avatar-lg { width: 84px; height: 84px; }
.sw-shell .quotas-pagar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px 22px; border-radius: 16px; background: var(--sw-primary-soft); border: 1px solid var(--sw-primary-ring); }

/* ── Cartão de entidade (clientes, contas correntes de membros...): base global, para o mesmo desenho em qualquer página ── */
.sw-shell .client-card { background: #fff; border: 1px solid var(--sw-border); border-radius: 20px; display: flex; position: relative; box-shadow: none; margin-bottom: 0; }
.sw-shell .client-card-avatar { display: flex; flex-direction: column; align-items: center; border-right: 1px solid var(--sw-border); }
.sw-shell .client-card .avatar-image { display: flex; align-items: center; justify-content: center; border-radius: 50%; color: #9CA3AF; }
.sw-shell .client-card-info { flex: 1; min-width: 0; }
.sw-shell .client-card-stats { display: grid; grid-template-columns: repeat(2, minmax(120px, 1fr)); gap: 12px 28px; align-content: center; min-width: 340px; padding: 0 24px; border-left: 1px solid var(--sw-border); }
.sw-shell .cc-stat { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.sw-shell .cc-l { font-size: 11px; color: var(--sw-muted); }
.sw-shell .cc-v { font-size: 14px; font-weight: 600; color: var(--sw-text); font-variant-numeric: tabular-nums; }
.sw-shell .cc-v.warn { color: var(--sw-warn-text); }
.sw-shell .cc-v.err { color: var(--sw-err-text); }
.sw-shell .client-card-actions { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.sw-shell .client-card .actions-label { font-size: 11px; color: var(--sw-muted); text-transform: uppercase; letter-spacing: .04em; }
.sw-shell .client-card .actions-buttons { display: flex; flex-wrap: wrap; justify-content: center; }
.sw-shell .client-card .action-btn { display: flex; align-items: center; justify-content: center; cursor: pointer; text-decoration: none; padding: 0; }
@media (max-width: 1100px) { .sw-shell .client-card { flex-wrap: wrap; gap: 12px; } .sw-shell .client-card-stats { min-width: 0; border-left: 0; padding: 0; flex: 1 1 100%; } .sw-shell .client-card-avatar { border-right: 0; } }

/* ── Cartões de membros: afinação (informação compacta, indicadores em grelha regular) ── */
.sw-shell .page-content .membro-card-left { width: 150px; gap: 12px; padding: 20px 12px; }
.sw-shell .page-content .membro-card-main { padding: 18px 22px; }
.sw-shell .page-content .membro-info-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 22px; font-size: 13px; }
.sw-shell .page-content .info-item { display: flex; flex-wrap: wrap; gap: 0 6px; align-items: baseline; }
.sw-shell .page-content .info-item strong { display: inline; margin: 0; font-size: 12.5px; font-weight: 500; color: var(--sw-muted); }
.sw-shell .page-content .info-item.full-width { grid-column: 1 / -1; }
.sw-shell .page-content .membro-card-stats { flex: 0 1 280px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-content: start; padding: 18px; }
.sw-shell .page-content .membro-card-stats .stat-btn-group { display: contents; }
.sw-shell .page-content .membro-card-stats .stat-btn { flex: none; min-height: 38px; padding: 6px 10px; font-size: 12.5px; }
.sw-shell .page-content .membro-card-stats > .stat-btn { grid-column: 1 / -1; }
.sw-shell .page-content .stat-btn > span:first-child { white-space: nowrap; }
.sw-shell .page-content .membro-card-quota { flex: 0 1 260px; }
.sw-shell .page-content .quota-tabs { padding: 14px 14px 0; }
.sw-shell .page-content .quota-validity { justify-content: flex-start; padding-top: 22px; }

/* Cartão de membro (cópia do desenho do cartão de clientes): indicador largo */
.sw-shell .client-card-stats .cc-stat.cc-wide { grid-column: 1 / -1; }
.sw-shell .client-card .action-btn i { font-size: 14px; }

/* Aviso dentro da página (pagamentos de quotas, etc.) */
.sw-shell .quotas-aviso { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 14px; font-size: 14px; font-weight: 600; }
.sw-shell .quotas-aviso.ok { background: var(--sw-ok-soft); color: var(--sw-ok-text); }
.sw-shell .quotas-aviso.err { background: var(--sw-err-soft); color: var(--sw-err-text); }
.sw-shell .quotas-aviso span { flex: 1; }
.sw-shell .quotas-aviso-x { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 14px; padding: 4px 8px; border-radius: 8px; }
.sw-shell .quotas-aviso-x:hover { background: rgba(0,0,0,.06); }

/* Cartões de candidatos (cartão de entidade com acções por texto) */
.sw-shell .cand-card .client-card-actions.cand-acoes { width: 200px; padding: 0 16px; align-items: stretch; }
.sw-shell .cand-card .cand-acoes .actions-buttons { justify-content: flex-start; }
.sw-shell .cand-card .cand-botoes { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.sw-shell .cand-card .cand-botoes .btn { width: 100%; }
.sw-shell .cand-card .client-card-stats { min-width: 320px; }
.sw-shell .cand-aviso { margin-top: 10px; padding: 8px 12px; border-radius: 10px; background: var(--sw-warn-soft); color: var(--sw-warn-text); font-size: 13px; }
.sw-shell .cand-aval { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--sw-bg); border: 1px solid var(--sw-border); font-size: 13px; display: flex; flex-direction: column; gap: 2px; }
.sw-shell .cand-aval b { font-weight: 600; }
@media (max-width: 1100px) { .sw-shell .cand-card .client-card-actions.cand-acoes { width: 100%; padding: 0; } }

/* Listagens da associação */
.sw-shell .listagens-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.sw-shell .listagens-tile { text-align: left; padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; font: inherit; color: inherit; transition: border-color .15s, background .15s; }
.sw-shell .listagens-tile strong { font-size: 16px; font-weight: 600; }
.sw-shell .listagens-tile span { font-size: 13px; }
.sw-shell .listagens-tile:hover { border-color: var(--sw-primary-ring); }
.sw-shell .listagens-tile.on { background: var(--sw-primary-soft); border-color: var(--sw-primary-ring); }

/* ── Listas de comunicações (newsletters, SMS): chips, acções e menu "…" ───────────────────────────────── */
    .nl-cred { display:inline-flex; align-items:center; gap:8px; padding:0 14px; min-height:44px; border:1px solid var(--sw-border, #E8EBEF); border-radius:10px; background:#fff; font-size:14px; color:#374151; }
    .nl-cred i { color: var(--sw-primary, #282c31); }
    .nl-cred strong { color: var(--sw-text, #1F2937); }
    .sw-lista-card .btn-toggle { display:inline-flex; align-items:center; gap:8px; min-height:44px; padding:0 14px; border:1px solid var(--sw-border-strong, #E1E5EA); border-radius:10px; background:#fff; font:600 14px var(--sw-font, inherit); color:#374151; cursor:pointer; }
    .sw-lista-card .btn-toggle:hover { background: var(--sw-bg, #FAF8F5); }
    .nl-filtros { display:grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap:16px 20px; align-items:end; padding:18px 24px; border-bottom:1px solid #F0F2F5; background:#FCFBF9; }
    .nl-filtros .form-field > label { display:block; font-size:13px; font-weight:500; color:#4B5563; margin-bottom:6px; }
    .nl-filtros-acoes { display:flex; gap:10px; }
    .nl-vazio { text-align:center; color: var(--sw-muted, #6B7280); padding:40px 16px !important; }
    .nl-nome { font-weight:600; color: var(--sw-text, #1F2937); }
    .nl-sub { font-size:13px; color: var(--sw-muted, #6B7280); margin-top:2px; }
    .nl-meta { margin-left:8px; padding:1px 8px; border-radius:999px; background:#F3F5F7; color:#4B5563; font-size:12px; }
    .nl-res { display:flex; flex-wrap:wrap; gap:6px; }
    .nl-chip { display:inline-flex; align-items:center; gap:6px; padding:3px 10px; border-radius:999px; background:#F3F5F7; color:#374151; font-size:12.5px; font-weight:600; border:0; }
    .nl-chip.ok { background: var(--sw-ok-soft, #DDF5E4); color: var(--sw-ok-text, #1B7A3A); }
    .nl-chip.wait { background: var(--sw-warn-soft, #FEF0D9); color: var(--sw-warn-text, #1e2225); }
    .nl-chip.err { background: var(--sw-err-soft, #FDE2E2); color: var(--sw-err-text, #B42318); }
    .nl-chip.zero { background:#F3F5F7; color:#9CA3AF; }
    button.nl-chip.err { cursor:pointer; }
    button.nl-chip.err:hover { filter:brightness(.95); }
    .nl-data { white-space:nowrap; font-variant-numeric:tabular-nums; color:#4B5563; }
    .nl-acoes { display:flex; justify-content:flex-end; align-items:center; gap:8px; }
    .nl-ico { width:38px; height:38px; display:inline-flex; align-items:center; justify-content:center; border:1px solid var(--sw-border-strong, #E1E5EA); border-radius:10px; background:#fff; color:#374151; cursor:pointer; text-decoration:none; }
    .nl-ico:hover { background: var(--sw-primary-soft, #f6f6f7); color: var(--sw-primary-dark, #1e2225); border-color:#dadcdd; }
    .nl-ico.warn { color: var(--sw-warn-text, #1e2225); }
    .nl-enviar { display:inline-flex; align-items:center; gap:8px; min-height:38px; padding:0 14px; border:1px solid var(--sw-primary, #282c31); border-radius:10px; background: var(--sw-primary, #282c31); color:#fff; font:600 13.5px var(--sw-font, inherit); cursor:pointer; }
    .nl-enviar:hover { background: var(--sw-primary-hover, #212529); }
    .nl-menu-wrap { position:relative; }
    .nl-menu-bg { position:fixed; inset:0; z-index:40; }
    .nl-menu { position:absolute; right:0; top:44px; z-index:41; min-width:190px; padding:6px; background:#fff; border:1px solid var(--sw-border, #E8EBEF); border-radius:12px; box-shadow:0 12px 28px rgba(15,23,42,.14); display:flex; flex-direction:column; }
    .nl-menu a, .nl-menu button { display:flex; align-items:center; gap:10px; width:100%; padding:9px 12px; border:0; background:none; border-radius:8px; font:14px var(--sw-font, inherit); color:#374151; text-align:left; text-decoration:none; cursor:pointer; }
    .nl-menu a:hover, .nl-menu button:hover { background: var(--sw-bg, #FAF8F5); }
    .nl-menu i { width:16px; color:#6B7280; text-align:center; }
    .nl-menu .perigo, .nl-menu .perigo i { color: var(--sw-err-text, #B42318); }
    .nl-rodape { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:12px; padding:14px 24px; border-top:1px solid #F0F2F5; }
    .nl-erro { padding:12px 14px; margin-bottom:10px; border:1px solid #FECACA; border-radius:12px; background:#FEF2F2; }
    .nl-erro-h { display:flex; justify-content:space-between; gap:12px; font-size:13px; color:#374151; }
    .nl-erro-h span { color:#6B7280; }
    .nl-erro-m { margin-top:6px; font-size:13px; color:#7F1D1D; word-break:break-word; }
.nl-trunc { max-width: 560px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* O menu "…" sai por cima do cartão: o cartão não pode cortar o que lhe passa da borda; nas últimas linhas abre para cima */
.sw-lista-card.nl-card { overflow: visible; }
.nl-menu.up { top: auto; bottom: 44px; }

/* ── Janelas das listas de comunicações (enviar, motivo do erro) ──────────────────────────────────────── */
.nl-modal-bg { position: fixed; inset: 0; z-index: 1000; background: rgba(15, 23, 42, .45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.nl-modal { width: 100%; max-width: 500px; max-height: 90vh; display: flex; flex-direction: column; background: #fff; border-radius: 20px; box-shadow: 0 24px 60px rgba(15, 23, 42, .25); overflow: hidden; }
.nl-modal-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 22px 24px 8px; }
.nl-modal-h h3 { margin: 0; font-size: 18px; font-weight: 700; color: var(--sw-text, #1F2937); }
.nl-modal-h p { margin: 4px 0 0; font-size: 13px; color: var(--sw-muted, #6B7280); }
.nl-modal-x { flex: none; width: 36px; height: 36px; border: 0; background: #F3F5F7; border-radius: 10px; font-size: 20px; line-height: 1; color: #6B7280; cursor: pointer; }
.nl-modal-x:hover { background: #E8EBEF; }
.nl-modal-b { padding: 12px 24px 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.nl-modal-f { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px; border-top: 1px solid #F0F2F5; background: #FCFBF9; }
.nl-msg { padding: 12px 14px; border-radius: 12px; background: #F8FAFC; border: 1px solid #EEF0F3; font-size: 13.5px; line-height: 1.5; color: #374151; white-space: pre-wrap; word-break: break-word; max-height: 140px; overflow-y: auto; }
.nl-field > label { display: block; font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 6px; }
.nl-select { width: 100%; min-height: 44px; padding: 0 14px; border: 1px solid var(--sw-border-strong, #E1E5EA); border-radius: 10px; background: #fff; font: 14px var(--sw-font, inherit); color: var(--sw-text, #1F2937); }
.nl-select:focus { outline: 2px solid #343a40; outline-offset: -1px; }
.nl-opts { display: flex; flex-direction: column; gap: 8px; max-height: 260px; overflow-y: auto; }
.nl-opt { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid var(--sw-border-strong, #E1E5EA); border-radius: 12px; cursor: pointer; font-size: 14px; color: #374151; }
.nl-opt:hover { background: #fcfcfc; border-color: #dadcdd; }
.nl-opt.on { background: var(--sw-primary-soft, #f6f6f7); border-color: #dadcdd; }
.nl-opt input { flex: none; width: 18px; height: 18px; accent-color: var(--sw-primary, #282c31); cursor: pointer; }
.nl-opt small { display: block; color: #6B7280; font-size: 12px; margin-top: 1px; }
