/* sop-shell.css -- moldura unica de todas as paginas do modulo S&OP (menu lateral + cabecalho padrao).
   Carregada por sop-shell.js. Quem muda o menu muda UM arquivo (sop-shell.js); as paginas nao sao regeradas.
   Tudo sob .sop-app / body.sop-shell, para nao brigar com o CSS de cada pagina. */

.sop-app{--sop-w:232px; --s-verm:#E81818; --s-verm-esc:#A31010; display:grid; grid-template-columns:var(--sop-w) minmax(0,1fr); min-height:100vh;
  transition:grid-template-columns .2s ease}
.sop-app.recolhida{--sop-w:72px}
.sop-main{min-width:0}
body.sop-shell{margin:0}

/* ---------- barra lateral: encolhe para faixa de icones ---------- */
.sop-menu{position:sticky; top:0; height:100vh; width:var(--sop-w); z-index:60; display:flex; flex-direction:column; gap:4px; padding:24px 12px 16px;
  background:var(--s-verm); color:#fff; overflow:hidden; transition:width .2s ease; font-family:Poppins,"Segoe UI",Helvetica,Arial,sans-serif; box-sizing:border-box}
:root[data-theme="dark"] .sop-menu{background:var(--s-verm-esc)}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .sop-menu{background:var(--s-verm-esc)}}
.sop-menu:focus{outline:none}
.sop-cabeca{display:flex; align-items:flex-start; justify-content:space-between; gap:4px; padding:0 0 20px 12px; flex-shrink:0}
.sop-logo{display:block}
.sop-logo img{display:block; width:140px; height:auto; transition:width .2s ease}
.sop-recolher{display:inline-flex; width:32px; height:32px; flex-shrink:0; align-items:center; justify-content:center; border:0; border-radius:8px; background:transparent; color:#fff; cursor:pointer; opacity:.85}
.sop-recolher:hover{background:rgba(255,255,255,.14); opacity:1}
.sop-recolher:focus-visible{outline:2px solid #fff; outline-offset:2px}
.sop-recolher svg{width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round}
.sop-recolher svg:last-child{display:none}
.sop-lista{display:flex; flex-direction:column; gap:2px; flex:1 1 auto; min-height:0; overflow-y:auto; overscroll-behavior:contain; margin:0 -6px; padding:0 6px;
  scrollbar-width:thin; scrollbar-color:rgba(255,255,255,.35) transparent}
.sop-lista::-webkit-scrollbar{width:6px} .sop-lista::-webkit-scrollbar-thumb{background:rgba(255,255,255,.35); border-radius:3px}
.sop-it{position:relative; display:flex; align-items:center; gap:10px; min-height:40px; padding:0 12px; border-radius:10px; color:#fff; font-size:12.5px; font-weight:500; text-decoration:none; transition:background .15s}
.sop-it svg{width:17px; height:17px; flex-shrink:0; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round}
.sop-it:hover{background:rgba(255,255,255,.14)}
.sop-it[aria-current="true"]{background:#fff; color:var(--s-verm-esc); font-weight:600}
.sop-it:focus-visible{outline:2px solid #fff; outline-offset:2px}
.sop-it[aria-current="true"]:focus-visible{outline-color:#1A1211}
.sop-it .rot{flex:1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.sop-it .ext{margin-left:auto; font-size:10px; opacity:.7}
.sop-grupo{margin:12px 12px 4px; font-size:10px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:rgba(255,255,255,.85); white-space:nowrap}
.sop-rodape{margin-top:auto; padding-top:12px; display:flex; flex-direction:column; gap:6px; flex-shrink:0; border-top:1px solid rgba(255,255,255,.18)}

@media (min-width:1024px){
  .sop-app.recolhida .sop-cabeca{flex-direction:column; align-items:center; gap:12px; padding:0 0 14px}
  .sop-app.recolhida .sop-logo img{width:48px}
  .sop-app.recolhida .sop-recolher svg:first-child{display:none} .sop-app.recolhida .sop-recolher svg:last-child{display:block}
  .sop-app.recolhida .sop-it{justify-content:center; padding:0}
  .sop-app.recolhida .sop-it .rot{position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap}
  .sop-app.recolhida .sop-it .ext{display:none}
  .sop-app.recolhida .sop-grupo{height:1px; margin:10px 8px; overflow:hidden; color:transparent; background:rgba(255,255,255,.25)}
  .sop-app.recolhida .sop-lista{scrollbar-width:none} .sop-app.recolhida .sop-lista::-webkit-scrollbar{display:none}
}
@media (min-width:1024px) and (prefers-reduced-motion:reduce){.sop-app,.sop-menu,.sop-logo img{transition:none}}

/* ---------- barra do topo (so no celular/tablet): botao do menu + nome da pagina ---------- */
.sop-topo{display:none}
.sop-veu{position:fixed; inset:0; background:rgba(20,14,13,.5); z-index:58; backdrop-filter:blur(2px)}
@media(max-width:1023.98px){
  .sop-app,.sop-app.recolhida{--sop-w:0px; grid-template-columns:minmax(0,1fr)}
  .sop-menu{position:fixed; left:0; top:0; width:292px; max-width:88vw; transform:translateX(-102%); visibility:hidden; transition:transform .24s cubic-bezier(.4,0,.2,1), visibility 0s .24s; box-shadow:0 14px 40px rgba(26,18,17,.3)}
  .sop-menu.aberto{transform:none; visibility:visible; transition-delay:0s}
  .sop-recolher{display:none}
  .sop-topo{position:sticky; top:0; z-index:50; display:flex; align-items:center; gap:12px; padding:10px 14px; background:var(--nuvem,#fff); border-bottom:1px solid var(--linha,#E5DEDC);
    font-family:Poppins,"Segoe UI",Helvetica,Arial,sans-serif}
  .sop-topo button{display:inline-flex; align-items:center; justify-content:center; width:38px; height:38px; border-radius:10px; border:1px solid var(--linha-2,#CFC5C2); background:var(--nuvem,#fff); color:var(--grafite,#6E605D); cursor:pointer}
  .sop-topo button svg{width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round}
  .sop-topo b{font-size:15px; font-weight:700; color:var(--tinta,#1A1211); letter-spacing:-.01em}
}

/* ---------- cabecalho padrao das paginas (.hd): o mesmo desenho em todas ---------- */
body.sop-shell .hd{background:var(--nuvem,#fff); padding:0; overflow:visible; border-bottom:1px solid var(--linha,#E5DEDC); position:relative}
body.sop-shell .hd::after{content:""; position:absolute; left:0; right:0; bottom:-1px; height:2px; background:linear-gradient(90deg,var(--vermelho,#E81818),var(--laranja,#FFA500))}
body.sop-shell .hd-in{max-width:1320px; margin:0 auto; padding:20px 32px 18px; display:flex; flex-wrap:wrap; gap:14px 24px; align-items:flex-start; justify-content:space-between}
body.sop-shell .hd .logo, body.sop-shell .hd .onda, body.sop-shell .hd .voltar{display:none}
body.sop-shell .hd h1{margin:0; font-size:22px; font-weight:800; letter-spacing:-.025em; line-height:1.2; color:var(--tinta,#1A1211)}
body.sop-shell .hd .sub, body.sop-shell .hd .deck{margin:6px 0 0; font-size:13px; font-weight:400; line-height:1.55; color:var(--grafite,#6E605D); max-width:72ch}
body.sop-shell .hd .eyebrow{display:block; margin:0 0 4px; font-size:12px; font-weight:600; color:var(--fumaca,#9C8F8C); letter-spacing:0; text-transform:none}
body.sop-shell .hd .acoes, body.sop-shell .hd .hd-acoes{display:flex; flex-direction:row; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:10px}
body.sop-shell .hd .atualizar{display:inline-flex; align-items:center; gap:6px; font-family:inherit; font-size:12.5px; font-weight:600; color:var(--tinta,#1A1211); background:var(--nuvem,#fff);
  border:1px solid var(--linha-2,#CFC5C2); border-radius:10px; padding:8px 14px; cursor:pointer; text-decoration:none; transition:border-color .15s,color .15s}
body.sop-shell .hd .atualizar:hover{background:var(--nuvem,#fff); border-color:var(--vermelho,#E81818); color:var(--vermelho,#E81818)}
body.sop-shell .hd .carimbo{display:inline-flex; align-items:center; gap:7px; font-family:inherit; font-size:11.5px; letter-spacing:0; color:var(--grafite,#6E605D); border:1px solid var(--linha,#E5DEDC); border-radius:10px; padding:6px 12px; white-space:nowrap}
body.sop-shell .hd .carimbo i{background:var(--laranja,#FFA500)}
body.sop-shell .hd .chave{background:var(--areia,#F4F1F0); border:1px solid var(--linha,#E5DEDC); border-radius:10px; padding:7px 14px 7px 10px}
body.sop-shell .hd .chave .txt{color:var(--tinta,#1A1211)}
body.sop-shell .hd .chave .pista{background:var(--linha-2,#CFC5C2)}
body.sop-shell .hd .chave input:focus-visible + .pista{outline-color:var(--vermelho,#E81818)}
body.sop-shell .hd .seg, body.sop-shell .hd #filiais, body.sop-shell .hd .filiais{background:var(--areia,#F4F1F0); border:1px solid var(--linha,#E5DEDC); border-radius:11px; padding:3px; gap:2px}
body.sop-shell .hd .seg button, body.sop-shell .hd #filiais button, body.sop-shell .hd .filiais button{color:var(--grafite,#6E605D); border-radius:8px; background:transparent}
body.sop-shell .hd .seg button:hover, body.sop-shell .hd #filiais button:hover, body.sop-shell .hd .filiais button:hover{background:var(--linha,#E5DEDC)}
body.sop-shell .hd .seg button[aria-pressed="true"], body.sop-shell .hd #filiais button[aria-pressed="true"], body.sop-shell .hd .filiais button[aria-pressed="true"]{background:var(--nuvem,#fff); color:var(--vermelho,#E81818); box-shadow:0 1px 3px rgba(31,24,22,.12)}
body.sop-shell .hd .sop-progresso{margin:0; color:var(--grafite,#6E605D)}
body.sop-shell .hd .girador{border-color:var(--linha-2,#CFC5C2); border-top-color:var(--laranja,#FFA500)}
@media(max-width:1023.98px){
  body.sop-shell .hd-in{padding:16px 16px 14px}
  body.sop-shell .hd h1{font-size:19px}
  body.sop-shell .hd .acoes, body.sop-shell .hd .hd-acoes{justify-content:flex-start; width:100%}
}
