/* BLUE CARE PWA APP SHELL v1 */
html{background:#071321;-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{min-height:100dvh;overscroll-behavior-y:none;-webkit-tap-highlight-color:transparent}
button,a,input,select,textarea{touch-action:manipulation}
.bc-install-app{position:fixed;left:max(14px,env(safe-area-inset-left));bottom:max(18px,calc(env(safe-area-inset-bottom) + 14px));z-index:350;border:1px solid #ffffff24;background:#071321;color:#fff;border-radius:999px;padding:10px 15px;display:flex;align-items:center;gap:8px;box-shadow:0 16px 38px #0005;font:inherit}.bc-install-app span{display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:#fff;color:#071321;font-weight:900}.bc-install-app b{font-size:12px}

@media (min-width:801px) and (max-width:1100px){
  .bc-app{grid-template-columns:108px minmax(0,1fr)!important}
  .bc-side{padding:14px 9px!important}
  .bc-brand{justify-content:center!important;padding-inline:0!important}
  .bc-brand img{width:58px!important;height:48px!important}
  .bc-brand>div{display:none!important}
  #bcNav{gap:7px!important}
  #bcNav button{min-height:64px;justify-content:center!important;text-align:center!important;flex-direction:column;gap:5px!important;padding:8px 4px!important;font-size:10px!important;line-height:1.2}
  #bcNav button span{width:24px!important;height:24px!important}
  .bc-side-user{font-size:10px!important;padding-inline:2px!important}
  .bc-top{padding-inline:18px!important}
  #bcView{padding:16px!important}
  .bc-modal-sheet{width:min(760px,94vw)!important}
  .bc-pos-reference{grid-template-columns:minmax(220px,.8fr) minmax(360px,1.3fr)!important}
  .bc-pos-reference>*:last-child{grid-column:1/-1}
}

@media (max-width:800px){
  :root{--bc-mobile-nav:76px}
  html,body,#bcRoot,.bc-app,.bc-main,#bcView{max-width:100%!important;overflow-x:clip!important}
  #bcView>*,.bc-card,.bc-dash-smart,.bc-smart-hero,.bc-smart-main,.bc-smart-mini-grid,.bc-pos,.bc-pos-reference{min-width:0!important;max-width:100%!important}
  body{background:#f5f7fa!important}
  .bc-app{display:block!important;min-height:100dvh!important;padding-bottom:calc(var(--bc-mobile-nav) + env(safe-area-inset-bottom))!important}
  .bc-main{min-height:100dvh!important}
  .bc-side{position:fixed!important;z-index:90!important;inset:auto 0 0 0!important;width:auto!important;height:calc(var(--bc-mobile-nav) + env(safe-area-inset-bottom))!important;padding:7px max(7px,env(safe-area-inset-right)) env(safe-area-inset-bottom) max(7px,env(safe-area-inset-left))!important;border:0!important;border-top:1px solid #203a50!important;box-shadow:0 -10px 28px #07132122!important;background:#071321ee!important;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}
  .bc-brand,.bc-side-user{display:none!important}
  #bcNav{display:flex!important;align-items:stretch!important;gap:4px!important;overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:none;padding:0!important;overscroll-behavior-x:contain;scroll-snap-type:x proximity;max-width:100%}
  #bcNav::-webkit-scrollbar{display:none}
  #bcNav button{flex:1 0 72px!important;min-width:72px!important;min-height:60px!important;justify-content:center!important;text-align:center!important;flex-direction:column!important;gap:4px!important;border-radius:13px!important;padding:6px 5px!important;font-size:10px!important;line-height:1.05!important;scroll-snap-align:center}
  #bcNav button span{width:24px!important;height:24px!important}
  #bcNav button.active{background:#ffffff14!important;color:#fff!important;box-shadow:inset 0 0 0 1px #ffffff18!important}
  #bcNav button.active span{color:#d9a441!important}
  .bc-top{position:sticky!important;top:0!important;z-index:60!important;height:auto!important;min-height:66px!important;padding:calc(10px + env(safe-area-inset-top)) 14px 10px!important;background:#fffffff2!important;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);align-items:center!important;min-width:0!important}
  .bc-top>div{min-width:0}
  .bc-top h2{font-size:19px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .bc-top small{font-size:11px!important}
  #bcTopActions{gap:6px!important;max-width:58vw;overflow-x:auto;flex-wrap:nowrap!important;scrollbar-width:none;min-width:0}
  #bcTopActions::-webkit-scrollbar{display:none}
  #bcTopActions button{white-space:nowrap;min-height:42px;padding:8px 10px!important;font-size:11px!important}
  #bcView{padding:12px!important;padding-bottom:18px!important}
  .bc-card{border-radius:17px!important;padding:14px!important;margin-bottom:12px!important}
  .bc-smart-hero{grid-template-columns:1fr!important;gap:14px!important;padding:18px!important;overflow:hidden!important}
  .bc-smart-main h2{font-size:27px!important}
  .bc-smart-main p{font-size:13px!important;line-height:1.65!important}
  .bc-smart-mini-grid{grid-template-columns:1fr 1fr!important;width:100%!important}
  button{min-height:42px}
  input,select,textarea{font-size:16px!important}
  .bc-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important}
  .bc-kpi{padding:13px!important;min-width:0!important}
  .bc-kpi b{font-size:19px!important}
  .bc-grid2,.bc-settings-grid{grid-template-columns:1fr!important;gap:11px!important}
  .bc-pos,.bc-pos-reference{grid-template-columns:1fr!important;gap:10px!important}
  .bc-pos-bill,.bc-pos-reference>*{grid-column:auto!important;min-width:0!important}
  .bc-service-grid,.pos-service-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .bc-service,.pos-service{min-height:96px!important;border-radius:14px!important;min-width:0!important}
  .bc-primary-actions{position:sticky;bottom:calc(var(--bc-mobile-nav) + env(safe-area-inset-bottom) + 8px);z-index:30;background:#fff;padding:8px;margin:8px -6px -6px;border-radius:14px;box-shadow:0 -8px 25px #10182812}
  .bc-table-wrap{overflow:auto!important;-webkit-overflow-scrolling:touch;border-radius:14px;max-width:100%!important}
  .bc-table-wrap table{min-width:720px!important}
  .bc-inline{flex-wrap:wrap!important}
  .bc-inline>*{min-width:0}
  .bc-modal{align-items:end!important;padding:0!important;background:#07132188!important}
  .bc-modal-sheet{width:100%!important;max-width:none!important;max-height:calc(94dvh - env(safe-area-inset-top))!important;border-radius:24px 24px 0 0!important;padding:22px 16px calc(18px + env(safe-area-inset-bottom))!important;box-shadow:0 -16px 50px #0003;overflow-x:hidden!important}
  .bc-x{top:12px!important;left:12px!important}
  .bc-toast{left:12px!important;right:12px!important;bottom:calc(var(--bc-mobile-nav) + env(safe-area-inset-bottom) + 12px)!important;text-align:center!important}
  .bc-install-app{bottom:calc(var(--bc-mobile-nav) + env(safe-area-inset-bottom) + 12px)}
}

@media (max-width:560px){
  .bc-login{padding:calc(14px + env(safe-area-inset-top)) 12px calc(14px + env(safe-area-inset-bottom))!important}
  .bc-login-card{width:100%!important;border-radius:22px!important;padding:22px 17px!important}
  .bc-top{display:flex!important}
  #bcTopActions{margin-top:0!important}
  .bc-kpis{grid-template-columns:1fr 1fr!important}
  .bc-service-grid,.pos-service-grid{grid-template-columns:1fr 1fr!important}
  .bc-summary,.pos-summary{font-size:13px}
  .bc-modal-sheet{min-height:100dvh!important;max-height:100dvh!important;border-radius:0!important;padding-top:calc(18px + env(safe-area-inset-top))!important}
  .bc-modal{align-items:stretch!important}
}

@media (max-width:390px){
  .bc-kpis{grid-template-columns:1fr!important}
  .bc-service-grid,.pos-service-grid{grid-template-columns:1fr!important}
  #bcTopActions{max-width:52vw}
}

@media (display-mode:standalone){
  body{user-select:none;-webkit-user-select:none}
  input,textarea{user-select:text;-webkit-user-select:text}
  .bc-top{padding-top:calc(10px + env(safe-area-inset-top))!important}
  .bc-install-app{display:none!important}
}
