.b2b-sales {
  --b2b-sales-bg: #ffffff;
  --b2b-sales-border: #e5e7eb;
  --b2b-sales-text: #0f172a;
  --b2b-sales-muted: #64748b;
  --b2b-sales-primary: var(--b2b-portal-header-bg, #2563eb);
  --b2b-sales-primary-hover: var(--b2b-portal-header-bg-hover, #1d4ed8);
  --b2b-sales-radius: 14px;
  --b2b-sales-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  max-width: none;
  width: auto;
  margin: 0;
  padding: 0;
  color: var(--b2b-sales-text);
  box-sizing: border-box;
}

.b2b-sales__header {
  margin-bottom: 24px;
}

.b2b-sales__title {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 2vw, 2rem);
  line-height: 1.2;
}

.b2b-sales__subtitle {
  margin: 0;
  color: var(--b2b-sales-muted);
}

.b2b-sales-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.b2b-sales-card {
  background: var(--b2b-sales-bg);
  border: 1px solid var(--b2b-sales-border);
  border-radius: var(--b2b-sales-radius);
  box-shadow: var(--b2b-sales-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.b2b-sales-card__image img {
  display: block;
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: #f8fafc;
}

.b2b-sales-card__body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.b2b-sales-card__title {
  margin: 0;
  font-size: 1rem;
}

.b2b-sales-card__sku,
.b2b-sales-muted {
  color: var(--b2b-sales-muted);
  font-size: 0.875rem;
}

.b2b-sales-card__desc {
  font-size: 0.875rem;
  color: var(--b2b-sales-muted);
}

.b2b-sales-card__footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.b2b-sales-card__price {
  font-weight: 700;
}

.b2b-sales-card__variations {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 4px;
}

.b2b-sales-card__variation-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.875rem;
}

.b2b-sales-card__variation-field > span {
  font-weight: 600;
  color: var(--b2b-sales-text);
}

.b2b-sales-card__price-prefix {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--b2b-sales-muted);
  margin-right: 4px;
}

.b2b-sales-card--variable .b2b-sales-add-to-cart:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.b2b-sales-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.b2b-sales-btn--primary {
  background: var(--b2b-sales-primary);
  color: #fff;
}

.b2b-sales-btn--primary:hover,
.b2b-sales-btn--primary:focus {
  background: var(--b2b-sales-primary-hover);
  color: #fff;
}

.b2b-sales-btn--secondary {
  background: #fff;
  border-color: var(--b2b-sales-border);
  color: var(--b2b-sales-text);
}

.b2b-sales-btn--ghost {
  background: transparent;
  border-color: var(--b2b-sales-border);
  color: var(--b2b-sales-text);
}

.b2b-sales-btn--sm {
  padding: 6px 10px;
  font-size: 0.8125rem;
}

.b2b-sales-btn.is-loading {
  opacity: 0.7;
  pointer-events: none;
}

.b2b-sales-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--b2b-sales-border);
  border-radius: var(--b2b-sales-radius);
  background: #fff;
}

.b2b-sales-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.b2b-sales-table th,
.b2b-sales-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--b2b-sales-border);
  text-align: left;
  vertical-align: middle;
}

.b2b-sales-table thead th {
  background: #f8fafc;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--b2b-sales-muted);
}

.b2b-sales-input {
  width: 100%;
  border: 1px solid var(--b2b-sales-border);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
}

.b2b-sales-input--qty {
  width: 88px;
}

.b2b-sales-input:focus {
  outline: none;
  border-color: var(--b2b-sales-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.b2b-sales-actions {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.b2b-sales-notice {
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 20px;
}

.b2b-sales-notice--info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.b2b-sales-notice--success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}

.b2b-sales-notice--warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
}

.b2b-sales-notice--error {
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.b2b-sales-checkout__grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 20px;
}

.b2b-sales-panel {
  background: #fff;
  border: 1px solid var(--b2b-sales-border);
  border-radius: var(--b2b-sales-radius);
  box-shadow: var(--b2b-sales-shadow);
  padding: 20px;
}

.b2b-sales-panel h3 {
  margin-top: 0;
}

.b2b-sales-checkout__lines {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}

.b2b-sales-checkout__lines li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--b2b-sales-border);
}

.b2b-sales-checkout__total {
  font-size: 1.125rem;
}

.b2b-sales-finance {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--b2b-sales-border);
  font-size: 0.875rem;
  color: var(--b2b-sales-muted);
}

.b2b-sales-delivery-preview {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: var(--b2b-sales-radius-sm, 8px);
  background: var(--b2b-sales-surface-muted, #f6f7f8);
  border: 1px solid var(--b2b-sales-border);
  font-size: 0.875rem;
  color: var(--b2b-sales-muted);
  line-height: 1.45;
}

.b2b-sales-payment-methods,
.b2b-sales-shipping-methods {
  margin: 0 0 18px;
  padding: 0;
  border: 0;
}

.b2b-sales-payment-methods legend,
.b2b-sales-shipping-methods legend {
  font-weight: 600;
  margin-bottom: 10px;
  padding: 0;
}

.b2b-sales-payment-option,
.b2b-sales-shipping-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  padding: 12px 14px;
  border: 1px solid var(--b2b-sales-border);
  border-radius: var(--b2b-sales-radius-sm, 8px);
  cursor: pointer;
}

.b2b-sales-payment-option input,
.b2b-sales-shipping-option input {
  margin-top: 3px;
}

.b2b-sales-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.b2b-sales-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.b2b-sales-field--full {
  grid-column: 1 / -1;
}

.b2b-sales-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.b2b-sales-tabs__link {
  display: inline-flex;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--b2b-sales-border);
  text-decoration: none;
  color: var(--b2b-sales-text);
  background: #fff;
}

.b2b-sales-tabs__link.is-active {
  background: var(--b2b-sales-primary);
  border-color: var(--b2b-sales-primary);
  color: #fff;
}

.b2b-sales-dl {
  display: grid;
  gap: 12px;
}

.b2b-sales-dl div {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 12px;
}

.b2b-sales-dl dt {
  color: var(--b2b-sales-muted);
}

.b2b-sales-dl dd {
  margin: 0;
  font-weight: 600;
}

.b2b-sales-status {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  background: #f1f5f9;
}

.b2b-sales-status--prejeto { background: #dbeafe; color: #1d4ed8; }
.b2b-sales-status--v_obdelavi { background: #fef3c7; color: #b45309; }
.b2b-sales-status--poslano { background: #ede9fe; color: #6d28d9; }
.b2b-sales-status--zakljuceno { background: #dcfce7; color: #15803d; }

.b2b-sales-doc-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.b2b-portal-nav {
  display: none;
}

:root {
  --b2b-portal-header-bg: #2563eb;
  --b2b-portal-header-bg-hover: #1d4ed8;
  --b2b-portal-header-height: 64px;
}

/* B2B portal — brez lastne širinske ovojnice; širino določa tema. */
body.b2b-sales-portal-page.b2b-sales-portal-authed,
body.b2b-sales-has-portal-header.b2b-sales-portal-authed {
  background: transparent;
}

body.b2b-sales-portal-page.b2b-portal-nav-open {
  overflow: hidden;
}

.b2b-portal-header-slot {
  position: sticky;
  top: 0;
  z-index: 10050;
  width: 100%;
}

body.admin-bar.b2b-portal-header-mounted .b2b-portal-header-slot {
  top: 32px;
}

@media (max-width: 782px) {
  body.admin-bar.b2b-portal-header-mounted .b2b-portal-header-slot {
    top: 46px;
  }
}

.b2b-portal-header {
  position: relative;
  top: auto;
  z-index: 1;
  width: 100%;
  background: var(--b2b-portal-header-bg);
  color: #fff;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.18);
}

body.b2b-sales-has-portal-header #masthead,
body.b2b-sales-has-portal-header .elementor-location-header,
body:has(.b2b-portal-header) #masthead,
body:has(.b2b-portal-header) .elementor-location-header,
body:has(.b2b-portal-header-slot) #masthead,
body.b2b-portal-header-mounted #masthead {
  display: none !important;
  height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

/* Twenty Seventeen — skrij hero sliko in privzeto glavo teme. */
body:has(.b2b-portal-header) .custom-header-media,
body:has(.b2b-portal-header-slot) .custom-header-media,
body.b2b-sales-has-portal-header .custom-header-media,
body:has(.b2b-portal-header) #wp-custom-header,
body:has(.b2b-portal-header-slot) #wp-custom-header,
body.b2b-sales-has-portal-header #wp-custom-header,
body.b2b-portal-header-mounted .custom-header-media,
body.b2b-portal-header-mounted #wp-custom-header {
  display: none !important;
  height: 0 !important;
  max-height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

body:has(.b2b-portal-header) .site-content-contain,
body:has(.b2b-portal-header-slot) .site-content-contain,
body.b2b-sales-has-portal-header .site-content-contain,
body.b2b-portal-header-mounted .site-content-contain {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

body:has(.b2b-portal-header).page-two-column .site-content,
body:has(.b2b-portal-header-slot).page-two-column .site-content,
body.b2b-sales-has-portal-header.page-two-column .site-content {
  float: none !important;
  width: 100% !important;
}

body:has(.b2b-portal-header) #secondary,
body:has(.b2b-portal-header-slot) #secondary,
body.b2b-sales-has-portal-header #secondary {
  display: none !important;
}

body.b2b-sales-has-portal-header .entry-header,
body.b2b-sales-has-portal-header .page-header,
body.b2b-portal-header-mounted .entry-header,
body.b2b-portal-header-mounted .page-header,
body:has(.b2b-portal-header) .entry-header,
body:has(.b2b-portal-header-slot) .entry-header,
body.b2b-sales-has-portal-header .elementor-widget-theme-post-title {
  display: none !important;
}

body.b2b-sales-has-portal-header .site-content,
body.b2b-portal-header-mounted .site-content,
body:has(.b2b-portal-header-slot) .site-content,
body.b2b-sales-has-portal-header .entry-content,
body.b2b-portal-header-mounted .entry-content {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

body.b2b-sales-has-portal-header.has-header-image .site-content,
body.b2b-sales-has-portal-header.has-header-image .site-content-contain {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

.b2b-portal-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: var(--b2b-portal-header-height);
  padding: 8px 24px;
  box-sizing: border-box;
}

.b2b-portal-header__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex: 1 1 auto;
  min-width: 0;
}

.b2b-portal-header__toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.b2b-portal-header__toggle:hover,
.b2b-portal-header__toggle:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  outline: none;
}

.b2b-portal-header__toggle-box {
  width: 22px;
  height: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.b2b-portal-header__toggle-line {
  display: block;
  height: 2.5px;
  border-radius: 2px;
  background: currentColor;
}

.b2b-portal-header__brand {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  text-decoration: none;
  color: #fff;
}

.b2b-portal-header__logo {
  display: block;
  max-height: 44px;
  width: auto;
  height: auto;
}

.b2b-portal-header__brand-text {
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.b2b-portal-header__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1 1 auto;
  flex-wrap: wrap;
  min-width: 0;
}

.b2b-portal-header__link,
.b2b-portal-header__logout,
.b2b-portal-header__login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.b2b-portal-header__link:hover,
.b2b-portal-header__link:focus-visible,
.b2b-portal-header__logout:hover,
.b2b-portal-header__logout:focus-visible,
.b2b-portal-header__login:hover,
.b2b-portal-header__login:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  outline: none;
}

.b2b-portal-header__link.is-active {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.b2b-portal-header__logout,
.b2b-portal-header__login {
  margin-left: 4px;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.b2b-portal-nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 10060;
}

.b2b-portal-nav-drawer__overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.b2b-portal-nav-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(320px, 100vw);
  height: 100%;
  background: #fff;
  box-shadow: -8px 0 30px rgba(15, 23, 42, 0.18);
  display: flex;
  flex-direction: column;
}

.b2b-portal-nav-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--b2b-portal-header-height);
  padding: 12px 16px;
  border-bottom: 1px solid var(--b2b-sales-border);
  background: var(--b2b-portal-header-bg);
  color: #fff;
}

.b2b-portal-nav-drawer__close {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.b2b-portal-nav-drawer__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  overflow-y: auto;
}

.b2b-portal-nav-drawer__link {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--b2b-sales-text);
  font-weight: 600;
}

.b2b-portal-nav-drawer__link:hover,
.b2b-portal-nav-drawer__link:focus-visible {
  background: #f8fafc;
  outline: none;
}

.b2b-portal-nav-drawer__link.is-active {
  background: rgba(37, 99, 235, 0.12);
  color: var(--b2b-portal-header-bg);
}

.b2b-portal-nav-drawer__link--logout {
  margin-top: 8px;
  border: 1px solid var(--b2b-sales-border);
}

.b2b-sales-home .b2b-portal-dashboard__layout {
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr) !important;
  align-items: start;
  width: 100%;
}

.b2b-sales-home .b2b-portal-dashboard__aside {
  order: -1;
}

.b2b-sales-home .b2b-portal-quick-actions--aside .b2b-portal-quick-actions__grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.b2b-sales-home .b2b-portal-rules-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
}

@media (max-width: 1024px) {
  .b2b-sales-home .b2b-portal-rules-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .b2b-sales-home .b2b-portal-rules-grid {
    grid-template-columns: 1fr;
  }
}

.b2b-sales-profile__layout {
  display: block;
}

.b2b-sales-profile__sidebar {
  margin-bottom: 20px;
}

.b2b-sales-profile__main {
  min-width: 0;
}

/* Namizni prikaz portala (računalnik / tablica v ležečem načinu) */
@media (min-width: 769px) {
  .b2b-portal-header__toggle {
    display: none !important;
  }

  .b2b-portal-header__actions {
    display: flex !important;
  }

  .b2b-portal-header__nav,
  .b2b-portal-header__logout,
  .b2b-portal-header__login {
    display: inline-flex !important;
  }

  .b2b-sales-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
  }

  .b2b-sales-profile__layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
  }

  .b2b-sales-profile__sidebar {
    position: sticky;
    top: calc(var(--b2b-portal-header-height, 64px) + 16px);
    margin-bottom: 0;
  }

  .b2b-sales-profile__sidebar .b2b-sales-tabs--profile {
    flex-direction: column;
    flex-wrap: nowrap;
    overflow: visible;
    margin-bottom: 0;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--b2b-sales-border);
    border-radius: var(--b2b-sales-radius);
    box-shadow: var(--b2b-sales-shadow);
  }

  .b2b-sales-profile__sidebar .b2b-sales-tabs__link {
    flex: 0 0 auto;
    width: 100%;
    justify-content: flex-start;
    border-radius: 10px;
    white-space: normal;
    text-align: left;
  }

  .b2b-sales-card__footer {
    flex-direction: row;
    align-items: center;
  }

  .b2b-sales-card__footer .b2b-sales-btn {
    width: auto;
  }

  .b2b-sales-actions {
    flex-direction: row;
  }

  .b2b-sales-actions .b2b-sales-btn {
    width: auto;
  }

  .b2b-sales-field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .b2b-sales-dl div {
    grid-template-columns: 160px 1fr;
  }
}

.b2b-sales-dashboard__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.b2b-sales-actions--stack {
  flex-direction: column;
  align-items: stretch;
}

.b2b-sales-actions--stack .b2b-sales-btn {
  width: 100%;
}

.b2b-sales-gate {
  padding: 24px 0;
}

.b2b-portal-auth {
  max-width: 720px;
  margin: 0 auto;
}

.b2b-portal-auth__intro {
  margin-bottom: 20px;
}

.b2b-portal-auth__tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--b2b-sales-border, rgba(15, 23, 42, 0.12));
}

.b2b-portal-auth__tab {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 12px 16px;
  font: inherit;
  font-weight: 600;
  color: var(--b2b-sales-muted, #64748b);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.b2b-portal-auth__tab.is-active {
  color: var(--b2b-sales-primary, #2563eb);
  border-bottom-color: var(--b2b-sales-primary, #2563eb);
}

.b2b-portal-auth__panel {
  background: var(--b2b-sales-surface, #fff);
  border: 1px solid var(--b2b-sales-border, rgba(15, 23, 42, 0.12));
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.b2b-portal-auth__field {
  margin: 0 0 16px;
}

.b2b-portal-auth__field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

.b2b-portal-auth__input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid var(--b2b-sales-border, rgba(15, 23, 42, 0.12));
  border-radius: 10px;
  font: inherit;
}

.b2b-portal-auth__field--checkbox label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.b2b-portal-auth__actions {
  margin: 8px 0 0;
}

.b2b-portal-auth__notice {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 10px;
}

.b2b-portal-auth__notice--error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.b2b-portal-auth__registration .b2b-portal-wrapper {
  max-width: none;
  margin: 0;
}

.b2b-portal-auth__registration .b2b-portal-wrapper > h3 {
  margin-top: 0;
}

.b2b-sales-notice--warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  border-radius: 12px;
  padding: 16px 18px;
}

.b2b-sales-price {
  white-space: nowrap;
}

.b2b-sales-price__amount {
  font-weight: 700;
}

.b2b-sales-tabs--profile {
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--b2b-sales-border);
}

.b2b-sales-profile--account > .b2b-sales-tabs--profile {
  margin-top: 0;
}

.b2b-sales-tabs--profile::-webkit-scrollbar {
  display: none;
}

.b2b-sales-tabs--profile .b2b-sales-tabs__link {
  flex: 0 0 auto;
  white-space: nowrap;
  font-weight: 600;
  font-size: 14px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.b2b-sales-tabs--profile .b2b-sales-tabs__link:hover {
  border-color: var(--b2b-sales-primary);
  color: var(--b2b-sales-primary);
}

.b2b-sales-tabs--profile .b2b-sales-tabs__link.is-active:hover {
  color: #fff;
}

.b2b-sales-profile-tab-content {
  margin-top: 8px;
}

.b2b-sales-profile-tab-content .b2b-portal-card,
.b2b-sales-profile-tab-content .b2b-portal-automation-page,
.b2b-sales-profile-tab-content .b2b-portal-legal-terms-page,
.b2b-sales-profile-tab-content .b2b-portal-payment-methods-page {
  margin-bottom: 20px;
}

/* WC-free profil partnerja — enoten dizajn kot zavihek Servis */
.b2b-sales-profile {
  --b2b-portal-bg: #ffffff;
  --b2b-portal-surface: #ffffff;
  --b2b-portal-border: rgba(15, 23, 42, 0.08);
  --b2b-portal-text: #0f172a;
  --b2b-portal-muted: #64748b;
  --b2b-portal-accent: var(--b2b-sales-primary, #2563eb);
  --b2b-portal-accent-soft: rgba(37, 99, 235, 0.12);
  --b2b-portal-radius: 16px;
  --b2b-portal-radius-sm: 12px;
  --b2b-portal-shadow: 0 1px 2px rgba(15, 23, 42, 0.05), 0 12px 32px rgba(15, 23, 42, 0.06);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.b2b-sales-profile *,
.b2b-sales-profile *::before,
.b2b-sales-profile *::after {
  box-sizing: border-box;
}

.b2b-sales-profile .b2b-portal-card,
.b2b-sales-profile .b2b-sales-profile-panel .b2b-profile-section {
  background: var(--b2b-portal-surface);
  border: 1px solid var(--b2b-portal-border);
  border-radius: var(--b2b-portal-radius);
  box-shadow: var(--b2b-portal-shadow);
  padding: 22px 24px;
  color: var(--b2b-portal-text);
}

.b2b-sales-profile .b2b-portal-card--profile {
  background: linear-gradient(165deg, #ffffff 0%, #f8fafc 100%);
}

.b2b-sales-profile .b2b-portal-card__title,
.b2b-sales-profile .b2b-profile-section .b2b-portal-card__title {
  margin: 0 0 12px;
  font-size: 1.06rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--b2b-portal-text);
}

.b2b-sales-profile .b2b-profile-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 0;
}

@media (min-width: 769px) {
  .b2b-sales-profile .b2b-profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.b2b-sales-profile .b2b-profile-grid > .b2b-profile-section {
  margin: 0;
  min-width: 0;
  height: fit-content;
}

.b2b-sales-profile .b2b-profile-grid > .b2b-profile-section:has(.b2b-profile-section__form-panel:not([hidden])) {
  grid-column: 1 / -1;
}

.b2b-sales-profile .b2b-profile-grid > .b2b-profile-section.b2b-partner-sub-users:has(.b2b-sub-user-card__edit-panel:not([hidden])) {
  grid-column: 1 / -1;
}

.b2b-sales-profile .b2b-profile-section__summary {
  margin-top: 4px;
}

.b2b-sales-profile .b2b-profile-section__actions {
  margin: 16px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.b2b-sales-profile .b2b-profile-section__form-panel {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #eef0f2;
}

.b2b-sales-profile .b2b-profile-section__form-panel[hidden] {
  display: none !important;
}

.b2b-sales-profile .b2b-profile-section__empty {
  margin: 8px 0 0;
  color: var(--b2b-portal-muted);
  font-size: 0.92rem;
}

.b2b-sales-profile .b2b-portal-profile-dl > div {
  padding: 10px 0;
  border-bottom: 1px solid #eef0f2;
}

.b2b-sales-profile .b2b-portal-profile-dl > div:last-child {
  border-bottom: 0;
}

.b2b-sales-profile .b2b-portal-profile-dl dt {
  margin: 0 0 4px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--b2b-portal-muted);
}

.b2b-sales-profile .b2b-portal-profile-dl dd {
  margin: 0;
  font-size: 0.95rem;
  color: var(--b2b-portal-text);
}

.b2b-sales-profile .b2b-profile-address-summary__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 480px) {
  .b2b-sales-profile .b2b-profile-address-summary__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.b2b-sales-profile .b2b-profile-address-summary__card {
  background: #f8fafc;
  border: 1px solid #e8ecf4;
  border-radius: 12px;
  padding: 14px 16px;
}

.b2b-sales-profile .b2b-profile-address-summary__card--active {
  border-color: rgba(37, 99, 235, 0.28);
  background: linear-gradient(165deg, #ffffff 0%, #f5f8ff 100%);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.08);
}

.b2b-sales-profile .b2b-profile-address-summary__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-bottom: 10px;
}

.b2b-sales-profile .b2b-profile-address-summary__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: #eef2f7;
  color: #50575e;
}

.b2b-sales-profile .b2b-profile-address-summary__title {
  margin: 0;
  flex: 1 1 auto;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--b2b-portal-muted);
}

.b2b-sales-profile .b2b-profile-address-summary__body {
  font-size: 0.92rem;
  line-height: 1.5;
}

.b2b-sales-profile .b2b-profile-address-summary__unit-name {
  margin: 0 0 8px;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--b2b-portal-text, #0f172a);
}

.b2b-sales-profile .b2b-profile-address-summary__company-name {
  margin: 0 0 8px;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--b2b-portal-text, #0f172a);
}

.b2b-sales-profile .b2b-profile-address-summary__address {
  margin: 0 0 10px;
}

.b2b-sales-profile .b2b-profile-address-summary__tax-id {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
}

.b2b-sales-profile .b2b-profile-address-summary__tax-label {
  font-weight: 600;
}

.b2b-sales-profile .b2b-profile-address-summary__units-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.b2b-sales-profile .b2b-profile-address-summary__unit-item + .b2b-profile-address-summary__unit-item {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e8ecf4;
}

.b2b-sales-profile .b2b-profile-address-summary__unit-item .b2b-profile-address-summary__address {
  margin-bottom: 0;
}

.b2b-sales-profile .b2b-profile-address-summary__empty {
  margin: 0;
}

.b2b-sales-profile .b2b-pe-units-section--summary {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #eef0f2;
}

.b2b-sales-profile .b2b-pe-units-grid--summary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 480px) {
  .b2b-sales-profile .b2b-pe-units-grid--summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.b2b-sales-profile .b2b-pe-unit-card--summary {
  background: #f8fafc;
  border: 1px solid #e8ecf4;
  border-radius: 12px;
  padding: 14px 16px;
}

.b2b-sales-profile .b2b-pe-unit-card--summary.b2b-pe-unit-card--active {
  border-color: rgba(37, 99, 235, 0.28);
  background: linear-gradient(165deg, #ffffff 0%, #f5f8ff 100%);
}

.b2b-sales-profile .b2b-sub-user-card__edit-panel {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed #e2e8f0;
}

.b2b-sales-profile .b2b-portal-payment-methods-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}

.b2b-sales-profile .b2b-portal-payment-methods-page .b2b-portal-card {
  margin-bottom: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.b2b-sales-profile .b2b-portal-automation-page,
.b2b-sales-profile .b2b-portal-legal-terms-page,
.b2b-sales-profile .b2b-portal-payment-methods-page {
  color: var(--b2b-portal-text);
}

.b2b-sales-profile .button.b2b-portal-btn-outline,
.b2b-sales-profile .b2b-profile-reveal-btn.button,
.b2b-sales-profile .button.button-small.b2b-portal-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 18px;
  border-radius: 10px;
  font-weight: 600;
  border: 1px solid var(--b2b-sales-border);
  background: #fff;
  color: var(--b2b-sales-text);
  text-decoration: none;
  cursor: pointer;
  line-height: 1.2;
}

.b2b-sales-profile .button.b2b-portal-btn-primary,
.b2b-sales-profile .button.button-primary.b2b-portal-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 18px;
  border-radius: 10px;
  font-weight: 600;
  border: 1px solid transparent;
  background: var(--b2b-sales-primary);
  color: #fff;
  cursor: pointer;
}

.b2b-sales-profile .button.b2b-portal-btn-outline:hover,
.b2b-sales-profile .b2b-profile-reveal-btn.button:hover,
.b2b-sales-profile .button.b2b-portal-btn-primary:hover,
.b2b-sales-profile .button.button-primary.b2b-portal-btn-primary:hover {
  opacity: 0.92;
}

.b2b-sales-profile .b2b-profile-reveal-btn.button[aria-expanded="true"] {
  background: #eff4ff;
  border-color: rgba(37, 99, 235, 0.28);
  color: #1d4ed8;
}

.b2b-sales-profile .woocommerce-message,
.b2b-sales-profile .woocommerce-info {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #166534;
  list-style: none;
}

.b2b-sales-profile .woocommerce-error {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b;
  list-style: none;
}

.b2b-sales-profile .b2b-sales-input,
.b2b-sales-profile .b2b-portal-stack-form input[type="text"],
.b2b-sales-profile .b2b-portal-stack-form input[type="email"],
.b2b-sales-profile .b2b-portal-stack-form input[type="password"],
.b2b-sales-profile .b2b-partner-notification-email__form input[type="email"],
.b2b-sales-profile .b2b-partner-sub-users__form input[type="text"],
.b2b-sales-profile .b2b-partner-sub-users__form input[type="email"],
.b2b-sales-profile .b2b-partner-sub-users__form input[type="password"],
.b2b-sales-profile .b2b-partner-sub-users__form select {
  width: 100%;
  max-width: 420px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--b2b-sales-border);
  border-radius: 10px;
  font-size: 0.9375rem;
}

.b2b-sales-profile .description {
  color: var(--b2b-portal-muted);
  font-size: 0.875rem;
}

@media (max-width: 768px) {
  .b2b-portal-header__inner {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 12px;
  }

  .b2b-portal-header__toggle {
    display: inline-flex;
  }

  .b2b-portal-header__actions {
    display: none;
  }

  .b2b-sales-home .b2b-portal-dashboard__layout {
    grid-template-columns: 1fr;
  }

  .b2b-sales-home .b2b-portal-dashboard__aside {
    order: -1;
  }

  .b2b-sales-profile .b2b-portal-payment-methods-grid {
    grid-template-columns: 1fr;
  }

  .b2b-sales-profile .b2b-portal-card,
  .b2b-sales-profile .b2b-sales-profile-panel .b2b-profile-section {
    padding: 18px 16px;
  }

  .b2b-sales-profile__sidebar .b2b-sales-tabs--profile {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0 0 4px;
    scrollbar-width: none;
  }

  .b2b-sales-profile__sidebar .b2b-sales-tabs--profile::-webkit-scrollbar {
    display: none;
  }

  .b2b-sales-profile__sidebar .b2b-sales-tabs__link {
    width: auto;
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

@media (max-width: 860px) {
  .b2b-sales-checkout__grid,
  .b2b-sales-field-grid,
  .b2b-sales-dl div {
    grid-template-columns: 1fr;
  }

  .b2b-sales-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
  }

  .b2b-sales-card__footer {
    flex-direction: column;
    align-items: stretch;
  }

  .b2b-sales-card__footer .b2b-sales-btn {
    width: 100%;
  }

  .b2b-sales-actions {
    flex-direction: column;
  }

  .b2b-sales-actions .b2b-sales-btn {
    width: 100%;
  }

  .b2b-sales-table {
    min-width: 560px;
  }
}

@media (max-width: 480px) {
  .b2b-sales-panel {
    padding: 16px;
  }

  .b2b-sales__title {
    font-size: 1.35rem;
  }
}

/* Prijavljeni B2B portal — brez lastnih širinskih omejitev. */
body.b2b-sales-portal-page.b2b-sales-portal-authed {
  background: transparent;
}

body.b2b-sales-portal-page .b2b-portal-dashboard {
  background: transparent;
}

@media (min-width: 960px) {
  body.b2b-sales-portal-page.b2b-sales-portal-authed .b2b-sales-profile__layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
  }

  body.b2b-sales-portal-page.b2b-sales-portal-authed .b2b-sales-profile__sidebar {
    margin-bottom: 0;
  }

  body.b2b-sales-portal-page.b2b-sales-portal-authed .b2b-sales-tabs--profile {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--b2b-sales-border, #e3e5e8);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 6px 18px rgba(16, 24, 40, 0.05);
  }

  body.b2b-sales-portal-page.b2b-sales-portal-authed .b2b-sales-tabs--profile .b2b-sales-tabs__link {
    display: block;
    padding: 10px 12px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--b2b-sales-text, #1d2327);
    font-weight: 500;
  }

  body.b2b-sales-portal-page.b2b-sales-portal-authed .b2b-sales-tabs--profile .b2b-sales-tabs__link.is-active,
  body.b2b-sales-portal-page.b2b-sales-portal-authed .b2b-sales-tabs--profile .b2b-sales-tabs__link:hover {
    background: rgba(37, 99, 235, 0.1);
    color: var(--b2b-sales-primary, #2563eb);
  }
}

/* Portal strani — belo ozadje kot tema (brez modrega okvirja). */
body.b2b-sales-portal-page,
body.b2b-sales-has-portal-header,
body.b2b-portal-header-mounted,
body:has(.b2b-portal-header-slot) {
  background: #fff;
}

body.b2b-sales-portal-page .site-content-contain,
body.b2b-sales-has-portal-header .site-content-contain,
body:has(.b2b-portal-header-slot) .site-content-contain {
  background: #fff;
}

body.b2b-sales-portal-home .b2b-sales-home .b2b-portal-dashboard__header {
  margin-top: 0;
  margin-bottom: 20px;
  padding: 18px 22px;
}

body.b2b-sales-portal-home .b2b-sales-home .b2b-portal-dashboard__aside {
  margin-top: 0;
  margin-bottom: 8px;
}

/* Portal — brez lastnih max-width; širino določa tema (.wrap ipd.). */
body.b2b-sales-portal-page .b2b-sales,
body.b2b-sales-portal-page .b2b-order-form-wrapper,
body.b2b-sales-portal-page .b2b-portal-dashboard--sales-portal,
body.b2b-sales-portal-page .b2b-portal-dashboard__shell {
  max-width: none;
  width: auto;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
  box-sizing: border-box;
}
