/* Buyer portal: reference TELACK B2B catalogue. Business rules stay upstream. */
:root{--bg:#f5f7f6;--surface:#fff;--surface-muted:#eef3f1;--text:#15201c;--muted:#5f6f68;--border:#dce5e1;--accent:#2d7d6f;--accent-dark:#236356;--shadow:0 18px 50px rgba(17,32,27,.08);--radius:8px}
html,body{font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif}

/* Compact brand and the original 260px, dark-green desktop navigation. */
.sidebar{background:#10231e}
.portal-brand{display:flex;align-items:center;gap:10px;color:inherit;min-width:0;text-decoration:none}
.portal-brand .brand-mark{flex:none;width:34px;height:34px}
.portal-brand-name{font-size:16px;font-weight:750}
.sidebar-brand-row{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0}
.nav a,.nav button{color:rgba(255,255,255,.76);font-size:14px;min-height:40px}
.nav a.active{background:rgba(255,255,255,.14);color:#fff}
.sidebar-footer{color:rgba(255,255,255,.66);overflow-wrap:anywhere}
.sidebar-footer .public-site-link{display:inline-flex;align-items:center;gap:6px;min-height:32px;margin-bottom:8px;font-size:12px}

/* Keep the public logo on the separate partner sign-in page. */
.auth-page{background:var(--bg);grid-template-columns:minmax(0,1fr)}
.auth-card{box-shadow:var(--shadow);min-width:0;justify-self:center}
.portal-logo{display:block;width:136px;height:auto;object-fit:contain}
.portal-tag{font-size:12px;letter-spacing:.1em;font-weight:700;border:1px solid currentColor;border-radius:4px;padding:3px 6px}
.auth-card .portal-logo{width:185px}
.auth-card .public-site-link{display:inline-flex;align-items:center;justify-content:center;min-height:44px;color:var(--accent)}
.input:focus,.textarea:focus,.select:focus,input:focus,textarea:focus,select:focus{box-shadow:0 0 0 3px rgba(45,125,111,.12)}

/* Catalogue proportions: four cards at wide desktop, a 360px cart on the right. */
.catalog-layout>.panel,.product-card,.product-body{min-width:0}
.catalog-panel-header .catalog-filters{flex:0 1 460px;width:460px;max-width:100%;gap:10px}
.catalog-filters>.input,.catalog-filters>.select{flex:0 0 100%;min-width:0!important}
.product-body h3{font-size:16px;font-weight:700;overflow-wrap:anywhere}
.product-description,.cart-line strong{overflow-wrap:anywhere}
.product-meta{align-items:center}
.product-catalog-code{color:var(--muted)}
.favorite-toggle{min-width:32px;min-height:28px;width:32px;height:28px;border-color:#c7d6cf;color:var(--muted)}
.favorite-toggle.is-favorite{background:rgba(180,35,24,.1);border-color:rgba(180,35,24,.35);color:#b42318}
.status.active,.catalog-stock-status.active,.status-nova,.status-isporuceno{background:#e4efec;color:#176b5f}
.price,.summary-row strong{white-space:nowrap;font-variant-numeric:tabular-nums}
.price-row{flex-wrap:wrap;min-width:0}
.quantity{grid-template-columns:34px 56px 34px;flex:none}
.quantity button{width:34px;height:34px;min-height:34px}
.quantity input{width:56px;height:34px;min-width:0;font-size:16px}
.quantity:focus-within{outline:3px solid var(--accent);outline-offset:3px}

/* Keyboard, no-JS and touch support are retained alongside the compact desktop. */
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #2d7d6f;outline-offset:3px}
.sidebar a:focus-visible,.sidebar button:focus-visible{outline-color:#8ed5c0}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important}}
[hidden]{display:none!important}
.skip-link{position:fixed;left:12px;top:-90px;z-index:100;background:#fff;color:var(--text);padding:12px 18px;border:2px solid var(--text)}
.skip-link:focus{top:10px}
.portal-mobile-header,.menu-toggle,.menu-close{display:none}
.portal-cart-link{position:relative;display:flex;justify-content:center;align-items:center;min-width:48px;min-height:48px;color:inherit}
.cart-count{position:absolute;right:0;top:0;min-width:18px;min-height:18px;padding:1px 4px;border-radius:12px;background:var(--accent);color:#fff;text-align:center;font-size:11px;font-weight:700}
@media(max-width:980px),(pointer:coarse){
  .button,.btn,.favorite-toggle,.description-toggle,.icon-action,.quantity button,.quantity input,.pager a.pg-item{min-width:44px;min-height:44px}
  .portal-brand,.sidebar-footer .public-site-link{min-height:44px}
  .quantity{grid-template-columns:44px 44px 44px}
  .quantity button,.quantity input{width:44px;height:44px}
  .favorite-toggle{width:44px;height:44px}
  .input,.select{min-height:44px}
}
@media(max-width:980px){
  .app-shell{display:block;min-height:100dvh}
  .portal-mobile-header{display:flex;justify-content:space-between;align-items:center;gap:8px;height:64px;padding:8px 16px;border-bottom:1px solid var(--border);background:#fff;color:var(--text);position:sticky;top:0;z-index:20}
  .portal-mobile-header .portal-brand{justify-content:center}
  .js-portal-nav .menu-toggle,.js-portal-nav .menu-close{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;flex:none;border:1px solid var(--border);background:#fff;color:var(--text);border-radius:7px;padding:0;cursor:pointer}
  .menu-close{font-size:28px;line-height:1}
  .js-portal-nav .sidebar{display:none;position:fixed;z-index:50;top:0;left:0;width:min(320px,calc(100vw - 56px));height:100dvh;overflow-y:auto;overscroll-behavior:contain}
  .js-portal-nav.menu-open .sidebar{display:flex}
  .js-portal-nav .menu-backdrop{position:fixed;inset:0;z-index:40;background:rgba(16,35,30,.58)}
  .menu-open{overflow:hidden}
  .sidebar .nav a{min-height:44px}
}
@media(max-width:480px){.auth-page{padding:16px}.auth-card{padding:24px}}
@media(max-width:380px){
  .product-body form.price-row>.button{flex:1 1 100%}
  .product-body .quantity{width:100%;grid-template-columns:44px minmax(44px,1fr) 44px}
  .product-body .quantity input{width:100%}
}
@media(max-width:640px){.scanner-shell .portal-mobile-header{display:none}}
