
:root{--verde:#087a49;--verde2:#0a9258;--fundo:#f4f7f5;--texto:#15251d;--muted:#718078;--borda:#e2e9e5;--perigo:#c73535;--raio:22px;--sombra:0 12px 35px rgba(20,55,38,.08)}
*{box-sizing:border-box}html{-webkit-text-size-adjust:100%}body{margin:0;background:var(--fundo);color:var(--texto);font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;min-height:100vh}
button,input,select,textarea{font:inherit}.app-shell{min-height:100vh}.topbar{height:68px;padding:0 max(18px,calc((100vw - 1120px)/2));display:flex;align-items:center;justify-content:space-between;background:rgba(255,255,255,.94);backdrop-filter:blur(18px);border-bottom:1px solid var(--borda);position:sticky;top:0;z-index:50}
.brand{display:flex;align-items:center;gap:9px;text-decoration:none;color:var(--texto);font-weight:900;font-size:20px}.brandmark{width:34px;height:34px;border-radius:12px;display:grid;place-items:center;background:linear-gradient(145deg,var(--verde2),var(--verde));color:#fff;box-shadow:0 8px 20px rgba(8,122,73,.22)}
.top-actions{display:flex;gap:8px}.iconbtn{width:42px;height:42px;border:1px solid var(--borda);background:#fff;border-radius:14px;display:grid;place-items:center;text-decoration:none;box-shadow:0 4px 15px rgba(0,0,0,.04)}
.page{width:min(100% - 32px,860px);margin:0 auto;padding:34px 0 110px}.hero{margin:4px 0 20px}.hero h1{font-size:clamp(27px,4vw,38px);letter-spacing:-.04em;margin:0 0 8px}.hero p{margin:0}.muted{color:var(--muted);line-height:1.55}
.card{background:#fff;border:1px solid var(--borda);border-radius:var(--raio);padding:22px;margin:0 0 16px;box-shadow:var(--sombra)}.card h2{margin:0 0 18px;font-size:20px;letter-spacing:-.02em}
label{display:block;font-size:13px;font-weight:800;margin:15px 0 7px}input:not([type=checkbox]),select,textarea{width:100%;min-height:50px;border:1px solid #d6dfda;border-radius:14px;background:#fbfcfb;padding:12px 14px;color:var(--texto);outline:none;transition:.18s}textarea{min-height:110px;resize:vertical}input:focus,select:focus,textarea:focus{border-color:var(--verde2);background:#fff;box-shadow:0 0 0 4px rgba(10,146,88,.10)}
button,.btn{min-height:48px;border:0;border-radius:14px;padding:12px 18px;background:linear-gradient(135deg,var(--verde2),var(--verde));color:#fff;font-weight:850;cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:8px;box-shadow:0 8px 20px rgba(8,122,73,.17)}button:hover,.btn:hover{filter:brightness(.98);transform:translateY(-1px)}button.secondary,.btn.secondary{background:#eef6f1;color:var(--verde);box-shadow:none}.danger,.btn.danger,button.danger{background:#fff0f0!important;color:var(--perigo)!important;box-shadow:none!important}.money{font-size:30px;font-weight:900;letter-spacing:-.04em}.pill{display:inline-flex;padding:7px 10px;border-radius:999px;background:#eaf7ef;color:var(--verde);font-size:12px;font-weight:850}
.grid,.grid2,.grid3{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.grid3{grid-template-columns:repeat(3,minmax(0,1fr))}
.list-item{display:flex;gap:14px;align-items:center;padding:15px 0;border-bottom:1px solid #edf1ef}.list-item:last-child{border-bottom:0}.grow{flex:1;min-width:0}.right{text-align:right}.item-icon{width:45px;height:45px;display:grid;place-items:center;border-radius:14px;background:#eff7f2;font-size:21px}
.bottom-nav{position:fixed;left:50%;bottom:16px;transform:translateX(-50%);z-index:60;width:min(calc(100% - 28px),720px);height:72px;padding:7px;display:grid;grid-auto-flow:column;grid-auto-columns:1fr;background:rgba(20,34,27,.94);backdrop-filter:blur(18px);border:1px solid rgba(255,255,255,.12);border-radius:24px;box-shadow:0 18px 45px rgba(0,0,0,.20)}
.navitem{min-width:0;border-radius:18px;color:#aeb9b3;text-decoration:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;font-size:10px;font-weight:750}.navitem b{font-size:20px;line-height:1}.navitem.ativo{background:#fff;color:var(--verde)}
.adbox{border:1px dashed #cbd6d0;border-radius:18px;padding:24px;text-align:center;color:var(--muted);background:#fff;margin:16px 0}
.account-head{display:flex;align-items:center;gap:16px}.account-avatar{width:62px;height:62px;border-radius:20px;background:linear-gradient(145deg,var(--verde2),var(--verde));color:#fff;display:grid;place-items:center;font-size:25px;font-weight:900}.actions{display:flex;gap:10px;flex-wrap:wrap}.actions>*{flex:1}
.notice{padding:13px 15px;border-radius:14px;background:#eaf7ef;color:#12613e;margin-bottom:15px;font-weight:700}.notice.erro{background:#fff0f0;color:#a52a2a}
@media(max-width:680px){.topbar{height:60px;padding:0 16px}.brand{font-size:18px}.page{width:calc(100% - 24px);padding-top:22px}.card{padding:18px;border-radius:20px}.grid,.grid2,.grid3{grid-template-columns:1fr}.bottom-nav{bottom:max(10px,env(safe-area-inset-bottom));height:68px;border-radius:22px}.navitem span{font-size:9px}.list-item{align-items:flex-start;flex-wrap:wrap}.right{width:100%;text-align:left}.actions{flex-direction:column}.actions>*{width:100%}}
@media(min-width:900px){.page{width:min(100% - 48px,1000px)}}

/* V2.3.0 — experiência de aplicativo */
:root{--surface:#fff;--surface2:#f7faf8;--line:#e7eee9;--shadow-soft:0 8px 28px rgba(22,55,39,.08)}
body{background:linear-gradient(180deg,#f8fbf9 0,#f3f7f5 100%);overscroll-behavior-y:none}
.page{max-width:980px}.topbar{box-shadow:0 1px 0 rgba(10,50,30,.04)}
.hero{padding:6px 2px 2px}.hero h1{font-weight:900}.card{box-shadow:var(--shadow-soft)}
.app-tabs{display:flex;gap:8px;overflow:auto;padding:5px;background:#edf4f0;border-radius:18px;scrollbar-width:none}.app-tabs::-webkit-scrollbar{display:none}
.app-tabs a{white-space:nowrap;min-height:44px;padding:0 16px;border-radius:14px;display:flex;align-items:center;gap:8px;text-decoration:none;color:#496057;font-weight:800}
.app-tabs a.ativo{background:#fff;color:var(--verde);box-shadow:0 5px 16px rgba(20,55,38,.09)}
.dashboard-cards{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:0 0 16px}.dash-card{background:#fff;border:1px solid var(--line);border-radius:19px;padding:17px;box-shadow:var(--shadow-soft)}.dash-card span{display:block;color:var(--muted);font-size:12px;font-weight:750}.dash-card b{display:block;margin-top:5px;font-size:22px}
.purchase-toolbar{display:flex;gap:10px;align-items:center;justify-content:space-between;margin-bottom:12px}.purchase-toolbar .btn{min-height:42px;padding:9px 13px}
.product-row{display:grid;grid-template-columns:48px minmax(0,1fr) auto;gap:12px;align-items:center;padding:14px 0;border-bottom:1px solid var(--line)}.product-row:last-child{border-bottom:0}
.product-actions{display:flex;gap:7px;justify-content:flex-end;margin-top:8px}.mini-btn{min-height:34px!important;padding:6px 10px!important;border-radius:10px!important;font-size:12px!important;box-shadow:none!important}
.receipt-shell{width:min(calc(100% - 24px),520px);margin:22px auto;padding-bottom:30px}.receipt-card{background:#fff;border:1px solid var(--line);border-radius:26px;padding:24px;box-shadow:0 18px 55px rgba(20,55,38,.12)}.receipt-head{text-align:center;padding-bottom:16px}.receipt-logo{width:54px;height:54px;border-radius:18px;margin:0 auto 10px;display:grid;place-items:center;background:linear-gradient(145deg,var(--verde2),var(--verde));color:#fff;font-size:28px;font-weight:900}.receipt-title{font-size:20px;font-weight:900}.receipt-meta{font-size:12px;color:var(--muted);margin-top:4px}.receipt-sep{border-top:1px dashed #b8c6be;margin:16px 0}.receipt-line{display:flex;justify-content:space-between;gap:12px;margin:7px 0}.receipt-product{padding:9px 0;border-bottom:1px dashed #dce5df}.receipt-total{font-size:23px;font-weight:900}.receipt-actions{display:grid;gap:9px;margin-top:16px}.receipt-actions .btn{width:100%}
.empty-state{text-align:center;padding:34px 18px}.empty-state .emoji{font-size:38px;margin-bottom:8px}
.bottom-nav{max-width:680px}.navitem{transition:.18s}.navitem:active{transform:scale(.96)}
@media(max-width:680px){.page{padding-bottom:100px}.dashboard-cards{grid-template-columns:repeat(2,1fr)}.dash-card{padding:14px}.app-tabs{margin:0 -2px}.product-row{grid-template-columns:42px minmax(0,1fr)}.product-row>.right{grid-column:2;width:auto}.product-actions{justify-content:flex-start}.receipt-shell{margin:12px auto}.receipt-card{border-radius:22px;padding:19px}.purchase-toolbar{align-items:stretch;flex-direction:column}.purchase-toolbar .btn{width:100%}}

/* 2.3.1 - ícones vetoriais e formulários inteligentes */
.navitem svg,.iconbtn svg,.app-tabs svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.navitem svg{width:22px;height:22px}.iconbtn svg{width:20px;height:20px}
.field-money{position:relative}.field-money input{font-variant-numeric:tabular-nums;font-weight:750}
.field-help{font-size:11px;color:var(--muted);margin-top:5px}
.input-invalid{border-color:#d23b3b!important;box-shadow:0 0 0 4px rgba(210,59,59,.09)!important}

/* V2.3.4 — correção crítica da navegação e finalização */
.bottom-nav{
  width:min(calc(100% - 24px),620px)!important;
  height:68px!important;
  padding:6px!important;
  bottom:max(10px,env(safe-area-inset-bottom))!important;
  border-radius:22px!important;
  overflow:hidden!important;
}
.navitem{height:56px!important;min-height:56px!important;padding:5px 3px!important;gap:3px!important;overflow:hidden!important}
.navitem svg{display:block!important;width:20px!important;height:20px!important;min-width:20px!important;min-height:20px!important;max-width:20px!important;max-height:20px!important;flex:0 0 20px!important}
.navitem span{display:block!important;font-size:9px!important;line-height:11px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;max-width:100%!important}
.iconbtn svg{display:block!important;width:19px!important;height:19px!important;max-width:19px!important;max-height:19px!important}
.modal{position:fixed!important;inset:0!important;z-index:1000!important;background:rgba(9,22,15,.55)!important;backdrop-filter:blur(5px);display:none!important;align-items:flex-end!important;justify-content:center!important;padding:16px!important}
.modal.open{display:flex!important}
.sheet{width:min(100%,520px)!important;background:#fff!important;border-radius:26px!important;padding:22px!important;box-shadow:0 24px 80px rgba(0,0,0,.28)!important;animation:sheetUp .18s ease-out}
.sheet h2{margin:0 0 8px}.sheet button{width:100%}
@keyframes sheetUp{from{transform:translateY(35px);opacity:.3}to{transform:none;opacity:1}}
.finish-disabled{background:#e6ece8!important;color:#8b9991!important;box-shadow:none!important;cursor:not-allowed!important}
.purchase-finish{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-top:18px;padding-top:16px;border-top:1px solid var(--line)}
.purchase-finish .muted{font-size:12px}
@media(max-width:680px){
 .bottom-nav{width:calc(100% - 16px)!important;height:66px!important}
 .navitem{height:54px!important;min-height:54px!important}
 .page{padding-bottom:105px!important}
 .purchase-finish{flex-direction:column;align-items:stretch}
 .purchase-finish button{width:100%}
}

.cc-dialog-backdrop{position:fixed;inset:0;z-index:5000;background:rgba(11,24,17,.52);backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px);display:none;align-items:center;justify-content:center;padding:20px}.cc-dialog-backdrop.open{display:flex}.cc-dialog{width:min(100%,410px);background:#fff;border:1px solid rgba(15,80,48,.08);border-radius:28px;padding:26px;box-shadow:0 30px 90px rgba(0,0,0,.25);text-align:center;animation:ccPop .18s ease-out}.cc-dialog-icon{width:58px;height:58px;margin:0 auto 15px;border-radius:19px;display:grid;place-items:center;background:#fff0f0;color:#c93434}.cc-dialog-icon svg{width:27px;height:27px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.cc-dialog h2{font-size:21px;margin:0 0 7px;color:#15231b}.cc-dialog p{font-size:14px;line-height:1.5;color:#66756d;margin:0 auto 22px;max-width:330px}.cc-dialog-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.cc-dialog-actions .btn{width:100%;min-height:48px;margin:0}.danger-solid{background:#d63d3d!important;color:#fff!important;border-color:#d63d3d!important}@keyframes ccPop{from{opacity:0;transform:scale(.94) translateY(8px)}to{opacity:1;transform:none}}@media(max-width:480px){.cc-dialog{border-radius:24px;padding:22px}.cc-dialog-actions{grid-template-columns:1fr}.cc-dialog-actions #ccDialogConfirm{order:-1}}

/* V2.3.6 — autenticação centralizada e adaptativa */
body.auth-body{min-height:100dvh;display:flex;flex-direction:column;overflow-x:hidden}
body.auth-body .topbar{flex:0 0 auto}
body.auth-body .page{
 flex:1 0 auto;
 width:min(100% - 32px,980px);
 margin:0 auto;
 padding-top:clamp(22px,5vh,58px);
 padding-bottom:clamp(22px,5vh,58px);
 display:flex;
 flex-direction:column;
 justify-content:center;
}
body.auth-body .hero{flex:0 0 auto;margin:0 0 18px}
body.auth-body .hero h1{margin-top:0}
body.auth-body .card{flex:0 0 auto;margin-bottom:0}
body.auth-body .bottom-nav{display:none!important}
@media(max-height:720px){
 body.auth-body .page{justify-content:flex-start;padding-top:24px;padding-bottom:24px}
 body.auth-body .hero{margin-bottom:12px}
 body.auth-body .hero h1{font-size:30px;margin-bottom:5px}
 body.auth-body .card{padding:20px}
 body.auth-body input,body.auth-body select{min-height:46px}
}
@media(max-width:680px){
 body.auth-body .page{width:min(100% - 24px,980px);padding-top:24px;padding-bottom:24px}
 body.auth-body .hero{text-align:left}
 body.auth-body .card{border-radius:22px}
}
@media(max-width:420px){
 body.auth-body .page{width:min(100% - 18px,980px)}
 body.auth-body .hero h1{font-size:28px}
 body.auth-body .card{padding:17px}
}

/* V2.3.7 — scanner mobile em viewport próprio */
.scanner-overlay{position:fixed;inset:0;z-index:9999;background:#07110c;display:none;width:100vw;height:100dvh;overflow:hidden}
.scanner-overlay.open{display:block}
.scanner-shell{position:absolute;inset:0;display:grid;grid-template-rows:auto 1fr auto;background:#07110c;color:#fff}
.scanner-head{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:max(14px,env(safe-area-inset-top)) 18px 14px;background:rgba(7,17,12,.96);z-index:3}
.scanner-head div{display:flex;flex-direction:column;gap:2px}.scanner-head strong{font-size:18px}.scanner-head span{font-size:12px;color:#bdc9c2}
.scanner-close{width:44px;height:44px;min-width:44px;border:0;border-radius:15px;background:rgba(255,255,255,.12);color:#fff;font-size:30px;line-height:1;padding:0}
.scanner-stage{position:relative;min-height:0;overflow:hidden;background:#000}
#scannerVideo{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;background:#000}
.scanner-guide{position:absolute;inset:0;display:grid;place-items:center;pointer-events:none}
.scanner-guide:before{content:"";width:min(82vw,520px);height:min(32vh,240px);border:2px solid rgba(255,255,255,.92);border-radius:22px;box-shadow:0 0 0 9999px rgba(0,0,0,.28)}
.scanner-guide span{position:absolute;width:min(72vw,450px);height:2px;background:#25c477;box-shadow:0 0 12px rgba(37,196,119,.8)}
.scanner-status{position:absolute;left:50%;bottom:18px;transform:translateX(-50%);max-width:88%;padding:9px 13px;border-radius:999px;background:rgba(0,0,0,.58);font-size:12px;text-align:center}
.scanner-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:14px 16px max(14px,env(safe-area-inset-bottom));background:#07110c}
.scanner-actions .btn{width:100%;min-height:48px;margin:0}
body.scanner-lock{overflow:hidden!important;touch-action:none}
.scanner-fallback{display:none!important}
@media(orientation:landscape) and (max-height:600px){.scanner-head{padding-top:8px;padding-bottom:8px}.scanner-actions{padding-top:8px;padding-bottom:8px}.scanner-guide:before{height:48vh;width:62vw}}

/* V2.3.8 */
body.scanner-lock .bottom-nav,body.scanner-lock .topbar{visibility:hidden!important;pointer-events:none!important}
.scanner-overlay{z-index:2147483000!important;position:fixed!important;inset:0!important;width:100%!important;height:100dvh!important;margin:0!important;padding:0!important}
.scanner-shell{width:100%!important;height:100%!important;max-width:none!important;margin:0!important}
#scannerVideo{max-width:none!important;max-height:none!important;border-radius:0!important}

/* V2.3.9 */
.scanner-overlay{z-index:2147483647!important;pointer-events:auto!important}
.scanner-overlay.open{display:block!important;visibility:visible!important;opacity:1!important}
.scanner-close,.scanner-actions button{pointer-events:auto!important;touch-action:manipulation}
html.scanner-lock,body.scanner-lock{overflow:hidden!important;overscroll-behavior:none!important}
[data-scanner-mode]{touch-action:manipulation}
