/* Adaptação exclusiva para celular; a composição de computador permanece igual. */
.mobile-menu-button{display:none}.mobile-chart,.mobile-table{display:contents}
@media(max-width:760px), (max-width:1366px) and (pointer:coarse){
 html body .app{display:block;min-width:0}html body main{min-width:0;padding:20px 14px calc(28px + env(safe-area-inset-bottom,0px));width:100%}
 html body .side{display:flex;flex-wrap:wrap;position:sticky;top:0;z-index:30;width:100%;height:auto;min-height:64px;overflow:visible;flex-direction:row!important;align-items:center;padding:10px 14px!important;gap:8px!important}
 html body .brand{flex:1;min-width:0;padding:0;gap:0}html body .brand2{padding:0}.wm2 b{font-size:13px!important}.brand .mk{display:none!important}
 html body .mobile-menu-button{display:flex;align-items:center;gap:8px;min-height:44px;padding:10px 14px;border:1px solid currentColor;border-radius:9px;background:transparent;color:inherit;font:600 14px var(--body)}
 html body .side nav{display:none;flex-basis:100%;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:6px 0;max-height:55dvh;overflow:auto}
 html body .side.mobile-menu-open nav{display:grid}html body .side nav button{min-height:46px;white-space:normal;font-size:13px;text-align:left;padding:10px!important;display:flex;align-items:center;gap:8px}html body .side nav button svg{display:block;width:18px;height:18px;flex:none}
 html body .side .foot{display:none;margin:0;flex-basis:100%;padding:10px 0 0!important}html body .side.mobile-menu-open .foot{display:flex;font-size:13px;gap:6px}.side .foot select{font-size:16px}
 html body input:not([type=checkbox]):not([type=radio]),html body select,html body textarea{font-size:16px!important;min-height:44px;max-width:100%}
 html body main .btn,html body dialog .btn,html body main .tabs button,html body main .dabas button{min-height:44px;font-size:14px;padding:10px 12px}
 html body main .head,html body main .dhead,html body main .cp-top{display:flex;flex-direction:column;align-items:stretch;gap:14px}html body main h1{font-size:25px!important;line-height:1.2}
 html body main .head p,html body main .dhead p,html body .cp .cp-top p{font-size:14px;line-height:1.5}
 html body .tools,html body .dtool,html body .dcbar,html body .cp-tools{display:flex;flex-wrap:wrap;gap:8px;max-width:100%}
 html body .dfil,html body .dre-manual{width:100%;min-width:0}html body .dcbox{min-width:0;width:100%}html body .dcpop{position:fixed;left:12px!important;right:12px!important;top:100px;bottom:auto;width:auto!important;max-height:calc(100dvh - 120px);overflow:auto;z-index:80}
 html body .dper,html body .cp-per,html body .cp-tabs{max-width:100%;flex-wrap:wrap;gap:6px}.dper button,.cp-pchip{min-height:40px!important;font-size:13px!important;padding:8px 10px!important}
 html body .dkpis,html body .stats,html body .dresum,html body .cp-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px}
 html body .dkpis .dk:first-child,html body .cp-stat-grid .cp-stat:first-child{grid-column:1/-1}
 html body .dk{padding:16px!important;min-width:0}html body .dk .v{font-size:25px!important}.dk .t,.dk .s,.dk .var{font-size:13px!important;line-height:1.45}
 html body .drow,html body .drow2,html body .drow3,html body .grid2,html body .dretop,html body .cp-grid,html body .cp-ins-det{grid-template-columns:minmax(0,1fr)!important;gap:14px}
 html body .dp,html body .panel,html body .cp-card{padding:16px!important;min-width:0;max-width:100%}html body .dp h2,html body .panel h2{font-size:17px!important;line-height:1.35}
 html body .dleg{gap:8px;font-size:13px;flex-wrap:wrap}.dnum summary{min-height:40px;display:flex;align-items:center;font-size:14px}
 html body .mobile-chart{display:block;max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;padding-bottom:6px}html body .mobile-chart .dchart{width:100%;max-width:none;min-width:var(--mobile-chart-width,360px)}
 html body .mobile-table,html body .tablewrap,html body .cp-wrap,html body .dcwrap,html body .dnum{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
 html body .mobile-table table,html body .tablewrap table,html body .cp-wrap table,html body .dcwrap table,html body .dnum table{font-size:14px;min-width:520px}html body main table th,html body main table td{font-size:13px!important;padding:12px 10px!important;line-height:1.45}
 .mobile-scrollable::before{content:'Deslize para os lados para ver tudo ↔';display:block;font:500 12px var(--body);color:var(--muted);padding:8px 4px;width:calc(100vw - 64px)}
 html body .cp .cp-note-list{max-height:none;overflow:visible;padding-right:0}.cp .cp-note{padding:14px!important}.cp .cp-note strong{font-size:15px}.cp .cp-note small{font-size:13px}
 html body .cp .cp-it{grid-template-columns:minmax(0,1fr)!important;gap:12px}.cp-it-acoes{justify-content:flex-start!important}.cp .cp-hrend-g{grid-template-columns:repeat(2,minmax(0,1fr))!important}.cp .cp-hrend-g b{font-size:19px}.cp .cp-meta{flex-wrap:wrap}.cp .cp-nh-b>strong{font-size:26px}.cp .cp-item-statuses{flex-wrap:wrap}
 html body dialog{max-width:calc(100vw - 20px)!important;width:calc(100vw - 20px);max-height:calc(100dvh - 20px);margin:auto;padding:0}html body dialog form{max-height:calc(100dvh - 20px);overflow:auto}html body .cp-dialog .cp-body{padding:16px}.cp-dialog .cp-form{grid-template-columns:minmax(0,1fr)!important}
 html body .formgrid{grid-template-columns:minmax(0,1fr)!important}.cp-filter-body{grid-template-columns:minmax(0,1fr)!important}
 html body .cw-cards{grid-template-columns:1fr!important}.cw-summary{gap:8px}.cw-summary strong{font-size:14px}

 /* Contenção do layout moderno: só em telas pequenas ou tablets com toque. */
 html body main *,html body .side *{box-sizing:border-box}
 html body main .head>div,html body main .dhead>div,html body main .mk-fil,html body main .dcomp{min-width:0;max-width:100%}
 html body main .head>div:first-child,html body main .dhead>div:first-child{width:100%}
 html body main .dfil{flex-wrap:wrap;align-items:stretch;gap:8px}
 html body main .dcomp{flex:1 1 240px;width:100%}
 html body main .dcbox{min-width:0!important;max-width:100%;flex-wrap:wrap;gap:6px}
 html body main .dfiltrar{flex:0 0 auto}
 html body main .mnav{min-width:0;max-width:100%;width:100%;flex-wrap:wrap;justify-content:flex-start}
 html body main .mnav .row{flex-wrap:wrap;min-width:0;max-width:100%}
 html body main .mnav select{min-width:0;max-width:100%}
 html body main .mk-kpis,html body main .cp-k4{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important}
 html body main .mk-kpis>.mk-k:first-child,html body main .cp-k4>.mk-k:first-child{grid-column:1/-1}
 html body main .mk-k{padding:16px!important;min-width:0}
 html body main .mk-k .mk-v,html body main .cp-k4 .mk-v{font-size:clamp(20px,5vw,27px)!important;white-space:normal!important;overflow:visible;text-overflow:clip;overflow-wrap:anywhere}
 html body main .mk-k .mk-sub{font-size:13px;line-height:1.5}
 html body main .dretop,html body main .dretop>*{min-width:0;max-width:100%}
 html body main .stmt .mobile-table{overflow:visible;min-width:0;width:100%}
 html body main .stmt .stab{min-width:0!important;width:100%;table-layout:fixed}
 html body main .stmt .stab tr{display:grid;grid-template-columns:1.35fr .75fr .9fr}
 html body main .stmt .stab th:first-child{display:none}
 html body main .stmt .stab td,html body main .stmt .stab th{min-width:0;padding:9px 6px!important;font-size:13px!important;white-space:normal;overflow-wrap:anywhere}
 html body main .stmt .stab tbody td:first-child{grid-column:1/-1;padding-bottom:3px!important;text-indent:0;font-weight:600;border-bottom:0}
 html body main .stmt .stab tbody td:nth-child(2){text-align:left}
 html body main .stmt .stab td i{height:13px;margin-right:6px}
 html body main .stmt .stab tr.l-res td:first-child{border-radius:8px 8px 0 0}
 html body main .stmt .stab tr.l-res td:last-child{border-radius:0 0 8px 0}
 html body main .stmt .stab .info{display:inline-flex;justify-content:center;align-items:center;text-align:center;line-height:1;padding:0;text-indent:0;flex:none}
 html body main .dgroup,html body main .dsec,html body main .conta,html body main .chw{min-width:0;max-width:100%}
 html body main .dsec header{flex-wrap:wrap}
 html body main .ch{min-width:0;flex-wrap:wrap;gap:6px}
 html body main .ch .ct{margin-left:auto;white-space:normal;text-align:right;max-width:100%}
 html body main .ch .cn{white-space:normal}
 html body .mobile-scrollable::before{width:auto;max-width:100%;white-space:normal}
 html body .mobile-chart .mk-chart{width:100%;max-width:none;min-width:var(--mobile-chart-width,360px)}
 html body .mobile-chart .mk-chart text{font-size:calc(12px * var(--k,1))}

 html body main .ch .itensres{flex:1 1 100%;order:4;display:flex;flex-direction:column;gap:6px;border-left:0;margin:0;padding:8px 0 0;font-size:13px}
 html body main .ch .itensres>span{display:flex;flex-wrap:wrap;gap:4px 8px;width:100%;min-width:0}
 html body main .ch .itensres b{margin-left:auto}
 html body main .ch .ct{order:3}
 html body main .ch .itensres .ipf,html body main .conta .ch .pf{opacity:1}

 html body main .chw{flex-wrap:wrap}
 html body main .chw .acao{margin-left:auto}
 html body main .cp-top{height:auto;min-height:0;margin-bottom:18px;gap:14px}
 html body main .cp-top>div{flex:0 1 auto;min-width:0}
 html body main .cp-top>.cp-controls{display:flex;flex-wrap:wrap;align-items:stretch!important;width:100%;min-height:0}
 html body main .cp-controls>label{flex:1 1 170px;min-width:0}
 html body main .cp-controls input[type=month]{width:100%}
 html body main .cpf-grid{grid-template-columns:minmax(0,1fr)!important;height:auto;min-height:0}
 html body main .cpf-grid>.cpf-list{height:auto!important;max-height:440px;overflow-y:auto!important}
 html body main .cpf-grid>.cpf-det{height:auto!important;max-height:none;overflow:visible;min-width:0}
 html body main .cpf-row2{grid-template-columns:36px minmax(0,1fr) auto!important;gap:5px 8px}
 html body main .cpf-row2 .cpf-av{grid-column:1;grid-row:1/3}
 html body main .cpf-row2 .cpf-n{grid-column:2;grid-row:1/3;min-width:0}
 html body main .cpf-row2 .cpf-v2{grid-column:3;grid-row:1}
 html body main .cpf-row2 .cpf-p2{grid-column:3;grid-row:2;font-size:12px}
 html body main .cpf-row2 .cpf-n strong,html body main .cpf-row2 .cpf-n small{white-space:normal;overflow:visible;overflow-wrap:anywhere}
 html body main .cpf-colh{display:flex;justify-content:space-between;gap:8px;padding:10px 8px;font-size:11px}
 html body main .cpf-dh2{flex-wrap:wrap;padding:16px!important}
 html body main .cpf-dh2>.btn{margin-left:auto}
 html body main .cpf-det>.cpf-abas{padding:0 12px;display:flex;flex-wrap:wrap;gap:4px}
 html body main .cpf-det>.cpf-painel,html body main .cpf-det>.cpf-fold{padding:16px!important}
 html body main .cpf-resumo,html body main .cpf-resumo3{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px}
 html body main .cpf-resumo>div{min-width:0;padding:12px}
 html body main .cpf-resumo b{font-size:20px;overflow-wrap:anywhere}
 html body main .cpf-aviso{flex-wrap:wrap;gap:8px}
 html body dialog .cp-form,html body dialog .formgrid{min-width:0;max-width:100%}
 html body dialog input,html body dialog select,html body dialog textarea{min-width:0;width:100%}
 html body dialog .cp-item-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important}
 html body dialog .cp-item-grid label:first-child{grid-column:1/-1}
}

@media(max-width:760px), (max-width:1366px) and (pointer:coarse){
 html body main .cp .cp-top>.cp-controls>label{flex:1 1 100%!important;min-width:0;width:100%}
 html body main .cp .cp-top>.cp-controls>.btn{flex:1 1 130px}
 html body main .cp .cpf-stats{grid-template-columns:repeat(2,minmax(0,1fr))!important;min-width:0}
 html body main .cp .cpf-stats>.cpf-k:first-child{grid-column:1/-1}
 html body main .cp .cpf-stats .cpf-k{min-width:0;overflow-wrap:anywhere;padding:14px!important}
 html body main .cp .cpf-stats .cpf-k b{font-size:22px;white-space:normal}
 html body main .cp .cpf-resumo3>div:first-child{grid-column:1/-1}
 html body main .mnav{display:grid;grid-template-columns:36px minmax(0,1fr) 36px;align-items:start}
 html body main .mnav .row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.7fr)}
 html body main .mnav .row [data-lb-export]{grid-column:1/-1;justify-self:start}
 html body main .mnav .row select{width:100%}
}
@media(min-width:761px) and (max-width:1366px) and (pointer:coarse){
 html body main{padding:24px}
 html body main .mk-kpis,html body main .cp-k4{grid-template-columns:repeat(3,minmax(0,1fr))!important}
 html body main .mk-kpis>.mk-k:first-child,html body main .cp-k4>.mk-k:first-child{grid-column:auto}
 html body main .dretop{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 html body main .stmt .stab td,html body main .stmt .stab th{font-size:14px!important}
}

/* Rolagem nativa em todas as tabelas e menu lateral no celular. */
.brand2[role=link]{cursor:pointer}.brand2[role=link]:focus-visible{outline:2px solid var(--salmon);outline-offset:4px}
.mobile-menu-backdrop{display:none}
@media(max-width:760px), (max-width:1366px) and (pointer:coarse){
 html body main .tablewrap,html body main .mobile-table,html body main .dcwrap,html body main .cw-bars{display:block;min-width:0;width:100%;max-width:100%;overflow-x:auto!important;touch-action:pan-x pan-y;-webkit-overflow-scrolling:touch}
 html body main .dsec .tablewrap table{min-width:640px!important;width:100%}
 html body main .dcwrap .dctab{min-width:760px}
 html body main .dcwrap .dctab th:first-child,html body main .dcwrap .dctab td:first-child{position:static;max-width:180px;white-space:normal;overflow-wrap:anywhere}
 html body main .cw-chart{min-width:0;max-width:100%}.cw-week{flex:0 0 120px!important}.cw-legend{flex-wrap:wrap}
 html body .side nav{position:fixed;top:74px;bottom:0;left:0;width:min(300px,85vw);max-height:none;z-index:42;margin:0;padding:18px 12px;background:var(--surface);box-shadow:8px 0 30px #0003;grid-template-columns:minmax(0,1fr);align-content:start;overflow-y:auto}
 html body .side.mobile-menu-open nav{display:grid}
 html body .side.mobile-menu-open .foot{display:none}
 html body .mobile-menu-backdrop:not([hidden]){display:block;position:fixed;inset:74px 0 0;background:#0005;border:0;border-radius:0;z-index:41;width:100%;height:calc(100dvh - 74px);padding:0}
 html body .side .brand,html body .side .mobile-menu-button{position:relative;z-index:43}
}
