/* All custom portal styling. Supplied vendor styles remain separate. */
:root {
  --merchant-sidebar: #151b3b;
  --merchant-accent: #c41d1d;
  --merchant-background: #f5f6f8;
  --merchant-border: #e3e7ed;
  --merchant-text: #263238;
}
.brand-radex {
  --merchant-sidebar: #202329;
  --merchant-accent: #d9232e;
}
.merchant-app,
.merchant-login {
  color: var(--merchant-text);
  background: var(--merchant-background);
  font-family: Arial, Helvetica, sans-serif;
}
.merchant-app .page-sidebar {
  width: 250px;
  transform: none;
  background: var(--merchant-sidebar);
}
.merchant-app .sidebar-header {
  height: 85px;
  padding: 18px;
  background: #fff;
}
.merchant-logo svg,
.merchant-login-logo svg {
  width: 145px;
  height: 50px;
}
.merchant-app .page-container {
  padding-left: 250px;
}
.merchant-menu-group {
  padding: 14px 16px 0;
  list-style: none;
}
.merchant-menu-group > span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #b8c1d4;
}
.merchant-menu-links {
  list-style: none;
  padding: 4px 0;
}
.merchant-app .merchant-menu-links a {
  display: block;
  padding: 9px 12px;
  color: #f1f3f8;
  border-radius: 5px;
  font-size: 13px;
}
.merchant-menu-links a:hover,
.merchant-menu-links .merchant-active {
  background: var(--merchant-accent);
  color: #fff;
}
.merchant-header {
  left: 250px;
  padding: 12px 26px;
  border-bottom: 1px solid var(--merchant-border);
}
.merchant-header small,
.merchant-stat small {
  display: block;
  color: #667085;
}
.merchant-user {
  margin-left: auto;
  display: flex;
  gap: 15px;
  align-items: center;
}
.merchant-main {
  padding-top: 85px;
  min-height: calc(100vh - 50px);
}
.merchant-page-title h1 {
  font-size: 25px;
  font-weight: 600;
  margin-bottom: 24px;
}
.merchant-app h2 {
  font-size: 19px;
}
.merchant-app .card {
  border: 1px solid var(--merchant-border);
  border-radius: 8px;
  box-shadow: none;
  margin-bottom: 22px;
}
.merchant-app .btn-primary,
.merchant-login .btn-primary {
  background: var(--merchant-accent);
  border-color: var(--merchant-accent);
  color: #fff;
}
.merchant-app .btn,
.merchant-login .btn {
  border-radius: 5px;
  padding: 10px 16px;
}
.merchant-app .btn-sm {
  padding: 5px 9px;
}
.merchant-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}
.merchant-stat strong {
  display: block;
  font-size: 32px;
  margin-bottom: 14px;
}
.merchant-summary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 15px;
}
.merchant-filter-actions {
  display: flex;
  align-items: end;
  gap: 10px;
  padding-top: 20px;
}
.merchant-details dt {
  color: #667085;
  font-size: 11px;
  text-transform: uppercase;
  margin-top: 16px;
}
.merchant-details dd {
  margin-top: 4px;
  overflow-wrap: anywhere;
}
.merchant-tracking-search {
  display: flex;
  gap: 15px;
  align-items: center;
}
.merchant-tracking-search input {
  max-width: 400px;
}
.merchant-timeline {
  list-style: none;
  padding: 0 0 0 20px;
  border-left: 2px solid var(--merchant-border);
}
.merchant-timeline li {
  margin-bottom: 30px;
}
.merchant-timeline time {
  color: #667085;
}
.merchant-csv-table input {
  min-width: 170px;
}
.merchant-footer {
  padding: 20px 28px;
  color: #667085;
  font-size: 12px;
}
.merchant-login {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}
.merchant-login-card {
  width: 420px;
  border: 1px solid var(--merchant-border);
  border-radius: 10px;
  padding: 20px;
}
.merchant-login h1 {
  font-size: 25px;
  margin-top: 24px;
}
.merchant-login-help {
  font-size: 12px;
  margin-top: 22px;
  color: #667085;
}
.merchant-menu-toggle {
  display: none;
}
.merchant-cn {
  font-size: 28px;
  font-weight: bold;
}
@media (max-width: 991px) {
  .merchant-app .page-sidebar {
    transform: translateX(-100%);
  }
  .merchant-app .page-container {
    padding-left: 0;
  }
  .merchant-header {
    left: 0;
    padding: 10px;
  }
  .merchant-nav-open .page-sidebar {
    transform: translateX(0);
  }
  .merchant-menu-toggle {
    display: inline-block;
    margin-right: 10px;
  }
  .merchant-header small,
  .merchant-user > span {
    display: none;
  }
  .merchant-tracking-search {
    flex-wrap: wrap;
  }
}

/* Existing printlabelsView layout. */
body.merchant-labels {
  page: merchant-labels;
}
.merchant-labels * {
  box-sizing: border-box;
}

@page merchant-labels {
  size: A4 portrait;
  margin: 5mm;
}

body.merchant-labels,
body.merchant-labels {
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: #000;
  background: #fff;
}

.merchant-labels .sheet {
  width: 200mm;
  height: 287mm;
  display: grid;
  grid-template-columns: 100mm 100mm;
  grid-template-rows: 143.5mm 143.5mm;
  gap: 0;
  page-break-after: always;
}

.merchant-labels .sheet:last-child {
  page-break-after: auto;
}

.merchant-labels .label {
  position: relative;
  width: 100mm;
  height: 143.5mm;
  overflow: hidden;
  border: 0.25mm solid #000;
  padding: 3.2mm;
  background: #fff;
}

.merchant-labels .label.blank {
  border-color: transparent;
}

.merchant-labels .brand-row {
  height: 12.2mm;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 0.35mm solid #000;
  padding: 0 0.5mm 1.2mm;
}

.merchant-labels .merchant-logo img {
  display: block;
  max-width: 23mm;
  max-height: 8mm;
  object-fit: contain;
}

.merchant-labels .merchant-word {
  font-size: 8.5pt;
  font-weight: 900;
}

.merchant-labels .radex-logo {
  height: 9mm;
  max-width: 32mm;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
}

.merchant-labels .radex-logo img,
.merchant-labels .radex-logo svg {
  display: block !important;
  max-width: 31mm !important;
  max-height: 8.8mm !important;
  width: auto !important;
  height: auto !important;
}

.merchant-labels .micro {
  font-size: 7pt;
  line-height: 1.05;
}

.merchant-labels .strong {
  font-weight: 900;
  letter-spacing: 0.15mm;
}

.merchant-labels .cn-block {
  text-align: center;
  padding: 1.4mm 0 0.8mm;
}

.merchant-labels .cn-human {
  font-size: 16pt;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.35mm;
  margin: 0.6mm 0 0.7mm;
}

.merchant-labels .barcode {
  height: 13.5mm;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.merchant-labels .barcode svg {
  width: 48mm !important;
  height: 12mm !important;
  display: block;
}

.merchant-labels .barcode-number {
  font-size: 5.8pt;
  font-weight: 700;
  letter-spacing: 0.28mm;
  line-height: 1;
  margin-top: -0.3mm;
}

.merchant-labels .destination {
  height: 12.2mm;
  border: 0.8mm solid #000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2mm;
  margin: 0.8mm 0 1.1mm;
  font-size: 21pt;
  line-height: 1;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.35mm;
}

.merchant-labels .destination .icon {
  width: 6mm;
  height: 6mm;
  display: flex;
  align-items: center;
  justify-content: center;
}

.merchant-labels .destination .icon svg {
  width: 6mm;
  height: 6mm;
  fill: none;
  stroke: #000;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.merchant-labels .deliver-grid {
  display: grid;
  grid-template-columns: 1fr 21.5mm;
  gap: 2.5mm;
  min-height: 24.2mm;
  align-items: start;
}

.merchant-labels .deliver-copy {
  min-width: 0;
}

.merchant-labels .receiver-row {
  display: grid;
  grid-template-columns: 4.2mm 1fr;
  gap: 1mm;
  align-items: start;
  margin-top: 0.45mm;
}

.merchant-labels .receiver-row .i {
  width: 4mm;
  height: 4mm;
  display: flex;
  align-items: center;
  justify-content: center;
}

.merchant-labels .receiver-row .i svg {
  width: 4mm;
  height: 4mm;
  fill: none;
  stroke: #000;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.merchant-labels .receiver-name {
  font-size: 13pt;
  line-height: 1.05;
  font-weight: 900;
}

.merchant-labels .receiver-phone {
  font-size: 11pt;
  line-height: 1.1;
  font-weight: 800;
}

.merchant-labels .receiver-address {
  font-size: 9pt;
  line-height: 1.16;
  max-height: 9.5mm;
  overflow: hidden;
}

.merchant-labels .qr {
  text-align: center;
  font-size: 4.9pt;
  font-weight: 700;
  line-height: 1;
}

.merchant-labels .qr svg {
  width: 19mm !important;
  height: 19mm !important;
  display: block;
  margin: 0 auto 0.35mm;
}

.merchant-labels .payment {
  height: 9.2mm;
  border: 0.75mm solid #000;
  margin: 1mm 0 0.8mm;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 11.8pt;
  line-height: 1;
  font-weight: 900;
}

.merchant-labels .facts {
  height: 7.4mm;
  border-top: 0.25mm solid #000;
  border-bottom: 0.25mm solid #000;
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  align-items: center;
}

.merchant-labels .fact {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1mm;
  font-size: 7pt;
  white-space: nowrap;
}

.merchant-labels .fact + .fact {
  border-left: 0.2mm solid #000;
}

.merchant-labels .fact .fi {
  width: 3.3mm;
  height: 3.3mm;
  display: flex;
  align-items: center;
  justify-content: center;
}

.merchant-labels .fact .fi svg {
  width: 3.3mm;
  height: 3.3mm;
  fill: none;
  stroke: #000;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.merchant-labels .fact b {
  font-weight: 900;
}

.merchant-labels .instructions {
  border-bottom: 0.25mm solid #000;
  padding: 0.7mm 0;
  font-size: 6.1pt;
  line-height: 1.1;
  max-height: 7mm;
  overflow: hidden;
}

.merchant-labels .details {
  margin-top: 0.65mm;
  min-height: 17mm;
}

.merchant-labels .details-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2mm;
  font-size: 5.8pt;
  font-weight: 900;
  line-height: 1.1;
}

.merchant-labels .items-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.3mm 3mm;
  margin-top: 0.45mm;
  max-height: 12.5mm;
  overflow: hidden;
  font-size: 6.5pt;
  line-height: 1.12;
}

.merchant-labels .item {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.merchant-labels .item b {
  font-weight: 500;
}

.merchant-labels footer {
  position: absolute;
  left: 3.2mm;
  right: 3.2mm;
  bottom: 2.1mm;
  border-top: 0.35mm solid #000;
  padding-top: 1.2mm;
}

.merchant-labels .footer-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  font-size: 6.5pt;
  line-height: 1.18;
}

.merchant-labels .footer-merchant {
  padding-right: 2mm;
  border-right: 0.25mm solid #000;
  min-height: 16mm;
}

.merchant-labels .footer-radex {
  padding-left: 2mm;
  text-align: right;
  min-height: 16mm;
}

.merchant-labels .footer-heading {
  display: flex;
  align-items: center;
  gap: 1mm;
  font-size: 7pt;
  font-weight: 900;
  margin-bottom: 0.45mm;
  min-height: 4mm;
}

.merchant-labels .footer-radex .footer-heading {
  justify-content: flex-end;
}

.merchant-labels .contact-line {
  display: flex;
  align-items: flex-start;
  gap: 0.8mm;
  margin-top: 0.25mm;
}

.merchant-labels .footer-radex .contact-line {
  justify-content: flex-end;
}

.merchant-labels .ci {
  width: 2.7mm;
  height: 2.7mm;
  flex: 0 0 2.7mm;
  display: flex;
  align-items: center;
  justify-content: center;
}

.merchant-labels .ci svg {
  width: 2.7mm;
  height: 2.7mm;
  fill: none;
  stroke: #000;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.merchant-labels .footer-radex .text {
  max-width: 38mm;
}

.merchant-labels .terms {
  text-align: center;
  font-size: 5.2pt;
  line-height: 1;
  margin-top: 0.8mm;
  padding-top: 0.55mm;
  border-top: 0.2mm solid #000;
}

@media screen {
  body.merchant-labels {
    background: #e8e8e8;
    padding: 8mm 0;
  }

  .merchant-labels .sheet {
    margin: 0 auto 8mm;
    background: #fff;
    box-shadow: 0 0 3mm rgba(0, 0, 0, 0.18);
  }
}

@media print {
  body.merchant-labels {
    background: #fff;
  }

  .merchant-labels .sheet {
    margin: 0;
  }
}

/* Existing printloadsheetView layout. */
body.merchant-loadsheet {
  page: merchant-loadsheet;
}
@page merchant-loadsheet {
  size: A4 portrait;
  margin: 10mm 8mm 14mm 8mm;

  @bottom-right {
    content: "Page " counter(page) " of " counter(pages);
    font-size: 9px;
  }
}

body.merchant-loadsheet,
body.merchant-loadsheet {
  margin: 0;
  padding: 0;
  color: #000;
  background: #fff;
  font-family: Arial, Helvetica, sans-serif;
}

.merchant-loadsheet table {
  border-collapse: collapse;
}

.merchant-loadsheet .document {
  width: 100%;
}

.merchant-loadsheet .header-table {
  width: 100%;
  margin-bottom: 5px;
}

.merchant-loadsheet .header-table td {
  vertical-align: middle;
  border: 0 !important;
}

.merchant-loadsheet .logo-cell {
  width: 25%;
  text-align: left;
}

.merchant-loadsheet .title-cell {
  width: 50%;
  text-align: center;
}

.merchant-loadsheet .barcode-cell {
  width: 25%;
  text-align: right;
}

.merchant-loadsheet .document-title {
  margin: 0;
  font-size: 24px;
  line-height: 1.05;
  font-weight: 700;
  text-transform: uppercase;
}

.merchant-loadsheet .sheet-code {
  margin-top: 3px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: underline;
}

.merchant-loadsheet .barcode {
  margin: 0;
  min-height: 13.5mm;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
  color: #000 !important;
}

.merchant-loadsheet .barcode svg {
  width: 52mm !important;
  height: 12mm !important;
  display: block;
}

.merchant-loadsheet .barcode-fallback {
  font-family: "LibreBarcode39", monospace;
  font-size: 54px;
  line-height: 1;
  white-space: nowrap;
  letter-spacing: 0;
}

.merchant-loadsheet .info-wrapper {
  width: 100%;
  margin: 4px 0 8px 0;
}

.merchant-loadsheet .info-wrapper td {
  width: 50%;
  vertical-align: top;
  border: 0 !important;
  padding: 0 8px;
}

.merchant-loadsheet .info-table {
  width: 100%;
  font-size: 0.9em;
}

.merchant-loadsheet .info-table th,
.merchant-loadsheet .info-table td {
  padding: 3px 2px;
  vertical-align: top;
}

.merchant-loadsheet .info-table th {
  width: 31%;
  text-align: left;
  white-space: nowrap;
}

.merchant-loadsheet .info-table td {
  width: 69%;
  border-bottom: 1px solid #000 !important;
}

.merchant-loadsheet .shipments {
  width: 100%;
  margin-top: 5px;
  font-size: 0.9em;
}

.merchant-loadsheet .shipments thead th {
  border-top: 1px solid #000;
  border-bottom: 1px solid #000;
  padding: 4px 3px;
  text-align: left;
  white-space: nowrap;
}

.merchant-loadsheet .shipments tbody td {
  border-bottom: 1px solid #000;
  padding: 4px 3px;
  vertical-align: top;
}

.merchant-loadsheet .shipments tfoot th,
.merchant-loadsheet .shipments tfoot td {
  border-top: 1px solid #000;
  border-bottom: 1px solid #000;
  padding: 4px 3px;
  font-weight: 700;
}

.merchant-loadsheet .grand-total {
  width: 100%;
  margin-top: 8px;
  font-size: 0.9em;
}

.merchant-loadsheet .grand-total th,
.merchant-loadsheet .grand-total td {
  border-top: 1px solid #000;
  border-bottom: 1px solid #000;
  padding: 5px 4px;
  font-weight: 700;
}

.merchant-loadsheet .text-center {
  text-align: center !important;
}

.merchant-loadsheet .text-right {
  text-align: right !important;
}

.merchant-loadsheet .nowrap {
  white-space: nowrap;
}

.merchant-loadsheet .section-title {
  margin: 8px 0 2px 0;
  padding: 3px 4px;
  border-top: 1px solid #000;
  border-bottom: 1px solid #000;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.merchant-loadsheet .signatures {
  width: 100%;
  margin-top: 26px;
}

.merchant-loadsheet .signatures td {
  width: 50%;
  border: 0 !important;
  padding: 0 18px;
  text-align: center;
  vertical-align: bottom;
}

.merchant-loadsheet .signature-line {
  border-top: 1px solid #000;
  padding-top: 4px;
  font-weight: 700;
}

.merchant-loadsheet .print-note {
  margin-top: 8px;
  font-size: 9px;
  text-align: center;
}

.merchant-loadsheet .print-page-footer {
  position: fixed;
  right: 8mm;
  bottom: 5mm;
  font-size: 9px;
  text-align: right;
}

.merchant-loadsheet tr {
  page-break-inside: avoid;
}

.merchant-loadsheet thead {
  display: table-header-group;
}

@media print {
  .merchant-loadsheet .document {
    width: 100%;
  }
}

@font-face {
  font-family: "LibreBarcode39";
  src: url("../../fonts/LibreBarcode39ExtendedText-Regular.ttf")
    format("truetype");
}

/* Respect Revox layout measurements while keeping the grouped navigation readable. */
.merchant-app .page-sidebar .sidebar-menu .menu-items > .merchant-menu-group {
  padding: 14px 16px 0;
}
.merchant-app .page-sidebar .sidebar-menu .menu-items li > a {
  width: 100%;
}
.merchant-app .page-container .page-content-wrapper .content {
  padding-top: 0;
  padding-left: 26px;
  padding-right: 26px;
}
.merchant-app .sidebar-menu {
  height: calc(100% - 85px);
}
