: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-red) !important;
    color: var(--oi-red-dark) !important;
    background-color: transparent !important;
}

.btn-outline-primary:hover,
.btn-outline-primary.active {
    background: linear-gradient(135deg, var(--oi-red) 0%, var(--oi-blue) 100%) !important;
    border-color: transparent !important;
    color: #fff !important;
}

.bg-primary,
.perfil-filter.btn-primary {
    background-color: var(--oi-red) !important;
    background-image: linear-gradient(135deg, var(--oi-red) 0%, var(--oi-blue) 100%) !important;
}

.bg-primary,
.bg-primary .text-primary,
.bg-primary i,
.bg-primary svg,
.badge.bg-primary,
.badge.bg-primary .text-primary,
.btn-primary,
.btn-primary .text-primary,
.btn-primary i,
.perfil-filter.btn-primary,
.perfil-filter.btn-primary i {
    color: #fff !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;
    min-width: 0;
    overflow-wrap: anywhere;
}

.card-body,
.card-header,
.card-footer,
.list-group-item,
.table td,
.table th {
    min-width: 0;
}

.card h1,
.card h2,
.card h3,
.card h4,
.card h5,
.card h6,
.card .fw-bold,
.card .fw-semibold {
    overflow-wrap: anywhere;
    word-break: normal;
}

.badge {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    text-align: left;
}

.profile-doc-card .profile-card-title,
.profile-doc-card .profile-card-category,
.profile-doc-card .profile-doc-list li,
.profile-doc-card .profile-doc-list span {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: normal;
}

.profile-doc-card .profile-doc-list {
    min-width: 0;
}

@media (min-width: 768.02px) {
    .sidebar.collapsed .sidebar-toggle {
        position: fixed;
        right: auto;
        left: 0;
        border-radius: 0 8px 8px 0;
    }
}

.perfil-descricao-box {
    background: #f8fafc;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    color: #475569;
    font-size: 0.85rem;
    line-height: 1.45;
    padding: 10px 12px;
}

.empresa-tabs.nav-pills .nav-link {
    color: var(--oi-blue);
}

.empresa-tabs.nav-pills .nav-link.active,
.empresa-tabs.nav-pills .show > .nav-link {
    background-color: var(--oi-blue) !important;
    background-image: linear-gradient(135deg, var(--oi-red) 0%, var(--oi-blue) 100%) !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: 0 10px 22px rgba(8, 104, 232, 0.18);
}

.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;
}

body.theme-dark .btn-outline-primary,
html.theme-dark .btn-outline-primary {
    color: #ff6b75 !important;
    border-color: #e30613 !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;
}

body.theme-dark .btn-outline-primary:hover,
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;
}

/* Base responsiva compartilhada pelo painel e pelo portal da empresa. */
html {
    max-width: 100%;
    overflow-x: hidden;
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

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

img,
svg,
video,
canvas,
iframe,
object,
embed {
    max-width: 100%;
}

input,
select,
textarea,
button,
.form-control,
.form-select,
.input-group,
.input-group > * {
    min-width: 0;
    max-width: 100%;
}

p,
li,
td,
th,
label,
.form-text,
.alert,
.dropdown-item,
.modal-title,
.card-title,
.card-text {
    overflow-wrap: anywhere;
}

.row > *,
.d-flex > *,
.input-group > .form-control,
.input-group > .form-select {
    min-width: 0;
}

.table-responsive,
.dataTables_wrapper,
.dataTables_scroll,
.dataTables_scrollBody {
    max-width: 100%;
}

.table-responsive {
    -webkit-overflow-scrolling: touch;
}

.modal-content {
    min-width: 0;
    max-width: 100%;
}

.modal-body {
    overflow-x: hidden;
}

.modal-footer,
.card-header,
.card-footer {
    gap: .5rem;
}

.btn,
.nav-link,
.dropdown-item,
.form-control,
.form-select {
    min-height: 42px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    flex-shrink: 0;
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    hyphens: none;
    text-align: center;
}

.profile-doc-card,
.profile-doc-card *,
.perfil-descricao-box,
.evento-doc-pill,
.ip-code,
code {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

@media (max-width: 991.98px) {
    .navbar > .container,
    .navbar > .container-fluid {
        gap: .5rem;
    }

    .navbar-brand {
        min-width: 0;
        max-width: calc(100% - 58px);
    }

    .navbar-brand span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .navbar-collapse {
        margin-top: .75rem;
        padding: .75rem;
        border: 1px solid rgba(255, 255, 255, .14);
        border-radius: 8px;
        background: rgba(3, 10, 24, .34);
    }

    .navbar-collapse .navbar-nav,
    .navbar-collapse .nav-item,
    .navbar-collapse .nav-link {
        width: 100%;
    }

    .navbar-collapse .nav-link {
        border-radius: 6px;
    }

    .navbar-collapse .dropdown-menu {
        position: static !important;
        width: 100%;
        margin-top: .4rem;
        transform: none !important;
    }

    .main-content {
        width: 100%;
        max-width: 100%;
    }

    .sidebar {
        margin-left: 0 !important;
    }

    .sidebar.collapsed {
        margin-left: calc(var(--sidebar-width) * -1) !important;
    }

    .sidebar-toggle {
        position: fixed !important;
        top: max(12px, env(safe-area-inset-top)) !important;
        left: 12px;
        right: auto !important;
        width: 44px !important;
        height: 44px !important;
        transform: none !important;
        border-radius: 8px !important;
        transition: left .3s ease, background-color .2s ease !important;
    }

    .sidebar:not(.collapsed) .sidebar-toggle {
        left: calc(var(--sidebar-width) - 56px);
    }

    .sidebar-mobile-backdrop {
        position: fixed;
        inset: 0;
        z-index: 990;
        display: none;
        width: 100%;
        height: 100%;
        padding: 0;
        border: 0;
        background: rgba(3, 10, 24, .58);
        backdrop-filter: blur(2px);
    }

    body.sidebar-mobile-open {
        overflow: hidden;
    }

    body.sidebar-mobile-open .sidebar-mobile-backdrop {
        display: block;
    }
}

@media (max-width: 767.98px) {
    body {
        font-size: 15px;
    }

    .main-content {
        padding: 72px 12px 24px !important;
    }

    main.container,
    main.container-fluid {
        width: 100%;
        max-width: 100%;
        padding-right: 12px;
        padding-left: 12px;
        margin-top: .75rem !important;
    }

    h1,
    .h1 {
        font-size: 1.75rem;
        line-height: 1.15;
    }

    h2,
    .h2 {
        font-size: 1.45rem;
        line-height: 1.2;
    }

    h3,
    .h3 {
        font-size: 1.25rem;
    }

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

    .card-body {
        padding: 1rem;
    }

    .card-header,
    .card-footer {
        padding: .85rem 1rem;
        flex-wrap: wrap;
    }

    .modal {
        padding: 0 !important;
    }

    .modal-dialog,
    .modal-dialog-centered,
    .modal-dialog-scrollable {
        width: auto;
        max-width: none;
        min-height: calc(100% - 16px);
        margin: 8px;
    }

    .modal-dialog-scrollable {
        height: calc(100% - 16px);
    }

    .modal-content {
        max-height: calc(100dvh - 16px);
        border-radius: 8px;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }

    .modal-header {
        align-items: flex-start;
    }

    .modal-footer {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .modal-footer > .btn,
    .modal-footer > form,
    .modal-footer > form .btn {
        width: 100%;
        margin: 0;
    }

    .modal-footer > :only-child,
    .modal-footer > .btn:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .table-responsive,
    .dataTables_wrapper {
        border-radius: 8px;
    }

    .card .table:not(.table-layout-fixed),
    .modal .table:not(.table-layout-fixed),
    .main-content > .table {
        display: block;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .table td,
    .table th {
        padding: .7rem .65rem;
        vertical-align: middle;
    }

    .table-responsive .table:not(.mobile-card-table) td,
    .table-responsive .table:not(.mobile-card-table) th {
        overflow-wrap: normal;
        word-break: normal;
    }

    .table-responsive .table:not(.mobile-card-table) .btn,
    .table-responsive .table:not(.mobile-card-table) .badge {
        min-width: max-content;
        white-space: nowrap;
        overflow-wrap: normal;
        word-break: normal;
    }

    .dataTables_wrapper .row {
        gap: .75rem;
    }

    .dataTables_wrapper .row > div,
    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dataTables_paginate {
        width: 100%;
        text-align: left !important;
    }

    .dataTables_wrapper .dataTables_filter label,
    .dataTables_wrapper .dataTables_filter input,
    .dataTables_wrapper .dataTables_length label {
        width: 100%;
        margin: 0 !important;
    }

    .dataTables_wrapper .pagination {
        flex-wrap: wrap;
        justify-content: center !important;
    }

    .btn-group,
    .nav-pills,
    .nav-tabs {
        max-width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }

    .btn-group > .btn,
    .nav-pills .nav-link,
    .nav-tabs .nav-link {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .navbar.integration-tabs.bg-dark {
        position: sticky;
        top: 0;
        z-index: 1020;
        display: flex;
        justify-content: flex-end;
        width: 100%;
        max-width: 100%;
        min-height: 0;
        margin: 0;
        padding: 0;
        border: 0;
        border-radius: 8px;
        background: transparent !important;
        box-shadow: none !important;
        overflow: visible;
    }

    .integration-tabs .container-fluid {
        display: flex;
        justify-content: flex-end;
        width: 100%;
        padding: 0;
    }

    .integration-mobile-heading {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        width: auto;
    }

    .integration-menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: .45rem;
        width: auto;
        height: 44px;
        min-width: 96px;
        padding: 0 1rem;
        border: 1px solid rgba(255, 255, 255, .14);
        border-radius: 8px;
        background: linear-gradient(115deg, var(--oi-red), var(--oi-blue));
        color: #fff;
        font-size: .95rem;
        font-weight: 700;
        box-shadow: 0 10px 24px rgba(21, 69, 160, .24);
    }

    .integration-menu-toggle i {
        font-size: 1.25rem;
    }

    .integration-mobile-menu {
        width: min(86vw, 340px) !important;
        max-width: 340px;
        border-left: 1px solid var(--theme-border);
        background: var(--theme-surface);
        color: var(--theme-text);
    }

    .integration-mobile-menu .offcanvas-header {
        padding-top: max(1.25rem, env(safe-area-inset-top));
        border-bottom: 1px solid var(--theme-border);
        background: linear-gradient(115deg, rgba(222, 5, 27, .12), rgba(18, 105, 225, .12));
    }

    .integration-menu-kicker {
        margin-bottom: .2rem;
        color: var(--oi-red);
        font-size: .68rem;
        font-weight: 800;
        text-transform: uppercase;
    }

    .integration-mobile-links {
        display: grid;
        gap: .45rem;
    }

    .integration-mobile-links .nav-link {
        display: flex;
        align-items: center;
        gap: .8rem;
        width: 100%;
        min-height: 52px;
        padding: .8rem 1rem;
        border: 1px solid transparent;
        border-radius: 7px;
        color: var(--theme-muted);
        white-space: normal;
    }

    .integration-mobile-links .nav-link i {
        width: 22px;
        margin: 0;
        text-align: center;
    }

    .integration-mobile-links .nav-link.active {
        background: linear-gradient(115deg, rgba(222, 5, 27, .09), rgba(18, 105, 225, .1));
        border-color: rgba(18, 105, 225, .2);
        color: var(--theme-text);
        box-shadow: inset 4px 0 0 var(--oi-blue);
    }

    .sub-section > .card > .card-body {
        padding: .85rem;
    }

    .d-flex.justify-content-between,
    .d-flex.justify-content-end,
    .d-flex.align-items-center.justify-content-between {
        flex-wrap: wrap;
        gap: .75rem;
    }

    .input-group {
        flex-wrap: wrap;
    }

    .input-group > .form-control,
    .input-group > .form-select {
        flex: 1 1 180px;
    }

    .input-group > .btn,
    .input-group > .input-group-text {
        flex: 0 0 auto;
    }

    /*
     * Tabelas complexas preservam as colunas e passam a rolar.
     * Isso evita cabecalhos e palavras com uma letra por linha.
     */
    .table-responsive:has(table:not(.mobile-card-table)) {
        max-width: 100%;
        overflow-x: auto !important;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
    }

    .table-responsive table:not(.mobile-card-table),
    table.dataTable:not(.mobile-card-table) {
        display: table !important;
        width: max-content !important;
        min-width: 760px !important;
        table-layout: auto !important;
        white-space: nowrap !important;
    }

    .table-responsive table:not(.mobile-card-table) th,
    .table-responsive table:not(.mobile-card-table) td {
        min-width: 96px;
        max-width: 320px;
        white-space: normal !important;
        overflow-wrap: normal !important;
        word-break: normal !important;
        writing-mode: horizontal-tb !important;
        text-orientation: mixed !important;
    }

    .table-responsive table:not(.mobile-card-table) th {
        white-space: nowrap !important;
    }

    .dataTables_wrapper > .row {
        width: 100%;
        min-width: 0;
        margin-right: 0;
        margin-left: 0;
    }

    .section-content,
    .sub-section,
    .section-content > *,
    .sub-section > *,
    .card-body,
    .container-fluid {
        min-width: 0;
        max-width: 100%;
    }

    .profile-doc-card .profile-doc-list li,
    .profile-doc-card .profile-doc-list span,
    .badge,
    .evento-doc-pill {
        white-space: normal;
    }

    /* Tabelas operacionais viram cartoes no celular. */
    .table-responsive:has(.mobile-card-table) {
        overflow: visible;
        border: 0 !important;
    }

    .dataTables_wrapper {
        width: 100%;
        max-width: 100%;
        overflow: visible !important;
    }

    table.mobile-card-table,
    .mobile-card-table tbody {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        overflow: visible !important;
        white-space: normal !important;
    }

    .mobile-card-table thead {
        display: none;
    }

    .mobile-card-table tbody tr {
        display: block;
        width: 100%;
        max-width: 100%;
        margin-bottom: 12px;
        padding: .35rem .9rem;
        overflow: hidden;
        box-sizing: border-box;
        border: 1px solid var(--theme-border);
        border-radius: 8px;
        background: var(--theme-surface);
        box-shadow: 0 8px 22px rgba(16, 24, 40, .07);
    }

    .mobile-card-table tbody tr:last-child {
        margin-bottom: 0;
    }

    .mobile-card-table tbody td {
        display: block;
        width: 100%;
        max-width: 100%;
        min-width: 0 !important;
        padding: .7rem 0 !important;
        border: 0;
        border-bottom: 1px solid var(--theme-border);
        text-align: left !important;
        white-space: normal !important;
    }

    .mobile-card-table tbody td:last-child {
        border-bottom: 0;
    }

    .mobile-card-table tbody td::before {
        display: block;
        margin-bottom: .35rem;
        color: var(--theme-muted);
        font-size: .69rem;
        font-weight: 800;
        line-height: 1.35;
        text-transform: uppercase;
    }

    .auto-mobile-card-table tbody td::before {
        content: attr(data-label);
    }

    .auto-mobile-card-table tbody td:not([data-label])::before,
    .auto-mobile-card-table tbody td[data-label=""]::before,
    .auto-mobile-card-table tbody td[data-mobile-full="true"]::before {
        display: none;
    }

    .mobile-card-table tbody td[colspan] {
        display: block;
        padding: 1.5rem .25rem !important;
        text-align: center !important;
    }

    .mobile-card-table tbody td[colspan]::before {
        display: none;
    }

    .mobile-card-table td > *,
    .mobile-card-table td > div,
    .mobile-card-table td form,
    .mobile-card-table td .input-group,
    .mobile-card-table td .btn-group {
        min-width: 0;
        max-width: 100% !important;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .mobile-card-table td:last-child > .d-flex,
    .mobile-card-table td:last-child > .btn-group {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        gap: .5rem !important;
    }

    .mobile-card-table td:last-child .btn,
    .mobile-card-table td:last-child form,
    .mobile-card-table td:last-child form .btn {
        width: 100%;
        min-width: 0;
        margin: 0 !important;
        white-space: normal;
    }

    .mobile-card-table .btn {
        min-height: 44px;
    }

    .mobile-card-table td {
        overflow-wrap: anywhere;
    }

    .adv-admin-mobile-table .adv-photo-thumb,
    .adv-company-mobile-table img {
        width: min(100%, 280px);
        height: auto;
        max-height: 220px;
        object-fit: contain;
    }

    .mobile-card-table .input-group {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        width: 100%;
    }

    .mobile-card-table .input-group > .form-control {
        width: 100%;
        min-width: 0;
    }

    .mobile-card-table .badge,
    .mobile-card-table .docs-status,
    .mobile-card-table .ip-chip,
    .mobile-card-table .status-chip {
        width: fit-content;
        max-width: 100%;
    }

    .adv-admin-mobile-table td:nth-child(1)::before,
    .adv-company-mobile-table td:nth-child(1)::before { content: "Data"; }
    .adv-admin-mobile-table td:nth-child(2)::before { content: "Empresa"; }
    .adv-admin-mobile-table td:nth-child(3)::before,
    .adv-company-mobile-table td:nth-child(2)::before { content: "Evento"; }
    .adv-admin-mobile-table td:nth-child(4)::before,
    .adv-company-mobile-table td:nth-child(3)::before { content: "Colaborador"; }
    .adv-admin-mobile-table td:nth-child(5)::before,
    .adv-company-mobile-table td:nth-child(4)::before { content: "Classificacao"; }
    .adv-admin-mobile-table td:nth-child(6)::before,
    .adv-company-mobile-table td:nth-child(5)::before { content: "Ocorrencia"; }
    .adv-admin-mobile-table td:nth-child(7)::before,
    .adv-company-mobile-table td:nth-child(6)::before { content: "Foto"; }
    .adv-admin-mobile-table td:nth-child(8)::before,
    .adv-company-mobile-table td:nth-child(7)::before { content: "Notificacao"; }
    .adv-admin-mobile-table td:nth-child(9)::before { content: "Acoes"; }

    .company-docs-mobile-table td:nth-child(1)::before,
    .admin-docs-mobile-table td:nth-child(1)::before { content: "Documento"; }
    .company-docs-mobile-table td:nth-child(2)::before { content: "Ultimo envio"; }
    .company-docs-mobile-table td:nth-child(3)::before,
    .admin-docs-mobile-table td:nth-child(3)::before { content: "Status"; }
    .company-docs-mobile-table td:nth-child(4)::before { content: "Validacao"; }
    .company-docs-mobile-table td:nth-child(5)::before,
    .admin-docs-mobile-table td:nth-child(6)::before { content: "Acoes"; }
    .admin-docs-mobile-table td:nth-child(2)::before { content: "Pertence a"; }
    .admin-docs-mobile-table td:nth-child(4)::before { content: "Validado por"; }
    .admin-docs-mobile-table td:nth-child(5)::before { content: "Datas"; }

    .integration-mobile-table td:nth-child(1)::before,
    .course-mobile-table td:nth-child(1)::before { content: "Colaborador"; }
    .integration-mobile-table td:nth-child(2)::before { content: "Empresa e setor"; }
    .integration-mobile-table td:nth-child(3)::before { content: "Codigo"; }
    .integration-mobile-table td:nth-child(4)::before { content: "Status"; }
    .integration-mobile-table td:nth-child(5)::before,
    .course-mobile-table td:nth-child(5)::before { content: "Acoes"; }
    .course-mobile-table td:nth-child(2)::before { content: "Setor"; }
    .course-mobile-table td:nth-child(3)::before { content: "Presenca"; }
    .course-mobile-table td:nth-child(4)::before { content: "Pulseira"; }

    .integration-companies-mobile-table td:nth-child(1)::before { content: "Empresa"; }
    .integration-companies-mobile-table td:nth-child(2)::before { content: "CNPJ"; }
    .integration-companies-mobile-table td:nth-child(3)::before { content: "Contato"; }
    .integration-companies-mobile-table td:nth-child(4)::before { content: "Colaboradores"; }
    .integration-companies-mobile-table td:nth-child(5)::before { content: "Equipamentos"; }
    .integration-companies-mobile-table td:nth-child(6)::before { content: "Status"; }
    .integration-companies-mobile-table td:nth-child(7)::before { content: "Acao"; }

    .staff-mobile-table td:nth-child(1)::before { content: "Colaborador / CPF"; }
    .staff-mobile-table td:nth-child(2)::before { content: "Funcao"; }
    .staff-mobile-table td:nth-child(3)::before { content: "Documentacao"; }
    .staff-mobile-table td:nth-child(4)::before { content: "Acoes"; }

    .equipment-mobile-table td:nth-child(1)::before { content: "TAG / Placa"; }
    .equipment-mobile-table td:nth-child(2)::before { content: "Tipo / Modelo"; }
    .equipment-mobile-table td:nth-child(3)::before { content: "Status geral"; }
    .equipment-mobile-table td:nth-child(4)::before { content: "Acoes"; }

    .company-home-docs-mobile-table td:nth-child(1)::before { content: "Documento"; }
    .company-home-docs-mobile-table td:nth-child(2)::before { content: "Status"; }
    .company-home-docs-mobile-table td:nth-child(3)::before { content: "Acao"; }

    .dashboard-companies-mobile-table td:nth-child(1)::before { content: "Empresa"; }
    .dashboard-companies-mobile-table td:nth-child(2)::before { content: "CNPJ"; }
    .dashboard-companies-mobile-table td:nth-child(3)::before { content: "Pendentes"; }
    .dashboard-companies-mobile-table td:nth-child(4)::before { content: "Colaboradores"; }
    .dashboard-companies-mobile-table td:nth-child(5)::before { content: "Equipamentos"; }

    .dashboard-blocked-mobile-table td:nth-child(1)::before { content: "Colaborador"; }
    .dashboard-blocked-mobile-table td:nth-child(2)::before { content: "Empresa"; }
    .dashboard-blocked-mobile-table td:nth-child(3)::before { content: "Evento"; }
    .dashboard-blocked-mobile-table td:nth-child(4)::before { content: "Motivo"; }

    footer .row {
        gap: .75rem;
    }

    footer,
    footer .text-md-start,
    footer .text-md-end {
        text-align: center !important;
    }
}

@media (max-width: 420px) {
    .navbar-brand span {
        font-size: .92rem;
    }

    .main-content,
    main.container,
    main.container-fluid {
        padding-right: 10px !important;
        padding-left: 10px !important;
    }

    .card-body,
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: .85rem;
    }

    .modal-footer {
        grid-template-columns: 1fr;
    }

    .modal-footer > * {
        grid-column: 1 !important;
    }

    .btn {
        padding-right: .75rem;
        padding-left: .75rem;
    }

    .mobile-card-table td:last-child > .d-flex,
    .mobile-card-table td:last-child > .btn-group {
        grid-template-columns: 1fr;
    }
}

/* Instalacao do aplicativo (PWA). */
.pwa-help[hidden] {
    display: none !important;
}

.pwa-help {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: grid;
    place-items: center;
    padding: 16px;
}

.pwa-help-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(3, 10, 24, .7);
    backdrop-filter: blur(4px);
}

.pwa-help-panel {
    position: relative;
    width: min(100%, 430px);
    padding: 28px 24px 24px;
    border: 1px solid var(--theme-border);
    border-radius: 12px;
    background: var(--theme-surface);
    color: var(--theme-text);
    box-shadow: 0 24px 80px rgba(0, 0, 0, .35);
}

.pwa-help-icon {
    display: block;
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    border-radius: 16px;
}

.pwa-help-panel h2 {
    margin: 0 30px 16px;
    font-size: 1.3rem;
    text-align: center;
}

.pwa-help-panel ol {
    margin: 0 0 22px;
    padding-left: 1.35rem;
    color: var(--theme-muted);
}

.pwa-help-panel li + li {
    margin-top: .65rem;
}

.pwa-help-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--theme-muted);
    font-size: 1.75rem;
    line-height: 1;
}

.pwa-help-ok {
    width: 100%;
    min-height: 48px;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--oi-red), var(--oi-blue));
    color: #fff;
    font-weight: 700;
}

body.pwa-help-open {
    overflow: hidden;
}
