:root {
  color-scheme: light;
  --ink: #18202f;
  --muted: #617086;
  --line: #d9e0ea;
  --line-strong: #c4cedb;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --panel-soft: #eef4f1;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --teal: #0f766e;
  --green: #15803d;
  --amber: #b45309;
  --red: #b42318;
  --violet: #6d28d9;
  --shadow: 0 18px 45px rgba(31, 41, 55, 0.08);
  --radius: 8px;
  --sidebar: 260px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  display: grid;
  grid-template-columns: var(--sidebar) 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 28px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 22px 16px;
  background: #172033;
  color: #eef4ff;
  scrollbar-gutter: stable;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 18px;
}

.brand small {
  color: #aebbd0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: #243047;
}

.brand-mark span {
  background: #7dd3fc;
  border-radius: 2px;
}

.brand-mark span:nth-child(2) {
  background: #86efac;
}

.brand-mark span:nth-child(3) {
  grid-column: span 2;
  background: #facc15;
}

.site-logo {
  width: 42px !important;
  height: 42px !important;
  max-width: 42px !important;
  max-height: 42px !important;
  flex: 0 0 auto;
  object-fit: contain !important;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: #ffffff;
}

.auth-brand .site-logo {
  border-color: var(--line);
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-item {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #cbd5e1;
  text-align: left;
  text-decoration: none;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.sidebar-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #cbd5e1;
  font-size: 13px;
  padding: 10px 8px;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.16);
}

.main {
  min-width: 0;
  padding: 22px;
}

.topbar,
.page-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 30px;
}

h2 {
  margin-bottom: 4px;
  font-size: 17px;
}

.panel-header p,
.modal-header p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

.top-actions,
.toolbar,
.panel-header,
.modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.top-actions .pill {
  max-width: min(280px, 42vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  justify-content: flex-start;
}

.notification-shell {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.notification-shell-fixed {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 1200;
}

.notification-toggle {
  position: relative;
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  appearance: none;
  -webkit-appearance: none;
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(31, 41, 55, 0.08);
  overflow: visible;
}

.notification-toggle:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.notification-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.notification-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--red);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.notification-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1250;
  width: min(380px, calc(100vw - 32px));
  max-height: 460px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
}

.notification-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.notification-panel-count {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.notification-panel-body {
  max-height: 390px;
  overflow-y: auto;
}

.notification-empty {
  padding: 18px 14px;
  color: var(--muted);
  font-size: 13px;
}

.notification-item {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.notification-item:last-child {
  border-bottom: 0;
}

.notification-item.is-unread {
  background: #f8fbff;
}

.notification-item-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.notification-item-head strong {
  font-size: 13px;
  line-height: 1.4;
}

.notification-item-head span {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.notification-item-body {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.notification-open-link {
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.notification-open-link:hover {
  text-decoration: underline;
}

.dashboard-filter {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  margin-bottom: 14px;
}

.dashboard-filter strong {
  display: block;
  font-size: 16px;
}

.dashboard-filter small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  margin: 0;
}

.filter-chip {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.filter-chip.active {
  border-color: var(--blue);
  background: var(--blue);
  color: #ffffff;
}

.custom-range-form {
  display: grid;
  grid-template-columns: minmax(180px, 240px) 145px 145px auto;
  gap: 8px;
  align-items: end;
}

.custom-range-form label {
  font-size: 11px;
  text-transform: uppercase;
}

.custom-range-form input,
.custom-range-form select {
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 8px;
}

.filter-form {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  align-items: end;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.filter-form .primary-button,
.filter-form .secondary-button {
  min-height: 40px;
}

.filter-form .helper-text {
  display: block;
  margin-top: 4px;
}

.filter-field {
  position: relative;
  display: grid;
  gap: 4px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.client-list-filter-form {
  grid-template-columns: minmax(220px, 1.4fr) repeat(auto-fit, minmax(155px, 1fr)) auto;
  align-items: end;
}

.client-list-filter-form input,
.client-list-filter-form select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
}

.client-list-sort-field {
  min-width: 190px;
}

.client-filter-actions {
  display: flex;
  align-items: end;
  gap: 8px;
}

.client-filter-actions .primary-button,
.client-filter-actions .secondary-button {
  min-height: 40px;
  white-space: nowrap;
}

.filter-label {
  display: block;
}

.filter-multi {
  position: relative;
  color: var(--ink);
  font-weight: 500;
}

.filter-multi summary {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.filter-multi summary::-webkit-details-marker {
  display: none;
}

.filter-multi summary::after {
  content: "";
  width: 0;
  height: 0;
  flex: 0 0 auto;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--muted);
}

.filter-multi[open] summary {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.filter-multi-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 50;
  max-height: 260px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.check-option {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-transform: none;
  cursor: pointer;
}

.check-option:hover {
  background: #eef4ff;
}

.check-option-all {
  position: sticky;
  top: 0;
  z-index: 1;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
  color: var(--blue);
}

.check-option input {
  width: 16px;
  height: 16px;
  min-height: 0;
  flex: 0 0 auto;
  padding: 0;
}

.orders-page {
  height: calc(100vh - 44px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.orders-page .topbar {
  flex: 0 0 auto;
}

.orders-filter-panel {
  position: sticky;
  top: 0;
  z-index: 10;
  flex: 0 0 auto;
  margin-bottom: 0;
}

.orders-page .topbar {
  margin-bottom: 12px;
}

.orders-page .page-message {
  margin-bottom: 10px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.orders-filter-panel .panel-header {
  padding: 10px 14px;
}

.orders-filter-panel .filter-form {
  gap: 8px;
  padding: 10px 14px;
}

.orders-filter-panel label,
.orders-filter-panel .filter-field {
  gap: 4px;
}

.orders-filter-panel label input,
.orders-filter-panel label select,
.orders-filter-panel .filter-multi summary {
  min-height: 34px;
}

.orders-filter-panel .filter-form .primary-button,
.orders-filter-panel .filter-form .secondary-button {
  min-height: 34px;
}

.orders-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.orders-view-button {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.orders-view-button.active {
  background: var(--blue);
  color: #ffffff;
}

.orders-results-panel {
  min-height: 0;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  overflow: hidden;
}

.orders-results-panel .panel-header {
  min-height: 0;
  padding: 8px 14px;
  justify-content: flex-end;
}

.orders-result-count {
  margin-left: auto;
}

.pagination-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.pagination-bar.compact .secondary-button {
  min-height: 34px;
}

.product-pagination-header {
  padding: 10px 16px;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.orders-results-panel .bulk-order-form {
  padding: 8px 14px;
}

.orders-results-panel .bulk-toolbar {
  padding: 0;
}

.orders-results-panel .panel-header,
.orders-results-panel .bulk-order-form {
  flex: 0 0 auto;
}

.orders-results-panel .table-wrap.tall {
  flex: 1 1 auto;
  max-height: none;
  min-height: 0;
}

.orders-results-panel thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
}

@media (max-width: 1280px), (max-height: 760px) {
  .orders-page {
    height: auto;
    min-height: calc(100vh - 44px);
    overflow: visible;
  }

  .orders-filter-panel {
    position: static;
  }

  .orders-results-panel {
    overflow: visible;
  }

  .orders-results-panel .table-wrap.tall {
    max-height: none;
    overflow: auto;
  }
}

.dashboard-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin: 4px 0 10px;
}

.dashboard-section-heading h2 {
  margin: 0;
  font-size: 21px;
}

.dashboard-section-heading small {
  color: var(--muted);
}

.search {
  width: min(360px, 100%);
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.mode-select {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.mode-select select {
  min-height: 34px;
  min-width: 118px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 9px;
  background: #ffffff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-transform: none;
}

.primary-button,
.secondary-button,
.ghost-button,
.icon-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.primary-button {
  padding: 0 14px;
  background: var(--blue);
  color: #ffffff;
  border-color: var(--blue);
  font-weight: 700;
}

.primary-button:hover {
  background: var(--blue-dark);
}

.secondary-button,
.ghost-button {
  padding: 0 12px;
  background: #ffffff;
  border-color: var(--line);
  color: var(--ink);
}

.danger-button {
  color: var(--red);
  border-color: #fecaca;
  background: #fff7f7;
  font-weight: 800;
}

.ghost-button {
  background: transparent;
}

.icon-button {
  width: 40px;
  padding: 0;
  background: #ffffff;
  border-color: var(--line);
  color: var(--ink);
}

.order-row-action-form {
  margin-top: 8px;
}

.order-row-action-button {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 12px;
}

.inline-stack-form {
  display: grid;
  gap: 8px;
  min-width: 180px;
}

.inline-stack-form select {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 9px;
  background: #ffffff;
}

.scan-unclaimed-prompt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.scan-live-log.compact {
  margin-top: 8px;
  max-height: 140px;
  overflow: auto;
}

.compact-button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.icon {
  width: 19px;
  height: 19px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.check-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.check-card input {
  margin-top: 3px;
}

.check-card span {
  display: grid;
  gap: 3px;
}

.nav-item .icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 20px;
  color: #93c5fd;
  overflow: hidden;
  line-height: 0;
}

.nav-item .icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.quick-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.quick-action-grid a {
  color: inherit;
  text-decoration: none;
}

.action-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dashboard-grid.two-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;

  .unit-forwarding-option-group .fba-check-field,
  .unit-forwarding-option-group .fba-check-polybag,
  .unit-forwarding-option-group .fba-check-bubble,
  .unit-forwarding-option-group .fba-check-remove-label {
    min-width: 0;
    width: 100%;
  }

  .unit-forwarding-option-group .fba-check-remove-label {
    grid-column: 1 / -1;
  }
}


@media (max-width: 900px) {
  .dashboard-grid.two-columns {
    grid-template-columns: 1fr;
  }
}

.compact-metrics {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.metric {
  min-height: 112px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.compact-metrics .metric {
  min-height: 86px;
  padding: 12px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.metric strong {
  display: block;
  margin-top: 10px;
  font-size: 30px;
}

.compact-metrics .metric strong {
  margin-top: 6px;
  font-size: 24px;
}

.metric strong.compact-metric {
  font-size: 17px;
  line-height: 1.35;
  word-break: break-word;
}

.metric small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.metric.metric-alert {
  border-color: #fecaca;
  background: #fff7f7;
}

.metric.metric-alert span,
.metric.metric-alert strong,
.metric.metric-alert small {
  color: var(--red);
}

.metric.metric-success {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.metric.metric-success span,
.metric.metric-success strong,
.metric.metric-success small {
  color: #15803d;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.detail-card {
  min-height: 74px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.detail-card span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.detail-card strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.expense-detail-grid {
  margin: 0;
  padding: 14px;
}

.expense-detail-note {
  margin: 0 14px 14px;
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover td {
  background: #f8fafc;
}

.split-layout,
.receiving-grid,
.work-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(340px, 0.8fr);
  gap: 14px;
  margin-bottom: 14px;
}

.narrow-right {
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.65fr);
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel-header {
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.panel-header select,
.toolbar select,
label select,
label input,
label textarea {
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 10px;
  background: #ffffff;
  color: var(--ink);
}

.pill,
.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: #edf2ff;
  color: #1d4ed8;
}

.status.received,
.status.available,
.status.packed,
.status.shipped,
.status.completed,
.status.verified {
  background: #dcfce7;
  color: var(--green);
}

.status.awaiting-pick,
.status.picking,
.status.packing {
  background: #e0f2fe;
  color: #0369a1;
}

.status.exception,
.status.low,
.status.rejected {
  background: #fee2e2;
  color: var(--red);
}

.status.awaiting {
  background: #fef3c7;
  color: var(--amber);
}

.status.pending,
.status.not_verified {
  background: #fef3c7;
  color: #92400e;
}

.status.processing {
  background: #dbeafe;
  color: #1d4ed8;
}

.status.order_hold {
  background: #fee2e2;
  color: var(--red);
}

.status.partially_shipped {
  background: #bbf7d0;
  color: #166534;
}

.status.shipped_closed {
  background: #dcfce7;
  color: var(--green);
}

.status.canceled,
.status.cancelled {
  background: #fee2e2;
  color: var(--red);
}

.progress {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
  margin-top: 10px;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--blue));
}

.stage-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(132px, 1fr));
  gap: 10px;
  padding: 16px;
}

.stage-card {
  min-height: 170px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  overflow: hidden;
}

.stage-card header {
  display: flex;
  justify-content: space-between;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 800;
}

.stage-card ul {
  list-style: none;
  display: grid;
  gap: 7px;
  padding: 10px;
  margin: 0;
}

.mini-order {
  padding: 9px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid var(--line);
  font-size: 12px;
}

.mini-order strong {
  display: block;
  margin-bottom: 3px;
}

.warehouse-map {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  padding: 16px;
}

.zone {
  min-height: 78px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--teal);
}

.zone strong {
  font-size: 18px;
}

.zone small {
  font-weight: 800;
}

.zone.cool {
  background: #0e7490;
}

.zone.busy {
  background: var(--amber);
}

.zone.hot {
  background: var(--red);
}

.table-wrap {
  overflow: auto;
}

.table-wrap.action-menu-wrap {
  overflow: visible;
}

.table-wrap.tall {
  max-height: calc(100vh - 210px);
}

.table-wrap.tall.action-menu-wrap {
  max-height: none;
}

.order-type-overview table th,
.order-type-overview table td {
  padding: 14px 16px;
}

.order-type-overview .row-title strong {
  font-size: 1.05rem;
}

.order-type-overview .row-title small {
  font-size: 0.92rem;
  line-height: 1.35;
}

.order-type-overview .status {
  font-size: 0.84rem;
  padding: 0.38rem 0.65rem;
}

.order-type-overview td:nth-child(2),
.order-type-overview td:nth-child(4) {
  font-size: 1.05rem;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

td {
  font-size: 14px;
}

.row-title {
  display: grid;
  gap: 2px;
}

.row-title small {
  color: var(--muted);
}

.action-row {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}

.inline-form {
  margin: 0;
}

.checklist-batch-form {
  display: grid;
  grid-template-columns: 82px minmax(150px, 1fr) minmax(160px, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.checklist-batch-form label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.checklist-batch-form input,
.checklist-batch-form select,
.checklist-batch-form button {
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 0 8px;
  background: #ffffff;
  color: var(--ink);
}

.checklist-batch-form button {
  border-color: var(--blue);
  background: var(--blue);
  color: #ffffff;
  font-weight: 800;
}

.checklist-assign-form {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(130px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.checklist-assign-form input,
.checklist-assign-form select,
.checklist-assign-form button {
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 0 8px;
  background: #ffffff;
  color: var(--ink);
}

.checklist-assign-form button {
  border-color: var(--blue);
  background: var(--blue);
  color: #ffffff;
  font-weight: 800;
}

.batch-action-menu .row-menu-panel {
  min-width: 320px;
  gap: 10px;
  padding: 10px;
}

.batch-note-cell {
  max-width: 260px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.batch-action-menu .row-menu-panel > strong {
  padding: 0 4px;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--muted);
}

.batch-menu-form {
  display: grid;
  gap: 7px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f8fafc;
}

.batch-menu-form input,
.batch-menu-form select,
.batch-menu-form button {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 0 8px;
  background: #ffffff;
  color: var(--ink);
}

.batch-menu-form button {
  border-color: var(--blue);
  background: var(--blue);
  color: #ffffff;
  font-weight: 800;
}

.batch-menu-form .danger-link {
  border-color: #fecaca;
  background: #fff7f7;
  color: var(--red);
}

.row-menu {
  position: relative;
  display: inline-block;
  vertical-align: middle;
}

.row-menu summary {
  width: 38px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  list-style: none;
  cursor: pointer;
}

.row-menu summary::-webkit-details-marker {
  display: none;
}

.row-menu.batch-action-menu summary {
  width: auto;
  min-width: 44px;
  min-height: 28px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.row-menu-panel {
  min-width: 138px;
  display: grid;
  gap: 4px;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.row-menu-panel a,
.row-menu-panel button {
  width: 100%;
  min-height: 32px;
  display: flex;
  align-items: center;
  padding: 0 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  text-align: left;
  text-decoration: none;
}

.row-menu-panel a:hover,
.row-menu-panel button:hover {
  background: #f8fafc;
}

.row-menu-panel form {
  margin: 0;
}

.payment-form,
.assign-client-form {
  display: flex;
  align-items: center;
  gap: 7px;
}

.payment-form input,
.assign-client-form input,
.assign-client-form select {
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 9px;
  background: #ffffff;
  color: var(--ink);
}

.payment-form input {
  width: 104px;
}

.assign-client-form {
  min-width: 380px;
}

.assign-client-form select,
.assign-client-form input {
  width: 170px;
}

.payment-form button,
.assign-client-form button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 800;
}

.invoice-detail-grid {
  display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
}

.invoice-detail-grid .form-grid {
  grid-template-columns: 1fr;
  padding: 0;
}

.invoice-detail-save-form {
  grid-column: 1 / -1;
}

.invoice-detail-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.invoice-detail-actions form {
  display: grid;
}

.invoice-detail-actions .form-button {
  min-height: 38px;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.service-record-form {
  display: grid;
  grid-template-columns: 84px minmax(220px, 1fr) 130px 170px auto;
  gap: 8px;
  align-items: center;
}

.service-record-form input,
.service-record-form select,
.service-record-form button {
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 9px;
  background: #ffffff;
  color: var(--ink);
}

.service-record-form button {
  border-color: var(--blue);
  background: var(--blue);
  color: #ffffff;
  font-weight: 800;
}

.task-archive-form {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.task-archive-form select,
.task-archive-form button {
  min-height: 36px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: #ffffff;
}

.task-archive-form select {
  padding: 0 10px;
  color: var(--ink);
}

.task-archive-form button {
  padding: 0 12px;
  color: #ffffff;
  background: var(--blue);
  border-color: var(--blue);
  font-weight: 800;
}

.task-archive-form small {
  grid-column: 1 / -1;
}

.task-action-form {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  align-items: center;
}

.task-action-form button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--blue);
  color: #ffffff;
  background: var(--blue);
  font-weight: 800;
}

.task-action-form .danger-button {
  color: var(--red);
  border-color: #fecaca;
  background: #fff7f7;
}

.task-action-form small {
  flex-basis: 100%;
  text-align: right;
}

.action-row button {
  min-height: 32px;
  padding: 0 9px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: #ffffff;
}

.order-action-form {
  display: inline-flex;
  margin: 0 4px 4px 0;
}

.order-action-form button {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  white-space: nowrap;
}

.toolbar {
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.segmented button {
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
}

.segmented button.active {
  background: #172033;
  color: #ffffff;
}

.alert-list,
.appointment-list,
.wave-list,
.client-grid {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.alert,
.appointment,
.wave,
.client-card,
.pack-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.alert {
  border-left: 4px solid var(--amber);
}

.alert.critical {
  border-left-color: var(--red);
}

.alert strong,
.appointment strong,
.wave strong,
.client-card strong {
  display: block;
  margin-bottom: 4px;
}

.alert p,
.appointment p,
.wave p,
.client-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
}

.form-grid .full-span {
  grid-column: 1 / -1;
}

.inline-correction-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
  align-items: end;
}

.inline-correction-fields label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.inline-correction-fields input,
.inline-correction-fields select {
  width: 100%;
}

@media (max-width: 900px) {
  .inline-correction-fields {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }
}
.wide-field {
  grid-column: 1 / -1;
}

.readonly-field {
  min-height: 40px;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.readonly-field strong {
  min-height: 40px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #f8fafc;
  color: var(--ink);
}

.inline-check {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--ink);
  font-weight: 800;
}

.inline-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--blue);
}

.icon-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.icon-actions .icon-button,
.bulk-toolbar .icon-button {
  width: 34px;
  height: 34px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.danger-link {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fff5f5;
}

.bulk-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.bulk-toolbar select {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #ffffff;
}

.tooltip-note {
  cursor: help;
}

.product-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.service-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.inbound-box-tracking-section {
  display: grid;
  gap: 10px;
}

.inbound-box-tracking-rows {
  display: grid;
  gap: 8px;
}

.inbound-box-tracking-row {
  display: grid;
  grid-template-columns: 72px minmax(180px, 260px) minmax(260px, 1fr);
  gap: 10px;
  align-items: end;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.inbound-box-tracking-row > strong {
  align-self: center;
  white-space: nowrap;
}

.inbound-box-tracking-row > label {
  display: grid;
  gap: 4px;
  margin: 0;
  width: auto;
  min-width: 0;
}

.inbound-box-tracking-row select,
.inbound-box-tracking-row input {
  width: 100%;
  min-width: 0;
}

.fba-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.fba-sku-lines {
  display: grid;
  gap: 12px;
  padding-bottom: 2px;
}

.unit-forwarding-count-field {
  max-width: 260px;
}

.unit-forwarding-count-field input {
  max-width: 90px;
}

.counting-count-field {
  max-width: 260px;
}

.counting-count-field input {
  max-width: 90px;
}

.fba-sku-row[data-counting-row] {
  grid-template-columns: 72px minmax(260px, 420px);
  grid-template-areas: "title sku";
  justify-content: start;
  align-items: end;
}

.fba-sku-row[data-counting-row] > .fba-line-title { grid-area: title; }
.fba-sku-row[data-counting-row] > .fba-field-sku { grid-area: sku; }

.fba-sku-row {
  display: grid;
  grid-template-columns: 40px minmax(120px, 150px) minmax(92px, 108px) minmax(280px, 1fr) minmax(86px, 104px) minmax(106px, 118px) minmax(126px, 138px) minmax(166px, 176px) minmax(170px, 210px);
  grid-template-areas:
    "title pack-size sku-count sku total polybag bubble remove-label pdf"
    ". . . . . . . . remove";
  gap: 10px;
  align-items: end;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  border-left: 5px solid #2563eb;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.fba-sku-row:nth-child(2n) {
  border-left-color: #0f766e;
}

.fba-sku-row:nth-child(3n) {
  border-left-color: #b45309;
}


.fba-sku-row > .fba-line-title { grid-area: title; }
.fba-sku-row > .fba-field-pack-size { grid-area: pack-size; }
.fba-sku-row > .fba-field-sku-count { grid-area: sku-count; }
.fba-sku-row > .fba-field-sku { grid-area: sku; }
.fba-sku-row > .fba-field-total-qty { grid-area: total; }
.fba-sku-row > .fba-check-polybag { grid-area: polybag; }
.fba-sku-row > .fba-check-bubble { grid-area: bubble; }
.fba-sku-row > .fba-check-remove-label { grid-area: remove-label; }
.fba-sku-row > .fba-field-pack-label { grid-area: pdf; }
.fba-sku-row > .fba-remove-row { grid-area: remove; }

.fba-sku-row.unit-forwarding-sku-row {
  grid-template-columns: 72px minmax(260px, 520px) minmax(96px, 112px) max-content;
  grid-template-areas: "title sku qty options";
  align-items: end;
  justify-content: start;
}

.unit-forwarding-sku-row > .fba-line-title { grid-area: title; }
.unit-forwarding-sku-row > .fba-field-sku { grid-area: sku; }
.unit-forwarding-sku-row > .fba-field-small { grid-area: qty; }
.unit-forwarding-sku-row > .unit-forwarding-option-group { grid-area: options; }

.unit-forwarding-option-group {
  display: flex;
  align-items: end;
  gap: 10px;
  min-width: 0;
}

.unit-forwarding-check-field {
  min-height: 38px;
  padding-left: 12px;
  padding-right: 12px;
  white-space: nowrap;
}

.fba-line-title {
  align-self: center;
  color: var(--ink);
  font-size: 14px;
  white-space: nowrap;
}

.fba-row-field {
  display: grid;
  gap: 4px;
  align-self: end;
}

.fba-row-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.fba-row-field input,
.fba-row-field select {
  width: 100%;
  min-height: 38px;
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 10px;
  background: #ffffff;
  font-weight: 500;
}

.fba-field-sku {
  min-width: 0;
}

.fba-sku-selector-list {
  display: grid;
  gap: 8px;
}

.fba-sku-choice {
  display: grid;
  grid-template-columns: 62px minmax(210px, 1fr) 112px;
  gap: 8px;
  align-items: end;
}

.fba-sku-choice > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.fba-sku-choice select,
.fba-sku-choice input {
  width: 100%;
  min-width: 0;
}

.fba-check-field {
  min-height: 38px;
  align-self: end;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.fba-check-field input[type="checkbox"],
label.fba-check-field input[type="checkbox"] {
  flex: 0 0 auto;
  width: 16px !important;
  height: 16px !important;
  min-height: 16px !important;
  margin: 0;
  accent-color: var(--blue);
}

.fba-check-field input[type="hidden"] {
  display: none;
}

.fba-check-polybag {
  min-width: 128px;
}

.fba-check-bubble {
  min-width: 142px;
}

.fba-check-remove-label {
  min-width: 166px;
}

.fba-add-pack-row {
  display: flex;
  justify-content: flex-start;
  margin-top: 10px;
}

.unit-forwarding-check-field {
  width: fit-content;
  justify-self: start;
  padding: 0 14px;
}

.unit-forwarding-check-field.fba-check-polybag,
.unit-forwarding-check-field.fba-check-bubble {
  min-width: 136px;
}

.unit-forwarding-option-group {
  align-self: end;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-self: start;
  min-width: 0;
  width: auto;
}

.unit-forwarding-option-group .fba-check-field {
  align-self: stretch;
  justify-self: start;
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  padding: 0 10px;
}

.unit-forwarding-option-group .fba-check-polybag {
  min-width: 112px;
}

.unit-forwarding-option-group .fba-check-bubble {
  min-width: 132px;
}

.unit-forwarding-option-group .fba-check-remove-label {
  min-width: 190px;
}

.inbound-box-tracking-section {
  display: grid;
  gap: 10px;
}

.inbound-box-tracking-rows {
  display: grid;
  gap: 10px;
}

.inbound-box-tracking-row {
  display: grid;
  grid-template-columns: minmax(70px, auto) minmax(180px, 0.45fr) minmax(240px, 1fr);
  gap: 12px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.inbound-box-tracking-row strong {
  align-self: center;
}

.fba-field-pack-label {
  min-width: 0;
  display: grid;
  gap: 4px;
  align-items: end;
  justify-items: stretch;
}

.fba-field-pack-label input[type="file"] {
  min-height: 38px;
  padding: 7px 8px;
  line-height: 1.2;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.fba-remove-row {
  align-self: start;
  justify-self: end;
  min-height: 34px;
  padding: 0 12px;
  color: var(--red);
  border-color: #fecaca;
  background: #fff7f7;
}




@media (max-width: 1400px) {
  .fba-sku-row.unit-forwarding-sku-row {
    grid-template-columns: 72px minmax(240px, 480px) minmax(96px, 112px);
    grid-template-areas:
      "title sku qty"
      ". options options";
  }

  .unit-forwarding-option-group {
    justify-self: start;
  }
}

@media (max-width: 760px) {
  .fba-sku-row[data-counting-row] {
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "sku";
  }

  .fba-sku-row.unit-forwarding-sku-row {
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "sku"
      "qty"
      "options";
  }

  .unit-forwarding-option-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .unit-forwarding-option-group .fba-check-field,
  .unit-forwarding-option-group .fba-check-polybag,
  .unit-forwarding-option-group .fba-check-bubble,
  .unit-forwarding-option-group .fba-check-remove-label {
    min-width: 0;
    width: 100%;
  }

  .unit-forwarding-option-group .fba-check-remove-label {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .unit-forwarding-option-group {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1400px) {
  .fba-sku-row {
    grid-template-columns: 40px minmax(120px, 150px) minmax(92px, 108px) minmax(280px, 1fr) minmax(86px, 104px) minmax(106px, 118px) minmax(126px, 138px) minmax(166px, 176px);
    grid-template-areas:
      "title pack-size sku-count sku total polybag bubble remove-label"
      "pdf pdf pdf pdf pdf pdf pdf remove";
  }
}

.warehouse-location-editor {
  display: grid;
  gap: 10px;
}

.warehouse-location-rows {
  display: grid;
  gap: 8px;
}

.warehouse-location-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(140px, 220px) auto;
  gap: 10px;
  align-items: end;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 5px solid #2563eb;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.invoice-service-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.invoice-builder .form-grid {
  grid-template-columns: 1fr;
}

.invoice-form-top {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(320px, 1fr);
  gap: 32px;
  align-items: start;
}

.invoice-form-top section {
  display: grid;
  gap: 8px;
}

.invoice-form-top input[readonly] {
  color: var(--ink);
  background: #f8fafc;
}

.invoice-heading {
  justify-self: end;
  width: min(420px, 100%);
}

.invoice-heading h2 {
  font-size: 32px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.invoice-lines {
  display: grid;
  gap: 8px;
}

.invoice-lines-head,
.invoice-line {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 110px 130px 130px 42px;
  gap: 8px;
  align-items: center;
}

.invoice-lines-head {
  padding: 10px 12px;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.invoice-line {
  padding: 8px 0;
}

.invoice-line input {
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 10px;
}

.invoice-line strong {
  text-align: right;
}

.add-line-button {
  justify-self: start;
  color: var(--blue);
  font-weight: 800;
}

.invoice-total-box {
  justify-self: end;
  width: min(420px, 100%);
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.invoice-total-box > div,
.discount-row,
.invoice-total-box label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.discount-row input {
  width: 120px;
}

.discount-row select {
  width: 76px;
}

.invoice-grand-total {
  min-height: 54px;
  padding: 12px;
  border-radius: 8px;
  background: #ffffff;
  font-size: 18px;
  font-weight: 800;
}

.service-fields[hidden],
#bubbleFeetField[hidden] {
  display: none;
}

.helper-text {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.checkbox-field {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #ffffff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.checkbox-field input {
  width: auto;
  min-height: auto;
}

.inline-radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

.inline-radio input {
  width: auto;
  min-height: auto;
}

.permission-parent-row {
  background: #fbfdff;
}

.permission-child-row {
  background: #ffffff;
}

.permission-child-cell {
  padding-left: 30px;
  border-left: 3px solid #dbeafe;
}

.permission-child-cell strong {
  display: block;
}

.permission-child-marker {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  margin-bottom: 4px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef4ff;
  color: #315a96;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.permission-parent-row td:first-child small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 700;
}

.permission-matrix {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.permission-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.permission-group-parent,
.permission-child-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 220px);
  gap: 14px;
  align-items: center;
}

.permission-group-parent {
  padding: 12px 14px;
  background: #f8fafc;
}

.permission-group-parent strong,
.permission-child-item strong {
  display: block;
  color: var(--ink);
}

.permission-group-parent small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.permission-child-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.permission-child-item {
  padding: 10px 14px 10px 34px;
  border-top: 1px solid var(--line);
}

.permission-child-item:first-child {
  border-top: 0;
}

.permission-level-select {
  min-height: 34px;
}

.permission-preview {
  display: grid;
  gap: 12px;
  margin: 0 14px 14px;
  padding: 14px;
  border: 1px solid #bfdbfe;
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: #eff6ff;
}

.permission-preview h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.permission-preview p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

.permission-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.permission-preview-grid > div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.permission-preview-grid strong {
  display: block;
  margin-bottom: 8px;
}

.permission-preview-grid ul {
  max-height: 190px;
  overflow: auto;
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
}

.permission-preview-grid li {
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.permission-preview-grid .permission-preview-empty {
  color: var(--muted);
}

.estimate-card {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.estimate-card span,
.estimate-card small {
  color: var(--muted);
  font-size: 13px;
}

.estimate-card strong {
  font-size: 24px;
}

.need-help-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #bfdbfe;
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  padding: 12px;
  background: #eff6ff;
}

.need-help-box strong,
.need-help-box small {
  display: block;
}

.need-help-box small {
  margin-top: 3px;
  color: var(--muted);
}

.review-summary {
  display: grid;
  gap: 10px;
  padding: 16px 0 0;
}

.review-summary div {
  display: grid;
  grid-template-columns: minmax(130px, 0.35fr) minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.review-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.review-summary strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.4;
}

.help-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.42fr) minmax(0, 1fr);
  gap: 14px;
}

.help-thread-list,
.help-message-list {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.help-thread {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: inherit;
  text-decoration: none;
}

.help-thread:hover,
.help-thread.active {
  border-color: var(--blue);
  background: #eff6ff;
}

.help-thread span,
.help-thread small,
.help-message span {
  color: var(--muted);
  font-size: 12px;
}

.help-message {
  max-width: 78%;
  display: grid;
  gap: 8px;
  justify-self: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.help-message.own {
  justify-self: end;
  border-color: #bfdbfe;
  background: #eff6ff;
}

.help-message p {
  margin: 0;
  line-height: 1.5;
}

.help-reply-form {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-top: 1px solid var(--line);
}

.empty-state {
  padding: 16px;
  color: var(--muted);
  font-weight: 700;
}

.empty-state.large {
  min-height: 260px;
  display: grid;
  place-items: center;
}

.client-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.checkbox-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.checkbox-card span {
  display: grid;
  gap: 4px;
}

.pricing-form {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.pricing-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.pricing-group h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  padding: 10px 12px;
  background: #dbe8fb;
  color: #172033;
  font-size: 16px;
}

.pricing-add-button {
  width: 28px;
  min-height: 28px;
  border-radius: 6px;
  font-size: 18px;
  line-height: 1;
}

.pricing-lines {
  display: grid;
}

.pricing-lines label {
  grid-template-columns: minmax(220px, 1fr) 130px;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
}

.pricing-lines label span {
  color: var(--ink);
  font-weight: 700;
}

.checklist-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.checklist-card {
  overflow: hidden;
}

.checklist-card.urgent {
  border-top: 4px solid var(--red);
}

.checklist-card.warning {
  border-top: 4px solid var(--amber);
}

.checklist-card.info {
  border-top: 4px solid var(--blue);
}

.status.urgent {
  background: #fee2e2;
  color: var(--red);
}

.status.warning {
  background: #fef3c7;
  color: var(--amber);
}

.status.info {
  background: #dbeafe;
  color: var(--blue);
}

.checklist-items {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.checklist-item {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: inherit;
  text-decoration: none;
}

.checklist-item:hover {
  border-color: var(--blue);
  background: #eff6ff;
}

.checklist-item span,
.checklist-empty {
  color: var(--muted);
  font-size: 13px;
}

.checklist-empty {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  font-weight: 700;
}

.checklist-footer {
  display: flex;
  justify-content: flex-end;
  padding: 0 14px 14px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

label input,
label select,
label textarea {
  width: 100%;
  color: var(--ink);
  font-weight: 500;
}

fieldset {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
}

legend {
  font-weight: 700;
  padding: 0 0.35rem;
}

.inline-choice {
  align-items: center;
  display: inline-flex;
  flex-direction: row;
  gap: 0.5rem;
  margin: 0.35rem 1rem 0.35rem 0;
}

.inline-choice input {
  width: auto;
}

.fbm-order-fields {
  display: grid;
  gap: 12px;
}

.fbm-label-source-field {
  background: #f8fafc;
}

.fbm-mode-field {
  border: 0;
  padding: 0;
}

.fbm-mode-field legend {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 8px;
}

.fbm-mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 12px;
}

.fbm-mode-card {
  cursor: pointer;
  margin: 0;
  min-width: 0;
  position: relative;
}

.fbm-mode-card input {
  height: 1px;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  width: 1px;
}

.fbm-mode-card-body {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-template-columns: 18px minmax(0, 1fr);
  min-height: 76px;
  padding: 14px 16px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.fbm-mode-card-body strong {
  color: var(--ink);
  display: block;
  font-size: 14px;
  line-height: 1.2;
}

.fbm-mode-card-body small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  margin-top: 4px;
}

.fbm-mode-radio {
  background: #ffffff;
  border: 2px solid #94a3b8;
  border-radius: 999px;
  height: 16px;
  width: 16px;
}

.fbm-mode-card input:checked + .fbm-mode-card-body {
  background: #f8fbff;
  border-color: #2563eb;
  box-shadow: inset 4px 0 0 #2563eb, 0 10px 22px rgba(37, 99, 235, 0.08);
}

.fbm-mode-card input:checked + .fbm-mode-card-body .fbm-mode-radio {
  background: #2563eb;
  border-color: #2563eb;
  box-shadow: inset 0 0 0 4px #ffffff;
}
.fbm-label-source-field legend {
  font-size: 14px;
}

.fbm-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 8px;
}

.fbm-label-source-field .fbm-label-choice {
  align-content: start;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  min-height: 96px;
  padding: 14px 14px 14px 16px;
}

.fbm-label-source-field .fbm-label-choice:has(input:checked) {
  background: #f8fbff;
  border-color: #8ab4ff;
  box-shadow: inset 4px 0 0 #2563eb;
}

.fbm-label-source-field .fbm-label-choice .inline-choice {
  font-weight: 800;
  margin: 0;
}

.fbm-label-source-field .fbm-template-link,
.fbm-label-source-field .fbm-label-choice .helper-text {
  justify-self: start;
  margin-left: 24px;
}

.fbm-label-source-field .fbm-label-choice .helper-text {
  display: block;
  line-height: 1.45;
  max-width: 760px;
}

.fbm-upload-section {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.fbm-section-title {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.fbm-upload-grid {
  display: grid;
  gap: 12px;
}

.fbm-upload-field {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.fbm-upload-field input[type="file"] {
  background: #ffffff;
}
.fbm-single-section {
  background: #f8fafc;
  padding: 16px;
}

.fbm-manual-head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.fbm-manual-head strong {
  color: var(--ink);
  display: block;
  font-size: 15px;
}

.fbm-add-order-button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.fbm-manual-rows {
  display: grid;
  gap: 12px;
}

.fbm-manual-row {
  align-items: end;
  background: #ffffff;
  border: 1px solid var(--line);
  border-left: 5px solid #2563eb;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  display: grid;
  gap: 10px;
  grid-template-columns: 72px minmax(280px, 1.6fr) minmax(92px, 110px) minmax(220px, 1fr) minmax(180px, 0.8fr) auto;
  padding: 12px;
}

.fbm-manual-row:nth-child(2n) {
  border-left-color: #0f766e;
}

.fbm-manual-row:nth-child(3n) {
  border-left-color: #b45309;
}

.fbm-manual-line-title {
  align-self: center;
  color: var(--ink);
  font-size: 14px;
  white-space: nowrap;
}

.fbm-manual-product-field,
.fbm-manual-tracking-field,
.fbm-manual-label-field {
  min-width: 0;
}

.fbm-manual-qty-field input {
  max-width: 110px;
}

.fbm-manual-label-field input[type="file"] {
  padding: 6px 8px;
}

.fbm-manual-remove-button {
  align-self: end;
  min-height: 38px;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .fbm-manual-head {
    align-items: stretch;
    flex-direction: column;
  }

  .fbm-manual-row {
    grid-template-columns: 72px minmax(220px, 1fr) minmax(92px, 110px);
  }

  .fbm-manual-tracking-field,
  .fbm-manual-label-field,
  .fbm-manual-remove-button {
    grid-column: 2 / -1;
  }
}

@media (max-width: 760px) {
  .fbm-choice-grid,
  .fbm-mode-grid {
    grid-template-columns: 1fr;
  }

  .fbm-label-source-field .fbm-template-link,
  .fbm-label-source-field .fbm-label-choice .helper-text {
    margin-left: 0;
  }

  .fbm-manual-row {
    grid-template-columns: 1fr;
  }

  .fbm-manual-line-title,
  .fbm-manual-tracking-field,
  .fbm-manual-label-field,
  .fbm-manual-remove-button {
    grid-column: 1;
  }

  .fbm-manual-qty-field input {
    max-width: none;
  }
}

label textarea {
  min-height: 110px;
  padding: 10px;
  resize: vertical;
  line-height: 1.45;
}

.form-button {
  align-self: end;
}

.app-modal {
  width: min(860px, calc(100vw - 32px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.32);
}

.app-modal::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.app-modal {
  border: 0;
  border-radius: 10px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
  max-height: calc(100vh - 48px);
  max-width: calc(100vw - 32px);
  overflow: auto;
  padding: 0;
  width: min(1040px, calc(100vw - 32px));
}

.custom-modal[hidden] {
  display: none !important;
}

.custom-modal.is-open {
  align-items: center;
  background: rgba(15, 23, 42, 0.45);
  border-radius: 0;
  box-shadow: none;
  display: flex;
  height: 100vh;
  justify-content: center;
  left: 0;
  max-height: none;
  max-width: none;
  overflow: auto;
  padding: 24px;
  position: fixed;
  top: 0;
  width: 100vw;
  z-index: 10000;
}

.custom-modal.is-open .modal-card {
  border-radius: 10px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
  max-height: calc(100vh - 48px);
  overflow: auto;
  width: min(1040px, calc(100vw - 48px));
}

.app-modal .modal-card {
  box-sizing: border-box;
  max-height: calc(100vh - 48px);
  overflow: auto;
  width: 100%;
}

.product-history-dialog {
  width: min(1180px, calc(100vw - 32px));
}

.modal-card {
  padding: 16px;
  background: #ffffff;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.modal-header h2 {
  margin: 0;
}

.modal-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.work-grid {
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.7fr);
}

.pack-station {
  padding: 16px;
}

.pack-card {
  display: grid;
  gap: 12px;
}

.scan-strip {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.scan-strip input {
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 10px;
}

.conveyor {
  height: 70px;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: repeating-linear-gradient(90deg, #d7dee9 0 18px, #c7d0dd 18px 36px);
  border: 1px solid var(--line-strong);
}

.box {
  position: absolute;
  top: 15px;
  width: 42px;
  height: 38px;
  border-radius: 5px;
  background: #c08457;
  border: 2px solid #8b5e34;
  animation: travel 7s linear infinite;
}

.box:nth-child(2) {
  animation-delay: -2.5s;
}

.box:nth-child(3) {
  animation-delay: -5s;
}

@keyframes travel {
  from {
    left: -60px;
  }
  to {
    left: calc(100% + 60px);
  }
}

.client-grid {
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  padding: 0;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.portal-hero {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  background: linear-gradient(135deg, #ffffff 0%, #eef7f5 100%);
}

.portal-hero h2 {
  font-size: 24px;
}

.portal-hero p:last-child {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
}

.audit-list {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.audit-entry {
  display: grid;
  grid-template-columns: minmax(160px, 0.25fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.audit-entry small {
  color: var(--muted);
}

.permission {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 7px;
  background: #f8fafc;
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 800;
}

.permission.yes {
  color: var(--green);
  background: #ecfdf5;
  border-color: #bbf7d0;
}

.permission.no {
  color: var(--muted);
}

.client-card {
  box-shadow: var(--shadow);
}

.client-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.client-stats div {
  padding: 9px;
  border-radius: 7px;
  background: #f8fafc;
}

.client-stats span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.client-stats b {
  font-size: 18px;
}

dialog {
  width: min(760px, calc(100% - 24px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.26);
}

dialog::backdrop {
  background: rgba(15, 23, 42, 0.42);
}

.modal {
  background: #ffffff;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.modal-actions {
  justify-content: flex-end;
  padding: 16px 18px 18px;
}

.completion-box-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  grid-column: 1 / -1;
  padding: 14px;
}

.completion-box-card h3 {
  margin: 0;
}

.completion-box-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.completion-box-card table input {
  max-width: 110px;
}

@media (max-width: 900px) {
  .completion-box-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: 360px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #172033;
  color: #ffffff;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #eef4f1;
}

.auth-card {
  width: min(500px, 100%);
  display: grid;
  gap: 16px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}


.auth-card.registration-auth-card {
  width: min(980px, 100%);
}
.auth-brand {
  padding: 0;
  color: var(--ink);
}

.auth-brand small {
  color: var(--muted);
}

.auth-card h1 {
  margin-bottom: 0;
}

.auth-copy,
.auth-help {
  margin: 0;
  color: var(--muted);
}

.auth-help {
  font-size: 13px;
}

.auth-register-cta {
  font-size: 11.5px;
}

.auth-register-cta a {
  white-space: nowrap;
}

.auth-note {
  margin: -6px 0 0;
  padding: 10px 12px;
  border: 1px solid #bfdbfe;
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: #eff6ff;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.45;
}

.trial-callout {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #bfdbfe;
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  background: #eff6ff;
  color: var(--ink);
}
.trial-callout strong {
  font-size: 14px;
}
.trial-callout span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.registration-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.registration-steps li {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}
.registration-steps span {
  display: inline-grid;
  place-items: center;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--blue);
  color: #ffffff;
  font-size: 12px;
}
@media (max-width: 760px) {
  .registration-steps {
    grid-template-columns: 1fr;
  }
}
.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form .primary-button {
  width: 100%;
}

.form-error,
.form-success {
  padding: 11px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
}

.form-error {
  background: #fee2e2;
  color: var(--red);
}

.form-success {
  background: #dcfce7;
  color: var(--green);
}

.form-note {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  padding: 11px 12px;
}

.form-note.is-working {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: var(--blue);
}

.form-note.is-success {
  border-color: #bbf7d0;
  background: #dcfce7;
  color: var(--green);
}

.form-note.is-error {
  border-color: #fecaca;
  background: #fee2e2;
  color: var(--red);
}

.billing-note-list {
  display: grid;
  gap: 10px;
}

.billing-note {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  padding: 11px 12px;
}

.billing-note-auto {
  border-color: #f9a8d4;
  color: #9d174d;
}

.billing-note-secure {
  border-color: #86efac;
  color: var(--green);
}

.page-message {
  margin-bottom: 14px;
}

.page-section {
  margin-top: 14px;
}

.dashboard-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.dashboard-chart-panel {
  overflow: hidden;
}

.dashboard-chart-panel:last-child {
  grid-column: 1 / -1;
}

.chart-legend {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--blue);
}

.legend-dot.green {
  background: var(--green);
}

.legend-dot.amber {
  background: var(--amber);
}

.legend-dot.teal {
  background: var(--teal);
}

.line-chart {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.line-chart svg {
  width: 100%;
  height: 240px;
  overflow: visible;
  border-bottom: 1px solid var(--line-strong);
  background: repeating-linear-gradient(0deg, #ffffff 0, #ffffff 58px, #f1f5f9 59px);
}

.line {
  fill: none;
  stroke: var(--blue);
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.line.green {
  stroke: var(--green);
}

.line.amber {
  stroke: var(--amber);
}

.line.teal {
  stroke: var(--teal);
}

.marker {
  fill: var(--blue);
  stroke: #ffffff;
  stroke-width: 0.8;
  vector-effect: non-scaling-stroke;
}

.marker.green {
  fill: var(--green);
}

.marker.amber {
  fill: var(--amber);
}

.marker.teal {
  fill: var(--teal);
}

.line-chart-labels {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.dual-bar-chart {
  min-height: 240px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(48px, 1fr);
  gap: 10px;
  align-items: end;
  overflow-x: auto;
  padding: 16px;
}

.chart-day {
  min-width: 48px;
  display: grid;
  grid-template-rows: 176px auto;
  gap: 8px;
}

.chart-columns {
  height: 176px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  border-bottom: 1px solid var(--line-strong);
  background: repeating-linear-gradient(0deg, #ffffff 0, #ffffff 43px, #f1f5f9 44px);
}

.chart-bar {
  width: 14px;
  min-height: 0;
  border-radius: 5px 5px 0 0;
  background: var(--blue);
}

.chart-bar.green {
  background: var(--green);
}

.chart-bar.amber {
  background: var(--amber);
}

.chart-bar.teal {
  background: var(--teal);
}

.chart-day small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}

.ranked-chart {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.ranked-row {
  display: grid;
  gap: 7px;
}

.ranked-row > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ranked-row strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.ranked-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.ranked-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.ranked-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.ranked-track.amber span {
  background: var(--amber);
}

@media (max-width: 1100px) {
  .shell {
    grid-template-columns: 88px 1fr;
  }

  .sidebar {
    padding-inline: 10px;
  }

  .brand div:last-child,
  .nav-item span:last-child,
  .sidebar-footer span:last-child {
    display: none;
  }

  .nav-item {
    justify-content: center;
  }

  .split-layout,
  .receiving-grid,
  .work-grid,
  .narrow-right,
  .help-layout {
    grid-template-columns: 1fr;
  }

  .metric-grid,
  .compact-metrics,
  .dashboard-filter,
    .custom-range-form,
    .invoice-form-top,
    .client-grid,
    .portal-grid,
    .checklist-grid,
    .dashboard-chart-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .invoice-lines-head,
  .invoice-line {
    grid-template-columns: minmax(220px, 1fr) 90px 110px 110px 42px;
  }

  .fba-sku-row {
    grid-template-columns: 72px minmax(140px, 170px) minmax(92px, 108px) minmax(300px, 1fr) minmax(88px, 96px) 120px 140px minmax(180px, 220px) auto;
  }

  .invoice-detail-grid,
  .service-record-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .shell {
    display: block;
  }

  .sidebar {
    position: static;
    height: auto;
    max-height: none;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 12px;
  }

  .nav-list {
    display: flex;
    min-width: max-content;
  }

  .topbar,
  .page-header {
    align-items: stretch;
    flex-direction: column;
  }

  .notification-panel {
    right: 0;
    width: min(360px, calc(100vw - 28px));
  }

  .top-actions,
  .toolbar,
  .panel-header {
    align-items: stretch;
  }

  .metric-grid,
  .compact-metrics,
  .dashboard-filter,
  .custom-range-form,
  .invoice-form-top,
  .stage-board,
  .warehouse-map,
  .form-grid,
  .service-fields,
    .client-grid,
    .portal-grid,
    .checklist-grid,
    .dashboard-chart-grid {
    grid-template-columns: 1fr;
  }

  .portal-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .custom-range-form {
    grid-template-columns: 1fr;
  }

  .fba-sku-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .warehouse-location-row {
    grid-template-columns: 1fr;
   }

  .fba-line-title,
  .fba-row-field,
  .fba-check-field,
  .fba-remove-row {
    grid-column: 1;
  }

  .fba-sku-choice {
    grid-template-columns: 1fr;
  }

  .fba-check-polybag,
  .fba-check-bubble,
  .fba-check-remove-label {
    width: fit-content;
  }

  .need-help-box {
    align-items: stretch;
    flex-direction: column;
  }

  .review-summary div {
    grid-template-columns: 1fr;
  }

  .help-message {
    max-width: 100%;
  }

  .pricing-lines label {
    grid-template-columns: 1fr;
  }

  .main {
    padding: 14px;
  }

  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 620px;
  }

  .bulk-toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  .bulk-toolbar strong {
    grid-column: 1 / -1;
  }

  .bulk-toolbar select,
  .bulk-toolbar .secondary-button,
  .bulk-toolbar .label-icon-button {
    width: 100%;
  }

  .icon-actions {
    flex-wrap: wrap;
    gap: 8px;
  }

  .label-icon-button {
    width: 38px;
    height: 38px;
    min-height: 38px;
  }

  .order-action-form {
    display: flex;
    width: 100%;
    margin: 0 0 6px;
  }

  .order-action-form button,
  .action-row button {
    width: 100%;
    min-height: 36px;
  }

  .invoice-heading,
  .invoice-total-box {
    justify-self: stretch;
    width: 100%;
  }

  .invoice-lines-head {
    display: none;
  }

  .invoice-line {
    grid-template-columns: 1fr;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
  }

  .fba-section-head,
  .fba-sku-row {
    grid-template-columns: 1fr;
    display: grid;
  }

  .fba-check-field,
  .fba-add-pack-row,
  .fba-remove-row {
    align-self: stretch;
  }

  .invoice-line strong {
    text-align: left;
  }

  h1 {
    font-size: 26px;
  }
}
.scan-metrics {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.scan-form {
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr minmax(180px, 280px) minmax(150px, 190px);
  gap: 12px;
  align-items: end;
  padding: 16px;
}

.scan-form label {
  display: grid;
  gap: 6px;
  color: #52637c;
  font-size: 13px;
  font-weight: 700;
}

.scan-input {
  min-height: 56px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0;
}

.scan-button {
  min-height: 56px;
}

.scan-result {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
  margin: 0 16px 16px;
  padding: 14px 16px;
  border: 1px solid #b7ebc6;
  border-radius: 8px;
  background: #eafaf0;
  color: #064e20;
}

.scan-live-panel {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin: 0 16px 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.scan-live-panel p {
  margin: 4px 0 0;
  color: var(--muted);
}

.scan-live-log {
  display: grid;
  gap: 8px;
  margin: 0 16px 16px;
}

.scan-live-row {
  padding: 12px 14px;
  border-radius: 8px;
  font-weight: 700;
}

.scan-live-row.success {
  border: 1px solid #b7ebc6;
  background: #eafaf0;
  color: #064e20;
}

.scan-live-row.error {
  border: 1px solid #fecaca;
  background: #fee2e2;
  color: #991b1b;
}

.bulk-scan-form {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.bulk-scan-form label {
  display: grid;
  gap: 6px;
  color: #52637c;
  font-size: 13px;
  font-weight: 700;
}

.bulk-scan-textarea {
  width: 100%;
  min-height: 180px;
  resize: vertical;
  font-size: 15px;
  line-height: 1.5;
  font-family: Consolas, "Courier New", monospace;
}

.bulk-apply-button {
  align-self: end;
}

.batch-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 0 16px 16px;
  padding: 12px 14px;
  border-radius: 8px;
  font-weight: 700;
}

.batch-summary span {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  color: #1f2a44;
}

.batch-summary.success {
  border: 1px solid #b7ebc6;
  background: #eafaf0;
  color: #064e20;
}

.batch-summary.blocked {
  border: 1px solid #fecaca;
  background: #fee2e2;
  color: #991b1b;
}

.status.success,
.status.ready_to_ship,
.status.received,
.status.applied {
  color: #087443;
  background: #d8f8e5;
}

.status.not_found,
.status.wrong_mode,
.status.duplicate,
.status.access_denied,
.status.blocked {
  color: #a51818;
  background: #ffe2e2;
}

@media (max-width: 980px) {
  .scan-metrics,
  .scan-form,
  .scan-result,
  .scan-live-panel,
  .batch-summary {
    grid-template-columns: 1fr;
    display: grid;
  }

  .permission-preview-grid {
    grid-template-columns: 1fr;
  }
}

/* Compact operations layout */
body {
  font-size: 13px;
}

.shell {
  grid-template-columns: 246px 1fr;
}

.sidebar {
  gap: 18px;
  padding: 18px 14px;
}

.brand {
  gap: 10px;
  padding: 4px 8px;
}

.brand strong {
  font-size: 17px;
}

.brand small,
.panel-header p,
.modal-header p,
.metric small,
.dashboard-section-heading small,
.helper-text,
.row-title small {
  font-size: 12px;
}

.completion-modal[hidden] {
  display: none !important;
}

.completion-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.completion-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.completion-modal-card {
  position: relative;
  z-index: 1;
  width: min(1060px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 20px;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.30);
}

#completionBoxesForm {
  display: grid;
  gap: 14px;
}

#completionBoxesContainer {
  display: grid;
  gap: 12px;
}

.forwarding-box-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.forwarding-box-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.forwarding-box-card-header,
.forwarding-box-card-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.forwarding-box-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.forwarding-box-card-actions .secondary-button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
  white-space: nowrap;
}

.forwarding-box-card-actions .inline-action-form {
  margin: 0;
}

.forwarding-box-card-header small,
.forwarding-box-card-row span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.forwarding-box-card-row strong {
  max-width: 65%;
  text-align: right;
}

.forwarding-box-contents-row {
  align-items: flex-start;
}

.forwarding-box-contents {
  flex: 1 1 auto;
  max-width: 68%;
  min-width: 0;
  text-align: right;
}

.forwarding-box-contents > strong {
  display: block;
  max-width: none;
}

.forwarding-box-card .forwarding-box-contents-list {
  display: grid;
  gap: 4px;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.forwarding-box-card .forwarding-box-contents-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  align-items: end;
  justify-items: end;
  margin: 0 !important;
  padding: 0 !important;
  text-align: right;
}

.forwarding-box-card .forwarding-box-contents-list li::marker {
  content: '';
}

.forwarding-box-content-main {
  display: flex;
  max-width: 100%;
  align-items: baseline;
  justify-content: flex-end;
  gap: 5px;
}

.forwarding-box-card .forwarding-box-contents-list span {
  overflow: hidden;
  max-width: 100%;
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forwarding-box-card .forwarding-box-contents-list strong {
  max-width: none;
  color: #0f172a;
  font-size: 13px;
  line-height: 1.2;
  text-align: right;
  white-space: nowrap;
}

.forwarding-box-card .forwarding-box-contents-list small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: #516175;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forwarding-box-contents-more {
  margin-top: 5px;
}

.forwarding-box-contents-more summary {
  cursor: pointer;
  color: #2563eb;
  font-size: 12px;
  font-weight: 700;
  list-style: none;
}

.forwarding-box-contents-more summary::-webkit-details-marker {
  display: none;
}

.forwarding-box-contents-more .forwarding-box-contents-list {
  margin-top: 5px;
}

.nav-list {
  gap: 3px;
}

.nav-item {
  min-height: 36px;
  gap: 10px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 14px;
}

.nav-item .icon,
.sidebar .nav-item .icon {
  display: inline-flex !important;
  width: 17px !important;
  height: 17px !important;
  flex: 0 0 17px !important;
  align-items: center;
  justify-content: center;
  color: #93c5fd;
  overflow: visible;
}

.nav-item .icon svg,
.sidebar .nav-item .icon svg {
  width: 16px !important;
  height: 16px !important;
  display: block !important;
}

.sidebar-footer {
  font-size: 12px;
  padding: 8px;
}

.main {
  padding: 16px 18px;
}

.topbar {
  margin-bottom: 14px;
}

.eyebrow {
  font-size: 12px;
}

h1 {
  font-size: 26px;
}

h2 {
  font-size: 16px;
}

.panel {
  box-shadow: 0 10px 28px rgba(31, 41, 55, 0.06);
}

.panel-header,
.form-grid,
.filter-form,
.alert-list,
.help-thread-list,
.help-message-list,
.pricing-form,
.pack-station,
.bulk-toolbar {
  padding: 12px 14px;
}

.metric-grid {
  gap: 10px;
  margin-bottom: 12px;
}

.metric {
  min-height: 82px;
  padding: 12px;
}

.metric strong {
  margin-top: 6px;
  font-size: 24px;
}

.compact-metrics .metric {
  min-height: 74px;
  padding: 10px 12px;
}

.compact-metrics .metric strong {
  font-size: 22px;
}

th,
td {
  padding: 9px 12px;
}

th {
  font-size: 11px;
}

td {
  font-size: 13px;
}

.primary-button,
.secondary-button,
.ghost-button,
.icon-button,
.filter-chip,
.filter-form .primary-button,
.filter-form .secondary-button,
.panel-header select,
.toolbar select,
label select,
label input,
label textarea {
  min-height: 34px;
  border-radius: 6px;
}

.primary-button {
  padding: 0 12px;
}

.secondary-button,
.ghost-button {
  padding: 0 10px;
}

.icon-button {
  width: 34px;
}

.label-icon-button {
  width: 34px;
  height: 34px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--blue);
  border-radius: 7px;
  background: var(--blue);
  color: #ffffff;
  text-decoration: none;
}

.label-icon-button:hover {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
}

.label-icon-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.status,
.pill {
  min-height: 22px;
  padding: 0 8px;
  font-size: 11px;
}

.table-wrap.tall {
  max-height: calc(100vh - 185px);
}

/* Completion details page-section fallback: avoids modal/overlay issues */
.completion-details-panel {
  margin-bottom: 16px;
  border: 2px solid var(--blue);
}

.completion-details-form {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.completion-box-count-field {
  max-width: 220px;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.completion-box-count-field input,
.completion-box-grid input,
.completion-box-items input {
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 9px;
  background: #fff;
  color: var(--ink);
}

.completion-details-panel .form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 4px;
}
.forwarding-box-status-history {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #d9e0ea;
  font-size: 13px;
}

.forwarding-box-status-history > strong {
  color: #0f172a;
}

.forwarding-box-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.forwarding-box-history-row span {
  color: #516175;
}

.forwarding-box-history-row small {
  color: #0f172a;
  font-weight: 700;
  text-align: right;
}

.inbound-container-row {
  display: grid;
  grid-template-columns: 70px minmax(120px, 0.75fr) minmax(220px, 1.25fr) minmax(120px, 0.7fr) repeat(4, minmax(82px, 0.55fr)) minmax(130px, 0.85fr) minmax(260px, 1.8fr);
  gap: 12px;
  align-items: end;
}
.inbound-container-row label {
  min-width: 0;
}
.inbound-container-product-field select {
  width: 100%;
}

.inbound-container-qty-lines {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.inbound-container-qty-lines label {
  display: grid;
  gap: 4px;
  margin: 0;
}
.inbound-container-qty-lines input {
  width: 100%;
}
.inbound-container-tracking-field {
  min-width: 0;
}
.inbound-container-tracking-field input {
  min-width: 220px;
}
@media (max-width: 1200px) {
  .inbound-container-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .inbound-container-tracking-field {
    grid-column: 1 / -1;
  }
  .inbound-container-tracking-field input {
    min-width: 0;
  }
}
@media (max-width: 720px) {
  .inbound-container-row {
    grid-template-columns: 1fr;
  }
}

.inbound-container-sku-lines {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  margin-top: 2px;
}

.inbound-container-sku-row {
  display: grid;
  grid-template-columns: 56px minmax(280px, 1fr) minmax(110px, 150px) auto;
  gap: 10px;
  align-items: end;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.inbound-container-sku-row > strong {
  align-self: center;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.inbound-container-sku-row label {
  display: grid;
  gap: 4px;
  margin: 0;
}

.inbound-container-sku-row select,
.inbound-container-sku-row input {
  width: 100%;
  min-width: 0;
}

.inbound-container-sku-row .compact-action-button {
  min-height: 34px;
  padding: 6px 10px;
}

.inbound-container-sku-row .compact-action-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.inbound-container-sku-lines > [data-add-inbound-container-sku] {
  justify-self: start;
}

.wide-table-wrap {
  overflow-x: auto;
}

.compact-number-input {
  width: 86px;
  min-height: 34px;
  padding: 6px 8px;
}

@media (max-width: 900px) {
  .compact-number-input {
    width: 76px;
  }
}


.sla-badge {
  display: inline-grid;
  gap: 2px;
  min-width: 150px;
  border-radius: 8px;
  padding: 7px 9px;
  border: 1px solid #d9e0ea;
  background: #f8fafc;
  color: #334155;
  line-height: 1.25;
}

.sla-badge strong {
  font-size: 12px;
  color: inherit;
}

.sla-badge small {
  font-size: 11px;
  color: inherit;
}

.sla-badge.sla-good {
  border-color: #86efac;
  background: #dcfce7;
  color: #166534;
}

.sla-badge.sla-warning {
  border-color: #fde68a;
  background: #fef3c7;
  color: #92400e;
}

.sla-badge.sla-overdue {
  border-color: #fecaca;
  background: #fee2e2;
  color: #991b1b;
}

.sla-badge.sla-complete {
  border-color: #bfdbfe;
  background: #dbeafe;
  color: #1d4ed8;
}


.sla-badge.sla-paused {
  border-color: #cbd5e1;
  background: #f1f5f9;
  color: #475569;
}

/* Guided FBA/WFS/TTS pack builder */
.fba-multi-section .fba-sku-row[data-fba-row] {
  grid-template-columns: 72px minmax(230px, 270px) minmax(300px, 1fr) minmax(112px, 140px) minmax(130px, 150px) minmax(180px, 205px) minmax(130px, 150px) minmax(190px, 230px) auto;
  grid-template-areas:
    "title type sku polybag bubble remove-label total pdf remove"
    "summary summary summary summary summary summary summary summary summary";
  align-items: end;
}

.fba-multi-section .fba-sku-row[data-fba-row][data-fba-pack-mode="bundle"] {
  grid-template-columns: 72px minmax(230px, 270px) minmax(150px, 180px) minmax(180px, 240px) minmax(150px, 180px) minmax(190px, 230px) auto;
  grid-template-areas:
    "title type pack-size sku-count . . remove"
    ". sku sku sku sku sku ."
    ". polybag bubble remove-label total pdf ."
    "summary summary summary summary summary summary summary";
}

.fba-multi-section .fba-sku-row[data-fba-row] > .fba-field-pack-type { grid-area: type; }
.fba-multi-section .fba-sku-row[data-fba-row] > .fba-pack-summary { grid-area: summary; }

.fba-field-pack-type {
  border: 0;
  margin: 0;
  padding: 0;
}

.fba-field-pack-type legend {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 4px;
}

.fba-pack-type-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(108px, 1fr));
  gap: 8px;
}

.fba-pack-type-option {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
  white-space: normal;
  cursor: pointer;
}

.fba-pack-type-option span {
  display: block;
}

.fba-pack-type-option:has(input:checked) {
  border-color: var(--blue);
  background: #eff6ff;
  box-shadow: inset 4px 0 0 var(--blue);
}

.fba-pack-type-option input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--blue);
}

.fba-multi-section .fba-sku-row[data-fba-row][data-fba-pack-mode="single"] > .fba-field-pack-size,
.fba-multi-section .fba-sku-row[data-fba-row][data-fba-pack-mode="single"] > .fba-field-sku-count {
  display: none;
}

.fba-multi-section .fba-sku-row[data-fba-row][data-fba-pack-mode="bundle"] > .fba-field-sku {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.fba-multi-section .fba-sku-row[data-fba-row][data-fba-pack-mode="bundle"] .fba-sku-selector-list {
  display: grid;
  gap: 10px;
}

.fba-multi-section .fba-sku-row[data-fba-row][data-fba-pack-mode="bundle"] .fba-sku-choice {
  display: grid;
  grid-template-columns: 64px minmax(260px, 1fr) minmax(120px, 150px);
  gap: 10px;
  align-items: center;
}

.fba-multi-section .fba-sku-row[data-fba-row][data-fba-pack-mode="bundle"] .fba-sku-choice > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}


.fba-pack-summary {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.fba-sku-choice-single {
  grid-template-columns: minmax(220px, 1fr);
}

.fba-sku-choice-single > span {
  display: none;
}

.fba-sku-choice-single input[hidden] {
  display: none;
}

@media (max-width: 1500px) {
  .fba-multi-section .fba-sku-row[data-fba-row] {
    grid-template-columns: 72px minmax(230px, 270px) minmax(300px, 1fr) minmax(130px, 170px) minmax(130px, 150px) minmax(145px, 165px) minmax(180px, 210px);
    grid-template-areas:
      "title type sku sku polybag bubble remove-label"
      ". . . . total pdf remove"
      "summary summary summary summary summary summary summary";
  }

  .fba-multi-section .fba-sku-row[data-fba-row][data-fba-pack-mode="bundle"] {
    grid-template-columns: 72px minmax(230px, 270px) minmax(140px, 170px) minmax(170px, 230px) minmax(130px, 170px) minmax(180px, 220px);
    grid-template-areas:
      "title type pack-size sku-count . ."
      ". sku sku sku sku sku"
      ". polybag bubble remove-label total pdf"
      "summary summary summary summary summary summary"
      ". . . . . remove";
  }
}

@media (max-width: 980px) {
  .fba-multi-section .fba-sku-row[data-fba-row],
  .fba-multi-section .fba-sku-row[data-fba-row][data-fba-pack-mode="bundle"] {
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "type"
      "pack-size"
      "sku-count"
      "sku"
      "polybag"
      "bubble"
      "remove-label"
      "total"
      "pdf"
      "summary"
      "remove";
  }

  .fba-multi-section .fba-sku-row[data-fba-row][data-fba-pack-mode="single"] {
    grid-template-areas:
      "title"
      "type"
      "sku"
      "polybag"
      "bubble"
      "remove-label"
      "total"
      "pdf"
      "summary"
      "remove";
  }

  .fba-multi-section .fba-sku-row[data-fba-row][data-fba-pack-mode="bundle"] .fba-sku-choice {
    grid-template-columns: 1fr;
  }
}

.platform-subscription-modal {
  align-items: flex-start;
}

.platform-subscription-modal-card {
  display: grid;
  gap: 12px;
  margin: 0 auto;
  width: min(1440px, calc(100vw - 48px));
}

.platform-subscription-modal-card .page-section {
  margin: 0;
}

.platform-subscription-modal .metric-grid {
  margin: 0;
}

.subscriber-actions-cell {
  text-align: right;
}

.subscriber-actions-cell .row-menu summary {
  width: 36px;
  min-height: 32px;
  font-size: 20px;
}

.subscriber-actions-cell .row-menu-panel {
  min-width: 184px;
}

.subscriber-table-wrap,
.subscriber-table-wrap table,
.subscriber-table-wrap tbody,
.subscriber-table-wrap tr,
.subscriber-table-wrap td {
  overflow: visible;
}

.subscriber-actions-cell {
  position: relative;
  overflow: visible;
}

.subscriber-actions-cell .row-menu[open] {
  z-index: 2000;
}

.subscriber-actions-cell .row-menu-panel {
  top: 0;
  right: calc(100% + 8px);
  z-index: 2000;
}

.platform-promo-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 1fr);
  gap: 12px;
  align-items: end;
}

@media (max-width: 700px) {
  .platform-promo-row {
    grid-template-columns: 1fr;
  }
}

/* Subscriber registration and Platform Admin application review */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 12px 0 16px;
}
.summary-grid div {
  border: 1px solid var(--border-color, #d7e0ef);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}
.summary-grid dt {
  color: var(--muted-text, #52627a);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}
.summary-grid dd {
  margin: 4px 0 0;
  font-weight: 700;
}
.two-column-layout {
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.4fr);
  align-items: start;
}
.selected-row {
  background: #eef5ff;
}
.plan-comparison {
  display: grid;
  gap: 8px;
  margin: 2px 0 4px;
  overflow-x: auto;
}
.plan-comparison-header {
  display: grid;
  gap: 3px;
}
.plan-comparison-header strong,
.pricing-discount-grid strong {
  color: var(--ink);
  font-size: 13px;
}
.plan-comparison-header span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.pricing-discount-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px;
}
.pricing-discount-grid > div,
.pricing-disclaimers {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px 12px;
}
.pricing-discount-grid ul,
.pricing-disclaimers {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
@media (max-width: 760px) {
  .pricing-discount-grid {
    grid-template-columns: 1fr;
  }
}
.plan-comparison > strong {
  color: var(--ink);
  font-size: 13px;
}
.plan-comparison table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}
.plan-comparison th,
.plan-comparison td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 12px;
  text-align: left;
  white-space: nowrap;
}
.plan-comparison th {
  background: #f8fafc;
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
}
.plan-comparison tr:last-child td {
  border-bottom: 0;
}
.auth-form label.checkbox-line,
label.checkbox-line {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}
.auth-form label.checkbox-line input[type="checkbox"],
label.checkbox-line input[type="checkbox"] {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 1px 0 0;
  padding: 0;
}
.status-pending {
  background: #fff7d6;
  color: #8a5b00;
}
@media (max-width: 980px) {
  .two-column-layout {
    grid-template-columns: 1fr;
  }
}
/* FBM create-order compact layout override */
.fbm-order-fields .fbm-mode-field {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}

.fbm-order-fields .fbm-mode-field legend {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 10px;
  padding: 0;
}

.fbm-order-fields .fbm-mode-options {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
}

.fbm-order-fields .fbm-mode-option {
  align-items: center !important;
  cursor: pointer;
  display: inline-flex !important;
  flex-direction: row !important;
  gap: 8px;
  margin: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  width: auto !important;
}

.fbm-order-fields .fbm-mode-option input[type="radio"] {
  accent-color: #2563eb;
  appearance: auto;
  flex: 0 0 14px;
  height: 14px !important;
  margin: 0 !important;
  min-height: 14px !important;
  min-width: 14px !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  position: static !important;
  width: 14px !important;
}

.fbm-order-fields .fbm-mode-option span {
  align-items: baseline;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.fbm-order-fields .fbm-mode-option strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.2;
}

.fbm-order-fields .fbm-mode-option small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

.fbm-order-fields .fbm-single-section {
  background: #ffffff;
  padding: 14px;
}

.fbm-order-fields .fbm-manual-head {
  display: block;
}

.fbm-order-fields .fbm-manual-head strong,
.fbm-order-fields .fbm-manual-head .helper-text {
  display: inline;
}

.fbm-order-fields .fbm-manual-rows {
  display: grid;
  gap: 10px;
}

.fbm-order-fields .fbm-manual-row {
  align-items: end !important;
  background: #ffffff;
  border: 1px solid var(--line);
  border-left: 5px solid #2563eb;
  border-radius: 8px;
  display: grid !important;
  gap: 10px;
  grid-template-columns: 68px minmax(260px, 1.6fr) 92px minmax(200px, 1fr) minmax(180px, 0.8fr) auto !important;
  padding: 10px 12px;
}

.fbm-order-fields .fbm-manual-row > * {
  min-width: 0;
}

.fbm-order-fields .fbm-manual-line-title {
  align-self: center;
  font-size: 14px;
  white-space: nowrap;
}

.fbm-order-fields .fbm-manual-row .fba-row-field {
  align-self: end;
  display: grid;
  gap: 4px;
  margin: 0;
  width: auto;
}

.fbm-order-fields .fbm-manual-row .fba-row-field span {
  font-size: 12px;
  line-height: 1.1;
}

.fbm-order-fields .fbm-manual-row select,
.fbm-order-fields .fbm-manual-row input[type="text"],
.fbm-order-fields .fbm-manual-row input[type="number"],
.fbm-order-fields .fbm-manual-row input[type="file"] {
  box-sizing: border-box;
  min-height: 36px !important;
  width: 100% !important;
}

.fbm-order-fields .fbm-manual-qty-field input[type="number"] {
  max-width: 92px;
}

.fbm-order-fields .fbm-manual-label-field input[type="file"] {
  padding: 6px 8px;
}

.fbm-order-fields .fbm-manual-remove-button {
  align-self: end;
  min-height: 36px;
  white-space: nowrap;
}

.fbm-order-fields .fbm-manual-actions {
  display: flex;
  justify-content: flex-start;
}

.fbm-order-fields .fbm-add-order-button {
  width: auto;
}

@media (max-width: 1100px) {
  .fbm-order-fields .fbm-manual-row {
    grid-template-columns: 1fr !important;
  }

  .fbm-order-fields .fbm-manual-qty-field input[type="number"] {
    max-width: none;
  }
}
/* Single FBM label source dropdown and platform-label details */
.fbm-order-fields .fbm-single-source-control {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  margin: 2px 0 4px;
  max-width: 360px;
  width: auto;
}

.fbm-order-fields .fbm-single-source-control span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.fbm-order-fields .fbm-single-source-control select {
  min-height: 34px;
  min-width: 210px;
  width: auto;
}

.fbm-order-fields [data-fbm-single-source-section][hidden] {
  display: none !important;
}

.fbm-order-fields .fbm-platform-detail-grid {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  padding: 12px;
}

.fbm-order-fields .fbm-platform-detail-grid label {
  display: grid;
  gap: 4px;
  margin: 0;
  min-width: 0;
  width: auto;
}

.fbm-order-fields .fbm-platform-detail-grid label,
.fbm-order-fields .fbm-platform-detail-grid label input,
.fbm-order-fields .fbm-platform-detail-grid label select {
  font-size: 12px;
}

.fbm-order-fields .fbm-platform-detail-grid input,
.fbm-order-fields .fbm-platform-detail-grid select {
  min-height: 34px !important;
  width: 100% !important;
}

.fbm-order-fields .fbm-platform-detail-grid .fbm-platform-wide {
  grid-column: span 2;
}

@media (max-width: 1100px) {
  .fbm-order-fields .fbm-platform-detail-grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }
}

@media (max-width: 700px) {
  .fbm-order-fields .fbm-single-source-control {
    align-items: stretch;
    display: grid;
    max-width: none;
    width: 100%;
  }

  .fbm-order-fields .fbm-single-source-control select {
    width: 100%;
  }

  .fbm-order-fields .fbm-platform-detail-grid,
  .fbm-order-fields .fbm-platform-detail-grid .fbm-platform-wide {
    grid-column: 1;
    grid-template-columns: 1fr;
  }
}
/* Ensure the Single FBM label-source select never renders as blank text */
.fbm-order-fields .fbm-single-source-control select,
.fbm-order-fields .fbm-single-source-control select option {
  color: var(--ink) !important;
  background-color: #ffffff !important;
}
.tracking-duplicate-note {
  color: #b45309 !important;
  font-weight: 700;
}
/* Product pricing override form */
.product-pricing-override-section {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
}

.section-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.section-heading-row h3 {
  margin: 0;
  font-size: 16px;
}

.section-heading-row p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.product-override-toggle {
  max-width: 340px;
}

.product-override-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.product-override-grid .wide-field {
  grid-column: 1 / -1;
}

@media (max-width: 760px) {
  .section-heading-row {
    display: block;
  }

  .product-override-toggle {
    margin-top: 10px;
    max-width: none;
  }
}
/* Product pricing override list */
.product-pricing-override-section {
  background: #ffffff;
}

.product-pricing-list-wrap {
  display: block;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  transition: opacity 0.15s ease, background-color 0.15s ease;
}

.product-pricing-list-wrap:disabled,
.product-pricing-list-wrap[disabled] {
  background: #f1f5f9;
  opacity: 0.62;
}

.product-pricing-list {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
}

.product-pricing-list th,
.product-pricing-list td {
  border-bottom: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: middle;
}

.product-pricing-list th {
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.product-pricing-list tr:last-child td {
  border-bottom: 0;
}

.product-pricing-list td strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.25;
}

.product-pricing-list td span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.product-pricing-list-check {
  width: 52px;
  text-align: center;
}

.product-pricing-list-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
}

.product-pricing-list input[type="number"] {
  max-width: 160px;
  min-width: 120px;
}

@media (max-width: 760px) {
  .product-pricing-list {
    min-width: 680px;
  }

  .product-pricing-list-wrap {
    overflow-x: auto;
  }
}
.product-pricing-list tr.is-pricing-row-disabled {
  background: #f8fafc;
  color: #94a3b8;
}

.product-pricing-list tr.is-pricing-row-disabled strong,
.product-pricing-list tr.is-pricing-row-disabled span,
.product-pricing-list tr.is-pricing-row-disabled td {
  color: #94a3b8;
}

.product-pricing-list input[type="number"]:disabled {
  background: #e5e7eb;
  border-color: #cbd5e1;
  color: #64748b;
  cursor: not-allowed;
}

.product-pricing-list-wrap[disabled] .product-pricing-list input,
.product-pricing-list-wrap:disabled .product-pricing-list input {
  cursor: not-allowed;
}
.page-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  border-bottom: 1px solid var(--line);
}

.page-tab {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #ffffff;
  color: var(--muted);
  font-weight: 800;
  text-decoration: none;
}

.page-tab.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #ffffff;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  padding: 16px;
}

.detail-grid > div {
  min-height: 76px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.field-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

/* Compact inbound shipment layout */
.service-fields[data-services="INBOUND_SHIPMENTS"] {
  gap: 10px 12px;
}

.service-fields[data-services="INBOUND_SHIPMENTS"] .inbound-ship-to-field {
  max-width: 860px;
}

.service-fields[data-services="INBOUND_SHIPMENTS"] .inbound-ship-to-field select {
  max-width: 820px;
}

.service-fields[data-services="INBOUND_SHIPMENTS"] .inbound-container-type-field {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 22px;
  padding: 10px 12px;
  min-height: 0;
}

.service-fields[data-services="INBOUND_SHIPMENTS"] .inbound-container-type-field legend {
  width: 100%;
  margin: 0 0 2px;
}

.service-fields[data-services="INBOUND_SHIPMENTS"] .inbound-container-count-field {
  max-width: 260px;
}

.service-fields[data-services="INBOUND_SHIPMENTS"] .inbound-container-count-field input {
  max-width: 120px;
}

.service-fields[data-services="INBOUND_SHIPMENTS"] .fba-section-head {
  align-items: center;
  gap: 8px 14px;
  margin: 0;
}

.service-fields[data-services="INBOUND_SHIPMENTS"] .inbound-box-tracking-section {
  padding: 10px 12px;
  background: #ffffff;
}

.service-fields[data-services="INBOUND_SHIPMENTS"] .inbound-container-row {
  grid-template-columns: 54px 136px minmax(360px, 1fr) 150px minmax(240px, 320px);
  gap: 8px 10px;
  padding: 10px 12px;
  align-items: end;
}

.service-fields[data-services="INBOUND_SHIPMENTS"] .inbound-container-row > strong {
  align-self: center;
  font-size: 13px;
}

.service-fields[data-services="INBOUND_SHIPMENTS"] .inbound-sku-mix-field,
.service-fields[data-services="INBOUND_SHIPMENTS"] .inbound-carrier-field,
.service-fields[data-services="INBOUND_SHIPMENTS"] .inbound-container-tracking-field {
  display: grid;
  gap: 4px;
  margin: 0;
  min-width: 0;
}

.service-fields[data-services="INBOUND_SHIPMENTS"] .inbound-container-sku-lines {
  grid-column: 3 / 4;
  margin: 0;
  gap: 8px;
}

.service-fields[data-services="INBOUND_SHIPMENTS"] .inbound-container-sku-row {
  grid-template-columns: 48px minmax(260px, 1fr) 130px auto;
  gap: 8px;
  padding: 8px;
}

.service-fields[data-services="INBOUND_SHIPMENTS"] .inbound-container-sku-row select,
.service-fields[data-services="INBOUND_SHIPMENTS"] .inbound-container-sku-row input,
.service-fields[data-services="INBOUND_SHIPMENTS"] .inbound-sku-mix-field select,
.service-fields[data-services="INBOUND_SHIPMENTS"] .inbound-carrier-field select,
.service-fields[data-services="INBOUND_SHIPMENTS"] .inbound-container-tracking-field input {
  min-height: 34px;
}

.service-fields[data-services="INBOUND_SHIPMENTS"] .inbound-carrier-field select,
.service-fields[data-services="INBOUND_SHIPMENTS"] .inbound-container-tracking-field input {
  min-width: 0;
}

@media (max-width: 1250px) {
  .service-fields[data-services="INBOUND_SHIPMENTS"] .inbound-container-row {
    grid-template-columns: 54px 136px minmax(280px, 1fr) minmax(130px, 150px);
  }

  .service-fields[data-services="INBOUND_SHIPMENTS"] .inbound-container-tracking-field {
    grid-column: 3 / -1;
  }
}

@media (max-width: 820px) {
  .service-fields[data-services="INBOUND_SHIPMENTS"] .inbound-container-row,
  .service-fields[data-services="INBOUND_SHIPMENTS"] .inbound-container-sku-row {
    grid-template-columns: 1fr;
  }

  .service-fields[data-services="INBOUND_SHIPMENTS"] .inbound-container-sku-lines,
  .service-fields[data-services="INBOUND_SHIPMENTS"] .inbound-container-tracking-field {
    grid-column: 1 / -1;
  }

  .service-fields[data-services="INBOUND_SHIPMENTS"] .inbound-ship-to-field,
  .service-fields[data-services="INBOUND_SHIPMENTS"] .inbound-ship-to-field select {
    max-width: none;
  }
}

/* Warehouse subscription promo controls */
.subscription-action-reason {
  margin-top: 4px;
}

.subscription-action-reason label {
  display: grid;
  gap: 6px;
}

.subscription-action-reason input {
  width: 100%;
}

.warehouse-promo-controls,
.warehouse-trial-controls {
  display: grid;
  gap: 6px;
  min-width: 190px;
  max-width: 240px;
}

.warehouse-trial-controls {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-color, #d7e0ef);
}

.warehouse-trial-controls small {
  color: var(--muted, #52637a);
  font-weight: 700;
}

.warehouse-promo-controls select,
.warehouse-promo-controls input,
.warehouse-trial-controls select,
.warehouse-trial-controls input {
  width: 100%;
  min-height: 32px;
  padding: 6px 8px;
  font-size: 12px;
}


/* Help chat staff/customer thread modal */
.help-layout {
  align-items: stretch;
  min-height: calc(100vh - 170px);
}

.help-thread-panel,
.help-conversation-panel {
  min-height: calc(100vh - 170px);
}

.help-thread-panel .help-thread-list {
  align-content: start;
  max-height: calc(100vh - 265px);
  min-height: 560px;
  overflow-y: auto;
}

.help-thread-modal {
  align-items: center;
  background: rgba(15, 23, 42, 0.45);
  display: none;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 10000;
}

.help-thread-modal:target {
  display: flex;
}

.help-thread-modal .modal-dismiss {
  inset: 0;
  position: absolute;
}

.help-thread-modal-card {
  max-height: calc(100vh - 48px);
  overflow: auto;
  position: relative;
  width: min(960px, calc(100vw - 48px));
  z-index: 1;
}

.help-thread-modal-card .modal-form {
  padding-top: 16px;
}

@media (max-width: 900px) {
  .help-thread-panel,
  .help-conversation-panel,
  .help-thread-panel .help-thread-list {
    min-height: auto;
    max-height: none;
  }
}
