
















@media (max-width: 768px) {
    html {
        -webkit-tap-highlight-color: transparent;   
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
    html, body { overscroll-behavior-y: none; }   
    button, a, [role="button"], [role="tab"], summary, label, select, input[type="checkbox"], input[type="radio"] {
        touch-action: manipulation;                 
    }
    button, [role="button"], [role="tab"], summary, .bottom-nav__item {
        -webkit-user-select: none;
        user-select: none;                          
        -webkit-touch-callout: none;
    }
    button:active, [role="button"]:active, summary:active { filter: brightness(0.92); }   
    #sidebar, .tela-cheia > .tc-corpo, [id^="modal-"] > div { overscroll-behavior: contain; }
    img, video, canvas, svg { max-width: 100%; }
}











@media (max-width: 768px) {
    [style*="font-size"]:where([style*="font-size:0."], [style*="font-size: 0."], [style*="font-size:."], [style*="font-size:11px"], [style*="font-size:12px"], [style*="font-size: 12px"], [style*="font-size:13px"], [style*="font-size: 13px"]) {
        font-size: 14px !important;
        line-height: 1.45;
    }
    [style*="uppercase"]:where([style*="font-size:0."], [style*="font-size: 0."], [style*="font-size:."], [style*="font-size:11px"], [style*="font-size:12px"], [style*="font-size: 12px"], [style*="font-size:13px"], [style*="font-size: 13px"]) {
        font-size: 12px !important;
        letter-spacing: 0.04em !important;
    }
    
    .page .text-xs, [id^="modal-"] .text-xs, #sidebar .text-xs, .tela-cheia .text-xs { font-size: 14px !important; line-height: 1.45 !important; }
    .page .text-[9px], .page .text-[10px], .page .text-[11px] { font-size: 12px !important; }
    .page small, [id^="modal-"] small, .tela-cheia small { font-size: 14px; }
}



@media (max-width: 768px) {
    body button, body .btn, body a[onclick], body [role="button"], body [role="tab"], body summary,
    body select, body input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]):not([type="file"]), body textarea {
        min-height: 44px;
    }
    body button, body .btn, body [role="button"], body [role="tab"], body summary { min-width: 44px; }
    body summary { display: flex; align-items: center; cursor: pointer; }
    body input[type="checkbox"], body input[type="radio"] {
        min-width: 44px !important; min-height: 44px !important;
        width: 44px !important; height: 44px !important;
        margin-top: 0; margin-bottom: 0;
    }
    body input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]), body select, body textarea {
        font-size: 16px !important;
    }
}




@media (max-width: 768px) {
    
    .cz-faixa, .cz-linha { font-size: 15px !important; line-height: 1.5 !important; }
    .cz-base { font-size: 14px !important; line-height: 1.45 !important; }
    
    .site-kpi-label, .site-donut-title, .site-donut-fraction, .site-activity-time, .site-status-badge { font-size: 12px !important; }
    .site-kpi-footer, .site-kpi-trend, .site-activity-detail { font-size: 14px !important; line-height: 1.4 !important; }
    #site-ativos-tbody td, #site-ativos-tbody td * { font-size: 14px !important; }
    #site-ativos-tbody .site-status-badge { font-size: 12px !important; }
    
    .cc-tag, .cc-etapa-r, .cc-etapa-s, .pc-kpi-lbl, .pc-pill, .pc-kpi-trend { font-size: 12px !important; }
    .cc-acao-pq, .cc-nota, .pc-card-hint, .pc-hub-sub, .vdd-sub, .ag-insight, .cf-sub, .cfg-trafego-det { font-size: 14px !important; line-height: 1.45 !important; }
    #central-comercial p { font-size: 14px !important; }
    .vdd-tit, .cfg-trafego-tit { font-size: 13px !important; }
    #pc-kpi-faturamento-trend .pc-kpi-muted, .pc-kpi-muted { font-size: 13px !important; white-space: normal !important; }
    
    .r1638-aviso-texto { font-size: 15px !important; line-height: 1.45 !important; }
    
    body table[data-mob-lista="1"] td[data-papel="sub"],
    body table[data-mob-lista="1"] td[data-papel="sub"] * { font-size: 14px !important; opacity: 1 !important; }
    body table[data-mob-lista="1"] td[data-papel="sub"] { color: var(--texto-secundario, #94a3b8); }
    body.tema-claro table[data-mob-lista="1"] td[data-papel="sub"] { color: #475569; }
    body table[data-mob-lista="1"] tr.mob-aberta td[data-papel="extra"] { font-size: 14px !important; }
    body table[data-mob-lista="1"] tr.mob-aberta td[data-papel="extra"]::before { font-size: 12px !important; opacity: .8 !important; }
    body table[data-mob="cartao"] td { font-size: 14px !important; }
    body table[data-mob="cartao"] td::before { font-size: 12px !important; }
    body .page table td { font-size: max(14px, 1em); }
    
    #page-nova-inspecao label, #page-nova-inspecao-caldeira label { font-size: 14px !important; line-height: 1.4 !important; }
    .badge-obrig, .badge-sst { font-size: 12px !important; }
    .item-fonte { font-size: 13px !important; line-height: 1.4 !important; }
    .checklist-item .item-texto { font-size: 15px !important; }
    
    #prontuarios-grid .text-\[10px\] { font-size: 12px !important; }
    
    .ag-disp-btn { font-size: 13px !important; }
    
    .conferencia-cadastro__nota { font-size: 14px !important; }
    
    #page-configuracoes h3, #page-configuracoes h4 { font-size: 16px !important; }
}





@media (max-width: 768px) {
    body.has-bottom-nav main, body main {
        padding-left: calc(12px + env(safe-area-inset-left, 0px)) !important;
        padding-right: calc(12px + env(safe-area-inset-right, 0px)) !important;
        padding-top: calc(12px + env(safe-area-inset-top, 0px)) !important;
    }
    body.has-bottom-nav main {
        padding-bottom: calc(136px + env(safe-area-inset-bottom, 0px)) !important;   
    }
    body .page { padding: 0 !important; }
    body.has-bottom-nav .page > div:first-child { margin: 0 0 14px 0 !important; }

    
    .bottom-nav { padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
    .bottom-nav .bottom-nav__item { min-height: 56px; min-width: 56px; }
    .bottom-nav .bottom-nav__label { font-size: 12px !important; max-width: 72px; letter-spacing: 0; }
    .bottom-nav .bottom-nav__item:not(.is-active) { color: #94a3b8; }
    .bottom-nav .bottom-nav__item:not(.is-active) .bottom-nav__label { color: #a3b1c6; }

    



    body.has-bottom-nav:not(.sidebar-open):not(.com-tela-cheia) #mg-botao {
        top: auto !important; left: auto !important;
        right: calc(12px + env(safe-area-inset-right, 0px)) !important;
        bottom: calc(74px + env(safe-area-inset-bottom, 0px)) !important;
        width: 44px !important; height: 44px !important;
        z-index: 900 !important; opacity: 1;
    }
    body.has-bottom-nav #central-sinal-chip {
        right: calc(64px + env(safe-area-inset-right, 0px)) !important;
        bottom: calc(74px + env(safe-area-inset-bottom, 0px)) !important;
        z-index: 899 !important;
    }
    body.has-bottom-nav #central-sinal-painel {
        right: 12px !important; left: 12px !important; width: auto !important;
        bottom: calc(126px + env(safe-area-inset-bottom, 0px)) !important;
        z-index: 899 !important;
    }
    body.sidebar-open #central-sinal-chip { display: none !important; }

    

    body.has-bottom-nav .aviso-flutuante-esq {
        left: calc(8px + env(safe-area-inset-left, 0px)) !important;
        right: calc(8px + env(safe-area-inset-right, 0px)) !important;
        max-width: none !important;
        bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
        z-index: 950 !important;
    }
    #banner-recorrencias { max-height: min(46vh, 380px) !important; padding: 14px 16px !important; }
}






@media (max-width: 768px) {
    body .page [style*="display:flex"][style*="gap:10px"]:not([style*="flex-direction:column"]):not([style*="flex-direction: column"]) {
        flex-direction: row !important;
        flex-wrap: wrap !important;
    }
    body .page [style*="display:flex"][style*="gap:10px"] > button,
    body .page [style*="display:flex"][style*="gap:10px"] > a { width: auto !important; flex: 1 1 auto; }
    
    body .page [style*="display:flex"][style*="space-between"][style*="gap:10px"] { flex-wrap: nowrap !important; }
    body .page [style*="display:flex"][style*="space-between"][style*="gap:10px"] > [style*="min-width:0"] { flex: 1 1 auto; }
    
    body .page [style*="flex:1;min-width:150px"] { min-width: calc(50% - 6px) !important; }
}




@media (max-width: 768px) {
    body table[data-mob-lista="1"] td[data-papel="acao"] > div,
    body table[data-mob="cartao"] td[data-label=""] > div,
    body table[data-mob="cartao"] td:not([data-label]) > div {
        display: flex !important; flex-wrap: wrap !important; justify-content: flex-end !important;
        gap: 6px !important; width: 100%;
    }
    body table[data-mob-lista="1"] td button, body table[data-mob="cartao"] td button,
    body table[data-mob-lista="1"] td summary, body table[data-mob="cartao"] td summary,
    body table[data-mob-lista="1"] .mob-mais, body table[data-mob="cartao"] .mob-mais {
        min-width: 44px !important; min-height: 44px !important;
        display: inline-flex !important; align-items: center; justify-content: center;
        border-radius: 10px !important;
    }
    body table[data-mob-lista="1"] td summary, body table[data-mob="cartao"] td summary { padding: 0 10px !important; }
    body table[data-mob-lista="1"] input[type="checkbox"], body table[data-mob="cartao"] input[type="checkbox"] {
        width: 44px !important; height: 44px !important; min-width: 44px !important; min-height: 44px !important;
    }
    
    body .page details.row-mais > div { right: 0; left: auto; z-index: 60 !important; max-width: calc(100vw - 32px); }
    body .page details.row-mais > div button { min-height: 44px !important; font-size: 15px !important; }
    
    #lista-clientes span.text-xs.text-blue-400 { white-space: nowrap; flex: 0 0 auto; }
}






@media (max-width: 768px) {
    button[style*="background:#25"][style]:where([style*="background:#25D366;"], [style*="background:#25d366;"]) { background: #15803d !important; color: #fff !important; }
    button[style*="background:#0"][style]:where([style*="background:#0284c7;"], [style*="background:#0ea5e9;"]) { background: #0369a1 !important; color: #fff !important; }
    button[style*="background:#ef4444;"][style], [onclick][style*="background:#ef4444;"] { background: #dc2626 !important; color: #fff !important; }
    button[style*="background:#3b82f6;"][style], .page button.btn-primary { background: #2563eb !important; color: #fff !important; }
    button[style*="background:#10b981;"][style] { background: #047857 !important; color: #fff !important; }
    button[style*="background:#f59e0b;"][style], body.tema-claro button[style*="background:#f59e0b;"][style] { background: #f59e0b !important; color: #1c1102 !important; }
    [id^="modal-"] .btn.btn-primary, .page .btn.btn-primary { color: #04121f !important; }
    
    body:not(.tema-claro) [style*="#ef4444"]:where([style*="color:#ef4444"], [style*="color: #ef4444"]), body:not(.tema-claro) [style*="#dc2626"]:where([style*="color:#dc2626"], [style*="color: #dc2626"]) { color: #f87171 !important; }
    body:not(.tema-claro) [style*="#64748b"]:where([style*="color:#64748b"], [style*="color: #64748b"]), body:not(.tema-claro) [style*="#475569"]:where([style*="color:#475569"], [style*="color: #475569"]),
    body:not(.tema-claro) #app-versao-login { color: #94a3b8 !important; }
    body:not(.tema-claro) [style*="color:#7c3aed"], body:not(.tema-claro) [style*="#8b5cf6"]:where([style*="color:#8b5cf6"], [style*="color: #8b5cf6"]) { color: #a78bfa !important; }
    body:not(.tema-claro) [style*="#d97706"]:where([style*="color:#d97706"], [style*="color: #d97706"]) { color: #fbbf24 !important; }
    body:not(.tema-claro) [style*="color: #166534"] { color: #4ade80 !important; }
    body:not(.tema-claro) .site-activity-time, body:not(.tema-claro) .site-donut-fraction { color: #94a3b8 !important; }
    body:not(.tema-claro) .site-status-badge.badge-danger, body:not(.tema-claro) .badge-obrig { color: #fca5a5 !important; }
    body:not(.tema-claro) #kpi-clientes { color: #a78bfa !important; }
    
    span[style*="opacity:"]:where([style*="opacity:.6"], [style*="opacity:0.6"], [style*="opacity:0.75"], [style*="opacity:.75"]) { opacity: 1 !important; }
    
    #badge-compressor, #badge-caldeira { color: #04121f !important; background: rgba(255,255,255,.85) !important; }
}




@media (max-width: 768px) {
    .wizard-wrapper > div:first-child { text-align: left !important; margin-bottom: 16px !important; padding-right: 118px; min-height: 48px; }
    .wizard-wrapper > div:first-child > h1 { font-size: 24px !important; line-height: 1.2 !important; }
    .wizard-wrapper > div:first-child > p { font-size: 14px !important; color: #94a3b8 !important; }
    .wizard-wrapper > div:first-child > button { min-height: 44px; top: 0 !important; }
    .wizard-wrapper .steps-progress { padding: 0 !important; margin-bottom: 20px !important; overflow: hidden; }
    .wizard-wrapper .steps-progress > div[style*="position:"]:where([style*="position: absolute"], [style*="position:absolute"]) { top: 21px !important; left: 22px !important; right: 22px !important; max-width: calc(100% - 44px); }
    .wizard-wrapper .step-indicator { min-width: 44px; min-height: 44px; gap: 6px !important; }
    .wizard-wrapper .step-circle { width: 42px !important; height: 42px !important; }
    .wizard-wrapper .step-indicator:not(.active) > span { display: none !important; }
    .wizard-wrapper .step-indicator.active > span { font-size: 12px !important; white-space: nowrap; }
    
    .checklist-item.nao-aplicavel { opacity: 1 !important; border-style: dashed !important; }
    .checklist-item.nao-aplicavel .item-texto { color: #cbd5e1 !important; }
    .checklist-item .checklist-btn { opacity: 1 !important; min-width: 52px !important; min-height: 44px !important; }
    .item-fonte { color: #a3b1c6 !important; }
}


@media (max-width: 768px) {
    #page-financeiro [style*="grid-template-columns:"]:where([style*="grid-template-columns:repeat(4,1fr)"], [style*="grid-template-columns: repeat(4, 1fr)"]) {
        grid-template-columns: minmax(0, 1fr) !important; gap: 10px !important;
    }
    #page-financeiro [id^="card-fin-"] { padding: 14px 16px !important; }
    #page-financeiro [id^="card-fin-"] > div:nth-child(2) { white-space: nowrap; }
    #prontuarios-container .glass-card.flex { flex-wrap: wrap !important; gap: 10px !important; }
    #prontuarios-container .glass-card.flex > div { flex-wrap: wrap; }
}







@media (max-width: 768px) {
    body [id^="modal-"]:not(.tela-cheia), body .modal:not(.tela-cheia) {
        padding: 0 !important;
        align-items: stretch !important;
        justify-content: stretch !important;
    }
    body [id^="modal-"]:not(.tela-cheia) > div:first-child, body .modal:not(.tela-cheia) > div:first-child {
        position: relative !important; inset: auto !important;
        width: 100% !important; max-width: 100% !important;
        height: 100% !important; min-height: 100% !important; max-height: none !important;
        margin: 0 !important; border-radius: 0 !important; border-left: 0 !important; border-right: 0 !important;
        overflow-y: auto !important; overscroll-behavior: contain;
        padding: calc(14px + env(safe-area-inset-top, 0px)) 16px calc(16px + env(safe-area-inset-bottom, 0px)) !important;
        animation: none !important;
        box-sizing: border-box !important;
    }
    
    body [id^="modal-"]:not(.tela-cheia) > div:first-child > form > :last-child:not(button),
    #modal-novo-orcamento .orc-modal-grid > div:last-child > div:nth-child(2) {
        position: sticky !important; bottom: 0; z-index: 5;
        margin-left: -16px !important; margin-right: -16px !important; margin-bottom: 0 !important;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)) !important;
        background: #1e293b !important; border-top: 1px solid rgba(255, 255, 255, 0.12);
        display: flex; flex-wrap: wrap; gap: 10px;
    }
    body [id^="modal-"]:not(.tela-cheia) > div:first-child > form { padding-bottom: 0 !important; margin-bottom: 0 !important; }
    body [id^="modal-"]:not(.tela-cheia) > div:first-child > form > :last-child > button { flex: 1 1 140px; min-height: 48px; }
    
    #modal-novo-orcamento .orc-modal-grid { padding: 14px 16px 0 !important; }
    #modal-novo-orcamento .orc-modal-grid > div:last-child { display: contents !important; }
    #modal-novo-orcamento > div:first-child { padding: 0 !important; }
    #modal-novo-orcamento > div:first-child > div:first-child { padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 14px !important; }
    
    body.tema-claro [id^="modal-"]:not(.tela-cheia) > div:first-child > form > :last-child:not(button),
    body.tema-claro #modal-novo-orcamento .orc-modal-grid > div:last-child > div:nth-child(2) {
        background: #ffffff !important; border-top-color: #e2e8f0;
    }
    
    body [id^="modal-"] button[onclick*="hideModal"], body [id^="modal-"] button[onclick*="fechar"], body [id^="modal-"] button[onclick*="remove()"] {
        min-width: 44px !important; min-height: 44px !important;
    }

    
    .tela-cheia > .tc-topo { padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 10px !important; gap: 10px !important; }
    .tela-cheia .tc-icone { font-size: 1.5rem !important; }
    .tela-cheia .tc-titulo { font-size: 18px !important; line-height: 1.25; }
    .tela-cheia .tc-sub { font-size: 14px !important; }
    .tela-cheia .tc-fechar { width: 44px !important; height: 44px !important; }
    .tela-cheia > .tc-corpo { padding: 14px 14px 24px !important; }
    .tela-cheia > .tc-rodape { padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px)) !important; flex-wrap: wrap; }
    .tela-cheia > .tc-rodape .tc-btn { flex: 1 1 140px; min-height: 48px; }
    body.com-tela-cheia .bottom-nav { display: none !important; }
}


@media (max-width: 768px) {
    body #modal-novo-orcamento { padding: 0 !important; }
    body #modal-novo-orcamento > div:first-child { margin: 0 !important; }
    
    #form-novo-evento select { min-width: 72px !important; flex: 1 1 72px; }
    
    #modal-selecao-inspecao > div:first-child > div[style*="grid-template-columns:1fr 1fr"] { grid-template-columns: minmax(0, 1fr) !important; gap: 12px !important; }
    #modal-selecao-inspecao > div:first-child > div[style*="text-align:center"] { padding: 0 52px; }
    #modal-selecao-inspecao > div:first-child > button:first-child { top: calc(10px + env(safe-area-inset-top, 0px)) !important; right: 12px !important; width: 44px !important; height: 44px !important; }
}




@media (max-width: 768px) {
    button[style*="linear-gradient(135deg,"][style]:where([style*="linear-gradient(135deg,#3b82f6"], [style*="linear-gradient(135deg, #3b82f6"]) { background: #2563eb !important; color: #fff !important; }
    button[style*="linear-gradient(135deg,"][style]:where([style*="linear-gradient(135deg,#10b981"], [style*="linear-gradient(135deg, #10b981"]) { background: #047857 !important; color: #fff !important; }
    button[style*="linear-gradient(135deg,"][style]:where([style*="linear-gradient(135deg,#0ea5e9"], [style*="linear-gradient(135deg, #0ea5e9"]) { background: #0369a1 !important; color: #fff !important; }
    button[style*="linear-gradient(135deg,"][style]:where([style*="linear-gradient(135deg,#f59e0b"], [style*="linear-gradient(135deg, #f59e0b"]) { background: #f59e0b !important; color: #1c1102 !important; }
    body.tema-claro button[style*="linear-gradient(135deg,"][style]:where([style*="linear-gradient(135deg,#f59e0b"], [style*="linear-gradient(135deg, #f59e0b"]) { background: #f59e0b !important; color: #1c1102 !important; }
    .tela-cheia .tc-btn.tc-primaria, body.tema-claro .tela-cheia .tc-btn.tc-primaria { background: #15803d !important; color: #fff !important; }
}





@media (max-width: 768px) {
    .page h1[style]:where([style*="font-size:2"], [style*="font-size: 2."]),
    .page h2[style]:where([style*="font-size:2"], [style*="font-size: 2."]) {
        font-size: 24px !important; line-height: 1.2 !important; letter-spacing: -0.01em;
    }
    .page > .flex.justify-between.items-center.mb-10,
    #page-financeiro > div:first-child {
        flex-direction: column !important; align-items: stretch !important;
        gap: 12px !important; margin-bottom: 14px !important;
    }
    .page > .flex.justify-between.items-center.mb-10 > div:last-child,
    #page-financeiro > div:first-child > div:last-child {
        display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px !important;
        width: 100%; justify-content: stretch !important;
    }
    .page > .flex.justify-between.items-center.mb-10 > div:last-child > button,
    .page > .flex.justify-between.items-center.mb-10 > div:last-child > div,
    #page-financeiro > div:first-child > div:last-child > button,
    #page-financeiro > div:first-child > div:last-child > div {
        width: 100% !important; min-height: 48px; margin: 0 !important;
        padding: 10px 12px !important; font-size: 15px !important; line-height: 1.2 !important;
    }
    #page-financeiro > div:first-child > div:last-child > div > button { width: 100% !important; height: 100%; }
    .page > .flex.justify-between.items-center.mb-10 > div:last-child > span[style*="width:1px"] { display: none !important; }
    .page > .flex.justify-between.items-center.mb-10 p, #page-financeiro > div:first-child p { font-size: 14px !important; line-height: 1.45 !important; }

    
    #inspection-tabs-container > button { padding: 10px 16px !important; }

    
    .conferencia-cadastro summary { display: block !important; line-height: 1.4; padding: 10px 0; }
    .conferencia-cadastro summary .conferencia-cadastro__nota { display: block; margin-top: 4px; }
}


@media (max-width: 768px) {
    
    body .page input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]):not([data-x]),
    body .page select:not([data-x]), body .page textarea:not([data-x]),
    body [id^="modal-"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]):not([data-x]),
    body [id^="modal-"] select:not([data-x]), body [id^="modal-"] textarea:not([data-x]),
    body .tela-cheia input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([data-x]),
    body .tela-cheia select:not([data-x]), body .tela-cheia textarea:not([data-x]) {
        font-size: 16px !important;
    }
    
    body .page input[type="color"] { min-width: 52px !important; min-height: 44px !important; }
    
    #search-equipamentos { width: 100% !important; min-width: 0; flex: 1 1 100% !important; }
    
    #site-kpi-receitas-areceber { min-height: 44px; display: flex !important; align-items: center; }
    
    #prontuarios-grid .glass-card > div { min-width: 0; }
    #prontuarios-grid .p-6 { padding: 16px !important; min-width: 0; }
    #prontuarios-grid p.truncate { max-width: 100%; min-width: 0; display: block !important; }
    #prontuarios-grid .glass-card button { white-space: normal !important; }
    
    #lista-clientes span.text-xs.text-blue-400 { display: inline-flex; align-items: center; min-height: 44px; }
    
    body #card-motor-formulas td, body #card-motor-formulas th { font-size: 14px !important; }
    .cfg-trafego-tit { font-size: 14px !important; }
    .pc-kpi-muted, #pc-kpi-faturamento-trend { font-size: 14px !important; }
    .item-fonte { font-size: 14px !important; }
    
    
    #painel-hoje [style*="grid-template-columns:repeat(6"] { grid-template-columns: repeat(6, minmax(62px, 1fr)) !important; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; padding-bottom: 8px !important; }
    
    #insp-o-que-fazer [style*="display:flex"] { flex-wrap: wrap !important; }
    #insp-o-que-fazer [style*="display:flex"] > span { flex: 1 1 100% !important; min-width: 0; }
    
    #tab-content-lancamentos [style*="display:flex"] > span { min-width: 0; }
    
    #calendar-view .ag-kpis, #calendar-view [class*="ag-kpi-grid"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    
    #relatorios-content [style*="grid-template-columns:"]:where([style*="grid-template-columns:repeat(6"], [style*="grid-template-columns: repeat(6"]) { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    
    #step-6 label[style*="display:"]:where([style*="display:flex"], [style*="display: flex"]) { flex-wrap: wrap; }
    #step-6 label > span { min-width: 0; flex: 1 1 auto; }
    
    body:not(.has-bottom-nav) #mg-botao { top: auto !important; bottom: calc(14px + env(safe-area-inset-bottom, 0px)) !important; right: 14px !important; width: 44px !important; height: 44px !important; }
    #page-login { padding-bottom: calc(136px + env(safe-area-inset-bottom, 0px)) !important; }
    
    #login-pass { padding-right: 52px !important; }
    #btn-toggle-password { min-width: 44px; min-height: 44px; }
    
    body:not(.tema-claro) .checklist-btn.nc-btn { color: #fca5a5 !important; }
    body:not(.tema-claro) .checklist-btn.ni-btn { color: #fbbf24 !important; }
    body:not(.tema-claro) .checklist-btn.na-btn { color: #cbd5e1 !important; }
    body:not(.tema-claro) #parecer-ia-resultado .btn, body:not(.tema-claro) #parecer-ia-resultado button[style*="color:#10b981"] { color: #34d399 !important; }
    .page button.btn[style*="background:#8b5cf6"], .page button.btn[style*="background: #8b5cf6"], #parecer-ia-container button.btn { background-color: #7c3aed !important; }
    #btn-bi-alertas, #btn-bi-alertas > div { background-color: #dc2626 !important; }
    #aba-btn-treinamento:not(.ativa):not(.active) { color: #475569 !important; }
}



@media (max-width: 768px) {
    .page [style*="grid-template-columns:"]:where([style*="grid-template-columns:repeat(4,1fr)"], [style*="grid-template-columns: repeat(4, 1fr)"], [style*="grid-template-columns: repeat(5, 1fr)"]) {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    .page .grid > * { min-width: 0; }
    #prontuarios-grid { grid-template-columns: minmax(0, 1fr) !important; }
    
    #pc-kpi-strip { grid-template-columns: minmax(0, 1fr) !important; }
    .pc-kpi-lbl { font-size: 14px !important; }
    
    body .page [style*="flex:1;min-width:150px"] { min-width: 100% !important; }
    
    #page-financeiro [id^="card-fin-"] span { white-space: nowrap; }
    #tab-content-lancamentos [style*="justify-content:space-between;align-items:center;padding:12px 16px"] { flex-wrap: wrap !important; gap: 8px !important; }
    #tab-content-lancamentos [style*="justify-content:space-between;align-items:center;padding:12px 16px"] > div:first-child { flex: 1 1 100%; min-width: 0; }
    
    #equipamentos-content > div[style*="display: flex"][style*="space-between"] { flex-wrap: wrap !important; }
    #equipamentos-content > div[style*="display: flex"][style*="space-between"] > div[style*="flex: 1"] { flex: 1 1 100% !important; }
    
    #calendar-view .ag-kpi button { max-width: 100%; white-space: normal; }
}
@media (max-width: 768px) {
    
    #prontuarios-grid .glass-card { padding: 0 0 4px !important; align-items: stretch !important; }
    #prontuarios-grid .glass-card > div { align-self: stretch !important; width: 100% !important; max-width: 100%; box-sizing: border-box; }
    #prontuarios-grid h3 { flex-wrap: wrap; overflow-wrap: anywhere; font-size: 22px !important; }
    
    #pc-kpi-faturamento-trend { display: block !important; white-space: normal !important; }
    #pc-kpi-faturamento-trend .pc-kpi-muted { display: block; font-size: 14px !important; margin-top: 2px; }
    
    #tab-content-lancamentos [style*="justify-content:space-between;align-items:center;padding:12px 16px"] span { white-space: nowrap; }
    #tab-content-lancamentos [style*="justify-content:space-between;align-items:center;padding:12px 16px"] > div:first-child > span:first-child { white-space: normal; }
    
    #calendar-view .ag-kpi > div { overflow-wrap: normal; }
}
@media (max-width: 768px) {
    
    #page-financeiro > div:first-child > div:last-child > div { padding: 0 !important; display: block !important; }
    #page-financeiro > div:first-child > div:last-child > div > button { width: 100% !important; min-height: 48px; margin: 0 !important; }
}






@media (max-width: 768px) {
    body [id^="modal-"]:not(.tela-cheia) > div:first-child > form > button:last-child {
        position: sticky !important; bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important; z-index: 5;
        margin: 12px 0 10px !important; width: 100% !important; min-height: 52px;
        padding: 14px 16px !important;
        box-shadow: 0 -10px 0 10px #1e293b, 0 6px 18px rgba(0, 0, 0, 0.35) !important;
        border-top: 0 !important; display: block;
    }
    body.tema-claro [id^="modal-"]:not(.tela-cheia) > div:first-child > form > button:last-child {
        box-shadow: 0 -10px 0 10px #ffffff, 0 6px 18px rgba(15, 23, 42, 0.18) !important;
    }
    body [id^="modal-"] form > button:last-child[style*="linear-gradient"] { background-color: #0369a1; }
}


@media (max-width: 768px) {
    
    body.tema-claro #page-financeiro button[id^="tab-btn-"] { color: #334155 !important; }
    body.tema-claro #page-financeiro button[id^="tab-btn-"][style*="0,212,255,0.15"],
    body.tema-claro #page-financeiro button[id^="tab-btn-"][style*="0, 212, 255, 0.15"] { color: #075985 !important; }
    body.tema-claro #financeiro-analise-container button { color: #334155 !important; }
    
    body.tema-claro #insp-proximo-passo button[style]:where([style*="ef4444"], [style*="f59e0b"]) { color: #ffffff !important; }
    
    body.tema-claro #pc-conversao-servico [style]:where([style*="#16a34a"], [style*="#22c55e"]) { color: #15803d !important; }
    body.tema-claro #pc-conversao-servico [style]:where([style*="#d97706"], [style*="#f59e0b"]) { color: #b45309 !important; }
    body.tema-claro #pc-conversao-servico span { filter: none; }
    body.tema-claro #btn-rel-executivo { color: #047857 !important; }
    body.tema-claro #pc-servico-nota [style]:where([style*="#16a34a"], [style*="#22c55e"]) { color: #166534 !important; }
    body.tema-claro #central-comercial b[style*="#cbd5e1"], body.tema-claro #central-comercial b { color: #334155 !important; }
    body.tema-claro #btn-bi-alertas, body.tema-claro #btn-bi-alertas * { color: #ffffff !important; }
    body.tema-claro #bi-alertas-container [style*="#475569"]:where([style*="color:#475569"], [style*="color: #475569"]) { color: #1e293b !important; }
    
    body.tema-claro #retencao-central [style*="background:rgba(0,0,0,"]:where([style*="background:rgba(0,0,0,0.25)"], [style*="background:rgba(0,0,0,.25)"]) { background: #f1f5f9 !important; }
    body.tema-claro #retencao-central [style*="background:rgba(0,0,0"] { background-color: #f1f5f9 !important; }
    body.tema-claro #retencao-central [style*="color:#"]:where([style*="color:#94a3b8"], [style*="color:#64748b"]) { color: #475569 !important; }
    body.tema-claro #retencao-central [style*="color:#f"]:where([style*="color:#f59e0b"], [style*="color:#fbbf24"]) { color: #92400e !important; }
    body.tema-claro #retencao-central [style*="color:#10b981"] { color: #047857 !important; }
    
    body.tema-claro #badge-caldeira-licenca { color: #047857 !important; }
    body.tema-claro #step-3 button[style]:where([style*="#c4b5fd"], [style*="196,181,253"]) { color: #6d28d9 !important; }
    body.tema-claro [id^="preview-"] span { color: #075985 !important; }
}


@media (max-width: 768px) {
    #calendar-view [style*="display:flex;justify-content:space-between;align-items:center;margin-bottom:18px"] { flex-wrap: wrap !important; gap: 10px !important; }
    #calendar-view [style*="display:flex;justify-content:space-between;align-items:center;margin-bottom:18px"] > div:first-child { flex: 1 1 100%; justify-content: space-between; }
    #calendar-view [style*="display:flex;justify-content:space-between;align-items:center;margin-bottom:18px"] > div:first-child > div { flex: 1 1 auto; text-align: center; }
    #calendar-view [style*="display:flex;justify-content:space-between;align-items:center;margin-bottom:18px"] > :not(:first-child) { flex: 1 1 100%; }
    
    #calendar-view [style*="display:flex;gap:10px;align-items:baseline;padding:6px 0"] { flex-wrap: wrap !important; row-gap: 2px !important; }
    #calendar-view [style*="display:flex;gap:10px;align-items:baseline;padding:6px 0"] > * { flex: 1 1 100%; min-width: 0; }
}





@media (max-width: 768px) {
    #cfg-sec-empresa [style*="align-items:"]:where([style*="display: flex; gap: 8px; align-items: center"], [style*="display:flex;gap:8px;align-items:center"]) { flex-wrap: wrap !important; }
}
@media (max-width: 768px) {
    
    body .page button { white-space: normal !important; overflow-wrap: break-word; }
    body .page .bottom-nav button, body .page [role="tab"] { white-space: nowrap !important; }
    
    body.tema-claro #bi-alertas-container [style*="rgba(0,0,0,0.2)"]:where([style*="background: rgba(0,0,0,0.2)"], [style*="background:rgba(0,0,0,0.2)"]) { background: rgba(255, 255, 255, 0.75) !important; }
}
@media (max-width: 768px) {
    
    #card-motor-formulas tr[style*="opacity"] { opacity: 1 !important; background: rgba(148, 163, 184, 0.08); }
}
@media (max-width: 768px) {
    
    #app-versao-login { font-size: 12px !important; }
    body.tema-claro #app-versao-login { color: #475569 !important; }
}
@media (max-width: 768px) {
    
    #insp-o-que-fazer [style*="display:flex"] > *, #insp-o-que-fazer [style*="display: flex"] > * { flex: 1 1 100% !important; min-width: 0; max-width: 100%; }
    #insp-o-que-fazer [style*="display: flex"] { flex-wrap: wrap !important; }
}
@media (max-width: 768px) {
    

    body .page .segmented-toggle {
        display: flex !important; flex-wrap: nowrap !important; overflow-x: auto !important; overflow-y: hidden !important;
        gap: 8px !important; max-width: 100% !important; scroll-snap-type: x proximity; scrollbar-width: none;
        -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; padding-bottom: 2px;
    }
    body .page .segmented-toggle > button { flex: 0 0 auto !important; white-space: nowrap !important; scroll-snap-align: start; }
}
@media (max-width: 768px) {
    
    #calendar-view [style*="grid-template-columns:repeat(7,1fr);gap:"]:where([style*="grid-template-columns:repeat(7,1fr);gap:6px"], [style*="grid-template-columns:repeat(7,1fr);gap:8px"]) { gap: 3px !important; }
    #calendar-view .ag-day { padding: 4px !important; min-width: 0; }
    
    #material-container[style*="opacity"] { opacity: 1 !important; }
}
@media (max-width: 768px) {
    
    .page [style*="minmax(3"]:where([style*="minmax(350px"], [style*="minmax(320px"], [style*="minmax(300px"]) { grid-template-columns: minmax(0, 1fr) !important; }
    
    #tab-content-lancamentos [style*="justify-content: space-between; align-items: center; padding: 12px 16px"] { flex-wrap: wrap !important; gap: 8px !important; }
    #tab-content-lancamentos [style*="justify-content: space-between; align-items: center; padding: 12px 16px"] > div:first-child { flex: 1 1 100%; min-width: 0; }
    #tab-content-lancamentos [style*="justify-content: space-between; align-items: center; padding: 12px 16px"] span { white-space: nowrap; }
    #tab-content-lancamentos [style*="justify-content: space-between; align-items: center; padding: 12px 16px"] > div:first-child > span:first-child { white-space: normal; }
    
    #extrato-relatorio span { white-space: nowrap; }
    #retencao-central [style]:where([style*="font-size:0.68rem"], [style*="font-size: 0.68rem"]) { overflow-wrap: normal; }
}
@media (max-width: 768px) {
    
    #retencao-central [style*="flex:1;min-width:150px"] > div { text-wrap: balance; }
    
    #tab-content-lancamentos [style*="justify-content: space-between; align-items: center; padding: 12px 16px"] > div:last-child,
    #tab-content-lancamentos [style*="justify-content:space-between;align-items:center;padding:12px 16px"] > div:last-child {
        flex: 1 1 100%; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; min-width: 0;
    }
}
@media (max-width: 768px) {
    

    #calendar-view .ag-day.hoje { animation: none !important; box-shadow: inset 0 0 0 2px var(--brand-accent, #00d4ff) !important; }
}









@media (max-width: 768px) {
    body input[type="checkbox"]:not([data-x]), body input[type="radio"]:not([data-x]) {
        -webkit-appearance: none !important; appearance: none !important;
        width: 44px !important; height: 44px !important; min-width: 44px !important; min-height: 44px !important;
        margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important;
        box-shadow: none !important; outline-offset: -8px;
        background-color: transparent !important;
        background-repeat: no-repeat !important; background-position: center !important; background-size: 22px 22px !important;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Crect x='1' y='1' width='20' height='20' rx='5' fill='%230f172a' stroke='%2394a3b8' stroke-width='2'/%3E%3C/svg%3E") !important;
        vertical-align: middle; cursor: pointer; flex: 0 0 44px;
    }
    body input[type="checkbox"]:not([data-x]):checked {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Crect x='0' y='0' width='22' height='22' rx='5' fill='%230284c7'/%3E%3Cpath d='M6 11.5l3.2 3.2L16 8' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    }
    body input[type="radio"]:not([data-x]) {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='10' fill='%230f172a' stroke='%2394a3b8' stroke-width='2'/%3E%3C/svg%3E") !important;
    }
    body input[type="radio"]:not([data-x]):checked {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='10' fill='%230f172a' stroke='%230284c7' stroke-width='2'/%3E%3Ccircle cx='11' cy='11' r='5.5' fill='%2338bdf8'/%3E%3C/svg%3E") !important;
    }
    body.tema-claro input[type="checkbox"]:not([data-x]):not(:checked) {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Crect x='1' y='1' width='20' height='20' rx='5' fill='white' stroke='%2364748b' stroke-width='2'/%3E%3C/svg%3E") !important;
    }
    body.tema-claro input[type="radio"]:not([data-x]):not(:checked) {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='10' fill='white' stroke='%2364748b' stroke-width='2'/%3E%3C/svg%3E") !important;
    }
    body input[type="checkbox"]:not([data-x]):disabled, body input[type="radio"]:not([data-x]):disabled { opacity: 0.5; cursor: not-allowed; }
    body input[type="checkbox"]:not([data-x]):focus-visible, body input[type="radio"]:not([data-x]):focus-visible { outline: 2px solid #38bdf8; }

    
    body.has-bottom-nav:not(.com-tela-cheia) .bottom-nav::before {
        content: ''; position: absolute; right: 0; bottom: 100%;
        width: calc(112px + env(safe-area-inset-right, 0px)); height: 56px;
        background: rgba(10, 15, 28, 0.97); border-top-left-radius: 18px;
        border-top: 1px solid rgba(255, 255, 255, 0.06); border-left: 1px solid rgba(255, 255, 255, 0.06);
        box-shadow: -4px -4px 16px rgba(0, 0, 0, 0.25);
    }
    body.tema-claro.has-bottom-nav:not(.com-tela-cheia) .bottom-nav::before { background: var(--bn-bg, #fff); border-color: var(--bn-borda, #e2e8f0); box-shadow: -2px -2px 10px rgba(15, 23, 42, 0.08); }
    body.has-bottom-nav:not(.sidebar-open):not(.com-tela-cheia) #mg-botao {
        bottom: calc(70px + env(safe-area-inset-bottom, 0px)) !important;
        right: calc(8px + env(safe-area-inset-right, 0px)) !important;
    }
    body.has-bottom-nav #central-sinal-chip {
        bottom: calc(70px + env(safe-area-inset-bottom, 0px)) !important;
        right: calc(60px + env(safe-area-inset-right, 0px)) !important;
    }
    
}






@media (max-width: 768px) {
    body table[data-mob-lista="1"] tr[data-grupo="pai"] td[data-papel="titulo"] { flex: 1 1 100% !important; flex-wrap: wrap; row-gap: 6px; }
    body table[data-mob-lista="1"] tr[data-grupo="pai"] td[data-papel="titulo"] > strong { flex: 1 1 0; min-width: 0; margin-left: 4px !important; }
    body table[data-mob-lista="1"] tr[data-grupo="pai"] td[data-papel="status"] { margin-left: 0; }
    body table[data-mob-lista="1"] td[data-papel="titulo"] > .mob-mais { margin-left: auto; }
    body table[data-mob-lista="1"] tr[data-grupo="filho"] td[data-papel="titulo"] { flex-wrap: wrap; }
    body table[data-mob-lista="1"] tr[data-grupo="filho"] td[data-papel="titulo"] > div { flex: 1 1 100%; order: 5; margin-left: 52px !important; }
    body table[data-mob-lista="1"] td[data-papel="acao"] > div > button,
    body table[data-mob-lista="1"] td[data-papel="acao"] > div > details { flex: 1 0 auto; }
    body table[data-mob-lista="1"] td[data-papel="acao"] > div > details > summary { width: 100%; justify-content: center; }
    
    body table[data-mob-lista="1"] tr[data-lista] > td[data-papel="acao"]:first-child:not(:last-child) {
        flex: 0 0 auto !important; width: auto !important; padding: 6px 0 0 !important; margin-top: 4px; justify-content: flex-start;
    }
    

    body table[data-mob-lista="1"] tr[data-lista] > td[data-papel="acao"]:first-child ~ td[data-papel="acao"]:last-child:not(.celula-acoes-proposta) { flex: 1 1 0 !important; min-width: 0; }
}
@media (max-width: 768px) {
    
    body table[data-mob-lista="1"] tr[data-grupo="pai"] td[data-papel="titulo"] > strong { flex: 1 1 calc(100% - 32px) !important; }
    body table[data-mob-lista="1"] tr[data-grupo="pai"] td[data-papel="titulo"] > span[style*="nowrap"] { margin-left: 28px !important; }
    body table[data-mob-lista="1"] tr[data-grupo="filho"] td[data-papel="titulo"] > div { white-space: nowrap; overflow-wrap: normal; margin-left: 56px !important; }
}
@media (max-width: 768px) {
    
    #pc-top-clientes-nota { font-size: 14px !important; }
    
    #modal-novo-orcamento .orc-modal-grid > div:last-child > div:nth-child(3) > label:first-child,
    #modal-novo-orcamento .orc-modal-grid > div:last-child > div:nth-child(3) > label:first-child * { color: #334155 !important; }
}


@media (max-width: 768px) {
    #aviso-com-vi { padding: 0 !important; align-items: stretch !important; justify-content: stretch !important; }
    #aviso-com-vi .aviso-vi-caixa {
        max-width: none !important; max-height: none !important; height: 100%; border-radius: 0 !important;
        padding: calc(16px + env(safe-area-inset-top, 0px)) 16px 0 !important; overflow-y: auto; overscroll-behavior: contain;
        box-sizing: border-box; display: flex; flex-direction: column;
    }
    #aviso-com-vi h2 { font-size: 20px !important; }
    #aviso-com-vi p, #aviso-com-vi .aviso-vi-quando { font-size: 15px !important; opacity: 1 !important; }
    #aviso-com-vi ul { flex: 1 0 auto; }
    #aviso-com-vi .aviso-vi-rodape {
        position: sticky; bottom: 0; margin: 14px -16px 0 !important; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
        background: #0f172a; border-top: 1px solid rgba(148, 163, 184, 0.35);
    }
    #aviso-com-vi #aviso-com-vi-ok { width: 100%; min-height: 52px; background: #15803d !important; }
    
    body.tema-claro #aviso-com-vi .aviso-vi-rodape { background: #fff; }
    #aviso-com-vi summary { min-height: 44px !important; display: flex !important; align-items: center; }
    #aviso-com-vi summary, #aviso-com-vi summary *, #aviso-com-vi u { color: #94a3b8 !important; }
    body.tema-claro #aviso-com-vi summary, body.tema-claro #aviso-com-vi summary *, body.tema-claro #aviso-com-vi u { color: #475569 !important; }
}
@media (max-width: 768px) {
    
    body details > summary { display: flex !important; align-items: center; min-height: 44px !important; }
}
