:root {
  --wl-blue: #1e6fbe;
  --wl-green: #2fb44a;
  --wl-header: #ffffff;
  --wl-header-ink: #122033;
  --wl-header-muted: #5a6a78;
  --wl-bg: #f3f6f4;
  --wl-ink: #1c2530;
  --wl-muted: #5c6b7a;
  --wl-card: #ffffff;
  --wl-line: #d8dee6;
  --wl-started: #1e6fbe;
  --wl-completed: #2fb44a;
  --wl-archived: #4b5563;
  --wl-deleted: #dc3545;
  --wl-radius: 10px;
  --wl-max: 1280px;
  --bs-primary: #1e6fbe;
  --bs-primary-rgb: 30, 111, 190;
  --bs-success: #2fb44a;
  --bs-success-rgb: 47, 180, 74;
  --bs-link-color: #1e6fbe;
}

[data-bs-theme="dark"] {
  --wl-header: #102018;
  --wl-header-ink: #e8edf3;
  --wl-header-muted: #9aa8b6;
  --wl-bg: #121820;
  --wl-ink: #e8edf3;
  --wl-muted: #9aa8b6;
  --wl-card: #1a2330;
  --wl-line: #2b3848;
  --bs-link-color: #6ec4ff;
}

html, body {
  font-family: Inter, system-ui, -apple-system, sans-serif;
}

.wl-body {
  background: var(--wl-bg);
  color: var(--wl-ink);
  min-height: 100vh;
}

.wl-body.wl-tenant-desktop {
  border: 10px solid #dc3545;
}

.btn-primary {
  --bs-btn-bg: var(--wl-blue);
  --bs-btn-border-color: var(--wl-blue);
  --bs-btn-hover-bg: #185a9a;
  --bs-btn-hover-border-color: #185a9a;
  --bs-btn-active-bg: #154e86;
  --bs-btn-active-border-color: #154e86;
}

.btn-success {
  --bs-btn-bg: var(--wl-green);
  --bs-btn-border-color: var(--wl-green);
}

.btn-outline-primary {
  --bs-btn-color: var(--wl-blue);
  --bs-btn-border-color: var(--wl-blue);
  --bs-btn-hover-bg: var(--wl-blue);
  --bs-btn-hover-border-color: var(--wl-blue);
}

.btn .bi {
  line-height: 1;
  vertical-align: -0.125em;
}

.wl-header {
  background: var(--wl-header);
  color: var(--wl-header-ink);
  position: sticky;
  top: 0;
  z-index: 1020;
  box-shadow: 0 1px 0 var(--wl-line);
}

.wl-header::after {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--wl-blue) 0 48%, var(--wl-green) 52% 100%);
}

.wl-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.25rem 0.55rem;
  max-width: none;
}

.wl-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.wl-logo {
  height: 34px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}

.wl-logo-lg {
  height: 48px;
  max-width: 280px;
}

.wl-letterhead {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.wl-letterhead-text {
  flex: 1 1 auto;
  min-width: 12rem;
}

.wl-letterhead-readonly {
  margin-left: auto;
  align-self: flex-start;
}

.wl-letterhead-name {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--wl-blue);
  line-height: 1.15;
}

.wl-letterhead-tag {
  color: var(--wl-green);
  font-weight: 600;
  font-size: 0.85rem;
}

.wl-letterhead-meta {
  color: var(--wl-muted);
  font-size: 0.82rem;
}

.wl-hdr-btn {
  border: 1px solid var(--wl-line);
  background: transparent;
  color: var(--wl-header-ink);
}

.wl-hdr-btn:hover {
  background: color-mix(in srgb, var(--wl-blue) 8%, transparent);
  border-color: var(--wl-blue);
  color: var(--wl-header-ink);
}

.wl-product {
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.wl-tenant {
  font-size: 0.78rem;
  opacity: 0.8;
}

.wl-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.wl-role-badge {
  background: var(--wl-green);
  font-weight: 600;
  color: #fff;
}

.wl-user-name {
  font-size: 0.875rem;
  color: var(--wl-header-muted);
}

.wl-nav {
  display: flex;
  align-items: stretch;
  gap: 0.15rem;
  padding: 0 1rem 0;
  overflow: visible;
}

.wl-nav > a {
  color: var(--wl-header-muted);
  text-decoration: none;
  padding: 0.7rem 0.9rem 0.75rem;
  font-weight: 500;
  font-size: 0.92rem;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}

.wl-nav > a:hover {
  color: var(--wl-blue);
}

.wl-nav > a.active,
.wl-nav .wl-nav-more.active {
  color: var(--wl-blue);
  border-bottom-color: var(--wl-green);
}

.wl-nav-dropdown {
  position: relative;
}

.wl-nav-dropdown .dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: auto;
  transform: none;
  margin: 0;
  z-index: 1080;
  min-width: 12rem;
}

.wl-nav-dropdown:hover .dropdown-menu,
.wl-nav-dropdown:focus-within .dropdown-menu {
  display: block;
}

.wl-nav .wl-nav-more {
  color: var(--wl-header-muted);
  background: none;
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 0.7rem 0.9rem 0.75rem;
  font-weight: 500;
  font-size: 0.92rem;
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
}

.wl-nav .wl-nav-more:hover {
  color: var(--wl-blue);
}

.wl-impersonate-bar {
  background: #e8f1fa;
  color: #154e86;
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.4rem 1rem;
  border-bottom: 1px solid #c5d8ee;
}

.wl-impersonate-bar a {
  color: #154e86;
  font-weight: 700;
}

[data-bs-theme="dark"] .wl-impersonate-bar {
  background: #17324a;
  color: #cfe6ff;
  border-bottom-color: #2b4d6c;
}

[data-bs-theme="dark"] .wl-impersonate-bar a {
  color: #cfe6ff;
}

.wl-sample-bar {
  background: #fff4cc;
  color: #5c4a00;
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.4rem 1rem;
  border-bottom: 1px solid #ead78a;
}

[data-bs-theme="dark"] .wl-sample-bar {
  background: #3d3414;
  color: #f3e3a0;
  border-bottom-color: #5c4e1c;
}

.wl-main {
  width: min(var(--wl-max), calc(100% - 2rem));
  margin: 1.25rem auto 3rem;
}

.wl-main-auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.wl-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.wl-page-head h1 {
  font-size: 1.45rem;
  font-weight: 700;
  margin: 0;
}

.wl-count {
  color: var(--wl-muted);
  font-size: 0.9rem;
}

.wl-card {
  background: var(--wl-card);
  border: 1px solid var(--wl-line);
  border-radius: var(--wl-radius);
  box-shadow: 0 1px 0 rgba(16, 24, 40, 0.03);
}

.wl-card-pad {
  padding: 1rem 1.1rem;
}

.wl-filters .form-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--wl-muted);
  margin-bottom: 0.25rem;
}

.wl-status-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1rem 0;
}

.wl-status-tabs .btn {
  border-radius: 999px;
  font-size: 0.85rem;
}

.wl-table {
  margin: 0;
}

.wl-table thead th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--wl-muted);
  font-weight: 600;
  background: color-mix(in srgb, var(--wl-bg) 70%, var(--wl-card));
  white-space: nowrap;
}

.wl-log-link {
  color: inherit;
  text-decoration: none;
}

.wl-log-link:hover {
  color: var(--wl-blue);
  text-decoration: underline;
}

.wl-log-row {
  border-left: 4px solid transparent;
  cursor: default;
}

.wl-log-row.wl-status-started { border-left-color: var(--wl-started); }
.wl-log-row.wl-status-completed { border-left-color: var(--wl-completed); }
.wl-log-row.wl-status-archived { border-left-color: var(--wl-archived); }
.wl-log-row.wl-status-deleted { border-left-color: var(--wl-deleted); }

.wl-sub {
  color: var(--wl-muted);
  font-size: 0.78rem;
}

.wl-log-card {
  border-left: 4px solid transparent;
}

.wl-log-details td {
  background: color-mix(in srgb, var(--wl-bg) 55%, var(--wl-card));
  border-left: 4px solid var(--wl-line);
}

.wl-lightbox-img {
  min-height: 280px;
  display: grid;
  place-items: center;
  font-weight: 600;
}

.wl-lightbox-stage {
  overflow: auto;
  max-height: 70vh;
}

.wl-lightbox-stage.is-zoomed .wl-photo {
  transform: scale(1.6);
  transform-origin: center center;
  cursor: zoom-out;
}

.wl-emphasis {
  color: #c1121f;
  font-weight: 600;
}

.wl-unavailable {
  color: var(--wl-muted);
  font-style: italic;
}

.wl-stat {
  text-align: center;
  padding: 0.75rem 0.5rem;
}

.wl-stat .n {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
}

.wl-stat .l {
  font-size: 0.75rem;
  color: var(--wl-muted);
  margin-top: 0.2rem;
}

.wl-photo {
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  border: 1px dashed var(--wl-line);
  background: repeating-linear-gradient(-45deg, transparent, transparent 8px, color-mix(in srgb, var(--wl-line) 50%, transparent) 8px, color-mix(in srgb, var(--wl-line) 50%, transparent) 9px);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 0.5rem;
  font-size: 0.75rem;
  color: var(--wl-muted);
}

.wl-photo.has-sample {
  background: linear-gradient(135deg, #d7e8f8, #d9f3e0);
  border-style: solid;
  color: #185a9a;
  font-weight: 600;
}

.wl-photo[data-photo] {
  cursor: zoom-in;
}

.wl-photo.has-file {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: transparent;
  border-style: solid;
}

.wl-photo-edit {
  position: relative;
}

.wl-photo-edit [data-remove-photo] {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
}

[data-bs-theme="dark"] .wl-photo.has-sample {
  background: #1e334d;
  color: #9ec5f1;
}

.badge {
  font-weight: 600;
}

.badge.text-bg-warning {
  color: #fff !important;
  background-color: #c98900 !important;
}

.wl-activity {
  border-left: 2px solid var(--wl-line);
  padding-left: 1rem;
  margin-left: 0.35rem;
}

.wl-activity-item {
  position: relative;
  padding-bottom: 1rem;
}

.wl-activity-item::before {
  content: "";
  width: 9px;
  height: 9px;
  background: var(--wl-blue);
  border-radius: 50%;
  position: absolute;
  left: calc(-1rem - 5px);
  top: 0.4rem;
}

.wl-login {
  width: min(420px, 100%);
}

.wl-review {
  width: min(900px, 100%);
  margin: 2rem auto;
}

.table-hover tbody tr[hidden] {
  display: none !important;
}

.wl-inv-tabs .nav-link {
  color: var(--wl-ink);
}

.wl-inv-tabs .nav-link.active {
  background: var(--wl-blue);
}

.wl-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.wl-toolbar .form-control {
  max-width: 280px;
}

.wl-toolbar .form-select {
  max-width: 220px;
}

.wl-inv-thumb {
  width: 88px;
  height: 108px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--wl-bg);
  display: grid;
  place-items: center;
}

.wl-chem-gauge {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 6.5rem;
}

.wl-tote-caption {
  margin-top: 0.15rem;
  font-size: 0.7rem;
  line-height: 1.2;
  color: var(--wl-muted);
  text-align: center;
}

.wl-tote-qty {
  font-size: 22px;
  font-weight: 700;
  fill: currentColor;
  stroke: var(--wl-card);
  stroke-width: 4px;
  paint-order: stroke;
  font-family: Inter, system-ui, sans-serif;
}

.wl-low-star {
  color: #dc3545;
  margin-left: 0.35rem;
  font-size: 0.85em;
  vertical-align: 0.05em;
}

.wl-nav-count {
  margin-left: 0.2rem;
  font-weight: 600;
  font-size: 0.85em;
  color: var(--wl-header-muted);
}

.wl-nav-count.is-alert {
  color: #dc3545;
}

.wl-vessel {
  width: 80px;
  height: 112px;
  color: var(--wl-ink);
  overflow: visible;
}

.wl-vessel-pick {
  width: 88px;
  height: 118px;
  pointer-events: none;
}

.wl-vessel-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.wl-vessel-choice {
  width: 104px;
  height: 132px;
  border: 2px solid var(--wl-line);
  border-radius: 10px;
  background: var(--wl-bg);
  display: grid;
  place-items: center;
  padding: 0.25rem;
}

.wl-vessel-choice.selected {
  border-color: var(--wl-blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--wl-blue) 28%, transparent);
}

.table > thead th:not(.wl-nosort) {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.wl-sort-icon {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  margin-left: 0.35rem;
  vertical-align: middle;
  line-height: 0;
  color: var(--wl-muted);
}

.wl-sort-icon i {
  font-size: 0.62rem;
  height: 0.48rem;
  opacity: 0.38;
}

.table > thead th[aria-sort="ascending"] .wl-sort-icon i:first-child,
.table > thead th[aria-sort="descending"] .wl-sort-icon i:last-child {
  opacity: 1;
  color: var(--wl-ink);
}

.wl-hd-bucket {
  fill: #f76700;
}

.wl-hd-rim {
  fill: #e25700;
}

.wl-hd-interior {
  fill: #ffe4cc;
}

.wl-vessel-lid {
  fill: var(--wl-card);
}

.wl-vessel-body {
  fill: color-mix(in srgb, var(--wl-ink) 10%, var(--wl-card));
}

.wl-vessel-metal {
  fill: color-mix(in srgb, var(--wl-ink) 22%, var(--wl-card));
}

.wl-vessel-hoop {
  fill: color-mix(in srgb, var(--wl-ink) 28%, var(--wl-card));
  opacity: 0.85;
}

.wl-vessel-pallet {
  fill: #b08948;
  stroke: #6f5224;
  stroke-width: 1;
}

.wl-vessel-handle {
  fill: none;
}

.wl-vessel-empty .wl-vessel-body,
.wl-vessel-empty .wl-vessel-metal {
  fill: color-mix(in srgb, #dc3545 12%, var(--wl-card));
}

.wl-can-fallback {
  font-size: 1.4rem;
  color: var(--wl-muted);
}

.wl-chart-scroll {
  overflow-x: auto;
  border: 1px solid var(--wl-line);
  border-radius: var(--wl-radius);
  padding: 0.75rem;
  background: var(--wl-card);
}

.wl-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  min-height: 124px;
}

.wl-bar {
  width: 22px;
  height: 124px;
  border: 0;
  background: transparent;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  color: var(--wl-muted);
}

.wl-bar span {
  display: block;
  width: 100%;
  max-height: 100px;
  background: var(--wl-blue);
  border-radius: 3px 3px 0 0;
}

.wl-bar.on span,
.wl-bar.on {
  color: var(--wl-ink);
}

.wl-bar.on span {
  background: var(--wl-green);
}

.wl-bar em {
  font-size: 9px;
  font-style: normal;
  margin-top: 4px;
}

.wl-pt-on {
  fill: var(--wl-green);
}

.wl-tx-block {
  border-top: 1px solid var(--wl-line);
  padding: 0.5rem 0 0;
  margin-top: 0.5rem;
}

.wl-day-on {
  outline: 2px solid var(--wl-blue);
}

.wl-news-body :first-child {
  margin-top: 0;
}

.wl-news-body :last-child {
  margin-bottom: 0;
}

.wl-news-body ul,
.wl-news-body ol {
  padding-left: 1.25rem;
}

.wl-news-body a {
  color: var(--wl-blue);
}

.wl-emphasis {
  color: #dc3545;
  font-weight: 600;
}

.tox-tinymce-aux,
.tox-silver-sink {
  z-index: 20000 !important;
}


@media (max-width: 768px) {
  .wl-toolbar .form-control,
  .wl-toolbar .form-select {
    max-width: none;
    width: 100%;
  }
}

.wl-pf-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
  gap: 0.75rem;
}

.wl-pf-bars .wl-pf-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
  font-size: 0.85rem;
}

.wl-pf-bars .track {
  flex: 1;
  height: 8px;
  border-radius: 99px;
  background: var(--wl-line);
  overflow: hidden;
}

.wl-pf-bars .fill {
  height: 100%;
  background: var(--wl-blue);
}

.wl-pf-timeline {
  border-left: 2px solid var(--wl-line);
  margin: 0;
  padding: 0 0 0 1rem;
  list-style: none;
}

.wl-pf-timeline li {
  position: relative;
  margin-bottom: 1rem;
}

.wl-pf-timeline li::before {
  content: "";
  position: absolute;
  left: -1.32rem;
  top: 0.4rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--wl-blue);
}

.wl-pf-ack {
  border: 1px solid var(--wl-line);
  border-radius: 10px;
  padding: 1rem;
}

.wl-pf-files {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}

@media (max-width: 900px) {
  .wl-pf-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

#mtCatalogModal {
  z-index: 1065;
}

@media print {
  .wl-header,
  .wl-inv-tabs,
  .wl-page-head .btn,
  .wl-pf-actions,
  #pfLightbox,
  #mtLightbox {
    display: none !important;
  }
}
