/* Canigenix native Purchasing: visual parity with Billing and Inventory. */
#cgxPurchasingPanel[hidden],#cxBuySupplierForm[hidden],#cxBuyOrderForm[hidden]{display:none!important}
#appView.cx-purchasing-open > :not(.clinic-heading):not(#clinicWorkspaceNav):not(#cgxPurchasingPanel){display:none!important}
#appView.cx-purchasing-open #cgxPurchasingPanel{display:block!important}
#cxPurchasingNav[aria-current="page"]{background:#178b87;color:#fff;border-color:#52d2c2}
#cgxPurchasingPanel{--buy-border:rgba(168,221,220,.28);--buy-muted:#b5d0d4;color:#ebf9f8;margin:20px 0 32px;font-size:14px}
#cgxPurchasingPanel *{box-sizing:border-box}
#cgxPurchasingPanel h2{font-size:26px;color:#f7ffff;margin:6px 0 8px}#cgxPurchasingPanel h3{font-size:18px;color:#f7ffff;margin:0 0 14px}#cgxPurchasingPanel h4{font-size:15px;color:#f7ffff;margin:0 0 12px}
#cgxPurchasingPanel .cx-buy-head{display:flex;gap:16px;align-items:flex-start;justify-content:space-between;margin-bottom:18px}
#cgxPurchasingPanel .cx-buy-muted{color:var(--buy-muted);font-size:13px;line-height:1.5;margin:6px 0 12px}
#cgxPurchasingPanel .cx-buy-chip{border:1px solid #55b7af;border-radius:20px;padding:6px 10px;color:#b9f8ef;white-space:nowrap;font-size:11px}
#cgxPurchasingPanel .cx-buy-toolbar{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:12px 0}
#cgxPurchasingPanel .cx-buy-notice{min-height:24px;color:#aff4e3;font-weight:600;margin:10px 0}
#cgxPurchasingPanel .cx-buy-error{color:#ffc2b5}
#cgxPurchasingPanel .cx-buy-card{background:linear-gradient(140deg,#193e4b,#224e59);border:1px solid var(--buy-border);border-radius:16px;padding:20px;min-width:0;margin-bottom:16px}
#cgxPurchasingPanel .cx-buy-layout{display:grid;grid-template-columns:minmax(250px,.85fr) minmax(0,1.6fr);gap:16px;align-items:start}
#cgxPurchasingPanel .cx-buy-kpis{display:flex;flex-wrap:wrap;gap:12px;margin:14px 0 20px}
#cgxPurchasingPanel .cx-buy-stat{background:#153945;border:1px solid var(--buy-border);border-radius:12px;padding:13px 17px;min-width:145px;display:flex;flex-direction:column;gap:6px}
#cgxPurchasingPanel .cx-buy-stat strong{font-size:20px;color:#f5fffd}#cgxPurchasingPanel .cx-buy-stat span{font-size:12px;color:#bee0dc}
#cgxPurchasingPanel .cx-buy-list{display:flex;flex-direction:column;gap:9px;max-height:750px;overflow-y:auto}
#cgxPurchasingPanel .cx-buy-order{display:flex;flex-direction:column;gap:6px;background:#285663!important;color:#ecfffc!important;border:1px solid #497e84!important;border-radius:12px;padding:12px 14px;text-align:left;width:100%;line-height:1.35}
#cgxPurchasingPanel .cx-buy-order.cx-buy-selected{border-color:#60e0c4!important;box-shadow:0 0 0 1px #60e0c4 inset}
#cgxPurchasingPanel .cx-buy-order span,#cgxPurchasingPanel .cx-buy-order small{color:#c2e8e6}
#cgxPurchasingPanel .cx-buy-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 14px;margin:12px 0}
#cgxPurchasingPanel .cx-buy-field{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:700;color:#e5f9f8;min-width:0}
#cgxPurchasingPanel .cx-buy-field input,#cgxPurchasingPanel .cx-buy-field select{width:100%;min-height:42px;padding:9px 10px;border:1px solid #95bdb9;border-radius:9px;background:#f4faf9!important;color:#19343d!important;opacity:1!important;font-size:14px;min-width:0}
#cgxPurchasingPanel .cx-buy-field option{color:#19343d;background:#fff}
#cgxPurchasingPanel button{min-height:39px;cursor:pointer;margin:3px 5px 3px 0}
#cgxPurchasingPanel button.primary{background:#43bb99!important;color:#102e32!important;border:1px solid #43bb99!important}
#cgxPurchasingPanel button.outline{background:#224d59!important;color:#f0ffff!important;border:1px solid #6caaac!important}
#cgxPurchasingPanel button:focus-visible{outline:3px solid #b8fff4;outline-offset:2px}
#cgxPurchasingPanel button:disabled{opacity:.65;cursor:wait}
#cgxPurchasingPanel .cx-buy-subpanel{border:1px solid var(--buy-border);background:#153c48;border-radius:12px;margin:14px 0;padding:14px;min-width:0}
#cgxPurchasingPanel .cx-buy-list-row{display:flex;flex-direction:column;gap:4px;padding:10px 0;border-bottom:1px solid var(--buy-border);overflow-wrap:anywhere}
#cgxPurchasingPanel .cx-buy-list-row span{color:#c3dfe0;font-size:12px}
#cgxPurchasingPanel .cx-buy-line-editor{display:flex;flex-direction:column;gap:12px}
#cgxPurchasingPanel .cx-buy-line{display:grid;grid-template-columns:minmax(160px,2fr) minmax(80px,1fr) minmax(100px,1fr) auto;gap:12px;align-items:end;padding:10px;background:#244d58;border:1px solid #427681;border-radius:10px}
@media(max-width:1100px){#cgxPurchasingPanel .cx-buy-layout{grid-template-columns:1fr}#cgxPurchasingPanel .cx-buy-line{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){#cgxPurchasingPanel .cx-buy-grid,#cgxPurchasingPanel .cx-buy-line{grid-template-columns:1fr}#cgxPurchasingPanel .cx-buy-head{flex-direction:column}#cgxPurchasingPanel .cx-buy-card{padding:15px}}
