:root {
    --oi-red: #e30613;
    --oi-red-dark: #8f0710;
    --oi-blue: #0868e8;
    --oi-blue-dark: #082040;
    --oi-ink: #101827;
    --oi-bg: #f5f7fb;
    --oi-soft: #eef4ff;
    --theme-bg: #f5f7fb;
    --theme-surface: #ffffff;
    --theme-surface-2: #f8fafc;
    --theme-text: #101827;
    --theme-muted: #64748b;
    --theme-border: #dbe3ef;
    --primary-sst: var(--oi-blue);
    --primary-hover: #004fbd;
    --sidebar-dark: #07162c;
    --bg-light: var(--oi-bg);
}

body {
    background-color: var(--theme-bg);
    color: var(--theme-text);
}

.brand-logo {
    width: 46px;
    height: 46px;
    object-fit: contain;
    border-radius: 50%;
    background: #fff;
    padding: 3px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.brand-logo-sm {
    width: 34px;
    height: 34px;
    object-fit: contain;
    border-radius: 50%;
    background: #fff;
    padding: 2px;
}

.sidebar,
.navbar.bg-dark {
    background:
        radial-gradient(circle at 0 0, rgba(227, 6, 19, 0.42), transparent 34%),
        linear-gradient(145deg, var(--oi-blue-dark) 0%, #060b18 54%, var(--oi-red-dark) 100%) !important;
}

.sidebar .text-primary,
.navbar .text-primary,
.text-primary {
    color: var(--oi-blue) !important;
}

.btn-primary,
.btn.btn-primary {
    background: linear-gradient(135deg, var(--oi-red) 0%, var(--oi-blue) 100%) !important;
    border-color: transparent !important;
    box-shadow: 0 10px 22px rgba(8, 104, 232, 0.18);
}

.btn-primary:hover,
.btn.btn-primary:hover {
    filter: brightness(0.95);
    box-shadow: 0 12px 26px rgba(227, 6, 19, 0.24);
}

.btn-outline-primary {
    border-color: var(--oi-blue) !important;
    color: var(--oi-blue) !important;
}

.btn-outline-primary:hover,
.btn-outline-primary.active {
    background: var(--oi-blue) !important;
    color: #fff !important;
}

.bg-primary,
.perfil-filter.btn-primary {
    background: var(--oi-blue) !important;
}

.bg-primary-subtle {
    background-color: #e8f1ff !important;
}

.border-primary,
.border-primary-subtle {
    border-color: rgba(8, 104, 232, 0.32) !important;
}

.card-sst,
.card {
    border-radius: 12px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--oi-blue) !important;
    box-shadow: 0 0 0 0.2rem rgba(8, 104, 232, 0.16) !important;
}

.brand-gradient-bg {
    background:
        radial-gradient(circle at 18% 25%, rgba(227, 6, 19, 0.78), transparent 28%),
        radial-gradient(circle at 78% 16%, rgba(8, 104, 232, 0.82), transparent 32%),
        linear-gradient(135deg, #070b15 0%, #081d3c 45%, #e30613 100%);
}

.theme-toggle {
    min-width: 42px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    transition: 0.2s ease;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.theme-toggle-floating {
    position: fixed;
    left: 12px;
    bottom: 16px;
    z-index: 2200;
    width: 44px;
    min-width: 44px;
    height: 44px;
    border-color: rgba(8, 32, 64, 0.16);
    background: #ffffff;
    color: var(--oi-blue-dark);
    box-shadow: 0 14px 34px rgba(8, 32, 64, 0.18);
}

.theme-toggle-floating:hover {
    background: var(--oi-soft);
    color: var(--oi-blue);
}

body.theme-dark,
html.theme-dark body {
    --theme-bg: #0b141a;
    --theme-surface: #111b21;
    --theme-surface-2: #202c33;
    --theme-text: #e9edef;
    --theme-muted: #aebac1;
    --theme-border: #2a3942;
    --bg-light: #0b141a;
    --text-main: #e9edef;
    --text-muted: #aebac1;
    background-color: var(--theme-bg) !important;
    color: var(--theme-text) !important;
}

body.theme-dark .main-content,
body.theme-dark main,
body.theme-dark .container-fluid,
body.theme-dark .container {
    color: var(--theme-text);
}

body.theme-dark .card,
body.theme-dark .card-sst,
body.theme-dark .modal-content,
body.theme-dark .dropdown-menu,
body.theme-dark .list-group-item,
body.theme-dark .welcome-card,
body.theme-dark .login-card {
    background-color: var(--theme-surface) !important;
    color: var(--theme-text) !important;
    border-color: var(--theme-border) !important;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28) !important;
}

body.theme-dark .bg-white,
body.theme-dark .bg-light,
body.theme-dark .table-light,
body.theme-dark .input-group-text {
    background-color: var(--theme-surface-2) !important;
    color: var(--theme-text) !important;
}

body.theme-dark .text-dark,
body.theme-dark h1,
body.theme-dark h2,
body.theme-dark h3,
body.theme-dark h4,
body.theme-dark h5,
body.theme-dark h6,
body.theme-dark .fw-bold,
body.theme-dark .fw-semibold {
    color: var(--theme-text) !important;
}

body.theme-dark .text-muted,
body.theme-dark .form-text,
body.theme-dark small {
    color: var(--theme-muted) !important;
}

body.theme-dark .form-control,
body.theme-dark .form-select,
body.theme-dark textarea,
body.theme-dark input {
    background-color: #0c1526 !important;
    color: var(--theme-text) !important;
    border-color: var(--theme-border) !important;
}

body.theme-dark .form-control::placeholder,
body.theme-dark input::placeholder,
body.theme-dark textarea::placeholder {
    color: #8390a6 !important;
}

body.theme-dark .table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--theme-text);
    --bs-table-border-color: var(--theme-border);
    color: var(--theme-text) !important;
}

body.theme-dark .table thead,
body.theme-dark .table thead th,
body.theme-dark .sticky-top.bg-white {
    background-color: var(--theme-surface-2) !important;
    color: var(--theme-text) !important;
}

body.theme-dark .table tbody tr:hover,
body.theme-dark .table-hover tbody tr:hover {
    background-color: rgba(8, 104, 232, 0.16) !important;
}

body.theme-dark .border,
body.theme-dark .border-top,
body.theme-dark .border-bottom,
body.theme-dark .border-start,
body.theme-dark .border-end {
    border-color: var(--theme-border) !important;
}

body.theme-dark .badge.bg-light,
body.theme-dark .badge.border,
body.theme-dark .badge-doc {
    background-color: #17243b !important;
    color: #eef4ff !important;
    border-color: var(--theme-border) !important;
}

body.theme-dark .alert {
    background-color: #162238;
    color: var(--theme-text);
    border-color: var(--theme-border);
}

body.theme-dark footer {
    background-color: #0c1526 !important;
    color: var(--theme-muted) !important;
    border-color: var(--theme-border) !important;
}

body.theme-dark .btn-light,
body.theme-dark .btn-outline-secondary {
    background-color: #17243b !important;
    color: var(--theme-text) !important;
    border-color: var(--theme-border) !important;
}

body.theme-dark a:not(.btn):not(.nav-link):not(.dropdown-item) {
    color: #7cb7ff;
}

html.theme-dark {
    color-scheme: dark;
    --theme-bg: #0b141a;
    --theme-surface: #111b21;
    --theme-surface-2: #202c33;
    --theme-surface-3: #1f2c34;
    --theme-text: #e9edef;
    --theme-muted: #aebac1;
    --theme-soft-muted: #8696a0;
    --theme-border: #2a3942;
    --theme-accent: #00a884;
    --bg-light: #0b141a;
    --text-main: #e9edef;
    --text-muted: #aebac1;
}

html.theme-dark body {
    background: var(--theme-bg) !important;
    color: var(--theme-text) !important;
}

html.theme-dark .main-content,
html.theme-dark main,
html.theme-dark .container,
html.theme-dark .container-fluid {
    background: transparent !important;
    color: var(--theme-text) !important;
}

html.theme-dark .card,
html.theme-dark .card-sst,
html.theme-dark .docs-card,
html.theme-dark .ip-card,
html.theme-dark .rel-card,
html.theme-dark .modal-content,
html.theme-dark .dropdown-menu,
html.theme-dark .list-group-item,
html.theme-dark .welcome-card,
html.theme-dark .login-card,
html.theme-dark .offcanvas,
html.theme-dark .toast {
    background-color: var(--theme-surface) !important;
    color: var(--theme-text) !important;
    border-color: var(--theme-border) !important;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28) !important;
}

html.theme-dark .card-header,
html.theme-dark .card-footer,
html.theme-dark .modal-header,
html.theme-dark .modal-footer,
html.theme-dark .rel-card-head,
html.theme-dark .rel-card-body,
html.theme-dark .dropdown-divider {
    background-color: var(--theme-surface) !important;
    border-color: var(--theme-border) !important;
}

html.theme-dark .bg-white,
html.theme-dark .bg-light,
html.theme-dark .table-light,
html.theme-dark .input-group-text,
html.theme-dark .sticky-top.bg-white,
html.theme-dark .nav-pills.bg-white,
html.theme-dark .p-3.bg-light,
html.theme-dark .p-4.bg-light,
html.theme-dark div.bg-light,
html.theme-dark section.bg-light {
    background-color: var(--theme-surface-2) !important;
    color: var(--theme-text) !important;
}

html.theme-dark h1,
html.theme-dark h2,
html.theme-dark h3,
html.theme-dark h4,
html.theme-dark h5,
html.theme-dark h6,
html.theme-dark .h1,
html.theme-dark .h2,
html.theme-dark .h3,
html.theme-dark .h4,
html.theme-dark .h5,
html.theme-dark .h6,
html.theme-dark .text-dark,
html.theme-dark .fw-bold,
html.theme-dark .fw-semibold,
html.theme-dark strong,
html.theme-dark label,
html.theme-dark th,
html.theme-dark td {
    color: var(--theme-text) !important;
}

html.theme-dark .text-muted,
html.theme-dark .form-text,
html.theme-dark small,
html.theme-dark .small,
html.theme-dark .text-secondary,
html.theme-dark .card .text-muted,
html.theme-dark .card .small {
    color: var(--theme-muted) !important;
}

html.theme-dark .text-white,
html.theme-dark .text-white-50 {
    color: #ffffff !important;
}

html.theme-dark .text-primary,
html.theme-dark a:not(.btn):not(.nav-link):not(.dropdown-item) {
    color: #69b6ff !important;
}

html.theme-dark .text-success {
    color: #3bd98f !important;
}

html.theme-dark .text-danger {
    color: #ff6b7a !important;
}

html.theme-dark .text-warning {
    color: #ffd166 !important;
}

html.theme-dark .text-info {
    color: #56d5ff !important;
}

html.theme-dark .form-control,
html.theme-dark .form-select,
html.theme-dark textarea,
html.theme-dark input,
html.theme-dark select {
    background-color: #0b141a !important;
    color: var(--theme-text) !important;
    border-color: var(--theme-border) !important;
}

html.theme-dark .form-control:disabled,
html.theme-dark .form-control[readonly],
html.theme-dark input:disabled,
html.theme-dark select:disabled {
    background-color: #18252d !important;
    color: var(--theme-muted) !important;
    opacity: 1;
}

html.theme-dark .form-control::placeholder,
html.theme-dark input::placeholder,
html.theme-dark textarea::placeholder {
    color: var(--theme-soft-muted) !important;
}

html.theme-dark .table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--theme-text);
    --bs-table-border-color: var(--theme-border);
    --bs-table-hover-bg: rgba(0, 168, 132, 0.08);
    --bs-table-hover-color: var(--theme-text);
    color: var(--theme-text) !important;
    border-color: var(--theme-border) !important;
}

html.theme-dark .table > :not(caption) > * > * {
    background-color: transparent !important;
    color: var(--theme-text) !important;
    border-color: var(--theme-border) !important;
}

html.theme-dark .table thead,
html.theme-dark .table thead th,
html.theme-dark .table-light th,
html.theme-dark .table-light td {
    background-color: var(--theme-surface-2) !important;
    color: var(--theme-text) !important;
}

html.theme-dark .table tbody tr:hover,
html.theme-dark .table-hover tbody tr:hover {
    background-color: rgba(0, 168, 132, 0.08) !important;
}

html.theme-dark .border,
html.theme-dark .border-top,
html.theme-dark .border-bottom,
html.theme-dark .border-start,
html.theme-dark .border-end,
html.theme-dark hr {
    border-color: var(--theme-border) !important;
}

html.theme-dark .alert {
    background-color: #162229 !important;
    color: var(--theme-text) !important;
    border-color: var(--theme-border) !important;
}

html.theme-dark .alert-info,
html.theme-dark .alert-primary {
    background-color: #102a3a !important;
    color: #d9f2ff !important;
}

html.theme-dark .bg-primary-subtle,
html.theme-dark .badge.bg-primary-subtle,
html.theme-dark .icon-shape.bg-primary-subtle,
html.theme-dark .kpi-icon.bg-primary-subtle {
    background-color: #102a3a !important;
    color: #69b6ff !important;
}

html.theme-dark .bg-success-subtle,
html.theme-dark .badge.bg-success-subtle,
html.theme-dark .icon-shape.bg-success-subtle,
html.theme-dark .kpi-icon.bg-success-subtle {
    background-color: #11352e !important;
    color: #3bd98f !important;
}

html.theme-dark .bg-danger-subtle,
html.theme-dark .badge.bg-danger-subtle,
html.theme-dark .icon-shape.bg-danger-subtle,
html.theme-dark .kpi-icon.bg-danger-subtle {
    background-color: #421d25 !important;
    color: #ff6b7a !important;
}

html.theme-dark .bg-warning-subtle,
html.theme-dark .badge.bg-warning-subtle,
html.theme-dark .icon-shape.bg-warning-subtle,
html.theme-dark .kpi-icon.bg-warning-subtle {
    background-color: #3c3118 !important;
    color: #ffd166 !important;
}

html.theme-dark .bg-info-subtle,
html.theme-dark .badge.bg-info-subtle,
html.theme-dark .icon-shape.bg-info-subtle,
html.theme-dark .kpi-icon.bg-info-subtle {
    background-color: #0d3340 !important;
    color: #56d5ff !important;
}

html.theme-dark .bg-secondary-subtle,
html.theme-dark .badge.bg-secondary-subtle,
html.theme-dark .badge.bg-light,
html.theme-dark .badge.border,
html.theme-dark .badge-doc {
    background-color: var(--theme-surface-3) !important;
    color: var(--theme-text) !important;
    border-color: var(--theme-border) !important;
}

html.theme-dark .btn-light,
html.theme-dark .btn-outline-secondary {
    background-color: var(--theme-surface-2) !important;
    color: var(--theme-text) !important;
    border-color: var(--theme-border) !important;
}

html.theme-dark .btn-outline-primary {
    color: #69b6ff !important;
    border-color: #2d86ff !important;
}

html.theme-dark .btn-outline-danger {
    color: #ff6b7a !important;
    border-color: #ff6b7a !important;
}

html.theme-dark .dropdown-item {
    color: var(--theme-text) !important;
}

html.theme-dark .dropdown-item:hover,
html.theme-dark .dropdown-item:focus {
    background-color: var(--theme-surface-2) !important;
    color: #ffffff !important;
}

html.theme-dark footer {
    background-color: var(--theme-surface) !important;
    color: var(--theme-muted) !important;
    border-color: var(--theme-border) !important;
}

html.theme-dark .theme-toggle {
    background: rgba(32, 44, 51, 0.92);
    color: #e9edef;
    border-color: rgba(174, 186, 193, 0.28);
}

html.theme-dark .theme-toggle:hover {
    background: #2a3942;
    color: #ffffff;
}

html.theme-dark .theme-toggle-floating {
    background: #202c33;
    color: #e9edef;
    border-color: #2a3942;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.36);
}

html.theme-dark .progress {
    background-color: var(--theme-surface-2) !important;
}

html.theme-dark .datepicker,
html.theme-dark .datepicker table,
html.theme-dark .datepicker-dropdown {
    background-color: var(--theme-surface) !important;
    color: var(--theme-text) !important;
    border-color: var(--theme-border) !important;
}

/* Refinamento do modo escuro para telas com componentes proprios. */
html.theme-dark .painel-kpi,
html.theme-dark .painel-card,
html.theme-dark .turmas-kpi,
html.theme-dark .turma-card,
html.theme-dark .turmas-empty,
html.theme-dark .turma-time,
html.theme-dark .turma-facts div,
html.theme-dark .eventos-hero,
html.theme-dark .eventos-filter,
html.theme-dark .eventos-kpi,
html.theme-dark .evento-card,
html.theme-dark .evento-summary-card,
html.theme-dark .evento-metric,
html.theme-dark .evento-company-row,
html.theme-dark .evento-year-filter,
html.theme-dark .evento-flow-step,
html.theme-dark .evento-list-card,
html.theme-dark .evento-firm-card,
html.theme-dark .evento-resource-list,
html.theme-dark .docs-kpi,
html.theme-dark .ip-stat,
html.theme-dark .rel-preview,
html.theme-dark .rel-toolbar,
html.theme-dark .empty-state,
html.theme-dark .metric-card,
html.theme-dark .stat-card,
html.theme-dark .adv-kpi {
    background: var(--theme-surface) !important;
    color: var(--theme-text) !important;
    border-color: var(--theme-border) !important;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22) !important;
}

html.theme-dark .eventos-kpi,
html.theme-dark .evento-metric,
html.theme-dark .evento-flow-step,
html.theme-dark .turma-time,
html.theme-dark .turma-facts div,
html.theme-dark .docs-kpi,
html.theme-dark .ip-stat,
html.theme-dark .rel-card .card,
html.theme-dark .metric-card,
html.theme-dark .stat-card,
html.theme-dark .adv-kpi {
    background: var(--theme-surface-2) !important;
}

html.theme-dark .evento-summary-head,
html.theme-dark .evento-summary-body,
html.theme-dark .evento-list-link,
html.theme-dark .evento-resource-list .form-check {
    border-color: var(--theme-border) !important;
}

html.theme-dark .evento-list-link:hover,
html.theme-dark .evento-list-link.active {
    background: rgba(0, 168, 132, 0.10) !important;
    box-shadow: inset 4px 0 0 #00a884 !important;
}

html.theme-dark .evento-context-note {
    background: #102a3a !important;
    color: #d9f2ff !important;
    border-color: #246b8f !important;
}

html.theme-dark .kpi-value,
html.theme-dark .kpi-label,
html.theme-dark .painel-kpi strong,
html.theme-dark .painel-kpi small,
html.theme-dark .eventos-kpi strong,
html.theme-dark .eventos-kpi small,
html.theme-dark .evento-metric strong,
html.theme-dark .evento-metric small,
html.theme-dark .evento-mini-stat strong,
html.theme-dark .evento-mini-stat small,
html.theme-dark .evento-flow-step strong,
html.theme-dark .evento-flow-step small,
html.theme-dark .docs-kpi strong,
html.theme-dark .docs-kpi small,
html.theme-dark .ip-stat strong,
html.theme-dark .ip-stat small,
html.theme-dark .turma-time span,
html.theme-dark .turma-time small,
html.theme-dark .turma-facts strong,
html.theme-dark .turma-facts small {
    color: var(--theme-text) !important;
}

html.theme-dark .kpi-label,
html.theme-dark .painel-kpi small,
html.theme-dark .eventos-kpi small,
html.theme-dark .evento-metric small,
html.theme-dark .evento-mini-stat small,
html.theme-dark .evento-flow-step small,
html.theme-dark .docs-kpi small,
html.theme-dark .ip-stat small,
html.theme-dark .turma-time small,
html.theme-dark .turma-facts small {
    color: #c9d3da !important;
}

html.theme-dark .turmas-empty,
html.theme-dark .empty-state {
    background: #101b22 !important;
    border-color: #3b4d57 !important;
}

html.theme-dark .empty-icon {
    background: #102a3a !important;
    color: #69b6ff !important;
}

html.theme-dark .evento-doc-pill {
    background: #17232b !important;
    border-color: #344852 !important;
    color: var(--theme-text) !important;
}

html.theme-dark .evento-doc-pill.text-success,
html.theme-dark .evento-doc-pill .text-success {
    background: #11352e !important;
    color: #3bd98f !important;
}

html.theme-dark .evento-doc-pill.text-warning,
html.theme-dark .evento-doc-pill .text-warning {
    background: #3c3118 !important;
    color: #ffd166 !important;
}

html.theme-dark .evento-doc-pill.text-danger,
html.theme-dark .evento-doc-pill .text-danger {
    background: #421d25 !important;
    color: #ff6b7a !important;
}

/* Status continuam coloridos no modo escuro. */
html.theme-dark .badge.bg-success,
html.theme-dark .btn-success,
html.theme-dark .docs-status.aprovado,
html.theme-dark .docs-status.vigente,
html.theme-dark .ip-chip.ok,
html.theme-dark .status-done {
    background: #008a52 !important;
    color: #ffffff !important;
    border-color: #21c77a !important;
}

html.theme-dark .badge.bg-danger,
html.theme-dark .btn-danger,
html.theme-dark .docs-status.reprovado,
html.theme-dark .docs-status.vencido {
    background: #d92d3a !important;
    color: #ffffff !important;
    border-color: #ff6b7a !important;
}

html.theme-dark .badge.bg-warning,
html.theme-dark .btn-warning,
html.theme-dark .docs-status.pendente,
html.theme-dark .ip-chip.warn {
    background: #f0a202 !important;
    color: #15100a !important;
    border-color: #ffd166 !important;
}

html.theme-dark .badge.bg-primary,
html.theme-dark .docs-status.faltando,
html.theme-dark .status-open {
    background: #0b76d1 !important;
    color: #ffffff !important;
    border-color: #69b6ff !important;
}

html.theme-dark .badge.bg-info,
html.theme-dark .docs-status.isento {
    background: #0284c7 !important;
    color: #ffffff !important;
    border-color: #56d5ff !important;
}

html.theme-dark .badge.bg-secondary,
html.theme-dark .ip-chip.muted {
    background: #52616b !important;
    color: #ffffff !important;
    border-color: #7d8b94 !important;
}

html.theme-dark .bg-primary-subtle,
html.theme-dark .badge.bg-primary-subtle,
html.theme-dark .evento-firm-status.bg-primary-subtle {
    background: #0b3a63 !important;
    color: #8dccff !important;
    border-color: #2d86ff !important;
}

html.theme-dark .bg-success-subtle,
html.theme-dark .badge.bg-success-subtle,
html.theme-dark .evento-firm-status.bg-success-subtle {
    background: #0f3d30 !important;
    color: #6ee7ad !important;
    border-color: #21c77a !important;
}

html.theme-dark .bg-warning-subtle,
html.theme-dark .badge.bg-warning-subtle,
html.theme-dark .evento-firm-status.bg-warning-subtle {
    background: #513b0c !important;
    color: #ffd166 !important;
    border-color: #f0a202 !important;
}

html.theme-dark .bg-danger-subtle,
html.theme-dark .badge.bg-danger-subtle,
html.theme-dark .evento-firm-status.bg-danger-subtle {
    background: #571f2a !important;
    color: #ff8a96 !important;
    border-color: #d92d3a !important;
}

html.theme-dark .bg-info-subtle,
html.theme-dark .badge.bg-info-subtle,
html.theme-dark .evento-firm-status.bg-info-subtle {
    background: #07384c !important;
    color: #7ddfff !important;
    border-color: #0284c7 !important;
}

html.theme-dark .bg-secondary-subtle,
html.theme-dark .badge.bg-secondary-subtle,
html.theme-dark .bg-dark-subtle,
html.theme-dark .badge.bg-dark-subtle,
html.theme-dark .evento-firm-status.bg-secondary-subtle,
html.theme-dark .evento-firm-status.bg-dark-subtle {
    background: #2b3942 !important;
    color: #dbe5eb !important;
    border-color: #52616b !important;
}

html.theme-dark .btn-primary {
    background: linear-gradient(135deg, #e30613 0%, #0868e8 100%) !important;
    color: #ffffff !important;
    border-color: transparent !important;
}

html.theme-dark .btn-outline-primary:hover,
html.theme-dark .btn-outline-danger:hover,
html.theme-dark .btn-outline-secondary:hover {
    color: #ffffff !important;
}

html.theme-dark .table tbody tr {
    background: transparent !important;
}

html.theme-dark .table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.018) !important;
}

/* Campos digitaveis precisam manter contraste mesmo em foco/autofill. */
html.theme-dark input.form-control,
html.theme-dark textarea.form-control,
html.theme-dark select.form-select,
html.theme-dark .form-control,
html.theme-dark .form-select,
html.theme-dark .sst-search-input,
html.theme-dark [contenteditable="true"] {
    background-color: #0b141a !important;
    background-image: none !important;
    color: #e9edef !important;
    -webkit-text-fill-color: #e9edef !important;
    caret-color: #e9edef !important;
    border-color: #3b4d57 !important;
}

html.theme-dark input.form-control:focus,
html.theme-dark textarea.form-control:focus,
html.theme-dark select.form-select:focus,
html.theme-dark .form-control:focus,
html.theme-dark .form-select:focus,
html.theme-dark .sst-search-input:focus {
    background-color: #0b141a !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border-color: #69b6ff !important;
    box-shadow: 0 0 0 0.2rem rgba(105, 182, 255, 0.20) !important;
}

html.theme-dark input.form-control::placeholder,
html.theme-dark textarea.form-control::placeholder,
html.theme-dark .form-control::placeholder,
html.theme-dark .sst-search-input::placeholder {
    color: #aebac1 !important;
    -webkit-text-fill-color: #aebac1 !important;
    opacity: 1 !important;
}

html.theme-dark input:-webkit-autofill,
html.theme-dark input:-webkit-autofill:hover,
html.theme-dark input:-webkit-autofill:focus,
html.theme-dark textarea:-webkit-autofill,
html.theme-dark textarea:-webkit-autofill:hover,
html.theme-dark textarea:-webkit-autofill:focus,
html.theme-dark select:-webkit-autofill,
html.theme-dark select:-webkit-autofill:hover,
html.theme-dark select:-webkit-autofill:focus {
    -webkit-text-fill-color: #e9edef !important;
    caret-color: #e9edef !important;
    box-shadow: 0 0 0 1000px #0b141a inset !important;
    border-color: #69b6ff !important;
    transition: background-color 9999s ease-in-out 0s !important;
}

html.theme-dark option,
html.theme-dark optgroup {
    background-color: #0b141a !important;
    color: #e9edef !important;
}

html.theme-dark .custom-group,
html.theme-dark .custom-group:focus-within,
html.theme-dark .custom-group:focus-within .form-control,
html.theme-dark .custom-group:focus-within .form-select,
html.theme-dark .custom-group:focus-within .input-group-text,
html.theme-dark .input-group .form-control,
html.theme-dark .input-group .form-select,
html.theme-dark .input-group .input-group-text,
html.theme-dark input[type="text"],
html.theme-dark input[type="email"],
html.theme-dark input[type="password"],
html.theme-dark input[type="search"],
html.theme-dark input[type="url"],
html.theme-dark input[type="tel"],
html.theme-dark input[type="number"],
html.theme-dark input[type="date"],
html.theme-dark input[type="time"],
html.theme-dark input[type="file"],
html.theme-dark textarea,
html.theme-dark select {
    background-color: #0b141a !important;
    color: #e9edef !important;
    -webkit-text-fill-color: #e9edef !important;
    border-color: #3b4d57 !important;
}

html.theme-dark input[type="file"]::file-selector-button {
    background: #202c33 !important;
    color: #e9edef !important;
    border-color: #3b4d57 !important;
}

html.theme-dark .rel-toolbar .evento-flow-step,
html.theme-dark .rel-toolbar .rel-context,
html.theme-dark .rel-toolbar .bg-white,
html.theme-dark .rel-toolbar .bg-light {
    background: var(--theme-surface-2) !important;
    color: var(--theme-text) !important;
    border-color: var(--theme-border) !important;
}
