/**
 * Com4 Portal — refinamento visual (Bootstrap 3 + SmartAdmin)
 * Carregar por último nos layouts. Não altera comportamento de scripts.
 */
:root {
    --com4-accent: #f59e0b;
    --com4-accent-soft: rgba(245, 158, 11, 0.14);
    --com4-header: #3d4451;
    --com4-sidebar: #4b5563;
    --com4-surface: #f1f5f9;
    --com4-elevated: #ffffff;
    --com4-border: #e2e8f0;
    --com4-text: #1e293b;
    --com4-text-muted: #64748b;
    --com4-radius: 8px;
    --com4-radius-sm: 6px;
    --com4-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --com4-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
    --com4-shadow-lg: 0 8px 30px rgba(15, 23, 42, 0.1);
    --com4-font-base: 13px;
}

/* Tamanho da fonte (data-com4-font-size definido em com4-font-size.js) */
html {
    font-size: var(--com4-font-base);
}

html[data-com4-font-size="9"] { --com4-font-base: 9px; font-size: 9px; }
html[data-com4-font-size="11"] { --com4-font-base: 11px; font-size: 11px; }
html[data-com4-font-size="13"] { --com4-font-base: 13px; font-size: 13px; }
html[data-com4-font-size="15"] { --com4-font-base: 15px; font-size: 15px; }
html[data-com4-font-size="17"] { --com4-font-base: 17px; font-size: 17px; }
html[data-com4-font-size="19"] { --com4-font-base: 19px; font-size: 19px; }
html[data-com4-font-size="21"] { --com4-font-base: 21px; font-size: 21px; }

/* ========== Atendente (SmartAdmin) ========== */
body.portal-com4-atendente {
    font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    color: var(--com4-text);
    -webkit-font-smoothing: antialiased;
    background: var(--com4-surface) !important;
}

body.portal-com4-atendente #header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1003;
    background: linear-gradient(180deg, #525a6b 0%, var(--com4-header) 100%) !important;
    box-shadow: var(--com4-shadow);
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

/* Agrupa timer + sair + alterar + menu com alinhamento vertical (evita engrenagem deslocada) */
body.portal-com4-atendente #header .com4-header-actions {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 6px;
    float: right;
    height: 49px;
    margin: 0;
    padding: 0 0 0 8px;
}

body.portal-com4-atendente #header .com4-header-actions .btn-header {
    margin: 0 !important;
    height: auto;
}

body.portal-com4-atendente #header .com4-header-actions .btn-header > :first-child > a {
    margin-top: 0 !important;
}

body.portal-com4-atendente #header .com4-header-actions .portal-header-action {
    margin-top: 0 !important;
    vertical-align: middle;
}

body.portal-com4-atendente #logo-group span {
    letter-spacing: 0.04em;
}

body.portal-com4-atendente #left-panel {
    background: linear-gradient(180deg, #5c6474 0%, var(--com4-sidebar) 55%, #3f4654 100%) !important;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
    border-right: 1px solid rgba(0, 0, 0, 0.08);
}

body.portal-com4-atendente #left-panel ul > li > a {
    color: #fcd34d !important;
    border-radius: var(--com4-radius-sm);
    margin: 1px 6px;
    padding-left: 12px !important;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

body.portal-com4-atendente #left-panel ul > li > a:hover,
body.portal-com4-atendente #left-panel ul > li > a:focus {
    background: var(--com4-accent-soft) !important;
    color: #fff !important;
}

body.portal-com4-atendente #left-panel ul > li.active > a {
    background: rgba(245, 158, 11, 0.22) !important;
    color: #fff !important;
    font-weight: 600;
}

body.portal-com4-atendente #main {
    background: transparent;
}

body.portal-com4-atendente #ribbon {
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 8px 14px;
    min-height: 52px;
    box-sizing: border-box;
}

body.portal-com4-atendente #ribbon .breadcrumb {
    display: inline-flex !important;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    float: none !important;
    background: var(--com4-elevated);
    border: 1px solid var(--com4-border);
    border-radius: var(--com4-radius);
    box-shadow: var(--com4-shadow-sm);
    padding: 12px 28px !important;
    margin: 4px 0;
    min-height: 42px;
    line-height: 1.45;
    font-size: 1rem;
    box-sizing: border-box;
}

body.portal-com4-atendente #ribbon .breadcrumb > li {
    float: none !important;
    display: inline-flex !important;
    align-items: center;
}

body.portal-com4-atendente #ribbon .breadcrumb > li + li:before {
    color: var(--com4-text-muted);
    padding: 0 12px;
}

body.portal-com4-atendente #ribbon .breadcrumb a,
body.portal-com4-atendente #ribbon .breadcrumb {
    color: #b45309 !important;
    text-decoration: none !important;
}

body.portal-com4-atendente #ribbon .breadcrumb a:hover {
    color: #92400e !important;
    text-decoration: underline !important;
}

body.portal-com4-atendente .panel {
    border-radius: var(--com4-radius);
    border-color: var(--com4-border);
    box-shadow: var(--com4-shadow-sm);
    margin-bottom: 16px;
    /* overflow:hidden quebra animação/fechamento do Bootstrap collapse dentro do painel */
    overflow: visible;
}

body.portal-com4-atendente .panel-heading {
    border-radius: 0;
    font-weight: 600;
    letter-spacing: 0.02em;
}

body.portal-com4-atendente .panel-title > a {
    transition: opacity 0.15s ease;
}

body.portal-com4-atendente .panel-title > a:hover {
    opacity: 0.92;
}

body.portal-com4-atendente .well {
    background: var(--com4-elevated);
    border: 1px solid var(--com4-border);
    border-radius: var(--com4-radius);
    box-shadow: var(--com4-shadow-sm);
}

body.portal-com4-atendente .table {
    border-radius: var(--com4-radius-sm);
    overflow: hidden;
}

body.portal-com4-atendente .table > thead > tr > th {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 2px solid var(--com4-border) !important;
    color: var(--com4-text);
    font-weight: 600;
    font-size: 0.923em;
    text-transform: none;
    vertical-align: middle;
}

body.portal-com4-atendente .table-bordered {
    border-color: var(--com4-border);
}

body.portal-com4-atendente .table-bordered > thead > tr > th,
body.portal-com4-atendente .table-bordered > tbody > tr > td {
    border-color: var(--com4-border);
}

body.portal-com4-atendente .btn {
    border-radius: var(--com4-radius-sm);
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

body.portal-com4-atendente .btn-default:hover,
body.portal-com4-atendente .btn-default:focus {
    background: #f8fafc;
    border-color: #cbd5e1;
}

body.portal-com4-atendente .btn-primary {
    background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
    border-color: #b45309;
}

body.portal-com4-atendente .btn-primary:hover,
body.portal-com4-atendente .btn-primary:focus {
    background: #d97706;
    border-color: #92400e;
}

body.portal-com4-atendente .form-control {
    border-radius: var(--com4-radius-sm);
    border-color: #cbd5e1;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.portal-com4-atendente .form-control:focus {
    border-color: var(--com4-accent);
    box-shadow: 0 0 0 3px var(--com4-accent-soft);
}

body.portal-com4-atendente .modal-content {
    border-radius: var(--com4-radius);
    border: none;
    box-shadow: var(--com4-shadow-lg);
}

body.portal-com4-atendente .modal-header {
    border-bottom-color: var(--com4-border);
    padding: 14px 18px;
}

body.portal-com4-atendente .modal-footer {
    border-top-color: var(--com4-border);
    padding: 12px 18px;
}

body.portal-com4-atendente .nav-tabs > li > a {
    border-radius: var(--com4-radius-sm) var(--com4-radius-sm) 0 0;
}

body.portal-com4-atendente .nav-tabs > li.active > a,
body.portal-com4-atendente .nav-tabs > li.active > a:hover,
body.portal-com4-atendente .nav-tabs > li.active > a:focus {
    border-color: var(--com4-border) var(--com4-border) transparent;
    font-weight: 600;
}

body.portal-com4-atendente .label {
    border-radius: 4px;
    font-weight: 600;
    padding: 0.2em 0.55em;
}

body.portal-com4-atendente .alert {
    border-radius: var(--com4-radius-sm);
    border-width: 1px;
}

/* Cabeçalho: botões ícone */
body.portal-com4-atendente .portal-header-action {
    margin-top: 10px;
    height: 32px;
    min-width: 36px;
    padding: 4px 10px;
    color: #f59e0b !important;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--com4-radius-sm);
    transition: background 0.15s ease, border-color 0.15s ease;
}

body.portal-com4-atendente .portal-header-action:hover,
body.portal-com4-atendente .portal-header-action:focus {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fbbf24 !important;
}

body.portal-com4-atendente #hide-menu a {
    border-radius: var(--com4-radius-sm);
    transition: background 0.15s ease;
}

body.portal-com4-atendente #hide-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ========== Portal Cliente ========== */
body.portal-com4-cliente {
    font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    -webkit-font-smoothing: antialiased;
    background: var(--com4-surface) !important;
    color: var(--com4-text);
}

body.portal-com4-atendente .form-control,
body.portal-com4-atendente select.form-control,
body.portal-com4-atendente textarea.form-control,
body.portal-com4-atendente .input-sm,
body.portal-com4-atendente .btn,
body.portal-com4-atendente .table,
body.portal-com4-atendente .panel,
body.portal-com4-atendente .nav-tabs > li > a,
body.portal-com4-cliente .form-control,
body.portal-com4-cliente select.form-control,
body.portal-com4-cliente textarea.form-control,
body.portal-com4-cliente .btn,
body.portal-com4-cliente .table,
body.portal-com4-cliente .panel,
body.portal-com4-cliente .navbar-nav > li > a {
    font-size: 1rem;
}

body.portal-com4-cliente .container-fluid {
    padding-bottom: 24px;
}

body.portal-com4-cliente .container-fluid > div:first-child {
    padding: 8px 4px 12px;
    background: var(--com4-elevated);
    border-radius: 0 0 var(--com4-radius) var(--com4-radius);
    box-shadow: var(--com4-shadow-sm);
    margin-bottom: 8px;
    border: 1px solid var(--com4-border);
    border-top: none;
}

body.portal-com4-cliente .navbar-inverse {
    background: linear-gradient(90deg, #3f3f46 0%, #52525b 50%, #3f3f46 100%) !important;
    border: 1px solid var(--com4-border) !important;
    border-radius: var(--com4-radius) !important;
    box-shadow: var(--com4-shadow);
    margin-bottom: 16px;
    margin-top: 5px;
}

body.portal-com4-cliente .navbar-inverse .navbar-nav > li > a {
    color: #fff !important;
}

body.portal-com4-cliente .navbar-inverse .navbar-nav > li > a {
    border-radius: var(--com4-radius-sm);
    margin: 4px 2px;
    transition: background 0.15s ease;
}

body.portal-com4-cliente .navbar-inverse .navbar-nav > .active > a,
body.portal-com4-cliente .navbar-inverse .navbar-nav > .active > a:hover,
body.portal-com4-cliente .navbar-inverse .navbar-nav > .active > a:focus {
    background: rgba(245, 158, 11, 0.35) !important;
    color: #fff !important;
}

body.portal-com4-cliente .navbar-inverse .navbar-nav > .open > a,
body.portal-com4-cliente .navbar-inverse .navbar-nav > .open > a:hover,
body.portal-com4-cliente .navbar-inverse .navbar-nav > .open > a:focus {
    background: rgba(255, 255, 255, 0.12) !important;
}

body.portal-com4-cliente .panel.panel-cliente,
body.portal-com4-cliente .panel-cliente {
    border-radius: var(--com4-radius);
    border-color: #f59e0b;
    border-bottom-width: 3px;
    box-shadow: var(--com4-shadow);
    overflow: hidden;
}

body.portal-com4-cliente .panel-heading-cliente,
body.portal-com4-cliente .panel-heading.panel-heading-cliente {
    border-radius: 0;
    font-weight: 600;
}

body.portal-com4-cliente .table > thead > tr > th {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 2px solid var(--com4-border);
    color: var(--com4-text);
}

body.portal-com4-cliente .btn {
    border-radius: var(--com4-radius-sm);
    transition: all 0.15s ease;
}

body.portal-com4-cliente .form-control {
    border-radius: var(--com4-radius-sm);
}

body.portal-com4-cliente .form-control:focus {
    border-color: var(--com4-accent);
    box-shadow: 0 0 0 3px var(--com4-accent-soft);
}

body.portal-com4-cliente #main {
    padding: 0 4px;
}

/* ========== Telas de login (colaborador / cliente) ========== */
body.portal-com4-login .btnPrimaryPortal,
body.portal-com4-login .btnSuccessPortal {
    border-radius: var(--com4-radius-sm);
    font-weight: 600;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

body.portal-com4-login .btnPrimaryPortal:hover,
body.portal-com4-login .btnPrimaryPortal:focus {
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}

body.portal-com4-login .btn.btn-primary {
    border-radius: var(--com4-radius-sm);
    transition: box-shadow 0.15s ease;
}

body.portal-com4-login .btn.btn-primary:hover,
body.portal-com4-login .btn.btn-primary:focus {
    box-shadow: 0 2px 8px rgba(241, 155, 25, 0.4);
}

body.portal-com4-login .admin-form .widget {
    border-radius: var(--com4-radius);
    overflow: hidden;
    box-shadow: var(--com4-shadow-lg);
    border: 1px solid var(--com4-border);
}

body.portal-com4-login .admin-form .widget-head {
    border-radius: var(--com4-radius) var(--com4-radius) 0 0;
    font-weight: 600;
    letter-spacing: 0.03em;
    padding: 14px !important;
}

body.portal-com4-login .admin-form .widget-content {
    padding: 20px !important;
}

body.portal-com4-login .form-control {
    border-radius: var(--com4-radius-sm);
}

/* ========== Tabelas globais (.tabelaFormat em qualquer layout) ========== */
.tabelaFormat {
    border-radius: var(--com4-radius-sm);
    overflow: hidden;
}

.tabelaFormat thead tr th {
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%) !important;
    color: var(--com4-text);
    font-weight: 600;
    border-color: var(--com4-border) !important;
    padding: 10px 8px !important;
}

.tabelaFormat tbody tr td {
    border-color: var(--com4-border) !important;
    vertical-align: middle !important;
}

.tabelaFormat.table-bordered {
    border-color: var(--com4-border) !important;
}

.linhaHover {
    background-color: rgba(245, 158, 11, 0.12) !important;
}

.linhaS {
    background-color: rgba(245, 158, 11, 0.28) !important;
    font-weight: 600;
}

.linhaHover_Cliente {
    background: rgba(59, 130, 246, 0.12) !important;
}

.linhaS_Cliente {
    background: rgba(59, 130, 246, 0.2) !important;
}

/* Timer no header atendente */
.com4-header-timer {
    margin: 0;
    flex-shrink: 0;
}

.com4-header-alterar-senha {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

/* Oculto ao usuário: #com4SessionTimer permanece no DOM para o script (ping, expiração, redirect). */
.com4-session-timer-hidden {
    display: none !important;
}

/* Indicador de tempo de sessão (atendente + cliente) */
.com4-session-timer-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 8px 12px 0 0;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.92);
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.12);
    vertical-align: middle;
    min-width: 118px;
    flex-shrink: 0;
    white-space: nowrap;
}

.com4-session-timer-label {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 10px;
    opacity: 0.85;
}

.com4-session-timer-remain {
    font-family: Consolas, "Courier New", monospace;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.06em;
}

.com4-session-timer-wrap.com4-session-warn {
    background: rgba(245, 158, 11, 0.35);
    border-color: rgba(251, 191, 36, 0.55);
    color: #fff;
}

.com4-session-timer-wrap.com4-session-critical {
    background: rgba(220, 38, 38, 0.45);
    border-color: rgba(252, 165, 165, 0.6);
    color: #fff;
    animation: com4-session-pulse 1.2s ease-in-out infinite;
}

@keyframes com4-session-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.82; }
}

li.com4-session-timer-nav > .com4-session-timer-wrap,
.com4-session-timer-cliente {
    margin: 10px 8px 0 0;
    color: rgba(255, 255, 255, 0.95);
}

/* ========== Tema escuro (toggle no header) ========== */
html[data-com4-theme="dark"],
body.portal-com4-atendente.com4-theme-dark,
body.portal-com4-cliente.com4-theme-dark {
    --com4-header: #1e293b;
    --com4-sidebar: #0f172a;
    --com4-surface: #0f172a;
    --com4-elevated: #1e293b;
    --com4-border: #334155;
    --com4-text: #e2e8f0;
    --com4-text-muted: #94a3b8;
    --com4-accent-soft: rgba(245, 158, 11, 0.2);
    --com4-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
    --com4-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    --com4-shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.45);
}

html[data-com4-theme="dark"] body.portal-com4-atendente,
body.portal-com4-atendente.com4-theme-dark {
    background: #0f172a !important;
    color: #e2e8f0 !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente #main,
body.portal-com4-atendente.com4-theme-dark #main {
    background: #0f172a !important;
    color: #e2e8f0;
}

html[data-com4-theme="dark"] body.portal-com4-atendente #content,
body.portal-com4-atendente.com4-theme-dark #content {
    background: #0f172a !important;
    color: #e2e8f0;
}

html[data-com4-theme="dark"] body.portal-com4-atendente #ribbon,
body.portal-com4-atendente.com4-theme-dark #ribbon {
    background: #1e293b !important;
    border-color: #334155;
}

html[data-com4-theme="dark"] body.portal-com4-atendente label,
html[data-com4-theme="dark"] body.portal-com4-atendente .control-label,
html[data-com4-theme="dark"] body.portal-com4-atendente legend,
body.portal-com4-atendente.com4-theme-dark label,
body.portal-com4-atendente.com4-theme-dark .control-label,
body.portal-com4-atendente.com4-theme-dark legend {
    color: #e2e8f0 !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .nav-tabs > li.active > a,
html[data-com4-theme="dark"] body.portal-com4-atendente .nav-tabs > li.active > a:hover,
html[data-com4-theme="dark"] body.portal-com4-atendente .nav-tabs > li.active > a:focus,
body.portal-com4-atendente.com4-theme-dark .nav-tabs > li.active > a,
body.portal-com4-atendente.com4-theme-dark .nav-tabs > li.active > a:hover,
body.portal-com4-atendente.com4-theme-dark .nav-tabs > li.active > a:focus {
    background-color: #1e293b !important;
    color: #f1f5f9 !important;
    border-color: #475569 !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .modal-header,
body.portal-com4-atendente.com4-theme-dark .modal-header {
    background-color: #334155 !important;
    color: #f1f5f9 !important;
    border-color: #475569 !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .jarviswidget,
html[data-com4-theme="dark"] body.portal-com4-atendente .jarviswidget .widget-body,
body.portal-com4-atendente.com4-theme-dark .jarviswidget,
body.portal-com4-atendente.com4-theme-dark .jarviswidget .widget-body {
    background: #1e293b !important;
    color: #e2e8f0 !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente input.form-control,
html[data-com4-theme="dark"] body.portal-com4-atendente select.form-control,
html[data-com4-theme="dark"] body.portal-com4-atendente textarea.form-control,
body.portal-com4-atendente.com4-theme-dark input.form-control,
body.portal-com4-atendente.com4-theme-dark select.form-control,
body.portal-com4-atendente.com4-theme-dark textarea.form-control {
    background-color: #263548 !important;
    color: #f1f5f9 !important;
    border: 1px solid #64748b !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente #header,
body.portal-com4-atendente.com4-theme-dark #header {
    background: linear-gradient(180deg, #334155 0%, var(--com4-header) 100%) !important;
    border-bottom-color: #475569;
}

html[data-com4-theme="dark"] body.portal-com4-atendente #left-panel,
body.portal-com4-atendente.com4-theme-dark #left-panel {
    background: linear-gradient(180deg, #1e293b 0%, var(--com4-sidebar) 55%, #020617 100%) !important;
    border-right-color: #334155;
}

html[data-com4-theme="dark"] body.portal-com4-atendente #ribbon .breadcrumb,
body.portal-com4-atendente.com4-theme-dark #ribbon .breadcrumb {
    background: #334155 !important;
    color: var(--com4-text);
    border-color: #64748b !important;
    padding: 12px 28px !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente #ribbon .breadcrumb > li,
html[data-com4-theme="dark"] body.portal-com4-atendente #ribbon .breadcrumb > li + li:before,
body.portal-com4-atendente.com4-theme-dark #ribbon .breadcrumb > li {
    color: #fbbf24 !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente #ribbon .breadcrumb a {
    color: #fbbf24 !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .panel,
html[data-com4-theme="dark"] body.portal-com4-atendente .panel-body,
html[data-com4-theme="dark"] body.portal-com4-atendente .well {
    background-color: var(--com4-elevated) !important;
    color: var(--com4-text);
    border-color: var(--com4-border) !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .panel-default > .panel-heading,
html[data-com4-theme="dark"] body.portal-com4-atendente .panel-heading,
body.portal-com4-atendente.com4-theme-dark .panel-default > .panel-heading,
body.portal-com4-atendente.com4-theme-dark .panel-heading {
    background: #334155 !important;
    color: #f1f5f9 !important;
    border-color: var(--com4-border) !important;
}

/* Dados Cliente — barras do acordeão (substitui cinza #707070 no modo escuro) */
html[data-com4-theme="dark"] body.portal-com4-atendente #accordionDadosCliente.well,
html[data-com4-theme="dark"] body.portal-com4-atendente #accordionDadosCliente .panel,
body.portal-com4-atendente.com4-theme-dark #accordionDadosCliente.well,
body.portal-com4-atendente.com4-theme-dark #accordionDadosCliente .panel {
    background-color: #1e293b !important;
    border: 1px solid #64748b !important;
    border-style: solid !important;
    box-shadow: var(--com4-shadow-sm);
}

html[data-com4-theme="dark"] body.portal-com4-atendente #accordionDadosCliente .panel-heading,
body.portal-com4-atendente.com4-theme-dark #accordionDadosCliente .panel-heading {
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente #accordionDadosCliente .panel-title > a,
html[data-com4-theme="dark"] body.portal-com4-atendente #accordionDadosCliente .panel-title > a[style*="#707070"],
body.portal-com4-atendente.com4-theme-dark #accordionDadosCliente .panel-title > a {
    display: block !important;
    background: linear-gradient(90deg, #334155 0%, #1e293b 100%) !important;
    color: #f8fafc !important;
    border: 1px solid #64748b !important;
    border-left: 4px solid #f59e0b !important;
    padding: 12px 20px !important;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none !important;
    box-sizing: border-box;
}

html[data-com4-theme="dark"] body.portal-com4-atendente #accordionDadosCliente .panel-title > a:hover,
html[data-com4-theme="dark"] body.portal-com4-atendente #accordionDadosCliente .panel-title > a:focus,
body.portal-com4-atendente.com4-theme-dark #accordionDadosCliente .panel-title > a:hover {
    background: linear-gradient(90deg, #475569 0%, #334155 100%) !important;
    color: #fff !important;
    border-left-color: #fbbf24 !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente #accordionDadosCliente .panel-title > a.collapsed,
body.portal-com4-atendente.com4-theme-dark #accordionDadosCliente .panel-title > a.collapsed {
    background: linear-gradient(90deg, #1e293b 0%, #0f172a 100%) !important;
    color: #cbd5e1 !important;
    border-left-color: #94a3b8 !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente #accordionDadosCliente .panel-body,
body.portal-com4-atendente.com4-theme-dark #accordionDadosCliente .panel-body {
    background-color: #0f172a !important;
    color: #e2e8f0 !important;
    border-top: 1px solid #475569 !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente #accordionDadosCliente fieldset.scheduler-border,
body.portal-com4-atendente.com4-theme-dark #accordionDadosCliente fieldset.scheduler-border {
    border-color: #64748b !important;
    background-color: rgba(15, 23, 42, 0.4) !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente #accordionDadosCliente legend.scheduler-border,
body.portal-com4-atendente.com4-theme-dark #accordionDadosCliente legend.scheduler-border {
    color: #e2e8f0 !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente #accordionDadosCliente .btn-default,
body.portal-com4-atendente.com4-theme-dark #accordionDadosCliente .btn-default {
    background-color: #475569 !important;
    color: #f8fafc !important;
    border-color: #94a3b8 !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente #accordionDadosCliente .btn-default:hover,
body.portal-com4-atendente.com4-theme-dark #accordionDadosCliente .btn-default:hover {
    background-color: #64748b !important;
    color: #fff !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .table > thead > tr > th {
    background: linear-gradient(180deg, #334155 0%, #1e293b 100%) !important;
    color: var(--com4-text) !important;
    border-color: var(--com4-border) !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .table > tbody > tr > td {
    background-color: var(--com4-elevated);
    color: var(--com4-text);
    border-color: var(--com4-border) !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .table-striped > tbody > tr:nth-of-type(odd) > td {
    background-color: #273449;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .form-control,
html[data-com4-theme="dark"] body.portal-com4-atendente select.form-control,
html[data-com4-theme="dark"] body.portal-com4-atendente textarea.form-control,
body.portal-com4-atendente.com4-theme-dark .form-control,
body.portal-com4-atendente.com4-theme-dark select.form-control,
body.portal-com4-atendente.com4-theme-dark textarea.form-control {
    background-color: #263548 !important;
    color: #f1f5f9 !important;
    border: 1px solid #64748b !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.18);
}

html[data-com4-theme="dark"] body.portal-com4-atendente .form-control:focus,
html[data-com4-theme="dark"] body.portal-com4-atendente select.form-control:focus,
html[data-com4-theme="dark"] body.portal-com4-atendente textarea.form-control:focus,
body.portal-com4-atendente.com4-theme-dark .form-control:focus {
    border-color: #f59e0b !important;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.28), inset 0 1px 2px rgba(0, 0, 0, 0.15) !important;
    outline: none;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .form-control::placeholder,
html[data-com4-theme="dark"] body.portal-com4-atendente textarea.form-control::placeholder,
body.portal-com4-atendente.com4-theme-dark .form-control::placeholder {
    color: #94a3b8 !important;
    opacity: 1;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .modal-content {
    background-color: var(--com4-elevated);
    color: var(--com4-text);
}

html[data-com4-theme="dark"] body.portal-com4-atendente .modal-header,
html[data-com4-theme="dark"] body.portal-com4-atendente .modal-footer {
    background-color: var(--com4-elevated);
    border-color: var(--com4-border);
}

html[data-com4-theme="dark"] body.portal-com4-atendente .nav-tabs,
body.portal-com4-atendente.com4-theme-dark .nav-tabs {
    border-bottom-color: #64748b !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .nav-tabs > li > a,
body.portal-com4-atendente.com4-theme-dark .nav-tabs > li > a {
    color: #cbd5e1 !important;
    background-color: transparent;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .nav-tabs > li > a:hover,
html[data-com4-theme="dark"] body.portal-com4-atendente .nav-tabs > li > a:focus,
body.portal-com4-atendente.com4-theme-dark .nav-tabs > li > a:hover,
body.portal-com4-atendente.com4-theme-dark .nav-tabs > li > a:focus {
    color: #fbbf24 !important;
    background-color: #334155 !important;
    border-color: #475569 #475569 transparent !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .nav-tabs > li.active > a,
html[data-com4-theme="dark"] body.portal-com4-atendente .nav-tabs > li.active > a:hover,
html[data-com4-theme="dark"] body.portal-com4-atendente .nav-tabs > li.active > a:focus,
body.portal-com4-atendente.com4-theme-dark .nav-tabs > li.active > a,
body.portal-com4-atendente.com4-theme-dark .nav-tabs > li.active > a:hover,
body.portal-com4-atendente.com4-theme-dark .nav-tabs > li.active > a:focus {
    background-color: var(--com4-elevated) !important;
    color: #f8fafc !important;
    border-color: #64748b #64748b transparent !important;
    font-weight: 600;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .btn-default {
    background: #334155;
    color: #f1f5f9;
    border-color: #475569;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .btn-default:hover,
html[data-com4-theme="dark"] body.portal-com4-atendente .btn-default:focus {
    background: #475569;
    color: #fff;
}

html[data-com4-theme="dark"] .tabelaFormat thead tr th {
    background: linear-gradient(180deg, #334155 0%, #1e293b 100%) !important;
    color: var(--com4-text) !important;
}

html[data-com4-theme="dark"] .tabelaFormat tbody tr td {
    background-color: var(--com4-elevated);
    color: var(--com4-text);
}

html[data-com4-theme="dark"] #tbOpVendasItem td.cellPercentOp,
html[data-com4-theme="dark"] #tbOpVendasItem td[id^="linha"],
body.portal-com4-atendente.com4-theme-dark #tbOpVendasItem td.cellPercentOp,
body.portal-com4-atendente.com4-theme-dark #tbOpVendasItem td[id^="linha"] {
    background-color: #334155 !important;
    color: #f1f5f9 !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .jarviswidget > header {
    background: #334155 !important;
    color: #f1f5f9 !important;
    border-color: var(--com4-border) !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .jarviswidget .widget-body {
    background: var(--com4-elevated) !important;
    color: var(--com4-text);
}

html[data-com4-theme="dark"] body.portal-com4-cliente {
    background: var(--com4-surface) !important;
    color: var(--com4-text);
}

html[data-com4-theme="dark"] body.portal-com4-cliente .container-fluid > div:first-child {
    background: var(--com4-elevated);
    border-color: var(--com4-border);
}

html[data-com4-theme="dark"] body.portal-com4-cliente .navbar-inverse {
    background: linear-gradient(90deg, #0f172a 0%, #1e293b 50%, #0f172a 100%) !important;
    border-color: var(--com4-border) !important;
}

html[data-com4-theme="dark"] body.portal-com4-cliente .panel,
html[data-com4-theme="dark"] body.portal-com4-cliente .panel-body {
    background-color: var(--com4-elevated) !important;
    color: var(--com4-text);
}

html[data-com4-theme="dark"] body.portal-com4-cliente .panel-heading-cliente,
html[data-com4-theme="dark"] body.portal-com4-cliente .panel-heading {
    background: #334155 !important;
    color: #f1f5f9 !important;
}

html[data-com4-theme="dark"] body.portal-com4-cliente .table > tbody > tr > td {
    background-color: var(--com4-elevated);
    color: var(--com4-text);
}

html[data-com4-theme="dark"] body.portal-com4-cliente .form-control {
    background-color: #0f172a;
    color: var(--com4-text);
    border-color: #475569;
}

.com4-header-theme-toggle,
.com4-header-font-size {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.com4-header-font-size {
    margin-right: 2px;
}

.com4-font-size-select {
    height: 28px;
    min-width: 56px;
    max-width: 72px;
    padding: 2px 4px 2px 6px;
    font-size: 12px;
    line-height: 1.2;
    border-radius: var(--com4-radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(0, 0, 0, 0.22);
    color: #f8fafc;
    cursor: pointer;
    vertical-align: middle;
}

.com4-font-size-select:hover,
.com4-font-size-select:focus {
    border-color: rgba(245, 158, 11, 0.65);
    outline: none;
    background: rgba(0, 0, 0, 0.32);
}

.com4-font-size-select option {
    color: #1e293b;
    background: #fff;
}

body.portal-com4-cliente .com4-font-size-select {
    margin-top: 10px;
    margin-right: 6px;
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.35);
}

.com4-btn-theme {
    cursor: pointer;
}

.com4-btn-theme .fa {
    font-size: 16px;
    line-height: 1;
    pointer-events: none;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .panel-default,
body.portal-com4-atendente.com4-theme-dark .panel-default {
    background-color: var(--com4-elevated) !important;
    border-color: var(--com4-border) !important;
    color: var(--com4-text) !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .panel-default > .panel-heading,
body.portal-com4-atendente.com4-theme-dark .panel-default > .panel-heading {
    background-color: #334155 !important;
    color: #f1f5f9 !important;
    border-color: var(--com4-border) !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .nav-tabs,
body.portal-com4-atendente.com4-theme-dark .nav-tabs {
    border-bottom-color: var(--com4-border);
}

html[data-com4-theme="dark"] body.portal-com4-atendente .tab-content,
body.portal-com4-atendente.com4-theme-dark .tab-content {
    color: var(--com4-text);
}

/* Contratos SAP — contraste no modo escuro (descrição, status, itens) */
html[data-com4-theme="dark"] body.portal-com4-atendente .itemContrato,
body.portal-com4-atendente.com4-theme-dark .itemContrato {
    color: #e2e8f0 !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .itemColor,
body.portal-com4-atendente.com4-theme-dark .itemColor {
    color: #4ade80 !important;
    font-weight: 600;
}

html[data-com4-theme="dark"] body.portal-com4-atendente #tbContrato tbody td,
html[data-com4-theme="dark"] body.portal-com4-atendente #tbContratoItem tbody td,
html[data-com4-theme="dark"] body.portal-com4-atendente #tbAprovadores tbody td,
body.portal-com4-atendente.com4-theme-dark #tbContrato tbody td,
body.portal-com4-atendente.com4-theme-dark #tbContratoItem tbody td,
body.portal-com4-atendente.com4-theme-dark #tbAprovadores tbody td {
    color: #e2e8f0;
}

html[data-com4-theme="dark"] body.portal-com4-atendente #tbContrato thead th,
html[data-com4-theme="dark"] body.portal-com4-atendente #tbContratoItem thead th,
html[data-com4-theme="dark"] body.portal-com4-atendente #tbAprovadores thead th,
body.portal-com4-atendente.com4-theme-dark #tbContrato thead th,
body.portal-com4-atendente.com4-theme-dark #tbContratoItem thead th,
body.portal-com4-atendente.com4-theme-dark #tbAprovadores thead th {
    background: linear-gradient(180deg, #334155 0%, #1e293b 100%) !important;
    color: #f1f5f9 !important;
    border-color: #475569 !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente #tbContrato a,
html[data-com4-theme="dark"] body.portal-com4-atendente #tbContratoItem a,
body.portal-com4-atendente.com4-theme-dark #tbContrato a,
body.portal-com4-atendente.com4-theme-dark #tbContratoItem a {
    color: #93c5fd !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente #tbContrato a:hover,
html[data-com4-theme="dark"] body.portal-com4-atendente #tbContratoItem a:hover,
body.portal-com4-atendente.com4-theme-dark #tbContrato a:hover,
body.portal-com4-atendente.com4-theme-dark #tbContratoItem a:hover {
    color: #bfdbfe !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente #tbContrato td[style*="#2f5630"],
html[data-com4-theme="dark"] body.portal-com4-atendente #tbContrato td[style*="color: green"],
html[data-com4-theme="dark"] body.portal-com4-atendente #tbContrato td[style*="color:green"],
body.portal-com4-atendente.com4-theme-dark #tbContrato td[style*="#2f5630"] {
    color: #bbf7d0 !important;
    background-color: rgba(22, 163, 74, 0.35) !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente #tbContrato td[style*="#952c0b"],
html[data-com4-theme="dark"] body.portal-com4-atendente #tbContrato td[style*="#ff0000"],
html[data-com4-theme="dark"] body.portal-com4-atendente #tbContrato td[style*="color:red"],
html[data-com4-theme="dark"] body.portal-com4-atendente #tbContrato td[style*="color: red"],
body.portal-com4-atendente.com4-theme-dark #tbContrato td[style*="#952c0b"] {
    color: #fecaca !important;
    background-color: rgba(220, 38, 38, 0.28) !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente #tbContrato td[style*="#816000"],
html[data-com4-theme="dark"] body.portal-com4-atendente #tbContrato td[style*="#ffeb3b"],
body.portal-com4-atendente.com4-theme-dark #tbContrato td[style*="#816000"] {
    color: #fef08a !important;
    background-color: rgba(234, 179, 8, 0.22) !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente #tbContrato td[style*="color:blue"],
html[data-com4-theme="dark"] body.portal-com4-atendente #tbContrato td[style*="color: blue"],
body.portal-com4-atendente.com4-theme-dark #tbContrato td[style*="color:blue"] {
    color: #93c5fd !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente #tbContrato td[style*="color:brown"],
html[data-com4-theme="dark"] body.portal-com4-atendente #tbContrato td[style*="color: brown"],
body.portal-com4-atendente.com4-theme-dark #tbContrato td[style*="color:brown"] {
    color: #fdba74 !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente #tbContrato td[style*="#EE7600"],
html[data-com4-theme="dark"] body.portal-com4-atendente #tbContrato td[style*="color:#EE7600"],
body.portal-com4-atendente.com4-theme-dark #tbContrato td[style*="#EE7600"] {
    color: #fdba74 !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente #tbContrato td[style*="#f69a9a"],
body.portal-com4-atendente.com4-theme-dark #tbContrato td[style*="#f69a9a"] {
    color: #fecaca !important;
    background-color: rgba(239, 68, 68, 0.32) !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente #tbContrato td a[style*="#952c0b"],
body.portal-com4-atendente.com4-theme-dark #tbContrato td a[style*="#952c0b"] {
    color: #fecaca !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente #tbContratoItem td[style*="color:red"],
html[data-com4-theme="dark"] body.portal-com4-atendente #tbContratoItem td[style*="color: red"],
body.portal-com4-atendente.com4-theme-dark #tbContratoItem td[style*="color:red"] {
    color: #fca5a5 !important;
    font-weight: 600;
}

html[data-com4-theme="dark"] body.portal-com4-atendente #tbContratoItem td[style*="color:blue"],
html[data-com4-theme="dark"] body.portal-com4-atendente #tbContratoItem td[style*="color: blue"],
body.portal-com4-atendente.com4-theme-dark #tbContratoItem td[style*="color:blue"] {
    color: #93c5fd !important;
    font-weight: 600;
}

html[data-com4-theme="dark"] body.portal-com4-atendente #myTabContratoItem b[style*="color:blue"],
body.portal-com4-atendente.com4-theme-dark #myTabContratoItem b[style*="color:blue"] {
    color: #93c5fd !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .linhaS,
body.portal-com4-atendente.com4-theme-dark .linhaS {
    background-color: rgba(245, 158, 11, 0.32) !important;
    color: #fef3c7 !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .linhaHover,
body.portal-com4-atendente.com4-theme-dark .linhaHover {
    background-color: rgba(245, 158, 11, 0.18) !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente #tbContrato tbody tr:hover td,
html[data-com4-theme="dark"] body.portal-com4-atendente #tbContratoItem tbody tr:hover td,
body.portal-com4-atendente.com4-theme-dark #tbContrato tbody tr:hover td,
body.portal-com4-atendente.com4-theme-dark #tbContratoItem tbody tr:hover td {
    background-color: #334155 !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente span[style*="color: #6e6868"],
html[data-com4-theme="dark"] body.portal-com4-atendente span[style*="color:#6e6868"],
body.portal-com4-atendente.com4-theme-dark span[style*="color: #6e6868"] {
    color: #94a3b8 !important;
}

/* Popover e tooltip Bootstrap (append no body) — evita texto claro em fundo branco */
html[data-com4-theme="dark"] .popover,
body.portal-com4-atendente.com4-theme-dark .popover,
body.portal-com4-cliente.com4-theme-dark .popover {
    background-color: #1e293b !important;
    border-color: #475569 !important;
    color: #f1f5f9 !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

html[data-com4-theme="dark"] .popover .popover-title,
body.portal-com4-atendente.com4-theme-dark .popover .popover-title,
body.portal-com4-cliente.com4-theme-dark .popover .popover-title {
    background-color: #334155 !important;
    border-bottom-color: #475569 !important;
    color: #f8fafc !important;
}

html[data-com4-theme="dark"] .popover .popover-content,
body.portal-com4-atendente.com4-theme-dark .popover .popover-content,
body.portal-com4-cliente.com4-theme-dark .popover .popover-content {
    background-color: #1e293b !important;
    color: #f1f5f9 !important;
}

html[data-com4-theme="dark"] .popover.top > .arrow,
body.portal-com4-atendente.com4-theme-dark .popover.top > .arrow,
body.portal-com4-cliente.com4-theme-dark .popover.top > .arrow {
    border-top-color: #475569;
}

html[data-com4-theme="dark"] .popover.top > .arrow:after,
body.portal-com4-atendente.com4-theme-dark .popover.top > .arrow:after,
body.portal-com4-cliente.com4-theme-dark .popover.top > .arrow:after {
    border-top-color: #334155;
}

html[data-com4-theme="dark"] .popover.right > .arrow,
body.portal-com4-atendente.com4-theme-dark .popover.right > .arrow,
body.portal-com4-cliente.com4-theme-dark .popover.right > .arrow {
    border-right-color: #475569;
}

html[data-com4-theme="dark"] .popover.right > .arrow:after,
body.portal-com4-atendente.com4-theme-dark .popover.right > .arrow:after,
body.portal-com4-cliente.com4-theme-dark .popover.right > .arrow:after {
    border-right-color: #1e293b;
}

html[data-com4-theme="dark"] .popover.bottom > .arrow,
body.portal-com4-atendente.com4-theme-dark .popover.bottom > .arrow,
body.portal-com4-cliente.com4-theme-dark .popover.bottom > .arrow {
    border-bottom-color: #475569;
}

html[data-com4-theme="dark"] .popover.bottom > .arrow:after,
body.portal-com4-atendente.com4-theme-dark .popover.bottom > .arrow:after,
body.portal-com4-cliente.com4-theme-dark .popover.bottom > .arrow:after {
    border-bottom-color: #1e293b;
}

html[data-com4-theme="dark"] .popover.left > .arrow,
body.portal-com4-atendente.com4-theme-dark .popover.left > .arrow,
body.portal-com4-cliente.com4-theme-dark .popover.left > .arrow {
    border-left-color: #475569;
}

html[data-com4-theme="dark"] .popover.left > .arrow:after,
body.portal-com4-atendente.com4-theme-dark .popover.left > .arrow:after,
body.portal-com4-cliente.com4-theme-dark .popover.left > .arrow:after {
    border-left-color: #1e293b;
}

html[data-com4-theme="dark"] .tooltip-inner,
body.portal-com4-atendente.com4-theme-dark .tooltip-inner,
body.portal-com4-cliente.com4-theme-dark .tooltip-inner {
    background-color: #334155 !important;
    color: #f8fafc !important;
    border: 1px solid #475569;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

html[data-com4-theme="dark"] .tooltip.top .tooltip-arrow,
body.portal-com4-atendente.com4-theme-dark .tooltip.top .tooltip-arrow,
body.portal-com4-cliente.com4-theme-dark .tooltip.top .tooltip-arrow {
    border-top-color: #334155;
}

html[data-com4-theme="dark"] .tooltip.right .tooltip-arrow,
body.portal-com4-atendente.com4-theme-dark .tooltip.right .tooltip-arrow,
body.portal-com4-cliente.com4-theme-dark .tooltip.right .tooltip-arrow {
    border-right-color: #334155;
}

html[data-com4-theme="dark"] .tooltip.bottom .tooltip-arrow,
body.portal-com4-atendente.com4-theme-dark .tooltip.bottom .tooltip-arrow,
body.portal-com4-cliente.com4-theme-dark .tooltip.bottom .tooltip-arrow {
    border-bottom-color: #334155;
}

html[data-com4-theme="dark"] .tooltip.left .tooltip-arrow,
body.portal-com4-atendente.com4-theme-dark .tooltip.left .tooltip-arrow,
body.portal-com4-cliente.com4-theme-dark .tooltip.left .tooltip-arrow {
    border-left-color: #334155;
}

/* Controles nativos (ícone de calendário/hora) e ícones no modo escuro */
html[data-com4-theme="dark"],
html[data-com4-theme="dark"] body.portal-com4-atendente,
html[data-com4-theme="dark"] body.portal-com4-cliente,
body.portal-com4-atendente.com4-theme-dark,
body.portal-com4-cliente.com4-theme-dark {
    color-scheme: dark;
}

html[data-com4-theme="dark"] body.portal-com4-atendente input[type="date"],
html[data-com4-theme="dark"] body.portal-com4-atendente input[type="time"],
html[data-com4-theme="dark"] body.portal-com4-atendente input[type="datetime-local"],
html[data-com4-theme="dark"] body.portal-com4-atendente input[type="month"],
html[data-com4-theme="dark"] body.portal-com4-atendente input[type="week"],
html[data-com4-theme="dark"] body.portal-com4-cliente input[type="date"],
html[data-com4-theme="dark"] body.portal-com4-cliente input[type="time"],
html[data-com4-theme="dark"] body.portal-com4-cliente input[type="datetime-local"],
body.portal-com4-atendente.com4-theme-dark input[type="date"],
body.portal-com4-atendente.com4-theme-dark input[type="time"],
body.portal-com4-atendente.com4-theme-dark input[type="datetime-local"],
body.portal-com4-cliente.com4-theme-dark input[type="date"],
body.portal-com4-cliente.com4-theme-dark input[type="time"],
body.portal-com4-cliente.com4-theme-dark input[type="datetime-local"] {
    background-color: #263548 !important;
    color: #f1f5f9 !important;
    border: 1px solid #64748b !important;
    border-radius: 4px;
    padding: 4px 8px;
    color-scheme: dark;
}

html[data-com4-theme="dark"] body.portal-com4-atendente input[type="date"]::-webkit-calendar-picker-indicator,
html[data-com4-theme="dark"] body.portal-com4-atendente input[type="datetime-local"]::-webkit-calendar-picker-indicator,
html[data-com4-theme="dark"] body.portal-com4-atendente input[type="month"]::-webkit-calendar-picker-indicator,
html[data-com4-theme="dark"] body.portal-com4-atendente input[type="week"]::-webkit-calendar-picker-indicator,
html[data-com4-theme="dark"] body.portal-com4-atendente input[type="time"]::-webkit-calendar-picker-indicator,
html[data-com4-theme="dark"] body.portal-com4-cliente input[type="date"]::-webkit-calendar-picker-indicator,
html[data-com4-theme="dark"] body.portal-com4-cliente input[type="datetime-local"]::-webkit-calendar-picker-indicator,
body.portal-com4-atendente.com4-theme-dark input[type="date"]::-webkit-calendar-picker-indicator,
body.portal-com4-atendente.com4-theme-dark input[type="datetime-local"]::-webkit-calendar-picker-indicator,
body.portal-com4-atendente.com4-theme-dark input[type="time"]::-webkit-calendar-picker-indicator,
body.portal-com4-cliente.com4-theme-dark input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.9) brightness(1.25);
    cursor: pointer;
    opacity: 1;
}

html[data-com4-theme="dark"] body.portal-com4-atendente input[type="date"]::-webkit-datetime-edit,
html[data-com4-theme="dark"] body.portal-com4-atendente input[type="date"]::-webkit-datetime-edit-fields-wrapper,
html[data-com4-theme="dark"] body.portal-com4-atendente input[type="time"]::-webkit-datetime-edit,
html[data-com4-theme="dark"] body.portal-com4-cliente input[type="date"]::-webkit-datetime-edit,
body.portal-com4-atendente.com4-theme-dark input[type="date"]::-webkit-datetime-edit,
body.portal-com4-cliente.com4-theme-dark input[type="date"]::-webkit-datetime-edit {
    color: #e2e8f0;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .input-group-addon,
html[data-com4-theme="dark"] body.portal-com4-cliente .input-group-addon,
body.portal-com4-atendente.com4-theme-dark .input-group-addon,
body.portal-com4-cliente.com4-theme-dark .input-group-addon {
    background-color: #334155 !important;
    color: #e2e8f0 !important;
    border-color: #475569 !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente #main .glyphicon,
html[data-com4-theme="dark"] body.portal-com4-atendente #content .glyphicon,
html[data-com4-theme="dark"] body.portal-com4-atendente .modal-body .glyphicon,
html[data-com4-theme="dark"] body.portal-com4-cliente .glyphicon,
body.portal-com4-atendente.com4-theme-dark #main .glyphicon,
body.portal-com4-atendente.com4-theme-dark #content .glyphicon,
body.portal-com4-cliente.com4-theme-dark .glyphicon {
    color: #cbd5e1;
}

html[data-com4-theme="dark"] body.portal-com4-atendente #main i.fa,
html[data-com4-theme="dark"] body.portal-com4-atendente #content i.fa,
html[data-com4-theme="dark"] body.portal-com4-atendente .modal-body i.fa,
html[data-com4-theme="dark"] body.portal-com4-atendente .jarviswidget i.fa,
html[data-com4-theme="dark"] body.portal-com4-cliente i.fa,
body.portal-com4-atendente.com4-theme-dark #main i.fa,
body.portal-com4-atendente.com4-theme-dark #content i.fa,
body.portal-com4-cliente.com4-theme-dark i.fa {
    color: #cbd5e1;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .btn i.fa,
html[data-com4-theme="dark"] body.portal-com4-atendente .btn-group i.fa,
html[data-com4-theme="dark"] body.portal-com4-cliente .btn i.fa,
body.portal-com4-atendente.com4-theme-dark .btn i.fa,
body.portal-com4-cliente.com4-theme-dark .btn i.fa {
    color: inherit;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .text-muted,
html[data-com4-theme="dark"] body.portal-com4-atendente .text-muted i.fa,
html[data-com4-theme="dark"] body.portal-com4-cliente .text-muted,
body.portal-com4-atendente.com4-theme-dark .text-muted,
body.portal-com4-cliente.com4-theme-dark .text-muted {
    color: #94a3b8 !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .ui-datepicker,
html[data-com4-theme="dark"] body.portal-com4-atendente .ui-datepicker .ui-datepicker-header,
html[data-com4-theme="dark"] body.portal-com4-atendente .datepicker,
body.portal-com4-atendente.com4-theme-dark .ui-datepicker,
body.portal-com4-atendente.com4-theme-dark .datepicker {
    background: #1e293b !important;
    color: #e2e8f0 !important;
    border-color: #475569 !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .ui-datepicker td a,
html[data-com4-theme="dark"] body.portal-com4-atendente .ui-datepicker th,
html[data-com4-theme="dark"] body.portal-com4-atendente .datepicker table tr td span,
html[data-com4-theme="dark"] body.portal-com4-atendente .datepicker table tr td.day,
body.portal-com4-atendente.com4-theme-dark .ui-datepicker td a,
body.portal-com4-atendente.com4-theme-dark .datepicker table tr td.day {
    color: #e2e8f0 !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .ui-datepicker .ui-state-active,
html[data-com4-theme="dark"] body.portal-com4-atendente .datepicker table tr td.active,
body.portal-com4-atendente.com4-theme-dark .ui-datepicker .ui-state-active {
    background: #f59e0b !important;
    color: #0f172a !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .ui-datepicker .ui-state-hover,
html[data-com4-theme="dark"] body.portal-com4-atendente .datepicker table tr td.day:hover,
body.portal-com4-atendente.com4-theme-dark .ui-datepicker .ui-state-hover {
    background: #334155 !important;
    color: #fbbf24 !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .ui-datepicker-prev,
html[data-com4-theme="dark"] body.portal-com4-atendente .ui-datepicker-next,
body.portal-com4-atendente.com4-theme-dark .ui-datepicker-prev,
body.portal-com4-atendente.com4-theme-dark .ui-datepicker-next {
    filter: invert(0.85) brightness(1.2);
}

/* Filtros de relatório (Administração) — painéis, radios e DataTables */
html[data-com4-theme="dark"] body.portal-com4-atendente #form_RelChamado > .container-fluid,
html[data-com4-theme="dark"] body.portal-com4-atendente #content form .container-fluid[style*="border"],
body.portal-com4-atendente.com4-theme-dark #form_RelChamado > .container-fluid {
    border: 1px solid #64748b !important;
    background-color: rgba(38, 53, 72, 0.55) !important;
    border-radius: 4px;
}

html[data-com4-theme="dark"] body.portal-com4-atendente #content hr,
body.portal-com4-atendente.com4-theme-dark #content hr {
    border-color: #475569 !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente #content [style*="border-top: 1px solid #eee"],
html[data-com4-theme="dark"] body.portal-com4-atendente #content [style*="border-top:1px solid #eee"],
body.portal-com4-atendente.com4-theme-dark #content [style*="border-top: 1px solid #eee"] {
    border-top-color: #475569 !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .radio-inline,
html[data-com4-theme="dark"] body.portal-com4-atendente .checkbox-inline,
html[data-com4-theme="dark"] body.portal-com4-atendente label.radio,
html[data-com4-theme="dark"] body.portal-com4-atendente label.checkbox,
body.portal-com4-atendente.com4-theme-dark .radio-inline,
body.portal-com4-atendente.com4-theme-dark .checkbox-inline {
    color: #e2e8f0 !important;
    font-weight: 500;
}

html[data-com4-theme="dark"] body.portal-com4-atendente input[type="radio"],
html[data-com4-theme="dark"] body.portal-com4-atendente input[type="checkbox"],
body.portal-com4-atendente.com4-theme-dark input[type="radio"],
body.portal-com4-atendente.com4-theme-dark input[type="checkbox"] {
    accent-color: #f59e0b;
}

html[data-com4-theme="dark"] body.portal-com4-atendente select.form-control option,
body.portal-com4-atendente.com4-theme-dark select.form-control option {
    background-color: #1e293b;
    color: #f1f5f9;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .relatorio-chamado-result,
body.portal-com4-atendente.com4-theme-dark .relatorio-chamado-result {
    border-top-color: #475569 !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .dt-relatorio-fix div.dataTables_filter label,
html[data-com4-theme="dark"] body.portal-com4-atendente .dt-relatorio-fix div.dataTables_length label,
html[data-com4-theme="dark"] body.portal-com4-atendente .dataTables_wrapper .dataTables_info,
html[data-com4-theme="dark"] body.portal-com4-atendente .dataTables_wrapper .dataTables_paginate,
body.portal-com4-atendente.com4-theme-dark .dataTables_wrapper .dataTables_info {
    color: #cbd5e1 !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .dt-relatorio-fix div.dataTables_filter input,
html[data-com4-theme="dark"] body.portal-com4-atendente .dt-relatorio-fix div.dataTables_length select,
html[data-com4-theme="dark"] body.portal-com4-atendente .dataTables_wrapper .dataTables_filter input,
html[data-com4-theme="dark"] body.portal-com4-atendente .dataTables_wrapper .dataTables_length select,
body.portal-com4-atendente.com4-theme-dark .dataTables_wrapper .dataTables_filter input {
    background-color: #263548 !important;
    color: #f1f5f9 !important;
    border: 1px solid #64748b !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente table.dataTable thead th,
html[data-com4-theme="dark"] body.portal-com4-atendente table.dataTable tbody td,
body.portal-com4-atendente.com4-theme-dark table.dataTable thead th,
body.portal-com4-atendente.com4-theme-dark table.dataTable tbody td {
    border-color: #475569 !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .dataTables_wrapper .paginate_button,
body.portal-com4-atendente.com4-theme-dark .dataTables_wrapper .paginate_button {
    color: #cbd5e1 !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .dataTables_wrapper .paginate_button.current,
html[data-com4-theme="dark"] body.portal-com4-atendente .dataTables_wrapper .paginate_button:hover,
body.portal-com4-atendente.com4-theme-dark .dataTables_wrapper .paginate_button.current {
    background: #334155 !important;
    color: #fbbf24 !important;
    border-color: #64748b !important;
}

/* Monitoramento — cards de chamados em aberto e resumo VoIP */
html[data-com4-theme="dark"] body.portal-com4-atendente .partial-chamados-abertos-suporte-root #chamadosEmAberto .alert-info,
body.portal-com4-atendente.com4-theme-dark .partial-chamados-abertos-suporte-root #chamadosEmAberto .alert-info {
    background-color: #1e3a5f !important;
    border-color: #3b82f6 !important;
    color: #e0f2fe !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .partial-chamados-abertos-suporte-root #chamadosEmAberto .panel-default,
body.portal-com4-atendente.com4-theme-dark .partial-chamados-abertos-suporte-root #chamadosEmAberto .panel-default {
    background-color: #1e293b !important;
    border-color: #64748b !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .partial-chamados-abertos-suporte-root #chamadosEmAberto .panel-heading,
body.portal-com4-atendente.com4-theme-dark .partial-chamados-abertos-suporte-root #chamadosEmAberto .panel-heading {
    background-color: #334155 !important;
    border-color: #64748b !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .partial-chamados-abertos-suporte-root #chamadosEmAberto .panel-title,
html[data-com4-theme="dark"] body.portal-com4-atendente .partial-chamados-abertos-suporte-root #chamadosEmAberto .panel-heading h4,
body.portal-com4-atendente.com4-theme-dark .partial-chamados-abertos-suporte-root #chamadosEmAberto .panel-title {
    color: #f8fafc !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .partial-chamados-abertos-suporte-root #chamadosEmAberto .panel-body,
body.portal-com4-atendente.com4-theme-dark .partial-chamados-abertos-suporte-root #chamadosEmAberto .panel-body {
    color: #e2e8f0 !important;
    background-color: #1e293b !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .partial-chamados-abertos-suporte-root #chamadosEmAberto .panel-body strong,
body.portal-com4-atendente.com4-theme-dark .partial-chamados-abertos-suporte-root #chamadosEmAberto .panel-body strong {
    color: #fbbf24;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .partial-chamados-abertos-suporte-root #chamadosEmAberto .btn-default:not(:disabled),
body.portal-com4-atendente.com4-theme-dark .partial-chamados-abertos-suporte-root #chamadosEmAberto .btn-default:not(:disabled) {
    background-color: #475569 !important;
    color: #f8fafc !important;
    border-color: #94a3b8 !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .partial-chamados-abertos-suporte-root #chamadosEmAberto .btn-default:hover:not(:disabled),
body.portal-com4-atendente.com4-theme-dark .partial-chamados-abertos-suporte-root #chamadosEmAberto .btn-default:hover:not(:disabled) {
    background-color: #64748b !important;
    color: #fff !important;
    border-color: #cbd5e1 !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .partial-chamados-abertos-suporte-root #chamadosEmAberto .btn-default:disabled,
body.portal-com4-atendente.com4-theme-dark .partial-chamados-abertos-suporte-root #chamadosEmAberto .btn-default:disabled {
    background-color: #334155 !important;
    color: #cbd5e1 !important;
    border-color: #475569 !important;
    opacity: 1;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .partial-chamados-abertos-suporte-root #chamadosEmAberto .list-group-item-heading,
body.portal-com4-atendente.com4-theme-dark .partial-chamados-abertos-suporte-root #chamadosEmAberto .list-group-item-heading {
    color: #93c5fd !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .partial-chamados-abertos-suporte-root #chamadosEmAberto .list-group-item,
html[data-com4-theme="dark"] body.portal-com4-atendente .partial-chamados-abertos-suporte-root #chamadosEmAberto .list-group a,
body.portal-com4-atendente.com4-theme-dark .partial-chamados-abertos-suporte-root #chamadosEmAberto .list-group a {
    background-color: #263548 !important;
    border-color: #475569 !important;
    color: #e2e8f0 !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .partial-chamados-abertos-suporte-root #chamadosEmAberto .list-group a:hover,
body.portal-com4-atendente.com4-theme-dark .partial-chamados-abertos-suporte-root #chamadosEmAberto .list-group a:hover {
    background-color: #334155 !important;
    color: #f8fafc !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .partial-chamados-abertos-suporte-root .badge,
body.portal-com4-atendente.com4-theme-dark .partial-chamados-abertos-suporte-root .badge {
    background-color: #f59e0b !important;
    color: #0f172a !important;
    font-weight: 700;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .partial-chamados-abertos-suporte-root .card,
html[data-com4-theme="dark"] body.portal-com4-atendente .partial-chamados-abertos-suporte-root #monitoramentoSuporte .card,
body.portal-com4-atendente.com4-theme-dark .partial-chamados-abertos-suporte-root .card {
    background-color: #1e293b !important;
    border: 1px solid #64748b !important;
    color: #e2e8f0 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35) !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .partial-chamados-abertos-suporte-root .card-title,
html[data-com4-theme="dark"] body.portal-com4-atendente .partial-chamados-abertos-suporte-root .card h5.text-dark,
html[data-com4-theme="dark"] body.portal-com4-atendente .partial-chamados-abertos-suporte-root .card-text,
body.portal-com4-atendente.com4-theme-dark .partial-chamados-abertos-suporte-root .card-title,
body.portal-com4-atendente.com4-theme-dark .partial-chamados-abertos-suporte-root .card h5.text-dark {
    color: #f1f5f9 !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .partial-chamados-abertos-suporte-root .text-primary,
body.portal-com4-atendente.com4-theme-dark .partial-chamados-abertos-suporte-root .text-primary {
    color: #60a5fa !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .partial-chamados-abertos-suporte-root .text-success,
body.portal-com4-atendente.com4-theme-dark .partial-chamados-abertos-suporte-root .text-success {
    color: #4ade80 !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .partial-chamados-abertos-suporte-root .text-warning,
body.portal-com4-atendente.com4-theme-dark .partial-chamados-abertos-suporte-root .text-warning {
    color: #fbbf24 !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .partial-chamados-abertos-suporte-root .text-danger,
body.portal-com4-atendente.com4-theme-dark .partial-chamados-abertos-suporte-root .text-danger {
    color: #f87171 !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .partial-chamados-abertos-suporte-root .text-info,
body.portal-com4-atendente.com4-theme-dark .partial-chamados-abertos-suporte-root .text-info {
    color: #38bdf8 !important;
}

html[data-com4-theme="dark"] body.portal-com4-atendente .partial-chamados-abertos-suporte-root .text-muted,
body.portal-com4-atendente.com4-theme-dark .partial-chamados-abertos-suporte-root .text-muted {
    color: #94a3b8 !important;
}

body.portal-com4-cliente .com4-theme-toggle-nav > a {
    padding-top: 14px !important;
    font-size: 16px;
    color: #fbbf24 !important;
}

body.portal-com4-cliente .com4-theme-toggle-nav > a:hover,
body.portal-com4-cliente .com4-theme-toggle-nav > a:focus {
    color: #fde68a !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

body.portal-com4-cliente .com4-theme-switch-nav {
    display: flex;
    align-items: center;
}

body.portal-com4-cliente .com4-theme-switch {
    display: inline-flex;
    align-items: stretch;
    margin: 8px 6px 0 0;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: var(--com4-radius-sm);
    overflow: hidden;
    background: rgba(0, 0, 0, 0.18);
}

body.portal-com4-cliente .com4-theme-switch-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 30px;
    padding: 4px 10px;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.88);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

body.portal-com4-cliente .com4-theme-switch-btn + .com4-theme-switch-btn {
    border-left: 1px solid rgba(255, 255, 255, 0.22);
}

body.portal-com4-cliente .com4-theme-switch-btn:hover,
body.portal-com4-cliente .com4-theme-switch-btn:focus {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    outline: none;
}

body.portal-com4-cliente .com4-theme-switch-btn.is-active {
    background: rgba(245, 158, 11, 0.28);
    color: #fde68a;
    box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.45);
}

body.portal-com4-cliente .com4-theme-switch-btn .fa {
    font-size: 14px;
    pointer-events: none;
}

body.portal-com4-cliente .com4-theme-switch-label {
    pointer-events: none;
    white-space: nowrap;
}

@media (max-width: 767px) {
    body.portal-com4-cliente .com4-theme-switch-label {
        display: none;
    }

    body.portal-com4-cliente .com4-theme-switch-btn {
        padding: 4px 8px;
    }
}

html[data-com4-theme="dark"] body.portal-com4-cliente #main,
body.portal-com4-cliente.com4-theme-dark #main {
    background: var(--com4-surface) !important;
    color: var(--com4-text);
}

html[data-com4-theme="dark"] body.portal-com4-cliente .panel-default,
body.portal-com4-cliente.com4-theme-dark .panel-default {
    background-color: var(--com4-elevated) !important;
    border-color: var(--com4-border) !important;
    color: var(--com4-text) !important;
}

html[data-com4-theme="dark"] body.portal-com4-cliente .panel-default > .panel-heading,
body.portal-com4-cliente.com4-theme-dark .panel-default > .panel-heading {
    background-color: #334155 !important;
    color: #f1f5f9 !important;
    border-color: var(--com4-border) !important;
}

html[data-com4-theme="dark"] body.portal-com4-cliente .navbar-inverse .navbar-nav > .open > a,
html[data-com4-theme="dark"] body.portal-com4-cliente .navbar-inverse .navbar-nav > .open > a:hover,
html[data-com4-theme="dark"] body.portal-com4-cliente .navbar-inverse .navbar-nav > .open > a:focus,
body.portal-com4-cliente.com4-theme-dark .navbar-inverse .navbar-nav > .open > a,
body.portal-com4-cliente.com4-theme-dark .navbar-inverse .navbar-nav > .open > a:hover,
body.portal-com4-cliente.com4-theme-dark .navbar-inverse .navbar-nav > .open > a:focus {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
}

html[data-com4-theme="dark"] body.portal-com4-cliente .dropdown-menu,
body.portal-com4-cliente.com4-theme-dark .dropdown-menu {
    background-color: #1e293b !important;
    border-color: #475569 !important;
    color: #e2e8f0 !important;
}

html[data-com4-theme="dark"] body.portal-com4-cliente .dropdown-menu > li > a,
body.portal-com4-cliente.com4-theme-dark .dropdown-menu > li > a {
    color: #e2e8f0 !important;
}

html[data-com4-theme="dark"] body.portal-com4-cliente .dropdown-menu > li > a:hover,
body.portal-com4-cliente.com4-theme-dark .dropdown-menu > li > a:hover {
    background-color: #334155 !important;
    color: #f8fafc !important;
}

/* Botão de cartão (Chamados / Financeiro) */
body.portal-com4-cliente .btn-cliente-cartao {
    float: right;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f5f5f5;
    border: 1px solid #808080a3;
    border-radius: 7px;
    padding: 4px 10px;
    font-size: 12px;
    color: #1e293b !important;
    font-weight: 600;
}

body.portal-com4-cliente .btn-cliente-cartao:hover,
body.portal-com4-cliente .btn-cliente-cartao:focus {
    background: #e2e8f0;
    border-color: #64748b;
    color: #0f172a !important;
}

body.portal-com4-cliente .btn-cliente-cartao-icon {
    width: 22px;
    height: 19px;
    flex-shrink: 0;
}

html[data-com4-theme="dark"] body.portal-com4-cliente .btn-cliente-cartao,
body.portal-com4-cliente.com4-theme-dark .btn-cliente-cartao {
    background: #334155 !important;
    border-color: #64748b !important;
    color: #f1f5f9 !important;
}

html[data-com4-theme="dark"] body.portal-com4-cliente .btn-cliente-cartao:hover,
html[data-com4-theme="dark"] body.portal-com4-cliente .btn-cliente-cartao:focus,
body.portal-com4-cliente.com4-theme-dark .btn-cliente-cartao:hover,
body.portal-com4-cliente.com4-theme-dark .btn-cliente-cartao:focus {
    background: #475569 !important;
    border-color: #94a3b8 !important;
    color: #fff !important;
}

/* Abas, painéis e tabelas — portal cliente (modo escuro) */
html[data-com4-theme="dark"] body.portal-com4-cliente .panel-cliente,
body.portal-com4-cliente.com4-theme-dark .panel-cliente {
    background-image: none !important;
    background-color: var(--com4-elevated) !important;
    border-color: #475569 !important;
    color: var(--com4-text) !important;
}

html[data-com4-theme="dark"] body.portal-com4-cliente .panel-heading-cliente,
html[data-com4-theme="dark"] body.portal-com4-cliente .panel-heading.panel-heading-cliente,
body.portal-com4-cliente.com4-theme-dark .panel-heading-cliente,
body.portal-com4-cliente.com4-theme-dark .panel-heading.panel-heading-cliente {
    background-image: none !important;
    background-color: #334155 !important;
    color: #f8fafc !important;
    border-color: #475569 !important;
}

html[data-com4-theme="dark"] body.portal-com4-cliente .nav-tabs,
body.portal-com4-cliente.com4-theme-dark .nav-tabs {
    border-bottom-color: #475569;
}

html[data-com4-theme="dark"] body.portal-com4-cliente .nav-tabs > li > a,
body.portal-com4-cliente.com4-theme-dark .nav-tabs > li > a {
    color: #94a3b8;
    background: transparent;
    border-color: transparent;
}

html[data-com4-theme="dark"] body.portal-com4-cliente .nav-tabs > li > a:hover,
html[data-com4-theme="dark"] body.portal-com4-cliente .nav-tabs > li > a:focus,
body.portal-com4-cliente.com4-theme-dark .nav-tabs > li > a:hover,
body.portal-com4-cliente.com4-theme-dark .nav-tabs > li > a:focus {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.06);
    border-color: #475569 #475569 transparent;
}

html[data-com4-theme="dark"] body.portal-com4-cliente .nav-tabs > li.active > a,
html[data-com4-theme="dark"] body.portal-com4-cliente .nav-tabs > li.active > a:hover,
html[data-com4-theme="dark"] body.portal-com4-cliente .nav-tabs > li.active > a:focus,
body.portal-com4-cliente.com4-theme-dark .nav-tabs > li.active > a,
body.portal-com4-cliente.com4-theme-dark .nav-tabs > li.active > a:hover,
body.portal-com4-cliente.com4-theme-dark .nav-tabs > li.active > a:focus {
    color: #f8fafc !important;
    background-color: #1e293b !important;
    border-color: #475569 #475569 transparent !important;
}

html[data-com4-theme="dark"] body.portal-com4-cliente .tab-content,
body.portal-com4-cliente.com4-theme-dark .tab-content {
    color: var(--com4-text);
}

html[data-com4-theme="dark"] body.portal-com4-cliente table th,
html[data-com4-theme="dark"] body.portal-com4-cliente .table > thead > tr > th,
html[data-com4-theme="dark"] body.portal-com4-cliente .tabelaFormat thead tr th,
body.portal-com4-cliente.com4-theme-dark table th,
body.portal-com4-cliente.com4-theme-dark .table > thead > tr > th,
body.portal-com4-cliente.com4-theme-dark .tabelaFormat thead tr th {
    background: linear-gradient(180deg, #334155 0%, #1e293b 100%) !important;
    color: #f1f5f9 !important;
    border-color: #475569 !important;
}

html[data-com4-theme="dark"] body.portal-com4-cliente .tabelaFormat tbody tr td,
html[data-com4-theme="dark"] body.portal-com4-cliente .table > tbody > tr > td,
body.portal-com4-cliente.com4-theme-dark .tabelaFormat tbody tr td,
body.portal-com4-cliente.com4-theme-dark .table > tbody > tr > td {
    background-color: var(--com4-elevated) !important;
    color: #e2e8f0 !important;
    border-color: #475569 !important;
}

html[data-com4-theme="dark"] body.portal-com4-cliente .tabelaFormat tbody tr:hover td,
html[data-com4-theme="dark"] body.portal-com4-cliente .table > tbody > tr:hover > td,
body.portal-com4-cliente.com4-theme-dark .tabelaFormat tbody tr:hover td,
body.portal-com4-cliente.com4-theme-dark .table > tbody > tr:hover > td {
    background-color: #273449 !important;
}

html[data-com4-theme="dark"] body.portal-com4-cliente .linhaHover_Cliente,
html[data-com4-theme="dark"] body.portal-com4-cliente .linhaS_Cliente,
body.portal-com4-cliente.com4-theme-dark .linhaHover_Cliente,
body.portal-com4-cliente.com4-theme-dark .linhaS_Cliente {
    background: #273449 !important;
    color: #e2e8f0 !important;
}

html[data-com4-theme="dark"] body.portal-com4-cliente .alert-info,
body.portal-com4-cliente.com4-theme-dark .alert-info {
    background-color: #1e3a5f !important;
    border-color: #2563eb !important;
    color: #dbeafe !important;
}

html[data-com4-theme="dark"] body.portal-com4-cliente .popUpInformacao,
html[data-com4-theme="dark"] body.portal-com4-cliente #popUpInformacaoFollowUp,
body.portal-com4-cliente.com4-theme-dark .popUpInformacao,
body.portal-com4-cliente.com4-theme-dark #popUpInformacaoFollowUp {
    background-color: #1e293b !important;
    border-color: #475569 !important;
    color: #e2e8f0 !important;
}

html[data-com4-theme="dark"] body.portal-com4-cliente .popUpInformacao h4,
html[data-com4-theme="dark"] body.portal-com4-cliente .popUpInformacao .p-cliente,
body.portal-com4-cliente.com4-theme-dark .popUpInformacao h4,
body.portal-com4-cliente.com4-theme-dark .popUpInformacao .p-cliente {
    color: #e2e8f0 !important;
}

html[data-com4-theme="dark"] body.portal-com4-cliente .a-cliente,
body.portal-com4-cliente.com4-theme-dark .a-cliente {
    color: #fbbf24 !important;
}

html[data-com4-theme="dark"] body.portal-com4-cliente .modal-content,
body.portal-com4-cliente.com4-theme-dark .modal-content {
    background-color: #1e293b !important;
    border-color: #475569 !important;
    color: #e2e8f0 !important;
}

html[data-com4-theme="dark"] body.portal-com4-cliente .modal-header,
body.portal-com4-cliente.com4-theme-dark .modal-header {
    background-color: #334155 !important;
    border-color: #475569 !important;
    color: #f8fafc !important;
}

html[data-com4-theme="dark"] body.portal-com4-cliente .modal-body,
html[data-com4-theme="dark"] body.portal-com4-cliente .modal-footer,
body.portal-com4-cliente.com4-theme-dark .modal-body,
body.portal-com4-cliente.com4-theme-dark .modal-footer {
    background-color: #1e293b !important;
    border-color: #475569 !important;
    color: #e2e8f0 !important;
}

html[data-com4-theme="dark"] body.portal-com4-cliente .modal-header .close,
body.portal-com4-cliente.com4-theme-dark .modal-header .close {
    color: #f8fafc !important;
    opacity: 0.85;
    text-shadow: none;
    background: transparent !important;
}

html[data-com4-theme="dark"] body.portal-com4-cliente hr,
body.portal-com4-cliente.com4-theme-dark hr {
    border-color: #475569 !important;
}

/* ========== Escala de fonte — tabelas, formulários e widgets (px fixo / inline small) ========== */
body.portal-com4-atendente #main,
body.portal-com4-atendente #content,
body.portal-com4-atendente .jarviswidget > div,
body.portal-com4-atendente .jarviswidget .widget-body,
body.portal-com4-cliente #main,
body.portal-com4-cliente .container-fluid {
    font-size: 1rem !important;
}

body.portal-com4-atendente #main table,
body.portal-com4-atendente #content table,
body.portal-com4-atendente table.table,
body.portal-com4-atendente table.tabelaFormat,
body.portal-com4-atendente .table-responsive table,
body.portal-com4-cliente #main table,
body.portal-com4-cliente table.table,
body.portal-com4-cliente table.tabelaFormat,
body.portal-com4-cliente .table-responsive table {
    font-size: 1rem !important;
}

body.portal-com4-atendente #main table > thead > tr > th,
body.portal-com4-atendente #main table > tbody > tr > td,
body.portal-com4-atendente #main table > tfoot > tr > td,
body.portal-com4-atendente #content table > thead > tr > th,
body.portal-com4-atendente #content table > tbody > tr > td,
body.portal-com4-atendente #content table > tfoot > tr > td,
body.portal-com4-atendente table.table > thead > tr > th,
body.portal-com4-atendente table.table > tbody > tr > td,
body.portal-com4-atendente table.table > tfoot > tr > td,
body.portal-com4-atendente table.tabelaFormat > thead > tr > th,
body.portal-com4-atendente table.tabelaFormat > tbody > tr > td,
body.portal-com4-atendente .tabelaFormat tbody tr td,
body.portal-com4-cliente table.table > thead > tr > th,
body.portal-com4-cliente table.table > tbody > tr > td,
body.portal-com4-cliente table.tabelaFormat > thead > tr > th,
body.portal-com4-cliente table.tabelaFormat > tbody > tr > td {
    font-size: 1rem !important;
}

body.portal-com4-atendente #main label,
body.portal-com4-atendente #main .control-label,
body.portal-com4-atendente #content label,
body.portal-com4-atendente #content .control-label,
body.portal-com4-atendente .smart-form label,
body.portal-com4-atendente .form-horizontal .control-label,
body.portal-com4-cliente label,
body.portal-com4-cliente .control-label {
    font-size: 1rem !important;
}

body.portal-com4-atendente #main .form-control,
body.portal-com4-atendente #content .form-control,
body.portal-com4-atendente #main input.form-control,
body.portal-com4-atendente #main select.form-control,
body.portal-com4-atendente #main textarea.form-control,
body.portal-com4-atendente #content input.form-control,
body.portal-com4-atendente #content select.form-control,
body.portal-com4-atendente #content textarea.form-control,
body.portal-com4-atendente #main input.input-sm,
body.portal-com4-atendente #content input.input-sm,
body.portal-com4-cliente .form-control {
    font-size: 1rem !important;
}

body.portal-com4-atendente #main .btn,
body.portal-com4-atendente #content .btn,
body.portal-com4-atendente #main .label,
body.portal-com4-atendente #content .label,
body.portal-com4-cliente .btn {
    font-size: 0.923rem !important;
}

body.portal-com4-atendente #ribbon .breadcrumb,
body.portal-com4-atendente #ribbon .breadcrumb > li {
    font-size: 1rem !important;
}
