:root {
  --portal-frame-bg: linear-gradient(180deg, #c2c2c2 0%, #b6b6b6 100%);
  --portal-frame-width: min(1460px, calc(100vw - 40px));
  --portal-frame-wide-width: min(1840px, calc(100vw - 8px));
  --portal-frame-padding: 42px 36px 36px;
  --portal-frame-tablet-padding: 20px 18px 18px;
  --portal-frame-mobile-width: min(100vw - 8px, 100%);
  --portal-frame-mobile-padding: 20px 6px 18px;
  --portal-frame-gap: 18px;
  --portal-frame-mobile-gap: 14px;
}

body,
body.portal-home,
body.portal-home.home-landing,
body.portal-home.placeholder-home,
body.portal-home.inbound-body.inbound-home,
body.portal-home.inbound-body.inbound-home.piece-body,
body.piece-body,
body.portal-home.finance-discount-home,
body.portal-home.downloads-home,
body.portal-home.skyz-home,
body.mobile-return-body,
body.settlement-guard {
  background: var(--portal-frame-bg) !important;
}

body::before,
body.portal-home::before,
body.portal-home.home-landing::before,
body.portal-home.placeholder-home::before,
body.portal-home.inbound-body.inbound-home::before,
body.portal-home.inbound-body.inbound-home.piece-body::before,
body.piece-body::before,
body.portal-home.finance-discount-home::before,
body.portal-home.downloads-home::before,
body.portal-home.skyz-home::before,
body.mobile-return-body::before,
body.settlement-guard::before {
  content: "" !important;
  position: fixed !important;
  inset: 0 !important;
  pointer-events: none !important;
  opacity: 0.18 !important;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 100%),
    linear-gradient(0deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 100%) !important;
  background-size: 110px 110px !important;
}

.portal-frame,
.portal-home.home-landing .portal-page,
.inventory-page,
.portal-home.inbound-home .inbound-page,
.portal-home.inbound-home .piece-page,
.payment-page,
.portal-home.finance-discount-home .finance-page,
.ledger-page,
.db-manager-page,
.settlement-page,
.portal-home.downloads-home .downloads-page,
.portal-home.skyz-home .skyz-page,
.portal-home.placeholder-home .placeholder-page,
.placeholder-page,
.mobile-return-page {
  width: var(--portal-frame-width) !important;
  max-width: none !important;
  margin: 0 auto !important;
  padding: var(--portal-frame-padding) !important;
}

.portal-wide-frame,
.purchase-page,
.app-main {
  width: var(--portal-frame-wide-width) !important;
  max-width: none !important;
  margin: 0 auto !important;
  padding: var(--portal-frame-padding) !important;
}

.portal-frame,
.portal-wide-frame,
.portal-home.home-landing .portal-page,
.portal-home.inbound-home .inbound-page,
.portal-home.inbound-home .piece-page,
.portal-home.finance-discount-home .finance-page,
.portal-home.downloads-home .downloads-page,
.portal-home.skyz-home .skyz-page,
.portal-home.placeholder-home .placeholder-page,
.portal-page,
.inventory-page,
.inbound-page,
.piece-page,
.payment-page,
.finance-page,
.ledger-page,
.db-manager-page,
.downloads-page,
.skyz-page,
.placeholder-page,
.mobile-return-page,
.purchase-page,
.app-main {
  gap: var(--portal-frame-gap) !important;
}

a.home-link,
a.back-link,
a.subpage-home-link,
a.inbound-home-link,
body.portal-home .page-header.subpage-titlebar a.home-link.subpage-home-link,
body.portal-home .page-header.subpage-titlebar a.back-link.subpage-home-link,
body.portal-home .subpage-titlebar a.subpage-home-link,
body.portal-home .topbar-actions a.home-link,
body.portal-home .page-header a.home-link,
body.portal-home .page-header a.back-link {
  border-color: #f18f01 !important;
  background: linear-gradient(180deg, #f18f01, #e88300) !important;
  color: #fff7ed !important;
  box-shadow: 0 12px 22px rgba(121, 74, 31, 0.14) !important;
}

a.home-link:hover,
a.back-link:hover,
a.subpage-home-link:hover,
a.inbound-home-link:hover,
body.portal-home .page-header.subpage-titlebar a.home-link.subpage-home-link:hover,
body.portal-home .page-header.subpage-titlebar a.back-link.subpage-home-link:hover,
body.portal-home .subpage-titlebar a.subpage-home-link:hover,
body.portal-home .topbar-actions a.home-link:hover,
body.portal-home .page-header a.home-link:hover,
body.portal-home .page-header a.back-link:hover {
  border-color: #f18f01 !important;
  background: linear-gradient(180deg, #ff9e18, #ed8600) !important;
  color: #fffaf3 !important;
}

@media (max-width: 980px) {
  .portal-frame,
  .portal-wide-frame,
  .portal-home.home-landing .portal-page,
  .inventory-page,
  .portal-home.inbound-home .inbound-page,
  .portal-home.inbound-home .piece-page,
  .payment-page,
  .portal-home.finance-discount-home .finance-page,
  .ledger-page,
  .db-manager-page,
  .settlement-page,
  .portal-home.downloads-home .downloads-page,
  .portal-home.skyz-home .skyz-page,
  .portal-home.placeholder-home .placeholder-page,
  .placeholder-page,
  .mobile-return-page,
  .purchase-page,
  .app-main {
    width: auto !important;
    padding: var(--portal-frame-tablet-padding) !important;
  }
}

@media (max-width: 720px) {
  .portal-frame,
  .portal-wide-frame,
  .portal-home.home-landing .portal-page,
  .inventory-page,
  .portal-home.inbound-home .inbound-page,
  .portal-home.inbound-home .piece-page,
  .payment-page,
  .portal-home.finance-discount-home .finance-page,
  .ledger-page,
  .db-manager-page,
  .settlement-page,
  .portal-home.downloads-home .downloads-page,
  .portal-home.skyz-home .skyz-page,
  .portal-home.placeholder-home .placeholder-page,
  .placeholder-page,
  .mobile-return-page,
  .purchase-page,
  .app-main {
    width: var(--portal-frame-mobile-width) !important;
    padding: var(--portal-frame-mobile-padding) !important;
    gap: var(--portal-frame-mobile-gap) !important;
  }
}
