.semana-periodo::before,.semana-cotacao::before{content:" · "}
/* Mobile layout: desktop styles stay in their source pages. */
.mobile-nav,.mobile-actions{display:none}
@media screen and (max-width:700px){
 html{-webkit-text-size-adjust:100%;scroll-padding-top:84px}
 body{font-size:15px;overflow-wrap:break-word}
 .wrap,main{min-width:0;max-width:100%;padding-left:12px;padding-right:12px}
 body.mobile-shell .wrap{padding-bottom:calc(88px + env(safe-area-inset-bottom))}
 button,input,select,textarea{font-family:inherit}
 button,.btn,select,input:not([type=checkbox]):not([type=radio]){min-height:44px}
 input:not([type=checkbox]):not([type=radio]),select,textarea{font-size:16px!important;max-width:100%}
 button,.btn,a,summary,label{touch-action:manipulation}
 button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible{outline:3px solid #777bc7;outline-offset:2px}
 .mobile-shell header{z-index:40;margin-bottom:14px}
 .mobile-shell .hbar{padding:12px 0;gap:10px}
 .mobile-shell .htitle h1{font-size:17px}
 .mobile-shell .hbar img.brand{height:25px}
 .mobile-shell .userIcon{width:44px;height:44px}
 .mobile-shell .hlinks{top:48px;max-width:calc(100vw - 24px)}
 .mobile-actions{display:inline-flex;justify-content:center;align-items:center;min-height:44px;padding:8px 12px;background:#fff;border:1px solid #c4c6d0;border-radius:10px;color:#1e1e7b;font-size:14px;font-weight:600}
 .mobile-shell #menu{display:none}
 .mobile-shell #menu.mobile-open{display:flex;flex-wrap:wrap;overflow:visible;max-height:65dvh;overflow-y:auto;padding:10px 0 14px;gap:10px}
 .mobile-shell #menu .mgrp{display:flex;flex-wrap:wrap;flex:1 1 100%;gap:8px}
 .mobile-shell #menu .btn{justify-content:center;flex:1 1 auto;min-height:44px;padding:10px;font-size:14px;border-radius:9px;white-space:normal}
 .mobile-shell #menu .spacer{display:none}
 .mobile-shell #menu .who{width:100%;min-height:44px}
 .mobile-nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));position:fixed;bottom:0;left:0;right:0;z-index:45;background:#fff;border-top:1px solid #d5d7e3;padding:7px 12px calc(7px + env(safe-area-inset-bottom));gap:7px;box-shadow:0 -4px 18px #1e1e7b0d}
 .mobile-nav a{display:flex;align-items:center;justify-content:center;min-height:48px;border-radius:10px;text-decoration:none;color:#596273;font-size:13px;font-weight:600}
 .mobile-nav a.ativo{background:#eeeef9;color:#1e1e7b;box-shadow:inset 0 0 0 1px #dddff1}
 .semanaHome .titulo{white-space:normal!important;overflow:visible!important;font-size:17px!important;line-height:1.5}
 .semanaHome .situacao{display:inline-flex;padding:3px 8px;background:#eeeef8;border-radius:6px;font-size:12px}
 .kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important;border-radius:12px;gap:1px}
 .kpis .kpi:first-child{grid-column:1/-1}
 .kpi{padding:14px!important;min-width:0}.kpi .vl{font-size:25px!important}.kpi .lb,.kpi .sb{font-size:12px}
 .warn{font-size:13px;line-height:1.6;border-radius:0 9px 9px 0;overflow-wrap:anywhere}
 .nec,.import,.sec,.detail,.editor{min-width:0;max-width:100%}
 .nec,.import,.editor{border-radius:12px;padding:14px!important}
 .nechead{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px}
 .nechead h2{font-size:17px}.necresumo{flex-wrap:wrap;line-height:1.5}
 .necfoot,.addnec,.cotacoes,.edfoot{flex-wrap:wrap;gap:8px}.necfoot button,.edfoot button{flex:1 1 auto}
 .modo{min-width:0;flex-basis:100%;border-radius:10px}.modos{gap:8px}
 .nrow{grid-template-columns:auto minmax(0,1fr) 80px auto;gap:10px 8px}
 .nrow .nm,.opt .nm{overflow-wrap:anywhere}.nrow input.v{min-width:0}
 .grid,.drops{grid-template-columns:minmax(0,1fr)!important;gap:18px}
 .legend{line-height:1.6}.tip{white-space:normal;max-width:85vw}
 .mobile-scroll,.histtabela,.scroll,.histplot{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
 .mobile-scroll{margin:10px 0;border:1px solid #d9dce6;border-radius:9px;background:#fff}
 .mobile-scroll table{margin:0;border:0}.mobile-scroll:focus-visible{outline:2px solid #1e1e7b}
 .mobile-scroll th,.mobile-scroll td{padding:10px!important;font-size:13px}
 .mobile-scroll th:first-child,.mobile-scroll td:first-child{position:sticky;left:0;background:#fff;z-index:1;max-width:150px}
 .mobile-scroll th:first-child{background:#f4f5f8}
 .sec{overflow:visible!important}.sec table.t{min-width:530px}
 .rascunho{display:flex;flex-wrap:wrap;gap:10px}.rascunho-info{flex:1 1 100%;overflow-wrap:anywhere}.rascunho button{flex:1}
 .car-campos{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:14px!important}
 .car-campos label{min-width:0}.car-campos input,.car-campos select{width:100%;min-width:0;border-radius:8px;padding:10px}
 #carForm{padding:14px 0!important}#carteirasBox .hint{padding:0!important}#carSaldo{font-size:22px}
 .opt{grid-template-columns:20px minmax(0,1fr) minmax(85px,auto);padding:12px 0;gap:9px}
 .opt input{min-width:0}.prow{flex-wrap:wrap}.prow .nm{min-width:0;overflow-wrap:anywhere}
 .ovl{padding:12px!important;align-items:flex-end!important}.caixaSenha{max-height:85dvh;overflow-y:auto;width:100%}
 .cards{grid-template-columns:repeat(2,minmax(0,1fr));border-radius:12px;overflow:hidden}.cards .c{padding:13px;min-width:0}.cards .big{font-size:23px;overflow-wrap:anywhere}
 .historico{padding:14px!important;border-radius:12px}.histcab{flex-wrap:wrap;gap:8px}.histcab h2{font-size:19px}
 .histfiltros{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}.histfiltros label{width:100%}.histfiltros select{width:100%}
 .histkpis{grid-template-columns:minmax(0,1fr)!important;gap:8px}.histkpis>div{padding:13px}.histkpis b{font-size:25px!important}
 .histdet{padding:12px}.histtabela table{min-width:620px}.histlegenda,.ref-qualidade{font-size:12px;line-height:1.7}
 .histplot svg{min-width:0}.historico .histplot::after{font-size:12px}
 .card{border-radius:12px}.card .nome{font-size:15px!important}.card .col .pr{font-size:13px!important}.card .col.atual .pr{font-size:16px!important}
 .grafico-painel,.comparacao{border-radius:12px;padding:14px!important;min-width:0}
 .mobile-chart{overflow-x:auto;max-width:100%;-webkit-overflow-scrolling:touch}.mobile-chart .grafico-svg{min-width:680px;max-height:none}
 .ferramentas{gap:8px}.ferramentas select,.comparacao select{min-width:0;width:100%}.ferramentas button{min-height:44px}
 .linha .mail{overflow-wrap:anywhere}.acoes{flex-wrap:wrap}.lista{flex-wrap:wrap;min-width:0}.lista>div,.lista>span{min-width:0;overflow-wrap:anywhere}
 .box{padding:14px;border-radius:12px}.acoes button{flex:1 1 100%}
 body.mobile-frame .wrap,body.mobile-frame main{padding:10px 0 24px}
}
@media print{.mobile-nav,.mobile-actions{display:none!important}}

/* Alinhamento das legendas e controles no celular. */
@media screen and (max-width:700px){
 .semanaHome{display:flex;flex-direction:column;align-items:center;gap:7px;text-align:center;padding:12px 8px 16px}
 .semanaHome .titulo{width:100%;font-size:18px!important;line-height:1.45}
 .semanaHome .quinta-cotacao{margin:3px 0 7px;font-size:12px!important}
 .semanaHome .semana-periodo,.semanaHome .semana-cotacao{display:block;font-size:13px;font-weight:400;line-height:1.65;color:#596273}
 .semanaHome .situacao{flex-basis:auto;align-self:center;max-width:100%;margin-top:3px;padding:4px 12px}
 .wrap>header:has(#periodo){display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.35fr);gap:12px 8px;align-items:center;text-align:center}
 .wrap>header:has(#periodo)>div:first-child{grid-column:1/-1}
 .wrap>header:has(#periodo) h1{font-size:23px}.wrap>header:has(#periodo) .sub{font-size:12px;line-height:1.55;margin:5px 0 3px}
 .wrap>header:has(#periodo) .spacer{display:none}
 .wrap>header:has(#periodo) .modo{width:100%;min-width:0;display:grid;grid-template-columns:1fr 1fr;border-radius:9px}
 .wrap>header:has(#periodo) .modobtn{min-height:44px;padding:8px 6px;font-size:14px;text-align:center}
 .wrap>header:has(#periodo) #periodo{width:100%;min-width:0;margin:0;padding:8px;font-size:14px!important;min-height:44px;border-radius:9px}
 .wrap>header:has(#semana){display:flex;flex-wrap:wrap;justify-content:center;gap:10px;text-align:center}
 .wrap>header:has(#semana)>div:first-child{display:contents}
 .wrap>header:has(#semana) h1{flex:1 1 100%;font-size:21px}
 .wrap>header:has(#semana) #semana{width:100%;min-width:0;text-align:center;border-radius:9px;padding:8px 12px}
 .wrap>header:has(#semana) .sub{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;width:100%;flex:1 1 100%;order:3;text-align:center;font-size:12px;line-height:1.5}
 .cotacao-atual,.cotacao-anterior{padding:9px 6px;background:#eceef5;border-radius:9px}
 .cotacao-atual{font-weight:600;color:#1e1e7b}.cotacao-anterior{font-weight:400}
 .cotacao-quantidade{grid-column:1/-1;font-size:12px;padding:3px 0 4px}
 .card{display:grid;grid-template-columns:22px minmax(0,1fr) 72px 12px;gap:10px 7px;align-items:start}
 .card .pos{grid-row:1;grid-column:1;width:auto;align-self:center}
 .card .nome{grid-row:1;grid-column:2;min-width:0;width:auto;font-size:14px!important;line-height:1.45;align-self:center}
 .card .var{grid-row:1;grid-column:3;width:72px;min-width:72px;font-size:12px;padding:6px 5px;white-space:nowrap;overflow-wrap:normal;word-break:normal;line-height:1.3;align-self:center;justify-self:end}
 .card .indicador{grid-row:1;grid-column:4;align-self:center;justify-self:center}
 .card .semanas{grid-row:2;grid-column:1/-1;display:flex;width:100%;min-width:0;gap:6px;padding-top:9px;border-top:1px solid #eff0f5}
 footer #foot{flex:1 1 100%;font-size:11px;line-height:1.6}
 footer{gap:8px;align-items:center;padding-bottom:8px}
 footer .spacer{display:none}footer .copyright{flex:1 1 175px;font-size:10px;line-height:1.6;color:#6b6d78}
 footer img{height:15px;max-width:80px;object-fit:contain}
}

@media screen and (max-width:700px){.semana-periodo::before,.semana-cotacao::before{content:none}.cotacao-atual,.cotacao-anterior{display:flex;flex-direction:column;justify-content:center}}

/* Rodapé institucional compartilhado entre as páginas e as duas versões. */
.seedbase-footer{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;max-width:1180px;margin:28px auto 0;padding:20px 12px;border-top:1px solid #c4c6d0;background:transparent;color:#6b6d78;text-align:center;font:12px/1.6 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.seedbase-footer a{color:#1e1e7b;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;min-height:32px;padding:3px 12px;border-radius:6px}
.seedbase-footer a:hover{text-decoration:underline}.seedbase-footer a:focus-visible{outline:2px solid #1e1e7b;outline-offset:2px}
.seedbase-embedded .seedbase-footer{display:none}
.caixa .seedbase-footer{margin-top:16px;padding:12px 0 0;border-top:0;font-size:11px}
@media screen and (max-width:700px){.seedbase-footer{font-size:11px;margin-top:24px;gap:3px;padding:18px 10px}.seedbase-footer a{min-height:44px}}

/* Revisão móvel: semana compacta, seletores claros e selos sem cortes. */
@media screen and (max-width:700px){
 body.mobile-shell main{padding-left:0;padding-right:0}
 .mobile-shell #salvasBox{margin-bottom:12px;padding-bottom:12px}
 .mobile-shell .salvashead{padding:10px 12px;min-height:46px;gap:8px;background:#fff;border:1px solid #c4c6d0;border-radius:10px;font-size:15px}
 .mobile-shell .salvashead::after{content:"Ver semanas";margin-left:auto;flex:none;font-size:11px;font-weight:500;color:#596273}
 .mobile-shell .salvashead[aria-expanded=true]::after{content:"Recolher"}
 .mobile-shell #salvasList{margin-top:10px}
 .mobile-shell .semanaHome{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 10px;text-align:left;align-items:start;padding:2px 0 12px;margin-bottom:0}
 .mobile-shell .semanaHome .titulo{font-size:17px!important;line-height:1.4;min-width:0}
 .mobile-shell .semanaHome .titulo:has(.semana-cotacao)>.quinta-cotacao{display:none!important}
 .mobile-shell .semanaHome .semana-periodo{font-size:12px;line-height:1.5;margin-top:3px}
 .mobile-shell .semanaHome .semana-cotacao{font-size:11px;line-height:1.5;margin-top:2px}
 .mobile-shell .semanaHome .situacao{font-size:10px;margin:0;padding:4px 7px;white-space:nowrap;align-self:start}
 .card,.grafico-painel,.semanaHome,.historico,details{scroll-margin-top:100px}
 .card .nome{overflow-wrap:anywhere}
 .card .col .pr,.card .col .dif{white-space:nowrap;overflow-wrap:normal}
 .ferramentas{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:center}
 .ferramentas>label,.ferramentas>select{grid-column:1/-1;min-width:0}
 .ferramentas>button{width:100%;min-width:0;border-radius:8px;padding:10px}
 .histfiltros{grid-template-columns:repeat(2,minmax(0,1fr));align-items:end}
 .histfiltros>.hist-referencia,.histfiltros>#histUnidade{grid-column:1/-1}
 .histfiltros label{min-width:0}.histfiltros select{min-width:0;margin-top:5px}
 .mobile-shell .kpi .lb{min-height:2.8em;line-height:1.4}
 .mobile-shell .kpi:first-child .lb{min-height:0}
 .mobile-shell .kpi .sb{line-height:1.5}
 .mobile-shell .hbar{align-items:center}
 .seedbase-footer{padding-bottom:calc(90px + env(safe-area-inset-bottom))}
 .mobile-shell .seedbase-footer,.caixa .seedbase-footer{padding-bottom:18px}
}

@media screen and (max-width:700px){
 .wrap>header:has(#semana) .semana-controle{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:8px;width:100%;flex:1 1 100%}
 .wrap>header:has(#semana) #semana{font-size:14px!important;padding:8px;min-width:0;text-align:center}
 .semana-controle button{padding:0;line-height:1}
}

@media screen and (max-width:700px){
 .wrap>header:has(#semana) .modo-cotacoes{width:100%;display:grid;grid-template-columns:1fr 1fr}
 .card.com-quatro .col .pr{font-size:11px!important}
 .card.com-quatro .col.atual .pr{font-size:13px!important}
 .card.com-quatro .col .dif{font-size:9px}
 .card.com-quatro .quinta-cotacao{font-size:10px}
 .card.com-quatro .semanas{gap:3px}
 .semana-controle #mes{min-height:44px;width:100%;font-size:14px!important;padding:8px;border:1px solid #c4c6d0;border-radius:9px;background:#fff;color:#23242b}
}
/* Consistência de período e controles também no desktop. */
.semanaHome .titulo:has(.semana-cotacao)>.quinta-cotacao{display:none!important}
@media screen and (min-width:701px){
 .semanaHome .semana-periodo,.semanaHome .semana-cotacao{font-size:13px;font-weight:400;color:#596273}
 .wrap>header:has(#semana){display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:12px 18px;padding-bottom:8px}
 .wrap>header:has(#semana)>.spacer{display:none}
 .wrap>header:has(#semana) .sub{display:flex;flex-wrap:wrap;align-items:center;gap:8px 20px;line-height:1.5;margin-top:8px}
 .wrap>header:has(#semana) .cotacao-atual{color:#1e1e7b;font-weight:600}
 .wrap>header:has(#semana) .cotacao-quantidade{flex:1 1 100%;font-size:12px}
 .ferramentas{display:grid;grid-template-columns:125px minmax(200px,380px) auto auto;justify-content:start;gap:10px;align-items:center}
 .ferramentas button{min-height:38px;padding:8px 14px;border-radius:8px}
 .ferramentas select{width:100%;min-width:0}
}
@media screen and (min-width:701px) and (max-width:1100px){
 .wrap>header:has(#semana){grid-template-columns:minmax(0,1fr) auto}
 .wrap>header:has(#semana)>div:first-child{grid-column:1/-1}
 .wrap>header:has(#semana) .semana-controle{justify-self:end}
}

/* Rodapé fora das seções; páginas curtas também terminam no fim da tela. */
body.seedbase-page{display:flex;flex-direction:column;min-height:100vh;min-height:100dvh}
body.seedbase-page>.wrap{flex:1 0 auto;width:100%;min-height:0;padding-bottom:24px}
body.seedbase-page>main{flex:1 0 auto;width:100%}
body.seedbase-page>.tela{flex:1 0 auto;min-height:0}
body.seedbase-page>.seedbase-footer{flex:none;width:calc(100% - 24px);margin:24px auto 0;padding:18px 12px 24px}
body.mobile-frame{display:block;min-height:0}
body.mobile-frame>.wrap{min-height:0}
@media screen and (max-width:700px){
 body.mobile-shell>.wrap{padding-bottom:12px}
 body.mobile-shell>.seedbase-footer{padding-bottom:calc(88px + env(safe-area-inset-bottom))}
}
