/* Jota Bigode shared application layout: desktop software, tablet and mobile app. */
:root{--jb-ink:#191c20;--jb-muted:#647181;--jb-line:#dfe4ea;--jb-canvas:#f3f5f8;--jb-yellow:#ffda26;--jb-radius:16px}
.jb-app-dock{display:none}
body.jb-system{background:var(--jb-canvas);color:var(--jb-ink)}
.jb-system :is(.jr-page-content,.pm-content){min-width:0;color:var(--jb-ink)}
.jb-system :is(.jr-page-content,.pm-content) :is(input:not([type=checkbox]):not([type=radio]),select,textarea){border:1px solid #cbd3dd;border-radius:11px;min-height:46px;max-width:100%;box-sizing:border-box;accent-color:var(--jb-yellow)}
.jb-system :is(.jr-page-content,.pm-content) :is(button,.button){min-height:44px;border-radius:11px;line-height:1.3;word-break:normal}
.jb-system :is(button,a,input,select,textarea,summary):focus-visible{outline:3px solid #9a7300;outline-offset:3px}
.jb-system :is(.jr-page-content,.pm-content) :is(.card,.jp-group){border:1px solid var(--jb-line);border-radius:var(--jb-radius);box-shadow:0 3px 16px #172b4d05}
.jb-system :is(.jr-top,.pm-head){background:#fff!important;border-bottom:1px solid var(--jb-line);box-shadow:0 2px 10px #172b4d04}
.jb-system .jr-top>[data-chat-top]{display:none!important}
.jb-system .jr-top .jr-chat-link{border-radius:11px;min-height:44px}
.jb-system :is(.jr-navigation,.pm-sidebar nav) a[aria-current=page]{background:var(--jb-yellow);color:var(--jb-ink);font-weight:750}
.jb-system .jp-tools{background:#fff;border:1px solid var(--jb-line);border-radius:var(--jb-radius)}
.jb-system .jp-action{transition:box-shadow .15s,transform .15s;border-radius:13px}
.jb-system .jp-action:hover{box-shadow:0 6px 18px #172b4d12;transform:translateY(-2px)}
.jb-system .pm-table{overflow:auto;max-width:100%;border:1px solid var(--jb-line);border-radius:13px;background:#fff}
.jb-system .pm-table table{border-collapse:collapse;width:100%}.jb-system .pm-table th{font-size:12px;color:#586576;letter-spacing:.02em;background:#f8f9fb}.jb-system .pm-table td{vertical-align:middle}.jb-system .pm-table tbody tr:hover{background:#fffbed}
@media(min-width:1025px){
 .jb-system .jr-shell{grid-template-columns:250px minmax(0,1fr)}.jb-system .jr-top{position:sticky!important;top:0;z-index:40;padding:14px 24px!important;min-height:76px}
 .jb-system .jr-top>strong{font-size:16px;flex:1}.jb-system .jr-page-content{padding:24px;max-width:1800px;margin:auto;width:100%;box-sizing:border-box}
 .jb-system .jr-navigation>a,.jb-system .jr-navigation summary{min-height:52px}.jb-system .jp-dashboard{padding:0}.jb-system .jp-group{padding:22px;background:#fff}.jb-system .pm-content{padding:24px}
}
@media(max-width:1024px){
 body.jb-system{padding-bottom:calc(78px + env(safe-area-inset-bottom))!important}.jb-system .jr-shell{padding-bottom:16px!important}.jb-system .jr-sidebar{background:#1b1d1f}.jb-system .jr-brand{padding:10px 16px}
 .jb-app-dock{display:flex;align-items:stretch;position:fixed;inset:auto 0 0;z-index:9500;background:#fff;border-top:1px solid var(--jb-line);padding:7px 8px calc(7px + env(safe-area-inset-bottom));box-shadow:0 -4px 20px #172b4d0d;gap:5px}
 .jb-app-dock>a,.jb-app-dock>button{position:relative;flex:1;min-width:0;min-height:58px;display:flex;flex-direction:column;gap:4px;align-items:center;justify-content:center;padding:5px 2px!important;border:0;border-radius:12px;background:transparent;color:#596476;text-decoration:none;font-size:11px;font-weight:650;line-height:1.2;box-shadow:none}
 .jb-app-dock svg{width:27px;height:27px;flex-shrink:0}.jb-app-dock>a[aria-current=page],.jb-app-dock>button[aria-expanded=true]{color:#1b1d1f;background:#fff3b7}.jb-app-dock>a[aria-current=page]:before{content:'';position:absolute;top:0;width:22px;height:3px;border-radius:3px;background:#c29800}
 .jb-system .jr-top{padding:12px!important;gap:8px!important;border-radius:0}.jb-system .jr-top .jr-menu-toggle{display:none!important}.jb-system .jr-top>.jr-back{display:none}.jb-system .jr-top>strong{min-width:0!important;font-size:15px;flex-basis:calc(100% - 60px)!important}.jb-system .jr-top .jca-push,.jb-system .jr-top .jca-sound{font-size:11px!important;min-height:40px!important;flex-basis:120px!important}
 .jb-system .jr-page-content{padding:16px 12px}.jb-system .jr-page-content h1{font-size:26px}.jb-system .jr-menu-open .jr-navigation{inset:72px 10px calc(88px + env(safe-area-inset-bottom))!important;z-index:9400!important}.jb-system .jr-menu-open .jr-top{z-index:30!important}
 .jb-system .pm-sidebar{display:none!important}.jb-system .pm-shell{display:block!important}.jb-system .pm-content{margin:0!important;width:100%!important;padding:14px 12px 24px!important}.jb-system .pm-head{position:relative!important;margin:0 0 16px!important;border-radius:14px!important}.jb-system .pm-head h1{font-size:26px!important}.jb-system .pm-head .pm-account{font-size:12px}
 .jb-pdv-menu-open .pm-sidebar{display:block!important;position:fixed!important;inset:12px 12px calc(88px + env(safe-area-inset-bottom))!important;width:auto!important;height:auto!important;overflow:auto!important;z-index:9400!important;border-radius:16px;padding:16px!important;box-shadow:0 0 0 100vmax #0008}
 .jb-pdv-menu-open .pm-sidebar nav{display:grid!important;overflow:visible!important;position:static!important}.jb-pdv-menu-open .pm-sidebar nav a{display:flex!important;flex-direction:row!important;justify-content:flex-start!important;align-items:center!important;gap:14px!important;min-height:54px!important;width:auto!important;flex-basis:auto!important;text-align:left;font-size:15px!important;padding:12px!important}.jb-pdv-menu-open .pm-sidebar nav svg{width:28px!important;height:28px!important}
 .jb-system #toast{bottom:calc(90px + env(safe-area-inset-bottom))!important}.jb-system :is(input,select,textarea){font-size:16px!important}
}
@media(prefers-reduced-motion:reduce){.jb-system *{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

.jb-app-dock .support-count{position:absolute;top:2px;left:calc(50% + 8px);margin:0;min-width:20px;height:20px;font-size:10px!important}

/* Module-specific surfaces, preserving existing forms and actions. */
body[data-jb-module] #main{overflow-wrap:anywhere}
body[data-jb-module] #main :is(input,select,textarea){box-sizing:border-box;max-width:100%}
body[data-jb-module] #main :is(h1,h2,h3){line-height:1.25;letter-spacing:-.015em}
body[data-jb-module] #main h1{font-size:clamp(25px,2.5vw,34px)}
body[data-jb-module] #main :is(fieldset,.card,.eco-card){min-width:0}
body[data-jb-module] #main fieldset{border:1px solid var(--jb-line);border-radius:12px;padding:16px}
body[data-jb-module] #main legend{font-weight:700;padding:0 6px}
.jb-table-scroll{width:100%;max-width:100%;overflow:auto;border:1px solid var(--jb-line);border-radius:12px;background:white;overscroll-behavior-x:contain}
.jb-table-scroll table{border-collapse:collapse;min-width:620px;margin:0!important}
.jb-table-scroll :is(td,th){padding:12px 14px;text-align:left;border-bottom:1px solid #edf0f4}
.jb-table-scroll th{font-size:12px;background:#f7f8fa;color:#5e6877;white-space:nowrap}
.jb-table-scroll tbody tr:hover{background:#fffbed}
body[data-jb-module=shop] .catalog-search{display:grid;grid-template-columns:minmax(220px,2fr) repeat(2,minmax(130px,1fr));gap:10px;background:white;border:1px solid var(--jb-line);padding:18px;border-radius:16px;margin:18px 0}
body[data-jb-module=shop] .catalog-search :is(input,select,button){width:100%;min-width:0;min-height:46px;margin:0;border-radius:10px}
body[data-jb-module=shop] .products-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;align-items:start}
body[data-jb-module=shop] .product-card{display:flex;flex-direction:column;gap:10px;padding:18px;margin:0;border:1px solid var(--jb-line);border-radius:16px;background:#fff;min-width:0;box-shadow:0 3px 16px #172b4d05}
body[data-jb-module=shop] .product-card :is(h2,p){margin:0}.product-card h2{font-size:17px;line-height:1.4}.product-card .price{font-size:25px;font-weight:800;color:#1b1d1f}
body[data-jb-module=shop] .product-card :is(.product-photo,.photo-pending){width:100%;height:auto;aspect-ratio:1;object-fit:contain;background:#f9fafb;border-radius:12px;display:grid;place-items:center;color:#778190;font-size:13px}
.jb-product-editor{border-top:1px solid var(--jb-line);padding-top:12px;margin-top:6px}.jb-product-editor summary{cursor:pointer;font-weight:700;padding:10px 0;min-height:44px;box-sizing:border-box}.jb-product-editor form{padding:14px 0;display:grid;gap:9px}.jb-product-editor .photo-edit{border-top:1px solid var(--jb-line)}
body[data-jb-module=shop] .product-detail-page{gap:24px;align-items:start}.product-detail-info{border:1px solid var(--jb-line);border-radius:18px}.product-detail-photo{background:#fff;border:1px solid var(--jb-line);border-radius:18px;overflow:hidden}
body[data-jb-module=chat] .nc-page{max-width:1400px;margin:0 auto;padding:24px}.nc-page>.pm-tabs{gap:8px;margin:18px 0}.nc-page .pm-tabs>a{white-space:normal}.nc-page #nc-area{margin-top:6px;width:min(100%,420px)}
body[data-jb-module=chat] .wc-history{border:1px solid var(--jb-line);background:#f5f7fa;border-radius:15px;padding:16px;scrollbar-width:thin}.nc-team article{padding:18px;border-radius:15px;border:1px solid var(--jb-line)}.nc-team article>a.button{margin-top:auto;text-align:center}.nc-page #nc-form{display:grid;gap:10px;margin-top:14px}.nc-page #nc-body{border-radius:12px;resize:vertical}.nc-page #nc-form>button{justify-self:end;min-width:160px}.wc-message{border-radius:14px!important;box-shadow:0 2px 5px #172b4d05}.wc-own{background:#fff3b7!important}
body[data-jb-module=workshop] :is(.ws-summary article,.ws-list>.card){border:1px solid var(--jb-line);box-shadow:0 3px 16px #172b4d05;border-radius:16px}.ws-summary strong{font-variant-numeric:tabular-nums}.ws-tabs{gap:8px}.ws-tabs a{border:1px solid #eadc9e;border-radius:10px;text-decoration:none;min-height:44px;box-sizing:border-box}.ws-fields label{min-width:0}
body[data-jb-module=rescue] :is(.eco-card,.eco-warning){border-radius:16px}.eco-actions{gap:10px}.eco-nav a{min-height:44px;border-radius:10px;text-decoration:none}.eco-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr))}.eco-status{font-size:12px;line-height:1.3}.eco-dialog{max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px)}
body[data-jb-module=management] :is(.grid,.ws-fields){gap:16px}.jb-system[data-jb-module=management] form :is(input:not([type=checkbox]):not([type=radio]),select,textarea){min-height:46px}.jb-system[data-jb-module=management] form label{font-size:14px;font-weight:600}
body[data-jb-module=finance] .price,body[data-jb-module=finance] .metrics{font-variant-numeric:tabular-nums}.jb-system[data-jb-module=finance] .card{padding:20px}
body[data-jb-module=pdv] .pn-searchbar{gap:12px}.pn-searchbar #pdv-search{min-width:0}.pn-searchbar #pdv-search button{white-space:nowrap;word-break:normal;min-width:84px}.pn-results .pdv-product-photo{background:#fff;object-fit:contain}.pn-aside{min-width:0}.pn-aside summary{min-height:48px;display:flex;align-items:center;font-weight:700}.pn-aside input,.pn-aside select{min-height:46px}.pn-totalbar #pdv-finish{min-height:52px}
@media(max-width:1024px){body[data-jb-module=shop] .products-grid{grid-template-columns:repeat(2,minmax(0,1fr))}body[data-jb-module=shop] .catalog-search{grid-template-columns:repeat(2,minmax(0,1fr))}.catalog-search input[name=q]{grid-column:1/-1}.catalog-search button{grid-column:1/-1}body[data-jb-module=chat] .wc-layout{grid-template-columns:minmax(0,1fr)}body[data-jb-module=chat] .wc-layout>aside{min-width:0}}
@media(max-width:600px){
 body[data-jb-module] #main input:not([type=checkbox]):not([type=radio]),body[data-jb-module] #main select,body[data-jb-module] #main textarea{font-size:16px;min-height:46px}
 body[data-jb-module=shop] .catalog-search{padding:12px;gap:8px}body[data-jb-module=shop] .products-grid{gap:10px}body[data-jb-module=shop] .product-card{padding:12px;gap:8px}.product-card h2{font-size:14px}.product-card .price{font-size:21px}.product-card .help{font-size:12px}.product-card .badge{font-size:10px;max-width:100%;box-sizing:border-box}.jb-product-editor summary{font-size:12px}.jb-product-editor form{gap:7px}.jb-product-editor form button{font-size:12px;padding:10px 6px}
 body[data-jb-module=shop] .product-detail-page{grid-template-columns:1fr!important;gap:14px}.product-detail-info{padding:18px!important}.product-detail-photo img{max-height:340px;object-fit:contain}
 body[data-jb-module=chat] .nc-page{padding:14px}.nc-page>.pm-tabs{display:grid!important;grid-template-columns:1fr!important;overflow:visible!important}.nc-page>.pm-tabs>a{font-size:13px;min-height:44px;display:flex;align-items:center;justify-content:center}.nc-page .wc-history{height:44dvh;min-height:240px;max-height:520px}.nc-page .wc-message{max-width:94%}.nc-page #nc-form>button{justify-self:stretch;min-height:48px}.nc-page #nc-body{min-height:90px}
 .ws-header{margin:12px 0;gap:12px}.ws-summary{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.ws-summary article{padding:12px}.ws-summary strong{font-size:25px}.ws-summary small{font-size:11px}.ws-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.ws-tabs a{margin:0;padding:10px;font-size:12px;display:flex;align-items:center;justify-content:center;text-align:center}.ws-fields{grid-template-columns:1fr}
 body.jb-system .eco-bottom{display:none!important}.eco-actions>*{flex:1 1 140px;text-align:center}.eco-map{height:280px}.eco-dialog{padding:16px;border-radius:16px}
 body[data-jb-module=pdv] .pn-header{padding:12px;gap:10px}.pn-header h1{font-size:25px}.pn-brand-logo{width:42px;height:42px}.pn-searchbar{padding:12px!important;display:grid!important;grid-template-columns:minmax(0,1fr) 82px!important}.pn-searchbar #pdv-search{display:grid!important;grid-template-columns:1fr;gap:8px}.pn-searchbar #pdv-search input{width:100%!important;min-width:0}.pn-searchbar #pdv-search button{width:100%;min-height:44px}.pn-searchbar .pn-quantity input{width:100%}.pn-totalbar{gap:12px;flex-wrap:wrap}.pn-totalbar strong{font-size:26px!important}.pn-totalbar #pdv-finish{font-size:13px;flex:1}.pn-aside{padding:16px!important}
}
@media(max-width:350px){body[data-jb-module=shop] .products-grid{grid-template-columns:1fr}.ws-summary{grid-template-columns:1fr}.ws-tabs{grid-template-columns:1fr}}

@media(max-width:600px){body[data-jb-module=shop] .product-card:has(.jb-product-editor[open]){grid-column:1/-1}.product-card:has(.jb-product-editor[open])>.product-detail-link:first-child{max-width:240px;width:100%;align-self:center}}

@media(max-width:600px){
 body[data-jb-module]:not(.jb-system) #jota-discord-chat{top:16px;right:14px;bottom:auto}
 body[data-jb-module]:not(.jb-system) #jdc-toggle{width:48px;height:48px;min-width:48px;min-height:48px;padding:0;border-radius:14px;font-size:0;box-shadow:0 3px 12px #0002}
 body[data-jb-module]:not(.jb-system) #jdc-toggle:before{content:'💬';font-size:25px;line-height:1}
 body[data-jb-module]:not(.jb-system) #jdc-panel{position:fixed;top:78px;bottom:calc(88px + env(safe-area-inset-bottom));right:12px;width:calc(100vw - 24px);max-height:calc(100dvh - 180px)}
 body[data-jb-module]:not(.jb-system) #jdc-toggle:focus-visible{outline:3px solid #fff;outline-offset:3px}
}

/* PDV pages use their own controls; omit the redundant account/action banner. */
body[data-jb-route^="pdv"] .pm-head{display:none!important}
