        :root {
            /* Escala tipografica consolidada (5 niveis) */
            /* Substitui 16+ variacoes de 0.58-0.95rem por 5 tokens padrao */
            --cf-fs-xxs: 0.6rem;   /* badges, labels minimais */
            --cf-fs-xs:  0.7rem;   /* subtextos, captions */
            --cf-fs-sm:  0.78rem;  /* texto compacto, tabelas, filtros */
            --cf-fs-md:  0.85rem;  /* texto padrao de componentes */
            --cf-fs-lg:  0.9rem;   /* texto enfatizado, headers de secao */

            /* Cores principais */
            --primary-color: #2563eb;
            --secondary-color: #1e40af;
            --success-color: #059669;
            --warning-color: #d97706;
            --danger-color: #dc2626;
            --info-color: #0891b2;

            /* Cores dos grupos de navegação */
            --nav-fiscal-color: #2563eb;      /* Azul - fiscal */
            --nav-financeiro-color: #059669;  /* Verde - financeiro */
            --nav-vendas-color: #7c3aed;      /* Roxo - vendas */
            --nav-config-color: #dc2626;      /* Vermelho - configuração */

            /* Cores para charts (consistência) */
            --chart-primary: #2563eb;
            --chart-success: #059669;
            --chart-warning: #d97706;
            --chart-danger: #dc2626;
            --chart-info: #0891b2;
            --chart-purple: #7c3aed;
            --chart-pink: #ec4899;
            --chart-cyan: #06b6d4;

            /* Superfícies */
            --surface: #ffffff;
            --surface-hover: #f8fafc;
            --border-subtle: #e2e8f0;
            --text-primary: #0f172a;
            --text-secondary: #475569;
            --text-muted: #94a3b8;

            /* Sombras */
            --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
            --shadow-md: 0 4px 12px rgba(0,0,0,0.07), 0 1px 3px rgba(0,0,0,0.05);
            --shadow-lg: 0 8px 24px rgba(0,0,0,0.09), 0 2px 6px rgba(0,0,0,0.04);

            /* Bordas */
            --radius-sm: 8px;
            --radius-md: 12px;
            --radius-lg: 16px;

            /* Tipografia */
            --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
            --font-body: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
        }

        /* ============================================
           DARK MODE - Bootstrap 5.3 data-bs-theme
           ============================================ */
        [data-bs-theme="dark"] {
            --surface: #1a1f2e;
            --surface-hover: #242b3d;
            --surface-elevated: #1e2538;
            --border-subtle: #2d3548;
            --text-primary: #e8edf5;
            --text-secondary: #a0aec0;
            --text-muted: #5a6678;
            --shadow-sm: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
            --shadow-md: 0 4px 12px rgba(0,0,0,0.4), 0 1px 3px rgba(0,0,0,0.25);
            --shadow-lg: 0 8px 24px rgba(0,0,0,0.5), 0 2px 6px rgba(0,0,0,0.3);
            color-scheme: dark;
        }

        [data-bs-theme="dark"] body {
            background-color: #12161f !important;
            color: var(--text-primary);
        }

        /* Sidebar dark */
        [data-bs-theme="dark"] .sidebar {
            background: linear-gradient(180deg, #0c1120 0%, #111827 50%, #151d2e 100%);
            box-shadow: 3px 0 20px rgba(0,0,0,0.4);
        }

        /* Cards e superfícies */
        [data-bs-theme="dark"] .card,
        [data-bs-theme="dark"] .card-metric,
        [data-bs-theme="dark"] .table-container {
            background: var(--surface) !important;
            border-color: var(--border-subtle) !important;
        }
        [data-bs-theme="dark"] .card-header {
            background: var(--surface-elevated) !important;
            border-bottom-color: var(--border-subtle) !important;
        }

        /* Tabelas */
        [data-bs-theme="dark"] .table {
            --bs-table-bg: transparent;
            --bs-table-color: var(--text-primary);
            --bs-table-border-color: var(--border-subtle);
            --bs-table-striped-bg: rgba(255,255,255,0.02);
            --bs-table-hover-bg: rgba(255,255,255,0.04);
        }
        [data-bs-theme="dark"] .table > thead > tr > th {
            background: var(--surface-elevated) !important;
            border-bottom-color: var(--border-subtle) !important;
            color: var(--text-secondary) !important;
        }
        [data-bs-theme="dark"] .table > tbody > tr:hover {
            background-color: rgba(255,255,255,0.04) !important;
        }
        [data-bs-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > td {
            background-color: rgba(255,255,255,0.015) !important;
        }
        [data-bs-theme="dark"] .table-danger,
        [data-bs-theme="dark"] .table-danger > td {
            --bs-table-bg: rgba(220,53,69,0.12);
            --bs-table-color: #fca5a5;
        }
        [data-bs-theme="dark"] .table-warning,
        [data-bs-theme="dark"] .table-warning > td {
            --bs-table-bg: rgba(217,119,6,0.12);
            --bs-table-color: #fcd34d;
        }
        [data-bs-theme="dark"] .table-success,
        [data-bs-theme="dark"] .table-success > td {
            --bs-table-bg: rgba(5,150,105,0.12);
            --bs-table-color: #6ee7b7;
        }

        /* Nav tabs */
        [data-bs-theme="dark"] .nav-tabs {
            border-bottom-color: var(--border-subtle);
        }
        [data-bs-theme="dark"] .nav-tabs .nav-link:hover {
            background: rgba(37,99,235,0.08);
        }

        /* Inputs e selects */
        [data-bs-theme="dark"] .form-control,
        [data-bs-theme="dark"] .form-select {
            background-color: var(--surface-elevated) !important;
            border-color: var(--border-subtle) !important;
            color: var(--text-primary) !important;
        }
        [data-bs-theme="dark"] .form-control::placeholder {
            color: var(--text-muted) !important;
        }
        [data-bs-theme="dark"] .form-control:focus,
        [data-bs-theme="dark"] .form-select:focus {
            border-color: var(--primary-color) !important;
            box-shadow: 0 0 0 3px rgba(37,99,235,0.2) !important;
        }
        [data-bs-theme="dark"] .input-group-text {
            background-color: var(--surface) !important;
            border-color: var(--border-subtle) !important;
            color: var(--text-secondary) !important;
        }

        /* Botões outline */
        [data-bs-theme="dark"] .btn-outline-secondary {
            color: var(--text-secondary);
            border-color: var(--border-subtle);
        }
        [data-bs-theme="dark"] .btn-outline-secondary:hover {
            background-color: rgba(255,255,255,0.08);
            color: var(--text-primary);
        }
        [data-bs-theme="dark"] .btn-outline-primary {
            color: #60a5fa;
            border-color: #3b82f6;
        }
        [data-bs-theme="dark"] .btn-outline-primary:hover {
            background-color: rgba(37,99,235,0.15);
            color: #93bbfc;
        }
        [data-bs-theme="dark"] .btn-light {
            background-color: var(--surface-elevated);
            border-color: var(--border-subtle);
            color: var(--text-primary);
        }

        /* Modais */
        [data-bs-theme="dark"] .modal-content {
            background-color: var(--surface) !important;
            border-color: var(--border-subtle) !important;
        }
        [data-bs-theme="dark"] .modal-header {
            border-bottom-color: var(--border-subtle) !important;
        }
        [data-bs-theme="dark"] .modal-footer {
            border-top-color: var(--border-subtle) !important;
        }
        [data-bs-theme="dark"] .btn-close {
            filter: invert(1) grayscale(100%) brightness(200%);
        }

        /* Dropdowns */
        [data-bs-theme="dark"] .dropdown-menu {
            background-color: var(--surface) !important;
            border-color: var(--border-subtle) !important;
            box-shadow: var(--shadow-lg) !important;
        }
        [data-bs-theme="dark"] .dropdown-item {
            color: var(--text-primary) !important;
        }
        [data-bs-theme="dark"] .dropdown-item:hover,
        [data-bs-theme="dark"] .dropdown-item:focus {
            background-color: rgba(255,255,255,0.06) !important;
        }
        [data-bs-theme="dark"] .dropdown-divider {
            border-color: var(--border-subtle);
        }

        /* Alerts - dark mode (backgrounds opacos para melhor contraste) */
        [data-bs-theme="dark"] .alert-info {
            background-color: #0c2a38 !important;
            border-color: rgba(8,145,178,0.35) !important;
            color: #67e8f9 !important;
        }
        [data-bs-theme="dark"] .alert-warning {
            background-color: #2a1f0a !important;
            border-color: rgba(217,119,6,0.35) !important;
            color: #fcd34d !important;
        }
        [data-bs-theme="dark"] .alert-danger {
            background-color: #2a0f13 !important;
            border-color: rgba(220,53,69,0.35) !important;
            color: #fca5a5 !important;
        }
        [data-bs-theme="dark"] .alert-success {
            background-color: #0a2a1c !important;
            border-color: rgba(5,150,105,0.35) !important;
            color: #6ee7b7 !important;
        }

        /* Paginação */
        [data-bs-theme="dark"] .paginacao-container {
            border-top-color: var(--border-subtle);
            background: var(--surface) !important;
        }
        [data-bs-theme="dark"] .page-link {
            background-color: var(--surface-elevated);
            border-color: var(--border-subtle);
            color: var(--text-secondary);
        }
        [data-bs-theme="dark"] .page-item.active .page-link {
            background-color: var(--primary-color);
            border-color: var(--primary-color);
        }

        /* Sortable headers */
        [data-bs-theme="dark"] th.sortable:hover {
            background-color: rgba(37,99,235,0.1) !important;
        }
        [data-bs-theme="dark"] .sort-indicator {
            color: var(--text-muted);
        }
        [data-bs-theme="dark"] .sort-indicator.active {
            color: #818cf8;
        }
        [data-bs-theme="dark"] th.sortable:hover .sort-indicator {
            color: #818cf8;
        }

        /* Loading overlay */
        [data-bs-theme="dark"] .loading-overlay {
            background: rgba(18,22,31,0.92);
        }

        /* Accordion / list-group */
        [data-bs-theme="dark"] .list-group-item {
            background-color: var(--surface);
            border-color: var(--border-subtle);
            color: var(--text-primary);
        }
        [data-bs-theme="dark"] .accordion-item {
            background-color: var(--surface);
            border-color: var(--border-subtle);
        }
        [data-bs-theme="dark"] .accordion-button {
            background-color: var(--surface);
            color: var(--text-primary);
        }
        [data-bs-theme="dark"] .accordion-button:not(.collapsed) {
            background-color: var(--surface-elevated);
        }

        /* Breadcrumbs, badges extra */
        [data-bs-theme="dark"] .border-bottom {
            border-bottom-color: var(--border-subtle) !important;
        }
        [data-bs-theme="dark"] .border-top {
            border-top-color: var(--border-subtle) !important;
        }
        [data-bs-theme="dark"] .border-end {
            border-right-color: var(--border-subtle) !important;
        }
        [data-bs-theme="dark"] .border-start {
            border-left-color: var(--border-subtle) !important;
        }
        [data-bs-theme="dark"] .border {
            border-color: var(--border-subtle) !important;
        }

        /* Text utilities override */
        [data-bs-theme="dark"] .text-dark {
            color: var(--text-primary) !important;
        }
        [data-bs-theme="dark"] .text-muted {
            color: var(--text-muted) !important;
        }
        [data-bs-theme="dark"] .text-body {
            color: var(--text-primary) !important;
        }
        [data-bs-theme="dark"] .text-secondary {
            color: var(--text-secondary) !important;
        }

        /* bg-light / bg-white overrides */
        [data-bs-theme="dark"] .bg-white {
            background-color: var(--surface) !important;
        }
        [data-bs-theme="dark"] .bg-light {
            background-color: var(--surface-elevated) !important;
        }
        [data-bs-theme="dark"] .bg-body-tertiary {
            background-color: var(--surface-elevated) !important;
        }

        /* Anomalia bar */
        [data-bs-theme="dark"] .anomalia-bar {
            background: rgba(220,53,69,0.15);
        }

        /* Desktop header title hardcoded */
        [data-bs-theme="dark"] #pageTitle {
            color: var(--text-primary) !important;
        }
        [data-bs-theme="dark"] #pageSubtitle {
            color: var(--text-muted) !important;
        }

        /* Scrollbar dark */
        [data-bs-theme="dark"] ::-webkit-scrollbar {
            width: 8px;
            height: 8px;
        }
        [data-bs-theme="dark"] ::-webkit-scrollbar-track {
            background: var(--surface);
        }
        [data-bs-theme="dark"] ::-webkit-scrollbar-thumb {
            background: var(--border-subtle);
            border-radius: 4px;
        }
        [data-bs-theme="dark"] ::-webkit-scrollbar-thumb:hover {
            background: var(--text-muted);
        }

        /* Toast / popover */
        [data-bs-theme="dark"] .toast {
            background-color: var(--surface) !important;
            border-color: var(--border-subtle);
        }
        [data-bs-theme="dark"] .popover {
            background-color: var(--surface);
            border-color: var(--border-subtle);
        }

        /* Status badges - manter legíveis no dark */
        [data-bs-theme="dark"] .badge.bg-light {
            background-color: var(--surface-elevated) !important;
            color: var(--text-primary) !important;
        }

        /* Code blocks */
        [data-bs-theme="dark"] code {
            color: #f472b6;
            background: rgba(244,114,182,0.1);
        }
        [data-bs-theme="dark"] pre {
            background: var(--surface-elevated);
            border-color: var(--border-subtle);
        }

        /* Chart.js canvas background */
        [data-bs-theme="dark"] canvas {
            border-radius: 8px;
        }

        /* Theme toggle button */
        .theme-toggle-btn {
            width: 38px;
            height: 38px;
            border-radius: 10px;
            border: 1px solid rgba(255,255,255,0.12);
            background: rgba(255,255,255,0.06);
            color: rgba(255,255,255,0.6);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.25s ease;
            font-size: 0.9rem;
        }
        .theme-toggle-btn:hover {
            background: rgba(255,255,255,0.12);
            color: rgba(255,255,255,0.95);
            border-color: rgba(255,255,255,0.25);
        }
        .theme-toggle-btn .fa-sun { display: none; }
        .theme-toggle-btn .fa-moon { display: inline; }
        [data-bs-theme="dark"] .theme-toggle-btn .fa-sun { display: inline; }
        [data-bs-theme="dark"] .theme-toggle-btn .fa-moon { display: none; }

        /* Badges de contraste - warning/info precisam texto escuro no dark */
        [data-bs-theme="dark"] .badge.bg-warning,
        [data-bs-theme="dark"] .bg-warning {
            color: #1a1f2e !important;
        }
        [data-bs-theme="dark"] .badge.bg-info,
        [data-bs-theme="dark"] .bg-info {
            color: #1a1f2e !important;
        }

        /* Alert links no dark */
        [data-bs-theme="dark"] .alert-warning .alert-link,
        [data-bs-theme="dark"] .alert-warning a {
            color: #fbbf24 !important;
        }
        [data-bs-theme="dark"] .alert-danger .alert-link,
        [data-bs-theme="dark"] .alert-danger a {
            color: #f87171 !important;
        }

        /* Select dropdown no dark */
        [data-bs-theme="dark"] select option {
            background-color: var(--surface);
            color: var(--text-primary);
        }

        /* Multi-select dropdown checkboxes - melhor contraste e hover */
        .dropdown-menu .form-check {
            padding: 4px 8px 4px 28px;
            margin: 0;
            border-radius: 4px;
            transition: background-color 0.15s;
            cursor: pointer;
        }
        .dropdown-menu .form-check:hover {
            background-color: rgba(99, 102, 241, 0.08);
        }
        .dropdown-menu .form-check-label {
            cursor: pointer;
            user-select: none;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 220px;
        }
        .dropdown-menu .form-check-input:checked + .form-check-label {
            font-weight: 600;
            color: #4f46e5;
        }
        [data-bs-theme="dark"] .dropdown-menu .form-check:hover {
            background-color: rgba(129, 140, 248, 0.12);
        }
        [data-bs-theme="dark"] .dropdown-menu .form-check-label {
            color: var(--text-primary);
        }
        [data-bs-theme="dark"] .dropdown-menu .form-check-input:checked + .form-check-label {
            color: #a5b4fc;
            font-weight: 600;
        }
        [data-bs-theme="dark"] .dropdown-menu .form-check-input {
            background-color: #374151;
            border-color: #4b5563;
        }
        [data-bs-theme="dark"] .dropdown-menu .form-check-input:checked {
            background-color: #6366f1;
            border-color: #6366f1;
        }

        body {
            background-color: #f1f5f9;
            font-family: var(--font-body);
            color: var(--text-primary);
            -webkit-font-smoothing: antialiased;
            transition: background-color 0.2s ease, color 0.2s ease;
        }

        /* Tipografia aprimorada */
        h1, h2, h3, h4, h5, h6,
        .display-1, .display-2, .display-3, .display-4, .display-5, .display-6,
        .btn-lg, .nav-link {
            font-family: var(--font-display);
            font-weight: 600;
        }

        /* Focus states melhorados */
        .nav-link:focus-visible,
        .card:focus-visible,
        .btn:focus-visible {
            outline: 2px solid var(--primary-color);
            outline-offset: 2px;
            box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
        }

        /* Animações de entrada */
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes staggerFadeIn {
            from {
                opacity: 0;
                transform: translateY(15px) scale(0.98);
            }
            to {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        .fade-in-up {
            animation: fadeInUp 0.5s ease-out;
        }

        .stagger-item {
            animation: staggerFadeIn 0.6s ease-out;
            animation-fill-mode: both;
        }

        .stagger-item:nth-child(1) { animation-delay: 0.1s; }
        .stagger-item:nth-child(2) { animation-delay: 0.2s; }
        .stagger-item:nth-child(3) { animation-delay: 0.3s; }
        .stagger-item:nth-child(4) { animation-delay: 0.4s; }
        .stagger-item:nth-child(5) { animation-delay: 0.5s; }
        .stagger-item:nth-child(6) { animation-delay: 0.6s; }
        .stagger-item:nth-child(7) { animation-delay: 0.7s; }
        .stagger-item:nth-child(8) { animation-delay: 0.8s; }

        /* === SIDEBAR === */
        .sidebar {
            min-height: 100vh;
            background: linear-gradient(180deg, #0f1d3d 0%, #162550 50%, #1a3068 100%);
            color: white;
            box-shadow: 3px 0 16px rgba(0,0,0,0.18);
        }

        .sidebar .nav-link {
            color: rgba(255,255,255,0.7);
            padding: 10px 18px;
            border-radius: 8px;
            margin: 2px 8px;
            transition: all 0.2s ease;
            font-size: 0.85rem;
            letter-spacing: 0.01em;
            border-left: 3px solid transparent;
        }

        .sidebar .nav-link:hover {
            background-color: rgba(255,255,255,0.08);
            color: rgba(255,255,255,0.95);
            border-left-color: rgba(255,255,255,0.3);
        }

        .sidebar .nav-link.active {
            background: linear-gradient(90deg, rgba(37,99,235,0.35) 0%, rgba(37,99,235,0.12) 100%);
            color: #fff;
            font-weight: 600;
            border-left-color: #60a5fa;
            box-shadow: 0 1px 6px rgba(37,99,235,0.2);
        }

        /* Cores por grupo de navegação */
        .nav-group-fiscal .nav-link:hover i,
        .nav-group-fiscal .nav-link.active i {
            color: var(--nav-fiscal-color) !important;
        }

        .nav-group-financeiro .nav-link:hover i,
        .nav-group-financeiro .nav-link.active i {
            color: var(--nav-financeiro-color) !important;
        }

        .nav-group-vendas .nav-link:hover i,
        .nav-group-vendas .nav-link.active i {
            color: var(--nav-vendas-color) !important;
        }

        .nav-group-config .nav-link:hover i,
        .nav-group-config .nav-link.active i {
            color: var(--nav-config-color) !important;
        }

        /* Texto roxo customizado */
        .text-purple {
            color: var(--nav-vendas-color) !important;
        }

        /* ═══════════════════════════════════════════════
           WHATSAPP NF-e — Notification Control Center
           ═══════════════════════════════════════════════ */

        /* KPI Cards */
        .wn-kpi-card {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 18px 20px;
            background: var(--surface, #fff);
            border: 1px solid var(--border-subtle, #e2e8f0);
            border-radius: var(--radius-md, 12px);
            transition: transform 0.2s, box-shadow 0.2s;
        }
        .wn-kpi-card:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
        }
        .wn-kpi-icon {
            width: 44px; height: 44px;
            border-radius: 10px;
            display: flex; align-items: center; justify-content: center;
            font-size: 1.1rem;
            flex-shrink: 0;
        }
        .wn-kpi-sent    { background: rgba(16,185,129,0.12); color: #10b981; }
        .wn-kpi-error   { background: rgba(239,68,68,0.12);  color: #ef4444; }
        .wn-kpi-pending { background: rgba(245,158,11,0.12); color: #f59e0b; }
        .wn-kpi-rate    { background: rgba(37,99,235,0.12);  color: #2563eb; }

        .wn-kpi-value {
            font-size: 1.5rem;
            font-weight: 700;
            line-height: 1.1;
            color: var(--text-primary, #1e293b);
        }
        .wn-kpi-label {
            font-size: 0.78rem;
            color: var(--text-muted, #94a3b8);
            font-weight: 500;
        }
        .wn-kpi-trend {
            display: flex;
            align-items: center;
            gap: 4px;
            margin-top: 2px;
        }

        /* Panels */
        .wn-panel {
            background: var(--surface, #fff);
            border: 1px solid var(--border-subtle, #e2e8f0);
            border-radius: var(--radius-md, 12px);
            overflow: hidden;
        }
        .wn-panel-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 14px 18px;
            border-bottom: 1px solid var(--border-subtle, #e2e8f0);
            cursor: default;
            font-size: 0.9rem;
        }
        .wn-panel-header[onclick] { cursor: pointer; }
        .wn-panel-header[onclick]:hover { background: var(--surface-hover, #f8fafc); }
        .wn-panel-icon { color: var(--primary-color, #2563eb); font-size: 0.9rem; }
        .wn-panel-body { padding: 16px 18px; }

        /* Filter bar */
        .wn-filter-bar {
            display: flex;
            gap: 8px;
            padding: 10px 18px;
            border-bottom: 1px solid var(--border-subtle, #e2e8f0);
            background: var(--surface-elevated, #f8fafc);
            flex-wrap: wrap;
        }
        .wn-filter-bar .form-control,
        .wn-filter-bar .form-select {
            font-size: 0.85rem;
            max-width: 160px;
        }

        .wn-envios-alert {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            padding: 12px 18px;
            border-bottom: 1px solid var(--border-subtle, #e2e8f0);
            background: var(--surface, #fff);
            flex-wrap: wrap;
        }
        .wn-envios-alert-copy {
            display: flex;
            align-items: flex-start;
            gap: 10px;
        }
        .wn-envios-alert-dot {
            width: 10px;
            height: 10px;
            border-radius: 999px;
            margin-top: 4px;
            flex-shrink: 0;
        }
        .wn-envios-alert-title {
            font-size: 0.84rem;
            font-weight: 700;
            line-height: 1.2;
            color: var(--text-primary, #1e293b);
        }
        .wn-envios-alert-text {
            font-size: 0.8rem;
            color: var(--text-secondary, #64748b);
            line-height: 1.35;
        }
        .wn-envios-alert-ok .wn-envios-alert-dot {
            background: #10b981;
            box-shadow: 0 0 0 4px rgba(16,185,129,0.12);
        }
        .wn-envios-alert-warning {
            background: rgba(245,158,11,0.08);
        }
        .wn-envios-alert-warning .wn-envios-alert-dot {
            background: #f59e0b;
            box-shadow: 0 0 0 4px rgba(245,158,11,0.14);
        }

        /* Unidades table */
        .wn-table-units { font-size: 0.85rem; }
        .wn-table-units th {
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            color: var(--text-muted, #94a3b8);
            font-weight: 600;
            border-bottom-width: 1px;
            padding: 10px 12px;
        }
        .wn-table-units td { padding: 8px 12px; vertical-align: middle; }

        .wn-unit-avatar {
            width: 32px; height: 32px;
            border-radius: 8px;
            background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
            color: #fff;
            display: flex; align-items: center; justify-content: center;
            font-size: 0.7rem;
            font-weight: 700;
            text-transform: uppercase;
            flex-shrink: 0;
        }

        .wn-phone-input .input-group-text {
            color: #25D366;
            font-size: 1rem;
            padding: 4px 8px;
        }
        .wn-phone-input .form-control {
            font-size: 0.85rem;
            font-family: 'Consolas', 'Monaco', monospace;
        }

        /* Envios table */
        .wn-table-envios { font-size: 0.85rem; }
        .wn-table-envios th {
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            color: var(--text-muted, #94a3b8);
            font-weight: 600;
            border-bottom-width: 1px;
            padding: 10px 12px;
        }
        .wn-table-envios td { padding: 8px 12px; vertical-align: middle; }
        .wn-envio-row { transition: background 0.15s; }

        /* Status badges */
        .wn-badge {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 3px 10px;
            border-radius: 20px;
            font-size: 0.75rem;
            font-weight: 600;
            letter-spacing: 0.3px;
        }
        .wn-badge-sent    { background: rgba(16,185,129,0.12); color: #10b981; }
        .wn-badge-error   { background: rgba(239,68,68,0.12);  color: #ef4444; }
        .wn-badge-pending { background: rgba(245,158,11,0.12); color: #f59e0b; }
        .wn-badge-ignored { background: rgba(148,163,184,0.15); color: #94a3b8; }

        /* Action buttons */
        .wn-btn-action {
            width: 28px; height: 28px;
            padding: 0;
            display: inline-flex; align-items: center; justify-content: center;
            border: 1px solid var(--border-subtle, #e2e8f0);
            border-radius: 6px;
            background: transparent;
            color: var(--text-secondary, #64748b);
            font-size: 0.78rem;
            transition: all 0.15s;
        }
        .wn-btn-action:hover {
            background: var(--primary-color, #2563eb);
            color: #fff;
            border-color: var(--primary-color, #2563eb);
        }
        .wn-btn-teste {
            border-color: var(--border-subtle, #e2e8f0);
            font-size: 0.78rem;
        }

        /* Connection status dot */
        .wn-status-dot {
            width: 8px; height: 8px;
            border-radius: 50%;
            display: inline-block;
        }
        .wn-status-online {
            background: #10b981;
            box-shadow: 0 0 0 3px rgba(16,185,129,0.2);
            animation: wnPulse 2s infinite;
        }
        .wn-status-offline {
            background: #94a3b8;
        }

        @keyframes wnPulse {
            0%, 100% { box-shadow: 0 0 0 3px rgba(16,185,129,0.2); }
            50% { box-shadow: 0 0 0 6px rgba(16,185,129,0.08); }
        }

        /* Toast */
        .wn-toast {
            padding: 12px 18px;
            background: var(--surface, #fff);
            border: 1px solid var(--border-subtle, #e2e8f0);
            border-left: 4px solid #3b82f6;
            border-radius: 8px;
            box-shadow: var(--shadow-md);
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 0.85rem;
            transform: translateX(120%);
            transition: transform 0.3s cubic-bezier(0.16,1,0.3,1);
            margin-top: 8px;
        }
        .wn-toast-show { transform: translateX(0); }

        /* Dark mode overrides */
        [data-bs-theme="dark"] .wn-kpi-card,
        [data-bs-theme="dark"] .wn-panel {
            background: var(--surface) !important;
            border-color: var(--border-subtle) !important;
        }
        [data-bs-theme="dark"] .wn-panel-header[onclick]:hover {
            background: var(--surface-hover) !important;
        }
        [data-bs-theme="dark"] .wn-filter-bar {
            background: var(--surface-elevated) !important;
            border-color: var(--border-subtle) !important;
        }
        [data-bs-theme="dark"] .wn-envios-alert {
            background: var(--surface) !important;
            border-color: var(--border-subtle) !important;
        }
        [data-bs-theme="dark"] .wn-envios-alert-warning {
            background: rgba(245,158,11,0.12) !important;
        }
        [data-bs-theme="dark"] .wn-unit-avatar {
            background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
        }
        [data-bs-theme="dark"] .wn-toast {
            background: var(--surface-elevated) !important;
            border-color: var(--border-subtle) !important;
        }

        /* ═══════════════════════════════════════════════
           PRECIFICAÇÃO & MARGEM — Premium Analytics
           ═══════════════════════════════════════════════ */
        #precificacao-section {
            --prc-accent: #00d4aa;
            --prc-accent-dim: rgba(0, 212, 170, 0.12);
            --prc-danger: #ff4757;
            --prc-danger-dim: rgba(255, 71, 87, 0.10);
            --prc-success: #2ed573;
            --prc-success-dim: rgba(46, 213, 115, 0.10);
            --prc-gold: #ffa502;
            --prc-gold-dim: rgba(255, 165, 2, 0.10);
            --prc-blue: #3742fa;
            --prc-blue-dim: rgba(55, 66, 250, 0.10);
        }

        /* ── KPI Command Strip ── */
        .prc-kpi-strip {
            display: grid;
            grid-template-columns: repeat(5, 1fr);
            gap: 12px;
            margin-bottom: 20px;
        }
        @media (max-width: 992px) { .prc-kpi-strip { grid-template-columns: repeat(3, 1fr); } }
        @media (max-width: 576px) { .prc-kpi-strip { grid-template-columns: 1fr 1fr; } }

        .prc-kpi-card {
            background: var(--surface);
            border: 1px solid var(--border-subtle);
            border-radius: 10px;
            padding: 16px 18px;
            position: relative;
            overflow: hidden;
            transition: all 0.25s ease;
        }
        .prc-kpi-card::before {
            content: '';
            position: absolute;
            top: 0; left: 0;
            width: 3px;
            height: 100%;
            border-radius: 3px 0 0 3px;
        }
        .prc-kpi-card:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
        }
        .prc-kpi-card .prc-kpi-icon {
            width: 36px; height: 36px;
            border-radius: 8px;
            display: flex; align-items: center; justify-content: center;
            font-size: 15px;
            margin-bottom: 10px;
        }
        .prc-kpi-card .prc-kpi-label {
            font-size: 0.7rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: var(--text-muted);
            margin-bottom: 4px;
        }
        .prc-kpi-card .prc-kpi-value {
            font-size: 1.55rem;
            font-weight: 800;
            line-height: 1.1;
            letter-spacing: -0.03em;
            color: var(--text-primary);
        }
        .prc-kpi-card .prc-kpi-sub {
            font-size: 0.7rem;
            color: var(--text-muted);
            margin-top: 3px;
        }

        /* KPI color variants */
        .prc-kpi-card[data-color="accent"]::before { background: var(--prc-accent); }
        .prc-kpi-card[data-color="accent"] .prc-kpi-icon { background: var(--prc-accent-dim); color: var(--prc-accent); }
        .prc-kpi-card[data-color="blue"]::before { background: var(--prc-blue); }
        .prc-kpi-card[data-color="blue"] .prc-kpi-icon { background: var(--prc-blue-dim); color: var(--prc-blue); }
        .prc-kpi-card[data-color="danger"]::before { background: var(--prc-danger); }
        .prc-kpi-card[data-color="danger"] .prc-kpi-icon { background: var(--prc-danger-dim); color: var(--prc-danger); }
        .prc-kpi-card[data-color="gold"]::before { background: var(--prc-gold); }
        .prc-kpi-card[data-color="gold"] .prc-kpi-icon { background: var(--prc-gold-dim); color: var(--prc-gold); }
        .prc-kpi-card[data-color="success"]::before { background: var(--prc-success); }
        .prc-kpi-card[data-color="success"] .prc-kpi-icon { background: var(--prc-success-dim); color: var(--prc-success); }

        /* ── Filter Command Bar ── */
        .prc-filter-bar {
            background: var(--surface);
            border: 1px solid var(--border-subtle);
            border-radius: 10px;
            padding: 14px 18px;
            margin-bottom: 16px;
            display: flex;
            align-items: flex-end;
            gap: 12px;
            flex-wrap: wrap;
        }
        .prc-filter-bar .prc-filter-group {
            display: flex;
            flex-direction: column;
            gap: 3px;
        }
        .prc-filter-bar .prc-filter-group label {
            font-size: 0.6rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: var(--text-muted);
        }
        .prc-filter-bar input,
        .prc-filter-bar select {
            font-size: 0.85rem;
            border-radius: 6px;
            border: 1px solid var(--border-subtle);
            background: var(--surface);
            color: var(--text-primary);
            padding: 6px 10px;
            height: 34px;
        }
        .prc-filter-bar input:focus,
        .prc-filter-bar select:focus {
            border-color: var(--prc-accent);
            box-shadow: 0 0 0 3px var(--prc-accent-dim);
            outline: none;
        }
        .prc-btn-analyze {
            background: var(--prc-accent);
            color: #0a2e24;
            border: none;
            border-radius: 6px;
            padding: 6px 20px;
            height: 34px;
            font-size: 0.78rem;
            font-weight: 700;
            letter-spacing: 0.03em;
            cursor: pointer;
            transition: all 0.2s;
        }
        .prc-btn-analyze:hover {
            background: #00e6b8;
            transform: translateY(-1px);
            box-shadow: 0 4px 14px rgba(0, 212, 170, 0.35);
        }

        /* ── Segment Navigation ── */
        .prc-nav-segments {
            display: flex;
            background: var(--surface);
            border: 1px solid var(--border-subtle);
            border-radius: 10px;
            padding: 4px;
            margin-bottom: 16px;
            gap: 2px;
            overflow-x: auto;
        }
        .prc-nav-segments .nav-link {
            flex: 1;
            text-align: center;
            padding: 9px 14px;
            border-radius: 7px;
            font-size: 0.78rem;
            font-weight: 600;
            color: var(--text-secondary);
            background: transparent;
            border: none;
            transition: all 0.2s ease;
            white-space: nowrap;
        }
        .prc-nav-segments .nav-link:hover {
            background: var(--surface-hover, rgba(0,0,0,0.04));
            color: var(--text-primary);
        }
        .prc-nav-segments .nav-link.active {
            background: var(--prc-accent);
            color: #0a2e24;
            box-shadow: 0 2px 8px rgba(0, 212, 170, 0.3);
        }
        .prc-nav-segments .nav-link i {
            margin-right: 5px;
            font-size: 0.75rem;
        }

        /* ── Panel Cards ── */
        .prc-panel {
            background: var(--surface);
            border: 1px solid var(--border-subtle);
            border-radius: 10px;
            overflow: hidden;
        }
        .prc-panel-header {
            padding: 14px 18px 12px;
            border-bottom: 1px solid var(--border-subtle);
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        .prc-panel-header h6 {
            font-size: 0.78rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            color: var(--text-secondary);
            margin: 0;
        }
        .prc-panel-header .prc-panel-badge {
            font-size: 0.6rem;
            background: var(--prc-accent-dim);
            color: var(--prc-accent);
            padding: 2px 8px;
            border-radius: 4px;
            font-weight: 700;
            letter-spacing: 0.05em;
        }

        /* ── Heatmap Table ── */
        .prc-heatmap-table {
            font-size: 0.78rem;
            border-collapse: separate;
            border-spacing: 0;
        }
        .prc-heatmap-table thead th {
            position: sticky;
            top: 0;
            z-index: 2;
            background: var(--surface);
            border-bottom: 2px solid var(--border-subtle);
            font-size: 0.7rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            color: var(--text-muted);
            padding: 10px 6px;
            white-space: nowrap;
        }
        .prc-heatmap-table thead th.prc-th-unit {
            max-width: 72px;
            overflow: hidden;
            text-overflow: ellipsis;
            text-align: center;
        }
        .prc-heatmap-table tbody td {
            padding: 7px 6px;
            border-bottom: 1px solid var(--border-subtle);
            vertical-align: middle;
        }
        .prc-heatmap-table tbody tr:hover {
            background: var(--surface-hover, rgba(0,0,0,0.02));
        }
        .prc-heatmap-cell {
            display: inline-block;
            padding: 3px 7px;
            border-radius: 4px;
            font-weight: 600;
            font-size: 0.75rem;
            font-variant-numeric: tabular-nums;
            min-width: 58px;
            text-align: right;
        }
        .prc-cell-hot { background: rgba(255, 71, 87, 0.13); color: var(--prc-danger); }
        .prc-cell-warm { background: rgba(255, 165, 2, 0.10); color: var(--prc-gold); }
        .prc-cell-neutral { background: transparent; color: var(--text-secondary); }
        .prc-cell-cool { background: rgba(46, 213, 115, 0.10); color: var(--prc-success); }
        .prc-cell-cold { background: rgba(0, 212, 170, 0.12); color: var(--prc-accent); }
        .prc-cell-empty { color: var(--text-muted); opacity: 0.4; font-size: 0.7rem; }

        .prc-dispersao-bar {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            font-size: 0.75rem;
            font-weight: 700;
        }
        .prc-dispersao-bar .prc-bar-track {
            width: 40px; height: 4px;
            background: var(--border-subtle);
            border-radius: 2px;
            overflow: hidden;
        }
        .prc-dispersao-bar .prc-bar-fill {
            height: 100%;
            border-radius: 2px;
            transition: width 0.3s ease;
        }

        /* ── Alertas Severity ── */
        .prc-alert-row {
            border-left: 3px solid transparent;
            transition: all 0.15s;
        }
        .prc-alert-row:hover { background: var(--surface-hover, rgba(0,0,0,0.03)); }
        .prc-alert-row[data-severity="critical"] { border-left-color: var(--prc-danger); }
        .prc-alert-row[data-severity="warning"] { border-left-color: var(--prc-gold); }
        .prc-alert-row[data-severity="minor"] { border-left-color: var(--border-subtle); }
        .prc-deviation-badge {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 2px 8px;
            border-radius: 4px;
            font-size: 0.75rem;
            font-weight: 700;
        }
        .prc-deviation-badge.critical { background: var(--prc-danger-dim); color: var(--prc-danger); }
        .prc-deviation-badge.warning { background: var(--prc-gold-dim); color: var(--prc-gold); }

        /* ── Limiar Slider ── */
        .prc-limiar-control {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 10px 16px;
            background: var(--surface);
            border: 1px solid var(--border-subtle);
            border-radius: 8px;
            margin-bottom: 12px;
        }
        .prc-limiar-control label {
            font-size: 0.7rem;
            font-weight: 600;
            color: var(--text-secondary);
            white-space: nowrap;
        }
        .prc-limiar-control input[type="range"] {
            flex: 1;
            max-width: 200px;
            accent-color: var(--prc-danger);
        }
        .prc-limiar-control .prc-limiar-val {
            font-size: 0.85rem;
            font-weight: 800;
            color: var(--prc-danger);
            min-width: 36px;
            text-align: center;
        }

        /* ── Margin Metric Cards ── */
        .prc-margin-metrics {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 12px;
            margin-bottom: 16px;
        }
        @media (max-width: 768px) { .prc-margin-metrics { grid-template-columns: 1fr 1fr; } }

        .prc-margin-card {
            background: var(--surface);
            border: 1px solid var(--border-subtle);
            border-radius: 10px;
            padding: 16px;
            text-align: center;
            position: relative;
        }
        .prc-margin-card .prc-mc-label {
            font-size: 0.6rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: var(--text-muted);
            margin-bottom: 6px;
        }
        .prc-margin-card .prc-mc-value {
            font-size: 1.4rem;
            font-weight: 800;
            letter-spacing: -0.02em;
        }
        .prc-margin-card .prc-mc-bar {
            height: 3px;
            border-radius: 2px;
            margin-top: 10px;
        }

        /* ── Ranking Progress Bars ── */
        .prc-rank-row {
            display: flex;
            align-items: center;
            padding: 8px 14px;
            gap: 10px;
            border-bottom: 1px solid var(--border-subtle);
            transition: background 0.15s;
        }
        .prc-rank-row:hover { background: var(--surface-hover, rgba(0,0,0,0.03)); }
        .prc-rank-pos {
            font-size: 0.7rem;
            font-weight: 800;
            color: var(--text-muted);
            width: 22px;
            text-align: center;
        }
        .prc-rank-name {
            flex: 1;
            font-size: 0.78rem;
            font-weight: 600;
            color: var(--text-primary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .prc-rank-bar {
            width: 60px; height: 6px;
            background: var(--border-subtle);
            border-radius: 3px;
            overflow: hidden;
        }
        .prc-rank-bar-fill {
            height: 100%;
            border-radius: 3px;
            transition: width 0.5s ease;
        }
        .prc-rank-value {
            font-size: 0.78rem;
            font-weight: 700;
            min-width: 50px;
            text-align: right;
        }

        /* ── Simulator ── */
        .prc-sim-result {
            display: grid;
            grid-template-columns: 1fr auto 1fr auto 1fr;
            gap: 0;
            align-items: center;
            background: var(--surface);
            border: 1px solid var(--border-subtle);
            border-radius: 12px;
            padding: 20px 24px;
            margin-bottom: 16px;
        }
        @media (max-width: 768px) {
            .prc-sim-result { grid-template-columns: 1fr; gap: 12px; }
            .prc-sim-arrow { display: none; }
        }
        .prc-sim-block {
            text-align: center;
        }
        .prc-sim-block .prc-sim-label {
            font-size: 0.6rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: var(--text-muted);
            margin-bottom: 4px;
        }
        .prc-sim-block .prc-sim-val {
            font-size: 1.5rem;
            font-weight: 800;
            letter-spacing: -0.03em;
        }
        .prc-sim-arrow {
            font-size: 1.2rem;
            color: var(--text-muted);
            text-align: center;
        }
        .prc-sim-gain {
            background: var(--prc-success-dim);
            border: 1px solid rgba(46, 213, 115, 0.2);
            border-radius: 10px;
            padding: 16px;
        }
        .prc-sim-gain .prc-sim-val { color: var(--prc-success); }

        /* ── Animations ── */
        @keyframes prcFadeUp {
            from { opacity: 0; transform: translateY(12px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .prc-animate {
            animation: prcFadeUp 0.4s ease both;
        }
        .prc-animate-d1 { animation-delay: 0.05s; }
        .prc-animate-d2 { animation-delay: 0.10s; }
        .prc-animate-d3 { animation-delay: 0.15s; }
        .prc-animate-d4 { animation-delay: 0.20s; }
        .prc-animate-d5 { animation-delay: 0.25s; }

        /* ── Empty States ── */
        .prc-empty-state {
            text-align: center;
            padding: 48px 24px;
            color: var(--text-muted);
        }
        .prc-empty-state i {
            font-size: 2.5rem;
            opacity: 0.2;
            margin-bottom: 12px;
            display: block;
        }
        .prc-empty-state p {
            font-size: 0.85rem;
            max-width: 280px;
            margin: 0 auto;
        }

        /* Cards com hover melhorado */
        .card-metric {
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            border: 1px solid var(--border-subtle);
            box-shadow: var(--shadow-sm);
        }

        .card-metric:hover {
            transform: translateY(-2px) scale(1.01);
            box-shadow: var(--shadow-lg);
            border-color: var(--primary-color);
        }

        .card-metric:focus-visible {
            transform: translateY(-1px);
        }

        /* Scroll hint for tables in mobile — gradient fade on right edge */
        .cf-table-scroll-wrapper {
            position: relative;
        }
        .cf-table-scroll-wrapper::after {
            content: '';
            position: absolute;
            top: 0;
            right: 0;
            bottom: 0;
            width: 24px;
            background: linear-gradient(to right, transparent, rgba(255,255,255,0.9));
            pointer-events: none;
            opacity: 1;
            transition: opacity 0.3s;
            z-index: 2;
            border-radius: 0 var(--radius-md, 6px) var(--radius-md, 6px) 0;
        }
        .cf-table-scroll-wrapper.scrolled-end::after {
            opacity: 0;
        }
        [data-bs-theme="dark"] .cf-table-scroll-wrapper::after {
            background: linear-gradient(to right, transparent, rgba(30,30,40,0.9));
        }
        @media (min-width: 769px) {
            .cf-table-scroll-wrapper::after {
                display: none;
            }
        }

        /* Responsividade melhorada para tabelas mobile */
        @media (max-width: 768px) {
            .table-responsive {
                border-radius: var(--radius-md);
            }

            .card-layout-mobile {
                display: block;
            }

            .card-layout-mobile .card {
                margin-bottom: 0.75rem;
                padding: 0.75rem;
                border-left: 4px solid var(--primary-color);
            }

            .table-desktop-only {
                display: none;
            }
        }

        @media (min-width: 769px) {
            .card-layout-mobile {
                display: none;
            }
        }

        /* Dark mode toggle preparação */
        .theme-toggle {
            position: fixed;
            top: 1rem;
            right: 1rem;
            z-index: 1050;
            background: var(--surface);
            border: 1px solid var(--border-subtle);
            border-radius: 50px;
            padding: 0.5rem;
            box-shadow: var(--shadow-md);
            transition: all 0.2s ease;
        }

        .theme-toggle:hover {
            box-shadow: var(--shadow-lg);
        }

        /* === KPI CARDS === */
        .card-metric {
            border: none;
            border-radius: var(--radius-md);
            box-shadow: var(--shadow-sm);
            transition: transform 0.2s ease, box-shadow 0.25s ease;
            background: var(--surface);
        }

        .card-metric:hover {
            transform: translateY(-3px);
            box-shadow: var(--shadow-md);
        }
        .ssrs-kpi-click:hover {
            box-shadow: 0 4px 15px rgba(0,0,0,0.15);
        }
        .ssrs-kpi-click.active-filter {
            border: 2px solid #0d6efd;
            box-shadow: 0 0 0 3px rgba(13,110,253,0.15);
        }
        
        .metric-icon {
            width: 48px;
            height: 48px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 22px;
        }

        /* Metric values - typography */
        .card-metric h3, .card-metric .h3 {
            font-weight: 700;
            color: var(--text-primary);
            letter-spacing: -0.02em;
        }
        .card-metric h6, .card-metric .h6 {
            font-weight: 600;
            color: var(--text-secondary);
            text-transform: uppercase;
            font-size: 0.7rem;
            letter-spacing: 0.06em;
        }

        .bg-gradient-primary {
            background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
        }

        .bg-gradient-success {
            background: linear-gradient(135deg, #10b981 0%, #059669 100%);
        }

        .bg-gradient-warning {
            background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
        }

        .bg-gradient-danger {
            background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
        }

        .bg-gradient-info {
            background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
        }

        .table-container {
            background: var(--surface);
            border-radius: var(--radius-md);
            box-shadow: var(--shadow-sm);
            overflow: hidden;
            border: 1px solid var(--border-subtle);
        }
        
        .search-box {
            position: relative;
        }

        .search-box input {
            padding-left: 40px;
            border-radius: var(--radius-sm);
            border: 1px solid var(--border-subtle);
            background: var(--surface);
            transition: border-color 0.2s, box-shadow 0.2s;
        }
        .search-box input:focus {
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
        }

        .search-box i {
            position: absolute;
            left: 15px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-muted);
        }

        .btn-action {
            border-radius: var(--radius-sm);
            padding: 8px 16px;
            font-weight: 500;
            transition: all 0.15s ease;
        }

        .status-badge {
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 11px;
            font-weight: 600;
            letter-spacing: 0.02em;
        }

        .loading-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(241,245,249,0.92);
            backdrop-filter: blur(4px);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 9999;
        }

        .loading-overlay.active {
            display: flex;
        }

        .chart-container {
            position: relative;
            height: 300px;
        }

        /* === NAV TABS === */
        .nav-tabs {
            border-bottom: 2px solid #e2e8f0;
        }
        .nav-tabs .nav-link {
            color: var(--text-secondary);
            font-weight: 500;
            border: none;
            border-bottom: 2px solid transparent;
            margin-bottom: -2px;
            padding: 10px 18px;
            font-size: 0.9rem;
            transition: all 0.2s ease;
        }

        .nav-tabs .nav-link:hover {
            color: var(--primary-color);
            border-color: #cbd5e1;
            background: rgba(37,99,235,0.04);
        }

        .nav-tabs .nav-link.active {
            color: var(--primary-color);
            border-bottom-color: var(--primary-color);
            font-weight: 600;
            background: transparent;
        }

        .fade-in {
            animation: fadeIn 0.35s ease-out;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(6px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* Status de pagamento */
        .status-pendente { background-color: #f59e0b; color: white; }
        .status-pago { background-color: #10b981; color: white; }
        .status-atrasado { background-color: #ef4444; color: white; }
        .status-vencendo { background-color: #3b82f6; color: white; }

        /* === TABELAS REFINADAS === */
        .table > thead > tr > th {
            background: #f8fafc;
            border-bottom: 2px solid #e2e8f0;
            color: var(--text-secondary);
            font-weight: 600;
            font-size: 0.78rem;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            padding: 10px 12px;
        }
        .table > tbody > tr {
            transition: background-color 0.15s ease;
        }
        .table > tbody > tr:hover {
            background-color: #f8fafc !important;
        }
        .table-striped > tbody > tr:nth-of-type(odd) > td {
            background-color: rgba(248,250,252,0.5);
        }

        /* === SECTION TITLES === */
        .section-content h3, .section-content .h3 {
            font-weight: 700;
            color: var(--text-primary);
            letter-spacing: -0.01em;
        }
        .section-content h5, .section-content .h5 {
            font-weight: 600;
            color: var(--text-primary);
        }

        /* === CARDS GLOBAIS === */
        .card {
            border-color: var(--border-subtle);
        }
        .card-header {
            background: #f8fafc;
            border-bottom-color: var(--border-subtle);
        }

        /* === ALERTAS COLAPSÁVEIS === */
        .alert-summary-banner {
            cursor: pointer;
            transition: all 0.2s ease;
            border-radius: var(--radius-md);
            user-select: none;
        }
        .alert-summary-banner:hover {
            box-shadow: var(--shadow-sm);
        }
        .alert-collapse-body {
            max-height: 250px;
            overflow-y: auto;
        }

        /* === EMPTY STATES === */
        .empty-state {
            text-align: center;
            padding: 60px 20px;
            color: var(--text-muted);
        }
        .empty-state i {
            font-size: 3rem;
            margin-bottom: 16px;
            opacity: 0.4;
        }
        .empty-state h5 {
            color: var(--text-secondary);
            font-weight: 600;
            margin-bottom: 8px;
        }
        .empty-state p {
            font-size: 0.9rem;
            max-width: 400px;
            margin: 0 auto 16px;
        }

        /* === ANOMALIAS TABELA COMPACTA === */
        .anomalias-compact {
            max-height: 300px;
            overflow-y: auto;
        }
        .anomalia-bar {
            height: 6px;
            border-radius: 3px;
            background: #fee2e2;
            overflow: hidden;
        }
        .anomalia-bar-fill {
            height: 100%;
            border-radius: 3px;
            background: linear-gradient(90deg, #ef4444, #dc2626);
        }

        /* Paginação */
        .paginacao-container { border-top: 1px solid #e5e7eb; padding: 8px 0; background: #fff; border-radius: 0 0 12px 12px; }
        .paginacao-container .page-link { font-size: 0.78rem; padding: 4px 10px; }
        .paginacao-container .page-item.active .page-link { background-color: var(--primary-color); border-color: var(--primary-color); }

        /* Headers ordenáveis */
        th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
        th.sortable:hover { background-color: #f0f4ff; }
        .sort-indicator { color: #9ca3af; font-size: 0.75rem; margin-left: 2px; transition: color 0.15s; }
        th.sortable:hover .sort-indicator { color: #6366f1; }
        .sort-indicator.active { color: #4f46e5; font-weight: 600; }

        /* NF-e Section — KPI icon circles */
        .nfe-kpi-icon {
            width: 44px; height: 44px; min-width: 44px;
            border-radius: 12px;
            display: flex; align-items: center; justify-content: center;
            font-size: 1.1rem;
            transition: transform 0.25s ease, box-shadow 0.25s ease;
        }
        .nfe-kpi-card:hover .nfe-kpi-icon {
            transform: scale(1.08);
            box-shadow: 0 4px 12px rgba(0,0,0,0.08);
        }
        .nfe-kpi-card .fs-4 { font-size: 1.35rem !important; }
        @media (max-width: 767px) {
            .nfe-kpi-icon { width: 36px; height: 36px; min-width: 36px; font-size: 0.9rem; border-radius: 10px; }
            .nfe-kpi-card .fs-4 { font-size: 1.1rem !important; }
        }
        /* NF-e chart containers */
        .nfe-chart-wrap { height: 210px; position: relative; }
        @media (max-width: 991px) {
            .nfe-chart-wrap { height: 180px; }
        }
        /* NF-e chart empty states */
        .nfe-chart-empty {
            position: absolute; inset: 0;
            display: flex; flex-direction: column;
            align-items: center; justify-content: center;
            background: var(--surface);
        }
        /* NF-e resumos pulse when count > 0 */
        @keyframes nfePulseWarn {
            0%, 100% { box-shadow: 0 0 0 0 rgba(217,119,6,0.25); }
            50% { box-shadow: 0 0 0 6px rgba(217,119,6,0); }
        }
        .nfe-resumos-alert .nfe-kpi-icon {
            animation: nfePulseWarn 2s ease-in-out infinite;
        }

        /* Dashboard executivo */
        .dash-executive-hero {
            display: grid;
            grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
            gap: 22px;
            align-items: stretch;
            padding: 24px;
            border-radius: 8px;
            color: #f8fafc;
            background:
                linear-gradient(135deg, rgba(15,23,42,0.98) 0%, rgba(30,58,95,0.96) 58%, rgba(13,112,100,0.94) 100%);
            box-shadow: 0 18px 44px rgba(15, 23, 42, 0.18);
            position: relative;
            overflow: hidden;
        }
        .dash-executive-hero::after {
            content: '';
            position: absolute;
            inset: 0;
            background-image:
                linear-gradient(rgba(255,255,255,0.055) 1px, transparent 1px),
                linear-gradient(90deg, rgba(255,255,255,0.055) 1px, transparent 1px);
            background-size: 42px 42px;
            mask-image: linear-gradient(90deg, transparent 0%, #000 42%, #000 100%);
            pointer-events: none;
        }
        .dash-exec-main,
        .dash-exec-panel {
            position: relative;
            z-index: 1;
        }
        .dash-exec-main {
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            min-height: 190px;
        }
        .dash-exec-eyebrow {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            width: fit-content;
            padding: 6px 10px;
            border: 1px solid rgba(255,255,255,0.18);
            border-radius: 999px;
            background: rgba(255,255,255,0.08);
            color: rgba(255,255,255,0.82);
            font-size: 0.72rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0;
        }
        .dash-live-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: #34d399;
            box-shadow: 0 0 0 4px rgba(52,211,153,0.16);
        }
        .dash-exec-title {
            max-width: 760px;
            margin: 18px 0 8px;
            color: #fff;
            font-size: 2.55rem;
            font-weight: 800;
            line-height: 1.02;
        }
        .dash-exec-subtitle {
            max-width: 760px;
            margin: 0;
            color: rgba(255,255,255,0.72);
            font-size: 0.96rem;
            line-height: 1.5;
        }
        .dash-exec-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin-top: 24px;
        }
        .dash-pill-action {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            min-height: 38px;
            padding: 0 14px;
            border: 1px solid rgba(255,255,255,0.16);
            border-radius: 999px;
            background: rgba(255,255,255,0.1);
            color: #fff;
            font-size: 0.82rem;
            font-weight: 700;
            transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
        }
        .dash-pill-action:hover {
            background: rgba(255,255,255,0.18);
            border-color: rgba(255,255,255,0.28);
            transform: translateY(-1px);
        }
        .dash-exec-panel {
            display: grid;
            grid-template-columns: 132px 1fr;
            gap: 16px;
            align-items: center;
            padding: 18px;
            border: 1px solid rgba(255,255,255,0.14);
            border-radius: 8px;
            background: rgba(255,255,255,0.1);
            backdrop-filter: blur(10px);
        }
        .dash-health-ring {
            --dash-score: 0%;
            width: 118px;
            height: 118px;
            border-radius: 50%;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            background: conic-gradient(#22c55e var(--dash-score), rgba(255,255,255,0.18) 0);
            position: relative;
            color: #fff;
        }
        .dash-health-ring::before {
            content: '';
            position: absolute;
            inset: 10px;
            border-radius: 50%;
            background: rgba(15,23,42,0.88);
        }
        .dash-health-ring span,
        .dash-health-ring small {
            position: relative;
            z-index: 1;
        }
        .dash-health-ring span {
            font-size: 2rem;
            font-weight: 800;
            line-height: 1;
        }
        .dash-health-ring small {
            margin-top: 4px;
            color: rgba(255,255,255,0.62);
            font-size: 0.65rem;
            text-transform: uppercase;
            letter-spacing: 0;
        }
        .dash-health-ring.is-watch {
            background: conic-gradient(#f59e0b var(--dash-score), rgba(255,255,255,0.18) 0);
        }
        .dash-health-ring.is-risk {
            background: conic-gradient(#ef4444 var(--dash-score), rgba(255,255,255,0.18) 0);
        }
        .dash-exec-facts {
            display: grid;
            gap: 10px;
        }
        .dash-fact {
            display: flex;
            align-items: baseline;
            justify-content: space-between;
            gap: 14px;
            padding: 10px 0;
            border-bottom: 1px solid rgba(255,255,255,0.12);
        }
        .dash-fact:last-child {
            border-bottom: 0;
        }
        .dash-fact span {
            color: rgba(255,255,255,0.64);
            font-size: 0.72rem;
        }
        .dash-fact strong {
            color: #fff;
            font-size: 1.05rem;
            white-space: nowrap;
        }
        .dash-command-grid {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 14px;
        }
        .dash-command-card {
            min-height: 116px;
            padding: 16px;
            border: 1px solid var(--border-subtle);
            border-radius: 8px;
            background: var(--surface);
            box-shadow: var(--shadow-sm);
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }
        .dash-command-risk.is-risk {
            border-color: rgba(220,38,38,0.22);
            background: linear-gradient(180deg, rgba(254,242,242,0.82), var(--surface));
        }
        .dash-command-risk.is-clear {
            border-color: rgba(16,185,129,0.2);
            background: linear-gradient(180deg, rgba(236,253,245,0.9), var(--surface));
        }
        .dash-command-label {
            color: var(--text-muted);
            font-size: 0.66rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0;
        }
        .dash-command-value {
            margin-top: 10px;
            color: var(--text-primary);
            font-size: 1.22rem;
            font-weight: 800;
            line-height: 1.08;
            overflow-wrap: anywhere;
        }
        .dash-command-name {
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            font-size: 1.02rem;
        }
        .dash-command-sub {
            margin-top: 8px;
            color: var(--text-secondary);
            font-size: 0.72rem;
            line-height: 1.35;
        }
        .dash-section-heading {
            display: flex;
            align-items: end;
            justify-content: space-between;
            gap: 16px;
        }
        .dash-section-heading span {
            display: block;
            color: var(--text-muted);
            font-size: 0.66rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0;
        }
        .dash-section-heading strong {
            display: block;
            color: var(--text-primary);
            font-size: 1rem;
        }
        .dash-section-heading small {
            color: var(--text-secondary);
            font-size: 0.76rem;
        }
        [data-bs-theme="dark"] .dash-command-risk.is-risk {
            background: linear-gradient(180deg, rgba(127,29,29,0.2), var(--surface));
        }
        [data-bs-theme="dark"] .dash-command-risk.is-clear {
            background: linear-gradient(180deg, rgba(6,78,59,0.18), var(--surface));
        }
        [data-bs-theme="dark"] .dash-executive-hero {
            box-shadow: 0 20px 54px rgba(0,0,0,0.44);
        }
        @media (max-width: 1199px) {
            .dash-executive-hero {
                grid-template-columns: 1fr;
            }
            .dash-command-grid {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
        }
        @media (max-width: 767px) {
            .dash-executive-hero {
                padding: 18px;
            }
            .dash-exec-title {
                font-size: 1.55rem;
            }
            .dash-exec-panel {
                grid-template-columns: 1fr;
            }
            .dash-health-ring {
                width: 104px;
                height: 104px;
            }
            .dash-command-grid {
                grid-template-columns: 1fr;
            }
            .dash-section-heading {
                align-items: start;
                flex-direction: column;
            }
        }

        /* Dashboard page redesign */
        .dash-dashboard-shell {
            --dash-band: rgba(248,250,252,0.82);
            --dash-line: rgba(148,163,184,0.22);
            --dash-ink: #0f172a;
            --dash-muted: #64748b;
        }
        .dash-performance-stage {
            padding: 18px;
            border: 1px solid var(--dash-line);
            border-radius: 8px;
            background:
                linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,250,252,0.9));
            box-shadow: 0 14px 34px rgba(15,23,42,0.06);
        }
        .dash-performance-stage .dash-section-heading,
        .dash-intelligence-grid .dash-section-heading,
        .dash-dashboard-shell > .dash-section-heading {
            padding: 0 2px;
        }
        .dash-kpi-primary-grid .dash-kpi {
            min-height: 150px;
            background:
                linear-gradient(180deg, #fff 0%, rgba(248,250,252,0.9) 100%);
        }
        .dash-kpi-primary-grid .dash-kpi-value {
            font-size: 1.34rem;
            overflow-wrap: anywhere;
        }
        .dash-kpi-primary-grid .dash-kpi .card-body {
            overflow: hidden;
        }
        .dash-kpi-secondary-grid .dash-kpi {
            min-height: 92px;
            background: #fff;
        }
        .dash-kpi-grid,
        .dash-kpi-secondary-grid {
            row-gap: 14px;
        }
        .dash-kpi {
            border-radius: 8px;
            box-shadow: 0 10px 28px rgba(15,23,42,0.06);
        }
        .dash-kpi:hover {
            transform: translateY(-2px);
            box-shadow: 0 16px 36px rgba(15,23,42,0.09);
        }
        .dash-intelligence-grid {
            display: grid;
            grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
            gap: 16px;
            align-items: start;
        }
        .dash-intelligence-main,
        .dash-intelligence-side,
        .dash-analytics-main,
        .dash-analytics-side,
        .dash-supplier-grid > div {
            min-width: 0;
        }
        .dash-intelligence-side {
            display: grid;
            gap: 14px;
        }
        .dash-alert-panel,
        .dash-freshness-panel,
        .dash-economic-panel,
        .dash-side-card,
        .dash-supplier-card,
        .dash-evo-card {
            border-radius: 8px;
            border: 1px solid var(--dash-line);
            box-shadow: 0 12px 30px rgba(15,23,42,0.06);
        }
        .dash-alert-panel {
            overflow: hidden;
            background: #fff;
        }
        .dash-alert-empty {
            min-height: 210px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 20px;
            color: var(--dash-muted);
        }
        .dash-alert-empty span {
            display: block;
            color: var(--dash-muted);
            font-size: 0.68rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0;
        }
        .dash-alert-empty strong {
            display: block;
            margin-top: 4px;
            color: var(--dash-ink);
            font-size: 1.04rem;
        }
        .dash-alert-empty small {
            display: block;
            margin-top: 6px;
            color: var(--dash-muted);
        }
        .dash-alert-empty i {
            color: #2563eb;
            font-size: 1.4rem;
        }
        .dash-alert-panel .alert-central-item {
            transition: background 0.16s ease, transform 0.16s ease;
        }
        .dash-alert-panel .alert-central-item:hover {
            background: rgba(248,250,252,0.96);
            transform: translateX(2px);
        }
        .dash-freshness-panel,
        .dash-economic-panel {
            padding: 16px;
            background:
                linear-gradient(180deg, #fff 0%, rgba(248,250,252,0.92) 100%);
        }
        .dash-panel-label,
        .dash-panel-header span {
            display: block;
            color: var(--dash-muted);
            font-size: 0.68rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0;
        }
        .dash-panel-header {
            display: flex;
            justify-content: space-between;
            align-items: start;
            gap: 12px;
            margin-bottom: 12px;
        }
        .dash-panel-header strong {
            display: block;
            color: var(--dash-ink);
            font-size: 0.98rem;
            line-height: 1.15;
        }
        .dash-panel-header small {
            color: var(--dash-muted);
            font-size: 0.72rem;
            white-space: nowrap;
        }
        .dash-freshness-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 14px;
            padding: 11px 0;
            border-bottom: 1px solid var(--dash-line);
        }
        .dash-freshness-row:last-child {
            border-bottom: 0;
            padding-bottom: 0;
        }
        .dash-freshness-row span {
            color: var(--dash-muted);
            font-size: 0.78rem;
        }
        .dash-freshness-row i {
            color: #2563eb;
            width: 16px;
        }
        .dash-freshness-row strong {
            color: var(--dash-ink);
            font-size: 0.86rem;
            text-align: right;
        }
        .dash-economic-cards > [class*="col"] {
            flex: 0 0 50%;
            max-width: 50%;
        }
        .dash-economic-cards .text-center {
            min-height: 88px;
            padding: 12px 8px !important;
            border: 1px solid rgba(226,232,240,0.9);
            border-radius: 8px;
            background: rgba(255,255,255,0.74);
        }
        .dash-analytics-grid {
            display: grid;
            grid-template-columns: minmax(0, 1.42fr) minmax(340px, 0.58fr);
            gap: 16px;
            align-items: stretch;
        }
        .dash-analytics-side {
            display: grid;
            gap: 16px;
        }
        .dash-card-title h5 {
            font-size: 0.98rem;
            line-height: 1.2;
        }
        .dash-side-card .card-body {
            min-height: 250px;
        }
        .dash-evo-card .card-header,
        .dash-side-card .card-header,
        .dash-supplier-card .card-header {
            background: transparent !important;
        }
        .dash-evo-chart-wrap {
            height: 360px;
        }
        .dash-supplier-grid {
            display: grid;
            grid-template-columns: minmax(0, 1.25fr) minmax(330px, 0.75fr);
            gap: 16px;
            align-items: stretch;
        }
        .dash-supplier-card {
            overflow: hidden;
            background: #fff;
        }
        #fornecedoresBarContainer {
            padding: 2px 4px 6px;
        }
        #topFornecedores .list-group-item {
            border-color: rgba(226,232,240,0.85);
            transition: background 0.16s ease;
        }
        #topFornecedores .list-group-item:hover {
            background: rgba(248,250,252,0.96);
        }
        #filtroMesAtivo {
            border-radius: 8px;
            border: 1px solid rgba(14,165,233,0.25);
            background: rgba(240,249,255,0.9);
        }
        [data-bs-theme="dark"] .dash-dashboard-shell {
            --dash-band: rgba(15,23,42,0.72);
            --dash-line: rgba(148,163,184,0.18);
            --dash-ink: #e5edf8;
            --dash-muted: #9aa8bd;
        }
        [data-bs-theme="dark"] .dash-performance-stage,
        [data-bs-theme="dark"] .dash-freshness-panel,
        [data-bs-theme="dark"] .dash-economic-panel,
        [data-bs-theme="dark"] .dash-alert-panel,
        [data-bs-theme="dark"] .dash-supplier-card {
            background: linear-gradient(180deg, rgba(30,37,56,0.96), rgba(20,27,42,0.94));
        }
        [data-bs-theme="dark"] .dash-kpi-primary-grid .dash-kpi,
        [data-bs-theme="dark"] .dash-kpi-secondary-grid .dash-kpi {
            background: linear-gradient(180deg, rgba(30,37,56,0.98), rgba(20,27,42,0.96));
        }
        [data-bs-theme="dark"] .dash-economic-cards .text-center {
            background: rgba(15,23,42,0.35);
            border-color: rgba(148,163,184,0.16);
        }
        @media (max-width: 1199px) {
            .dash-intelligence-grid,
            .dash-analytics-grid,
            .dash-supplier-grid {
                grid-template-columns: 1fr;
            }
            .dash-intelligence-side {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
            .dash-evo-chart-wrap {
                height: 300px;
            }
        }
        @media (max-width: 767px) {
            .dash-performance-stage {
                padding: 12px;
            }
            .dash-kpi-primary-grid .dash-kpi-value {
                font-size: 1.18rem;
            }
            .dash-intelligence-side {
                grid-template-columns: 1fr;
            }
            .dash-economic-cards > [class*="col"] {
                flex-basis: 50%;
                max-width: 50%;
            }
            .dash-evo-chart-wrap {
                height: 230px;
            }
            .dash-side-card .card-body {
                min-height: auto;
            }
            .dash-card-title h5 {
                font-size: 0.92rem;
            }
        }

        /* Dashboard KPI Cards */
        .dash-kpi {
            border: 1px solid var(--border-subtle);
            position: relative;
            overflow: hidden;
        }
        .dash-kpi::before {
            content: '';
            position: absolute; top: 0; left: 0; right: 0;
            height: 3px;
            background: transparent;
            transition: background 0.3s ease;
        }
        .dash-kpi:hover::before {
            background: var(--primary-color);
        }
        .dash-kpi-label {
            font-size: 0.7rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: var(--text-muted);
            line-height: 1;
        }
        .dash-kpi-value {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--text-primary);
            letter-spacing: -0.02em;
            line-height: 1.2;
            margin-top: 4px;
        }
        .dash-kpi-value-sm {
            font-size: 1.15rem;
            font-weight: 700;
            color: var(--text-primary);
            letter-spacing: -0.02em;
            line-height: 1;
        }
        .dash-kpi-trend {
            font-size: 0.75rem;
            margin-top: 2px;
            min-height: 1.1em;
        }
        .dash-kpi-icon {
            width: 42px; height: 42px; min-width: 42px;
            border-radius: 12px;
            display: flex; align-items: center; justify-content: center;
            font-size: 1rem; color: #fff;
            box-shadow: 0 2px 8px rgba(0,0,0,0.12);
            transition: transform 0.25s ease, box-shadow 0.25s ease;
        }
        .dash-kpi:hover .dash-kpi-icon {
            transform: scale(1.08) rotate(-3deg);
            box-shadow: 0 4px 14px rgba(0,0,0,0.18);
        }
        .dash-kpi-icon-sm {
            width: 36px; height: 36px; min-width: 36px;
            border-radius: 10px;
            display: flex; align-items: center; justify-content: center;
            font-size: 0.85rem; color: #fff;
            box-shadow: 0 2px 6px rgba(0,0,0,0.1);
            transition: transform 0.25s ease;
        }
        .dash-kpi-compact:hover .dash-kpi-icon-sm {
            transform: scale(1.06);
        }
        .dash-kpi-spark {
            height: 32px; position: relative;
            margin-top: 6px;
            opacity: 0.85;
        }
        @media (max-width: 767px) {
            .dash-kpi-value { font-size: 1.2rem; }
            .dash-kpi-value-sm { font-size: 1rem; }
            .dash-kpi-icon { width: 36px; height: 36px; min-width: 36px; font-size: 0.9rem; border-radius: 10px; }
            .dash-kpi-icon-sm { width: 30px; height: 30px; min-width: 30px; font-size: 0.75rem; border-radius: 8px; }
            .dash-kpi-spark { height: 26px; }
            .dash-kpi-label { font-size: 0.6rem; }
        }

        /* Dashboard Evolução Combo Chart */
        .dash-evo-card {
            border: 1px solid var(--border-subtle);
            overflow: hidden;
        }
        .dash-evo-card:hover {
            border-color: rgba(37, 99, 235, 0.2);
        }
        .dash-evo-icon {
            width: 36px; height: 36px; min-width: 36px;
            border-radius: 10px;
            background: linear-gradient(135deg, rgba(37,99,235,0.12) 0%, rgba(37,99,235,0.04) 100%);
            display: flex; align-items: center; justify-content: center;
            color: var(--primary-color); font-size: 0.9rem;
        }
        .dash-evo-divider {
            width: 1px; height: 28px;
            background: var(--border-subtle);
        }
        .dash-evo-chart-wrap {
            height: 300px; position: relative;
        }
        @media (max-width: 991px) {
            .dash-evo-chart-wrap { height: 240px; }
            #dashEvoMetrics { display: none !important; }
        }
        @media (max-width: 575px) {
            .dash-evo-chart-wrap { height: 200px; }
        }
        .dash-evo-legend-bar {
            display: inline-block; width: 14px; height: 10px;
            border-radius: 2px;
            background: linear-gradient(180deg, rgba(37,99,235,0.85) 0%, rgba(37,99,235,0.5) 100%);
        }
        .dash-evo-legend-line {
            display: inline-block; width: 18px; height: 3px;
            border-radius: 2px;
            background: var(--success-color);
            position: relative;
        }
        .dash-evo-legend-line::after {
            content: ''; position: absolute;
            top: -3px; left: 50%; transform: translateX(-50%);
            width: 7px; height: 7px; border-radius: 50%;
            background: var(--success-color);
            border: 2px solid #fff;
            box-shadow: 0 0 0 1px var(--success-color);
        }

        /* Sidebar agrupada */
        .sidebar-group { margin: 2px 0; }
        .sidebar-group-title {
            display: flex; align-items: center;
            font-size: 0.75rem; text-transform: uppercase;
            letter-spacing: 0.08em; opacity: 0.55;
            padding: 8px 18px 4px !important;
            margin: 8px 8px 0 !important;
            font-weight: 700;
            border-radius: 0 !important;
            border-left: none !important;
        }
        .sidebar-group-title:hover { opacity: 0.8; background: transparent !important; }
        .sidebar-group-items { overflow: hidden; transition: max-height 0.25s ease; max-height: 500px; }
        .sidebar-group-items:not(.show) { max-height: 0; }
        .sidebar-group-items .nav-link { padding: 8px 20px 8px 20px; font-size: 0.85rem; }
        .sidebar-chevron { transition: transform 0.25s ease; }
        .sidebar-group-title.collapsed .sidebar-chevron { transform: rotate(-90deg); }

        /* Skeleton loading */
        .skeleton { position: relative; overflow: hidden; background: #e5e7eb; border-radius: 4px; }
        .skeleton::after {
            content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
            animation: shimmer 1.5s infinite;
        }
        @keyframes shimmer { 100% { left: 100%; } }
        .skeleton-text { height: 14px; margin-bottom: 8px; width: 80%; }
        .skeleton-title { height: 28px; margin-bottom: 10px; width: 40%; }
        .skeleton-card { height: 80px; border-radius: 12px; }
        .skeleton-chart { height: 200px; border-radius: 8px; }
        .skeleton-row { height: 40px; margin-bottom: 4px; }
        
        /* Cards de alerta */
        .alert-card {
            border-left: 4px solid;
            padding: 16px;
            border-radius: 8px;
            background: white;
            margin-bottom: 16px;
        }
        
        .alert-card-danger { border-left-color: #ef4444; }
        .alert-card-warning { border-left-color: #f59e0b; }
        .alert-card-success { border-left-color: #10b981; }
        .alert-card-info { border-left-color: #3b82f6; }

        /* Alert cards dark mode (override inline styles) */
        [data-bs-theme="dark"] .alert-card {
            background: var(--surface-elevated, #1e2538) !important;
            color: var(--text-primary, #e8edf5) !important;
        }
        
        /* Ordenação de tabelas */
        th[onclick] {
            user-select: none;
            transition: background-color 0.2s;
        }
        
        th[onclick]:hover {
            background-color: #e9ecef !important;
        }
        
        th[onclick] i.fas {
            font-size: 0.8em;
            margin-left: 5px;
            color: #6c757d;
        }
        
        th.ordenado-asc i.fas:before {
            content: "\f0de";
            color: #2563eb;
        }
        
        th.ordenado-desc i.fas:before {
            content: "\f0dd";
            color: #2563eb;
        }
        
        th.ordenado-asc,
        th.ordenado-desc {
            background-color: #dbeafe !important;
            color: #1e40af !important;
            font-weight: 600;
        }

        /* Monitor SEFAZ cards */
        .monitor-card {
            border-radius: 10px;
            border-left: 4px solid #6b7280;
            transition: transform 0.15s, box-shadow 0.15s;
        }
        .monitor-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        }
        .monitor-card.status-ok { border-left-color: #10b981; }
        .monitor-card.status-137 { border-left-color: #10b981; }
        .monitor-card.status-138 { border-left-color: #3b82f6; }
        .monitor-card.status-656 { border-left-color: #f59e0b; }
        .monitor-card.status-cert_erro { border-left-color: #ef4444; }
        .monitor-card.status-erro { border-left-color: #ef4444; }
        .monitor-card.status-desconhecido { border-left-color: #6b7280; }

        .monitor-status-dot {
            width: 10px;
            height: 10px;
            border-radius: 50%;
            display: inline-block;
        }
        .dot-ok, .dot-137 { background-color: #10b981; }
        .dot-138 { background-color: #3b82f6; }
        .dot-656 { background-color: #f59e0b; }
        .dot-cert_erro, .dot-erro { background-color: #ef4444; }
        .dot-desconhecido { background-color: #6b7280; }

        .log-row-erro { background-color: #fef2f2 !important; }
        .log-row-sucesso { background-color: #f0fdf4 !important; }

        /* Overlay para sidebar mobile */
        .sidebar-overlay {
            display: none;
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(0,0,0,0.5);
            z-index: 1040;
        }
        .sidebar-overlay.active { display: block; }

        /* Manual do Usuário */
        .manual-step-card {
            border-left: 4px solid #2563eb;
            background: #f8fafc;
            border-radius: 8px;
            padding: 16px;
            margin-bottom: 12px;
        }
        .manual-step-number {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: #2563eb;
            color: white;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            font-size: 0.9rem;
            margin-right: 10px;
            flex-shrink: 0;
        }
        .manual-field-mock {
            background: #f3f4f6;
            border: 1px solid #e5e7eb;
            border-radius: 6px;
            padding: 8px 12px;
            font-size: 0.85rem;
            color: #6b7280;
        }
        .manual-formula {
            font-family: 'Courier New', monospace;
            background: #1e293b;
            color: #a5f3fc;
            padding: 12px 16px;
            border-radius: 8px;
            font-size: 0.85rem;
            line-height: 1.8;
        }
        .manual-tip {
            border-left: 4px solid #3b82f6;
            background: #eff6ff;
            padding: 12px 16px;
            border-radius: 0 8px 8px 0;
            margin: 12px 0;
        }
        .manual-warning {
            border-left: 4px solid #f59e0b;
            background: #fffbeb;
            padding: 12px 16px;
            border-radius: 0 8px 8px 0;
            margin: 12px 0;
        }
        .manual-danger {
            border-left: 4px solid #ef4444;
            background: #fef2f2;
            padding: 12px 16px;
            border-radius: 0 8px 8px 0;
            margin: 12px 0;
        }
        .manual-mock-btn {
            opacity: 0.85;
            pointer-events: none;
            cursor: default;
        }

        /* ============================================= */
        /* === MOBILE PROFESSIONAL - SaaS Grade        === */
        /* ============================================= */

        /* --- Bottom Navigation Bar (Mobile) --- */
        .mobile-bottom-nav {
            display: none;
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background: #ffffff;
            border-top: 1px solid #e2e8f0;
            z-index: 1060;
            padding: 4px 0;
            padding-bottom: calc(4px + env(safe-area-inset-bottom, 0px));
            box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
        }

        .mobile-bottom-nav-inner {
            display: flex;
            justify-content: space-around;
            align-items: center;
            max-width: 500px;
            margin: 0 auto;
        }

        .mobile-nav-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 6px 4px 2px;
            border: none;
            background: none;
            color: #94a3b8;
            font-size: 0.6rem;
            font-weight: 600;
            letter-spacing: 0.02em;
            cursor: pointer;
            transition: color 0.2s;
            -webkit-tap-highlight-color: transparent;
            min-width: 52px;
            position: relative;
        }

        .mobile-nav-item i {
            font-size: 1.15rem;
            margin-bottom: 2px;
            transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        .mobile-nav-item.active {
            color: var(--primary-color);
        }

        .mobile-nav-item.active i {
            transform: scale(1.1);
        }

        .mobile-nav-item.active::before {
            content: '';
            position: absolute;
            top: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 24px;
            height: 3px;
            background: var(--primary-color);
            border-radius: 0 0 3px 3px;
        }

        .mobile-nav-item:active i {
            transform: scale(0.9);
        }

        /* More menu button */
        .mobile-nav-more-menu {
            display: none;
            position: fixed;
            bottom: calc(56px + env(safe-area-inset-bottom, 0px));
            left: 8px;
            right: 8px;
            background: #ffffff;
            border-radius: 16px;
            box-shadow: 0 -8px 40px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.04);
            z-index: 1059;
            padding: 12px;
            max-height: 70vh;
            overflow-y: auto;
            animation: slideUpMenu 0.25s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .mobile-nav-more-menu.open { display: block; }

        @keyframes slideUpMenu {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .mobile-nav-more-menu .more-menu-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 4px;
        }

        .more-menu-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 12px 4px;
            border: none;
            background: none;
            border-radius: 12px;
            color: var(--text-secondary);
            font-size: 0.7rem;
            font-weight: 500;
            cursor: pointer;
            transition: background 0.15s;
            -webkit-tap-highlight-color: transparent;
        }

        .more-menu-item i {
            font-size: 1.2rem;
            margin-bottom: 4px;
            color: var(--text-muted);
        }

        .more-menu-item:active {
            background: #f1f5f9;
        }

        .more-menu-group-title {
            font-size: 0.7rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            color: var(--text-muted);
            padding: 8px 8px 4px;
            grid-column: 1 / -1;
        }

        .mobile-menu-backdrop {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.3);
            z-index: 1058;
        }
        .mobile-menu-backdrop.open { display: block; }

        /* --- Mobile Header Bar --- */
        .mobile-header {
            display: none;
            position: sticky;
            top: 0;
            left: 0;
            right: 0;
            background: #ffffff;
            z-index: 1035;
            padding: 8px 16px;
            padding-top: calc(8px + env(safe-area-inset-top, 0px));
            border-bottom: 1px solid #e2e8f0;
            box-shadow: 0 1px 8px rgba(0,0,0,0.04);
        }

        .mobile-header-inner {
            display: flex;
            align-items: center;
            justify-content: space-between;
            min-height: 44px;
        }

        .mobile-header-brand {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .mobile-header-logo {
            width: 34px;
            height: 34px;
            background: linear-gradient(135deg, #2563eb, #1d4ed8);
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 2px 8px rgba(37,99,235,0.3);
        }

        .mobile-header-logo i {
            font-size: 16px;
            color: white;
        }

        .mobile-header-title {
            font-family: var(--font-display);
            font-weight: 700;
            font-size: 1.05rem;
            color: var(--text-primary);
            letter-spacing: -0.02em;
            line-height: 1.1;
        }

        .mobile-header-subtitle {
            font-size: 0.7rem;
            color: var(--text-muted);
            font-weight: 500;
            letter-spacing: 0.02em;
        }

        .mobile-header-actions {
            display: flex;
            gap: 6px;
            align-items: center;
        }

        .mobile-header-btn {
            width: 38px;
            height: 38px;
            border-radius: 10px;
            border: 1px solid #e2e8f0;
            background: #f8fafc;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.15s;
            position: relative;
            -webkit-tap-highlight-color: transparent;
        }

        .mobile-header-btn:active {
            background: #e2e8f0;
            transform: scale(0.95);
        }

        .mobile-header-btn .notif-dot {
            position: absolute;
            top: 6px;
            right: 6px;
            width: 8px;
            height: 8px;
            background: #ef4444;
            border-radius: 50%;
            border: 2px solid white;
        }

        /* --- Tablet (768px - 991px) --- */
        @media (max-width: 991.98px) {
            .chart-container { height: 250px; }
            .card-metric .card-body h3 { font-size: 1.1rem; }
        }

        /* --- Mobile (< 768px) --- */
        @media (max-width: 767.98px) {
            /* Show mobile-specific elements */
            .mobile-bottom-nav { display: block; }
            .mobile-header { display: block; }

            html,
            body {
                max-width: 100%;
                overflow-x: hidden;
            }

            /* Hide desktop sidebar completely */
            .sidebar {
                position: fixed;
                top: 0;
                left: 0;
                width: 300px;
                height: 100vh;
                height: 100dvh;
                z-index: 1070;
                transform: translateX(-100%);
                transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
                overflow-y: auto;
                -webkit-overflow-scrolling: touch;
            }
            .sidebar.open { transform: translateX(0); }

            .sidebar:not(.open) {
                display: none;
            }
            .sidebar.open {
                display: block;
            }

            /* Hide the old hamburger in the page header */
            .desktop-header-area { display: none; }

            /* Main content - full width, accounting for bottom nav + header */
            .col-md-9, .col-lg-10 {
                padding: 12px 12px 80px !important;
                width: 100% !important;
                max-width: 100% !important;
                flex: 0 0 100% !important;
            }

            body {
                padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
            }

            /* Section title inside content */
            #pageTitle { font-size: 1.2rem !important; }
            #pageSubtitle { font-size: 0.78rem !important; }

            /* Filtros - stack em coluna */
            #btnCnpj {
                width: 100% !important;
                max-width: 100%;
                font-size: 0.85rem;
            }
            #mesSelect {
                width: 100% !important;
                max-width: 100%;
                font-size: 0.85rem;
            }

            /* KPI cards - touch optimized */
            .card-metric {
                border-radius: var(--radius-md) !important;
                border: none !important;
                box-shadow: 0 1px 4px rgba(0,0,0,0.06) !important;
            }
            .card-metric .card-body {
                padding: 14px !important;
            }
            .card-metric .card-body h3 {
                font-size: 1.15rem !important;
            }
            .metric-icon {
                width: 40px;
                height: 40px;
                font-size: 18px;
                border-radius: 10px;
            }

            /* Dashboard KPI special */
            .dash-kpi {
                min-height: auto;
            }
            .dash-kpi-value {
                font-size: 1.25rem !important;
            }
            .dash-kpi-icon {
                width: 36px;
                height: 36px;
                min-width: 36px;
                font-size: 0.85rem;
            }

            /* NF-e KPI */
            .nfe-kpi-icon {
                width: 34px;
                height: 34px;
                min-width: 34px;
                font-size: 0.9rem;
            }

            /* Table scrollable with momentum */
            .table-container {
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
                border-radius: var(--radius-md);
                margin: 0 -4px;
            }
            .table-container table { min-width: 600px; }
            .table th, .table td {
                padding: 8px 10px;
                font-size: 0.78rem;
                white-space: nowrap;
            }

            /* Touch-friendly buttons */
            .btn-action {
                padding: 10px 14px;
                font-size: 0.85rem;
                min-height: 42px;
                border-radius: 10px;
            }
            .btn-sm {
                min-height: 36px;
                min-width: 36px;
                border-radius: 8px;
            }

            /* Charts */
            .chart-container { height: 200px; }

            /* Header area - hide desktop version on mobile */
            .d-flex.justify-content-between.align-items-center.mb-4 {
                flex-wrap: wrap;
                gap: 8px;
                margin-bottom: 12px !important;
            }
            .d-flex.justify-content-between.align-items-center.mb-4 > .d-flex:first-child > .d-md-none {
                display: none !important;
            }

            /* Full width modals */
            .modal-dialog {
                margin: 8px;
                max-width: calc(100% - 16px);
            }
            .modal-content {
                border-radius: 16px;
            }

            /* Alerts compact */
            .alert-card { padding: 10px; margin-bottom: 10px; }

            /* Dropdowns */
            .dropdown-menu {
                max-height: 60vh;
                overflow-y: auto;
            }

            /* Notification dropdown mobile */
            #dropdownNotificacoes {
                width: calc(100vw - 24px) !important;
                max-width: 380px;
            }

            /* Filter cols: 2 per row */
            .row.g-3 > .col-md-3,
            .row.g-3 > .col-md-4,
            .row.g-3 > .col-md-2 {
                flex: 0 0 50%;
                max-width: 50%;
            }

            /* Monitor cards */
            .monitor-card { margin-bottom: 8px; }
            .monitor-card .card-body { padding: 10px; }

            /* Badge */
            .position-relative .badge { font-size: 0.6rem; }

            /* Form controls - bigger touch targets */
            .form-control, .form-select {
                font-size: 16px !important; /* Prevents iOS zoom */
                padding: 10px 12px;
                border-radius: 10px;
            }
            textarea.form-control { font-size: 15px !important; }

            /* Nav tabs - scrollable horizontal */
            .nav-tabs {
                flex-wrap: nowrap;
                overflow-x: auto;
                overflow-y: hidden;
                -webkit-overflow-scrolling: touch;
                scrollbar-width: none;
                -ms-overflow-style: none;
                padding-bottom: 1px;
            }
            .nav-tabs::-webkit-scrollbar { display: none; }
            .nav-tabs .nav-link {
                white-space: nowrap;
                padding: 8px 14px;
                font-size: 0.85rem;
            }

            /* Section content padding */
            .section-content { padding: 0 !important; }

            /* Cards gap */
            .row.g-3 { --bs-gutter-y: 0.6rem; --bs-gutter-x: 0.6rem; }

            /* Sidebar overlay */
            .sidebar-overlay {
                backdrop-filter: blur(4px);
                -webkit-backdrop-filter: blur(4px);
            }

            /* Loading overlay adjustments */
            .loading-overlay {
                background: rgba(255,255,255,0.9);
                backdrop-filter: blur(8px);
            }

            /* Collapse cards */
            .alert-summary-banner {
                padding: 10px 12px;
                font-size: 0.85rem;
            }

            /* Empty states */
            .empty-state {
                padding: 40px 16px;
            }
            .empty-state i { font-size: 2.5rem; }
        }

        /* --- Mobile pequeno (< 480px) --- */
        @media (max-width: 479.98px) {
            .row.g-3 > .col-md-3,
            .row.g-3 > .col-md-4,
            .row.g-3 > .col-md-2 {
                flex: 0 0 100%;
                max-width: 100%;
            }

            #pageTitle { font-size: 1.05rem !important; }
            .card-metric .card-body h3 { font-size: 1rem !important; }
            .dash-kpi-value { font-size: 1.1rem !important; }
            .chart-container { height: 180px; }
            .table th, .table td { font-size: 0.75rem; padding: 6px 8px; }

            /* Bottom nav items smaller */
            .mobile-nav-item { font-size: 0.6rem; min-width: 46px; }
            .mobile-nav-item i { font-size: 1.05rem; }

            /* More menu: 3 cols on small screens */
            .mobile-nav-more-menu .more-menu-grid {
                grid-template-columns: repeat(3, 1fr);
            }
        }

        /* === MOBILE USABILITY FIXES (2026-03-20) === */

        /* Fix 1: Selects/inputs com width fixo → responsivos em mobile */
        @media (max-width: 767.98px) {
            .form-select[style*="width:"],
            .form-control[style*="width:"],
            input[style*="width:"],
            select[style*="width:"] {
                width: 100% !important;
                min-width: 0 !important;
                max-width: 100% !important;
            }
            /* Filtros em flex containers: empilhar em coluna */
            .d-flex.gap-2.align-items-center.flex-wrap {
                flex-direction: column;
                align-items: stretch !important;
            }
            .d-flex.gap-2.align-items-center.flex-wrap > * {
                width: 100%;
            }
            /* Btn-groups de export: full width */
            .d-flex.gap-2.align-items-center.flex-wrap .btn-group {
                width: 100%;
                display: flex;
            }
            .d-flex.gap-2.align-items-center.flex-wrap .btn-group .btn {
                flex: 1;
            }
        }

        /* Fix 2: Filtros inline (sem flex-wrap) - adicionar wrap */
        @media (max-width: 767.98px) {
            .d-flex.gap-1:not(.mobile-bottom-nav):not(.mobile-header *),
            .d-flex.gap-2:not(.mobile-bottom-nav):not(.mobile-header *) {
                flex-wrap: wrap !important;
            }
        }

        /* Fix 3: Botões export - nunca cortar em mobile */
        @media (max-width: 767.98px) {
            .btn-group-sm,
            .d-flex > .btn-group {
                flex-wrap: nowrap;
                min-width: 0;
            }
            .btn-group-sm .btn,
            .btn-group .btn-outline-success,
            .btn-group .btn-outline-danger {
                font-size: 0.75rem;
                padding: 0.3rem 0.5rem;
                white-space: nowrap;
            }
        }

        /* Fix 4: Charts com height fixo → max-height em mobile */
        @media (max-width: 767.98px) {
            div[style*="height:350px"],
            div[style*="height: 350px"] {
                height: 220px !important;
            }
            div[style*="height:260px"],
            div[style*="height: 260px"] {
                height: 200px !important;
            }
            div[style*="height:300px"],
            div[style*="height: 300px"] {
                height: 200px !important;
            }
            canvas {
                max-height: 250px;
            }
        }

        /* Fix 5: Dropdown inline com width fixo (ex: dropdown 300px) */
        @media (max-width: 767.98px) {
            .dropdown[style*="width:"],
            .input-group[style*="width:"] {
                width: 100% !important;
            }
        }

        /* Fix 6: Placeholders longos truncados em mobile */
        @media (max-width: 479.98px) {
            input::placeholder {
                font-size: 0.75rem;
                text-overflow: ellipsis;
            }
        }

        /* === END MOBILE USABILITY FIXES === */

        /* --- Safe area support --- */
        @supports (padding: env(safe-area-inset-bottom)) {
            .mobile-bottom-nav {
                padding-bottom: calc(4px + env(safe-area-inset-bottom));
            }
            .mobile-header {
                padding-top: calc(8px + env(safe-area-inset-top));
            }
            @media (max-width: 767.98px) {
                body {
                    padding-bottom: calc(60px + env(safe-area-inset-bottom));
                }
                .col-md-9, .col-lg-10 {
                    padding-bottom: calc(80px + env(safe-area-inset-bottom)) !important;
                }
            }
        }

        /* --- Pull-to-refresh visual hint --- */
        .ptr-indicator {
            display: none;
            text-align: center;
            padding: 8px;
            color: var(--text-muted);
            font-size: 0.78rem;
        }

        /* --- Touch feedback --- */
        @media (hover: none) and (pointer: coarse) {
            .card-metric:active {
                transform: scale(0.98);
                transition: transform 0.1s;
            }
            .btn:active {
                transform: scale(0.97);
            }
            .more-menu-item:active {
                background: #eef2ff;
                transform: scale(0.95);
            }
        }

        /* Hide desktop elements on mobile */
        @media (max-width: 767.98px) {
            .desktop-only { display: none !important; }
        }
        @media (min-width: 768px) {
            .mobile-only { display: none !important; }
        }

        /* Leaflet map labels */
        .sp-map-label {
            background: rgba(255,255,255,0.92) !important;
            border: 1px solid #1565C0 !important;
            border-radius: 4px !important;
            padding: 2px 6px !important;
            font-size: 11px !important;
            font-weight: 600 !important;
            color: #1565C0 !important;
            box-shadow: 0 1px 4px rgba(0,0,0,0.15) !important;
        }
        .sp-clinic-marker {
            background: transparent !important;
            border: none !important;
        }

        /* Logistica map labels */
        .lg-map-label {
            background: rgba(255,255,255,0.92) !important;
            border: 1px solid #1a56db !important;
            border-radius: 4px !important;
            padding: 2px 6px !important;
            font-size: 11px !important;
            font-weight: 600 !important;
            box-shadow: 0 1px 4px rgba(0,0,0,0.15) !important;
        }
        .lg-origin-label { color: #7c3aed !important; border-color: #7c3aed !important; }
        .lg-dest-label { color: #059669 !important; border-color: #059669 !important; }
        .lg-dest-marker { background: transparent !important; border: none !important; }

        /* Metas sort headers */
        #mt-por-unidade-tab th[onclick]:hover { background: rgba(255,255,255,0.1); }
        #mt-por-unidade-tab th[onclick] { user-select: none; transition: background 0.15s; }
        /* === METAS - Velocimetros e Foguetes === */
        .mt-gauge-container { position: relative; height: 200px; }
        .mt-gauge-label {
            position: absolute; bottom: 25px; left: 50%; transform: translateX(-50%);
            font-size: 2rem; font-weight: 800; color: var(--text-primary); line-height: 1;
        }
        .mt-gauge-subtitle {
            position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
            font-size: 0.75rem; color: var(--text-muted); white-space: nowrap;
        }
        .mt-gauge-title { font-size: 0.9rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 4px; }
        .mt-rocket {
            position: absolute; top: 5px; right: 5px; font-size: 2rem;
            animation: mtRocketBounce 1.2s ease-in-out infinite;
        }
        .mt-rocket.launching { animation: mtRocketLaunch 1.5s ease-out forwards; }
        @keyframes mtRocketLaunch {
            0%   { transform: translateY(0) scale(1) rotate(-45deg); opacity: 1; }
            40%  { transform: translateY(-40px) scale(1.3) rotate(-45deg); opacity: 0.9; }
            70%  { transform: translateY(-80px) scale(1.1) rotate(-45deg); opacity: 0.5; }
            100% { transform: translateY(-120px) scale(0.6) rotate(-45deg); opacity: 0; }
        }
        @keyframes mtRocketBounce {
            0%, 100% { transform: translateY(0) rotate(-45deg); }
            50%      { transform: translateY(-8px) rotate(-45deg); }
        }
        .mt-badge { padding: 4px 10px; border-radius: 12px; font-size: 0.7rem; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
        .mt-badge-rocket { background: linear-gradient(135deg, #7c3aed, #6d28d9); color: white; }
        .mt-badge-fire   { background: linear-gradient(135deg, #2563eb, #1d4ed8); color: white; }
        .mt-badge-check  { background: #059669; color: white; }
        .mt-badge-warn   { background: #6b7280; color: white; }
        .mt-card-meta {
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            border: 1px solid var(--border-subtle);
        }
        .mt-card-meta:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
        .mt-kpi-value { font-size: 1.6rem; font-weight: 800; line-height: 1.2; }
        .mt-kpi-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; }
        .mt-progress-5  { background-color: #059669; }
        .mt-progress-10 { background-color: #2563eb; }
        .mt-progress-20 { background-color: #7c3aed; }
        .mt-unit-row { transition: background-color 0.2s; }
        .mt-unit-row:hover { background-color: var(--surface-hover); }

    /* ============================================================
       CF REDESIGN v6.0 — Fundacao CSS
       Regra: zero overrides de especificidade neste bloco.
       Tokens dark mode: sempre adicionar override [data-bs-theme="dark"]
       ============================================================ */

    /* 1. Tipografia — Inter substitui DM Sans (per VIS-01) */
    :root {
        --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
        --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

        /* Conecta tokens proprios com tokens Bootstrap 5.3 */
        --bs-body-font-family: var(--font-body);
        --bs-primary: var(--primary-color);
        --bs-primary-rgb: 37, 99, 235;

        /* 2. Layout tokens — consumidos em Phase 11 (sidebar) */
        --sidebar-width: 240px;
        --sidebar-collapsed-width: 64px;
        --sidebar-bg: #ffffff;
        --sidebar-active-bg: #eff6ff;
        --sidebar-active-color: #2563eb;
        --sidebar-text: rgba(15, 23, 42, 0.75);
        --sidebar-text-hover: #0f172a;

        /* 3. KPI tokens — consumidos em Phase 13 */
        --kpi-bg: #ffffff;
        --kpi-border: #e2e8f0;
        --kpi-hover-bg: #f8fafc;
        --kpi-value-size: 1.75rem;
        --kpi-label-color: #64748b;

        /* 4. Alert tokens — consumidos em Phase 12 */
        --alert-critical-bg: #fef2f2;
        --alert-critical-border: #fecaca;
        --alert-critical-text: #dc2626;
        --alert-warning-bg: #fffbeb;
        --alert-warning-border: #fde68a;
        --alert-warning-text: #d97706;
        --alert-info-bg: #eff6ff;
        --alert-info-border: #bfdbfe;
        --alert-info-text: #2563eb;
        --alert-success-bg: #f0fdf4;
        --alert-success-border: #bbf7d0;
        --alert-success-text: #059669;
    }

    /* 5. Dark mode overrides para novos tokens */
    [data-bs-theme="dark"] {
        --sidebar-bg: #1a1f2e;
        --sidebar-active-bg: rgba(37, 99, 235, 0.15);
        --sidebar-active-color: #60a5fa;
        --sidebar-text: rgba(232, 237, 245, 0.65);
        --sidebar-text-hover: #e8edf5;

        --kpi-bg: var(--surface);
        --kpi-border: var(--border-subtle);
        --kpi-hover-bg: var(--surface-hover);
        --kpi-label-color: var(--text-muted);

        --alert-critical-bg: #2a0f13;
        --alert-critical-border: rgba(220, 38, 38, 0.35);
        --alert-critical-text: #fca5a5;
        --alert-warning-bg: #2a1f0a;
        --alert-warning-border: rgba(217, 119, 6, 0.35);
        --alert-warning-text: #fcd34d;
        --alert-info-bg: #0c1a2e;
        --alert-info-border: rgba(37, 99, 235, 0.35);
        --alert-info-text: #93c5fd;
        --alert-success-bg: #0a2a1c;
        --alert-success-border: rgba(5, 150, 105, 0.35);
        --alert-success-text: #6ee7b7;
    }

    /* ===== Phase 11: Sidebar Collapse + Header Sticky ===== */

    /* Sidebar base — sobrescreve flex-basis das classes Bootstrap col-md-3/col-lg-2 (per NAV-01) */
    @media (min-width: 768px) {
        #sidebarNav {
            flex: 0 0 var(--sidebar-width) !important;
            max-width: var(--sidebar-width) !important;
            transition: flex-basis 0.25s ease, max-width 0.25s ease;
            overflow: hidden;
        }

        #sidebarNav.collapsed {
            flex: 0 0 var(--sidebar-collapsed-width) !important;
            max-width: var(--sidebar-collapsed-width) !important;
        }

        /* Esconder labels de texto ao colapsar — usar font-size:0 porque
           o texto dos nav-links nao esta em <span> dedicado */
        #sidebarNav.collapsed .nav-link {
            font-size: 0;
            justify-content: center;
            padding-left: 0;
            padding-right: 0;
            margin-left: 4px;
            margin-right: 4px;
        }

        /* Manter icones visiveis dentro dos nav-links colapsados */
        #sidebarNav.collapsed .nav-link i,
        #sidebarNav.collapsed .nav-link svg {
            font-size: 1rem;
            margin-right: 0 !important;
        }

        /* Esconder badges (NOVO, SERPRO, etc.) */
        #sidebarNav.collapsed .nav-link .badge {
            display: none;
        }

        /* Esconder texto e chevron dos titulos de grupo */
        #sidebarNav.collapsed .sidebar-group-title {
            font-size: 0;
            justify-content: center;
            padding-left: 0;
            padding-right: 0;
        }
        #sidebarNav.collapsed .sidebar-group-title i:first-child {
            font-size: 0.9rem;
            margin-right: 0 !important;
        }
        #sidebarNav.collapsed .sidebar-chevron {
            display: none;
        }

        /* Sub-items: remover padding-left extra */
        #sidebarNav.collapsed .sidebar-group-items .nav-link {
            padding-left: 0;
        }

        /* Esconder brand text e subtitle no header do sidebar */
        #sidebarNav.collapsed .px-3.py-3 h4,
        #sidebarNav.collapsed .px-3.py-3 small {
            display: none;
        }

        /* Esconder footer labels (nome usuario, versao, etc.) */
        #sidebarNav.collapsed .sidebar-footer span,
        #sidebarNav.collapsed .sidebar-footer small,
        #sidebarNav.collapsed .sidebar-footer .sidebar-user-name,
        #sidebarNav.collapsed .sidebar-footer .sidebar-version {
            display: none;
        }

        /* Conteudo principal: respeita o grid ao lado da sidebar expandida. */
        #sidebarNav ~ .col-md-9.col-lg-10 {
            flex: 0 0 auto;
            width: calc(100% - var(--sidebar-width));
            max-width: calc(100% - var(--sidebar-width));
            min-width: 0;
        }

        /* Ao colapsar, o conteudo ocupa somente o espaco liberado. */
        #sidebarNav.collapsed ~ .col-md-9.col-lg-10 {
            width: calc(100% - var(--sidebar-collapsed-width));
            max-width: calc(100% - var(--sidebar-collapsed-width));
        }
    }

    /* Header desktop (non-sticky para não atrapalhar prints/scroll) */
    .desktop-header-area {
        position: relative;
        z-index: 100;
        background: var(--surface, #ffffff);
        padding-top: 12px;
        padding-bottom: 12px;
        margin-bottom: 0 !important;
        border-bottom: 1px solid var(--border-subtle, #e2e8f0);
    }

    /* Titulo e subtitulo do header — herdar cor do tema (per Pitfall 3 do research) */
    #pageTitle {
        color: var(--text-primary, #0f172a);
        font-weight: 700;
        letter-spacing: -0.02em;
    }
    #pageSubtitle {
        color: var(--text-muted, #94a3b8);
        font-size: 0.85rem;
    }

    /* Phase 12: Central de Alertas */
    #alertaCriticosBar {
        background: var(--danger-color, #dc2626);
        color: #fff;
        padding: 6px 1rem;
        font-size: 0.85rem;
        position: relative;
        z-index: 100;
    }
    [data-bs-theme="dark"] #alertaCriticosBar {
        background: #991b1b;
    }
    .alert-central-card {
        border: none;
        box-shadow: var(--shadow-sm, 0 1px 2px rgba(0,0,0,0.05));
    }
    .alert-central-item {
        transition: background 0.15s;
    }
    .alert-central-item:hover {
        background: var(--color-surface-hover, rgba(0,0,0,0.02));
    }
    [data-bs-theme="dark"] .alert-central-item:hover {
        background: rgba(255,255,255,0.05);
    }

    /* ===== Phase 13: Dark Mode Fixes ===== */

    /* Fix: sticky table headers ficam transparentes no dark mode */
    [data-bs-theme="dark"] thead.sticky-top,
    [data-bs-theme="dark"] thead.sticky-top th {
        background-color: var(--surface-elevated) !important;
        border-bottom-color: var(--border-subtle) !important;
    }

    /* Fix: NPS section scoped styles com #fff hardcoded */
    [data-bs-theme="dark"] #nps-section .nps-tab-btn.active,
    [data-bs-theme="dark"] #nps-section .nps-kpi,
    [data-bs-theme="dark"] #nps-section .nps-step {
        background: var(--surface) !important;
        color: var(--text-primary) !important;
    }

    /* Fix: paginacao container */
    [data-bs-theme="dark"] .paginacao-container {
        background: var(--surface) !important;
    }

    /* ===== Phase 13: KPI Card Interactivity ===== */

    /* Hover state para todos os KPI cards clicaveis */
    .dash-kpi[onclick] {
        transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
    }
    .dash-kpi[onclick]:hover {
        background-color: var(--kpi-hover-bg);
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        transform: translateY(-1px);
    }
    .dash-kpi[onclick]:active {
        transform: translateY(0);
    }
    [data-bs-theme="dark"] .dash-kpi[onclick]:hover {
        box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    }

    /* ===== Phase 13: View Transitions ===== */

    /* Fade suave entre secoes via View Transitions API */
    ::view-transition-old(root) {
        animation: none;
        opacity: 1;
    }
    ::view-transition-new(root) {
        animation: cfFadeIn 0.2s ease;
    }
    @keyframes cfFadeIn {
        from { opacity: 0; }
        to   { opacity: 1; }
    }

    /* Animacao de entrada para cards inseridos dinamicamente */
    .cf-reveal {
        animation: cfReveal 0.2s ease forwards;
    }
    @keyframes cfReveal {
        from { opacity: 0; transform: translateY(-4px); }
        to   { opacity: 1; transform: translateY(0); }
    }

    /* MOB-01: Overlay suave com fade + blur */
    .sidebar-overlay {
        display: block !important;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.25s ease, visibility 0.25s ease, backdrop-filter 0.25s ease;
        backdrop-filter: blur(0px);
        -webkit-backdrop-filter: blur(0px);
    }
    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }
    body.sidebar-open { overflow: hidden; }

    /* ===== Tom Select & Flatpickr Standardization (v6.2 QA) ===== */
    .ts-dropdown { z-index: 1060 !important; max-height: 300px; overflow-y: auto; }
    .ts-wrapper { min-width: 120px; font-size: 0.85rem; }
    .ts-wrapper .ts-control { min-height: 31px; padding: 2px 8px; }
    .ts-wrapper.form-select-sm .ts-control { min-height: 28px; font-size: 0.78rem; }
    .flatpickr-calendar { z-index: 1060 !important; }

    /* ===== Multi-select dropdown containment (v6.2 MSEL-04) ===== */
    .dropdown-menu.ms-dropdown {
        max-height: 60vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    @media (max-width: 576px) {
        .dropdown-menu.ms-dropdown {
            max-height: 50vh;
            width: calc(100vw - 2rem);
            max-width: 300px;
        }
    }
    /* Touch-friendly multi-select items (v6.2 MSEL-01) */
    .ms-dropdown .form-check {
        padding: 0.4rem 0.75rem;
        margin: 0;
    }
    .ms-dropdown .form-check-input {
        width: 1.1em;
        height: 1.1em;
    }
    .ms-dropdown .form-check-label {
        padding-left: 0.25rem;
        cursor: pointer;
        user-select: none;
    }

/* ═══════════════════════════════════════════════════════ */
/* CF Typography Scale — Classes utilitarias              */
/* Usar em vez de style="font-size:0.Xrem" inline         */
/* ═══════════════════════════════════════════════════════ */

.cf-text-xxs { font-size: var(--cf-fs-xxs) !important; } /* 0.6rem — badges, labels minimais */
.cf-text-xs  { font-size: var(--cf-fs-xs)  !important; } /* 0.7rem — subtextos, captions */
.cf-text-sm  { font-size: var(--cf-fs-sm)  !important; } /* 0.78rem — tabelas, filtros */
.cf-text-md  { font-size: var(--cf-fs-md)  !important; } /* 0.85rem — texto padrao */
.cf-text-lg  { font-size: var(--cf-fs-lg)  !important; } /* 0.9rem — headers de secao */

/* ===== NF-e Workbench Redesign ===== */
#notas-section.nfe-workbench-shell {
    --nfe-ink: #172033;
    --nfe-ink-soft: #35445f;
    --nfe-blue: #2563eb;
    --nfe-green: #059669;
    --nfe-cyan: #0891b2;
    --nfe-amber: #d97706;
    --nfe-red: #dc2626;
    --nfe-border: #dbe4ef;
    --nfe-soft: #f6f8fb;
    color: var(--nfe-ink);
}

/* CT-e command view */
.cte-workbench-shell {
    color: var(--text-primary, #0f172a);
}

.cte-hero-board {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    gap: 22px;
    padding: 24px;
    border-radius: 18px;
    background:
        radial-gradient(circle at 12% 10%, rgba(14, 165, 233, 0.18), transparent 28%),
        linear-gradient(135deg, #0f172a 0%, #164e63 54%, #0f766e 100%);
    color: #f8fafc;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
    overflow: hidden;
    position: relative;
}

.cte-hero-board::after {
    content: "";
    position: absolute;
    inset: auto -60px -90px auto;
    width: 260px;
    height: 260px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
}

.cte-hero-copy,
.cte-hero-panel {
    position: relative;
    z-index: 1;
}

.cte-eyebrow,
.cte-section-label {
    display: inline-flex;
    align-items: center;
    width: max-content;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.12);
    color: #0e7490;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cte-hero-board .cte-eyebrow {
    background: rgba(255, 255, 255, 0.14);
    color: #a7f3d0;
}

.cte-hero-copy h2 {
    margin: 12px 0 8px;
    font-size: clamp(1.8rem, 4vw, 3.6rem);
    font-weight: 800;
    letter-spacing: 0;
}

.cte-hero-copy p {
    max-width: 760px;
    margin: 0;
    color: rgba(241, 245, 249, 0.82);
    font-size: 0.98rem;
    line-height: 1.58;
}

.cte-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.cte-hero-panel {
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.38);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
}

.cte-board-top,
.cte-board-foot {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: rgba(226, 232, 240, 0.78);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.cte-board-top strong,
.cte-board-foot strong {
    color: #fff;
    font-weight: 800;
    text-transform: none;
    letter-spacing: 0;
}

.cte-board-value {
    margin: 18px 0;
    font-size: clamp(1.7rem, 4vw, 3.2rem);
    line-height: 1.05;
    font-weight: 850;
    letter-spacing: 0;
    color: #fff;
}

.cte-board-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.cte-board-grid div {
    padding: 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.1);
}

.cte-board-grid span,
.cte-command-card small {
    display: block;
    color: rgba(226, 232, 240, 0.72);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.cte-board-grid strong {
    display: block;
    margin-top: 4px;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 850;
}

.cte-command-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.cte-command-card,
.cte-panel {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.cte-command-card {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 92px;
    padding: 16px;
}

.cte-command-card small {
    color: #64748b;
}

.cte-command-card strong {
    display: block;
    max-width: 100%;
    margin-top: 3px;
    color: #0f172a;
    font-size: 1.02rem;
    font-weight: 850;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cte-command-icon {
    display: inline-grid;
    place-items: center;
    width: 42px;
    min-width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(14, 116, 144, 0.11);
    color: #0e7490;
}

.cte-panel {
    overflow: hidden;
}

.cte-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.cte-panel-header h3 {
    margin: 8px 0 0;
    color: #0f172a;
    font-size: 1.08rem;
    font-weight: 850;
    letter-spacing: 0;
}

.cte-panel-header-stacked {
    display: block;
}

.cte-filter-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1.5fr) minmax(150px, 0.8fr) minmax(130px, 0.7fr) minmax(130px, 0.7fr) auto;
    gap: 10px;
    align-items: end;
    margin-top: 14px;
}

.cte-filter-field label {
    display: block;
    margin-bottom: 5px;
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.cte-filter-field .form-control,
.cte-filter-field .form-select {
    min-height: 36px;
    border-radius: 10px;
}

.cte-filter-actions,
.cte-preset-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.cte-preset-row {
    margin-top: 10px;
}

.cte-preset-row .btn {
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.cte-table-wrap {
    max-height: 540px;
}

.cte-table {
    font-size: 0.86rem;
}

.cte-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    background: #f8fafc;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.cte-table tbody tr {
    transition: background-color 0.16s ease;
}

.cte-table tbody tr:hover {
    background: rgba(14, 116, 144, 0.07);
}

.cte-pagination-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
}

[data-bs-theme="dark"] #cte-section.cte-workbench-shell {
    color: #e2e8f0;
}

[data-bs-theme="dark"] #cte-section .cte-hero-board {
    background:
        radial-gradient(circle at 12% 10%, rgba(34, 211, 238, 0.18), transparent 30%),
        linear-gradient(135deg, rgba(8, 13, 24, 0.98) 0%, rgba(13, 42, 61, 0.98) 54%, rgba(9, 79, 72, 0.96) 100%);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

[data-bs-theme="dark"] #cte-section .cte-command-card,
[data-bs-theme="dark"] #cte-section .cte-panel {
    border-color: rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.88);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
}

[data-bs-theme="dark"] #cte-section .cte-command-card strong,
[data-bs-theme="dark"] #cte-section .cte-panel-header h3 {
    color: #f8fafc;
}

[data-bs-theme="dark"] #cte-section .cte-command-card small,
[data-bs-theme="dark"] #cte-section .cte-filter-field label {
    color: #94a3b8;
}

[data-bs-theme="dark"] #cte-section .cte-section-label {
    background: rgba(34, 211, 238, 0.12);
    color: #67e8f9;
}

[data-bs-theme="dark"] #cte-section .cte-command-icon {
    background: rgba(34, 211, 238, 0.12);
    color: #67e8f9;
}

[data-bs-theme="dark"] #cte-section .cte-panel-header,
[data-bs-theme="dark"] #cte-section .cte-pagination-row {
    border-color: rgba(148, 163, 184, 0.16);
}

[data-bs-theme="dark"] #cte-section .cte-table thead th {
    background: #111827;
    color: #cbd5e1;
}

[data-bs-theme="dark"] #cte-section .cte-table tbody tr:hover {
    background: rgba(34, 211, 238, 0.08);
}

@media (max-width: 1180px) {
    .cte-hero-board {
        grid-template-columns: 1fr;
    }

    .cte-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cte-filter-search,
    .cte-filter-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    .cte-command-grid {
        grid-template-columns: 1fr;
    }

    .cte-panel-header {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .cte-hero-board {
        padding: 18px;
        border-radius: 14px;
    }

    .cte-board-grid,
    .cte-filter-grid {
        grid-template-columns: 1fr;
    }

    .cte-board-top,
    .cte-board-foot {
        display: block;
    }

    .cte-board-foot span {
        display: block;
        margin-top: 6px;
    }

    .cte-panel-header {
        padding: 16px;
    }

    .cte-table {
        font-size: 0.8rem;
    }
}

/* Logistica command view */
.logistica-workbench-shell {
    color: var(--text-primary, #0f172a);
}

.logistica-hero-board {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 22px;
    padding: 24px;
    border-radius: 18px;
    background:
        radial-gradient(circle at 16% 12%, rgba(16, 185, 129, 0.2), transparent 30%),
        linear-gradient(135deg, #102033 0%, #155e75 52%, #166534 100%);
    color: #f8fafc;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
    overflow: hidden;
    position: relative;
}

.logistica-hero-board::after {
    content: "";
    position: absolute;
    right: -70px;
    bottom: -110px;
    width: 310px;
    height: 310px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 50%;
}

.logistica-hero-copy,
.logistica-hero-panel {
    position: relative;
    z-index: 1;
}

.logistica-eyebrow {
    display: inline-flex;
    width: max-content;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #bbf7d0;
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.logistica-hero-copy h2 {
    margin: 12px 0 8px;
    font-size: clamp(1.8rem, 4vw, 3.5rem);
    font-weight: 850;
    letter-spacing: 0;
}

.logistica-hero-copy p {
    max-width: 760px;
    margin: 0;
    color: rgba(241, 245, 249, 0.82);
    font-size: 0.98rem;
    line-height: 1.58;
}

.logistica-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.logistica-hero-panel {
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.38);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
}

.logistica-board-top,
.logistica-board-foot {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: rgba(226, 232, 240, 0.78);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.logistica-board-top strong,
.logistica-board-foot strong {
    color: #fff;
    font-weight: 850;
    text-transform: none;
    letter-spacing: 0;
}

.logistica-board-value {
    margin: 18px 0;
    color: #fff;
    font-size: clamp(1.7rem, 4vw, 3.2rem);
    line-height: 1.05;
    font-weight: 850;
    letter-spacing: 0;
}

.logistica-board-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.logistica-board-grid div {
    padding: 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.1);
}

.logistica-board-grid span {
    display: block;
    color: rgba(226, 232, 240, 0.72);
    font-size: 0.68rem;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.logistica-board-grid strong {
    display: block;
    margin-top: 4px;
    color: #fff;
    font-size: 1.16rem;
    font-weight: 850;
}

.logistica-filter-panel,
#logistica-section .card {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.logistica-filter-panel {
    padding: 16px;
}

.logistica-filter-grid {
    display: grid;
    grid-template-columns: minmax(150px, 0.5fr) minmax(150px, 0.5fr) auto;
    align-items: end;
    gap: 10px;
}

.logistica-filter-field label {
    display: block;
    margin-bottom: 5px;
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.logistica-filter-field .form-control {
    min-height: 36px;
    border-radius: 10px;
}

.logistica-filter-actions,
.logistica-preset-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.logistica-preset-row {
    margin-top: 10px;
}

.logistica-preset-row .btn {
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.logistica-tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    padding: 8px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.92);
}

.logistica-tabs .nav-item,
.logistica-tabs .nav-link {
    width: 100%;
}

.logistica-tabs .nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 42px;
    border-radius: 12px;
    color: #475569;
    font-weight: 800;
    white-space: nowrap;
}

.logistica-tabs .nav-link.active {
    background: #0f766e;
    color: #fff;
    box-shadow: 0 10px 22px rgba(15, 118, 110, 0.22);
}

#logistica-section .card {
    overflow: hidden;
}

#logistica-section .card-header,
#logistica-section .card-body {
    background: transparent !important;
}

#logistica-section .card-title {
    color: #0f172a;
    font-weight: 850;
    letter-spacing: 0;
}

#logistica-section .card-metric h6 {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

#logistica-section .card-metric h4,
#logistica-section .card-metric h5 {
    font-weight: 850;
    letter-spacing: 0;
}

#logistica-section .table {
    font-size: 0.86rem;
}

#logistica-section .table thead th {
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    background: #f8fafc !important;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

#logistica-section .table tbody tr:hover {
    background: rgba(15, 118, 110, 0.07);
}

#lgMapaFluxos,
#lgMapaForn,
#lgMapaRotas {
    border-color: rgba(148, 163, 184, 0.28) !important;
    border-radius: 14px !important;
}

[data-bs-theme="dark"] #logistica-section.logistica-workbench-shell {
    color: #e2e8f0;
}

[data-bs-theme="dark"] #logistica-section .logistica-hero-board {
    background:
        radial-gradient(circle at 16% 12%, rgba(74, 222, 128, 0.14), transparent 30%),
        linear-gradient(135deg, rgba(8, 13, 24, 0.98) 0%, rgba(13, 42, 61, 0.98) 54%, rgba(20, 83, 45, 0.96) 100%);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

[data-bs-theme="dark"] #logistica-section .logistica-filter-panel,
[data-bs-theme="dark"] #logistica-section .card,
[data-bs-theme="dark"] #logistica-section .logistica-tabs {
    border-color: rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.88);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
}

[data-bs-theme="dark"] #logistica-section .logistica-tabs .nav-link {
    color: #cbd5e1;
}

[data-bs-theme="dark"] #logistica-section .logistica-tabs .nav-link.active {
    background: #14b8a6;
    color: #042f2e;
}

[data-bs-theme="dark"] #logistica-section .card-title {
    color: #f8fafc;
}

[data-bs-theme="dark"] #logistica-section .logistica-filter-field label {
    color: #94a3b8;
}

[data-bs-theme="dark"] #logistica-section .table thead th {
    background: #111827 !important;
    color: #cbd5e1;
}

[data-bs-theme="dark"] #logistica-section .table tbody tr:hover {
    background: rgba(20, 184, 166, 0.08);
}

@media (max-width: 1180px) {
    .logistica-hero-board {
        grid-template-columns: 1fr;
    }

    .logistica-tabs {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .logistica-filter-grid,
    .logistica-board-grid {
        grid-template-columns: 1fr;
    }

    .logistica-filter-actions {
        justify-content: flex-start;
    }

    .logistica-tabs {
        grid-template-columns: 1fr;
    }

    .logistica-board-top,
    .logistica-board-foot {
        display: block;
    }

    .logistica-board-foot span {
        display: block;
        margin-top: 6px;
    }
}

@media (max-width: 640px) {
    .logistica-hero-board {
        padding: 18px;
        border-radius: 14px;
    }

    #logistica-section .table {
        font-size: 0.8rem;
    }
}

.nfe-hero-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(330px, 430px);
    gap: 20px;
    align-items: stretch;
    padding: 24px;
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(23,32,51,0.98) 0%, rgba(23,68,88,0.96) 56%, rgba(13,112,100,0.94) 100%);
    color: #f8fafc;
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.18);
    position: relative;
    overflow: hidden;
}
.nfe-hero-panel::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
    background-size: 38px 38px;
    mask-image: linear-gradient(90deg, transparent 0%, #000 46%, #000 100%);
    pointer-events: none;
}
.nfe-hero-main,
.nfe-hero-board {
    position: relative;
    z-index: 1;
}
.nfe-hero-main {
    min-height: 218px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.nfe-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.84);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}
.nfe-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34,197,94,0.18);
}
.nfe-hero-title {
    max-width: 720px;
    margin: 18px 0 10px;
    color: #fff;
    font-size: 2.35rem;
    line-height: 1.05;
    font-weight: 850;
    letter-spacing: 0;
}
.nfe-hero-subtitle {
    max-width: 760px;
    margin: 0;
    color: rgba(255,255,255,0.72);
    font-size: 0.96rem;
    line-height: 1.5;
}
.nfe-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}
.nfe-action-primary,
.nfe-action-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 39px;
    padding: 0 14px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.82rem;
    letter-spacing: 0;
}
.nfe-action-primary {
    border: 1px solid rgba(255,255,255,0.12);
    background: #ffffff;
    color: #11314a;
}
.nfe-action-primary:hover {
    background: #f1f5f9;
    color: #11314a;
}
.nfe-action-secondary {
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(255,255,255,0.1);
    color: #ffffff;
}
.nfe-action-secondary:hover {
    border-color: rgba(255,255,255,0.28);
    background: rgba(255,255,255,0.18);
    color: #ffffff;
}
.nfe-hero-board {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 218px;
    padding: 18px;
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 8px;
    background: rgba(255,255,255,0.11);
    backdrop-filter: blur(10px);
}
.nfe-board-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}
.nfe-board-top span,
.nfe-board-grid span,
.nfe-board-footer {
    color: rgba(255,255,255,0.64);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
}
.nfe-board-top strong {
    color: #bbf7d0;
    font-size: 0.78rem;
    text-align: right;
}
.nfe-hero-board.nfe-has-pending .nfe-board-top strong {
    color: #fed7aa;
}
.nfe-board-value {
    margin: 18px 0;
    color: #fff;
    font-size: 2.15rem;
    line-height: 1.05;
    font-weight: 850;
    letter-spacing: 0;
    word-break: break-word;
}
.nfe-board-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.nfe-board-grid > div {
    padding: 12px;
    border-radius: 8px;
    background: rgba(15,23,42,0.28);
    border: 1px solid rgba(255,255,255,0.1);
}
.nfe-board-grid strong {
    display: block;
    margin-top: 6px;
    color: #fff;
    font-size: 1.15rem;
}
.nfe-board-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    color: rgba(255,255,255,0.72);
}

.nfe-ops-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 16px;
    align-items: stretch;
}
.nfe-monitor-panel,
.nfe-decision-panel,
.nfe-chart-panel,
.nfe-table-workspace,
.nfe-batch-bar,
.nfe-alertas-workspace .card-metric {
    border: 1px solid var(--nfe-border) !important;
    border-radius: 8px !important;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08) !important;
    background: #fff;
}
.nfe-monitor-panel .card-header {
    padding: 16px 18px;
    border-bottom: 1px solid var(--nfe-border);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}
.nfe-monitor-panel h6,
.nfe-decision-panel h6 {
    color: var(--nfe-ink);
    font-size: 0.95rem;
    font-weight: 800;
}
.nfe-panel-kicker {
    display: block;
    margin-bottom: 3px;
    color: var(--nfe-cyan);
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}
.nfe-decision-panel {
    padding: 18px;
}
.nfe-decision-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}
.nfe-decision-item {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    width: 100%;
    min-height: 64px;
    padding: 10px;
    border: 1px solid #e5edf7;
    border-radius: 8px;
    background: #f8fafc;
    text-align: left;
    color: var(--nfe-ink);
    transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}
.nfe-decision-item:hover {
    transform: translateY(-1px);
    border-color: #bfd2ea;
    background: #fff;
}
.nfe-decision-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.nfe-decision-icon.warn {
    background: #fff7ed;
    color: var(--nfe-amber);
}
.nfe-decision-icon.info {
    background: #ecfeff;
    color: var(--nfe-cyan);
}
.nfe-decision-icon.danger {
    background: #fef2f2;
    color: var(--nfe-red);
}
.nfe-decision-item strong {
    display: block;
    color: var(--nfe-ink);
    font-size: 0.82rem;
}
.nfe-decision-item small {
    display: block;
    margin-top: 2px;
    color: #64748b;
    font-size: 0.74rem;
}

.nfe-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}
.nfe-section-heading span {
    display: block;
    color: var(--nfe-cyan);
    font-size: 0.68rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0;
}
.nfe-section-heading strong {
    display: block;
    color: var(--nfe-ink);
    font-size: 1rem;
    font-weight: 850;
}
.nfe-section-heading small {
    color: #64748b;
    font-size: 0.78rem;
    text-align: right;
}

#notas-section .nfe-kpi-card {
    overflow: hidden;
    border: 1px solid var(--nfe-border) !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 26px rgba(15,23,42,0.07) !important;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
#notas-section .nfe-kpi-card:hover {
    transform: translateY(-2px);
    border-color: #bfd2ea !important;
    box-shadow: 0 16px 34px rgba(15,23,42,0.11) !important;
}
#notas-section .nfe-kpi-card .card-body {
    padding: 16px !important;
}
.nfe-kpi-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.nfe-kpi-top span {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0;
    text-align: right;
}
#notas-section .nfe-kpi-icon {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    border-radius: 8px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: transform 0.2s ease;
}
#notas-section .nfe-kpi-card:hover .nfe-kpi-icon {
    transform: scale(1.04);
    box-shadow: none;
}
.nfe-kpi-card-primary .nfe-kpi-icon {
    background: #eff6ff;
    color: var(--nfe-blue);
}
.nfe-kpi-card-success .nfe-kpi-icon {
    background: #ecfdf5;
    color: var(--nfe-green);
}
.nfe-kpi-card-info .nfe-kpi-icon {
    background: #ecfeff;
    color: var(--nfe-cyan);
}
.nfe-kpi-card-warning .nfe-kpi-icon {
    background: #fff7ed;
    color: var(--nfe-amber);
}
.nfe-kpi-value {
    margin-top: 16px;
    color: var(--nfe-ink);
    font-size: 1.45rem;
    line-height: 1.08;
    font-weight: 850;
    word-break: break-word;
}
.nfe-kpi-sub {
    margin-top: 8px;
    min-height: 18px;
    color: #64748b;
    font-size: 0.74rem;
}
.nfe-kpi-link {
    display: inline-flex;
    align-items: center;
    margin-top: 8px;
    color: var(--nfe-amber);
    font-size: 0.74rem;
    font-weight: 800;
    text-decoration: none;
}
.nfe-resumos-alert .nfe-kpi-icon {
    animation: nfePulseWarn 2s ease-in-out infinite;
}

.nfe-analytics-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.38fr) minmax(310px, 0.82fr);
    gap: 16px;
}
.nfe-chart-panel {
    padding: 18px;
}
.nfe-chart-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.nfe-chart-header span {
    display: block;
    color: var(--nfe-cyan);
    font-size: 0.68rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0;
}
.nfe-chart-header h6 {
    margin: 3px 0 0;
    color: var(--nfe-ink);
    font-size: 0.96rem;
    font-weight: 850;
}
.nfe-chip,
.nfe-count-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 9px;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.7rem;
    font-weight: 800;
    white-space: nowrap;
}
#notas-section .nfe-chart-wrap {
    height: 270px;
    position: relative;
}
.nfe-chart-panel:not(.nfe-chart-panel-main) .nfe-chart-wrap {
    height: 250px;
}
#notas-section .nfe-chart-empty {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #f8fafc;
}

.nfe-workspace-tabs {
    border-bottom: 0;
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--nfe-border);
    border-radius: 8px;
    background: #f8fafc;
}
.nfe-workspace-tabs .nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 800;
}
.nfe-workspace-tabs .nav-link.active {
    border-color: #bfdbfe;
    background: #fff;
    color: #1d4ed8;
    box-shadow: 0 8px 18px rgba(37,99,235,0.1);
}

.nfe-table-workspace {
    overflow: hidden;
}
.nfe-filter-panel {
    padding: 18px !important;
    border-bottom: 1px solid var(--nfe-border) !important;
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%) !important;
}
.nfe-filter-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.nfe-filter-heading span:first-child {
    display: block;
    color: var(--nfe-cyan);
    font-size: 0.68rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0;
}
.nfe-filter-heading strong {
    display: block;
    color: var(--nfe-ink);
    font-size: 1rem;
    font-weight: 850;
}
.nfe-filter-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1.1fr) 150px 150px minmax(280px, auto) auto;
    gap: 10px;
    align-items: center;
}
.nfe-search-box .form-control {
    min-height: 36px;
}
.nfe-preset-group,
.nfe-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.nfe-preset-group .btn,
.nfe-toolbar .btn {
    min-height: 32px;
    border-radius: 8px;
    font-size: 0.74rem;
    font-weight: 800;
}
.nfe-toolbar {
    justify-content: flex-end;
}
.nfe-advanced-toggle {
    color: #1d4ed8;
    font-weight: 800;
}
.nfe-advanced-panel {
    border: 1px solid #e5edf7;
    border-radius: 8px;
    background: #f8fafc;
}
.nfe-table-scroll {
    border-radius: 0 0 8px 8px;
}
#notas-section #tableNotas thead th,
#notas-section #tableAlertasPreco thead th {
    background: #f1f5f9;
    color: #475569;
    border-bottom: 1px solid var(--nfe-border);
    font-size: 0.73rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0;
}
#notas-section #tableNotas tbody td,
#notas-section #tableAlertasPreco tbody td {
    vertical-align: middle;
    border-color: #edf2f7;
    color: #27364f;
    font-size: 0.8rem;
}
#notas-section #tableNotas tbody tr:hover,
#notas-section #tableAlertasPreco tbody tr:hover {
    background: #f8fbff;
}
.nfe-batch-bar {
    border-left: 4px solid var(--nfe-blue) !important;
}
.nfe-alertas-workspace .row.g-2.mb-3 .card-metric {
    border-left: 3px solid #e2e8f0 !important;
}
.nfe-alertas-workspace .card-metric .card-body {
    padding: 14px !important;
}
.nfe-alertas-workspace .bg-light.rounded {
    border-radius: 8px !important;
    background: #f8fafc !important;
    border: 1px solid #e5edf7;
}

[data-bs-theme="dark"] #notas-section.nfe-workbench-shell {
    --nfe-ink: #f1f5f9;
    --nfe-ink-soft: #cbd5e1;
    --nfe-border: #334155;
    --nfe-soft: #111827;
    color: #e8edf5;
}
[data-bs-theme="dark"] #notas-section .nfe-hero-panel {
    background:
        linear-gradient(135deg, rgba(8,13,24,0.98) 0%, rgba(13,42,61,0.98) 54%, rgba(9,79,72,0.96) 100%);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.42);
}
[data-bs-theme="dark"] #notas-section .nfe-hero-board {
    background: rgba(15, 23, 42, 0.56);
    border-color: rgba(148, 163, 184, 0.24);
}
[data-bs-theme="dark"] #notas-section .nfe-board-grid > div {
    background: rgba(8, 13, 24, 0.48);
    border-color: rgba(148, 163, 184, 0.18);
}
[data-bs-theme="dark"] #notas-section .nfe-action-primary {
    background: #e2e8f0;
    color: #0f172a;
    border-color: rgba(255,255,255,0.1);
}
[data-bs-theme="dark"] #notas-section .nfe-action-primary:hover {
    background: #f8fafc;
    color: #0f172a;
}
[data-bs-theme="dark"] #notas-section .nfe-action-secondary {
    background: rgba(148, 163, 184, 0.1);
    border-color: rgba(148, 163, 184, 0.24);
    color: #e2e8f0;
}
[data-bs-theme="dark"] #notas-section .nfe-action-secondary:hover {
    background: rgba(148, 163, 184, 0.18);
    color: #fff;
}
[data-bs-theme="dark"] #notas-section .nfe-monitor-panel,
[data-bs-theme="dark"] #notas-section .nfe-decision-panel,
[data-bs-theme="dark"] #notas-section .nfe-chart-panel,
[data-bs-theme="dark"] #notas-section .nfe-table-workspace,
[data-bs-theme="dark"] #notas-section .nfe-batch-bar,
[data-bs-theme="dark"] #notas-section .nfe-alertas-workspace .card-metric {
    background: #1a1f2e !important;
    border-color: #334155 !important;
    box-shadow: 0 14px 34px rgba(0,0,0,0.34) !important;
}
[data-bs-theme="dark"] #notas-section .nfe-monitor-panel .card-header,
[data-bs-theme="dark"] #notas-section .nfe-filter-panel {
    background: linear-gradient(180deg, #1e2538 0%, #1a1f2e 100%) !important;
    border-color: #334155 !important;
}
[data-bs-theme="dark"] #notas-section .nfe-monitor-panel h6,
[data-bs-theme="dark"] #notas-section .nfe-decision-panel h6,
[data-bs-theme="dark"] #notas-section .nfe-section-heading strong,
[data-bs-theme="dark"] #notas-section .nfe-chart-header h6,
[data-bs-theme="dark"] #notas-section .nfe-filter-heading strong,
[data-bs-theme="dark"] #notas-section .nfe-kpi-value {
    color: #f1f5f9;
}
[data-bs-theme="dark"] #notas-section .nfe-section-heading small,
[data-bs-theme="dark"] #notas-section .nfe-kpi-sub,
[data-bs-theme="dark"] #notas-section .nfe-decision-item small {
    color: #94a3b8;
}
[data-bs-theme="dark"] #notas-section .nfe-decision-item {
    background: #151b2a;
    border-color: #334155;
    color: #e8edf5;
}
[data-bs-theme="dark"] #notas-section .nfe-decision-item:hover {
    background: #1e2538;
    border-color: #475569;
}
[data-bs-theme="dark"] #notas-section .nfe-decision-item strong {
    color: #f8fafc;
}
[data-bs-theme="dark"] #notas-section .nfe-decision-icon.warn {
    background: rgba(217,119,6,0.16);
    color: #fbbf24;
}
[data-bs-theme="dark"] #notas-section .nfe-decision-icon.info {
    background: rgba(8,145,178,0.16);
    color: #67e8f9;
}
[data-bs-theme="dark"] #notas-section .nfe-decision-icon.danger {
    background: rgba(220,38,38,0.16);
    color: #fca5a5;
}
[data-bs-theme="dark"] #notas-section .nfe-kpi-card {
    background: #1a1f2e !important;
    border-color: #334155 !important;
    box-shadow: 0 12px 30px rgba(0,0,0,0.28) !important;
}
[data-bs-theme="dark"] #notas-section .nfe-kpi-card:hover {
    border-color: #475569 !important;
    box-shadow: 0 16px 36px rgba(0,0,0,0.38) !important;
}
[data-bs-theme="dark"] #notas-section .nfe-kpi-top span {
    color: #94a3b8;
}
[data-bs-theme="dark"] #notas-section .nfe-kpi-card-primary .nfe-kpi-icon {
    background: rgba(37,99,235,0.18);
    color: #93c5fd;
}
[data-bs-theme="dark"] #notas-section .nfe-kpi-card-success .nfe-kpi-icon {
    background: rgba(5,150,105,0.18);
    color: #6ee7b7;
}
[data-bs-theme="dark"] #notas-section .nfe-kpi-card-info .nfe-kpi-icon {
    background: rgba(8,145,178,0.18);
    color: #67e8f9;
}
[data-bs-theme="dark"] #notas-section .nfe-kpi-card-warning .nfe-kpi-icon {
    background: rgba(217,119,6,0.18);
    color: #fbbf24;
}
[data-bs-theme="dark"] #notas-section .nfe-chart-empty {
    background: #151b2a;
}
[data-bs-theme="dark"] #notas-section .nfe-chip,
[data-bs-theme="dark"] #notas-section .nfe-count-pill {
    background: rgba(37,99,235,0.16);
    border-color: rgba(96,165,250,0.28);
    color: #93c5fd;
}
[data-bs-theme="dark"] #notas-section .nfe-workspace-tabs {
    background: #151b2a;
    border-color: #334155;
}
[data-bs-theme="dark"] #notas-section .nfe-workspace-tabs .nav-link {
    color: #cbd5e1;
}
[data-bs-theme="dark"] #notas-section .nfe-workspace-tabs .nav-link.active {
    background: #1e2538;
    border-color: #3b82f6;
    color: #bfdbfe;
    box-shadow: 0 10px 22px rgba(0,0,0,0.28);
}
[data-bs-theme="dark"] #notas-section .nfe-advanced-panel,
[data-bs-theme="dark"] #notas-section .nfe-alertas-workspace .bg-light.rounded {
    background: #151b2a !important;
    border-color: #334155 !important;
}
[data-bs-theme="dark"] #notas-section #notasFilterChips .badge,
[data-bs-theme="dark"] #notas-section .badge.bg-light {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}
[data-bs-theme="dark"] #notas-section #tableNotas thead th,
[data-bs-theme="dark"] #notas-section #tableAlertasPreco thead th {
    background: #151b2a !important;
    color: #aebbd0 !important;
    border-color: #334155 !important;
}
[data-bs-theme="dark"] #notas-section #tableNotas tbody td,
[data-bs-theme="dark"] #notas-section #tableAlertasPreco tbody td {
    color: #d8e0ec;
    border-color: #2d3548;
}
[data-bs-theme="dark"] #notas-section #tableNotas tbody tr:hover,
[data-bs-theme="dark"] #notas-section #tableAlertasPreco tbody tr:hover {
    background: rgba(96,165,250,0.06) !important;
}
[data-bs-theme="dark"] #notas-section .paginacao-container {
    background: #1a1f2e;
    border-color: #334155;
}
[data-bs-theme="dark"] #notas-section .page-link {
    background: #151b2a;
    border-color: #334155;
    color: #cbd5e1;
}
[data-bs-theme="dark"] #notas-section .page-item.active .page-link {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

@media (max-width: 1199px) {
    .nfe-hero-panel,
    .nfe-ops-grid,
    .nfe-analytics-grid {
        grid-template-columns: 1fr;
    }
    .nfe-filter-grid {
        grid-template-columns: minmax(260px, 1fr) 150px 150px;
    }
    .nfe-toolbar {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
    .nfe-preset-group {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767px) {
    .nfe-hero-panel {
        padding: 18px;
    }
    .nfe-hero-main {
        min-height: 0;
    }
    .nfe-hero-title {
        font-size: 1.65rem;
    }
    .nfe-hero-actions .btn {
        width: 100%;
    }
    .nfe-hero-board {
        min-height: 0;
    }
    .nfe-board-value {
        font-size: 1.55rem;
    }
    .nfe-board-grid {
        grid-template-columns: 1fr;
    }
    .nfe-section-heading {
        display: block;
    }
    .nfe-section-heading small {
        display: block;
        margin-top: 4px;
        text-align: left;
    }
    #notas-section .nfe-kpi-card .card-body {
        padding: 13px !important;
    }
    #notas-section .nfe-kpi-icon {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
    }
    .nfe-kpi-top {
        align-items: flex-start;
    }
    .nfe-kpi-top span {
        font-size: 0.66rem;
    }
    .nfe-kpi-value {
        font-size: 1.05rem;
    }
    #notas-section .nfe-chart-wrap,
    .nfe-chart-panel:not(.nfe-chart-panel-main) .nfe-chart-wrap {
        height: 215px;
    }
    .nfe-filter-grid {
        grid-template-columns: 1fr;
    }
    .nfe-toolbar {
        justify-content: flex-start;
    }
    .nfe-filter-heading {
        display: block;
    }
    .nfe-count-pill {
        margin-top: 8px;
    }
    .nfe-decision-item {
        min-height: 58px;
    }
}

/* Produtos Canonicos :: workspace de cadastro mestre */
.pcan-workbench-shell {
    padding: 0;
}

.pcan-workbench-shell .pcan-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.8fr);
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1.25rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 54%, #059669 100%);
    color: #fff;
    overflow: hidden;
}

.pcan-workbench-shell .pcan-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.45rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.76);
}

.pcan-workbench-shell .pcan-hero h2 {
    margin: 0;
    font-size: clamp(1.45rem, 2.1vw, 2.05rem);
    font-weight: 850;
    letter-spacing: 0;
}

.pcan-workbench-shell .pcan-hero p {
    max-width: 760px;
    margin: 0.45rem 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.92rem;
    line-height: 1.45;
}

.pcan-workbench-shell .pcan-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.pcan-workbench-shell .pcan-hero-actions .btn {
    border-radius: 6px;
    font-weight: 700;
}

.pcan-workbench-shell .pcan-hero-board {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
}

.pcan-workbench-shell .pcan-hero-board > div {
    padding: 0.8rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.24);
    backdrop-filter: blur(12px);
}

.pcan-workbench-shell .pcan-hero-board span,
.pcan-workbench-shell .pcan-kpi-card span,
.pcan-workbench-shell .pcan-panel-header span,
.pcan-workbench-shell .pcan-side-title span {
    display: block;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.pcan-workbench-shell .pcan-hero-board strong {
    display: block;
    margin-top: 0.15rem;
    font-size: 1.2rem;
    line-height: 1.1;
}

.pcan-workbench-shell #pcanSaude[data-status="ok"] { color: #86efac; }
.pcan-workbench-shell #pcanSaude[data-status="warn"] { color: #fde68a; }
.pcan-workbench-shell #pcanSaude[data-status="risk"] { color: #fecaca; }

.pcan-workbench-shell .pcan-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.pcan-workbench-shell .pcan-kpi-card,
.pcan-workbench-shell .pcan-main-panel,
.pcan-workbench-shell .pcan-side-panel,
.pcan-workbench-shell .pcan-suggestions-panel {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.pcan-workbench-shell .pcan-kpi-card {
    position: relative;
    min-height: 104px;
    padding: 0.85rem 0.95rem;
    overflow: hidden;
}

.pcan-workbench-shell .pcan-kpi-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: #64748b;
}

.pcan-workbench-shell .pcan-kpi-card[data-tone="purple"]::before { background: #7c3aed; }
.pcan-workbench-shell .pcan-kpi-card[data-tone="blue"]::before { background: #0284c7; }
.pcan-workbench-shell .pcan-kpi-card[data-tone="green"]::before { background: #059669; }
.pcan-workbench-shell .pcan-kpi-card[data-tone="amber"]::before { background: #d97706; }

.pcan-workbench-shell .pcan-kpi-card span,
.pcan-workbench-shell .pcan-panel-header span,
.pcan-workbench-shell .pcan-side-title span {
    color: #64748b;
}

.pcan-workbench-shell .pcan-kpi-card strong {
    display: block;
    margin-top: 0.25rem;
    color: #0f172a;
    font-size: 1.45rem;
    font-weight: 850;
    line-height: 1.1;
}

.pcan-workbench-shell .pcan-kpi-card small {
    display: block;
    margin-top: 0.3rem;
    color: #64748b;
    font-size: 0.76rem;
}

.pcan-workbench-shell .pcan-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 1rem;
    align-items: start;
}

.pcan-workbench-shell .pcan-panel-header,
.pcan-workbench-shell .pcan-side-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.95rem 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.pcan-workbench-shell .pcan-panel-header strong,
.pcan-workbench-shell .pcan-side-title strong {
    color: #0f172a;
    font-size: 0.98rem;
    font-weight: 800;
}

.pcan-workbench-shell .pcan-search-row {
    display: flex;
    gap: 0.45rem;
    min-width: min(100%, 430px);
}

.pcan-workbench-shell .pcan-search-row .input-group {
    min-width: 260px;
}

.pcan-workbench-shell .pcan-table-wrap {
    max-height: 560px;
    overflow: auto;
}

.pcan-workbench-shell .pcan-table {
    font-size: 0.82rem;
}

.pcan-workbench-shell .pcan-table thead th {
    background: #0f172a;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.08);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.pcan-workbench-shell .pcan-table tbody td {
    vertical-align: middle;
    color: #334155;
}

.pcan-workbench-shell .pcan-row-sub {
    margin-top: 0.15rem;
    color: #64748b;
    font-size: 0.72rem;
}

.pcan-workbench-shell .pcan-icon-btn {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pcan-workbench-shell .pcan-side-panel {
    position: sticky;
    top: 0.75rem;
}

.pcan-workbench-shell .pcan-detail-empty {
    min-height: 260px;
    display: grid;
    place-items: center;
    padding: 1.25rem;
    text-align: center;
    color: #64748b;
}

.pcan-workbench-shell .pcan-detail-empty i {
    display: block;
    margin-bottom: 0.5rem;
    color: #94a3b8;
    font-size: 2rem;
}

.pcan-workbench-shell .pcan-detail-list {
    max-height: 560px;
    overflow: auto;
    padding: 0.65rem;
}

.pcan-workbench-shell .pcan-detail-item {
    padding: 0.7rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 7px;
    background: #f8fafc;
}

.pcan-workbench-shell .pcan-detail-item + .pcan-detail-item {
    margin-top: 0.5rem;
}

.pcan-workbench-shell .pcan-detail-item strong {
    display: block;
    color: #0f172a;
    font-size: 0.82rem;
    line-height: 1.25;
}

.pcan-workbench-shell .pcan-detail-item div {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.45rem;
    color: #64748b;
    font-size: 0.74rem;
}

.pcan-workbench-shell .pcan-suggestions-panel {
    margin-top: 1rem;
}

.pcan-workbench-shell .pcan-suggestions-panel .pcan-panel-header small {
    color: #64748b;
}

[data-bs-theme="dark"] .pcan-workbench-shell .pcan-hero {
    background: linear-gradient(135deg, #020617 0%, #1e3a8a 55%, #065f46 100%);
    border-color: rgba(148, 163, 184, 0.2);
}

[data-bs-theme="dark"] .pcan-workbench-shell .pcan-kpi-card,
[data-bs-theme="dark"] .pcan-workbench-shell .pcan-main-panel,
[data-bs-theme="dark"] .pcan-workbench-shell .pcan-side-panel,
[data-bs-theme="dark"] .pcan-workbench-shell .pcan-suggestions-panel {
    background: #111827;
    border-color: rgba(148, 163, 184, 0.18);
    box-shadow: none;
}

[data-bs-theme="dark"] .pcan-workbench-shell .pcan-kpi-card strong,
[data-bs-theme="dark"] .pcan-workbench-shell .pcan-panel-header strong,
[data-bs-theme="dark"] .pcan-workbench-shell .pcan-side-title strong,
[data-bs-theme="dark"] .pcan-workbench-shell .pcan-detail-item strong {
    color: #e5e7eb;
}

[data-bs-theme="dark"] .pcan-workbench-shell .pcan-kpi-card span,
[data-bs-theme="dark"] .pcan-workbench-shell .pcan-kpi-card small,
[data-bs-theme="dark"] .pcan-workbench-shell .pcan-panel-header span,
[data-bs-theme="dark"] .pcan-workbench-shell .pcan-side-title span,
[data-bs-theme="dark"] .pcan-workbench-shell .pcan-row-sub,
[data-bs-theme="dark"] .pcan-workbench-shell .pcan-detail-empty,
[data-bs-theme="dark"] .pcan-workbench-shell .pcan-detail-item div,
[data-bs-theme="dark"] .pcan-workbench-shell .pcan-suggestions-panel .pcan-panel-header small {
    color: #9ca3af;
}

[data-bs-theme="dark"] .pcan-workbench-shell .pcan-panel-header,
[data-bs-theme="dark"] .pcan-workbench-shell .pcan-side-title {
    border-bottom-color: rgba(148, 163, 184, 0.16);
}

[data-bs-theme="dark"] .pcan-workbench-shell .pcan-table thead th {
    background: #020617;
    color: #e5e7eb;
}

[data-bs-theme="dark"] .pcan-workbench-shell .pcan-table tbody td {
    color: #d1d5db;
}

[data-bs-theme="dark"] .pcan-workbench-shell .pcan-detail-item {
    background: #0f172a;
    border-color: rgba(148, 163, 184, 0.16);
}

@media (max-width: 1200px) {
    .pcan-workbench-shell .pcan-layout {
        grid-template-columns: 1fr;
    }
    .pcan-workbench-shell .pcan-side-panel {
        position: static;
    }
}

@media (max-width: 992px) {
    .pcan-workbench-shell .pcan-hero,
    .pcan-workbench-shell .pcan-kpi-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 576px) {
    .pcan-workbench-shell .pcan-hero,
    .pcan-workbench-shell .pcan-kpi-grid {
        grid-template-columns: 1fr;
    }
    .pcan-workbench-shell .pcan-hero {
        padding: 1rem;
    }
    .pcan-workbench-shell .pcan-hero h2 {
        font-size: 1.35rem;
    }
    .pcan-workbench-shell .pcan-hero-actions .btn,
    .pcan-workbench-shell .pcan-search-row,
    .pcan-workbench-shell .pcan-search-row .input-group {
        width: 100%;
    }
    .pcan-workbench-shell .pcan-search-row,
    .pcan-workbench-shell .pcan-panel-header {
        flex-direction: column;
        align-items: stretch;
    }
    .pcan-workbench-shell .pcan-table {
        font-size: 0.76rem;
    }
}

/* Assistente de Dados :: consulta operacional segura */
.assist-workbench-shell {
    padding: 0;
    color: #172033;
}

.assist-workbench-shell .assist-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 390px);
    gap: 1rem;
    align-items: stretch;
    margin-bottom: 1rem;
    padding: 1.25rem;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, rgba(14, 116, 144, 0.96) 56%, rgba(5, 150, 105, 0.95) 100%);
    color: #fff;
    overflow: hidden;
}

.assist-workbench-shell .assist-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.45rem;
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.assist-workbench-shell .assist-hero h2 {
    margin: 0;
    font-size: clamp(1.5rem, 2.2vw, 2.1rem);
    font-weight: 850;
    letter-spacing: 0;
}

.assist-workbench-shell .assist-hero p {
    max-width: 760px;
    margin: 0.45rem 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.92rem;
    line-height: 1.45;
}

.assist-workbench-shell .assist-guardrail {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-height: 118px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.24);
    backdrop-filter: blur(12px);
}

.assist-workbench-shell .assist-guardrail i {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.14);
    color: #a7f3d0;
    font-size: 1.05rem;
}

.assist-workbench-shell .assist-guardrail strong,
.assist-workbench-shell .assist-guardrail span {
    display: block;
}

.assist-workbench-shell .assist-guardrail strong {
    font-size: 1rem;
    font-weight: 850;
}

.assist-workbench-shell .assist-guardrail span {
    margin-top: 0.2rem;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.82rem;
}

.assist-workbench-shell .assist-query-panel,
.assist-workbench-shell .assist-answer-panel {
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.assist-workbench-shell .assist-query-panel {
    margin-bottom: 1rem;
    padding: 1rem;
}

.assist-workbench-shell .assist-query-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 220px);
    gap: 0.75rem;
}

.assist-workbench-shell #assistentePergunta {
    min-height: 118px;
    resize: vertical;
    border-color: rgba(148, 163, 184, 0.28);
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.45;
}

.assist-workbench-shell .assist-query-actions {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.assist-workbench-shell .assist-query-actions .btn,
.assist-workbench-shell .assist-query-actions .form-select {
    min-height: 40px;
    border-radius: 7px;
    font-weight: 750;
}

.assist-workbench-shell .assist-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.assist-workbench-shell .assist-chip {
    min-height: 34px;
    padding: 0.35rem 0.7rem;
    border: 1px solid rgba(14, 116, 144, 0.2);
    border-radius: 999px;
    background: rgba(14, 116, 144, 0.08);
    color: #0e7490;
    font-size: 0.78rem;
    font-weight: 800;
}

.assist-workbench-shell .assist-chip:hover {
    border-color: rgba(14, 116, 144, 0.35);
    background: rgba(14, 116, 144, 0.14);
}

.assist-workbench-shell .assist-loading {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1rem;
    padding: 0.7rem 0.85rem;
    border: 1px solid rgba(37, 99, 235, 0.18);
    border-radius: 8px;
    background: rgba(37, 99, 235, 0.06);
    color: #1d4ed8;
    font-size: 0.86rem;
    font-weight: 800;
}

.assist-workbench-shell .assist-loading .spinner-border {
    width: 1.1rem;
    height: 1.1rem;
}

.assist-workbench-shell .assist-answer-panel {
    padding: 1rem;
    overflow: hidden;
}

.assist-workbench-shell .assist-answer-panel.is-ok {
    border-top: 4px solid #059669;
}

.assist-workbench-shell .assist-answer-panel.is-warn {
    border-top: 4px solid #d97706;
}

.assist-workbench-shell .assist-answer-head {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 0.9rem;
}

.assist-workbench-shell .assist-answer-icon {
    display: grid;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 8px;
    background: rgba(5, 150, 105, 0.1);
    color: #047857;
}

.assist-workbench-shell .assist-answer-panel.is-warn .assist-answer-icon {
    background: rgba(217, 119, 6, 0.12);
    color: #b45309;
}

.assist-workbench-shell .assist-answer-head strong,
.assist-workbench-shell .assist-total-card strong {
    color: #0f172a;
    font-weight: 850;
}

.assist-workbench-shell .assist-answer-head strong {
    display: block;
    font-size: 1rem;
    line-height: 1.35;
}

.assist-workbench-shell .assist-answer-head span,
.assist-workbench-shell .assist-total-card span,
.assist-workbench-shell .assist-fontes {
    color: #64748b;
    font-size: 0.78rem;
}

.assist-workbench-shell .assist-answer-head span {
    display: block;
    margin-top: 0.25rem;
}

.assist-workbench-shell .assist-total-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.7rem;
    margin: 0.85rem 0;
}

.assist-workbench-shell .assist-total-card {
    min-height: 82px;
    padding: 0.75rem 0.85rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    background: #f8fafc;
}

.assist-workbench-shell .assist-total-card span {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.assist-workbench-shell .assist-total-card strong {
    display: block;
    font-size: 1.25rem;
    line-height: 1.12;
}

.assist-workbench-shell .assist-list-result {
    display: grid;
    gap: 0.5rem;
    padding: 0;
    margin: 0.85rem 0 0;
    list-style: none;
}

.assist-workbench-shell .assist-list-result li {
    padding: 0.7rem 0.8rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    background: #f8fafc;
    color: #334155;
    font-size: 0.84rem;
}

.assist-workbench-shell .assist-table-wrap {
    max-height: 540px;
    margin-top: 0.85rem;
    overflow: auto;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
}

.assist-workbench-shell .assist-table {
    min-width: 760px;
    font-size: 0.82rem;
}

.assist-workbench-shell .assist-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    border-color: rgba(255, 255, 255, 0.08);
    background: #0f172a;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.assist-workbench-shell .assist-table tbody td {
    color: #334155;
    vertical-align: middle;
}

.assist-workbench-shell .assist-fontes {
    margin-top: 0.85rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

[data-bs-theme="dark"] .assist-workbench-shell {
    color: #e5e7eb;
}

[data-bs-theme="dark"] .assist-workbench-shell .assist-hero {
    border-color: rgba(148, 163, 184, 0.2);
    background: linear-gradient(135deg, #020617 0%, #164e63 56%, #065f46 100%);
}

[data-bs-theme="dark"] .assist-workbench-shell .assist-query-panel,
[data-bs-theme="dark"] .assist-workbench-shell .assist-answer-panel {
    border-color: rgba(148, 163, 184, 0.18);
    background: #111827;
    box-shadow: none;
}

[data-bs-theme="dark"] .assist-workbench-shell #assistentePergunta,
[data-bs-theme="dark"] .assist-workbench-shell .assist-query-actions .form-select {
    border-color: rgba(148, 163, 184, 0.28);
    background-color: #0f172a;
    color: #e5e7eb;
}

[data-bs-theme="dark"] .assist-workbench-shell #assistentePergunta::placeholder {
    color: #94a3b8;
}

[data-bs-theme="dark"] .assist-workbench-shell .assist-chip {
    border-color: rgba(34, 211, 238, 0.22);
    background: rgba(34, 211, 238, 0.1);
    color: #67e8f9;
}

[data-bs-theme="dark"] .assist-workbench-shell .assist-loading {
    border-color: rgba(96, 165, 250, 0.22);
    background: rgba(96, 165, 250, 0.1);
    color: #93c5fd;
}

[data-bs-theme="dark"] .assist-workbench-shell .assist-total-card,
[data-bs-theme="dark"] .assist-workbench-shell .assist-list-result li,
[data-bs-theme="dark"] .assist-workbench-shell .assist-table-wrap {
    border-color: rgba(148, 163, 184, 0.16);
    background: #0f172a;
}

[data-bs-theme="dark"] .assist-workbench-shell .assist-answer-icon {
    background: rgba(16, 185, 129, 0.12);
    color: #6ee7b7;
}

[data-bs-theme="dark"] .assist-workbench-shell .assist-answer-panel.is-warn .assist-answer-icon {
    background: rgba(251, 191, 36, 0.12);
    color: #fcd34d;
}

[data-bs-theme="dark"] .assist-workbench-shell .assist-answer-head strong,
[data-bs-theme="dark"] .assist-workbench-shell .assist-total-card strong {
    color: #f8fafc;
}

[data-bs-theme="dark"] .assist-workbench-shell .assist-answer-head span,
[data-bs-theme="dark"] .assist-workbench-shell .assist-total-card span,
[data-bs-theme="dark"] .assist-workbench-shell .assist-fontes,
[data-bs-theme="dark"] .assist-workbench-shell .assist-list-result li,
[data-bs-theme="dark"] .assist-workbench-shell .assist-table tbody td {
    color: #cbd5e1;
}

[data-bs-theme="dark"] .assist-workbench-shell .assist-table thead th {
    background: #020617;
    color: #e5e7eb;
}

[data-bs-theme="dark"] .assist-workbench-shell .assist-fontes {
    border-top-color: rgba(148, 163, 184, 0.16);
}

@media (max-width: 992px) {
    .assist-workbench-shell .assist-hero,
    .assist-workbench-shell .assist-query-grid,
    .assist-workbench-shell .assist-total-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .assist-workbench-shell .assist-hero,
    .assist-workbench-shell .assist-query-panel,
    .assist-workbench-shell .assist-answer-panel {
        padding: 1rem;
    }

    .assist-workbench-shell .assist-hero h2 {
        font-size: 1.35rem;
    }

    .assist-workbench-shell .assist-guardrail,
    .assist-workbench-shell .assist-answer-head {
        align-items: flex-start;
    }

    .assist-workbench-shell .assist-query-actions .btn,
    .assist-workbench-shell .assist-query-actions .form-select,
    .assist-workbench-shell .assist-chip {
        width: 100%;
    }

    .assist-workbench-shell .assist-chip-row {
        display: grid;
        grid-template-columns: 1fr;
    }
}

/* SPED Fiscal :: geracao e integracao contabil */
#sped-section.sped-workbench-shell {
    color: #172033;
}

#sped-section .sped-generator-card,
#sped-section .card.border-0.shadow-sm {
    border: 1px solid rgba(148, 163, 184, 0.22) !important;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06) !important;
    overflow: hidden;
}

#sped-section .sped-generator-card {
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.04) 0%, rgba(14, 116, 144, 0.05) 48%, rgba(5, 150, 105, 0.08) 100%),
        #fff;
}

#sped-section .sped-title {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.45rem !important;
    color: #0f172a;
    font-size: 1.25rem;
    font-weight: 850;
    letter-spacing: 0;
}

#sped-section .sped-lead {
    max-width: 860px;
    color: #64748b !important;
    font-size: 0.92rem;
    line-height: 1.45;
}

#sped-section .sped-filter-grid {
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.76);
}

#sped-section .form-label {
    color: #475569;
    font-size: 0.74rem;
    font-weight: 850 !important;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

#sped-section .form-control,
#sped-section .form-select,
#sped-section .btn {
    border-radius: 7px;
}

#sped-section .sped-action-row .btn {
    min-height: 40px;
    flex: 1;
    font-weight: 800;
}

#sped-section .sped-preview-card {
    border: 1px solid rgba(14, 116, 144, 0.16) !important;
    border-radius: 8px;
    background: #f8fafc !important;
}

#sped-section .sped-preview-card h6,
#sped-section .card-title,
#sped-section .card h5,
#sped-section .card h6 {
    color: #0f172a;
    font-weight: 850;
}

#sped-section #sped-preview .fs-3 {
    font-size: 1.55rem !important;
    line-height: 1.1;
}

#sped-section #sped-preview small,
#sped-section .card small,
#sped-section .text-muted {
    color: #64748b !important;
}

#sped-section .sped-info-note {
    border: 1px solid rgba(14, 116, 144, 0.16) !important;
    border-radius: 8px;
    background: rgba(14, 116, 144, 0.08);
    color: #155e75;
}

#sped-section .card.bg-light {
    border: 1px solid rgba(148, 163, 184, 0.18) !important;
    border-radius: 8px;
    background: #f8fafc !important;
}

#sped-section .card.bg-light .card-body {
    display: flex;
    min-height: 188px;
    flex-direction: column;
}

#sped-section .card.bg-light .card-body i.fa-2x {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    margin: 0 auto 0.65rem !important;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    font-size: 1.1rem;
}

#sped-section .card.bg-light .card-body .btn {
    margin-top: auto !important;
    font-weight: 800;
}

#sped-section .table-responsive {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
}

#sped-section .table {
    margin-bottom: 0;
    font-size: 0.82rem;
}

#sped-section .table thead th {
    border-color: rgba(255, 255, 255, 0.08);
    background: #0f172a !important;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

#sped-section .table tbody td {
    color: #334155;
    vertical-align: middle;
}

#sped-section #pcFormNovo,
#sped-section #pcFormMapeamento {
    border: 1px solid rgba(37, 99, 235, 0.16) !important;
    border-radius: 8px;
    background: rgba(37, 99, 235, 0.06) !important;
}

[data-bs-theme="dark"] #sped-section.sped-workbench-shell {
    color: #e5e7eb;
}

[data-bs-theme="dark"] #sped-section .sped-generator-card,
[data-bs-theme="dark"] #sped-section .card.border-0.shadow-sm {
    border-color: rgba(148, 163, 184, 0.18) !important;
    background: #111827;
    box-shadow: none !important;
}

[data-bs-theme="dark"] #sped-section .sped-generator-card {
    background:
        linear-gradient(135deg, rgba(34, 211, 238, 0.06) 0%, rgba(16, 185, 129, 0.07) 100%),
        #111827;
}

[data-bs-theme="dark"] #sped-section .sped-filter-grid,
[data-bs-theme="dark"] #sped-section .sped-preview-card,
[data-bs-theme="dark"] #sped-section .card.bg-light,
[data-bs-theme="dark"] #sped-section #pcFormNovo,
[data-bs-theme="dark"] #sped-section #pcFormMapeamento,
[data-bs-theme="dark"] #sped-section .table-responsive {
    border-color: rgba(148, 163, 184, 0.16) !important;
    background: #0f172a !important;
}

[data-bs-theme="dark"] #sped-section .sped-title,
[data-bs-theme="dark"] #sped-section .sped-preview-card h6,
[data-bs-theme="dark"] #sped-section .card-title,
[data-bs-theme="dark"] #sped-section .card h5,
[data-bs-theme="dark"] #sped-section .card h6 {
    color: #f8fafc;
}

[data-bs-theme="dark"] #sped-section .sped-lead,
[data-bs-theme="dark"] #sped-section #sped-preview small,
[data-bs-theme="dark"] #sped-section .card small,
[data-bs-theme="dark"] #sped-section .text-muted,
[data-bs-theme="dark"] #sped-section .form-label,
[data-bs-theme="dark"] #sped-section .table tbody td {
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] #sped-section .form-control,
[data-bs-theme="dark"] #sped-section .form-select {
    border-color: rgba(148, 163, 184, 0.28);
    background-color: #111827;
    color: #e5e7eb;
}

[data-bs-theme="dark"] #sped-section .sped-info-note {
    border-color: rgba(34, 211, 238, 0.18) !important;
    background: rgba(34, 211, 238, 0.1);
    color: #a5f3fc;
}

[data-bs-theme="dark"] #sped-section .card.bg-light .card-body i.fa-2x {
    background: #111827;
    box-shadow: none;
}

[data-bs-theme="dark"] #sped-section .table thead th {
    background: #020617 !important;
    color: #e5e7eb;
}

@media (max-width: 768px) {
    #sped-section .sped-action-row {
        flex-direction: column;
    }

    #sped-section .sped-action-row .btn,
    #sped-section #pcFormNovo .btn,
    #sped-section #pcFormMapeamento .btn {
        width: 100%;
    }

    #sped-section .card-body {
        padding: 1rem;
    }
}

/* RNDS :: fila DATASUS e cadastros de saude */
#rnds-section.rnds-workbench-shell {
    color: #172033;
}

#rnds-section .rnds-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(310px, 430px);
    gap: 1rem;
    align-items: stretch;
    margin-bottom: 1rem;
    padding: 1.25rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    background: linear-gradient(135deg, #0f172a 0%, #155e75 54%, #0f766e 100%);
    color: #fff;
    overflow: hidden;
}

#rnds-section .rnds-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.45rem;
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

#rnds-section .rnds-hero h2 {
    margin: 0;
    font-size: clamp(1.45rem, 2.1vw, 2.05rem);
    font-weight: 850;
    letter-spacing: 0;
}

#rnds-section .rnds-hero p {
    max-width: 760px;
    margin: 0.45rem 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.92rem;
    line-height: 1.45;
}

#rnds-section .rnds-legal-note {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-height: 118px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.24);
    backdrop-filter: blur(12px);
}

#rnds-section .rnds-legal-note i {
    display: grid;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.14);
    color: #a7f3d0;
    font-size: 1.05rem;
}

#rnds-section .rnds-legal-note strong,
#rnds-section .rnds-legal-note span {
    display: block;
}

#rnds-section .rnds-legal-note strong {
    font-size: 1rem;
    font-weight: 850;
}

#rnds-section .rnds-legal-note span {
    margin-top: 0.2rem;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.82rem;
}

#rnds-section #rnds-banner {
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
}

#rnds-section .rnds-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    padding: 0.45rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

#rnds-section .rnds-tabs .nav-link {
    min-height: 38px;
    border: 1px solid transparent;
    border-radius: 7px;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 800;
    white-space: nowrap;
}

#rnds-section .rnds-tabs .nav-link.active {
    border-color: rgba(14, 116, 144, 0.18);
    background: rgba(14, 116, 144, 0.1);
    color: #0e7490;
}

#rnds-section #rnds-contadores .card,
#rnds-section .rnds-chart-panel,
#rnds-section .rnds-filter-panel,
#rnds-section .rnds-table-panel,
#rnds-section .rnds-missing-panel,
#rnds-section #rnds-tab-cadastros .nav-pills {
    border: 1px solid rgba(148, 163, 184, 0.22) !important;
    border-radius: 8px;
    background: #fff !important;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06) !important;
}

#rnds-section #rnds-contadores .card {
    position: relative;
    min-height: 104px;
    overflow: hidden;
    color: #0f172a !important;
}

#rnds-section #rnds-contadores .card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: #64748b;
}

#rnds-section #rnds-contadores .bg-success::before { background: #059669; }
#rnds-section #rnds-contadores .bg-primary::before { background: #2563eb; }
#rnds-section #rnds-contadores .bg-warning::before { background: #d97706; }
#rnds-section #rnds-contadores .bg-danger::before { background: #dc2626; }

#rnds-section #rnds-contadores .display-6 {
    color: #0f172a;
    font-size: 1.65rem;
    line-height: 1.1;
}

#rnds-section #rnds-contadores .small {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 800;
}

#rnds-section .rnds-chart-panel .card-body {
    min-height: 280px;
}

#rnds-section .rnds-filter-panel .card-body {
    padding: 1rem;
}

#rnds-section .form-label {
    color: #475569;
    font-size: 0.72rem !important;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

#rnds-section .form-control,
#rnds-section .form-select,
#rnds-section .btn {
    border-radius: 7px;
}

#rnds-section .rnds-table-panel .table-responsive,
#rnds-section #rnds-tab-cadastros .table-responsive {
    border-radius: 8px;
}

#rnds-section .table {
    margin-bottom: 0;
    font-size: 0.82rem;
}

#rnds-section .table thead th {
    border-color: rgba(255, 255, 255, 0.08);
    background: #0f172a !important;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

#rnds-section .table tbody td {
    color: #334155;
    vertical-align: middle;
}

#rnds-section .rnds-missing-panel .card-header {
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    background: #f8fafc !important;
}

#rnds-section .rnds-missing-panel h6 {
    color: #0f172a;
    font-weight: 850;
}

#rnds-section #rnds-tab-cadastros .nav-pills {
    gap: 0.45rem;
    padding: 0.45rem;
}

#rnds-section #rnds-tab-cadastros .nav-pills .nav-link {
    border-radius: 7px;
    color: #64748b;
    font-weight: 800;
}

#rnds-section #rnds-tab-cadastros .nav-pills .nav-link.active {
    background: #0e7490;
    color: #fff;
}

[data-bs-theme="dark"] #rnds-section.rnds-workbench-shell {
    color: #e5e7eb;
}

[data-bs-theme="dark"] #rnds-section .rnds-hero {
    border-color: rgba(148, 163, 184, 0.2);
    background: linear-gradient(135deg, #020617 0%, #164e63 54%, #115e59 100%);
}

[data-bs-theme="dark"] #rnds-section .rnds-tabs,
[data-bs-theme="dark"] #rnds-section #rnds-contadores .card,
[data-bs-theme="dark"] #rnds-section .rnds-chart-panel,
[data-bs-theme="dark"] #rnds-section .rnds-filter-panel,
[data-bs-theme="dark"] #rnds-section .rnds-table-panel,
[data-bs-theme="dark"] #rnds-section .rnds-missing-panel,
[data-bs-theme="dark"] #rnds-section #rnds-tab-cadastros .nav-pills {
    border-color: rgba(148, 163, 184, 0.18) !important;
    background: #111827 !important;
    box-shadow: none !important;
}

[data-bs-theme="dark"] #rnds-section #rnds-banner {
    border-color: rgba(148, 163, 184, 0.18);
    box-shadow: none;
}

[data-bs-theme="dark"] #rnds-section .rnds-tabs .nav-link,
[data-bs-theme="dark"] #rnds-section #rnds-tab-cadastros .nav-pills .nav-link {
    color: #cbd5e1;
}

[data-bs-theme="dark"] #rnds-section .rnds-tabs .nav-link.active {
    border-color: rgba(34, 211, 238, 0.22);
    background: rgba(34, 211, 238, 0.12);
    color: #67e8f9;
}

[data-bs-theme="dark"] #rnds-section #rnds-contadores .display-6,
[data-bs-theme="dark"] #rnds-section .rnds-missing-panel h6 {
    color: #f8fafc;
}

[data-bs-theme="dark"] #rnds-section #rnds-contadores .small,
[data-bs-theme="dark"] #rnds-section .form-label,
[data-bs-theme="dark"] #rnds-section .table tbody td {
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] #rnds-section .form-control,
[data-bs-theme="dark"] #rnds-section .form-select {
    border-color: rgba(148, 163, 184, 0.28);
    background-color: #0f172a;
    color: #e5e7eb;
}

[data-bs-theme="dark"] #rnds-section .table thead th {
    background: #020617 !important;
    color: #e5e7eb;
}

[data-bs-theme="dark"] #rnds-section .rnds-missing-panel .card-header {
    border-bottom-color: rgba(148, 163, 184, 0.16);
    background: #0f172a !important;
}

@media (max-width: 992px) {
    #rnds-section .rnds-hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    #rnds-section .rnds-hero {
        padding: 1rem;
    }

    #rnds-section .rnds-hero h2 {
        font-size: 1.35rem;
    }

    #rnds-section .rnds-legal-note {
        align-items: flex-start;
    }

    #rnds-section .rnds-tabs,
    #rnds-section #rnds-tab-cadastros .nav-pills {
        display: grid;
        grid-template-columns: 1fr;
    }

    #rnds-section .rnds-tabs .nav-link,
    #rnds-section #rnds-tab-cadastros .nav-pills .nav-link,
    #rnds-section .rnds-filter-panel .btn {
        width: 100%;
    }
}

/* Relatorios :: central de exportacoes */
#relatorios-section.rel-workbench-shell {
    color: #172033;
}

#relatorios-section .rel-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 390px);
    gap: 1rem;
    align-items: stretch;
    margin-bottom: 1rem;
    padding: 1.25rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 52%, #0891b2 100%);
    color: #fff;
    overflow: hidden;
}

#relatorios-section .rel-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.45rem;
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

#relatorios-section .rel-hero h2 {
    margin: 0;
    font-size: clamp(1.45rem, 2.1vw, 2.05rem);
    font-weight: 850;
    letter-spacing: 0;
}

#relatorios-section .rel-hero p {
    max-width: 760px;
    margin: 0.45rem 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.92rem;
    line-height: 1.45;
}

#relatorios-section .rel-board {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
}

#relatorios-section .rel-board > div {
    padding: 0.85rem 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.24);
    backdrop-filter: blur(12px);
}

#relatorios-section .rel-board span {
    display: block;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

#relatorios-section .rel-board strong {
    display: block;
    margin-top: 0.2rem;
    font-size: 1.1rem;
}

#relatorios-section .card.card-metric {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

#relatorios-section .card-header {
    border-bottom: 1px solid rgba(148, 163, 184, 0.16) !important;
    background: #f8fafc !important;
}

#relatorios-section .card-header h5 {
    color: #0f172a;
    font-size: 1rem;
    font-weight: 850;
}

#relatorios-section .card-header small,
#relatorios-section .text-muted {
    color: #64748b !important;
}

#relatorios-section .card-body {
    display: flex;
    flex-direction: column;
}

#relatorios-section .form-label {
    color: #475569;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

#relatorios-section .form-control,
#relatorios-section .form-select,
#relatorios-section .btn {
    border-radius: 7px;
}

#relatorios-section .btn-group {
    margin-top: auto;
    gap: 0.4rem;
}

#relatorios-section .btn-group .btn {
    border-radius: 7px !important;
    font-weight: 800;
}

#relatorios-section .btn-check + .btn {
    min-height: 34px;
}

#relatorios-section .rel-xml-panel {
    border-top: 4px solid #0891b2 !important;
}

#relatorios-section #xmlContadorResumo {
    border: 1px solid rgba(14, 116, 144, 0.16);
    border-radius: 8px;
    background: rgba(14, 116, 144, 0.06);
}

#relatorios-section #xmlContadorResumo .col-4 {
    min-width: 0;
}

#relatorios-section #xmlContadorResumo strong {
    color: #0f172a;
}

#relatorios-section .form-check {
    padding: 0.75rem 0.9rem 0.75rem 2.35rem;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 8px;
    background: #f8fafc;
}

#relatorios-section .row.g-2 .btn {
    min-height: 40px;
    font-weight: 800;
}

[data-bs-theme="dark"] #relatorios-section.rel-workbench-shell {
    color: #e5e7eb;
}

[data-bs-theme="dark"] #relatorios-section .rel-hero {
    border-color: rgba(148, 163, 184, 0.2);
    background: linear-gradient(135deg, #020617 0%, #1e3a8a 52%, #155e75 100%);
}

[data-bs-theme="dark"] #relatorios-section .card.card-metric {
    border-color: rgba(148, 163, 184, 0.18);
    background: #111827;
    box-shadow: none;
}

[data-bs-theme="dark"] #relatorios-section .card-header,
[data-bs-theme="dark"] #relatorios-section .form-check,
[data-bs-theme="dark"] #relatorios-section #xmlContadorResumo {
    border-color: rgba(148, 163, 184, 0.16) !important;
    background: #0f172a !important;
}

[data-bs-theme="dark"] #relatorios-section .card-header h5,
[data-bs-theme="dark"] #relatorios-section #xmlContadorResumo strong {
    color: #f8fafc;
}

[data-bs-theme="dark"] #relatorios-section .card-header small,
[data-bs-theme="dark"] #relatorios-section .text-muted,
[data-bs-theme="dark"] #relatorios-section .form-label {
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] #relatorios-section .form-control,
[data-bs-theme="dark"] #relatorios-section .form-select {
    border-color: rgba(148, 163, 184, 0.28);
    background-color: #0f172a;
    color: #e5e7eb;
}

@media (max-width: 992px) {
    #relatorios-section .rel-hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    #relatorios-section .rel-hero {
        padding: 1rem;
    }

    #relatorios-section .rel-hero h2 {
        font-size: 1.35rem;
    }

    #relatorios-section .btn-group {
        display: grid;
        grid-template-columns: 1fr;
    }

    #relatorios-section #xmlContadorResumo .row {
        gap: 0.75rem;
    }

    #relatorios-section #xmlContadorResumo .col-4 {
        width: 100%;
        flex: 0 0 100%;
    }
}

/* Fornecedores Autorizados :: manifestacao automatica */
#fornecedores-autorizados-section.fa-workbench-shell {
    color: #172033;
}

#fornecedores-autorizados-section .fa-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(270px, 360px);
    gap: 1rem;
    align-items: stretch;
    margin-bottom: 1rem;
    padding: 1.25rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    background: linear-gradient(135deg, #0f172a 0%, #166534 55%, #0e7490 100%);
    color: #fff;
    overflow: hidden;
}

#fornecedores-autorizados-section .fa-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.45rem;
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

#fornecedores-autorizados-section .fa-hero h2 {
    margin: 0;
    font-size: clamp(1.45rem, 2.1vw, 2.05rem);
    font-weight: 850;
    letter-spacing: 0;
}

#fornecedores-autorizados-section .fa-hero p {
    max-width: 780px;
    margin: 0.45rem 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.92rem;
    line-height: 1.45;
}

#fornecedores-autorizados-section .fa-board {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 118px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.24);
    backdrop-filter: blur(12px);
}

#fornecedores-autorizados-section .fa-board span {
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

#fornecedores-autorizados-section .fa-board strong {
    margin-top: 0.2rem;
    font-size: 2rem;
    line-height: 1;
}

#fornecedores-autorizados-section .fa-board small {
    margin-top: 0.4rem;
    color: rgba(255, 255, 255, 0.72);
}

#fornecedores-autorizados-section .card.card-metric {
    border: 1px solid rgba(148, 163, 184, 0.22) !important;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

#fornecedores-autorizados-section .fa-kpi-grid .card {
    position: relative;
    min-height: 112px;
    border-left-width: 0 !important;
}

#fornecedores-autorizados-section .fa-kpi-grid .card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: #64748b;
}

#fornecedores-autorizados-section .fa-kpi-grid .border-primary::before { background: #2563eb; }
#fornecedores-autorizados-section .fa-kpi-grid .border-success::before { background: #059669; }
#fornecedores-autorizados-section .fa-kpi-grid .border-info::before { background: #0891b2; }
#fornecedores-autorizados-section .fa-kpi-grid .border-warning::before { background: #d97706; }

#fornecedores-autorizados-section .fa-kpi-grid h6 {
    color: #64748b !important;
    font-size: 0.7rem !important;
    font-weight: 850;
    letter-spacing: 0.06em !important;
}

#fornecedores-autorizados-section .fa-kpi-grid h3,
#fornecedores-autorizados-section #faKpiStatus {
    color: #0f172a;
}

#fornecedores-autorizados-section .text-muted {
    color: #64748b !important;
}

#fornecedores-autorizados-section .fa-control-panel .card-body {
    padding: 1rem;
}

#fornecedores-autorizados-section .fa-control-panel .form-check {
    min-height: 42px;
    display: flex;
    align-items: center;
}

#fornecedores-autorizados-section .fa-control-panel .btn,
#fornecedores-autorizados-section .fa-table-panel .form-control,
#fornecedores-autorizados-section .fa-table-panel .btn {
    border-radius: 7px;
    font-weight: 800;
}

#fornecedores-autorizados-section .fa-table-header {
    gap: 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16) !important;
    background: #f8fafc !important;
}

#fornecedores-autorizados-section .fa-table-header h5 {
    color: #0f172a;
    font-size: 1rem;
    font-weight: 850;
}

#fornecedores-autorizados-section .table {
    font-size: 0.82rem;
}

#fornecedores-autorizados-section .table thead th {
    border-color: rgba(255, 255, 255, 0.08);
    background: #0f172a !important;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

#fornecedores-autorizados-section .table tbody td {
    color: #334155;
    vertical-align: middle;
}

#faModalBusca .modal-content {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
}

#faModalBusca .modal-title {
    color: #0f172a;
    font-weight: 850;
}

#faModalBusca .input-group-text,
#faModalBusca .form-control,
#faModalBusca .btn {
    border-radius: 7px;
}

[data-bs-theme="dark"] #fornecedores-autorizados-section.fa-workbench-shell {
    color: #e5e7eb;
}

[data-bs-theme="dark"] #fornecedores-autorizados-section .fa-hero {
    border-color: rgba(148, 163, 184, 0.2);
    background: linear-gradient(135deg, #020617 0%, #14532d 55%, #155e75 100%);
}

[data-bs-theme="dark"] #fornecedores-autorizados-section .card.card-metric,
[data-bs-theme="dark"] #faModalBusca .modal-content {
    border-color: rgba(148, 163, 184, 0.18) !important;
    background: #111827;
    box-shadow: none;
}

[data-bs-theme="dark"] #fornecedores-autorizados-section .fa-table-header {
    border-bottom-color: rgba(148, 163, 184, 0.16) !important;
    background: #0f172a !important;
}

[data-bs-theme="dark"] #fornecedores-autorizados-section .fa-table-header h5,
[data-bs-theme="dark"] #fornecedores-autorizados-section .fa-kpi-grid h3,
[data-bs-theme="dark"] #fornecedores-autorizados-section #faKpiStatus,
[data-bs-theme="dark"] #faModalBusca .modal-title {
    color: #f8fafc;
}

[data-bs-theme="dark"] #fornecedores-autorizados-section .text-muted,
[data-bs-theme="dark"] #fornecedores-autorizados-section .fa-kpi-grid h6,
[data-bs-theme="dark"] #fornecedores-autorizados-section .table tbody td {
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] #fornecedores-autorizados-section .form-control,
[data-bs-theme="dark"] #faModalBusca .form-control,
[data-bs-theme="dark"] #faModalBusca .input-group-text {
    border-color: rgba(148, 163, 184, 0.28);
    background-color: #0f172a;
    color: #e5e7eb;
}

[data-bs-theme="dark"] #fornecedores-autorizados-section .table thead th {
    background: #020617 !important;
    color: #e5e7eb;
}

@media (max-width: 992px) {
    #fornecedores-autorizados-section .fa-hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    #fornecedores-autorizados-section .fa-hero {
        padding: 1rem;
    }

    #fornecedores-autorizados-section .fa-hero h2 {
        font-size: 1.35rem;
    }

    #fornecedores-autorizados-section .fa-control-panel .row,
    #fornecedores-autorizados-section .fa-table-header {
        align-items: stretch !important;
        flex-direction: column;
    }

    #fornecedores-autorizados-section .fa-control-panel .col-auto,
    #fornecedores-autorizados-section .fa-table-header > div,
    #fornecedores-autorizados-section .fa-control-panel .btn {
        width: 100% !important;
    }

    #fornecedores-autorizados-section .fa-control-panel .ms-auto {
        margin-left: 0 !important;
    }
}

/* Backup :: continuidade operacional */
#backup-section.bkp-workbench-shell {
    color: #172033;
}

#backup-section .bkp-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
    padding: 1.25rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    background: linear-gradient(135deg, #0f172a 0%, #065f46 56%, #0e7490 100%);
    color: #fff;
    overflow: hidden;
}

#backup-section .bkp-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.45rem;
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

#backup-section .bkp-hero h2 {
    margin: 0;
    font-size: clamp(1.45rem, 2.1vw, 2.05rem);
    font-weight: 850;
    letter-spacing: 0;
}

#backup-section .bkp-hero p {
    max-width: 760px;
    margin: 0.45rem 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.92rem;
    line-height: 1.45;
}

#backup-section .bkp-hero-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

#backup-section .bkp-hero-actions .btn {
    min-height: 42px;
    border-radius: 7px;
    font-weight: 850;
    white-space: nowrap;
}

#backup-section .card.card-metric {
    border: 1px solid rgba(148, 163, 184, 0.22) !important;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

#backup-section .bkp-kpi-grid .card {
    position: relative;
    min-height: 104px;
    border-left-width: 0 !important;
}

#backup-section .bkp-kpi-grid .card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: #64748b;
}

#backup-section .bkp-kpi-grid .border-success::before { background: #059669; }
#backup-section .bkp-kpi-grid .border-primary::before { background: #2563eb; }
#backup-section .bkp-kpi-grid .border-info::before { background: #0891b2; }
#backup-section .bkp-kpi-grid .border-warning::before { background: #d97706; }

#backup-section .bkp-kpi-grid h6 {
    color: #64748b !important;
    font-size: 0.7rem !important;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

#backup-section .bkp-kpi-grid h5 {
    color: #0f172a;
    font-size: 1.08rem;
    font-weight: 850;
}

#backup-section .bkp-cloud-panel .card-body {
    padding: 1rem;
}

#backup-section .bkp-cloud-panel strong,
#backup-section .bkp-table-panel h5 {
    color: #0f172a;
    font-weight: 850;
}

#backup-section .bkp-cloud-panel .btn,
#backup-section .bkp-table-panel .btn {
    border-radius: 7px;
    font-weight: 800;
}

#backup-section .bkp-table-panel .card-header {
    border-bottom: 1px solid rgba(148, 163, 184, 0.16) !important;
    background: #f8fafc !important;
}

#backup-section .bkp-table-panel .card-header small,
#backup-section .text-muted {
    color: #64748b !important;
}

#backup-section .table {
    font-size: 0.82rem !important;
}

#backup-section .table thead th {
    border-color: rgba(255, 255, 255, 0.08);
    background: #0f172a !important;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

#backup-section .table tbody td {
    color: #334155;
    vertical-align: middle;
}

[data-bs-theme="dark"] #backup-section.bkp-workbench-shell {
    color: #e5e7eb;
}

[data-bs-theme="dark"] #backup-section .bkp-hero {
    border-color: rgba(148, 163, 184, 0.2);
    background: linear-gradient(135deg, #020617 0%, #064e3b 56%, #155e75 100%);
}

[data-bs-theme="dark"] #backup-section .card.card-metric {
    border-color: rgba(148, 163, 184, 0.18) !important;
    background: #111827;
    box-shadow: none;
}

[data-bs-theme="dark"] #backup-section .bkp-table-panel .card-header {
    border-bottom-color: rgba(148, 163, 184, 0.16) !important;
    background: #0f172a !important;
}

[data-bs-theme="dark"] #backup-section .bkp-kpi-grid h5,
[data-bs-theme="dark"] #backup-section .bkp-cloud-panel strong,
[data-bs-theme="dark"] #backup-section .bkp-table-panel h5 {
    color: #f8fafc;
}

[data-bs-theme="dark"] #backup-section .bkp-kpi-grid h6,
[data-bs-theme="dark"] #backup-section .bkp-table-panel .card-header small,
[data-bs-theme="dark"] #backup-section .text-muted,
[data-bs-theme="dark"] #backup-section .table tbody td {
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] #backup-section .table thead th {
    background: #020617 !important;
    color: #e5e7eb;
}

@media (max-width: 768px) {
    #backup-section .bkp-hero {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    #backup-section .bkp-hero h2 {
        font-size: 1.35rem;
    }

    #backup-section .bkp-hero-actions,
    #backup-section .bkp-hero-actions .btn,
    #backup-section .bkp-cloud-panel .btn {
        width: 100%;
    }

    #backup-section .bkp-cloud-panel .d-flex {
        align-items: stretch !important;
        flex-direction: column;
    }
}

/* Usuarios :: governanca de acesso */
#usuarios-section.usr-workbench-shell {
    color: #172033;
}

#usuarios-section .usr-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(290px, 390px);
    gap: 1rem;
    align-items: stretch;
    margin-bottom: 1rem;
    padding: 1.25rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 54%, #7c3aed 100%);
    color: #fff;
    overflow: hidden;
}

#usuarios-section .usr-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.45rem;
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

#usuarios-section .usr-hero h2 {
    margin: 0;
    font-size: clamp(1.45rem, 2.1vw, 2.05rem);
    font-weight: 850;
    letter-spacing: 0;
}

#usuarios-section .usr-hero p {
    max-width: 760px;
    margin: 0.45rem 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.92rem;
    line-height: 1.45;
}

#usuarios-section .usr-hero-board {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-height: 118px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.24);
    backdrop-filter: blur(12px);
}

#usuarios-section .usr-hero-board i {
    display: grid;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.14);
    color: #ddd6fe;
    font-size: 1.05rem;
}

#usuarios-section .usr-hero-board strong,
#usuarios-section .usr-hero-board span {
    display: block;
}

#usuarios-section .usr-hero-board strong {
    font-size: 1rem;
    font-weight: 850;
}

#usuarios-section .usr-hero-board span {
    margin-top: 0.2rem;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.82rem;
}

#usuarios-section .card.card-metric {
    border: 1px solid rgba(148, 163, 184, 0.22) !important;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

#usuarios-section .usr-kpi-grid .card {
    position: relative;
    min-height: 104px;
}

#usuarios-section .usr-kpi-grid .card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: #2563eb;
}

#usuarios-section .usr-kpi-grid .text-muted {
    color: #64748b !important;
    font-size: 0.7rem !important;
    font-weight: 850;
    letter-spacing: 0.06em !important;
}

#usuarios-section .usr-kpi-grid h4 {
    color: #0f172a;
    font-weight: 850;
}

#usuarios-section .usr-table-header {
    border-bottom: 1px solid rgba(148, 163, 184, 0.16) !important;
    background: #f8fafc !important;
}

#usuarios-section .usr-table-header h5 {
    color: #0f172a;
    font-size: 1rem;
    font-weight: 850 !important;
}

#usuarios-section .input-group-text,
#usuarios-section .form-control,
#usuarios-section .form-select,
#usuarios-section .btn,
#usuarioModal .form-control,
#usuarioModal .form-select,
#usuarioModal .btn,
#usuarioDetalheModal .btn {
    border-radius: 7px;
}

#usuarios-section .table {
    font-size: 0.82rem !important;
}

#usuarios-section .table thead th {
    border-color: rgba(255, 255, 255, 0.08) !important;
    background: #0f172a !important;
    color: #fff !important;
    font-size: 0.72rem !important;
    font-weight: 850 !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase;
    white-space: nowrap;
}

#usuarios-section .table tbody td {
    color: #334155;
    vertical-align: middle;
}

#usuarioModal .modal-content,
#usuarioDetalheModal .modal-content {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
}

#usuarioModal .modal-title,
#usuarioDetalheModal .modal-title {
    color: #0f172a;
    font-weight: 850;
}

#usuarioModal .form-label {
    color: #475569;
    font-size: 0.78rem !important;
    font-weight: 850 !important;
}

[data-bs-theme="dark"] #usuarios-section.usr-workbench-shell {
    color: #e5e7eb;
}

[data-bs-theme="dark"] #usuarios-section .usr-hero {
    border-color: rgba(148, 163, 184, 0.2);
    background: linear-gradient(135deg, #020617 0%, #1e3a8a 54%, #581c87 100%);
}

[data-bs-theme="dark"] #usuarios-section .card.card-metric,
[data-bs-theme="dark"] #usuarioModal .modal-content,
[data-bs-theme="dark"] #usuarioDetalheModal .modal-content {
    border-color: rgba(148, 163, 184, 0.18) !important;
    background: #111827;
    box-shadow: none;
}

[data-bs-theme="dark"] #usuarios-section .usr-table-header {
    border-bottom-color: rgba(148, 163, 184, 0.16) !important;
    background: #0f172a !important;
}

[data-bs-theme="dark"] #usuarios-section .usr-kpi-grid h4,
[data-bs-theme="dark"] #usuarios-section .usr-table-header h5,
[data-bs-theme="dark"] #usuarioModal .modal-title,
[data-bs-theme="dark"] #usuarioDetalheModal .modal-title {
    color: #f8fafc;
}

[data-bs-theme="dark"] #usuarios-section .usr-kpi-grid .text-muted,
[data-bs-theme="dark"] #usuarios-section .table tbody td,
[data-bs-theme="dark"] #usuarioModal .form-label,
[data-bs-theme="dark"] #usuarioModal .text-muted,
[data-bs-theme="dark"] #usuarioDetalheModal .text-muted {
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] #usuarios-section .input-group-text,
[data-bs-theme="dark"] #usuarios-section .form-control,
[data-bs-theme="dark"] #usuarios-section .form-select,
[data-bs-theme="dark"] #usuarioModal .form-control,
[data-bs-theme="dark"] #usuarioModal .form-select {
    border-color: rgba(148, 163, 184, 0.28);
    background-color: #0f172a;
    color: #e5e7eb;
}

[data-bs-theme="dark"] #usuarios-section .table thead th {
    background: #020617 !important;
    color: #e5e7eb !important;
}

@media (max-width: 992px) {
    #usuarios-section .usr-hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    #usuarios-section .usr-hero {
        padding: 1rem;
    }

    #usuarios-section .usr-hero h2 {
        font-size: 1.35rem;
    }

    #usuarios-section .usr-hero-board {
        align-items: flex-start;
    }

    #usuarios-section .usr-table-header .d-flex,
    #usuarios-section .usr-table-header .input-group,
    #usuarios-section .usr-table-header .btn {
        width: 100% !important;
    }
}

/* Premium PF :: certificados e notas pessoais */
#premium-section.premium-workbench-shell {
    color: #172033;
}

#premium-section .premium-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 370px);
    gap: 1rem;
    align-items: stretch;
    margin-bottom: 1rem;
    padding: 1.25rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    background: linear-gradient(135deg, #0f172a 0%, #92400e 54%, #7c3aed 100%);
    color: #fff;
    overflow: hidden;
}

#premium-section .premium-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.45rem;
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

#premium-section .premium-hero h2 {
    margin: 0;
    font-size: clamp(1.45rem, 2.1vw, 2.05rem);
    font-weight: 850;
    letter-spacing: 0;
}

#premium-section .premium-hero p {
    max-width: 760px;
    margin: 0.45rem 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.92rem;
    line-height: 1.45;
}

#premium-section .premium-board {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 118px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.24);
    backdrop-filter: blur(12px);
}

#premium-section .premium-board span {
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

#premium-section .premium-board strong {
    margin-top: 0.2rem;
    font-size: 1.22rem;
    line-height: 1.1;
}

#premium-section .premium-board small {
    margin-top: 0.4rem;
    color: rgba(255, 255, 255, 0.72);
}

#premium-section .card {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

#premium-section .premium-kpi-grid .card {
    min-height: 108px;
}

#premium-section .metric-icon {
    width: 44px !important;
    height: 44px !important;
    border-radius: 8px !important;
}

#premium-section h6,
#premium-section .card-header h6 {
    color: #0f172a;
    font-weight: 850;
}

#premium-section .premium-kpi-grid h6 {
    color: #64748b !important;
    font-size: 0.7rem !important;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

#premium-section .premium-kpi-grid h3 {
    color: #0f172a;
    font-weight: 850;
}

#premium-section .card-header {
    border-bottom: 1px solid rgba(148, 163, 184, 0.16) !important;
    background: #f8fafc !important;
}

#premium-section .form-label {
    color: #475569;
    font-size: 0.74rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

#premium-section .form-control,
#premium-section .form-select,
#premium-section .btn {
    border-radius: 7px;
}

#premium-section .premium-notas-panel .card-header {
    gap: 1rem;
}

#premium-section .table {
    font-size: 0.82rem;
}

#premium-section .table thead th {
    border-color: rgba(255, 255, 255, 0.08);
    background: #0f172a !important;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

#premium-section .table tbody td {
    color: #334155;
    vertical-align: middle;
}

#premium-section .text-muted {
    color: #64748b !important;
}

[data-bs-theme="dark"] #premium-section.premium-workbench-shell {
    color: #e5e7eb;
}

[data-bs-theme="dark"] #premium-section .premium-hero {
    border-color: rgba(148, 163, 184, 0.2);
    background: linear-gradient(135deg, #020617 0%, #78350f 54%, #581c87 100%);
}

[data-bs-theme="dark"] #premium-section .card {
    border-color: rgba(148, 163, 184, 0.18);
    background: #111827;
    box-shadow: none;
}

[data-bs-theme="dark"] #premium-section .card-header {
    border-bottom-color: rgba(148, 163, 184, 0.16) !important;
    background: #0f172a !important;
}

[data-bs-theme="dark"] #premium-section h6,
[data-bs-theme="dark"] #premium-section .card-header h6,
[data-bs-theme="dark"] #premium-section .premium-kpi-grid h3 {
    color: #f8fafc;
}

[data-bs-theme="dark"] #premium-section .premium-kpi-grid h6,
[data-bs-theme="dark"] #premium-section .form-label,
[data-bs-theme="dark"] #premium-section .text-muted,
[data-bs-theme="dark"] #premium-section .table tbody td {
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] #premium-section .form-control,
[data-bs-theme="dark"] #premium-section .form-select {
    border-color: rgba(148, 163, 184, 0.28);
    background-color: #0f172a;
    color: #e5e7eb;
}

[data-bs-theme="dark"] #premium-section .table thead th {
    background: #020617 !important;
    color: #e5e7eb;
}

@media (max-width: 992px) {
    #premium-section .premium-hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    #premium-section .premium-hero {
        padding: 1rem;
    }

    #premium-section .premium-hero h2 {
        font-size: 1.35rem;
    }

    #premium-section .premium-notas-panel .card-header {
        align-items: stretch !important;
        flex-direction: column;
    }

    #premium-section .premium-notas-panel .card-header .btn,
    #premium-section .premium-notas-panel .card-header > div {
        width: 100%;
    }
}

/* CND Federal :: certidoes e vencimentos */
#cnd-section.cnd-workbench-shell {
    color: #172033;
}

#cnd-section .cnd-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
    padding: 1.25rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 52%, #0891b2 100%);
    color: #fff;
    overflow: hidden;
}

#cnd-section .cnd-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.45rem;
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

#cnd-section .cnd-hero h2 {
    margin: 0;
    font-size: clamp(1.45rem, 2.1vw, 2.05rem);
    font-weight: 850;
    letter-spacing: 0;
}

#cnd-section .cnd-hero p {
    max-width: 760px;
    margin: 0.45rem 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.92rem;
    line-height: 1.45;
}

#cnd-section .cnd-hero-actions .btn {
    min-height: 42px;
    border-radius: 7px;
    font-weight: 850;
    white-space: nowrap;
}

#cnd-section .card.card-metric,
#cnd-section .cnd-summary-grid .card {
    border: 1px solid rgba(148, 163, 184, 0.22) !important;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

#cnd-section .cnd-panel-header {
    border-bottom: 1px solid rgba(148, 163, 184, 0.16) !important;
    background: #f8fafc !important;
}

#cnd-section .cnd-panel-header h5,
#cnd-section h6 {
    color: #0f172a;
    font-weight: 850;
}

#cnd-section #cndConfigStatus {
    border-radius: 8px;
}

#cnd-section .cnd-summary-grid .card {
    position: relative;
    min-height: 104px;
}

#cnd-section .cnd-summary-grid .card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: #64748b;
}

#cnd-section .cnd-summary-grid .col-md-3:nth-child(1) .card::before { background: #2563eb; }
#cnd-section .cnd-summary-grid .col-md-3:nth-child(2) .card::before { background: #059669; }
#cnd-section .cnd-summary-grid .col-md-3:nth-child(3) .card::before { background: #d97706; }
#cnd-section .cnd-summary-grid .col-md-3:nth-child(4) .card::before { background: #dc2626; }

#cnd-section .cnd-summary-grid h6 {
    color: #64748b !important;
    font-size: 0.7rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

#cnd-section .cnd-summary-grid h3 {
    color: #0f172a;
    font-weight: 850;
}

#cnd-section .table {
    font-size: 0.82rem;
}

#cnd-section .table thead th {
    border-color: rgba(255, 255, 255, 0.08);
    background: #0f172a !important;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

#cnd-section .table tbody td {
    color: #334155;
    vertical-align: middle;
}

#cnd-section .text-muted {
    color: #64748b !important;
}

#cnd-section .btn {
    border-radius: 7px;
    font-weight: 800;
}

[data-bs-theme="dark"] #cnd-section.cnd-workbench-shell {
    color: #e5e7eb;
}

[data-bs-theme="dark"] #cnd-section .cnd-hero {
    border-color: rgba(148, 163, 184, 0.2);
    background: linear-gradient(135deg, #020617 0%, #1e3a8a 52%, #155e75 100%);
}

[data-bs-theme="dark"] #cnd-section .card.card-metric,
[data-bs-theme="dark"] #cnd-section .cnd-summary-grid .card {
    border-color: rgba(148, 163, 184, 0.18) !important;
    background: #111827 !important;
    box-shadow: none;
}

[data-bs-theme="dark"] #cnd-section .cnd-panel-header {
    border-bottom-color: rgba(148, 163, 184, 0.16) !important;
    background: #0f172a !important;
}

[data-bs-theme="dark"] #cnd-section .cnd-panel-header h5,
[data-bs-theme="dark"] #cnd-section h6,
[data-bs-theme="dark"] #cnd-section .cnd-summary-grid h3 {
    color: #f8fafc;
}

[data-bs-theme="dark"] #cnd-section .cnd-summary-grid h6,
[data-bs-theme="dark"] #cnd-section .text-muted,
[data-bs-theme="dark"] #cnd-section .table tbody td {
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] #cnd-section .table thead th {
    background: #020617 !important;
    color: #e5e7eb;
}

@media (max-width: 768px) {
    #cnd-section .cnd-hero {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    #cnd-section .cnd-hero h2 {
        font-size: 1.35rem;
    }

    #cnd-section .cnd-hero-actions,
    #cnd-section .cnd-hero-actions .btn,
    #cnd-section .cnd-panel-header .btn {
        width: 100%;
    }

    #cnd-section .cnd-panel-header {
        align-items: stretch !important;
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* Integra Contador :: Serpro fiscal */
#integra-contador-section.ic-workbench-shell {
    color: #172033;
}

#integra-contador-section .ic-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(330px, 430px);
    gap: 1rem;
    align-items: stretch;
    margin-bottom: 1rem;
    padding: 1.25rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    background: linear-gradient(135deg, #0f172a 0%, #4338ca 52%, #0e7490 100%);
    color: #fff;
    overflow: hidden;
}

#integra-contador-section .ic-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.45rem;
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

#integra-contador-section .ic-hero h2 {
    margin: 0;
    font-size: clamp(1.45rem, 2.1vw, 2.05rem);
    font-weight: 850;
    letter-spacing: 0;
}

#integra-contador-section .ic-hero p {
    max-width: 780px;
    margin: 0.45rem 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.92rem;
    line-height: 1.45;
}

#integra-contador-section .ic-command-panel {
    display: grid;
    align-content: center;
    gap: 0.75rem;
    min-height: 118px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.24);
    backdrop-filter: blur(12px);
}

#integra-contador-section .ic-command-panel .form-select {
    width: 100% !important;
}

#integra-contador-section .card,
#integra-contador-section .ic-config-panel,
#integra-contador-section .ic-subtabs {
    border: 1px solid rgba(148, 163, 184, 0.22) !important;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

#integra-contador-section .ic-subtabs {
    display: flex;
    gap: 0.45rem;
    padding: 0.45rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22) !important;
}

#integra-contador-section .ic-subtabs .nav-link {
    min-height: 38px;
    border: 1px solid transparent;
    border-radius: 7px;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 800;
    white-space: nowrap;
}

#integra-contador-section .ic-subtabs .nav-link.active {
    border-color: rgba(67, 56, 202, 0.18);
    background: rgba(67, 56, 202, 0.1);
    color: #4338ca;
}

#integra-contador-section .card-header {
    border-bottom: 1px solid rgba(148, 163, 184, 0.16) !important;
    background: #f8fafc !important;
}

#integra-contador-section .card-header strong,
#integra-contador-section h5,
#integra-contador-section h6 {
    color: #0f172a;
    font-weight: 850;
}

#integra-contador-section .form-label,
#integra-contador-section h6.text-muted {
    color: #64748b !important;
    font-size: 0.72rem !important;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

#integra-contador-section .form-control,
#integra-contador-section .form-select,
#integra-contador-section .btn {
    border-radius: 7px;
}

#integra-contador-section .table {
    font-size: 0.82rem;
}

#integra-contador-section .table thead th {
    border-color: rgba(255, 255, 255, 0.08);
    background: #0f172a !important;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

#integra-contador-section .table tbody td {
    color: #334155;
    vertical-align: middle;
}

#integra-contador-section pre {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    background: #f8fafc;
    color: #334155;
    padding: 0.85rem;
}

#integra-contador-section .text-muted {
    color: #64748b !important;
}

[data-bs-theme="dark"] #integra-contador-section.ic-workbench-shell {
    color: #e5e7eb;
}

[data-bs-theme="dark"] #integra-contador-section .ic-hero {
    border-color: rgba(148, 163, 184, 0.2);
    background: linear-gradient(135deg, #020617 0%, #312e81 52%, #155e75 100%);
}

[data-bs-theme="dark"] #integra-contador-section .card,
[data-bs-theme="dark"] #integra-contador-section .ic-config-panel,
[data-bs-theme="dark"] #integra-contador-section .ic-subtabs {
    border-color: rgba(148, 163, 184, 0.18) !important;
    background: #111827;
    box-shadow: none;
}

[data-bs-theme="dark"] #integra-contador-section .card-header {
    border-bottom-color: rgba(148, 163, 184, 0.16) !important;
    background: #0f172a !important;
}

[data-bs-theme="dark"] #integra-contador-section .card-header strong,
[data-bs-theme="dark"] #integra-contador-section h5,
[data-bs-theme="dark"] #integra-contador-section h6 {
    color: #f8fafc;
}

[data-bs-theme="dark"] #integra-contador-section .ic-subtabs .nav-link,
[data-bs-theme="dark"] #integra-contador-section .form-label,
[data-bs-theme="dark"] #integra-contador-section h6.text-muted,
[data-bs-theme="dark"] #integra-contador-section .text-muted,
[data-bs-theme="dark"] #integra-contador-section .table tbody td {
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] #integra-contador-section .ic-subtabs .nav-link.active {
    border-color: rgba(129, 140, 248, 0.24);
    background: rgba(129, 140, 248, 0.14);
    color: #a5b4fc !important;
}

[data-bs-theme="dark"] #integra-contador-section .form-control,
[data-bs-theme="dark"] #integra-contador-section .form-select,
[data-bs-theme="dark"] #integra-contador-section pre {
    border-color: rgba(148, 163, 184, 0.28);
    background-color: #0f172a;
    color: #e5e7eb;
}

[data-bs-theme="dark"] #integra-contador-section .table thead th {
    background: #020617 !important;
    color: #e5e7eb;
}

@media (max-width: 992px) {
    #integra-contador-section .ic-hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    #integra-contador-section .ic-hero {
        padding: 1rem;
    }

    #integra-contador-section .ic-hero h2 {
        font-size: 1.35rem;
    }

    #integra-contador-section .ic-command-panel .d-flex,
    #integra-contador-section .ic-command-panel .btn {
        width: 100%;
    }
}

/* Calculo Tributario :: Lucro Presumido */
#calculo-tributario-section.ct-workbench-shell {
    color: #172033;
}

#calculo-tributario-section .ct-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 370px);
    gap: 1rem;
    align-items: stretch;
    margin-bottom: 1rem;
    padding: 1.25rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    background: linear-gradient(135deg, #0f172a 0%, #7c2d12 54%, #1d4ed8 100%);
    color: #fff;
    overflow: hidden;
}

#calculo-tributario-section .ct-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.45rem;
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

#calculo-tributario-section .ct-hero h2 {
    margin: 0;
    font-size: clamp(1.45rem, 2.1vw, 2.05rem);
    font-weight: 850;
    letter-spacing: 0;
}

#calculo-tributario-section .ct-hero p {
    max-width: 760px;
    margin: 0.45rem 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.92rem;
    line-height: 1.45;
}

#calculo-tributario-section .ct-board {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 118px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.24);
    backdrop-filter: blur(12px);
}

#calculo-tributario-section .ct-board span {
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

#calculo-tributario-section .ct-board strong {
    margin-top: 0.2rem;
    font-size: 1.22rem;
    line-height: 1.1;
}

#calculo-tributario-section .ct-board small {
    margin-top: 0.4rem;
    color: rgba(255, 255, 255, 0.72);
}

#calculo-tributario-section .card.card-metric {
    border: 1px solid rgba(148, 163, 184, 0.22) !important;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

#calculo-tributario-section .ct-kpi-grid .card {
    position: relative;
    min-height: 108px;
    border-left-width: 0 !important;
}

#calculo-tributario-section .ct-kpi-grid .card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: #64748b;
}

#calculo-tributario-section .ct-kpi-grid .border-primary::before { background: #2563eb; }
#calculo-tributario-section .ct-kpi-grid .border-danger::before { background: #dc2626; }
#calculo-tributario-section .ct-kpi-grid .border-warning::before { background: #d97706; }
#calculo-tributario-section .ct-kpi-grid .border-success::before { background: #059669; }

#calculo-tributario-section .card-header {
    border-bottom: 1px solid rgba(148, 163, 184, 0.16) !important;
    background: #f8fafc !important;
}

#calculo-tributario-section h4,
#calculo-tributario-section h6,
#calculo-tributario-section .card-header h6 {
    color: #0f172a;
    font-weight: 850;
}

#calculo-tributario-section .form-label,
#calculo-tributario-section h6.text-muted,
#calculo-tributario-section .ct-kpi-grid small {
    color: #64748b !important;
    font-size: 0.72rem !important;
    font-weight: 850;
    letter-spacing: 0.04em;
}

#calculo-tributario-section .form-control,
#calculo-tributario-section .form-select,
#calculo-tributario-section .btn {
    border-radius: 7px;
}

#calculo-tributario-section .table {
    font-size: 0.82rem;
}

#calculo-tributario-section .table thead th {
    border-color: rgba(255, 255, 255, 0.08);
    background: #0f172a !important;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

#calculo-tributario-section .table tbody td {
    color: #334155;
    vertical-align: middle;
}

#calculo-tributario-section .text-muted {
    color: #64748b !important;
}

[data-bs-theme="dark"] #calculo-tributario-section.ct-workbench-shell {
    color: #e5e7eb;
}

[data-bs-theme="dark"] #calculo-tributario-section .ct-hero {
    border-color: rgba(148, 163, 184, 0.2);
    background: linear-gradient(135deg, #020617 0%, #7c2d12 54%, #1e3a8a 100%);
}

[data-bs-theme="dark"] #calculo-tributario-section .card.card-metric {
    border-color: rgba(148, 163, 184, 0.18) !important;
    background: #111827;
    box-shadow: none;
}

[data-bs-theme="dark"] #calculo-tributario-section .card-header {
    border-bottom-color: rgba(148, 163, 184, 0.16) !important;
    background: #0f172a !important;
}

[data-bs-theme="dark"] #calculo-tributario-section h4,
[data-bs-theme="dark"] #calculo-tributario-section h6,
[data-bs-theme="dark"] #calculo-tributario-section .card-header h6 {
    color: #f8fafc;
}

[data-bs-theme="dark"] #calculo-tributario-section .form-label,
[data-bs-theme="dark"] #calculo-tributario-section h6.text-muted,
[data-bs-theme="dark"] #calculo-tributario-section .ct-kpi-grid small,
[data-bs-theme="dark"] #calculo-tributario-section .text-muted,
[data-bs-theme="dark"] #calculo-tributario-section .table tbody td {
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] #calculo-tributario-section .form-control,
[data-bs-theme="dark"] #calculo-tributario-section .form-select {
    border-color: rgba(148, 163, 184, 0.28);
    background-color: #0f172a;
    color: #e5e7eb;
}

[data-bs-theme="dark"] #calculo-tributario-section .table thead th {
    background: #020617 !important;
    color: #e5e7eb;
}

@media (max-width: 992px) {
    #calculo-tributario-section .ct-hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    #calculo-tributario-section .ct-hero {
        padding: 1rem;
    }

    #calculo-tributario-section .ct-hero h2 {
        font-size: 1.35rem;
    }
}

/* NPS :: Experiencia do paciente */
#nps-section.nps-workbench-shell {
    color: #172033;
}

#nps-section.nps-workbench-shell .nps-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(270px, 360px);
    gap: 1rem;
    align-items: stretch;
    margin-bottom: 1rem;
    padding: 1.25rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    background: linear-gradient(135deg, #0f172a 0%, #be123c 48%, #0e7490 100%);
    color: #fff;
    overflow: hidden;
}

#nps-section.nps-workbench-shell .nps-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.45rem;
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

#nps-section.nps-workbench-shell .nps-hero h2 {
    margin: 0;
    font-size: clamp(1.45rem, 2.1vw, 2.05rem);
    font-weight: 850;
    letter-spacing: 0;
}

#nps-section.nps-workbench-shell .nps-hero p {
    max-width: 760px;
    margin: 0.45rem 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.92rem;
    line-height: 1.45;
}

#nps-section.nps-workbench-shell .nps-board {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 118px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.24);
    backdrop-filter: blur(12px);
}

#nps-section.nps-workbench-shell .nps-board span {
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

#nps-section.nps-workbench-shell .nps-board strong {
    margin-top: 0.2rem;
    font-size: 1.22rem;
    line-height: 1.1;
}

#nps-section.nps-workbench-shell .nps-board small {
    margin-top: 0.4rem;
    color: rgba(255, 255, 255, 0.72);
}

#nps-section.nps-workbench-shell .nps-status-bar {
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

#nps-section.nps-workbench-shell .nps-tab-nav {
    gap: 0.5rem !important;
    margin-bottom: 1rem !important;
    padding: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    overflow-x: auto;
}

#nps-section.nps-workbench-shell .nps-tab-btn {
    flex: 0 0 auto !important;
    min-height: 38px;
    padding: 0.55rem 0.9rem !important;
    border: 1px solid rgba(148, 163, 184, 0.28) !important;
    border-radius: 999px !important;
    color: #475569 !important;
    background: #fff !important;
    font-size: 0.82rem !important;
    font-weight: 800 !important;
    white-space: nowrap;
}

#nps-section.nps-workbench-shell .nps-tab-btn.active {
    border-color: rgba(190, 18, 60, 0.34) !important;
    color: #fff !important;
    background: #be123c !important;
    box-shadow: none !important;
}

#nps-section.nps-workbench-shell .card,
#nps-section.nps-workbench-shell .nps-kpi,
#nps-section.nps-workbench-shell .nps-step {
    border-color: rgba(148, 163, 184, 0.22) !important;
    border-radius: 8px !important;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

#nps-section.nps-workbench-shell .card {
    overflow: hidden;
}

#nps-section.nps-workbench-shell .card-header {
    border-bottom: 1px solid rgba(148, 163, 184, 0.16) !important;
    background: #f8fafc !important;
}

#nps-section.nps-workbench-shell h6,
#nps-section.nps-workbench-shell .card-header h6,
#nps-section.nps-workbench-shell .nps-step-title {
    color: #0f172a !important;
    font-weight: 850;
}

#nps-section.nps-workbench-shell .nps-filter-bar {
    border-color: rgba(148, 163, 184, 0.22) !important;
    border-radius: 8px !important;
    background: #f8fafc !important;
}

#nps-section.nps-workbench-shell .form-control,
#nps-section.nps-workbench-shell .form-select,
#nps-section.nps-workbench-shell .btn {
    border-radius: 7px;
}

#nps-section.nps-workbench-shell .table {
    font-size: 0.8rem;
}

#nps-section.nps-workbench-shell .table thead th {
    border-color: rgba(255, 255, 255, 0.08);
    background: #0f172a !important;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

#nps-section.nps-workbench-shell .table tbody td {
    color: #334155;
    vertical-align: middle;
}

[data-bs-theme="dark"] #nps-section.nps-workbench-shell {
    color: #e5e7eb;
}

[data-bs-theme="dark"] #nps-section.nps-workbench-shell .nps-hero {
    border-color: rgba(148, 163, 184, 0.2);
    background: linear-gradient(135deg, #020617 0%, #881337 48%, #164e63 100%);
}

[data-bs-theme="dark"] #nps-section.nps-workbench-shell .nps-status-bar,
[data-bs-theme="dark"] #nps-section.nps-workbench-shell .card,
[data-bs-theme="dark"] #nps-section.nps-workbench-shell .nps-kpi,
[data-bs-theme="dark"] #nps-section.nps-workbench-shell .nps-step {
    border-color: rgba(148, 163, 184, 0.18) !important;
    background: #111827 !important;
    box-shadow: none;
}

[data-bs-theme="dark"] #nps-section.nps-workbench-shell .card-header,
[data-bs-theme="dark"] #nps-section.nps-workbench-shell .nps-filter-bar {
    border-color: rgba(148, 163, 184, 0.16) !important;
    background: #0f172a !important;
}

[data-bs-theme="dark"] #nps-section.nps-workbench-shell h6,
[data-bs-theme="dark"] #nps-section.nps-workbench-shell .card-header h6,
[data-bs-theme="dark"] #nps-section.nps-workbench-shell .nps-step-title {
    color: #f8fafc !important;
}

[data-bs-theme="dark"] #nps-section.nps-workbench-shell .nps-tab-btn {
    border-color: rgba(148, 163, 184, 0.22) !important;
    color: #cbd5e1 !important;
    background: #111827 !important;
}

[data-bs-theme="dark"] #nps-section.nps-workbench-shell .nps-tab-btn.active {
    border-color: rgba(244, 63, 94, 0.42) !important;
    color: #fff !important;
    background: #be123c !important;
}

[data-bs-theme="dark"] #nps-section.nps-workbench-shell .text-muted,
[data-bs-theme="dark"] #nps-section.nps-workbench-shell .nps-kpi-label,
[data-bs-theme="dark"] #nps-section.nps-workbench-shell .nps-kpi-sub,
[data-bs-theme="dark"] #nps-section.nps-workbench-shell .nps-step-desc,
[data-bs-theme="dark"] #nps-section.nps-workbench-shell .table tbody td {
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] #nps-section.nps-workbench-shell .form-control,
[data-bs-theme="dark"] #nps-section.nps-workbench-shell .form-select {
    border-color: rgba(148, 163, 184, 0.28);
    background-color: #0f172a;
    color: #e5e7eb;
}

[data-bs-theme="dark"] #nps-section.nps-workbench-shell .table thead th {
    background: #020617 !important;
    color: #e5e7eb;
}

@media (max-width: 992px) {
    #nps-section.nps-workbench-shell .nps-hero {
        grid-template-columns: 1fr;
    }

    #nps-section.nps-workbench-shell .nps-status-bar,
    #nps-section.nps-workbench-shell .nps-status-bar > .d-flex {
        align-items: flex-start !important;
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    #nps-section.nps-workbench-shell .nps-hero {
        padding: 1rem;
    }

    #nps-section.nps-workbench-shell .nps-hero h2 {
        font-size: 1.35rem;
    }

    #nps-section.nps-workbench-shell .nps-tab-btn {
        min-height: 34px;
        font-size: 0.76rem !important;
    }
}

/* Configuracoes :: Central administrativa */
#config-section.config-workbench-shell {
    color: #172033;
}

#config-section.config-workbench-shell .config-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 370px);
    gap: 1rem;
    align-items: stretch;
    margin-bottom: 1rem;
    padding: 1.25rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    background: linear-gradient(135deg, #0f172a 0%, #4338ca 48%, #475569 100%);
    color: #fff;
    overflow: hidden;
}

#config-section.config-workbench-shell .config-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.45rem;
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

#config-section.config-workbench-shell .config-hero h2 {
    margin: 0;
    font-size: clamp(1.45rem, 2.1vw, 2.05rem);
    font-weight: 850;
    letter-spacing: 0;
}

#config-section.config-workbench-shell .config-hero p {
    max-width: 780px;
    margin: 0.45rem 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.92rem;
    line-height: 1.45;
}

#config-section.config-workbench-shell .config-board {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 118px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.24);
    backdrop-filter: blur(12px);
}

#config-section.config-workbench-shell .config-board span {
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

#config-section.config-workbench-shell .config-board strong {
    margin-top: 0.2rem;
    font-size: 1.22rem;
    line-height: 1.1;
}

#config-section.config-workbench-shell .config-board small {
    margin-top: 0.4rem;
    color: rgba(255, 255, 255, 0.72);
}

#config-section.config-workbench-shell .card {
    border: 1px solid rgba(148, 163, 184, 0.22) !important;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

#config-section.config-workbench-shell .card.bg-light {
    background: #f8fafc !important;
    box-shadow: none;
}

#config-section.config-workbench-shell .card-header {
    border-bottom: 1px solid rgba(148, 163, 184, 0.16) !important;
    background: #f8fafc !important;
}

#config-section.config-workbench-shell h5,
#config-section.config-workbench-shell h6,
#config-section.config-workbench-shell .card-header h5,
#config-section.config-workbench-shell .card-header h6 {
    color: #0f172a;
    font-weight: 850;
}

#config-section.config-workbench-shell .form-label,
#config-section.config-workbench-shell .text-muted {
    color: #64748b !important;
}

#config-section.config-workbench-shell .form-label {
    font-size: 0.76rem;
    font-weight: 850;
    letter-spacing: 0.03em;
}

#config-section.config-workbench-shell .form-control,
#config-section.config-workbench-shell .form-select,
#config-section.config-workbench-shell .btn,
#config-section.config-workbench-shell .input-group-text {
    border-radius: 7px;
}

#config-section.config-workbench-shell .table {
    font-size: 0.8rem;
}

#config-section.config-workbench-shell .table thead th {
    border-color: rgba(255, 255, 255, 0.08);
    background: #0f172a !important;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

#config-section.config-workbench-shell .table tbody td {
    color: #334155;
    vertical-align: middle;
}

[data-bs-theme="dark"] #config-section.config-workbench-shell {
    color: #e5e7eb;
}

[data-bs-theme="dark"] #config-section.config-workbench-shell .config-hero {
    border-color: rgba(148, 163, 184, 0.2);
    background: linear-gradient(135deg, #020617 0%, #312e81 48%, #334155 100%);
}

[data-bs-theme="dark"] #config-section.config-workbench-shell .card,
[data-bs-theme="dark"] #config-section.config-workbench-shell .card.bg-light {
    border-color: rgba(148, 163, 184, 0.18) !important;
    background: #111827 !important;
    box-shadow: none;
}

[data-bs-theme="dark"] #config-section.config-workbench-shell .card-header {
    border-bottom-color: rgba(148, 163, 184, 0.16) !important;
    background: #0f172a !important;
}

[data-bs-theme="dark"] #config-section.config-workbench-shell h5,
[data-bs-theme="dark"] #config-section.config-workbench-shell h6,
[data-bs-theme="dark"] #config-section.config-workbench-shell .card-header h5,
[data-bs-theme="dark"] #config-section.config-workbench-shell .card-header h6 {
    color: #f8fafc;
}

[data-bs-theme="dark"] #config-section.config-workbench-shell .form-label,
[data-bs-theme="dark"] #config-section.config-workbench-shell .text-muted,
[data-bs-theme="dark"] #config-section.config-workbench-shell .table tbody td {
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] #config-section.config-workbench-shell .form-control,
[data-bs-theme="dark"] #config-section.config-workbench-shell .form-select,
[data-bs-theme="dark"] #config-section.config-workbench-shell .input-group-text {
    border-color: rgba(148, 163, 184, 0.28);
    background-color: #0f172a;
    color: #e5e7eb;
}

[data-bs-theme="dark"] #config-section.config-workbench-shell .table thead th {
    background: #020617 !important;
    color: #e5e7eb;
}

@media (max-width: 992px) {
    #config-section.config-workbench-shell .config-hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    #config-section.config-workbench-shell .config-hero {
        padding: 1rem;
    }

    #config-section.config-workbench-shell .config-hero h2 {
        font-size: 1.35rem;
    }
}

/* Vendas Cartoes e Vendas Diarias :: Operacao comercial */
#vendas-cartoes-section.vc-workbench-shell,
#vendas-diarias-section.vd-workbench-shell {
    color: #172033;
}

#vendas-cartoes-section.vc-workbench-shell .vc-hero,
#vendas-diarias-section.vd-workbench-shell .vd-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 370px);
    gap: 1rem;
    align-items: stretch;
    margin-bottom: 1rem;
    padding: 1.25rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    color: #fff;
    overflow: hidden;
}

#vendas-cartoes-section.vc-workbench-shell .vc-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 48%, #7c3aed 100%);
}

#vendas-diarias-section.vd-workbench-shell .vd-hero {
    background: linear-gradient(135deg, #0f172a 0%, #047857 48%, #b45309 100%);
}

#vendas-cartoes-section.vc-workbench-shell .vc-kicker,
#vendas-diarias-section.vd-workbench-shell .vd-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.45rem;
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

#vendas-cartoes-section.vc-workbench-shell .vc-hero h2,
#vendas-diarias-section.vd-workbench-shell .vd-hero h2 {
    margin: 0;
    font-size: clamp(1.45rem, 2.1vw, 2.05rem);
    font-weight: 850;
    letter-spacing: 0;
}

#vendas-cartoes-section.vc-workbench-shell .vc-hero p,
#vendas-diarias-section.vd-workbench-shell .vd-hero p {
    max-width: 780px;
    margin: 0.45rem 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.92rem;
    line-height: 1.45;
}

#vendas-cartoes-section.vc-workbench-shell .vc-board,
#vendas-diarias-section.vd-workbench-shell .vd-board {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 118px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.24);
    backdrop-filter: blur(12px);
}

#vendas-cartoes-section.vc-workbench-shell .vc-board span,
#vendas-diarias-section.vd-workbench-shell .vd-board span {
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

#vendas-cartoes-section.vc-workbench-shell .vc-board strong,
#vendas-diarias-section.vd-workbench-shell .vd-board strong {
    margin-top: 0.2rem;
    font-size: 1.22rem;
    line-height: 1.1;
}

#vendas-cartoes-section.vc-workbench-shell .vc-board small,
#vendas-diarias-section.vd-workbench-shell .vd-board small {
    margin-top: 0.4rem;
    color: rgba(255, 255, 255, 0.72);
}

#vendas-cartoes-section.vc-workbench-shell .card,
#vendas-diarias-section.vd-workbench-shell .card {
    border: 1px solid rgba(148, 163, 184, 0.22) !important;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

#vendas-cartoes-section.vc-workbench-shell .vc-filter-panel,
#vendas-diarias-section.vd-workbench-shell .vd-filter-panel {
    overflow: visible !important;
}

#vendas-cartoes-section.vc-workbench-shell .card-header,
#vendas-diarias-section.vd-workbench-shell .card-header {
    border-bottom: 1px solid rgba(148, 163, 184, 0.16) !important;
    background: #f8fafc !important;
}

#vendas-cartoes-section.vc-workbench-shell .vc-kpi-grid .card,
#vendas-diarias-section.vd-workbench-shell .card.card-metric.border-start {
    position: relative;
    min-height: 102px;
    border-left-width: 0 !important;
}

#vendas-cartoes-section.vc-workbench-shell .vc-kpi-grid .card::before,
#vendas-diarias-section.vd-workbench-shell .card.card-metric.border-start::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: #64748b;
}

#vendas-cartoes-section.vc-workbench-shell .border-primary::before,
#vendas-diarias-section.vd-workbench-shell .border-primary::before { background: #2563eb; }
#vendas-cartoes-section.vc-workbench-shell .border-success::before,
#vendas-diarias-section.vd-workbench-shell .border-success::before { background: #059669; }
#vendas-cartoes-section.vc-workbench-shell .border-danger::before,
#vendas-diarias-section.vd-workbench-shell .border-danger::before { background: #dc2626; }
#vendas-cartoes-section.vc-workbench-shell .border-info::before,
#vendas-diarias-section.vd-workbench-shell .border-info::before { background: #0891b2; }
#vendas-cartoes-section.vc-workbench-shell .border-warning::before,
#vendas-diarias-section.vd-workbench-shell .border-warning::before { background: #d97706; }

#vendas-cartoes-section.vc-workbench-shell h5,
#vendas-cartoes-section.vc-workbench-shell h6,
#vendas-diarias-section.vd-workbench-shell h5,
#vendas-diarias-section.vd-workbench-shell h6 {
    color: #0f172a;
    font-weight: 850;
}

#vendas-cartoes-section.vc-workbench-shell .form-label,
#vendas-cartoes-section.vc-workbench-shell .text-muted,
#vendas-diarias-section.vd-workbench-shell .form-label,
#vendas-diarias-section.vd-workbench-shell .text-muted {
    color: #64748b !important;
}

#vendas-cartoes-section.vc-workbench-shell .form-label,
#vendas-diarias-section.vd-workbench-shell .form-label {
    font-size: 0.74rem;
    font-weight: 850;
    letter-spacing: 0.03em;
}

#vendas-cartoes-section.vc-workbench-shell .form-control,
#vendas-cartoes-section.vc-workbench-shell .form-select,
#vendas-cartoes-section.vc-workbench-shell .btn,
#vendas-diarias-section.vd-workbench-shell .form-control,
#vendas-diarias-section.vd-workbench-shell .form-select,
#vendas-diarias-section.vd-workbench-shell .btn {
    border-radius: 7px;
}

#vendas-diarias-section.vd-workbench-shell .vd-tabs {
    gap: 0.5rem;
    border-bottom: 0;
    padding-bottom: 0.15rem;
}

#vendas-diarias-section.vd-workbench-shell .vd-tabs .nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 999px;
    color: #475569;
    background: #fff;
    font-size: 0.8rem;
    font-weight: 800;
    white-space: nowrap;
}

#vendas-diarias-section.vd-workbench-shell .vd-tabs .nav-link.active {
    border-color: rgba(5, 150, 105, 0.34);
    color: #fff;
    background: #059669;
}

#vendas-cartoes-section.vc-workbench-shell .table,
#vendas-diarias-section.vd-workbench-shell .table {
    font-size: 0.8rem;
}

#vendas-cartoes-section.vc-workbench-shell .table thead th,
#vendas-diarias-section.vd-workbench-shell .table thead th {
    border-color: rgba(255, 255, 255, 0.08);
    background: #0f172a !important;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

#vendas-cartoes-section.vc-workbench-shell .table tbody td,
#vendas-diarias-section.vd-workbench-shell .table tbody td {
    color: #334155;
    vertical-align: middle;
}

[data-bs-theme="dark"] #vendas-cartoes-section.vc-workbench-shell,
[data-bs-theme="dark"] #vendas-diarias-section.vd-workbench-shell {
    color: #e5e7eb;
}

[data-bs-theme="dark"] #vendas-cartoes-section.vc-workbench-shell .vc-hero {
    border-color: rgba(148, 163, 184, 0.2);
    background: linear-gradient(135deg, #020617 0%, #1e3a8a 48%, #581c87 100%);
}

[data-bs-theme="dark"] #vendas-diarias-section.vd-workbench-shell .vd-hero {
    border-color: rgba(148, 163, 184, 0.2);
    background: linear-gradient(135deg, #020617 0%, #065f46 48%, #78350f 100%);
}

[data-bs-theme="dark"] #vendas-cartoes-section.vc-workbench-shell .card,
[data-bs-theme="dark"] #vendas-diarias-section.vd-workbench-shell .card {
    border-color: rgba(148, 163, 184, 0.18) !important;
    background: #111827;
    box-shadow: none;
}

[data-bs-theme="dark"] #vendas-cartoes-section.vc-workbench-shell .card-header,
[data-bs-theme="dark"] #vendas-diarias-section.vd-workbench-shell .card-header {
    border-bottom-color: rgba(148, 163, 184, 0.16) !important;
    background: #0f172a !important;
}

[data-bs-theme="dark"] #vendas-cartoes-section.vc-workbench-shell h5,
[data-bs-theme="dark"] #vendas-cartoes-section.vc-workbench-shell h6,
[data-bs-theme="dark"] #vendas-diarias-section.vd-workbench-shell h5,
[data-bs-theme="dark"] #vendas-diarias-section.vd-workbench-shell h6 {
    color: #f8fafc;
}

[data-bs-theme="dark"] #vendas-cartoes-section.vc-workbench-shell .form-label,
[data-bs-theme="dark"] #vendas-cartoes-section.vc-workbench-shell .text-muted,
[data-bs-theme="dark"] #vendas-cartoes-section.vc-workbench-shell .table tbody td,
[data-bs-theme="dark"] #vendas-diarias-section.vd-workbench-shell .form-label,
[data-bs-theme="dark"] #vendas-diarias-section.vd-workbench-shell .text-muted,
[data-bs-theme="dark"] #vendas-diarias-section.vd-workbench-shell .table tbody td {
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] #vendas-cartoes-section.vc-workbench-shell .form-control,
[data-bs-theme="dark"] #vendas-cartoes-section.vc-workbench-shell .form-select,
[data-bs-theme="dark"] #vendas-diarias-section.vd-workbench-shell .form-control,
[data-bs-theme="dark"] #vendas-diarias-section.vd-workbench-shell .form-select {
    border-color: rgba(148, 163, 184, 0.28);
    background-color: #0f172a;
    color: #e5e7eb;
}

[data-bs-theme="dark"] #vendas-diarias-section.vd-workbench-shell .vd-tabs .nav-link {
    border-color: rgba(148, 163, 184, 0.22);
    color: #cbd5e1;
    background: #111827;
}

[data-bs-theme="dark"] #vendas-diarias-section.vd-workbench-shell .vd-tabs .nav-link.active {
    border-color: rgba(52, 211, 153, 0.42);
    color: #fff;
    background: #047857;
}

[data-bs-theme="dark"] #vendas-cartoes-section.vc-workbench-shell .table thead th,
[data-bs-theme="dark"] #vendas-diarias-section.vd-workbench-shell .table thead th {
    background: #020617 !important;
    color: #e5e7eb;
}

@media (max-width: 992px) {
    #vendas-cartoes-section.vc-workbench-shell .vc-hero,
    #vendas-diarias-section.vd-workbench-shell .vd-hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    #vendas-cartoes-section.vc-workbench-shell .vc-hero,
    #vendas-diarias-section.vd-workbench-shell .vd-hero {
        padding: 1rem;
    }

    #vendas-cartoes-section.vc-workbench-shell .vc-hero h2,
    #vendas-diarias-section.vd-workbench-shell .vd-hero h2 {
        font-size: 1.35rem;
    }

    #vendas-diarias-section.vd-workbench-shell .vd-tabs .nav-link {
        min-height: 34px;
        font-size: 0.74rem;
    }
}

/* Manuais :: Documentacao operacional */
#manual-section.manual-workbench-shell,
#manual-nfe-section.manual-workbench-shell {
    color: #172033;
}

#manual-section.manual-workbench-shell > .card.card-metric:first-child,
#manual-nfe-section.manual-workbench-shell > .card.card-metric:first-child {
    border: 1px solid rgba(148, 163, 184, 0.22) !important;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

#manual-section.manual-workbench-shell > .card.card-metric:first-child > .card-body,
#manual-nfe-section.manual-workbench-shell > .card.card-metric:first-child > .card-body {
    padding: 1.25rem !important;
}

#manual-section.manual-workbench-shell > .card.card-metric:first-child .text-center.rounded-3 {
    margin-bottom: 1rem !important;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px !important;
    background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 54%, #0891b2 100%) !important;
    color: #fff;
}

#manual-section.manual-workbench-shell > .card.card-metric:first-child .text-center.rounded-3 h3,
#manual-section.manual-workbench-shell > .card.card-metric:first-child .text-center.rounded-3 p,
#manual-section.manual-workbench-shell > .card.card-metric:first-child .text-center.rounded-3 i {
    color: #fff !important;
}

#manual-nfe-section.manual-workbench-shell > .card.card-metric:first-child .d-flex.align-items-center {
    gap: 1rem;
    padding: 1.25rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 52%, #7c3aed 100%);
    color: #fff;
}

#manual-nfe-section.manual-workbench-shell > .card.card-metric:first-child .d-flex.align-items-center h4,
#manual-nfe-section.manual-workbench-shell > .card.card-metric:first-child .d-flex.align-items-center p {
    color: #fff !important;
}

#manual-section.manual-workbench-shell .card,
#manual-nfe-section.manual-workbench-shell .card,
#manual-section.manual-workbench-shell .accordion-item,
#manual-nfe-section.manual-workbench-shell .accordion-item,
#manual-section.manual-workbench-shell .list-group-item,
#manual-nfe-section.manual-workbench-shell .list-group-item {
    border-color: rgba(148, 163, 184, 0.22) !important;
    border-radius: 8px;
    background: #fff;
}

#manual-section.manual-workbench-shell .card,
#manual-nfe-section.manual-workbench-shell .card {
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

#manual-section.manual-workbench-shell .card.bg-light,
#manual-nfe-section.manual-workbench-shell .card.bg-light {
    background: #f8fafc !important;
}

#manual-section.manual-workbench-shell .card-header,
#manual-nfe-section.manual-workbench-shell .card-header {
    border-bottom: 1px solid rgba(148, 163, 184, 0.16) !important;
    background: #f8fafc !important;
}

#manual-section.manual-workbench-shell h3,
#manual-section.manual-workbench-shell h4,
#manual-section.manual-workbench-shell h5,
#manual-section.manual-workbench-shell h6,
#manual-nfe-section.manual-workbench-shell h3,
#manual-nfe-section.manual-workbench-shell h4,
#manual-nfe-section.manual-workbench-shell h5,
#manual-nfe-section.manual-workbench-shell h6 {
    color: #0f172a;
    font-weight: 850;
}

#manual-section.manual-workbench-shell .accordion-button,
#manual-nfe-section.manual-workbench-shell .accordion-button {
    color: #0f172a;
    background: #fff;
    font-weight: 800;
}

#manual-section.manual-workbench-shell .accordion-button:not(.collapsed),
#manual-nfe-section.manual-workbench-shell .accordion-button:not(.collapsed) {
    color: #1d4ed8;
    background: #eff6ff;
    box-shadow: inset 0 -1px 0 rgba(148, 163, 184, 0.18);
}

#manual-section.manual-workbench-shell .table,
#manual-nfe-section.manual-workbench-shell .table {
    font-size: 0.84rem;
}

#manual-section.manual-workbench-shell .table thead th,
#manual-nfe-section.manual-workbench-shell .table thead th {
    border-color: rgba(255, 255, 255, 0.08);
    background: #0f172a !important;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

#manual-section.manual-workbench-shell .table tbody td,
#manual-nfe-section.manual-workbench-shell .table tbody td {
    color: #334155;
    vertical-align: middle;
}

#manual-section.manual-workbench-shell .text-muted,
#manual-nfe-section.manual-workbench-shell .text-muted {
    color: #64748b !important;
}

[data-bs-theme="dark"] #manual-section.manual-workbench-shell,
[data-bs-theme="dark"] #manual-nfe-section.manual-workbench-shell {
    color: #e5e7eb;
}

[data-bs-theme="dark"] #manual-section.manual-workbench-shell > .card.card-metric:first-child .text-center.rounded-3 {
    border-color: rgba(148, 163, 184, 0.2);
    background: linear-gradient(135deg, #020617 0%, #1e3a8a 54%, #164e63 100%) !important;
}

[data-bs-theme="dark"] #manual-nfe-section.manual-workbench-shell > .card.card-metric:first-child .d-flex.align-items-center {
    border-color: rgba(148, 163, 184, 0.2);
    background: linear-gradient(135deg, #020617 0%, #1e3a8a 52%, #581c87 100%);
}

[data-bs-theme="dark"] #manual-section.manual-workbench-shell > .card.card-metric:first-child,
[data-bs-theme="dark"] #manual-nfe-section.manual-workbench-shell > .card.card-metric:first-child,
[data-bs-theme="dark"] #manual-section.manual-workbench-shell .card,
[data-bs-theme="dark"] #manual-nfe-section.manual-workbench-shell .card,
[data-bs-theme="dark"] #manual-section.manual-workbench-shell .accordion-item,
[data-bs-theme="dark"] #manual-nfe-section.manual-workbench-shell .accordion-item,
[data-bs-theme="dark"] #manual-section.manual-workbench-shell .list-group-item,
[data-bs-theme="dark"] #manual-nfe-section.manual-workbench-shell .list-group-item {
    border-color: rgba(148, 163, 184, 0.18) !important;
    background: #111827;
    box-shadow: none;
}

[data-bs-theme="dark"] #manual-section.manual-workbench-shell .card.bg-light,
[data-bs-theme="dark"] #manual-nfe-section.manual-workbench-shell .card.bg-light,
[data-bs-theme="dark"] #manual-section.manual-workbench-shell .card-header,
[data-bs-theme="dark"] #manual-nfe-section.manual-workbench-shell .card-header {
    border-color: rgba(148, 163, 184, 0.16) !important;
    background: #0f172a !important;
}

[data-bs-theme="dark"] #manual-section.manual-workbench-shell h3,
[data-bs-theme="dark"] #manual-section.manual-workbench-shell h4,
[data-bs-theme="dark"] #manual-section.manual-workbench-shell h5,
[data-bs-theme="dark"] #manual-section.manual-workbench-shell h6,
[data-bs-theme="dark"] #manual-nfe-section.manual-workbench-shell h3,
[data-bs-theme="dark"] #manual-nfe-section.manual-workbench-shell h4,
[data-bs-theme="dark"] #manual-nfe-section.manual-workbench-shell h5,
[data-bs-theme="dark"] #manual-nfe-section.manual-workbench-shell h6 {
    color: #f8fafc;
}

[data-bs-theme="dark"] #manual-section.manual-workbench-shell .accordion-button,
[data-bs-theme="dark"] #manual-nfe-section.manual-workbench-shell .accordion-button {
    color: #f8fafc;
    background: #111827;
}

[data-bs-theme="dark"] #manual-section.manual-workbench-shell .accordion-button:not(.collapsed),
[data-bs-theme="dark"] #manual-nfe-section.manual-workbench-shell .accordion-button:not(.collapsed) {
    color: #bfdbfe;
    background: #0f172a;
}

[data-bs-theme="dark"] #manual-section.manual-workbench-shell .text-muted,
[data-bs-theme="dark"] #manual-section.manual-workbench-shell .table tbody td,
[data-bs-theme="dark"] #manual-nfe-section.manual-workbench-shell .text-muted,
[data-bs-theme="dark"] #manual-nfe-section.manual-workbench-shell .table tbody td {
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] #manual-section.manual-workbench-shell .table thead th,
[data-bs-theme="dark"] #manual-nfe-section.manual-workbench-shell .table thead th {
    background: #020617 !important;
    color: #e5e7eb;
}

@media (max-width: 768px) {
    #manual-nfe-section.manual-workbench-shell > .card.card-metric:first-child .d-flex.align-items-center {
        align-items: flex-start !important;
        flex-direction: column;
    }

    #manual-section.manual-workbench-shell > .card.card-metric:first-child > .card-body,
    #manual-nfe-section.manual-workbench-shell > .card.card-metric:first-child > .card-body {
        padding: 1rem !important;
    }
}

/* Auditoria de Taxas :: Conferencia financeira */
#auditoria-taxas-section.at-workbench-shell {
    color: #172033;
}

#auditoria-taxas-section.at-workbench-shell .at-hero,
#painel-fiscal-section.pf-workbench-shell .pf-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 370px);
    gap: 1rem;
    align-items: stretch;
    margin-bottom: 1rem;
    padding: 1.25rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    color: #fff;
    overflow: hidden;
}

#auditoria-taxas-section.at-workbench-shell .at-hero {
    background: linear-gradient(135deg, #0f172a 0%, #991b1b 48%, #b45309 100%);
}

#painel-fiscal-section.pf-workbench-shell .pf-hero {
    background: linear-gradient(135deg, #0f172a 0%, #047857 48%, #1d4ed8 100%);
}

#auditoria-taxas-section.at-workbench-shell .at-kicker,
#painel-fiscal-section.pf-workbench-shell .pf-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.45rem;
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

#auditoria-taxas-section.at-workbench-shell .at-hero h2,
#painel-fiscal-section.pf-workbench-shell .pf-hero h2 {
    margin: 0;
    font-size: clamp(1.45rem, 2.1vw, 2.05rem);
    font-weight: 850;
    letter-spacing: 0;
}

#auditoria-taxas-section.at-workbench-shell .at-hero p,
#painel-fiscal-section.pf-workbench-shell .pf-hero p {
    max-width: 780px;
    margin: 0.45rem 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.92rem;
    line-height: 1.45;
}

#auditoria-taxas-section.at-workbench-shell .at-board,
#painel-fiscal-section.pf-workbench-shell .pf-board {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 118px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.24);
    backdrop-filter: blur(12px);
}

#auditoria-taxas-section.at-workbench-shell .at-board span,
#painel-fiscal-section.pf-workbench-shell .pf-board span {
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

#auditoria-taxas-section.at-workbench-shell .at-board strong,
#painel-fiscal-section.pf-workbench-shell .pf-board strong {
    margin-top: 0.2rem;
    font-size: 1.22rem;
    line-height: 1.1;
}

#auditoria-taxas-section.at-workbench-shell .at-board small,
#painel-fiscal-section.pf-workbench-shell .pf-board small {
    margin-top: 0.4rem;
    color: rgba(255, 255, 255, 0.72);
}

#auditoria-taxas-section.at-workbench-shell .card,
#painel-fiscal-section.pf-workbench-shell .card,
#painel-fiscal-section.pf-workbench-shell .pf-toolbar {
    border: 1px solid rgba(148, 163, 184, 0.22) !important;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

#painel-fiscal-section.pf-workbench-shell .pf-toolbar {
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
}

#auditoria-taxas-section.at-workbench-shell .card-header,
#painel-fiscal-section.pf-workbench-shell .card-header {
    border-bottom: 1px solid rgba(148, 163, 184, 0.16) !important;
    background: #f8fafc !important;
}

#auditoria-taxas-section.at-workbench-shell h5,
#auditoria-taxas-section.at-workbench-shell h6,
#painel-fiscal-section.pf-workbench-shell h5,
#painel-fiscal-section.pf-workbench-shell h6 {
    color: #0f172a;
    font-weight: 850;
}

#auditoria-taxas-section.at-workbench-shell .form-label,
#auditoria-taxas-section.at-workbench-shell .text-muted,
#painel-fiscal-section.pf-workbench-shell .form-label,
#painel-fiscal-section.pf-workbench-shell .text-muted {
    color: #64748b !important;
}

#auditoria-taxas-section.at-workbench-shell .form-label,
#painel-fiscal-section.pf-workbench-shell .form-label {
    font-size: 0.74rem;
    font-weight: 850;
    letter-spacing: 0.03em;
}

#auditoria-taxas-section.at-workbench-shell .form-control,
#auditoria-taxas-section.at-workbench-shell .form-select,
#auditoria-taxas-section.at-workbench-shell .btn,
#painel-fiscal-section.pf-workbench-shell .form-control,
#painel-fiscal-section.pf-workbench-shell .form-select,
#painel-fiscal-section.pf-workbench-shell .btn {
    border-radius: 7px;
}

#painel-fiscal-section.pf-workbench-shell .ts-wrapper {
    max-width: 100%;
}

#painel-fiscal-section.pf-workbench-shell .ts-hidden-accessible {
    width: 1px !important;
}

.tomselected.ts-hidden-accessible {
    width: 1px !important;
    min-width: 1px !important;
    max-width: 1px !important;
}

#auditoria-taxas-section.at-workbench-shell .at-tabs,
#painel-fiscal-section.pf-workbench-shell .pf-tabs {
    gap: 0.5rem;
    border-bottom: 0;
    padding-bottom: 0.15rem;
}

#auditoria-taxas-section.at-workbench-shell .at-tabs .nav-link,
#painel-fiscal-section.pf-workbench-shell .pf-tabs .nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 999px;
    color: #475569;
    background: #fff;
    font-size: 0.8rem;
    font-weight: 800;
    white-space: nowrap;
}

#auditoria-taxas-section.at-workbench-shell .at-tabs .nav-link.active {
    border-color: rgba(220, 38, 38, 0.34);
    color: #fff;
    background: #dc2626;
}

#painel-fiscal-section.pf-workbench-shell .pf-tabs .nav-link.active {
    border-color: rgba(5, 150, 105, 0.34);
    color: #fff;
    background: #059669;
}

#auditoria-taxas-section.at-workbench-shell .table,
#painel-fiscal-section.pf-workbench-shell .table {
    font-size: 0.8rem;
}

#auditoria-taxas-section.at-workbench-shell .table thead th,
#painel-fiscal-section.pf-workbench-shell .table thead th {
    border-color: rgba(255, 255, 255, 0.08);
    background: #0f172a !important;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

#auditoria-taxas-section.at-workbench-shell .table tbody td,
#painel-fiscal-section.pf-workbench-shell .table tbody td {
    color: #334155;
    vertical-align: middle;
}

[data-bs-theme="dark"] #auditoria-taxas-section.at-workbench-shell,
[data-bs-theme="dark"] #painel-fiscal-section.pf-workbench-shell {
    color: #e5e7eb;
}

[data-bs-theme="dark"] #auditoria-taxas-section.at-workbench-shell .at-hero {
    border-color: rgba(148, 163, 184, 0.2);
    background: linear-gradient(135deg, #020617 0%, #7f1d1d 48%, #78350f 100%);
}

[data-bs-theme="dark"] #painel-fiscal-section.pf-workbench-shell .pf-hero {
    border-color: rgba(148, 163, 184, 0.2);
    background: linear-gradient(135deg, #020617 0%, #065f46 48%, #1e3a8a 100%);
}

[data-bs-theme="dark"] #auditoria-taxas-section.at-workbench-shell .card,
[data-bs-theme="dark"] #painel-fiscal-section.pf-workbench-shell .card,
[data-bs-theme="dark"] #painel-fiscal-section.pf-workbench-shell .pf-toolbar {
    border-color: rgba(148, 163, 184, 0.18) !important;
    background: #111827;
    box-shadow: none;
}

[data-bs-theme="dark"] #auditoria-taxas-section.at-workbench-shell .card-header,
[data-bs-theme="dark"] #painel-fiscal-section.pf-workbench-shell .card-header {
    border-bottom-color: rgba(148, 163, 184, 0.16) !important;
    background: #0f172a !important;
}

[data-bs-theme="dark"] #auditoria-taxas-section.at-workbench-shell h5,
[data-bs-theme="dark"] #auditoria-taxas-section.at-workbench-shell h6,
[data-bs-theme="dark"] #painel-fiscal-section.pf-workbench-shell h5,
[data-bs-theme="dark"] #painel-fiscal-section.pf-workbench-shell h6 {
    color: #f8fafc;
}

[data-bs-theme="dark"] #auditoria-taxas-section.at-workbench-shell .form-label,
[data-bs-theme="dark"] #auditoria-taxas-section.at-workbench-shell .text-muted,
[data-bs-theme="dark"] #auditoria-taxas-section.at-workbench-shell .table tbody td,
[data-bs-theme="dark"] #painel-fiscal-section.pf-workbench-shell .form-label,
[data-bs-theme="dark"] #painel-fiscal-section.pf-workbench-shell .text-muted,
[data-bs-theme="dark"] #painel-fiscal-section.pf-workbench-shell .table tbody td {
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] #auditoria-taxas-section.at-workbench-shell .form-control,
[data-bs-theme="dark"] #auditoria-taxas-section.at-workbench-shell .form-select,
[data-bs-theme="dark"] #painel-fiscal-section.pf-workbench-shell .form-control,
[data-bs-theme="dark"] #painel-fiscal-section.pf-workbench-shell .form-select {
    border-color: rgba(148, 163, 184, 0.28);
    background-color: #0f172a;
    color: #e5e7eb;
}

[data-bs-theme="dark"] #auditoria-taxas-section.at-workbench-shell .at-tabs .nav-link,
[data-bs-theme="dark"] #painel-fiscal-section.pf-workbench-shell .pf-tabs .nav-link {
    border-color: rgba(148, 163, 184, 0.22);
    color: #cbd5e1;
    background: #111827;
}

[data-bs-theme="dark"] #auditoria-taxas-section.at-workbench-shell .at-tabs .nav-link.active {
    border-color: rgba(248, 113, 113, 0.42);
    color: #fff;
    background: #b91c1c;
}

[data-bs-theme="dark"] #painel-fiscal-section.pf-workbench-shell .pf-tabs .nav-link.active {
    border-color: rgba(52, 211, 153, 0.42);
    color: #fff;
    background: #047857;
}

[data-bs-theme="dark"] #auditoria-taxas-section.at-workbench-shell .table thead th,
[data-bs-theme="dark"] #painel-fiscal-section.pf-workbench-shell .table thead th {
    background: #020617 !important;
    color: #e5e7eb;
}

@media (max-width: 992px) {
    #auditoria-taxas-section.at-workbench-shell .at-hero,
    #painel-fiscal-section.pf-workbench-shell .pf-hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    #auditoria-taxas-section.at-workbench-shell .at-hero,
    #painel-fiscal-section.pf-workbench-shell .pf-hero {
        padding: 1rem;
    }

    #auditoria-taxas-section.at-workbench-shell .at-hero h2,
    #painel-fiscal-section.pf-workbench-shell .pf-hero h2 {
        font-size: 1.35rem;
    }

    #auditoria-taxas-section.at-workbench-shell .at-tabs .nav-link,
    #painel-fiscal-section.pf-workbench-shell .pf-tabs .nav-link {
        min-height: 34px;
        font-size: 0.74rem;
    }
}

/* ANVISA :: Registro sanitario */
#anvisa-section.anvisa-workbench-shell {
    color: #172033;
}

#anvisa-section .anvisa-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(270px, 360px);
    gap: 1rem;
    align-items: stretch;
    margin-bottom: 1rem;
    padding: 1.25rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    background: linear-gradient(135deg, #0f172a 0%, #166534 50%, #0e7490 100%);
    color: #fff;
    overflow: hidden;
}

#anvisa-section .anvisa-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.45rem;
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

#anvisa-section .anvisa-hero h2 {
    margin: 0;
    font-size: clamp(1.45rem, 2.1vw, 2.05rem);
    font-weight: 850;
    letter-spacing: 0;
}

#anvisa-section .anvisa-hero p {
    max-width: 760px;
    margin: 0.45rem 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.92rem;
    line-height: 1.45;
}

#anvisa-section .anvisa-board {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 118px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.24);
    backdrop-filter: blur(12px);
}

#anvisa-section .anvisa-board span {
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

#anvisa-section .anvisa-board strong {
    margin-top: 0.2rem;
    font-size: 1.22rem;
    line-height: 1.1;
}

#anvisa-section .anvisa-board small {
    margin-top: 0.4rem;
    color: rgba(255, 255, 255, 0.72);
}

#anvisa-section .card.card-metric {
    border: 1px solid rgba(148, 163, 184, 0.22) !important;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

#anvisa-section .card-header {
    border-bottom: 1px solid rgba(148, 163, 184, 0.16) !important;
    background: #f8fafc !important;
}

#anvisa-section .card-header h6,
#anvisa-section h6 {
    color: #0f172a;
    font-weight: 850;
}

#anvisa-section .form-label {
    color: #64748b !important;
    font-size: 0.72rem !important;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

#anvisa-section .form-control,
#anvisa-section .btn {
    border-radius: 7px;
}

#anvisa-section .table {
    margin-bottom: 0;
    font-size: 0.82rem;
}

#anvisa-section .table thead th {
    border-color: rgba(255, 255, 255, 0.08);
    background: #0f172a !important;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

#anvisa-section .table tbody td {
    color: #334155;
    vertical-align: middle;
}

#anvisa-section .text-muted {
    color: #64748b !important;
}

[data-bs-theme="dark"] #anvisa-section.anvisa-workbench-shell {
    color: #e5e7eb;
}

[data-bs-theme="dark"] #anvisa-section .anvisa-hero {
    border-color: rgba(148, 163, 184, 0.2);
    background: linear-gradient(135deg, #020617 0%, #14532d 50%, #164e63 100%);
}

[data-bs-theme="dark"] #anvisa-section .card.card-metric {
    border-color: rgba(148, 163, 184, 0.18) !important;
    background: #111827;
    box-shadow: none;
}

[data-bs-theme="dark"] #anvisa-section .card-header {
    border-bottom-color: rgba(148, 163, 184, 0.16) !important;
    background: #0f172a !important;
}

[data-bs-theme="dark"] #anvisa-section .card-header h6,
[data-bs-theme="dark"] #anvisa-section h6 {
    color: #f8fafc;
}

[data-bs-theme="dark"] #anvisa-section .form-label,
[data-bs-theme="dark"] #anvisa-section .text-muted,
[data-bs-theme="dark"] #anvisa-section .table tbody td {
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] #anvisa-section .form-control {
    border-color: rgba(148, 163, 184, 0.28);
    background-color: #0f172a;
    color: #e5e7eb;
}

[data-bs-theme="dark"] #anvisa-section .table thead th {
    background: #020617 !important;
    color: #e5e7eb;
}

/* PNI :: Inteligencia vacinal */
#pni-section.pni-workbench-shell {
    color: #172033;
}

#pni-section .pni-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 370px);
    gap: 1rem;
    align-items: stretch;
    margin-bottom: 1rem;
    padding: 1.25rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    background: linear-gradient(135deg, #102033 0%, #1d4ed8 48%, #047857 100%);
    color: #fff;
    overflow: hidden;
}

#pni-section .pni-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.45rem;
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

#pni-section .pni-hero h2 {
    margin: 0;
    font-size: clamp(1.45rem, 2.1vw, 2.05rem);
    font-weight: 850;
    letter-spacing: 0;
}

#pni-section .pni-hero p {
    max-width: 780px;
    margin: 0.45rem 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.92rem;
    line-height: 1.45;
}

#pni-section .pni-board {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 118px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.24);
    backdrop-filter: blur(12px);
}

#pni-section .pni-board span {
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

#pni-section .pni-board strong {
    margin-top: 0.2rem;
    font-size: 1.22rem;
    line-height: 1.1;
}

#pni-section .pni-board small {
    margin-top: 0.4rem;
    color: rgba(255, 255, 255, 0.72);
}

#pni-section .card {
    border: 1px solid rgba(148, 163, 184, 0.22) !important;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

#pni-section .pni-kpi-grid .card {
    position: relative;
    min-height: 108px;
    border-left-width: 0 !important;
}

#pni-section .pni-kpi-grid .card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: #64748b;
}

#pni-section .pni-kpi-grid .border-primary::before { background: #2563eb; }
#pni-section .pni-kpi-grid .border-success::before { background: #059669; }
#pni-section .pni-kpi-grid .border-warning::before { background: #d97706; }
#pni-section .pni-kpi-grid .border-danger::before { background: #dc2626; }

#pni-section .pni-kpi-grid h3 {
    color: #0f172a;
    font-weight: 850;
}

#pni-section .card-header {
    border-bottom: 1px solid rgba(148, 163, 184, 0.16) !important;
    background: #f8fafc !important;
}

#pni-section h6,
#pni-section .card-header h6 {
    color: #0f172a;
    font-weight: 850;
}

#pni-section h6.text-muted,
#pni-section small.text-muted,
#pni-section .text-muted {
    color: #64748b !important;
}

#pni-section .pni-tabs {
    gap: 0.5rem;
    border-bottom: 0;
    padding-bottom: 0.15rem;
}

#pni-section .pni-tabs .nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 999px;
    color: #475569;
    background: #fff;
    font-size: 0.82rem;
    font-weight: 800;
    white-space: nowrap;
}

#pni-section .pni-tabs .nav-link.active {
    border-color: rgba(37, 99, 235, 0.34);
    color: #fff;
    background: #2563eb;
}

#pni-section .form-control,
#pni-section .form-select,
#pni-section .btn {
    border-radius: 7px;
}

#pni-section .table {
    font-size: 0.8rem;
}

#pni-section .table thead th {
    border-color: rgba(255, 255, 255, 0.08);
    background: #0f172a !important;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

#pni-section .table tbody td {
    color: #334155;
    vertical-align: middle;
}

[data-bs-theme="dark"] #pni-section.pni-workbench-shell {
    color: #e5e7eb;
}

[data-bs-theme="dark"] #pni-section .pni-hero {
    border-color: rgba(148, 163, 184, 0.2);
    background: linear-gradient(135deg, #020617 0%, #1e3a8a 48%, #065f46 100%);
}

[data-bs-theme="dark"] #pni-section .card {
    border-color: rgba(148, 163, 184, 0.18) !important;
    background: #111827;
    box-shadow: none;
}

[data-bs-theme="dark"] #pni-section .card-header {
    border-bottom-color: rgba(148, 163, 184, 0.16) !important;
    background: #0f172a !important;
}

[data-bs-theme="dark"] #pni-section .pni-kpi-grid h3,
[data-bs-theme="dark"] #pni-section h6,
[data-bs-theme="dark"] #pni-section .card-header h6 {
    color: #f8fafc;
}

[data-bs-theme="dark"] #pni-section h6.text-muted,
[data-bs-theme="dark"] #pni-section small.text-muted,
[data-bs-theme="dark"] #pni-section .text-muted,
[data-bs-theme="dark"] #pni-section .table tbody td {
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] #pni-section .pni-tabs .nav-link {
    border-color: rgba(148, 163, 184, 0.22);
    color: #cbd5e1;
    background: #111827;
}

[data-bs-theme="dark"] #pni-section .pni-tabs .nav-link.active {
    border-color: rgba(96, 165, 250, 0.42);
    color: #fff;
    background: #1d4ed8;
}

[data-bs-theme="dark"] #pni-section .form-control,
[data-bs-theme="dark"] #pni-section .form-select {
    border-color: rgba(148, 163, 184, 0.28);
    background-color: #0f172a;
    color: #e5e7eb;
}

[data-bs-theme="dark"] #pni-section .table thead th {
    background: #020617 !important;
    color: #e5e7eb;
}

@media (max-width: 992px) {
    #anvisa-section .anvisa-hero,
    #pni-section .pni-hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    #anvisa-section .anvisa-hero,
    #pni-section .pni-hero {
        padding: 1rem;
    }

    #anvisa-section .anvisa-hero h2,
    #pni-section .pni-hero h2 {
        font-size: 1.35rem;
    }

    #pni-section .pni-tabs .nav-link {
        min-height: 34px;
        font-size: 0.76rem;
    }
}

/* ===== NFS-e Workbench Redesign ===== */
#nfse-section.nfse-workbench-shell {
    --nfse-ink: #172033;
    --nfse-ink-soft: #35445f;
    --nfse-blue: #2563eb;
    --nfse-green: #059669;
    --nfse-cyan: #0891b2;
    --nfse-amber: #d97706;
    --nfse-red: #dc2626;
    --nfse-border: #dbe4ef;
    --nfse-soft: #f6f8fb;
    color: var(--nfse-ink);
}
.nfse-hero-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(330px, 430px);
    gap: 20px;
    align-items: stretch;
    padding: 24px;
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(20,30,55,0.98) 0%, rgba(27,71,92,0.96) 58%, rgba(31,108,84,0.94) 100%);
    color: #f8fafc;
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.18);
    position: relative;
    overflow: hidden;
}
.nfse-hero-panel::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.055) 1px, transparent 1px);
    background-size: 38px 38px;
    mask-image: linear-gradient(90deg, transparent 0%, #000 46%, #000 100%);
    pointer-events: none;
}
.nfse-hero-main,
.nfse-hero-board {
    position: relative;
    z-index: 1;
}
.nfse-hero-main {
    min-height: 218px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.nfse-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.84);
    font-size: 0.72rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0;
}
.nfse-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34,197,94,0.18);
}
.nfse-hero-title {
    max-width: 720px;
    margin: 18px 0 10px;
    color: #fff;
    font-size: 2.3rem;
    line-height: 1.05;
    font-weight: 850;
    letter-spacing: 0;
}
.nfse-hero-subtitle {
    max-width: 760px;
    margin: 0;
    color: rgba(255,255,255,0.74);
    font-size: 0.96rem;
    line-height: 1.5;
}
.nfse-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}
.nfse-action-primary,
.nfse-action-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 39px;
    padding: 0 14px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.82rem;
    letter-spacing: 0;
}
.nfse-action-primary {
    border: 1px solid rgba(255,255,255,0.12);
    background: #ffffff;
    color: #143047;
}
.nfse-action-primary:hover {
    background: #f1f5f9;
    color: #143047;
}
.nfse-action-secondary {
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(255,255,255,0.1);
    color: #ffffff;
}
.nfse-action-secondary:hover {
    border-color: rgba(255,255,255,0.28);
    background: rgba(255,255,255,0.18);
    color: #ffffff;
}
.nfse-hero-board {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 218px;
    padding: 18px;
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 8px;
    background: rgba(255,255,255,0.11);
    backdrop-filter: blur(10px);
}
.nfse-board-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}
.nfse-board-top span,
.nfse-board-grid span,
.nfse-board-footer {
    color: rgba(255,255,255,0.66);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}
.nfse-board-top strong {
    color: #bbf7d0;
    font-size: 0.78rem;
    text-align: right;
}
.nfse-hero-board.nfse-has-risk .nfse-board-top strong {
    color: #fed7aa;
}
.nfse-board-value {
    margin: 18px 0;
    color: #fff;
    font-size: 2.05rem;
    line-height: 1.05;
    font-weight: 850;
    letter-spacing: 0;
    word-break: break-word;
}
.nfse-board-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.nfse-board-grid > div {
    padding: 12px;
    border-radius: 8px;
    background: rgba(15,23,42,0.28);
    border: 1px solid rgba(255,255,255,0.1);
}
.nfse-board-grid strong {
    display: block;
    margin-top: 6px;
    color: #fff;
    font-size: 1.15rem;
}
.nfse-board-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    color: rgba(255,255,255,0.74);
}
.nfse-board-footer strong {
    color: #fff;
}

.nfse-control-strip {
    display: flex;
    align-items: end;
    gap: 12px;
    flex-wrap: wrap;
    padding: 16px;
    border: 1px solid var(--nfse-border);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(15,23,42,0.06);
}
.nfse-control-main {
    min-width: 210px;
}
.nfse-control-main label {
    color: #64748b;
    font-weight: 800;
}
.nfse-control-presets {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.nfse-control-presets .btn {
    min-height: 32px;
    border-radius: 8px;
    font-size: 0.74rem;
    font-weight: 800;
}
.nfse-control-info {
    margin-left: auto;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 11px;
    border-radius: 999px;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    color: #1d4ed8;
    font-size: 0.76rem;
    font-weight: 800;
}

.nfse-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}
.nfse-section-heading span,
.nfse-panel-kicker {
    display: block;
    color: var(--nfse-cyan);
    font-size: 0.68rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0;
}
.nfse-section-heading strong {
    display: block;
    color: var(--nfse-ink);
    font-size: 1rem;
    font-weight: 850;
}
.nfse-section-heading small {
    color: #64748b;
    font-size: 0.78rem;
    text-align: right;
}

#nfse-section .nfse-kpi-card,
.nfse-monitor-panel,
.nfse-table-workspace,
.nfse-duplicates-panel .card {
    border: 1px solid var(--nfse-border) !important;
    border-radius: 8px !important;
    box-shadow: 0 12px 30px rgba(15,23,42,0.08) !important;
    background: #fff;
    overflow: hidden;
}
#nfse-section .nfse-kpi-card .card-body {
    padding: 16px !important;
}
.nfse-kpi-card {
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.nfse-kpi-card:hover {
    transform: translateY(-2px);
    border-color: #bfd2ea !important;
    box-shadow: 0 16px 34px rgba(15,23,42,0.11) !important;
}
.nfse-kpi-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.nfse-kpi-top span {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0;
    text-align: right;
}
.nfse-kpi-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}
.nfse-kpi-card-primary .nfse-kpi-icon { background: #eff6ff; color: var(--nfse-blue); }
.nfse-kpi-card-success .nfse-kpi-icon { background: #ecfdf5; color: var(--nfse-green); }
.nfse-kpi-card-info .nfse-kpi-icon { background: #ecfeff; color: var(--nfse-cyan); }
.nfse-kpi-card-warning .nfse-kpi-icon { background: #fff7ed; color: var(--nfse-amber); }
.nfse-kpi-card-danger .nfse-kpi-icon { background: #fef2f2; color: var(--nfse-red); }
.nfse-kpi-card-muted .nfse-kpi-icon { background: #f1f5f9; color: #64748b; }
.nfse-kpi-value {
    margin-top: 16px;
    color: var(--nfse-ink);
    font-size: 1.42rem;
    line-height: 1.08;
    font-weight: 850;
    word-break: break-word;
}
.nfse-kpi-sub {
    margin-top: 8px;
    min-height: 18px;
    color: #64748b;
    font-size: 0.74rem;
}

.nfse-duplicate-alert {
    border-radius: 8px;
    border-left: 4px solid var(--nfse-red);
}
.nfse-duplicates-panel .card {
    border-left: 4px solid var(--nfse-red) !important;
}
.nfse-duplicates-panel .card-header,
.nfse-monitor-panel .card-header,
.nfse-filter-panel {
    padding: 16px 18px !important;
    border-bottom: 1px solid var(--nfse-border) !important;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
}
.nfse-monitor-panel .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.nfse-monitor-panel h6,
.nfse-duplicates-panel h6 {
    color: var(--nfse-ink);
    font-size: 0.95rem;
    font-weight: 850;
}
#nfse-section .monitor-card {
    border: 1px solid #e5edf7;
    border-radius: 8px;
    box-shadow: none;
    background: #fff;
}

.nfse-filter-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.nfse-filter-heading span:first-child {
    display: block;
    color: var(--nfse-cyan);
    font-size: 0.68rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0;
}
.nfse-filter-heading strong {
    display: block;
    color: var(--nfse-ink);
    font-size: 1rem;
    font-weight: 850;
}
.nfse-count-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 9px;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.7rem;
    font-weight: 800;
    white-space: nowrap;
}
.nfse-filter-grid {
    display: grid;
    grid-template-columns: minmax(300px, 1fr) 150px 150px auto;
    gap: 10px;
    align-items: center;
}
.nfse-search-box .form-control {
    min-height: 36px;
}
.nfse-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
}
.nfse-toolbar .btn {
    min-height: 32px;
    border-radius: 8px;
    font-size: 0.74rem;
    font-weight: 800;
}
.nfse-advanced-toggle {
    color: #1d4ed8;
    font-weight: 800;
}
.nfse-advanced-panel {
    border: 1px solid #e5edf7;
    border-radius: 8px;
    background: #f8fafc;
}
.nfse-table-scroll {
    border-radius: 0 0 8px 8px;
}
#nfse-section #tableNfse thead th,
#nfse-section .nfse-duplicates-panel table thead th {
    background: #f1f5f9;
    color: #475569;
    border-bottom: 1px solid var(--nfse-border);
    font-size: 0.73rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0;
}
#nfse-section #tableNfse tbody td,
#nfse-section .nfse-duplicates-panel table tbody td {
    vertical-align: middle;
    border-color: #edf2f7;
    color: #27364f;
    font-size: 0.8rem;
}
#nfse-section #tableNfse tbody tr:hover,
#nfse-section .nfse-duplicates-panel table tbody tr:hover {
    background: #f8fbff;
}

[data-bs-theme="dark"] #nfse-section.nfse-workbench-shell {
    --nfse-ink: #f1f5f9;
    --nfse-ink-soft: #cbd5e1;
    --nfse-border: #334155;
    --nfse-soft: #111827;
    color: #e8edf5;
}
[data-bs-theme="dark"] #nfse-section .nfse-hero-panel {
    background:
        linear-gradient(135deg, rgba(8,13,24,0.98) 0%, rgba(13,42,61,0.98) 54%, rgba(9,79,72,0.96) 100%);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.42);
}
[data-bs-theme="dark"] #nfse-section .nfse-hero-board {
    background: rgba(15, 23, 42, 0.56);
    border-color: rgba(148, 163, 184, 0.24);
}
[data-bs-theme="dark"] #nfse-section .nfse-board-grid > div {
    background: rgba(8, 13, 24, 0.48);
    border-color: rgba(148, 163, 184, 0.18);
}
[data-bs-theme="dark"] #nfse-section .nfse-action-primary {
    background: #e2e8f0;
    color: #0f172a;
    border-color: rgba(255,255,255,0.1);
}
[data-bs-theme="dark"] #nfse-section .nfse-action-secondary {
    background: rgba(148, 163, 184, 0.1);
    border-color: rgba(148, 163, 184, 0.24);
    color: #e2e8f0;
}
[data-bs-theme="dark"] #nfse-section .nfse-control-strip,
[data-bs-theme="dark"] #nfse-section .nfse-kpi-card,
[data-bs-theme="dark"] #nfse-section .nfse-monitor-panel,
[data-bs-theme="dark"] #nfse-section .nfse-table-workspace,
[data-bs-theme="dark"] #nfse-section .nfse-duplicates-panel .card {
    background: #1a1f2e !important;
    border-color: #334155 !important;
    box-shadow: 0 14px 34px rgba(0,0,0,0.34) !important;
}
[data-bs-theme="dark"] #nfse-section .nfse-duplicates-panel .card-header,
[data-bs-theme="dark"] #nfse-section .nfse-monitor-panel .card-header,
[data-bs-theme="dark"] #nfse-section .nfse-filter-panel {
    background: linear-gradient(180deg, #1e2538 0%, #1a1f2e 100%) !important;
    border-color: #334155 !important;
}
[data-bs-theme="dark"] #nfse-section .nfse-section-heading strong,
[data-bs-theme="dark"] #nfse-section .nfse-filter-heading strong,
[data-bs-theme="dark"] #nfse-section .nfse-monitor-panel h6,
[data-bs-theme="dark"] #nfse-section .nfse-duplicates-panel h6,
[data-bs-theme="dark"] #nfse-section .nfse-kpi-value {
    color: #f1f5f9;
}
[data-bs-theme="dark"] #nfse-section .nfse-section-heading small,
[data-bs-theme="dark"] #nfse-section .nfse-kpi-sub,
[data-bs-theme="dark"] #nfse-section .nfse-control-main label {
    color: #94a3b8;
}
[data-bs-theme="dark"] #nfse-section .nfse-kpi-top span {
    color: #94a3b8;
}
[data-bs-theme="dark"] #nfse-section .nfse-control-info,
[data-bs-theme="dark"] #nfse-section .nfse-count-pill {
    background: rgba(37,99,235,0.16);
    border-color: rgba(96,165,250,0.28);
    color: #93c5fd;
}
[data-bs-theme="dark"] #nfse-section .nfse-advanced-toggle {
    color: #93c5fd;
}
[data-bs-theme="dark"] #nfse-section .nfse-duplicate-alert {
    background: rgba(127, 29, 29, 0.22) !important;
    border-color: rgba(248, 113, 113, 0.3) !important;
    color: #fecaca;
}
[data-bs-theme="dark"] #nfse-section .nfse-duplicate-alert .btn-outline-danger,
[data-bs-theme="dark"] #nfse-section .nfse-duplicate-alert .btn-outline-warning,
[data-bs-theme="dark"] #nfse-section .nfse-duplicate-alert .btn-outline-secondary {
    border-color: rgba(248, 250, 252, 0.24);
    color: #f8fafc;
}
[data-bs-theme="dark"] #nfse-section .nfse-kpi-card-primary .nfse-kpi-icon { background: rgba(37,99,235,0.18); color: #93c5fd; }
[data-bs-theme="dark"] #nfse-section .nfse-kpi-card-success .nfse-kpi-icon { background: rgba(5,150,105,0.18); color: #6ee7b7; }
[data-bs-theme="dark"] #nfse-section .nfse-kpi-card-info .nfse-kpi-icon { background: rgba(8,145,178,0.18); color: #67e8f9; }
[data-bs-theme="dark"] #nfse-section .nfse-kpi-card-warning .nfse-kpi-icon { background: rgba(217,119,6,0.18); color: #fbbf24; }
[data-bs-theme="dark"] #nfse-section .nfse-kpi-card-danger .nfse-kpi-icon { background: rgba(220,38,38,0.18); color: #fca5a5; }
[data-bs-theme="dark"] #nfse-section .nfse-kpi-card-muted .nfse-kpi-icon { background: rgba(148,163,184,0.14); color: #cbd5e1; }
[data-bs-theme="dark"] #nfse-section .monitor-card {
    background: #151b2a !important;
    border-color: #334155 !important;
}
[data-bs-theme="dark"] #nfse-section .nfse-advanced-panel,
[data-bs-theme="dark"] #nfse-section #modalDupResumo {
    background: #151b2a !important;
    border-color: #334155 !important;
}
[data-bs-theme="dark"] #nfse-section #tableNfse thead th,
[data-bs-theme="dark"] #nfse-section .nfse-duplicates-panel table thead th {
    background: #151b2a !important;
    color: #aebbd0 !important;
    border-color: #334155 !important;
}
[data-bs-theme="dark"] #nfse-section #tableNfse tbody td,
[data-bs-theme="dark"] #nfse-section .nfse-duplicates-panel table tbody td {
    color: #d8e0ec;
    border-color: #2d3548;
}
[data-bs-theme="dark"] #nfse-section #tableNfse tbody tr.table-danger > td {
    background: rgba(127,29,29,0.24) !important;
    color: #fee2e2;
}
[data-bs-theme="dark"] #nfse-section #tableNfse tbody tr.table-secondary > td {
    background: rgba(71,85,105,0.24) !important;
    color: #e2e8f0;
}
[data-bs-theme="dark"] #nfse-section #tableNfse tbody tr:hover,
[data-bs-theme="dark"] #nfse-section .nfse-duplicates-panel table tbody tr:hover {
    background: rgba(96,165,250,0.06) !important;
}
[data-bs-theme="dark"] #nfse-section #nfse-paginacao {
    color: #94a3b8;
}
[data-bs-theme="dark"] #nfse-section .paginacao-container {
    background: #1a1f2e;
    border-color: #334155;
}

@media (max-width: 1199px) {
    .nfse-hero-panel {
        grid-template-columns: 1fr;
    }
    .nfse-filter-grid {
        grid-template-columns: minmax(260px, 1fr) 150px 150px;
    }
    .nfse-toolbar {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
}

@media (max-width: 767px) {
    .nfse-hero-panel {
        padding: 18px;
    }
    .nfse-hero-main {
        min-height: 0;
    }
    .nfse-hero-title {
        font-size: 1.62rem;
    }
    .nfse-hero-actions .btn {
        width: 100%;
    }
    .nfse-hero-board {
        min-height: 0;
    }
    .nfse-board-value {
        font-size: 1.5rem;
    }
    .nfse-board-grid {
        grid-template-columns: 1fr;
    }
    .nfse-control-strip {
        display: block;
    }
    .nfse-control-presets {
        margin-top: 10px;
    }
    .nfse-control-info {
        margin: 10px 0 0;
        width: 100%;
        justify-content: center;
    }
    .nfse-section-heading {
        display: block;
    }
    .nfse-section-heading small {
        display: block;
        margin-top: 4px;
        text-align: left;
    }
    #nfse-section .nfse-kpi-card .card-body {
        padding: 13px !important;
    }
    .nfse-kpi-icon {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }
    .nfse-kpi-top {
        align-items: flex-start;
    }
    .nfse-kpi-top span {
        font-size: 0.66rem;
    }
    .nfse-kpi-value {
        font-size: 1.05rem;
    }
    .nfse-filter-grid {
        grid-template-columns: 1fr;
    }
    .nfse-toolbar {
        justify-content: flex-start;
    }
    .nfse-filter-heading {
        display: block;
    }
    .nfse-count-pill {
        margin-top: 8px;
    }
    #nfse-section .nfse-duplicate-alert {
        flex-wrap: wrap;
        align-items: flex-start !important;
    }
    #nfse-section .nfse-duplicate-alert .btn {
        margin-top: 8px;
        white-space: normal;
    }
    #nfse-section .nfse-duplicate-alert .btn:first-of-type {
        min-width: 118px;
    }
}

/* Emissao NF-e */
.emissao-workbench-shell {
    --emissao-ink: #172033;
    --emissao-muted: #64748b;
    --emissao-border: #dfe7f1;
    --emissao-panel: #ffffff;
    --emissao-soft: #f6f8fb;
    color: var(--emissao-ink);
}

.emissao-hero-board {
    display: grid;
    grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1.1fr);
    gap: 18px;
    padding: 24px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 8px;
    background:
        linear-gradient(135deg, #12324d 0%, #0b5b5a 52%, #926a21 100%);
    box-shadow: 0 18px 44px rgba(18, 50, 77, 0.22);
}

.emissao-hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 245px;
    color: #f8fafc;
}

.emissao-eyebrow,
.emissao-section-label {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #dbeafe;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.emissao-hero-copy h2 {
    margin: 10px 0 8px;
    color: #ffffff;
    font-size: 2.25rem;
    font-weight: 800;
}

.emissao-hero-copy p {
    max-width: 560px;
    color: rgba(248, 250, 252, 0.82);
    font-size: 0.96rem;
    line-height: 1.55;
}

.emissao-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.emissao-hero-panel {
    display: grid;
    gap: 14px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
}

.emissao-board-top,
.emissao-board-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: rgba(248, 250, 252, 0.78);
    font-size: 0.82rem;
}

.emissao-board-top strong,
.emissao-board-foot strong {
    color: #ffffff;
}

.emissao-board-value {
    color: #ffffff;
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.05;
}

.emissao-board-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.emissao-board-grid > div {
    min-width: 0;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.16);
}

.emissao-board-grid span {
    display: block;
    color: rgba(248, 250, 252, 0.72);
    font-size: 0.72rem;
    font-weight: 700;
}

.emissao-board-grid strong {
    display: block;
    margin-top: 4px;
    color: #ffffff;
    font-size: 1.18rem;
    font-weight: 800;
}

.emissao-filter-panel,
.emissao-panel {
    border: 1px solid var(--emissao-border);
    border-radius: 8px;
    background: var(--emissao-panel);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.emissao-filter-panel {
    padding: 16px;
}

.emissao-filter-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1.35fr) 150px 150px 150px minmax(250px, 1.1fr) auto;
    gap: 12px;
    align-items: end;
}

.emissao-filter-field label {
    display: block;
    margin-bottom: 6px;
    color: var(--emissao-muted);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.emissao-filter-actions,
.emissao-preset-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.emissao-filter-actions {
    justify-content: flex-end;
}

.emissao-preset-row {
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--emissao-border);
}

.emissao-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 18px 12px;
    border-bottom: 1px solid var(--emissao-border);
}

.emissao-panel-header h3 {
    margin: 8px 0 0;
    color: var(--emissao-ink);
    font-size: 1.1rem;
    font-weight: 800;
}

.emissao-section-label {
    background: rgba(11, 91, 90, 0.1);
    color: #0f766e;
}

.emissao-table-wrap {
    border: 0;
    border-radius: 0;
}

.emissao-table {
    min-width: 940px;
}

.emissao-table thead th {
    border-bottom: 1px solid var(--emissao-border);
    background: var(--emissao-soft);
    color: #516071;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.emissao-table tbody td {
    vertical-align: middle;
    border-color: #edf2f7;
    color: #27364f;
    font-size: 0.82rem;
}

.emissao-table tbody tr:hover {
    background: #f8fbff;
}

.emissao-pagination-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 42px;
    padding: 10px 16px;
    border-top: 1px solid var(--emissao-border);
    background: #fbfdff;
}

#emissao-status-sefaz {
    border-radius: 8px;
}

[data-bs-theme="dark"] #emissao-section.emissao-workbench-shell {
    --emissao-ink: #f1f5f9;
    --emissao-muted: #94a3b8;
    --emissao-border: #334155;
    --emissao-panel: #1a1f2e;
    --emissao-soft: #151b2a;
    color: #e8edf5;
}

[data-bs-theme="dark"] #emissao-section .emissao-hero-board {
    background:
        linear-gradient(135deg, rgba(8, 18, 32, 0.98) 0%, rgba(10, 56, 58, 0.98) 55%, rgba(69, 52, 25, 0.96) 100%);
    border-color: rgba(148, 163, 184, 0.22);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.42);
}

[data-bs-theme="dark"] #emissao-section .emissao-hero-panel,
[data-bs-theme="dark"] #emissao-section .emissao-board-grid > div {
    background: rgba(8, 13, 24, 0.42);
    border-color: rgba(148, 163, 184, 0.2);
}

[data-bs-theme="dark"] #emissao-section .emissao-filter-panel,
[data-bs-theme="dark"] #emissao-section .emissao-panel {
    background: var(--emissao-panel);
    border-color: var(--emissao-border);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
}

[data-bs-theme="dark"] #emissao-section .emissao-section-label {
    background: rgba(20, 184, 166, 0.12);
    color: #5eead4;
}

[data-bs-theme="dark"] #emissao-section .emissao-panel-header,
[data-bs-theme="dark"] #emissao-section .emissao-preset-row,
[data-bs-theme="dark"] #emissao-section .emissao-pagination-row {
    border-color: var(--emissao-border);
}

[data-bs-theme="dark"] #emissao-section .emissao-pagination-row,
[data-bs-theme="dark"] #emissao-section .emissao-table thead th {
    background: var(--emissao-soft);
}

[data-bs-theme="dark"] #emissao-section .emissao-table thead th {
    color: #aebbd0;
    border-color: var(--emissao-border);
}

[data-bs-theme="dark"] #emissao-section .emissao-table tbody td {
    color: #d8e0ec;
    border-color: #2d3548;
}

[data-bs-theme="dark"] #emissao-section .emissao-table tbody tr:hover {
    background: rgba(96, 165, 250, 0.06);
}

[data-bs-theme="dark"] #emissao-section .form-control,
[data-bs-theme="dark"] #emissao-section .form-select {
    background-color: #121827;
    border-color: #334155;
    color: #e2e8f0;
}

[data-bs-theme="dark"] #emissao-section .form-control::placeholder {
    color: #64748b;
}

@media (max-width: 1199px) {
    .emissao-hero-board,
    .emissao-filter-grid {
        grid-template-columns: 1fr;
    }

    .emissao-filter-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 767px) {
    .emissao-hero-board {
        padding: 18px;
    }

    .emissao-hero-copy {
        min-height: 0;
    }

    .emissao-hero-copy h2,
    .emissao-board-value {
        font-size: 1.65rem;
    }

    .emissao-hero-actions .btn,
    .emissao-filter-actions .btn {
        width: 100%;
    }

    .emissao-board-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .emissao-board-top,
    .emissao-board-foot,
    .emissao-panel-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .emissao-preset-row .btn {
        flex: 1 1 auto;
    }
}

/* Emissao NFS-e */
.em-nfse-workbench-shell {
    --em-nfse-ink: #172033;
    --em-nfse-muted: #64748b;
    --em-nfse-border: #dfe7f1;
    --em-nfse-panel: #ffffff;
    --em-nfse-soft: #f6f8fb;
    color: var(--em-nfse-ink);
}

#emissao-nfse-section .em-nfse-main-card,
#emissao-nfse-section .em-nfse-config-card,
#emissao-nfse-section .em-nfse-filter-card {
    border: 1px solid var(--em-nfse-border);
    border-radius: 8px;
    background: var(--em-nfse-panel);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

#emissao-nfse-section .em-nfse-header {
    background:
        linear-gradient(135deg, rgba(20, 83, 45, 0.08), rgba(37, 99, 235, 0.08));
    border-bottom: 1px solid var(--em-nfse-border) !important;
}

.em-nfse-eyebrow {
    display: inline-flex;
    width: fit-content;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(20, 83, 45, 0.1);
    color: #15803d;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

#emissao-nfse-section .em-nfse-header h5 {
    color: var(--em-nfse-ink);
    font-size: 1.28rem;
    font-weight: 800;
}

#emissao-nfse-section .em-nfse-header small,
#emissao-nfse-section .em-nfse-filter-card label {
    color: var(--em-nfse-muted);
}

#emissao-nfse-section .em-nfse-kpi {
    min-height: 104px;
    border: 1px solid var(--em-nfse-border);
    border-radius: 8px;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    box-shadow: none;
}

#emissao-nfse-section .em-nfse-kpi h6 {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

#emissao-nfse-section .em-nfse-kpi h3 {
    font-weight: 850;
}

#emissao-nfse-section .em-nfse-kpi-money {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(20, 184, 166, 0.08));
}

#emissao-nfse-section .em-nfse-filter-card {
    box-shadow: none;
}

#emissao-nfse-section .em-nfse-filter-card .form-label {
    font-weight: 800;
    text-transform: uppercase;
}

#emissao-nfse-section .em-nfse-table {
    min-width: 1080px;
}

#emissao-nfse-section .em-nfse-table thead th {
    border-bottom: 1px solid var(--em-nfse-border);
    background: var(--em-nfse-soft);
    color: #516071;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

#emissao-nfse-section .em-nfse-table tbody td {
    vertical-align: middle;
    border-color: #edf2f7;
    color: #27364f;
    font-size: 0.82rem;
}

#emissao-nfse-section .em-nfse-table tbody tr:hover {
    background: #f8fbff;
}

#emissao-nfse-section #emNfsePaginacao {
    min-height: 42px;
    padding: 10px 0 0;
    border-top: 1px solid var(--em-nfse-border);
}

[data-bs-theme="dark"] #emissao-nfse-section.em-nfse-workbench-shell {
    --em-nfse-ink: #f1f5f9;
    --em-nfse-muted: #94a3b8;
    --em-nfse-border: #334155;
    --em-nfse-panel: #1a1f2e;
    --em-nfse-soft: #151b2a;
    color: #e8edf5;
}

[data-bs-theme="dark"] #emissao-nfse-section .em-nfse-main-card,
[data-bs-theme="dark"] #emissao-nfse-section .em-nfse-config-card,
[data-bs-theme="dark"] #emissao-nfse-section .em-nfse-filter-card,
[data-bs-theme="dark"] #emissao-nfse-section .em-nfse-kpi {
    background: var(--em-nfse-panel);
    border-color: var(--em-nfse-border);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
}

[data-bs-theme="dark"] #emissao-nfse-section .em-nfse-header {
    background:
        linear-gradient(135deg, rgba(20, 184, 166, 0.08), rgba(96, 165, 250, 0.08));
    border-color: var(--em-nfse-border) !important;
}

[data-bs-theme="dark"] #emissao-nfse-section .em-nfse-eyebrow {
    background: rgba(34, 197, 94, 0.12);
    color: #86efac;
}

[data-bs-theme="dark"] #emissao-nfse-section .em-nfse-table thead th {
    background: var(--em-nfse-soft);
    color: #aebbd0;
    border-color: var(--em-nfse-border);
}

[data-bs-theme="dark"] #emissao-nfse-section .em-nfse-table tbody td {
    color: #d8e0ec;
    border-color: #2d3548;
}

[data-bs-theme="dark"] #emissao-nfse-section .em-nfse-table tbody tr:hover {
    background: rgba(96, 165, 250, 0.06);
}

[data-bs-theme="dark"] #emissao-nfse-section .form-control,
[data-bs-theme="dark"] #emissao-nfse-section .form-select {
    background-color: #121827;
    border-color: #334155;
    color: #e2e8f0;
}

[data-bs-theme="dark"] #emissao-nfse-section .form-control::placeholder {
    color: #64748b;
}

[data-bs-theme="dark"] #emissao-nfse-section .text-bg-light {
    background-color: #121827 !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}

@media (max-width: 767px) {
    #emissao-nfse-section .em-nfse-header {
        align-items: flex-start !important;
        flex-direction: column;
        gap: 14px;
    }

    #emissao-nfse-section .em-nfse-header .btn {
        width: 100%;
    }

    #emissao-nfse-section .em-nfse-kpi {
        min-height: 92px;
    }

    #emissao-nfse-section #emNfseLimparFiltrosBtn {
        margin-left: 0 !important;
        width: 100%;
    }
}

/* Pagamentos */
#pagamentos-section.pagamentos-workbench-shell {
    --pag-ink: #111827;
    --pag-muted: #64748b;
    --pag-line: rgba(15, 23, 42, 0.1);
    --pag-panel: rgba(255, 255, 255, 0.94);
    --pag-blue: #2563eb;
    --pag-green: #059669;
    --pag-amber: #d97706;
    --pag-red: #dc2626;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.08), transparent 32%),
        linear-gradient(180deg, #f8fafc 0%, #eef4fb 100%);
    border-radius: 0;
    margin: -1rem;
    padding: 1rem;
}

#pagamentos-section .pag-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
    gap: 1rem;
    align-items: stretch;
    margin-bottom: 1rem;
    padding: 1.2rem;
    border: 1px solid var(--pag-line);
    background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 58%, #059669 100%);
    color: #fff;
    border-radius: 8px;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.16);
}

#pagamentos-section .pag-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.55rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
}

#pagamentos-section .pag-hero h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 0;
}

#pagamentos-section .pag-hero p {
    max-width: 760px;
    margin: 0.55rem 0 0;
    color: rgba(255, 255, 255, 0.82);
}

#pagamentos-section .pag-hero-board {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
}

#pagamentos-section .pag-hero-board > div,
#pagamentos-section .pag-mini-kpi {
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 0.8rem;
}

#pagamentos-section .pag-hero-board span,
#pagamentos-section .pag-mini-kpi span {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.72);
}

#pagamentos-section .pag-hero-board strong {
    display: block;
    font-size: 1.05rem;
    line-height: 1.15;
    word-break: break-word;
}

#pagamentos-section .pag-workspace-tabs {
    gap: 0.45rem;
    border-bottom: 0;
}

#pagamentos-section .pag-workspace-tabs .nav-link {
    border: 1px solid var(--pag-line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--pag-muted);
    font-weight: 700;
    font-size: 0.86rem;
}

#pagamentos-section .pag-workspace-tabs .nav-link.active {
    background: var(--pag-blue);
    border-color: var(--pag-blue);
    color: #fff;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.2);
}

#pagamentos-section .card,
#pagamentos-section .card-metric {
    border: 1px solid var(--pag-line);
    border-radius: 8px;
    background: var(--pag-panel);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

#pagamentos-section .card-header.bg-white,
#pagamentos-section .table-light,
#pagamentos-section .table-dark {
    background: rgba(248, 250, 252, 0.96) !important;
    color: var(--pag-ink) !important;
    border-color: var(--pag-line);
}

#pagamentos-section .table thead th {
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #475569;
    border-bottom-color: var(--pag-line);
    white-space: nowrap;
}

#pagamentos-section .table tbody td {
    border-top-color: rgba(15, 23, 42, 0.06);
    vertical-align: middle;
}

#pagamentos-section .pag-filter-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(140px, 0.8fr)) minmax(250px, 1fr);
    gap: 0.75rem;
    align-items: end;
}

#pagamentos-section .pag-filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

#pagamentos-section .pag-mini-kpi {
    border-color: var(--pag-line);
    background: linear-gradient(180deg, #ffffff, #f8fafc);
}

#pagamentos-section .pag-mini-kpi span {
    color: var(--pag-muted);
}

#pagamentos-section .pag-mini-kpi strong {
    display: block;
    color: var(--pag-ink);
    font-size: 1rem;
}

#pagamentos-section .form-control,
#pagamentos-section .form-select,
#pagamentos-section .dropdown-toggle {
    border-color: rgba(100, 116, 139, 0.28);
}

#pagamentos-section #ddaResultado .rounded {
    border: 1px solid rgba(15, 23, 42, 0.08);
}

[data-bs-theme="dark"] #pagamentos-section.pagamentos-workbench-shell {
    --pag-ink: #e5e7eb;
    --pag-muted: #94a3b8;
    --pag-line: rgba(148, 163, 184, 0.18);
    --pag-panel: rgba(15, 23, 42, 0.92);
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.12), transparent 34%),
        linear-gradient(180deg, #020617 0%, #0f172a 100%);
}

[data-bs-theme="dark"] #pagamentos-section .pag-hero {
    background: linear-gradient(135deg, #020617 0%, #1e3a8a 58%, #065f46 100%);
    border-color: rgba(148, 163, 184, 0.22);
}

[data-bs-theme="dark"] #pagamentos-section .card,
[data-bs-theme="dark"] #pagamentos-section .card-metric,
[data-bs-theme="dark"] #pagamentos-section .pag-mini-kpi,
[data-bs-theme="dark"] #pagamentos-section .pag-workspace-tabs .nav-link {
    background: var(--pag-panel);
    border-color: var(--pag-line);
    color: var(--pag-ink);
}

[data-bs-theme="dark"] #pagamentos-section .pag-workspace-tabs .nav-link:not(.active) {
    color: var(--pag-muted);
}

[data-bs-theme="dark"] #pagamentos-section .card-header.bg-white,
[data-bs-theme="dark"] #pagamentos-section .table-light,
[data-bs-theme="dark"] #pagamentos-section .table-dark {
    background: rgba(15, 23, 42, 0.96) !important;
    color: var(--pag-ink) !important;
}

[data-bs-theme="dark"] #pagamentos-section .table thead th {
    color: #cbd5e1;
}

[data-bs-theme="dark"] #pagamentos-section .table tbody td {
    border-top-color: rgba(148, 163, 184, 0.12);
}

[data-bs-theme="dark"] #pagamentos-section .form-control,
[data-bs-theme="dark"] #pagamentos-section .form-select,
[data-bs-theme="dark"] #pagamentos-section .dropdown-toggle,
[data-bs-theme="dark"] #pagamentos-section .input-group-text {
    background-color: rgba(2, 6, 23, 0.72);
    border-color: rgba(148, 163, 184, 0.24);
    color: var(--pag-ink);
}

@media (max-width: 992px) {
    #pagamentos-section .pag-hero,
    #pagamentos-section .pag-filter-grid {
        grid-template-columns: 1fr;
    }

    #pagamentos-section .pag-hero-board {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    #pagamentos-section.pagamentos-workbench-shell {
        margin: -0.75rem;
        padding: 0.75rem;
    }

    #pagamentos-section .pag-hero h2 {
        font-size: 1.45rem;
    }

    #pagamentos-section .pag-workspace-tabs .nav-link {
        font-size: 0.78rem;
        padding: 0.42rem 0.68rem;
    }

    #pagamentos-section .pag-filter-actions .btn {
        flex: 1 1 30%;
    }
}

/* Conciliacao */
#conciliacao-section.conciliacao-workbench-shell {
    --conc-ink: #111827;
    --conc-muted: #64748b;
    --conc-line: rgba(15, 23, 42, 0.1);
    --conc-panel: rgba(255, 255, 255, 0.94);
    --conc-blue: #2563eb;
    --conc-green: #059669;
    --conc-amber: #d97706;
    background:
        linear-gradient(135deg, rgba(5, 150, 105, 0.08), transparent 34%),
        linear-gradient(180deg, #f8fafc 0%, #eef7f4 100%);
    margin: -1rem;
    padding: 1rem;
}

#conciliacao-section .conc-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
    gap: 1rem;
    align-items: stretch;
    margin-bottom: 1rem;
    padding: 1.2rem;
    border: 1px solid var(--conc-line);
    background: linear-gradient(135deg, #052e2b 0%, #0f766e 52%, #2563eb 100%);
    color: #fff;
    border-radius: 8px;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.14);
}

#conciliacao-section .conc-kicker {
    display: inline-flex;
    margin-bottom: 0.55rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
}

#conciliacao-section .conc-hero h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 0;
}

#conciliacao-section .conc-hero p {
    max-width: 760px;
    margin: 0.55rem 0 0;
    color: rgba(255, 255, 255, 0.82);
}

#conciliacao-section .conc-hero-board {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
}

#conciliacao-section .conc-hero-board > div {
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 0.8rem;
}

#conciliacao-section .conc-hero-board span {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.72);
}

#conciliacao-section .conc-hero-board strong {
    display: block;
    font-size: 1rem;
    line-height: 1.18;
    word-break: break-word;
}

#conciliacao-section .conc-workspace-tabs {
    gap: 0.45rem;
    border-bottom: 0;
}

#conciliacao-section .conc-workspace-tabs .nav-link {
    border: 1px solid var(--conc-line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--conc-muted);
    font-weight: 700;
    font-size: 0.86rem;
}

#conciliacao-section .conc-workspace-tabs .nav-link.active {
    background: var(--conc-green);
    border-color: var(--conc-green);
    color: #fff;
    box-shadow: 0 10px 22px rgba(5, 150, 105, 0.18);
}

#conciliacao-section .card,
#conciliacao-section .card-metric,
#conciliacao-section .accordion-item,
#conciliacao-section .conc-empty-panel {
    border: 1px solid var(--conc-line);
    border-radius: 8px;
    background: var(--conc-panel);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

#conciliacao-section .card-header.bg-white,
#conciliacao-section .table-light,
#conciliacao-section .accordion-button {
    background: rgba(248, 250, 252, 0.96) !important;
    color: var(--conc-ink) !important;
    border-color: var(--conc-line);
}

#conciliacao-section .table thead th {
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #475569;
    border-bottom-color: var(--conc-line);
    white-space: nowrap;
}

#conciliacao-section .table tbody td {
    border-top-color: rgba(15, 23, 42, 0.06);
    vertical-align: middle;
}

#conciliacao-section .form-control,
#conciliacao-section .form-select {
    border-color: rgba(100, 116, 139, 0.28);
}

#conciliacao-section .conc-empty-panel {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem;
}

#conciliacao-section .conc-empty-panel > i {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.1);
    color: var(--conc-blue);
    font-size: 1.1rem;
}

#conciliacao-section .conc-empty-panel h5 {
    margin: 0 0 0.35rem;
    font-weight: 800;
    color: var(--conc-ink);
}

#conciliacao-section .conc-empty-panel p {
    margin: 0 0 0.75rem;
    color: var(--conc-muted);
}

[data-bs-theme="dark"] #conciliacao-section.conciliacao-workbench-shell {
    --conc-ink: #e5e7eb;
    --conc-muted: #94a3b8;
    --conc-line: rgba(148, 163, 184, 0.18);
    --conc-panel: rgba(15, 23, 42, 0.92);
    background:
        linear-gradient(135deg, rgba(5, 150, 105, 0.12), transparent 34%),
        linear-gradient(180deg, #020617 0%, #0f172a 100%);
}

[data-bs-theme="dark"] #conciliacao-section .conc-hero {
    background: linear-gradient(135deg, #021f1d 0%, #115e59 52%, #1e3a8a 100%);
    border-color: rgba(148, 163, 184, 0.22);
}

[data-bs-theme="dark"] #conciliacao-section .card,
[data-bs-theme="dark"] #conciliacao-section .card-metric,
[data-bs-theme="dark"] #conciliacao-section .accordion-item,
[data-bs-theme="dark"] #conciliacao-section .conc-empty-panel,
[data-bs-theme="dark"] #conciliacao-section .conc-workspace-tabs .nav-link {
    background: var(--conc-panel);
    border-color: var(--conc-line);
    color: var(--conc-ink);
}

[data-bs-theme="dark"] #conciliacao-section .card-header.bg-white,
[data-bs-theme="dark"] #conciliacao-section .table-light,
[data-bs-theme="dark"] #conciliacao-section .accordion-button {
    background: rgba(15, 23, 42, 0.96) !important;
    color: var(--conc-ink) !important;
}

[data-bs-theme="dark"] #conciliacao-section .table thead th {
    color: #cbd5e1;
}

[data-bs-theme="dark"] #conciliacao-section .form-control,
[data-bs-theme="dark"] #conciliacao-section .form-select,
[data-bs-theme="dark"] #conciliacao-section .input-group-text {
    background-color: rgba(2, 6, 23, 0.72);
    border-color: rgba(148, 163, 184, 0.24);
    color: var(--conc-ink);
}

@media (max-width: 992px) {
    #conciliacao-section .conc-hero {
        grid-template-columns: 1fr;
    }

    #conciliacao-section .conc-hero-board {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    #conciliacao-section.conciliacao-workbench-shell {
        margin: -0.75rem;
        padding: 0.75rem;
    }

    #conciliacao-section .conc-hero h2 {
        font-size: 1.45rem;
    }

    #conciliacao-section .conc-workspace-tabs .nav-link {
        font-size: 0.78rem;
        padding: 0.42rem 0.68rem;
    }

    #conciliacao-section .conc-empty-panel {
        display: block;
    }

    #conciliacao-section .conc-empty-panel > i {
        margin-bottom: 0.75rem;
    }
}

.produtos-workbench-shell {
    --prod-ink: #111827;
    --prod-muted: #64748b;
    --prod-line: rgba(15, 23, 42, 0.1);
    --prod-panel: rgba(255, 255, 255, 0.95);
    --prod-blue: #2563eb;
    --prod-violet: #7c3aed;
    --prod-green: #059669;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.08), transparent 34%),
        linear-gradient(180deg, #f8fafc 0%, #f1f5ff 100%);
    margin: -1rem;
    padding: 1rem;
}

.produtos-workbench-shell .prod-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
    gap: 1rem;
    align-items: stretch;
    margin-bottom: 1rem;
    padding: 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: linear-gradient(135deg, #172554 0%, #1d4ed8 48%, #7c3aed 100%);
    color: #fff;
    border-radius: 8px;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.14);
}

.produtos-workbench-shell .prod-kicker {
    display: inline-flex;
    margin-bottom: 0.55rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
}

.produtos-workbench-shell .prod-hero h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 0;
}

.produtos-workbench-shell .prod-hero p {
    max-width: 760px;
    margin: 0.55rem 0 0;
    color: rgba(255, 255, 255, 0.82);
}

.produtos-workbench-shell .prod-hero-board {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.produtos-workbench-shell .prod-hero-board > div {
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 0.8rem;
}

.produtos-workbench-shell .prod-hero-board span,
.produtos-workbench-shell .prod-panel-title span {
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.produtos-workbench-shell .prod-hero-board span {
    margin-bottom: 0.35rem;
    color: rgba(255, 255, 255, 0.72);
}

.produtos-workbench-shell .prod-hero-board strong {
    display: block;
    font-size: 1rem;
    line-height: 1.18;
    word-break: break-word;
}

.produtos-workbench-shell .card,
.produtos-workbench-shell .card-metric,
.produtos-workbench-shell .produtos-main-panel {
    border: 1px solid var(--prod-line);
    border-radius: 8px;
    background: var(--prod-panel);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.produtos-workbench-shell .prod-command-grid .card-metric {
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.produtos-workbench-shell .prod-command-grid .card-metric:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.09);
}

.produtos-workbench-shell .prod-panel-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.produtos-workbench-shell .prod-panel-title span {
    color: var(--prod-muted);
}

.produtos-workbench-shell .prod-panel-title strong {
    display: block;
    color: var(--prod-ink);
    font-size: 1rem;
}

.produtos-workbench-shell .prod-workspace-tabs {
    gap: 0.45rem;
    border-bottom: 0;
}

.produtos-workbench-shell .prod-workspace-tabs .nav-link {
    border: 1px solid var(--prod-line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.74);
    color: var(--prod-muted);
    font-weight: 700;
    font-size: 0.86rem;
}

.produtos-workbench-shell .prod-workspace-tabs .nav-link.active {
    background: var(--prod-blue);
    border-color: var(--prod-blue);
    color: #fff;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.18);
}

.produtos-workbench-shell .card-header.bg-white,
.produtos-workbench-shell .table-light,
.produtos-workbench-shell .modal-header {
    background: rgba(248, 250, 252, 0.96) !important;
    color: var(--prod-ink) !important;
    border-color: var(--prod-line);
}

.produtos-workbench-shell .table thead th {
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #475569;
    border-bottom-color: var(--prod-line);
    white-space: nowrap;
}

.produtos-workbench-shell .table tbody td {
    border-top-color: rgba(15, 23, 42, 0.06);
    vertical-align: middle;
}

.produtos-workbench-shell .form-control,
.produtos-workbench-shell .form-select,
.produtos-workbench-shell .input-group-text {
    border-color: rgba(100, 116, 139, 0.28);
}

.produtos-workbench-shell .prod-filter-row .search-box {
    margin-bottom: 0;
}

[data-bs-theme="dark"] .produtos-workbench-shell {
    --prod-ink: #e5e7eb;
    --prod-muted: #94a3b8;
    --prod-line: rgba(148, 163, 184, 0.18);
    --prod-panel: rgba(15, 23, 42, 0.92);
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.12), transparent 34%),
        linear-gradient(180deg, #020617 0%, #0f172a 100%);
}

[data-bs-theme="dark"] .produtos-workbench-shell .prod-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 48%, #4c1d95 100%);
}

[data-bs-theme="dark"] .produtos-workbench-shell .card,
[data-bs-theme="dark"] .produtos-workbench-shell .card-metric,
[data-bs-theme="dark"] .produtos-workbench-shell .prod-workspace-tabs .nav-link {
    background: var(--prod-panel);
    border-color: var(--prod-line);
    color: var(--prod-ink);
}

[data-bs-theme="dark"] .produtos-workbench-shell .card-header.bg-white,
[data-bs-theme="dark"] .produtos-workbench-shell .table-light,
[data-bs-theme="dark"] .produtos-workbench-shell .modal-header {
    background: rgba(15, 23, 42, 0.96) !important;
    color: var(--prod-ink) !important;
}

[data-bs-theme="dark"] .produtos-workbench-shell .table thead th {
    color: #cbd5e1;
}

[data-bs-theme="dark"] .produtos-workbench-shell .form-control,
[data-bs-theme="dark"] .produtos-workbench-shell .form-select,
[data-bs-theme="dark"] .produtos-workbench-shell .input-group-text {
    background-color: rgba(2, 6, 23, 0.72);
    border-color: rgba(148, 163, 184, 0.24);
    color: var(--prod-ink);
}

@media (max-width: 1100px) {
    .produtos-workbench-shell .prod-hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .produtos-workbench-shell {
        margin: -0.75rem;
        padding: 0.75rem;
    }

    .produtos-workbench-shell .prod-hero-board {
        grid-template-columns: 1fr;
    }

    .produtos-workbench-shell .prod-hero h2 {
        font-size: 1.45rem;
    }

    .produtos-workbench-shell .prod-panel-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .produtos-workbench-shell .prod-workspace-tabs .nav-link {
        font-size: 0.78rem;
        padding: 0.42rem 0.68rem;
    }
}

.fornecedores-workbench-shell {
    --forn-ink: #111827;
    --forn-muted: #64748b;
    --forn-line: rgba(15, 23, 42, 0.1);
    --forn-panel: rgba(255, 255, 255, 0.95);
    --forn-green: #047857;
    --forn-indigo: #4f46e5;
    --forn-amber: #d97706;
    background:
        linear-gradient(135deg, rgba(4, 120, 87, 0.08), transparent 34%),
        linear-gradient(180deg, #f8fafc 0%, #eef6ff 100%);
    margin: -1rem;
    padding: 1rem;
}

.fornecedores-workbench-shell .forn-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
    gap: 1rem;
    align-items: stretch;
    margin-bottom: 1rem;
    padding: 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: linear-gradient(135deg, #052e2b 0%, #14532d 45%, #4338ca 100%);
    color: #fff;
    border-radius: 8px;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.14);
}

.fornecedores-workbench-shell .forn-kicker {
    display: inline-flex;
    margin-bottom: 0.55rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
}

.fornecedores-workbench-shell .forn-hero h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 0;
}

.fornecedores-workbench-shell .forn-hero p {
    max-width: 760px;
    margin: 0.55rem 0 0;
    color: rgba(255, 255, 255, 0.82);
}

.fornecedores-workbench-shell .forn-hero-board {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.fornecedores-workbench-shell .forn-hero-board > div,
.fornecedores-workbench-shell .forn-command-card {
    border-radius: 8px;
}

.fornecedores-workbench-shell .forn-hero-board > div {
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.12);
    padding: 0.8rem;
}

.fornecedores-workbench-shell .forn-hero-board span,
.fornecedores-workbench-shell .forn-command-card span,
.fornecedores-workbench-shell .forn-panel-title span,
.fornecedores-workbench-shell .forn-score-intro span {
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.fornecedores-workbench-shell .forn-hero-board span {
    margin-bottom: 0.35rem;
    color: rgba(255, 255, 255, 0.72);
}

.fornecedores-workbench-shell .forn-hero-board strong {
    display: block;
    font-size: 1rem;
    line-height: 1.18;
    word-break: break-word;
}

.fornecedores-workbench-shell .forn-workspace-tabs {
    gap: 0.45rem;
    border-bottom: 0;
}

.fornecedores-workbench-shell .forn-workspace-tabs .nav-link {
    border: 1px solid var(--forn-line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.74);
    color: var(--forn-muted);
    font-weight: 700;
    font-size: 0.86rem;
}

.fornecedores-workbench-shell .forn-workspace-tabs .nav-link.active {
    background: var(--forn-green);
    border-color: var(--forn-green);
    color: #fff;
    box-shadow: 0 10px 22px rgba(4, 120, 87, 0.18);
}

.fornecedores-workbench-shell .forn-command-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
}

.fornecedores-workbench-shell .forn-command-card,
.fornecedores-workbench-shell .card,
.fornecedores-workbench-shell .card-metric,
.fornecedores-workbench-shell .forn-score-intro {
    border: 1px solid var(--forn-line);
    background: var(--forn-panel);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.fornecedores-workbench-shell .forn-command-card {
    padding: 1rem;
}

.fornecedores-workbench-shell .forn-command-card span,
.fornecedores-workbench-shell .forn-panel-title span,
.fornecedores-workbench-shell .forn-score-intro span {
    color: var(--forn-muted);
}

.fornecedores-workbench-shell .forn-command-card strong {
    display: block;
    min-height: 2.15rem;
    margin-top: 0.35rem;
    color: var(--forn-ink);
    font-size: 1.35rem;
    line-height: 1.15;
    word-break: break-word;
}

.fornecedores-workbench-shell .forn-command-card small {
    color: var(--forn-muted);
}

.fornecedores-workbench-shell .forn-command-risk {
    border-color: rgba(217, 119, 6, 0.28);
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.12), var(--forn-panel));
}

.fornecedores-workbench-shell .forn-panel-title,
.fornecedores-workbench-shell .forn-score-intro {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.fornecedores-workbench-shell .forn-panel-title strong,
.fornecedores-workbench-shell .forn-score-intro strong {
    display: block;
    color: var(--forn-ink);
    font-size: 1rem;
}

.fornecedores-workbench-shell .forn-score-intro {
    padding: 1rem;
    border-radius: 8px;
}

.fornecedores-workbench-shell .forn-score-intro small {
    display: block;
    margin-top: 0.25rem;
    color: var(--forn-muted);
}

.fornecedores-workbench-shell .card-header.bg-white,
.fornecedores-workbench-shell .table-light,
.fornecedores-workbench-shell .modal-header {
    background: rgba(248, 250, 252, 0.96) !important;
    color: var(--forn-ink) !important;
    border-color: var(--forn-line);
}

.fornecedores-workbench-shell .table thead th {
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #475569;
    border-bottom-color: var(--forn-line);
    white-space: nowrap;
}

.fornecedores-workbench-shell .table tbody td {
    border-top-color: rgba(15, 23, 42, 0.06);
    vertical-align: middle;
}

.fornecedores-workbench-shell .form-control,
.fornecedores-workbench-shell .form-select,
.fornecedores-workbench-shell .input-group-text {
    border-color: rgba(100, 116, 139, 0.28);
}

[data-bs-theme="dark"] .fornecedores-workbench-shell {
    --forn-ink: #e5e7eb;
    --forn-muted: #94a3b8;
    --forn-line: rgba(148, 163, 184, 0.18);
    --forn-panel: rgba(15, 23, 42, 0.92);
    background:
        linear-gradient(135deg, rgba(4, 120, 87, 0.12), transparent 34%),
        linear-gradient(180deg, #020617 0%, #0f172a 100%);
}

[data-bs-theme="dark"] .fornecedores-workbench-shell .forn-hero {
    background: linear-gradient(135deg, #021f1d 0%, #14532d 45%, #312e81 100%);
}

[data-bs-theme="dark"] .fornecedores-workbench-shell .card,
[data-bs-theme="dark"] .fornecedores-workbench-shell .card-metric,
[data-bs-theme="dark"] .fornecedores-workbench-shell .forn-command-card,
[data-bs-theme="dark"] .fornecedores-workbench-shell .forn-score-intro,
[data-bs-theme="dark"] .fornecedores-workbench-shell .forn-workspace-tabs .nav-link {
    background: var(--forn-panel);
    border-color: var(--forn-line);
    color: var(--forn-ink);
}

[data-bs-theme="dark"] .fornecedores-workbench-shell .card-header.bg-white,
[data-bs-theme="dark"] .fornecedores-workbench-shell .table-light,
[data-bs-theme="dark"] .fornecedores-workbench-shell .modal-header {
    background: rgba(15, 23, 42, 0.96) !important;
    color: var(--forn-ink) !important;
}

[data-bs-theme="dark"] .fornecedores-workbench-shell .table thead th {
    color: #cbd5e1;
}

[data-bs-theme="dark"] .fornecedores-workbench-shell .form-control,
[data-bs-theme="dark"] .fornecedores-workbench-shell .form-select,
[data-bs-theme="dark"] .fornecedores-workbench-shell .input-group-text {
    background-color: rgba(2, 6, 23, 0.72);
    border-color: rgba(148, 163, 184, 0.24);
    color: var(--forn-ink);
}

@media (max-width: 1100px) {
    .fornecedores-workbench-shell .forn-hero,
    .fornecedores-workbench-shell .forn-command-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 680px) {
    .fornecedores-workbench-shell {
        margin: -0.75rem;
        padding: 0.75rem;
    }

    .fornecedores-workbench-shell .forn-hero,
    .fornecedores-workbench-shell .forn-hero-board,
    .fornecedores-workbench-shell .forn-command-grid {
        grid-template-columns: 1fr;
    }

    .fornecedores-workbench-shell .forn-hero h2 {
        font-size: 1.45rem;
    }

    .fornecedores-workbench-shell .forn-panel-title,
    .fornecedores-workbench-shell .forn-score-intro {
        align-items: flex-start;
        flex-direction: column;
    }

    .fornecedores-workbench-shell .forn-workspace-tabs .nav-link {
        font-size: 0.78rem;
        padding: 0.42rem 0.68rem;
    }
}

/* Consulta SEFAZ */
.consulta-workbench-shell {
    --consulta-ink: #162033;
    --consulta-muted: #64748b;
    --consulta-border: #dfe7f1;
    --consulta-panel: #ffffff;
    --consulta-soft: #f6f8fb;
    color: var(--consulta-ink);
}

.consulta-hero-panel {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) minmax(340px, 0.82fr);
    gap: 18px;
    padding: 24px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 8px;
    background:
        linear-gradient(135deg, #163458 0%, #155d67 52%, #6f5325 100%);
    box-shadow: 0 18px 44px rgba(22, 52, 88, 0.2);
}

.consulta-hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 230px;
    color: #f8fafc;
}

.consulta-eyebrow,
.consulta-section-label {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #dbeafe;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.consulta-hero-copy h2 {
    margin: 10px 0 8px;
    color: #ffffff;
    font-size: 2.25rem;
    font-weight: 800;
}

.consulta-hero-copy p {
    max-width: 620px;
    color: rgba(248, 250, 252, 0.82);
    font-size: 0.96rem;
    line-height: 1.55;
}

.consulta-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.consulta-hero-board {
    display: grid;
    gap: 14px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
}

.consulta-board-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: rgba(248, 250, 252, 0.78);
    font-size: 0.82rem;
}

.consulta-board-row strong {
    color: #ffffff;
}

.consulta-board-value {
    color: #ffffff;
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
}

.consulta-board-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.consulta-board-grid > div {
    min-width: 0;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.16);
}

.consulta-board-grid span {
    display: block;
    color: rgba(248, 250, 252, 0.72);
    font-size: 0.72rem;
    font-weight: 700;
}

.consulta-board-grid strong {
    display: block;
    margin-top: 4px;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 800;
}

.consulta-board-note {
    padding: 10px 12px;
    border: 1px solid rgba(253, 224, 71, 0.22);
    border-radius: 8px;
    background: rgba(120, 53, 15, 0.18);
    color: #fef3c7;
    font-size: 0.82rem;
}

.consulta-grid {
    display: grid;
    grid-template-columns: minmax(320px, 0.95fr) minmax(340px, 1.05fr);
    gap: 18px;
}

.consulta-panel {
    min-width: 0;
    border: 1px solid var(--consulta-border);
    border-radius: 8px;
    background: var(--consulta-panel);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.consulta-panel-header {
    padding: 18px 18px 12px;
    border-bottom: 1px solid var(--consulta-border);
}

.consulta-panel-header h3 {
    margin: 8px 0 0;
    color: var(--consulta-ink);
    font-size: 1.08rem;
    font-weight: 800;
}

.consulta-section-label {
    background: rgba(21, 93, 103, 0.1);
    color: #0e7490;
}

.consulta-form,
.consulta-status-body {
    padding: 18px;
}

.consulta-field label {
    margin-bottom: 6px;
    color: var(--consulta-muted);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
}

.consulta-warning {
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 12px;
    margin: 14px 0;
    padding: 13px;
    border: 1px solid rgba(217, 119, 6, 0.26);
    border-radius: 8px;
    background: #fffbeb;
    color: #7c2d12;
}

.consulta-warning i {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: rgba(217, 119, 6, 0.12);
    color: #b45309;
}

.consulta-warning strong,
.consulta-warning span {
    display: block;
}

.consulta-warning strong {
    margin-bottom: 2px;
    font-size: 0.88rem;
}

.consulta-warning span {
    font-size: 0.82rem;
    line-height: 1.4;
}

.consulta-submit {
    width: 100%;
}

.consulta-empty-state {
    display: grid;
    place-items: center;
    min-height: 170px;
    padding: 22px;
    border: 1px dashed var(--consulta-border);
    border-radius: 8px;
    background: var(--consulta-soft);
    text-align: center;
}

.consulta-empty-state i {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: 10px;
    border-radius: 8px;
    background: rgba(14, 116, 144, 0.1);
    color: #0e7490;
    font-size: 1.25rem;
}

.consulta-empty-state strong {
    color: var(--consulta-ink);
    font-size: 0.98rem;
}

.consulta-empty-state span {
    margin-top: 4px;
    color: var(--consulta-muted);
    font-size: 0.84rem;
}

#consultaStatus .alert {
    margin-bottom: 0;
    border-radius: 8px;
}

[data-bs-theme="dark"] #consulta-section.consulta-workbench-shell {
    --consulta-ink: #f1f5f9;
    --consulta-muted: #94a3b8;
    --consulta-border: #334155;
    --consulta-panel: #1a1f2e;
    --consulta-soft: #151b2a;
    color: #e8edf5;
}

[data-bs-theme="dark"] #consulta-section .consulta-hero-panel {
    background:
        linear-gradient(135deg, rgba(8, 18, 32, 0.98) 0%, rgba(13, 58, 67, 0.98) 55%, rgba(68, 50, 25, 0.96) 100%);
    border-color: rgba(148, 163, 184, 0.22);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.42);
}

[data-bs-theme="dark"] #consulta-section .consulta-hero-board,
[data-bs-theme="dark"] #consulta-section .consulta-board-grid > div {
    background: rgba(8, 13, 24, 0.42);
    border-color: rgba(148, 163, 184, 0.2);
}

[data-bs-theme="dark"] #consulta-section .consulta-panel {
    background: var(--consulta-panel);
    border-color: var(--consulta-border);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
}

[data-bs-theme="dark"] #consulta-section .consulta-panel-header {
    border-color: var(--consulta-border);
}

[data-bs-theme="dark"] #consulta-section .consulta-section-label {
    background: rgba(34, 211, 238, 0.12);
    color: #67e8f9;
}

[data-bs-theme="dark"] #consulta-section .consulta-warning {
    background: rgba(120, 53, 15, 0.18);
    border-color: rgba(251, 191, 36, 0.28);
    color: #fde68a;
}

[data-bs-theme="dark"] #consulta-section .consulta-warning i {
    background: rgba(251, 191, 36, 0.12);
    color: #fbbf24;
}

[data-bs-theme="dark"] #consulta-section .consulta-empty-state {
    background: var(--consulta-soft);
    border-color: var(--consulta-border);
}

[data-bs-theme="dark"] #consulta-section .consulta-empty-state i {
    background: rgba(34, 211, 238, 0.12);
    color: #67e8f9;
}

[data-bs-theme="dark"] #consulta-section .form-select {
    background-color: #121827;
    border-color: #334155;
    color: #e2e8f0;
}

@media (max-width: 991px) {
    .consulta-hero-panel,
    .consulta-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .consulta-hero-panel {
        padding: 18px;
    }

    .consulta-hero-copy {
        min-height: 0;
    }

    .consulta-hero-copy h2,
    .consulta-board-value {
        font-size: 1.65rem;
    }

    .consulta-hero-actions .btn {
        width: 100%;
    }

    .consulta-board-grid {
        grid-template-columns: 1fr;
    }
}

/* Logs / Monitor SEFAZ */
.logs-workbench-shell {
    --logs-ink: #162033;
    --logs-muted: #64748b;
    --logs-border: #dfe7f1;
    --logs-panel: #ffffff;
    --logs-soft: #f6f8fb;
    color: var(--logs-ink);
}

.logs-hero-panel {
    display: grid;
    grid-template-columns: minmax(340px, 1fr) minmax(360px, 0.9fr);
    gap: 18px;
    padding: 24px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 8px;
    background:
        linear-gradient(135deg, #183456 0%, #215c67 52%, #76572b 100%);
    box-shadow: 0 18px 44px rgba(24, 52, 86, 0.2);
}

.logs-hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 238px;
    color: #f8fafc;
}

.logs-eyebrow,
.logs-section-label {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #dbeafe;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.logs-hero-copy h2 {
    margin: 10px 0 8px;
    color: #ffffff;
    font-size: 2.25rem;
    font-weight: 800;
}

.logs-hero-copy p {
    max-width: 650px;
    color: rgba(248, 250, 252, 0.82);
    font-size: 0.96rem;
    line-height: 1.55;
}

.logs-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.logs-hero-board {
    display: grid;
    gap: 14px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
}

.logs-board-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: rgba(248, 250, 252, 0.78);
    font-size: 0.82rem;
}

.logs-board-top strong {
    color: #ffffff;
}

.logs-status-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.logs-status-stack .badge {
    width: fit-content;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
}

.logs-board-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.logs-board-grid > div {
    min-width: 0;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.16);
}

.logs-board-grid span {
    display: block;
    color: rgba(248, 250, 252, 0.72);
    font-size: 0.72rem;
    font-weight: 700;
}

.logs-board-grid strong {
    display: block;
    margin-top: 4px;
    color: #ffffff;
    font-size: 1.02rem;
    font-weight: 800;
}

.logs-board-note {
    padding: 10px 12px;
    border: 1px solid rgba(125, 211, 252, 0.2);
    border-radius: 8px;
    background: rgba(8, 47, 73, 0.18);
    color: #e0f2fe;
    font-size: 0.82rem;
}

.logs-tabs {
    gap: 6px;
    padding: 8px;
    border: 1px solid var(--logs-border);
    border-radius: 8px;
    background: var(--logs-panel);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.logs-tabs.nav-tabs {
    border-bottom: 1px solid var(--logs-border);
}

.logs-tabs .nav-link {
    min-height: 38px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--logs-muted);
    font-size: 0.84rem;
    font-weight: 800;
    white-space: nowrap;
}

.logs-tabs .nav-link.active {
    border-color: rgba(14, 116, 144, 0.2);
    background: rgba(14, 116, 144, 0.1);
    color: #0e7490;
}

.logs-tab-panel {
    min-width: 0;
}

.logs-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
}

.logs-section-heading span {
    display: block;
    color: #0e7490;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.logs-section-heading strong {
    display: block;
    color: var(--logs-ink);
    font-size: 1.08rem;
}

.logs-section-heading small {
    color: var(--logs-muted);
}

.logs-monitor-grid .monitor-card,
.logs-data-panel,
.logs-whatsapp-panel .wn-panel,
.logs-whatsapp-panel .wn-kpi-card {
    border: 1px solid var(--logs-border) !important;
    border-radius: 8px !important;
    background: var(--logs-panel) !important;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07) !important;
}

.logs-monitor-grid .monitor-card {
    overflow: hidden;
}

.logs-monitor-grid .monitor-card::before {
    display: block;
    height: 4px;
    content: "";
    background: #94a3b8;
}

.logs-monitor-grid .monitor-card.status-ok::before,
.logs-monitor-grid .monitor-card.status-137::before {
    background: #10b981;
}

.logs-monitor-grid .monitor-card.status-138::before {
    background: #0ea5e9;
}

.logs-monitor-grid .monitor-card.status-656::before,
.logs-monitor-grid .monitor-card.status-erro::before,
.logs-monitor-grid .monitor-card.status-cert_erro::before {
    background: #ef4444;
}

.logs-filter-header {
    border-bottom: 1px solid var(--logs-border) !important;
    border-radius: 8px 8px 0 0 !important;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
}

.logs-data-panel table {
    min-width: 920px;
}

.logs-data-panel table thead th {
    border-bottom: 1px solid var(--logs-border);
    background: var(--logs-soft);
    color: #516071;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.logs-data-panel table tbody td {
    vertical-align: middle;
    border-color: #edf2f7;
    color: #27364f;
    font-size: 0.82rem;
}

.logs-data-panel table tbody tr:hover {
    background: #f8fbff;
}

.logs-health-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--logs-border);
    border-radius: 8px;
    background: var(--logs-panel);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.logs-health-header > div {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.logs-section-label {
    background: rgba(14, 116, 144, 0.1);
    color: #0e7490;
}

#logs-section .wn-panel-header {
    border-radius: 8px 8px 0 0;
}

[data-bs-theme="dark"] #logs-section.logs-workbench-shell {
    --logs-ink: #f1f5f9;
    --logs-muted: #94a3b8;
    --logs-border: #334155;
    --logs-panel: #1a1f2e;
    --logs-soft: #151b2a;
    color: #e8edf5;
}

[data-bs-theme="dark"] #logs-section .logs-hero-panel {
    background:
        linear-gradient(135deg, rgba(8, 18, 32, 0.98) 0%, rgba(15, 56, 66, 0.98) 55%, rgba(69, 51, 25, 0.96) 100%);
    border-color: rgba(148, 163, 184, 0.22);
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.42);
}

[data-bs-theme="dark"] #logs-section .logs-hero-board,
[data-bs-theme="dark"] #logs-section .logs-board-grid > div {
    background: rgba(8, 13, 24, 0.42);
    border-color: rgba(148, 163, 184, 0.2);
}

[data-bs-theme="dark"] #logs-section .logs-tabs,
[data-bs-theme="dark"] #logs-section .logs-monitor-grid .monitor-card,
[data-bs-theme="dark"] #logs-section .logs-data-panel,
[data-bs-theme="dark"] #logs-section .logs-health-header,
[data-bs-theme="dark"] #logs-section .logs-whatsapp-panel .wn-panel,
[data-bs-theme="dark"] #logs-section .logs-whatsapp-panel .wn-kpi-card {
    background: var(--logs-panel) !important;
    border-color: var(--logs-border) !important;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34) !important;
}

[data-bs-theme="dark"] #logs-section .logs-tabs .nav-link {
    color: #aebbd0;
}

[data-bs-theme="dark"] #logs-section .logs-tabs .nav-link.active {
    border-color: rgba(103, 232, 249, 0.22);
    background: rgba(34, 211, 238, 0.12);
    color: #67e8f9;
}

[data-bs-theme="dark"] #logs-section .logs-section-heading span,
[data-bs-theme="dark"] #logs-section .logs-section-label {
    color: #67e8f9;
}

[data-bs-theme="dark"] #logs-section .logs-section-label {
    background: rgba(34, 211, 238, 0.12);
}

[data-bs-theme="dark"] #logs-section .logs-filter-header {
    background: linear-gradient(180deg, #1e2538 0%, #1a1f2e 100%) !important;
    border-color: var(--logs-border) !important;
}

[data-bs-theme="dark"] #logs-section .logs-data-panel table thead th {
    background: var(--logs-soft);
    color: #aebbd0;
    border-color: var(--logs-border);
}

[data-bs-theme="dark"] #logs-section .logs-data-panel table tbody td {
    color: #d8e0ec;
    border-color: #2d3548;
}

[data-bs-theme="dark"] #logs-section .logs-data-panel table tbody tr:hover {
    background: rgba(96, 165, 250, 0.06);
}

[data-bs-theme="dark"] #logs-section .form-control,
[data-bs-theme="dark"] #logs-section .form-select {
    background-color: #121827;
    border-color: #334155;
    color: #e2e8f0;
}

@media (max-width: 991px) {
    .logs-hero-panel {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .logs-hero-panel {
        padding: 18px;
    }

    .logs-hero-copy {
        min-height: 0;
    }

    .logs-hero-copy h2 {
        font-size: 1.65rem;
    }

    .logs-hero-actions .btn,
    .logs-health-header .btn {
        width: 100%;
    }

    .logs-board-grid {
        grid-template-columns: 1fr;
    }

    .logs-board-top,
    .logs-section-heading,
    .logs-health-header {
        align-items: flex-start;
        flex-direction: column;
    }
}
