.mobile-crm-nav{display:none}.mobile-overview-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:20px}.mobile-overview-head h1{font-size:28px;margin:0 0 6px}.mobile-overview-head p{font-size:13px;color:#64748b;margin:0}.mobile-overview-periods{display:flex;gap:6px;background:#eaf0f5;border-radius:12px;padding:5px;width:max-content;margin-bottom:18px}.mobile-overview-periods button{border:0;border-radius:8px;background:transparent;padding:10px 16px;font:600 13px Arial;cursor:pointer;color:#64748b}.mobile-overview-periods button.active{background:white;color:#007d9f;box-shadow:0 2px 5px #17223310}.mobile-overview-totals{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:20px}.mobile-overview-totals>div{display:grid;gap:8px;padding:20px;border-radius:16px;background:#087fa5;color:white}.mobile-overview-totals span{font-size:13px;opacity:.85}.mobile-overview-totals strong{font-size:28px}.mobile-point-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(290px,1fr));gap:16px}.mobile-point-card{background:white;border:1px solid #e0e8ef;border-radius:16px;padding:20px}.mobile-point-heading{display:flex;align-items:flex-start;gap:10px;justify-content:space-between;margin-bottom:22px}.mobile-point-heading h2{font-size:18px;margin:0;overflow-wrap:anywhere}.mobile-point-state{font-size:10px;border-radius:20px;padding:5px 8px;background:#eef1f4;color:#64748b;white-space:nowrap}.mobile-point-state.enabled{background:#e8f5ee;color:#23794e}.mobile-point-metrics{display:grid;grid-template-columns:1fr 1fr;gap:14px}.mobile-point-metrics>div{display:grid;gap:8px}.mobile-point-metrics>div+div{border-left:1px solid #e5eaf0;padding-left:20px}.mobile-point-metrics span{font-size:12px;color:#64748b}.mobile-point-metrics strong{font-size:25px;letter-spacing:-.5px}.mobile-point-foot{display:flex;justify-content:space-between;gap:12px;border-top:1px solid #edf1f5;padding-top:14px;margin-top:20px;font-size:11px;color:#64748b}.mobile-point-foot b{color:#334155}.mobile-point-empty{font-size:12px;color:#64748b;line-height:1.6}.mobile-company-cash{display:grid;gap:8px;padding:20px;border:1px solid #d6e8ee;border-radius:16px;background:#eef8fa;margin-top:20px}.mobile-company-cash[hidden]{display:none}.mobile-company-cash span{font-size:13px;color:#475569}.mobile-company-cash strong{font-size:26px}.mobile-company-cash small,#view-mobile-overview>[role=status]{font-size:12px;color:#64748b;line-height:1.6}.mobile-crm-nav button:focus-visible,.mobile-overview-periods button:focus-visible{outline:3px solid #0b8eae;outline-offset:2px}
@media(max-width:820px){.mobile-crm-nav:not([hidden]){display:flex;position:fixed;bottom:0;left:0;right:0;z-index:18;background:#fffffffa;border-top:1px solid #e0e7ee;box-shadow:0 -4px 18px #17223308;padding:8px 8px calc(8px + env(safe-area-inset-bottom));backdrop-filter:blur(12px)}.mobile-crm-nav button{flex:1;display:grid;justify-items:center;gap:5px;min-height:48px;border:0;border-radius:10px;padding:5px;background:none;color:#718096;font:500 11px Arial;cursor:pointer}.mobile-crm-nav button.active{color:#007fa7;background:#edf8fc}.mobile-crm-nav svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.content{padding:20px 16px calc(95px + env(safe-area-inset-bottom))}.topbar{height:60px;padding:0 12px;gap:8px}.topbar .icon-button{width:36px;height:36px}.topbar .topbar-actions{gap:6px}.topbar .breadcrumb{flex:1;min-width:0;font-size:14px}.topbar .breadcrumb strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.topbar .session-logout{font-size:12px;padding:8px 10px;white-space:nowrap}.session-user{display:none}.topbar-actions [aria-label="Помощь"]{display:none}.mobile-overview-head{margin-bottom:16px}.mobile-overview-head h1{font-size:24px}.mobile-overview-totals{gap:10px;margin-bottom:16px}.mobile-overview-totals>div{padding:16px}.mobile-overview-totals strong{font-size:25px}.mobile-point-cards{grid-template-columns:1fr;gap:12px}.mobile-point-card{padding:18px}.mobile-overview-head button{font-size:12px;padding:9px 12px}.orders-heading .eyebrow,.orders-heading>div>p:not(.eyebrow){display:none}.orders-heading h1{font-size:24px;margin:0}.orders-heading{gap:16px;margin-bottom:18px}.orders-heading button{font-size:13px;padding:12px}.order-summary-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:0!important;border:0!important;background:none!important;box-shadow:none!important}.order-summary-item{border:0!important;padding:14px 10px!important;border-radius:12px;background:white}.order-summary-item span{font-size:11px}.order-summary-item strong{font-size:20px}.order-summary-item small{font-size:9px}.payment-summary-head{background:white!important;color:#172233!important;padding:16px!important;gap:14px}.payment-summary-head h2{font-size:18px}.payment-summary-head .section-kicker{color:#64748b;font-size:10px}.payment-periods{background:#edf2f6!important;width:100%;display:flex}.payment-periods button{font-size:11px;padding:9px 8px;flex:1;white-space:nowrap}.payment-summary-grid .payment-summary-item{padding:12px!important}.payment-summary-item span{font-size:11px}.payment-summary-item strong{font-size:18px}.mobile-overview-periods [hidden]{display:none}.mobile-overview-head~[role=status]{margin-bottom:0}}
@media(max-width:820px){.sidebar:not(.open){box-shadow:none}.topbar{height:auto;min-height:60px;padding:10px 12px;flex-wrap:wrap;box-sizing:border-box}.topbar>select{order:5;flex:1 1 100%;min-width:0;max-width:100%;height:38px}.topbar>.secondary-button:not(.session-logout){order:6;font-size:12px;padding:8px 10px}}

/* Intrinsic widths of selects and tab labels must not expand the viewport.
   Wide records scroll in their own table panels, not in the whole page. */
@media(max-width:820px){
  .workspace,.content,.view,.view>*,.panel,.field,.field-row>*{min-width:0}
  .field input,.field select,.field textarea,.toolbar select{min-width:0;max-width:100%}
  .page-heading h1{font-size:26px;line-height:1.2;overflow-wrap:anywhere}
  .page-heading p:not(.eyebrow){font-size:14px;line-height:1.5}
  .page-heading button,.journal-actions button,.modal-actions button{white-space:normal;overflow-wrap:anywhere}
  .warehouse-context{grid-template-columns:minmax(0,1fr);gap:16px}
  .warehouse-context>*{min-width:0;max-width:100%}
  .warehouse-unit-tabs{flex-wrap:wrap;max-width:100%;overflow:visible}
  .warehouse-unit-tabs button{white-space:normal;max-width:100%;min-height:40px;flex:1 1 130px}
  .warehouse-summary-card{min-height:0;padding:16px}
  .warehouse-summary-card strong{font-size:24px}
  .warehouse-summary-card small{font-size:12px;line-height:1.4}
  .warehouse-panel-head{flex-wrap:wrap;padding:16px}
  .warehouse-panel-head>*{min-width:0;max-width:100%}
  .warehouse-stock-panel,.warehouse-journal-scroll,.table-panel,.journal-table-wrap,.invoice-table-wrap{min-width:0;max-width:100%;overflow-x:auto}
  .catalog-workspace,.dictionary-workspace{grid-template-columns:minmax(0,1fr)}
  .catalog-hierarchy>div{grid-template-columns:minmax(0,1fr)}
  .catalog-hierarchy .segmented{min-width:0;max-width:100%}
  .catalog-workspace>*,.dictionary-workspace>*,.order-workspace>*,.finance-main-grid>*,.statistics-main-grid>*{min-width:0;max-width:100%}
  .toolbar{flex-wrap:wrap}
  .toolbar>*{min-width:0;max-width:100%}
  .toolbar select{min-width:0}
  .form-panel,.journal-panel{padding:16px}
  .field input,.field select,.field textarea{font-size:16px;min-height:44px}
  dialog{max-width:calc(100vw - 24px);box-sizing:border-box}
  dialog .field-row,dialog .two-column{grid-template-columns:minmax(0,1fr)}
  dialog .modal-actions{flex-wrap:wrap}
  .invoice-pick-split{grid-template-columns:minmax(0,1fr);max-height:50dvh}
  .invoice-pick-categories{flex-direction:row;overflow-x:auto;border-right:0;border-bottom:1px solid #dbe3ed;min-width:0}
  .invoice-pick-categories button{flex:0 0 auto;max-width:220px;white-space:normal}
  .invoice-pick-entry>*{min-width:0;max-width:100%}
  .invoice-payment-summary{grid-template-columns:minmax(0,1fr)}
  .statistics-range{flex-wrap:wrap}
  .statistics-range .field{min-width:0;flex:1 1 140px}
  .reports-heading,.reports-table-toolbar{flex-wrap:wrap}
  .reports-heading>*{min-width:0;max-width:100%}
  .reports-actions{width:100%}
  .sites-grid{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:420px){
  .warehouse-summary{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .warehouse-summary-card span{font-size:11px}
  .warehouse-summary-card strong{font-size:22px}
  .warehouse-summary-card small{font-size:11px}
  .order-summary-strip{grid-template-columns:repeat(2,minmax(0,1fr))}
}
