
/* Tema global: cores apenas; preserva controles de visibilidade. */
.app .topbar {
    gap:16px;
    flex-wrap:wrap;
}
#sgp-alternar-tema {
    min-height:44px;
    padding:10px 14px;
    flex-shrink:0;
    border:1px solid #cbd5e1;
    border-radius:9px;
    background:#f8fafc;
    color:#20334b;
    font:inherit;
    font-size:13px;
    font-weight:600;
    cursor:pointer;
}
#sgp-alternar-tema:focus-visible {
    outline:3px solid #38bdf8;
    outline-offset:3px;
}
html[data-sgp-theme="escuro"] body {
    background:#0e131c;
}
html[data-sgp-theme="escuro"] .app {
    color-scheme:dark;
    color:#e5edf7;
    background:#0e131c;
}
html[data-sgp-theme="escuro"] #sgp-alternar-tema {
    background:#203249 !important;
    border-color:#405c7c !important;
    color:#e6f3ff !important;
}
html[data-sgp-theme="escuro"] .modal-overlay:not(#tela-login) {
    background:rgba(3,8,16,.75) !important;
    color-scheme:dark;
}
html[data-sgp-theme="escuro"] dialog::backdrop {
    background:rgba(3,8,16,.75);
}

html[data-sgp-theme="escuro"] body :is(.app, .modal-overlay, dialog):not(#tela-login):not(#sgp-tema-excluido) :is(.main, .page) {

    background:#0e131c !important;
    color:#e5edf7 !important;

}

html[data-sgp-theme="escuro"] body :is(.app, .modal-overlay, dialog):not(#tela-login):not(#sgp-tema-excluido) :is(.sidebar, .topbar) {

    background:#171f2c !important;
    border-color:#2c394c !important;
    color:#e5edf7 !important;
    box-shadow:none !important;

}

html[data-sgp-theme="escuro"] body :is(.app, .modal-overlay, dialog):not(#tela-login):not(#sgp-tema-excluido) .sidebar .menu {
color:#c4d1e2 !important;
}

html[data-sgp-theme="escuro"] body :is(.app, .modal-overlay, dialog):not(#tela-login):not(#sgp-tema-excluido) .sidebar .menu:hover {
background:#24354b !important;
}

html[data-sgp-theme="escuro"] body :is(.app, .modal-overlay, dialog):not(#tela-login):not(#sgp-tema-excluido) .sidebar .menu.active {

    background:#126da4 !important;
    color:#fff !important;

}

html[data-sgp-theme="escuro"] body :is(.app, .modal-overlay, dialog):not(#tela-login):not(#sgp-tema-excluido)  :is(
    .section, .card, .modal, .modal-content,
    .modal-header, .modal-footer, .modal-body,
    .table-wrapper, .at-painel,
    .financeiro-lista-box, .financeiro-lista-header,
    .chamado-chat-header, .chamado-chat-form,
    .chamado-chat-descricao,
    div[class*="-card"], div[class*="-panel"],
    div[class*="-painel"], div[class*="-box"],
    div[class*="-toolbar"], div[class*="-filtros"]
) {

    background:#182230 !important;
    border-color:#314054 !important;
    color:#e5edf7 !important;
    box-shadow:none !important;

}

html[data-sgp-theme="escuro"] body :is(.app, .modal-overlay, dialog):not(#tela-login):not(#sgp-tema-excluido)  :is(
    h1, h2, h3, h4, label, legend,
    .card strong, .insight-card strong,
    .financeiro-card-valor,
    .chamado-chat-meta strong
) {
color:#edf4ff !important;
}

html[data-sgp-theme="escuro"] body :is(.app, .modal-overlay, dialog):not(#tela-login):not(#sgp-tema-excluido)  :is(
    p, small, .section-eyebrow, .system-status,
    .card span, .financeiro-card-titulo,
    .chamado-chat-meta, .chamado-chat-vazio,
    .loading
) {
color:#b1c1d5 !important;
}

html[data-sgp-theme="escuro"] body :is(.app, .modal-overlay, dialog):not(#tela-login):not(#sgp-tema-excluido)  :is(
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="submit"]):not([type="button"]),
    select, textarea, option
) {

    background:#111b29 !important;
    color:#edf4ff !important;
    border-color:#455a74 !important;

}

html[data-sgp-theme="escuro"] body :is(.app, .modal-overlay, dialog):not(#tela-login):not(#sgp-tema-excluido) :is(input, textarea)::placeholder {

    color:#9eb1c9 !important;
    opacity:1 !important;

}

html[data-sgp-theme="escuro"] body :is(.app, .modal-overlay, dialog):not(#tela-login):not(#sgp-tema-excluido) :is(input, select, textarea):focus {

    border-color:#38bdf8 !important;
    outline-color:#38bdf8 !important;

}

html[data-sgp-theme="escuro"] body :is(.app, .modal-overlay, dialog):not(#tela-login):not(#sgp-tema-excluido) :is(input, select, textarea):disabled {

    background:#253043 !important;
    color:#a8b7ca !important;

}

html[data-sgp-theme="escuro"] body :is(.app, .modal-overlay, dialog):not(#tela-login):not(#sgp-tema-excluido) :is(table, tbody, tr, td) {

    background:#182230 !important;
    border-color:#314054 !important;
    color:#dce7f5 !important;

}

html[data-sgp-theme="escuro"] body :is(.app, .modal-overlay, dialog):not(#tela-login):not(#sgp-tema-excluido) th {

    background:#202e40 !important;
    color:#c7d9ed !important;
    border-color:#3a4c63 !important;

}

html[data-sgp-theme="escuro"] body :is(.app, .modal-overlay, dialog):not(#tela-login):not(#sgp-tema-excluido) tbody tr:hover > td {
background:#24364c !important;
}

html[data-sgp-theme="escuro"] body :is(.app, .modal-overlay, dialog):not(#tela-login):not(#sgp-tema-excluido) td :is(strong, small) {
color:inherit !important;
}

html[data-sgp-theme="escuro"] body :is(.app, .modal-overlay, dialog):not(#tela-login):not(#sgp-tema-excluido) a:not(.menu):not([class*="btn"]):not([class*="button"]) {
color:#7dd3fc !important;
}

html[data-sgp-theme="escuro"] body :is(.app, .modal-overlay, dialog):not(#tela-login):not(#sgp-tema-excluido)  :is(
    .chamado-chat-mensagens, .chamado-chat-info,
    .cto-stats .stat, .financeiro-vazio
) {

    background:#111b29 !important;
    border-color:#314054 !important;
    color:#b8c9dd !important;

}

html[data-sgp-theme="escuro"] body :is(.app, .modal-overlay, dialog):not(#tela-login):not(#sgp-tema-excluido) .chamado-chat-balao {

    background:#223246 !important;
    border-color:#3a4d65 !important;
    color:#e5edf7 !important;

}

html[data-sgp-theme="escuro"] body :is(.app, .modal-overlay, dialog):not(#tela-login):not(#sgp-tema-excluido) .chamado-chat-msg.admin .chamado-chat-balao {

    background:#163b57 !important;
    border-color:#28628a !important;

}

html[data-sgp-theme="escuro"] body :is(.app, .modal-overlay, dialog):not(#tela-login):not(#sgp-tema-excluido)  :is(
    .secondary-button, .btn-secondary, .btn-fechar,
    .at-btn:not(.at-primario), button[class*="secondary"]
) {

    background:#26384e !important;
    color:#e5edf7 !important;
    border-color:#48617e !important;

}

html[data-sgp-theme="escuro"] body :is(.app, .modal-overlay, dialog):not(#tela-login):not(#sgp-tema-excluido)  :is(
    .primary-button, .btn-primary, .at-primario,
    .btn-nova-cobranca, button[class*="primary"]
) {

    background:#176ac4 !important;
    color:#fff !important;
    border-color:#3f8bdc !important;

}

html[data-sgp-theme="escuro"] body :is(.app, .modal-overlay, dialog):not(#tela-login):not(#sgp-tema-excluido) button:focus-visible {

    outline:3px solid #38bdf8 !important;
    outline-offset:2px !important;

}

html[data-sgp-theme="escuro"] body :is(.app, .modal-overlay, dialog):not(#tela-login):not(#sgp-tema-excluido)  :is(
    .error, .form-error, .at-erro,
    .badge-red, .at-alerta
) {
color:#fda4af !important;
}

html[data-sgp-theme="escuro"] body :is(.app, .modal-overlay, dialog):not(#tela-login):not(#sgp-tema-excluido)  :is(.error, .form-error, .at-erro) {

    background:#402331 !important;
    border-color:#794055 !important;

}

html[data-sgp-theme="escuro"] body :is(.app, .modal-overlay, dialog):not(#tela-login):not(#sgp-tema-excluido) .at-status {
background:#334155 !important; color:#e2e8f0 !important;
}

html[data-sgp-theme="escuro"] body :is(.app, .modal-overlay, dialog):not(#tela-login):not(#sgp-tema-excluido) .at-status.ativo {
background:#153e32 !important; color:#86efac !important;
}

html[data-sgp-theme="escuro"] body :is(.app, .modal-overlay, dialog):not(#tela-login):not(#sgp-tema-excluido) #at-msg:not(.at-erro) {
background:#183b59 !important; color:#bae6fd !important;
}

html[data-sgp-theme="escuro"] body :is(.app, .modal-overlay, dialog):not(#tela-login):not(#sgp-tema-excluido) .btn-chamado-resolver-admin {

    background:#173f32 !important;
    color:#a7f3d0 !important;
    border-color:#34735d !important;

}

/* RORAILINK-DARK-ABAS-20261102 */

/* FICHA DO CLIENTE */
html[data-sgp-theme="escuro"] #modal-ficha-cliente .ficha-box,
html[data-sgp-theme="escuro"] #modal-editar-cliente .ficha-box,
html[data-sgp-theme="escuro"] #modal-ficha-cliente .ficha-corpo,
html[data-sgp-theme="escuro"] #modal-editar-cliente .ficha-corpo {
    background: #101b2d !important;
    color: #eaf2ff !important;
}

html[data-sgp-theme="escuro"] #modal-ficha-cliente .ficha-secao,
html[data-sgp-theme="escuro"] #modal-editar-cliente .ficha-secao,
html[data-sgp-theme="escuro"] #modal-ficha-cliente .ficha-campo,
html[data-sgp-theme="escuro"] #modal-editar-cliente .ficha-vazio {
    background: #192940 !important;
    border-color: #304560 !important;
    color: #eaf2ff !important;
}

html[data-sgp-theme="escuro"] #modal-ficha-cliente .ficha-secao h3,
html[data-sgp-theme="escuro"] #modal-editar-cliente .ficha-secao h3,
html[data-sgp-theme="escuro"] #modal-ficha-cliente .ficha-campo strong {
    color: #f0f6ff !important;
}

html[data-sgp-theme="escuro"] #modal-ficha-cliente .ficha-campo span,
html[data-sgp-theme="escuro"] #modal-editar-cliente .ficha-form-grid label {
    color: #a9bdd6 !important;
}

html[data-sgp-theme="escuro"] #modal-editar-cliente input,
html[data-sgp-theme="escuro"] #modal-editar-cliente select,
html[data-sgp-theme="escuro"] #modal-editar-cliente textarea {
    background: #101b2d !important;
    color: #eef5ff !important;
    border-color: #38506d !important;
    color-scheme: dark;
}

/* INSTALACOES */
html[data-sgp-theme="escuro"] #instalacoes .instalacoes-resumo-card,
html[data-sgp-theme="escuro"] #instalacoes .instalacoes-bloco,
html[data-sgp-theme="escuro"] #instalacoes .instalacao-pendente-card,
html[data-sgp-theme="escuro"] #instalacoes .instalacoes-vazio,
html[data-sgp-theme="escuro"] #instalacoes .table-wrapper {
    background: #192940 !important;
    border-color: #304560 !important;
    color: #eaf2ff !important;
}

html[data-sgp-theme="escuro"] #instalacoes .instalacoes-resumo-card strong,
html[data-sgp-theme="escuro"] #instalacoes .instalacoes-bloco h3,
html[data-sgp-theme="escuro"] #instalacoes .instalacao-pendente-card strong,
html[data-sgp-theme="escuro"] #instalacoes .instalacoes-vazio strong {
    color: #eef5ff !important;
}

html[data-sgp-theme="escuro"] #instalacoes .instalacoes-resumo-card span,
html[data-sgp-theme="escuro"] #instalacoes .instalacoes-bloco-header p,
html[data-sgp-theme="escuro"] #instalacoes .instalacao-pendente-grid span,
html[data-sgp-theme="escuro"] #instalacoes .instalacoes-vazio span {
    color: #a9bdd6 !important;
}

html[data-sgp-theme="escuro"] #instalacoes .instalacao-pendente-grid > div,
html[data-sgp-theme="escuro"] #instalacoes table th {
    background: #142238 !important;
    border-color: #304560 !important;
    color: #dce8fa !important;
}

html[data-sgp-theme="escuro"] #instalacoes table td {
    background: #192940 !important;
    border-color: #304560 !important;
    color: #eaf2ff !important;
}

/* TECNICOS */
html[data-sgp-theme="escuro"] #tecnicos .tecnico-card,
html[data-sgp-theme="escuro"] #tecnicos .despacho-tecnico,
html[data-sgp-theme="escuro"] #tecnicos .despacho-gantt,
html[data-sgp-theme="escuro"] #tecnicos .tecnicos-cadastrados-box,
html[data-sgp-theme="escuro"] #tecnicos .tecnico-cadastro-card,
html[data-sgp-theme="escuro"] #tecnicos .tecnico-item-card {
    background: #192940 !important;
    border-color: #304560 !important;
    color: #eaf2ff !important;
}

html[data-sgp-theme="escuro"] #tecnicos .despacho-gantt-header,
html[data-sgp-theme="escuro"] #tecnicos .despacho-gantt-row,
html[data-sgp-theme="escuro"] #tecnicos .despacho-tecnico-info,
html[data-sgp-theme="escuro"] #tecnicos .despacho-timeline,
html[data-sgp-theme="escuro"] #tecnicos .despacho-sem-atividades {
    background: #142238 !important;
    border-color: #304560 !important;
    color: #eaf2ff !important;
}

html[data-sgp-theme="escuro"] #tecnicos .despacho-grid-col,
html[data-sgp-theme="escuro"] #tecnicos .despacho-hora {
    border-color: #304560 !important;
    color: #b9cce3 !important;
}

html[data-sgp-theme="escuro"] #tecnicos .tecnico-card strong,
html[data-sgp-theme="escuro"] #tecnicos .despacho-header h3,
html[data-sgp-theme="escuro"] #tecnicos .despacho-tecnico-dados strong,
html[data-sgp-theme="escuro"] #tecnicos .tecnico-cadastro-info strong {
    color: #eef5ff !important;
}

html[data-sgp-theme="escuro"] #tecnicos .despacho-header p,
html[data-sgp-theme="escuro"] #tecnicos .tecnico-card span,
html[data-sgp-theme="escuro"] #tecnicos .despacho-legenda span {
    color: #a9bdd6 !important;
}

html[data-sgp-theme="escuro"] #tecnicos .despacho-controles input,
html[data-sgp-theme="escuro"] #tecnicos .despacho-controles select {
    background: #101b2d !important;
    color: #eef5ff !important;
    border-color: #38506d !important;
    color-scheme: dark;
}

/* ORDENS DE SERVICO */
html[data-sgp-theme="escuro"] #ordens-servico {
    color: #eaf2ff !important;
}

html[data-sgp-theme="escuro"] #ordens-servico .os-indicador,
html[data-sgp-theme="escuro"] #ordens-servico .os-cartao {
    background: #192940 !important;
    border-color: #304560 !important;
    color: #eaf2ff !important;
}

html[data-sgp-theme="escuro"] #ordens-servico .os-indicador strong,
html[data-sgp-theme="escuro"] #ordens-servico .os-cartao h3,
html[data-sgp-theme="escuro"] #ordens-servico h2 {
    color: #eef5ff !important;
}

html[data-sgp-theme="escuro"] #ordens-servico .os-indicador span:not(.os-simbolo),
html[data-sgp-theme="escuro"] #ordens-servico .os-cabecalho p,
html[data-sgp-theme="escuro"] #ordens-servico .os-contador,
html[data-sgp-theme="escuro"] #ordens-servico .os-vazio {
    color: #a9bdd6 !important;
}

html[data-sgp-theme="escuro"] #ordens-servico .os-cartao-titulo,
html[data-sgp-theme="escuro"] #ordens-servico .os-tabela th {
    background: #142238 !important;
    border-color: #304560 !important;
    color: #dce8fa !important;
}

html[data-sgp-theme="escuro"] #ordens-servico .os-tabela td {
    border-color: #304560 !important;
    color: #eaf2ff !important;
}

html[data-sgp-theme="escuro"] #ordens-servico input,
html[data-sgp-theme="escuro"] #ordens-servico select,
html[data-sgp-theme="escuro"] #ordens-servico textarea {
    background: #101b2d !important;
    color: #eef5ff !important;
    border-color: #38506d !important;
    color-scheme: dark;
}

html[data-sgp-theme="escuro"] #ordens-servico .os-secundario,
html[data-sgp-theme="escuro"] #ordens-servico .os-acao {
    background: #223650 !important;
    color: #cce0ff !important;
    border-color: #3a5375 !important;
}

html[data-sgp-theme="escuro"] .os-modal {
    background: #192940 !important;
    color: #eaf2ff !important;
}

/* VENDAS */
html[data-sgp-theme="escuro"] #vendas .vendas-card,
html[data-sgp-theme="escuro"] #vendas-lista .table-wrapper {
    background: #192940 !important;
    border-color: #304560 !important;
    color: #eaf2ff !important;
}

html[data-sgp-theme="escuro"] #vendas .vendas-card strong {
    color: #f4f8ff !important;
}

html[data-sgp-theme="escuro"] #vendas .vendas-card span {
    color: #aec2da !important;
}

html[data-sgp-theme="escuro"] #vendas-lista table th {
    background: #142238 !important;
    color: #dce8fa !important;
    border-color: #304560 !important;
}

html[data-sgp-theme="escuro"] #vendas-lista table td {
    background: #192940 !important;
    color: #eaf2ff !important;
    border-color: #304560 !important;
}

html[data-sgp-theme="escuro"] #vendas-lista table tbody tr:hover td {
    background: #223650 !important;
}

html[data-sgp-theme="escuro"] #vendas .vendas-vazio {
    background: #192940 !important;
    color: #eaf2ff !important;
}

/* RORAILINK-DARK-ATENDIMENTO-PADRAO-V2 */

/* FICHA DO CLIENTE: CABECALHO E RODAPE */
html[data-sgp-theme="escuro"] #modal-ficha-cliente .ficha-topo,
html[data-sgp-theme="escuro"] #modal-ficha-cliente .ficha-rodape,
html[data-sgp-theme="escuro"] #modal-editar-cliente .ficha-topo,
html[data-sgp-theme="escuro"] #modal-editar-cliente .ficha-rodape {
    background: #182230 !important;
    color: #f1f6ff !important;
    border-color: #34465d !important;
}

html[data-sgp-theme="escuro"] #modal-ficha-cliente .ficha-topo h2,
html[data-sgp-theme="escuro"] #modal-editar-cliente .ficha-topo h2 {
    color: #f1f6ff !important;
}

html[data-sgp-theme="escuro"] #modal-ficha-cliente .ficha-topo p,
html[data-sgp-theme="escuro"] #modal-editar-cliente .ficha-topo p {
    color: #a8bdd5 !important;
}

html[data-sgp-theme="escuro"] #modal-ficha-cliente .ficha-fechar,
html[data-sgp-theme="escuro"] #modal-editar-cliente .ficha-fechar {
    background: #25354b !important;
    color: #edf5ff !important;
    border-color: #415671 !important;
}

/* FICHA: BLOCOS CLAROS DEFINIDOS POR ESTILOS INTERNOS */
html[data-sgp-theme="escuro"] #modal-ficha-cliente [style*="background: white" i],
html[data-sgp-theme="escuro"] #modal-ficha-cliente [style*="background:white" i],
html[data-sgp-theme="escuro"] #modal-ficha-cliente [style*="background: #fff;" i],
html[data-sgp-theme="escuro"] #modal-ficha-cliente [style*="background:#fff;" i],
html[data-sgp-theme="escuro"] #modal-ficha-cliente [style*="background: #ffffff" i],
html[data-sgp-theme="escuro"] #modal-ficha-cliente [style*="background:#ffffff" i],
html[data-sgp-theme="escuro"] #modal-ficha-cliente [style*="background: #f8fafc" i],
html[data-sgp-theme="escuro"] #modal-ficha-cliente [style*="background:#f8fafc" i],
html[data-sgp-theme="escuro"] #modal-ficha-cliente [style*="background: #f1f5f9" i],
html[data-sgp-theme="escuro"] #modal-ficha-cliente [style*="background:#f1f5f9" i] {
    background: #1c2b40 !important;
    border-color: #344b65 !important;
}

html[data-sgp-theme="escuro"] #modal-ficha-cliente .ficha-vazio {
    background: #132035 !important;
    color: #a8bdd5 !important;
    border-color: #344b65 !important;
}

html[data-sgp-theme="escuro"] #modal-ficha-cliente [style*="color:#475569" i],
html[data-sgp-theme="escuro"] #modal-ficha-cliente [style*="color: #475569" i],
html[data-sgp-theme="escuro"] #modal-ficha-cliente [style*="color:#64748b" i],
html[data-sgp-theme="escuro"] #modal-ficha-cliente [style*="color: #64748b" i] {
    color: #b6c9e0 !important;
}

/* CHAMADOS: INDICADORES */
html[data-sgp-theme="escuro"] #chamados .chamado-filtro {
    background: #1c2b40 !important;
    border: 1px solid #344b65 !important;
    color: #f1f6ff !important;
}

html[data-sgp-theme="escuro"] #chamados .chamado-filtro.ativo {
    background: #203b60 !important;
    border-color: #4a91ff !important;
}

html[data-sgp-theme="escuro"] #chamados .chamado-filtro strong {
    color: #f1f6ff !important;
}

html[data-sgp-theme="escuro"] #chamados .chamado-filtro span {
    color: #b6c9e0 !important;
}

html[data-sgp-theme="escuro"] #chamados .btn-atualizar-chamados {
    background: #25354b !important;
    color: #edf5ff !important;
    border: 1px solid #415671 !important;
}

/* DESPACHO TECNICO */
html[data-sgp-theme="escuro"] #tecnicos .despacho-header {
    background: #182230 !important;
    border-color: #34465d !important;
}

html[data-sgp-theme="escuro"] #tecnicos .despacho-legenda {
    background: #182230 !important;
    border-color: #34465d !important;
}

html[data-sgp-theme="escuro"] #tecnicos .despacho-gantt-header,
html[data-sgp-theme="escuro"] #tecnicos .despacho-horarios,
html[data-sgp-theme="escuro"] #tecnicos .despacho-hora,
html[data-sgp-theme="escuro"] #tecnicos .despacho-tecnico-coluna {
    background: #1c2b40 !important;
    border-color: #344b65 !important;
    color: #dce9fa !important;
}

html[data-sgp-theme="escuro"] #tecnicos .despacho-legenda span {
    color: #b6c9e0 !important;
}

/* ATUALIZACOES DO APLICATIVO */
html[data-sgp-theme="escuro"] #atualizacoes-app .at-app-panel {
    background: #182230 !important;
    border-color: #34465d !important;
    color: #f1f6ff !important;
}

html[data-sgp-theme="escuro"] #atualizacoes-app .at-app-note,
html[data-sgp-theme="escuro"] #atualizacoes-app .at-app-history > div {
    background: #1c2b40 !important;
    border: 1px solid #344b65 !important;
    color: #dce9fa !important;
}

html[data-sgp-theme="escuro"] #atualizacoes-app .at-app-danger {
    background: #38291f !important;
    color: #ffbd91 !important;
    border-color: #795136 !important;
}

html[data-sgp-theme="escuro"] #atualizacoes-app button.secundario {
    background: #25354b !important;
    color: #e5f0ff !important;
    border: 1px solid #415671 !important;
}

html[data-sgp-theme="escuro"] #atualizacoes-app input,
html[data-sgp-theme="escuro"] #atualizacoes-app select,
html[data-sgp-theme="escuro"] #atualizacoes-app textarea {
    background: #132035 !important;
    color: #f1f6ff !important;
    border-color: #415671 !important;
    color-scheme: dark;
}

html[data-sgp-theme="escuro"] #atualizacoes-app input::placeholder,
html[data-sgp-theme="escuro"] #atualizacoes-app textarea::placeholder {
    color: #91a8c5 !important;
}


/* RORAILINK-AJUSTE-CONTRATO-LEGENDA-V3 */

/* 1 - CONTRATOS NA FICHA DO CLIENTE */
html[data-sgp-theme="escuro"] #modal-ficha-cliente
:is(div, section, article)[class*="contrat" i],
html[data-sgp-theme="escuro"] #modal-ficha-cliente
:is(div, section, article)[id*="contrat" i],
html[data-sgp-theme="escuro"] #modal-ficha-cliente
div:has(> button[onclick*="contrat" i]),
html[data-sgp-theme="escuro"] #modal-ficha-cliente
div:has(> button[class*="contrat" i]),
html[data-sgp-theme="escuro"] #modal-ficha-cliente
div:has(> button[id*="contrat" i]) {
    background: #1c2b40 !important;
    color: #eaf2ff !important;
    border-color: #344b65 !important;
}

html[data-sgp-theme="escuro"] #modal-ficha-cliente
:is(div, section, article)[class*="contrat" i]
:is(p, small),
html[data-sgp-theme="escuro"] #modal-ficha-cliente
div:has(> button[onclick*="contrat" i]) > :is(p, span, small) {
    color: #c1d3e8 !important;
}

/* 2 - LEGENDA DO DESPACHO TECNICO */
html[data-sgp-theme="escuro"] #tecnicos
.despacho-legenda > span {
    background: #25354b !important;
    color: #eaf2ff !important;
    border: 1px solid #435a77 !important;
    border-radius: 20px;
}

html[data-sgp-theme="escuro"] #tecnicos
.despacho-legenda {
    background: #182230 !important;
    border-color: #34465d !important;
}


/* RORAILINK-OS-ESPACAMENTO-20261102 */

/* area geral da pagina */
#ordens-servico > .section {
    padding: 22px 20px 26px !important;
}

/* cabecalho principal da pagina */
#ordens-servico .section-header,
#ordens-servico .os-cabecalho {
    margin-bottom: 18px !important;
}

/* titulo e subtitulo */
#ordens-servico .section-header h2,
#ordens-servico .os-cabecalho h2 {
    margin-bottom: 6px !important;
}

#ordens-servico .section-header p,
#ordens-servico .os-cabecalho p {
    margin-top: 0 !important;
}

/* cartoes e blocos */
#ordens-servico .os-cartao,
#ordens-servico .os-indicador,
#ordens-servico .table-wrapper,
#ordens-servico .os-tabela {
    margin-bottom: 16px !important;
}

#ordens-servico .os-cartao {
    padding: 18px 20px !important;
}

/* indicador total */
#ordens-servico .os-indicador {
    padding: 16px 18px !important;
}

/* botoes */
#ordens-servico .os-acoes,
#ordens-servico .section-header .acoes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 4px 0 18px 0 !important;
}

/* tabela/lista */
#ordens-servico .table-wrapper,
#ordens-servico .os-tabela-wrapper {
    margin-top: 10px !important;
}

/* cabecalho do bloco da lista */
#ordens-servico .os-cartao h3,
#ordens-servico .table-wrapper h3 {
    margin-bottom: 14px !important;
}

/* responsivo */
@media (max-width: 768px) {
    #ordens-servico > .section {
        padding: 18px 14px 22px !important;
    }

    #ordens-servico .os-cartao,
    #ordens-servico .os-indicador {
        padding: 14px 14px !important;
    }

    #ordens-servico .os-acoes,
    #ordens-servico .section-header .acoes {
        gap: 8px;
    }
}


/* RORAILINK-OS-LAYOUT-V4 */

/* AREA PRINCIPAL */
#ordens-servico {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    padding: 24px 22px 34px !important;
}

/* CABECALHO */
#ordens-servico > .os-cabecalho {
    margin-bottom: 20px !important;
    gap: 14px !important;
}

#ordens-servico .os-cabecalho > div:last-child {
    min-width: 0;
}

/* INDICADORES */
#ordens-servico > .os-resumo {
    display: grid !important;
    grid-template-columns:
        repeat(auto-fit, minmax(min(100%, 195px), 1fr))
        !important;
    gap: 14px !important;
    margin-bottom: 20px !important;
}

#ordens-servico .os-resumo > .os-indicador {
    margin: 0 !important;
    padding: 17px !important;
    min-width: 0;
    box-sizing: border-box;
}

/* BARRA DE ACOES E FILTROS */
#ordens-servico > .os-barra {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    margin-bottom: 18px !important;
}

#ordens-servico .os-grupo {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

#ordens-servico .os-filtros {
    flex: 1 1 380px;
    min-width: 0;
    justify-content: flex-end;
}

#ordens-servico .os-filtros input {
    max-width: 100%;
}

/* CARTOES - REMOVE PADDING DUPLICADO */
#ordens-servico > .os-cartao {
    padding: 0 !important;
    margin-bottom: 18px !important;
    min-width: 0;
    box-sizing: border-box;
}

/* CABECALHO DOS CARTOES */
#ordens-servico .os-cartao-titulo {
    padding: 17px 20px !important;
}

#ordens-servico .os-cartao-titulo h3 {
    margin: 0 !important;
}

/* TABELA */
#ordens-servico .os-tabela-container {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    box-sizing: border-box;
}

#ordens-servico .os-tabela {
    margin: 0 !important;
    width: 100%;
}

/* FORMULARIO */
#ordens-servico .os-form-grid {
    padding: 20px !important;
}

#ordens-servico .os-rodape {
    padding: 0 20px 20px !important;
}

/* TELAS MENORES */
@media (max-width: 768px) {
    #ordens-servico {
        padding: 16px 12px 28px !important;
    }

    #ordens-servico .os-filtros {
        justify-content: flex-start;
    }

    #ordens-servico .os-barra {
        align-items: stretch !important;
    }

    #ordens-servico .os-cartao-titulo {
        padding: 14px !important;
    }
}
