/* Last mobile overrides. Keep this file linked after fixes.css. */
@media (max-width:768px){
  body:has(.sidebar.open) .order-footer-bar,
  body:has(.sidebar.open) .pos-cart,
  body:has(.sidebar.open) .pos-mobile-cart-bar,
  body:has(.sidebar.open) .pos-mobile-cart-backdrop,
  body:has(.sidebar.open) .pos-mobile-top-cart,
  body:has(.sidebar.open) .mob-fab,
  body:has(#sidebar.open) .order-footer-bar,
  body:has(#sidebar.open) .pos-cart,
  body:has(#sidebar.open) .pos-mobile-cart-bar,
  body:has(#sidebar.open) .pos-mobile-cart-backdrop,
  body:has(#sidebar.open) .pos-mobile-top-cart,
  body:has(#sidebar.open) .mob-fab{
    display:none !important;
    visibility:hidden !important;
    opacity:0 !important;
    pointer-events:none !important;
    transform:translateY(calc(120% + 80px)) !important;
    z-index:0 !important;
  }

  .order-edit-compact,
  .order-edit-compact *{
    box-sizing:border-box !important;
  }

  .order-edit-compact .order-edit-main,
  .order-edit-compact #oeTabContent2,
  .order-edit-compact #oeTabContent2 .card{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    overflow-x:hidden !important;
  }

  .order-edit-compact #oeTabContent2 .card > div[style*="justify-content:space-between"]{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) auto !important;
    align-items:center !important;
    gap:8px !important;
    width:100% !important;
    max-width:100% !important;
  }

  .order-edit-compact #oeTabContent2 .card > div[style*="justify-content:space-between"] > *{
    min-width:0 !important;
  }

  .order-edit-compact #oeTabContent2 .card > div[style*="justify-content:space-between"] .btn2{
    justify-self:end !important;
    max-width:44vw !important;
    min-width:0 !important;
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
  }

  .order-edit-compact #oeTabContent2 .card > div[style*="flex-wrap:wrap"]{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:8px !important;
  }

  .order-edit-compact #oeTabContent2 .card > div[style*="flex-wrap:wrap"] > div[style*="min-width:100px"]{
    min-width:0 !important;
    width:100% !important;
    max-width:100% !important;
    overflow:hidden !important;
  }

  .order-edit-compact #oeTabContent2 .card > div[style*="flex-wrap:wrap"] > div[style*="min-width:100px"]:nth-child(3){
    grid-column:1 / -1 !important;
  }

  .order-edit-compact #oeTabContent2 .card > div[style*="flex-wrap:wrap"] > div[style*="min-width:100px"] .small,
  .order-edit-compact #oeTabContent2 .card > div[style*="flex-wrap:wrap"] > div[style*="min-width:100px"] div{
    max-width:100% !important;
    white-space:normal !important;
    overflow-wrap:anywhere !important;
  }

  .order-edit-compact #oeTabContent2 div[onclick^="_oeEditWork"],
  .order-edit-compact #oeTabContent2 div[onclick^="_oeEditPart"]{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    padding:8px 34px 8px 8px !important;
    overflow:hidden !important;
  }

  .order-edit-compact #oeTabContent2 div[onclick^="_oeEditWork"] > div:first-child,
  .order-edit-compact #oeTabContent2 div[onclick^="_oeEditPart"] > div:first-child{
    display:grid !important;
    grid-template-columns:minmax(0,1fr) auto !important;
    align-items:start !important;
    gap:8px !important;
    max-width:100% !important;
  }

  .order-edit-compact #oeTabContent2 div[onclick^="_oeEditWork"] > div:first-child > div,
  .order-edit-compact #oeTabContent2 div[onclick^="_oeEditPart"] > div:first-child > div{
    min-width:0 !important;
    max-width:100% !important;
    overflow:hidden !important;
  }

  .order-edit-compact #oeTabContent2 div[onclick^="_oeEditWork"] b,
  .order-edit-compact #oeTabContent2 div[onclick^="_oeEditPart"] b{
    overflow-wrap:anywhere !important;
    word-break:break-word !important;
  }

  .order-edit-compact #oeTabContent2 div[onclick^="_oeEditWork"] > div:first-child > b,
  .order-edit-compact #oeTabContent2 div[onclick^="_oeEditPart"] > div:first-child > b{
    justify-self:end !important;
    max-width:32vw !important;
    margin-left:0 !important;
    text-align:right !important;
    white-space:normal !important;
    overflow-wrap:normal !important;
    word-break:normal !important;
  }

  .order-edit-compact #oeTabContent2 div[onclick^="_oeEditWork"] > div:nth-child(2),
  .order-edit-compact #oeTabContent2 div[onclick^="_oeEditPart"] > div:nth-child(2){
    flex-wrap:wrap !important;
    gap:4px 8px !important;
    min-width:0 !important;
    max-width:100% !important;
  }

  .order-edit-compact #oeTabContent2 .oe-tbl-del{
    width:28px !important;
    height:28px !important;
    min-width:28px !important;
    max-width:28px !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    padding:0 !important;
  }

  .order-edit-compact #oeTabContent2 .card > div[style*="text-align:right"]{
    width:100% !important;
    max-width:100% !important;
    padding-right:0 !important;
    white-space:normal !important;
    overflow-wrap:anywhere !important;
  }

  .order-edit-compact #oeTabContent2 .card[style*="rgba(16,185,129"] > div,
  .order-edit-compact #oeTabContent2 .card[style*="rgba(239,68,68"] > div{
    min-width:0 !important;
    max-width:100% !important;
    gap:8px !important;
  }

  .order-edit-compact #oeTabContent2 .card[style*="rgba(16,185,129"] > div[style*="justify-content:space-between"],
  .order-edit-compact #oeTabContent2 .card[style*="rgba(239,68,68"] > div[style*="justify-content:space-between"]{
    grid-template-columns:minmax(0,1fr) minmax(0,auto) !important;
  }

  .order-edit-compact #oeTabContent2 .card[style*="rgba(16,185,129"] span,
  .order-edit-compact #oeTabContent2 .card[style*="rgba(239,68,68"] span{
    min-width:0 !important;
    max-width:100% !important;
    white-space:normal !important;
    overflow-wrap:anywhere !important;
  }
}

/* Whole mobile overflow audit guard. Keep after page-specific mobile rules. */
@media (max-width:768px){
  html,
  body,
  #appRoot,
  .main,
  .content,
  #mainContent{
    max-width:100vw !important;
    min-width:0 !important;
    box-sizing:border-box !important;
    overflow-x:hidden !important;
    overscroll-behavior-x:none !important;
  }

  body.mobile-nav-open .order-footer-bar,
  body.mobile-nav-open .pos-cart,
  body.mobile-nav-open .pos-mobile-cart-bar,
  body.mobile-nav-open .pos-mobile-cart-backdrop,
  body.mobile-nav-open .pos-mobile-top-cart,
  body.mobile-nav-open .pos-mobile-total-panel,
  body.mobile-nav-open .pos-drawer,
  body.mobile-nav-open .pos-drawer-backdrop,
  body.mobile-nav-open .order-drawer,
  body.mobile-nav-open .order-drawer-backdrop,
  body.mobile-nav-open .sales-history-panel,
  html.mobile-nav-open body .order-footer-bar,
  html.mobile-nav-open body .pos-cart,
  html.mobile-nav-open body .pos-mobile-cart-bar,
  html.mobile-nav-open body .pos-mobile-cart-backdrop,
  html.mobile-nav-open body .pos-mobile-top-cart,
  html.mobile-nav-open body .pos-mobile-total-panel,
  html.mobile-nav-open body .pos-drawer,
  html.mobile-nav-open body .pos-drawer-backdrop,
  html.mobile-nav-open body .order-drawer,
  html.mobile-nav-open body .order-drawer-backdrop,
  html.mobile-nav-open body .sales-history-panel,
  body:has(.sidebar.open) .order-footer-bar,
  body:has(.sidebar.open) .pos-cart,
  body:has(.sidebar.open) .pos-mobile-cart-bar,
  body:has(.sidebar.open) .pos-mobile-cart-backdrop,
  body:has(.sidebar.open) .pos-mobile-top-cart,
  body:has(.sidebar.open) .pos-mobile-total-panel,
  body:has(.sidebar.open) .pos-drawer,
  body:has(.sidebar.open) .pos-drawer-backdrop,
  body:has(.sidebar.open) .order-drawer,
  body:has(.sidebar.open) .order-drawer-backdrop,
  body:has(.sidebar.open) .sales-history-panel,
  body:has(#sidebar.open) .pos-mobile-total-panel,
  body:has(#sidebar.open) .pos-drawer,
  body:has(#sidebar.open) .pos-drawer-backdrop,
  body:has(#sidebar.open) .order-drawer,
  body:has(#sidebar.open) .order-drawer-backdrop,
  body:has(#sidebar.open) .sales-history-panel{
    display:none !important;
    visibility:hidden !important;
    opacity:0 !important;
    pointer-events:none !important;
    transform:translateY(calc(120% + 80px)) !important;
    z-index:0 !important;
  }

  .content > *,
  #mainContent > *,
  #mainContent .card,
  #mainContent .panel,
  #mainContent .section,
  #mainContent .list-scroll,
  #mainContent .table-wrap,
  #mainContent .orders-table-scroll,
  #mainContent .works-table-wrap,
  #mainContent .invoice-table-card,
  #mainContent .debts-table-wrap,
  #mainContent .cf-table-wrap,
  #mainContent .settings-panel,
  #mainContent .settings-card,
  #mainContent .modal-box,
  .modal-box,
  .drawer,
  .pos-drawer,
  .order-drawer,
  .staff-slide,
  .crm-chat-drawer{
    max-width:100% !important;
    min-width:0 !important;
    box-sizing:border-box !important;
  }

  #mainContent [style*="display:flex"] > *,
  #mainContent [style*="display: flex"] > *,
  #mainContent [style*="display:grid"] > *,
  #mainContent [style*="display: grid"] > *,
  .modal-box [style*="display:flex"] > *,
  .modal-box [style*="display: flex"] > *,
  .modal-box [style*="display:grid"] > *,
  .modal-box [style*="display: grid"] > *{
    min-width:0 !important;
  }

  #mainContent [style*="grid-template-columns"],
  .modal-box [style*="grid-template-columns"]{
    max-width:100% !important;
  }

  #mainContent .btn,
  #mainContent .btn2,
  #mainContent button,
  .modal-box .btn,
  .modal-box .btn2,
  .modal-box button{
    max-width:100% !important;
    min-width:0 !important;
    box-sizing:border-box !important;
  }

  #mainContent input,
  #mainContent select,
  #mainContent textarea,
  .modal-box input,
  .modal-box select,
  .modal-box textarea{
    max-width:100% !important;
    min-width:0 !important;
    box-sizing:border-box !important;
  }

  #mainContent img,
  #mainContent video,
  #mainContent canvas,
  .modal-box img,
  .modal-box video,
  .modal-box canvas{
    max-width:100% !important;
    height:auto;
  }

  .dash-kpi,
  .debts-kpis,
  .invoice-kpis,
  .cf-kpis,
  .stocktake-result-kpis,
  .settings-grid,
  .analytics-grid{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }

  .dash-kpi-value,
  .debts-kpi-value,
  .invoice-kpi b,
  .invoice-kpi div,
  .invoice-kpi span,
  .cf-kpi-value,
  .cf-kpi-sub,
  .card b,
  .card strong{
    max-width:100% !important;
    overflow-wrap:anywhere !important;
  }

  .modal-box .pf-foot,
  .modal-box .modal-footer,
  .modal-box .modal-actions,
  #mainContent .payroll-actions,
  #mainContent .payroll-row-actions{
    max-width:100% !important;
    min-width:0 !important;
    flex-wrap:wrap !important;
  }

  .modal-box .pf-foot > *,
  .modal-box .modal-footer > *,
  .modal-box .modal-actions > *,
  #mainContent .payroll-actions > *,
  #mainContent .payroll-row-actions > *{
    min-width:0 !important;
  }

  .mob-cards,
  .mobile-cards,
  .payroll-mobile-cards{
    width:100% !important;
    max-width:100% !important;
    overflow-x:hidden !important;
  }

  /* Mobile pass 2: fixed panels and detail cards must fit the viewport, not
     create a hidden horizontal canvas under the page. */
  .crm-chat-drawer{
    inset:8px !important;
    width:auto !important;
    max-width:calc(100vw - 16px) !important;
    min-width:0 !important;
    border-right:1px solid var(--border) !important;
    border-radius:12px !important;
  }

  .crm-chat-body,
  .crm-chat-main,
  .crm-chat-side,
  .crm-chat-room-head,
  .crm-chat-compose-row{
    min-width:0 !important;
    max-width:100% !important;
  }

  .crm-chat-compose-row{
    grid-template-columns:minmax(0,1fr) 44px auto !important;
  }

  body > div[style*="position:fixed"] > div,
  body > div[style*="position: fixed"] > div,
  #modalRoot > div,
  .modal > div,
  .modal-box,
  .order-drawer,
  .pos-drawer,
  .staff-slide{
    width:min(100%,calc(100vw - 16px)) !important;
    max-width:calc(100vw - 16px) !important;
    min-width:0 !important;
    margin-left:auto !important;
    margin-right:auto !important;
    box-sizing:border-box !important;
  }

  #mainContent .order-edit-main,
  #mainContent .order-detail,
  #mainContent .order-detail-card,
  #mainContent [class*="order"] .card,
  #mainContent [id^="oeTabContent"]{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    overflow-x:hidden !important;
    box-sizing:border-box !important;
  }

  #mainContent [id^="oeTabContent"] .card > div[style*="justify-content:space-between"],
  #mainContent [id^="oeTabContent"] .card > div[style*="justify-content: space-between"]{
    max-width:100% !important;
    min-width:0 !important;
    flex-wrap:wrap !important;
    gap:8px !important;
  }

  #mainContent [id^="oeTabContent"] .card > div[style*="justify-content:space-between"] > *,
  #mainContent [id^="oeTabContent"] .card > div[style*="justify-content: space-between"] > *{
    min-width:0 !important;
    max-width:100% !important;
  }

  #mainContent [id^="oeTabContent"] .card b,
  #mainContent [id^="oeTabContent"] .card strong,
  #mainContent [id^="oeTabContent"] .card span,
  #mainContent [id^="oeTabContent"] .card div{
    overflow-wrap:anywhere !important;
  }

  #mainContent [id^="oeTabContent"] .card .btn,
  #mainContent [id^="oeTabContent"] .card .btn2{
    flex:1 1 auto !important;
  }

  .pos-mobile-cart-bar,
  .pos-mobile-total-panel,
  .order-footer-bar{
    left:0 !important;
    right:0 !important;
    width:auto !important;
    max-width:100vw !important;
    min-width:0 !important;
    box-sizing:border-box !important;
  }

  /* Schedule is the one mobile surface that must keep its own horizontal
     drag. The page stays locked, but the calendar strip remains scrollable. */
  #mainContent .sch-scroll-wrap,
  #mainContent .sch-scroll-wrap.sch-mobile-scroll{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    -webkit-overflow-scrolling:touch !important;
    overscroll-behavior-x:contain !important;
    overscroll-behavior-y:auto !important;
    touch-action:pan-x pan-y !important;
    scrollbar-width:auto !important;
  }

  #mainContent .sch-scroll-wrap .sch-mobile-calendar-card,
  #mainContent .sch-scroll-wrap .sch-table{
    width:max-content !important;
    min-width:max-content !important;
    max-width:none !important;
    overflow:visible !important;
    table-layout:auto !important;
  }

  #mainContent .sch-scroll-wrap .sch-name-col,
  #mainContent .sch-scroll-wrap .sch-name-cell{
    width:var(--sch-name-col) !important;
    min-width:var(--sch-name-col) !important;
    max-width:var(--sch-name-col) !important;
  }

  #mainContent .sch-scroll-wrap .sch-hours-col,
  #mainContent .sch-scroll-wrap .sch-hours-cell{
    width:var(--sch-hours-col) !important;
    min-width:var(--sch-hours-col) !important;
    max-width:var(--sch-hours-col) !important;
  }

  #mainContent .sch-scroll-wrap .sch-day-col,
  #mainContent .sch-scroll-wrap .sch-day-col-week{
    width:var(--sch-day-col) !important;
    min-width:var(--sch-day-col) !important;
    max-width:var(--sch-day-col) !important;
    flex:none !important;
  }

  body.mobile-nav-open .mob-fab,
  html.mobile-nav-open body .mob-fab,
  body:has(.sidebar.open) .mob-fab,
  body:has(#sidebar.open) .mob-fab{
    display:none !important;
    visibility:hidden !important;
    opacity:0 !important;
    pointer-events:none !important;
  }
}

@media (max-width:420px){
  .dash-kpi,
  .debts-kpis,
  .invoice-kpis,
  .cf-kpis,
  .stocktake-result-kpis,
  .settings-grid,
  .analytics-grid{
    grid-template-columns:1fr !important;
  }

  #mainContent .btn,
  #mainContent .btn2,
  .modal-box .btn,
  .modal-box .btn2{
    white-space:normal !important;
  }
}

@media (max-width:768px){
  html.crm-ios-safe-area,
  html.crm-ios-pwa-safe-area,
  html.crm-ios-safe-area body,
  html.crm-ios-pwa-safe-area body{
    min-height:100svh;
    min-height:100dvh;
  }

  html.crm-ios-safe-area body .app,
  html.crm-ios-pwa-safe-area body .app,
  html.crm-ios-safe-area body .main,
  html.crm-ios-pwa-safe-area body .main{
    min-height:100svh !important;
    min-height:100dvh !important;
  }

  .topbar-inner{
    min-width:0 !important;
    gap:6px !important;
  }

  .topbar-inner > div[style*="flex:1"],
  .topbar-inner > div[style*="flex: 1"]{
    display:none !important;
  }

  #burgerBtn,
  #iosPwaBackBtn,
  #shopBell,
  #shopSoundToggle,
  #themeToggleBtn{
    flex:0 0 36px !important;
    width:36px !important;
    min-width:36px !important;
    height:36px !important;
    padding:0 !important;
  }

  #breadcrumb,
  .crumb{
    flex:1 1 auto !important;
    min-width:0 !important;
    overflow:hidden !important;
  }

  #breadcrumb b,
  #breadcrumb span,
  .crumb b,
  .crumb span{
    min-width:0 !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    white-space:nowrap !important;
  }

  .locpill{
    flex:0 1 auto !important;
    min-width:0 !important;
    max-width:min(34vw,128px) !important;
  }

  .locpill .btn,
  .locpill .btn2,
  .locpill button{
    max-width:100% !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    white-space:nowrap !important;
  }
}

@media (max-width:380px){
  #shopSoundToggle,
  #themeToggleBtn{
    display:none !important;
  }

  .locpill{
    max-width:112px !important;
  }
}

@supports (padding: env(safe-area-inset-top)){
  @media (max-width:768px){
    html.crm-ios-pwa-safe-area body .topbar{
      padding-top:max(env(safe-area-inset-top, 0px), 0px) !important;
    }

    html.crm-ios-pwa-safe-area body #mainContent,
    html.crm-ios-pwa-safe-area body .content:not(.page-list){
      padding-bottom:max(18px, calc(18px + env(safe-area-inset-bottom, 0px))) !important;
    }

    html.crm-ios-pwa-safe-area body .content.page-list{
      padding-bottom:max(12px, calc(12px + env(safe-area-inset-bottom, 0px))) !important;
    }

    html.crm-ios-pwa-safe-area body .modal,
    html.crm-ios-pwa-safe-area body #modalRoot > div{
      padding-top:max(8px, env(safe-area-inset-top, 0px)) !important;
      padding-bottom:max(12px, env(safe-area-inset-bottom, 0px)) !important;
    }

    html.crm-ios-pwa-safe-area body .modal-box,
    html.crm-ios-pwa-safe-area body #modalRoot > div > div,
    html.crm-ios-pwa-safe-area body .order-drawer,
    html.crm-ios-pwa-safe-area body .pos-drawer,
    html.crm-ios-pwa-safe-area body .staff-slide{
      max-height:calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 20px) !important;
    }

    html.crm-ios-pwa-safe-area body .order-footer-bar,
    html.crm-ios-pwa-safe-area body .bulk-bar,
    html.crm-ios-pwa-safe-area body .inv-bulk-bar,
    html.crm-ios-pwa-safe-area body .pos-mobile-cart-bar,
    html.crm-ios-pwa-safe-area body .pos-mobile-total-panel{
      padding-bottom:max(10px, calc(10px + env(safe-area-inset-bottom, 0px))) !important;
    }

    html.crm-ios-pwa-safe-area body .mob-fab,
    html.crm-ios-pwa-safe-area body #scrollTopBtn{
      bottom:max(18px, calc(18px + env(safe-area-inset-bottom, 0px))) !important;
    }
  }
}

@media (max-width:768px){#shopBell{align-items:center!important;justify-content:center!important;line-height:1!important;font-size:18px!important}}
@media (max-width:640px){#mainContent .os-shell{padding:10px 8px 18px!important;overflow:hidden!important}#mainContent .os-head,#mainContent .os-wallet,#mainContent .os-card,#mainContent .os-filter,#mainContent .os-command,#mainContent .os-orders-panel{min-width:0!important;max-width:100%!important}#mainContent .os-wallet-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}#mainContent .os-wallet-actions .btn,#mainContent .os-wallet-actions .btn2{width:100%!important;min-width:0!important;min-height:42px!important;height:auto!important;padding:8px 7px!important;line-height:1.15!important;white-space:normal!important;overflow-wrap:anywhere!important;text-align:center!important}#mainContent .os-wallet-actions .btn:first-child{grid-column:1/-1!important}#mainContent .os-group-list{flex-direction:column!important;overflow:visible!important;max-height:none!important;padding-right:0!important}#mainContent .os-group{min-width:0!important;width:100%!important}#mainContent .os-group-main{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important}#mainContent .os-group-main span:first-child{min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}#mainContent .os-group-count{flex:0 0 auto!important}#mainContent .os-command{position:static!important;display:grid!important;grid-template-columns:1fr!important}#mainContent .os-search-wrap,#mainContent .os-command-input,#mainContent .os-select,#mainContent .os-reset-btn{width:100%!important;min-width:0!important}#mainContent .os-card{min-height:0!important}#mainContent .os-card-foot,#mainContent .os-card-actions{width:100%!important}#mainContent .os-card-actions{display:grid!important;grid-template-columns:1fr 1fr!important}#mainContent .os-card-actions .btn,#mainContent .os-card-actions .btn2{min-width:0!important;width:100%!important;white-space:normal!important}#mainContent .os-order-table-wrap{overflow:visible!important}#mainContent .os-order-table{min-width:0!important;width:100%!important;border-collapse:separate!important;border-spacing:0!important}#mainContent .os-order-table thead{display:none!important}#mainContent .os-order-table,#mainContent .os-order-table tbody,#mainContent .os-order-table tr,#mainContent .os-order-table td{display:block!important;width:100%!important}#mainContent .os-order-table tr{border:1px solid var(--border)!important;border-radius:8px!important;background:var(--card)!important;margin:0 0 10px!important;overflow:hidden!important}#mainContent .os-order-table td{border:0!important;border-bottom:1px solid var(--border)!important;display:grid!important;grid-template-columns:minmax(92px,34%) minmax(0,1fr)!important;gap:10px!important;align-items:start!important;padding:9px 10px!important;text-align:left!important;white-space:normal!important;word-break:break-word!important}#mainContent .os-order-table td:last-child{border-bottom:0!important;display:flex!important;justify-content:stretch!important}#mainContent .os-order-table td:last-child .btn2{width:100%!important}#mainContent .os-order-table td::before{color:var(--muted)!important;font-size:12px!important;font-weight:800!important}#mainContent .os-order-table td:nth-child(1)::before{content:"Заказ"}#mainContent .os-order-table td:nth-child(2)::before{content:"Услуга"}#mainContent .os-order-table td:nth-child(3)::before{content:"Данные"}#mainContent .os-order-table td:nth-child(4)::before{content:"Сумма"}#mainContent .os-order-table td:nth-child(5)::before{content:"Статус"}#mainContent .os-order-table td:nth-child(6)::before{content:"";display:none}}

/* Final mobile CRM polish pass: last layer after fixes.css. */
@media (max-width:768px){#mainContent .os-search-ico{left:16px!important;width:22px!important;height:22px!important;z-index:2!important;pointer-events:none!important}#mainContent .os-command-input{padding-left:54px !important;text-indent:0!important}#mainContent .dash-money-total-label,#mainContent .dash-money-total-card>b{white-space:nowrap!important;word-break:normal!important;overflow-wrap:normal!important}#mainContent .wh-selector{flex-wrap:wrap!important;overflow:visible!important}#mainContent .wh-selector > button,#mainContent .wh-selector>.btn2{height:40px!important;min-height:40px!important;padding:0 14px!important;width:auto!important;transform:none!important}#mainContent .inv-mobile-tabs .segbtn,#mainContent .inv-mobile-actions .btn2,#mainContent .inv-mobile-actions button{height:42px!important;min-height:42px!important;line-height:1!important}#mainContent.page-sales [data-sales-action="set-period"]{cursor:pointer!important;z-index:3!important;user-select:none!important}#ordersListContainer .orders-mobile-order-card{padding:10px 12px!important;gap:6px 10px!important}#ordersListContainer .orders-mobile-order-no,#ordersListContainer .orders-mobile-order-price{font-size:17px!important}#ordersListContainer .orders-mobile-order-customer,#ordersListContainer .orders-mobile-order-device,#ordersListContainer .orders-mobile-order-problem{font-size:15px!important;line-height:1.25!important}#ordersListContainer .orders-list-footer{gap:8px!important;padding:8px!important}}

@media (max-width:768px){.main.pos-mode .locpill{display:none!important}.main.pos-mode .pos-cart{visibility:hidden!important;pointer-events:none!important}body.pos-mobile-cart-open .main.pos-mode .pos-cart{visibility:visible!important;pointer-events:auto!important}body.pos-mobile-mode .main.pos-mode .pos-product-item{grid-template-columns:minmax(0,1fr) minmax(82px,max-content)!important}body.pos-mobile-mode .main.pos-mode .pos-product-thumb{display:none!important}body.pos-mobile-mode .main.pos-mode .pos-product-info{grid-column:1!important;min-width:0!important}body.pos-mobile-mode .main.pos-mode .pos-product-name{word-break:normal!important;overflow-wrap:break-word!important}body.pos-mobile-mode .main.pos-mode .pos-product-item>div[style*="text-align:right"]{grid-column:2!important;min-width:82px!important;max-width:116px!important}body.pos-mobile-mode .main.pos-mode .pos-product-price{white-space:nowrap!important;overflow-wrap:normal!important;word-break:normal!important}}
