/* A single compact navigation header belongs only to the left sales column. */
html body .sales-navigation.panel-head{display:block!important;padding:5px!important;min-height:0!important;border-bottom:1px solid var(--wa-line,var(--border));background:var(--wa-chrome,var(--surface2))}
html body .sales-list-modes{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:4px;width:100%;min-width:0;margin:0;padding:0;box-sizing:border-box}
html body .sales-list-modes button{--crm-type-body:var(--fs-xs,11.5px);font-size:var(--fs-xs,11.5px)!important;line-height:15px!important;padding:5px 6px!important;min-height:38px;min-width:0;border:1px solid transparent;border-radius:6px;color:var(--wa-muted,var(--muted));background:transparent;white-space:normal;cursor:pointer}
html body .sales-list-modes button[aria-pressed=true]{color:var(--wa-ink,var(--text));background:var(--wa-panel,var(--surface));border-color:var(--wa-accent,var(--border));box-shadow:inset 0 -2px var(--wa-accent,var(--blue));font-weight:var(--fw-s,600)}
html body .sales-list-modes button:focus-visible,html body .sales-queue-sources button:focus-visible{outline:2px solid var(--wa-accent,var(--blue));outline-offset:-2px}
html body .sales-queue-sources{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:5px;padding:6px 6px 2px;background:var(--wa-panel,var(--surface))}
html body .sales-queue-sources :is(#ownLeadQueueTab,#batchMode){--crm-type-body:var(--fs-xs,11.5px);display:flex;align-items:center;justify-content:center;gap:5px;width:100%;height:30px;min-height:30px;max-height:none;min-width:0;margin:0;padding:4px 6px!important;box-sizing:border-box;border:1px solid var(--wa-line,var(--border));border-radius:6px;background:transparent;color:var(--wa-muted,var(--muted));font-size:var(--fs-xs,11.5px)!important;line-height:16px!important;white-space:nowrap;cursor:pointer}
html body .sales-queue-sources :is(#ownLeadQueueTab.active,#batchMode.on){color:var(--wa-ink,var(--text));background:var(--wa-chrome,var(--surface2));border-color:var(--wa-accent,var(--border));font-weight:var(--fw-s,600)}
html body .sales-queue-sources #ownLeadQueueTab span{display:inline;margin:0;font-size:var(--fs-xs,11.5px);color:inherit}
html body .queue-panel.sales-queue-panel{grid-template-rows:auto auto minmax(110px,1fr) auto}
html body .queue-panel.sales-queue-panel:has(>.sales-navigation){grid-template-rows:auto auto auto minmax(110px,1fr) auto}
html body #myClients .sales-queue-slot{height:100%;min-height:0}
html body #myClients .sales-queue-slot>.queue-panel{height:100%;max-height:none;min-height:0;width:100%;border:0;border-radius:0;margin:0}
html body #myClients .sales-client-list{min-width:0}
@media(max-width:760px){html body #myClients .sales-queue-slot{height:auto}.sales-queue-slot .queue-list{max-height:320px}}

/* Decorative handset stays after the sales title in both left-list modes. */
html body .sales-title-phone{display:inline-block;vertical-align:-.12em;width:1em;height:1em;margin-left:.4em;color:var(--green,#2FBF87)!important;stroke:currentColor;fill:none;stroke-width:1.8;flex:none}

/* One title in the global breadcrumb; the shared workspace starts directly below. */
html body #myClients.sales-clean-layout>.mc-head{display:none!important;margin:0!important;padding:0!important}
html body #myClients.sales-clean-layout{padding-top:10px!important}
html body .breadcrumb .sales-title-phone{margin-left:0;width:16px;height:16px}

/* Both columns consume the same remaining shell row, at every desktop height. */
@media screen and (min-width:761px){
 html body.mc-open .app{height:calc(100dvh / var(--crm-ui-scale,1));min-height:0}
 html body.mc-open .shell{min-height:0;overflow:hidden;grid-template-rows:auto minmax(0,1fr)}
 html body.mc-open #crmGlobalToolbar{min-height:58px}
 html body #myClients.sales-clean-layout{display:flex;flex-direction:column;min-height:0;height:100%;max-height:none;box-sizing:border-box;overflow:hidden;padding-bottom:10px!important}
 html body #myClients.sales-clean-layout>.mc-grid{flex:1 1 0;min-height:0;height:100%;max-height:none;grid-template-rows:minmax(0,1fr);align-items:stretch}
 html body #myClients.sales-clean-layout .mc-list{display:flex;flex-direction:column;min-height:0;height:100%;max-height:none;align-self:stretch}
 html body #myClients.sales-clean-layout .sales-navigation{flex:none}
 html body #myClients.sales-clean-layout :is(.sales-client-list,.sales-queue-slot){flex:1 1 0;min-height:0;height:auto;overflow:hidden}
 html body #myClients.sales-clean-layout .sales-client-list{display:flex;flex-direction:column}
 html body #myClients.sales-clean-layout .sales-client-list>:not(.mc-table-scroll){flex:none}
 html body #myClients.sales-clean-layout .mc-table-scroll{flex:1 1 0;min-height:0;height:auto;max-height:none;overflow:auto}
 html body #myClients.sales-clean-layout #mcDetail{height:100%;max-height:none;min-height:0;align-self:stretch;box-sizing:border-box}
 html body #myClients.sales-clean-layout.mc-shared-phone #mcDetail>.workspace{height:100%;max-height:none;min-height:0;box-sizing:border-box}
 html body #myClients.sales-clean-layout :is(.sales-client-list,.sales-queue-slot)[hidden]{display:none!important}
}

/* Original calendar is the shared footer, outside either switchable list. */
html body #myClients .mc-list>.sales-shared-calendar{flex:0 0 auto;min-height:0;margin:0;box-sizing:border-box;width:100%;background:var(--wa-panel,var(--surface));border-top:1px solid var(--wa-line,var(--border));overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--wa-line,var(--border)) transparent}
html body #myClients .sales-queue-slot>.queue-panel{grid-template-rows:auto auto minmax(0,1fr)}
html body #myClients .sales-queue-slot #queueList{min-height:0;height:auto;max-height:none;overflow-y:auto}
@media screen and (min-width:761px){html body #myClients .mc-list>.sales-shared-calendar{max-height:45%}}

/* Empty sales list retains a passive view of the existing six-step process. */
#myClients .crm-empty-process{padding:18px;min-width:0;background:var(--panel);color:var(--ink);border:1px solid var(--line);border-radius:12px}
#myClients .crm-empty-process h2{font-size:var(--crm-type-body,16px);margin:0 0 14px}
#myClients .crm-empty-process .workflow{display:flex;flex-wrap:wrap;gap:8px;padding:0}
#myClients .crm-empty-process .flow-step{opacity:1;cursor:default;pointer-events:none;flex:1 1 130px}
#myClients .crm-empty-process p{color:var(--muted);margin:18px 0 0}
html body #myClients .crm-empty-process .workflow{display:flex!important;flex-wrap:wrap!important;min-width:0!important;overflow:visible!important}
html body #myClients .crm-empty-process .flow-step:disabled{opacity:1!important;color:var(--text,var(--ink,#eee))!important;filter:none!important;min-width:0!important}

html body #auditPlanModes[hidden]{display:none!important}

/* Shared sales / formation rail: one navigation, search and three call filters. */
html:root body :is(.sales-navigation.panel-head,#newFirmWorkspace .nf-phone-rail>summary){display:flex!important;align-items:center!important;gap:6px!important;min-height:46px!important;height:46px!important;padding:5px 8px!important;box-sizing:border-box;background:var(--premium-paper,var(--surface))!important;border-bottom:1px solid var(--premium-line,var(--border))!important}
html:root body :is(.sales-navigation,#newFirmWorkspace .nf-phone-rail>summary) .sales-list-modes{display:flex!important;flex:1!important;min-width:0!important;width:auto!important;gap:4px!important}
html:root body :is(.sales-navigation,#newFirmWorkspace .nf-phone-rail>summary) .sales-list-modes button{flex:1;min-width:0;min-height:34px!important;padding:6px 4px!important;font-size:var(--fs-sm,12.5px)!important;white-space:nowrap!important;border:1px solid transparent!important;background:transparent!important;color:var(--premium-muted,var(--muted))!important;box-shadow:none!important}
html:root body :is(.sales-navigation,#newFirmWorkspace .nf-phone-rail>summary) .sales-list-modes button[aria-pressed=true]{border-color:var(--premium-line,var(--border))!important;background:var(--premium-soft,var(--surface2))!important;color:var(--premium-ink,var(--text))!important}
html:root body .sales-rail-toggle{display:flex;align-items:center;justify-content:center;flex:0 0 24px;min-width:24px!important;width:24px!important;min-height:30px!important;height:30px!important;padding:0!important;border:0!important;background:transparent!important;color:var(--muted)!important;box-shadow:none!important;cursor:pointer}
.sales-rail-chevron{width:6px;height:6px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg)}
.sales-rail-toggle[aria-expanded=true] .sales-rail-chevron{transform:rotate(225deg)}
html:root body :is(#queueTabs,#newFirmWorkspace .fr-queue-tabs){display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:3px!important;padding:5px 8px!important;background:transparent!important;border:0!important}
html:root body :is(#queueTabs,#newFirmWorkspace .fr-queue-tabs) .queue-tab{display:flex!important;align-items:center;justify-content:center!important;gap:4px!important;min-height:30px!important;padding:5px 3px!important;font-size:var(--fs-xs,11.5px)!important;white-space:nowrap!important;border:1px solid transparent!important;border-radius:6px;background:transparent!important;color:var(--muted)!important;box-shadow:none!important}
html:root body :is(#queueTabs,#newFirmWorkspace .fr-queue-tabs) .queue-tab.active{border-color:var(--green)!important;background:color-mix(in srgb,var(--green) 9%,transparent)!important;color:var(--text)!important}
html:root body #queueTabs [data-queue=cold]{display:none!important}
html:root body :is(#queueTabs,#newFirmWorkspace .fr-queue-tabs) .queue-tab span{display:inline!important;margin:0!important;font-size:var(--fs-xs,11.5px)!important;color:inherit!important}
html:root body .sales-queue-panel{display:flex!important;flex-direction:column!important;min-height:0}
.sales-queue-panel>.sales-navigation{order:0}.sales-queue-panel>#queueTabs{order:1}.sales-queue-panel>.sales-rail-search{order:2}.sales-queue-panel>.sales-queue-sources{order:3}.sales-queue-panel>#queueList{order:4;flex:1;min-height:0;overflow:auto}.sales-queue-panel>.queue-calendar{order:5}
html:root body .sales-rail-search{display:flex;align-items:center;gap:7px;margin:3px 8px 8px;padding:0 10px;border:1px solid var(--premium-line,var(--border));border-radius:8px;background:var(--premium-paper,var(--surface));min-height:36px;flex:none;box-sizing:border-box}
html:root body :is(.sales-rail-search,#newFirmWorkspace .fr-search) input{flex:1;min-width:0;width:100%;height:36px!important;padding:7px 0!important;border:0!important;outline:0!important;background:transparent!important;box-shadow:none!important;color:var(--text)!important;font-size:var(--fs-md,13.5px)!important}
html:root body :is(.sales-rail-search,#newFirmWorkspace .fr-search):focus-within{border-color:var(--muted)!important;box-shadow:none!important}
html:root body :is(.sales-rail-search,#newFirmWorkspace .fr-search) svg{width:16px;height:16px;flex:none;color:var(--muted)}
/* 07.10 18:07 (Dawid): lupa w Połączeniach i Zadaniach tej samej wielkości co w Klientach */
html:root body :is(.sales-rail-search,#newFirmWorkspace .fr-search).sales-rail-search.cfl-bar>svg.cfl-lupa{width:18px;height:18px}
/* 07.10 18:07 (Dawid): przed nałożeniem lejka (start strony) stara ikona listy nie jest widoczna */
html:root body #myClients .mc-list-search>.mc-quick-filters:not(.cfl-hide)>summary{visibility:hidden}
html:root body #myClients .mc-search-field{flex:1;max-width:none;min-width:0;gap:7px}
html:root body #myClients .mc-list-search #mcSearch{height:36px!important;min-height:36px!important;font-size:var(--fs-md,13.5px)!important;padding:7px 10px!important;box-shadow:none!important;max-width:none!important}
html:root body #newFirmWorkspace .nf-rail-content>.ob-queue,html:root body #newFirmWorkspace .nf-rail-content>.ob-queue>[data-ob-queue]:not([hidden]){display:contents!important}
html:root body #newFirmWorkspace [data-ob-queue][hidden]{display:none!important}
#newFirmWorkspace .fr-queue-tabs{order:0}#newFirmWorkspace .fr-search-row{order:1}#newFirmWorkspace :is(.nf-list-items,.ob-queue .queue-list){order:2}#newFirmWorkspace .fw-rail-calendar{order:3}
html:root body #newFirmWorkspace .ob-queue .queue-list{flex:1;min-height:0;overflow:auto}
html:root body #myClients .mc-grid.sales-rail-collapsed,html:root body .phone-layout.sales-rail-collapsed{display:flex!important;flex-direction:column!important;gap:10px!important}
html:root body #myClients .mc-list.sales-rail-collapsed,html:root body .queue-panel.sales-rail-collapsed{flex:none!important;width:100%!important;min-height:46px!important;height:46px!important;max-height:46px!important;overflow:hidden!important;cursor:pointer}
html:root body :is(.mc-list,.queue-panel).sales-rail-collapsed>:not(.sales-navigation){display:none!important}
html:root body #myClients .mc-grid.sales-rail-collapsed>#mcDetail,html:root body .phone-layout.sales-rail-collapsed>.workspace{flex:1!important;min-height:0!important;width:100%!important;max-width:none!important;height:auto!important}
html:root body :is(.mc-grid,.phone-layout).sales-rail-collapsed>.crm-panel-divider{display:none!important}
html:root body .sales-queue-panel #queueList [hidden]{display:none!important}
html:root body #myClients .mc-search-field{border:1px solid var(--premium-line,var(--border));border-radius:8px;background:var(--premium-paper,var(--surface));padding:0 10px;box-sizing:border-box}
html:root body #myClients .mc-search-field:focus-within{border-color:var(--muted)}
html:root body #myClients .mc-list-search #mcSearch{border:0!important;background:transparent!important;padding:7px 0!important;outline:0!important}
html:root body #newFirmWorkspace .nf-rail-content{top:46px}

/* 23.09: „telefon +” tuż za nazwą miesiąca w każdym kalendarzu z telefonami (Sprzedaż, Opieka, Wdrożenie klientów): bez ramki, biała słuchawka, większy plus */
html body .calendar-head .crm-plus-phone,html body .calendar-head .crm-plus-phone[data-crm-action]{--premium-muted:var(--text,#fff);position:static;display:inline-flex!important;align-items:center;gap:1px;width:auto!important;min-width:0!important;height:28px!important;margin:0 0 0 6px;padding:0 4px!important;border:0!important;border-radius:7px;background:transparent!important;box-shadow:none!important;color:var(--text,#fff)!important;cursor:pointer;flex:none}
html body .calendar-head .crm-plus-phone:hover{background:color-mix(in srgb,currentColor 12%,transparent)!important}
html body .calendar-head .crm-plus-phone>.icon{width:17px!important;height:17px!important;stroke:currentColor;fill:none;stroke-width:1.9}
html body .calendar-head .crm-plus-phone>b{display:block;width:14px;height:14px;margin-left:2px;--crm-type-body:0;font-size:0!important;color:transparent!important;background:linear-gradient(var(--text,#fff),var(--text,#fff)) center/100% 1.5px no-repeat,linear-gradient(var(--text,#fff),var(--text,#fff)) center/1.5px 100% no-repeat;transform:translateY(-3px)}
html body #aftercareWorkspace .calendar-head .crm-plus-phone{margin-left:-2px}
html body .calendar-head:has(.crm-plus-phone)>.calendar-nav{margin-left:auto}
/* 08.10 (Dawid): w kalendarzu lewej kolumny Sprzedaży bez słuchawki z plusem */
html body .calendar-head .crm-plus-phone[data-plus-phone],html body .calendar-head .crm-plus-phone[data-plus-phone][data-crm-action]{display:none!important}

/* 07.10 audyt biura: w Martwych leadach przełącznik „Połączenia · Klienci · Zadania” jest wyłączony (hidden), ale styl display:flex pokazywał go dalej — klik pokazywał kolejkę i zadania Sprzedaży pod tytułem „Martwe leady” */
html:root:not(#audA):not(#audB):not(#audC) body #myClients .panel-head.sales-navigation .sales-list-modes[hidden]{display:none!important}
