/* Mobile PWA shell and iOS safe-area support. */
html{background:var(--bg);-webkit-tap-highlight-color:transparent}body{overscroll-behavior-y:none}.topbar-title,.topbar-actions{display:flex;align-items:center;gap:12px}.mobile-logo,.mobile-bottom-nav{display:none}.install-button{border:1px solid #ccd7f5;border-radius:10px;background:#f3f6ff;color:var(--green);padding:8px 11px;font-weight:700}.install-guide-backdrop{position:fixed;inset:0;z-index:120;display:grid;place-items:end center;padding:18px;background:rgba(57,35,23,.55);backdrop-filter:blur(5px)}.install-guide{width:min(460px,100%);padding:26px;border-radius:24px;background:#ffffff;box-shadow:var(--shadow);animation:sheet-up .25s ease}.install-guide h2{margin:15px 0 8px;font:800 22px Manrope}.install-guide p{margin:0;color:var(--muted)}.install-guide ol{margin:20px 0;padding-left:24px}.install-guide li{margin:12px 0;line-height:1.55}.install-app-icon{width:64px;height:64px;border-radius:18px;overflow:hidden;box-shadow:0 8px 22px rgba(105,58,31,.2)}.install-app-icon img{width:100%;height:100%}.share-symbol{display:inline-grid;place-items:center;width:24px;height:24px;border:1px solid #d7b89f;border-radius:6px;color:#1769aa;font-weight:800}@keyframes sheet-up{from{transform:translateY(35px);opacity:0}}
@media(max-width:900px){body:has(.mobile-bottom-nav){padding-bottom:calc(70px + env(safe-area-inset-bottom))}.sidebar{display:none}.topbar{height:calc(62px + env(safe-area-inset-top));padding-top:env(safe-area-inset-top);background:rgba(245,247,251,.94)}.mobile-menu{display:none}.mobile-logo{display:grid;place-items:center;width:32px;height:32px;border-radius:10px;background:var(--lime);color:var(--green);font:800 15px Manrope}.topbar h1{font-size:19px}.topbar-actions .install-button{font-size:0;padding:8px}.topbar-actions .install-button:after{content:'↓';font-size:18px}.content{padding-bottom:30px}.mobile-bottom-nav{position:fixed;inset:auto 0 0;z-index:15;display:flex;gap:2px;overflow-x:auto;padding:7px 8px calc(7px + env(safe-area-inset-bottom));border-top:1px solid var(--line);background:rgba(255,255,255,.96);box-shadow:0 -8px 28px rgba(105,58,31,.07);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);scrollbar-width:none}.mobile-bottom-nav::-webkit-scrollbar{display:none}.mobile-bottom-nav button{flex:1 0 68px;min-width:62px;border:0;border-radius:11px;background:transparent;color:var(--muted);padding:5px 4px}.mobile-bottom-nav button span,.mobile-bottom-nav button small{display:block}.mobile-bottom-nav button span{height:23px;font-size:19px;line-height:23px}.mobile-bottom-nav button small{margin-top:2px;overflow:hidden;font-size:10px;font-weight:700;text-overflow:ellipsis;white-space:nowrap}.mobile-bottom-nav button.active{background:#e7edff;color:var(--green)}.modal-backdrop{align-items:end;padding:0}.modal{width:100%;max-height:92dvh;border-radius:22px 22px 0 0;padding-bottom:env(safe-area-inset-bottom)}.modal-head{position:sticky;top:0;z-index:2;background:#fff;border-radius:22px 22px 0 0}.toast{top:auto;right:16px;bottom:calc(82px + env(safe-area-inset-bottom));left:16px;text-align:center;transform:translateY(30px)}.toast.show{transform:none}.hero:after{right:-50px}.card{border-radius:14px}.table-wrap{-webkit-overflow-scrolling:touch}.field input,.field select,.field textarea{font-size:16px;min-height:45px}.btn{min-height:42px}.login-wrap{padding:max(32px,env(safe-area-inset-top)) 22px max(32px,env(safe-area-inset-bottom))}.login-page{min-height:100dvh}}
@media(max-width:560px){.content{padding-left:12px;padding-right:12px}.hero{border-radius:16px}.hero h2{font-size:23px}.hero .btn{position:relative;z-index:1;padding:9px 11px}.kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.kpi{padding:15px}.kpi .value{font-size:20px}.kpi small{font-size:11px}.page-actions .btn{width:100%}.report-filters{display:grid;grid-template-columns:1fr 1fr}.report-filters .btn,.report-filters .field:last-of-type{grid-column:1/-1}.bar-row{grid-template-columns:72px 1fr 92px;font-size:11px}.line-item{padding:9px}.modal-body{padding:16px}.modal-actions{position:sticky;bottom:0;background:#fff;padding-bottom:calc(14px + env(safe-area-inset-bottom))}}
.standalone-app body{user-select:none;-webkit-user-select:none}.standalone-app input,.standalone-app textarea{user-select:text;-webkit-user-select:text}

/* iPhone Air portrait layout: compact cards, thumb-sized actions and no horizontal tables. */
@media(max-width:600px) and (orientation:portrait){.topbar{padding-right:max(14px,env(safe-area-inset-right));padding-left:max(14px,env(safe-area-inset-left))}.topbar-title{min-width:0}.topbar h1{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.content{max-width:430px;margin-inline:auto}.hero{min-height:132px;align-items:flex-end}.hero p{max-width:220px;font-size:12px}.hero .btn{align-self:flex-start;white-space:nowrap}.kpis{margin-bottom:14px}.kpi .label{font-size:11px}.kpi .value{font-size:18px;letter-spacing:-.4px}.kpi small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.grid-2{gap:12px}.card-head{padding:15px}.card-head h3{font-size:15px}.table-wrap{overflow:visible}.table-wrap table,.table-wrap tbody,.table-wrap tr,.table-wrap td{display:block;width:100%}.table-wrap thead{display:none}.table-wrap tbody{padding:8px}.table-wrap tr{position:relative;margin-bottom:9px;padding:12px 13px;border:1px solid var(--line);border-radius:13px;background:#fff;box-shadow:0 3px 12px rgba(105,58,31,.04)}.table-wrap tr:last-child{margin-bottom:0}.table-wrap td{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:34px;padding:7px 0;border-bottom:1px dashed #eee1d6;white-space:normal;text-align:right}.table-wrap td:last-child{border:0}.table-wrap td:before{content:attr(data-label);flex:0 0 auto;color:var(--muted);font-size:10px;font-weight:700;letter-spacing:.04em;text-align:left;text-transform:uppercase}.table-wrap td:first-child{padding-top:2px;font-size:15px;text-align:right}.table-wrap td:first-child:before{font-size:10px}.table-wrap td.empty{display:block;padding:28px 10px;border:0;text-align:center}.table-wrap td.empty:before{display:none}.table-wrap td .btn{min-height:36px;padding:7px 13px}.page-actions{margin-bottom:12px}.page-actions p{font-size:12px}.report-filters{margin-bottom:12px;padding:12px}.bar-list{padding:13px}.install-guide-backdrop{padding:0;place-items:end}.install-guide{padding:24px 20px calc(20px + env(safe-area-inset-bottom));border-radius:24px 24px 0 0}.mobile-bottom-nav{padding-inline:max(7px,env(safe-area-inset-left)) max(7px,env(safe-area-inset-right))}.mobile-bottom-nav button{min-height:49px}.modal-actions .btn{flex:1}.modal-actions{gap:8px}.line-item{gap:8px;background:#f5f7fb}.line-item .remove{align-self:end}.total-box{position:sticky;bottom:0;z-index:1;border:1px solid #dce4f3}.login-card h2{font-size:28px}.login-card>p{margin-bottom:25px}}

@media(max-width:900px){.sidebar{display:flex;z-index:30;padding-top:max(24px,env(safe-area-inset-top));padding-bottom:max(24px,env(safe-area-inset-bottom))}.mobile-menu{display:block;width:38px;height:38px;border:0;border-radius:11px;background:#e7edff;color:var(--green);font-size:20px}.mobile-logo{display:none}.mobile-bottom-nav [data-page="products"],.mobile-bottom-nav [data-page="resellers"]{display:none}.mobile-bottom-nav button{flex:1 1 20%}}
@media(max-width:900px){body:has(.sidebar.open):before{position:fixed;inset:0;z-index:25;background:rgba(18,27,45,.42);backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px);content:""}}
@media(max-width:900px){.modal-backdrop{backdrop-filter:none;-webkit-backdrop-filter:none}.modal{overscroll-behavior:contain}.product-thumbnail img{transform:translateZ(0)}}
@media(max-width:560px){.product-picker-options{position:fixed;top:auto;right:12px;bottom:calc(76px + env(safe-area-inset-bottom));left:12px;max-height:min(52dvh,420px);padding:8px;border-radius:18px;box-shadow:0 12px 50px rgba(24,32,51,.28)}.product-picker-option{min-height:64px;padding:11px 12px}.product-picker-option>span:first-child b{white-space:normal}.product-picker-meta b{font-size:12px}}
@media(max-width:600px){.product-cell{min-width:0;text-align:left}.product-thumbnail{flex-basis:48px;width:48px;height:48px}.product-image-field{align-items:flex-start}.product-thumbnail.large{flex-basis:92px;width:92px;height:92px}}
@media(max-width:600px){.section-heading{align-items:flex-start;flex-direction:column}.section-heading .btn{width:100%}.variant-grid{grid-template-columns:1fr 1fr}.variant-grid .field:first-child,.variant-grid .field:nth-child(3){grid-column:1/-1}.variant-row{padding:12px}}
@media(max-width:600px){.stock-alert-card .table-wrap tbody{padding:7px}.stock-alert-card .table-wrap tr{display:flex;width:100%;align-items:center;gap:10px;margin-bottom:7px;padding:10px 11px}.stock-alert-card .table-wrap td{display:block;width:auto;min-height:0;padding:0;border:0}.stock-alert-card .table-wrap td:before{display:none}.stock-alert-card .table-wrap td:first-child{min-width:0;flex:1;text-align:left}.stock-alert-card .table-wrap td:last-child{flex:0 0 auto;white-space:nowrap;text-align:right}.stock-alert-card .product-cell{width:100%;min-width:0;gap:10px}.stock-alert-card .product-cell>span:last-child{min-width:0}.stock-alert-card .product-cell b,.stock-alert-card .product-cell small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.stock-alert-card .product-thumbnail{width:42px;height:42px;flex-basis:42px}.stock-alert-card .table-wrap td.empty{width:100%;flex:1 1 100%;padding:24px 8px;text-align:center}}
@media(max-width:600px){.app-shell.reseller .report-reseller-card{display:none}.app-shell.reseller .report-grid{grid-template-columns:1fr}.app-shell.reseller .report-filters .field:last-of-type{grid-column:auto}.report-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.report-kpis .kpi{min-width:0}.report-kpis .value{overflow-wrap:anywhere;font-size:17px}.report-grid .bar-row{grid-template-columns:62px minmax(36px,1fr) minmax(78px,auto);gap:8px}.report-grid .bar-row>b{text-align:right;font-size:11px}.cod-scope{display:block;padding:13px}.cod-scope .field{min-width:0;margin-bottom:7px}.cod-scope small{display:block;padding:0}.cod-kpis{grid-template-columns:1fr}.cod-history td{white-space:normal}}
