@import url("https://fonts.googleapis.com/css2?family=Figtree:wght@300;400;500;600;700;800;900&display=swap");

/* These styles are generated from project.scss. */

.alert-debug {
  color: black;
  background-color: white;
  border-color: #d6e9c6;
}

.alert-error {
  color: #b94a48;
  background-color: #f2dede;
  border-color: #eed3d7;
}

/* Zoomable images (universal)
   Click/tap an image (or the corner lupa button) to open a full-screen
   lightbox; on pointer devices, table thumbnails also "peek" on hover.
   Behaviour lives in project.js (one delegated listener). */

.zoomable {
  cursor: zoom-in;
  position: relative;
  transition: transform 0.12s ease;
}

/* Desktop-only hover peek for small table thumbnails (ignored on touch). */
@media (hover: hover) {
  .zoom-thumb:hover {
    /* Anchor the zoom at the left edge - the image column is leftmost, so
       scaling from the center would push the preview off-screen to the left. */
    transform-origin: left center;
    transform: scale(2.6);
    z-index: 1080;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.35);
    background: #fff;
  }
}

/* Corner lupa button (used where the image itself already has an action,
   e.g. the picking screen where tapping the image opens the platform). */
.zoom-wrap {
  position: relative;
  display: inline-block;
}
.zoom-btn {
  position: absolute;
  bottom: 0.35rem;
  right: 0.35rem;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1.05rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
}
.zoom-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}

/* Full-screen lightbox overlay (created lazily by project.js). */
.img-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  background: rgba(12, 14, 18, 0.92);
}

.img-lightbox.open {
  display: block;
}

.img-lightbox-stage {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  cursor: zoom-in;
  touch-action: none;
}

.img-lightbox-stage.is-zoomed {
  cursor: grab;
}

.img-lightbox-stage.is-zoomed:active {
  cursor: grabbing;
}

.img-lightbox img {
  width: auto;
  height: auto;
  max-width: 92vw;
  max-height: 88vh;
  user-select: none;
  transform: translate3d(var(--zoom-x, 0), var(--zoom-y, 0), 0) scale(var(--zoom-scale, 1));
  transform-origin: center;
  will-change: transform;
}

.img-lightbox-tools {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 1;
  display: flex;
  gap: 0.45rem;
  padding: 0.45rem;
  border: 1px solid rgba(255, 187, 0, 0.3);
  border-radius: 999px;
  background: rgba(18, 20, 24, 0.82);
  box-shadow: 0 0.8rem 2rem rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
}

.img-lightbox-tools button {
  display: inline-grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border: 0;
  border-radius: 999px;
  color: #1d2430;
  background: #ffbb00;
}

.img-lightbox-tools button:hover,
.img-lightbox-tools button:focus {
  background: #ffd257;
}

:root {
  --saviory-yellow: #ffbb00;
  --saviory-yellow-hover: #e6a800;
  --saviory-yellow-active: #cc9600;
  --saviory-yellow-soft: #fff1b8;
  --saviory-yellow-surface: #fff8e5;
  --saviory-yellow-border: #ead795;
  --saviory-yellow-border-strong: #c79000;
  --saviory-yellow-text: #6b4a00;
  --saviory-red: #e01838;
  --saviory-red-soft: #ffe5eb;
  --saviory-teal: #409890;
  --saviory-teal-hover: #327d76;
  --saviory-teal-soft: #e5f4f2;
  --saviory-orange: #f06818;
  --saviory-orange-soft: #fff0e7;
  --saviory-blue: #48b8e8;
  --saviory-blue-soft: #e8f7fd;
  --saviory-purple: #7058b0;
  --saviory-ink: #1d2430;
  --saviory-ink-muted: #5b6472;
  --saviory-line: #ead795;
  --saviory-panel: #fffdf6;
  --saviory-page: #fffbef;
  --saviory-shadow: 0 12px 32px rgba(29, 36, 48, 0.12);
  --bs-primary: var(--saviory-yellow);
  --bs-primary-rgb: 255, 187, 0;
  --bs-secondary: #6b7280;
  --bs-secondary-rgb: 107, 114, 128;
  --bs-info: var(--saviory-teal);
  --bs-info-rgb: 64, 152, 144;
  --bs-warning: var(--saviory-orange);
  --bs-warning-rgb: 240, 104, 24;
  --bs-danger: var(--saviory-red);
  --bs-danger-rgb: 224, 24, 56;
  --bs-link-color: var(--saviory-yellow-text);
  --bs-link-hover-color: var(--saviory-ink);
  --bs-body-font-family: "Figtree", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bs-body-color: var(--saviory-ink);
  --bs-body-bg: var(--saviory-page);
  --bs-border-radius: 0.5rem;
  --bs-border-color: #eadfbb;
  --bs-focus-ring-color: rgba(255, 187, 0, 0.35);
}

/* Saviory Bricks Bootstrap skin */
html,
body {
  font-family: var(--bs-body-font-family);
  color: var(--saviory-ink);
  background: var(--saviory-page);
}

body {
  min-height: 100vh;
}

a {
  color: var(--saviory-yellow-text);
}

a:hover,
a:focus {
  color: var(--saviory-ink);
}

::selection {
  background: var(--saviory-yellow);
  color: var(--saviory-ink);
}

.btn {
  border-radius: 8px;
  font-weight: 750;
}

.btn:focus-visible,
.form-control:focus,
.form-select:focus,
.form-check-input:focus,
.page-link:focus,
.dropdown-item:focus {
  border-color: var(--saviory-yellow-border-strong);
  box-shadow: 0 0 0 0.2rem rgba(255, 187, 0, 0.28);
}

.btn-primary,
.btn-primary:disabled,
.btn-primary.disabled {
  background-color: var(--saviory-yellow);
  border-color: var(--saviory-yellow-hover);
  color: var(--saviory-ink);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.show > .btn-primary.dropdown-toggle {
  background-color: var(--saviory-yellow-hover);
  border-color: var(--saviory-yellow-active);
  color: var(--saviory-ink);
}

.btn-outline-primary {
  border-color: var(--saviory-yellow-border-strong);
  color: var(--saviory-yellow-text);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active,
.btn-outline-primary.active,
.show > .btn-outline-primary.dropdown-toggle {
  background-color: var(--saviory-yellow);
  border-color: var(--saviory-yellow-active);
  color: var(--saviory-ink);
}

.btn-secondary {
  background-color: #f4f1e7;
  border-color: #d8ccb0;
  color: var(--saviory-ink);
}

.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:active,
.btn-secondary.active,
.show > .btn-secondary.dropdown-toggle {
  background-color: #e9dfc9;
  border-color: #c7b78f;
  color: var(--saviory-ink);
}

.btn-outline-secondary {
  border-color: #c9bea4;
  color: var(--saviory-ink-muted);
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
.btn-outline-secondary:active,
.btn-outline-secondary.active {
  background-color: var(--saviory-yellow-soft);
  border-color: var(--saviory-yellow-border-strong);
  color: var(--saviory-ink);
}

.btn-info,
.bg-info,
.badge.bg-info,
.progress-bar.bg-info {
  background-color: var(--saviory-teal) !important;
  border-color: var(--saviory-teal-hover) !important;
  color: #fff !important;
}

.btn-info:hover,
.btn-info:focus,
.btn-info:active {
  background-color: var(--saviory-teal-hover) !important;
  border-color: #26665f !important;
  color: #fff !important;
}

.btn-success,
.bg-success,
.badge.bg-success,
.progress-bar.bg-success {
  background-color: var(--saviory-teal) !important;
  border-color: var(--saviory-teal-hover) !important;
  color: #fff !important;
}

.btn-success:hover,
.btn-success:focus,
.btn-success:active {
  background-color: var(--saviory-teal-hover) !important;
  border-color: #26665f !important;
  color: #fff !important;
}

.btn-warning,
.bg-warning,
.badge.bg-warning,
.progress-bar.bg-warning {
  background-color: var(--saviory-orange) !important;
  border-color: #ca4f0b !important;
  color: #fff !important;
}

.btn-warning:hover,
.btn-warning:focus,
.btn-warning:active {
  background-color: #d9550f !important;
  border-color: #b84509 !important;
  color: #fff !important;
}

.btn-danger,
.bg-danger,
.badge.bg-danger,
.progress-bar.bg-danger {
  background-color: var(--saviory-red) !important;
  border-color: #b9152f !important;
  color: #fff !important;
}

.btn-danger:hover,
.btn-danger:focus,
.btn-danger:active {
  background-color: #be1731 !important;
  border-color: #9f142a !important;
  color: #fff !important;
}


.bg-primary,
.badge.bg-primary,
.progress-bar.bg-primary,
.card-header.bg-primary {
  background-color: var(--saviory-yellow) !important;
  color: var(--saviory-ink) !important;
}

.text-primary,
.link-primary,
.border-primary {
  color: var(--saviory-yellow-text) !important;
  border-color: var(--saviory-yellow-border-strong) !important;
}

.border-primary {
  border-color: var(--saviory-yellow-border-strong) !important;
}

.badge.bg-secondary {
  background-color: #6b7280 !important;
}
.alert-primary {
  background-color: var(--saviory-yellow-surface);
  border-color: var(--saviory-yellow-border);
  color: var(--saviory-yellow-text);
}

.form-control,
.form-select,
.input-group-text {
  border-color: #d9cda9;
}

/* Touch-friendly control height for warehouse tablets (compact -sm controls
   keep their tighter sizing for dense toolbars like the period picker). */
.form-control:not(.form-control-sm),
.form-select:not(.form-select-sm),
.input-group:not(.input-group-sm) > .form-control,
.input-group:not(.input-group-sm) > .form-select {
  min-height: 44px;
}

.form-check-input:checked {
  background-color: var(--saviory-yellow);
  border-color: var(--saviory-yellow-border-strong);
}

.card,
.modal-content,
.toast,
.table-responsive {
  border-color: #eadfbb;
}

.card,
.modal-content,
.toast {
  box-shadow: 0 8px 24px rgba(29, 36, 48, 0.06);
}

.card-header,
.modal-header,
.toast-header {
  background: #fff8e5;
  border-color: #eadfbb;
}

.table {
  --bs-table-striped-bg: rgba(255, 187, 0, 0.055);
  --bs-table-hover-bg: rgba(255, 187, 0, 0.11);
}

.table thead th {
  color: var(--saviory-ink);
  background: #fff8e5;
  border-bottom-color: #d9cda9;
  font-weight: 800;
}

.page-link {
  color: var(--saviory-yellow-text);
}

.active > .page-link,
.page-link.active {
  background-color: var(--saviory-yellow);
  border-color: var(--saviory-yellow-border-strong);
  color: var(--saviory-ink);
}

.dropdown-menu {
  border-color: #eadfbb;
}

.dropdown-item:active,
.dropdown-item.active {
  background-color: var(--saviory-yellow);
  color: var(--saviory-ink);
}

.progress {
  background-color: #f2ead5;
}

.progress-bar {
  color: var(--saviory-ink);
  font-weight: 800;
}

.bs-stat-teal {
  background-color: var(--saviory-teal) !important;
  color: #fff !important;
}

.bs-stat-yellow {
  background-color: var(--saviory-yellow) !important;
  color: var(--saviory-ink) !important;
}

.bs-saviory-panel {
  background: var(--saviory-panel);
  border: 1px solid #eadfbb;
  box-shadow: 0 8px 24px rgba(29, 36, 48, 0.07);
}


/* Shared Django message notifications */
.bs-message-stack {
  position: fixed;
  top: 76px;
  right: clamp(0.75rem, 2vw, 1.25rem);
  width: min(520px, calc(100vw - 1.5rem));
  z-index: 1090;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  pointer-events: none;
}

.bs-message-stack-auth {
  top: 1rem;
}

.bs-notification.alert {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  min-height: 58px;
  margin: 0;
  padding: 0.9rem 3rem 0.95rem 1rem;
  overflow: hidden;
  pointer-events: auto;
  background: rgba(255, 253, 246, 0.98);
  border: 1px solid #eadfbb;
  border-left-width: 5px;
  border-radius: 8px;
  box-shadow: 0 16px 38px rgba(29, 36, 48, 0.18);
  color: var(--saviory-ink);
  transform: translateY(0);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.bs-notification.alert::before {
  content: "";
  width: 0.72rem;
  height: 0.72rem;
  margin-top: 0.25rem;
  border-radius: 50%;
  background: var(--saviory-yellow);
  box-shadow: 0 0 0 4px rgba(255, 187, 0, 0.18);
  flex: 0 0 auto;
}

.bs-notification.is-dismissing {
  opacity: 0;
  transform: translateY(-8px);
}

.bs-notification-body {
  min-width: 0;
  font-weight: 750;
  line-height: 1.35;
}

.bs-notification .btn-close {
  position: absolute;
  top: 0.72rem;
  right: 0.72rem;
  width: 0.8rem;
  height: 0.8rem;
  padding: 0.45rem;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.72);
}

.bs-notification-timer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--saviory-yellow);
  transform-origin: left center;
  animation: bs-notification-countdown var(--bs-notification-duration, 5200ms) linear forwards;
}

.bs-notification.is-paused .bs-notification-timer {
  animation-play-state: paused;
}

.bs-notification-success {
  border-left-color: var(--saviory-teal) !important;
}
.bs-notification-success::before,
.bs-notification-success .bs-notification-timer {
  background: var(--saviory-teal);
}
.bs-notification-success::before {
  box-shadow: 0 0 0 4px rgba(64, 152, 144, 0.18) !important;
}

.bs-notification-info,
.bs-notification-debug {
  border-left-color: var(--saviory-yellow-border-strong) !important;
}

.bs-notification-warning {
  border-left-color: var(--saviory-orange) !important;
}
.bs-notification-warning::before,
.bs-notification-warning .bs-notification-timer {
  background: var(--saviory-orange);
}
.bs-notification-warning::before {
  box-shadow: 0 0 0 4px rgba(240, 104, 24, 0.18) !important;
}

.bs-notification-error,
.bs-notification-danger {
  border-left-color: var(--saviory-red) !important;
}
.bs-notification-error::before,
.bs-notification-danger::before,
.bs-notification-error .bs-notification-timer,
.bs-notification-danger .bs-notification-timer {
  background: var(--saviory-red);
}
.bs-notification-error::before,
.bs-notification-danger::before {
  box-shadow: 0 0 0 4px rgba(224, 24, 56, 0.16) !important;
}

@keyframes bs-notification-countdown {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

@media (max-width: 767.98px) {
  .bs-message-stack {
    top: 68px;
    right: 0.75rem;
    left: 0.75rem;
    width: auto;
  }
  .bs-message-stack-auth {
    top: 0.75rem;
  }
}


/* Saviory Bricks app shell navigation */
.bs-nav-wrap {
  position: sticky;
  top: 0;
  z-index: 1020;
  background: rgba(255, 253, 246, 0.96);
  border-bottom: 1px solid var(--saviory-yellow-border);
  backdrop-filter: blur(14px);
  box-shadow: 0 2px 14px rgba(31, 41, 55, 0.08);
}

.bs-app-nav {
  background: linear-gradient(90deg, #fffdf6 0%, var(--saviory-yellow-surface) 62%, #fff4c7 100%) !important;
  min-height: 64px;
  padding: 0.42rem 0.75rem;
}

.bs-app-nav .navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.62rem;
  min-width: 0;
  margin-right: 0.85rem;
  color: #1f2937;
  font-weight: 850;
  text-decoration: none;
}

.bs-brand-logo {
  display: block;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  flex: 0 0 auto;
}

.bs-brand-wordmark {
  display: inline-flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
  letter-spacing: 0;
  line-height: 1;
}

.bs-brand-name {
  overflow: hidden;
  font-size: 0.98rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bs-brand-product {
  color: var(--saviory-yellow-text);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.bs-env-label {
  border-left: 1px solid var(--saviory-yellow-border);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  padding-left: 0.55rem;
  white-space: nowrap;
}

.bs-nav-panel {
  color: var(--saviory-ink);
}

.bs-nav-panel-header {
  border-bottom: 1px solid var(--saviory-yellow-border);
  background: var(--saviory-yellow-surface);
}

.bs-nav-body {
  gap: 0.6rem;
}

.bs-app-nav .navbar-nav {
  gap: 0.16rem;
}

.bs-app-nav .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  min-height: 42px;
  border-radius: 8px;
  color: #374151 !important;
  font-weight: 780;
  line-height: 1.1;
  padding: 0.48rem 0.68rem !important;
}

.bs-app-nav .nav-link:hover,
.bs-app-nav .nav-link:focus,
.bs-app-nav .dropdown-toggle.show {
  background: var(--saviory-yellow-soft);
  color: #111827 !important;
}

.bs-app-nav .nav-link.active,
.bs-app-nav .nav-link.active:hover,
.bs-app-nav .nav-link.active:focus {
  background: var(--saviory-yellow);
  color: var(--saviory-ink) !important;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.14);
}

.bs-app-nav .dropdown-toggle::after {
  display: none;
}

.bs-nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  min-width: 1.1rem;
  color: var(--saviory-yellow-text);
  font-size: 1rem;
}

.bs-app-nav .nav-link.active .bs-nav-icon {
  color: var(--saviory-ink);
}

.bs-icon-link {
  justify-content: center;
  min-width: 42px;
  font-size: 1.05rem;
}

.bs-notification-badge {
  min-width: 1.1rem;
  font-size: 0.65rem;
  line-height: 1.1;
}

.bs-app-nav .dropdown-menu {
  border-radius: 8px;
  border-color: var(--saviory-yellow-border);
  box-shadow: 0 14px 34px rgba(31, 41, 55, 0.14);
}

.bs-nav-menu-wide {
  min-width: 17rem;
  padding: 0.48rem;
}

.bs-app-nav .dropdown-header {
  color: var(--saviory-yellow-text);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.bs-app-nav .dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 38px;
  border-radius: 6px;
  margin: 0.08rem 0;
  width: auto;
  color: var(--saviory-ink);
  font-weight: 700;
}

.bs-dropdown-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 1.45rem;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 6px;
  background: var(--saviory-yellow-surface);
  color: var(--saviory-yellow-text);
  font-size: 0.9rem;
}

.bs-app-nav .dropdown-item > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bs-app-nav .dropdown-item:hover .bs-dropdown-icon,
.bs-app-nav .dropdown-item:focus .bs-dropdown-icon,
.bs-app-nav .dropdown-item.active .bs-dropdown-icon {
  background: var(--saviory-yellow);
  color: var(--saviory-ink);
}

.bs-app-nav .dropdown-item:hover,
.bs-app-nav .dropdown-item:focus,
.bs-app-nav .dropdown-item.active {
  background: var(--saviory-yellow-soft);
  color: #111827;
}

.bs-app-nav .dropdown-divider {
  border-color: var(--saviory-yellow-border);
  margin: 0.42rem 0;
}

.bs-language-menu {
  display: flex;
  align-items: center;
}

.bs-language-switch {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0.16rem;
  border: 1px solid var(--saviory-yellow-border);
  border-radius: 8px;
  background: rgba(255, 253, 246, 0.78);
  gap: 0.12rem;
}

.bs-language-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 1.9rem;
  border-radius: 6px;
  color: var(--saviory-ink-muted);
  font-size: 0.74rem;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
}

.bs-language-option:hover,
.bs-language-option:focus {
  background: var(--saviory-yellow-soft);
  color: var(--saviory-ink);
}

.bs-language-option.active {
  background: var(--saviory-yellow);
  color: var(--saviory-ink);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.12);
}

.bs-user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid var(--saviory-yellow-border-strong);
  border-radius: 8px;
  background: var(--saviory-yellow);
  color: var(--saviory-ink);
  font-size: 0.82rem;
  font-weight: 900;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.12);
}

.bs-user-label {
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bs-nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-color: var(--saviory-yellow-border);
  border-radius: 8px;
  color: var(--saviory-ink);
  font-size: 1.35rem;
  padding: 0;
}

.bs-nav-toggle:focus {
  box-shadow: 0 0 0 0.18rem rgba(255, 187, 0, 0.35);
}

@media (min-width: 992px) {
  .bs-nav-panel.offcanvas-lg {
    position: static;
    flex-grow: 1;
    width: auto !important;
    height: auto !important;
    visibility: visible !important;
    background: transparent;
    border: 0;
    transform: none !important;
  }

  .bs-nav-panel .offcanvas-header {
    display: none;
  }

  .bs-nav-body {
    display: flex;
    align-items: center;
    flex-grow: 1;
    padding: 0;
    overflow: visible;
  }

  .bs-primary-nav {
    flex-wrap: wrap;
  }

  .bs-utility-nav {
    padding-left: 0.55rem;
    margin-left: 0.55rem;
    border-left: 1px solid var(--saviory-yellow-border);
  }
}

@media (max-width: 1199.98px) and (min-width: 992px) {
  .bs-app-nav .nav-link {
    padding-inline: 0.52rem !important;
  }

  .bs-user-label {
    max-width: 6.4rem;
  }
}

@media (max-width: 991.98px) {

  .bs-import-sort-workspace {
    grid-template-columns: 1fr;
  }

  .bs-sort-detail {
    position: static;
  }

  .bs-sort-detail-card {
    width: 100%;
  }

  .bs-sort-image-frame {
    min-height: 20rem;
  }

  .bs-import-sort-workspace .bs-data-table-scroll {
    max-height: none;
  }

  .bs-sort-table-panel:has(.bs-table-pagination) .bs-table-pagination {
    padding-right: 0;
  }

  .bs-sort-table-panel:has(.bs-table-pagination) .bs-import-sort-actions {
    min-height: auto;
    margin-top: 0.72rem;
    padding: 0.72rem;
    border: 1px solid #eadfbb;
    background: rgba(255, 253, 246, 0.96);
    box-shadow: 0 8px 22px rgba(29, 36, 48, 0.06);
    pointer-events: auto;
  }


  .bs-filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .bs-filter-form,
  .bs-filter-form form,
  .bs-payment-filters {
    width: 100%;
  }

  .bs-list-actions,
  .bs-list-actions .btn,
  .bs-list-actions button,
  .bs-segment-actions,
  .bs-inline-alert,
  .bs-inline-alert .btn-group {
    width: 100%;
  }

  .bs-list-actions .btn,
  .bs-list-actions button {
    flex: 1 1 auto;
  }

  .bs-offer-summary-grid {
    grid-template-columns: 1fr;
  }

  .bs-panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .bs-inline-alert {
    justify-content: flex-start;
  }


  .bs-scan-shell {
    grid-template-columns: 1fr;
  }

  .bs-scan-preview,
  .bs-scan-results,
  .bs-scan-empty,
  .bs-scan-loading {
    min-height: 28rem;
  }

  .bs-app-nav {
    min-height: 60px;
  }

  .bs-brand-logo {
    width: 30px;
    height: 30px;
  }

  .bs-env-label {
    font-size: 0.72rem;
  }

  .bs-nav-panel {
    width: min(390px, 92vw) !important;
    background: var(--saviory-panel);
    border-left: 1px solid var(--saviory-yellow-border);
  }

  .bs-nav-body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0.85rem;
  }

  .bs-app-nav .navbar-nav {
    gap: 0.28rem;
    width: 100%;
  }

  .bs-app-nav .nav-link {
    justify-content: flex-start;
    width: 100%;
    min-height: 48px;
    padding: 0.72rem 0.78rem !important;
  }

  .bs-app-nav .dropdown-menu {
    position: static !important;
    width: 100%;
    border: 1px solid var(--saviory-yellow-border);
    box-shadow: none;
    transform: none !important;
  }

  .bs-nav-menu-wide {
    min-width: 0;
  }

  .bs-utility-nav {
    padding-top: 0.65rem;
    margin-top: 0.65rem;
    border-top: 1px solid var(--saviory-yellow-border);
  }

  .bs-icon-link {
    justify-content: flex-start;
  }

  .bs-user-label {
  .bs-language-switch {
    width: 100%;
    min-height: 46px;
  }

  .bs-language-option {
    flex: 1 1 0;
    height: 2.3rem;
  }

    max-width: none;
  }
}





/* Order detail compact header */
.bs-order-header {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
  padding: 0.72rem 0.85rem;
  border: 1px solid #eadfbb;
  border-radius: 8px;
  background: var(--saviory-panel);
  box-shadow: 0 8px 22px rgba(29, 36, 48, 0.06);
}

.bs-order-header-title {
  display: flex;
  align-items: center;
  flex: 1 1 18rem;
  gap: 0.55rem;
  min-width: 0;
}

.bs-order-integration {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: 0.22rem 0.5rem;
  border: 1px solid var(--saviory-yellow-border-strong);
  border-radius: 6px;
  background: var(--saviory-yellow);
  color: var(--saviory-ink);
  font-size: 0.75rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.bs-order-header-title h1 {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.25rem 0.38rem;
  min-width: 0;
  margin: 0;
  font-size: clamp(1.15rem, 1.7vw, 1.48rem);
  font-weight: 900;
  line-height: 1.12;
}

.bs-order-header-title h1 a {
  min-width: 0;
  color: var(--saviory-ink);
  overflow-wrap: anywhere;
  text-decoration: none;
}

.bs-order-header-title h1 a:hover,
.bs-order-header-title h1 a:focus {
  color: var(--saviory-yellow-text);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18rem;
}

.bs-order-header-title h1 small {
  color: var(--saviory-ink-muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.bs-order-picked {
  --picked-progress: 0%;
  --picked-bg: #fffdf6;
  --picked-fill: #eee7d7;
  --picked-border: #d9ccb1;
  --picked-accent: var(--saviory-ink-muted);
  display: grid;
  align-content: center;
  justify-items: center;
  flex: 0 1 12rem;
  min-width: 11rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--picked-border);
  border-radius: 8px;
  background: linear-gradient(
    90deg,
    var(--picked-fill) 0%,
    var(--picked-fill) var(--picked-progress),
    var(--picked-bg) var(--picked-progress),
    var(--picked-bg) 100%
  );
  color: var(--saviory-ink);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
}

.bs-order-picked.is-empty {
  --picked-bg: #f8f6ef;
  --picked-fill: #e6dfcf;
  --picked-border: #d8cab0;
  --picked-accent: var(--saviory-ink-muted);
}

.bs-order-picked.is-started {
  --picked-bg: var(--saviory-orange-soft);
  --picked-fill: #ffc39f;
  --picked-border: rgba(240, 104, 24, 0.48);
  --picked-accent: var(--saviory-orange);
}

.bs-order-picked.is-mid {
  --picked-bg: var(--saviory-yellow-surface);
  --picked-fill: #ffd66b;
  --picked-border: var(--saviory-yellow-border);
  --picked-accent: var(--saviory-yellow-text);
}

.bs-order-picked.is-high {
  --picked-bg: #fff1b8;
  --picked-fill: var(--saviory-yellow);
  --picked-border: var(--saviory-yellow-border-strong);
  --picked-accent: var(--saviory-yellow-text);
}

.bs-order-picked.is-complete {
  --picked-bg: var(--saviory-teal-soft);
  --picked-fill: #a7ddd8;
  --picked-border: rgba(64, 152, 144, 0.58);
  --picked-accent: var(--saviory-teal-hover);
}

.bs-order-picked > span,
.bs-order-pill span {
  color: var(--saviory-ink-muted);
  font-size: 0.67rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  text-transform: uppercase;
}

.bs-order-picked strong {
  display: block;
  margin-top: 0.22rem;
  font-size: clamp(1.25rem, 2.1vw, 1.65rem);
  font-weight: 950;
  line-height: 1;
}

.bs-order-picked strong small {
  color: var(--picked-accent);
  font-size: 0.56em;
  font-weight: 950;
  white-space: nowrap;
}

.bs-order-picked-meter {
  width: 100%;
  height: 0.35rem;
  margin-top: 0.46rem;
  border-radius: 999px;
  background: rgba(29, 36, 48, 0.13);
  overflow: hidden;
}

.bs-order-picked-meter i {
  display: block;
  width: var(--picked-progress);
  height: 100%;
  border-radius: inherit;
  background: var(--picked-accent);
}

.bs-order-header-info {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  flex: 999 1 auto;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-width: 0;
}

.bs-order-pill-stack {
  display: flex;
  flex: 0 1 11rem;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 9.5rem;
}

.bs-order-count-stack {
  flex-basis: 12rem;
}

.bs-order-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  min-width: 0;
  min-height: 2rem;
  padding: 0.34rem 0.55rem;
  border: 1px solid #eadfbb;
  border-radius: 6px;
  background: #fffdf6;
  color: var(--saviory-ink);
}

.bs-order-pill strong {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-width: 0;
  color: var(--saviory-ink);
  font-size: 0.84rem;
  font-weight: 900;
  line-height: 1.08;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bs-order-count-stack .bs-order-pill strong {
  font-size: 0.96rem;
}

.bs-order-pill small {
  color: var(--saviory-ink-muted);
  font-size: 0.84em;
}

.bs-order-pill.is-ok {
  border-color: rgba(64, 152, 144, 0.42);
  background: var(--saviory-teal-soft);
}

.bs-order-pill.is-muted {
  background: #f8f6ef;
}

.bs-order-pill.is-ok i {
  color: var(--saviory-teal);
}

.bs-order-pill.is-muted i {
  color: var(--saviory-ink-muted);
}

.bs-order-total-pill {
  border-color: var(--saviory-yellow-border);
  background: var(--saviory-yellow-surface);
}

.bs-order-pill-wide strong {
  max-width: 10rem;
}

.bs-order-header-actions {
  display: flex;
  align-items: stretch;
  flex: 0 1 18rem;
  flex-wrap: wrap;
  gap: 0.45rem;
  min-width: 14rem;
}

.bs-order-header-actions .btn,
.bs-order-header-actions .dropdown,
.bs-order-print-form {
  flex: 1 1 8.5rem;
  min-width: 0;
}

.bs-order-header-actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
  width: 100%;
  min-height: 2.35rem;
  padding-inline: 0.72rem;
  font-weight: 850;
  white-space: nowrap;
}

.bs-order-picking-action {
  font-weight: 950 !important;
}

.bs-order-print-form,
.bs-order-dropdown-form {
  margin: 0;
}

.bs-order-dropdown-menu {
  min-width: 15rem;
  padding: 0.42rem;
  border-color: #eadfbb;
  box-shadow: 0 14px 34px rgba(31, 41, 55, 0.14);
}

.bs-order-dropdown-menu .dropdown-item,
.bs-order-dropdown-menu .dropdown-item[type="submit"] {
  min-height: 36px;
  border-radius: 6px;
  color: var(--saviory-ink);
  font-weight: 750;
}

.bs-order-dropdown-menu .dropdown-item:hover,
.bs-order-dropdown-menu .dropdown-item:focus {
  background: var(--saviory-yellow-soft);
}

.bs-order-dropdown-form .dropdown-item {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
}

@media (max-width: 991.98px) {
  .bs-order-header-title,
  .bs-order-header-info,
  .bs-order-header-actions {
    flex-basis: 100%;
  }

  .bs-order-header-info {
    justify-content: flex-start;
  }
}

@media (max-width: 575.98px) {

  .bs-import-sort-page {
    padding-left: 0.55rem !important;
    padding-right: 0.55rem !important;
  }

  .bs-import-sort-header,
  .bs-import-sort-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .bs-sort-main-stats,
  .bs-sort-meta-grid {
    grid-template-columns: 1fr;
  }

  .bs-import-sort-actions .btn,
  .bs-import-sort-actions form {
    width: 100%;
  }


  .bs-list-page {
    padding-left: 0.55rem !important;
    padding-right: 0.55rem !important;
  }

  .bs-payment-filters > *,
  .bs-month-picker,
  .bs-payment-filters .btn,
  .bs-payment-filters .form-select,
  .bs-payment-filters .form-control {
    width: 100% !important;
  }

  .bs-month-picker {
    min-width: 0;
  }

  .bs-summary-grid,
  .bs-card-stat-grid {
    grid-template-columns: 1fr;
  }

  .bs-data-table {
    font-size: 0.84rem;
  }

  .bs-data-table thead th,
  .bs-data-table tbody td {
    padding: 0.52rem 0.58rem;
  }


  .bs-scan-page {
    padding-left: 0.55rem !important;
    padding-right: 0.55rem !important;
  }

  .bs-scan-panel-head,
  .bs-scan-controls {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .bs-scan-panel-head {
    flex-direction: column;
  }

  .bs-scan-live,
  .bs-scan-controls .btn {
    width: 100%;
  }

  .bs-scan-preview,
  .bs-scan-results,
  .bs-scan-empty,
  .bs-scan-loading {
    min-height: 22rem;
  }

  .bs-order-header-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .bs-order-picked,
  .bs-order-pill-stack,
  .bs-order-header-actions,
  .bs-order-header-actions .btn,
  .bs-order-header-actions .dropdown,
  .bs-order-print-form {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
  }

  .bs-order-pill strong {
    max-width: 62%;
  }
}

/* Dashboard command center */
.bs-dashboard {
  color: var(--saviory-ink);
}

.bs-dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(18rem, max-content);
  gap: 1rem;
  align-items: stretch;
  margin-bottom: 0.9rem;
  padding: 1.05rem;
  border: 1px solid #eadfbb;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 187, 0, 0.2), rgba(255, 253, 246, 0) 46%),
    repeating-linear-gradient(90deg, rgba(255, 187, 0, 0.08) 0 1px, transparent 1px 54px),
    var(--saviory-panel);
  box-shadow: 0 10px 28px rgba(29, 36, 48, 0.08);
}

.bs-dashboard-hero-copy,
.bs-dashboard-hero-actions {
  min-width: 0;
}

.bs-dashboard-hero-copy h1 {
  margin: 0.16rem 0 0.22rem;
  font-size: clamp(1.55rem, 2.4vw, 2.15rem);
  font-weight: 900;
  line-height: 1.04;
}

.bs-dashboard-hero-copy p {
  max-width: 56rem;
  margin: 0;
  color: var(--saviory-ink-muted);
  font-size: 0.98rem;
  line-height: 1.45;
}

.bs-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--saviory-yellow-text);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.1;
  text-transform: uppercase;
}

.bs-kicker i {
  color: var(--saviory-orange);
  font-size: 0.9rem;
}

.bs-dashboard-hero-actions {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.85rem;
  align-items: flex-end;
}

.bs-period-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 0.18rem;
  justify-content: flex-end;
  padding: 0.22rem;
  border: 1px solid #eadfbb;
  border-radius: 8px;
  background: rgba(255, 248, 229, 0.88);
}

.bs-period-switcher a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.34rem 0.62rem;
  border-radius: 6px;
  color: var(--saviory-ink-muted);
  font-size: 0.76rem;
  font-weight: 850;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.bs-period-switcher a:hover,
.bs-period-switcher a:focus {
  color: var(--saviory-ink);
  background: #fffdf6;
}

.bs-period-switcher a.active {
  color: var(--saviory-ink);
  background: var(--saviory-yellow);
  box-shadow: inset 0 -2px 0 rgba(29, 36, 48, 0.16);
}

.bs-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.bs-quick-actions .btn,
.bs-panel-heading .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.bs-dashboard-status-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.bs-metric {
  position: relative;
  min-width: 0;
  min-height: 9.2rem;
  padding: 0.9rem;
  border: 1px solid #eadfbb;
  border-left: 4px solid var(--saviory-yellow-border-strong);
  border-radius: 8px;
  background: var(--saviory-panel);
  box-shadow: 0 8px 22px rgba(29, 36, 48, 0.06);
  overflow: hidden;
}

.bs-metric i {
  position: absolute;
  top: 0.8rem;
  right: 0.82rem;
  color: rgba(29, 36, 48, 0.16);
  font-size: 1.8rem;
}

.bs-metric span,
.bs-metric small,
.bs-metric strong {
  display: block;
  min-width: 0;
}

.bs-metric span {
  max-width: calc(100% - 2.1rem);
  color: var(--saviory-ink-muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: uppercase;
}

.bs-metric strong {
  margin-top: 1.12rem;
  color: var(--saviory-ink);
  font-size: clamp(1.65rem, 2.4vw, 2.35rem);
  font-weight: 900;
  line-height: 0.96;
  overflow-wrap: anywhere;
}

.bs-metric small {
  margin-top: 0.46rem;
  color: var(--saviory-ink-muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
}

.bs-metric-risk {
  border-left-color: var(--saviory-red);
  background: linear-gradient(180deg, var(--saviory-red-soft), var(--saviory-panel) 68%);
}

.bs-metric-good {
  border-left-color: var(--saviory-teal);
  background: linear-gradient(180deg, var(--saviory-teal-soft), var(--saviory-panel) 68%);
}

.bs-metric-ink {
  border-left-color: var(--saviory-ink);
}

.bs-metric-teal {
  border-left-color: var(--saviory-teal);
}

.bs-dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(20rem, 24rem);
  gap: 0.9rem;
  align-items: start;
}

.bs-dashboard-main,
.bs-dashboard-side {
  display: grid;
  gap: 0.9rem;
  min-width: 0;
}

.bs-dashboard-panel {
  min-width: 0;
  border: 1px solid #eadfbb;
  border-radius: 8px;
  background: rgba(255, 253, 246, 0.96);
  box-shadow: 0 8px 24px rgba(29, 36, 48, 0.06);
  overflow: hidden;
}

.bs-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid #eadfbb;
  background: linear-gradient(180deg, var(--saviory-yellow-surface), rgba(255, 253, 246, 0.7));
}

.bs-panel-heading > div {
  min-width: 0;
}

.bs-panel-heading h2 {
  margin: 0.16rem 0 0;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.18;
}

.bs-panel-total {
  flex: 0 0 auto;
  color: var(--saviory-ink-muted);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.35;
  text-align: right;
}

.bs-attention-table {
  display: grid;
}

.bs-attention-head,
.bs-attention-row {
  display: grid;
  grid-template-columns: minmax(7.5rem, 0.8fr) minmax(9rem, 1.25fr) minmax(8rem, 1fr) minmax(5rem, 0.55fr) minmax(5.4rem, 0.55fr);
  gap: 0.72rem;
  align-items: center;
}

.bs-attention-head {
  padding: 0.72rem 1rem;
  color: var(--saviory-ink-muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.bs-attention-row {
  position: relative;
  min-width: 0;
  padding: 0.78rem 1rem;
  border-top: 1px solid #f1e4bf;
  color: var(--saviory-ink);
  text-decoration: none;
}

.bs-attention-row::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--saviory-yellow-border-strong);
  opacity: 0.28;
}

.bs-attention-row.is-priority::before {
  background: var(--saviory-red);
  opacity: 1;
}

.bs-attention-row:hover,
.bs-attention-row:focus {
  color: var(--saviory-ink);
  background: var(--saviory-yellow-surface);
}

.bs-attention-row > span,
.bs-attention-head > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bs-attention-order {
  display: flex;
  align-items: center;
  gap: 0.42rem;
}

.bs-attention-order strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bs-attention-order em,
.bs-recent-list em {
  flex: 0 0 auto;
  padding: 0.16rem 0.38rem;
  border-radius: 999px;
  background: var(--saviory-red-soft);
  color: #8c1025;
  font-size: 0.64rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.bs-carrier-lane {
  margin: 0.85rem;
  border: 1px solid #eadfbb;
  border-radius: 8px;
  background: #fffdf6;
  overflow: hidden;
}

.bs-carrier-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 0.9rem 0.72rem;
}

.bs-carrier-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.18;
}

.bs-carrier-head span {
  color: var(--saviory-ink-muted);
  font-size: 0.76rem;
  font-weight: 750;
}

.bs-carrier-counts {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 0.1rem 0.38rem;
  align-items: baseline;
  text-align: right;
}

.bs-carrier-counts strong {
  color: var(--saviory-ink);
  font-size: 1rem;
  font-weight: 900;
}

.bs-carrier-progress,
.bs-team-progress,
.bs-breakdown-track {
  height: 0.42rem;
  border-radius: 999px;
  background: #f2e4bc;
  overflow: hidden;
}

.bs-carrier-progress {
  margin: 0 0.9rem 0.75rem;
}

.bs-carrier-progress span,
.bs-team-progress span,
.bs-breakdown-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--saviory-yellow), var(--saviory-orange));
}

.bs-carrier-method-head,
.bs-carrier-method {
  display: grid;
  grid-template-columns: minmax(11rem, 1.6fr) repeat(4, minmax(4rem, 0.55fr));
  gap: 0.65rem;
  align-items: center;
}

.bs-carrier-method-head {
  padding: 0.58rem 0.9rem;
  border-top: 1px solid #f1e4bf;
  background: rgba(255, 248, 229, 0.72);
  color: var(--saviory-ink-muted);
  font-size: 0.67rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.bs-carrier-method {
  padding: 0.58rem 0.9rem;
  border-top: 1px solid #f4e9c8;
  color: var(--saviory-ink-muted);
  font-size: 0.82rem;
}

.bs-carrier-method:hover {
  background: var(--saviory-yellow-surface);
}

.bs-carrier-method > span,
.bs-carrier-method-head > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bs-carrier-method-name {
  color: var(--saviory-ink);
  font-weight: 800;
}

.bs-carrier-method-total {
  background: #fff8e5;
  color: var(--saviory-ink);
  font-weight: 850;
}

.bs-worker-focus {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  padding: 1rem;
}

.bs-worker-focus > div {
  min-width: 0;
  padding: 0.9rem;
  border: 1px solid #eadfbb;
  border-radius: 8px;
  background: var(--saviory-yellow-surface);
}

.bs-worker-focus span,
.bs-worker-focus small {
  display: block;
  color: var(--saviory-ink-muted);
  font-weight: 800;
}

.bs-worker-focus span {
  font-size: 0.72rem;
  text-transform: uppercase;
}

.bs-worker-focus strong {
  display: block;
  margin: 0.45rem 0 0.2rem;
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
}

.bs-team-list,
.bs-breakdown-list,
.bs-compact-list,
.bs-recent-list {
  display: grid;
}

.bs-team-row {
  display: grid;
  grid-template-columns: 2.45rem minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: center;
  padding: 0.82rem 1rem;
  border-top: 1px solid #f1e4bf;
}

.bs-team-row:first-child,
.bs-breakdown-row:first-child,
.bs-compact-list > div:first-child,
.bs-recent-list a:first-child {
  border-top: 0;
}

.bs-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.45rem;
  height: 2.45rem;
  border: 2px solid var(--saviory-yellow-border-strong);
  border-radius: 50%;
  background: var(--saviory-yellow);
  color: var(--saviory-ink);
  font-weight: 900;
}

.bs-team-main {
  min-width: 0;
}

.bs-team-main strong {
  display: block;
  overflow: hidden;
  color: var(--saviory-ink);
  font-size: 0.88rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bs-team-progress {
  margin-top: 0.36rem;
}

.bs-team-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(2.2rem, auto));
  gap: 0.45rem;
  text-align: right;
}

.bs-team-stats span {
  display: grid;
  gap: 0.04rem;
}

.bs-team-stats strong {
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1;
}

.bs-team-stats small {
  color: var(--saviory-ink-muted);
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.bs-pulse-chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.38rem;
  padding: 1rem;
}

.bs-pulse-day {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
  text-align: center;
}

.bs-pulse-day strong {
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1;
}

.bs-pulse-day > div {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 5.6rem;
  border: 1px solid #f1e4bf;
  border-radius: 6px;
  background: #fff8e5;
  overflow: hidden;
}

.bs-pulse-day > div span {
  display: block;
  width: 100%;
  min-height: 0.22rem;
  background: linear-gradient(180deg, var(--saviory-yellow), var(--saviory-yellow-active));
}

.bs-pulse-day small {
  color: var(--saviory-ink-muted);
  font-size: 0.66rem;
  font-weight: 850;
  line-height: 1;
}

.bs-breakdown-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(4rem, 7rem) 2.8rem;
  gap: 0.62rem;
  align-items: center;
  padding: 0.78rem 1rem;
  border-top: 1px solid #f1e4bf;
}

.bs-breakdown-label {
  min-width: 0;
}

.bs-breakdown-label strong,
.bs-breakdown-label span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bs-breakdown-label strong {
  font-size: 0.86rem;
  font-weight: 900;
}

.bs-breakdown-label span,
.bs-breakdown-row em {
  color: var(--saviory-ink-muted);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
}

.bs-breakdown-row em {
  text-align: right;
}

.bs-compact-list > div,
.bs-recent-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.72rem 1rem;
  border-top: 1px solid #f1e4bf;
}

.bs-compact-list span,
.bs-recent-list span,
.bs-recent-list small {
  min-width: 0;
}

.bs-compact-list span {
  overflow: hidden;
  color: var(--saviory-ink-muted);
  font-size: 0.85rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bs-compact-list strong {
  flex: 0 0 auto;
  padding: 0.16rem 0.46rem;
  border-radius: 999px;
  background: var(--saviory-yellow-surface);
  font-size: 0.78rem;
  font-weight: 900;
}

.bs-recent-list a {
  color: var(--saviory-ink);
  text-decoration: none;
}

.bs-recent-list a:hover,
.bs-recent-list a:focus {
  background: var(--saviory-yellow-surface);
}

.bs-recent-list a > span {
  display: grid;
  gap: 0.12rem;
}

.bs-recent-list strong,
.bs-recent-list small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bs-recent-list strong {
  font-size: 0.86rem;
  font-weight: 900;
}

.bs-recent-list small {
  color: var(--saviory-ink-muted);
  font-size: 0.74rem;
  font-weight: 750;
}

.bs-recent-list em {
  background: var(--saviory-teal-soft);
  color: #1d635d;
}

.bs-empty-state {
  display: grid;
  place-items: center;
  gap: 0.34rem;
  min-height: 9rem;
  padding: 1.4rem;
  color: var(--saviory-ink-muted);
  text-align: center;
}

.bs-empty-state i {
  color: var(--saviory-teal);
  font-size: 1.8rem;
}

.bs-empty-state strong {
  color: var(--saviory-ink);
  font-size: 1rem;
  font-weight: 900;
}

.bs-empty-state span {
  max-width: 22rem;
  font-size: 0.86rem;
  line-height: 1.35;
}





/* Import sort workspace */
.bs-import-sort-page {
  color: var(--saviory-ink);
}

.bs-import-sort-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
  padding: 0.9rem 1rem;
  border: 1px solid #eadfbb;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 187, 0, 0.2), rgba(255, 253, 246, 0) 48%),
    repeating-linear-gradient(90deg, rgba(255, 187, 0, 0.07) 0 1px, transparent 1px 54px),
    var(--saviory-panel);
  box-shadow: 0 10px 28px rgba(29, 36, 48, 0.08);
}

.bs-import-sort-header h1 {
  margin: 0.14rem 0 0;
  font-size: clamp(1.25rem, 1.9vw, 1.75rem);
  font-weight: 900;
  line-height: 1.1;
}

.bs-import-sort-header p {
  margin: 0.25rem 0 0;
  color: var(--saviory-ink-muted);
  font-size: 0.88rem;
  font-weight: 750;
}

.bs-import-sort-workspace {
  display: grid;
  grid-template-columns: minmax(20rem, 38vw) minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
}

.bs-sort-detail {
  position: sticky;
  top: 5.25rem;
  min-width: 0;
  display: flex;
  justify-content: center;
}

.bs-sort-detail-card {
  width: min(100%, 35rem);
  display: grid;
  gap: 0.75rem;
  padding: 0.85rem;
  border: 1px solid #eadfbb;
  border-radius: 8px;
  background: rgba(255, 253, 246, 0.98);
  box-shadow: 0 12px 30px rgba(29, 36, 48, 0.1);
}

.bs-sort-image-frame {
  display: grid;
  place-items: center;
  min-height: clamp(20rem, 42vh, 34rem);
  padding: 1rem;
  border: 1px solid #eadfbb;
  border-radius: 8px;
  background:
    radial-gradient(circle at center, rgba(255, 187, 0, 0.16), transparent 38%),
    #fff;
}

.bs-sort-image-frame img {
  width: min(100%, 32rem);
  max-height: clamp(18rem, 40vh, 32rem);
  object-fit: contain;
}

.bs-sort-main-stats {
  display: grid;
  grid-template-columns: minmax(9rem, 0.72fr) minmax(0, 1.28fr);
  gap: 0.65rem;
}

.bs-sort-stat,
.bs-sort-meta-item,
.bs-sort-name-card,
.bs-sort-condition {
  min-width: 0;
  border: 1px solid #eadfbb;
  border-radius: 8px;
  background: #fffdf6;
}

.bs-sort-stat {
  position: relative;
  display: grid;
  gap: 0.22rem;
  padding: 0.72rem 0.82rem;
  overflow: hidden;
}

.bs-sort-stat::after {
  content: "";
  position: absolute;
  right: 0.65rem;
  top: 0.65rem;
  width: 2rem;
  height: 1rem;
  border-radius: 4px;
  background: rgba(255, 187, 0, 0.24);
  box-shadow: 0 0.78rem 0 rgba(255, 187, 0, 0.14);
}

.bs-sort-stat span,
.bs-sort-meta-item span,
.bs-sort-name-card span,
.bs-sort-condition span {
  color: var(--saviory-ink-muted);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.1;
  text-transform: uppercase;
}

.bs-sort-stat strong {
  position: relative;
  z-index: 1;
  color: var(--saviory-ink);
  font-size: clamp(1.4rem, 2.2vw, 2.2rem);
  font-weight: 900;
  line-height: 1;
  overflow-wrap: anywhere;
}

.bs-sort-stat-color {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.bs-sort-stat-color span {
  grid-column: 1 / -1;
}

.bs-sort-color-swatch {
  width: 2.3rem;
  height: 2.3rem;
  border: 1px solid rgba(29, 36, 48, 0.22);
  border-radius: 8px;
  box-shadow: inset 0 -2px 0 rgba(29, 36, 48, 0.12);
}

.bs-sort-meta-grid {
  display: grid;
  grid-template-columns: minmax(7rem, 0.62fr) minmax(0, 1.38fr);
  gap: 0.65rem;
}

.bs-sort-meta-item,
.bs-sort-name-card,
.bs-sort-condition {
  display: grid;
  gap: 0.26rem;
  padding: 0.62rem 0.75rem;
}

.bs-sort-meta-item a,
.bs-sort-meta-item strong,
.bs-sort-condition strong {
  color: var(--saviory-ink);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.bs-sort-meta-item a {
  color: var(--saviory-yellow-text);
  text-decoration: none;
}

.bs-sort-meta-item a:hover,
.bs-sort-meta-item a:focus {
  color: var(--saviory-ink);
  text-decoration: underline;
}

.bs-sort-name-card p {
  margin: 0;
  color: var(--saviory-ink);
  font-size: 0.96rem;
  font-weight: 750;
  line-height: 1.3;
}

.bs-sort-table-panel {
  min-width: 0;
}

.bs-import-sort-workspace .bs-data-table-shell {
  border-radius: 8px;
}

.bs-import-sort-workspace .bs-data-table-scroll {
  max-height: calc(100vh - 13.8rem);
}

.bs-import-sort-workspace .bs-data-table {
  table-layout: fixed;
  min-width: 58rem;
}

.bs-import-sort-workspace .bs-data-table thead th {
  top: 0;
}

.bs-import-sort-workspace .bs-data-table th:nth-child(1),
.bs-import-sort-workspace .bs-data-table td:nth-child(1) {
  width: 5.7rem;
}

.bs-import-sort-workspace .bs-data-table th:nth-child(2),
.bs-import-sort-workspace .bs-data-table td:nth-child(2) {
  width: 6.2rem;
}

.bs-import-sort-workspace .bs-data-table th:nth-child(4),
.bs-import-sort-workspace .bs-data-table td:nth-child(4),
.bs-import-sort-workspace .bs-data-table th:nth-child(5),
.bs-import-sort-workspace .bs-data-table td:nth-child(5) {
  width: 7.2rem;
}

.bs-import-sort-workspace .bs-data-table th:nth-child(6),
.bs-import-sort-workspace .bs-data-table td:nth-child(6) {
  width: 5rem;
  text-align: right;
}

.bs-import-sort-workspace .bs-data-table th:nth-child(7),
.bs-import-sort-workspace .bs-data-table td:nth-child(7) {
  width: 8.8rem;
}

.bs-sort-name-col {
  width: 30% !important;
  max-width: 24rem;
  white-space: normal !important;
}

.bs-import-sort-workspace .bs-data-table td {
  cursor: pointer;
}

.bs-import-sort-workspace .bs-data-table td,
.bs-import-sort-workspace .bs-data-table th {
  overflow-wrap: anywhere;
}

.bs-import-sort-workspace .bs-data-table tr.table-active td {
  background: var(--saviory-yellow-soft);
  box-shadow: inset 4px 0 0 var(--saviory-yellow-border-strong);
}

.bs-sort-thumb {
  width: 76px;
  height: 76px;
  object-fit: contain;
  border: 1px solid #eadfbb;
  border-radius: 8px;
  background: #fff;
}

.bs-import-sort-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.85rem;
  margin-top: 0.72rem;
  padding: 0.72rem;
  border: 1px solid #eadfbb;
  border-radius: 8px;
  background: rgba(255, 253, 246, 0.96);
  box-shadow: 0 8px 22px rgba(29, 36, 48, 0.06);
}

.bs-import-sort-actions > span {
  color: var(--saviory-ink-muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.bs-import-sort-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  min-height: 2.45rem;
}

.bs-sort-table-panel:has(.bs-table-pagination) .bs-table-pagination {
  padding-right: 13.5rem;
}

.bs-sort-table-panel:has(.bs-table-pagination) .bs-import-sort-actions {
  position: relative;
  z-index: 2;
  min-height: 3.25rem;
  margin-top: -3.45rem;
  padding: 0.42rem 0.72rem 0.58rem;
  border: 0;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}

.bs-sort-table-panel:has(.bs-table-pagination) .bs-import-sort-actions > span,
.bs-sort-table-panel:has(.bs-table-pagination) .bs-import-sort-actions form {
  pointer-events: auto;
}

.bs-sort-empty {
  min-height: 22rem;
  display: grid;
  place-items: center;
  gap: 0.35rem;
  color: var(--saviory-ink-muted);
  text-align: center;
}

.bs-sort-empty i {
  color: var(--saviory-teal);
  font-size: 2rem;
}

.bs-sort-empty strong {
  color: var(--saviory-ink);
  font-weight: 900;
}

/* Shared list and table surfaces */
.bs-list-page {
  color: var(--saviory-ink);
}

.bs-list-actions .btn,
.bs-payment-filters .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.bs-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.9rem;
  padding: 0.75rem;
  border: 1px solid #eadfbb;
  border-radius: 8px;
  background: rgba(255, 253, 246, 0.96);
  box-shadow: 0 8px 22px rgba(29, 36, 48, 0.06);
}

.bs-filter-form,
.bs-filter-form form,
.bs-list-actions,
.bs-payment-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  min-width: 0;
}

.bs-filter-form form > div,
.bs-filter-form .form-group,
.bs-filter-form .mb-3 {
  margin-bottom: 0 !important;
}

.bs-filter-form label {
  margin-bottom: 0.18rem;
  color: var(--saviory-ink-muted);
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1.1;
}

.bs-filter-form .form-control,
.bs-filter-form .form-select,
.bs-payment-filters .form-control,
.bs-payment-filters .form-select {
  min-height: 2.35rem;
  border-color: #d9c99b;
  font-weight: 750;
}

.bs-payment-toolbar {
  justify-content: flex-start;
}

.bs-payment-filters {
  width: 100%;
}

.bs-payment-filters select {
  width: auto !important;
  min-width: 8.5rem;
}

.bs-month-picker {
  width: auto;
  min-width: 18rem;
}

.bs-month-picker .form-control {
  min-width: 9.5rem;
}

.bs-table-section {
  min-width: 0;
}

.bs-data-table-shell {
  min-width: 0;
  border: 1px solid #eadfbb;
  border-radius: 8px;
  background: rgba(255, 253, 246, 0.98);
  box-shadow: 0 8px 24px rgba(29, 36, 48, 0.06);
  overflow: hidden;
}

.bs-data-table-scroll {
  width: 100%;
}

/* Tables set their own Meta attrs.class (e.g. "table table-hover"), which
   overrides the template's default mb-0, so Bootstrap's default
   margin-bottom: 1rem leaves a blank strip at the bottom of the card
   (most visible when there is no pagination footer below it). */
.bs-data-table-shell .table {
  margin-bottom: 0;
}

/* Drop the last row's bottom border so it doesn't double up with the card's
   own bottom border (the .bs-data-table last-row rule doesn't catch tables
   that only carry the default "table table-hover" class). */
.bs-data-table-shell .table > tbody > tr:last-child > td,
.bs-data-table-shell .table > tbody > tr:last-child > th {
  border-bottom: 0;
}

.bs-data-table {
  --bs-table-bg: transparent;
  --bs-table-hover-bg: var(--saviory-yellow-surface);
  font-size: 0.9rem;
}

.bs-data-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 1px solid #eadfbb;
  color: var(--saviory-ink-muted);
  background: linear-gradient(180deg, var(--saviory-yellow-surface), rgba(255, 253, 246, 0.96));
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

.bs-data-table tbody td {
  border-color: #f1e4bf;
  color: var(--saviory-ink);
  vertical-align: middle;
  /* Taller rows so every row is a comfortable touch target (~44px) on tablets;
     min-height is ignored on table cells, so use vertical padding instead. */
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}

.bs-data-table tbody tr:last-child td {
  border-bottom: 0;
}

/* Printable barcode grid (responsive on phones/tablets, tidy on paper). */
.bs-barcode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.75rem;
  align-items: center;
}

.bs-barcode-grid .bs-barcode {
  width: 100%;
  height: auto;
}

@media print {
  .bs-barcode-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
  }
}

.bs-data-table .btn-sm {
  min-height: 2rem;
  padding: 0.28rem 0.55rem;
  font-weight: 850;
}

.bs-table-sort {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  color: inherit;
  text-decoration: none;
}

.bs-table-sort:hover,
.bs-table-sort:focus {
  color: var(--saviory-ink);
}

.bs-table-sort i {
  color: var(--saviory-yellow-border-strong);
  font-size: 0.74rem;
}

.bs-table-empty {
  display: grid;
  place-items: center;
  gap: 0.35rem;
  min-height: 8rem;
  padding: 1.4rem;
  color: var(--saviory-ink-muted);
  text-align: center;
}

.bs-table-empty i {
  color: var(--saviory-teal);
  font-size: 1.65rem;
}

.bs-table-empty strong {
  color: var(--saviory-ink);
  font-weight: 900;
}

.bs-table-pagination {
  padding: 0.78rem;
  border-top: 1px solid #eadfbb;
  background: var(--saviory-yellow-surface);
}

.bs-table-pagination .page-link {
  border-color: #d9c99b;
  color: var(--saviory-ink-muted);
  font-weight: 800;
}

.bs-table-pagination .page-item.active .page-link {
  border-color: var(--saviory-yellow-border-strong);
  color: var(--saviory-ink);
  background: var(--saviory-yellow);
}

.bs-table-section {
  display: block;
  min-width: 0;
  margin-bottom: 0.9rem;
}

.bs-table-section:last-child {
  margin-bottom: 0;
}

.bs-table-section form {
  min-width: 0;
}

.bs-data-table thead th {
  padding: 0.62rem 0.75rem;
}

.bs-data-table tbody td {
  padding: 0.58rem 0.75rem;
}

.bs-data-table a:not(.btn):not(.page-link) {
  color: var(--saviory-yellow-text);
  font-weight: 850;
  text-decoration: none;
}

.bs-data-table a:not(.btn):not(.page-link):hover,
.bs-data-table a:not(.btn):not(.page-link):focus {
  color: var(--saviory-ink);
  text-decoration: underline;
}

.bs-data-table .btn,
.bs-list-actions .btn,
.bs-list-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
  white-space: nowrap;
}


.bs-invoice-toolbar {
  align-items: flex-start;
}

.bs-invoice-toolbar .bs-list-actions {
  justify-content: flex-end;
}

.bs-invoice-filter-bar {
  justify-content: flex-start;
}

.bs-invoice-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: flex-end;
  width: 100%;
}

.bs-filter-field {
  display: grid;
  gap: 0.18rem;
  min-width: 8rem;
}

.bs-filter-field .form-label {
  margin-bottom: 0;
  color: var(--saviory-ink-muted);
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1.1;
}

.bs-filter-field .form-control,
.bs-filter-field .form-select {
  min-height: 2.35rem;
  border-color: #d9c99b;
  font-weight: 750;
}

.bs-invoice-search {
  flex: 1 1 20rem;
}

.bs-invoice-month {
  min-width: 18rem;
}

.bs-invoice-month .bs-month-picker {
  min-width: 0;
  width: 100%;
}

.bs-invoice-checkbox-field {
  min-width: auto;
  min-height: 2.35rem;
  align-content: center;
}

.bs-invoice-filter-actions {
  margin-left: auto;
}

.bs-bulk-actions {
  padding: 0.75rem;
  border-bottom: 1px solid #eadfbb;
  background: var(--saviory-yellow-surface);
}

.bs-invoice-table strong {
  font-weight: 900;
}

.bs-invoice-actions,
.bs-invoice-actions form {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.bs-invoice-email-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.86rem;
}

.bs-invoice-email-state.is-sent {
  border-color: rgba(25, 135, 84, 0.24);
  color: #146c43;
  background: rgba(25, 135, 84, 0.12);
}

.bs-invoice-email-state.is-missing {
  border-color: rgba(108, 117, 125, 0.22);
  color: var(--saviory-ink-muted);
  background: rgba(108, 117, 125, 0.1);
}

.bs-invoicing-page .badge {
  font-weight: 850;
}

.bs-summary-grid,
.bs-card-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.bs-offer-summary-grid {
  grid-template-columns: repeat(2, minmax(17rem, 1fr)) minmax(10rem, 0.42fr);
  align-items: stretch;
}

.bs-summary-card,
.bs-summary-note {
  min-width: 0;
  border: 1px solid #eadfbb;
  border-radius: 8px;
  background: rgba(255, 253, 246, 0.98);
  box-shadow: 0 8px 22px rgba(29, 36, 48, 0.06);
}

.bs-summary-card {
  position: relative;
  display: grid;
  gap: 0.32rem;
  padding: 0.85rem 0.95rem;
  overflow: hidden;
}

.bs-summary-card::after {
  content: "";
  position: absolute;
  right: 0.75rem;
  top: 0.75rem;
  width: 2.25rem;
  height: 1.08rem;
  border-radius: 4px;
  background: rgba(255, 187, 0, 0.22);
  box-shadow: 0 0.8rem 0 rgba(255, 187, 0, 0.12);
}

.bs-summary-card-strong {
  border-left: 4px solid var(--saviory-yellow-border-strong);
}

.bs-summary-card span,
.bs-summary-note span {
  color: var(--saviory-ink-muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.15;
  text-transform: uppercase;
}

.bs-summary-card strong {
  position: relative;
  z-index: 1;
  color: var(--saviory-ink);
  font-size: clamp(1.45rem, 2.2vw, 2.1rem);
  font-weight: 900;
  line-height: 1;
  overflow-wrap: anywhere;
}

.bs-summary-card small {
  color: var(--saviory-ink-muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.bs-summary-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.85rem;
  text-align: center;
}

.bs-summary-note i {
  color: var(--saviory-yellow-border-strong);
  font-size: 1.15rem;
}

.bs-card-stat-grid > div {
  min-width: 0;
}

.bs-card-stat-grid .card {
  height: 100%;
  border-color: #eadfbb;
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(29, 36, 48, 0.06);
}

.bs-segment-actions {
  gap: 0.35rem;
}

.bs-segment-actions .btn {
  min-height: 2.25rem;
}

.bs-segment-actions .btn.active {
  border-color: var(--saviory-yellow-border-strong);
  background: var(--saviory-yellow);
  color: var(--saviory-ink);
  box-shadow: inset 0 -2px 0 rgba(29, 36, 48, 0.16);
}

.bs-list-panel {
  min-width: 0;
  margin-bottom: 0.9rem;
  border: 1px solid #eadfbb;
  border-radius: 8px;
  background: rgba(255, 253, 246, 0.96);
  box-shadow: 0 8px 24px rgba(29, 36, 48, 0.06);
  overflow: hidden;
}

.bs-list-panel:last-child {
  margin-bottom: 0;
}

.bs-list-panel .bs-data-table-shell {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.bs-list-panel .bs-table-section {
  margin-bottom: 0;
}

.bs-panel-body {
  padding: 1rem;
}

.bs-panel-heading p {
  margin: 0.22rem 0 0;
  color: var(--saviory-ink-muted);
  font-size: 0.84rem;
  font-weight: 750;
  line-height: 1.35;
}

.bs-inline-alert {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
  color: var(--saviory-ink-muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.bs-tab-content-panel {
  min-width: 0;
  border: 1px solid #eadfbb;
  border-radius: 8px;
  background: rgba(255, 253, 246, 0.96);
  box-shadow: 0 8px 24px rgba(29, 36, 48, 0.06);
  overflow: hidden;
}

.bs-tab-content-panel .tab-pane:not(.active) {
  display: none;
}

.bs-tab-content-panel .bs-data-table-shell {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.bs-row-warning td {
  background: var(--saviory-yellow-soft) !important;
}

.bs-inbox-table th:last-child,
.bs-inbox-table td:last-child {
  width: 1%;
}

.email-preview-wrapper {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  white-space: pre-wrap;
}

.email-preview-wrapper img,
.email-preview-wrapper table {
  max-width: 100% !important;
  height: auto !important;
}

.ts-wrapper.form-select {
  padding: 0;
}

.ts-dropdown {
  z-index: 1070;
}

.bs-admin-log-page .bs-data-table th:nth-child(1),
.bs-admin-log-page .bs-data-table td:nth-child(1) {
  width: 5rem;
}

.bs-admin-log-page .bs-data-table th:nth-child(2),
.bs-admin-log-page .bs-data-table td:nth-child(2) {
  width: 10rem;
}

.bs-admin-log-page .bs-data-table th:nth-child(3),
.bs-admin-log-page .bs-data-table td:nth-child(3),
.bs-admin-log-page .bs-data-table th:nth-child(4),
.bs-admin-log-page .bs-data-table td:nth-child(4) {
  width: 8rem;
}


/* Catalog reference views */
.bs-catalog-table th:first-child,
.bs-catalog-table td:first-child,
.bs-catalog-color-table th:first-child,
.bs-catalog-color-table td:first-child {
  width: 1%;
}

.bs-catalog-thumb {
  display: grid;
  place-items: center;
  width: 4.5rem;
  height: 4.5rem;
  border: 1px solid #eadfbb;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.bs-catalog-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.25rem;
}

.bs-catalog-thumb-empty {
  color: var(--saviory-ink-muted);
  text-decoration: none;
}

.bs-catalog-image-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--saviory-ink-muted);
}

.bs-catalog-image-fallback[hidden] {
  display: none !important;
}

.bs-catalog-image-fallback i {
  color: var(--saviory-yellow-text);
  font-size: 1.35rem;
}

.bs-catalog-color-swatch {
  display: inline-flex;
  width: 1.6rem;
  height: 1.6rem;
  border: 1px solid rgba(29, 36, 48, 0.18);
  border-radius: 999px;
  background: var(--bs-catalog-color);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.72);
}

.bs-catalog-detail-grid {
  display: grid;
  grid-template-columns: minmax(16rem, 24rem) minmax(0, 1fr);
  gap: 0.9rem;
  align-items: stretch;
  margin-bottom: 0.9rem;
}

.bs-catalog-media-panel {
  min-width: 0;
  border: 1px solid #eadfbb;
  border-radius: 8px;
  background: rgba(255, 253, 246, 0.96);
  box-shadow: 0 8px 24px rgba(29, 36, 48, 0.06);
  overflow: hidden;
}

.bs-catalog-image-frame {
  display: grid;
  place-items: center;
  min-height: 20rem;
  height: 100%;
  padding: 1rem;
  background:
    linear-gradient(135deg, rgba(255, 187, 0, 0.14), rgba(255, 253, 246, 0) 52%),
    #fff;
}

.bs-catalog-image-frame img {
  max-width: 100%;
  max-height: 24rem;
  object-fit: contain;
}

.bs-catalog-reference-panel {
  margin-bottom: 0;
}

/* Inventory detail: tabbed layout spacing */
/* Detail-page tabs: clean underline style instead of Bootstrap's boxed tabs.
   The boxed style draws a straight full-width baseline that clashes with the
   rounded content card below it (a stray line floating above the card). */
.nav-tabs {
  border-bottom: 0;
  gap: 0.15rem;
  margin-bottom: 0.9rem;
}

.nav-tabs .nav-item .nav-link {
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 0.5rem 0.85rem;
  color: var(--saviory-ink-muted);
  font-weight: 800;
  background: transparent;
}

.nav-tabs .nav-item .nav-link:hover,
.nav-tabs .nav-item .nav-link:focus {
  color: var(--saviory-ink);
  border-bottom-color: var(--saviory-yellow-border);
}

.nav-tabs .nav-item .nav-link.active {
  color: var(--saviory-ink);
  background: transparent;
  border: 0;
  border-bottom: 2px solid var(--saviory-yellow);
}

.bs-inventory-tabs {
  margin-bottom: 0.9rem;
  gap: 0.15rem;
}

.bs-inventory-tab-content .bs-list-panel {
  margin-bottom: 0;
}

.bs-inventory-tab-content pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--saviory-ink);
  max-height: 70vh;
  overflow: auto;
}

.bs-catalog-number {
  flex: 0 0 auto;
  align-self: flex-start;
  padding: 0.28rem 0.48rem;
  border: 1px solid #d9c99b;
  border-radius: 999px;
  color: var(--saviory-ink);
  background: var(--saviory-yellow-surface);
  font-size: 0.82rem;
  font-weight: 900;
}

.bs-catalog-field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 0.65rem;
  margin: 0;
}

.bs-catalog-field {
  min-width: 0;
  padding: 0.72rem;
  border: 1px solid #eadfbb;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
}

.bs-catalog-field dt {
  margin-bottom: 0.18rem;
  color: var(--saviory-ink-muted);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.1;
  text-transform: uppercase;
}

.bs-catalog-field dd {
  margin: 0;
  color: var(--saviory-ink);
  font-size: 0.92rem;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.bs-catalog-field a {
  color: var(--saviory-yellow-text);
  text-decoration: none;
}

.bs-catalog-field a:hover,
.bs-catalog-field a:focus {
  color: var(--saviory-ink);
  text-decoration: underline;
}

@media (max-width: 991.98px) {
  .bs-catalog-detail-grid {
    grid-template-columns: 1fr;
  }

  .bs-catalog-image-frame {
    min-height: 16rem;
  }
}

/* Catalog item scanner */
.bs-scan-page {
  color: var(--saviory-ink);
}

.bs-scan-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(22rem, 0.88fr);
  gap: 0.9rem;
  align-items: stretch;
}

.bs-scan-camera-panel,
.bs-scan-results-panel {
  min-width: 0;
  border: 1px solid #eadfbb;
  border-radius: 8px;
  background: rgba(255, 253, 246, 0.96);
  box-shadow: 0 10px 28px rgba(29, 36, 48, 0.08);
  overflow: hidden;
}

.bs-scan-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid #eadfbb;
  background: linear-gradient(180deg, var(--saviory-yellow-surface), rgba(255, 253, 246, 0.7));
}

.bs-scan-panel-head h1,
.bs-scan-panel-head h2 {
  margin: 0.14rem 0 0;
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1.1;
}

.bs-scan-live {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
  min-height: 2rem;
  padding: 0.35rem 0.58rem;
  border: 1px solid #ead795;
  border-radius: 999px;
  color: var(--saviory-yellow-text);
  background: #fffdf6;
  font-size: 0.78rem;
  font-weight: 850;
  white-space: nowrap;
}

[data-scan-state="ready"] .bs-scan-live {
  color: var(--saviory-teal-hover);
  border-color: rgba(64, 152, 144, 0.35);
  background: var(--saviory-teal-soft);
}

[data-scan-state="error"] .bs-scan-live {
  color: #9f1239;
  border-color: rgba(224, 24, 56, 0.26);
  background: var(--saviory-red-soft);
}

.bs-scan-preview {
  position: relative;
  aspect-ratio: 4 / 3;
  min-height: 31rem;
  background:
    radial-gradient(circle at center, rgba(255, 187, 0, 0.14), transparent 38%),
    #15130d;
  overflow: hidden;
}

.bs-scan-preview video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #15130d;
}

.bs-scan-preview canvas {
  display: none;
}

.bs-scan-reticle {
  position: absolute;
  inset: 11%;
  border: 1px solid rgba(255, 187, 0, 0.34);
  border-radius: 8px;
  pointer-events: none;
}

.bs-scan-reticle span {
  position: absolute;
  width: 2.2rem;
  height: 2.2rem;
  border-color: var(--saviory-yellow);
  border-style: solid;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.34));
}

.bs-scan-reticle span:nth-child(1) {
  top: -1px;
  left: -1px;
  border-width: 4px 0 0 4px;
  border-radius: 8px 0 0 0;
}

.bs-scan-reticle span:nth-child(2) {
  top: -1px;
  right: -1px;
  border-width: 4px 4px 0 0;
  border-radius: 0 8px 0 0;
}

.bs-scan-reticle span:nth-child(3) {
  right: -1px;
  bottom: -1px;
  border-width: 0 4px 4px 0;
  border-radius: 0 0 8px 0;
}

.bs-scan-reticle span:nth-child(4) {
  bottom: -1px;
  left: -1px;
  border-width: 0 0 4px 4px;
  border-radius: 0 0 0 8px;
}

.bs-scan-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 0.75rem;
  align-items: end;
  padding: 0.9rem 1rem 1rem;
  background: #fffdf6;
}

.bs-scan-camera-select {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
  color: var(--saviory-ink-muted);
  font-size: 0.76rem;
  font-weight: 850;
  line-height: 1.1;
}

.bs-scan-camera-select span {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
}

.bs-scan-camera-select .form-select {
  min-height: 2.85rem;
  border-color: #d9c99b;
  font-weight: 750;
}

.bs-scan-controls .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.85rem;
  white-space: nowrap;
}

.bs-scan-results-panel {
  display: flex;
  flex-direction: column;
}

.bs-scan-results {
  flex: 1 1 auto;
  min-height: 31rem;
  overflow: auto;
  background: #fff;
}

.bs-scan-results .row {
  margin: 0;
}

.bs-scan-results .row > * {
  padding: 0;
}

.bs-scan-results table {
  margin-bottom: 0;
}

.bs-scan-results thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--saviory-yellow-surface);
}

.bs-scan-empty,
.bs-scan-loading {
  min-height: 31rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 1.4rem;
  color: var(--saviory-ink-muted);
  text-align: center;
}

.bs-scan-empty i {
  width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--saviory-yellow-border-strong);
  border-radius: 8px;
  color: var(--saviory-ink);
  background: var(--saviory-yellow);
  box-shadow: inset 0 -3px 0 rgba(29, 36, 48, 0.13);
  font-size: 1.35rem;
}

.bs-scan-empty strong,
.bs-scan-loading strong {
  color: var(--saviory-ink);
  font-size: 1rem;
  font-weight: 900;
}

.bs-scan-empty span {
  max-width: 19rem;
  font-size: 0.86rem;
  line-height: 1.35;
}

.bs-scan-loading span {
  width: 2.1rem;
  height: 2.1rem;
  border: 3px solid var(--saviory-yellow-soft);
  border-top-color: var(--saviory-yellow-border-strong);
  border-radius: 50%;
  animation: bs-analytics-spin 0.8s linear infinite;
}

/* Analytics */
.bs-analytics-page {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 4.25rem);
  color: var(--saviory-ink);
}

.bs-analytics-frame-shell {
  position: relative;
  flex: 1 1 auto;
  min-height: calc(100vh - 5.75rem);
  border: 1px solid #eadfbb;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(29, 36, 48, 0.1);
  overflow: hidden;
}

.bs-analytics-frame-shell::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 2;
  height: 0.38rem;
  background: linear-gradient(90deg, var(--saviory-yellow), var(--saviory-orange));
  pointer-events: none;
}

.bs-analytics-toolbar {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  z-index: 4;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  justify-content: flex-end;
  padding: 0.22rem;
  border: 1px solid rgba(234, 215, 149, 0.9);
  border-radius: 8px;
  background: rgba(255, 248, 229, 0.94);
  box-shadow: 0 10px 24px rgba(29, 36, 48, 0.13);
  backdrop-filter: blur(8px);
}

.bs-analytics-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  min-height: 2.25rem;
  padding: 0.44rem 0.72rem;
  border: 0;
  border-radius: 6px;
  color: var(--saviory-ink-muted);
  background: transparent;
  font-size: 0.8rem;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.bs-analytics-tab:hover,
.bs-analytics-tab:focus {
  color: var(--saviory-ink);
  background: #fffdf6;
}

.bs-analytics-tab:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(255, 187, 0, 0.28);
}

.bs-analytics-tab.active {
  color: var(--saviory-ink);
  background: var(--saviory-yellow);
  box-shadow: inset 0 -2px 0 rgba(29, 36, 48, 0.16);
}

.bs-analytics-frame {
  display: block;
  width: 100%;
  height: calc(100vh - 5.75rem);
  min-height: 38rem;
  border: 0;
  background: #fff;
}

.bs-analytics-loading {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 253, 246, 0.78);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
}

.bs-analytics-page.is-loading .bs-analytics-loading {
  opacity: 1;
}

.bs-analytics-loading span {
  width: 2.1rem;
  height: 2.1rem;
  border: 3px solid var(--saviory-yellow-soft);
  border-top-color: var(--saviory-yellow-border-strong);
  border-radius: 50%;
  animation: bs-analytics-spin 0.8s linear infinite;
}

@keyframes bs-analytics-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1199.98px) {

  .bs-import-sort-workspace {
    grid-template-columns: minmax(19rem, 34vw) minmax(0, 1fr);
  }

  .bs-sort-image-frame {
    min-height: 24rem;
  }

  .bs-dashboard-status-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .bs-dashboard-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 991.98px) {
  .bs-dashboard-hero {
    grid-template-columns: 1fr;
  }

  .bs-dashboard-hero-actions,
  .bs-period-switcher,
  .bs-quick-actions {
    align-items: stretch;
    justify-content: flex-start;
  }


  .bs-quick-actions .btn {
    flex: 1 1 auto;
  }
}

@media (max-width: 767.98px) {
  .bs-dashboard-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bs-metric {
    min-height: 8.4rem;
  }

  .bs-panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .bs-panel-heading .btn {
    width: 100%;
  }

  .bs-attention-head {
    display: none;
  }

  .bs-attention-row {
    grid-template-columns: 1fr;
    gap: 0.28rem;
  }

  .bs-attention-row > span {
    white-space: normal;
  }

  .bs-worker-focus {
    grid-template-columns: 1fr;
  }

  .bs-team-row {
    grid-template-columns: 2.45rem minmax(0, 1fr);
  }

  .bs-team-stats {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    text-align: left;
  }

  .bs-analytics-page {
    min-height: calc(100vh - 3.75rem);
  }

  .bs-analytics-frame-shell,
  .bs-analytics-frame {
    min-height: 32rem;
  }

  .bs-analytics-toolbar {
    top: auto;
    right: 0.55rem;
    bottom: 0.55rem;
    left: 0.55rem;
    justify-content: center;
  }
}

@media (max-width: 575.98px) {
  .bs-dashboard {
    padding-left: 0.55rem !important;
    padding-right: 0.55rem !important;
  }

  .bs-dashboard-hero {
    padding: 0.82rem;
  }

  .bs-dashboard-status-grid {
    grid-template-columns: 1fr;
  }

  .bs-period-switcher,
  .bs-quick-actions {
    width: 100%;
  }

  .bs-analytics-tab,
  .bs-period-switcher a {
    flex: 1 1 auto;
  }

  .bs-quick-actions .btn {
    flex-basis: 100%;
  }

  .bs-carrier-lane {
    overflow-x: auto;
  }

  .bs-carrier-head,
  .bs-carrier-progress,
  .bs-carrier-method-head,
  .bs-carrier-method {
    min-width: 34rem;
  }

  .bs-pulse-chart {
    gap: 0.24rem;
    padding: 0.75rem;
  }

  .bs-pulse-day > div {
    height: 4.6rem;
  }

  .bs-breakdown-row {
    grid-template-columns: minmax(0, 1fr) 2.8rem;
  }

  .bs-breakdown-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

/* Profile and account pages */
.bs-profile-page {
  color: var(--saviory-ink);
}

.bs-profile-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1.05rem;
  border: 1px solid var(--saviory-yellow-border);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18px 18px, rgba(255, 187, 0, 0.22) 0 5px, transparent 6px),
    linear-gradient(135deg, var(--saviory-yellow-surface), #fffdf6);
  background-size: 46px 46px, auto;
  box-shadow: 0 8px 24px rgba(29, 36, 48, 0.07);
}

.bs-profile-hero-compact {
  max-width: 760px;
}

.bs-profile-identity {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.bs-profile-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border: 1px solid var(--saviory-yellow-border-strong);
  border-radius: 8px;
  background: var(--saviory-yellow);
  color: var(--saviory-ink);
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.12);
  flex: 0 0 auto;
}

.bs-profile-kicker {
  color: var(--saviory-yellow-text);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.bs-profile-title {
  margin: 0.1rem 0 0;
  overflow-wrap: anywhere;
  font-size: clamp(1.55rem, 2.8vw, 2.15rem);
  font-weight: 900;
  line-height: 1.08;
}

.bs-profile-subtitle {
  color: var(--saviory-ink-muted);
  font-size: 0.92rem;
  font-weight: 750;
}

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

.bs-profile-actions .btn,
.bs-profile-form-actions .btn {
  min-height: 42px;
}

.bs-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.bs-profile-panel {
  border: 1px solid #eadfbb;
  border-radius: 8px;
  background: var(--saviory-panel);
  box-shadow: 0 8px 24px rgba(29, 36, 48, 0.06);
  overflow: hidden;
}

.bs-profile-panel-head {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid #eadfbb;
  background: var(--saviory-yellow-surface);
}

.bs-profile-panel-head h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 900;
}

.bs-profile-panel-head p {
  margin: 0.22rem 0 0;
  color: var(--saviory-ink-muted);
  font-size: 0.88rem;
}

.bs-profile-list {
  margin: 0;
}

.bs-profile-list > div {
  display: grid;
  grid-template-columns: minmax(8rem, 0.42fr) minmax(0, 1fr);
  gap: 0.8rem;
  padding: 0.82rem 1rem;
  border-bottom: 1px solid #f2e4bc;
}

.bs-profile-list > div:last-child {
  border-bottom: 0;
}

.bs-profile-list dt {
  color: var(--saviory-ink-muted);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.bs-profile-list dd {
  min-width: 0;
  margin: 0;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.bs-profile-tools {
  grid-column: 1 / -1;
}

.bs-profile-tool-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  padding: 1rem;
}

.bs-profile-tool-list a {
  display: block;
  min-height: 86px;
  padding: 0.78rem;
  border: 1px solid #eadfbb;
  border-radius: 8px;
  background: #fffdf6;
  color: var(--saviory-ink);
  text-decoration: none;
}

.bs-profile-tool-list a:hover,
.bs-profile-tool-list a:focus {
  border-color: var(--saviory-yellow-border-strong);
  background: var(--saviory-yellow-soft);
}

.bs-profile-tool-list strong {
  display: block;
  font-weight: 900;
}

.bs-profile-tool-list span {
  display: block;
  margin-top: 0.22rem;
  color: var(--saviory-ink-muted);
  font-size: 0.86rem;
  line-height: 1.3;
}

.bs-profile-edit-panel {
  max-width: 760px;
}

.bs-profile-form {
  padding: 1rem;
}

.bs-profile-form .form-text {
  color: var(--saviory-ink-muted);
}

.bs-profile-form-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-top: 0.9rem;
}

@media (max-width: 767.98px) {
  .bs-profile-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .bs-profile-actions {
    justify-content: stretch;
  }

  .bs-profile-actions .btn,
  .bs-profile-form-actions .btn {
    flex: 1 1 100%;
  }

  .bs-profile-grid,
  .bs-profile-tool-list {
    grid-template-columns: 1fr;
  }

  .bs-profile-list > div {
    grid-template-columns: 1fr;
    gap: 0.18rem;
  }
}


/* Account auth shell */
.bs-auth-page {
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(255, 187, 0, 0.32), transparent 32rem), linear-gradient(135deg, #fffdf6 0%, var(--saviory-yellow-surface) 64%, #fff1b8 100%);
  color: var(--saviory-ink);
}
.bs-auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}
.bs-auth-panel {
  width: min(100%, 460px);
}
.bs-auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: #111827;
  font-size: 1.18rem;
  font-weight: 850;
  line-height: 1;
  margin-bottom: 1rem;
  text-decoration: none;
}
.bs-auth-brand:hover,
.bs-auth-brand:focus {
  color: #111827;
  text-decoration: none;
}
.bs-auth-brand img {
  width: 168px;
  height: auto;
  max-height: 58px;
  border-radius: 0;
  flex: 0 1 auto;
}
.bs-auth-product {
  border-left: 2px solid var(--saviory-yellow-border-strong);
  color: var(--saviory-yellow-text);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  padding-left: 0.72rem;
  text-transform: uppercase;
}
.bs-auth-card {
  background: rgba(255, 253, 246, 0.96);
  border: 1px solid var(--saviory-yellow-border);
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(31, 41, 55, 0.14);
  padding: 1.45rem;
}
.bs-auth-title {
  font-size: 1.35rem;
  font-weight: 850;
  line-height: 1.2;
  margin: 0 0 1rem;
}
.bs-auth-env {
  border-left: 3px solid currentColor;
  font-size: 0.84rem;
  font-weight: 800;
  margin: -0.35rem 0 1rem;
  padding-left: 0.55rem;
}
.bs-auth-copy {
  color: #4b5563;
  margin-bottom: 1.2rem;
}
.bs-auth-links {
  margin-top: 1rem;
  text-align: center;
}
.bs-auth-links a {
  color: var(--saviory-yellow-text);
  font-weight: 700;
}
.bs-auth-card .form-text,
.bs-auth-card .text-muted {
  color: #6b7280 !important;
}
.bs-auth-card .btn-primary {
  background: var(--saviory-yellow);
  border-color: var(--saviory-yellow-hover);
  color: #111827;
  font-weight: 800;
}
.bs-auth-card .btn-primary:hover,
.bs-auth-card .btn-primary:focus {
  background: var(--saviory-yellow-hover);
  border-color: var(--saviory-yellow-border-strong);
  color: #111827;
}
@media (max-width: 575.98px) {
  .bs-auth-shell {
    align-items: start;
    padding: 0.9rem;
  }
  .bs-auth-card {
    padding: 1rem;
  }
  .bs-auth-brand img {
    width: 142px;
    max-height: 50px;
  }
  .bs-auth-product {
    font-size: 0.74rem;
  }
}
