/* P³ ERP 1.4.18 – reusable header and unified sales workbar. */
#kv1418HeaderTools{display:flex;align-items:center;gap:8px;flex:0 0 auto;order:-10}
.kv1418-popover-wrap{position:relative;display:flex}
.kv1418-head-button{position:relative;width:44px;height:44px;display:grid;place-items:center;border:1px solid #c8d8e8;border-radius:14px;background:#fff;color:#17283a;box-shadow:0 2px 8px rgba(26,48,72,.08);cursor:pointer}
.kv1418-head-button:hover,.kv1418-head-button[aria-expanded="true"]{background:#e6f1fd;border-color:#9ebfe0}
.kv1418-head-button:focus-visible,.kv1418-popover button:focus-visible{outline:3px solid rgba(37,119,195,.28);outline-offset:2px}
.kv1418-plus span{font-size:30px;line-height:1;font-weight:400;margin-top:-2px}
.kv1418-head-button svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.kv1418-work-count{position:absolute;right:-7px;top:-8px;min-width:22px;height:22px;padding:0 6px;display:grid;place-items:center;border:2px solid #fff;border-radius:999px;background:#182533;color:#fff;font-size:11px;font-weight:800;box-sizing:border-box}
.kv1418-popover{position:absolute;z-index:1900;top:calc(100% + 10px);left:0;width:min(340px,calc(100vw - 28px));padding:12px;border:1px solid #cbd9e7;border-radius:17px;background:#fff;box-shadow:0 18px 50px rgba(19,43,67,.2);box-sizing:border-box}
.kv1418-popover[hidden]{display:none!important}
.kv1418-create-menu{display:grid;gap:6px}.kv1418-create-menu>strong{padding:5px 7px;color:#526579;font-size:12px;text-transform:uppercase;letter-spacing:.08em}.kv1418-create-menu button{width:100%;text-align:left;justify-content:flex-start}
.kv1418-work-menu{width:min(380px,calc(100vw - 28px));padding:0;overflow:hidden}
.kv1418-work-menu header{display:flex;justify-content:space-between;align-items:center;padding:16px;background:#edf5fd;border-bottom:1px solid #d7e4ef}.kv1418-work-menu header div{display:grid;gap:2px}.kv1418-work-menu header small{color:#65788b}.kv1418-work-menu header>span{min-width:38px;height:38px;display:grid;place-items:center;border-radius:12px;background:#172535;color:#fff;font-size:17px;font-weight:800}
.kv1418-work-menu [data-work-groups]{display:grid;max-height:min(54vh,440px);overflow:auto;padding:7px}
.kv1418-work-menu [data-work-groups] button{display:grid;grid-template-columns:1fr auto;grid-template-areas:"label count" "open count";gap:2px 12px;padding:11px 10px;border:0;border-bottom:1px solid #e6edf4;background:#fff;text-align:left;cursor:pointer}.kv1418-work-menu [data-work-groups] button:hover{background:#f1f6fb}.kv1418-work-menu [data-work-groups] span{grid-area:label;font-weight:700}.kv1418-work-menu [data-work-groups] strong{grid-area:count;align-self:center;font-size:18px}.kv1418-work-menu [data-work-groups] small{grid-area:open;color:#668097}
.kv1418-empty{margin:0;padding:18px;color:#63778b;text-align:center}.kv1418-refresh{width:100%;padding:10px;border:0;border-top:1px solid #dbe5ee;background:#f7fafc;color:#37516a;font-weight:700;cursor:pointer}
#kv145HeaderActions{display:flex;align-items:center;gap:10px}#kvErpHeaderSearch{order:-5}#kv145HeaderControls{order:0}
body.kv1418-sales-open #kv145Pagebar{display:none!important}
.kv1418-sales-workbar{display:grid;gap:12px;margin-bottom:14px;padding:16px 18px;border:1px solid #cddceb;border-radius:18px;background:linear-gradient(110deg,#f7fbff,#e4f0fc);box-shadow:0 2px 8px rgba(28,55,79,.05)}
.kv1418-sales-primary{display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap}.kv1418-sales-title{display:flex;align-items:center;gap:12px}.kv1418-sales-title .kv147-code{position:static;flex:0 0 auto}.kv1418-sales-title h3{margin:0;font-size:clamp(1.25rem,2vw,1.65rem)}.kv1418-sales-title small{display:block;margin-top:2px;color:#62778b}
.kv1418-sales-routes,.kv1418-sales-filters,.kv1418-sales-create{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.kv1418-sales-routes button,.kv1418-sales-filters button{border:1px solid transparent;background:transparent;color:#263a4c;font-weight:700}.kv1418-sales-routes button.active,.kv1418-sales-filters button.active{background:#172535;color:#fff}.kv1418-sales-secondary{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding-top:12px;border-top:1px solid #ccdae8;flex-wrap:wrap}.kv1418-sales-create{justify-content:flex-end}.kv1418-sales-create button{white-space:nowrap}
.kv1418-sales-panel{margin-top:0!important}.kv1418-sales-panel>.erp135-toolbar{margin-top:0}
@media(max-width:900px){.kv1418-sales-primary,.kv1418-sales-secondary{align-items:stretch;flex-direction:column}.kv1418-sales-create{justify-content:flex-start}}
@media(max-width:699px){#kv1418HeaderTools{gap:5px}.kv1418-head-button{width:40px;height:40px;border-radius:12px}.kv1418-popover{position:fixed;top:72px;left:10px;right:10px;width:auto}.kv1418-sales-workbar{padding:13px}.kv1418-sales-routes,.kv1418-sales-filters,.kv1418-sales-create{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.kv1418-sales-routes button,.kv1418-sales-filters button,.kv1418-sales-create button{white-space:normal}.kv1418-sales-title small{display:none}}

/* P³ ERP 1.4.18.4 – approved quick-create and notification controls remain reachable in every header layout. */
#kv145HeaderActions,#kv1418HeaderTools{display:flex!important;align-items:center!important;visibility:visible!important;opacity:1!important}
.kv1418-work-button svg{stroke:currentColor!important;fill:none!important}
@media(max-width:699px){
 .kv145 #appView>.topbar #kv145HeaderActions{display:flex!important;flex:0 0 auto!important;margin-left:auto!important;overflow:visible!important}
 .kv145 #appView>.topbar #kv1418HeaderTools{display:flex!important;gap:6px!important}
 .kv145 #appView>.topbar .kv1418-head-button{width:42px!important;height:42px!important;min-width:42px!important}
 .kv145 #appView>.topbar .kv1418-popover{z-index:1901!important;max-height:calc(100dvh - var(--kv145-header) - 20px);overflow:auto}
}
/* 1.4.20.1: compact shared create menu in the sales workbar. */
.kv1418-inline-create{position:relative}.kv1418-inline-create-button{width:48px;min-width:48px;height:44px;padding:0!important;border-radius:13px!important;font-size:1.55rem!important;line-height:1}.kv1418-inline-create-menu{position:absolute;z-index:1250;top:calc(100% + 8px);right:0;width:min(310px,calc(100vw - 28px));padding:10px;border:1px solid #c9d9e8;border-radius:16px;background:#fff;box-shadow:0 18px 44px rgba(20,50,80,.22)}.kv1418-inline-create-menu>strong{display:block;padding:5px 8px 9px;color:#526a80}.kv1418-inline-create-menu button{display:block;width:100%;margin:2px 0;text-align:left}.kv1418-inline-create-menu button.primary{background:#172535;color:#fff}@media(max-width:699px){.kv1418-sales-create{display:flex}.kv1418-inline-create-menu{position:fixed;top:76px;left:10px;right:10px;width:auto;max-height:calc(100vh - 96px);overflow:auto}.kv1418-inline-create-button{width:48px!important}}
