#crmMobileNavigation,#crmMobileShade{display:none}
@media screen and (max-width:1024px){
 html:root{--crm-ui-scale:1!important;--crm-phone-list-width:100%;width:100%!important;height:100%!important;transform:none!important;zoom:1!important;overflow:clip!important/* 13.10 (sesja L): clip — strony nie przewija scrollIntoView */}
 html body{height:100dvh!important;min-width:0!important;overflow:clip!important;font-size:var(--fs-xl,17px)}
 html body .app{display:block!important;height:100dvh!important;min-height:0!important;padding:0!important;grid-template-columns:1fr!important}
 html body .shell{display:flex!important;flex-direction:column!important;height:100dvh!important;min-width:0!important;overflow:hidden!important;padding-bottom:calc(60px + env(safe-area-inset-bottom))!important;box-sizing:border-box}
 html body .topbar{flex:0 0 auto!important;display:flex!important;flex-wrap:wrap!important;gap:6px!important;min-height:56px!important;height:auto!important;padding:calc(7px + env(safe-area-inset-top)) 10px 7px!important;position:relative!important}
 html body .topbar .breadcrumb{flex:1!important;min-width:0!important;font-size:var(--fs-lg,14px)!important;gap:5px!important;white-space:nowrap!important;overflow:hidden}
 html body .topbar .breadcrumb>.icon:not(.sales-title-phone){display:none}
 html body #crmGlobalToolbar{gap:8px!important;margin:0!important;flex:0 0 auto!important;max-width:100%!important;flex-wrap:wrap!important}
 html body #crmGlobalToolbar :is(#myWorkSchedule,.global-ai-trigger,.office-mini-call,.global-office-trigger,.phone-theme-switch,.user),html body .topbar>.search{display:none!important}
 html body .phone-role-picker{order:100!important;width:100%!important;margin:0!important}
 html body .phone-role-picker select{max-width:100%!important;width:100%!important;min-height:40px!important;font-size:var(--fs-lg,14px)!important}
 html body .topbar #mobileMenu{display:none!important}
 html body .page{flex:1!important;min-height:0!important;min-width:0!important;width:100%!important;max-width:none!important;padding:8px!important;overflow:auto!important;box-sizing:border-box}
 html body #sidebar{position:fixed!important;inset:0 auto 0 0!important;width:min(310px,86vw)!important;height:100dvh!important;z-index:1900!important;transform:translateX(-105%)!important;background:var(--panel,#17191c)!important;overflow:auto!important;padding-bottom:env(safe-area-inset-bottom)!important;box-sizing:border-box}
 html body #sidebar.open{transform:translateX(0)!important}
 html body #sidebar :is(.nav-item,.nav-label){font-size:var(--fs-lg,14px)!important;min-height:44px!important;white-space:normal!important;justify-content:flex-start!important}
 html body #sidebar .brand{display:flex!important}
 html body #sidebar .collapse{display:none!important}
 html body #crmMobileShade:not([hidden]){display:block;position:fixed;inset:0;background:#0008;border:0;z-index:1800}
 html body #crmMobileNavigation:not([hidden]){display:flex;position:fixed;inset:auto 0 0;min-height:60px;padding:4px 6px calc(4px + env(safe-area-inset-bottom));z-index:1700;box-sizing:border-box;background:var(--panel,#17191c);border-top:1px solid var(--border,#34373b);gap:4px}
 #crmMobileNavigation button{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:48px;padding:4px;border:0;border-radius:8px;background:transparent;color:var(--muted,#a7aeb8);font-family:inherit;font-size:var(--fs-sm,12.5px);font-weight:var(--fw-s,600);line-height:1.2}
 #crmMobileNavigation button[aria-current=true]{color:#00a8f3;background:color-mix(in srgb,#00a8f3 10%,transparent)}
 #crmMobileNavigation button[hidden]{display:none}#crmMobileNavigation .icon{width:21px;height:21px}
 html body:is(.crm-mobile-popup,.crm-mobile-keyboard) #crmMobileNavigation{display:none!important}
 html body #myClients{height:100%!important;min-height:0!important;overflow:hidden!important;padding:0!important}
 html body #myClients .mc-grid.has-detail{display:flex!important;flex-direction:column!important;height:100%!important;min-height:0!important;gap:0!important}
 html body[data-mobile-scope=sales][data-mobile-pane=list] #myClients #mcDetail,html body[data-mobile-scope=sales][data-mobile-pane=detail] #myClients .mc-list{display:none!important}
 html body #myClients .mc-list,html body #myClients.mc-shared-phone #mcDetail{width:100%!important;max-height:none!important;height:100%!important;min-height:0!important;flex:1!important;margin:0!important}
 html body #myClients .mc-list .sales-shared-calendar{flex:none!important;max-height:260px!important;overflow:auto!important}
 html body #myClients .sales-client-list{flex:1;min-height:0}
 html body #myClients .mc-list-search input#mcSearch{font-size:var(--fs-xl,17px)!important;height:44px!important;min-height:44px!important}
 html body #myClients .mc-extra-filters>summary{width:44px!important;height:44px!important}
 html body #myClients .sales-list-modes button{min-height:44px!important;font-size:var(--fs-lg,14px)!important}
 html body #myClients .mc-quick-filters button{min-height:44px!important;font-size:var(--fs-lg,14px)!important}
 html.crm-premium-trial[data-theme] body #myClients .mc-grid table.mc-compact-table :is(td,th){font-size:var(--fs-md,13.5px)!important;line-height:18px!important;padding:10px 6px!important}
 html body :is(.workspace,#workspaceScroll,.phone-layout){min-width:0!important;width:100%!important;max-width:none!important}
 html body #workspaceScroll{padding:10px!important;overflow:auto!important}
 html body .workflow{display:flex!important;overflow-x:auto!important;gap:4px!important;scrollbar-width:thin!important;padding:6px!important;min-height:50px!important}
 html body .workflow .flow-step{flex:0 0 auto!important;min-width:104px!important;min-height:42px!important;font-size:var(--fs-md,13.5px)!important;padding:6px 9px!important}
 html body .crm-client-identity{padding:12px!important}
 html body .crm-client-identity .client-summary-line{display:flex!important;align-items:flex-start!important;flex-wrap:wrap!important;gap:8px!important}
 html body .crm-person-name{font-size:var(--fs-2xl,22px)!important;line-height:1.25!important}
 html body .crm-company-line{white-space:normal!important;flex-wrap:wrap!important;gap:6px!important;font-size:var(--fs-lg,14px)!important}
 html body .crm-client-identity .client-contact{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;width:100%!important;min-width:0!important}
 html body .crm-client-identity .client-contact>*{min-width:0!important;overflow-wrap:anywhere}
 html body .crm-client-identity .crm-header-facts{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;white-space:normal!important}
 html body .crm-header-facts>div{padding:0!important;border:0!important;min-width:0!important;flex-wrap:wrap!important;overflow-wrap:anywhere}
 html body .crm-header-facts .crm-header-appointment{grid-column:1/-1!important}
 html body .crm-company-editor .company-edit-fields{grid-template-columns:1fr!important}
 html body :is(input,select,textarea){font-size:var(--fs-xl,17px)!important;max-width:100%;box-sizing:border-box}
 html body :is(button.btn,button.mc-btn,button.icon-btn){min-height:44px!important;white-space:normal!important}
 html body :is(.section-grid,.closing-grid,.sales-prep-grid,.call-grid,.call-columns,.focus-grid,.profile-bottom-grid,.profile-main-grid,.ac-two,.ac-management,.ac-entity-top,.ac-contact-cards){grid-template-columns:minmax(0,1fr)!important;gap:12px!important}
 html body :is(.call-identity,.call-left,.call-right,.call-main,.focus-wrap,.live-advisor-rail){min-width:0!important;width:100%!important;max-width:none!important;height:auto!important;max-height:none!important}
 html body #callMode{padding:0!important;inset:0!important;height:100dvh!important;overflow:auto!important}
 html body #callMode .call-shell{width:100%!important;max-width:none!important;height:auto!important;min-height:100dvh!important;display:flex!important;flex-direction:column!important;border-radius:0!important}
 html body :is(.call-left-scroll,.call-right-scroll){height:auto!important;max-height:none!important;overflow:visible!important}
 html body :is(.call-footer,.call-bottom,.call-dock,.bottom-dock){gap:6px!important;padding:8px!important;flex-wrap:wrap!important;min-width:0!important}
 html body .bottom-dock{position:static!important;flex-shrink:0!important}
 html body .bottom-dock>.dock-label{display:none!important}
 html body :is(.overlay .modal,dialog){width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important;max-height:calc(100dvh - 24px)!important;margin:auto!important;padding:12px!important;box-sizing:border-box;overflow:auto!important;scale:1!important}
 html body .overlay{padding:8px!important;box-sizing:border-box}
 html body :is(.modal-body,.modal-content){padding:10px!important;max-width:100%!important}
 html body :is(#officeWorkspace,#newFirmWorkspace){height:100%!important;min-height:0!important;padding:0!important;overflow:auto!important}
 html body :is(.ops-grid,.nf-layout){display:block!important;height:100%!important;min-height:0!important}
 html body[data-mobile-pane=list] :is(.office-intake-detail,.nf-detail),html body[data-mobile-pane=detail] :is(.office-intake-list,.nf-list,.office-intake-toolbar){display:none!important}
 html body :is(.office-intake-list,.nf-list,.nf-list-items,.office-intake-detail,.nf-detail){width:100%!important;max-height:none!important;height:auto!important;position:static!important;overflow:visible!important}
 html body :is(.office-intake-toolbar,.nf-toolbar,.ac-client-facts,.ac-form-grid){display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important}
 html body :is(.office-intake-row,.nf-client-row){min-height:64px!important;white-space:normal!important}
 html body :is(#knowledgeWorkspace,#academyWorkspace,#administrationWorkspace,#myProfileWorkspace,#accountantWorkspace){max-width:100%!important;width:100%!important;min-width:0!important;margin:0!important;padding:8px!important;box-sizing:border-box}
 html body :is(#knowledgeWorkspace,#academyWorkspace) iframe{width:100%!important;height:100%!important;min-height:65dvh!important}
 html body .mx-layout{grid-template-columns:1fr!important;height:auto!important}
 html body .mx-list-pane{max-height:220px!important;overflow:auto!important}
 html body .mx-context{max-height:none!important;overflow:visible!important;border-left:0!important}
 html body .mx-thread{min-height:360px!important}.mx-messages{max-height:45dvh!important}
 html body :is(.mx-thread-head,.mx-compose-actions,.mx-client-progress){flex-wrap:wrap!important;gap:6px!important}
 html body :is(.profile-hero,.profile-identity,.ac-profile){flex-wrap:wrap!important;gap:12px!important}
 html body :is(.profile-stats,.stats-grid,.ops-kpis,.command-kpis){grid-template-columns:1fr 1fr!important}
 html body :is(.ac-documents,.ac-entity-top,.profile-contact-grid){grid-template-columns:1fr!important}
 html body #crmStartupStatus .crm-startup-brand{width:min(340px,84vw)!important}
 html body>.crm-bug-button{bottom:calc(70px + env(safe-area-inset-bottom))!important;right:8px!important}
 html body #callMode.open{display:flex!important;flex-direction:column!important;gap:0!important;z-index:2000!important}
 html body #callMode :is(.call-left,.call-main){flex:none!important;min-height:0!important;overflow:visible!important;padding:12px!important;box-sizing:border-box}
 html body #callMode .call-detail-scroll{overflow:visible!important;height:auto!important;max-height:none!important}
 html body #callMode .meet-video-panel{width:100%!important;max-height:240px!important;box-sizing:border-box;min-width:0!important}
 html body #callMode :is(.audit-progress-top,.call-identity){position:static!important}
 html body #callMode :is(.focus-row,.company-quote-grid,.script-columns,.prep-tools,.intel-strip){grid-template-columns:minmax(0,1fr)!important}
 html body #callMode :is(.call-end,.call-hangup){min-height:48px!important}
 html body .workspace{min-height:0!important;height:100%!important;display:flex!important;flex-direction:column!important}
 html body #workspaceScroll{flex:1!important;min-height:0!important}
 html body [hidden]{display:none!important}
}

/* Shared phone shell takes precedence over desktop focus/preview layouts. */
#crmMobileClientViews,#crmMobileMessageViews{display:none}
@media screen and (max-width:1024px){
 html:root body[data-mobile-pane] :is(.app,.shell){width:100%!important;max-width:100%!important;margin:0!important;min-height:0!important;height:100dvh!important;box-sizing:border-box!important}
 html:root body[data-mobile-pane] .app{display:block!important}
 html:root body[data-mobile-pane] .shell{display:flex!important;flex-direction:column!important;padding:0 0 calc(64px + env(safe-area-inset-bottom))!important;overflow:hidden!important}
 html:root body[data-mobile-pane] #sidebar{position:fixed!important;inset:0 auto 0 0!important;width:min(310px,86vw)!important;height:100dvh!important;transform:translateX(-105%)!important;z-index:1900!important}
 html:root body[data-mobile-pane] #sidebar.open{transform:translateX(0)!important}
 html:root body[data-mobile-pane] #sidebar .nav-item:not([hidden]){font-size:var(--fs-lg,14px)!important;--crm-type-body:var(--fs-lg,14px)!important;gap:10px!important;justify-content:flex-start!important;padding:8px 12px!important;height:auto!important}
 html:root body[data-mobile-pane] #sidebar .nav-item span:not([hidden]),html:root body[data-mobile-pane] #sidebar .nav-label:not([hidden]){display:inline!important;font-size:var(--fs-lg,14px)!important}
 html:root body[data-mobile-pane] #crmMobileNavigation:not([hidden]){display:flex!important;z-index:1700!important;height:calc(64px + env(safe-area-inset-bottom))!important}
 html:root body[data-mobile-pane] :is(#crmMobileClientViews,#crmMobileMessageViews):not([hidden]){display:flex!important;flex:0 0 auto;gap:6px;padding:6px 8px;background:var(--panel,#17191c);border-bottom:1px solid var(--border,#34373b)}
 #crmMobileClientViews button,#crmMobileMessageViews button{flex:1;min-height:40px;border:1px solid transparent;border-radius:8px;background:transparent;color:var(--muted,#a7aeb8);font:500 13px/1.2 inherit;padding:8px}
 #crmMobileClientViews button[aria-current=true],#crmMobileMessageViews button[aria-current=true]{border-color:var(--border,#3e4854);background:var(--panel-2,#252a31);color:var(--text,#e9edf2)}
 html:root body[data-mobile-pane] :is(#knowledgeWorkspace,#academyWorkspace):not([hidden]){position:relative!important;inset:auto!important;flex:1 1 0!important;min-height:0!important;height:0!important;width:100%!important;padding:0!important;overflow:hidden!important}
 html:root body[data-mobile-pane] #academyWorkspace .academy-frame-wrap{flex:1!important;min-height:0!important;height:100%!important;overflow:hidden!important}
 html:root body[data-mobile-pane] :is(#knowledgeWorkspace,#academyWorkspace) iframe{display:block!important;height:100%!important;min-height:0!important;width:100%!important;max-width:100%!important;border:0!important;zoom:1!important;transform:none!important}
 html:root body[data-mobile-pane] :is(#myProfileWorkspace,#commissionWorkspace,#accountantWorkspace,#administrationWorkspace,#commandWorkspace){flex:1 1 0!important;min-height:0!important;height:auto!important;overflow:auto!important;max-width:100%!important;box-sizing:border-box!important}
 html:root body[data-mobile-pane] .academy-control-wrap{padding:10px!important}
 html:root body[data-mobile-pane] .academy-command .academy-tabs{display:flex!important;overflow-x:auto!important;flex-wrap:nowrap!important}
 html:root body[data-mobile-pane] .academy-command .academy-tabs button{flex:0 0 145px!important}
 html:root body[data-mobile-pane] .academy-command :is(.academy-command-metrics,.academy-person-metrics){grid-template-columns:repeat(2,minmax(0,1fr))!important}
 html:root body[data-mobile-pane] #bpxsMessenger[open]{display:flex!important;flex-direction:column!important;position:fixed!important;inset:0!important;width:100%!important;max-width:100%!important;height:100dvh!important;max-height:100dvh!important;margin:0!important;padding:0 0 calc(64px + env(safe-area-inset-bottom))!important;border:0!important;border-radius:0!important;overflow:hidden!important;box-sizing:border-box!important}
 html:root body[data-mobile-pane] #bpxsMessenger>.mx-top{flex:0 0 auto!important;min-height:52px!important;height:auto!important;padding:8px 12px!important;gap:8px!important}
 html:root body[data-mobile-pane] #bpxsMessenger>.mx-top .mx-demo-label{display:none!important}
 html:root body[data-mobile-pane] #bpxsMessenger .mx-layout{display:flex!important;flex-direction:column!important;flex:1 1 0!important;width:100%!important;height:0!important;min-height:0!important;overflow:hidden!important;gap:0!important}
 html:root body[data-mobile-pane] #bpxsMessenger .mx-layout>:is(.mx-list-pane,.mx-chat,.mx-context){display:none!important;position:relative!important;inset:auto!important;flex:1 1 0!important;width:100%!important;max-width:100%!important;min-width:0!important;height:100%!important;min-height:0!important;max-height:none!important;border:0!important;box-sizing:border-box!important;transform:none!important}
 html:root body[data-mobile-pane] #bpxsMessenger[data-mobile-message=list] .mx-list-pane,html:root body[data-mobile-pane] #bpxsMessenger[data-mobile-message=chat] .mx-chat{display:flex!important;flex-direction:column!important;overflow:hidden!important}
 html:root body[data-mobile-pane] #bpxsMessenger[data-mobile-message=context] .mx-context{display:block!important;overflow:auto!important;padding:12px!important}
 html:root body[data-mobile-pane] #bpxsMessenger #mxList{flex:1!important;min-height:0!important;overflow:auto!important}
 html:root body[data-mobile-pane] #bpxsMessenger .mx-list-pane>:not(#mxList){flex-shrink:0!important}
 html:root body[data-mobile-pane] #bpxsMessenger .mx-chat-head{height:auto!important;min-height:56px!important;padding:8px!important;flex-wrap:wrap!important;gap:6px!important}
 html:root body[data-mobile-pane] #bpxsMessenger :is(.mx-chat-head,.mx-room-nav,.mx-composer){flex:0 0 auto!important;min-width:0!important}
 html:root body[data-mobile-pane] #bpxsMessenger .mx-history{flex:1 1 0!important;min-height:60px!important;max-height:none!important;overflow:auto!important;padding:10px!important}
 html:root body[data-mobile-pane] #bpxsMessenger .mx-composer{padding:8px!important;max-height:48dvh!important;overflow:auto!important}
 html:root body[data-mobile-pane] #bpxsMessenger #mxBody{height:86px!important;min-height:70px!important;max-height:150px!important}
 html:root body[data-mobile-pane] #bpxsMessenger :is(.mx-compose-actions,.mx-chat-actions,.mx-client-progress,.mx-room-nav,.mx-send-row){flex-wrap:wrap!important;gap:6px!important}
 html:root body[data-mobile-pane] #bpxsMessenger .mx-status-buttons{display:flex!important;flex-wrap:nowrap!important;overflow:auto!important}
 html:root body[data-mobile-pane] #bpxsMessenger .mx-status-buttons button{flex:0 0 auto!important}
 html:root body[data-mobile-pane] #bpxsMessenger #crmMobileNavigation{position:absolute!important;bottom:0!important;left:0!important;right:0!important}
 html:root body[data-mobile-pane] #myClients{flex:1 1 0!important;min-height:0!important}
 html:root body[data-mobile-pane] #myClients :is(.mc-grid,.mc-grid.has-detail){height:100%!important;min-height:0!important}
 html:root body[data-mobile-pane] #myClients #mcDetail{min-width:0!important;max-width:100%!important}
 html:root body[data-mobile-pane] #accountantWorkspace .ac-knowledge-frame{width:100%!important;height:calc(100dvh - 200px)!important;min-height:350px!important;max-width:100%!important}
 html:root body[data-mobile-pane] [hidden]{display:none!important}
}
@media screen and (max-width:1024px){
 #crmMobileClientViews button,#crmMobileMessageViews button{font-family:inherit;font-size:var(--fs-md,13.5px);font-weight:var(--fw-s,600);line-height:1.2}
 html:root body[data-mobile-pane] #crmMobileNavigation:not([hidden]){z-index:2500!important}
 html:root body[data-mobile-pane] #sidebar{z-index:4000!important}
 html:root body[data-mobile-pane] #crmMobileShade:not([hidden]){z-index:3900!important}
 html:root body[data-mobile-pane] #callMode.open{bottom:calc(64px + env(safe-area-inset-bottom))!important;height:calc(100dvh - 64px - env(safe-area-inset-bottom))!important}
 /* 07.10 audyt Sprzedaży: handlowiec w powłoce telefonu nie ma już starego dolnego menu — rozmowa na całą wysokość (zostawało 64 px martwego pasa) */
 html:root body.ht-on[data-crm-access-role=partner][data-mobile-pane] #callMode.open{bottom:0!important;height:100dvh!important}
 html:root body[data-mobile-pane] #callMode .call-shell{min-height:100%!important}
 html:root body[data-mobile-pane] #bpxsMessenger .mx-chat-head{display:flex!important}
 html:root body[data-mobile-pane] #bpxsMessenger #mxChatName{overflow-wrap:anywhere!important;min-width:0!important}
}

/* A single compact mobile top row. The full navigation remains in the bottom menu. */
html body #phoneTestToggle{min-width:0!important;padding:3px 9px!important;height:30px!important;min-height:30px!important;font-size:var(--fs-sm,12.5px)!important;line-height:1!important}
@media screen and (max-width:1024px){
 html body .topbar{flex-wrap:nowrap!important;gap:4px!important;min-height:48px!important;padding-inline:6px!important}
 html body .topbar .breadcrumb{font-size:var(--fs-sm,12.5px)!important;gap:3px!important;flex:1 1 auto!important}
 html body #crmGlobalToolbar{flex-wrap:nowrap!important;gap:3px!important;min-width:0!important}
 html body #crmGlobalToolbar #crmViewSwitch>summary{font-size:var(--fs-sm,12.5px)!important;gap:3px!important;padding:5px 6px!important}
 html body #crmGlobalToolbar :is(.global-messages-trigger,.global-notifications-trigger){width:28px!important;min-width:28px!important;padding:4px!important}
 html body .topbar .sales-title-phone{width:16px!important;height:16px!important;flex:none}
 html body .topbar .sales-add-client{width:28px!important;min-width:28px!important;height:30px!important;min-height:30px!important;margin:0!important;padding:0!important}
 html body .topbar .sales-add-client :is(svg,.icon){width:23px!important;height:23px!important}
}

@media screen and (max-width:1024px){
 html body #crmGlobalToolbar .top-actions{flex-wrap:nowrap!important;flex:0 0 auto!important;gap:3px!important}
 html body #crmGlobalToolbar #globalCrmContacts{gap:0!important}
 html body #crmGlobalToolbar :is(#urgentCrmBell,#globalCrmContacts>button:first-child){min-width:28px!important;width:28px!important;height:30px!important;padding:4px!important}
 html body #crmGlobalToolbar #globalCrmContacts .urgent-office-trigger{display:none!important}
 html body #crmGlobalToolbar .breadcrumb #mcNavAdd.sales-add-client{flex:0 0 26px!important;width:26px!important;min-width:26px!important;margin-left:0!important;height:30px!important}
}
@media screen and (max-width:1024px){
 html body #crmGlobalToolbar #crmViewSwitch>summary>span[aria-hidden]{display:none!important}
 html body #crmGlobalToolbar #crmViewSwitch>summary::after{width:7px!important;height:7px!important;margin:0 2px 4px 4px!important}
 html body #crmGlobalToolbar #globalAskAi{padding:4px!important;min-width:26px!important}
 html body #crmGlobalToolbar .breadcrumb{overflow:visible!important;min-width:max-content!important}
}
@media screen and (max-width:360px){
 html body #crmGlobalToolbar #globalAskAi{display:none!important}
}
