:root{
  /* Light theme tokens (overrides) */
  --b2b-bg: #f6f8ff;
  --b2b-bg2: #f8fafc;
  --b2b-surface: rgba(255,255,255,.78);
  --b2b-surface-solid: #ffffff;
  --b2b-border: rgba(15, 23, 42, .10);
  --b2b-text: #0f172a;
  --b2b-muted: #64748b;
  --b2b-shadow: 0 18px 50px rgba(2, 6, 23, .12);
  --b2b-shadow-sm: 0 10px 28px rgba(2, 6, 23, .10);
  --b2b-radius: 14px;
  --b2b-radius-sm: 12px;
  --b2b-glow: 0 0 0 6px rgba(59,130,246,.08);
}

/* Global typography (override legacy ArialBG) */
body{
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif !important;
}
button, input, select, textarea{
  font-family: inherit !important;
}

/* Price blocks (NET + VAT) */
.b2b-price{
  line-height: 1.12;
}
.b2b-price__net{
  font-weight: 700;
  color: var(--b2b-text);
}
.b2b-price__vat{
  margin-top: 2px;
  font-size: 12px;
  color: var(--b2b-muted);
  font-weight: 600;
}
.b2b-price-inline{
  white-space: nowrap;
}
.b2b-price-inline__vat{
  color: var(--b2b-muted);
  font-weight: 600;
}

/* Background + subtle “cinematic” blobs (light mode) */
body{
  background: radial-gradient(1200px 600px at 12% -10%, rgba(59,130,246,.18), transparent 62%),
              radial-gradient(900px 520px at 90% 0%, rgba(244,63,94,.14), transparent 58%),
              radial-gradient(900px 520px at 60% 110%, rgba(16,185,129,.12), transparent 60%),
              linear-gradient(180deg, var(--b2b-bg), var(--b2b-bg2));
  color: var(--b2b-text);
}

body:before,
body:after{
  content:'';
  position: fixed;
  z-index: -3; /* always behind the app */
  pointer-events: none;
  width: 520px;
  height: 520px;
  filter: blur(70px);
  opacity: .45;
  border-radius: 50%;
  transform: translate3d(0,0,0);
}

body:before{
  left: -160px;
  top: 140px;
  background: radial-gradient(circle at 30% 30%, rgba(59,130,246,.55), rgba(59,130,246,0) 70%);
  animation: b2bBlob1 18s ease-in-out infinite;
}

body:after{
  right: -190px;
  top: 220px;
  background: radial-gradient(circle at 30% 30%, rgba(244,63,94,.45), rgba(244,63,94,0) 70%);
  animation: b2bBlob2 22s ease-in-out infinite;
}

@keyframes b2bBlob1{
  0%,100% { transform: translate3d(0,0,0) scale(1); }
  50% { transform: translate3d(40px,-18px,0) scale(1.06); }
}
@keyframes b2bBlob2{
  0%,100% { transform: translate3d(0,0,0) scale(1); }
  50% { transform: translate3d(-30px,10px,0) scale(1.05); }
}

@media (prefers-reduced-motion: reduce){
  body:before, body:after{ animation: none !important; }
}

/* Floating background logos layer */
#b2b-bg-logos{
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  overflow: hidden;
}
.b2b-bg-logo{
  position: absolute;
  top: 0;
  left: 0;
  /* relative to /i/theme-light.css so it works even under subfolders like /b2b.altaph.eu/public */
  background-image: url('alta_logo1.webp');
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  will-change: transform, opacity;
}
@media (prefers-reduced-motion: reduce){
  #b2b-bg-logos{ display: none !important; }
}

/* ============================
   Login page (public)
   ============================ */
.b2b-login-page{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.b2b-login-shell{
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  /* common.css footer uses height:85px + negative margin; keep the card visually centered */
  min-height: calc(100vh - 85px);
  padding: 0;
}
.b2b-login-card{
  max-width: 980px;
  margin: 0 auto;
  border-radius: 22px;
  border: 1px solid var(--b2b-border);
  background: var(--b2b-surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--b2b-shadow);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
}
.b2b-login-card__left{
  padding: 28px 26px 24px;
}
.b2b-login-card__right{
  position: relative;
  padding: 0;
  background: radial-gradient(900px 520px at 30% 0%, rgba(59,130,246,.22), transparent 58%),
              radial-gradient(900px 520px at 80% 110%, rgba(244,63,94,.16), transparent 60%),
              linear-gradient(180deg, rgba(255,255,255,.40), rgba(255,255,255,.10));
  border-left: 1px solid rgba(15,23,42,.08);
}
.b2b-login-illustration{
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.b2b-login-illustration__img{
  max-width: 100%;
  max-height: 420px;
  width: auto;
  height: auto;
  opacity: .95;
  filter: drop-shadow(0 24px 46px rgba(2,6,23,.18));
}
.b2b-login-brand{
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px;
  align-items: center;
}
.b2b-login-brand__logo{
  width: 96px;
  height: auto;
  display: block;
}
.b2b-login-brand__kicker{
  font-size: 12px;
  font-weight: 900;
  color: rgba(15,23,42,.55);
  letter-spacing: .01em;
  text-transform: uppercase;
}
.b2b-login-brand__title{
  font-size: 22px;
  font-weight: 950;
  color: var(--b2b-text);
  line-height: 1.15;
}
.b2b-login-brand__sub{
  margin-top: 6px;
  font-size: 13px;
  color: rgba(15,23,42,.60);
  line-height: 1.35;
}
.b2b-login-form .form-group{
  margin-top: 14px;
  margin-bottom: 12px;
}
.b2b-login-input{
  position: relative;
}
.b2b-login-input .fa{
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  color: rgba(15,23,42,.50);
  pointer-events: none;
}
.b2b-login-input .form-control{
  height: 48px !important;
  border-radius: 14px !important;
  padding-left: 40px !important;
  padding-right: 46px !important;
  border: 1px solid rgba(15,23,42,.14) !important;
  background: rgba(255,255,255,.78) !important;
  color: var(--b2b-text) !important;
  box-shadow: 0 10px 22px rgba(2,6,23,.06);
}
.b2b-login-input .form-control:focus{
  box-shadow: var(--b2b-glow) !important;
  border-color: rgba(59,130,246,.45) !important;
  background: rgba(255,255,255,.92) !important;
}
.b2b-login-pass-toggle{
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.70);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(15,23,42,.70);
}
.b2b-login-pass-toggle:focus{
  outline: none;
  box-shadow: var(--b2b-glow);
}
.b2b-login-submit{
  height: 52px;
  border-radius: 16px !important;
  font-weight: 950;
  letter-spacing: .01em;
}
.b2b-login-submit__loading{
  align-items: center;
  justify-content: center;
}
.b2b-login-submit.is-loading{
  opacity: .95;
  cursor: progress;
}
.b2b-login-caps{
  margin-top: 8px;
  font-size: 12px;
  font-weight: 800;
  color: rgba(180, 83, 9, .95);
  background: rgba(245, 158, 11, .10);
  border: 1px solid rgba(245, 158, 11, .22);
  border-radius: 12px;
  padding: 8px 10px;
}
@media (max-width: 900px){
  .b2b-login-card{ grid-template-columns: 1fr; }
  .b2b-login-card__right{ display: none; }
}
@media (max-width: 480px){
  .b2b-login-shell{ min-height: calc(100vh - 85px); }
  .b2b-login-card__left{ padding: 22px 18px 18px; }
  .b2b-login-brand{ grid-template-columns: 76px 1fr; }
  .b2b-login-brand__logo{ width: 76px; }
  .b2b-login-brand__title{ font-size: 20px; }
}

/* Override legacy footer layout on login (common.css uses negative margin tricks for the app shell) */
.b2b-login-page footer{
  margin-top: 0 !important;
  height: auto !important;
  padding: 16px 0 !important;
  background: transparent !important;
}
.b2b-login-build{
  font-weight: 300 !important;
  font-size: 12px;
  line-height: 20px;
  color: rgba(15,23,42,.55);
}
@media (max-width: 726px){
  .b2b-login-build{
    float: none !important;
    display: block;
    margin-top: 6px;
  }
}

/* Ensure content is above background blobs (no z-index to avoid stacking issues with modals/footer) */
#wrap, #main, header, .center, footer{
  position: relative;
}

/* Glassy navbar */
.navbar{
  background: var(--b2b-surface) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--b2b-border);
  box-shadow: 0 14px 36px rgba(2, 6, 23, .08);
  min-height: 100px;
}

/* Modern menu layout + pills */
header .navbar .center{
  display:flex !important;
  align-items:center;
  justify-content: space-between;
  gap: 14px;
}
header .navbar .logo{
  float:none;
  border-right: 0;
  height: auto;
  padding: 14px 16px 14px 0;
  min-width: 220px;
}
header .navbar .logo img{
  height: 46px;
  width: auto;
  display:block;
}

/* Toggler (mobile) */
.b2b-nav-toggler{
  border: 1px solid rgba(15,23,42,.14);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255,255,255,.55);
  box-shadow: 0 10px 22px rgba(2,6,23,.08);
}
.b2b-nav-toggler:focus{ box-shadow: var(--b2b-glow) !important; }
.b2b-nav-toggler .navbar-toggler-icon{
  width: 22px;
  height: 14px;
  display:block;
  background:
    linear-gradient(var(--b2b-text), var(--b2b-text)) 0 0 / 100% 2px no-repeat,
    linear-gradient(var(--b2b-text), var(--b2b-text)) 0 6px / 100% 2px no-repeat,
    linear-gradient(var(--b2b-text), var(--b2b-text)) 0 12px / 100% 2px no-repeat;
  opacity: .78;
}

header .navbar .navbar-nav{
  margin: 0;
  align-items:center;
  gap: 6px;
}
header .navbar .navbar-nav .nav-link{
  height: auto;
  padding: 9px 14px;
  border-radius: 999px;
  text-transform: none;
  letter-spacing: .01em;
  font-weight: 800;
  font-size: 13px;
  line-height: 20px;
  color: var(--b2b-text);
  background: transparent;
  transition: background-color .14s ease, color .14s ease, transform .14s ease;
  display:flex;
  align-items:center;
  gap: 10px;
}
header .navbar .navbar-nav .nav-link .fa{
  opacity: .75;
}
header .navbar .navbar-nav .nav-link:hover{
  background: rgba(15,23,42,.06);
  color: #0b1220;
}
header .navbar .navbar-nav .nav-item.active .nav-link{
  background: rgba(37,99,235,.12);
  color: #1d4ed8;
  box-shadow: inset 0 0 0 1px rgba(37,99,235,.18);
}
header .navbar .navbar-nav .nav-item.active .nav-link .fa{
  opacity: 1;
}

/* Right area: align nicely with the new navbar */
header .navbar .right{
  display:flex;
  align-items:center;
  gap: 10px;
}
header .navbar .right > a{ margin-left: 0 !important; }

/* Right actions pills (search/profile/logout) */
.b2b-nav-actions{
  flex-wrap: nowrap;
}
.b2b-nav-pill{
  display:inline-flex;
  align-items:center;
  gap: 10px;
  height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.55);
  color: var(--b2b-text) !important;
  text-decoration: none !important;
  box-shadow: 0 12px 26px rgba(2,6,23,.08);
  transition: transform .14s ease, box-shadow .14s ease, background-color .14s ease, border-color .14s ease;
}
.b2b-nav-pill:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.72);
  box-shadow: 0 16px 34px rgba(2,6,23,.10);
}
.b2b-nav-pill:focus{ box-shadow: var(--b2b-glow) !important; }
.b2b-nav-pill--icon{
  width: 44px;
  padding: 0;
  justify-content:center;
}
.b2b-nav-pill__text{
  font-weight: 800;
  font-size: 12px;
  line-height: 14px;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Make search visible (common.css hides it on desktop) */
header .navbar .search-btn{
  display:inline-flex !important;
  width: 44px;
  height: 44px;
  margin: 0;
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 999px;
  position: relative;
}
header .navbar .search-btn:before,
header .navbar .search-btn:after{
  opacity: .75;
}

/* Profile pill: modernize avatar chip */
header .navbar .profile-link{
  padding: 0 14px 0 10px;
}
header .navbar .profile-link i.profile{
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(37,99,235,.10);
  box-shadow: inset 0 0 0 1px rgba(37,99,235,.12);
}

/* Logout pill */
.b2b-nav-pill--logout{
  padding: 0 14px 0 12px;
  background: rgba(15,23,42,.06);
}
.b2b-nav-pill--logout .fa{ opacity: .85; }

/* Cart pills (two carts) */
.b2b-cart-pill.btn-cart,
.b2b-cart-pill.btn-cart-nzok{
  /* hard reset of legacy cart button styles from common.css */
  background-image: none !important;
  background-color: transparent !important;
  border-left: 0 !important;
  border-right: 0 !important;
  padding-left: 12px !important;
  padding-right: 12px !important;
  padding-top: 10px !important;
  padding-bottom: 10px !important;
  height: 62px !important;
}
.b2b-cart-pill.btn-cart-nzok:before,
.b2b-cart-pill.btn-cart-nzok:after{
  /* common.css draws a green plus via pseudo-elements; disable it for our pill design */
  content: none !important;
  display: none !important;
}

.b2b-cart-pill{
  display:flex !important;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  height: 62px;
  padding: 10px 12px 10px 12px;
  border-radius: 18px;
  border: 1px solid rgba(226,7,20,.18);
  background: linear-gradient(180deg, rgba(255,255,255,.78), rgba(255,255,255,.60));
  box-shadow: 0 18px 40px rgba(2,6,23,.10);
  text-decoration: none !important;
  position: relative;
  overflow: hidden;
}
.b2b-cart-pill:before{
  content:'';
  position:absolute;
  inset: -2px;
  background: radial-gradient(220px 120px at 15% 35%, rgba(226,7,20,.20), transparent 60%),
              radial-gradient(180px 120px at 85% 65%, rgba(37,99,235,.10), transparent 60%);
  opacity: .9;
  pointer-events:none;
}
.b2b-cart-pill > *{ position: relative; z-index: 1; }
.b2b-cart-pill:hover{
  transform: translateY(-1px);
  box-shadow: 0 22px 48px rgba(2,6,23,.12);
}
.b2b-cart-pill__left{
  display:flex;
  align-items:center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
}
.b2b-cart-pill__text{
  min-width: 0;
}
.b2b-cart-pill__icon{
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(226,7,20,.12);
  box-shadow: inset 0 0 0 1px rgba(226,7,20,.16);
  color: #b0040e;
}
.b2b-cart-pill__icon .fa{ font-size: 18px; }
.b2b-cart-pill__title{
  font-weight: 400;
  font-size: 13px;
  line-height: 16px;
  color: var(--b2b-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.b2b-cart-pill__sum{
  margin-top: 2px;
  font-weight: 800;
  font-size: 11.5px;
  line-height: 13.5px;
  color: rgba(15,23,42,.72);
  white-space: nowrap;
}
.b2b-cart-pill__sum-label{
  font-size: 11px;
  color: rgba(15,23,42,.52);
  font-weight: 900;
  display:inline-block;
  margin-right: 8px;
}
.b2b-cart-pill__sum .io{
  font-weight: 900;
  color: rgba(15,23,42,.78);
}
.b2b-cart-pill__sum .io small{
  font-weight: 800;
  opacity: .75;
}
.b2b-cart-pill__badge{
  min-width: 38px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(226,7,20,.16);
  color: #8a030b;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(226,7,20,.18);
  gap: 6px;
  flex: 0 0 auto;
}
.b2b-cart-pill__badge .total{
  /* Override legacy .btn-cart .total absolute badge styles from common.css */
  position: static !important;
  right: auto !important;
  top: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  min-width: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font: inherit !important;
  color: inherit !important;
  line-height: inherit !important;
  display: inline !important;
}
.b2b-cart-pill__badge-unit{
  font-size: 11px;
  font-weight: 900;
  opacity: .72;
}
.b2b-cart-pill .icon.icon-arrow{ display: none !important; }
.b2b-cart-pill strong{ display:none !important; }
.b2b-cart-pill > span{ display:none !important; } /* old structure safety */

/* NZOK variant (green accent) */
.b2b-cart-pill--nzok{
  border-color: rgba(16,185,129,.22);
}
.b2b-cart-pill--nzok:before{
  background: radial-gradient(220px 120px at 15% 35%, rgba(16,185,129,.22), transparent 60%),
              radial-gradient(180px 120px at 85% 65%, rgba(37,99,235,.10), transparent 60%);
}
.b2b-cart-pill--nzok .b2b-cart-pill__icon{
  background: rgba(16,185,129,.14);
  box-shadow: inset 0 0 0 1px rgba(16,185,129,.18);
  color: #047857;
}
.b2b-cart-pill--nzok .b2b-cart-pill__badge{
  background: rgba(16,185,129,.18);
  color: #065f46;
  box-shadow: inset 0 0 0 1px rgba(16,185,129,.20);
}

/* Pulse animation (cart-pulse classes are toggled by existing JS) */
@keyframes b2bCartPulse{
  0%   { transform: translateY(0) scale(1); box-shadow: 0 18px 40px rgba(2,6,23,.10); }
  35%  { transform: translateY(-2px) scale(1.02); box-shadow: 0 26px 56px rgba(2,6,23,.16); }
  65%  { transform: translateY(-1px) scale(1.01); box-shadow: 0 22px 48px rgba(2,6,23,.14); }
  100% { transform: translateY(0) scale(1); box-shadow: 0 18px 40px rgba(2,6,23,.10); }
}
@keyframes b2bCartGlow{
  0%,100% { opacity: 0; transform: scale(.98); }
  35% { opacity: .9; transform: scale(1.02); }
  65% { opacity: .6; transform: scale(1.01); }
}
.b2b-cart-pill.cart-pulse{
  animation: b2bCartPulse .65s cubic-bezier(.2,.8,.2,1) both !important;
}
.b2b-cart-pill.cart-pulse:after{
  content:'';
  position:absolute;
  inset: -14px;
  border-radius: 24px;
  background: radial-gradient(260px 160px at 35% 40%, rgba(37,99,235,.20), transparent 60%),
              radial-gradient(240px 160px at 70% 60%, rgba(226,7,20,.24), transparent 62%);
  filter: blur(10px);
  pointer-events:none;
  animation: b2bCartGlow .65s ease both;
  z-index: 0;
}
.b2b-cart-pill--nzok.cart-pulse:after{
  background: radial-gradient(260px 160px at 35% 40%, rgba(37,99,235,.18), transparent 60%),
              radial-gradient(240px 160px at 70% 60%, rgba(16,185,129,.26), transparent 62%);
}
@media (prefers-reduced-motion: reduce){
  .b2b-cart-pill.cart-pulse{ animation: none !important; }
  .b2b-cart-pill.cart-pulse:after{ display:none !important; }
}

/* Responsive: hide logout text and profile name on narrow */
@media screen and (max-width: 1180px){
  .b2b-nav-pill__text{ max-width: 140px; }
}
@media screen and (max-width: 920px){
  .b2b-nav-pill--logout .b2b-nav-pill__text{ display:none; }
  header .navbar .profile-link .b2b-nav-pill__text{ display:none; }
}
@media screen and (max-width: 767px){
  .b2b-nav-actions{
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
  }
  .b2b-cart-pill{
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
  }
}
@media screen and (max-width: 520px){
  /* Stack cart pills */
  .b2b-cart-pill{
    flex: 1 1 100%;
    width: 100%;
  }
  /* Reduce navbar height and logo so it never forces horizontal scroll */
  .navbar{ min-height: 78px; }
  header .navbar .logo{ min-width: 0; padding-right: 8px; }
  header .navbar .logo img{ height: 40px; }
}

/* Cart modal: add a subtle top accent line (free vs nzok) */
.b2b-cart-modal__header{
  position: relative;
  overflow: hidden;
}
.b2b-cart-modal__header:before{
  content:'';
  position:absolute;
  left:0; right:0; top:0;
  height: 4px;
  background: linear-gradient(90deg, rgba(226,7,20,.9), rgba(37,99,235,.55));
}
.nzok-modal .b2b-cart-modal__header:before{
  background: linear-gradient(90deg, rgba(16,185,129,.95), rgba(37,99,235,.45));
}
/* Mobile: show collapsible menu (common.css hides navbar-nav under 767px) */
@media screen and (max-width: 767px){
  header .navbar .collapse.navbar-collapse.left{
    width: 100%;
  }
  header .navbar .navbar-nav{
    display:flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px 0 0;
  }
  header .navbar .navbar-nav .nav-link{
    justify-content: flex-start;
    padding: 12px 14px;
    background: rgba(255,255,255,.55);
    border: 1px solid rgba(15,23,42,.10);
  }
}

/* Cards / blocks */
.figure-block,
.orderresult,
.table-search-result,
.modal-content,
.b2b-summary-modal__content{
  border-radius: var(--b2b-radius) !important;
  border: 1px solid var(--b2b-border) !important;
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--b2b-shadow-sm);
}

/* Order summary: make it very readable */
.b2b-summary-tldr{
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(37,99,235,.06);
}
.b2b-summary-tldr__kicker{
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: rgba(15,23,42,.55);
}
.b2b-summary-tldr__text{
  margin-top: 6px;
  font-weight: 700;
  color: #0f172a;
}
.b2b-summary-next{
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.72);
}
.b2b-summary-next__title{
  font-weight: 900;
  color: #0f172a;
}
.b2b-summary-next__text{
  margin-top: 6px;
  color: rgba(15,23,42,.70);
}
.b2b-summary-next__actions{
  margin-top: 10px;
}

/* Order summary modal: unify design in light theme (override legacy common.css) */
.b2b-summary-modal__header{
  background:
    radial-gradient(520px 220px at 10% 0%, rgba(37,99,235,.14), transparent 55%),
    radial-gradient(520px 240px at 85% 0%, rgba(16,185,129,.10), transparent 58%),
    rgba(255,255,255,.88) !important;
  border-bottom: 1px solid rgba(15,23,42,.10) !important;
}
.b2b-summary-modal__header .modal-title{
  font-weight: 900;
  color: #0f172a;
}
.b2b-summary-modal__subtitle{
  color: rgba(15,23,42,.62) !important;
  font-size: 13px !important;
  margin-left: 10px;
}
.b2b-summary-modal__header .close{
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(15,23,42,.06);
  border: 1px solid rgba(15,23,42,.10);
  opacity: 1;
}
.b2b-summary-modal__header .close:hover{
  background: rgba(15,23,42,.10);
}
.b2b-summary-modal__header .close span{
  display:inline-block;
  line-height: 34px;
  color: rgba(15,23,42,.75);
}
.b2b-summary-modal__body{
  background: transparent !important;
}

/* Status pills (top header) */
.b2b-pill{
  border: 1px solid rgba(15,23,42,.10);
  box-shadow: 0 8px 18px rgba(2,6,23,.06);
}
.b2b-pill--success{ background: rgba(16,185,129,.14) !important; color: #065f46 !important; border-color: rgba(16,185,129,.22) !important; }
.b2b-pill--warning{ background: rgba(245,158,11,.16) !important; color: #92400e !important; border-color: rgba(245,158,11,.26) !important; }
.b2b-pill--danger{ background: rgba(244,63,94,.14) !important; color: #9f1239 !important; border-color: rgba(244,63,94,.24) !important; }

/* Summary tables polish */
.b2b-summary-lines thead th{
  background: rgba(15,23,42,.04);
  border-bottom-color: rgba(15,23,42,.10) !important;
  color: rgba(15,23,42,.72);
  font-weight: 900;
}
.b2b-summary-lines tbody tr{
  background: rgba(255,255,255,.70);
}
.b2b-summary-lines tbody tr:hover{
  background: rgba(37,99,235,.06);
}

/* Footer buttons: keep consistent sizing */
#order-summary-modal .modal-footer .btn{
  border-radius: 12px;
}

/* Copy / PDF buttons + status (order summary) */
.b2b-btn-pdf{
  background: rgba(14,165,164,.12) !important;
  border: 1px solid rgba(14,165,164,.30) !important;
  color: #0f172a !important;
}
.b2b-btn-pdf:hover{
  background: rgba(14,165,164,.16) !important;
  border-color: rgba(14,165,164,.42) !important;
}
.b2b-summary-action-status{
  display:inline-flex;
  align-items:center;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 12px;
 /* border: 1px solid rgba(15,23,42,.10);*/
  color: rgba(15,23,42,.75);
 /* background: rgba(15,23,42,.05);*/
}
.b2b-summary-action-status.is-success{ background: rgba(16,185,129,.14); border-color: rgba(16,185,129,.24); color: #065f46; }
.b2b-summary-action-status.is-warning{ background: rgba(245,158,11,.16); border-color: rgba(245,158,11,.26); color: #92400e; }
.b2b-summary-action-status.is-danger{ background: rgba(244,63,94,.14); border-color: rgba(244,63,94,.24); color: #9f1239; }

/* Make print a prominent action in the footer */
.b2b-btn-print--cta{
  box-shadow: 0 14px 28px rgba(37,99,235,.18);
}

/* Order summary: filters + status */
.b2b-summary-filters{
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.b2b-filter-btn{
  appearance: none;
  border: 1px solid rgba(15,23,42,.14);
  background: rgba(255,255,255,.75);
  color: rgba(15,23,42,.80);
  padding: 8px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
  transition: transform .14s ease, box-shadow .14s ease, background-color .14s ease, border-color .14s ease;
}
.b2b-filter-btn:hover{ transform: translateY(-1px); }
.b2b-filter-btn.is-active{
  border-color: rgba(14,165,164,.55);
  background: rgba(14,165,164,.10);
  box-shadow: 0 10px 18px rgba(2, 6, 23, .08);
}
.b2b-filter-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width: 22px;
  padding: 2px 7px;
  margin-left: 6px;
  border-radius: 999px;
  background: rgba(15,23,42,.08);
  color: rgba(15,23,42,.70);
  font-weight: 900;
}
.b2b-summary-lines .b2b-summary-line__name{
  font-weight: 700;
}
.b2b-status-pill{
  display:inline-flex;
  align-items:center;
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 12px;
  border: 1px solid rgba(15,23,42,.10);
}
.b2b-status-pill--success{ background: rgba(16,185,129,.12); color: #065f46; border-color: rgba(16,185,129,.22); }
.b2b-status-pill--warning{ background: rgba(245,158,11,.14); color: #92400e; border-color: rgba(245,158,11,.26); }
.b2b-status-pill--danger{ background: rgba(244,63,94,.12); color: #9f1239; border-color: rgba(244,63,94,.24); }
.b2b-status-reason{
  margin-top: 4px;
  font-size: 12px;
  color: rgba(15,23,42,.62);
}

/* Order summary: created order id chips */
.b2b-order-id-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: .2px;
  color: #0f172a !important;
  background: rgba(255,255,255,.85) !important;
  border: 1px solid rgba(37,99,235,.35) !important;
  box-shadow: 0 10px 20px rgba(2, 6, 23, .08);
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease;
}
.b2b-order-id-btn:hover{
  transform: translateY(-1px);
  background: rgba(14,165,164,.10) !important;
  border-color: rgba(14,165,164,.55) !important;
  box-shadow: 0 14px 26px rgba(2, 6, 23, .12);
  text-decoration: none;
}
.b2b-order-id-btn:focus{
  box-shadow: 0 0 0 4px rgba(59,130,246,.22), 0 10px 20px rgba(2, 6, 23, .08) !important;
}

/* Tables */
table thead tr th,
table thead tr th.bgr{
  border-bottom-color: rgba(15,23,42,.12) !important;
}
tbody tr{
  border-bottom: 1px solid rgba(15,23,42,.08);
}

/* Buttons: subtle lift + glow on hover */
.btn{
  transition: transform .14s ease, box-shadow .14s ease, background-color .14s ease, border-color .14s ease;
}
.btn:hover{
  transform: translateY(-1px);
}
.btn:focus{
  box-shadow: var(--b2b-glow) !important;
}

/* Primary action button (keep brand red, but smoother) */
.btn-main{
  background: linear-gradient(180deg, #ff3b44, #e20714) !important;
  border-color: rgba(226, 7, 20, .65) !important;
  box-shadow: 0 14px 28px rgba(226, 7, 20, .18);
}
.btn-main:hover{
  background: linear-gradient(180deg, #ff4a52, #d50612) !important;
  box-shadow: 0 18px 34px rgba(226, 7, 20, .22);
}

/* Make the order summary call-to-action very visible */
.b2b-order-summary-btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: .2px;
  color: #ffffff !important;
  border: 0 !important;
  /* Calm “pharmacy” palette (blue -> teal/green) */
  background: linear-gradient(135deg, #2563eb 0%, #0ea5a4 55%, #16a34a 100%) !important;
  box-shadow:
    0 14px 30px rgba(37,99,235,.24),
    0 10px 18px rgba(14,165,164,.16);
}
.b2b-order-summary-btn:hover{
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow:
    0 18px 38px rgba(37,99,235,.28),
    0 12px 22px rgba(14,165,164,.18);
}
.b2b-order-summary-btn:active{
  transform: translateY(0px);
}
.b2b-order-summary-btn:focus{
  box-shadow:
    0 0 0 4px rgba(59,130,246,.25),
    0 14px 30px rgba(37,99,235,.24) !important;
}

/* Secondary dark button: soften to charcoal for light theme */
.btn-tertrary{
  background: linear-gradient(180deg, #111827, #0b1220) !important;
  border-color: rgba(15, 23, 42, .55) !important;
}

/* Profile page */
.b2b-profile-page .b2b-card{
  background: rgba(255,255,255,.86);
  border: 1px solid var(--b2b-border);
  border-radius: var(--b2b-radius);
  box-shadow: var(--b2b-shadow-sm);
}
.b2b-profile-hero{
  position: relative;
  overflow: hidden;
}
.b2b-profile-hero:before{
  content:'';
  position:absolute;
  inset:-2px;
  background:
    radial-gradient(520px 240px at 12% 25%, rgba(37,99,235,.18), transparent 60%),
    radial-gradient(420px 240px at 70% 55%, rgba(226,7,20,.12), transparent 62%),
    radial-gradient(420px 240px at 105% 10%, rgba(16,185,129,.10), transparent 60%);
  pointer-events:none;
}
.b2b-profile-hero > *{ position: relative; z-index: 1; }
.b2b-profile-hero__grid{
  display:flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.b2b-profile-hero__left{
  display:flex;
  align-items:center;
  gap: 14px;
  min-width: 0;
}
.profile-header .avatar-circle{
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: rgba(37,99,235,.12);
  box-shadow: inset 0 0 0 1px rgba(37,99,235,.16);
  color: #1d4ed8;
  font: 900 22px/64px "ArialBG";
  text-align:center;
  flex: 0 0 auto;
}
.b2b-profile-hero__meta{ min-width: 0; }
.b2b-profile-hero__kicker{
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .02em;
  color: rgba(15,23,42,.55);
  text-transform: uppercase;
}
.b2b-profile-hero__title{
  font-size: 20px;
  font-weight: 900;
  line-height: 1.15;
  color: var(--b2b-text);
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.b2b-profile-hero__sub{
  margin-top: 10px;
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
}
.b2b-profile-hero__chip{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.60);
  border: 1px solid rgba(15,23,42,.10);
  color: rgba(15,23,42,.72);
  font-weight: 800;
  font-size: 12px;
}
.b2b-profile-hero__chip a{
  color: #1d4ed8;
  text-decoration: none;
}
.b2b-profile-hero__chip a:hover{ text-decoration: underline; }
.b2b-profile-hero__stats{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  min-width: 340px;
}
@media screen and (max-width: 520px){
  .b2b-profile-hero__stats{ min-width: 0; width: 100%; }
  .b2b-profile-hero__title{ white-space: normal; }
}
.b2b-stat-card{
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.62);
}
.b2b-stat-card__label{
  font-size: 12px;
  font-weight: 900;
  color: rgba(15,23,42,.55);
  margin-bottom: 6px;
}
.b2b-stat-card__value{
  font-size: 16px;
  font-weight: 900;
  color: var(--b2b-text);
  line-height: 1.2;
}

/* Profile actions list */
.b2b-action-list{
  display:flex;
  flex-direction: column;
  gap: 8px;
}
.b2b-action-item{
  display:flex;
  align-items:center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.60);
  color: var(--b2b-text);
  text-decoration: none !important;
  transition: transform .14s ease, box-shadow .14s ease, background-color .14s ease;
}
.b2b-action-item:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.74);
  box-shadow: 0 14px 30px rgba(2,6,23,.10);
}
.b2b-action-item__icon{
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(37,99,235,.10);
  color: #1d4ed8;
  box-shadow: inset 0 0 0 1px rgba(37,99,235,.12);
  flex: 0 0 auto;
}
.b2b-action-item__text{
  font-weight: 900;
  font-size: 13px;
  line-height: 16px;
}
.b2b-action-item__chev{
  margin-left: auto;
  opacity: .55;
}
.b2b-action-item--danger .b2b-action-item__icon{
  background: rgba(226,7,20,.10);
  color: #b0040e;
  box-shadow: inset 0 0 0 1px rgba(226,7,20,.14);
}

/* Profile recent orders table */
.b2b-profile-table .figure-block{
  background: transparent;
}
.b2b-profile-table thead th{
  background: rgba(255,255,255,.65);
  font-weight: 900;
}
.b2b-profile-table tbody tr:hover td{
  background: rgba(37,99,235,.04);
}
.b2b-profile-table td, .b2b-profile-table th{
  vertical-align: middle;
}

/* Softer status badge for light theme */
.status-badge{
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}
.status-1{ background: rgba(100,116,139,.92) !important; }
.status-2{ background: rgba(16,185,129,.92) !important; }
.status-3{ background: rgba(245,158,11,.92) !important; }
.status-4{ background: rgba(37,99,235,.92) !important; }
.status-5{ background: rgba(226,7,20,.92) !important; }
.status-99{ background: rgba(148,163,184,.92) !important; color: #0f172a; }

@media screen and (max-width: 992px){
  .b2b-profile-hero__grid{ flex-direction: column; align-items: stretch; }
  .b2b-profile-hero__stats{ min-width: 0; grid-template-columns: 1fr 1fr; }
}
@media screen and (max-width: 520px){
  .b2b-profile-hero__title{ white-space: normal; }
  .b2b-profile-hero__stats{ grid-template-columns: 1fr; }
}

/* Order detail page */
.b2b-order-page{
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.b2b-order-hero{
  position: relative;
  overflow: hidden;
}
.b2b-order-hero:before{
  content:'';
  position:absolute;
  inset:-2px;
  background:
    radial-gradient(620px 260px at 15% 25%, rgba(37,99,235,.16), transparent 60%),
    radial-gradient(520px 260px at 70% 55%, rgba(226,7,20,.12), transparent 62%),
    radial-gradient(520px 260px at 105% 10%, rgba(16,185,129,.10), transparent 60%);
  pointer-events:none;
}
.b2b-order-hero > *{ position: relative; z-index: 1; }
.b2b-order-hero__top{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.b2b-order-hero__back{
  border-radius: 999px;
  font-weight: 900;
}
.b2b-order-hero__channel{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 12px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.62);
}
.b2b-order-hero__channel.is-regular{ color: #b0040e; border-color: rgba(226,7,20,.18); background: rgba(226,7,20,.06); }
.b2b-order-hero__channel.is-nzok{ color: #047857; border-color: rgba(16,185,129,.22); background: rgba(16,185,129,.08); }

.b2b-order-hero__main{
  display:grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  align-items:start;
  gap: 16px;
}
.b2b-order-hero__title{ min-width: 0; }
.b2b-order-hero__kicker{
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .02em;
  color: rgba(15,23,42,.55);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.b2b-order-hero__title h1{
  margin: 0;
  padding: 0;
}
.b2b-order-hero__title h1 label{
  /* Override legacy .figure-block h1 label absolute positioning */
  position: static !important;
  top: auto !important;
  left: auto !important;
  display: inline-flex !important;
  align-items: center;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 900;
  font-size: 14px;
  line-height: 1;
  background: rgba(37,99,235,.12);
  color: #1d4ed8;
  box-shadow: inset 0 0 0 1px rgba(37,99,235,.18);
}
.b2b-order-hero__meta{
  margin-top: 10px;
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
}
.b2b-order-hero__chip{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.60);
  border: 1px solid rgba(15,23,42,.10);
  color: rgba(15,23,42,.72);
  font-weight: 800;
  font-size: 12px;
}
.b2b-order-hero__chip--status{
  /* Avoid "pill inside pill" look */
  background: transparent;
  border: 0;
  padding: 0;
  gap: 10px;
}
.b2b-order-hero__chip--status .status-badge{
  margin-left: 0;
}

/* Order status timeline (stepper) */
.b2b-order-timeline-wrap{
  width: 100%;
}
.b2b-order-timeline{
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

/* Profile: Orders calendar modal */
.b2b-orders-calendar-wrap{
  padding: 10px;
}
#b2b-orders-calendar{
  min-height: 60vh;
}
.b2b-orders-calendar-filters{
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 14px;
  background: rgba(255,255,255,.75);
  backdrop-filter: blur(6px);
}
.b2b-orders-calendar-filters__row{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
}
.b2b-orders-calendar-filters__group{
  display: flex;
  align-items: center;
  gap: 10px;
}
.b2b-orders-calendar-filters__label{
  font-size: 12px;
  font-weight: 900;
  color: rgba(15,23,42,.65);
}
.b2b-cal-check{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: rgba(15,23,42,.75);
}
.b2b-cal-statuses{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
}
.b2b-cal-channel.is-active{
  background: rgba(37,99,235,.12);
  border-color: rgba(37,99,235,.28);
  color: #1d4ed8;
  font-weight: 900;
}
#b2b-cal-reset{
  background: rgba(148,163,184,.18);
  border-color: rgba(148,163,184,.40);
  color: rgba(15,23,42,.85);
  font-weight: 900;
}
#b2b-cal-reset:hover,
#b2b-cal-reset:focus{
  background: rgba(148,163,184,.28);
  border-color: rgba(148,163,184,.55);
  color: rgba(15,23,42,.95);
}
.b2b-summary-modal .fc .fc-toolbar-title{
  font-size: 16px;
  font-weight: 900;
}
.b2b-summary-modal .fc .fc-button{
  border-radius: 10px;
}
@media (max-width: 726px){
  #b2b-orders-calendar{ min-height: 70vh; }
  .b2b-orders-calendar-filters__group.ml-auto{ margin-left: 0 !important; }
  .b2b-summary-modal .fc .fc-toolbar{
    flex-wrap: wrap;
    gap: 8px;
  }
  .b2b-summary-modal .fc .fc-toolbar-chunk{
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }
}
.b2b-order-timeline__step{
  position: relative;
  padding-top: 18px;
  text-align: center;
  color: rgba(15,23,42,.55);
  font-weight: 800;
  font-size: 12px;
  line-height: 14px;
}
.b2b-order-timeline__step::before{
  content: '';
  position: absolute;
  top: 9px;
  left: -50%;
  width: 100%;
  height: 2px;
  background: rgba(15,23,42,.10);
}
.b2b-order-timeline__step:first-child::before{ display:none; }
.b2b-order-timeline__dot{
  width: 12px;
  height: 12px;
  border-radius: 999px;
  margin: 0 auto;
  background: rgba(15,23,42,.18);
  border: 2px solid rgba(255,255,255,.9);
  box-shadow: 0 8px 18px rgba(2,6,23,.10);
}

/* ============================
   Order page ("Поръчка") enterprise polish
   ============================ */
.b2b-order-page{
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.b2b-order-actionbar{
  padding: 14px;
  border-radius: calc(var(--b2b-radius) + 2px);
}
.b2b-order-actionbar__row{
  display:flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.b2b-order-actionbar__left,
.b2b-order-actionbar__right{
  display:flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.b2b-order-actionbar__primary{
  border-radius: 999px !important;
  font-weight: 950;
}
.b2b-order-actionbar__history{
  display:flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.b2b-order-actionbar__history .small{
  margin: 0;
  font-size: 11px;
  line-height: 12px;
  font-weight: 900;
}
.b2b-order-actionbar__history .b2b-order-history{
  min-width: 180px;
  height: 34px;
  border-radius: 12px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}
.b2b-order-actionbar__hint{
  margin-top: 10px;
}
.b2b-order-sections{
  display:flex;
  flex-direction: column;
  gap: 12px;
}
.b2b-order-section{
  overflow: hidden;
}
.b2b-order-section__head{
  width: 100%;
  display:flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px;
  border: 0;
  background: transparent;
  text-align: left;
}
.b2b-order-section__head:hover{
  background: rgba(15,23,42,.03);
}
.b2b-order-section__title{
  display:flex;
  align-items: center;
  gap: 10px;
  font-weight: 950;
  color: var(--b2b-text);
}
.b2b-order-section__chev{
  opacity: .65;
  transition: transform .14s ease;
}
.b2b-order-section__head[aria-expanded="true"] .b2b-order-section__chev{
  transform: rotate(180deg);
}
.b2b-order-section__body{
  border-top: 1px solid var(--b2b-border);
  padding: 12px 14px 14px;
}
.b2b-order-lines-table-wrap{
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,.10);
  overflow: auto;
  background: rgba(255,255,255,.72);
}
.b2b-order-lines-table{
  margin: 0;
}
.b2b-order-lines-table thead th{
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(248,250,252,.92);
  border-bottom: 1px solid rgba(15,23,42,.10) !important;
  font-size: 12px;
  font-weight: 950;
  color: rgba(15,23,42,.72);
}
.b2b-order-lines-table tbody tr:nth-child(odd){
  background: rgba(255,255,255,.35);
}
.b2b-order-lines-table tbody tr:hover{
  background: rgba(59,130,246,.06);
}
.b2b-order-lines-name{
  font-weight: 900;
  color: var(--b2b-text);
}
.b2b-num{
  font-variant-numeric: tabular-nums;
}
.b2b-order-lines-table tfoot td{
  background: rgba(2,6,23,.04);
  border-top: 1px solid rgba(15,23,42,.10) !important;
}
@media (max-width: 726px){
  .b2b-order-actionbar{
    position: sticky;
    bottom: 10px;
    z-index: 1200;
    box-shadow: 0 18px 50px rgba(2,6,23,.16);
  }
  .b2b-order-actionbar__row{
    justify-content: flex-start;
  }
  .b2b-order-actionbar__history{
    width: 100%;
    justify-content: space-between;
  }
  .b2b-order-actionbar__history .b2b-order-history{
    width: auto;
    min-width: 0;
    flex: 1 1 auto;
  }
}
.b2b-order-timeline__label{
  margin-top: 8px;
  white-space: nowrap;
}
.b2b-order-timeline__step.is-done{
  color: rgba(6,95,70,.92);
}
.b2b-order-timeline__step.is-done::before{
  background: rgba(16,185,129,.35);
}
.b2b-order-timeline__step.is-done .b2b-order-timeline__dot{
  background: rgba(16,185,129,.92);
}
.b2b-order-timeline__step.is-current{
  color: rgba(30,58,138,.92);
}
.b2b-order-timeline__step.is-current .b2b-order-timeline__dot{
  background: rgba(59,130,246,.92);
  box-shadow: 0 0 0 6px rgba(59,130,246,.14), 0 18px 42px rgba(2,6,23,.18);
}
.b2b-order-timeline__step.is-current::before{
  background: rgba(16,185,129,.35);
}
.b2b-order-timeline--refused{
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(239,68,68,.22);
  background: rgba(239,68,68,.08);
}
.b2b-order-timeline--pending{
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(148,163,184,.35);
  background: rgba(148,163,184,.14);
}
.b2b-order-timeline__refused{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
@media screen and (max-width: 760px){
  .b2b-order-timeline{
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .b2b-order-timeline__step{
    text-align: left;
    padding-top: 0;
    padding-left: 24px;
    min-height: 18px;
  }
  .b2b-order-timeline__dot{
    position: absolute;
    left: 0;
    top: 2px;
    margin: 0;
  }
  .b2b-order-timeline__step::before{
    left: 5px;
    top: -18px;
    width: 2px;
    height: 100%;
  }
  .b2b-order-timeline__step:first-child::before{ display:none; }
  .b2b-order-timeline__label{ margin-top: 0; white-space: normal; }
}
.b2b-order-hero__stats{
  display:grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  min-width: 0;
}
.b2b-order-hero__stats .b2b-stat-card__value{
  font-size: 15px;
}
.b2b-order-hero__stats .b2b-stat-card{
  height: 100%;
}
.b2b-order-hero__stats .b2b-stat-card__label{
  margin-bottom: 8px;
}
.b2b-order-hero__stats .b2b-stat-card__value{
  white-space: nowrap;
}
.b2b-order-hero__stats .b2b-stat-card:nth-child(3) .b2b-stat-card__value{
  text-align: right;
}
.b2b-order-lines h5{
  font-weight: 900;
}
.b2b-order-lines .figure-block{
  background: transparent;
}
.b2b-order-lines thead th{
  background: rgba(255,255,255,.65);
  font-weight: 900;
}
.b2b-order-lines tbody tr:hover td{
  background: rgba(37,99,235,.04);
}
.b2b-order-lines th:nth-child(1),
.b2b-order-lines td:nth-child(1){
  width: 50px;
  color: rgba(15,23,42,.65);
}
.b2b-order-lines th:nth-child(3),
.b2b-order-lines td:nth-child(3),
.b2b-order-lines th:nth-child(4),
.b2b-order-lines td:nth-child(4),
.b2b-order-lines th:nth-child(5),
.b2b-order-lines td:nth-child(5){
  text-align: right;
  white-space: nowrap;
}
.b2b-order-lines td:nth-child(2){
  min-width: 340px;
}
@media screen and (max-width: 520px){
  .b2b-order-lines td:nth-child(2){ min-width: 220px; }
}
.b2b-order-lines table.figure-block{
  border-radius: 16px;
  overflow: hidden;
}
@supports (position: sticky){
  .b2b-order-lines thead th{
    position: sticky;
    top: 0;
    z-index: 2;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
}
.b2b-order-lines tbody tr:nth-child(even) td{
  background: rgba(255,255,255,.35);
}
.b2b-order-lines tr.tfoot td{
  background: rgba(15,23,42,.04) !important;
  font-weight: 900;
  border-top: 1px solid rgba(15,23,42,.10) !important;
}
.b2b-order-lines tr.tfoot td.bgr{
  background: rgba(226,7,20,.06) !important;
}
.b2b-order-summary-hint{
  border-radius: 14px;
  border: 1px solid rgba(37,99,235,.18);
  background: rgba(37,99,235,.06);
}

/* Actions row under the hero */
.b2b-order-actions{
  display:flex;
  align-items:flex-end;
  justify-content: space-between;
  gap: 12px;
}
.b2b-order-actions__left{
  display:flex;
  flex-direction: column;
  gap: 8px;
}
.b2b-order-actions__hint{
  margin-left: 4px;
}
.b2b-order-actions__right{
  display:flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}
.b2b-order-history{
  min-width: 220px;
  height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.78);
  padding: 0 12px;
  font-weight: 800;
  color: var(--b2b-text);
  box-shadow: 0 10px 22px rgba(2,6,23,.06);
}
.b2b-order-history:focus{
  outline: none;
  box-shadow: var(--b2b-glow) !important;
}
@media screen and (max-width: 992px){
  .b2b-order-hero__main{ grid-template-columns: 1fr; }
  .b2b-order-hero__stats{ grid-template-columns: 1fr 1fr 1fr; }
  .b2b-order-actions{ align-items: stretch; }
  .b2b-order-actions__right{ align-items: flex-start; }
  .b2b-order-history{ width: 100%; min-width: 0; }
}
@media screen and (max-width: 520px){
  .b2b-order-hero__stats{ grid-template-columns: 1fr; }
  .b2b-order-actions{ flex-direction: column; }
}

/* Orders list page */
.b2b-form-label{
  display:block;
  font-weight: 900;
  font-size: 12px;
  color: rgba(15,23,42,.62);
  margin-bottom: 6px;
}
.b2b-orders-hero{
  position: relative;
  overflow: hidden;
}
.b2b-orders-hero:before{
  content:'';
  position:absolute;
  inset:-2px;
  background:
    radial-gradient(620px 260px at 15% 25%, rgba(37,99,235,.14), transparent 60%),
    radial-gradient(520px 260px at 70% 55%, rgba(226,7,20,.10), transparent 62%);
  pointer-events:none;
}
.b2b-orders-hero > *{ position: relative; z-index: 1; }
.b2b-orders-hero__top{
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 16px;
}
.b2b-orders-hero__kicker{
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .02em;
  color: rgba(15,23,42,.55);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.b2b-orders-hero__title h1{
  margin: 0;
  padding: 0;
}
.b2b-orders-hero__title h1 label{
  position: static !important;
  display: inline-flex !important;
  align-items:center;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 900;
  font-size: 16px;
  line-height: 1;
  background: rgba(37,99,235,.12);
  color: #1d4ed8;
  box-shadow: inset 0 0 0 1px rgba(37,99,235,.18);
}
.b2b-orders-hero__sub{
  margin-top: 10px;
  font-weight: 800;
}
.b2b-orders-hero__stats{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  min-width: 280px;
}

.b2b-orders-filters .btn.btn-light{
  border-radius: 999px;
  font-weight: 900;
}
.b2b-orders-quick{
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content:flex-end;
}
.b2b-orders-table .figure-block{
  background: transparent;
}
.b2b-orders-table thead th{
  background: rgba(255,255,255,.65);
  font-weight: 900;
}
.b2b-orders-table tbody tr:hover td{
  background: rgba(37,99,235,.04);
}
.b2b-orders-id{
  font-weight: 900;
  color: #1d4ed8;
  text-decoration: none;
}
.b2b-orders-id:hover{ text-decoration: underline; }
.b2b-channel-pill{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 12px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.62);
  white-space: nowrap;
}
.b2b-channel-pill.is-regular{ color: #b0040e; border-color: rgba(226,7,20,.18); background: rgba(226,7,20,.06); }
.b2b-channel-pill.is-nzok{ color: #047857; border-color: rgba(16,185,129,.22); background: rgba(16,185,129,.08); }

@media screen and (max-width: 992px){
  .b2b-orders-hero__top{ flex-direction: column; }
  .b2b-orders-hero__stats{ min-width: 0; }
  .b2b-orders-quick{ justify-content: flex-start; }
}

/* Products page */
.b2b-products-hero{
  position: relative;
  /* Must allow the suggestions dropdown to extend outside the card */
  overflow: visible;
  /* Ensure the whole hero stacking context sits above the results table below */
  z-index: 30;
}
.b2b-products-hero__top{
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 14px;
}
.b2b-products-hero__right{
  display:flex;
  align-items:center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content:flex-end;
}
.b2b-products-hero__right .btn{
  border-radius: 999px !important;
}
.b2b-products-results{
  position: relative;
  z-index: 1;
}
.b2b-products-hero:before{
  content:'';
  position:absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(720px 280px at 15% 25%, rgba(37,99,235,.14), transparent 60%),
    radial-gradient(620px 280px at 70% 55%, rgba(226,7,20,.10), transparent 62%);
  pointer-events:none;
}
.b2b-products-hero > *{ position: relative; z-index: 1; }
.b2b-products-hero__kicker{
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .02em;
  color: rgba(15,23,42,.55);
  text-transform: uppercase;
}
.b2b-products-hero h1{
  margin: 0;
  padding: 0;
}
.b2b-products-hero h1 label{
  position: static !important;
  display: inline-flex !important;
  align-items:center;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 900;
  font-size: 16px;
  line-height: 1;
  background: rgba(37,99,235,.12);
  color: #1d4ed8;
  box-shadow: inset 0 0 0 1px rgba(37,99,235,.18);
}

/* Search input */
.b2b-products-search .style-search{
  height: 56px !important;
  border-radius: 16px !important;
  background: rgba(255,255,255,.72) !important;
  border: 1px solid rgba(15,23,42,.10) !important;
  box-shadow: 0 18px 42px rgba(2,6,23,.10);
  font-size: 18px;
  padding-left: 52px !important;
  background-image: none !important;
}
.b2b-products-search .style-search:focus{
  box-shadow: var(--b2b-glow), 0 18px 42px rgba(2,6,23,.10) !important;
}
.b2b-products-search{
  position: relative;
  margin-top: 12px;
  z-index: 5; /* ensure suggestions can stack above surrounding cards */
}
.b2b-products-search:before{
  content:'';
  position:absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 2px rgba(15,23,42,.55);
  opacity: .75;
}
.b2b-products-search:after{
  content:'';
  position:absolute;
  left: 31px;
  top: 50%;
  width: 10px;
  height: 2px;
  background: rgba(15,23,42,.55);
  transform: translateY(6px) rotate(45deg);
  opacity: .75;
}

/* Suggestions dropdown */
#wrap .b2b-products-hero #search-suggestions.suggestions{
  border-radius: 16px;
  border: 1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.92);
  box-shadow: 0 26px 60px rgba(2,6,23,.18);
  backdrop-filter: blur(10px);
  /* Override legacy absolute positioning (top:72px) and make it attach to the search field */
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  position: absolute;
  z-index: 1800; /* above all page content; still below our modal overlay (1990+) */
}
#wrap .b2b-products-hero #search-suggestions.suggestions.is-detached{
  position: fixed;
  right: auto;
  width: min(520px, calc(100vw - 24px));
}
#wrap .b2b-products-hero #search-suggestions .b2b-suggest-handle{
  display:flex;
  align-items:center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(15,23,42,.10);
  cursor: grab;
  user-select: none;
  touch-action: none;
}
#wrap .b2b-products-hero #search-suggestions .b2b-suggest-handle:active{ cursor: grabbing; }
#wrap .b2b-products-hero #search-suggestions .b2b-suggest-handle__grip{
  width: 28px;
  height: 16px;
  border-radius: 999px;
  background: rgba(15,23,42,.08);
  position: relative;
}
.b2b-products-hero #search-suggestions .b2b-suggest-handle__grip:before{
  content:'';
  position:absolute;
  left: 7px; right: 7px;
  top: 5px;
  height: 2px;
  background: rgba(15,23,42,.25);
  box-shadow: 0 4px 0 rgba(15,23,42,.25);
  border-radius: 2px;
}
.b2b-products-hero #search-suggestions .b2b-suggest-handle__txt{
  font-weight: 900;
  font-size: 12px;
  color: rgba(15,23,42,.70);
}

/* Filters toggles */
.b2b-products-toggles{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 6px;
}
.b2b-products-filters{
  border-top: 1px solid rgba(15,23,42,.08);
  padding-top: 12px;
}
.b2b-products-filters .btn{
  border-radius: 999px !important;
}
.b2b-products-hero #quick-filters .form-row{
  row-gap: 10px;
}
.b2b-products-hero #quick-filters .col-md-8{
  display:flex;
  align-items:flex-end;
}
.b2b-toggle{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.60);
  font-weight: 900;
  font-size: 12px;
  color: rgba(15,23,42,.72);
  user-select: none;
}
.b2b-toggle input{ accent-color: #1d4ed8; }

/* Results table */
.b2b-products-results .smalltext{ margin: 0; }
.b2b-products-results__head{
  display:flex;
  align-items:flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}
.b2b-products-results__title{
  font-weight: 950;
  font-size: 14px;
  color: rgba(15,23,42,.82);
  letter-spacing: .01em;
}
.b2b-products-results__right{
  max-width: 520px;
  text-align: right;
}
.b2b-products-results .table-responsive{
  border-radius: 16px;
  border: 1px solid rgba(15,23,42,.10);
  overflow: hidden;
  background: rgba(255,255,255,.55);
}
.b2b-products-table{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.b2b-products-table thead th{
  background: rgba(255,255,255,.65);
  font-weight: 900;
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 10px 10px;
  font-size: 12px;
}
.b2b-products-table tbody td{
  padding: 10px 10px;
  font-size: 13px;
  line-height: 16px;
}
.b2b-products-table tbody tr{
  height: 56px;
}
.b2b-products-results tbody tr:hover td{
  background: rgba(37,99,235,.04);
}
.b2b-products-table td, .b2b-products-table th{
  vertical-align: middle;
}
.b2b-products-table td.price,
.b2b-products-table th.price{
  text-align: right;
  white-space: nowrap;
}
.b2b-products-table td.order-col{
  white-space: nowrap;
}

/* Column sizing & alignment (more orderly) */
.b2b-products-table th:nth-child(1),
.b2b-products-table td:nth-child(1){
  min-width: 420px;
}
@media screen and (max-width: 520px){
  .b2b-products-table th:nth-child(1),
  .b2b-products-table td:nth-child(1){
    min-width: 260px;
  }
  .b2b-products-results td .input-group.relative .pr-ac{
    gap: 6px;
  }
  .b2b-products-results td .input-group.relative input.qty{
    width: 64px !important;
  }
}
.b2b-products-table th:nth-child(2),
.b2b-products-table td:nth-child(2){
  width: 110px;
  text-align: center;
  white-space: nowrap;
  color: rgba(15,23,42,.65);
}
.b2b-products-table th:nth-child(3),
.b2b-products-table td:nth-child(3){
  width: 150px;
}
.b2b-products-table th:nth-child(4),
.b2b-products-table td:nth-child(4){
  width: 240px;
}
.b2b-products-table th:nth-child(5),
.b2b-products-table td:nth-child(5){
  width: 160px;
}
.b2b-products-table th:nth-child(6),
.b2b-products-table td:nth-child(6){
  width: 240px;
}

/* Modernize qty controls only in products results (keep other pages intact) */
.b2b-products-results td .input-group.relative{
  display:flex;
  align-items:center;
  gap: 10px;
  margin: 0;
}
.b2b-products-results td .input-group.relative .pr-ac{
  /* now pr-ac contains minus + input + plus + trash + add (in that order) */
  display:inline-flex !important;
  align-items:center;
  gap: 8px;
  flex-wrap: wrap;
}
.b2b-products-results td .input-group.relative input.qty{
  width: 64px !important;
  height: 36px !important;
  border-radius: 10px !important;
  border: 1px solid rgba(15,23,42,.12) !important;
  background: rgba(255,255,255,.78) !important;
  color: var(--b2b-text) !important;
  font-weight: 900;
  text-align: center;
  padding: 0 !important;
}
.b2b-products-results td .input-group.relative .pr-ac{
  position: static !important;
  width: auto !important;
  height: auto !important;
  display:inline-flex !important;
  align-items:center;
  gap: 8px;
  flex-wrap: wrap;
}
.b2b-products-results .pr-ac > a{
  border-radius: 10px !important;
  width: 36px;
  height: 36px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border: 1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.70);
  box-shadow: 0 10px 22px rgba(2,6,23,.08);
}
.b2b-products-results .pr-ac > a.minus,
.b2b-products-results .pr-ac > a.plus:not(.add-to-cart),
.b2b-products-results .pr-ac > a.trash{
  width: 40px;
}
.b2b-products-results .pr-ac > a:hover{
  background: rgba(255,255,255,.86);
  text-decoration:none;
}
.b2b-products-results .pr-ac > a.add-to-cart{
  width: auto !important;
  padding: 0 12px;
  height: 36px;
  border-radius: 999px !important;
  background: linear-gradient(180deg, #ff3b44, #e20714) !important;
  border-color: rgba(226, 7, 20, .55) !important;
  box-shadow: 0 14px 28px rgba(226, 7, 20, .16);
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff !important;
  font-weight: 900;
  font-size: 12px;
  line-height: 36px;
  white-space: nowrap;
}
.b2b-products-results .pr-ac > a.add-to-cart-always{
  padding: 0 12px;
  font-size: 11px;
  opacity: .98;
}
.b2b-products-results .pr-ac > a.add-to-cart .icon.icon-cart{
  /* common.css uses negative margins meant for the old big button; breaks our compact button */
  margin-left: 0 !important;
  margin-right: 8px !important;
  width: 18px;
  height: 18px;
  background-size: 18px 16px !important;
}
.b2b-products-results .pr-ac > a.add-to-cart:hover{
  background: linear-gradient(180deg, #ff4a52, #d50612) !important;
}
.b2b-products-results .nzok .pr-ac > a.add-to-cart{
  background: linear-gradient(180deg, #6fd18c, #16a34a) !important;
  border-color: rgba(16,185,129,.45) !important;
  box-shadow: 0 14px 28px rgba(16,185,129,.14);
  color: #fff !important;
}
.b2b-products-results .pr-ac .trash{
  position: static !important;
  top: auto !important;
  right: auto !important;
}
.b2b-products-results .pr-ac > a.trash{
  /* Restore legacy trash icon (common.css uses a background image on .trash) */
  background-image: url('trash_icon.png') !important;
  background-repeat: no-repeat !important;
  background-position: center center !important;
  background-size: 14px auto !important;
}
.b2b-products-results .pr-ac > a.trash .icon{
  display: none !important; /* avoid double/empty icon rendering */
}

/* Modernize qty controls in Cart page (/cart) as well.
   common.css uses absolute positioning + height:0 for .pr-ac which makes "Добави" overflow and overlap footer. */
.orderresult td .input-group.relative{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap: 10px;
  margin: 0;
}
.orderresult td .input-group.relative .pr-ac{
  position: static !important;
  width: auto !important;
  height: auto !important;
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}
.orderresult td .input-group.relative input.qty{
  width: 72px !important;
  height: 40px !important;
  border-radius: 12px !important;
  border: 1px solid rgba(15,23,42,.12) !important;
  background: rgba(255,255,255,.78) !important;
  color: var(--b2b-text) !important;
  font-weight: 900;
  text-align: center;
  padding: 0 !important;
}
.orderresult .pr-ac > a{
  border-radius: 12px !important;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items:center;
  justify-content:center;
  border: 1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.70);
  box-shadow: 0 10px 22px rgba(2,6,23,.08);
}
.orderresult .pr-ac > a:hover{
  background: rgba(255,255,255,.86);
  text-decoration:none;
}
.orderresult .pr-ac > a.add-to-cart{
  width: auto !important;
  padding: 0 12px;
  height: 40px;
  border-radius: 999px !important;
  background: linear-gradient(180deg, #ff3b44, #e20714) !important;
  border-color: rgba(226, 7, 20, .55) !important;
  box-shadow: 0 14px 28px rgba(226, 7, 20, .16);
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff !important;
  font-weight: 900;
  font-size: 12px;
  line-height: 40px;
  white-space: nowrap;
}
.orderresult .pr-ac > a.add-to-cart .icon.icon-cart{
  margin-left: 0 !important;
  margin-right: 8px !important;
  width: 18px;
  height: 18px;
  background-size: 18px 16px !important;
}
.orderresult .pr-ac > a.trash{
  /* Restore legacy trash icon (common.css uses a background image on .trash) */
  background-image: url('trash_icon.png') !important;
  background-repeat: no-repeat !important;
  background-position: center center !important;
  background-size: 14px auto !important;
}
.orderresult .pr-ac > a.trash .icon{
  display: none !important; /* avoid double/empty icon rendering */
}
.orderresult .nzok .pr-ac > a.add-to-cart{
  background: linear-gradient(180deg, #6fd18c, #16a34a) !important;
  border-color: rgba(16,185,129,.45) !important;
  box-shadow: 0 14px 28px rgba(16,185,129,.14);
  color: #fff !important;
}
.orderresult .pr-ac .trash{
  position: static !important;
  top: auto !important;
  right: auto !important;
}

/* ============================
   Cart page ("Вашата поръчка")
   ============================ */
.b2b-cart-page{
  padding: 18px 18px 10px;
  background: var(--b2b-surface);
  border: 1px solid var(--b2b-border);
  border-radius: calc(var(--b2b-radius) + 2px);
  box-shadow: var(--b2b-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.b2b-cart-page .afterfx{
  /* legacy right overlay; not needed in the modern cart layout */
  display: none !important;
}
.b2b-cart-header{
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 2px 14px;
  border-bottom: 1px solid var(--b2b-border);
  margin-bottom: 12px;
}
.b2b-cart-title{
  font-size: 20px;
  line-height: 1.2;
}
.b2b-cart-title label{
  font-weight: 900;
  color: var(--b2b-text);
}
.b2b-cart-subtitle{
  margin-top: 6px;
  font-size: 13px;
  line-height: 18px;
  color: rgba(15,23,42,.60) !important;
}
.b2b-cart-metrics{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.b2b-metric{
  min-width: 130px;
  padding: 10px 12px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(2,6,23,.06);
}
.b2b-metric__label{
  font-size: 11px;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: rgba(15,23,42,.52);
  font-weight: 800;
}
.b2b-metric__value{
  margin-top: 2px;
  font-size: 14px;
  font-weight: 900;
  color: var(--b2b-text);
  white-space: nowrap;
}
.b2b-cart-page .b2b-problem-summary{
  border-radius: 14px;
  border: 1px solid rgba(220,38,38,.25);
  background: rgba(220,38,38,.08);
  color: rgba(127,29,29,.95);
}

/* Table */
.b2b-cart-page .b2b-cart-table-wrap{
  width: 100%;
}
.b2b-cart-page table.figure-block{
  /* Override legacy mobile rule (common.css sets min-width:600px on small screens) */
  min-width: 0 !important;
}
.b2b-cart-page .b2b-cart-table{
  background: transparent;
  border-radius: 16px;
  overflow: hidden;
}
.b2b-cart-page .b2b-cart-table thead th{
  background: rgba(255,255,255,.70);
  border-bottom: 1px solid rgba(15,23,42,.10) !important;
  font-weight: 900;
}
@supports (position: sticky){
  .b2b-cart-page .b2b-cart-table thead th{
    position: sticky;
    top: 0;
    z-index: 2;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
}
.b2b-cart-page .b2b-cart-table tbody tr{
  transition: background .12s ease-out, transform .12s ease-out, box-shadow .12s ease-out;
}
.b2b-cart-page .b2b-cart-table tbody tr:hover{
  background: rgba(255,255,255,.55);
}

/* Actions */
.b2b-cart-actions{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 2px 0;
  border-top: 1px solid var(--b2b-border);
  margin-top: 10px;
}
.b2b-cart-actions .btn{
  min-width: 0 !important; /* override legacy min-width:260px */
}
.b2b-cart-actions__left .btn,
.b2b-cart-actions__right .btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  padding: 10px 18px;
}

/* Empty state */
.b2b-cart-page .b2b-cart-empty{
  border-radius: 16px;
  border: 1px solid rgba(59,130,246,.18);
  background: rgba(59,130,246,.08);
}
.b2b-cart-page .b2b-cart-empty__title{
  font-weight: 900;
}
.b2b-cart-page .b2b-cart-empty__title .fa{
  margin-right: 10px;
}

@media screen and (max-width: 920px){
  .b2b-cart-header{ flex-direction: column; }
  .b2b-cart-metrics{ justify-content: flex-start; }
  .b2b-metric{ min-width: 150px; }
}
@media screen and (max-width: 640px){
  .b2b-cart-page{ padding: 14px 12px 8px; }
  .b2b-cart-actions{ flex-direction: column; align-items: stretch; }
  .b2b-cart-actions__left .btn,
  .b2b-cart-actions__right .btn{ width: 100%; }
}

@media screen and (max-width: 992px){
  .b2b-products-search .style-search{ font-size: 16px; }
}

@media screen and (max-width: 900px){
  .b2b-products-table th:nth-child(5),
  .b2b-products-table td:nth-child(5),
  .b2b-products-table th:nth-child(6),
  .b2b-products-table td:nth-child(6){
    display:none;
  }
  .b2b-products-table th:nth-child(1),
  .b2b-products-table td:nth-child(1){
    min-width: 320px;
  }
}
@media screen and (max-width: 520px){
  /* Override the 900px rule: allow narrower first column on phones */
  .b2b-products-table th:nth-child(1),
  .b2b-products-table td:nth-child(1){
    min-width: 260px;
  }
  /* Favorites bulk actions: stack buttons */
  .b2b-fav-bulk{ flex-direction: column; align-items: stretch; }
  .b2b-fav-bulk__left, .b2b-fav-bulk__right{ width: 100%; justify-content: flex-start; }
  .b2b-fav-bulk__right .btn{ width: 100%; justify-content: center; }
}

/* Mobile: custom card view for Products/Favorites results.
   common.css applies a generic "tables become cards" at max-width:726px; we override it with a tailored layout. */
@media screen and (max-width: 726px){
  .b2b-products-hero__top{ flex-direction: column; align-items: flex-start; }
  .b2b-products-hero__right{ justify-content:flex-start; }
  .b2b-products-results__head{ flex-direction: column; align-items:flex-start; }
  .b2b-products-results__right{ text-align:left; max-width: none; }

  /* Ensure a single-column, readable list */
  .b2b-products-results .table-responsive{
    overflow: visible !important;
    border: 0 !important;
    background: transparent !important;
  }
  .b2b-products-table thead{ display: none !important; }
  .b2b-products-table tbody{
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .b2b-products-table tr{
    display: block !important;
    width: 100% !important;
    border-radius: 18px !important;
    border: 1px solid rgba(15,23,42,.10) !important;
    background: rgba(255,255,255,.80) !important;
    box-shadow: 0 14px 30px rgba(2,6,23,.08);
    padding: 12px 12px 10px !important;
    margin: 0 !important;
  }
  .b2b-products-table td{
    display: block !important;
    width: 100% !important;
    border: 0 !important;
    border-bottom: 1px dashed rgba(15,23,42,.10) !important;
    padding: 8px 0 !important;
    text-align: left !important;
  }
  /* Order cells often have .bgr and no borders in legacy mobile rules; keep them consistent */
  .b2b-products-table td.bgr{
    background: transparent !important;
  }
  .b2b-products-table td.bgr:before{
    display: block !important;
  }
  .b2b-products-table td:last-child{ border-bottom: 0 !important; }

  /* Title line */
  .b2b-products-table td.title{
    padding-top: 2px !important;
  }
  .b2b-products-table td.title .pname{
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    font-weight: 900;
  }
  .b2b-products-table td.title .pname mark.search-hl{ padding: 0 2px; }
  .b2b-products-table td.title .subtitle{
    margin-top: 4px;
    color: rgba(15,23,42,.62);
    font-weight: 700;
  }

  /* Use existing data-title labels (from rendered cells) but make them readable and non-overlapping */
  .b2b-products-table td:before{
    content: attr(data-title) !important;
    display: block !important;
    font-family: inherit !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    line-height: 14px !important;
    color: rgba(15,23,42,.52) !important;
    margin-bottom: 4px !important;
    white-space: normal !important;
  }
  /* The title cell doesn't need a label */
  .b2b-products-table td.title:before{ content: none !important; display:none !important; }

  /* Bring back NZOK columns on mobile (overrides 900px hide rule) */
  .b2b-products-table th:nth-child(5),
  .b2b-products-table td:nth-child(5),
  .b2b-products-table th:nth-child(6),
  .b2b-products-table td:nth-child(6){
    display: block !important;
  }

  /* Controls inside cards */
  .b2b-products-results td .input-group.relative{
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
  }
  .b2b-products-results td .input-group.relative .pr-ac{
    flex-wrap: wrap;
    gap: 8px;
  }
  .b2b-products-results td .input-group.relative input.qty{
    width: 64px !important;
    height: 36px !important;
  }
  .b2b-products-results .pr-ac > a.add-to-cart-always{
    width: 100%;
    justify-content: center;
    margin-top: 2px;
  }
}

/* Modal backdrop */
/* Disable Bootstrap backdrop entirely (prevents click-blocking overlays) */
.modal-backdrop,
.modal-backdrop.fade,
.modal-backdrop.show{
  display: none !important;
  opacity: 0 !important;
}
body.modal-open{
  overflow: auto !important;
  padding-right: 0 !important;
}

/* Custom dim overlay for our popups (safer than bootstrap backdrop) */
/* Apply to ALL modals for consistent blurred background */
.modal.show::before{
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, .55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1990; /* above page (incl. footer), below modal dialog */
  animation: b2bDimIn .14s ease-out;
}
.modal.show{
  z-index: 2000; /* ensure the overlay is above any site stacking contexts */
}
.modal.show .modal-dialog{
  position: relative;
  z-index: 2000;
}

/* Make reorder modal body reliably scrollable (mouse wheel + touch) */
#reorder-modal .modal-body{
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
@keyframes b2bDimIn{
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Small UI polish */
.text-muted{ color: var(--b2b-muted) !important; }
a{ color: #2563eb; }
a:hover{ color: #1d4ed8; }

/* Modern alerts (Bootstrap .alert) */
.alert{
  border-radius: 16px;
  border: 1px solid rgba(15,23,42,.10);
  box-shadow: 0 12px 26px rgba(2,6,23,.08);
}
.alert .close{
  opacity: 1;
  text-shadow: none;
}
.alert .close:focus{ box-shadow: var(--b2b-glow) !important; }
.alert-success{
  background: rgba(16,185,129,.10) !important;
  border-color: rgba(16,185,129,.22) !important;
  color: rgba(6,95,70,.95) !important;
}
.alert-warning{
  background: rgba(245,158,11,.10) !important;
  border-color: rgba(245,158,11,.22) !important;
  color: rgba(120,53,15,.95) !important;
}
.alert-danger{
  background: rgba(239,68,68,.10) !important;
  border-color: rgba(239,68,68,.22) !important;
  color: rgba(127,29,29,.95) !important;
}
.alert-info, .alert-primary{
  background: rgba(59,130,246,.10) !important;
  border-color: rgba(59,130,246,.22) !important;
  color: rgba(30,58,138,.95) !important;
}

/* Toast popups */
#b2b-toast-container{
  position: fixed;
  top: 118px;
  right: 14px;
  z-index: 10050;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(420px, calc(100vw - 28px));
  pointer-events: none; /* allow clicks to pass through, except on toast itself */
}
.b2b-toast{
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 12px 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 18px 50px rgba(2,6,23,.16);
  animation: b2bToastIn .16s ease-out;
}
.b2b-toast.is-leaving{
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .16s ease, transform .16s ease;
}
.b2b-toast__text{
  font-weight: 800;
  font-size: 13px;
  line-height: 18px;
  color: rgba(15,23,42,.92);
}
.b2b-toast__close{
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.7);
  color: rgba(15,23,42,.75);
  font-size: 18px;
  line-height: 26px;
  padding: 0;
}
.b2b-toast__close:hover{ background: rgba(255,255,255,.9); }
.b2b-toast__close:focus{ box-shadow: var(--b2b-glow) !important; outline: none; }
.b2b-toast__action{
  border: 1px solid rgba(15,23,42,.14);
  background: rgba(255,255,255,.72);
  color: rgba(15,23,42,.86);
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 900;
  font-size: 12px;
  line-height: 16px;
}
.b2b-toast__action:hover{ background: rgba(255,255,255,.92); }
.b2b-toast__action:focus{ box-shadow: var(--b2b-glow) !important; outline: none; }
.b2b-toast--success{ border-color: rgba(16,185,129,.26); }
.b2b-toast--warning{ border-color: rgba(245,158,11,.28); }
.b2b-toast--danger{ border-color: rgba(239,68,68,.28); }
.b2b-toast--info{ border-color: rgba(59,130,246,.26); }
@keyframes b2bToastIn{
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
@media screen and (max-width: 520px){
  #b2b-toast-container{
    top: auto;
    bottom: 14px;
    right: 12px;
    left: 12px;
    max-width: none;
  }
}

/* Favorites heart + change badge */
.fav-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-left: 6px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.85);
  vertical-align: middle;
  padding: 0;
}
.fav-btn:focus{ outline: none; box-shadow: var(--b2b-glow) !important; }
.fav-btn::before{
  font-family: "FontAwesome";
  content: "\f08a"; /* heart-o */
  font-size: 14px;
  line-height: 1;
  color: rgba(15,23,42,.62);
}
.fav-btn.active{
  border-color: rgba(239,68,68,.25);
  background: rgba(239,68,68,.10);
}
.fav-btn.active::before{
  content: "\f004"; /* heart */
  color: rgba(239,68,68,.92);
}
.b2b-fav-change{
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(245,158,11,.26);
  background: rgba(245,158,11,.12);
  color: rgba(120,53,15,.92);
  font-weight: 900;
  font-size: 11px;
  line-height: 14px;
}

.fav-note-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-left: 6px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.85);
  vertical-align: middle;
  padding: 0;
}

/* Favorites bulk actions */
.b2b-fav-bulk{
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.60);
}
.b2b-fav-bulk__left, .b2b-fav-bulk__right{
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.b2b-fav-select{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-right: 8px;
  vertical-align: middle;
  cursor: pointer;
}
.b2b-fav-select input{
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.b2b-fav-select span{
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1px solid rgba(15,23,42,.20);
  background: rgba(255,255,255,.9);
  box-shadow: 0 6px 14px rgba(2,6,23,.08);
  position: relative;
}
.b2b-fav-select input:focus + span{
  box-shadow: var(--b2b-glow) !important;
}
.b2b-fav-select input:checked + span{
  background: rgba(59,130,246,.14);
  border-color: rgba(59,130,246,.35);
}
.b2b-fav-select input:checked + span::after{
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid rgba(30,58,138,.92);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.fav-note-btn:focus{ outline: none; box-shadow: var(--b2b-glow) !important; }
.fav-note-btn::before{
  font-family: "FontAwesome";
  content: "\f249"; /* sticky-note-o */
  font-size: 14px;
  line-height: 1;
  color: rgba(15,23,42,.60);
}
.fav-note-btn.active{
  border-color: rgba(59,130,246,.24);
  background: rgba(59,130,246,.12);
}
.fav-note-btn.active::before{
  color: rgba(30,58,138,.92);
}

.cart-note{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-left: 6px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.85);
  color: rgba(15,23,42,.62);
  text-decoration: none;
  vertical-align: middle;
}
.cart-note:hover{ background: rgba(255,255,255,.95); color: rgba(15,23,42,.82); text-decoration:none; }
.cart-note:focus{ outline: none; box-shadow: var(--b2b-glow) !important; }
.cart-note.active{
  border-color: rgba(59,130,246,.24);
  background: rgba(59,130,246,.12);
  color: rgba(30,58,138,.92);
}
.cart-note.saving{
  opacity: .7;
  pointer-events: none;
}

/* Cart modal (popup cart) */
.b2b-cart-modal__content{
  overflow: hidden;
  box-shadow: 0 28px 70px rgba(2, 6, 23, .28) !important;
}
.b2b-cart-modal__dialog{
  filter: drop-shadow(0 22px 60px rgba(2, 6, 23, .22));
}
.b2b-cart-modal__header{
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.72));
  border-bottom: 1px solid var(--b2b-border);
}
.b2b-cart-modal__meta{
  margin-top: 6px;
}
.b2b-cart-modal__channel{
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(59,130,246,.10);
  color: #1d4ed8;
  font-weight: 700;
  font-size: 12px;
}
.nzok-modal .b2b-cart-modal__channel{
  background: rgba(16,185,129,.12);
  color: #047857;
}
#cart-modal-total-sum{
  font-weight: 700;
  color: var(--b2b-text);
}
.b2b-cart-table{
  background: transparent;
}
.b2b-cart-table thead th{
  background: rgba(255,255,255,.65);
}
.b2b-cart-empty{
  border-radius: 14px;
  border: 1px dashed rgba(15,23,42,.18);
  background: rgba(255,255,255,.72);
}
.b2b-cart-empty__title{
  font-weight: 800;
  display:flex;
  align-items:center;
  gap:10px;
}
.b2b-cart-empty__title .fa{
  color:#2563eb;
}

/* Footer buttons spacing + icons */
#cart-modal .modal-footer .btn .fa{ margin-right: 10px; }

