:root{
    --ui:#2B5C8A; --ui-dark:#1D4064; --ui-light:#E7EEF5;
    --bg:#F6F6F4; --card:#FFFFFF; --text:#1C1C1A; --muted:#6B6B64; --border:#E3E1DA;
    --danger:#B23A32; --danger-bg:#FCEBEB; --ok:#3B6D11; --ok-bg:#EAF3DE; --warn:#854F0B; --warn-bg:#FAEEDA;
    --wa:#1E9E4F; --loja:#2B5C8A;
  }
  *{box-sizing:border-box;}
  body{margin:0; font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif; background:var(--bg); color:var(--text);}
  button, input, select, textarea{font-family:inherit;}

  /* ---------- base ---------- */
  .wrap{max-width:720px; margin:0 auto; padding:16px 16px 40px;}
  .topbar{background:var(--ui); color:#fff; padding:14px 16px;}
  .topbar-in{max-width:720px; margin:0 auto; display:flex; align-items:center; justify-content:space-between; gap:10px;}
  .brand{font-weight:700; font-size:15px;}
  .brand small{display:block; font-weight:400; font-size:11.5px; opacity:0.8;}
  .nav{display:flex; gap:4px; flex-wrap:wrap; justify-content:flex-end;}
  .nav button{background:transparent; border:none; color:#fff; opacity:0.75; font-size:13px; padding:7px 9px; border-radius:8px; cursor:pointer;}
  .nav button.on{opacity:1; background:rgba(255,255,255,0.16); font-weight:600;}
  h1{font-size:19px; margin:4px 0 4px;}
  h2{font-size:15px; margin:0 0 10px;}
  .sub{font-size:13px; color:var(--muted); margin:0 0 16px; line-height:1.5;}
  .card{background:var(--card); border:1px solid var(--border); border-radius:14px; padding:16px; margin-bottom:14px;}
  .row{display:flex; gap:10px; align-items:center;}
  .between{display:flex; justify-content:space-between; align-items:center; gap:10px;}
  .grow{flex:1; min-width:0;}
  .l{display:block; font-size:12.5px; font-weight:600; margin:0 0 6px;}
  .opt{font-weight:400; color:var(--muted);}
  .field{margin-bottom:14px;}
  .in{width:100%; padding:10px 12px; border:1px solid var(--border); border-radius:9px; font-size:14px; background:#fff; color:var(--text);}
  .in:focus{outline:2px solid var(--ui-light); border-color:var(--ui);}
  .help{font-size:11.5px; color:var(--muted); margin:6px 0 0; line-height:1.45;}
  .err{font-size:12.5px; color:var(--danger); margin:8px 0 0;}
  .btn{display:inline-block; text-align:center; text-decoration:none; border:none; border-radius:10px; padding:11px 16px; font-size:14px; font-weight:600; cursor:pointer; background:var(--ui); color:#fff;}
  .btn.block{display:block; width:100%;}
  .btn.ghost{background:#fff; color:var(--ui-dark); border:1.5px solid var(--border);}
  .btn.wa{background:var(--wa);}
  .btn.danger{background:#fff; color:var(--danger); border:1.5px solid #F09595;}
  .btn.small{padding:7px 11px; font-size:12.5px;}
  .btn:disabled{opacity:0.5; cursor:not-allowed;}
  .linkbtn{background:none; border:none; color:var(--ui); font-size:13px; cursor:pointer; padding:0; text-decoration:underline;}
  .actions{display:flex; gap:10px; margin-top:6px; flex-wrap:wrap;}
  .actions .btn{flex:1;}
  .seg{display:flex; gap:8px;}
  .seg button{flex:1; padding:10px 6px; border-radius:10px; border:1.5px solid var(--border); background:#fff; font-size:13px; font-weight:600; color:var(--muted); cursor:pointer;}
  .seg button.on{border-color:var(--ui); color:var(--ui); background:var(--ui-light);}
  .chips{display:flex; flex-wrap:wrap; gap:8px;}
  .chip{padding:8px 12px; border-radius:20px; border:1px solid var(--border); background:#fff; font-size:12.5px; color:var(--muted); cursor:pointer;}
  .chip.on{background:var(--ui); border-color:var(--ui); color:#fff;}
  .pill{display:inline-block; font-size:11px; font-weight:600; padding:3px 8px; border-radius:20px; background:var(--ui-light); color:var(--ui-dark);}
  .pill.ok{background:var(--ok-bg); color:var(--ok);}
  .pill.warn{background:var(--warn-bg); color:var(--warn);}
  .pill.danger{background:var(--danger-bg); color:var(--danger);}
  .notice{font-size:12.5px; line-height:1.5; border-radius:10px; padding:10px 12px; margin-bottom:14px;}
  .notice.ok{background:var(--ok-bg); color:var(--ok);}
  .notice.warn{background:var(--warn-bg); color:var(--warn);}
  .notice.info{background:var(--ui-light); color:var(--ui-dark);}
  .notice.danger{background:var(--danger-bg); color:var(--danger);}
  .logo{width:44px; height:44px; border-radius:11px; display:flex; align-items:center; justify-content:center; color:#fff; font-weight:700; font-size:14px; flex-shrink:0; overflow:hidden;}
  .logo img{width:100%; height:100%; object-fit:cover;}
  .loja-item{display:flex; gap:12px; align-items:center; padding:12px; border:1px solid var(--border); border-radius:12px; background:#fff; margin-bottom:10px; cursor:pointer;}
  .t-name{font-weight:600; font-size:14px; margin:0;}
  .t-meta{font-size:12px; color:var(--muted); margin:2px 0 0;}
  .url{font-size:12.5px; color:var(--ui-dark); word-break:break-all;}
  .urllink{background:none; border:none; padding:0; color:var(--ui-dark); font-size:12.5px; text-decoration:underline; cursor:pointer; word-break:break-all; text-align:left;}
  .steps{display:flex; gap:6px; margin-bottom:16px;}
  .steps div{flex:1; height:4px; border-radius:4px; background:var(--border);}
  .steps div.on{background:var(--ui);}
  .step-label{font-size:11.5px; color:var(--muted); text-transform:uppercase; letter-spacing:0.04em; margin:0 0 4px;}
  .upload{display:flex; align-items:center; gap:12px; flex-wrap:wrap;}
  .thumb{width:56px; height:56px; border-radius:12px; background:#EEE; display:flex; align-items:center; justify-content:center; color:#999; font-size:11px; overflow:hidden; flex-shrink:0;}
  .thumb img{width:100%; height:100%; object-fit:cover;}
  .colorrow{display:flex; align-items:center; gap:10px;}
  .colorrow input[type=color], input.cor{width:44px; height:38px; border:1px solid var(--border); border-radius:8px; padding:0; background:#fff;}
  .prod{display:flex; gap:10px; align-items:center; padding:9px 0; border-bottom:1px solid var(--border);}
  .prod:last-child{border-bottom:none;}
  .prod-thumb{width:40px; height:40px; border-radius:8px; background:#EEE; flex-shrink:0; overflow:hidden; display:flex; align-items:center; justify-content:center; font-size:11px; color:#999; font-weight:700;}
  .prod-thumb img{width:100%; height:100%; object-fit:cover;}
  .switch{display:flex; align-items:center; gap:6px; font-size:11.5px; color:var(--muted); cursor:pointer; background:none; border:none; padding:0;}
  .track{width:32px; height:18px; border-radius:10px; background:#D8D6CE; position:relative; display:inline-block;}
  .track.on{background:var(--ok);}
  .knob{position:absolute; top:2px; left:2px; width:14px; height:14px; border-radius:50%; background:#fff; transition:left 0.15s;}
  .track.on .knob{left:16px;}
  .qrbox{display:flex; flex-direction:column; align-items:center; gap:10px; padding:8px 0;}
  #qr{background:#fff; padding:10px; border-radius:12px; border:1px solid var(--border); min-height:60px; min-width:60px;}
  .big-check{width:54px; height:54px; border-radius:50%; background:var(--ok-bg); color:var(--ok); display:flex; align-items:center; justify-content:center; font-size:26px; margin:0 auto 10px;}
  .pedido{border:1px solid var(--border); border-radius:12px; padding:12px; background:#fff; margin-bottom:10px;}
  .pedido.novo{border-color:var(--wa); box-shadow:0 0 0 2px #CDEBD6;}
  .pedido-itens{font-size:13px; margin:8px 0; line-height:1.6;}
  .kv{font-size:12.5px; color:var(--muted); margin:2px 0; line-height:1.5;}
  .kv b{color:var(--text); font-weight:600;}
  .stats{display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:14px;}
  .stat{background:#fff; border:1px solid var(--border); border-radius:12px; padding:12px;}
  .stat-n{font-size:18px; font-weight:700;}
  .stat-l{font-size:11.5px; color:var(--muted); margin-top:2px;}
  .tabs{display:flex; border-bottom:1px solid var(--border); margin-bottom:14px;}
  .tabs button{flex:1; background:none; border:none; padding:11px 0; font-size:13.5px; font-weight:600; color:var(--muted); border-bottom:2px solid transparent; cursor:pointer;}
  .tabs button.on{color:var(--text); border-bottom-color:var(--loja);}
  .lj-head{background:var(--loja); color:#fff; padding:16px;}
  .impersona{background:var(--warn-bg); color:var(--warn); font-size:12.5px; padding:9px 16px; text-align:center;}
  .impersona button{background:none; border:none; color:var(--warn); text-decoration:underline; font-weight:600; cursor:pointer; font-size:12.5px;}
  .hist{display:flex; justify-content:space-between; align-items:center; font-size:12.5px; padding:9px 0; border-bottom:1px solid var(--border); gap:8px;}
  .hist:last-child{border-bottom:none;}
  .progress{height:6px; border-radius:6px; background:var(--border); overflow:hidden; margin:10px 0 6px;}
  .progress div{height:100%; background:var(--ui); width:0; transition:width 0.4s;}
  pre.code{white-space:pre-wrap; font-size:12px; background:#F4F3EF; border-radius:8px; padding:10px; margin:8px 0 0;}
  details summary{cursor:pointer; font-size:13px; font-weight:600;}
  .toast{position:fixed; left:50%; bottom:96px; transform:translateX(-50%); background:#1C1C1A; color:#fff; padding:10px 16px; border-radius:10px; font-size:13px; z-index:99; display:none; max-width:90%;}
  .demo{font-size:12px; color:var(--muted); background:#fff; border:1px dashed var(--border); border-radius:10px; padding:10px 12px; line-height:1.6;}
  .sr{position:absolute; left:-9999px;}
  .pw{position:relative;}
  .pw button{position:absolute; right:8px; top:50%; transform:translateY(-50%); background:none; border:none; color:var(--muted); font-size:12px; cursor:pointer;}

  /* ---------- site institucional ---------- */
  .hero{background:#1C1C1A; color:#fff; padding:40px 20px;}
  .hero h1{font-size:24px;}
  .hero p{opacity:0.8; font-size:14px; line-height:1.6; max-width:520px;}

  a{color:var(--ui-dark);}
  .loja-item{text-decoration:none; color:inherit;}
  .busca{position:relative; margin-bottom:10px;}
  .busca input{width:100%; padding:11px 36px 11px 38px; border:1px solid var(--border); border-radius:11px; font-size:15px; background:#fff;}
  .busca:before{content:""; position:absolute; left:13px; top:50%; width:13px; height:13px; margin-top:-8px; border:2px solid #9A978E; border-radius:50%;}
  .busca:after{content:""; position:absolute; left:26px; top:50%; width:7px; height:2px; margin-top:5px; background:#9A978E; transform:rotate(45deg);}
  .busca button{position:absolute; right:6px; top:50%; transform:translateY(-50%); border:none; background:none; font-size:18px; color:var(--muted); cursor:pointer; padding:6px;}
  .chips.rolar{flex-wrap:nowrap; overflow-x:auto; -webkit-overflow-scrolling:touch; padding-bottom:4px; scrollbar-width:none;}
  .chips.rolar::-webkit-scrollbar{display:none;}
  .chips.rolar .chip{flex-shrink:0; white-space:nowrap;}
  .preco-edit{border:1px dashed var(--border); background:#fff; border-radius:8px; padding:5px 8px; font-size:13px; font-weight:700; cursor:pointer; color:var(--text); white-space:nowrap;}
  .preco-in{width:92px; padding:6px 8px; border:1.5px solid var(--ui); border-radius:8px; font-size:14px; font-weight:700;}
  .modal-fundo{position:fixed; inset:0; background:rgba(0,0,0,0.45); z-index:80; display:flex; align-items:flex-end; justify-content:center;}
  .modal{background:var(--bg); width:100%; max-width:720px; max-height:94vh; overflow-y:auto; border-radius:18px 18px 0 0; padding:18px 16px 28px;}
  @media(min-width:760px){ .modal-fundo{align-items:center;} .modal{border-radius:18px;} }
  .var-linha{display:grid; grid-template-columns:1fr 96px 40px; gap:8px; align-items:center; padding:7px 0; border-bottom:1px solid var(--border); font-size:13px;}
  .vazio{text-align:center; color:var(--muted); font-size:13.5px; padding:26px 10px; line-height:1.6;}
  .carregando{text-align:center; color:var(--muted); padding:60px 0; font-size:14px;}
  table.t{width:100%; border-collapse:collapse; font-size:13px;}
  table.t td{padding:8px 4px; border-bottom:1px solid var(--border); vertical-align:top;}
  input[type=search]::-webkit-search-cancel-button{display:none;}

  /* topo da loja (catálogo, prévias do admin e do painel) */
  .tp{background:var(--tp-cor); color:var(--tp-txt); overflow:hidden; padding-left:env(safe-area-inset-left); padding-right:env(safe-area-inset-right);}
  .tp-banner{aspect-ratio:5/2; overflow:hidden; background:rgba(0,0,0,0.12);}
  .tp-banner img{width:100%; height:100%; object-fit:cover; display:block;}
  .tp-head{display:flex; gap:12px; align-items:center; padding:16px;}
  .tp-head .logo{position:relative; z-index:1; width:56px; height:56px; border-radius:14px; border:2px solid rgba(255,255,255,0.6); font-size:17px;}
  .tp.com-banner .tp-head{align-items:flex-end; padding-top:0;}
  .tp.com-banner .tp-head .logo{width:clamp(64px, 18vw, 84px); height:clamp(64px, 18vw, 84px); margin-top:calc(clamp(64px, 18vw, 84px) / -2); border:3px solid #fff; border-radius:18px; box-shadow:0 4px 14px rgba(0,0,0,0.18);}
  .tp-nome{font-size:19px; font-weight:700; margin:0; line-height:1.2; overflow-wrap:anywhere;}
  .tp-tag{font-size:13px; opacity:0.88; margin:3px 0 0;}
  .tp.com-banner .tp-txt{padding-top:10px;}
  .previa-topo{border-radius:14px; overflow:hidden; border:1px solid var(--border); max-width:420px;}
  .previa-rodape{border-radius:14px; overflow:hidden; border:1px solid var(--border);}
  .crop{position:relative; width:100%; aspect-ratio:5/2; overflow:hidden; border-radius:12px; background:#2a2a28; touch-action:none; cursor:grab; user-select:none; -webkit-user-select:none;}
  .crop:active{cursor:grabbing;}
  .crop img{position:absolute; max-width:none; pointer-events:none;}
  .crop-logo{position:absolute; left:4.5%; bottom:-10%; width:18%; aspect-ratio:1; border:2px dashed #fff; border-radius:18%; box-shadow:0 0 0 1px rgba(0,0,0,0.35); pointer-events:none;}
  .cupom-cod{font-family:ui-monospace, Menlo, Consolas, monospace; font-weight:700; letter-spacing:0.04em; background:var(--ui-light); color:var(--ui-dark); padding:2px 7px; border-radius:6px;}

  /* ---------- rodapé da loja (catálogo e prévia do painel) ---------- */
  .rd{background:var(--rd-cor); color:var(--rd-txt); container-type:inline-size; container-name:rodape;}
  .rd-in{display:grid; grid-template-columns:1fr; gap:24px; padding:26px 16px;}
  .rd-col h4{font-size:11.5px; text-transform:uppercase; letter-spacing:0.08em; opacity:0.7; margin:0 0 8px; font-weight:700;}
  .rd-topo{display:flex; gap:10px; align-items:center;}
  .rd-nome{font-size:16px; font-weight:700; margin:0; overflow-wrap:anywhere;}
  .rd-sobre{font-size:13px; line-height:1.6; opacity:0.8; margin:10px 0 0; max-width:36em;}
  .rd-item{display:flex; gap:9px; align-items:flex-start; font-size:13.5px; line-height:1.45; padding:5px 0; color:inherit; text-decoration:none;}
  a.rd-item:hover{text-decoration:underline;}
  .rd-item svg{width:18px; height:18px; flex-shrink:0; fill:currentColor; opacity:0.78; margin-top:1px;}
  .rd-passos{margin:0; padding:0; list-style:none; counter-reset:passo;}
  .rd-passos li{counter-increment:passo; display:flex; gap:9px; align-items:flex-start; font-size:13.5px; line-height:1.45; padding:5px 0;}
  .rd-passos li:before{content:counter(passo); flex-shrink:0; width:19px; height:19px; border-radius:50%; font-size:10.5px; font-weight:700; display:flex; align-items:center; justify-content:center; background:rgba(128,128,128,0.32); background:color-mix(in srgb, currentColor 20%, transparent);}
  .rd-fim{display:flex; flex-wrap:wrap; justify-content:space-between; gap:4px 16px; font-size:11.5px; padding:13px 16px; border-top:1px solid rgba(128,128,128,0.35); border-top-color:color-mix(in srgb, currentColor 22%, transparent);}
  .rd-fim span{opacity:0.66;}
  @media(min-width:720px){
    .rd-in{grid-template-columns:var(--rd-grid, 1.5fr 1fr 1fr 1fr); gap:14px 30px; padding:34px 28px;}
    .rd-fim{padding:14px 28px;}
  }
  /* a prévia do painel é estreita mesmo num monitor largo: aqui vale a largura do quadro, não a da tela */
  @container rodape (max-width:700px){ .rd-in{grid-template-columns:1fr 1fr;} }
  @container rodape (max-width:430px){ .rd-in{grid-template-columns:1fr; gap:22px; padding:24px 16px;} .rd-fim{padding:13px 16px;} }

/* escolha do design do catálogo (painel do lojista) */
.designs{display:grid; grid-template-columns:1fr 1fr; gap:10px;}
@media(min-width:620px){ .designs{grid-template-columns:repeat(3, 1fr);} }
.design{text-align:left; background:#fff; border:1.5px solid var(--border); border-radius:12px; padding:8px; cursor:pointer; color:var(--text); display:flex; flex-direction:column; gap:6px;}
.design:disabled{opacity:0.6; cursor:default;}
.design.on{border-color:var(--loja); box-shadow:inset 0 0 0 1px var(--loja);}
.design-prev{height:88px;}
.design-nome{font-size:13.5px; font-weight:700;}
.design-sel{font-size:10.5px; font-weight:600; color:var(--ok); background:var(--ok-bg); border-radius:8px; padding:1px 6px; margin-left:4px; vertical-align:1px;}
.design-txt{font-size:11.5px; color:var(--muted); line-height:1.4;}

/* aberta / fechada (painel) */
.status-bar{display:flex; align-items:center; gap:10px; border-radius:12px; padding:10px 12px; margin-bottom:14px; font-size:13.5px;}
.status-bar .ponto{width:10px; height:10px; border-radius:50%; flex:none;}
.status-bar .st-txt{flex:1; min-width:0; line-height:1.35;}
.status-bar .st-txt .linkbtn{font-size:12.5px; padding:0;}
.status-bar.aberta{background:var(--ok-bg); color:var(--ok);} .status-bar.aberta .ponto{background:#4C9A1A;}
.status-bar.fechada{background:var(--warn-bg); color:var(--warn);} .status-bar.fechada .ponto{background:#C2410C;}
.status-bar .btn{flex:none; width:auto;}
.hr-lista{display:flex; flex-direction:column; gap:6px;}
.hr-dia{display:grid; grid-template-columns:1fr auto auto auto; align-items:center; gap:8px;}
.hr-dia .hr-nome{display:flex; align-items:center; gap:7px; font-size:14px;}
.hr-dia .in{width:auto; padding:7px 8px; margin:0;}
.hr-dia .hr-ate{font-size:12.5px; color:var(--muted, #777);}
.hr-dia.off .in, .hr-dia.off .hr-ate{opacity:0.35; pointer-events:none;}

/* ===========================================================================
   Backoffice (painel do lojista e admin): menu lateral fixo no computador,
   gaveta com ☰ no celular. O conteúdo ocupa a tela toda ao lado do menu.
   =========================================================================== */
.bo-body{--bo-side:248px; --bo-topo:58px;}
.bo{min-height:100vh;}
.bo-side{position:fixed; z-index:60; top:0; bottom:0; left:0; width:var(--bo-side); background:#fff; border-right:1px solid var(--border); display:flex; flex-direction:column; transform:translateX(-102%); transition:transform .22s ease; padding:14px 10px calc(14px + env(safe-area-inset-bottom));}
.bo-menu-on .bo-side{transform:none; box-shadow:0 0 40px rgba(0,0,0,0.25);}
.bo-fundo{position:fixed; inset:0; z-index:55; background:rgba(20,20,18,0.4); opacity:0; pointer-events:none; transition:opacity .2s;}
.bo-menu-on .bo-fundo{opacity:1; pointer-events:auto;}
.bo-marca{display:flex; align-items:center; gap:10px; padding:4px 8px 16px; border-bottom:1px solid var(--border); margin-bottom:10px;}
.bo-marca .logo{width:40px; height:40px; border-radius:11px; font-size:14px; flex:none;}
.bo-marca b{display:block; font-size:14.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.bo-marca span{display:block; font-size:12px; color:var(--muted);}
.bo-nav, .bo-pe{display:flex; flex-direction:column; gap:2px;}
.bo-nav{flex:1; overflow-y:auto;}
.bo-nav button, .bo-pe a, .bo-pe button{display:flex; align-items:center; gap:11px; width:100%; border:none; background:none; border-radius:10px; padding:10px 12px; font-size:14px; font-weight:500; color:#3B3B37; cursor:pointer; text-decoration:none; text-align:left;}
.bo-nav button:hover, .bo-pe a:hover, .bo-pe button:hover{background:#F2F1EC;}
.bo-nav button.on{background:var(--ui-light); color:var(--ui-dark); font-weight:650;}
.bo-nav svg, .bo-pe svg, .bo-ham svg{width:19px; height:19px; fill:currentColor; flex:none;}
.bo-nav button.on svg{fill:var(--loja);}
.bo-nav .bo-sep{font-size:11px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); padding:14px 12px 4px;}
.bo-pe{border-top:1px solid var(--border); padding-top:8px;}
.bo-top{position:sticky; top:0; z-index:40; height:var(--bo-topo); display:flex; align-items:center; gap:10px; padding:0 14px; background:rgba(246,246,244,0.92); -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px); border-bottom:1px solid var(--border);}
.bo-ham{border:none; background:#fff; width:40px; height:40px; border-radius:11px; display:grid; place-items:center; cursor:pointer; color:var(--text); box-shadow:0 0 0 1px var(--border);}
.bo-tit{font-size:18px; margin:0; flex:1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.bo-link{font-size:12.5px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:45%;}
.bo-conteudo{padding:16px 14px 40px;}
.bo-body .impersona{position:sticky; top:0; z-index:70;}
@media (max-width:899px){ .bo-link{display:none;} }
@media (min-width:900px){
  .bo-side{transform:none; transition:none;}
  .bo-fundo, .bo-ham{display:none;}
  .bo-main{margin-left:var(--bo-side);}
  .bo-top{padding:0 32px; height:64px;} .bo-body{--bo-topo:64px;}
  .bo-tit{font-size:21px;}
  .bo-conteudo{padding:24px 32px 48px; max-width:1500px;}
  .lista-p{display:grid; grid-template-columns:1fr 1fr; column-gap:28px;}
  .so-cel{display:none !important;}
  .ini-grade{grid-template-columns:1fr 1fr;} .ini-nums{grid-column:1 / -1; grid-template-columns:repeat(4, 1fr);}
  .fab{display:none;}
}

/* estatísticas */
.est-topo{display:flex; justify-content:flex-end; margin-bottom:12px;}
.est-per{max-width:320px; width:100%;}
.est-per button.on{border-color:var(--loja); color:var(--text); background:#fff; box-shadow:inset 0 0 0 1px var(--loja);}
.kpis{display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:10px;}
.kpi{background:var(--card); border:1px solid var(--border); border-radius:14px; padding:14px;}
.kpi:last-child:nth-child(odd){grid-column:1 / -1;}
.kpi-l{font-size:12.5px; color:var(--muted); font-weight:600;}
.kpi-n{font-size:28px; font-weight:750; letter-spacing:-0.02em; margin:4px 0 2px;}
.kpi-d{font-size:11.5px; color:var(--muted); display:flex; flex-wrap:wrap; gap:6px; align-items:center;}
.var{font-weight:700; border-radius:6px; padding:1px 6px; background:#EFEDE7; color:var(--muted);}
.var.up{background:var(--ok-bg); color:var(--ok);} .var.down{background:var(--danger-bg); color:var(--danger);}
.est-comp{margin:8px 2px 14px;}
.est-grade{display:grid; grid-template-columns:minmax(0, 1fr); gap:14px;}
.est-grade .card{margin:0;}
.est-grade h2{font-size:15.5px; margin:0 0 12px;}
.est-vazio{font-size:13px; color:var(--muted); margin:4px 0;}
.colunas{display:grid; grid-template-columns:repeat(var(--n), minmax(0, 1fr)); gap:3px; height:170px; align-items:end; padding-bottom:18px; position:relative;}
.colunas.mini{height:96px;}
.colunas .col{height:100%; display:flex; flex-direction:column; justify-content:flex-end; position:relative;}
.colunas .col i{display:block; background:var(--loja); opacity:.8; border-radius:4px 4px 0 0; min-height:2px; position:relative;}
.colunas .col:hover i{opacity:1;}
.colunas .col.pico i{opacity:1;}
.colunas.mini .col:not(.pico) i{opacity:.45;}
.colunas .col em{position:absolute; left:50%; width:7px; height:7px; margin:0 0 -3px -3.5px; border-radius:50%; background:#E8A21B; border:1.5px solid #fff;}
.colunas .col span{position:absolute; bottom:-17px; left:50%; transform:translateX(-50%); font-size:10.5px; color:var(--muted); white-space:nowrap;}
.legenda{display:flex; align-items:center; gap:6px;}
.lg-v, .lg-p{display:inline-block; width:10px; height:10px; border-radius:3px; background:var(--loja); margin-left:6px;}
.lg-p{border-radius:50%; background:#E8A21B;}
.bh{margin-bottom:10px;}
.bh-t{display:flex; justify-content:space-between; font-size:13.5px; margin-bottom:4px;}
.bh-b{height:8px; background:#EFEDE7; border-radius:4px; overflow:hidden;}
.bh-b i{display:block; height:100%; background:var(--loja); border-radius:4px;}
.rank{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:10px;}
.rank li{display:flex; align-items:center; gap:10px;}
.rank img, .rank-sem{width:40px; height:40px; border-radius:9px; object-fit:cover; flex:none; background:#EFEDE7;}
.rank-i{width:18px; font-size:12px; font-weight:700; color:var(--muted); text-align:center; flex:none;}
.rank-n{font-size:13.5px; font-weight:600; margin-bottom:5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.rank-v{font-size:15px; white-space:nowrap; flex:none;}
.rank-v small{font-size:11px; color:var(--muted); font-weight:500;}
.rank .grow{min-width:0;}
.est-chip{color:var(--text); cursor:default;}
.est-chip b{margin-left:4px; color:var(--muted); font-weight:600;}
@media (min-width:700px){ .kpis{grid-template-columns:repeat(3, minmax(0, 1fr));} .kpi:last-child:nth-child(odd){grid-column:auto;} }
@media (min-width:900px){
  .kpis{grid-template-columns:repeat(5, minmax(0, 1fr));}
  .est-grade{grid-template-columns:repeat(2, minmax(0, 1fr));}
  .est-larga{grid-column:1 / -1;}
  .colunas{height:220px;}
}
@media (min-width:1400px){ .est-grade{grid-template-columns:repeat(3, minmax(0, 1fr));} }
/* admin no shell do backoffice */
.bo-quem{font-size:12px; color:var(--muted); padding:4px 12px 6px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.bo-admin .bo-nav button.on svg{fill:#1C1C1A;}
.bo-admin .bo-conteudo > #view > h1:first-child, .bo-admin .bo-conteudo > #view > .between:first-child h1{display:none;}
@media (min-width:900px){
  .bo-admin #view.view-lojas #llojas{display:grid; grid-template-columns:repeat(auto-fill, minmax(340px, 1fr)); gap:10px;}
  .bo-admin #view.view-lojas #llojas .loja-item{margin-bottom:0;}
}
.bo-admin .bo-conteudo > #view > .between:first-child{align-items:center;}

/* ---- painel simplificado ---- */
.bo-acoes{display:flex; align-items:center; gap:8px; flex:none;}
.bo-status{display:inline-flex; align-items:center; gap:7px; border:none; border-radius:99px; padding:7px 12px; font-size:13px; font-weight:600; cursor:pointer;}
.bo-status .ponto{width:8px; height:8px; border-radius:50%;}
.bo-status.aberta{background:var(--ok-bg); color:var(--ok);} .bo-status.aberta .ponto{background:#4C9A1A;}
.bo-status.fechada{background:var(--warn-bg); color:var(--warn);} .bo-status.fechada .ponto{background:#C2410C;}
.bo-status:disabled{cursor:default;}
.bo-mais{border:none; background:#fff; width:38px; height:38px; border-radius:11px; display:grid; place-items:center; cursor:pointer; box-shadow:0 0 0 1px var(--border);}
.bo-mais svg{width:18px; height:18px; fill:currentColor;}
.bo-acoes .btn.small{width:auto;}
@media (max-width:899px){ .so-pc{display:none !important;} }
.pop-mais{position:fixed; z-index:80; background:#fff; border-radius:12px; box-shadow:0 10px 30px rgba(0,0,0,.16), 0 0 0 1px var(--border); padding:6px; min-width:200px;}
.pop-mais button{display:block; width:100%; text-align:left; border:none; background:none; padding:11px 12px; border-radius:8px; font-size:14px; cursor:pointer;}
.pop-mais button:hover{background:#F2F1EC;}
.fab{position:fixed; right:18px; bottom:calc(20px + env(safe-area-inset-bottom)); z-index:30; width:56px; height:56px; border-radius:50%; border:none; background:var(--loja); color:#fff; font-size:30px; line-height:1; cursor:pointer; box-shadow:0 6px 18px rgba(0,0,0,.22);}
.filtros-p{position:sticky; top:var(--bo-topo, 0px); background:var(--bg); z-index:5; padding:2px 0 10px;}
.filtros-p .busca{margin-bottom:8px;}
.chips.rolar{flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none;} .chips.rolar::-webkit-scrollbar{display:none;}
.chips.rolar .chip{flex:none;}
.chip b{font-weight:700; margin-left:2px;}
.gp{margin-bottom:16px;}
.gp-t{font-size:13px; font-weight:700; color:var(--text); margin:4px 2px 8px;}
.gp-t span{color:var(--muted); font-weight:500; margin-left:4px;}
.lista-p{padding:2px 14px;}
#lprod{padding-bottom:70px;}
.sec-t{font-size:13px; font-weight:700; margin:18px 2px 8px; display:flex; align-items:center; justify-content:space-between;}
.sec-t .linkbtn{font-size:12.5px; font-weight:500;}
.ini-grade{display:grid; gap:4px 24px;}
.ini-nums{display:grid; grid-template-columns:1fr 1fr; gap:10px;}
.ini-nums .m{background:#fff; border:1px solid var(--border); border-radius:14px; padding:14px; text-align:left; cursor:pointer;}
.ini-nums .m b{display:block; font-size:26px; font-weight:750; line-height:1.1;}
.ini-nums .m span{font-size:12.5px; color:var(--muted);}
.lista-conf{padding:0; overflow:hidden; margin-bottom:14px;}
.conf{display:flex; align-items:center; gap:10px; width:100%; border:none; background:none; border-bottom:1px solid var(--border); padding:14px 16px; text-align:left; font-size:14.5px; cursor:pointer; color:var(--text); text-decoration:none;}
.conf:last-child{border-bottom:none;}
.conf:hover{background:#FAFAF7;}
.conf-n{flex:1; min-width:0; font-weight:550; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.conf-v{color:var(--muted); font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:55%; display:flex; align-items:center; gap:6px;}
.chev{color:#B4B2A9; font-size:20px; line-height:1;}
.bolinha{width:12px; height:12px; border-radius:50%; display:inline-block; flex:none;}
.conta-col{max-width:860px;}
.voltar{border:none; background:none; color:var(--muted); font-size:14px; padding:4px 0; cursor:pointer; margin-bottom:4px;}
.sub-tit{font-size:20px; margin:0 0 14px;}
.lin-sw{display:flex; align-items:center; justify-content:space-between; gap:12px; width:100%; border:none; background:none; padding:0; text-align:left; cursor:pointer; color:var(--text);}
.lin-sw b{display:block; font-size:14.5px;} .lin-sw small{display:block; color:var(--muted); font-size:12.5px; margin-top:2px;}
.lin-sw + .hr-lista{margin-top:16px; padding-top:14px; border-top:1px solid var(--border);}
.hr-dia{display:flex; align-items:center; gap:8px;}
.hr-dia .chip{min-width:56px; justify-content:center;}
.hr-dia .hr-h{width:auto; padding:7px 8px; margin:0;}
.hr-fech{font-size:13px; color:var(--muted);}
.cores{display:flex; flex-wrap:wrap; gap:10px; margin-top:12px;}
.cor{width:34px; height:34px; border-radius:50%; border:2px solid #fff; box-shadow:0 0 0 1px #cfcdc6; cursor:pointer; padding:0;}
.cor.on{box-shadow:0 0 0 2px var(--text);}
.cor.outra{display:grid; place-items:center; background:#fff; color:var(--muted); font-size:20px; position:relative; overflow:hidden;}
.cor.outra input{position:absolute; inset:0; opacity:0; cursor:pointer;}
.design-txt{display:none;}
.kpis.k4{grid-template-columns:repeat(2, minmax(0, 1fr));}
@media (min-width:900px){ .kpis.k4{grid-template-columns:repeat(4, minmax(0, 1fr));} }
@media (min-width:900px){ .ini-nums{grid-template-columns:repeat(4, 1fr);} .lista-conf .conf-v{max-width:60%;} }

/* ---------- Painel: agenda (lojas de agendamento) */
.row2{display:grid; grid-template-columns:1fr 1fr; gap:10px;}
.ag-col{max-width:760px;}
.ag-nav{display:flex; align-items:center; gap:8px; background:#fff; border:1px solid var(--border); border-radius:14px; padding:6px;}
.ag-seta{width:44px; height:44px; flex:none; border:none; border-radius:10px; background:#F3F2EE; font-size:24px; line-height:1; cursor:pointer; color:var(--text);}
.ag-dia{position:relative; flex:1; text-align:center; cursor:pointer; display:flex; flex-direction:column;}
.ag-dia b{font-size:16px;}
.ag-dia small{font-size:12.5px; color:var(--muted);}
.ag-dia input{position:absolute; inset:0; opacity:0; cursor:pointer; width:100%;}
.ag-hoje{display:block; margin:8px auto 0;}
.ag-botoes{display:flex; gap:8px; margin:12px 0;}
.ag-botoes .btn:first-child{flex:1;}
.ag-botoes .btn.ghost{flex:0 0 auto;}
.ag-filtro{margin-bottom:10px;}
.ag-lista{display:flex; flex-direction:column; gap:8px;}
.ag-item{display:flex; gap:12px; align-items:flex-start; background:#fff; border:1px solid var(--border); border-radius:14px; padding:12px 14px; border-left:4px solid var(--loja, #2B5C8A);}
.ag-item.concluido{border-left-color:#3E9B4F; opacity:0.8;}
.ag-item.faltou{border-left-color:var(--danger, #C0392B); opacity:0.8;}
.ag-item.bloq{background:repeating-linear-gradient(-45deg, #F6F5F1, #F6F5F1 8px, #EFEDE8 8px, #EFEDE8 16px); border-left-color:#B8B5AC; align-items:center;}
.ag-h{width:48px; flex:none; display:flex; flex-direction:column; font-variant-numeric:tabular-nums;}
.ag-h b{font-size:16px;}
.ag-h small{font-size:12px; color:var(--muted);}
.ag-sv{margin:0; font-weight:700; font-size:15px;}
.ag-cl{margin:3px 0 0; font-size:13.5px; color:var(--muted);}
.ag-cl b{color:var(--text); font-weight:600;}
.ag-cl a{color:inherit;}
.ag-obs{margin:5px 0 0; font-size:13px; font-style:italic; color:var(--muted);}
.ag-acoes{display:flex; flex-wrap:wrap; gap:6px; margin-top:10px;}
.ag-acoes .btn{flex:0 0 auto; padding:7px 11px;}
.btn.zap{background:#25D366; color:#fff; border-color:#25D366; text-decoration:none;}
.btn.perigo{color:var(--danger, #C0392B);}
.ag-horas{display:flex; flex-wrap:wrap; gap:6px;}
.ag-horas .chip{min-width:64px; justify-content:center; font-variant-numeric:tabular-nums;}
.ag-encaixe{display:inline-block; width:auto; padding:5px 8px; margin-left:4px;}
.pill.ok{background:#E3F6E8; color:#1E7A3E;}

/* ---------- Painel: agenda em semana (grade estilo calendário) */
.cal{max-width:1180px;}
.cal-top{display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:10px; flex-wrap:wrap;}
.cal-nav{display:flex; align-items:center; gap:4px;}
.cal-seta{width:36px; height:36px; border:1px solid var(--border); border-radius:10px; background:#fff; font-size:20px; line-height:1; cursor:pointer; color:var(--text);}
.cal-tit{position:relative; font-weight:700; font-size:17px; padding:0 8px; cursor:pointer; white-space:nowrap;}
.cal-tit input{position:absolute; inset:0; opacity:0; cursor:pointer; width:100%;}
.cal-acoes{display:flex; gap:6px;}
.cal-acoes .btn{flex:0 0 auto;}
.cal-profs{margin-bottom:10px;}
.cal-profs .bolinha, .ag-sel-t .bolinha{display:inline-block; width:9px; height:9px; border-radius:50%; margin-right:6px; vertical-align:middle;}
.cal-grade{background:#fff; border:1px solid var(--border); border-radius:14px; overflow:clip;}
.cal-cab{display:grid; grid-template-columns:34px repeat(7, 1fr); position:sticky; top:var(--bo-topo, 56px); z-index:5; background:#fff; border-bottom:1px solid var(--border);}
.cal-dcab{display:flex; flex-direction:column; align-items:center; padding:6px 0 7px; position:relative;}
.cal-dcab small{font-size:11px; color:var(--muted); text-transform:uppercase; letter-spacing:0.03em;}
.cal-dcab b{font-size:17px; width:30px; height:30px; display:grid; place-items:center; border-radius:50%; margin-top:1px;}
.cal-dcab.hoje small{color:var(--loja, #2F6FD0); font-weight:700;}
.cal-dcab.hoje b{background:var(--loja, #2F6FD0); color:#fff;}
.cal-dcab i{position:absolute; top:4px; right:3px; font-style:normal; font-size:10px; font-weight:700; color:var(--muted);}
.cal-corpo{display:grid; grid-template-columns:34px repeat(7, 1fr); position:relative;}
.cal-horas{position:relative;}
.cal-horas span{position:absolute; right:4px; transform:translateY(-6px); font-size:10.5px; color:var(--muted); font-variant-numeric:tabular-nums;}
.cal-horas span:first-child{transform:none;}
.cal-col{position:relative; border-left:1px solid #EEEDE8; cursor:copy;
  background-image:linear-gradient(to bottom, #EEEDE8 1px, transparent 1px), linear-gradient(to bottom, transparent calc(var(--hpx) / 2), #F6F5F2 calc(var(--hpx) / 2), #F6F5F2 calc(var(--hpx) / 2 + 1px), transparent calc(var(--hpx) / 2 + 1px));
  background-size:100% var(--hpx);}
.cal-col.passado{background-color:#FAFAF8;}
.cal-col.hoje{background-color:rgba(47,111,208,0.035);}
.cal-ev{position:absolute; z-index:1; overflow:hidden; text-align:left; border:none; border-radius:6px; padding:2px 4px; cursor:pointer; font:inherit;
  background:color-mix(in srgb, var(--c) 16%, #fff); border-left:3px solid var(--c); color:#1F2937; display:flex; flex-direction:column; gap:1px;}
.cal-ev b{font-size:11.5px; line-height:1.2; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.cal-ev span{font-size:10.5px; line-height:1.2; color:#4B5563; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.cal-ev:hover{filter:brightness(0.96);}
.cal-ev.concluido{opacity:0.55;}
.cal-ev.faltou{opacity:0.55;}
.cal-ev.faltou b{text-decoration:line-through;}
.cal-ev.bloqueio{background:repeating-linear-gradient(-45deg, #F3F2EE, #F3F2EE 5px, #E8E6E0 5px, #E8E6E0 10px); color:#6B7280;}
.cal-agora{position:absolute; left:0; right:0; height:2px; background:#E0402F; z-index:2; pointer-events:none;}
.cal-agora::before{content:""; position:absolute; left:-4px; top:-3px; width:8px; height:8px; border-radius:50%; background:#E0402F;}
@media (min-width:900px){
  .cal-cab, .cal-corpo{grid-template-columns:52px repeat(7, 1fr);}
  .cal-horas span{font-size:11.5px; right:8px;}
  .cal-ev{padding:3px 6px;}
  .cal-ev b{font-size:12.5px;}
  .cal-ev span{font-size:11.5px;}
  .cal-tit{font-size:19px;}
}
@media (max-width:899px){ .bo-conteudo:has(.cal){padding-left:6px; padding-right:6px;} .cal-top{padding:0 4px;} }
/* folha com o detalhe do horário */
.ag-sel-fundo{position:fixed; inset:0; z-index:80; background:rgba(0,0,0,0.35); display:flex; align-items:flex-end; justify-content:center;}
.ag-sel{position:relative; width:100%; max-width:440px; background:#fff; border-radius:18px 18px 0 0; padding:20px 18px calc(18px + env(safe-area-inset-bottom)); box-shadow:0 -8px 30px rgba(0,0,0,0.18);}
@media (min-width:900px){ .ag-sel-fundo{align-items:center;} .ag-sel{border-radius:18px;} }
.ag-sel-x{position:absolute; top:10px; right:10px; width:34px; height:34px; border:none; border-radius:50%; background:#F1F0EC; font-size:20px; cursor:pointer;}
.ag-sel-t{margin:0 36px 4px 0; font-size:18px; font-weight:700;}
.ag-sel-q{margin:0 0 14px; color:var(--muted); font-size:14px;}
.ag-sel-cli{background:#F7F6F3; border-radius:12px; padding:12px 14px; display:flex; flex-direction:column; gap:3px; font-size:14.5px;}
.ag-sel-cli a{color:#128C4B; font-weight:600;}
.ag-sel-cli p{margin:4px 0 0; font-style:italic; color:var(--muted); font-size:13.5px;}
.ag-sel-cli small{color:var(--muted); font-size:12px; margin-top:4px;}
.ag-sel-ac{display:flex; flex-direction:column; gap:8px; margin-top:14px;}
.ag-sel-ac .btn{width:100%; justify-content:center; text-align:center;}
.ag-sel-2{display:grid; grid-template-columns:1fr 1fr; gap:8px;}
@media (max-width:899px){ .cal-top{flex-wrap:nowrap;} .cal-tit{font-size:16px; padding:0 4px;} }
