/* Akaora Inventory Pro v82: classic Android-style UI on compact screens only.
   Desktop is untouched. All financial values come from the existing v81 DOM. */
@media (max-width:850px){
 html{ -webkit-text-size-adjust:100%; text-size-adjust:100%; }
 html body.ak29-glass.ak33-editorial{
  --ak82-space:16px;
  -webkit-tap-highlight-color:transparent;
  overscroll-behavior-y:contain;
 }
 html body.ak29-glass.ak33-editorial :is(button,a,input,select,textarea,summary){touch-action:manipulation}
 /* Android app bar — logo/store identity, lock, notifications, account in More. */
 html body.ak29-glass.ak33-editorial .app .main>header.topbar{
  height:64px!important;min-height:64px!important;max-height:64px!important;
  padding:10px 16px!important;gap:10px!important;
  background:var(--ak33-surface,#202028)!important;
  border-bottom:1px solid var(--ak33-line,#373740)!important;
 }
 html body.ak29-glass.ak33-editorial .topbar .brand.shop-top-brand.ak77-product-identity{
  flex:1 1 auto!important;max-width:none!important;min-width:0!important;
  gap:10px!important;overflow:hidden!important;
 }
 html body.ak29-glass.ak33-editorial .topbar .ak77-brand-icon{
  width:38px!important;height:38px!important;flex:0 0 38px!important;
  border-radius:11px!important;
 }
 html body.ak29-glass.ak33-editorial .topbar .ak77-product-copy{flex:1 1 auto;min-width:0!important;gap:5px}
 html body.ak29-glass.ak33-editorial .topbar .ak77-product-name{
  display:block!important;max-width:100%;overflow:hidden;text-overflow:ellipsis;
  font-size:14px!important;line-height:1.2!important;letter-spacing:-.025em!important;white-space:nowrap;
 }
 html body.ak29-glass.ak33-editorial .topbar .ak77-product-subtitle{
  font-size:12px!important;line-height:1.15!important;min-height:14px;
  overflow:hidden!important;text-overflow:ellipsis!important;display:block!important;
 }
 html body.ak29-glass.ak33-editorial .topbar .ak77-pro{display:none!important}
 html body.ak29-glass.ak33-editorial .topbar .top-actions{flex:0 0 auto!important;gap:8px!important;margin:0!important}
 html body.ak29-glass.ak33-editorial .topbar .top-actions .account-trigger{display:none!important}
 html body.ak29-glass.ak33-editorial .topbar .top-actions .ak76-header-more{display:none!important}
 html body.ak29-glass.ak33-editorial .topbar .top-actions :is(#akaoraNotifyButton,#ak80TopbarLock){
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  width:44px!important;height:44px!important;min-width:44px!important;max-width:44px!important;
  min-height:44px!important;padding:0!important;border-radius:14px!important;
  background:transparent!important;
 }
 html body.ak29-glass.ak33-editorial .topbar .top-actions :is(#akaoraNotifyButton,#ak80TopbarLock) svg{width:21px!important;height:21px!important}
 /* Stable Android bottom tabs with safe area and thumb-friendly hit targets. */
 html body.ak29-glass.ak33-editorial .mobile-nav{
  display:grid!important;position:fixed!important;left:0!important;right:0!important;bottom:0!important;
  z-index:90!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;
  align-items:stretch!important;gap:0!important;
  min-height:72px!important;padding:6px max(9px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(9px,env(safe-area-inset-left))!important;
  border-top:1px solid var(--ak33-line,#393944)!important;
  background:var(--ak33-surface,#22222a)!important;
  backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
  box-shadow:0 -4px 20px rgba(0,0,0,.13)!important;
 }
 html body.ak29-glass.ak33-editorial .mobile-nav>button{
  position:relative;min-width:0!important;min-height:56px!important;max-width:none!important;
  padding:5px 2px!important;margin:0!important;gap:4px!important;
  display:flex!important;flex-direction:column;align-items:center;justify-content:center;
  border:0!important;background:transparent!important;border-radius:16px!important;
  box-shadow:none!important;
 }
 html body.ak29-glass.ak33-editorial .mobile-nav>button.active{
  background:transparent!important;border:0!important;box-shadow:none!important;color:var(--ak77-accent)!important;
 }
 html body.ak29-glass.ak33-editorial .mobile-nav>button::before{
  content:'';position:absolute;top:3px;left:16%;right:16%;height:32px;border-radius:18px;
  background:transparent;pointer-events:none;transition:background .12s ease;
 }
 html body.ak29-glass.ak33-editorial .mobile-nav>button.active::before{background:var(--ak77-tint)!important}
 html body.ak29-glass.ak33-editorial .mobile-nav>button svg{
  position:relative;z-index:1;width:22px!important;height:22px!important;flex:none!important;
 }
 html body.ak29-glass.ak33-editorial .mobile-nav>button span:not(.ak32-nav-icon){
  position:relative;z-index:1;font-size:11px!important;line-height:1.15!important;
  font-weight:600!important;letter-spacing:0!important;
 }
 html body.ak29-glass.ak33-editorial .mobile-nav>button.active span:not(.ak32-nav-icon){font-weight:800!important}
 html body.ak29-glass.ak33-editorial .mobile-nav>button:focus-visible,
 html body.ak29-glass.ak33-editorial #content :is(button,summary,a,input,textarea,select):focus-visible{
  outline:2px solid var(--ak77-accent)!important;outline-offset:2px!important;
 }
 /* Bring other pages closer to familiar Android touch and reading sizes. */
 html body.ak29-glass.ak33-editorial #content:not(.ak78-home){
  min-width:0!important;padding-bottom:max(104px,calc(84px + env(safe-area-inset-bottom)))!important;
 }
 html body.ak29-glass.ak33-editorial #content:not(.ak78-home) :is(input:not([type=checkbox]):not([type=radio]),select,textarea){
  min-height:46px;font-size:16px!important;max-width:100%;
 }
 html body.ak29-glass.ak33-editorial #content:not(.ak78-home) button{
  font-size:max(13px,1em);min-height:42px;
 }
 html body.ak29-glass.ak33-editorial #content:not(.ak78-home) :is(.heading h1,.ak32-pane-head h2){line-height:1.2!important}
 html body.ak29-glass.ak33-editorial #content:not(.ak78-home) .heading h1{font-size:clamp(23px,5.8vw,29px)!important}
 html body.ak29-glass.ak33-editorial .ak77-more-panel{
  border-radius:25px 25px 0 0!important;width:100%!important;max-width:560px!important;
  max-height:min(85dvh,780px)!important;padding:13px 18px calc(20px + env(safe-area-inset-bottom))!important;
 }
 html body.ak29-glass.ak33-editorial .ak77-more-close{min-width:44px;min-height:44px}
 html body.ak29-glass.ak33-editorial .ak77-operation{min-height:54px!important}
 html body.ak29-glass.ak33-editorial .ak77-operation span{font-size:13px!important}
 html body.ak29-glass.ak33-editorial .ak77-featured-btn{min-height:108px!important}
 html body.ak29-glass.ak33-editorial .ak77-featured-btn strong{font-size:13px!important}
 html body.ak29-glass.ak33-editorial .ak77-featured-btn small{font-size:11px!important}
 .ak82-account-tools{margin-top:14px}
 .ak82-account-tools[hidden],.ak82-account-tools [hidden]{display:none!important}
 /* Avoid elaborate blur/shadow repaint during Android scrolling. */
 html body.ak29-glass.ak33-editorial .ak78-home .card,
 html body.ak29-glass.ak33-editorial .mobile-nav{will-change:auto!important}
}
@media (max-width:740px){
 html body.ak29-glass.ak33-editorial #content.ak78-home{
  display:flex!important;flex-direction:column!important;
  padding:20px var(--ak82-space,16px) calc(110px + env(safe-area-inset-bottom))!important;
  gap:0!important;max-width:100%!important;
 }
 #content.ak78-home>.ak78-overview{
  display:flex!important;align-items:flex-start!important;gap:12px!important;
  padding:3px 0 18px!important;margin:0!important;border-bottom:0!important;
 }
 #content.ak78-home .ak78-title-stack{min-width:0;flex:1 1 auto}
 #content.ak78-home .ak78-kicker{font-size:11px!important;letter-spacing:.06em!important;font-weight:750!important}
 #content.ak78-home .ak78-title-stack h1{font-size:28px!important;margin:6px 0!important;line-height:1.18!important;letter-spacing:-.038em!important}
 #content.ak78-home .ak78-title-stack p{font-size:14px!important;line-height:1.4!important;margin:5px 0 0!important}
 #content.ak78-home .ak78-new-bill{
  flex:0 0 auto;min-height:48px!important;font-size:14px!important;font-weight:750!important;
  padding:10px 14px!important;border-radius:14px!important;
 }
 #content.ak78-home .ak78-new-bill svg{width:20px!important;height:20px!important}
 #content.ak78-home .ak78-section-heading{margin:12px 0 14px!important;align-items:center!important}
 #content.ak78-home .ak78-section-kicker{font-size:11px!important;letter-spacing:.07em!important}
 #content.ak78-home .ak78-section-heading h2{font-size:21px!important;margin:5px 0 0!important}
 #content.ak78-home .ak78-section-note{font-size:12px!important}
 /* 1 strong sales card + two readable secondary cards + one low-stock row. */
 html body.ak29-glass.ak33-editorial #content.ak78-home .ak78-kpi-section .ak78-priority-grid{
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
  grid-auto-flow:row!important;gap:12px!important;width:100%!important;
 }
 html body.ak29-glass.ak33-editorial #content.ak78-home .ak78-priority-grid>.card.metric{
  padding:17px!important;border-radius:18px!important;
  min-height:164px!important;gap:10px!important;
  display:flex!important;flex-direction:column!important;justify-content:space-between!important;
  background:var(--ak33-surface,#24242e)!important;
 }
 html body.ak29-glass.ak33-editorial #content.ak78-home .ak78-priority-grid .metric-label{
  font-size:14px!important;line-height:1.32!important;font-weight:700!important;
 }
 html body.ak29-glass.ak33-editorial #content.ak78-home .ak78-priority-grid .metric-value{
  font-size:clamp(21px,5.8vw,27px)!important;line-height:1.13!important;
  font-weight:850!important;letter-spacing:-.038em!important;
  overflow-wrap:anywhere!important;white-space:normal!important;
 }
 html body.ak29-glass.ak33-editorial #content.ak78-home .ak78-priority-grid .metric-note{
  font-size:12px!important;line-height:1.4!important;
  max-width:100%!important;
 }
 #content.ak78-home .ak78-priority-grid .metric-icon{
  width:40px!important;height:40px!important;min-width:40px!important;flex:0 0 40px!important;
  border-radius:14px!important;
 }
 #content.ak78-home .ak78-priority-grid .metric-icon svg{width:21px!important;height:21px!important}
 html body.ak29-glass.ak33-editorial #content.ak78-home .ak78-priority-grid>.metric[data-ak82-kpi="sales"]{
  grid-column:1/-1!important;grid-row:1!important;min-height:172px!important;
  padding:22px!important;border-color:var(--ak77-line)!important;
  background:linear-gradient(120deg,var(--ak77-tint),transparent 72%),var(--ak33-surface,#24242e)!important;
 }
 html body.ak29-glass.ak33-editorial #content.ak78-home .ak78-priority-grid>.metric[data-ak82-kpi="sales"] .metric-label{font-size:16px!important}
 html body.ak29-glass.ak33-editorial #content.ak78-home .ak78-priority-grid>.metric[data-ak82-kpi="sales"] .metric-value{font-size:clamp(31px,8vw,38px)!important}
 html body.ak29-glass.ak33-editorial #content.ak78-home .ak78-priority-grid>.metric[data-ak82-kpi="sales"] .metric-note{font-size:14px!important}
 #content.ak78-home .ak78-priority-grid>.metric[data-ak82-kpi="profit"]{grid-column:1!important;grid-row:2!important}
 #content.ak78-home .ak78-priority-grid>.metric[data-ak82-kpi="expenses"]{grid-column:2!important;grid-row:2!important}
 html body.ak29-glass.ak33-editorial #content.ak78-home .ak78-priority-grid>.metric[data-ak82-kpi="stock"]{
  grid-column:1/-1!important;grid-row:3!important;
  display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;min-height:84px!important;padding:16px 18px!important;gap:3px 14px!important;
 }
 #content.ak78-home .ak78-priority-grid>.metric[data-ak82-kpi="stock"] .metricrow{grid-column:1!important;grid-row:1!important;align-items:center!important}
 html body.ak29-glass.ak33-editorial #content.ak78-home .ak78-priority-grid>.metric[data-ak82-kpi="stock"] .metric-value{
  grid-column:2!important;grid-row:1/3!important;text-align:right;font-size:28px!important;
 }
 #content.ak78-home .ak78-priority-grid>.metric[data-ak82-kpi="stock"] .metric-note{grid-column:1!important;grid-row:2!important}
 #content.ak78-home .ak78-priority-grid>.metric[data-ak82-kpi="stock"] .metric-icon{display:none!important}
 #content.ak78-home .ak78-more-stats{
  margin-top:14px!important;border-radius:18px!important;background:var(--ak33-surface,#24242e)!important;
 }
 #content.ak78-home .ak78-more-stats summary{
  min-height:64px!important;padding:15px 17px!important;font-size:14px!important;gap:11px;
 }
 #content.ak78-home .ak78-more-stats summary>span{gap:10px!important}
 #content.ak78-home .ak78-more-stats summary small{font-size:12px!important;line-height:1.2!important}
 #content.ak78-home .ak78-more-stats summary svg{width:21px!important;height:21px!important}
 #content.ak78-home .ak78-more-stats .ak78-other-grid{gap:10px!important;padding:0 12px 12px!important}
 html body.ak29-glass.ak33-editorial #content.ak78-home .ak78-more-stats .card.metric{
  min-height:145px!important;padding:14px!important;border-radius:15px!important;
 }
 #content.ak78-home .ak78-more-stats .metric-label{font-size:13px!important}
 #content.ak78-home .ak78-more-stats .metric-value{font-size:22px!important;overflow-wrap:anywhere!important}
 #content.ak78-home .ak78-more-stats .metric-note{font-size:12px!important;line-height:1.3!important}
 #content.ak78-home .ak78-more-stats .metric-icon{width:34px!important;height:34px!important;min-width:34px!important;flex:0 0 34px!important}
 #content.ak78-home .ak78-more-stats .metric-icon svg{width:18px!important;height:18px!important}
 #content.ak78-home .ak78-trend-heading{margin-top:24px!important}
 #content.ak78-home .ak78-trend-card,
 #content.ak78-home .ak78-recent{padding:18px!important;border-radius:19px!important}
 #content.ak78-home .ak78-trend-card>h3,
 #content.ak78-home .ak78-recent>h3{font-size:17px!important}
 #content.ak78-home .ak78-trend-card .empty{font-size:14px!important}
 #content.ak78-home>.ak77-home-last.ak78-bottom-tools{margin-top:20px!important;margin-bottom:4px!important}
 #content.ak78-home>.ak77-home-last.ak78-bottom-tools .heading{padding:18px!important;border-radius:18px!important}
 #content.ak78-home .ak82-backup-heading h2{font-size:17px!important;margin:0 0 5px!important}
 #content.ak78-home .ak82-backup-heading p{font-size:13px!important;color:var(--ak33-muted,#aaa);margin:0!important}
 #content.ak78-home>.ak77-home-last .heading > :not(.actions):not(.ak82-backup-heading){display:none!important}
 #content.ak78-home>.ak77-home-last .heading .actions{
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important;margin-top:14px!important;
 }
 #content.ak78-home>.ak77-home-last .heading .actions button{
  min-height:48px!important;font-size:13px!important;padding:10px 8px!important;
 }
 #content.ak78-home>.ak77-home-last .heading .actions button.amber{display:none!important}
}
@media(max-width:370px){
 html body.ak29-glass.ak33-editorial .app .main>header.topbar{padding-left:10px!important;padding-right:10px!important;gap:5px!important}
 html body.ak29-glass.ak33-editorial .topbar .brand.shop-top-brand.ak77-product-identity{gap:6px!important}
 html body.ak29-glass.ak33-editorial .topbar .ak77-brand-icon{width:32px!important;height:32px!important;flex-basis:32px!important}
 html body.ak29-glass.ak33-editorial .topbar .ak77-product-name{font-size:12px!important}
 html body.ak29-glass.ak33-editorial .topbar .ak77-product-subtitle{display:block!important;font-size:11px!important}
 html body.ak29-glass.ak33-editorial .topbar .top-actions{gap:3px!important}
 html body.ak29-glass.ak33-editorial .topbar .top-actions :is(#akaoraNotifyButton,#ak80TopbarLock){width:42px!important;min-width:42px!important;max-width:42px!important}
 html body.ak29-glass.ak33-editorial #content.ak78-home{--ak82-space:12px}
 #content.ak78-home .ak78-title-stack h1{font-size:26px!important}
 #content.ak78-home .ak78-title-stack p{font-size:13px!important}
 #content.ak78-home .ak78-new-bill{padding:9px 10px!important;font-size:13px!important}
 #content.ak78-home .ak78-more-stats summary small{display:none!important}
 html body.ak29-glass.ak33-editorial #content.ak78-home .ak78-priority-grid .metric-label{font-size:13px!important}
 html body.ak29-glass.ak33-editorial #content.ak78-home .ak78-priority-grid .metric-note{font-size:11px!important}
 html body.ak29-glass.ak33-editorial #content.ak78-home .ak78-priority-grid .metric-value{font-size:21px!important}
}
@media(prefers-reduced-motion:reduce){
 html body.ak29-glass.ak33-editorial .mobile-nav>button::before{transition:none!important}
}
@media(max-width:850px){
 html body.ak29-glass.ak33-editorial #root .app .main header.topbar .top-actions > button.account-trigger,
 html body.ak29-glass.ak33-editorial #root .app .main header.topbar .top-actions > :is(.ak44-more,.ak76-header-more){
  display:none!important;visibility:hidden!important;flex:0 0 0!important;width:0!important;min-width:0!important;max-width:0!important;
 }
 html body.ak29-glass.ak33-editorial #content.ak78-home > :is(.ak78-trend-grid,.ak78-trend-heading,.ak78-recent,.ak77-home-last),
 html body.ak29-glass.ak33-editorial #content.ak78-home .ak78-trend-grid > .card,
 html body.ak29-glass.ak33-editorial #content.ak78-home .ak78-recent{
  opacity:1!important;visibility:visible!important;transform:none!important;animation:none!important;
 }
}

@media(max-width:740px){
 html body.ak29-glass.ak33-editorial #root #content.ak78-home .ak78-priority-grid>.metric:not([data-ak82-kpi="sales"]):not([data-ak82-kpi="stock"]) .metric-value{
  font-size:clamp(22px,5.75vw,27px)!important;line-height:1.12!important;
 }
 #content.ak78-home .ak78-trend-grid .chart .barwrap > span:first-child{display:none!important}
}
/* POS readability: retain all v81 fields, calculators and sticky checkout actions. */
@media(max-width:740px){
 html body.ak29-glass.ak33-editorial #content .akaora-pos-frame .ak29-heading-copy h2,
 html body.ak29-glass.ak33-editorial #content .akaora-pos-frame .pos-order-head h3{font-size:18px!important;line-height:1.25!important}
 html body.ak29-glass.ak33-editorial #content .akaora-pos-frame .ak29-heading-copy small{font-size:13px!important;line-height:1.35!important}
 html body.ak29-glass.ak33-editorial #content .akaora-pos-frame :is(.bill-form-block h4,.ak29-accordion-title){font-size:16px!important;line-height:1.3!important}
 html body.ak29-glass.ak33-editorial #content .akaora-pos-frame .bill-checkout label{font-size:13px!important;line-height:1.45!important}
 html body.ak29-glass.ak33-editorial #content .akaora-pos-frame :is(.v57-customer-mode button,.ak29-layout-toggle button){font-size:14px!important;min-height:44px!important}
 html body.ak29-glass.ak33-editorial #content .akaora-pos-frame .bill-checkout .muted{font-size:13px!important;line-height:1.45!important}
 html body.ak29-glass.ak33-editorial #content .akaora-pos-frame :is(.cartline b,.pos-product-card b){font-size:15px!important}
}
