:root {
    --theme-white: #FFFFFF;
    --theme-charcoal: #36454F;
    --theme-charcoal-deep: #2F3C45;
    --theme-blue: #36454F;
    --theme-blue-dark: #2F3C45;
    --theme-blue-soft: rgba(54, 69, 79, 0.12);
    --theme-cream: #E6EBEF;
    --theme-cream-strong: #D9E0E5;
    --theme-gold: #C1A347;
    --theme-gold-dark: #A98E3E;
    --theme-gold-soft: rgba(193, 163, 71, 0.16);
    --theme-gold-strong: rgba(193, 163, 71, 0.28);
    --theme-charcoal-soft: #53626C;
    --theme-surface-gray: #E6EBEF;
    --theme-surface-gray-strong: #DCE3E8;
    --theme-border: rgba(54, 69, 79, 0.16);
    --theme-shadow: rgba(54, 69, 79, 0.12);
}

body {
    background: var(--theme-cream);
    color: var(--theme-charcoal);
}

.header {
    background: var(--theme-white) !important;
    border-bottom: 1px solid var(--theme-border) !important;
    color: var(--theme-charcoal) !important;
}

.header h1,
.header h2,
.header p,
.header span,
#refresh-countdown {
    color: var(--theme-charcoal) !important;
}

a,
.voltar-login,
#linkEsqueciSenha {
    color: var(--theme-charcoal) !important;
}

a:hover,
.voltar-login:hover,
#linkEsqueciSenha:hover {
    color: var(--theme-gold-dark) !important;
}

.sidebar {
    background: var(--theme-white) !important;
    border-right: 1px solid var(--theme-border) !important;
    color: var(--theme-charcoal) !important;
}

.dashboard-button {
    background: var(--theme-blue) !important;
    color: var(--theme-white) !important;
    border-color: transparent !important;
}

.dashboard-button i,
.sidebar i,
.page-header-text i,
.table-section-header i,
.form-header i,
.tabela-header i,
.column-title i,
.card-title i,
.login-title i,
.login-group label i,
.form-group label i,
.table-info i,
.pagination i,
.paginacao i,
.detail-item i,
.info-table i,
#documento-info i,
.stat-card i,
.card-estatistica i,
[style*="color: #144780"],
[style*="color:#144780"],
[style*="color: #007bff"],
[style*="color:#007bff"],
[style*="color: #28a745"],
[style*="color:#28a745"],
[style*="color: #27ae60"],
[style*="color:#27ae60"],
[style*="color: #fd7e14"],
[style*="color:#fd7e14"],
[style*="color: #ffc107"],
[style*="color:#ffc107"] {
    color: var(--theme-gold) !important;
}

[style*="color: #e74c3c"],
[style*="color:#e74c3c"],
[style*="color: #dc3545"],
[style*="color:#dc3545"],
[style*="color: #6c757d"],
[style*="color:#6c757d"],
[style*="color: #666"],
[style*="color:#666"],
[style*="color: #999"],
[style*="color:#999"],
[style*="color: #333"],
[style*="color:#333"] {
    color: var(--theme-charcoal-soft) !important;
}

[style*="background: #f8f9fa"],
[style*="background:#f8f9fa"],
[style*="background: #f9f9f9"],
[style*="background:#f9f9f9"],
[style*="background: #f8fff9"],
[style*="background:#f8fff9"],
[style*="background: #d4edda"],
[style*="background:#d4edda"],
[style*="background: #e9ecef"],
[style*="background:#e9ecef"] {
    background: var(--theme-surface-gray) !important;
}

[style*="border-left: 4px solid #C8A53B"],
[style*="border-left:4px solid #C8A53B"],
[style*="border-left: 4px solid #28a745"],
[style*="border-left:4px solid #28a745"],
[style*="border-left: 4px solid #dc3545"],
[style*="border-left:4px solid #dc3545"],
[style*="border-left: 4px solid #ffc107"],
[style*="border-left:4px solid #ffc107"],
[style*="border-bottom: 2px solid #C8A53B"],
[style*="border-bottom:2px solid #C8A53B"],
[style*="border-bottom: 2px solid #28a745"],
[style*="border-bottom:2px solid #28a745"],
[style*="border-bottom: 2px solid #dc3545"],
[style*="border-bottom:2px solid #dc3545"],
[style*="border-bottom: 2px solid #ffc107"],
[style*="border-bottom:2px solid #ffc107"],
[style*="border: 1px solid #28a745"],
[style*="border:1px solid #28a745"],
[style*="border: 1px solid #dee2e6"],
[style*="border:1px solid #dee2e6"] {
    border-color: var(--theme-gold) !important;
}

.dashboard-button:hover,
.dashboard-button.active {
    background: var(--theme-surface-gray-strong) !important;
    border-color: var(--theme-blue-soft) !important;
    color: var(--theme-blue) !important;
}

.dashboard-button span,
.dashboard-button strong {
    color: var(--theme-white) !important;
}

.dashboard-button:hover span,
.dashboard-button:hover strong,
.dashboard-button.active span,
.dashboard-button.active strong,
.dashboard-button.active i,
.dashboard-button:hover i {
    color: var(--theme-blue) !important;
}

.main-content,
.content-wrapper,
#dynamic-content {
    background: transparent !important;
    box-shadow: none !important;
}

.table-container,
.form-container,
.filtros-avancados,
.filtros-container,
.tabela-container,
.kanban-column,
.stat-card,
.card-estatistica,
.modal-content,
.modal-ficha-content,
.card,
.login-container {
    background-color: var(--theme-white);
    border-color: var(--theme-border) !important;
    box-shadow: 0 8px 24px var(--theme-shadow) !important;
}

.page-header-text h2,
.page-header-text p,
.table-section-header h3,
.form-header h3,
.column-title,
.card-title,
.card-subtitle,
.tabela-header h3,
.login-title,
.login-group label,
.form-group label,
.card-title i,
.table-info,
.pagination span,
.paginacao .pagina-atual {
    color: var(--theme-charcoal) !important;
}

.table-section-header,
.form-header,
.tabela-header,
.column-header {
    border-color: var(--theme-border) !important;
}

.btn-primary,
.btn-auto-refresh,
.btn-filtrar,
.btn-filtro.btn-filtrar,
.btn-secondary,
.btn-limpar,
.paginacao button,
.pagination .btn-secondary,
.btn-logout,
.btn-danger,
.btn-delete,
.btn-success,
.btn-info,
.btn-view,
.btn-download,
.btn-warning,
.btn-edit,
.mobile-global-menu-toggle,
.mobile-sidebar-close,
.mobile-filters-toggle,
.mobile-kanban-nav button,
.login-form button,
.modal-actions .btn,
.modal-footer .btn,
.modal-footer button,
button[style*="background: #144780"],
button[style*="background:#144780"],
button[style*="background: #007bff"],
button[style*="background:#007bff"],
button[style*="background: #6c757d"],
button[style*="background:#6c757d"],
button[style*="background: #17a2b8"],
button[style*="background:#17a2b8"],
button[style*="background: #6f42c1"],
button[style*="background:#6f42c1"],
button[style*="background: linear-gradient"],
button[style*="background:linear-gradient"],
button[style*="background: #28a745"],
button[style*="background:#28a745"],
button[style*="background: #dc3545"],
button[style*="background:#dc3545"],
button[style*="background: #ffc107"],
button[style*="background:#ffc107"],
button[style*="background: #fd7e14"],
button[style*="background:#fd7e14"],
a[style*="background: #007bff"],
a[style*="background:#007bff"],
a[style*="background: #28a745"],
a[style*="background:#28a745"],
a[style*="background: #dc3545"],
a[style*="background:#dc3545"],
#btnEnviarReset,
.mobile-reset-modal-content .btn-primary,
.notification-success,
.notification-info,
.notification-warning {
    background: var(--theme-blue) !important;
    border-color: var(--theme-blue) !important;
    color: var(--theme-white) !important;
}

.btn-primary:hover,
.btn-auto-refresh:hover,
.btn-filtrar:hover,
.btn-filtro.btn-filtrar:hover,
.btn-secondary:hover,
.btn-limpar:hover,
.paginacao button:hover,
.pagination .btn-secondary:hover,
.btn-logout:hover,
.btn-danger:hover,
.btn-delete:hover,
.btn-success:hover,
.btn-info:hover,
.btn-view:hover,
.btn-download:hover,
.btn-warning:hover,
.btn-edit:hover,
.mobile-global-menu-toggle:hover,
.mobile-sidebar-close:hover,
.mobile-filters-toggle:hover,
.mobile-kanban-nav button:hover,
.login-form button:hover,
.modal-actions .btn:hover,
.modal-footer .btn:hover,
.modal-footer button:hover,
button[style*="background: #144780"]:hover,
button[style*="background:#144780"]:hover,
button[style*="background: #007bff"]:hover,
button[style*="background:#007bff"]:hover,
button[style*="background: #6c757d"]:hover,
button[style*="background:#6c757d"]:hover,
button[style*="background: #17a2b8"]:hover,
button[style*="background:#17a2b8"]:hover,
button[style*="background: #6f42c1"]:hover,
button[style*="background:#6f42c1"]:hover,
button[style*="background: linear-gradient"]:hover,
button[style*="background:linear-gradient"]:hover,
button[style*="background: #28a745"]:hover,
button[style*="background:#28a745"]:hover,
button[style*="background: #dc3545"]:hover,
button[style*="background:#dc3545"]:hover,
button[style*="background: #ffc107"]:hover,
button[style*="background:#ffc107"]:hover,
button[style*="background: #fd7e14"]:hover,
button[style*="background:#fd7e14"]:hover,
a[style*="background: #007bff"]:hover,
a[style*="background:#007bff"]:hover,
a[style*="background: #28a745"]:hover,
a[style*="background:#28a745"]:hover,
a[style*="background: #dc3545"]:hover,
a[style*="background:#dc3545"]:hover,
#btnEnviarReset:hover,
.mobile-reset-modal-content .btn-primary:hover,
.notification-success:hover,
.notification-info:hover,
.notification-warning:hover {
    background: var(--theme-blue-dark) !important;
    border-color: var(--theme-blue-dark) !important;
    color: var(--theme-white) !important;
}

.notification-error {
    background: var(--theme-gold-dark) !important;
    border-color: var(--theme-gold-dark) !important;
    color: var(--theme-white) !important;
}

.notification-error:hover {
    background: var(--theme-gold) !important;
    border-color: var(--theme-gold) !important;
}

.btn-action {
    border: 1px solid transparent !important;
    box-shadow: 0 4px 10px rgba(54, 69, 79, 0.08) !important;
}

.btn i,
.btn-action i,
a.btn i,
button i,
label.btn-action i,
.btn-primary i,
.btn-secondary i,
.btn-success i,
.btn-info i,
.btn-warning i,
.btn-danger i,
.btn-edit i,
.btn-view i,
.btn-download i,
.btn-logout i,
.modal-footer button i,
.modal-actions button i {
    color: inherit !important;
}

.btn-action:hover,
.btn:hover {
    box-shadow: 0 8px 18px rgba(54, 69, 79, 0.14) !important;
}

.mobile-global-menu-toggle i,
.mobile-sidebar-close i {
    color: var(--theme-white) !important;
}

.mobile-global-menu-toggle .fas,
.mobile-sidebar-close .fas,
.btn .fas,
.btn-action .fas,
.btn .fa,
.btn-action .fa,
button .fas,
button .fa,
label.btn-action .fas,
label.btn-action .fa {
    color: inherit !important;
}

.mobile-filters-toggle i {
    color: var(--theme-white) !important;
}

.mobile-filters-toggle .fas,
.mobile-filters-toggle .fa {
    color: var(--theme-white) !important;
}

.form-control,
input,
select,
textarea,
#kanban-search,
#resetEmail,
.login-form input,
.form-group input {
    background: var(--theme-white) !important;
    border-color: rgba(54, 69, 79, 0.22) !important;
    color: var(--theme-charcoal) !important;
}

.form-control:focus,
input:focus,
select:focus,
textarea:focus,
#kanban-search:focus,
#resetEmail:focus,
.login-form input:focus,
.form-group input:focus {
    border-color: var(--theme-gold) !important;
    box-shadow: 0 0 0 3px rgba(200, 165, 59, 0.22) !important;
}

.data-table thead th,
.tabela-processos thead th {
    background: var(--theme-charcoal) !important;
    color: var(--theme-white) !important;
}

.data-table tbody tr:nth-child(even),
.tabela-processos tbody tr:nth-child(even) {
    background: rgba(54, 69, 79, 0.04) !important;
}

.data-table tbody td,
.tabela-processos tbody td {
    color: var(--theme-charcoal) !important;
    border-color: rgba(54, 69, 79, 0.08) !important;
}

.table-footer,
.pagination,
.paginacao,
.kanban-scrollbar {
    background: var(--theme-surface-gray-strong) !important;
    border-color: rgba(54, 69, 79, 0.12) !important;
}

.pagination button:disabled,
.paginacao button:disabled,
.btn:disabled,
.btn-action:disabled {
    background: rgba(54, 69, 79, 0.18) !important;
    border-color: rgba(54, 69, 79, 0.12) !important;
    color: rgba(54, 69, 79, 0.6) !important;
    box-shadow: none !important;
}

.kanban-card,
.kanban-card.demanda-card,
.kanban-card.solicitacao-card {
    background: var(--theme-white) !important;
    color: var(--theme-charcoal) !important;
    box-shadow: 0 6px 16px var(--theme-shadow) !important;
}

.kanban-card,
.card-number,
.column-count,
.card-status,
.status-em-andamento,
.status-concluida,
.status-pendente,
.status-suspensa {
    border-color: var(--theme-gold) !important;
}

.card-number,
.column-count {
    background: rgba(200, 165, 59, 0.18) !important;
    color: var(--theme-charcoal) !important;
}

.empty-column,
.card-details,
.card-date,
.card-value,
.login-footer,
.card-subtitle,
.table-info span {
    color: var(--theme-charcoal-soft) !important;
}

.login-footer i {
    color: var(--theme-charcoal-soft) !important;
}

.status-badge,
.badge {
    border: 1px solid var(--theme-border) !important;
    font-weight: 600 !important;
    letter-spacing: 0.04em;
}

.status-concluido,
.status-concluida,
.status-ativo,
.status-aprovada,
.badge-success,
.badge-primary {
    background: var(--theme-gold-soft) !important;
    border-color: var(--theme-gold) !important;
    color: var(--theme-charcoal) !important;
}

.status-pendente,
.status-em-revisao,
.badge-warning {
    background: rgba(245, 233, 209, 0.92) !important;
    border-color: var(--theme-gold-dark) !important;
    color: var(--theme-charcoal) !important;
}

.status-em-andamento,
.status-em-analise,
.badge-info {
    background: rgba(54, 69, 79, 0.08) !important;
    border-color: rgba(54, 69, 79, 0.24) !important;
    color: var(--theme-charcoal) !important;
}

.status-suspensa,
.status-inativo,
.status-expirada,
.status-rejeitada,
.status-cancelada,
.badge-danger,
.badge-secondary {
    background: var(--theme-charcoal) !important;
    border-color: var(--theme-charcoal) !important;
    color: var(--theme-white) !important;
}

.notification {
    background: var(--theme-white) !important;
    color: var(--theme-charcoal) !important;
    border: 1px solid var(--theme-border) !important;
    box-shadow: 0 10px 24px rgba(54, 69, 79, 0.16) !important;
}

.notification-success,
.notification-info,
.notification-error,
.notification-warning {
    border-left-width: 4px !important;
    border-left-style: solid !important;
}

.notification-success,
.notification-info {
    border-left-color: var(--theme-gold) !important;
}

.notification-error {
    border-left-color: var(--theme-charcoal-deep) !important;
}

.notification-warning {
    border-left-color: var(--theme-gold-dark) !important;
}

.notification-close,
.btn-close,
#toggleSenha,
.toggle-senha {
    color: var(--theme-charcoal-soft) !important;
}

.notification-close:hover,
.btn-close:hover,
#toggleSenha:hover,
.toggle-senha:hover {
    color: var(--theme-charcoal) !important;
}

.modal-header,
.modal-footer,
.modal-actions,
.info-table td,
#documento-info,
.detail-item,
.details-grid .detail-card {
    border-color: var(--theme-border) !important;
}

.modal-footer .btn-secondary,
.modal-footer button.btn-secondary,
.modal-actions .btn-secondary,
.modal-actions button.btn-secondary {
    background: var(--theme-white) !important;
    border: 1px solid var(--theme-blue) !important;
    color: var(--theme-blue) !important;
}

.modal-footer .btn-secondary:hover,
.modal-footer button.btn-secondary:hover,
.modal-actions .btn-secondary:hover,
.modal-actions button.btn-secondary:hover {
    background: rgba(20, 71, 128, 0.08) !important;
    border-color: var(--theme-blue-dark) !important;
    color: var(--theme-blue-dark) !important;
}

.modal-footer .btn-danger,
.modal-footer button.btn-danger,
.modal-actions .btn-danger,
.modal-actions button.btn-danger {
    background: var(--theme-charcoal) !important;
    border-color: var(--theme-charcoal) !important;
    color: var(--theme-white) !important;
}

.modal-footer .btn-danger:hover,
.modal-footer button.btn-danger:hover,
.modal-actions .btn-danger:hover,
.modal-actions button.btn-danger:hover {
    background: var(--theme-charcoal-deep) !important;
    border-color: var(--theme-charcoal-deep) !important;
}

#documento-info,
.info-table,
.detail-item,
.details-grid .detail-card {
    background: rgba(54, 69, 79, 0.04) !important;
    color: var(--theme-charcoal) !important;
}

.pagina-atual,
#pagina-atual,
#paginaAtual {
    color: var(--theme-charcoal) !important;
    font-weight: 700 !important;
}

.badge,
.status-badge,
.column-count,
.card-status {
    box-shadow: none !important;
}

.btn-primary i,
.voltar-login,
#linkEsqueciSenha,
#toggleSenha,
.toggle-senha {
    color: var(--theme-white) !important;
}

.voltar-login,
#linkEsqueciSenha,
#toggleSenha,
.toggle-senha {
    color: var(--theme-charcoal) !important;
}

.dashboard-button.active,
.dashboard-button.active span,
.dashboard-button.active strong,
.dashboard-button.active i,
.dashboard-button:hover,
.dashboard-button:hover span,
.dashboard-button:hover strong,
.dashboard-button:hover i {
    color: var(--theme-blue) !important;
}

#modalResetSenha,
.mobile-sidebar-backdrop {
    background: rgba(54, 69, 79, 0.5) !important;
}

@media (min-width: 769px) {
    .mobile-filters-toggle-wrap,
    .mobile-filters-toggle {
        display: none !important;
    }
}

@media (max-width: 768px) {
    table.mobile-card-table tbody tr {
        background: var(--theme-white) !important;
        border-color: rgba(54, 69, 79, 0.12) !important;
    }

    table.mobile-card-table tbody td::before,
    .mobile-kanban-status {
        color: var(--theme-charcoal) !important;
    }
}